Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
long a[3000],dp[3001][3001];
i,j;
main(n)
{
	for(scanf("%d",&n);~scanf("%d",a+j++););
	for(i=n;i--;)
	{
		for(j=i;j++<n;)
		{
			dp[i][j]=fmax(a[i]-dp[i+1][j],a[j-1]-dp[i][j-1]);
		}
	}
	printf("%ld",dp[0][n]);
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	a(%rip), %rbx
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movl	%edi, 60(%rsp)
	leaq	60(%rsp), %rsi
	movq	%rbp, %rdi
	call	scanf@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	movslq	j(%rip), %rax
	movq	%rbp, %rdi
	leal	1(%rax), %edx
	leaq	(%rbx,%rax,8), %rsi
	xorl	%eax, %eax
	movl	%edx, j(%rip)
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L2
	movl	60(%rsp), %eax
	leal	-1(%rax), %r15d
	movl	%eax, 56(%rsp)
	movl	%r15d, i(%rip)
	testl	%eax, %eax
	je	.L15
	movslq	%r15d, %rdi
	leaq	dp(%rip), %rcx
	imulq	$24016, %rdi, %rax
	movq	%rdi, 8(%rsp)
	movq	%rcx, 48(%rsp)
	imulq	$-24008, %rdi, %rbp
	leaq	8(%rcx,%rax), %rax
	movq	%rax, 24(%rsp)
	leaq	(%rbx,%rdi,8), %rax
	movq	%rax, 32(%rsp)
	movslq	56(%rsp), %rax
	movq	%rax, 40(%rsp)
	imulq	$24008, %rax, %rbx
	movl	%eax, 20(%rsp)
	.p2align 4,,10
	.p2align 3
.L7:
	movl	20(%rsp), %edx
	movl	56(%rsp), %ecx
	movq	8(%rsp), %r8
	movl	%edx, %eax
	cmpl	%r8d, %ecx
	jle	.L4
	movq	32(%rsp), %r15
	movl	%ecx, %edi
	movq	24(%rsp), %r14
	subl	%edx, %edi
	movq	%rdi, %rax
	movq	(%r15), %r12
	leaq	8+a(%rip), %rdi
	movq	-8(%r14), %rsi
	addq	%r8, %rax
	leaq	(%rdi,%rax,8), %r13
	movq	%r12, %rdx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L16:
	movq	(%r15), %rdx
.L6:
	leaq	(%r14,%rbp), %rax
	subq	%rsi, %rdx
	movq	%r12, %rcx
	addq	$8, %r15
	subq	(%rax,%rbx), %rcx
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	addq	$8, %r14
	cvtsi2sdq	%rcx, %xmm0
	cvtsi2sdq	%rdx, %xmm1
	call	fmax@PLT
	cvttsd2siq	%xmm0, %rsi
	movq	%rsi, -8(%r14)
	cmpq	%r15, %r13
	jne	.L16
	movl	20(%rsp), %eax
	addl	56(%rsp), %eax
	subl	8(%rsp), %eax
.L4:
	subq	$1, 8(%rsp)
	addq	$24008, %rbp
	subq	$24008, %rbx
	subq	$24016, 24(%rsp)
	subq	$8, 32(%rsp)
	subl	$1, 20(%rsp)
	jne	.L7
	movl	%eax, j(%rip)
	movl	$-1, i(%rip)
.L3:
	movq	48(%rsp), %rax
	movq	40(%rsp), %rbx
	leaq	.LC1(%rip), %rdi
	movq	(%rax,%rbx,8), %rsi
	xorl	%eax, %eax
	call	printf@PLT
	addq	$72, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L15:
	.cfi_restore_state
	movq	$0, 40(%rsp)
	leaq	dp(%rip), %rax
	movq	%rax, 48(%rsp)
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	j
	.bss
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 72048008
dp:
	.zero	72048008
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 24000
a:
	.zero	24000
	.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	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	a(%rip), %rbx
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movl	%edi, 60(%rsp)
	leaq	60(%rsp), %rsi
	movq	%rbp, %rdi
	call	scanf@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	movslq	j(%rip), %rax
	movq	%rbp, %rdi
	leal	1(%rax), %edx
	leaq	(%rbx,%rax,8), %rsi
	xorl	%eax, %eax
	movl	%edx, j(%rip)
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L2
	movl	60(%rsp), %eax
	leal	-1(%rax), %r15d
	movl	%eax, 56(%rsp)
	movl	%r15d, i(%rip)
	testl	%eax, %eax
	je	.L15
	movslq	%r15d, %rdi
	leaq	dp(%rip), %rcx
	imulq	$24016, %rdi, %rax
	movq	%rdi, 8(%rsp)
	movq	%rcx, 48(%rsp)
	imulq	$-24008, %rdi, %rbp
	leaq	8(%rcx,%rax), %rax
	movq	%rax, 24(%rsp)
	leaq	(%rbx,%rdi,8), %rax
	movq	%rax, 32(%rsp)
	movslq	56(%rsp), %rax
	movq	%rax, 40(%rsp)
	imulq	$24008, %rax, %rbx
	movl	%eax, 20(%rsp)
	.p2align 4,,10
	.p2align 3
.L7:
	movl	20(%rsp), %edx
	movl	56(%rsp), %ecx
	movq	8(%rsp), %r8
	movl	%edx, %eax
	cmpl	%r8d, %ecx
	jle	.L4
	movq	32(%rsp), %r15
	movl	%ecx, %edi
	movq	24(%rsp), %r14
	subl	%edx, %edi
	movq	%rdi, %rax
	movq	(%r15), %r12
	leaq	8+a(%rip), %rdi
	movq	-8(%r14), %rsi
	addq	%r8, %rax
	leaq	(%rdi,%rax,8), %r13
	movq	%r12, %rdx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L16:
	movq	(%r15), %rdx
.L6:
	leaq	(%r14,%rbp), %rax
	subq	%rsi, %rdx
	movq	%r12, %rcx
	addq	$8, %r15
	subq	(%rax,%rbx), %rcx
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	addq	$8, %r14
	cvtsi2sdq	%rcx, %xmm0
	cvtsi2sdq	%rdx, %xmm1
	call	fmax@PLT
	cvttsd2siq	%xmm0, %rsi
	movq	%rsi, -8(%r14)
	cmpq	%r15, %r13
	jne	.L16
	movl	20(%rsp), %eax
	addl	56(%rsp), %eax
	subl	8(%rsp), %eax
.L4:
	subq	$1, 8(%rsp)
	addq	$24008, %rbp
	subq	$24008, %rbx
	subq	$24016, 24(%rsp)
	subq	$8, 32(%rsp)
	subl	$1, 20(%rsp)
	jne	.L7
	movl	%eax, j(%rip)
	movl	$-1, i(%rip)
.L3:
	movq	48(%rsp), %rax
	movq	40(%rsp), %rbx
	leaq	.LC1(%rip), %rdi
	movq	(%rax,%rbx,8), %rsi
	xorl	%eax, %eax
	call	printf@PLT
	addq	$72, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L15:
	.cfi_restore_state
	movq	$0, 40(%rsp)
	leaq	dp(%rip), %rax
	movq	%rax, 48(%rsp)
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	j
	.bss
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 72048008
dp:
	.zero	72048008
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 24000
a:
	.zero	24000
	.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	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	a(%rip), %rbx
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movl	%edi, 60(%rsp)
	leaq	60(%rsp), %rsi
	movq	%rbp, %rdi
	call	scanf@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	movslq	j(%rip), %rax
	movq	%rbp, %rdi
	leal	1(%rax), %edx
	leaq	(%rbx,%rax,8), %rsi
	xorl	%eax, %eax
	movl	%edx, j(%rip)
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L2
	movl	60(%rsp), %eax
	leal	-1(%rax), %r15d
	movl	%eax, 56(%rsp)
	movl	%r15d, i(%rip)
	testl	%eax, %eax
	je	.L15
	movslq	%r15d, %rdi
	leaq	dp(%rip), %rcx
	imulq	$24016, %rdi, %rax
	movq	%rdi, 8(%rsp)
	movq	%rcx, 48(%rsp)
	imulq	$-24008, %rdi, %rbp
	leaq	8(%rcx,%rax), %rax
	movq	%rax, 24(%rsp)
	leaq	(%rbx,%rdi,8), %rax
	movq	%rax, 32(%rsp)
	movslq	56(%rsp), %rax
	movq	%rax, 40(%rsp)
	imulq	$24008, %rax, %rbx
	movl	%eax, 20(%rsp)
	.p2align 4,,10
	.p2align 3
.L7:
	movl	20(%rsp), %edx
	movl	56(%rsp), %ecx
	movq	8(%rsp), %r8
	movl	%edx, %eax
	cmpl	%r8d, %ecx
	jle	.L4
	movq	32(%rsp), %r15
	movl	%ecx, %edi
	movq	24(%rsp), %r14
	subl	%edx, %edi
	movq	%rdi, %rax
	movq	(%r15), %r12
	leaq	8+a(%rip), %rdi
	movq	-8(%r14), %rsi
	addq	%r8, %rax
	leaq	(%rdi,%rax,8), %r13
	movq	%r12, %rdx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L16:
	movq	(%r15), %rdx
.L6:
	leaq	(%r14,%rbp), %rax
	subq	%rsi, %rdx
	movq	%r12, %rcx
	addq	$8, %r15
	subq	(%rax,%rbx), %rcx
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	addq	$8, %r14
	cvtsi2sdq	%rcx, %xmm0
	cvtsi2sdq	%rdx, %xmm1
	call	fmax@PLT
	cvttsd2siq	%xmm0, %rsi
	movq	%rsi, -8(%r14)
	cmpq	%r15, %r13
	jne	.L16
	movl	20(%rsp), %eax
	addl	56(%rsp), %eax
	subl	8(%rsp), %eax
.L4:
	subq	$1, 8(%rsp)
	addq	$24008, %rbp
	subq	$24008, %rbx
	subq	$24016, 24(%rsp)
	subq	$8, 32(%rsp)
	subl	$1, 20(%rsp)
	jne	.L7
	movl	%eax, j(%rip)
	movl	$-1, i(%rip)
.L3:
	movq	48(%rsp), %rax
	movq	40(%rsp), %rbx
	leaq	.LC1(%rip), %rdi
	movq	(%rax,%rbx,8), %rsi
	xorl	%eax, %eax
	call	printf@PLT
	addq	$72, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L15:
	.cfi_restore_state
	movq	$0, 40(%rsp)
	leaq	dp(%rip), %rax
	movq	%rax, 48(%rsp)
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	j
	.bss
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 72048008
dp:
	.zero	72048008
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 24000
a:
	.zero	24000
	.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
long a[3000],dp[3001][3001];
i,j;
main(n)
{
	for(scanf("%d",&n);~scanf("%d",a+j++););
	for(i=n;i--;)
	{
		for(j=i;j++<n;)
		{
			dp[i][j]=fmax(a[i]-dp[i+1][j],a[j-1]-dp[i][j-1]);
		}
	}
	printf("%ld",dp[0][n]);
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
long a[3000],dp[3001][3001];
i,j;
main(n)
{
	for(scanf("%d",&n);~scanf("%d",a+j++););
	for(i=n;i--;)
	{
		for(j=i;j++<n;)
		{
			dp[i][j]=fmax(a[i]-dp[i+1][j],a[j-1]-dp[i][j-1]);
		}
	}
	printf("%ld",dp[0][n]);
}```

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:

4
10 103 90 30
 10
1000000000 0 1000000000 1 1000000000 1 1000000000 1 1000000000 1
 3
10 101 10
 1
8
 6
4 0 9 7 1 5
 4
10 103 1 30
 3
10 101 2
 6
4 0 9 7 2 5
 4
5 103 1 30
 3
10 100 2

33 4999999996 -81 8 4 122 -89 5 127 -88
Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
long a[3000],dp[3001][3001];
i,j;
main(n)
{
	for(scanf("%d",&n);~scanf("%d",a+j++););
	for(i=n;i--;)
	{
		for(j=i;j++<n;)
		{
			dp[i][j]=fmax(a[i]-dp[i+1][j],a[j-1]-dp[i][j-1]);
		}
	}
	printf("%ld",dp[0][n]);
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	a(%rip), %rbx
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movl	%edi, 60(%rsp)
	leaq	60(%rsp), %rsi
	movq	%rbp, %rdi
	call	scanf@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	movslq	j(%rip), %rax
	movq	%rbp, %rdi
	leal	1(%rax), %edx
	leaq	(%rbx,%rax,8), %rsi
	xorl	%eax, %eax
	movl	%edx, j(%rip)
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L2
	movl	60(%rsp), %eax
	leal	-1(%rax), %r15d
	movl	%eax, 56(%rsp)
	movl	%r15d, i(%rip)
	testl	%eax, %eax
	je	.L15
	movslq	%r15d, %rdi
	leaq	dp(%rip), %rcx
	imulq	$24016, %rdi, %rax
	movq	%rdi, 8(%rsp)
	movq	%rcx, 48(%rsp)
	imulq	$-24008, %rdi, %rbp
	leaq	8(%rcx,%rax), %rax
	movq	%rax, 24(%rsp)
	leaq	(%rbx,%rdi,8), %rax
	movq	%rax, 32(%rsp)
	movslq	56(%rsp), %rax
	movq	%rax, 40(%rsp)
	imulq	$24008, %rax, %rbx
	movl	%eax, 20(%rsp)
	.p2align 4,,10
	.p2align 3
.L7:
	movl	20(%rsp), %edx
	movl	56(%rsp), %ecx
	movq	8(%rsp), %r8
	movl	%edx, %eax
	cmpl	%r8d, %ecx
	jle	.L4
	movq	32(%rsp), %r15
	movl	%ecx, %edi
	movq	24(%rsp), %r14
	subl	%edx, %edi
	movq	%rdi, %rax
	movq	(%r15), %r12
	leaq	8+a(%rip), %rdi
	movq	-8(%r14), %rsi
	addq	%r8, %rax
	leaq	(%rdi,%rax,8), %r13
	movq	%r12, %rdx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L16:
	movq	(%r15), %rdx
.L6:
	leaq	(%r14,%rbp), %rax
	subq	%rsi, %rdx
	movq	%r12, %rcx
	addq	$8, %r15
	subq	(%rax,%rbx), %rcx
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	addq	$8, %r14
	cvtsi2sdq	%rcx, %xmm0
	cvtsi2sdq	%rdx, %xmm1
	call	fmax@PLT
	cvttsd2siq	%xmm0, %rsi
	movq	%rsi, -8(%r14)
	cmpq	%r15, %r13
	jne	.L16
	movl	20(%rsp), %eax
	addl	56(%rsp), %eax
	subl	8(%rsp), %eax
.L4:
	subq	$1, 8(%rsp)
	addq	$24008, %rbp
	subq	$24008, %rbx
	subq	$24016, 24(%rsp)
	subq	$8, 32(%rsp)
	subl	$1, 20(%rsp)
	jne	.L7
	movl	%eax, j(%rip)
	movl	$-1, i(%rip)
.L3:
	movq	48(%rsp), %rax
	movq	40(%rsp), %rbx
	leaq	.LC1(%rip), %rdi
	movq	(%rax,%rbx,8), %rsi
	xorl	%eax, %eax
	call	printf@PLT
	addq	$72, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L15:
	.cfi_restore_state
	movq	$0, 40(%rsp)
	leaq	dp(%rip), %rax
	movq	%rax, 48(%rsp)
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	j
	.bss
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 72048008
dp:
	.zero	72048008
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 24000
a:
	.zero	24000
	.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	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	a(%rip), %rbx
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movl	%edi, 60(%rsp)
	leaq	60(%rsp), %rsi
	movq	%rbp, %rdi
	call	scanf@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	movslq	j(%rip), %rax
	movq	%rbp, %rdi
	leal	1(%rax), %edx
	leaq	(%rbx,%rax,8), %rsi
	xorl	%eax, %eax
	movl	%edx, j(%rip)
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L2
	movl	60(%rsp), %eax
	leal	-1(%rax), %r15d
	movl	%eax, 56(%rsp)
	movl	%r15d, i(%rip)
	testl	%eax, %eax
	je	.L15
	movslq	%r15d, %rdi
	leaq	dp(%rip), %rcx
	imulq	$24016, %rdi, %rax
	movq	%rdi, 8(%rsp)
	movq	%rcx, 48(%rsp)
	imulq	$-24008, %rdi, %rbp
	leaq	8(%rcx,%rax), %rax
	movq	%rax, 24(%rsp)
	leaq	(%rbx,%rdi,8), %rax
	movq	%rax, 32(%rsp)
	movslq	56(%rsp), %rax
	movq	%rax, 40(%rsp)
	imulq	$24008, %rax, %rbx
	movl	%eax, 20(%rsp)
	.p2align 4,,10
	.p2align 3
.L7:
	movl	20(%rsp), %edx
	movl	56(%rsp), %ecx
	movq	8(%rsp), %r8
	movl	%edx, %eax
	cmpl	%r8d, %ecx
	jle	.L4
	movq	32(%rsp), %r15
	movl	%ecx, %edi
	movq	24(%rsp), %r14
	subl	%edx, %edi
	movq	%rdi, %rax
	movq	(%r15), %r12
	leaq	8+a(%rip), %rdi
	movq	-8(%r14), %rsi
	addq	%r8, %rax
	leaq	(%rdi,%rax,8), %r13
	movq	%r12, %rdx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L16:
	movq	(%r15), %rdx
.L6:
	leaq	(%r14,%rbp), %rax
	subq	%rsi, %rdx
	movq	%r12, %rcx
	addq	$8, %r15
	subq	(%rax,%rbx), %rcx
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	addq	$8, %r14
	cvtsi2sdq	%rcx, %xmm0
	cvtsi2sdq	%rdx, %xmm1
	call	fmax@PLT
	cvttsd2siq	%xmm0, %rsi
	movq	%rsi, -8(%r14)
	cmpq	%r15, %r13
	jne	.L16
	movl	20(%rsp), %eax
	addl	56(%rsp), %eax
	subl	8(%rsp), %eax
.L4:
	subq	$1, 8(%rsp)
	addq	$24008, %rbp
	subq	$24008, %rbx
	subq	$24016, 24(%rsp)
	subq	$8, 32(%rsp)
	subl	$1, 20(%rsp)
	jne	.L7
	movl	%eax, j(%rip)
	movl	$-1, i(%rip)
.L3:
	movq	48(%rsp), %rax
	movq	40(%rsp), %rbx
	leaq	.LC1(%rip), %rdi
	movq	(%rax,%rbx,8), %rsi
	xorl	%eax, %eax
	call	printf@PLT
	addq	$72, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L15:
	.cfi_restore_state
	movq	$0, 40(%rsp)
	leaq	dp(%rip), %rax
	movq	%rax, 48(%rsp)
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	j
	.bss
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 72048008
dp:
	.zero	72048008
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 24000
a:
	.zero	24000
	.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:
```