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

```c
/*
 * FileName:     D_fix_2
 * CreatedDate:  2020-05-17 16:56:52 +0900
 * LastModified: 2020-05-17 17:24:42 +0900
 */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
long int dp[101][100000]={};
long int dp_search(int *w,long int *v,int n,int W,int u){
    if(n==u){
        return 0;
    }
    if(dp[u][W]!=0){
        return dp[u][W];
    }
    if(W<w[u]){
        dp[u][W]=dp_search(w,v,n,W,u+1);
        return dp[u][W];
    }
    long int s1 = dp_search(w,v,n,W-w[u],u+1)+v[u];
    long int s2 = dp_search(w,v,n,W,u+1);
    if(s1>s2){
        dp[u][W]=s1;
        return s1;
    }
    else{
        dp[u][W]=s2;
        return s2;
    }
}
int main(void){
    int n,W;
    scanf("%d %d",&n,&W);
    int *w = malloc(n*sizeof(int));
    long int *v = malloc(n*sizeof(long int));
    for(int i=0;i<n;i++){
        scanf("%d %ld",w+i,v+i);
    }
    long int ans = dp_search(w,v,n,W,0);
    printf("%ld\n",ans);
    free(w);
    free(v);
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 80800000
dp:
	.zero	80800000
	.text
	.globl	dp_search
	.type	dp_search, @function
dp_search:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movl	%edx, -36(%rbp)
	movl	%ecx, -40(%rbp)
	movl	%r8d, -44(%rbp)
	movl	-36(%rbp), %eax
	cmpl	-44(%rbp), %eax
	jne	.L2
	movl	$0, %eax
	jmp	.L3
.L2:
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movl	-44(%rbp), %eax
	cltq
	imulq	$100000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rax
	testq	%rax, %rax
	je	.L4
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movl	-44(%rbp), %eax
	cltq
	imulq	$100000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rax
	jmp	.L3
.L4:
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -40(%rbp)
	jge	.L5
	movl	-44(%rbp), %eax
	leal	1(%rax), %edi
	movl	-40(%rbp), %ecx
	movl	-36(%rbp), %edx
	movq	-32(%rbp), %rsi
	movq	-24(%rbp), %rax
	movl	%edi, %r8d
	movq	%rax, %rdi
	call	dp_search
	movl	-40(%rbp), %edx
	movslq	%edx, %rcx
	movl	-44(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$100000, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	dp(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movl	-44(%rbp), %eax
	cltq
	imulq	$100000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rax
	jmp	.L3
.L5:
	movl	-44(%rbp), %eax
	leal	1(%rax), %edi
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-40(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-36(%rbp), %edx
	movq	-32(%rbp), %rsi
	movq	-24(%rbp), %rax
	movl	%edi, %r8d
	movq	%rax, %rdi
	call	dp_search
	movq	%rax, %rdx
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	addq	%rdx, %rax
	movq	%rax, -16(%rbp)
	movl	-44(%rbp), %eax
	leal	1(%rax), %edi
	movl	-40(%rbp), %ecx
	movl	-36(%rbp), %edx
	movq	-32(%rbp), %rsi
	movq	-24(%rbp), %rax
	movl	%edi, %r8d
	movq	%rax, %rdi
	call	dp_search
	movq	%rax, -8(%rbp)
	movq	-16(%rbp), %rax
	cmpq	-8(%rbp), %rax
	jle	.L6
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movl	-44(%rbp), %eax
	cltq
	imulq	$100000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rcx
	leaq	dp(%rip), %rdx
	movq	-16(%rbp), %rax
	movq	%rax, (%rcx,%rdx)
	movq	-16(%rbp), %rax
	jmp	.L3
.L6:
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movl	-44(%rbp), %eax
	cltq
	imulq	$100000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rcx
	leaq	dp(%rip), %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rcx,%rdx)
	movq	-8(%rbp), %rax
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	dp_search, .-dp_search
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d %ld"
.LC2:
	.string	"%ld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-40(%rbp), %rdx
	leaq	-44(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -32(%rbp)
	movl	-44(%rbp), %eax
	cltq
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -24(%rbp)
	movl	$0, -36(%rbp)
	jmp	.L8
.L9:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -36(%rbp)
.L8:
	movl	-44(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L9
	movl	-40(%rbp), %ecx
	movl	-44(%rbp), %edx
	movq	-24(%rbp), %rsi
	movq	-32(%rbp), %rax
	movl	$0, %r8d
	movq	%rax, %rdi
	call	dp_search
	movq	%rax, -16(%rbp)
	movq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	-32(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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
	.p2align 4
	.type	dp_search.part.0, @function
dp_search.part.0:
.LFB53:
	.cfi_startproc
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	%edx, %r15d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rdi, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%ecx, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movslq	%r8d, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leal	1(%r8), %ebx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movl	(%rdi,%r12,4), %eax
	cmpl	%ecx, %eax
	jg	.L14
	subl	%eax, %ecx
	leaq	(%rsi,%r12,8), %rbp
	cmpl	%ebx, %edx
	je	.L5
	movslq	%ebx, %r9
	movslq	%ecx, %rdx
	leaq	dp(%rip), %r10
	imulq	$100000, %r9, %rax
	addq	%rdx, %rax
	movq	(%r10,%rax,8), %rax
	testq	%rax, %rax
	jne	.L6
	movl	%ebx, %r8d
	movl	%r15d, %edx
	movq	%r9, 24(%rsp)
	movq	%r10, 16(%rsp)
	movq	%rsi, 8(%rsp)
	call	dp_search.part.0
	movq	8(%rsp), %rsi
	movq	16(%rsp), %r10
	movq	24(%rsp), %r9
.L6:
	imulq	$100000, %r9, %r9
	movslq	%r13d, %r11
	addq	0(%rbp), %rax
	movq	%rax, %rbp
	addq	%r11, %r9
	movq	(%r10,%r9,8), %rax
	testq	%rax, %rax
	jne	.L7
	movl	%ebx, %r8d
	movl	%r13d, %ecx
	movl	%r15d, %edx
	movq	%r14, %rdi
	movq	%r11, 16(%rsp)
	movq	%r10, 8(%rsp)
	call	dp_search.part.0
	movq	16(%rsp), %r11
	movq	8(%rsp), %r10
.L7:
	cmpq	%rax, %rbp
	cmovge	%rbp, %rax
.L4:
	imulq	$100000, %r12, %r12
	addq	%r11, %r12
	movq	%rax, (%r10,%r12,8)
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	cmpl	%ebx, %edx
	je	.L9
	movslq	%ebx, %rax
	movslq	%ecx, %r11
	leaq	dp(%rip), %r10
	imulq	$100000, %rax, %rax
	addq	%r11, %rax
	movq	(%r10,%rax,8), %rax
	testq	%rax, %rax
	jne	.L4
	movl	%ebx, %r8d
	movq	%r11, 16(%rsp)
	movq	%r10, 8(%rsp)
	call	dp_search.part.0
	movq	8(%rsp), %r10
	movq	16(%rsp), %r11
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	movq	0(%rbp), %rbp
	xorl	%eax, %eax
	leaq	dp(%rip), %r10
	movslq	%r13d, %r11
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L9:
	xorl	%eax, %eax
	leaq	dp(%rip), %r10
	movslq	%ecx, %r11
	jmp	.L4
	.cfi_endproc
.LFE53:
	.size	dp_search.part.0, .-dp_search.part.0
	.p2align 4
	.globl	dp_search
	.type	dp_search, @function
dp_search:
.LFB51:
	.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
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	cmpl	%r8d, %edx
	je	.L15
	movslq	%r8d, %rbx
	movslq	%ecx, %r10
	leaq	dp(%rip), %r9
	movl	%ecx, %r14d
	imulq	$100000, %rbx, %rax
	addq	%r10, %rax
	movq	(%r9,%rax,8), %r12
	testq	%r12, %r12
	jne	.L15
	movl	(%rdi,%rbx,4), %eax
	movl	%edx, %r13d
	leal	1(%r8), %ebp
	cmpl	%eax, %ecx
	jl	.L25
	subl	%eax, %ecx
	leaq	(%rsi,%rbx,8), %r12
	cmpl	%ebp, %edx
	je	.L19
	movslq	%ebp, %r15
	movslq	%ecx, %rdx
	imulq	$100000, %r15, %rax
	addq	%rdx, %rax
	movq	(%r9,%rax,8), %rax
	testq	%rax, %rax
	jne	.L20
	movl	%ebp, %r8d
	movl	%r13d, %edx
	movq	%r10, 24(%rsp)
	movq	%rsi, 16(%rsp)
	movq	%rdi, 8(%rsp)
	call	dp_search.part.0
	movq	24(%rsp), %r10
	movq	16(%rsp), %rsi
	leaq	dp(%rip), %r9
	movq	8(%rsp), %rdi
.L20:
	imulq	$100000, %r15, %r11
	addq	(%r12), %rax
	movq	%rax, %r12
	addq	%r10, %r11
	movq	(%r9,%r11,8), %rax
	testq	%rax, %rax
	jne	.L21
	movl	%ebp, %r8d
	movl	%r14d, %ecx
	movl	%r13d, %edx
	movq	%r10, 8(%rsp)
	call	dp_search.part.0
	movq	8(%rsp), %r10
	leaq	dp(%rip), %r9
.L21:
	imulq	$100000, %rbx, %rbx
	addq	%r10, %rbx
	cmpq	%r12, %rax
	jge	.L22
	movq	%r12, (%r9,%rbx,8)
.L15:
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movq	%r12, %rax
	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
	.p2align 4,,10
	.p2align 3
.L25:
	.cfi_restore_state
	cmpl	%ebp, %edx
	je	.L18
	movslq	%ebp, %rax
	imulq	$100000, %rax, %rax
	addq	%r10, %rax
	movq	(%r9,%rax,8), %r12
	testq	%r12, %r12
	jne	.L18
	movl	%ebp, %r8d
	movq	%r10, 8(%rsp)
	call	dp_search.part.0
	movq	8(%rsp), %r10
	leaq	dp(%rip), %r9
	movq	%rax, %r12
.L18:
	imulq	$100000, %rbx, %rbx
	addq	%r10, %rbx
	movq	%r12, (%r9,%rbx,8)
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L22:
	movq	%rax, (%r9,%rbx,8)
	movq	%rax, %r12
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L19:
	movq	(%r12), %r12
	xorl	%eax, %eax
	jmp	.L21
	.cfi_endproc
.LFE51:
	.size	dp_search, .-dp_search
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d %ld"
.LC2:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	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	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rdx
	leaq	16(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	16(%rsp), %rbx
	leaq	0(,%rbx,4), %rdi
	movl	%ebx, 12(%rsp)
	call	malloc@PLT
	leaq	0(,%rbx,8), %rdi
	movq	%rax, %r15
	call	malloc@PLT
	movl	12(%rsp), %edx
	movq	%rax, %r14
	testl	%edx, %edx
	jle	.L27
	movq	%r15, %r12
	movq	%rax, %rbp
	leaq	.LC1(%rip), %r13
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L28:
	movq	%rbp, %rdx
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %edx
	addl	$1, %ebx
	addq	$4, %r12
	addq	$8, %rbp
	cmpl	%ebx, %edx
	jg	.L28
.L27:
	xorl	%r8d, %r8d
	testl	%edx, %edx
	je	.L29
	movslq	20(%rsp), %rsi
	leaq	dp(%rip), %rax
	movq	(%rax,%rsi,8), %r8
	movq	%rsi, %rcx
	testq	%r8, %r8
	jne	.L29
	movq	%r14, %rsi
	movq	%r15, %rdi
	call	dp_search.part.0
	movq	%rax, %r8
.L29:
	movq	%r8, %rdx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	%r15, %rdi
	call	free@PLT
	movq	%r14, %rdi
	call	free@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L35
	addq	$40, %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
.L35:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.size	main, .-main
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 80800000
dp:
	.zero	80800000
	.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
	.p2align 4
	.type	dp_search.part.0, @function
dp_search.part.0:
.LFB53:
	.cfi_startproc
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	%edx, %r15d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rdi, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%ecx, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movslq	%r8d, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leal	1(%r8), %ebx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movl	(%rdi,%r12,4), %eax
	cmpl	%ecx, %eax
	jg	.L14
	subl	%eax, %ecx
	leaq	(%rsi,%r12,8), %rbp
	cmpl	%ebx, %edx
	je	.L5
	movslq	%ebx, %r9
	movslq	%ecx, %rdx
	leaq	dp(%rip), %r10
	imulq	$100000, %r9, %rax
	addq	%rdx, %rax
	movq	(%r10,%rax,8), %rax
	testq	%rax, %rax
	jne	.L6
	movl	%ebx, %r8d
	movl	%r15d, %edx
	movq	%r9, 24(%rsp)
	movq	%r10, 16(%rsp)
	movq	%rsi, 8(%rsp)
	call	dp_search.part.0
	movq	8(%rsp), %rsi
	movq	16(%rsp), %r10
	movq	24(%rsp), %r9
.L6:
	imulq	$100000, %r9, %r9
	movslq	%r13d, %r11
	addq	0(%rbp), %rax
	movq	%rax, %rbp
	addq	%r11, %r9
	movq	(%r10,%r9,8), %rax
	testq	%rax, %rax
	jne	.L7
	movl	%ebx, %r8d
	movl	%r13d, %ecx
	movl	%r15d, %edx
	movq	%r14, %rdi
	movq	%r11, 16(%rsp)
	movq	%r10, 8(%rsp)
	call	dp_search.part.0
	movq	16(%rsp), %r11
	movq	8(%rsp), %r10
.L7:
	cmpq	%rax, %rbp
	cmovge	%rbp, %rax
.L4:
	imulq	$100000, %r12, %r12
	addq	%r11, %r12
	movq	%rax, (%r10,%r12,8)
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	cmpl	%ebx, %edx
	je	.L9
	movslq	%ebx, %rax
	movslq	%ecx, %r11
	leaq	dp(%rip), %r10
	imulq	$100000, %rax, %rax
	addq	%r11, %rax
	movq	(%r10,%rax,8), %rax
	testq	%rax, %rax
	jne	.L4
	movl	%ebx, %r8d
	movq	%r11, 16(%rsp)
	movq	%r10, 8(%rsp)
	call	dp_search.part.0
	movq	8(%rsp), %r10
	movq	16(%rsp), %r11
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	movq	0(%rbp), %rbp
	xorl	%eax, %eax
	leaq	dp(%rip), %r10
	movslq	%r13d, %r11
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L9:
	xorl	%eax, %eax
	leaq	dp(%rip), %r10
	movslq	%ecx, %r11
	jmp	.L4
	.cfi_endproc
.LFE53:
	.size	dp_search.part.0, .-dp_search.part.0
	.p2align 4
	.globl	dp_search
	.type	dp_search, @function
dp_search:
.LFB51:
	.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
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	cmpl	%r8d, %edx
	je	.L15
	movslq	%r8d, %rbx
	movslq	%ecx, %r10
	leaq	dp(%rip), %r9
	movl	%ecx, %r14d
	imulq	$100000, %rbx, %rax
	addq	%r10, %rax
	movq	(%r9,%rax,8), %r12
	testq	%r12, %r12
	jne	.L15
	movl	(%rdi,%rbx,4), %eax
	movl	%edx, %r13d
	leal	1(%r8), %ebp
	cmpl	%eax, %ecx
	jl	.L25
	subl	%eax, %ecx
	leaq	(%rsi,%rbx,8), %r12
	cmpl	%ebp, %edx
	je	.L19
	movslq	%ebp, %r15
	movslq	%ecx, %rdx
	imulq	$100000, %r15, %rax
	addq	%rdx, %rax
	movq	(%r9,%rax,8), %rax
	testq	%rax, %rax
	jne	.L20
	movl	%ebp, %r8d
	movl	%r13d, %edx
	movq	%r10, 24(%rsp)
	movq	%rsi, 16(%rsp)
	movq	%rdi, 8(%rsp)
	call	dp_search.part.0
	movq	24(%rsp), %r10
	movq	16(%rsp), %rsi
	leaq	dp(%rip), %r9
	movq	8(%rsp), %rdi
.L20:
	imulq	$100000, %r15, %r11
	addq	(%r12), %rax
	movq	%rax, %r12
	addq	%r10, %r11
	movq	(%r9,%r11,8), %rax
	testq	%rax, %rax
	jne	.L21
	movl	%ebp, %r8d
	movl	%r14d, %ecx
	movl	%r13d, %edx
	movq	%r10, 8(%rsp)
	call	dp_search.part.0
	movq	8(%rsp), %r10
	leaq	dp(%rip), %r9
.L21:
	imulq	$100000, %rbx, %rbx
	addq	%r10, %rbx
	cmpq	%r12, %rax
	jge	.L22
	movq	%r12, (%r9,%rbx,8)
.L15:
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movq	%r12, %rax
	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
	.p2align 4,,10
	.p2align 3
.L25:
	.cfi_restore_state
	cmpl	%ebp, %edx
	je	.L18
	movslq	%ebp, %rax
	imulq	$100000, %rax, %rax
	addq	%r10, %rax
	movq	(%r9,%rax,8), %r12
	testq	%r12, %r12
	jne	.L18
	movl	%ebp, %r8d
	movq	%r10, 8(%rsp)
	call	dp_search.part.0
	movq	8(%rsp), %r10
	leaq	dp(%rip), %r9
	movq	%rax, %r12
.L18:
	imulq	$100000, %rbx, %rbx
	addq	%r10, %rbx
	movq	%r12, (%r9,%rbx,8)
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L22:
	movq	%rax, (%r9,%rbx,8)
	movq	%rax, %r12
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L19:
	movq	(%r12), %r12
	xorl	%eax, %eax
	jmp	.L21
	.cfi_endproc
.LFE51:
	.size	dp_search, .-dp_search
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d %ld"
.LC2:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	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	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rdx
	leaq	16(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	16(%rsp), %rbx
	leaq	0(,%rbx,4), %rdi
	movl	%ebx, 12(%rsp)
	call	malloc@PLT
	leaq	0(,%rbx,8), %rdi
	movq	%rax, %r15
	call	malloc@PLT
	movl	12(%rsp), %edx
	movq	%rax, %r14
	testl	%edx, %edx
	jle	.L27
	movq	%r15, %r12
	movq	%rax, %rbp
	leaq	.LC1(%rip), %r13
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L28:
	movq	%rbp, %rdx
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %edx
	addl	$1, %ebx
	addq	$4, %r12
	addq	$8, %rbp
	cmpl	%ebx, %edx
	jg	.L28
.L27:
	xorl	%r8d, %r8d
	testl	%edx, %edx
	je	.L29
	movslq	20(%rsp), %rsi
	leaq	dp(%rip), %rax
	movq	(%rax,%rsi,8), %r8
	movq	%rsi, %rcx
	testq	%r8, %r8
	jne	.L29
	movq	%r14, %rsi
	movq	%r15, %rdi
	call	dp_search.part.0
	movq	%rax, %r8
.L29:
	movq	%r8, %rdx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	%r15, %rdi
	call	free@PLT
	movq	%r14, %rdi
	call	free@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L35
	addq	$40, %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
.L35:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.size	main, .-main
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 80800000
dp:
	.zero	80800000
	.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:

/*
 * FileName:     D_fix_2
 * CreatedDate:  2020-05-17 16:56:52 +0900
 * LastModified: 2020-05-17 17:24:42 +0900
 */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
long int dp[101][100000]={};
long int dp_search(int *w,long int *v,int n,int W,int u){
    if(n==u){
        return 0;
    }
    if(dp[u][W]!=0){
        return dp[u][W];
    }
    if(W<w[u]){
        dp[u][W]=dp_search(w,v,n,W,u+1);
        return dp[u][W];
    }
    long int s1 = dp_search(w,v,n,W-w[u],u+1)+v[u];
    long int s2 = dp_search(w,v,n,W,u+1);
    if(s1>s2){
        dp[u][W]=s1;
        return s1;
    }
    else{
        dp[u][W]=s2;
        return s2;
    }
}
int main(void){
    int n,W;
    scanf("%d %d",&n,&W);
    int *w = malloc(n*sizeof(int));
    long int *v = malloc(n*sizeof(long int));
    for(int i=0;i<n;i++){
        scanf("%d %ld",w+i,v+i);
    }
    long int ans = dp_search(w,v,n,W,0);
    printf("%ld\n",ans);
    free(w);
    free(v);
    return 0;
}

3 8
3 30
4 50
5 60

90

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

```c
/*
 * FileName:     D_fix_2
 * CreatedDate:  2020-05-17 16:56:52 +0900
 * LastModified: 2020-05-17 17:24:42 +0900
 */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
long int dp[101][100000]={};
long int dp_search(int *w,long int *v,int n,int W,int u){
    if(n==u){
        return 0;
    }
    if(dp[u][W]!=0){
        return dp[u][W];
    }
    if(W<w[u]){
        dp[u][W]=dp_search(w,v,n,W,u+1);
        return dp[u][W];
    }
    long int s1 = dp_search(w,v,n,W-w[u],u+1)+v[u];
    long int s2 = dp_search(w,v,n,W,u+1);
    if(s1>s2){
        dp[u][W]=s1;
        return s1;
    }
    else{
        dp[u][W]=s2;
        return s2;
    }
}
int main(void){
    int n,W;
    scanf("%d %d",&n,&W);
    int *w = malloc(n*sizeof(int));
    long int *v = malloc(n*sizeof(long int));
    for(int i=0;i<n;i++){
        scanf("%d %ld",w+i,v+i);
    }
    long int ans = dp_search(w,v,n,W,0);
    printf("%ld\n",ans);
    free(w);
    free(v);
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 80800000
dp:
	.zero	80800000
	.text
	.globl	dp_search
	.type	dp_search, @function
dp_search:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movl	%edx, -36(%rbp)
	movl	%ecx, -40(%rbp)
	movl	%r8d, -44(%rbp)
	movl	-36(%rbp), %eax
	cmpl	-44(%rbp), %eax
	jne	.L2
	movl	$0, %eax
	jmp	.L3
.L2:
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movl	-44(%rbp), %eax
	cltq
	imulq	$100000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rax
	testq	%rax, %rax
	je	.L4
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movl	-44(%rbp), %eax
	cltq
	imulq	$100000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rax
	jmp	.L3
.L4:
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -40(%rbp)
	jge	.L5
	movl	-44(%rbp), %eax
	leal	1(%rax), %edi
	movl	-40(%rbp), %ecx
	movl	-36(%rbp), %edx
	movq	-32(%rbp), %rsi
	movq	-24(%rbp), %rax
	movl	%edi, %r8d
	movq	%rax, %rdi
	call	dp_search
	movl	-40(%rbp), %edx
	movslq	%edx, %rcx
	movl	-44(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$100000, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	dp(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movl	-44(%rbp), %eax
	cltq
	imulq	$100000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rax
	jmp	.L3
.L5:
	movl	-44(%rbp), %eax
	leal	1(%rax), %edi
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-40(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-36(%rbp), %edx
	movq	-32(%rbp), %rsi
	movq	-24(%rbp), %rax
	movl	%edi, %r8d
	movq	%rax, %rdi
	call	dp_search
	movq	%rax, %rdx
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	addq	%rdx, %rax
	movq	%rax, -16(%rbp)
	movl	-44(%rbp), %eax
	leal	1(%rax), %edi
	movl	-40(%rbp), %ecx
	movl	-36(%rbp), %edx
	movq	-32(%rbp), %rsi
	movq	-24(%rbp), %rax
	movl	%edi, %r8d
	movq	%rax, %rdi
	call	dp_search
	movq	%rax, -8(%rbp)
	movq	-16(%rbp), %rax
	cmpq	-8(%rbp), %rax
	jle	.L6
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movl	-44(%rbp), %eax
	cltq
	imulq	$100000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rcx
	leaq	dp(%rip), %rdx
	movq	-16(%rbp), %rax
	movq	%rax, (%rcx,%rdx)
	movq	-16(%rbp), %rax
	jmp	.L3
.L6:
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movl	-44(%rbp), %eax
	cltq
	imulq	$100000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rcx
	leaq	dp(%rip), %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rcx,%rdx)
	movq	-8(%rbp), %rax
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	dp_search, .-dp_search
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d %ld"
.LC2:
	.string	"%ld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-40(%rbp), %rdx
	leaq	-44(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -32(%rbp)
	movl	-44(%rbp), %eax
	cltq
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -24(%rbp)
	movl	$0, -36(%rbp)
	jmp	.L8
.L9:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -36(%rbp)
.L8:
	movl	-44(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L9
	movl	-40(%rbp), %ecx
	movl	-44(%rbp), %edx
	movq	-24(%rbp), %rsi
	movq	-32(%rbp), %rax
	movl	$0, %r8d
	movq	%rax, %rdi
	call	dp_search
	movq	%rax, -16(%rbp)
	movq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	-32(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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, 80800000
dp:
	.zero	80800000
	.text
	.globl	dp_search
	.type	dp_search, @function
dp_search:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movl	%edx, -36(%rbp)
	movl	%ecx, -40(%rbp)
	movl	%r8d, -44(%rbp)
	movl	-36(%rbp), %eax
	cmpl	-44(%rbp), %eax
	jne	.L2
	movl	$0, %eax
	jmp	.L3
.L2:
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movl	-44(%rbp), %eax
	cltq
	imulq	$100000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rax
	testq	%rax, %rax
	je	.L4
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movl	-44(%rbp), %eax
	cltq
	imulq	$100000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rax
	jmp	.L3
.L4:
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -40(%rbp)
	jge	.L5
	movl	-44(%rbp), %eax
	leal	1(%rax), %edi
	movl	-40(%rbp), %ecx
	movl	-36(%rbp), %edx
	movq	-32(%rbp), %rsi
	movq	-24(%rbp), %rax
	movl	%edi, %r8d
	movq	%rax, %rdi
	call	dp_search
	movl	-40(%rbp), %edx
	movslq	%edx, %rcx
	movl	-44(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$100000, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	dp(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movl	-44(%rbp), %eax
	cltq
	imulq	$100000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rax
	jmp	.L3
.L5:
	movl	-44(%rbp), %eax
	leal	1(%rax), %edi
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-40(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-36(%rbp), %edx
	movq	-32(%rbp), %rsi
	movq	-24(%rbp), %rax
	movl	%edi, %r8d
	movq	%rax, %rdi
	call	dp_search
	movq	%rax, %rdx
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	addq	%rdx, %rax
	movq	%rax, -16(%rbp)
	movl	-44(%rbp), %eax
	leal	1(%rax), %edi
	movl	-40(%rbp), %ecx
	movl	-36(%rbp), %edx
	movq	-32(%rbp), %rsi
	movq	-24(%rbp), %rax
	movl	%edi, %r8d
	movq	%rax, %rdi
	call	dp_search
	movq	%rax, -8(%rbp)
	movq	-16(%rbp), %rax
	cmpq	-8(%rbp), %rax
	jle	.L6
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movl	-44(%rbp), %eax
	cltq
	imulq	$100000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rcx
	leaq	dp(%rip), %rdx
	movq	-16(%rbp), %rax
	movq	%rax, (%rcx,%rdx)
	movq	-16(%rbp), %rax
	jmp	.L3
.L6:
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movl	-44(%rbp), %eax
	cltq
	imulq	$100000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rcx
	leaq	dp(%rip), %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rcx,%rdx)
	movq	-8(%rbp), %rax
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	dp_search, .-dp_search
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d %ld"
.LC2:
	.string	"%ld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-40(%rbp), %rdx
	leaq	-44(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -32(%rbp)
	movl	-44(%rbp), %eax
	cltq
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -24(%rbp)
	movl	$0, -36(%rbp)
	jmp	.L8
.L9:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -36(%rbp)
.L8:
	movl	-44(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L9
	movl	-40(%rbp), %ecx
	movl	-44(%rbp), %edx
	movq	-24(%rbp), %rsi
	movq	-32(%rbp), %rax
	movl	$0, %r8d
	movq	%rax, %rdi
	call	dp_search
	movq	%rax, -16(%rbp)
	movq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	-32(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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:
