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[1001],b[1001],i,j,x,z;
	scanf("%d %d",&n,&m);
	for(i=0;i<m;i++){
		scanf("%d %d",&a[i],&b[i]);
	}
	for(i=0;i<m;i++){
		for(j=i+1;j<m;j++){
			if(a[i]<=a[j]){
				x=a[i];
				a[i]=a[j];
				a[j]=x;
			}
		}
	}
	z=0;
	for(i=0;i<m-1;i++){
		// printf("%d\n",a[i]);
		if(a[i]<=n)	z+=n-a[i];
	}
	printf("%d\n",z);
	return 0;
}
			
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.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	$3968, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-8052(%rbp), %rdx
	leaq	-8056(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -8048(%rbp)
	jmp	.L2
.L3:
	leaq	-4016(%rbp), %rdx
	movl	-8048(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-8032(%rbp), %rcx
	movl	-8048(%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
	addl	$1, -8048(%rbp)
.L2:
	movl	-8052(%rbp), %eax
	cmpl	%eax, -8048(%rbp)
	jl	.L3
	movl	$0, -8048(%rbp)
	jmp	.L4
.L8:
	movl	-8048(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -8044(%rbp)
	jmp	.L5
.L7:
	movl	-8048(%rbp), %eax
	cltq
	movl	-8032(%rbp,%rax,4), %edx
	movl	-8044(%rbp), %eax
	cltq
	movl	-8032(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jg	.L6
	movl	-8048(%rbp), %eax
	cltq
	movl	-8032(%rbp,%rax,4), %eax
	movl	%eax, -8036(%rbp)
	movl	-8044(%rbp), %eax
	cltq
	movl	-8032(%rbp,%rax,4), %edx
	movl	-8048(%rbp), %eax
	cltq
	movl	%edx, -8032(%rbp,%rax,4)
	movl	-8044(%rbp), %eax
	cltq
	movl	-8036(%rbp), %edx
	movl	%edx, -8032(%rbp,%rax,4)
.L6:
	addl	$1, -8044(%rbp)
.L5:
	movl	-8052(%rbp), %eax
	cmpl	%eax, -8044(%rbp)
	jl	.L7
	addl	$1, -8048(%rbp)
.L4:
	movl	-8052(%rbp), %eax
	cmpl	%eax, -8048(%rbp)
	jl	.L8
	movl	$0, -8040(%rbp)
	movl	$0, -8048(%rbp)
	jmp	.L9
.L11:
	movl	-8048(%rbp), %eax
	cltq
	movl	-8032(%rbp,%rax,4), %edx
	movl	-8056(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L10
	movl	-8056(%rbp), %edx
	movl	-8048(%rbp), %eax
	cltq
	movl	-8032(%rbp,%rax,4), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	%eax, -8040(%rbp)
.L10:
	addl	$1, -8048(%rbp)
.L9:
	movl	-8052(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -8048(%rbp)
	jl	.L11
	movl	-8040(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	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"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4136
	orq	$0, (%rsp)
	subq	$3960, %rsp
	.cfi_def_cfa_offset 8096
	leaq	.LC0(%rip), %r12
	movq	%r12, %rdi
	movq	%fs:40, %rax
	movq	%rax, 8040(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r8d
	testl	%r8d, %r8d
	jle	.L2
	leaq	16(%rsp), %rbp
	xorl	%ebx, %ebx
	leaq	4032(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	0(%r13,%rbx,4), %rdx
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r8d
	addq	$1, %rbx
	addq	$4, %rbp
	cmpl	%ebx, %r8d
	jg	.L3
	testl	%r8d, %r8d
	jle	.L2
	leaq	20(%rsp), %rdi
	movl	$1, %r9d
	cmpl	$1, %r8d
	je	.L2
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%rdi, %rax
	movl	%r9d, %edx
	.p2align 4,,10
	.p2align 3
.L8:
	movl	-4(%rdi), %ecx
	movl	(%rax), %esi
	cmpl	%esi, %ecx
	jg	.L7
	movl	%esi, -4(%rdi)
	movl	%ecx, (%rax)
.L7:
	addl	$1, %edx
	addq	$4, %rax
	cmpl	%edx, %r8d
	jg	.L8
	addl	$1, %r9d
	addq	$4, %rdi
	cmpl	%r9d, %r8d
	jne	.L6
.L2:
	leal	-1(%r8), %ecx
	testl	%ecx, %ecx
	jle	.L20
	subl	$2, %r8d
	movl	8(%rsp), %esi
	cmpl	$2, %r8d
	jbe	.L21
	movd	%esi, %xmm4
	leaq	16(%rsp), %rax
	pxor	%xmm1, %xmm1
	movl	%ecx, %edx
	shrl	$2, %edx
	pshufd	$0, %xmm4, %xmm2
	subl	$1, %edx
	salq	$4, %rdx
	leaq	32(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L12:
	movdqa	(%rax), %xmm0
	movdqa	%xmm2, %xmm3
	psubd	(%rax), %xmm3
	addq	$16, %rax
	pcmpgtd	%xmm2, %xmm0
	pandn	%xmm3, %xmm0
	paddd	%xmm0, %xmm1
	cmpq	%rax, %rdx
	jne	.L12
	movdqa	%xmm1, %xmm0
	movl	%ecx, %eax
	psrldq	$8, %xmm0
	andl	$-4, %eax
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %edx
	testb	$3, %cl
	je	.L10
.L11:
	movslq	%eax, %rdi
	movl	16(%rsp,%rdi,4), %r8d
	movl	%esi, %edi
	subl	%r8d, %edi
	addl	%edx, %edi
	cmpl	%r8d, %esi
	cmovge	%edi, %edx
	leal	1(%rax), %edi
	cmpl	%ecx, %edi
	jge	.L10
	movslq	%edi, %rdi
	movl	16(%rsp,%rdi,4), %edi
	cmpl	%edi, %esi
	jge	.L30
.L16:
	addl	$2, %eax
	cmpl	%ecx, %eax
	jge	.L10
	cltq
	movl	16(%rsp,%rax,4), %eax
	cmpl	%eax, %esi
	jge	.L31
.L10:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L32
	addq	$8056, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L30:
	.cfi_restore_state
	movl	%esi, %r8d
	subl	%edi, %r8d
	addl	%r8d, %edx
	jmp	.L16
.L31:
	subl	%eax, %esi
	addl	%esi, %edx
	jmp	.L10
.L20:
	xorl	%edx, %edx
	jmp	.L10
.L21:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L11
.L32:
	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"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4136
	orq	$0, (%rsp)
	subq	$3960, %rsp
	.cfi_def_cfa_offset 8096
	leaq	.LC0(%rip), %r12
	movq	%r12, %rdi
	movq	%fs:40, %rax
	movq	%rax, 8040(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r8d
	testl	%r8d, %r8d
	jle	.L2
	leaq	16(%rsp), %rbp
	xorl	%ebx, %ebx
	leaq	4032(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	0(%r13,%rbx,4), %rdx
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r8d
	addq	$1, %rbx
	addq	$4, %rbp
	cmpl	%ebx, %r8d
	jg	.L3
	testl	%r8d, %r8d
	jle	.L2
	leaq	20(%rsp), %rdi
	movl	$1, %r9d
	cmpl	$1, %r8d
	je	.L2
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%rdi, %rax
	movl	%r9d, %edx
	.p2align 4,,10
	.p2align 3
.L8:
	movl	-4(%rdi), %ecx
	movl	(%rax), %esi
	cmpl	%esi, %ecx
	jg	.L7
	movl	%esi, -4(%rdi)
	movl	%ecx, (%rax)
.L7:
	addl	$1, %edx
	addq	$4, %rax
	cmpl	%edx, %r8d
	jg	.L8
	addl	$1, %r9d
	addq	$4, %rdi
	cmpl	%r9d, %r8d
	jne	.L6
.L2:
	leal	-1(%r8), %ecx
	testl	%ecx, %ecx
	jle	.L20
	subl	$2, %r8d
	movl	8(%rsp), %esi
	cmpl	$2, %r8d
	jbe	.L21
	movd	%esi, %xmm4
	leaq	16(%rsp), %rax
	pxor	%xmm1, %xmm1
	movl	%ecx, %edx
	shrl	$2, %edx
	pshufd	$0, %xmm4, %xmm2
	subl	$1, %edx
	salq	$4, %rdx
	leaq	32(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L12:
	movdqa	(%rax), %xmm0
	movdqa	%xmm2, %xmm3
	psubd	(%rax), %xmm3
	addq	$16, %rax
	pcmpgtd	%xmm2, %xmm0
	pandn	%xmm3, %xmm0
	paddd	%xmm0, %xmm1
	cmpq	%rax, %rdx
	jne	.L12
	movdqa	%xmm1, %xmm0
	movl	%ecx, %eax
	psrldq	$8, %xmm0
	andl	$-4, %eax
	paddd	%xmm0, %xmm1
	movdqa	%xmm1, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm1
	movd	%xmm1, %edx
	testb	$3, %cl
	je	.L10
.L11:
	movslq	%eax, %rdi
	movl	16(%rsp,%rdi,4), %r8d
	movl	%esi, %edi
	subl	%r8d, %edi
	addl	%edx, %edi
	cmpl	%r8d, %esi
	cmovge	%edi, %edx
	leal	1(%rax), %edi
	cmpl	%ecx, %edi
	jge	.L10
	movslq	%edi, %rdi
	movl	16(%rsp,%rdi,4), %edi
	cmpl	%edi, %esi
	jge	.L30
.L16:
	addl	$2, %eax
	cmpl	%ecx, %eax
	jge	.L10
	cltq
	movl	16(%rsp,%rax,4), %eax
	cmpl	%eax, %esi
	jge	.L31
.L10:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L32
	addq	$8056, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L30:
	.cfi_restore_state
	movl	%esi, %r8d
	subl	%edi, %r8d
	addl	%r8d, %edx
	jmp	.L16
.L31:
	subl	%eax, %esi
	addl	%esi, %edx
	jmp	.L10
.L20:
	xorl	%edx, %edx
	jmp	.L10
.L21:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L11
.L32:
	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[1001],b[1001],i,j,x,z;
	scanf("%d %d",&n,&m);
	for(i=0;i<m;i++){
		scanf("%d %d",&a[i],&b[i]);
	}
	for(i=0;i<m;i++){
		for(j=i+1;j<m;j++){
			if(a[i]<=a[j]){
				x=a[i];
				a[i]=a[j];
				a[j]=x;
			}
		}
	}
	z=0;
	for(i=0;i<m-1;i++){
		// printf("%d\n",a[i]);
		if(a[i]<=n)	z+=n-a[i];
	}
	printf("%d\n",z);
	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[1001],b[1001],i,j,x,z;
	scanf("%d %d",&n,&m);
	for(i=0;i<m;i++){
		scanf("%d %d",&a[i],&b[i]);
	}
	for(i=0;i<m;i++){
		for(j=i+1;j<m;j++){
			if(a[i]<=a[j]){
				x=a[i];
				a[i]=a[j];
				a[j]=x;
			}
		}
	}
	z=0;
	for(i=0;i<m-1;i++){
		// printf("%d\n",a[i]);
		if(a[i]<=n)	z+=n-a[i];
	}
	printf("%d\n",z);
	return 0;
}
			
```

Unoptimized Assembly Code:

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