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 min(x,y) (((x)<(y))?(x):(y))
int main (){
    long long int n,m,br=0,i;
    scanf ("%lld", &n);
    long long int a[n+1];
    long long int b [n];
    for (i=0;i<n+1;i++) 
        scanf("%lld", &a[i]);
    for (i=0;i<n;i++) 
        scanf ("%lld", &b[i]);
    for (i=0;i<n;i++){
        long long int x=min(a[i],b[i]);
        a[i]-=x;
        b[i]-=x;
        br+=x;
        
        x=min(a[i+1],b[i]);
        b[i]-=x;
        a[i+1]-=x;
        br+=x;
        


    }
    printf ("%lld", br);

    
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lld"
	.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
	subq	$120, %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
	movq	$0, -112(%rbp)
	leaq	-120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-120(%rbp), %rax
	addq	$1, %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -96(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -144(%rbp)
	movq	$0, -136(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -160(%rbp)
	movq	$0, -152(%rbp)
	leaq	0(,%rax,8), %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
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -88(%rbp)
	movq	-120(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -80(%rbp)
	movq	%rax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movq	%rax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L5:
	cmpq	%rdx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L7
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -72(%rbp)
	movq	$0, -104(%rbp)
	jmp	.L8
.L9:
	movq	-104(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-88(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -104(%rbp)
.L8:
	movq	-120(%rbp), %rax
	cmpq	%rax, -104(%rbp)
	jle	.L9
	movq	$0, -104(%rbp)
	jmp	.L10
.L11:
	movq	-104(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-72(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -104(%rbp)
.L10:
	movq	-120(%rbp), %rax
	cmpq	%rax, -104(%rbp)
	jl	.L11
	movq	$0, -104(%rbp)
	jmp	.L12
.L13:
	movq	-72(%rbp), %rax
	movq	-104(%rbp), %rdx
	movq	(%rax,%rdx,8), %rdx
	movq	-88(%rbp), %rax
	movq	-104(%rbp), %rcx
	movq	(%rax,%rcx,8), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, -64(%rbp)
	movq	-88(%rbp), %rax
	movq	-104(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	subq	-64(%rbp), %rax
	movq	%rax, %rcx
	movq	-88(%rbp), %rax
	movq	-104(%rbp), %rdx
	movq	%rcx, (%rax,%rdx,8)
	movq	-72(%rbp), %rax
	movq	-104(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	subq	-64(%rbp), %rax
	movq	%rax, %rcx
	movq	-72(%rbp), %rax
	movq	-104(%rbp), %rdx
	movq	%rcx, (%rax,%rdx,8)
	movq	-64(%rbp), %rax
	addq	%rax, -112(%rbp)
	movq	-72(%rbp), %rax
	movq	-104(%rbp), %rdx
	movq	(%rax,%rdx,8), %rdx
	movq	-104(%rbp), %rax
	leaq	1(%rax), %rcx
	movq	-88(%rbp), %rax
	movq	(%rax,%rcx,8), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, -64(%rbp)
	movq	-72(%rbp), %rax
	movq	-104(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	subq	-64(%rbp), %rax
	movq	%rax, %rcx
	movq	-72(%rbp), %rax
	movq	-104(%rbp), %rdx
	movq	%rcx, (%rax,%rdx,8)
	movq	-104(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	-88(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	movq	-104(%rbp), %rdx
	leaq	1(%rdx), %rcx
	subq	-64(%rbp), %rax
	movq	%rax, %rdx
	movq	-88(%rbp), %rax
	movq	%rdx, (%rax,%rcx,8)
	movq	-64(%rbp), %rax
	addq	%rax, -112(%rbp)
	addq	$1, -104(%rbp)
.L12:
	movq	-120(%rbp), %rax
	cmpq	%rax, -104(%rbp)
	jl	.L13
	movq	-112(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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	"%lld"
	.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	%r15
	pushq	%r14
	leaq	-64(%rbp), %rsi
	pushq	%r13
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	leaq	.LC0(%rip), %r13
	pushq	%r12
	movq	%r13, %rdi
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rsi
	movq	%rsp, %rdi
	leaq	8(,%rsi,8), %rdx
	leaq	15(%rdx), %rax
	movq	%rax, %rcx
	andq	$-4096, %rax
	subq	%rax, %rdi
	andq	$-16, %rcx
	cmpq	%rdi, %rsp
	je	.L3
.L26:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L26
.L3:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L27
.L4:
	leaq	7(%rsp), %r12
	movq	%rsp, %rcx
	movq	%r12, %rax
	andq	$-8, %r12
	shrq	$3, %rax
	movq	%rax, -72(%rbp)
	movq	%rdx, %rax
	andq	$-4096, %rdx
	andq	$-16, %rax
	subq	%rdx, %rcx
.L5:
	cmpq	%rcx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L27:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L4
.L6:
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L28
.L7:
	movq	%rsp, %rbx
	testq	%rsi, %rsi
	js	.L8
	movq	%r12, %r14
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$1, %r15
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rax
	addq	$8, %r14
	cmpq	%r15, %rax
	jge	.L9
	testq	%rax, %rax
	jle	.L8
	movq	%rbx, %r14
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L12:
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$1, %r15
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %r8
	addq	$8, %r14
	cmpq	%r15, %r8
	jg	.L12
	testq	%r8, %r8
	jle	.L8
	movq	-72(%rbp), %rax
	xorl	%esi, %esi
	xorl	%edx, %edx
	movq	0(,%rax,8), %rax
	.p2align 4,,10
	.p2align 3
.L13:
	movq	(%rbx,%rsi,8), %rcx
	movq	%rax, %rdi
	cmpq	%rax, %rcx
	cmovle	%rcx, %rdi
	subq	%rdi, %rax
	subq	%rdi, %rcx
	addq	%rdi, %rdx
	movq	%rax, (%r12,%rsi,8)
	addq	$1, %rsi
	movq	(%r12,%rsi,8), %rax
	cmpq	%rax, %rcx
	movq	%rax, %rdi
	cmovle	%rcx, %rdi
	subq	%rdi, %rcx
	subq	%rdi, %rax
	addq	%rdi, %rdx
	movq	%rcx, -8(%rbx,%rsi,8)
	movq	%rax, (%r12,%rsi,8)
	cmpq	%rsi, %r8
	jne	.L13
.L11:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L29
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L8:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L11
.L28:
	orq	$0, -8(%rsp,%rax)
	jmp	.L7
.L29:
	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	"%lld"
	.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	%r15
	pushq	%r14
	leaq	-64(%rbp), %rsi
	pushq	%r13
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	leaq	.LC0(%rip), %r13
	pushq	%r12
	movq	%r13, %rdi
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rsi
	movq	%rsp, %rdi
	leaq	8(,%rsi,8), %rdx
	leaq	15(%rdx), %rax
	movq	%rax, %rcx
	andq	$-4096, %rax
	subq	%rax, %rdi
	andq	$-16, %rcx
	cmpq	%rdi, %rsp
	je	.L3
.L26:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L26
.L3:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L27
.L4:
	leaq	7(%rsp), %r12
	movq	%rsp, %rcx
	movq	%r12, %rax
	andq	$-8, %r12
	shrq	$3, %rax
	movq	%rax, -72(%rbp)
	movq	%rdx, %rax
	andq	$-4096, %rdx
	andq	$-16, %rax
	subq	%rdx, %rcx
.L5:
	cmpq	%rcx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L27:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L4
.L6:
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L28
.L7:
	movq	%rsp, %rbx
	testq	%rsi, %rsi
	js	.L8
	movq	%r12, %r14
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$1, %r15
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rax
	addq	$8, %r14
	cmpq	%r15, %rax
	jge	.L9
	testq	%rax, %rax
	jle	.L8
	movq	%rbx, %r14
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L12:
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$1, %r15
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %r8
	addq	$8, %r14
	cmpq	%r15, %r8
	jg	.L12
	testq	%r8, %r8
	jle	.L8
	movq	-72(%rbp), %rax
	xorl	%esi, %esi
	xorl	%edx, %edx
	movq	0(,%rax,8), %rax
	.p2align 4,,10
	.p2align 3
.L13:
	movq	(%rbx,%rsi,8), %rcx
	movq	%rax, %rdi
	cmpq	%rax, %rcx
	cmovle	%rcx, %rdi
	subq	%rdi, %rax
	subq	%rdi, %rcx
	addq	%rdi, %rdx
	movq	%rax, (%r12,%rsi,8)
	addq	$1, %rsi
	movq	(%r12,%rsi,8), %rax
	cmpq	%rax, %rcx
	movq	%rax, %rdi
	cmovle	%rcx, %rdi
	subq	%rdi, %rcx
	subq	%rdi, %rax
	addq	%rdi, %rdx
	movq	%rcx, -8(%rbx,%rsi,8)
	movq	%rax, (%r12,%rsi,8)
	cmpq	%rsi, %r8
	jne	.L13
.L11:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L29
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L8:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L11
.L28:
	orq	$0, -8(%rsp,%rax)
	jmp	.L7
.L29:
	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 min(x,y) (((x)<(y))?(x):(y))
int main (){
    long long int n,m,br=0,i;
    scanf ("%lld", &n);
    long long int a[n+1];
    long long int b [n];
    for (i=0;i<n+1;i++) 
        scanf("%lld", &a[i]);
    for (i=0;i<n;i++) 
        scanf ("%lld", &b[i]);
    for (i=0;i<n;i++){
        long long int x=min(a[i],b[i]);
        a[i]-=x;
        b[i]-=x;
        br+=x;
        
        x=min(a[i+1],b[i]);
        b[i]-=x;
        a[i+1]-=x;
        br+=x;
        


    }
    printf ("%lld", br);

    
    return 0;
}
3
5 6 3 8
2 100 8
 2
100 0 1
1 100
 2
3 5 2
7 5
 3
0 6 3 8
2 100 8
 2
100 -1 1
1 100
 2
3 5 1
7 5
 3
0 4 3 8
2 100 8
 2
000 -1 1
1 100
 2
3 5 1
0 5
 3
0 4 2 8
2 100 8

19 2 10 17 1 9 15 0 5 14
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 min(x,y) (((x)<(y))?(x):(y))
int main (){
    long long int n,m,br=0,i;
    scanf ("%lld", &n);
    long long int a[n+1];
    long long int b [n];
    for (i=0;i<n+1;i++) 
        scanf("%lld", &a[i]);
    for (i=0;i<n;i++) 
        scanf ("%lld", &b[i]);
    for (i=0;i<n;i++){
        long long int x=min(a[i],b[i]);
        a[i]-=x;
        b[i]-=x;
        br+=x;
        
        x=min(a[i+1],b[i]);
        b[i]-=x;
        a[i+1]-=x;
        br+=x;
        


    }
    printf ("%lld", br);

    
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lld"
	.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
	subq	$120, %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
	movq	$0, -112(%rbp)
	leaq	-120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-120(%rbp), %rax
	addq	$1, %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -96(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -144(%rbp)
	movq	$0, -136(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -160(%rbp)
	movq	$0, -152(%rbp)
	leaq	0(,%rax,8), %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
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -88(%rbp)
	movq	-120(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -80(%rbp)
	movq	%rax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movq	%rax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L5:
	cmpq	%rdx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L7
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -72(%rbp)
	movq	$0, -104(%rbp)
	jmp	.L8
.L9:
	movq	-104(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-88(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -104(%rbp)
.L8:
	movq	-120(%rbp), %rax
	cmpq	%rax, -104(%rbp)
	jle	.L9
	movq	$0, -104(%rbp)
	jmp	.L10
.L11:
	movq	-104(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-72(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -104(%rbp)
.L10:
	movq	-120(%rbp), %rax
	cmpq	%rax, -104(%rbp)
	jl	.L11
	movq	$0, -104(%rbp)
	jmp	.L12
.L13:
	movq	-72(%rbp), %rax
	movq	-104(%rbp), %rdx
	movq	(%rax,%rdx,8), %rdx
	movq	-88(%rbp), %rax
	movq	-104(%rbp), %rcx
	movq	(%rax,%rcx,8), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, -64(%rbp)
	movq	-88(%rbp), %rax
	movq	-104(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	subq	-64(%rbp), %rax
	movq	%rax, %rcx
	movq	-88(%rbp), %rax
	movq	-104(%rbp), %rdx
	movq	%rcx, (%rax,%rdx,8)
	movq	-72(%rbp), %rax
	movq	-104(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	subq	-64(%rbp), %rax
	movq	%rax, %rcx
	movq	-72(%rbp), %rax
	movq	-104(%rbp), %rdx
	movq	%rcx, (%rax,%rdx,8)
	movq	-64(%rbp), %rax
	addq	%rax, -112(%rbp)
	movq	-72(%rbp), %rax
	movq	-104(%rbp), %rdx
	movq	(%rax,%rdx,8), %rdx
	movq	-104(%rbp), %rax
	leaq	1(%rax), %rcx
	movq	-88(%rbp), %rax
	movq	(%rax,%rcx,8), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, -64(%rbp)
	movq	-72(%rbp), %rax
	movq	-104(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	subq	-64(%rbp), %rax
	movq	%rax, %rcx
	movq	-72(%rbp), %rax
	movq	-104(%rbp), %rdx
	movq	%rcx, (%rax,%rdx,8)
	movq	-104(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	-88(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	movq	-104(%rbp), %rdx
	leaq	1(%rdx), %rcx
	subq	-64(%rbp), %rax
	movq	%rax, %rdx
	movq	-88(%rbp), %rax
	movq	%rdx, (%rax,%rcx,8)
	movq	-64(%rbp), %rax
	addq	%rax, -112(%rbp)
	addq	$1, -104(%rbp)
.L12:
	movq	-120(%rbp), %rax
	cmpq	%rax, -104(%rbp)
	jl	.L13
	movq	-112(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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	"%lld"
	.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
	subq	$120, %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
	movq	$0, -112(%rbp)
	leaq	-120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-120(%rbp), %rax
	addq	$1, %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -96(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -144(%rbp)
	movq	$0, -136(%rbp)
	movq	%rax, %rdx
	movq	%rdx, -160(%rbp)
	movq	$0, -152(%rbp)
	leaq	0(,%rax,8), %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
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -88(%rbp)
	movq	-120(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -80(%rbp)
	movq	%rax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movq	%rax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L5:
	cmpq	%rdx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L7
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -72(%rbp)
	movq	$0, -104(%rbp)
	jmp	.L8
.L9:
	movq	-104(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-88(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -104(%rbp)
.L8:
	movq	-120(%rbp), %rax
	cmpq	%rax, -104(%rbp)
	jle	.L9
	movq	$0, -104(%rbp)
	jmp	.L10
.L11:
	movq	-104(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-72(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -104(%rbp)
.L10:
	movq	-120(%rbp), %rax
	cmpq	%rax, -104(%rbp)
	jl	.L11
	movq	$0, -104(%rbp)
	jmp	.L12
.L13:
	movq	-72(%rbp), %rax
	movq	-104(%rbp), %rdx
	movq	(%rax,%rdx,8), %rdx
	movq	-88(%rbp), %rax
	movq	-104(%rbp), %rcx
	movq	(%rax,%rcx,8), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, -64(%rbp)
	movq	-88(%rbp), %rax
	movq	-104(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	subq	-64(%rbp), %rax
	movq	%rax, %rcx
	movq	-88(%rbp), %rax
	movq	-104(%rbp), %rdx
	movq	%rcx, (%rax,%rdx,8)
	movq	-72(%rbp), %rax
	movq	-104(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	subq	-64(%rbp), %rax
	movq	%rax, %rcx
	movq	-72(%rbp), %rax
	movq	-104(%rbp), %rdx
	movq	%rcx, (%rax,%rdx,8)
	movq	-64(%rbp), %rax
	addq	%rax, -112(%rbp)
	movq	-72(%rbp), %rax
	movq	-104(%rbp), %rdx
	movq	(%rax,%rdx,8), %rdx
	movq	-104(%rbp), %rax
	leaq	1(%rax), %rcx
	movq	-88(%rbp), %rax
	movq	(%rax,%rcx,8), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, -64(%rbp)
	movq	-72(%rbp), %rax
	movq	-104(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	subq	-64(%rbp), %rax
	movq	%rax, %rcx
	movq	-72(%rbp), %rax
	movq	-104(%rbp), %rdx
	movq	%rcx, (%rax,%rdx,8)
	movq	-104(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	-88(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	movq	-104(%rbp), %rdx
	leaq	1(%rdx), %rcx
	subq	-64(%rbp), %rax
	movq	%rax, %rdx
	movq	-88(%rbp), %rax
	movq	%rdx, (%rax,%rcx,8)
	movq	-64(%rbp), %rax
	addq	%rax, -112(%rbp)
	addq	$1, -104(%rbp)
.L12:
	movq	-120(%rbp), %rax
	cmpq	%rax, -104(%rbp)
	jl	.L13
	movq	-112(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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:
