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

Assembly Code:

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

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

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:

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

Assembly Code:

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

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	"%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:
```