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

```c
#include <stdio.h>
#include<string.h>

int main()
{
 int n,m;
  
  scanf("%d%d",&n,&m);
  
  int a[51]={},b[51]={};
  int i,j;
  int ans[51]={};
  
  for(i=1;i<=m;i++)
  {
    scanf("%d %d",&a[i],&b[i]);
  }
  
  for(i=1;i<=m;i++)
  {
    for(j=1;j<=n;j++)
    {
      if(a[i]==j)
      {
        ans[j]++;
      }
    }
  }
  
   for(i=1;i<=m;i++)
  {
    for(j=1;j<=n;j++)
    {
      if(b[i]==j)
      {
        ans[j]++;
      }
    }
  }
  
  for(i=1;i<=n;i++)
  {
    printf("%d\n",ans[i]);
  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$656, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-652(%rbp), %rdx
	leaq	-656(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-640(%rbp), %rdx
	movl	$0, %eax
	movl	$25, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	%rdi, %rdx
	movl	%eax, (%rdx)
	addq	$4, %rdx
	leaq	-432(%rbp), %rdx
	movl	$0, %eax
	movl	$25, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	%rdi, %rdx
	movl	%eax, (%rdx)
	addq	$4, %rdx
	leaq	-224(%rbp), %rdx
	movl	$0, %eax
	movl	$25, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	%rdi, %rdx
	movl	%eax, (%rdx)
	addq	$4, %rdx
	movl	$1, -648(%rbp)
	jmp	.L2
.L3:
	leaq	-432(%rbp), %rdx
	movl	-648(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-640(%rbp), %rcx
	movl	-648(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -648(%rbp)
.L2:
	movl	-652(%rbp), %eax
	cmpl	%eax, -648(%rbp)
	jle	.L3
	movl	$1, -648(%rbp)
	jmp	.L4
.L8:
	movl	$1, -644(%rbp)
	jmp	.L5
.L7:
	movl	-648(%rbp), %eax
	cltq
	movl	-640(%rbp,%rax,4), %eax
	cmpl	%eax, -644(%rbp)
	jne	.L6
	movl	-644(%rbp), %eax
	cltq
	movl	-224(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-644(%rbp), %eax
	cltq
	movl	%edx, -224(%rbp,%rax,4)
.L6:
	addl	$1, -644(%rbp)
.L5:
	movl	-656(%rbp), %eax
	cmpl	%eax, -644(%rbp)
	jle	.L7
	addl	$1, -648(%rbp)
.L4:
	movl	-652(%rbp), %eax
	cmpl	%eax, -648(%rbp)
	jle	.L8
	movl	$1, -648(%rbp)
	jmp	.L9
.L13:
	movl	$1, -644(%rbp)
	jmp	.L10
.L12:
	movl	-648(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %eax
	cmpl	%eax, -644(%rbp)
	jne	.L11
	movl	-644(%rbp), %eax
	cltq
	movl	-224(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-644(%rbp), %eax
	cltq
	movl	%edx, -224(%rbp,%rax,4)
.L11:
	addl	$1, -644(%rbp)
.L10:
	movl	-656(%rbp), %eax
	cmpl	%eax, -644(%rbp)
	jle	.L12
	addl	$1, -648(%rbp)
.L9:
	movl	-652(%rbp), %eax
	cmpl	%eax, -648(%rbp)
	jle	.L13
	movl	$1, -648(%rbp)
	jmp	.L14
.L15:
	movl	-648(%rbp), %eax
	cltq
	movl	-224(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -648(%rbp)
.L14:
	movl	-656(%rbp), %eax
	cmpl	%eax, -648(%rbp)
	jle	.L15
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.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.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$664, %rsp
	.cfi_def_cfa_offset 720
	movq	%fs:40, %rax
	movq	%rax, 648(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	leaq	16(%rsp), %r13
	leaq	224(%rsp), %rbp
	leaq	432(%rsp), %rbx
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	movl	$25, %ecx
	movq	%r13, %rdi
	rep stosq
	movl	$25, %ecx
	movl	$0, (%rdi)
	movq	%rbp, %rdi
	rep stosq
	movl	$25, %ecx
	movl	$0, (%rdi)
	movq	%rbx, %rdi
	rep stosq
	movl	12(%rsp), %eax
	movl	$0, (%rdi)
	testl	%eax, %eax
	jle	.L2
	movl	$4, %r12d
	movl	$1, %r15d
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	0(%rbp,%r12), %rdx
	leaq	0(%r13,%r12), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edi
	addl	$1, %r15d
	addq	$4, %r12
	cmpl	%r15d, %edi
	jge	.L3
	movl	8(%rsp), %eax
	testl	%edi, %edi
	jle	.L2
	testl	%eax, %eax
	jle	.L16
	cmpl	$2, %edi
	jle	.L35
	leaq	20(%rsp), %r11
	movl	$2, %r10d
	leaq	436(%rsp), %r9
	leal	1(%rax), %ecx
.L9:
	movl	(%r11), %r8d
	movl	4(%r11), %esi
	movq	%r9, %rdx
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L18:
	cmpl	%eax, %r8d
	jne	.L5
	addl	$1, (%rdx)
.L5:
	cmpl	%esi, %eax
	je	.L47
	addl	$1, %eax
	addq	$4, %rdx
	cmpl	%ecx, %eax
	jne	.L18
.L8:
	leal	1(%r10), %r8d
	addl	$2, %r10d
	addq	$8, %r11
	cmpl	%r10d, %edi
	jg	.L9
.L17:
	movslq	%r8d, %r8
	.p2align 4,,10
	.p2align 3
.L14:
	movl	0(%r13,%r8,4), %esi
	movq	%r9, %rdx
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L13:
	cmpl	%eax, %esi
	je	.L48
	addl	$1, %eax
	addq	$4, %rdx
	cmpl	%ecx, %eax
	jne	.L13
.L12:
	addq	$1, %r8
	cmpl	%r8d, %edi
	jge	.L14
	leaq	228(%rsp), %r11
	movl	$2, %r10d
	movl	$1, %r8d
	cmpl	$2, %edi
	jle	.L33
.L23:
	movl	(%r11), %r8d
	movl	4(%r11), %esi
	movq	%r9, %rdx
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L30:
	cmpl	%eax, %r8d
	jne	.L19
	addl	$1, (%rdx)
.L19:
	cmpl	%esi, %eax
	je	.L49
	addl	$1, %eax
	addq	$4, %rdx
	cmpl	%ecx, %eax
	jne	.L30
.L22:
	leal	1(%r10), %r8d
	addl	$2, %r10d
	addq	$8, %r11
	cmpl	%r10d, %edi
	jg	.L23
.L33:
	movslq	%r8d, %r8
	.p2align 4,,10
	.p2align 3
.L28:
	movl	0(%rbp,%r8,4), %esi
	movq	%r9, %rdx
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L27:
	cmpl	%esi, %eax
	je	.L50
	addl	$1, %eax
	addq	$4, %rdx
	cmpl	%ecx, %eax
	jne	.L27
.L26:
	addq	$1, %r8
	cmpl	%r8d, %edi
	jge	.L28
.L29:
	movl	$1, %ebp
	leaq	.LC2(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L31:
	movl	(%rbx,%rbp,4), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__printf_chk@PLT
	cmpl	%ebp, 8(%rsp)
	jge	.L31
.L16:
	movq	648(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L51
	addq	$664, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L47:
	.cfi_restore_state
	addl	$1, %eax
	addl	$1, (%rdx)
	addq	$4, %rdx
	cmpl	%ecx, %eax
	jne	.L18
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L50:
	addl	$1, %eax
	addl	$1, (%rdx)
	addq	$4, %rdx
	cmpl	%ecx, %eax
	jne	.L27
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L48:
	leal	1(%rsi), %eax
	addl	$1, (%rdx)
	addq	$4, %rdx
	cmpl	%ecx, %eax
	jne	.L13
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L49:
	addl	$1, %eax
	addl	$1, (%rdx)
	addq	$4, %rdx
	cmpl	%ecx, %eax
	jne	.L30
	jmp	.L22
.L2:
	cmpl	$0, 8(%rsp)
	jg	.L29
	jmp	.L16
.L35:
	movl	$1, %r8d
	leaq	436(%rsp), %r9
	leal	1(%rax), %ecx
	jmp	.L17
.L51:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.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
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$664, %rsp
	.cfi_def_cfa_offset 720
	movq	%fs:40, %rax
	movq	%rax, 648(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	leaq	16(%rsp), %r13
	leaq	224(%rsp), %rbp
	leaq	432(%rsp), %rbx
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	movl	$25, %ecx
	movq	%r13, %rdi
	rep stosq
	movl	$25, %ecx
	movl	$0, (%rdi)
	movq	%rbp, %rdi
	rep stosq
	movl	$25, %ecx
	movl	$0, (%rdi)
	movq	%rbx, %rdi
	rep stosq
	movl	12(%rsp), %eax
	movl	$0, (%rdi)
	testl	%eax, %eax
	jle	.L2
	movl	$4, %r12d
	movl	$1, %r15d
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	0(%rbp,%r12), %rdx
	leaq	0(%r13,%r12), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edi
	addl	$1, %r15d
	addq	$4, %r12
	cmpl	%r15d, %edi
	jge	.L3
	movl	8(%rsp), %eax
	testl	%edi, %edi
	jle	.L2
	testl	%eax, %eax
	jle	.L16
	cmpl	$2, %edi
	jle	.L35
	leaq	20(%rsp), %r11
	movl	$2, %r10d
	leaq	436(%rsp), %r9
	leal	1(%rax), %ecx
.L9:
	movl	(%r11), %r8d
	movl	4(%r11), %esi
	movq	%r9, %rdx
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L18:
	cmpl	%eax, %r8d
	jne	.L5
	addl	$1, (%rdx)
.L5:
	cmpl	%esi, %eax
	je	.L47
	addl	$1, %eax
	addq	$4, %rdx
	cmpl	%ecx, %eax
	jne	.L18
.L8:
	leal	1(%r10), %r8d
	addl	$2, %r10d
	addq	$8, %r11
	cmpl	%r10d, %edi
	jg	.L9
.L17:
	movslq	%r8d, %r8
	.p2align 4,,10
	.p2align 3
.L14:
	movl	0(%r13,%r8,4), %esi
	movq	%r9, %rdx
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L13:
	cmpl	%eax, %esi
	je	.L48
	addl	$1, %eax
	addq	$4, %rdx
	cmpl	%ecx, %eax
	jne	.L13
.L12:
	addq	$1, %r8
	cmpl	%r8d, %edi
	jge	.L14
	leaq	228(%rsp), %r11
	movl	$2, %r10d
	movl	$1, %r8d
	cmpl	$2, %edi
	jle	.L33
.L23:
	movl	(%r11), %r8d
	movl	4(%r11), %esi
	movq	%r9, %rdx
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L30:
	cmpl	%eax, %r8d
	jne	.L19
	addl	$1, (%rdx)
.L19:
	cmpl	%esi, %eax
	je	.L49
	addl	$1, %eax
	addq	$4, %rdx
	cmpl	%ecx, %eax
	jne	.L30
.L22:
	leal	1(%r10), %r8d
	addl	$2, %r10d
	addq	$8, %r11
	cmpl	%r10d, %edi
	jg	.L23
.L33:
	movslq	%r8d, %r8
	.p2align 4,,10
	.p2align 3
.L28:
	movl	0(%rbp,%r8,4), %esi
	movq	%r9, %rdx
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L27:
	cmpl	%esi, %eax
	je	.L50
	addl	$1, %eax
	addq	$4, %rdx
	cmpl	%ecx, %eax
	jne	.L27
.L26:
	addq	$1, %r8
	cmpl	%r8d, %edi
	jge	.L28
.L29:
	movl	$1, %ebp
	leaq	.LC2(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L31:
	movl	(%rbx,%rbp,4), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__printf_chk@PLT
	cmpl	%ebp, 8(%rsp)
	jge	.L31
.L16:
	movq	648(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L51
	addq	$664, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L47:
	.cfi_restore_state
	addl	$1, %eax
	addl	$1, (%rdx)
	addq	$4, %rdx
	cmpl	%ecx, %eax
	jne	.L18
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L50:
	addl	$1, %eax
	addl	$1, (%rdx)
	addq	$4, %rdx
	cmpl	%ecx, %eax
	jne	.L27
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L48:
	leal	1(%rsi), %eax
	addl	$1, (%rdx)
	addq	$4, %rdx
	cmpl	%ecx, %eax
	jne	.L13
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L49:
	addl	$1, %eax
	addl	$1, (%rdx)
	addq	$4, %rdx
	cmpl	%ecx, %eax
	jne	.L30
	jmp	.L22
.L2:
	cmpl	$0, 8(%rsp)
	jg	.L29
	jmp	.L16
.L35:
	movl	$1, %r8d
	leaq	436(%rsp), %r9
	leal	1(%rax), %ecx
	jmp	.L17
.L51:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.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:

#include <stdio.h>
#include<string.h>

int main()
{
 int n,m;
  
  scanf("%d%d",&n,&m);
  
  int a[51]={},b[51]={};
  int i,j;
  int ans[51]={};
  
  for(i=1;i<=m;i++)
  {
    scanf("%d %d",&a[i],&b[i]);
  }
  
  for(i=1;i<=m;i++)
  {
    for(j=1;j<=n;j++)
    {
      if(a[i]==j)
      {
        ans[j]++;
      }
    }
  }
  
   for(i=1;i<=m;i++)
  {
    for(j=1;j<=n;j++)
    {
      if(b[i]==j)
      {
        ans[j]++;
      }
    }
  }
  
  for(i=1;i<=n;i++)
  {
    printf("%d\n",ans[i]);
  }
  return 0;
}
3 5
1 2
2 1
1 2
2 1
1 2
 3 5
1 2
2 1
1 2
1 1
1 2
 8 7
1 2
3 4
1 5
2 8
3 7
5 2
4 1
6 8
 8 7
1 3
3 4
1 5
2 8
3 7
5 2
4 1
6 8
 2 5
1 2
2 1
1 2
2 2
1 2
 8 7
1 3
3 4
1 5
2 8
3 7
5 2
5 1
6 8
 4 3
1 2
4 3
1 4
 8 8
1 2
3 4
1 5
2 8
3 7
5 2
4 2
6 8
 3 5
1 2
2 1
1 3
2 1
1 2
 5 5
1 2
2 1
1 2
1 1
1 2

5
5
0
 6
4
0
 3
3
2
2
2
0
1
1
 3
2
3
2
2
0
1
1
 4
6
 3
2
3
1
3
0
1
1
 2
1
1
2
 2
4
2
2
2
1
1
2
 5
4
1
 6
4
0
0
0

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

```c
#include <stdio.h>
#include<string.h>

