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>
#include<math.h>
int main(){
	int n;
	scanf("%d",&n);
	long long a[100005];
	a[0]=0;
	for(int i=1;i<=n;i++){
		scanf("%d",&a[i]);
	}
	a[n+1]=0;
	int sum=0;
	for(int i=1;i<=n+1;i++){
		sum=sum+abs(a[i]-a[i-1]);
	}
	for(int i=1;i<=n;i++){
		printf("%d\n",sum-abs(a[i]-a[i-1])-abs(a[i+1]-a[i])+abs(a[i+1]-a[i-1]));
	}
	return 0;
} ```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%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
	leaq	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1360, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-800068(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -800048(%rbp)
	movl	$1, -800064(%rbp)
	jmp	.L2
.L3:
	leaq	-800048(%rbp), %rdx
	movl	-800064(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -800064(%rbp)
.L2:
	movl	-800068(%rbp), %eax
	cmpl	%eax, -800064(%rbp)
	jle	.L3
	movl	-800068(%rbp), %eax
	addl	$1, %eax
	cltq
	movq	$0, -800048(%rbp,%rax,8)
	movl	$0, -800060(%rbp)
	movl	$1, -800056(%rbp)
	jmp	.L4
.L5:
	movl	-800056(%rbp), %eax
	cltq
	movq	-800048(%rbp,%rax,8), %rdx
	movl	-800056(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	-800048(%rbp,%rax,8), %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	addl	%eax, -800060(%rbp)
	addl	$1, -800056(%rbp)
.L4:
	movl	-800068(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -800056(%rbp)
	jle	.L5
	movl	$1, -800052(%rbp)
	jmp	.L6
.L7:
	movl	-800052(%rbp), %eax
	cltq
	movq	-800048(%rbp,%rax,8), %rdx
	movl	-800052(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	-800048(%rbp,%rax,8), %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	movl	%eax, %edx
	negl	%edx
	cmovs	%eax, %edx
	movl	-800060(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-800052(%rbp), %eax
	addl	$1, %eax
	cltq
	movq	-800048(%rbp,%rax,8), %rdx
	movl	-800052(%rbp), %eax
	cltq
	movq	-800048(%rbp,%rax,8), %rsi
	movq	%rdx, %rax
	subq	%rsi, %rax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%ecx, %esi
	subl	%eax, %esi
	movl	-800052(%rbp), %eax
	addl	$1, %eax
	cltq
	movq	-800048(%rbp,%rax,8), %rdx
	movl	-800052(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	-800048(%rbp,%rax,8), %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	addl	%esi, %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -800052(%rbp)
.L6:
	movl	-800068(%rbp), %eax
	cmpl	%eax, -800052(%rbp)
	jle	.L7
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	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"
.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
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798760
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1352, %rsp
	.cfi_def_cfa_offset 800112
	leaq	.LC0(%rip), %r12
	movq	%r12, %rdi
	movq	%fs:40, %rax
	movq	%rax, 800056(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	movq	$0, 16(%rsp)
	testl	%edx, %edx
	jle	.L2
	leaq	24(%rsp), %rbp
	movl	$1, %ebx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	addq	$8, %rbp
	cmpl	%ebx, %edx
	jge	.L3
	leal	1(%rdx), %ecx
	movslq	%ecx, %rax
	movq	$0, 16(%rsp,%rax,8)
	testl	%ecx, %ecx
	jle	.L16
.L14:
	cmpl	$2, %edx
	jbe	.L17
	movl	%ecx, %esi
	leaq	16(%rsp), %r13
	pxor	%xmm2, %xmm2
	shrl	$2, %esi
	movq	%r13, %rax
	subl	$1, %esi
	salq	$5, %rsi
	leaq	48(%rsp,%rsi), %rsi
	.p2align 4,,10
	.p2align 3
.L6:
	movdqu	8(%rax), %xmm0
	movdqu	24(%rax), %xmm3
	addq	$32, %rax
	movdqa	-32(%rax), %xmm1
	shufps	$136, -16(%rax), %xmm1
	shufps	$136, %xmm3, %xmm0
	psubd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrad	$31, %xmm1
	pxor	%xmm1, %xmm0
	psubd	%xmm1, %xmm0
	paddd	%xmm0, %xmm2
	cmpq	%rsi, %rax
	jne	.L6
	movdqa	%xmm2, %xmm0
	movl	%ecx, %esi
	psrldq	$8, %xmm0
	andl	$-4, %esi
	paddd	%xmm0, %xmm2
	leal	1(%rsi), %eax
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %ebp
	cmpl	%ecx, %esi
	je	.L4
.L5:
	movslq	%eax, %rsi
	movq	%rsi, %rdi
	leaq	-8(%r13,%rsi,8), %r8
	cmpl	%edx, %eax
	jge	.L9
	cmpl	%eax, %ecx
	jl	.L9
	movq	(%r8), %rdi
.L10:
	movq	0(%r13,%rsi,8), %r8
	movq	%r8, %rcx
	subq	%rdi, %rcx
	movq	8(%r13,%rsi,8), %rdi
	movl	%ecx, %eax
	negl	%eax
	cmovs	%ecx, %eax
	movq	%rdi, %rcx
	subq	%r8, %rcx
	addl	%ebp, %eax
	movl	%ecx, %ebp
	negl	%ebp
	cmovs	%ecx, %ebp
	addl	%eax, %ebp
	leal	2(%rsi), %eax
	addq	$2, %rsi
	cmpl	%esi, %edx
	jg	.L10
	movslq	%eax, %rdi
.L9:
	movq	16(%rsp,%rdi,8), %rdi
	leal	-1(%rax), %ecx
	leal	1(%rax), %r8d
	movslq	%ecx, %rcx
	movq	%rdi, %rbx
	subq	16(%rsp,%rcx,8), %rbx
	movl	%ebx, %esi
	movq	%rbx, %rcx
	negl	%esi
	cmovns	%esi, %ecx
	addl	%ecx, %ebp
	cmpl	%eax, %edx
	jl	.L4
	movslq	%r8d, %rcx
	movq	16(%rsp,%rcx,8), %r9
	movq	%r9, %rcx
	subq	%rdi, %rcx
	movl	%ecx, %esi
	negl	%esi
	cmovns	%esi, %ecx
	addl	$2, %eax
	addl	%ecx, %ebp
	cmpl	%r8d, %edx
	jl	.L4
	cltq
	movq	16(%rsp,%rax,8), %rax
	subq	%r9, %rax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	addl	%eax, %ebp
	jmp	.L11
.L16:
	xorl	%ebp, %ebp
.L4:
	leaq	16(%rsp), %r13
	testl	%edx, %edx
	jle	.L13
.L11:
	movl	$1, %ebx
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L12:
	movq	0(%r13,%rbx,8), %rsi
	movq	8(%r13,%rbx,8), %rax
	movl	$1, %edi
	movq	%rsi, %rdx
	subq	-8(%r13,%rbx,8), %rdx
	movl	%edx, %ecx
	negl	%ecx
	cmovs	%edx, %ecx
	movl	%ebp, %edx
	subl	%ecx, %edx
	movq	%rax, %rcx
	subq	%rsi, %rcx
	movl	%ecx, %esi
	negl	%esi
	cmovns	%esi, %ecx
	subq	-8(%r13,%rbx,8), %rax
	movq	%r12, %rsi
	subl	%ecx, %edx
	movl	%eax, %ecx
	negl	%ecx
	cmovns	%ecx, %eax
	addq	$1, %rbx
	addl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	cmpl	%ebx, 12(%rsp)
	jge	.L12
.L13:
	movq	800056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L35
	addq	$800072, %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
.L2:
	.cfi_restore_state
	leal	1(%rdx), %ecx
	movslq	%ecx, %rax
	movq	$0, 16(%rsp,%rax,8)
	cmpl	$1, %ecx
	je	.L14
	jmp	.L13
.L17:
	movl	$1, %eax
	xorl	%ebp, %ebp
	leaq	16(%rsp), %r13
	jmp	.L5
.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"
.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
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798760
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1352, %rsp
	.cfi_def_cfa_offset 800112
	leaq	.LC0(%rip), %r12
	movq	%r12, %rdi
	movq	%fs:40, %rax
	movq	%rax, 800056(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	movq	$0, 16(%rsp)
	testl	%edx, %edx
	jle	.L2
	leaq	24(%rsp), %rbp
	movl	$1, %ebx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	addq	$8, %rbp
	cmpl	%ebx, %edx
	jge	.L3
	leal	1(%rdx), %ecx
	movslq	%ecx, %rax
	movq	$0, 16(%rsp,%rax,8)
	testl	%ecx, %ecx
	jle	.L16
.L14:
	cmpl	$2, %edx
	jbe	.L17
	movl	%ecx, %esi
	leaq	16(%rsp), %r13
	pxor	%xmm2, %xmm2
	shrl	$2, %esi
	movq	%r13, %rax
	subl	$1, %esi
	salq	$5, %rsi
	leaq	48(%rsp,%rsi), %rsi
	.p2align 4,,10
	.p2align 3
.L6:
	movdqu	8(%rax), %xmm0
	movdqu	24(%rax), %xmm3
	addq	$32, %rax
	movdqa	-32(%rax), %xmm1
	shufps	$136, -16(%rax), %xmm1
	shufps	$136, %xmm3, %xmm0
	psubd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrad	$31, %xmm1
	pxor	%xmm1, %xmm0
	psubd	%xmm1, %xmm0
	paddd	%xmm0, %xmm2
	cmpq	%rsi, %rax
	jne	.L6
	movdqa	%xmm2, %xmm0
	movl	%ecx, %esi
	psrldq	$8, %xmm0
	andl	$-4, %esi
	paddd	%xmm0, %xmm2
	leal	1(%rsi), %eax
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %ebp
	cmpl	%ecx, %esi
	je	.L4
.L5:
	movslq	%eax, %rsi
	movq	%rsi, %rdi
	leaq	-8(%r13,%rsi,8), %r8
	cmpl	%edx, %eax
	jge	.L9
	cmpl	%eax, %ecx
	jl	.L9
	movq	(%r8), %rdi
.L10:
	movq	0(%r13,%rsi,8), %r8
	movq	%r8, %rcx
	subq	%rdi, %rcx
	movq	8(%r13,%rsi,8), %rdi
	movl	%ecx, %eax
	negl	%eax
	cmovs	%ecx, %eax
	movq	%rdi, %rcx
	subq	%r8, %rcx
	addl	%ebp, %eax
	movl	%ecx, %ebp
	negl	%ebp
	cmovs	%ecx, %ebp
	addl	%eax, %ebp
	leal	2(%rsi), %eax
	addq	$2, %rsi
	cmpl	%esi, %edx
	jg	.L10
	movslq	%eax, %rdi
.L9:
	movq	16(%rsp,%rdi,8), %rdi
	leal	-1(%rax), %ecx
	leal	1(%rax), %r8d
	movslq	%ecx, %rcx
	movq	%rdi, %rbx
	subq	16(%rsp,%rcx,8), %rbx
	movl	%ebx, %esi
	movq	%rbx, %rcx
	negl	%esi
	cmovns	%esi, %ecx
	addl	%ecx, %ebp
	cmpl	%eax, %edx
	jl	.L4
	movslq	%r8d, %rcx
	movq	16(%rsp,%rcx,8), %r9
	movq	%r9, %rcx
	subq	%rdi, %rcx
	movl	%ecx, %esi
	negl	%esi
	cmovns	%esi, %ecx
	addl	$2, %eax
	addl	%ecx, %ebp
	cmpl	%r8d, %edx
	jl	.L4
	cltq
	movq	16(%rsp,%rax,8), %rax
	subq	%r9, %rax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	addl	%eax, %ebp
	jmp	.L11
.L16:
	xorl	%ebp, %ebp
.L4:
	leaq	16(%rsp), %r13
	testl	%edx, %edx
	jle	.L13
.L11:
	movl	$1, %ebx
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L12:
	movq	0(%r13,%rbx,8), %rsi
	movq	8(%r13,%rbx,8), %rax
	movl	$1, %edi
	movq	%rsi, %rdx
	subq	-8(%r13,%rbx,8), %rdx
	movl	%edx, %ecx
	negl	%ecx
	cmovs	%edx, %ecx
	movl	%ebp, %edx
	subl	%ecx, %edx
	movq	%rax, %rcx
	subq	%rsi, %rcx
	movl	%ecx, %esi
	negl	%esi
	cmovns	%esi, %ecx
	subq	-8(%r13,%rbx,8), %rax
	movq	%r12, %rsi
	subl	%ecx, %edx
	movl	%eax, %ecx
	negl	%ecx
	cmovns	%ecx, %eax
	addq	$1, %rbx
	addl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	cmpl	%ebx, 12(%rsp)
	jge	.L12
.L13:
	movq	800056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L35
	addq	$800072, %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
.L2:
	.cfi_restore_state
	leal	1(%rdx), %ecx
	movslq	%ecx, %rax
	movq	$0, 16(%rsp,%rax,8)
	cmpl	$1, %ecx
	je	.L14
	jmp	.L13
.L17:
	movl	$1, %eax
	xorl	%ebp, %ebp
	leaq	16(%rsp), %r13
	jmp	.L5
.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>
#include<math.h>
int main(){
	int n;
	scanf("%d",&n);
	long long a[100005];
	a[0]=0;
	for(int i=1;i<=n;i++){
		scanf("%d",&a[i]);
	}
	a[n+1]=0;
	int sum=0;
	for(int i=1;i<=n+1;i++){
		sum=sum+abs(a[i]-a[i-1]);
	}
	for(int i=1;i<=n;i++){
		printf("%d\n",sum-abs(a[i]-a[i-1])-abs(a[i+1]-a[i])+abs(a[i+1]-a[i-1]));
	}
	return 0;
} 
3
3 5 -1

12
8
10

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>
#include<math.h>
int main(){
	int n;
	scanf("%d",&n);
	long long a[100005];
	a[0]=0;
	for(int i=1;i<=n;i++){
		scanf("%d",&a[i]);
	}
	a[n+1]=0;
	int sum=0;
	for(int i=1;i<=n+1;i++){
		sum=sum+abs(a[i]-a[i-1]);
	}
	for(int i=1;i<=n;i++){
		printf("%d\n",sum-abs(a[i]-a[i-1])-abs(a[i+1]-a[i])+abs(a[i+1]-a[i-1]));
	}
	return 0;
} ```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%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
	leaq	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1360, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-800068(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -800048(%rbp)
	movl	$1, -800064(%rbp)
	jmp	.L2
.L3:
	leaq	-800048(%rbp), %rdx
	movl	-800064(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -800064(%rbp)
.L2:
	movl	-800068(%rbp), %eax
	cmpl	%eax, -800064(%rbp)
	jle	.L3
	movl	-800068(%rbp), %eax
	addl	$1, %eax
	cltq
	movq	$0, -800048(%rbp,%rax,8)
	movl	$0, -800060(%rbp)
	movl	$1, -800056(%rbp)
	jmp	.L4
.L5:
	movl	-800056(%rbp), %eax
	cltq
	movq	-800048(%rbp,%rax,8), %rdx
	movl	-800056(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	-800048(%rbp,%rax,8), %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	addl	%eax, -800060(%rbp)
	addl	$1, -800056(%rbp)
.L4:
	movl	-800068(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -800056(%rbp)
	jle	.L5
	movl	$1, -800052(%rbp)
	jmp	.L6
.L7:
	movl	-800052(%rbp), %eax
	cltq
	movq	-800048(%rbp,%rax,8), %rdx
	movl	-800052(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	-800048(%rbp,%rax,8), %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	movl	%eax, %edx
	negl	%edx
	cmovs	%eax, %edx
	movl	-800060(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-800052(%rbp), %eax
	addl	$1, %eax
	cltq
	movq	-800048(%rbp,%rax,8), %rdx
	movl	-800052(%rbp), %eax
	cltq
	movq	-800048(%rbp,%rax,8), %rsi
	movq	%rdx, %rax
	subq	%rsi, %rax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%ecx, %esi
	subl	%eax, %esi
	movl	-800052(%rbp), %eax
	addl	$1, %eax
	cltq
	movq	-800048(%rbp,%rax,8), %rdx
	movl	-800052(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	-800048(%rbp,%rax,8), %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	addl	%esi, %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -800052(%rbp)
.L6:
	movl	-800068(%rbp), %eax
	cmpl	%eax, -800052(%rbp)
	jle	.L7
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	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"
.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
	leaq	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1360, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-800068(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -800048(%rbp)
	movl	$1, -800064(%rbp)
	jmp	.L2
.L3:
	leaq	-800048(%rbp), %rdx
	movl	-800064(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -800064(%rbp)
.L2:
	movl	-800068(%rbp), %eax
	cmpl	%eax, -800064(%rbp)
	jle	.L3
	movl	-800068(%rbp), %eax
	addl	$1, %eax
	cltq
	movq	$0, -800048(%rbp,%rax,8)
	movl	$0, -800060(%rbp)
	movl	$1, -800056(%rbp)
	jmp	.L4
.L5:
	movl	-800056(%rbp), %eax
	cltq
	movq	-800048(%rbp,%rax,8), %rdx
	movl	-800056(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	-800048(%rbp,%rax,8), %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	addl	%eax, -800060(%rbp)
	addl	$1, -800056(%rbp)
.L4:
	movl	-800068(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -800056(%rbp)
	jle	.L5
	movl	$1, -800052(%rbp)
	jmp	.L6
.L7:
	movl	-800052(%rbp), %eax
	cltq
	movq	-800048(%rbp,%rax,8), %rdx
	movl	-800052(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	-800048(%rbp,%rax,8), %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	movl	%eax, %edx
	negl	%edx
	cmovs	%eax, %edx
	movl	-800060(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-800052(%rbp), %eax
	addl	$1, %eax
	cltq
	movq	-800048(%rbp,%rax,8), %rdx
	movl	-800052(%rbp), %eax
	cltq
	movq	-800048(%rbp,%rax,8), %rsi
	movq	%rdx, %rax
	subq	%rsi, %rax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%ecx, %esi
	subl	%eax, %esi
	movl	-800052(%rbp), %eax
	addl	$1, %eax
	cltq
	movq	-800048(%rbp,%rax,8), %rdx
	movl	-800052(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	-800048(%rbp,%rax,8), %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	addl	%esi, %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -800052(%rbp)
.L6:
	movl	-800068(%rbp), %eax
	cmpl	%eax, -800052(%rbp)
	jle	.L7
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	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:
