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

```c
long a[3001],p[3001][3001];j;main(i){for(;~scanf("%d",a-i--);)for(j=-i;j--;)p[-i][j]=fmax(a[~i]-p[~i][j],a[j]-p[-i][j+1]);printf("%ld",*p[~i]);}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 24008
a:
	.zero	24008
	.globl	p
	.align 32
	.type	p, @object
	.size	p, 72048008
p:
	.zero	72048008
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%ld"
	.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
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	jmp	.L2
.L5:
	movl	-4(%rbp), %eax
	negl	%eax
	movl	%eax, j(%rip)
	jmp	.L3
.L4:
	movl	j(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	-4(%rbp), %edx
	movl	%edx, %ecx
	negl	%ecx
	movl	j(%rip), %edx
	addl	$1, %edx
	movslq	%edx, %rsi
	movslq	%ecx, %rdx
	imulq	$3001, %rdx, %rdx
	addq	%rsi, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	p(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	subq	%rdx, %rax
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rax, %xmm0
	movl	-4(%rbp), %eax
	notl	%eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	-4(%rbp), %edx
	movl	%edx, %ecx
	notl	%ecx
	movl	j(%rip), %edx
	movslq	%edx, %rsi
	movslq	%ecx, %rdx
	imulq	$3001, %rdx, %rdx
	addq	%rsi, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	p(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	subq	%rdx, %rax
	pxor	%xmm2, %xmm2
	cvtsi2sdq	%rax, %xmm2
	movq	%xmm2, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	fmax@PLT
	movl	-4(%rbp), %eax
	negl	%eax
	movl	%eax, %ecx
	movl	j(%rip), %edx
	cvttsd2siq	%xmm0, %rax
	movslq	%edx, %rsi
	movslq	%ecx, %rdx
	imulq	$3001, %rdx, %rdx
	addq	%rsi, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	p(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
.L3:
	movl	j(%rip), %eax
	leal	-1(%rax), %edx
	movl	%edx, j(%rip)
	testl	%eax, %eax
	jne	.L4
.L2:
	movl	-4(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -4(%rbp)
	cltq
	salq	$3, %rax
	negq	%rax
	movq	%rax, %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L5
	movl	-4(%rbp), %eax
	notl	%eax
	cltq
	imulq	$24008, %rax, %rax
	leaq	p(%rip), %rdx
	movq	(%rax,%rdx), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.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	"%d"
.LC1:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	movslq	%edi, %rax
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	imulq	$-3001, %rax, %rcx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rax, %rdx
	leaq	a(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%eax, %r13d
	negl	%r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movslq	%r13d, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	3001(%rdi,%rcx), %rcx
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	p(%rip), %rbx
	leaq	(%rbx,%rcx,8), %rbx
	leaq	0(,%rdi,8), %rsi
	imulq	$24008, %rax, %rcx
	negq	%rax
	salq	$3, %rax
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	subq	%rsi, %rax
	movq	%rbx, 16(%rsp)
	leaq	(%rsi,%r14), %rbx
	movq	%rax, 40(%rsp)
	movq	%rdi, %rax
	leaq	-24008(%rcx), %rbp
	negq	%rax
	movq	%rdi, 24(%rsp)
	leaq	(%rcx,%rax,8), %rax
	movq	%rbx, 8(%rsp)
	movq	%rcx, %rbx
	movq	%rax, 48(%rsp)
	movl	$1, %eax
	negq	%rbx
	subl	%edx, %eax
	cltq
	imulq	$24016, %rax, %rax
	movq	%rax, 56(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rsi
	xorl	%eax, %eax
	addq	40(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	je	.L12
	movl	%r13d, %eax
	movl	%r13d, j(%rip)
	addl	$1, %eax
	movl	%eax, 36(%rsp)
	je	.L3
	movq	16(%rsp), %r15
	movq	48(%rsp), %rax
	movl	%r13d, %r13d
	movq	56(%rsp), %rdi
	movq	8(%rsp), %r14
	addq	%r15, %rax
	movq	-24008(%rax,%rdi), %rsi
	movq	24(%rsp), %rax
	leaq	-8+a(%rip), %rdi
	movq	(%r14), %r12
	subq	%r13, %rax
	leaq	(%rdi,%rax,8), %r13
	movq	%r12, %rdx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L13:
	movq	(%r14), %rdx
.L5:
	leaq	(%r15,%rbp), %rax
	subq	%rsi, %rdx
	movq	%r12, %rcx
	subq	$8, %r14
	subq	(%rax,%rbx), %rcx
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	subq	$8, %r15
	cvtsi2sdq	%rcx, %xmm0
	cvtsi2sdq	%rdx, %xmm1
	call	fmax@PLT
	cvttsd2siq	%xmm0, %rsi
	movq	%rsi, 8(%r15)
	cmpq	%r14, %r13
	jne	.L13
	movl	$-1, j(%rip)
.L3:
	addq	$24016, 16(%rsp)
	movl	36(%rsp), %r13d
	subq	$24008, %rbp
	addq	$24008, %rbx
	addq	$8, 8(%rsp)
	addq	$1, 24(%rsp)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L12:
	movslq	%r13d, %rax
	leaq	p(%rip), %rdi
	imulq	$24008, %rax, %rax
	movq	(%rdi,%rax), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	printf@PLT
	addq	$72, %rsp
	.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
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	j
	.bss
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	p
	.align 32
	.type	p, @object
	.size	p, 72048008
p:
	.zero	72048008
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 24008
a:
	.zero	24008
	.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	"%d"
.LC1:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	movslq	%edi, %rax
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	imulq	$-3001, %rax, %rcx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rax, %rdx
	leaq	a(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%eax, %r13d
	negl	%r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movslq	%r13d, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	3001(%rdi,%rcx), %rcx
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	p(%rip), %rbx
	leaq	(%rbx,%rcx,8), %rbx
	leaq	0(,%rdi,8), %rsi
	imulq	$24008, %rax, %rcx
	negq	%rax
	salq	$3, %rax
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	subq	%rsi, %rax
	movq	%rbx, 16(%rsp)
	leaq	(%rsi,%r14), %rbx
	movq	%rax, 40(%rsp)
	movq	%rdi, %rax
	leaq	-24008(%rcx), %rbp
	negq	%rax
	movq	%rdi, 24(%rsp)
	leaq	(%rcx,%rax,8), %rax
	movq	%rbx, 8(%rsp)
	movq	%rcx, %rbx
	movq	%rax, 48(%rsp)
	movl	$1, %eax
	negq	%rbx
	subl	%edx, %eax
	cltq
	imulq	$24016, %rax, %rax
	movq	%rax, 56(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rsi
	xorl	%eax, %eax
	addq	40(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	je	.L12
	movl	%r13d, %eax
	movl	%r13d, j(%rip)
	addl	$1, %eax
	movl	%eax, 36(%rsp)
	je	.L3
	movq	16(%rsp), %r15
	movq	48(%rsp), %rax
	movl	%r13d, %r13d
	movq	56(%rsp), %rdi
	movq	8(%rsp), %r14
	addq	%r15, %rax
	movq	-24008(%rax,%rdi), %rsi
	movq	24(%rsp), %rax
	leaq	-8+a(%rip), %rdi
	movq	(%r14), %r12
	subq	%r13, %rax
	leaq	(%rdi,%rax,8), %r13
	movq	%r12, %rdx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L13:
	movq	(%r14), %rdx
.L5:
	leaq	(%r15,%rbp), %rax
	subq	%rsi, %rdx
	movq	%r12, %rcx
	subq	$8, %r14
	subq	(%rax,%rbx), %rcx
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	subq	$8, %r15
	cvtsi2sdq	%rcx, %xmm0
	cvtsi2sdq	%rdx, %xmm1
	call	fmax@PLT
	cvttsd2siq	%xmm0, %rsi
	movq	%rsi, 8(%r15)
	cmpq	%r14, %r13
	jne	.L13
	movl	$-1, j(%rip)
.L3:
	addq	$24016, 16(%rsp)
	movl	36(%rsp), %r13d
	subq	$24008, %rbp
	addq	$24008, %rbx
	addq	$8, 8(%rsp)
	addq	$1, 24(%rsp)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L12:
	movslq	%r13d, %rax
	leaq	p(%rip), %rdi
	imulq	$24008, %rax, %rax
	movq	(%rdi,%rax), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	printf@PLT
	addq	$72, %rsp
	.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
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	j
	.bss
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	p
	.align 32
	.type	p, @object
	.size	p, 72048008
p:
	.zero	72048008
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 24008
a:
	.zero	24008
	.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:

long a[3001],p[3001][3001];j;main(i){for(;~scanf("%d",a-i--);)for(j=-i;j--;)p[-i][j]=fmax(a[~i]-p[~i][j],a[j]-p[-i][j+1]);printf("%ld",*p[~i]);}
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 unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
long a[3001],p[3001][3001];j;main(i){for(;~scanf("%d",a-i--);)for(j=-i;j--;)p[-i][j]=fmax(a[~i]-p[~i][j],a[j]-p[-i][j+1]);printf("%ld",*p[~i]);}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 24008
a:
	.zero	24008
	.globl	p
	.align 32
	.type	p, @object
	.size	p, 72048008
p:
	.zero	72048008
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%ld"
	.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
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	jmp	.L2
.L5:
	movl	-4(%rbp), %eax
	negl	%eax
	movl	%eax, j(%rip)
	jmp	.L3
.L4:
	movl	j(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	-4(%rbp), %edx
	movl	%edx, %ecx
	negl	%ecx
	movl	j(%rip), %edx
	addl	$1, %edx
	movslq	%edx, %rsi
	movslq	%ecx, %rdx
	imulq	$3001, %rdx, %rdx
	addq	%rsi, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	p(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	subq	%rdx, %rax
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rax, %xmm0
	movl	-4(%rbp), %eax
	notl	%eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	-4(%rbp), %edx
	movl	%edx, %ecx
	notl	%ecx
	movl	j(%rip), %edx
	movslq	%edx, %rsi
	movslq	%ecx, %rdx
	imulq	$3001, %rdx, %rdx
	addq	%rsi, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	p(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	subq	%rdx, %rax
	pxor	%xmm2, %xmm2
	cvtsi2sdq	%rax, %xmm2
	movq	%xmm2, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	fmax@PLT
	movl	-4(%rbp), %eax
	negl	%eax
	movl	%eax, %ecx
	movl	j(%rip), %edx
	cvttsd2siq	%xmm0, %rax
	movslq	%edx, %rsi
	movslq	%ecx, %rdx
	imulq	$3001, %rdx, %rdx
	addq	%rsi, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	p(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
.L3:
	movl	j(%rip), %eax
	leal	-1(%rax), %edx
	movl	%edx, j(%rip)
	testl	%eax, %eax
	jne	.L4
.L2:
	movl	-4(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -4(%rbp)
	cltq
	salq	$3, %rax
	negq	%rax
	movq	%rax, %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L5
	movl	-4(%rbp), %eax
	notl	%eax
	cltq
	imulq	$24008, %rax, %rax
	leaq	p(%rip), %rdx
	movq	(%rax,%rdx), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.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
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 24008
a:
	.zero	24008
	.globl	p
	.align 32
	.type	p, @object
	.size	p, 72048008
p:
	.zero	72048008
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%ld"
	.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
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	jmp	.L2
.L5:
	movl	-4(%rbp), %eax
	negl	%eax
	movl	%eax, j(%rip)
	jmp	.L3
.L4:
	movl	j(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	-4(%rbp), %edx
	movl	%edx, %ecx
	negl	%ecx
	movl	j(%rip), %edx
	addl	$1, %edx
	movslq	%edx, %rsi
	movslq	%ecx, %rdx
	imulq	$3001, %rdx, %rdx
	addq	%rsi, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	p(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	subq	%rdx, %rax
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rax, %xmm0
	movl	-4(%rbp), %eax
	notl	%eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	a(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	-4(%rbp), %edx
	movl	%edx, %ecx
	notl	%ecx
	movl	j(%rip), %edx
	movslq	%edx, %rsi
	movslq	%ecx, %rdx
	imulq	$3001, %rdx, %rdx
	addq	%rsi, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	p(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	subq	%rdx, %rax
	pxor	%xmm2, %xmm2
	cvtsi2sdq	%rax, %xmm2
	movq	%xmm2, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	fmax@PLT
	movl	-4(%rbp), %eax
	negl	%eax
	movl	%eax, %ecx
	movl	j(%rip), %edx
	cvttsd2siq	%xmm0, %rax
	movslq	%edx, %rsi
	movslq	%ecx, %rdx
	imulq	$3001, %rdx, %rdx
	addq	%rsi, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	p(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
.L3:
	movl	j(%rip), %eax
	leal	-1(%rax), %edx
	movl	%edx, j(%rip)
	testl	%eax, %eax
	jne	.L4
.L2:
	movl	-4(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -4(%rbp)
	cltq
	salq	$3, %rax
	negq	%rax
	movq	%rax, %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L5
	movl	-4(%rbp), %eax
	notl	%eax
	cltq
	imulq	$24008, %rax, %rax
	leaq	p(%rip), %rdx
	movq	(%rax,%rdx), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.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:
