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>
int main()
{
	int x,n,y[100],flg1,a,b,i,cnt1,cnt2;
	scanf("%d %d",&x,&n);
	flg1=0;
	a=x;
	b=x;
	if(n==0){
		printf("%d\n",x);
		// printf("XX\n");
		flg1++;
	}
	else if(flg1==0){
		for(i=0;i<n;i++){
			scanf("%d",&y[i]);
		}
		while(1){
			cnt1=0;
			cnt2=0;
			for(i=0;i<n;i++){
				if(a==y[i]) {
					cnt1++;
				}
				if(b==y[i]){
					cnt2++;
				}
			}
			if(cnt1==0&&cnt2==0){
				printf("%d\n",b);
				// printf("AA\n");
				break;
			}
			else if(cnt1==0){
				printf("%d\n",a);
				// printf("BB\n");
				break;
			}
			else if(cnt2==0){
				printf("%d\n",b);
				// printf("CC\n");
				break;
			}
			a=a+1;
			b=b-1;
		}
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d"
	.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	$448, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-444(%rbp), %rdx
	leaq	-448(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -420(%rbp)
	movl	-448(%rbp), %eax
	movl	%eax, -440(%rbp)
	movl	-448(%rbp), %eax
	movl	%eax, -436(%rbp)
	movl	-444(%rbp), %eax
	testl	%eax, %eax
	jne	.L2
	movl	-448(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -420(%rbp)
	jmp	.L3
.L2:
	cmpl	$0, -420(%rbp)
	jne	.L3
	movl	$0, -432(%rbp)
	jmp	.L4
.L5:
	leaq	-416(%rbp), %rdx
	movl	-432(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -432(%rbp)
.L4:
	movl	-444(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jl	.L5
.L13:
	movl	$0, -428(%rbp)
	movl	$0, -424(%rbp)
	movl	$0, -432(%rbp)
	jmp	.L6
.L9:
	movl	-432(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	%eax, -440(%rbp)
	jne	.L7
	addl	$1, -428(%rbp)
.L7:
	movl	-432(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	%eax, -436(%rbp)
	jne	.L8
	addl	$1, -424(%rbp)
.L8:
	addl	$1, -432(%rbp)
.L6:
	movl	-444(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jl	.L9
	cmpl	$0, -428(%rbp)
	jne	.L10
	cmpl	$0, -424(%rbp)
	jne	.L10
	movl	-436(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L3
.L10:
	cmpl	$0, -428(%rbp)
	jne	.L11
	movl	-440(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L3
.L11:
	cmpl	$0, -424(%rbp)
	jne	.L12
	movl	-436(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L3
.L12:
	addl	$1, -440(%rbp)
	subl	$1, -436(%rbp)
	jmp	.L13
.L3:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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\n"
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$432, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	movl	8(%rsp), %r12d
	testl	%eax, %eax
	je	.L38
	jle	.L38
	leaq	16(%rsp), %rbx
	xorl	%ebp, %ebp
	leaq	.LC2(%rip), %r14
	movq	%rbx, %r13
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	addq	$4, %r13
	cmpl	%ebp, %esi
	jg	.L6
	movl	%esi, %eax
	movl	%esi, %r9d
	leal	-1(%rsi), %r10d
	movl	%r12d, %r8d
	shrl	$2, %eax
	andl	$-4, %r9d
	subl	$1, %eax
	salq	$4, %rax
	leaq	16(%rbx,%rax), %rdi
	testl	%esi, %esi
	jle	.L38
	.p2align 4,,10
	.p2align 3
.L43:
	cmpl	$3, %r10d
	jbe	.L30
	movd	%r8d, %xmm5
	movd	%r12d, %xmm6
	pxor	%xmm2, %xmm2
	movq	%rbx, %rax
	pshufd	$0, %xmm5, %xmm4
	pshufd	$0, %xmm6, %xmm3
	movdqa	%xmm2, %xmm1
	.p2align 4,,10
	.p2align 3
.L8:
	movdqa	%xmm4, %xmm0
	addq	$16, %rax
	pcmpeqd	-16(%rax), %xmm0
	psubd	%xmm0, %xmm1
	movdqa	%xmm3, %xmm0
	pcmpeqd	-16(%rax), %xmm0
	psubd	%xmm0, %xmm2
	cmpq	%rax, %rdi
	jne	.L8
	movdqa	%xmm2, %xmm0
	movl	%r9d, %ecx
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	movd	%xmm2, %edx
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %eax
	cmpl	%r9d, %esi
	je	.L9
.L7:
	movslq	%ecx, %r11
	xorl	%ebp, %ebp
	movl	16(%rsp,%r11,4), %r11d
	cmpl	%r11d, %r8d
	sete	%bpl
	addl	%ebp, %eax
	cmpl	%r11d, %r12d
	je	.L40
	addl	$1, %ecx
	cmpl	%ecx, %esi
	jle	.L9
.L12:
	movslq	%ecx, %r11
	xorl	%ebp, %ebp
	movl	16(%rsp,%r11,4), %r11d
	cmpl	%r11d, %r8d
	sete	%bpl
	addl	%ebp, %eax
	cmpl	%r11d, %r12d
	je	.L41
	addl	$1, %ecx
	cmpl	%ecx, %esi
	jle	.L9
.L16:
	movslq	%ecx, %r11
	xorl	%ebp, %ebp
	movl	16(%rsp,%r11,4), %r11d
	cmpl	%r11d, %r8d
	sete	%bpl
	addl	%ebp, %eax
	cmpl	%r11d, %r12d
	je	.L42
	addl	$1, %ecx
	cmpl	%ecx, %esi
	jle	.L9
.L19:
	movslq	%ecx, %rcx
	xorl	%r11d, %r11d
	movl	16(%rsp,%rcx,4), %ecx
	cmpl	%ecx, %r8d
	sete	%r11b
	addl	%r11d, %eax
	cmpl	%ecx, %r12d
	sete	%cl
	movzbl	%cl, %ecx
	addl	%ecx, %edx
.L9:
	movl	%eax, %ecx
	orl	%edx, %ecx
	je	.L38
	testl	%eax, %eax
	je	.L28
	testl	%edx, %edx
	je	.L38
.L26:
	addl	$1, %r8d
	subl	$1, %r12d
	testl	%esi, %esi
	jg	.L43
.L38:
	movl	%r12d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L5:
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L44
	addq	$432, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L40:
	.cfi_restore_state
	addl	$1, %ecx
	addl	$1, %edx
	cmpl	%ecx, %esi
	jg	.L12
.L13:
	testl	%eax, %eax
	jne	.L26
.L28:
	movl	%r8d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L41:
	addl	$1, %ecx
	addl	$1, %edx
	cmpl	%ecx, %esi
	jg	.L16
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L42:
	addl	$1, %ecx
	addl	$1, %edx
	cmpl	%ecx, %esi
	jg	.L19
	jmp	.L13
.L30:
	xorl	%edx, %edx
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	jmp	.L7
.L44:
	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
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$432, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	movl	8(%rsp), %r12d
	testl	%eax, %eax
	je	.L38
	jle	.L38
	leaq	16(%rsp), %rbx
	xorl	%ebp, %ebp
	leaq	.LC2(%rip), %r14
	movq	%rbx, %r13
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %esi
	addq	$4, %r13
	cmpl	%ebp, %esi
	jg	.L6
	movl	%esi, %eax
	movl	%esi, %r9d
	leal	-1(%rsi), %r10d
	movl	%r12d, %r8d
	shrl	$2, %eax
	andl	$-4, %r9d
	subl	$1, %eax
	salq	$4, %rax
	leaq	16(%rbx,%rax), %rdi
	testl	%esi, %esi
	jle	.L38
	.p2align 4,,10
	.p2align 3
.L43:
	cmpl	$3, %r10d
	jbe	.L30
	movd	%r8d, %xmm5
	movd	%r12d, %xmm6
	pxor	%xmm2, %xmm2
	movq	%rbx, %rax
	pshufd	$0, %xmm5, %xmm4
	pshufd	$0, %xmm6, %xmm3
	movdqa	%xmm2, %xmm1
	.p2align 4,,10
	.p2align 3
.L8:
	movdqa	%xmm4, %xmm0
	addq	$16, %rax
	pcmpeqd	-16(%rax), %xmm0
	psubd	%xmm0, %xmm1
	movdqa	%xmm3, %xmm0
	pcmpeqd	-16(%rax), %xmm0
	psubd	%xmm0, %xmm2
	cmpq	%rax, %rdi
	jne	.L8
	movdqa	%xmm2, %xmm0
	movl	%r9d, %ecx
	psrldq	$8, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movdqa	%xmm1, %xmm0
	psrldq	$8, %xmm0
	movd	%xmm2, %edx
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %eax
	cmpl	%r9d, %esi
	je	.L9
.L7:
	movslq	%ecx, %r11
	xorl	%ebp, %ebp
	movl	16(%rsp,%r11,4), %r11d
	cmpl	%r11d, %r8d
	sete	%bpl
	addl	%ebp, %eax
	cmpl	%r11d, %r12d
	je	.L40
	addl	$1, %ecx
	cmpl	%ecx, %esi
	jle	.L9
.L12:
	movslq	%ecx, %r11
	xorl	%ebp, %ebp
	movl	16(%rsp,%r11,4), %r11d
	cmpl	%r11d, %r8d
	sete	%bpl
	addl	%ebp, %eax
	cmpl	%r11d, %r12d
	je	.L41
	addl	$1, %ecx
	cmpl	%ecx, %esi
	jle	.L9
.L16:
	movslq	%ecx, %r11
	xorl	%ebp, %ebp
	movl	16(%rsp,%r11,4), %r11d
	cmpl	%r11d, %r8d
	sete	%bpl
	addl	%ebp, %eax
	cmpl	%r11d, %r12d
	je	.L42
	addl	$1, %ecx
	cmpl	%ecx, %esi
	jle	.L9
.L19:
	movslq	%ecx, %rcx
	xorl	%r11d, %r11d
	movl	16(%rsp,%rcx,4), %ecx
	cmpl	%ecx, %r8d
	sete	%r11b
	addl	%r11d, %eax
	cmpl	%ecx, %r12d
	sete	%cl
	movzbl	%cl, %ecx
	addl	%ecx, %edx
.L9:
	movl	%eax, %ecx
	orl	%edx, %ecx
	je	.L38
	testl	%eax, %eax
	je	.L28
	testl	%edx, %edx
	je	.L38
.L26:
	addl	$1, %r8d
	subl	$1, %r12d
	testl	%esi, %esi
	jg	.L43
.L38:
	movl	%r12d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L5:
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L44
	addq	$432, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L40:
	.cfi_restore_state
	addl	$1, %ecx
	addl	$1, %edx
	cmpl	%ecx, %esi
	jg	.L12
.L13:
	testl	%eax, %eax
	jne	.L26
.L28:
	movl	%r8d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L41:
	addl	$1, %ecx
	addl	$1, %edx
	cmpl	%ecx, %esi
	jg	.L16
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L42:
	addl	$1, %ecx
	addl	$1, %edx
	cmpl	%ecx, %esi
	jg	.L19
	jmp	.L13
.L30:
	xorl	%edx, %edx
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	jmp	.L7
.L44:
	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:

#include<stdio.h>
int main()
{
	int x,n,y[100],flg1,a,b,i,cnt1,cnt2;
	scanf("%d %d",&x,&n);
	flg1=0;
	a=x;
	b=x;
	if(n==0){
		printf("%d\n",x);
		// printf("XX\n");
		flg1++;
	}
	else if(flg1==0){
		for(i=0;i<n;i++){
			scanf("%d",&y[i]);
		}
		while(1){
			cnt1=0;
			cnt2=0;
			for(i=0;i<n;i++){
				if(a==y[i]) {
					cnt1++;
				}
				if(b==y[i]){
					cnt2++;
				}
			}
			if(cnt1==0&&cnt2==0){
				printf("%d\n",b);
				// printf("AA\n");
				break;
			}
			else if(cnt1==0){
				printf("%d\n",a);
				// printf("BB\n");
				break;
			}
			else if(cnt2==0){
				printf("%d\n",b);
				// printf("CC\n");
				break;
			}
			a=a+1;
			b=b-1;
		}
	}
	return 0;
}
6 2
4 7 10 6 5
 10 3
4 7 10 6 5
 6 2
4 7 10 8 5
 10 3
4 7 9 6 5
 15 3
7 5 3 6 5
 12 1
2 5 3 16 11
 2 1
4 5 0 16 4
 6 5
3 7 10 6 5
 19 5
4 7 10 6 5
 101 0

6
 9
 6
 10
 15
 12
 2
 4
 19
 101

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>
int main()
{
	int x,n,y[100],flg1,a,b,i,cnt1,cnt2;
	scanf("%d %d",&x,&n);
	flg1=0;
	a=x;
	b=x;
	if(n==0){
		printf("%d\n",x);
		// printf("XX\n");
		flg1++;
	}
	else if(flg1==0){
		for(i=0;i<n;i++){
			scanf("%d",&y[i]);
		}
		while(1){
			cnt1=0;
			cnt2=0;
			for(i=0;i<n;i++){
				if(a==y[i]) {
					cnt1++;
				}
				if(b==y[i]){
					cnt2++;
				}
			}
			if(cnt1==0&&cnt2==0){
				printf("%d\n",b);
				// printf("AA\n");
				break;
			}
			else if(cnt1==0){
				printf("%d\n",a);
				// printf("BB\n");
				break;
			}
			else if(cnt2==0){
				printf("%d\n",b);
				// printf("CC\n");
				break;
			}
			a=a+1;
			b=b-1;
		}
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d"
	.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	$448, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-444(%rbp), %rdx
	leaq	-448(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -420(%rbp)
	movl	-448(%rbp), %eax
	movl	%eax, -440(%rbp)
	movl	-448(%rbp), %eax
	movl	%eax, -436(%rbp)
	movl	-444(%rbp), %eax
	testl	%eax, %eax
	jne	.L2
	movl	-448(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -420(%rbp)
	jmp	.L3
.L2:
	cmpl	$0, -420(%rbp)
	jne	.L3
	movl	$0, -432(%rbp)
	jmp	.L4
.L5:
	leaq	-416(%rbp), %rdx
	movl	-432(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -432(%rbp)
.L4:
	movl	-444(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jl	.L5
.L13:
	movl	$0, -428(%rbp)
	movl	$0, -424(%rbp)
	movl	$0, -432(%rbp)
	jmp	.L6
.L9:
	movl	-432(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	%eax, -440(%rbp)
	jne	.L7
	addl	$1, -428(%rbp)
.L7:
	movl	-432(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	%eax, -436(%rbp)
	jne	.L8
	addl	$1, -424(%rbp)
.L8:
	addl	$1, -432(%rbp)
.L6:
	movl	-444(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jl	.L9
	cmpl	$0, -428(%rbp)
	jne	.L10
	cmpl	$0, -424(%rbp)
	jne	.L10
	movl	-436(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L3
.L10:
	cmpl	$0, -428(%rbp)
	jne	.L11
	movl	-440(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L3
.L11:
	cmpl	$0, -424(%rbp)
	jne	.L12
	movl	-436(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L3
.L12:
	addl	$1, -440(%rbp)
	subl	$1, -436(%rbp)
	jmp	.L13
.L3:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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\n"
.LC2:
	.string	"%d"
	.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	$448, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-444(%rbp), %rdx
	leaq	-448(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -420(%rbp)
	movl	-448(%rbp), %eax
	movl	%eax, -440(%rbp)
	movl	-448(%rbp), %eax
	movl	%eax, -436(%rbp)
	movl	-444(%rbp), %eax
	testl	%eax, %eax
	jne	.L2
	movl	-448(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -420(%rbp)
	jmp	.L3
.L2:
	cmpl	$0, -420(%rbp)
	jne	.L3
	movl	$0, -432(%rbp)
	jmp	.L4
.L5:
	leaq	-416(%rbp), %rdx
	movl	-432(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -432(%rbp)
.L4:
	movl	-444(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jl	.L5
.L13:
	movl	$0, -428(%rbp)
	movl	$0, -424(%rbp)
	movl	$0, -432(%rbp)
	jmp	.L6
.L9:
	movl	-432(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	%eax, -440(%rbp)
	jne	.L7
	addl	$1, -428(%rbp)
.L7:
	movl	-432(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	%eax, -436(%rbp)
	jne	.L8
	addl	$1, -424(%rbp)
.L8:
	addl	$1, -432(%rbp)
.L6:
	movl	-444(%rbp), %eax
	cmpl	%eax, -432(%rbp)
	jl	.L9
	cmpl	$0, -428(%rbp)
	jne	.L10
	cmpl	$0, -424(%rbp)
	jne	.L10
	movl	-436(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L3
.L10:
	cmpl	$0, -428(%rbp)
	jne	.L11
	movl	-440(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L3
.L11:
	cmpl	$0, -424(%rbp)
	jne	.L12
	movl	-436(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L3
.L12:
	addl	$1, -440(%rbp)
	subl	$1, -436(%rbp)
	jmp	.L13
.L3:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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:
