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>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main(void)
{
    int n, a[100100];
    scanf("%d", &n);
    rep(i, n)
        scanf("%d", &a[i]);

    long long int x = 0;
    rep(i, n)
    {
        if (i % 2)
            x -= a[i];
        else
            x += a[i];
    }

    int ans[n];
    ans[0] = x / 2;
    for (int i = 1; i < n; i++)
        ans[i] = a[i - 1] - ans[i - 1];
    rep(i, n)
        printf("%d ", ans[i] * 2);
    putchar('\n');
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.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
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3160, %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	-400508(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -400504(%rbp)
	jmp	.L2
.L3:
	leaq	-400464(%rbp), %rdx
	movl	-400504(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -400504(%rbp)
.L2:
	movl	-400508(%rbp), %eax
	cmpl	%eax, -400504(%rbp)
	jl	.L3
	movq	$0, -400488(%rbp)
	movl	$0, -400500(%rbp)
	jmp	.L4
.L7:
	movl	-400500(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L5
	movl	-400500(%rbp), %eax
	cltq
	movl	-400464(%rbp,%rax,4), %eax
	cltq
	subq	%rax, -400488(%rbp)
	jmp	.L6
.L5:
	movl	-400500(%rbp), %eax
	cltq
	movl	-400464(%rbp,%rax,4), %eax
	cltq
	addq	%rax, -400488(%rbp)
.L6:
	addl	$1, -400500(%rbp)
.L4:
	movl	-400508(%rbp), %eax
	cmpl	%eax, -400500(%rbp)
	jl	.L7
	movl	-400508(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -400480(%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
.L8:
	cmpq	%rdx, %rsp
	je	.L9
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L8
.L9:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L10
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L10:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -400472(%rbp)
	movq	-400488(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movl	%eax, %edx
	movq	-400472(%rbp), %rax
	movl	%edx, (%rax)
	movl	$1, -400496(%rbp)
	jmp	.L11
.L12:
	movl	-400496(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-400464(%rbp,%rax,4), %ecx
	movl	-400496(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-400472(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	subl	%eax, %ecx
	movq	-400472(%rbp), %rax
	movl	-400496(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
	addl	$1, -400496(%rbp)
.L11:
	movl	-400508(%rbp), %eax
	cmpl	%eax, -400496(%rbp)
	jl	.L12
	movl	$0, -400492(%rbp)
	jmp	.L13
.L14:
	movq	-400472(%rbp), %rax
	movl	-400492(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	addl	%eax, %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -400492(%rbp)
.L13:
	movl	-400508(%rbp), %eax
	cmpl	%eax, -400492(%rbp)
	jl	.L14
	movl	$10, %edi
	call	putchar@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	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 "
	.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	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3120, %rsp
	.cfi_offset 14, -24
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	leaq	.LC0(%rip), %r14
	movq	%r14, %rdi
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	leaq	-400452(%rbp), %rsi
	call	__isoc99_scanf@PLT
	movl	-400452(%rbp), %eax
	testl	%eax, %eax
	jle	.L11
	leaq	-400448(%rbp), %r13
	xorl	%ebx, %ebx
	movq	%r13, %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	-400452(%rbp), %esi
	addq	$4, %r12
	cmpl	%ebx, %esi
	jg	.L3
	testl	%esi, %esi
	jle	.L11
	movslq	%esi, %r8
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L6:
	movslq	0(%r13,%rax,4), %rdx
	movq	%rcx, %rdi
	subq	%rdx, %rdi
	addq	%rcx, %rdx
	testb	$1, %al
	movq	%rdi, %rcx
	cmove	%rdx, %rcx
	addq	$1, %rax
	cmpq	%rax, %r8
	jne	.L6
	leaq	15(,%r8,4), %rax
	movq	%rsp, %rdi
	movq	%rax, %rdx
	andq	$-4096, %rax
	andq	$-16, %rdx
	subq	%rax, %rdi
.L12:
	cmpq	%rdi, %rsp
	je	.L13
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L12
.L13:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	je	.L14
	orq	$0, -8(%rsp,%rdx)
.L14:
	movq	%rcx, %rax
	leaq	3(%rsp), %r12
	shrq	$63, %rax
	movq	%r12, %rdi
	andq	$-4, %r12
	addq	%rcx, %rax
	shrq	$2, %rdi
	sarq	%rax
	movl	%eax, 0(,%rdi,4)
	movl	%eax, %edx
	cmpl	$1, %esi
	je	.L9
	leal	-1(%rsi), %ecx
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L8:
	movl	0(%r13,%rax,4), %esi
	subl	%edx, %esi
	movl	%esi, 4(%r12,%rax,4)
	addq	$1, %rax
	movl	%esi, %edx
	cmpq	%rcx, %rax
	jne	.L8
.L9:
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L10:
	movl	(%r12,%rbx,4), %eax
	movq	%r13, %rsi
	movl	$1, %edi
	addq	$1, %rbx
	leal	(%rax,%rax), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	cmpl	%ebx, -400452(%rbp)
	jg	.L10
.L11:
	movq	stdout(%rip), %rsi
	movl	$10, %edi
	call	putc@PLT
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L28
	leaq	-32(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L28:
	.cfi_restore_state
	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 "
	.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	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3120, %rsp
	.cfi_offset 14, -24
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	leaq	.LC0(%rip), %r14
	movq	%r14, %rdi
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	leaq	-400452(%rbp), %rsi
	call	__isoc99_scanf@PLT
	movl	-400452(%rbp), %eax
	testl	%eax, %eax
	jle	.L11
	leaq	-400448(%rbp), %r13
	xorl	%ebx, %ebx
	movq	%r13, %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	-400452(%rbp), %esi
	addq	$4, %r12
	cmpl	%ebx, %esi
	jg	.L3
	testl	%esi, %esi
	jle	.L11
	movslq	%esi, %r8
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L6:
	movslq	0(%r13,%rax,4), %rdx
	movq	%rcx, %rdi
	subq	%rdx, %rdi
	addq	%rcx, %rdx
	testb	$1, %al
	movq	%rdi, %rcx
	cmove	%rdx, %rcx
	addq	$1, %rax
	cmpq	%rax, %r8
	jne	.L6
	leaq	15(,%r8,4), %rax
	movq	%rsp, %rdi
	movq	%rax, %rdx
	andq	$-4096, %rax
	andq	$-16, %rdx
	subq	%rax, %rdi
.L12:
	cmpq	%rdi, %rsp
	je	.L13
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L12
.L13:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	je	.L14
	orq	$0, -8(%rsp,%rdx)
.L14:
	movq	%rcx, %rax
	leaq	3(%rsp), %r12
	shrq	$63, %rax
	movq	%r12, %rdi
	andq	$-4, %r12
	addq	%rcx, %rax
	shrq	$2, %rdi
	sarq	%rax
	movl	%eax, 0(,%rdi,4)
	movl	%eax, %edx
	cmpl	$1, %esi
	je	.L9
	leal	-1(%rsi), %ecx
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L8:
	movl	0(%r13,%rax,4), %esi
	subl	%edx, %esi
	movl	%esi, 4(%r12,%rax,4)
	addq	$1, %rax
	movl	%esi, %edx
	cmpq	%rcx, %rax
	jne	.L8
.L9:
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L10:
	movl	(%r12,%rbx,4), %eax
	movq	%r13, %rsi
	movl	$1, %edi
	addq	$1, %rbx
	leal	(%rax,%rax), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	cmpl	%ebx, -400452(%rbp)
	jg	.L10
.L11:
	movq	stdout(%rip), %rsi
	movl	$10, %edi
	call	putc@PLT
	movq	-40(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L28
	leaq	-32(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L28:
	.cfi_restore_state
	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>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main(void)
{
    int n, a[100100];
    scanf("%d", &n);
    rep(i, n)
        scanf("%d", &a[i]);

    long long int x = 0;
    rep(i, n)
    {
        if (i % 2)
            x -= a[i];
        else
            x += a[i];
    }

    int ans[n];
    ans[0] = x / 2;
    for (int i = 1; i < n; i++)
        ans[i] = a[i - 1] - ans[i - 1];
    rep(i, n)
        printf("%d ", ans[i] * 2);
    putchar('\n');
    return 0;
}
3
1000000000 1000100000 0
 3
2 0 4
 3
1000000000 1001100000 0
 3
1000000000 1011100000 0
 3
1000000000 1011101000 0
 3
1010000000 1011101000 0
 3
1010100000 1011101000 0
 3
1000000000 1010000000 0
 3
1000000000 1100100000 0
 3
1000001000 1011101000 0

-100000 2000100000 100000 
 6 -2 2 
 -1100000 2001100000 1100000 
 -11100000 2011100000 11100000 
 -11101000 2011101000 11101000 
 -1101000 2021101000 1101000 
 -1001000 2021201000 1001000 
 -10000000 2010000000 10000000 
 -100100000 2100100000 100100000 
 -11100000 2011102000 11100000 

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>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main(void)
{
    int n, a[100100];
    scanf("%d", &n);
    rep(i, n)
        scanf("%d", &a[i]);

    long long int x = 0;
    rep(i, n)
    {
        if (i % 2)
            x -= a[i];
        else
            x += a[i];
    }

    int ans[n];
    ans[0] = x / 2;
    for (int i = 1; i < n; i++)
        ans[i] = a[i - 1] - ans[i - 1];
    rep(i, n)
        printf("%d ", ans[i] * 2);
    putchar('\n');
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.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
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3160, %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	-400508(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -400504(%rbp)
	jmp	.L2
.L3:
	leaq	-400464(%rbp), %rdx
	movl	-400504(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -400504(%rbp)
.L2:
	movl	-400508(%rbp), %eax
	cmpl	%eax, -400504(%rbp)
	jl	.L3
	movq	$0, -400488(%rbp)
	movl	$0, -400500(%rbp)
	jmp	.L4
.L7:
	movl	-400500(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L5
	movl	-400500(%rbp), %eax
	cltq
	movl	-400464(%rbp,%rax,4), %eax
	cltq
	subq	%rax, -400488(%rbp)
	jmp	.L6
.L5:
	movl	-400500(%rbp), %eax
	cltq
	movl	-400464(%rbp,%rax,4), %eax
	cltq
	addq	%rax, -400488(%rbp)
.L6:
	addl	$1, -400500(%rbp)
.L4:
	movl	-400508(%rbp), %eax
	cmpl	%eax, -400500(%rbp)
	jl	.L7
	movl	-400508(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -400480(%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
.L8:
	cmpq	%rdx, %rsp
	je	.L9
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L8
.L9:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L10
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L10:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -400472(%rbp)
	movq	-400488(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movl	%eax, %edx
	movq	-400472(%rbp), %rax
	movl	%edx, (%rax)
	movl	$1, -400496(%rbp)
	jmp	.L11
.L12:
	movl	-400496(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-400464(%rbp,%rax,4), %ecx
	movl	-400496(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-400472(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	subl	%eax, %ecx
	movq	-400472(%rbp), %rax
	movl	-400496(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
	addl	$1, -400496(%rbp)
.L11:
	movl	-400508(%rbp), %eax
	cmpl	%eax, -400496(%rbp)
	jl	.L12
	movl	$0, -400492(%rbp)
	jmp	.L13
.L14:
	movq	-400472(%rbp), %rax
	movl	-400492(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	addl	%eax, %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -400492(%rbp)
.L13:
	movl	-400508(%rbp), %eax
	cmpl	%eax, -400492(%rbp)
	jl	.L14
	movl	$10, %edi
	call	putchar@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	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	"%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
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3160, %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	-400508(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -400504(%rbp)
	jmp	.L2
.L3:
	leaq	-400464(%rbp), %rdx
	movl	-400504(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -400504(%rbp)
.L2:
	movl	-400508(%rbp), %eax
	cmpl	%eax, -400504(%rbp)
	jl	.L3
	movq	$0, -400488(%rbp)
	movl	$0, -400500(%rbp)
	jmp	.L4
.L7:
	movl	-400500(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L5
	movl	-400500(%rbp), %eax
	cltq
	movl	-400464(%rbp,%rax,4), %eax
	cltq
	subq	%rax, -400488(%rbp)
	jmp	.L6
.L5:
	movl	-400500(%rbp), %eax
	cltq
	movl	-400464(%rbp,%rax,4), %eax
	cltq
	addq	%rax, -400488(%rbp)
.L6:
	addl	$1, -400500(%rbp)
.L4:
	movl	-400508(%rbp), %eax
	cmpl	%eax, -400500(%rbp)
	jl	.L7
	movl	-400508(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -400480(%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
.L8:
	cmpq	%rdx, %rsp
	je	.L9
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L8
.L9:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L10
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L10:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -400472(%rbp)
	movq	-400488(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movl	%eax, %edx
	movq	-400472(%rbp), %rax
	movl	%edx, (%rax)
	movl	$1, -400496(%rbp)
	jmp	.L11
.L12:
	movl	-400496(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-400464(%rbp,%rax,4), %ecx
	movl	-400496(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-400472(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	subl	%eax, %ecx
	movq	-400472(%rbp), %rax
	movl	-400496(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
	addl	$1, -400496(%rbp)
.L11:
	movl	-400508(%rbp), %eax
	cmpl	%eax, -400496(%rbp)
	jl	.L12
	movl	$0, -400492(%rbp)
	jmp	.L13
.L14:
	movq	-400472(%rbp), %rax
	movl	-400492(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	addl	%eax, %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -400492(%rbp)
.L13:
	movl	-400508(%rbp), %eax
	cmpl	%eax, -400492(%rbp)
	jl	.L14
	movl	$10, %edi
	call	putchar@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	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:
