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(void)
{
	int n,m,a[1000],b[1000],i,j,sum,cnt,box;
	scanf("%d %d",&n,&m);
	cnt=0;
	for(i=0;i<m;i++){
		scanf("%d %d",&a[i],&b[i]);
		if(a[i]>=n)	cnt++;
	}
	if(cnt>=m-1)	printf("0\n");
	else{
		sum=0;
		for(i=0;i<m-1;i++){
			for(j=i+1;j<m;j++){
				if(a[i]>a[j]){
					box=a[i];
					a[i]=a[j];
					a[j]=box;
				}
			}
		}
		for(i=1;i<m;i++){
			if(a[i]<n)	sum+=n-a[i];
		}
		printf("%d\n",sum);
	}
	return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"0"
.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
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$3952, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-8040(%rbp), %rdx
	leaq	-8044(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -8024(%rbp)
	movl	$0, -8036(%rbp)
	jmp	.L2
.L4:
	leaq	-4016(%rbp), %rdx
	movl	-8036(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-8016(%rbp), %rcx
	movl	-8036(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-8036(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %edx
	movl	-8044(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L3
	addl	$1, -8024(%rbp)
.L3:
	addl	$1, -8036(%rbp)
.L2:
	movl	-8040(%rbp), %eax
	cmpl	%eax, -8036(%rbp)
	jl	.L4
	movl	-8040(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -8024(%rbp)
	jl	.L5
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L6
.L5:
	movl	$0, -8028(%rbp)
	movl	$0, -8036(%rbp)
	jmp	.L7
.L11:
	movl	-8036(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -8032(%rbp)
	jmp	.L8
.L10:
	movl	-8036(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %edx
	movl	-8032(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L9
	movl	-8036(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %eax
	movl	%eax, -8020(%rbp)
	movl	-8032(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %edx
	movl	-8036(%rbp), %eax
	cltq
	movl	%edx, -8016(%rbp,%rax,4)
	movl	-8032(%rbp), %eax
	cltq
	movl	-8020(%rbp), %edx
	movl	%edx, -8016(%rbp,%rax,4)
.L9:
	addl	$1, -8032(%rbp)
.L8:
	movl	-8040(%rbp), %eax
	cmpl	%eax, -8032(%rbp)
	jl	.L10
	addl	$1, -8036(%rbp)
.L7:
	movl	-8040(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -8036(%rbp)
	jl	.L11
	movl	$1, -8036(%rbp)
	jmp	.L12
.L14:
	movl	-8036(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %edx
	movl	-8044(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L13
	movl	-8044(%rbp), %edx
	movl	-8036(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	%eax, -8028(%rbp)
.L13:
	addl	$1, -8036(%rbp)
.L12:
	movl	-8040(%rbp), %eax
	cmpl	%eax, -8036(%rbp)
	jl	.L14
	movl	-8028(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L6:
	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	"0"
.LC2:
	.string	"%d\n"
	.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
	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	$4096, %rsp
	.cfi_def_cfa_offset 4144
	orq	$0, (%rsp)
	subq	$3936, %rsp
	.cfi_def_cfa_offset 8080
	leaq	.LC0(%rip), %r12
	movq	%r12, %rdi
	movq	%fs:40, %rax
	movq	%rax, 8024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r9d
	testl	%r9d, %r9d
	jle	.L23
	xorl	%ebx, %ebx
	xorl	%ebp, %ebp
	leaq	16(%rsp), %r14
	leaq	4016(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L4:
	leaq	0(,%rbx,4), %rsi
	xorl	%eax, %eax
	movq	%r12, %rdi
	leaq	0(%r13,%rsi), %rdx
	addq	%r14, %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	cmpl	%eax, (%r14,%rbx,4)
	setge	%al
	movl	12(%rsp), %r9d
	addq	$1, %rbx
	movzbl	%al, %eax
	addl	%eax, %ebp
	cmpl	%ebx, %r9d
	jg	.L4
.L2:
	leal	-1(%r9), %r10d
	cmpl	%ebp, %r10d
	jle	.L33
	leal	-2(%r9), %r11d
	leaq	16(%rsp), %rbp
	movl	$1, %r8d
	movq	%r11, %r12
	movq	%rbp, %rsi
	leaq	20(%rsp), %rbx
	addq	$2, %r11
	.p2align 4,,10
	.p2align 3
.L8:
	cmpl	%r8d, %r9d
	jle	.L12
	movl	%r10d, %eax
	subl	%r8d, %eax
	leaq	-1(%r8,%rax), %rax
	leaq	(%rbx,%rax,4), %rdi
	movq	%rsi, %rax
	.p2align 4,,10
	.p2align 3
.L11:
	movl	(%rsi), %edx
	movl	4(%rax), %ecx
	cmpl	%ecx, %edx
	jle	.L10
	movl	%ecx, (%rsi)
	movl	%edx, 4(%rax)
.L10:
	addq	$4, %rax
	cmpq	%rdi, %rax
	jne	.L11
.L12:
	addq	$1, %r8
	addq	$4, %rsi
	cmpq	%r11, %r8
	jne	.L8
	cmpl	$1, %r9d
	jle	.L24
	movl	8(%rsp), %ecx
	cmpl	$2, %r12d
	jbe	.L25
	movd	%ecx, %xmm6
	leaq	20(%rsp), %rax
	pxor	%xmm1, %xmm1
	movl	%r10d, %edx
	shrl	$2, %edx
	pshufd	$0, %xmm6, %xmm2
	subl	$1, %edx
	salq	$4, %rdx
	leaq	20(%rbp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L15:
	movdqu	(%rax), %xmm4
	movdqa	%xmm2, %xmm0
	movdqa	%xmm2, %xmm3
	addq	$16, %rax
	pcmpgtd	%xmm4, %xmm0
	psubd	%xmm4, %xmm3
	pand	%xmm3, %xmm0
	paddd	%xmm0, %xmm1
	cmpq	%rax, %rdx
	jne	.L15
	movdqa	%xmm1, %xmm0
	movl	%r10d, %esi
	psrldq	$8, %xmm0
	andl	$-4, %esi
	paddd	%xmm0, %xmm1
	leal	1(%rsi), %eax
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %edx
	cmpl	%esi, %r10d
	je	.L13
.L14:
	movslq	%eax, %rsi
	movl	16(%rsp,%rsi,4), %esi
	cmpl	%esi, %ecx
	jle	.L18
	movl	%ecx, %edi
	subl	%esi, %edi
	addl	%edi, %edx
.L18:
	leal	1(%rax), %esi
	cmpl	%r9d, %esi
	jge	.L13
	movslq	%esi, %rsi
	movl	16(%rsp,%rsi,4), %esi
	cmpl	%esi, %ecx
	jle	.L19
	movl	%ecx, %edi
	subl	%esi, %edi
	addl	%edi, %edx
.L19:
	addl	$2, %eax
	cmpl	%r9d, %eax
	jge	.L13
	cltq
	movl	16(%rsp,%rax,4), %eax
	cmpl	%eax, %ecx
	jg	.L34
.L13:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L6:
	movq	8024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L35
	addq	$8032, %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
.L33:
	.cfi_restore_state
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L6
.L34:
	subl	%eax, %ecx
	addl	%ecx, %edx
	jmp	.L13
.L23:
	xorl	%ebp, %ebp
	jmp	.L2
.L24:
	xorl	%edx, %edx
	jmp	.L13
.L25:
	xorl	%edx, %edx
	movl	$1, %eax
	jmp	.L14
.L35:
	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	"0"
.LC2:
	.string	"%d\n"
	.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
	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	$4096, %rsp
	.cfi_def_cfa_offset 4144
	orq	$0, (%rsp)
	subq	$3936, %rsp
	.cfi_def_cfa_offset 8080
	leaq	.LC0(%rip), %r12
	movq	%r12, %rdi
	movq	%fs:40, %rax
	movq	%rax, 8024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r9d
	testl	%r9d, %r9d
	jle	.L23
	xorl	%ebx, %ebx
	xorl	%ebp, %ebp
	leaq	16(%rsp), %r14
	leaq	4016(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L4:
	leaq	0(,%rbx,4), %rsi
	xorl	%eax, %eax
	movq	%r12, %rdi
	leaq	0(%r13,%rsi), %rdx
	addq	%r14, %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	cmpl	%eax, (%r14,%rbx,4)
	setge	%al
	movl	12(%rsp), %r9d
	addq	$1, %rbx
	movzbl	%al, %eax
	addl	%eax, %ebp
	cmpl	%ebx, %r9d
	jg	.L4
.L2:
	leal	-1(%r9), %r10d
	cmpl	%ebp, %r10d
	jle	.L33
	leal	-2(%r9), %r11d
	leaq	16(%rsp), %rbp
	movl	$1, %r8d
	movq	%r11, %r12
	movq	%rbp, %rsi
	leaq	20(%rsp), %rbx
	addq	$2, %r11
	.p2align 4,,10
	.p2align 3
.L8:
	cmpl	%r8d, %r9d
	jle	.L12
	movl	%r10d, %eax
	subl	%r8d, %eax
	leaq	-1(%r8,%rax), %rax
	leaq	(%rbx,%rax,4), %rdi
	movq	%rsi, %rax
	.p2align 4,,10
	.p2align 3
.L11:
	movl	(%rsi), %edx
	movl	4(%rax), %ecx
	cmpl	%ecx, %edx
	jle	.L10
	movl	%ecx, (%rsi)
	movl	%edx, 4(%rax)
.L10:
	addq	$4, %rax
	cmpq	%rdi, %rax
	jne	.L11
.L12:
	addq	$1, %r8
	addq	$4, %rsi
	cmpq	%r11, %r8
	jne	.L8
	cmpl	$1, %r9d
	jle	.L24
	movl	8(%rsp), %ecx
	cmpl	$2, %r12d
	jbe	.L25
	movd	%ecx, %xmm6
	leaq	20(%rsp), %rax
	pxor	%xmm1, %xmm1
	movl	%r10d, %edx
	shrl	$2, %edx
	pshufd	$0, %xmm6, %xmm2
	subl	$1, %edx
	salq	$4, %rdx
	leaq	20(%rbp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L15:
	movdqu	(%rax), %xmm4
	movdqa	%xmm2, %xmm0
	movdqa	%xmm2, %xmm3
	addq	$16, %rax
	pcmpgtd	%xmm4, %xmm0
	psubd	%xmm4, %xmm3
	pand	%xmm3, %xmm0
	paddd	%xmm0, %xmm1
	cmpq	%rax, %rdx
	jne	.L15
	movdqa	%xmm1, %xmm0
	movl	%r10d, %esi
	psrldq	$8, %xmm0
	andl	$-4, %esi
	paddd	%xmm0, %xmm1
	leal	1(%rsi), %eax
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %edx
	cmpl	%esi, %r10d
	je	.L13
.L14:
	movslq	%eax, %rsi
	movl	16(%rsp,%rsi,4), %esi
	cmpl	%esi, %ecx
	jle	.L18
	movl	%ecx, %edi
	subl	%esi, %edi
	addl	%edi, %edx
.L18:
	leal	1(%rax), %esi
	cmpl	%r9d, %esi
	jge	.L13
	movslq	%esi, %rsi
	movl	16(%rsp,%rsi,4), %esi
	cmpl	%esi, %ecx
	jle	.L19
	movl	%ecx, %edi
	subl	%esi, %edi
	addl	%edi, %edx
.L19:
	addl	$2, %eax
	cmpl	%r9d, %eax
	jge	.L13
	cltq
	movl	16(%rsp,%rax,4), %eax
	cmpl	%eax, %ecx
	jg	.L34
.L13:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L6:
	movq	8024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L35
	addq	$8032, %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
.L33:
	.cfi_restore_state
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L6
.L34:
	subl	%eax, %ecx
	addl	%ecx, %edx
	jmp	.L13
.L23:
	xorl	%ebp, %ebp
	jmp	.L2
.L24:
	xorl	%edx, %edx
	jmp	.L13
.L25:
	xorl	%edx, %edx
	movl	$1, %eax
	jmp	.L14
.L35:
	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(void)
{
	int n,m,a[1000],b[1000],i,j,sum,cnt,box;
	scanf("%d %d",&n,&m);
	cnt=0;
	for(i=0;i<m;i++){
		scanf("%d %d",&a[i],&b[i]);
		if(a[i]>=n)	cnt++;
	}
	if(cnt>=m-1)	printf("0\n");
	else{
		sum=0;
		for(i=0;i<m-1;i++){
			for(j=i+1;j<m;j++){
				if(a[i]>a[j]){
					box=a[i];
					a[i]=a[j];
					a[j]=box;
				}
			}
		}
		for(i=1;i<m;i++){
			if(a[i]<n)	sum+=n-a[i];
		}
		printf("%d\n",sum);
	}
	return 0;
}


4 5
1 7
6 2
3 5
4 4
0 8

4

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(void)
{
	int n,m,a[1000],b[1000],i,j,sum,cnt,box;
	scanf("%d %d",&n,&m);
	cnt=0;
	for(i=0;i<m;i++){
		scanf("%d %d",&a[i],&b[i]);
		if(a[i]>=n)	cnt++;
	}
	if(cnt>=m-1)	printf("0\n");
	else{
		sum=0;
		for(i=0;i<m-1;i++){
			for(j=i+1;j<m;j++){
				if(a[i]>a[j]){
					box=a[i];
					a[i]=a[j];
					a[j]=box;
				}
			}
		}
		for(i=1;i<m;i++){
			if(a[i]<n)	sum+=n-a[i];
		}
		printf("%d\n",sum);
	}
	return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"0"
.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
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$3952, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-8040(%rbp), %rdx
	leaq	-8044(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -8024(%rbp)
	movl	$0, -8036(%rbp)
	jmp	.L2
.L4:
	leaq	-4016(%rbp), %rdx
	movl	-8036(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-8016(%rbp), %rcx
	movl	-8036(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-8036(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %edx
	movl	-8044(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L3
	addl	$1, -8024(%rbp)
.L3:
	addl	$1, -8036(%rbp)
.L2:
	movl	-8040(%rbp), %eax
	cmpl	%eax, -8036(%rbp)
	jl	.L4
	movl	-8040(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -8024(%rbp)
	jl	.L5
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L6
.L5:
	movl	$0, -8028(%rbp)
	movl	$0, -8036(%rbp)
	jmp	.L7
.L11:
	movl	-8036(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -8032(%rbp)
	jmp	.L8
.L10:
	movl	-8036(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %edx
	movl	-8032(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L9
	movl	-8036(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %eax
	movl	%eax, -8020(%rbp)
	movl	-8032(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %edx
	movl	-8036(%rbp), %eax
	cltq
	movl	%edx, -8016(%rbp,%rax,4)
	movl	-8032(%rbp), %eax
	cltq
	movl	-8020(%rbp), %edx
	movl	%edx, -8016(%rbp,%rax,4)
.L9:
	addl	$1, -8032(%rbp)
.L8:
	movl	-8040(%rbp), %eax
	cmpl	%eax, -8032(%rbp)
	jl	.L10
	addl	$1, -8036(%rbp)
.L7:
	movl	-8040(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -8036(%rbp)
	jl	.L11
	movl	$1, -8036(%rbp)
	jmp	.L12
.L14:
	movl	-8036(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %edx
	movl	-8044(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L13
	movl	-8044(%rbp), %edx
	movl	-8036(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	%eax, -8028(%rbp)
.L13:
	addl	$1, -8036(%rbp)
.L12:
	movl	-8040(%rbp), %eax
	cmpl	%eax, -8036(%rbp)
	jl	.L14
	movl	-8028(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L6:
	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	"0"
.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
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$3952, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-8040(%rbp), %rdx
	leaq	-8044(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -8024(%rbp)
	movl	$0, -8036(%rbp)
	jmp	.L2
.L4:
	leaq	-4016(%rbp), %rdx
	movl	-8036(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-8016(%rbp), %rcx
	movl	-8036(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-8036(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %edx
	movl	-8044(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L3
	addl	$1, -8024(%rbp)
.L3:
	addl	$1, -8036(%rbp)
.L2:
	movl	-8040(%rbp), %eax
	cmpl	%eax, -8036(%rbp)
	jl	.L4
	movl	-8040(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -8024(%rbp)
	jl	.L5
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L6
.L5:
	movl	$0, -8028(%rbp)
	movl	$0, -8036(%rbp)
	jmp	.L7
.L11:
	movl	-8036(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -8032(%rbp)
	jmp	.L8
.L10:
	movl	-8036(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %edx
	movl	-8032(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L9
	movl	-8036(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %eax
	movl	%eax, -8020(%rbp)
	movl	-8032(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %edx
	movl	-8036(%rbp), %eax
	cltq
	movl	%edx, -8016(%rbp,%rax,4)
	movl	-8032(%rbp), %eax
	cltq
	movl	-8020(%rbp), %edx
	movl	%edx, -8016(%rbp,%rax,4)
.L9:
	addl	$1, -8032(%rbp)
.L8:
	movl	-8040(%rbp), %eax
	cmpl	%eax, -8032(%rbp)
	jl	.L10
	addl	$1, -8036(%rbp)
.L7:
	movl	-8040(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -8036(%rbp)
	jl	.L11
	movl	$1, -8036(%rbp)
	jmp	.L12
.L14:
	movl	-8036(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %edx
	movl	-8044(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L13
	movl	-8044(%rbp), %edx
	movl	-8036(%rbp), %eax
	cltq
	movl	-8016(%rbp,%rax,4), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	%eax, -8028(%rbp)
.L13:
	addl	$1, -8036(%rbp)
.L12:
	movl	-8040(%rbp), %eax
	cmpl	%eax, -8036(%rbp)
	jl	.L14
	movl	-8028(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L6:
	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:
