Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>

int n,a,t[102];

int main(){
  int i;
  scanf("%d", &n);

  for(i = 0; i < n; i++){
    scanf("%d", &a);
    t[a]++;
  }
  for(i = 100; i > 0; i--){
    t[i] += t[i+1];
    if(t[i] >= i){
      printf("%d\n", i);
      return 0;
    }
  }
}

```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	n(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	t(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L2
	xorl	%ebp, %ebp
	leaq	a(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%r12, %rdi
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movslq	a(%rip), %rax
	addl	$1, (%rbx,%rax,4)
	cmpl	%ebp, n(%rip)
	jg	.L3
.L2:
	movl	404+t(%rip), %edx
	movl	$100, %eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	subq	$1, %rax
	je	.L5
.L6:
	addl	(%rbx,%rax,4), %edx
	movl	%edx, (%rbx,%rax,4)
	cmpl	%eax, %edx
	jl	.L4
	movl	%eax, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L5:
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	t
	.bss
	.align 32
	.type	t, @object
	.size	t, 408
t:
	.zero	408
	.globl	a
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	n(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	t(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L2
	xorl	%ebp, %ebp
	leaq	a(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%r12, %rdi
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movslq	a(%rip), %rax
	addl	$1, (%rbx,%rax,4)
	cmpl	%ebp, n(%rip)
	jg	.L3
.L2:
	movl	404+t(%rip), %edx
	movl	$100, %eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	subq	$1, %rax
	je	.L5
.L6:
	addl	(%rbx,%rax,4), %edx
	movl	%edx, (%rbx,%rax,4)
	cmpl	%eax, %edx
	jl	.L4
	movl	%eax, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L5:
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	t
	.bss
	.align 32
	.type	t, @object
	.size	t, 408
t:
	.zero	408
	.globl	a
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```
rule
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	n(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	t(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L2
	xorl	%ebp, %ebp
	leaq	a(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%r12, %rdi
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movslq	a(%rip), %rax
	addl	$1, (%rbx,%rax,4)
	cmpl	%ebp, n(%rip)
	jg	.L3
.L2:
	movl	404+t(%rip), %edx
	movl	$100, %eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	subq	$1, %rax
	je	.L5
.L6:
	addl	(%rbx,%rax,4), %edx
	movl	%edx, (%rbx,%rax,4)
	cmpl	%eax, %edx
	jl	.L4
	movl	%eax, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L5:
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	t
	.bss
	.align 32
	.type	t, @object
	.size	t, 408
t:
	.zero	408
	.globl	a
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```
```c
#include<stdio.h>

int n,a,t[102];

int main(){
  int i;
  scanf("%d", &n);

  for(i = 0; i < n; i++){
    scanf("%d", &a);
    t[a]++;
  }
  for(i = 100; i > 0; i--){
    t[i] += t[i+1];
    if(t[i] >= i){
      printf("%d\n", i);
      return 0;
    }
  }
}

```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>

int n,a,t[102];

int main(){
  int i;
  scanf("%d", &n);

  for(i = 0; i < n; i++){
    scanf("%d", &a);
    t[a]++;
  }
  for(i = 100; i > 0; i--){
    t[i] += t[i+1];
    if(t[i] >= i){
      printf("%d\n", i);
      return 0;
    }
  }
}

```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

7
5 4 3 14 2 4 1
 3
1 0 100
 3
2 0 100
 7
0 1 5 37 2 4 1
 7
5 4 3 14 2 7 1
 7
5 4 2 14 2 7 1
 7
5 4 4 14 2 7 1
 7
5 4 4 14 1 7 1
 7
10 4 4 14 1 7 1
 7
10 4 4 14 1 7 2

4
 1
 2
 3
 4
 4
 4
 4
 4
 4

Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>

int n,a,t[102];

int main(){
  int i;
  scanf("%d", &n);

  for(i = 0; i < n; i++){
    scanf("%d", &a);
    t[a]++;
  }
  for(i = 100; i > 0; i--){
    t[i] += t[i+1];
    if(t[i] >= i){
      printf("%d\n", i);
      return 0;
    }
  }
}

```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	n(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	t(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L2
	xorl	%ebp, %ebp
	leaq	a(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%r12, %rdi
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movslq	a(%rip), %rax
	addl	$1, (%rbx,%rax,4)
	cmpl	%ebp, n(%rip)
	jg	.L3
.L2:
	movl	404+t(%rip), %edx
	movl	$100, %eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	subq	$1, %rax
	je	.L5
.L6:
	addl	(%rbx,%rax,4), %edx
	movl	%edx, (%rbx,%rax,4)
	cmpl	%eax, %edx
	jl	.L4
	movl	%eax, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L5:
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	t
	.bss
	.align 32
	.type	t, @object
	.size	t, 408
t:
	.zero	408
	.globl	a
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	n(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	t(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L2
	xorl	%ebp, %ebp
	leaq	a(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%r12, %rdi
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movslq	a(%rip), %rax
	addl	$1, (%rbx,%rax,4)
	cmpl	%ebp, n(%rip)
	jg	.L3
.L2:
	movl	404+t(%rip), %edx
	movl	$100, %eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	subq	$1, %rax
	je	.L5
.L6:
	addl	(%rbx,%rax,4), %edx
	movl	%edx, (%rbx,%rax,4)
	cmpl	%eax, %edx
	jl	.L4
	movl	%eax, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L5:
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	t
	.bss
	.align 32
	.type	t, @object
	.size	t, 408
t:
	.zero	408
	.globl	a
	.align 4
	.type	a, @object
	.size	a, 4
a:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```