int main()
{
 int n,m;
  
  scanf("%d%d",&n,&m);
  
  int a[51]={},b[51]={};
  int i,j;
  int ans[51]={};
  
  for(i=1;i<=m;i++)
  {
    scanf("%d %d",&a[i],&b[i]);
  }
  
  for(i=1;i<=m;i++)
  {
    for(j=1;j<=n;j++)
    {
      if(a[i]==j)
      {
        ans[j]++;
      }
    }
  }
  
   for(i=1;i<=m;i++)
  {
    for(j=1;j<=n;j++)
    {
      if(b[i]==j)
      {
        ans[j]++;
      }
    }
  }
  
  for(i=1;i<=n;i++)
  {
    printf("%d\n",ans[i]);
  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$656, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-652(%rbp), %rdx
	leaq	-656(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-640(%rbp), %rdx
	movl	$0, %eax
	movl	$25, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	%rdi, %rdx
	movl	%eax, (%rdx)
	addq	$4, %rdx
	leaq	-432(%rbp), %rdx
	movl	$0, %eax
	movl	$25, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	%rdi, %rdx
	movl	%eax, (%rdx)
	addq	$4, %rdx
	leaq	-224(%rbp), %rdx
	movl	$0, %eax
	movl	$25, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	%rdi, %rdx
	movl	%eax, (%rdx)
	addq	$4, %rdx
	movl	$1, -648(%rbp)
	jmp	.L2
.L3:
	leaq	-432(%rbp), %rdx
	movl	-648(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-640(%rbp), %rcx
	movl	-648(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -648(%rbp)
.L2:
	movl	-652(%rbp), %eax
	cmpl	%eax, -648(%rbp)
	jle	.L3
	movl	$1, -648(%rbp)
	jmp	.L4
.L8:
	movl	$1, -644(%rbp)
	jmp	.L5
.L7:
	movl	-648(%rbp), %eax
	cltq
	movl	-640(%rbp,%rax,4), %eax
	cmpl	%eax, -644(%rbp)
	jne	.L6
	movl	-644(%rbp), %eax
	cltq
	movl	-224(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-644(%rbp), %eax
	cltq
	movl	%edx, -224(%rbp,%rax,4)
.L6:
	addl	$1, -644(%rbp)
.L5:
	movl	-656(%rbp), %eax
	cmpl	%eax, -644(%rbp)
	jle	.L7
	addl	$1, -648(%rbp)
.L4:
	movl	-652(%rbp), %eax
	cmpl	%eax, -648(%rbp)
	jle	.L8
	movl	$1, -648(%rbp)
	jmp	.L9
.L13:
	movl	$1, -644(%rbp)
	jmp	.L10
.L12:
	movl	-648(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %eax
	cmpl	%eax, -644(%rbp)
	jne	.L11
	movl	-644(%rbp), %eax
	cltq
	movl	-224(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-644(%rbp), %eax
	cltq
	movl	%edx, -224(%rbp,%rax,4)
.L11:
	addl	$1, -644(%rbp)
.L10:
	movl	-656(%rbp), %eax
	cmpl	%eax, -644(%rbp)
	jle	.L12
	addl	$1, -648(%rbp)
.L9:
	movl	-652(%rbp), %eax
	cmpl	%eax, -648(%rbp)
	jle	.L13
	movl	$1, -648(%rbp)
	jmp	.L14
.L15:
	movl	-648(%rbp), %eax
	cltq
	movl	-224(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -648(%rbp)
.L14:
	movl	-656(%rbp), %eax
	cmpl	%eax, -648(%rbp)
	jle	.L15
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.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.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$656, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-652(%rbp), %rdx
	leaq	-656(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-640(%rbp), %rdx
	movl	$0, %eax
	movl	$25, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	%rdi, %rdx
	movl	%eax, (%rdx)
	addq	$4, %rdx
	leaq	-432(%rbp), %rdx
	movl	$0, %eax
	movl	$25, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	%rdi, %rdx
	movl	%eax, (%rdx)
	addq	$4, %rdx
	leaq	-224(%rbp), %rdx
	movl	$0, %eax
	movl	$25, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	%rdi, %rdx
	movl	%eax, (%rdx)
	addq	$4, %rdx
	movl	$1, -648(%rbp)
	jmp	.L2
.L3:
	leaq	-432(%rbp), %rdx
	movl	-648(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-640(%rbp), %rcx
	movl	-648(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -648(%rbp)
.L2:
	movl	-652(%rbp), %eax
	cmpl	%eax, -648(%rbp)
	jle	.L3
	movl	$1, -648(%rbp)
	jmp	.L4
.L8:
	movl	$1, -644(%rbp)
	jmp	.L5
.L7:
	movl	-648(%rbp), %eax
	cltq
	movl	-640(%rbp,%rax,4), %eax
	cmpl	%eax, -644(%rbp)
	jne	.L6
	movl	-644(%rbp), %eax
	cltq
	movl	-224(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-644(%rbp), %eax
	cltq
	movl	%edx, -224(%rbp,%rax,4)
.L6:
	addl	$1, -644(%rbp)
.L5:
	movl	-656(%rbp), %eax
	cmpl	%eax, -644(%rbp)
	jle	.L7
	addl	$1, -648(%rbp)
.L4:
	movl	-652(%rbp), %eax
	cmpl	%eax, -648(%rbp)
	jle	.L8
	movl	$1, -648(%rbp)
	jmp	.L9
.L13:
	movl	$1, -644(%rbp)
	jmp	.L10
.L12:
	movl	-648(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %eax
	cmpl	%eax, -644(%rbp)
	jne	.L11
	movl	-644(%rbp), %eax
	cltq
	movl	-224(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-644(%rbp), %eax
	cltq
	movl	%edx, -224(%rbp,%rax,4)
.L11:
	addl	$1, -644(%rbp)
.L10:
	movl	-656(%rbp), %eax
	cmpl	%eax, -644(%rbp)
	jle	.L12
	addl	$1, -648(%rbp)
.L9:
	movl	-652(%rbp), %eax
	cmpl	%eax, -648(%rbp)
	jle	.L13
	movl	$1, -648(%rbp)
	jmp	.L14
.L15:
	movl	-648(%rbp), %eax
	cltq
	movl	-224(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -648(%rbp)
.L14:
	movl	-656(%rbp), %eax
	cmpl	%eax, -648(%rbp)
	jle	.L15
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.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:
