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 <string.h>
#define ll long long int
int main(void){
	ll n,x,i;
	scanf("%lld%lld",&n,&x);
	ll a[n],sum=0;
	for(i=0;i<n;i++){
		scanf("%lld",&a[i]);
		sum+=a[i];
	}
	if(a[0]>x)a[0]=x;
	for(i=0;i<n;i++){
		ll y=a[i]+a[i+1];
		if(y>x)a[i+1]=x-a[i];
	}
	for(i=0;i<n;i++){
		sum-=a[i];
	}
	
	printf("%lld",sum);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lld%lld"
.LC1:
	.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	$72, %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	-104(%rbp), %rdx
	leaq	-112(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-112(%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
.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, -72(%rbp)
	movq	$0, -88(%rbp)
	movq	$0, -96(%rbp)
	jmp	.L5
.L6:
	movq	-96(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-72(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-72(%rbp), %rax
	movq	-96(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	addq	%rax, -88(%rbp)
	addq	$1, -96(%rbp)
.L5:
	movq	-112(%rbp), %rax
	cmpq	%rax, -96(%rbp)
	jl	.L6
	movq	-72(%rbp), %rax
	movq	(%rax), %rdx
	movq	-104(%rbp), %rax
	cmpq	%rax, %rdx
	jle	.L7
	movq	-104(%rbp), %rdx
	movq	-72(%rbp), %rax
	movq	%rdx, (%rax)
.L7:
	movq	$0, -96(%rbp)
	jmp	.L8
.L10:
	movq	-72(%rbp), %rax
	movq	-96(%rbp), %rdx
	movq	(%rax,%rdx,8), %rcx
	movq	-96(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	-72(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	addq	%rcx, %rax
	movq	%rax, -64(%rbp)
	movq	-104(%rbp), %rax
	cmpq	%rax, -64(%rbp)
	jle	.L9
	movq	-104(%rbp), %rcx
	movq	-72(%rbp), %rax
	movq	-96(%rbp), %rdx
	movq	(%rax,%rdx,8), %rsi
	movq	-96(%rbp), %rax
	leaq	1(%rax), %rdx
	subq	%rsi, %rcx
	movq	-72(%rbp), %rax
	movq	%rcx, (%rax,%rdx,8)
.L9:
	addq	$1, -96(%rbp)
.L8:
	movq	-112(%rbp), %rax
	cmpq	%rax, -96(%rbp)
	jl	.L10
	movq	$0, -96(%rbp)
	jmp	.L11
.L12:
	movq	-72(%rbp), %rax
	movq	-96(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	subq	%rax, -88(%rbp)
	addq	$1, -96(%rbp)
.L11:
	movq	-112(%rbp), %rax
	cmpq	%rax, -96(%rbp)
	jl	.L12
	movq	-88(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%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	.L14
	call	__stack_chk_fail@PLT
.L14:
	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%lld"
.LC1:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-64(%rbp), %rdx
	leaq	-72(%rbp), %rsi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %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
	call	__isoc99_scanf@PLT
	movq	-72(%rbp), %rdx
	movq	%rsp, %rsi
	leaq	15(,%rdx,8), %rax
	movq	%rax, %rcx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rcx
	cmpq	%rsi, %rsp
	je	.L3
.L27:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L27
.L3:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L28
.L4:
	leaq	7(%rsp), %r12
	movq	%r12, %rax
	andq	$-8, %r12
	shrq	$3, %rax
	movq	%rax, -88(%rbp)
	testq	%rdx, %rdx
	jle	.L5
	movq	%r12, %rbx
	xorl	%r13d, %r13d
	leaq	.LC1(%rip), %r14
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%rbx, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addq	$1, %r15
	call	__isoc99_scanf@PLT
	movq	-72(%rbp), %rdx
	addq	(%rbx), %r13
	addq	$8, %rbx
	cmpq	%r15, %rdx
	jg	.L6
	movq	-88(%rbp), %rax
	movq	-64(%rbp), %rdi
	cmpq	%rdi, 0(,%rax,8)
	jle	.L7
.L14:
	movq	-88(%rbp), %rax
	movq	%rdi, 0(,%rax,8)
.L7:
	testq	%rdx, %rdx
	jle	.L8
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L10:
	movq	(%r12,%rax,8), %rcx
	addq	$1, %rax
	movq	(%r12,%rax,8), %rsi
	addq	%rcx, %rsi
	cmpq	%rsi, %rdi
	jge	.L9
	movq	%rdi, %rsi
	subq	%rcx, %rsi
	movq	%rsi, (%r12,%rax,8)
.L9:
	cmpq	%rdx, %rax
	jne	.L10
	cmpq	$1, %rax
	je	.L16
	movq	%rax, %rsi
	xorl	%edx, %edx
	pxor	%xmm0, %xmm0
	shrq	%rsi
	.p2align 4,,10
	.p2align 3
.L12:
	movq	%rdx, %rcx
	addq	$1, %rdx
	salq	$4, %rcx
	movdqu	(%r12,%rcx), %xmm1
	psubq	%xmm1, %xmm0
	cmpq	%rdx, %rsi
	jne	.L12
	movdqa	%xmm0, %xmm1
	psrldq	$8, %xmm1
	paddq	%xmm1, %xmm0
	movq	%xmm0, %rdx
	addq	%rdx, %r13
	movq	%rax, %rdx
	andq	$-2, %rdx
	testb	$1, %al
	je	.L8
.L11:
	subq	(%r12,%rdx,8), %r13
.L8:
	xorl	%eax, %eax
	movq	%r13, %rdx
	movq	%r14, %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
.L28:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rcx)
	jmp	.L4
.L5:
	movq	-88(%rbp), %rax
	movq	-64(%rbp), %rdi
	xorl	%r13d, %r13d
	leaq	.LC1(%rip), %r14
	cmpq	0(,%rax,8), %rdi
	jl	.L14
	jmp	.L8
.L16:
	xorl	%edx, %edx
	jmp	.L11
.L29:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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%lld"
.LC1:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-64(%rbp), %rdx
	leaq	-72(%rbp), %rsi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %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
	call	__isoc99_scanf@PLT
	movq	-72(%rbp), %rdx
	movq	%rsp, %rsi
	leaq	15(,%rdx,8), %rax
	movq	%rax, %rcx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rcx
	cmpq	%rsi, %rsp
	je	.L3
.L27:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L27
.L3:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L28
.L4:
	leaq	7(%rsp), %r12
	movq	%r12, %rax
	andq	$-8, %r12
	shrq	$3, %rax
	movq	%rax, -88(%rbp)
	testq	%rdx, %rdx
	jle	.L5
	movq	%r12, %rbx
	xorl	%r13d, %r13d
	leaq	.LC1(%rip), %r14
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%rbx, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addq	$1, %r15
	call	__isoc99_scanf@PLT
	movq	-72(%rbp), %rdx
	addq	(%rbx), %r13
	addq	$8, %rbx
	cmpq	%r15, %rdx
	jg	.L6
	movq	-88(%rbp), %rax
	movq	-64(%rbp), %rdi
	cmpq	%rdi, 0(,%rax,8)
	jle	.L7
.L14:
	movq	-88(%rbp), %rax
	movq	%rdi, 0(,%rax,8)
.L7:
	testq	%rdx, %rdx
	jle	.L8
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L10:
	movq	(%r12,%rax,8), %rcx
	addq	$1, %rax
	movq	(%r12,%rax,8), %rsi
	addq	%rcx, %rsi
	cmpq	%rsi, %rdi
	jge	.L9
	movq	%rdi, %rsi
	subq	%rcx, %rsi
	movq	%rsi, (%r12,%rax,8)
.L9:
	cmpq	%rdx, %rax
	jne	.L10
	cmpq	$1, %rax
	je	.L16
	movq	%rax, %rsi
	xorl	%edx, %edx
	pxor	%xmm0, %xmm0
	shrq	%rsi
	.p2align 4,,10
	.p2align 3
.L12:
	movq	%rdx, %rcx
	addq	$1, %rdx
	salq	$4, %rcx
	movdqu	(%r12,%rcx), %xmm1
	psubq	%xmm1, %xmm0
	cmpq	%rdx, %rsi
	jne	.L12
	movdqa	%xmm0, %xmm1
	psrldq	$8, %xmm1
	paddq	%xmm1, %xmm0
	movq	%xmm0, %rdx
	addq	%rdx, %r13
	movq	%rax, %rdx
	andq	$-2, %rdx
	testb	$1, %al
	je	.L8
.L11:
	subq	(%r12,%rdx,8), %r13
.L8:
	xorl	%eax, %eax
	movq	%r13, %rdx
	movq	%r14, %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
.L28:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rcx)
	jmp	.L4
.L5:
	movq	-88(%rbp), %rax
	movq	-64(%rbp), %rdi
	xorl	%r13d, %r13d
	leaq	.LC1(%rip), %r14
	cmpq	0(,%rax,8), %rdi
	jl	.L14
	jmp	.L8
.L16:
	xorl	%edx, %edx
	jmp	.L11
.L29:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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 <string.h>
#define ll long long int
int main(void){
	ll n,x,i;
	scanf("%lld%lld",&n,&x);
	ll a[n],sum=0;
	for(i=0;i<n;i++){
		scanf("%lld",&a[i]);
		sum+=a[i];
	}
	if(a[0]>x)a[0]=x;
	for(i=0;i<n;i++){
		ll y=a[i]+a[i+1];
		if(y>x)a[i+1]=x-a[i];
	}
	for(i=0;i<n;i++){
		sum-=a[i];
	}
	
	printf("%lld",sum);
	return 0;
}
2 0
7 5
 5 9
3 1 4 2 5
 3 3
2 4 2
 2 0
1 5
 2 1
1 2
 2 0
5 9
 3 3
4 4 2
 2 0
1 10
 2 0
1 0
 2 0
1 9

12 0 3 6 2 14 5 11 1 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 <string.h>
#define ll long long int
int main(void){
	ll n,x,i;
	scanf("%lld%lld",&n,&x);
	ll a[n],sum=0;
	for(i=0;i<n;i++){
		scanf("%lld",&a[i]);
		sum+=a[i];
	}
	if(a[0]>x)a[0]=x;
	for(i=0;i<n;i++){
		ll y=a[i]+a[i+1];
		if(y>x)a[i+1]=x-a[i];
	}
	for(i=0;i<n;i++){
		sum-=a[i];
	}
	
	printf("%lld",sum);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lld%lld"
.LC1:
	.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	$72, %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	-104(%rbp), %rdx
	leaq	-112(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-112(%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
.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, -72(%rbp)
	movq	$0, -88(%rbp)
	movq	$0, -96(%rbp)
	jmp	.L5
.L6:
	movq	-96(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-72(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-72(%rbp), %rax
	movq	-96(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	addq	%rax, -88(%rbp)
	addq	$1, -96(%rbp)
.L5:
	movq	-112(%rbp), %rax
	cmpq	%rax, -96(%rbp)
	jl	.L6
	movq	-72(%rbp), %rax
	movq	(%rax), %rdx
	movq	-104(%rbp), %rax
	cmpq	%rax, %rdx
	jle	.L7
	movq	-104(%rbp), %rdx
	movq	-72(%rbp), %rax
	movq	%rdx, (%rax)
.L7:
	movq	$0, -96(%rbp)
	jmp	.L8
.L10:
	movq	-72(%rbp), %rax
	movq	-96(%rbp), %rdx
	movq	(%rax,%rdx,8), %rcx
	movq	-96(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	-72(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	addq	%rcx, %rax
	movq	%rax, -64(%rbp)
	movq	-104(%rbp), %rax
	cmpq	%rax, -64(%rbp)
	jle	.L9
	movq	-104(%rbp), %rcx
	movq	-72(%rbp), %rax
	movq	-96(%rbp), %rdx
	movq	(%rax,%rdx,8), %rsi
	movq	-96(%rbp), %rax
	leaq	1(%rax), %rdx
	subq	%rsi, %rcx
	movq	-72(%rbp), %rax
	movq	%rcx, (%rax,%rdx,8)
.L9:
	addq	$1, -96(%rbp)
.L8:
	movq	-112(%rbp), %rax
	cmpq	%rax, -96(%rbp)
	jl	.L10
	movq	$0, -96(%rbp)
	jmp	.L11
.L12:
	movq	-72(%rbp), %rax
	movq	-96(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	subq	%rax, -88(%rbp)
	addq	$1, -96(%rbp)
.L11:
	movq	-112(%rbp), %rax
	cmpq	%rax, -96(%rbp)
	jl	.L12
	movq	-88(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%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	.L14
	call	__stack_chk_fail@PLT
.L14:
	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%lld"
.LC1:
	.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	$72, %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	-104(%rbp), %rdx
	leaq	-112(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-112(%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
.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, -72(%rbp)
	movq	$0, -88(%rbp)
	movq	$0, -96(%rbp)
	jmp	.L5
.L6:
	movq	-96(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-72(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-72(%rbp), %rax
	movq	-96(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	addq	%rax, -88(%rbp)
	addq	$1, -96(%rbp)
.L5:
	movq	-112(%rbp), %rax
	cmpq	%rax, -96(%rbp)
	jl	.L6
	movq	-72(%rbp), %rax
	movq	(%rax), %rdx
	movq	-104(%rbp), %rax
	cmpq	%rax, %rdx
	jle	.L7
	movq	-104(%rbp), %rdx
	movq	-72(%rbp), %rax
	movq	%rdx, (%rax)
.L7:
	movq	$0, -96(%rbp)
	jmp	.L8
.L10:
	movq	-72(%rbp), %rax
	movq	-96(%rbp), %rdx
	movq	(%rax,%rdx,8), %rcx
	movq	-96(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	-72(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	addq	%rcx, %rax
	movq	%rax, -64(%rbp)
	movq	-104(%rbp), %rax
	cmpq	%rax, -64(%rbp)
	jle	.L9
	movq	-104(%rbp), %rcx
	movq	-72(%rbp), %rax
	movq	-96(%rbp), %rdx
	movq	(%rax,%rdx,8), %rsi
	movq	-96(%rbp), %rax
	leaq	1(%rax), %rdx
	subq	%rsi, %rcx
	movq	-72(%rbp), %rax
	movq	%rcx, (%rax,%rdx,8)
.L9:
	addq	$1, -96(%rbp)
.L8:
	movq	-112(%rbp), %rax
	cmpq	%rax, -96(%rbp)
	jl	.L10
	movq	$0, -96(%rbp)
	jmp	.L11
.L12:
	movq	-72(%rbp), %rax
	movq	-96(%rbp), %rdx
	movq	(%rax,%rdx,8), %rax
	subq	%rax, -88(%rbp)
	addq	$1, -96(%rbp)
.L11:
	movq	-112(%rbp), %rax
	cmpq	%rax, -96(%rbp)
	jl	.L12
	movq	-88(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%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	.L14
	call	__stack_chk_fail@PLT
.L14:
	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:
