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 n;
	scanf("%d",&n);
	int a[n],b[n];
	int i,same=0;
	for (i=0;i<n;i++) scanf("%d",&a[i]);
	for (i=n-1;i>=0;i--) scanf("%d",&b[i]);
	int left=0, right=n-1;		
	i=0;
	//находим левую и правую границу одинаковых значений
	while ((a[i]!=b[i])&&(i<n)) i++;
	left=i;
	i=n-1;
	while ((a[i]!=b[i])&&(i>=0)) i--;
	right=i;
//	printf("left=%d right=%d\n", left,right);
	//если нет пересечений то форму пролетают и сразу печатаем массив
	int k,j;
	for (i=0,j=0;(i<left)&&(left+j<=right); i++) { 
		if((b[i]!=b[left+j])&&(a[i]!=b[left+j])){
			k=b[i]; 
			b[i]=b[left+j];
			b[left+j]=k;
			j++;
		}
	}
	i=j+left;
//	printf("i=%d\n",i);
//	for (i=0;i<n;i++) printf("%d ", b[i]);
	for (j=0;(i<=right)&&(right+j+1<n);j++) { 
		if ((b[i]!=b[right+j+1])&&(a[right+j+1]!=b[i])){
			k=b[i];
			b[i]=b[right+j+1];
			b[right+j+1]=k;
			i++;
		}
	}
	if (i<=right) printf("No\n");
	else {
		printf("Yes\n");
		for (i=0;i<n;i++) printf("%d ", b[i]);
	}
	return 0;
}
	
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"No"
.LC2:
	.string	"Yes"
.LC3:
	.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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$120, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-116(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-116(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -144(%rbp)
	movq	$0, -136(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -160(%rbp)
	movq	$0, -152(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	-116(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L5:
	cmpq	%rdx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L7
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -104(%rbp)
	movl	$0, -112(%rbp)
	jmp	.L8
.L9:
	movl	-112(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -112(%rbp)
.L8:
	movl	-116(%rbp), %eax
	cmpl	%eax, -112(%rbp)
	jl	.L9
	movl	-116(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -112(%rbp)
	jmp	.L10
.L11:
	movl	-112(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	subl	$1, -112(%rbp)
.L10:
	cmpl	$0, -112(%rbp)
	jns	.L11
	movl	$0, -100(%rbp)
	movl	-116(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -96(%rbp)
	movl	$0, -112(%rbp)
	jmp	.L12
.L14:
	addl	$1, -112(%rbp)
.L12:
	movq	-80(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, %ecx
	je	.L13
	movl	-116(%rbp), %eax
	cmpl	%eax, -112(%rbp)
	jl	.L14
.L13:
	movl	-112(%rbp), %eax
	movl	%eax, -100(%rbp)
	movl	-116(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -112(%rbp)
	jmp	.L15
.L17:
	subl	$1, -112(%rbp)
.L15:
	movq	-80(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, %ecx
	je	.L16
	cmpl	$0, -112(%rbp)
	jns	.L17
.L16:
	movl	-112(%rbp), %eax
	movl	%eax, -96(%rbp)
	movl	$0, -112(%rbp)
	movl	$0, -108(%rbp)
	jmp	.L18
.L21:
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movl	-100(%rbp), %edx
	movl	-108(%rbp), %eax
	addl	%eax, %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, %ecx
	je	.L19
	movq	-80(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movl	-100(%rbp), %edx
	movl	-108(%rbp), %eax
	addl	%eax, %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, %ecx
	je	.L19
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, -92(%rbp)
	movl	-100(%rbp), %edx
	movl	-108(%rbp), %eax
	addl	%eax, %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
	movl	-100(%rbp), %edx
	movl	-108(%rbp), %eax
	addl	%eax, %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	-92(%rbp), %ecx
	movl	%ecx, (%rax,%rdx,4)
	addl	$1, -108(%rbp)
.L19:
	addl	$1, -112(%rbp)
.L18:
	movl	-112(%rbp), %eax
	cmpl	-100(%rbp), %eax
	jge	.L20
	movl	-100(%rbp), %edx
	movl	-108(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -96(%rbp)
	jge	.L21
.L20:
	movl	-108(%rbp), %edx
	movl	-100(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -112(%rbp)
	movl	$0, -108(%rbp)
	jmp	.L22
.L25:
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movl	-96(%rbp), %edx
	movl	-108(%rbp), %eax
	addl	%edx, %eax
	leal	1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, %ecx
	je	.L23
	movl	-96(%rbp), %edx
	movl	-108(%rbp), %eax
	addl	%edx, %eax
	leal	1(%rax), %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, %ecx
	je	.L23
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, -92(%rbp)
	movl	-96(%rbp), %edx
	movl	-108(%rbp), %eax
	addl	%edx, %eax
	leal	1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
	movl	-96(%rbp), %edx
	movl	-108(%rbp), %eax
	addl	%edx, %eax
	leal	1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	-92(%rbp), %ecx
	movl	%ecx, (%rax,%rdx,4)
	addl	$1, -112(%rbp)
.L23:
	addl	$1, -108(%rbp)
.L22:
	movl	-112(%rbp), %eax
	cmpl	-96(%rbp), %eax
	jg	.L24
	movl	-96(%rbp), %edx
	movl	-108(%rbp), %eax
	addl	%edx, %eax
	leal	1(%rax), %edx
	movl	-116(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L25
.L24:
	movl	-112(%rbp), %eax
	cmpl	-96(%rbp), %eax
	jg	.L26
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L27
.L26:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, -112(%rbp)
	jmp	.L28
.L29:
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -112(%rbp)
.L28:
	movl	-116(%rbp), %eax
	cmpl	%eax, -112(%rbp)
	jl	.L29
.L27:
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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"
.LC1:
	.string	"%d "
.LC2:
	.string	"No"
.LC3:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-60(%rbp), %rsi
	pushq	%r13
	pushq	%r12
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	leaq	.LC0(%rip), %r12
	pushq	%rbx
	movq	%r12, %rdi
	subq	$40, %rsp
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %rax
	movq	%rsp, %rsi
	movq	%rax, %rcx
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdi
	movq	%rax, %rdx
	andq	$-4096, %rdi
	andq	$-16, %rdx
	subq	%rdi, %rsi
	cmpq	%rsi, %rsp
	je	.L3
.L69:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L69
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L70
.L4:
	leaq	3(%rsp), %rbx
	movq	%rax, %rdx
	andq	$-4096, %rax
	movq	%rbx, %rsi
	andq	$-16, %rdx
	andq	$-4, %rbx
	shrq	$2, %rsi
	movq	%rsi, -72(%rbp)
	movq	%rsp, %rsi
	subq	%rax, %rsi
.L5:
	cmpq	%rsi, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L70:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L6:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L71
.L7:
	leaq	3(%rsp), %r15
	movq	%r15, %rax
	andq	$-4, %r15
	shrq	$2, %rax
	movq	%rax, -80(%rbp)
	testl	%ecx, %ecx
	jle	.L8
	movq	%rbx, %r14
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%r14, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	call	__isoc99_scanf@PLT
	movl	-60(%rbp), %eax
	addq	$4, %r14
	cmpl	%r13d, %eax
	jg	.L9
	leal	-1(%rax), %r14d
	movslq	%r14d, %rcx
	leaq	(%r15,%rcx,4), %r13
	testl	%r14d, %r14d
	js	.L15
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	subl	$1, %r14d
	call	__isoc99_scanf@PLT
	subq	$4, %r13
	cmpl	$-1, %r14d
	jne	.L14
	movl	-60(%rbp), %eax
.L15:
	movq	-80(%rbp), %rdx
	movq	-72(%rbp), %rdi
	movl	%eax, %ecx
	leal	-1(%rax), %esi
	movl	0(,%rdx,4), %edx
	cmpl	%edx, 0(,%rdi,4)
	je	.L13
	movl	$1, %edx
	testl	%eax, %eax
	jle	.L13
	.p2align 4,,10
	.p2align 3
.L11:
	movl	(%r15,%rdx,4), %r11d
	cmpl	%r11d, (%rbx,%rdx,4)
	movl	%edx, %edi
	setne	%r9b
	cmpl	%edx, %eax
	setg	%r8b
	addq	$1, %rdx
	testb	%r8b, %r9b
	jne	.L11
	movslq	%esi, %rdx
	movl	(%r15,%rdx,4), %r10d
	cmpl	%r10d, (%rbx,%rdx,4)
	je	.L20
	testl	%esi, %esi
	js	.L20
.L17:
	subl	$2, %eax
	cltq
	.p2align 4,,10
	.p2align 3
.L21:
	movl	(%r15,%rax,4), %edx
	cmpl	%edx, (%rbx,%rax,4)
	movl	%eax, %edx
	movl	%eax, %esi
	notl	%edx
	setne	%r8b
	subq	$1, %rax
	shrl	$31, %edx
	testb	%dl, %r8b
	jne	.L21
	testl	%edi, %edi
	je	.L35
.L20:
	cmpl	%esi, %edi
	jg	.L25
	leal	-1(%rdi), %r11d
	movl	%edi, %eax
	xorl	%edx, %edx
	xorl	%r10d, %r10d
	salq	$2, %r11
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L72:
	addq	$4, %rdx
	cmpl	%eax, %esi
	jl	.L25
.L24:
	cltq
	movl	(%r15,%rdx), %r9d
	movl	(%r15,%rax,4), %r8d
	cmpl	%r8d, %r9d
	je	.L23
	cmpl	(%rbx,%rdx), %r8d
	je	.L23
	movl	%r8d, (%r15,%rdx)
	addl	$1, %r10d
	movl	%r9d, (%r15,%rax,4)
.L23:
	leal	(%r10,%rdi), %eax
	cmpq	%rdx, %r11
	jne	.L72
	movl	%edi, %edx
	movl	%r10d, %edi
.L19:
	addl	%edi, %edx
	cmpl	%edx, %esi
	jl	.L25
	leal	1(%rsi), %eax
	cmpl	%ecx, %eax
	jge	.L26
	cltq
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L73:
	addq	$1, %rax
	cmpl	%eax, %ecx
	jle	.L26
.L28:
	movslq	%edx, %r8
	movl	(%r15,%rax,4), %r9d
	movl	(%r15,%r8,4), %edi
	cmpl	%r9d, %edi
	je	.L27
	cmpl	(%rbx,%rax,4), %edi
	je	.L27
	movl	%r9d, (%r15,%r8,4)
	addl	$1, %edx
	movl	%edi, (%r15,%rax,4)
.L27:
	cmpl	%esi, %edx
	jle	.L73
.L25:
	leaq	.LC3(%rip), %rdi
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	call	puts@PLT
	cmpl	$0, -60(%rbp)
	jle	.L30
	.p2align 4,,10
	.p2align 3
.L29:
	movl	(%r15,%rbx,4), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, -60(%rbp)
	jg	.L29
.L30:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L74
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L26:
	.cfi_restore_state
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L30
.L8:
	leal	-1(%rcx), %esi
.L67:
	xorl	%edx, %edx
	xorl	%edi, %edi
	jmp	.L19
.L13:
	movslq	%esi, %rdx
	movl	(%rbx,%rdx,4), %edi
	cmpl	%edi, (%r15,%rdx,4)
	je	.L67
	xorl	%edi, %edi
	testl	%esi, %esi
	jns	.L17
	jmp	.L67
.L71:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L7
.L35:
	xorl	%edx, %edx
	jmp	.L19
.L74:
	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"
.LC1:
	.string	"%d "
.LC2:
	.string	"No"
.LC3:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-60(%rbp), %rsi
	pushq	%r13
	pushq	%r12
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	leaq	.LC0(%rip), %r12
	pushq	%rbx
	movq	%r12, %rdi
	subq	$40, %rsp
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %rax
	movq	%rsp, %rsi
	movq	%rax, %rcx
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdi
	movq	%rax, %rdx
	andq	$-4096, %rdi
	andq	$-16, %rdx
	subq	%rdi, %rsi
	cmpq	%rsi, %rsp
	je	.L3
.L69:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L69
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L70
.L4:
	leaq	3(%rsp), %rbx
	movq	%rax, %rdx
	andq	$-4096, %rax
	movq	%rbx, %rsi
	andq	$-16, %rdx
	andq	$-4, %rbx
	shrq	$2, %rsi
	movq	%rsi, -72(%rbp)
	movq	%rsp, %rsi
	subq	%rax, %rsi
.L5:
	cmpq	%rsi, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L70:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L6:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L71
.L7:
	leaq	3(%rsp), %r15
	movq	%r15, %rax
	andq	$-4, %r15
	shrq	$2, %rax
	movq	%rax, -80(%rbp)
	testl	%ecx, %ecx
	jle	.L8
	movq	%rbx, %r14
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%r14, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	call	__isoc99_scanf@PLT
	movl	-60(%rbp), %eax
	addq	$4, %r14
	cmpl	%r13d, %eax
	jg	.L9
	leal	-1(%rax), %r14d
	movslq	%r14d, %rcx
	leaq	(%r15,%rcx,4), %r13
	testl	%r14d, %r14d
	js	.L15
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	subl	$1, %r14d
	call	__isoc99_scanf@PLT
	subq	$4, %r13
	cmpl	$-1, %r14d
	jne	.L14
	movl	-60(%rbp), %eax
.L15:
	movq	-80(%rbp), %rdx
	movq	-72(%rbp), %rdi
	movl	%eax, %ecx
	leal	-1(%rax), %esi
	movl	0(,%rdx,4), %edx
	cmpl	%edx, 0(,%rdi,4)
	je	.L13
	movl	$1, %edx
	testl	%eax, %eax
	jle	.L13
	.p2align 4,,10
	.p2align 3
.L11:
	movl	(%r15,%rdx,4), %r11d
	cmpl	%r11d, (%rbx,%rdx,4)
	movl	%edx, %edi
	setne	%r9b
	cmpl	%edx, %eax
	setg	%r8b
	addq	$1, %rdx
	testb	%r8b, %r9b
	jne	.L11
	movslq	%esi, %rdx
	movl	(%r15,%rdx,4), %r10d
	cmpl	%r10d, (%rbx,%rdx,4)
	je	.L20
	testl	%esi, %esi
	js	.L20
.L17:
	subl	$2, %eax
	cltq
	.p2align 4,,10
	.p2align 3
.L21:
	movl	(%r15,%rax,4), %edx
	cmpl	%edx, (%rbx,%rax,4)
	movl	%eax, %edx
	movl	%eax, %esi
	notl	%edx
	setne	%r8b
	subq	$1, %rax
	shrl	$31, %edx
	testb	%dl, %r8b
	jne	.L21
	testl	%edi, %edi
	je	.L35
.L20:
	cmpl	%esi, %edi
	jg	.L25
	leal	-1(%rdi), %r11d
	movl	%edi, %eax
	xorl	%edx, %edx
	xorl	%r10d, %r10d
	salq	$2, %r11
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L72:
	addq	$4, %rdx
	cmpl	%eax, %esi
	jl	.L25
.L24:
	cltq
	movl	(%r15,%rdx), %r9d
	movl	(%r15,%rax,4), %r8d
	cmpl	%r8d, %r9d
	je	.L23
	cmpl	(%rbx,%rdx), %r8d
	je	.L23
	movl	%r8d, (%r15,%rdx)
	addl	$1, %r10d
	movl	%r9d, (%r15,%rax,4)
.L23:
	leal	(%r10,%rdi), %eax
	cmpq	%rdx, %r11
	jne	.L72
	movl	%edi, %edx
	movl	%r10d, %edi
.L19:
	addl	%edi, %edx
	cmpl	%edx, %esi
	jl	.L25
	leal	1(%rsi), %eax
	cmpl	%ecx, %eax
	jge	.L26
	cltq
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L73:
	addq	$1, %rax
	cmpl	%eax, %ecx
	jle	.L26
.L28:
	movslq	%edx, %r8
	movl	(%r15,%rax,4), %r9d
	movl	(%r15,%r8,4), %edi
	cmpl	%r9d, %edi
	je	.L27
	cmpl	(%rbx,%rax,4), %edi
	je	.L27
	movl	%r9d, (%r15,%r8,4)
	addl	$1, %edx
	movl	%edi, (%r15,%rax,4)
.L27:
	cmpl	%esi, %edx
	jle	.L73
.L25:
	leaq	.LC3(%rip), %rdi
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	call	puts@PLT
	cmpl	$0, -60(%rbp)
	jle	.L30
	.p2align 4,,10
	.p2align 3
.L29:
	movl	(%r15,%rbx,4), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, -60(%rbp)
	jg	.L29
.L30:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L74
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L26:
	.cfi_restore_state
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L30
.L8:
	leal	-1(%rcx), %esi
.L67:
	xorl	%edx, %edx
	xorl	%edi, %edi
	jmp	.L19
.L13:
	movslq	%esi, %rdx
	movl	(%rbx,%rdx,4), %edi
	cmpl	%edi, (%r15,%rdx,4)
	je	.L67
	xorl	%edi, %edi
	testl	%esi, %esi
	jns	.L17
	jmp	.L67
.L71:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L7
.L35:
	xorl	%edx, %edx
	jmp	.L19
.L74:
	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 n;
	scanf("%d",&n);
	int a[n],b[n];
	int i,same=0;
	for (i=0;i<n;i++) scanf("%d",&a[i]);
	for (i=n-1;i>=0;i--) scanf("%d",&b[i]);
	int left=0, right=n-1;		
	i=0;
	//находим левую и правую границу одинаковых значений
	while ((a[i]!=b[i])&&(i<n)) i++;
	left=i;
	i=n-1;
	while ((a[i]!=b[i])&&(i>=0)) i--;
	right=i;
//	printf("left=%d right=%d\n", left,right);
	//если нет пересечений то форму пролетают и сразу печатаем массив
	int k,j;
	for (i=0,j=0;(i<left)&&(left+j<=right); i++) { 
		if((b[i]!=b[left+j])&&(a[i]!=b[left+j])){
			k=b[i]; 
			b[i]=b[left+j];
			b[left+j]=k;
			j++;
		}
	}
	i=j+left;
//	printf("i=%d\n",i);
//	for (i=0;i<n;i++) printf("%d ", b[i]);
	for (j=0;(i<=right)&&(right+j+1<n);j++) { 
		if ((b[i]!=b[right+j+1])&&(a[right+j+1]!=b[i])){
			k=b[i];
			b[i]=b[right+j+1];
			b[right+j+1]=k;
			i++;
		}
	}
	if (i<=right) printf("No\n");
	else {
		printf("Yes\n");
		for (i=0;i<n;i++) printf("%d ", b[i]);
	}
	return 0;
}
	

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

No
 Yes
2 3 3 2  Yes
3 2 2 1 1 1  Yes
1 3 1  Yes
2 3 5 2  Yes
3 2 2 0 1 1  Yes
3 2 1  Yes
2 3 5 1  Yes
3 3 1  Yes
5 3 2 1 
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 n;
	scanf("%d",&n);
	int a[n],b[n];
	int i,same=0;
	for (i=0;i<n;i++) scanf("%d",&a[i]);
	for (i=n-1;i>=0;i--) scanf("%d",&b[i]);
	int left=0, right=n-1;		
	i=0;
	//находим левую и правую границу одинаковых значений
	while ((a[i]!=b[i])&&(i<n)) i++;
	left=i;
	i=n-1;
	while ((a[i]!=b[i])&&(i>=0)) i--;
	right=i;
//	printf("left=%d right=%d\n", left,right);
	//если нет пересечений то форму пролетают и сразу печатаем массив
	int k,j;
	for (i=0,j=0;(i<left)&&(left+j<=right); i++) { 
		if((b[i]!=b[left+j])&&(a[i]!=b[left+j])){
			k=b[i]; 
			b[i]=b[left+j];
			b[left+j]=k;
			j++;
		}
	}
	i=j+left;
//	printf("i=%d\n",i);
//	for (i=0;i<n;i++) printf("%d ", b[i]);
	for (j=0;(i<=right)&&(right+j+1<n);j++) { 
		if ((b[i]!=b[right+j+1])&&(a[right+j+1]!=b[i])){
			k=b[i];
			b[i]=b[right+j+1];
			b[right+j+1]=k;
			i++;
		}
	}
	if (i<=right) printf("No\n");
	else {
		printf("Yes\n");
		for (i=0;i<n;i++) printf("%d ", b[i]);
	}
	return 0;
}
	
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"No"
.LC2:
	.string	"Yes"
.LC3:
	.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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$120, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-116(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-116(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -144(%rbp)
	movq	$0, -136(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -160(%rbp)
	movq	$0, -152(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	-116(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L5:
	cmpq	%rdx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L7
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -104(%rbp)
	movl	$0, -112(%rbp)
	jmp	.L8
.L9:
	movl	-112(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -112(%rbp)
.L8:
	movl	-116(%rbp), %eax
	cmpl	%eax, -112(%rbp)
	jl	.L9
	movl	-116(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -112(%rbp)
	jmp	.L10
.L11:
	movl	-112(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	subl	$1, -112(%rbp)
.L10:
	cmpl	$0, -112(%rbp)
	jns	.L11
	movl	$0, -100(%rbp)
	movl	-116(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -96(%rbp)
	movl	$0, -112(%rbp)
	jmp	.L12
.L14:
	addl	$1, -112(%rbp)
.L12:
	movq	-80(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, %ecx
	je	.L13
	movl	-116(%rbp), %eax
	cmpl	%eax, -112(%rbp)
	jl	.L14
.L13:
	movl	-112(%rbp), %eax
	movl	%eax, -100(%rbp)
	movl	-116(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -112(%rbp)
	jmp	.L15
.L17:
	subl	$1, -112(%rbp)
.L15:
	movq	-80(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, %ecx
	je	.L16
	cmpl	$0, -112(%rbp)
	jns	.L17
.L16:
	movl	-112(%rbp), %eax
	movl	%eax, -96(%rbp)
	movl	$0, -112(%rbp)
	movl	$0, -108(%rbp)
	jmp	.L18
.L21:
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movl	-100(%rbp), %edx
	movl	-108(%rbp), %eax
	addl	%eax, %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, %ecx
	je	.L19
	movq	-80(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movl	-100(%rbp), %edx
	movl	-108(%rbp), %eax
	addl	%eax, %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, %ecx
	je	.L19
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, -92(%rbp)
	movl	-100(%rbp), %edx
	movl	-108(%rbp), %eax
	addl	%eax, %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
	movl	-100(%rbp), %edx
	movl	-108(%rbp), %eax
	addl	%eax, %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	-92(%rbp), %ecx
	movl	%ecx, (%rax,%rdx,4)
	addl	$1, -108(%rbp)
.L19:
	addl	$1, -112(%rbp)
.L18:
	movl	-112(%rbp), %eax
	cmpl	-100(%rbp), %eax
	jge	.L20
	movl	-100(%rbp), %edx
	movl	-108(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -96(%rbp)
	jge	.L21
.L20:
	movl	-108(%rbp), %edx
	movl	-100(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -112(%rbp)
	movl	$0, -108(%rbp)
	jmp	.L22
.L25:
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movl	-96(%rbp), %edx
	movl	-108(%rbp), %eax
	addl	%edx, %eax
	leal	1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, %ecx
	je	.L23
	movl	-96(%rbp), %edx
	movl	-108(%rbp), %eax
	addl	%edx, %eax
	leal	1(%rax), %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, %ecx
	je	.L23
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, -92(%rbp)
	movl	-96(%rbp), %edx
	movl	-108(%rbp), %eax
	addl	%edx, %eax
	leal	1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
	movl	-96(%rbp), %edx
	movl	-108(%rbp), %eax
	addl	%edx, %eax
	leal	1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	-92(%rbp), %ecx
	movl	%ecx, (%rax,%rdx,4)
	addl	$1, -112(%rbp)
.L23:
	addl	$1, -108(%rbp)
.L22:
	movl	-112(%rbp), %eax
	cmpl	-96(%rbp), %eax
	jg	.L24
	movl	-96(%rbp), %edx
	movl	-108(%rbp), %eax
	addl	%edx, %eax
	leal	1(%rax), %edx
	movl	-116(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L25
.L24:
	movl	-112(%rbp), %eax
	cmpl	-96(%rbp), %eax
	jg	.L26
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L27
.L26:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, -112(%rbp)
	jmp	.L28
.L29:
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -112(%rbp)
.L28:
	movl	-116(%rbp), %eax
	cmpl	%eax, -112(%rbp)
	jl	.L29
.L27:
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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"
.LC1:
	.string	"No"
.LC2:
	.string	"Yes"
.LC3:
	.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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$120, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-116(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-116(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -144(%rbp)
	movq	$0, -136(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -160(%rbp)
	movq	$0, -152(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	-116(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L5:
	cmpq	%rdx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L7
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -104(%rbp)
	movl	$0, -112(%rbp)
	jmp	.L8
.L9:
	movl	-112(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -112(%rbp)
.L8:
	movl	-116(%rbp), %eax
	cmpl	%eax, -112(%rbp)
	jl	.L9
	movl	-116(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -112(%rbp)
	jmp	.L10
.L11:
	movl	-112(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	subl	$1, -112(%rbp)
.L10:
	cmpl	$0, -112(%rbp)
	jns	.L11
	movl	$0, -100(%rbp)
	movl	-116(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -96(%rbp)
	movl	$0, -112(%rbp)
	jmp	.L12
.L14:
	addl	$1, -112(%rbp)
.L12:
	movq	-80(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, %ecx
	je	.L13
	movl	-116(%rbp), %eax
	cmpl	%eax, -112(%rbp)
	jl	.L14
.L13:
	movl	-112(%rbp), %eax
	movl	%eax, -100(%rbp)
	movl	-116(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -112(%rbp)
	jmp	.L15
.L17:
	subl	$1, -112(%rbp)
.L15:
	movq	-80(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, %ecx
	je	.L16
	cmpl	$0, -112(%rbp)
	jns	.L17
.L16:
	movl	-112(%rbp), %eax
	movl	%eax, -96(%rbp)
	movl	$0, -112(%rbp)
	movl	$0, -108(%rbp)
	jmp	.L18
.L21:
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movl	-100(%rbp), %edx
	movl	-108(%rbp), %eax
	addl	%eax, %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, %ecx
	je	.L19
	movq	-80(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movl	-100(%rbp), %edx
	movl	-108(%rbp), %eax
	addl	%eax, %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, %ecx
	je	.L19
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, -92(%rbp)
	movl	-100(%rbp), %edx
	movl	-108(%rbp), %eax
	addl	%eax, %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
	movl	-100(%rbp), %edx
	movl	-108(%rbp), %eax
	addl	%eax, %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	-92(%rbp), %ecx
	movl	%ecx, (%rax,%rdx,4)
	addl	$1, -108(%rbp)
.L19:
	addl	$1, -112(%rbp)
.L18:
	movl	-112(%rbp), %eax
	cmpl	-100(%rbp), %eax
	jge	.L20
	movl	-100(%rbp), %edx
	movl	-108(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -96(%rbp)
	jge	.L21
.L20:
	movl	-108(%rbp), %edx
	movl	-100(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -112(%rbp)
	movl	$0, -108(%rbp)
	jmp	.L22
.L25:
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movl	-96(%rbp), %edx
	movl	-108(%rbp), %eax
	addl	%edx, %eax
	leal	1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, %ecx
	je	.L23
	movl	-96(%rbp), %edx
	movl	-108(%rbp), %eax
	addl	%edx, %eax
	leal	1(%rax), %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, %ecx
	je	.L23
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, -92(%rbp)
	movl	-96(%rbp), %edx
	movl	-108(%rbp), %eax
	addl	%edx, %eax
	leal	1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
	movl	-96(%rbp), %edx
	movl	-108(%rbp), %eax
	addl	%edx, %eax
	leal	1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	-92(%rbp), %ecx
	movl	%ecx, (%rax,%rdx,4)
	addl	$1, -112(%rbp)
.L23:
	addl	$1, -108(%rbp)
.L22:
	movl	-112(%rbp), %eax
	cmpl	-96(%rbp), %eax
	jg	.L24
	movl	-96(%rbp), %edx
	movl	-108(%rbp), %eax
	addl	%edx, %eax
	leal	1(%rax), %edx
	movl	-116(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L25
.L24:
	movl	-112(%rbp), %eax
	cmpl	-96(%rbp), %eax
	jg	.L26
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L27
.L26:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, -112(%rbp)
	jmp	.L28
.L29:
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -112(%rbp)
.L28:
	movl	-116(%rbp), %eax
	cmpl	%eax, -112(%rbp)
	jl	.L29
.L27:
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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:
