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 main(void){
	int N,M,A[101],B[101],p[101],i,i2,ruio;
	scanf("%d%d",&N,&M);
	for(i=1;i<=M;i++){
		scanf("%d",&A[i]);
	}
	for(i=1;i<=N;i++){
		p[i]=0;
	}
	for(i=1;i<=M;i++){
		for(i2=1;i2<=N;i2++){
			scanf("%d",&B[i2]);
		}
		for(i2=1;i2<=N;i2++){
			if(A[i]!=B[i2]){
				ruio=A[i];
				p[ruio]++;
			}
			if(A[i]==B[i2]){
				p[i2]++;
			}
		}
	}
	for(i=1;i<=N;i++){
		printf("%d\n",p[i]);
	}
	return 0;
}```

Assembly Code:

```assembly
	.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
	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	$1272, %rsp
	.cfi_def_cfa_offset 1328
	movq	%fs:40, %rax
	movq	%rax, 1256(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r12d
	testl	%r12d, %r12d
	jle	.L2
	leaq	20(%rsp), %rbp
	movl	$1, %ebx
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r12d
	addq	$4, %rbp
	cmpl	%ebx, %r12d
	jge	.L3
.L2:
	movl	8(%rsp), %r15d
	testl	%r15d, %r15d
	jle	.L4
	movslq	%r15d, %rdx
	xorl	%esi, %esi
	leaq	852(%rsp), %rdi
	salq	$2, %rdx
	call	memset@PLT
	testl	%r12d, %r12d
	jle	.L6
.L5:
	movl	$2, %r14d
	leaq	.LC1(%rip), %r13
	testl	%r15d, %r15d
	jle	.L11
	.p2align 4,,10
	.p2align 3
.L12:
	leaq	436(%rsp), %rbx
	movl	$1, %ebp
	movq	%rbx, %r12
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %r15d
	addq	$4, %r12
	cmpl	%ebp, %r15d
	jge	.L7
	movl	12(%rsp), %edi
	testl	%r15d, %r15d
	jle	.L8
	movl	12(%rsp,%r14,4), %ecx
	leal	-1(%r15), %edx
	leaq	852(%rsp), %rax
	leaq	440(%rsp,%rdx,4), %rsi
	movslq	%ecx, %rdx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L27:
	addq	$4, %rbx
	addl	$1, 848(%rsp,%rdx,4)
	addq	$4, %rax
	cmpq	%rbx, %rsi
	je	.L8
.L10:
	cmpl	(%rbx), %ecx
	jne	.L27
	addq	$4, %rbx
	addl	$1, (%rax)
	addq	$4, %rax
	cmpq	%rbx, %rsi
	jne	.L10
.L8:
	cmpl	%r14d, %edi
	jl	.L28
	addq	$1, %r14
	testl	%r15d, %r15d
	jg	.L12
.L11:
	movq	1256(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$1272, %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
.L28:
	.cfi_restore_state
	testl	%r15d, %r15d
	jle	.L11
.L6:
	movl	$1, %ebx
	leaq	848(%rsp), %r12
	leaq	.LC2(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L13:
	movl	(%r12,%rbx,4), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 8(%rsp)
	jge	.L13
	jmp	.L11
.L4:
	testl	%r12d, %r12d
	jg	.L5
	jmp	.L11
.L29:
	call	__stack_chk_fail@PLT
	.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:
```

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%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
	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	$1272, %rsp
	.cfi_def_cfa_offset 1328
	movq	%fs:40, %rax
	movq	%rax, 1256(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r12d
	testl	%r12d, %r12d
	jle	.L2
	leaq	20(%rsp), %rbp
	movl	$1, %ebx
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r12d
	addq	$4, %rbp
	cmpl	%ebx, %r12d
	jge	.L3
.L2:
	movl	8(%rsp), %r15d
	testl	%r15d, %r15d
	jle	.L4
	movslq	%r15d, %rdx
	xorl	%esi, %esi
	leaq	852(%rsp), %rdi
	salq	$2, %rdx
	call	memset@PLT
	testl	%r12d, %r12d
	jle	.L6
.L5:
	movl	$2, %r14d
	leaq	.LC1(%rip), %r13
	testl	%r15d, %r15d
	jle	.L11
	.p2align 4,,10
	.p2align 3
.L12:
	leaq	436(%rsp), %rbx
	movl	$1, %ebp
	movq	%rbx, %r12
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %r15d
	addq	$4, %r12
	cmpl	%ebp, %r15d
	jge	.L7
	movl	12(%rsp), %edi
	testl	%r15d, %r15d
	jle	.L8
	movl	12(%rsp,%r14,4), %ecx
	leal	-1(%r15), %edx
	leaq	852(%rsp), %rax
	leaq	440(%rsp,%rdx,4), %rsi
	movslq	%ecx, %rdx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L27:
	addq	$4, %rbx
	addl	$1, 848(%rsp,%rdx,4)
	addq	$4, %rax
	cmpq	%rbx, %rsi
	je	.L8
.L10:
	cmpl	(%rbx), %ecx
	jne	.L27
	addq	$4, %rbx
	addl	$1, (%rax)
	addq	$4, %rax
	cmpq	%rbx, %rsi
	jne	.L10
.L8:
	cmpl	%r14d, %edi
	jl	.L28
	addq	$1, %r14
	testl	%r15d, %r15d
	jg	.L12
.L11:
	movq	1256(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$1272, %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
.L28:
	.cfi_restore_state
	testl	%r15d, %r15d
	jle	.L11
.L6:
	movl	$1, %ebx
	leaq	848(%rsp), %r12
	leaq	.LC2(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L13:
	movl	(%r12,%rbx,4), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 8(%rsp)
	jge	.L13
	jmp	.L11
.L4:
	testl	%r12d, %r12d
	jg	.L5
	jmp	.L11
.L29:
	call	__stack_chk_fail@PLT
	.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
```assembly
	.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
	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	$1272, %rsp
	.cfi_def_cfa_offset 1328
	movq	%fs:40, %rax
	movq	%rax, 1256(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r12d
	testl	%r12d, %r12d
	jle	.L2
	leaq	20(%rsp), %rbp
	movl	$1, %ebx
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r12d
	addq	$4, %rbp
	cmpl	%ebx, %r12d
	jge	.L3
.L2:
	movl	8(%rsp), %r15d
	testl	%r15d, %r15d
	jle	.L4
	movslq	%r15d, %rdx
	xorl	%esi, %esi
	leaq	852(%rsp), %rdi
	salq	$2, %rdx
	call	memset@PLT
	testl	%r12d, %r12d
	jle	.L6
.L5:
	movl	$2, %r14d
	leaq	.LC1(%rip), %r13
	testl	%r15d, %r15d
	jle	.L11
	.p2align 4,,10
	.p2align 3
.L12:
	leaq	436(%rsp), %rbx
	movl	$1, %ebp
	movq	%rbx, %r12
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %r15d
	addq	$4, %r12
	cmpl	%ebp, %r15d
	jge	.L7
	movl	12(%rsp), %edi
	testl	%r15d, %r15d
	jle	.L8
	movl	12(%rsp,%r14,4), %ecx
	leal	-1(%r15), %edx
	leaq	852(%rsp), %rax
	leaq	440(%rsp,%rdx,4), %rsi
	movslq	%ecx, %rdx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L27:
	addq	$4, %rbx
	addl	$1, 848(%rsp,%rdx,4)
	addq	$4, %rax
	cmpq	%rbx, %rsi
	je	.L8
.L10:
	cmpl	(%rbx), %ecx
	jne	.L27
	addq	$4, %rbx
	addl	$1, (%rax)
	addq	$4, %rax
	cmpq	%rbx, %rsi
	jne	.L10
.L8:
	cmpl	%r14d, %edi
	jl	.L28
	addq	$1, %r14
	testl	%r15d, %r15d
	jg	.L12
.L11:
	movq	1256(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$1272, %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
.L28:
	.cfi_restore_state
	testl	%r15d, %r15d
	jle	.L11
.L6:
	movl	$1, %ebx
	leaq	848(%rsp), %r12
	leaq	.LC2(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L13:
	movl	(%r12,%rbx,4), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 8(%rsp)
	jge	.L13
	jmp	.L11
.L4:
	testl	%r12d, %r12d
	jg	.L5
	jmp	.L11
.L29:
	call	__stack_chk_fail@PLT
	.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:
```
```c
#include<stdio.h>
int main(void){
	int N,M,A[101],B[101],p[101],i,i2,ruio;
	scanf("%d%d",&N,&M);
	for(i=1;i<=M;i++){
		scanf("%d",&A[i]);
	}
	for(i=1;i<=N;i++){
		p[i]=0;
	}
	for(i=1;i<=M;i++){
		for(i2=1;i2<=N;i2++){
			scanf("%d",&B[i2]);
		}
		for(i2=1;i2<=N;i2++){
			if(A[i]!=B[i2]){
				ruio=A[i];
				p[ruio]++;
			}
			if(A[i]==B[i2]){
				p[i2]++;
			}
		}
	}
	for(i=1;i<=N;i++){
		printf("%d\n",p[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 main(void){
	int N,M,A[101],B[101],p[101],i,i2,ruio;
	scanf("%d%d",&N,&M);
	for(i=1;i<=M;i++){
		scanf("%d",&A[i]);
	}
	for(i=1;i<=N;i++){
		p[i]=0;
	}
	for(i=1;i<=M;i++){
		for(i2=1;i2<=N;i2++){
			scanf("%d",&B[i2]);
		}
		for(i2=1;i2<=N;i2++){
			if(A[i]!=B[i2]){
				ruio=A[i];
				p[ruio]++;
			}
			if(A[i]==B[i2]){
				p[i2]++;
			}
		}
	}
	for(i=1;i<=N;i++){
		printf("%d\n",p[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:

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 assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
int main(void){
	int N,M,A[101],B[101],p[101],i,i2,ruio;
	scanf("%d%d",&N,&M);
	for(i=1;i<=M;i++){
		scanf("%d",&A[i]);
	}
	for(i=1;i<=N;i++){
		p[i]=0;
	}
	for(i=1;i<=M;i++){
		for(i2=1;i2<=N;i2++){
			scanf("%d",&B[i2]);
		}
		for(i2=1;i2<=N;i2++){
			if(A[i]!=B[i2]){
				ruio=A[i];
				p[ruio]++;
			}
			if(A[i]==B[i2]){
				p[i2]++;
			}
		}
	}
	for(i=1;i<=N;i++){
		printf("%d\n",p[i]);
	}
	return 0;
}```

Assembly Code:

```assembly
	.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
	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	$1272, %rsp
	.cfi_def_cfa_offset 1328
	movq	%fs:40, %rax
	movq	%rax, 1256(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r12d
	testl	%r12d, %r12d
	jle	.L2
	leaq	20(%rsp), %rbp
	movl	$1, %ebx
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r12d
	addq	$4, %rbp
	cmpl	%ebx, %r12d
	jge	.L3
.L2:
	movl	8(%rsp), %r15d
	testl	%r15d, %r15d
	jle	.L4
	movslq	%r15d, %rdx
	xorl	%esi, %esi
	leaq	852(%rsp), %rdi
	salq	$2, %rdx
	call	memset@PLT
	testl	%r12d, %r12d
	jle	.L6
.L5:
	movl	$2, %r14d
	leaq	.LC1(%rip), %r13
	testl	%r15d, %r15d
	jle	.L11
	.p2align 4,,10
	.p2align 3
.L12:
	leaq	436(%rsp), %rbx
	movl	$1, %ebp
	movq	%rbx, %r12
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %r15d
	addq	$4, %r12
	cmpl	%ebp, %r15d
	jge	.L7
	movl	12(%rsp), %edi
	testl	%r15d, %r15d
	jle	.L8
	movl	12(%rsp,%r14,4), %ecx
	leal	-1(%r15), %edx
	leaq	852(%rsp), %rax
	leaq	440(%rsp,%rdx,4), %rsi
	movslq	%ecx, %rdx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L27:
	addq	$4, %rbx
	addl	$1, 848(%rsp,%rdx,4)
	addq	$4, %rax
	cmpq	%rbx, %rsi
	je	.L8
.L10:
	cmpl	(%rbx), %ecx
	jne	.L27
	addq	$4, %rbx
	addl	$1, (%rax)
	addq	$4, %rax
	cmpq	%rbx, %rsi
	jne	.L10
.L8:
	cmpl	%r14d, %edi
	jl	.L28
	addq	$1, %r14
	testl	%r15d, %r15d
	jg	.L12
.L11:
	movq	1256(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$1272, %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
.L28:
	.cfi_restore_state
	testl	%r15d, %r15d
	jle	.L11
.L6:
	movl	$1, %ebx
	leaq	848(%rsp), %r12
	leaq	.LC2(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L13:
	movl	(%r12,%rbx,4), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 8(%rsp)
	jge	.L13
	jmp	.L11
.L4:
	testl	%r12d, %r12d
	jg	.L5
	jmp	.L11
.L29:
	call	__stack_chk_fail@PLT
	.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:
```

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%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
	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	$1272, %rsp
	.cfi_def_cfa_offset 1328
	movq	%fs:40, %rax
	movq	%rax, 1256(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r12d
	testl	%r12d, %r12d
	jle	.L2
	leaq	20(%rsp), %rbp
	movl	$1, %ebx
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r12d
	addq	$4, %rbp
	cmpl	%ebx, %r12d
	jge	.L3
.L2:
	movl	8(%rsp), %r15d
	testl	%r15d, %r15d
	jle	.L4
	movslq	%r15d, %rdx
	xorl	%esi, %esi
	leaq	852(%rsp), %rdi
	salq	$2, %rdx
	call	memset@PLT
	testl	%r12d, %r12d
	jle	.L6
.L5:
	movl	$2, %r14d
	leaq	.LC1(%rip), %r13
	testl	%r15d, %r15d
	jle	.L11
	.p2align 4,,10
	.p2align 3
.L12:
	leaq	436(%rsp), %rbx
	movl	$1, %ebp
	movq	%rbx, %r12
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %r15d
	addq	$4, %r12
	cmpl	%ebp, %r15d
	jge	.L7
	movl	12(%rsp), %edi
	testl	%r15d, %r15d
	jle	.L8
	movl	12(%rsp,%r14,4), %ecx
	leal	-1(%r15), %edx
	leaq	852(%rsp), %rax
	leaq	440(%rsp,%rdx,4), %rsi
	movslq	%ecx, %rdx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L27:
	addq	$4, %rbx
	addl	$1, 848(%rsp,%rdx,4)
	addq	$4, %rax
	cmpq	%rbx, %rsi
	je	.L8
.L10:
	cmpl	(%rbx), %ecx
	jne	.L27
	addq	$4, %rbx
	addl	$1, (%rax)
	addq	$4, %rax
	cmpq	%rbx, %rsi
	jne	.L10
.L8:
	cmpl	%r14d, %edi
	jl	.L28
	addq	$1, %r14
	testl	%r15d, %r15d
	jg	.L12
.L11:
	movq	1256(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$1272, %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
.L28:
	.cfi_restore_state
	testl	%r15d, %r15d
	jle	.L11
.L6:
	movl	$1, %ebx
	leaq	848(%rsp), %r12
	leaq	.LC2(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L13:
	movl	(%r12,%rbx,4), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 8(%rsp)
	jge	.L13
	jmp	.L11
.L4:
	testl	%r12d, %r12d
	jg	.L5
	jmp	.L11
.L29:
	call	__stack_chk_fail@PLT
	.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:
```