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<stdlib.h>
#define N 501
#define MAX 1e308
int main(void){
  int n;
  double p[N],q[N];
  double psum[N][N],qsum[N][N]; // e.g. psum[0][2]=p[0]+p[1]+p[2], used for making tree deeper
  double et[N][N];
  int i,j,k,h;
  double tmp;
  scanf("%d",&n);
  for(i=0;i<n;++i) scanf("%lf",&p[i]);
  for(i=0;i<n+1;++i) scanf("%lf",&q[i]);
  // calc psum,qsum
  for(i=0;i<n;++i){
    psum[i][i]=p[i];
    qsum[i][i]=q[i];
    for(j=i+1;j<n;++j){
      psum[i][j]=psum[i][j-1]+p[j];
      qsum[i][j]=qsum[i][j-1]+q[j];
    }
    qsum[i][n]=qsum[i][n-1]+q[n];
  }
  qsum[n][n]=q[n];
  // calc et
  for(h=0;h<n+1;++h){
    for(i=0;i<n+1-h;++i){
      if(h==0) et[i][i]=q[i];
      else{
        et[i][i+h]=MAX;
        for(k=0;k<h;++k){
          tmp=et[i][i+k]+et[i+k+1][i+h]+psum[i][i+h-1]+qsum[i][i+h]; // combine 2 tree and make it deeper once
          if(tmp<et[i][i+h]) et[i][i+h]=tmp;
        }
      }
      //printf("et[%d][%d]=%f\n",i,i+h,et[i][i+h]);
    }
  }
  printf("%lf\n",et[0][n]);
  return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lf"
.LC3:
	.string	"%lf\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-6029312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2800, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-6032108(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -6032104(%rbp)
	jmp	.L2
.L3:
	leaq	-6032080(%rbp), %rdx
	movl	-6032104(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -6032104(%rbp)
.L2:
	movl	-6032108(%rbp), %eax
	cmpl	%eax, -6032104(%rbp)
	jl	.L3
	movl	$0, -6032104(%rbp)
	jmp	.L4
.L5:
	leaq	-6028064(%rbp), %rdx
	movl	-6032104(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -6032104(%rbp)
.L4:
	movl	-6032108(%rbp), %eax
	cmpl	%eax, -6032104(%rbp)
	jle	.L5
	movl	$0, -6032104(%rbp)
	jmp	.L6
.L9:
	movl	-6032104(%rbp), %eax
	cltq
	movsd	-6032080(%rbp,%rax,8), %xmm0
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$4016, %rax, %rax
	addq	%rbp, %rax
	subq	$6024048, %rax
	movsd	%xmm0, (%rax)
	movl	-6032104(%rbp), %eax
	cltq
	movsd	-6028064(%rbp,%rax,8), %xmm0
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$4016, %rax, %rax
	addq	%rbp, %rax
	subq	$4016032, %rax
	movsd	%xmm0, (%rax)
	movl	-6032104(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -6032100(%rbp)
	jmp	.L7
.L8:
	movl	-6032100(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	-6024048(%rbp,%rax,8), %xmm1
	movl	-6032100(%rbp), %eax
	cltq
	movsd	-6032080(%rbp,%rax,8), %xmm0
	addsd	%xmm1, %xmm0
	movl	-6032100(%rbp), %eax
	movslq	%eax, %rdx
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	%xmm0, -6024048(%rbp,%rax,8)
	movl	-6032100(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	-4016032(%rbp,%rax,8), %xmm1
	movl	-6032100(%rbp), %eax
	cltq
	movsd	-6028064(%rbp,%rax,8), %xmm0
	addsd	%xmm1, %xmm0
	movl	-6032100(%rbp), %eax
	movslq	%eax, %rdx
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	%xmm0, -4016032(%rbp,%rax,8)
	addl	$1, -6032100(%rbp)
.L7:
	movl	-6032108(%rbp), %eax
	cmpl	%eax, -6032100(%rbp)
	jl	.L8
	movl	-6032108(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	-4016032(%rbp,%rax,8), %xmm1
	movl	-6032108(%rbp), %eax
	cltq
	movsd	-6028064(%rbp,%rax,8), %xmm0
	movl	-6032108(%rbp), %eax
	addsd	%xmm1, %xmm0
	movslq	%eax, %rdx
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	%xmm0, -4016032(%rbp,%rax,8)
	addl	$1, -6032104(%rbp)
.L6:
	movl	-6032108(%rbp), %eax
	cmpl	%eax, -6032104(%rbp)
	jl	.L9
	movl	-6032108(%rbp), %eax
	movl	-6032108(%rbp), %edx
	movl	-6032108(%rbp), %ecx
	cltq
	movsd	-6028064(%rbp,%rax,8), %xmm0
	movslq	%ecx, %rcx
	movslq	%edx, %rax
	imulq	$501, %rax, %rax
	addq	%rcx, %rax
	movsd	%xmm0, -4016032(%rbp,%rax,8)
	movl	$0, -6032092(%rbp)
	jmp	.L10
.L19:
	movl	$0, -6032104(%rbp)
	jmp	.L11
.L18:
	cmpl	$0, -6032092(%rbp)
	jne	.L12
	movl	-6032104(%rbp), %eax
	cltq
	movsd	-6028064(%rbp,%rax,8), %xmm0
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$4016, %rax, %rax
	addq	%rbp, %rax
	subq	$2008016, %rax
	movsd	%xmm0, (%rax)
	jmp	.L13
.L12:
	movl	-6032104(%rbp), %edx
	movl	-6032092(%rbp), %eax
	addl	%edx, %eax
	movslq	%eax, %rdx
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	.LC2(%rip), %xmm0
	movsd	%xmm0, -2008016(%rbp,%rax,8)
	movl	$0, -6032096(%rbp)
	jmp	.L14
.L17:
	movl	-6032104(%rbp), %edx
	movl	-6032096(%rbp), %eax
	addl	%edx, %eax
	movslq	%eax, %rdx
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	-2008016(%rbp,%rax,8), %xmm1
	movl	-6032104(%rbp), %edx
	movl	-6032096(%rbp), %eax
	addl	%edx, %eax
	addl	$1, %eax
	movl	-6032104(%rbp), %ecx
	movl	-6032092(%rbp), %edx
	addl	%ecx, %edx
	movslq	%edx, %rdx
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	-2008016(%rbp,%rax,8), %xmm0
	addsd	%xmm0, %xmm1
	movl	-6032104(%rbp), %edx
	movl	-6032092(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	-6024048(%rbp,%rax,8), %xmm0
	addsd	%xmm0, %xmm1
	movl	-6032104(%rbp), %edx
	movl	-6032092(%rbp), %eax
	addl	%edx, %eax
	movslq	%eax, %rdx
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	-4016032(%rbp,%rax,8), %xmm0
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -6032088(%rbp)
	movl	-6032104(%rbp), %edx
	movl	-6032092(%rbp), %eax
	addl	%edx, %eax
	movslq	%eax, %rdx
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	-2008016(%rbp,%rax,8), %xmm0
	comisd	-6032088(%rbp), %xmm0
	jbe	.L15
	movl	-6032104(%rbp), %edx
	movl	-6032092(%rbp), %eax
	addl	%edx, %eax
	movslq	%eax, %rdx
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	-6032088(%rbp), %xmm0
	movsd	%xmm0, -2008016(%rbp,%rax,8)
.L15:
	addl	$1, -6032096(%rbp)
.L14:
	movl	-6032096(%rbp), %eax
	cmpl	-6032092(%rbp), %eax
	jl	.L17
.L13:
	addl	$1, -6032104(%rbp)
.L11:
	movl	-6032108(%rbp), %eax
	addl	$1, %eax
	subl	-6032092(%rbp), %eax
	cmpl	%eax, -6032104(%rbp)
	jl	.L18
	addl	$1, -6032092(%rbp)
.L10:
	movl	-6032108(%rbp), %eax
	cmpl	%eax, -6032092(%rbp)
	jle	.L19
	movl	-6032108(%rbp), %eax
	cltq
	movq	-2008016(%rbp,%rax,8), %rax
	movq	%rax, %xmm0
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC2:
	.long	-2048145248
	.long	2145504499
	.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
.LC1:
	.string	"%d"
.LC2:
	.string	"%lf"
.LC3:
	.string	"%lf\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-6029312(%rsp), %r11
	.cfi_def_cfa 11, 6029368
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2840, %rsp
	.cfi_def_cfa_offset 6032208
	leaq	.LC1(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 6032136(%rsp)
	xorl	%eax, %eax
	leaq	60(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	60(%rsp), %r11d
	testl	%r11d, %r11d
	jle	.L2
	leaq	64(%rsp), %rbp
	xorl	%ebx, %ebx
	leaq	.LC2(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	60(%rsp), %r11d
	addq	$8, %rbp
	cmpl	%ebx, %r11d
	jg	.L3
.L2:
	testl	%r11d, %r11d
	js	.L40
	leaq	4080(%rsp), %rbx
	xorl	%ebp, %ebp
	leaq	.LC2(%rip), %r13
	movq	%rbx, %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	60(%rsp), %r11d
	addq	$8, %r12
	cmpl	%ebp, %r11d
	jge	.L5
	testl	%r11d, %r11d
	jle	.L6
	movsd	64(%rsp), %xmm0
	leal	-1(%r11), %ebp
	movsd	%xmm0, 8096(%rsp)
	movsd	4080(%rsp), %xmm0
	movsd	%xmm0, 2016112(%rsp)
	cmpl	$1, %r11d
	je	.L41
	movslq	%r11d, %r12
	leaq	2016112(%rsp), %r10
	leaq	8096(%rsp), %rcx
	movl	$1, %edi
	movq	%r12, 40(%rsp)
	movq	%r10, %rdx
	leaq	64(%rsp), %rsi
	movslq	%ebp, %rbp
	leaq	2020128(%rsp), %r9
	leaq	12112(%rsp), %r8
	movsd	4080(%rsp,%r12,8), %xmm2
	.p2align 4,,10
	.p2align 3
.L19:
	movsd	-4016(%r9), %xmm1
	movq	%rdi, %rax
	movsd	-4016(%r8), %xmm0
	.p2align 4,,10
	.p2align 3
.L8:
	addsd	(%rsi,%rax,8), %xmm0
	addsd	(%rbx,%rax,8), %xmm1
	movsd	%xmm0, (%rcx,%rax,8)
	movsd	%xmm1, (%rdx,%rax,8)
	addq	$1, %rax
	cmpl	%eax, %r11d
	jg	.L8
	movsd	(%rdx,%rbp,8), %xmm0
	addq	$4008, %rcx
	addq	$4016, %r9
	addq	$4016, %r8
	addsd	%xmm2, %xmm0
	movsd	%xmm0, (%rdx,%r12,8)
	movsd	(%rsi,%rdi,8), %xmm0
	addq	$4008, %rdx
	movsd	%xmm0, -4016(%r8)
	movsd	(%rbx,%rdi,8), %xmm0
	addq	$1, %rdi
	movsd	%xmm0, -4016(%r9)
	cmpq	%r12, %rdi
	jne	.L19
.L7:
	imulq	$501, %rbp, %rax
	movq	40(%rsp), %rsi
	imulq	$4016, %rbp, %rbp
	movsd	4080(%rsp,%rsi,8), %xmm0
	addq	%rsi, %rax
	movsd	2016112(%rsp,%rbp), %xmm1
	addsd	%xmm0, %xmm1
	movsd	%xmm1, 2016112(%rsp,%rax,8)
	imulq	$4016, %rsi, %rax
	movsd	%xmm0, 2016112(%rsp,%rax)
.L10:
	leaq	4024128(%rsp), %r14
	leaq	4024136(%rsp), %rax
	xorl	%ebp, %ebp
	movq	%r10, 24(%rsp)
	movq	%r14, 16(%rsp)
	movsd	.LC0(%rip), %xmm4
	movl	$-1, %r15d
	movq	%rax, 32(%rsp)
	movl	%r11d, 12(%rsp)
	.p2align 4,,10
	.p2align 3
.L16:
	movl	12(%rsp), %eax
	subl	%r15d, %eax
	testl	%eax, %eax
	jle	.L18
	movq	32(%rsp), %rdi
	movl	12(%rsp), %r11d
	movl	%r15d, %eax
	movl	%ebp, %r12d
	movq	24(%rsp), %r10
	movq	16(%rsp), %rcx
	movq	%r14, %r8
	xorl	%r9d, %r9d
	leaq	(%rdi,%rax,8), %rsi
	subl	%ebp, %r11d
	leal	-1(%rbp), %r13d
	xorl	%edi, %edi
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L42:
	movsd	(%rbx,%rdi,8), %xmm0
	movsd	%xmm0, (%r8)
.L12:
	leaq	1(%rdi), %rax
	addq	$4016, %r8
	addq	$4016, %rcx
	addq	$4016, %rsi
	addq	$4016, %r10
	addq	$501, %r9
	cmpq	%r11, %rdi
	je	.L18
	movq	%rax, %rdi
.L15:
	testq	%rbp, %rbp
	je	.L42
	movslq	%edi, %rax
	leal	0(%r13,%rdi), %edx
	movsd	%xmm4, (%rcx)
	movapd	%xmm4, %xmm1
	imulq	$501, %rax, %rax
	movslq	%edx, %rdx
	movsd	(%r10), %xmm2
	addq	%rdx, %rax
	movsd	8096(%rsp,%rax,8), %xmm3
	leal	(%r12,%rdi), %eax
	addq	%r9, %rax
	leaq	(%r14,%rax,8), %rdx
	movq	%r8, %rax
	.p2align 4,,10
	.p2align 3
.L14:
	movsd	4008(%rdx), %xmm0
	addsd	(%rax), %xmm0
	addq	$8, %rax
	addq	$4008, %rdx
	addsd	%xmm3, %xmm0
	addsd	%xmm2, %xmm0
	minsd	%xmm1, %xmm0
	movapd	%xmm0, %xmm1
	movsd	%xmm0, (%rcx)
	cmpq	%rsi, %rax
	jne	.L14
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L18:
	addq	$8, 16(%rsp)
	addq	$1, %rbp
	addl	$1, %r15d
	addq	$8, 24(%rsp)
	cmpl	%ebp, 12(%rsp)
	jge	.L16
.L4:
	movq	40(%rsp), %rax
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	movsd	4024128(%rsp,%rax,8), %xmm0
	movl	$1, %eax
	call	__printf_chk@PLT
	movq	6032136(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L43
	addq	$6032152, %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
.L40:
	.cfi_restore_state
	movslq	%r11d, %rax
	movq	%rax, 40(%rsp)
	jmp	.L4
.L6:
	movslq	%r11d, %rcx
	leaq	2016112(%rsp), %r10
	imulq	$4016, %rcx, %rax
	movq	%rcx, 40(%rsp)
	movsd	4080(%rsp,%rcx,8), %xmm0
	movsd	%xmm0, 2016112(%rsp,%rax)
	testl	%r11d, %r11d
	jne	.L4
	jmp	.L10
.L41:
	movq	$1, 40(%rsp)
	leaq	2016112(%rsp), %r10
	movslq	%ebp, %rbp
	jmp	.L7
.L43:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	-2048145248
	.long	2145504499
	.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
.LC1:
	.string	"%d"
.LC2:
	.string	"%lf"
.LC3:
	.string	"%lf\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-6029312(%rsp), %r11
	.cfi_def_cfa 11, 6029368
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2840, %rsp
	.cfi_def_cfa_offset 6032208
	leaq	.LC1(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 6032136(%rsp)
	xorl	%eax, %eax
	leaq	60(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	60(%rsp), %r11d
	testl	%r11d, %r11d
	jle	.L2
	leaq	64(%rsp), %rbp
	xorl	%ebx, %ebx
	leaq	.LC2(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	60(%rsp), %r11d
	addq	$8, %rbp
	cmpl	%ebx, %r11d
	jg	.L3
.L2:
	testl	%r11d, %r11d
	js	.L40
	leaq	4080(%rsp), %rbx
	xorl	%ebp, %ebp
	leaq	.LC2(%rip), %r13
	movq	%rbx, %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	60(%rsp), %r11d
	addq	$8, %r12
	cmpl	%ebp, %r11d
	jge	.L5
	testl	%r11d, %r11d
	jle	.L6
	movsd	64(%rsp), %xmm0
	leal	-1(%r11), %ebp
	movsd	%xmm0, 8096(%rsp)
	movsd	4080(%rsp), %xmm0
	movsd	%xmm0, 2016112(%rsp)
	cmpl	$1, %r11d
	je	.L41
	movslq	%r11d, %r12
	leaq	2016112(%rsp), %r10
	leaq	8096(%rsp), %rcx
	movl	$1, %edi
	movq	%r12, 40(%rsp)
	movq	%r10, %rdx
	leaq	64(%rsp), %rsi
	movslq	%ebp, %rbp
	leaq	2020128(%rsp), %r9
	leaq	12112(%rsp), %r8
	movsd	4080(%rsp,%r12,8), %xmm2
	.p2align 4,,10
	.p2align 3
.L19:
	movsd	-4016(%r9), %xmm1
	movq	%rdi, %rax
	movsd	-4016(%r8), %xmm0
	.p2align 4,,10
	.p2align 3
.L8:
	addsd	(%rsi,%rax,8), %xmm0
	addsd	(%rbx,%rax,8), %xmm1
	movsd	%xmm0, (%rcx,%rax,8)
	movsd	%xmm1, (%rdx,%rax,8)
	addq	$1, %rax
	cmpl	%eax, %r11d
	jg	.L8
	movsd	(%rdx,%rbp,8), %xmm0
	addq	$4008, %rcx
	addq	$4016, %r9
	addq	$4016, %r8
	addsd	%xmm2, %xmm0
	movsd	%xmm0, (%rdx,%r12,8)
	movsd	(%rsi,%rdi,8), %xmm0
	addq	$4008, %rdx
	movsd	%xmm0, -4016(%r8)
	movsd	(%rbx,%rdi,8), %xmm0
	addq	$1, %rdi
	movsd	%xmm0, -4016(%r9)
	cmpq	%r12, %rdi
	jne	.L19
.L7:
	imulq	$501, %rbp, %rax
	movq	40(%rsp), %rsi
	imulq	$4016, %rbp, %rbp
	movsd	4080(%rsp,%rsi,8), %xmm0
	addq	%rsi, %rax
	movsd	2016112(%rsp,%rbp), %xmm1
	addsd	%xmm0, %xmm1
	movsd	%xmm1, 2016112(%rsp,%rax,8)
	imulq	$4016, %rsi, %rax
	movsd	%xmm0, 2016112(%rsp,%rax)
.L10:
	leaq	4024128(%rsp), %r14
	leaq	4024136(%rsp), %rax
	xorl	%ebp, %ebp
	movq	%r10, 24(%rsp)
	movq	%r14, 16(%rsp)
	movsd	.LC0(%rip), %xmm4
	movl	$-1, %r15d
	movq	%rax, 32(%rsp)
	movl	%r11d, 12(%rsp)
	.p2align 4,,10
	.p2align 3
.L16:
	movl	12(%rsp), %eax
	subl	%r15d, %eax
	testl	%eax, %eax
	jle	.L18
	movq	32(%rsp), %rdi
	movl	12(%rsp), %r11d
	movl	%r15d, %eax
	movl	%ebp, %r12d
	movq	24(%rsp), %r10
	movq	16(%rsp), %rcx
	movq	%r14, %r8
	xorl	%r9d, %r9d
	leaq	(%rdi,%rax,8), %rsi
	subl	%ebp, %r11d
	leal	-1(%rbp), %r13d
	xorl	%edi, %edi
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L42:
	movsd	(%rbx,%rdi,8), %xmm0
	movsd	%xmm0, (%r8)
.L12:
	leaq	1(%rdi), %rax
	addq	$4016, %r8
	addq	$4016, %rcx
	addq	$4016, %rsi
	addq	$4016, %r10
	addq	$501, %r9
	cmpq	%r11, %rdi
	je	.L18
	movq	%rax, %rdi
.L15:
	testq	%rbp, %rbp
	je	.L42
	movslq	%edi, %rax
	leal	0(%r13,%rdi), %edx
	movsd	%xmm4, (%rcx)
	movapd	%xmm4, %xmm1
	imulq	$501, %rax, %rax
	movslq	%edx, %rdx
	movsd	(%r10), %xmm2
	addq	%rdx, %rax
	movsd	8096(%rsp,%rax,8), %xmm3
	leal	(%r12,%rdi), %eax
	addq	%r9, %rax
	leaq	(%r14,%rax,8), %rdx
	movq	%r8, %rax
	.p2align 4,,10
	.p2align 3
.L14:
	movsd	4008(%rdx), %xmm0
	addsd	(%rax), %xmm0
	addq	$8, %rax
	addq	$4008, %rdx
	addsd	%xmm3, %xmm0
	addsd	%xmm2, %xmm0
	minsd	%xmm1, %xmm0
	movapd	%xmm0, %xmm1
	movsd	%xmm0, (%rcx)
	cmpq	%rsi, %rax
	jne	.L14
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L18:
	addq	$8, 16(%rsp)
	addq	$1, %rbp
	addl	$1, %r15d
	addq	$8, 24(%rsp)
	cmpl	%ebp, 12(%rsp)
	jge	.L16
.L4:
	movq	40(%rsp), %rax
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	movsd	4024128(%rsp,%rax,8), %xmm0
	movl	$1, %eax
	call	__printf_chk@PLT
	movq	6032136(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L43
	addq	$6032152, %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
.L40:
	.cfi_restore_state
	movslq	%r11d, %rax
	movq	%rax, 40(%rsp)
	jmp	.L4
.L6:
	movslq	%r11d, %rcx
	leaq	2016112(%rsp), %r10
	imulq	$4016, %rcx, %rax
	movq	%rcx, 40(%rsp)
	movsd	4080(%rsp,%rcx,8), %xmm0
	movsd	%xmm0, 2016112(%rsp,%rax)
	testl	%r11d, %r11d
	jne	.L4
	jmp	.L10
.L41:
	movq	$1, 40(%rsp)
	leaq	2016112(%rsp), %r10
	movslq	%ebp, %rbp
	jmp	.L7
.L43:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	-2048145248
	.long	2145504499
	.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<stdlib.h>
#define N 501
#define MAX 1e308
int main(void){
  int n;
  double p[N],q[N];
  double psum[N][N],qsum[N][N]; // e.g. psum[0][2]=p[0]+p[1]+p[2], used for making tree deeper
  double et[N][N];
  int i,j,k,h;
  double tmp;
  scanf("%d",&n);
  for(i=0;i<n;++i) scanf("%lf",&p[i]);
  for(i=0;i<n+1;++i) scanf("%lf",&q[i]);
  // calc psum,qsum
  for(i=0;i<n;++i){
    psum[i][i]=p[i];
    qsum[i][i]=q[i];
    for(j=i+1;j<n;++j){
      psum[i][j]=psum[i][j-1]+p[j];
      qsum[i][j]=qsum[i][j-1]+q[j];
    }
    qsum[i][n]=qsum[i][n-1]+q[n];
  }
  qsum[n][n]=q[n];
  // calc et
  for(h=0;h<n+1;++h){
    for(i=0;i<n+1-h;++i){
      if(h==0) et[i][i]=q[i];
      else{
        et[i][i+h]=MAX;
        for(k=0;k<h;++k){
          tmp=et[i][i+k]+et[i+k+1][i+h]+psum[i][i+h-1]+qsum[i][i+h]; // combine 2 tree and make it deeper once
          if(tmp<et[i][i+h]) et[i][i+h]=tmp;
        }
      }
      //printf("et[%d][%d]=%f\n",i,i+h,et[i][i+h]);
    }
  }
  printf("%lf\n",et[0][n]);
  return 0;
}


5
0.1500 0.1000 0.0500 0.1000 0.2000
0.0500 0.1000 0.0500 0.0500 0.0500 0.1000
 5
0.1500 0.1000 0.0500 0.1000 0.2000
0.0500 0.1000 0.0500 0.0500 0.0500 0.1000
 7
0.0400 0.0600 0.0800 0.0200 0.1000 0.1200 0.1400
0.0600 0.0600 0.0600 0.0600 0.0500 0.0500 0.0500 0.0500

2.750000
 2.750000
 3.120000

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<stdlib.h>
#define N 501
#define MAX 1e308
int main(void){
  int n;
  double p[N],q[N];
  double psum[N][N],qsum[N][N]; // e.g. psum[0][2]=p[0]+p[1]+p[2], used for making tree deeper
  double et[N][N];
  int i,j,k,h;
  double tmp;
  scanf("%d",&n);
  for(i=0;i<n;++i) scanf("%lf",&p[i]);
  for(i=0;i<n+1;++i) scanf("%lf",&q[i]);
  // calc psum,qsum
  for(i=0;i<n;++i){
    psum[i][i]=p[i];
    qsum[i][i]=q[i];
    for(j=i+1;j<n;++j){
      psum[i][j]=psum[i][j-1]+p[j];
      qsum[i][j]=qsum[i][j-1]+q[j];
    }
    qsum[i][n]=qsum[i][n-1]+q[n];
  }
  qsum[n][n]=q[n];
  // calc et
  for(h=0;h<n+1;++h){
    for(i=0;i<n+1-h;++i){
      if(h==0) et[i][i]=q[i];
      else{
        et[i][i+h]=MAX;
        for(k=0;k<h;++k){
          tmp=et[i][i+k]+et[i+k+1][i+h]+psum[i][i+h-1]+qsum[i][i+h]; // combine 2 tree and make it deeper once
          if(tmp<et[i][i+h]) et[i][i+h]=tmp;
        }
      }
      //printf("et[%d][%d]=%f\n",i,i+h,et[i][i+h]);
    }
  }
  printf("%lf\n",et[0][n]);
  return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lf"
.LC3:
	.string	"%lf\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-6029312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2800, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-6032108(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -6032104(%rbp)
	jmp	.L2
.L3:
	leaq	-6032080(%rbp), %rdx
	movl	-6032104(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -6032104(%rbp)
.L2:
	movl	-6032108(%rbp), %eax
	cmpl	%eax, -6032104(%rbp)
	jl	.L3
	movl	$0, -6032104(%rbp)
	jmp	.L4
.L5:
	leaq	-6028064(%rbp), %rdx
	movl	-6032104(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -6032104(%rbp)
.L4:
	movl	-6032108(%rbp), %eax
	cmpl	%eax, -6032104(%rbp)
	jle	.L5
	movl	$0, -6032104(%rbp)
	jmp	.L6
.L9:
	movl	-6032104(%rbp), %eax
	cltq
	movsd	-6032080(%rbp,%rax,8), %xmm0
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$4016, %rax, %rax
	addq	%rbp, %rax
	subq	$6024048, %rax
	movsd	%xmm0, (%rax)
	movl	-6032104(%rbp), %eax
	cltq
	movsd	-6028064(%rbp,%rax,8), %xmm0
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$4016, %rax, %rax
	addq	%rbp, %rax
	subq	$4016032, %rax
	movsd	%xmm0, (%rax)
	movl	-6032104(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -6032100(%rbp)
	jmp	.L7
.L8:
	movl	-6032100(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	-6024048(%rbp,%rax,8), %xmm1
	movl	-6032100(%rbp), %eax
	cltq
	movsd	-6032080(%rbp,%rax,8), %xmm0
	addsd	%xmm1, %xmm0
	movl	-6032100(%rbp), %eax
	movslq	%eax, %rdx
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	%xmm0, -6024048(%rbp,%rax,8)
	movl	-6032100(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	-4016032(%rbp,%rax,8), %xmm1
	movl	-6032100(%rbp), %eax
	cltq
	movsd	-6028064(%rbp,%rax,8), %xmm0
	addsd	%xmm1, %xmm0
	movl	-6032100(%rbp), %eax
	movslq	%eax, %rdx
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	%xmm0, -4016032(%rbp,%rax,8)
	addl	$1, -6032100(%rbp)
.L7:
	movl	-6032108(%rbp), %eax
	cmpl	%eax, -6032100(%rbp)
	jl	.L8
	movl	-6032108(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	-4016032(%rbp,%rax,8), %xmm1
	movl	-6032108(%rbp), %eax
	cltq
	movsd	-6028064(%rbp,%rax,8), %xmm0
	movl	-6032108(%rbp), %eax
	addsd	%xmm1, %xmm0
	movslq	%eax, %rdx
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	%xmm0, -4016032(%rbp,%rax,8)
	addl	$1, -6032104(%rbp)
.L6:
	movl	-6032108(%rbp), %eax
	cmpl	%eax, -6032104(%rbp)
	jl	.L9
	movl	-6032108(%rbp), %eax
	movl	-6032108(%rbp), %edx
	movl	-6032108(%rbp), %ecx
	cltq
	movsd	-6028064(%rbp,%rax,8), %xmm0
	movslq	%ecx, %rcx
	movslq	%edx, %rax
	imulq	$501, %rax, %rax
	addq	%rcx, %rax
	movsd	%xmm0, -4016032(%rbp,%rax,8)
	movl	$0, -6032092(%rbp)
	jmp	.L10
.L19:
	movl	$0, -6032104(%rbp)
	jmp	.L11
.L18:
	cmpl	$0, -6032092(%rbp)
	jne	.L12
	movl	-6032104(%rbp), %eax
	cltq
	movsd	-6028064(%rbp,%rax,8), %xmm0
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$4016, %rax, %rax
	addq	%rbp, %rax
	subq	$2008016, %rax
	movsd	%xmm0, (%rax)
	jmp	.L13
.L12:
	movl	-6032104(%rbp), %edx
	movl	-6032092(%rbp), %eax
	addl	%edx, %eax
	movslq	%eax, %rdx
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	.LC2(%rip), %xmm0
	movsd	%xmm0, -2008016(%rbp,%rax,8)
	movl	$0, -6032096(%rbp)
	jmp	.L14
.L17:
	movl	-6032104(%rbp), %edx
	movl	-6032096(%rbp), %eax
	addl	%edx, %eax
	movslq	%eax, %rdx
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	-2008016(%rbp,%rax,8), %xmm1
	movl	-6032104(%rbp), %edx
	movl	-6032096(%rbp), %eax
	addl	%edx, %eax
	addl	$1, %eax
	movl	-6032104(%rbp), %ecx
	movl	-6032092(%rbp), %edx
	addl	%ecx, %edx
	movslq	%edx, %rdx
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	-2008016(%rbp,%rax,8), %xmm0
	addsd	%xmm0, %xmm1
	movl	-6032104(%rbp), %edx
	movl	-6032092(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	-6024048(%rbp,%rax,8), %xmm0
	addsd	%xmm0, %xmm1
	movl	-6032104(%rbp), %edx
	movl	-6032092(%rbp), %eax
	addl	%edx, %eax
	movslq	%eax, %rdx
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	-4016032(%rbp,%rax,8), %xmm0
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -6032088(%rbp)
	movl	-6032104(%rbp), %edx
	movl	-6032092(%rbp), %eax
	addl	%edx, %eax
	movslq	%eax, %rdx
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	-2008016(%rbp,%rax,8), %xmm0
	comisd	-6032088(%rbp), %xmm0
	jbe	.L15
	movl	-6032104(%rbp), %edx
	movl	-6032092(%rbp), %eax
	addl	%edx, %eax
	movslq	%eax, %rdx
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	-6032088(%rbp), %xmm0
	movsd	%xmm0, -2008016(%rbp,%rax,8)
.L15:
	addl	$1, -6032096(%rbp)
.L14:
	movl	-6032096(%rbp), %eax
	cmpl	-6032092(%rbp), %eax
	jl	.L17
.L13:
	addl	$1, -6032104(%rbp)
.L11:
	movl	-6032108(%rbp), %eax
	addl	$1, %eax
	subl	-6032092(%rbp), %eax
	cmpl	%eax, -6032104(%rbp)
	jl	.L18
	addl	$1, -6032092(%rbp)
.L10:
	movl	-6032108(%rbp), %eax
	cmpl	%eax, -6032092(%rbp)
	jle	.L19
	movl	-6032108(%rbp), %eax
	cltq
	movq	-2008016(%rbp,%rax,8), %rax
	movq	%rax, %xmm0
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC2:
	.long	-2048145248
	.long	2145504499
	.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	"%d"
.LC1:
	.string	"%lf"
.LC3:
	.string	"%lf\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-6029312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2800, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-6032108(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -6032104(%rbp)
	jmp	.L2
.L3:
	leaq	-6032080(%rbp), %rdx
	movl	-6032104(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -6032104(%rbp)
.L2:
	movl	-6032108(%rbp), %eax
	cmpl	%eax, -6032104(%rbp)
	jl	.L3
	movl	$0, -6032104(%rbp)
	jmp	.L4
.L5:
	leaq	-6028064(%rbp), %rdx
	movl	-6032104(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -6032104(%rbp)
.L4:
	movl	-6032108(%rbp), %eax
	cmpl	%eax, -6032104(%rbp)
	jle	.L5
	movl	$0, -6032104(%rbp)
	jmp	.L6
.L9:
	movl	-6032104(%rbp), %eax
	cltq
	movsd	-6032080(%rbp,%rax,8), %xmm0
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$4016, %rax, %rax
	addq	%rbp, %rax
	subq	$6024048, %rax
	movsd	%xmm0, (%rax)
	movl	-6032104(%rbp), %eax
	cltq
	movsd	-6028064(%rbp,%rax,8), %xmm0
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$4016, %rax, %rax
	addq	%rbp, %rax
	subq	$4016032, %rax
	movsd	%xmm0, (%rax)
	movl	-6032104(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -6032100(%rbp)
	jmp	.L7
.L8:
	movl	-6032100(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	-6024048(%rbp,%rax,8), %xmm1
	movl	-6032100(%rbp), %eax
	cltq
	movsd	-6032080(%rbp,%rax,8), %xmm0
	addsd	%xmm1, %xmm0
	movl	-6032100(%rbp), %eax
	movslq	%eax, %rdx
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	%xmm0, -6024048(%rbp,%rax,8)
	movl	-6032100(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	-4016032(%rbp,%rax,8), %xmm1
	movl	-6032100(%rbp), %eax
	cltq
	movsd	-6028064(%rbp,%rax,8), %xmm0
	addsd	%xmm1, %xmm0
	movl	-6032100(%rbp), %eax
	movslq	%eax, %rdx
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	%xmm0, -4016032(%rbp,%rax,8)
	addl	$1, -6032100(%rbp)
.L7:
	movl	-6032108(%rbp), %eax
	cmpl	%eax, -6032100(%rbp)
	jl	.L8
	movl	-6032108(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	-4016032(%rbp,%rax,8), %xmm1
	movl	-6032108(%rbp), %eax
	cltq
	movsd	-6028064(%rbp,%rax,8), %xmm0
	movl	-6032108(%rbp), %eax
	addsd	%xmm1, %xmm0
	movslq	%eax, %rdx
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	%xmm0, -4016032(%rbp,%rax,8)
	addl	$1, -6032104(%rbp)
.L6:
	movl	-6032108(%rbp), %eax
	cmpl	%eax, -6032104(%rbp)
	jl	.L9
	movl	-6032108(%rbp), %eax
	movl	-6032108(%rbp), %edx
	movl	-6032108(%rbp), %ecx
	cltq
	movsd	-6028064(%rbp,%rax,8), %xmm0
	movslq	%ecx, %rcx
	movslq	%edx, %rax
	imulq	$501, %rax, %rax
	addq	%rcx, %rax
	movsd	%xmm0, -4016032(%rbp,%rax,8)
	movl	$0, -6032092(%rbp)
	jmp	.L10
.L19:
	movl	$0, -6032104(%rbp)
	jmp	.L11
.L18:
	cmpl	$0, -6032092(%rbp)
	jne	.L12
	movl	-6032104(%rbp), %eax
	cltq
	movsd	-6028064(%rbp,%rax,8), %xmm0
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$4016, %rax, %rax
	addq	%rbp, %rax
	subq	$2008016, %rax
	movsd	%xmm0, (%rax)
	jmp	.L13
.L12:
	movl	-6032104(%rbp), %edx
	movl	-6032092(%rbp), %eax
	addl	%edx, %eax
	movslq	%eax, %rdx
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	.LC2(%rip), %xmm0
	movsd	%xmm0, -2008016(%rbp,%rax,8)
	movl	$0, -6032096(%rbp)
	jmp	.L14
.L17:
	movl	-6032104(%rbp), %edx
	movl	-6032096(%rbp), %eax
	addl	%edx, %eax
	movslq	%eax, %rdx
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	-2008016(%rbp,%rax,8), %xmm1
	movl	-6032104(%rbp), %edx
	movl	-6032096(%rbp), %eax
	addl	%edx, %eax
	addl	$1, %eax
	movl	-6032104(%rbp), %ecx
	movl	-6032092(%rbp), %edx
	addl	%ecx, %edx
	movslq	%edx, %rdx
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	-2008016(%rbp,%rax,8), %xmm0
	addsd	%xmm0, %xmm1
	movl	-6032104(%rbp), %edx
	movl	-6032092(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	-6024048(%rbp,%rax,8), %xmm0
	addsd	%xmm0, %xmm1
	movl	-6032104(%rbp), %edx
	movl	-6032092(%rbp), %eax
	addl	%edx, %eax
	movslq	%eax, %rdx
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	-4016032(%rbp,%rax,8), %xmm0
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -6032088(%rbp)
	movl	-6032104(%rbp), %edx
	movl	-6032092(%rbp), %eax
	addl	%edx, %eax
	movslq	%eax, %rdx
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	-2008016(%rbp,%rax,8), %xmm0
	comisd	-6032088(%rbp), %xmm0
	jbe	.L15
	movl	-6032104(%rbp), %edx
	movl	-6032092(%rbp), %eax
	addl	%edx, %eax
	movslq	%eax, %rdx
	movl	-6032104(%rbp), %eax
	cltq
	imulq	$501, %rax, %rax
	addq	%rdx, %rax
	movsd	-6032088(%rbp), %xmm0
	movsd	%xmm0, -2008016(%rbp,%rax,8)
.L15:
	addl	$1, -6032096(%rbp)
.L14:
	movl	-6032096(%rbp), %eax
	cmpl	-6032092(%rbp), %eax
	jl	.L17
.L13:
	addl	$1, -6032104(%rbp)
.L11:
	movl	-6032108(%rbp), %eax
	addl	$1, %eax
	subl	-6032092(%rbp), %eax
	cmpl	%eax, -6032104(%rbp)
	jl	.L18
	addl	$1, -6032092(%rbp)
.L10:
	movl	-6032108(%rbp), %eax
	cmpl	%eax, -6032092(%rbp)
	jle	.L19
	movl	-6032108(%rbp), %eax
	cltq
	movq	-2008016(%rbp,%rax,8), %rax
	movq	%rax, %xmm0
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC2:
	.long	-2048145248
	.long	2145504499
	.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:
