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

```c
/*??????????????????????????£???(Christmas Party)*/
#include <stdio.h>
int main(){
  int i, j, x, y, N, M;
  int A[100] = {0};
  int B[100][100] = {0};
  int data[100] = {0};
  scanf("%d %d", &N, &M);
  for (i = 1; i - 1 < M; i++) {
    scanf("%d", &A[i - 1]);
  }
  for (i = 1; i - 1 < M; i++) {
    for (j = 1; j - 1 < N; j++) {
      scanf("%d", &B[i - 1][j - 1]);
    }
  }
  for (i = 1; i - 1 < M; i++) {
    x = 0;
	y = A[i - 1];
    for (j = 1; j - 1 < N; j++) {
      if (A[i - 1] == B[i - 1][j - 1]) {
        data[j - 1]++;
          x++;
      }
    }
    data[y - 1] += N - x;
  }
  for (j = 1; j - 1 < N; j++) {
    printf("%d\n", data[j - 1]);
  }
  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:
.LFB0:
	.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	$3984, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-40816(%rbp), %rdx
	movl	$0, %eax
	movl	$50, %ecx
	movq	%rdx, %rdi
	rep stosq
	leaq	-40016(%rbp), %rax
	movl	$40000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-40416(%rbp), %rdx
	movl	$0, %eax
	movl	$50, %ecx
	movq	%rdx, %rdi
	rep stosq
	leaq	-40836(%rbp), %rdx
	leaq	-40840(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -40832(%rbp)
	jmp	.L2
.L3:
	movl	-40832(%rbp), %eax
	subl	$1, %eax
	leaq	-40816(%rbp), %rdx
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -40832(%rbp)
.L2:
	movl	-40836(%rbp), %eax
	cmpl	%eax, -40832(%rbp)
	jle	.L3
	movl	$1, -40832(%rbp)
	jmp	.L4
.L7:
	movl	$1, -40828(%rbp)
	jmp	.L5
.L6:
	movl	-40832(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-40828(%rbp), %eax
	subl	$1, %eax
	leaq	-40016(%rbp), %rcx
	movslq	%eax, %rsi
	movslq	%edx, %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, -40828(%rbp)
.L5:
	movl	-40840(%rbp), %eax
	cmpl	%eax, -40828(%rbp)
	jle	.L6
	addl	$1, -40832(%rbp)
.L4:
	movl	-40836(%rbp), %eax
	cmpl	%eax, -40832(%rbp)
	jle	.L7
	movl	$1, -40832(%rbp)
	jmp	.L8
.L12:
	movl	$0, -40824(%rbp)
	movl	-40832(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-40816(%rbp,%rax,4), %eax
	movl	%eax, -40820(%rbp)
	movl	$1, -40828(%rbp)
	jmp	.L9
.L11:
	movl	-40832(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-40816(%rbp,%rax,4), %ecx
	movl	-40832(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-40828(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rsi
	movslq	%edx, %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	.L10
	movl	-40828(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	movl	-40416(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -40416(%rbp,%rax,4)
	addl	$1, -40824(%rbp)
.L10:
	addl	$1, -40828(%rbp)
.L9:
	movl	-40840(%rbp), %eax
	cmpl	%eax, -40828(%rbp)
	jle	.L11
	movl	-40820(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-40416(%rbp,%rax,4), %ecx
	movl	-40840(%rbp), %eax
	subl	-40824(%rbp), %eax
	movl	%eax, %edx
	movl	-40820(%rbp), %eax
	subl	$1, %eax
	addl	%ecx, %edx
	cltq
	movl	%edx, -40416(%rbp,%rax,4)
	addl	$1, -40832(%rbp)
.L8:
	movl	-40836(%rbp), %eax
	cmpl	%eax, -40832(%rbp)
	jle	.L12
	movl	$1, -40828(%rbp)
	jmp	.L13
.L14:
	movl	-40828(%rbp), %eax
	subl	$1, %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, -40828(%rbp)
.L13:
	movl	-40840(%rbp), %eax
	cmpl	%eax, -40828(%rbp)
	jle	.L14
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	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"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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	$4008, %rsp
	.cfi_def_cfa_offset 40928
	movl	$50, %ecx
	movl	$40000, %edx
	xorl	%esi, %esi
	xorl	%ebx, %ebx
	movq	%fs:40, %rax
	movq	%rax, 40856(%rsp)
	xorl	%eax, %eax
	leaq	48(%rsp), %rdi
	leaq	448(%rsp), %r14
	movq	%rdi, 24(%rsp)
	rep stosq
	leaq	848(%rsp), %rax
	movq	%rax, %rdi
	movq	%rax, 16(%rsp)
	call	memset@PLT
	movq	%rbx, %rax
	movl	$50, %ecx
	movq	%r14, %rdi
	rep stosq
	leaq	44(%rsp), %rdx
	leaq	40(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	movl	40(%rsp), %edx
	testl	%eax, %eax
	jle	.L2
	movq	24(%rsp), %r13
	movl	$1, %r12d
	leaq	.LC1(%rip), %rbx
	movq	%r13, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	addq	$4, %r13
	cmpl	%r12d, %eax
	jge	.L3
	movl	40(%rsp), %esi
	movl	%esi, %edx
	testl	%eax, %eax
	jle	.L2
	xorl	%r13d, %r13d
	movl	$1, %r12d
	testl	%esi, %esi
	jle	.L38
	.p2align 4,,10
	.p2align 3
.L10:
	movq	16(%rsp), %rax
	movl	$1, %ebp
	leaq	(%rax,%r13,4), %r15
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r15, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %esi
	addq	$4, %r15
	cmpl	%ebp, %esi
	jge	.L5
	movl	44(%rsp), %eax
	addl	$1, %r12d
	cmpl	%eax, %r12d
	jg	.L39
	addq	$100, %r13
	testl	%esi, %esi
	jg	.L10
.L38:
	cmpl	%eax, %r12d
	jge	.L40
.L8:
	movq	24(%rsp), %r9
	subl	$1, %eax
	movq	16(%rsp), %rbp
	addq	$4, %r9
	leaq	(%r9,%rax,4), %r10
	leal	-1(%rsi), %eax
	leaq	452(%rsp,%rax,4), %rdi
	movq	8(%rsp), %rax
	movl	(%rax), %ecx
	testl	%esi, %esi
	jle	.L22
	.p2align 4,,10
	.p2align 3
.L41:
	movq	%r14, %rax
	movq	%rbp, %rdx
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L15:
	cmpl	%ecx, (%rdx)
	jne	.L14
	addl	$1, (%rax)
	addl	$1, %r8d
.L14:
	addq	$4, %rax
	addq	$4, %rdx
	cmpq	%rax, %rdi
	jne	.L15
	movl	%esi, %eax
	subl	%r8d, %eax
.L13:
	subl	$1, %ecx
	movq	%r9, 8(%rsp)
	addq	$400, %rbp
	movslq	%ecx, %rcx
	addl	%eax, 448(%rsp,%rcx,4)
	cmpq	%r9, %r10
	je	.L12
	movq	8(%rsp), %rax
	addq	$4, %r9
	movl	(%rax), %ecx
	testl	%esi, %esi
	jg	.L41
.L22:
	movl	%esi, %eax
	jmp	.L13
.L2:
	movl	%edx, %esi
	.p2align 4,,10
	.p2align 3
.L12:
	movl	$1, %ebx
	leaq	.LC2(%rip), %rbp
	testl	%esi, %esi
	jle	.L18
	.p2align 4,,10
	.p2align 3
.L17:
	movl	-4(%r14,%rbx,4), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 40(%rsp)
	jge	.L17
.L18:
	movq	40856(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L42
	addq	$40872, %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
.L39:
	.cfi_restore_state
	testl	%eax, %eax
	jg	.L8
	jmp	.L12
.L42:
	call	__stack_chk_fail@PLT
.L40:
	testl	%eax, %eax
	jg	.L8
	jmp	.L18
	.cfi_endproc
.LFE23:
	.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:
.LFB23:
	.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	$4008, %rsp
	.cfi_def_cfa_offset 40928
	movl	$50, %ecx
	movl	$40000, %edx
	xorl	%esi, %esi
	xorl	%ebx, %ebx
	movq	%fs:40, %rax
	movq	%rax, 40856(%rsp)
	xorl	%eax, %eax
	leaq	48(%rsp), %rdi
	leaq	448(%rsp), %r14
	movq	%rdi, 24(%rsp)
	rep stosq
	leaq	848(%rsp), %rax
	movq	%rax, %rdi
	movq	%rax, 16(%rsp)
	call	memset@PLT
	movq	%rbx, %rax
	movl	$50, %ecx
	movq	%r14, %rdi
	rep stosq
	leaq	44(%rsp), %rdx
	leaq	40(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	movl	40(%rsp), %edx
	testl	%eax, %eax
	jle	.L2
	movq	24(%rsp), %r13
	movl	$1, %r12d
	leaq	.LC1(%rip), %rbx
	movq	%r13, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	addq	$4, %r13
	cmpl	%r12d, %eax
	jge	.L3
	movl	40(%rsp), %esi
	movl	%esi, %edx
	testl	%eax, %eax
	jle	.L2
	xorl	%r13d, %r13d
	movl	$1, %r12d
	testl	%esi, %esi
	jle	.L38
	.p2align 4,,10
	.p2align 3
.L10:
	movq	16(%rsp), %rax
	movl	$1, %ebp
	leaq	(%rax,%r13,4), %r15
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r15, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %esi
	addq	$4, %r15
	cmpl	%ebp, %esi
	jge	.L5
	movl	44(%rsp), %eax
	addl	$1, %r12d
	cmpl	%eax, %r12d
	jg	.L39
	addq	$100, %r13
	testl	%esi, %esi
	jg	.L10
.L38:
	cmpl	%eax, %r12d
	jge	.L40
.L8:
	movq	24(%rsp), %r9
	subl	$1, %eax
	movq	16(%rsp), %rbp
	addq	$4, %r9
	leaq	(%r9,%rax,4), %r10
	leal	-1(%rsi), %eax
	leaq	452(%rsp,%rax,4), %rdi
	movq	8(%rsp), %rax
	movl	(%rax), %ecx
	testl	%esi, %esi
	jle	.L22
	.p2align 4,,10
	.p2align 3
.L41:
	movq	%r14, %rax
	movq	%rbp, %rdx
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L15:
	cmpl	%ecx, (%rdx)
	jne	.L14
	addl	$1, (%rax)
	addl	$1, %r8d
.L14:
	addq	$4, %rax
	addq	$4, %rdx
	cmpq	%rax, %rdi
	jne	.L15
	movl	%esi, %eax
	subl	%r8d, %eax
.L13:
	subl	$1, %ecx
	movq	%r9, 8(%rsp)
	addq	$400, %rbp
	movslq	%ecx, %rcx
	addl	%eax, 448(%rsp,%rcx,4)
	cmpq	%r9, %r10
	je	.L12
	movq	8(%rsp), %rax
	addq	$4, %r9
	movl	(%rax), %ecx
	testl	%esi, %esi
	jg	.L41
.L22:
	movl	%esi, %eax
	jmp	.L13
.L2:
	movl	%edx, %esi
	.p2align 4,,10
	.p2align 3
.L12:
	movl	$1, %ebx
	leaq	.LC2(%rip), %rbp
	testl	%esi, %esi
	jle	.L18
	.p2align 4,,10
	.p2align 3
.L17:
	movl	-4(%r14,%rbx,4), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 40(%rsp)
	jge	.L17
.L18:
	movq	40856(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L42
	addq	$40872, %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
.L39:
	.cfi_restore_state
	testl	%eax, %eax
	jg	.L8
	jmp	.L12
.L42:
	call	__stack_chk_fail@PLT
.L40:
	testl	%eax, %eax
	jg	.L8
	jmp	.L18
	.cfi_endproc
.LFE23:
	.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:

/*??????????????????????????£???(Christmas Party)*/
#include <stdio.h>
int main(){
  int i, j, x, y, N, M;
  int A[100] = {0};
  int B[100][100] = {0};
  int data[100] = {0};
  scanf("%d %d", &N, &M);
  for (i = 1; i - 1 < M; i++) {
    scanf("%d", &A[i - 1]);
  }
  for (i = 1; i - 1 < M; i++) {
    for (j = 1; j - 1 < N; j++) {
      scanf("%d", &B[i - 1][j - 1]);
    }
  }
  for (i = 1; i - 1 < M; i++) {
    x = 0;
	y = A[i - 1];
    for (j = 1; j - 1 < N; j++) {
      if (A[i - 1] == B[i - 1][j - 1]) {
        data[j - 1]++;
          x++;
      }
    }
    data[y - 1] += N - x;
  }
  for (j = 1; j - 1 < N; j++) {
    printf("%d\n", data[j - 1]);
  }
  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
/*??????????????????????????£???(Christmas Party)*/
#include <stdio.h>
int main(){
  int i, j, x, y, N, M;
  int A[100] = {0};
  int B[100][100] = {0};
  int data[100] = {0};
  scanf("%d %d", &N, &M);
  for (i = 1; i - 1 < M; i++) {
    scanf("%d", &A[i - 1]);
  }
  for (i = 1; i - 1 < M; i++) {
    for (j = 1; j - 1 < N; j++) {
      scanf("%d", &B[i - 1][j - 1]);
    }
  }
  for (i = 1; i - 1 < M; i++) {
    x = 0;
	y = A[i - 1];
    for (j = 1; j - 1 < N; j++) {
      if (A[i - 1] == B[i - 1][j - 1]) {
        data[j - 1]++;
          x++;
      }
    }
    data[y - 1] += N - x;
  }
  for (j = 1; j - 1 < N; j++) {
    printf("%d\n", data[j - 1]);
  }
  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:
.LFB0:
	.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	$3984, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-40816(%rbp), %rdx
	movl	$0, %eax
	movl	$50, %ecx
	movq	%rdx, %rdi
	rep stosq
	leaq	-40016(%rbp), %rax
	movl	$40000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-40416(%rbp), %rdx
	movl	$0, %eax
	movl	$50, %ecx
	movq	%rdx, %rdi
	rep stosq
	leaq	-40836(%rbp), %rdx
	leaq	-40840(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -40832(%rbp)
	jmp	.L2
.L3:
	movl	-40832(%rbp), %eax
	subl	$1, %eax
	leaq	-40816(%rbp), %rdx
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -40832(%rbp)
.L2:
	movl	-40836(%rbp), %eax
	cmpl	%eax, -40832(%rbp)
	jle	.L3
	movl	$1, -40832(%rbp)
	jmp	.L4
.L7:
	movl	$1, -40828(%rbp)
	jmp	.L5
.L6:
	movl	-40832(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-40828(%rbp), %eax
	subl	$1, %eax
	leaq	-40016(%rbp), %rcx
	movslq	%eax, %rsi
	movslq	%edx, %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, -40828(%rbp)
.L5:
	movl	-40840(%rbp), %eax
	cmpl	%eax, -40828(%rbp)
	jle	.L6
	addl	$1, -40832(%rbp)
.L4:
	movl	-40836(%rbp), %eax
	cmpl	%eax, -40832(%rbp)
	jle	.L7
	movl	$1, -40832(%rbp)
	jmp	.L8
.L12:
	movl	$0, -40824(%rbp)
	movl	-40832(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-40816(%rbp,%rax,4), %eax
	movl	%eax, -40820(%rbp)
	movl	$1, -40828(%rbp)
	jmp	.L9
.L11:
	movl	-40832(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-40816(%rbp,%rax,4), %ecx
	movl	-40832(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-40828(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rsi
	movslq	%edx, %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	.L10
	movl	-40828(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	movl	-40416(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -40416(%rbp,%rax,4)
	addl	$1, -40824(%rbp)
.L10:
	addl	$1, -40828(%rbp)
.L9:
	movl	-40840(%rbp), %eax
	cmpl	%eax, -40828(%rbp)
	jle	.L11
	movl	-40820(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-40416(%rbp,%rax,4), %ecx
	movl	-40840(%rbp), %eax
	subl	-40824(%rbp), %eax
	movl	%eax, %edx
	movl	-40820(%rbp), %eax
	subl	$1, %eax
	addl	%ecx, %edx
	cltq
	movl	%edx, -40416(%rbp,%rax,4)
	addl	$1, -40832(%rbp)
.L8:
	movl	-40836(%rbp), %eax
	cmpl	%eax, -40832(%rbp)
	jle	.L12
	movl	$1, -40828(%rbp)
	jmp	.L13
.L14:
	movl	-40828(%rbp), %eax
	subl	$1, %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, -40828(%rbp)
.L13:
	movl	-40840(%rbp), %eax
	cmpl	%eax, -40828(%rbp)
	jle	.L14
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	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"
.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
	leaq	-36864(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3984, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-40816(%rbp), %rdx
	movl	$0, %eax
	movl	$50, %ecx
	movq	%rdx, %rdi
	rep stosq
	leaq	-40016(%rbp), %rax
	movl	$40000, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-40416(%rbp), %rdx
	movl	$0, %eax
	movl	$50, %ecx
	movq	%rdx, %rdi
	rep stosq
	leaq	-40836(%rbp), %rdx
	leaq	-40840(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -40832(%rbp)
	jmp	.L2
.L3:
	movl	-40832(%rbp), %eax
	subl	$1, %eax
	leaq	-40816(%rbp), %rdx
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -40832(%rbp)
.L2:
	movl	-40836(%rbp), %eax
	cmpl	%eax, -40832(%rbp)
	jle	.L3
	movl	$1, -40832(%rbp)
	jmp	.L4
.L7:
	movl	$1, -40828(%rbp)
	jmp	.L5
.L6:
	movl	-40832(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-40828(%rbp), %eax
	subl	$1, %eax
	leaq	-40016(%rbp), %rcx
	movslq	%eax, %rsi
	movslq	%edx, %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, -40828(%rbp)
.L5:
	movl	-40840(%rbp), %eax
	cmpl	%eax, -40828(%rbp)
	jle	.L6
	addl	$1, -40832(%rbp)
.L4:
	movl	-40836(%rbp), %eax
	cmpl	%eax, -40832(%rbp)
	jle	.L7
	movl	$1, -40832(%rbp)
	jmp	.L8
.L12:
	movl	$0, -40824(%rbp)
	movl	-40832(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-40816(%rbp,%rax,4), %eax
	movl	%eax, -40820(%rbp)
	movl	$1, -40828(%rbp)
	jmp	.L9
.L11:
	movl	-40832(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-40816(%rbp,%rax,4), %ecx
	movl	-40832(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-40828(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rsi
	movslq	%edx, %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	.L10
	movl	-40828(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	movl	-40416(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -40416(%rbp,%rax,4)
	addl	$1, -40824(%rbp)
.L10:
	addl	$1, -40828(%rbp)
.L9:
	movl	-40840(%rbp), %eax
	cmpl	%eax, -40828(%rbp)
	jle	.L11
	movl	-40820(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-40416(%rbp,%rax,4), %ecx
	movl	-40840(%rbp), %eax
	subl	-40824(%rbp), %eax
	movl	%eax, %edx
	movl	-40820(%rbp), %eax
	subl	$1, %eax
	addl	%ecx, %edx
	cltq
	movl	%edx, -40416(%rbp,%rax,4)
	addl	$1, -40832(%rbp)
.L8:
	movl	-40836(%rbp), %eax
	cmpl	%eax, -40832(%rbp)
	jle	.L12
	movl	$1, -40828(%rbp)
	jmp	.L13
.L14:
	movl	-40828(%rbp), %eax
	subl	$1, %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, -40828(%rbp)
.L13:
	movl	-40840(%rbp), %eax
	cmpl	%eax, -40828(%rbp)
	jle	.L14
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	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:
