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 <stdlib.h>

int main(void){
	int n,c,i,o,r,p=0;
	int b[100][100]={0};
	scanf("%d%d",&n,&c);
	int *a;
	int memo[100]={0};
	a = calloc(c,sizeof(int));
	for(i=0;i<c;i++)
		scanf("%d",&a[i]);
	for(i=0;i<c;i++){
		for(o=0;o<n;o++){
			scanf("%d",&b[i][o]);
		}
		for(r=0;r<n;r++){
			if(a[i] == b[i][r]){
				memo[r]++;
				p++;
			}
		}
		memo[a[i]-1]+=n-p;
		p=0;

	}
	for(i=0;i<n;i++)
		printf("%d\n",memo[i]);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-36864(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3584, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -40428(%rbp)
	leaq	-40016(%rbp), %rax
	movl	$40000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-40444(%rbp), %rdx
	leaq	-40448(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-40416(%rbp), %rdx
	movl	$0, %eax
	movl	$50, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	-40444(%rbp), %eax
	cltq
	movl	$4, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, -40424(%rbp)
	movl	$0, -40440(%rbp)
	jmp	.L2
.L3:
	movl	-40440(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40424(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -40440(%rbp)
.L2:
	movl	-40444(%rbp), %eax
	cmpl	%eax, -40440(%rbp)
	jl	.L3
	movl	$0, -40440(%rbp)
	jmp	.L4
.L10:
	movl	$0, -40436(%rbp)
	jmp	.L5
.L6:
	leaq	-40016(%rbp), %rcx
	movl	-40436(%rbp), %eax
	movslq	%eax, %rsi
	movl	-40440(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	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, -40436(%rbp)
.L5:
	movl	-40448(%rbp), %eax
	cmpl	%eax, -40436(%rbp)
	jl	.L6
	movl	$0, -40432(%rbp)
	jmp	.L7
.L9:
	movl	-40440(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40424(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %ecx
	movl	-40432(%rbp), %eax
	movslq	%eax, %rsi
	movl	-40440(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	movl	-40016(%rbp,%rax,4), %eax
	cmpl	%eax, %ecx
	jne	.L8
	movl	-40432(%rbp), %eax
	cltq
	movl	-40416(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-40432(%rbp), %eax
	cltq
	movl	%edx, -40416(%rbp,%rax,4)
	addl	$1, -40428(%rbp)
.L8:
	addl	$1, -40432(%rbp)
.L7:
	movl	-40448(%rbp), %eax
	cmpl	%eax, -40432(%rbp)
	jl	.L9
	movl	-40440(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40424(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	subl	$1, %eax
	cltq
	movl	-40416(%rbp,%rax,4), %ecx
	movl	-40448(%rbp), %eax
	subl	-40428(%rbp), %eax
	movl	%eax, %edx
	movl	-40440(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rsi
	movq	-40424(%rbp), %rax
	addq	%rsi, %rax
	movl	(%rax), %eax
	subl	$1, %eax
	addl	%ecx, %edx
	cltq
	movl	%edx, -40416(%rbp,%rax,4)
	movl	$0, -40428(%rbp)
	addl	$1, -40440(%rbp)
.L4:
	movl	-40444(%rbp), %eax
	cmpl	%eax, -40440(%rbp)
	jl	.L10
	movl	$0, -40440(%rbp)
	jmp	.L11
.L12:
	movl	-40440(%rbp), %eax
	cltq
	movl	-40416(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -40440(%rbp)
.L11:
	movl	-40448(%rbp), %eax
	cmpl	%eax, -40440(%rbp)
	jl	.L12
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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
	leaq	-36864(%rsp), %r11
	.cfi_def_cfa 11, 36920
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3592, %rsp
	.cfi_def_cfa_offset 40512
	movl	$40000, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 40440(%rsp)
	xorl	%eax, %eax
	leaq	432(%rsp), %rbp
	leaq	32(%rsp), %r13
	movq	%rbp, %rdi
	call	memset@PLT
	leaq	28(%rsp), %rdx
	leaq	24(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	movl	$50, %ecx
	movq	%r13, %rdi
	rep stosq
	movslq	28(%rsp), %rdi
	movl	$4, %esi
	movq	%rdi, %rbx
	call	calloc@PLT
	movq	%rax, (%rsp)
	testl	%ebx, %ebx
	jle	.L2
	movq	%rax, %r15
	xorl	%r12d, %r12d
	leaq	.LC1(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r15, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	addq	$4, %r15
	cmpl	%r12d, %eax
	jg	.L3
	movl	24(%rsp), %esi
	testl	%eax, %eax
	jle	.L5
	leaq	36(%rsp), %rax
	movl	$1, %r12d
	movq	%rax, 8(%rsp)
	testl	%esi, %esi
	jle	.L10
	.p2align 4,,10
	.p2align 3
.L16:
	movq	%rbp, %r14
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %esi
	addq	$4, %r14
	cmpl	%r15d, %esi
	jg	.L6
	movq	(%rsp), %rax
	movl	28(%rsp), %r9d
	movl	-4(%rax,%r12,4), %ecx
	testl	%esi, %esi
	jle	.L15
	movq	8(%rsp), %rdi
	leal	-1(%rsi), %edx
	movq	%r13, %rax
	xorl	%r8d, %r8d
	leaq	(%rdi,%rdx,4), %rdi
	movq	%rbp, %rdx
	.p2align 4,,10
	.p2align 3
.L9:
	cmpl	%ecx, (%rdx)
	jne	.L8
	addl	$1, (%rax)
	addl	$1, %r8d
.L8:
	addq	$4, %rax
	addq	$4, %rdx
	cmpq	%rdi, %rax
	jne	.L9
	movl	%esi, %eax
	subl	%r8d, %eax
.L7:
	subl	$1, %ecx
	movslq	%ecx, %rcx
	addl	%eax, 32(%rsp,%rcx,4)
	cmpl	%r12d, %r9d
	jle	.L5
	addq	$1, %r12
	addq	$400, %rbp
	testl	%esi, %esi
	jg	.L16
.L10:
	movq	40440(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$40456, %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
.L2:
	.cfi_restore_state
	movl	24(%rsp), %esi
	.p2align 4,,10
	.p2align 3
.L5:
	testl	%esi, %esi
	jle	.L10
	xorl	%ebx, %ebx
	leaq	.LC2(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L11:
	movl	0(%r13,%rbx,4), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 24(%rsp)
	jg	.L11
	jmp	.L10
.L15:
	movl	%esi, %eax
	jmp	.L7
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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
	leaq	-36864(%rsp), %r11
	.cfi_def_cfa 11, 36920
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3592, %rsp
	.cfi_def_cfa_offset 40512
	movl	$40000, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 40440(%rsp)
	xorl	%eax, %eax
	leaq	432(%rsp), %rbp
	leaq	32(%rsp), %r13
	movq	%rbp, %rdi
	call	memset@PLT
	leaq	28(%rsp), %rdx
	leaq	24(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	movl	$50, %ecx
	movq	%r13, %rdi
	rep stosq
	movslq	28(%rsp), %rdi
	movl	$4, %esi
	movq	%rdi, %rbx
	call	calloc@PLT
	movq	%rax, (%rsp)
	testl	%ebx, %ebx
	jle	.L2
	movq	%rax, %r15
	xorl	%r12d, %r12d
	leaq	.LC1(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r15, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	addq	$4, %r15
	cmpl	%r12d, %eax
	jg	.L3
	movl	24(%rsp), %esi
	testl	%eax, %eax
	jle	.L5
	leaq	36(%rsp), %rax
	movl	$1, %r12d
	movq	%rax, 8(%rsp)
	testl	%esi, %esi
	jle	.L10
	.p2align 4,,10
	.p2align 3
.L16:
	movq	%rbp, %r14
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %esi
	addq	$4, %r14
	cmpl	%r15d, %esi
	jg	.L6
	movq	(%rsp), %rax
	movl	28(%rsp), %r9d
	movl	-4(%rax,%r12,4), %ecx
	testl	%esi, %esi
	jle	.L15
	movq	8(%rsp), %rdi
	leal	-1(%rsi), %edx
	movq	%r13, %rax
	xorl	%r8d, %r8d
	leaq	(%rdi,%rdx,4), %rdi
	movq	%rbp, %rdx
	.p2align 4,,10
	.p2align 3
.L9:
	cmpl	%ecx, (%rdx)
	jne	.L8
	addl	$1, (%rax)
	addl	$1, %r8d
.L8:
	addq	$4, %rax
	addq	$4, %rdx
	cmpq	%rdi, %rax
	jne	.L9
	movl	%esi, %eax
	subl	%r8d, %eax
.L7:
	subl	$1, %ecx
	movslq	%ecx, %rcx
	addl	%eax, 32(%rsp,%rcx,4)
	cmpl	%r12d, %r9d
	jle	.L5
	addq	$1, %r12
	addq	$400, %rbp
	testl	%esi, %esi
	jg	.L16
.L10:
	movq	40440(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$40456, %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
.L2:
	.cfi_restore_state
	movl	24(%rsp), %esi
	.p2align 4,,10
	.p2align 3
.L5:
	testl	%esi, %esi
	jle	.L10
	xorl	%ebx, %ebx
	leaq	.LC2(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L11:
	movl	0(%r13,%rbx,4), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 24(%rsp)
	jg	.L11
	jmp	.L10
.L15:
	movl	%esi, %eax
	jmp	.L7
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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 <stdlib.h>

int main(void){
	int n,c,i,o,r,p=0;
	int b[100][100]={0};
	scanf("%d%d",&n,&c);
	int *a;
	int memo[100]={0};
	a = calloc(c,sizeof(int));
	for(i=0;i<c;i++)
		scanf("%d",&a[i]);
	for(i=0;i<c;i++){
		for(o=0;o<n;o++){
			scanf("%d",&b[i][o]);
		}
		for(r=0;r<n;r++){
			if(a[i] == b[i][r]){
				memo[r]++;
				p++;
			}
		}
		memo[a[i]-1]+=n-p;
		p=0;

	}
	for(i=0;i<n;i++)
		printf("%d\n",memo[i]);
	return 0;
}
3
4
1 2 3 2
1 1 2
3 2 2
1 1 3
2 2 2

3
4
5

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 <stdlib.h>

int main(void){
	int n,c,i,o,r,p=0;
	int b[100][100]={0};
	scanf("%d%d",&n,&c);
	int *a;
	int memo[100]={0};
	a = calloc(c,sizeof(int));
	for(i=0;i<c;i++)
		scanf("%d",&a[i]);
	for(i=0;i<c;i++){
		for(o=0;o<n;o++){
			scanf("%d",&b[i][o]);
		}
		for(r=0;r<n;r++){
			if(a[i] == b[i][r]){
				memo[r]++;
				p++;
			}
		}
		memo[a[i]-1]+=n-p;
		p=0;

	}
	for(i=0;i<n;i++)
		printf("%d\n",memo[i]);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-36864(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3584, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -40428(%rbp)
	leaq	-40016(%rbp), %rax
	movl	$40000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-40444(%rbp), %rdx
	leaq	-40448(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-40416(%rbp), %rdx
	movl	$0, %eax
	movl	$50, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	-40444(%rbp), %eax
	cltq
	movl	$4, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, -40424(%rbp)
	movl	$0, -40440(%rbp)
	jmp	.L2
.L3:
	movl	-40440(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40424(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -40440(%rbp)
.L2:
	movl	-40444(%rbp), %eax
	cmpl	%eax, -40440(%rbp)
	jl	.L3
	movl	$0, -40440(%rbp)
	jmp	.L4
.L10:
	movl	$0, -40436(%rbp)
	jmp	.L5
.L6:
	leaq	-40016(%rbp), %rcx
	movl	-40436(%rbp), %eax
	movslq	%eax, %rsi
	movl	-40440(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	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, -40436(%rbp)
.L5:
	movl	-40448(%rbp), %eax
	cmpl	%eax, -40436(%rbp)
	jl	.L6
	movl	$0, -40432(%rbp)
	jmp	.L7
.L9:
	movl	-40440(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40424(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %ecx
	movl	-40432(%rbp), %eax
	movslq	%eax, %rsi
	movl	-40440(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	movl	-40016(%rbp,%rax,4), %eax
	cmpl	%eax, %ecx
	jne	.L8
	movl	-40432(%rbp), %eax
	cltq
	movl	-40416(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-40432(%rbp), %eax
	cltq
	movl	%edx, -40416(%rbp,%rax,4)
	addl	$1, -40428(%rbp)
.L8:
	addl	$1, -40432(%rbp)
.L7:
	movl	-40448(%rbp), %eax
	cmpl	%eax, -40432(%rbp)
	jl	.L9
	movl	-40440(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40424(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	subl	$1, %eax
	cltq
	movl	-40416(%rbp,%rax,4), %ecx
	movl	-40448(%rbp), %eax
	subl	-40428(%rbp), %eax
	movl	%eax, %edx
	movl	-40440(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rsi
	movq	-40424(%rbp), %rax
	addq	%rsi, %rax
	movl	(%rax), %eax
	subl	$1, %eax
	addl	%ecx, %edx
	cltq
	movl	%edx, -40416(%rbp,%rax,4)
	movl	$0, -40428(%rbp)
	addl	$1, -40440(%rbp)
.L4:
	movl	-40444(%rbp), %eax
	cmpl	%eax, -40440(%rbp)
	jl	.L10
	movl	$0, -40440(%rbp)
	jmp	.L11
.L12:
	movl	-40440(%rbp), %eax
	cltq
	movl	-40416(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -40440(%rbp)
.L11:
	movl	-40448(%rbp), %eax
	cmpl	%eax, -40440(%rbp)
	jl	.L12
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-36864(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3584, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -40428(%rbp)
	leaq	-40016(%rbp), %rax
	movl	$40000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-40444(%rbp), %rdx
	leaq	-40448(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-40416(%rbp), %rdx
	movl	$0, %eax
	movl	$50, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	-40444(%rbp), %eax
	cltq
	movl	$4, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, -40424(%rbp)
	movl	$0, -40440(%rbp)
	jmp	.L2
.L3:
	movl	-40440(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40424(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -40440(%rbp)
.L2:
	movl	-40444(%rbp), %eax
	cmpl	%eax, -40440(%rbp)
	jl	.L3
	movl	$0, -40440(%rbp)
	jmp	.L4
.L10:
	movl	$0, -40436(%rbp)
	jmp	.L5
.L6:
	leaq	-40016(%rbp), %rcx
	movl	-40436(%rbp), %eax
	movslq	%eax, %rsi
	movl	-40440(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	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, -40436(%rbp)
.L5:
	movl	-40448(%rbp), %eax
	cmpl	%eax, -40436(%rbp)
	jl	.L6
	movl	$0, -40432(%rbp)
	jmp	.L7
.L9:
	movl	-40440(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40424(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %ecx
	movl	-40432(%rbp), %eax
	movslq	%eax, %rsi
	movl	-40440(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	movl	-40016(%rbp,%rax,4), %eax
	cmpl	%eax, %ecx
	jne	.L8
	movl	-40432(%rbp), %eax
	cltq
	movl	-40416(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-40432(%rbp), %eax
	cltq
	movl	%edx, -40416(%rbp,%rax,4)
	addl	$1, -40428(%rbp)
.L8:
	addl	$1, -40432(%rbp)
.L7:
	movl	-40448(%rbp), %eax
	cmpl	%eax, -40432(%rbp)
	jl	.L9
	movl	-40440(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40424(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	subl	$1, %eax
	cltq
	movl	-40416(%rbp,%rax,4), %ecx
	movl	-40448(%rbp), %eax
	subl	-40428(%rbp), %eax
	movl	%eax, %edx
	movl	-40440(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rsi
	movq	-40424(%rbp), %rax
	addq	%rsi, %rax
	movl	(%rax), %eax
	subl	$1, %eax
	addl	%ecx, %edx
	cltq
	movl	%edx, -40416(%rbp,%rax,4)
	movl	$0, -40428(%rbp)
	addl	$1, -40440(%rbp)
.L4:
	movl	-40444(%rbp), %eax
	cmpl	%eax, -40440(%rbp)
	jl	.L10
	movl	$0, -40440(%rbp)
	jmp	.L11
.L12:
	movl	-40440(%rbp), %eax
	cltq
	movl	-40416(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -40440(%rbp)
.L11:
	movl	-40448(%rbp), %eax
	cmpl	%eax, -40440(%rbp)
	jl	.L12
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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:
