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>
long long int dp[1001][1001];//動的計画法の表
int main(void){
    int i,j,n,m,d[1001],c[1001];//n=都市の数,m=日数,d=都市間の距離,c=天候
    long long int min,M;//min=最小値
    M=922337203685477580;//最大値代入
    scanf("%d %d",&n,&m);//都市の数と日数の入力
	//↓表のすべての場所にM代入
    for(i=0;i<=m;i++){
        for(j=0;j<=n;j++) dp[i][j]=M;
    }
    for(i=0;i<n;i++) scanf("%d",&d[i]);//都市間の距離の入力
    for(i=0;i<m;i++) scanf("%d",&c[i]);//天候の入力
    dp[0][0]=0;//スタート位置に0代入
    for(i=0;i<m;i++){
        for(j=0;j<=n;j++){
            if(dp[i][j]!=M){
                if(dp[i+1][j]>dp[i][j]) dp[i+1][j]=dp[i][j];//縦方向に疲労度比べて代入
                if(dp[i+1][j+1]>dp[i][j]+d[j]*c[i]) dp[i+1][j+1]=dp[i][j]+d[j]*c[i];//斜め方向に
            }
        }
    }
    min=M;//minにM代入
 /*   for(i=0;i<=m;i++){
        if(min>dp[i][n]) min=dp[i][n];//minと比べて更新
    }*/
    printf("%lld\n",dp[m][n]);//最小の疲労度出力
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 8016008
dp:
	.zero	8016008
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.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	$4096, %rsp
	orq	$0, (%rsp)
	subq	$3968, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movabsq	$922337203685477580, %rax
	movq	%rax, -8048(%rbp)
	leaq	-8060(%rbp), %rdx
	leaq	-8064(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -8056(%rbp)
	jmp	.L2
.L5:
	movl	$0, -8052(%rbp)
	jmp	.L3
.L4:
	movl	-8052(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8056(%rbp), %eax
	cltq
	imulq	$1001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rcx
	leaq	dp(%rip), %rdx
	movq	-8048(%rbp), %rax
	movq	%rax, (%rcx,%rdx)
	addl	$1, -8052(%rbp)
.L3:
	movl	-8064(%rbp), %eax
	cmpl	%eax, -8052(%rbp)
	jle	.L4
	addl	$1, -8056(%rbp)
.L2:
	movl	-8060(%rbp), %eax
	cmpl	%eax, -8056(%rbp)
	jle	.L5
	movl	$0, -8056(%rbp)
	jmp	.L6
.L7:
	leaq	-8032(%rbp), %rdx
	movl	-8056(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -8056(%rbp)
.L6:
	movl	-8064(%rbp), %eax
	cmpl	%eax, -8056(%rbp)
	jl	.L7
	movl	$0, -8056(%rbp)
	jmp	.L8
.L9:
	leaq	-4016(%rbp), %rdx
	movl	-8056(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -8056(%rbp)
.L8:
	movl	-8060(%rbp), %eax
	cmpl	%eax, -8056(%rbp)
	jl	.L9
	movq	$0, dp(%rip)
	movl	$0, -8056(%rbp)
	jmp	.L10
.L15:
	movl	$0, -8052(%rbp)
	jmp	.L11
.L14:
	movl	-8052(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8056(%rbp), %eax
	cltq
	imulq	$1001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rax
	cmpq	%rax, -8048(%rbp)
	je	.L12
	movl	-8056(%rbp), %eax
	leal	1(%rax), %edx
	movl	-8052(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$1001, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-8052(%rbp), %eax
	movslq	%eax, %rcx
	movl	-8056(%rbp), %eax
	cltq
	imulq	$1001, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rcx
	leaq	dp(%rip), %rax
	movq	(%rcx,%rax), %rax
	cmpq	%rax, %rdx
	jle	.L13
	movl	-8056(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-8052(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8056(%rbp), %eax
	cltq
	imulq	$1001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	-8052(%rbp), %edx
	movslq	%edx, %rsi
	movslq	%ecx, %rdx
	imulq	$1001, %rdx, %rdx
	addq	%rsi, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	dp(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
.L13:
	movl	-8056(%rbp), %eax
	leal	1(%rax), %edx
	movl	-8052(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$1001, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-8052(%rbp), %eax
	movslq	%eax, %rcx
	movl	-8056(%rbp), %eax
	cltq
	imulq	$1001, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rcx
	leaq	dp(%rip), %rax
	movq	(%rcx,%rax), %rsi
	movl	-8052(%rbp), %eax
	cltq
	movl	-8032(%rbp,%rax,4), %ecx
	movl	-8056(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	imull	%ecx, %eax
	cltq
	addq	%rsi, %rax
	cmpq	%rax, %rdx
	jle	.L12
	movl	-8052(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8056(%rbp), %eax
	cltq
	imulq	$1001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rsi
	movl	-8052(%rbp), %eax
	cltq
	movl	-8032(%rbp,%rax,4), %edx
	movl	-8056(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	imull	%edx, %eax
	movslq	%eax, %rcx
	movl	-8056(%rbp), %eax
	leal	1(%rax), %edx
	movl	-8052(%rbp), %eax
	addl	$1, %eax
	addq	%rsi, %rcx
	movslq	%eax, %rsi
	movslq	%edx, %rax
	imulq	$1001, %rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	%rcx, (%rdx,%rax)
.L12:
	addl	$1, -8052(%rbp)
.L11:
	movl	-8064(%rbp), %eax
	cmpl	%eax, -8052(%rbp)
	jle	.L14
	addl	$1, -8056(%rbp)
.L10:
	movl	-8060(%rbp), %eax
	cmpl	%eax, -8056(%rbp)
	jl	.L15
	movq	-8048(%rbp), %rax
	movq	%rax, -8040(%rbp)
	movl	-8060(%rbp), %eax
	movl	-8064(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$1001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	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 %d"
.LC2:
	.string	"%d"
.LC3:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$3992, %rsp
	.cfi_def_cfa_offset 8144
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8072(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rdx
	leaq	40(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	44(%rsp), %rax
	testl	%eax, %eax
	js	.L2
	movl	40(%rsp), %r10d
	leaq	dp(%rip), %rbx
	testl	%r10d, %r10d
	js	.L3
	leal	1(%r10), %ebp
	movq	%rbx, %r8
	leal	1(%rax), %r12d
	xorl	%esi, %esi
	movl	%ebp, %edx
	movl	%ebp, %r9d
	movdqa	.LC1(%rip), %xmm0
	movabsq	$922337203685477580, %rdi
	shrl	%edx
	andl	$-2, %r9d
	leal	-1(%rdx), %r11d
	addq	$1, %r11
	salq	$4, %r11
	.p2align 4,,10
	.p2align 3
.L4:
	leaq	(%r11,%r8), %rcx
	movq	%r8, %rdx
	testl	%r10d, %r10d
	je	.L57
	.p2align 4,,10
	.p2align 3
.L5:
	movups	%xmm0, (%rdx)
	addq	$16, %rdx
	cmpq	%rcx, %rdx
	jne	.L5
	movslq	%r9d, %rcx
	cmpl	%ebp, %r9d
	je	.L6
.L8:
	movslq	%esi, %rdx
	imulq	$1001, %rdx, %rdx
	addq	%rcx, %rdx
	movq	%rdi, (%rbx,%rdx,8)
.L6:
	addl	$1, %esi
	addq	$8008, %r8
	cmpl	%r12d, %esi
	jne	.L4
	testl	%r10d, %r10d
	jle	.L3
.L7:
	leaq	48(%rsp), %r12
	xorl	%ebp, %ebp
	leaq	.LC2(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	addq	$4, %r12
	cmpl	%ebp, 40(%rsp)
	jg	.L13
	movslq	44(%rsp), %rax
.L3:
	testl	%eax, %eax
	jle	.L12
	leaq	4064(%rsp), %rax
	xorl	%r12d, %r12d
	leaq	.LC2(%rip), %r13
	movq	%rax, 16(%rsp)
	movq	%rax, %r14
	movq	%rax, %rbp
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movslq	44(%rsp), %rax
	addq	$4, %r14
	cmpl	%r12d, %eax
	jg	.L14
	movq	$0, dp(%rip)
	movslq	40(%rsp), %r14
	testl	%eax, %eax
	jle	.L15
	testl	%r14d, %r14d
	js	.L15
	cmpl	$2, %eax
	jle	.L58
	leal	-3(%rax), %edx
	leaq	dp(%rip), %r15
	movl	$2, %r11d
	movabsq	$922337203685477580, %r10
	andl	$-2, %edx
	leaq	48(%rsp), %r12
	leal	4(%rdx), %edi
	movl	%edi, 12(%rsp)
	leaq	52(%rsp), %rdi
	movq	%rdi, 24(%rsp)
	leaq	(%rdi,%r14,4), %r13
.L29:
	leaq	8008(%r15), %rsi
	movq	%r12, %rdi
	movq	%r15, %rcx
	.p2align 4,,10
	.p2align 3
.L28:
	movq	(%rcx), %r8
	cmpq	%r10, %r8
	je	.L20
	cmpq	(%rsi), %r8
	jge	.L21
	movq	%r8, (%rsi)
.L21:
	movl	(%rdi), %edx
	imull	0(%rbp), %edx
	movslq	%edx, %rdx
	addq	%r8, %rdx
	cmpq	%rdx, 8(%rsi)
	jle	.L20
	movq	%rdx, 8(%rsi)
.L20:
	movq	(%rsi), %r9
	movl	%r11d, %r8d
	cmpq	%r10, %r9
	je	.L26
	cmpq	%r9, 16016(%rcx)
	jle	.L27
	movq	%r9, 16016(%rcx)
.L27:
	movl	(%rdi), %edx
	imull	4(%rbp), %edx
	movslq	%edx, %rdx
	addq	%r9, %rdx
	cmpq	%rdx, 16024(%rcx)
	jle	.L26
	movq	%rdx, 16024(%rcx)
.L26:
	addq	$4, %rdi
	addq	$8, %rcx
	addq	$8, %rsi
	cmpq	%r13, %rdi
	jne	.L28
	addl	$2, %r11d
	addq	$8, %rbp
	addq	$16016, %r15
	cmpl	12(%rsp), %r11d
	jne	.L29
.L18:
	movq	16(%rsp), %rdi
	movslq	%r8d, %rdx
	movabsq	$922337203685477580, %r9
	imulq	$8008, %rdx, %r10
	leaq	(%rdi,%rdx,4), %r11
	movq	24(%rsp), %rdi
	addq	%rbx, %r10
	leaq	(%rdi,%r14,4), %rbp
	.p2align 4,,10
	.p2align 3
.L35:
	addl	$1, %r8d
	leaq	8016(%r10), %rcx
	movq	%r12, %rsi
	movq	%r10, %rdi
	.p2align 4,,10
	.p2align 3
.L34:
	movq	(%rdi), %r13
	cmpq	%r9, %r13
	je	.L31
	cmpq	%r13, -8(%rcx)
	jle	.L32
	movq	%r13, -8(%rcx)
.L32:
	movl	(%r11), %edx
	imull	(%rsi), %edx
	movslq	%edx, %rdx
	addq	%r13, %rdx
	cmpq	%rdx, (%rcx)
	jle	.L31
	movq	%rdx, (%rcx)
.L31:
	addq	$4, %rsi
	addq	$8, %rdi
	addq	$8, %rcx
	cmpq	%rbp, %rsi
	jne	.L34
	addq	$8008, %r10
	addq	$4, %r11
	cmpl	%r8d, %eax
	jg	.L35
.L15:
	imulq	$1001, %rax, %rax
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	addq	%r14, %rax
	movq	(%rbx,%rax,8), %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8072(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L59
	addq	$8088, %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
.L57:
	.cfi_restore_state
	xorl	%ecx, %ecx
	jmp	.L8
.L2:
	cmpl	$0, 40(%rsp)
	leaq	dp(%rip), %rbx
	jg	.L7
.L12:
	movq	$0, dp(%rip)
	movslq	40(%rsp), %r14
	jmp	.L15
.L58:
	leaq	52(%rsp), %rdi
	xorl	%r8d, %r8d
	leaq	48(%rsp), %r12
	movq	%rdi, 24(%rsp)
	jmp	.L18
.L59:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 8016008
dp:
	.zero	8016008
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.quad	922337203685477580
	.quad	922337203685477580
	.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 %d"
.LC2:
	.string	"%d"
.LC3:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$3992, %rsp
	.cfi_def_cfa_offset 8144
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8072(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rdx
	leaq	40(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	44(%rsp), %rax
	testl	%eax, %eax
	js	.L2
	movl	40(%rsp), %r10d
	leaq	dp(%rip), %rbx
	testl	%r10d, %r10d
	js	.L3
	leal	1(%r10), %ebp
	movq	%rbx, %r8
	leal	1(%rax), %r12d
	xorl	%esi, %esi
	movl	%ebp, %edx
	movl	%ebp, %r9d
	movdqa	.LC1(%rip), %xmm0
	movabsq	$922337203685477580, %rdi
	shrl	%edx
	andl	$-2, %r9d
	leal	-1(%rdx), %r11d
	addq	$1, %r11
	salq	$4, %r11
	.p2align 4,,10
	.p2align 3
.L4:
	leaq	(%r11,%r8), %rcx
	movq	%r8, %rdx
	testl	%r10d, %r10d
	je	.L57
	.p2align 4,,10
	.p2align 3
.L5:
	movups	%xmm0, (%rdx)
	addq	$16, %rdx
	cmpq	%rcx, %rdx
	jne	.L5
	movslq	%r9d, %rcx
	cmpl	%ebp, %r9d
	je	.L6
.L8:
	movslq	%esi, %rdx
	imulq	$1001, %rdx, %rdx
	addq	%rcx, %rdx
	movq	%rdi, (%rbx,%rdx,8)
.L6:
	addl	$1, %esi
	addq	$8008, %r8
	cmpl	%r12d, %esi
	jne	.L4
	testl	%r10d, %r10d
	jle	.L3
.L7:
	leaq	48(%rsp), %r12
	xorl	%ebp, %ebp
	leaq	.LC2(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	addq	$4, %r12
	cmpl	%ebp, 40(%rsp)
	jg	.L13
	movslq	44(%rsp), %rax
.L3:
	testl	%eax, %eax
	jle	.L12
	leaq	4064(%rsp), %rax
	xorl	%r12d, %r12d
	leaq	.LC2(%rip), %r13
	movq	%rax, 16(%rsp)
	movq	%rax, %r14
	movq	%rax, %rbp
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movslq	44(%rsp), %rax
	addq	$4, %r14
	cmpl	%r12d, %eax
	jg	.L14
	movq	$0, dp(%rip)
	movslq	40(%rsp), %r14
	testl	%eax, %eax
	jle	.L15
	testl	%r14d, %r14d
	js	.L15
	cmpl	$2, %eax
	jle	.L58
	leal	-3(%rax), %edx
	leaq	dp(%rip), %r15
	movl	$2, %r11d
	movabsq	$922337203685477580, %r10
	andl	$-2, %edx
	leaq	48(%rsp), %r12
	leal	4(%rdx), %edi
	movl	%edi, 12(%rsp)
	leaq	52(%rsp), %rdi
	movq	%rdi, 24(%rsp)
	leaq	(%rdi,%r14,4), %r13
.L29:
	leaq	8008(%r15), %rsi
	movq	%r12, %rdi
	movq	%r15, %rcx
	.p2align 4,,10
	.p2align 3
.L28:
	movq	(%rcx), %r8
	cmpq	%r10, %r8
	je	.L20
	cmpq	(%rsi), %r8
	jge	.L21
	movq	%r8, (%rsi)
.L21:
	movl	(%rdi), %edx
	imull	0(%rbp), %edx
	movslq	%edx, %rdx
	addq	%r8, %rdx
	cmpq	%rdx, 8(%rsi)
	jle	.L20
	movq	%rdx, 8(%rsi)
.L20:
	movq	(%rsi), %r9
	movl	%r11d, %r8d
	cmpq	%r10, %r9
	je	.L26
	cmpq	%r9, 16016(%rcx)
	jle	.L27
	movq	%r9, 16016(%rcx)
.L27:
	movl	(%rdi), %edx
	imull	4(%rbp), %edx
	movslq	%edx, %rdx
	addq	%r9, %rdx
	cmpq	%rdx, 16024(%rcx)
	jle	.L26
	movq	%rdx, 16024(%rcx)
.L26:
	addq	$4, %rdi
	addq	$8, %rcx
	addq	$8, %rsi
	cmpq	%r13, %rdi
	jne	.L28
	addl	$2, %r11d
	addq	$8, %rbp
	addq	$16016, %r15
	cmpl	12(%rsp), %r11d
	jne	.L29
.L18:
	movq	16(%rsp), %rdi
	movslq	%r8d, %rdx
	movabsq	$922337203685477580, %r9
	imulq	$8008, %rdx, %r10
	leaq	(%rdi,%rdx,4), %r11
	movq	24(%rsp), %rdi
	addq	%rbx, %r10
	leaq	(%rdi,%r14,4), %rbp
	.p2align 4,,10
	.p2align 3
.L35:
	addl	$1, %r8d
	leaq	8016(%r10), %rcx
	movq	%r12, %rsi
	movq	%r10, %rdi
	.p2align 4,,10
	.p2align 3
.L34:
	movq	(%rdi), %r13
	cmpq	%r9, %r13
	je	.L31
	cmpq	%r13, -8(%rcx)
	jle	.L32
	movq	%r13, -8(%rcx)
.L32:
	movl	(%r11), %edx
	imull	(%rsi), %edx
	movslq	%edx, %rdx
	addq	%r13, %rdx
	cmpq	%rdx, (%rcx)
	jle	.L31
	movq	%rdx, (%rcx)
.L31:
	addq	$4, %rsi
	addq	$8, %rdi
	addq	$8, %rcx
	cmpq	%rbp, %rsi
	jne	.L34
	addq	$8008, %r10
	addq	$4, %r11
	cmpl	%r8d, %eax
	jg	.L35
.L15:
	imulq	$1001, %rax, %rax
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	addq	%r14, %rax
	movq	(%rbx,%rax,8), %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8072(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L59
	addq	$8088, %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
.L57:
	.cfi_restore_state
	xorl	%ecx, %ecx
	jmp	.L8
.L2:
	cmpl	$0, 40(%rsp)
	leaq	dp(%rip), %rbx
	jg	.L7
.L12:
	movq	$0, dp(%rip)
	movslq	40(%rsp), %r14
	jmp	.L15
.L58:
	leaq	52(%rsp), %rdi
	xorl	%r8d, %r8d
	leaq	48(%rsp), %r12
	movq	%rdi, 24(%rsp)
	jmp	.L18
.L59:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 8016008
dp:
	.zero	8016008
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.quad	922337203685477580
	.quad	922337203685477580
	.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>
long long int dp[1001][1001];//動的計画法の表
int main(void){
    int i,j,n,m,d[1001],c[1001];//n=都市の数,m=日数,d=都市間の距離,c=天候
    long long int min,M;//min=最小値
    M=922337203685477580;//最大値代入
    scanf("%d %d",&n,&m);//都市の数と日数の入力
	//↓表のすべての場所にM代入
    for(i=0;i<=m;i++){
        for(j=0;j<=n;j++) dp[i][j]=M;
    }
    for(i=0;i<n;i++) scanf("%d",&d[i]);//都市間の距離の入力
    for(i=0;i<m;i++) scanf("%d",&c[i]);//天候の入力
    dp[0][0]=0;//スタート位置に0代入
    for(i=0;i<m;i++){
        for(j=0;j<=n;j++){
            if(dp[i][j]!=M){
                if(dp[i+1][j]>dp[i][j]) dp[i+1][j]=dp[i][j];//縦方向に疲労度比べて代入
                if(dp[i+1][j+1]>dp[i][j]+d[j]*c[i]) dp[i+1][j+1]=dp[i][j]+d[j]*c[i];//斜め方向に
            }
        }
    }
    min=M;//minにM代入
 /*   for(i=0;i<=m;i++){
        if(min>dp[i][n]) min=dp[i][n];//minと比べて更新
    }*/
    printf("%lld\n",dp[m][n]);//最小の疲労度出力
    return 0;
}
3 5
10
25
15
50
30
6
40
30
 3 5
10
38
15
50
30
6
40
30
 3 5
10
38
7
50
30
6
40
30
 1 5
10
38
7
50
30
6
40
30
 3 5
10
25
15
50
30
15
12
30
 3 5
1
25
15
50
30
6
40
30
 3 5
10
38
18
50
30
6
40
30
 3 5
10
47
7
50
30
6
40
30
 1 5
10
38
7
32
30
1
40
30
 3 5
10
25
15
50
30
15
9
30

900
 978
 738
 60
 855
 630
 1068
 792
 10
 810

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>
long long int dp[1001][1001];//動的計画法の表
int main(void){
    int i,j,n,m,d[1001],c[1001];//n=都市の数,m=日数,d=都市間の距離,c=天候
    long long int min,M;//min=最小値
    M=922337203685477580;//最大値代入
    scanf("%d %d",&n,&m);//都市の数と日数の入力
	//↓表のすべての場所にM代入
    for(i=0;i<=m;i++){
        for(j=0;j<=n;j++) dp[i][j]=M;
    }
    for(i=0;i<n;i++) scanf("%d",&d[i]);//都市間の距離の入力
    for(i=0;i<m;i++) scanf("%d",&c[i]);//天候の入力
    dp[0][0]=0;//スタート位置に0代入
    for(i=0;i<m;i++){
        for(j=0;j<=n;j++){
            if(dp[i][j]!=M){
                if(dp[i+1][j]>dp[i][j]) dp[i+1][j]=dp[i][j];//縦方向に疲労度比べて代入
                if(dp[i+1][j+1]>dp[i][j]+d[j]*c[i]) dp[i+1][j+1]=dp[i][j]+d[j]*c[i];//斜め方向に
            }
        }
    }
    min=M;//minにM代入
 /*   for(i=0;i<=m;i++){
        if(min>dp[i][n]) min=dp[i][n];//minと比べて更新
    }*/
    printf("%lld\n",dp[m][n]);//最小の疲労度出力
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 8016008
dp:
	.zero	8016008
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.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	$4096, %rsp
	orq	$0, (%rsp)
	subq	$3968, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movabsq	$922337203685477580, %rax
	movq	%rax, -8048(%rbp)
	leaq	-8060(%rbp), %rdx
	leaq	-8064(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -8056(%rbp)
	jmp	.L2
.L5:
	movl	$0, -8052(%rbp)
	jmp	.L3
.L4:
	movl	-8052(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8056(%rbp), %eax
	cltq
	imulq	$1001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rcx
	leaq	dp(%rip), %rdx
	movq	-8048(%rbp), %rax
	movq	%rax, (%rcx,%rdx)
	addl	$1, -8052(%rbp)
.L3:
	movl	-8064(%rbp), %eax
	cmpl	%eax, -8052(%rbp)
	jle	.L4
	addl	$1, -8056(%rbp)
.L2:
	movl	-8060(%rbp), %eax
	cmpl	%eax, -8056(%rbp)
	jle	.L5
	movl	$0, -8056(%rbp)
	jmp	.L6
.L7:
	leaq	-8032(%rbp), %rdx
	movl	-8056(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -8056(%rbp)
.L6:
	movl	-8064(%rbp), %eax
	cmpl	%eax, -8056(%rbp)
	jl	.L7
	movl	$0, -8056(%rbp)
	jmp	.L8
.L9:
	leaq	-4016(%rbp), %rdx
	movl	-8056(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -8056(%rbp)
.L8:
	movl	-8060(%rbp), %eax
	cmpl	%eax, -8056(%rbp)
	jl	.L9
	movq	$0, dp(%rip)
	movl	$0, -8056(%rbp)
	jmp	.L10
.L15:
	movl	$0, -8052(%rbp)
	jmp	.L11
.L14:
	movl	-8052(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8056(%rbp), %eax
	cltq
	imulq	$1001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rax
	cmpq	%rax, -8048(%rbp)
	je	.L12
	movl	-8056(%rbp), %eax
	leal	1(%rax), %edx
	movl	-8052(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$1001, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-8052(%rbp), %eax
	movslq	%eax, %rcx
	movl	-8056(%rbp), %eax
	cltq
	imulq	$1001, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rcx
	leaq	dp(%rip), %rax
	movq	(%rcx,%rax), %rax
	cmpq	%rax, %rdx
	jle	.L13
	movl	-8056(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-8052(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8056(%rbp), %eax
	cltq
	imulq	$1001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	-8052(%rbp), %edx
	movslq	%edx, %rsi
	movslq	%ecx, %rdx
	imulq	$1001, %rdx, %rdx
	addq	%rsi, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	dp(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
.L13:
	movl	-8056(%rbp), %eax
	leal	1(%rax), %edx
	movl	-8052(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$1001, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-8052(%rbp), %eax
	movslq	%eax, %rcx
	movl	-8056(%rbp), %eax
	cltq
	imulq	$1001, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rcx
	leaq	dp(%rip), %rax
	movq	(%rcx,%rax), %rsi
	movl	-8052(%rbp), %eax
	cltq
	movl	-8032(%rbp,%rax,4), %ecx
	movl	-8056(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	imull	%ecx, %eax
	cltq
	addq	%rsi, %rax
	cmpq	%rax, %rdx
	jle	.L12
	movl	-8052(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8056(%rbp), %eax
	cltq
	imulq	$1001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rsi
	movl	-8052(%rbp), %eax
	cltq
	movl	-8032(%rbp,%rax,4), %edx
	movl	-8056(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	imull	%edx, %eax
	movslq	%eax, %rcx
	movl	-8056(%rbp), %eax
	leal	1(%rax), %edx
	movl	-8052(%rbp), %eax
	addl	$1, %eax
	addq	%rsi, %rcx
	movslq	%eax, %rsi
	movslq	%edx, %rax
	imulq	$1001, %rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	%rcx, (%rdx,%rax)
.L12:
	addl	$1, -8052(%rbp)
.L11:
	movl	-8064(%rbp), %eax
	cmpl	%eax, -8052(%rbp)
	jle	.L14
	addl	$1, -8056(%rbp)
.L10:
	movl	-8060(%rbp), %eax
	cmpl	%eax, -8056(%rbp)
	jl	.L15
	movq	-8048(%rbp), %rax
	movq	%rax, -8040(%rbp)
	movl	-8060(%rbp), %eax
	movl	-8064(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$1001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	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	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 8016008
dp:
	.zero	8016008
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.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	$4096, %rsp
	orq	$0, (%rsp)
	subq	$3968, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movabsq	$922337203685477580, %rax
	movq	%rax, -8048(%rbp)
	leaq	-8060(%rbp), %rdx
	leaq	-8064(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -8056(%rbp)
	jmp	.L2
.L5:
	movl	$0, -8052(%rbp)
	jmp	.L3
.L4:
	movl	-8052(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8056(%rbp), %eax
	cltq
	imulq	$1001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rcx
	leaq	dp(%rip), %rdx
	movq	-8048(%rbp), %rax
	movq	%rax, (%rcx,%rdx)
	addl	$1, -8052(%rbp)
.L3:
	movl	-8064(%rbp), %eax
	cmpl	%eax, -8052(%rbp)
	jle	.L4
	addl	$1, -8056(%rbp)
.L2:
	movl	-8060(%rbp), %eax
	cmpl	%eax, -8056(%rbp)
	jle	.L5
	movl	$0, -8056(%rbp)
	jmp	.L6
.L7:
	leaq	-8032(%rbp), %rdx
	movl	-8056(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -8056(%rbp)
.L6:
	movl	-8064(%rbp), %eax
	cmpl	%eax, -8056(%rbp)
	jl	.L7
	movl	$0, -8056(%rbp)
	jmp	.L8
.L9:
	leaq	-4016(%rbp), %rdx
	movl	-8056(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -8056(%rbp)
.L8:
	movl	-8060(%rbp), %eax
	cmpl	%eax, -8056(%rbp)
	jl	.L9
	movq	$0, dp(%rip)
	movl	$0, -8056(%rbp)
	jmp	.L10
.L15:
	movl	$0, -8052(%rbp)
	jmp	.L11
.L14:
	movl	-8052(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8056(%rbp), %eax
	cltq
	imulq	$1001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rax
	cmpq	%rax, -8048(%rbp)
	je	.L12
	movl	-8056(%rbp), %eax
	leal	1(%rax), %edx
	movl	-8052(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$1001, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-8052(%rbp), %eax
	movslq	%eax, %rcx
	movl	-8056(%rbp), %eax
	cltq
	imulq	$1001, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rcx
	leaq	dp(%rip), %rax
	movq	(%rcx,%rax), %rax
	cmpq	%rax, %rdx
	jle	.L13
	movl	-8056(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-8052(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8056(%rbp), %eax
	cltq
	imulq	$1001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	-8052(%rbp), %edx
	movslq	%edx, %rsi
	movslq	%ecx, %rdx
	imulq	$1001, %rdx, %rdx
	addq	%rsi, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	dp(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
.L13:
	movl	-8056(%rbp), %eax
	leal	1(%rax), %edx
	movl	-8052(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$1001, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-8052(%rbp), %eax
	movslq	%eax, %rcx
	movl	-8056(%rbp), %eax
	cltq
	imulq	$1001, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rcx
	leaq	dp(%rip), %rax
	movq	(%rcx,%rax), %rsi
	movl	-8052(%rbp), %eax
	cltq
	movl	-8032(%rbp,%rax,4), %ecx
	movl	-8056(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	imull	%ecx, %eax
	cltq
	addq	%rsi, %rax
	cmpq	%rax, %rdx
	jle	.L12
	movl	-8052(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8056(%rbp), %eax
	cltq
	imulq	$1001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rsi
	movl	-8052(%rbp), %eax
	cltq
	movl	-8032(%rbp,%rax,4), %edx
	movl	-8056(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	imull	%edx, %eax
	movslq	%eax, %rcx
	movl	-8056(%rbp), %eax
	leal	1(%rax), %edx
	movl	-8052(%rbp), %eax
	addl	$1, %eax
	addq	%rsi, %rcx
	movslq	%eax, %rsi
	movslq	%edx, %rax
	imulq	$1001, %rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	%rcx, (%rdx,%rax)
.L12:
	addl	$1, -8052(%rbp)
.L11:
	movl	-8064(%rbp), %eax
	cmpl	%eax, -8052(%rbp)
	jle	.L14
	addl	$1, -8056(%rbp)
.L10:
	movl	-8060(%rbp), %eax
	cmpl	%eax, -8056(%rbp)
	jl	.L15
	movq	-8048(%rbp), %rax
	movq	%rax, -8040(%rbp)
	movl	-8060(%rbp), %eax
	movl	-8064(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$1001, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	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:
