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

```c
n,i,j,k;
long sum[444],dp[444][444];
main(a)
{
	scanf("%d",&n);
	for(;~scanf("%d",&a);i++)sum[i+1]=sum[i]+a;
	for(;j++<n;)
	{
		for(i=j-1;i--;)
		{
			dp[i][j]=9e18;
			for(k=i;++k<j;)
			{
				dp[i][j]=fmin(dp[i][j],dp[i][k]+dp[k][j]+sum[j]-sum[i]);
			}
		}
	}
	printf("%ld",dp[0][n]);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	sum
	.align 32
	.type	sum, @object
	.size	sum, 3552
sum:
	.zero	3552
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 1577088
dp:
	.zero	1577088
	.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)
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	jmp	.L2
.L3:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sum(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	i(%rip), %eax
	addl	$1, %eax
	addq	%rdx, %rcx
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sum(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L2:
	leaq	-4(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L3
	jmp	.L4
.L9:
	movl	j(%rip), %eax
	subl	$1, %eax
	movl	%eax, i(%rip)
	jmp	.L5
.L8:
	movl	i(%rip), %eax
	movl	j(%rip), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$444, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movabsq	$9000000000000000000, %rsi
	movq	%rsi, (%rdx,%rax)
	movl	i(%rip), %eax
	movl	%eax, k(%rip)
	jmp	.L6
.L7:
	movl	i(%rip), %eax
	movl	k(%rip), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$444, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	k(%rip), %eax
	movl	j(%rip), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$444, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rax
	addq	%rax, %rcx
	movl	j(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sum(%rip), %rax
	movq	(%rdx,%rax), %rax
	addq	%rax, %rcx
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sum(%rip), %rax
	movq	(%rdx,%rax), %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rdx, %xmm0
	movl	i(%rip), %eax
	movl	j(%rip), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$444, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rax
	pxor	%xmm2, %xmm2
	cvtsi2sdq	%rax, %xmm2
	movq	%xmm2, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	fmin@PLT
	movl	i(%rip), %edx
	movl	j(%rip), %ecx
	cvttsd2siq	%xmm0, %rax
	movslq	%ecx, %rcx
	movslq	%edx, %rdx
	imulq	$444, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	dp(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
.L6:
	movl	k(%rip), %eax
	addl	$1, %eax
	movl	%eax, k(%rip)
	movl	k(%rip), %edx
	movl	j(%rip), %eax
	cmpl	%eax, %edx
	jl	.L7
.L5:
	movl	i(%rip), %eax
	leal	-1(%rax), %edx
	movl	%edx, i(%rip)
	testl	%eax, %eax
	jne	.L8
.L4:
	movl	j(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, j(%rip)
	movl	n(%rip), %edx
	cmpl	%edx, %eax
	jl	.L9
	movl	n(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %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
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	n(%rip), %rsi
	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	sum(%rip), %rbx
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movl	%edi, 60(%rsp)
	movq	%rbp, %rdi
	leaq	60(%rsp), %r12
	call	scanf@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movslq	i(%rip), %rax
	movslq	60(%rsp), %rdx
	leal	1(%rax), %ecx
	addq	(%rbx,%rax,8), %rdx
	movslq	%ecx, %rsi
	movl	%ecx, i(%rip)
	movq	%rdx, (%rbx,%rsi,8)
.L2:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L3
	movl	j(%rip), %edx
	movl	n(%rip), %eax
	leal	1(%rdx), %ecx
	movl	%eax, 56(%rsp)
	movl	%ecx, j(%rip)
	cmpl	%eax, %edx
	jge	.L23
	movslq	%edx, %rdx
	movslq	%ecx, %rdi
	movl	k(%rip), %eax
	movl	%edx, 32(%rsp)
	imulq	$444, %rdx, %rdx
	movq	%rdi, 24(%rsp)
	addq	%rdi, %rdx
	leaq	dp(%rip), %rdi
	movq	%rdi, 48(%rsp)
	leaq	-3552(%rdi,%rdx,8), %rdi
	xorl	%edx, %edx
	movq	%rdi, 40(%rsp)
	.p2align 4,,10
	.p2align 3
.L10:
	movq	24(%rsp), %rdi
	movl	32(%rsp), %esi
	leal	-2(%rdi), %r14d
	testl	%esi, %esi
	je	.L6
	movslq	%r14d, %rax
	movq	48(%rsp), %rdx
	movl	%esi, 12(%rsp)
	movq	%rax, (%rsp)
	imulq	$3560, %rax, %rax
	movq	40(%rsp), %rbx
	movl	%edi, 36(%rsp)
	leaq	8(%rdx,%rax), %rax
	movq	%rax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L9:
	movl	12(%rsp), %ecx
	movl	32(%rsp), %edx
	movabsq	$9000000000000000000, %rax
	movq	(%rsp), %rdi
	movq	%rax, (%rbx)
	movl	%ecx, %eax
	cmpl	%edi, %edx
	jle	.L7
	movq	24(%rsp), %r8
	movl	%edx, %esi
	movq	16(%rsp), %r14
	movq	%rbx, %r15
	leaq	sum(%rip), %rax
	subl	%ecx, %esi
	movabsq	$9000000000000000000, %rcx
	movq	(%rax,%rdi,8), %r12
	movq	(%rax,%r8,8), %r13
	movq	%rsi, %rax
	addq	%rdi, %rax
	leaq	3552+dp(%rip), %rdi
	imulq	$444, %rax, %rax
	addq	%r8, %rax
	leaq	(%rdi,%rax,8), %rbp
	.p2align 4,,10
	.p2align 3
.L8:
	movq	3552(%r15), %rax
	addq	(%r14), %rax
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	addq	%r13, %rax
	cvtsi2sdq	%rcx, %xmm0
	addq	$3552, %r15
	addq	$8, %r14
	subq	%r12, %rax
	cvtsi2sdq	%rax, %xmm1
	call	fmin@PLT
	cvttsd2siq	%xmm0, %rcx
	movq	%rcx, (%rbx)
	cmpq	%rbp, %r15
	jne	.L8
	movl	36(%rsp), %eax
.L7:
	subq	$1, (%rsp)
	subq	$3552, %rbx
	subq	$3560, 16(%rsp)
	subl	$1, 12(%rsp)
	jne	.L9
	movl	$-1, %r14d
	movl	$1, %edx
.L6:
	addl	$1, 32(%rsp)
	movl	32(%rsp), %esi
	addq	$1, 24(%rsp)
	addq	$3560, 40(%rsp)
	cmpl	56(%rsp), %esi
	jne	.L10
	movl	56(%rsp), %edi
	movl	%r14d, i(%rip)
	leal	1(%rdi), %ecx
	movl	%ecx, j(%rip)
	testb	%dl, %dl
	je	.L5
	movl	%eax, k(%rip)
.L5:
	movslq	56(%rsp), %rax
	movq	48(%rsp), %rdi
	movq	(%rdi,%rax,8), %rsi
	leaq	.LC1(%rip), %rdi
	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
.L23:
	.cfi_restore_state
	leaq	dp(%rip), %rax
	movq	%rax, 48(%rsp)
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 1577088
dp:
	.zero	1577088
	.globl	sum
	.align 32
	.type	sum, @object
	.size	sum, 3552
sum:
	.zero	3552
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	j
	.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	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.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
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	n(%rip), %rsi
	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	sum(%rip), %rbx
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movl	%edi, 60(%rsp)
	movq	%rbp, %rdi
	leaq	60(%rsp), %r12
	call	scanf@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movslq	i(%rip), %rax
	movslq	60(%rsp), %rdx
	leal	1(%rax), %ecx
	addq	(%rbx,%rax,8), %rdx
	movslq	%ecx, %rsi
	movl	%ecx, i(%rip)
	movq	%rdx, (%rbx,%rsi,8)
.L2:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L3
	movl	j(%rip), %edx
	movl	n(%rip), %eax
	leal	1(%rdx), %ecx
	movl	%eax, 56(%rsp)
	movl	%ecx, j(%rip)
	cmpl	%eax, %edx
	jge	.L23
	movslq	%edx, %rdx
	movslq	%ecx, %rdi
	movl	k(%rip), %eax
	movl	%edx, 32(%rsp)
	imulq	$444, %rdx, %rdx
	movq	%rdi, 24(%rsp)
	addq	%rdi, %rdx
	leaq	dp(%rip), %rdi
	movq	%rdi, 48(%rsp)
	leaq	-3552(%rdi,%rdx,8), %rdi
	xorl	%edx, %edx
	movq	%rdi, 40(%rsp)
	.p2align 4,,10
	.p2align 3
.L10:
	movq	24(%rsp), %rdi
	movl	32(%rsp), %esi
	leal	-2(%rdi), %r14d
	testl	%esi, %esi
	je	.L6
	movslq	%r14d, %rax
	movq	48(%rsp), %rdx
	movl	%esi, 12(%rsp)
	movq	%rax, (%rsp)
	imulq	$3560, %rax, %rax
	movq	40(%rsp), %rbx
	movl	%edi, 36(%rsp)
	leaq	8(%rdx,%rax), %rax
	movq	%rax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L9:
	movl	12(%rsp), %ecx
	movl	32(%rsp), %edx
	movabsq	$9000000000000000000, %rax
	movq	(%rsp), %rdi
	movq	%rax, (%rbx)
	movl	%ecx, %eax
	cmpl	%edi, %edx
	jle	.L7
	movq	24(%rsp), %r8
	movl	%edx, %esi
	movq	16(%rsp), %r14
	movq	%rbx, %r15
	leaq	sum(%rip), %rax
	subl	%ecx, %esi
	movabsq	$9000000000000000000, %rcx
	movq	(%rax,%rdi,8), %r12
	movq	(%rax,%r8,8), %r13
	movq	%rsi, %rax
	addq	%rdi, %rax
	leaq	3552+dp(%rip), %rdi
	imulq	$444, %rax, %rax
	addq	%r8, %rax
	leaq	(%rdi,%rax,8), %rbp
	.p2align 4,,10
	.p2align 3
.L8:
	movq	3552(%r15), %rax
	addq	(%r14), %rax
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	addq	%r13, %rax
	cvtsi2sdq	%rcx, %xmm0
	addq	$3552, %r15
	addq	$8, %r14
	subq	%r12, %rax
	cvtsi2sdq	%rax, %xmm1
	call	fmin@PLT
	cvttsd2siq	%xmm0, %rcx
	movq	%rcx, (%rbx)
	cmpq	%rbp, %r15
	jne	.L8
	movl	36(%rsp), %eax
.L7:
	subq	$1, (%rsp)
	subq	$3552, %rbx
	subq	$3560, 16(%rsp)
	subl	$1, 12(%rsp)
	jne	.L9
	movl	$-1, %r14d
	movl	$1, %edx
.L6:
	addl	$1, 32(%rsp)
	movl	32(%rsp), %esi
	addq	$1, 24(%rsp)
	addq	$3560, 40(%rsp)
	cmpl	56(%rsp), %esi
	jne	.L10
	movl	56(%rsp), %edi
	movl	%r14d, i(%rip)
	leal	1(%rdi), %ecx
	movl	%ecx, j(%rip)
	testb	%dl, %dl
	je	.L5
	movl	%eax, k(%rip)
.L5:
	movslq	56(%rsp), %rax
	movq	48(%rsp), %rdi
	movq	(%rdi,%rax,8), %rsi
	leaq	.LC1(%rip), %rdi
	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
.L23:
	.cfi_restore_state
	leaq	dp(%rip), %rax
	movq	%rax, 48(%rsp)
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 1577088
dp:
	.zero	1577088
	.globl	sum
	.align 32
	.type	sum, @object
	.size	sum, 3552
sum:
	.zero	3552
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	j
	.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	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.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:

n,i,j,k;
long sum[444],dp[444][444];
main(a)
{
	scanf("%d",&n);
	for(;~scanf("%d",&a);i++)sum[i+1]=sum[i]+a;
	for(;j++<n;)
	{
		for(i=j-1;i--;)
		{
			dp[i][j]=9e18;
			for(k=i;++k<j;)
			{
				dp[i][j]=fmin(dp[i][j],dp[i][k]+dp[k][j]+sum[j]-sum[i]);
			}
		}
	}
	printf("%ld",dp[0][n]);
}
6
7 9 8 6 1 1
 5
10 8 10 10 10
 3
1001000000 1000000000 1000000000
 4
10 20 30 46
 6
7 9 13 6 1 1
 5
19 8 10 10 10
 3
1001000000 1000000001 1000000000
 4
10 5 30 46
 6
7 9 13 6 1 2
 5
19 8 10 10 1

74 114 5001000000 196 84 132 5001000002 151 88 106
Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
n,i,j,k;
long sum[444],dp[444][444];
main(a)
{
	scanf("%d",&n);
	for(;~scanf("%d",&a);i++)sum[i+1]=sum[i]+a;
	for(;j++<n;)
	{
		for(i=j-1;i--;)
		{
			dp[i][j]=9e18;
			for(k=i;++k<j;)
			{
				dp[i][j]=fmin(dp[i][j],dp[i][k]+dp[k][j]+sum[j]-sum[i]);
			}
		}
	}
	printf("%ld",dp[0][n]);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	sum
	.align 32
	.type	sum, @object
	.size	sum, 3552
sum:
	.zero	3552
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 1577088
dp:
	.zero	1577088
	.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)
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	jmp	.L2
.L3:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sum(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	i(%rip), %eax
	addl	$1, %eax
	addq	%rdx, %rcx
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sum(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L2:
	leaq	-4(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L3
	jmp	.L4
.L9:
	movl	j(%rip), %eax
	subl	$1, %eax
	movl	%eax, i(%rip)
	jmp	.L5
.L8:
	movl	i(%rip), %eax
	movl	j(%rip), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$444, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movabsq	$9000000000000000000, %rsi
	movq	%rsi, (%rdx,%rax)
	movl	i(%rip), %eax
	movl	%eax, k(%rip)
	jmp	.L6
.L7:
	movl	i(%rip), %eax
	movl	k(%rip), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$444, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	k(%rip), %eax
	movl	j(%rip), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$444, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rax
	addq	%rax, %rcx
	movl	j(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sum(%rip), %rax
	movq	(%rdx,%rax), %rax
	addq	%rax, %rcx
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sum(%rip), %rax
	movq	(%rdx,%rax), %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rdx, %xmm0
	movl	i(%rip), %eax
	movl	j(%rip), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$444, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rax
	pxor	%xmm2, %xmm2
	cvtsi2sdq	%rax, %xmm2
	movq	%xmm2, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	fmin@PLT
	movl	i(%rip), %edx
	movl	j(%rip), %ecx
	cvttsd2siq	%xmm0, %rax
	movslq	%ecx, %rcx
	movslq	%edx, %rdx
	imulq	$444, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	dp(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
.L6:
	movl	k(%rip), %eax
	addl	$1, %eax
	movl	%eax, k(%rip)
	movl	k(%rip), %edx
	movl	j(%rip), %eax
	cmpl	%eax, %edx
	jl	.L7
.L5:
	movl	i(%rip), %eax
	leal	-1(%rax), %edx
	movl	%edx, i(%rip)
	testl	%eax, %eax
	jne	.L8
.L4:
	movl	j(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, j(%rip)
	movl	n(%rip), %edx
	cmpl	%edx, %eax
	jl	.L9
	movl	n(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %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	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	sum
	.align 32
	.type	sum, @object
	.size	sum, 3552
sum:
	.zero	3552
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 1577088
dp:
	.zero	1577088
	.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)
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	jmp	.L2
.L3:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sum(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	i(%rip), %eax
	addl	$1, %eax
	addq	%rdx, %rcx
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sum(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L2:
	leaq	-4(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L3
	jmp	.L4
.L9:
	movl	j(%rip), %eax
	subl	$1, %eax
	movl	%eax, i(%rip)
	jmp	.L5
.L8:
	movl	i(%rip), %eax
	movl	j(%rip), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$444, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movabsq	$9000000000000000000, %rsi
	movq	%rsi, (%rdx,%rax)
	movl	i(%rip), %eax
	movl	%eax, k(%rip)
	jmp	.L6
.L7:
	movl	i(%rip), %eax
	movl	k(%rip), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$444, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	k(%rip), %eax
	movl	j(%rip), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$444, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rax
	addq	%rax, %rcx
	movl	j(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sum(%rip), %rax
	movq	(%rdx,%rax), %rax
	addq	%rax, %rcx
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	sum(%rip), %rax
	movq	(%rdx,%rax), %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rdx, %xmm0
	movl	i(%rip), %eax
	movl	j(%rip), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$444, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rax
	pxor	%xmm2, %xmm2
	cvtsi2sdq	%rax, %xmm2
	movq	%xmm2, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	fmin@PLT
	movl	i(%rip), %edx
	movl	j(%rip), %ecx
	cvttsd2siq	%xmm0, %rax
	movslq	%ecx, %rcx
	movslq	%edx, %rdx
	imulq	$444, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	dp(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
.L6:
	movl	k(%rip), %eax
	addl	$1, %eax
	movl	%eax, k(%rip)
	movl	k(%rip), %edx
	movl	j(%rip), %eax
	cmpl	%eax, %edx
	jl	.L7
.L5:
	movl	i(%rip), %eax
	leal	-1(%rax), %edx
	movl	%edx, i(%rip)
	testl	%eax, %eax
	jne	.L8
.L4:
	movl	j(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, j(%rip)
	movl	n(%rip), %edx
	cmpl	%edx, %eax
	jl	.L9
	movl	n(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %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:
