Given the following C code and 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;
}```

Assembly Code:

```assembly
	.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:
```

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.
Optimized Assembly Code:

user
```assembly
	.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
```assembly
	.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:
```
```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;
}```
Given the following C 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;
}```

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.
Optimized Assembly Code:

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 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;
}```

Assembly Code:

```assembly
	.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:
```

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.
Optimized Assembly Code:

train
```assembly
	.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:
```