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>
#define N 1000000

int min(int a,int b){return (a>b)?b:a;}

int dp[N],dp_odd[N];

int main(void){
  int i,j,n,tmp;
  int plc[1000],num;

  for(i=0;i<N;i++)dp[i] = dp_odd[i] = N+1;
  dp[0] = dp_odd[0] = 0;

  tmp = 1;
  for(num=1;;num++){
    plc[num] = tmp;
    tmp *= num+3; tmp /= num;
    if(tmp>=N)break;
  }
  
  for(i=0;i<N;i++){
    for(j=1;j<num;j++){
      if(i<plc[j])break;
      dp[i] = min(dp[i],dp[i-plc[j]]+1);
      if(plc[j]&1)dp_odd[i] = min(dp_odd[i],dp_odd[i-plc[j]]+1);
    }
  }

  while(scanf("%d",&n) && n)printf("%d %d\n",dp[n],dp_odd[n]);
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	min
	.type	min, @function
min:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	min, .-min
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 4000000
dp:
	.zero	4000000
	.globl	dp_odd
	.align 32
	.type	dp_odd, @object
	.size	dp_odd, 4000000
dp_odd:
	.zero	4000000
	.section	.rodata
.LC0:
	.string	"%d %d\n"
.LC1:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$4048, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -4032(%rbp)
	jmp	.L4
.L5:
	movl	-4032(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp_odd(%rip), %rax
	movl	$1000001, (%rdx,%rax)
	movl	-4032(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp_odd(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-4032(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	dp(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -4032(%rbp)
.L4:
	cmpl	$999999, -4032(%rbp)
	jle	.L5
	movl	$0, dp_odd(%rip)
	movl	dp_odd(%rip), %eax
	movl	%eax, dp(%rip)
	movl	$1, -4024(%rbp)
	movl	$1, -4020(%rbp)
.L8:
	movl	-4020(%rbp), %eax
	cltq
	movl	-4024(%rbp), %edx
	movl	%edx, -4016(%rbp,%rax,4)
	movl	-4020(%rbp), %eax
	leal	3(%rax), %edx
	movl	-4024(%rbp), %eax
	imull	%edx, %eax
	movl	%eax, -4024(%rbp)
	movl	-4024(%rbp), %eax
	cltd
	idivl	-4020(%rbp)
	movl	%eax, -4024(%rbp)
	cmpl	$999999, -4024(%rbp)
	jg	.L22
	addl	$1, -4020(%rbp)
	jmp	.L8
.L22:
	nop
	movl	$0, -4032(%rbp)
	jmp	.L9
.L15:
	movl	$1, -4028(%rbp)
	jmp	.L10
.L14:
	movl	-4028(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	cmpl	%eax, -4032(%rbp)
	jl	.L23
	movl	-4028(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %edx
	movl	-4032(%rbp), %eax
	subl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %edx
	movl	-4032(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	dp(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	min
	movl	-4032(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	dp(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4028(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L13
	movl	-4028(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %edx
	movl	-4032(%rbp), %eax
	subl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp_odd(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %edx
	movl	-4032(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	dp_odd(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	min
	movl	-4032(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	dp_odd(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
.L13:
	addl	$1, -4028(%rbp)
.L10:
	movl	-4028(%rbp), %eax
	cmpl	-4020(%rbp), %eax
	jl	.L14
	jmp	.L12
.L23:
	nop
.L12:
	addl	$1, -4032(%rbp)
.L9:
	cmpl	$999999, -4032(%rbp)
	jle	.L15
	jmp	.L16
.L18:
	movl	-4036(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp_odd(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4036(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	dp(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L16:
	leaq	-4036(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L17
	movl	-4036(%rbp), %eax
	testl	%eax, %eax
	jne	.L18
.L17:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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
	.globl	min
	.type	min, @function
min:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	movl	%esi, %eax
	cmovle	%edi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	min, .-min
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d %d\n"
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	dp_odd(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	dp(%rip), %rbx
	subq	$4032, %rsp
	.cfi_def_cfa_offset 4080
	movdqa	.LC0(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 4024(%rsp)
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L4:
	movaps	%xmm0, 0(%rbp,%rax)
	movaps	%xmm0, (%rbx,%rax)
	addq	$16, %rax
	cmpq	$4000000, %rax
	jne	.L4
	leaq	24(%rsp), %r8
	movl	$4, %eax
	movl	$1, %ecx
	movl	$0, dp_odd(%rip)
	movl	$0, dp(%rip)
	movq	%r8, %rsi
	movl	$1, 20(%rsp)
.L6:
	movl	%ecx, %edi
	movl	%eax, (%rsi)
	addl	$1, %ecx
	addq	$4, %rsi
	leal	4(%rdi), %edx
	imull	%edx, %eax
	cltd
	idivl	%ecx
	cmpl	$999999, %eax
	jle	.L6
	leal	-1(%rdi), %eax
	leaq	dp(%rip), %r9
	leaq	(%r8,%rax,4), %r11
	leaq	dp_odd(%rip), %r10
	xorl	%r8d, %r8d
	leaq	20(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r12, %rcx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L7:
	movl	%r8d, %edx
	movl	(%r9), %edi
	subl	%esi, %edx
	movslq	%edx, %rdx
	movl	(%rbx,%rdx,4), %eax
	addl	$1, %eax
	cmpl	%edi, %eax
	cmovg	%edi, %eax
	andl	$1, %esi
	movl	%eax, (%r9)
	je	.L10
	movl	0(%rbp,%rdx,4), %eax
	movl	(%r10), %edx
	addl	$1, %eax
	cmpl	%edx, %eax
	cmovg	%edx, %eax
	movl	%eax, (%r10)
.L10:
	addq	$4, %rcx
	cmpq	%r11, %rcx
	je	.L12
.L11:
	movl	(%rcx), %esi
	cmpl	%r8d, %esi
	jle	.L7
.L12:
	addl	$1, %r8d
	addq	$4, %r9
	addq	$4, %r10
	cmpl	$1000000, %r8d
	jne	.L8
	leaq	12(%rsp), %r13
	leaq	.LC2(%rip), %r12
	leaq	.LC1(%rip), %r14
	jmp	.L9
.L26:
	movslq	12(%rsp), %rax
	testl	%eax, %eax
	je	.L13
	movl	0(%rbp,%rax,4), %ecx
	movl	(%rbx,%rax,4), %edx
	movq	%r14, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L9:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	jne	.L26
.L13:
	movq	4024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$4032, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L27:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	dp_odd
	.bss
	.align 32
	.type	dp_odd, @object
	.size	dp_odd, 4000000
dp_odd:
	.zero	4000000
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 4000000
dp:
	.zero	4000000
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1000001
	.long	1000001
	.long	1000001
	.long	1000001
	.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
	.globl	min
	.type	min, @function
min:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	movl	%esi, %eax
	cmovle	%edi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	min, .-min
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d %d\n"
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	dp_odd(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	dp(%rip), %rbx
	subq	$4032, %rsp
	.cfi_def_cfa_offset 4080
	movdqa	.LC0(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 4024(%rsp)
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L4:
	movaps	%xmm0, 0(%rbp,%rax)
	movaps	%xmm0, (%rbx,%rax)
	addq	$16, %rax
	cmpq	$4000000, %rax
	jne	.L4
	leaq	24(%rsp), %r8
	movl	$4, %eax
	movl	$1, %ecx
	movl	$0, dp_odd(%rip)
	movl	$0, dp(%rip)
	movq	%r8, %rsi
	movl	$1, 20(%rsp)
.L6:
	movl	%ecx, %edi
	movl	%eax, (%rsi)
	addl	$1, %ecx
	addq	$4, %rsi
	leal	4(%rdi), %edx
	imull	%edx, %eax
	cltd
	idivl	%ecx
	cmpl	$999999, %eax
	jle	.L6
	leal	-1(%rdi), %eax
	leaq	dp(%rip), %r9
	leaq	(%r8,%rax,4), %r11
	leaq	dp_odd(%rip), %r10
	xorl	%r8d, %r8d
	leaq	20(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r12, %rcx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L7:
	movl	%r8d, %edx
	movl	(%r9), %edi
	subl	%esi, %edx
	movslq	%edx, %rdx
	movl	(%rbx,%rdx,4), %eax
	addl	$1, %eax
	cmpl	%edi, %eax
	cmovg	%edi, %eax
	andl	$1, %esi
	movl	%eax, (%r9)
	je	.L10
	movl	0(%rbp,%rdx,4), %eax
	movl	(%r10), %edx
	addl	$1, %eax
	cmpl	%edx, %eax
	cmovg	%edx, %eax
	movl	%eax, (%r10)
.L10:
	addq	$4, %rcx
	cmpq	%r11, %rcx
	je	.L12
.L11:
	movl	(%rcx), %esi
	cmpl	%r8d, %esi
	jle	.L7
.L12:
	addl	$1, %r8d
	addq	$4, %r9
	addq	$4, %r10
	cmpl	$1000000, %r8d
	jne	.L8
	leaq	12(%rsp), %r13
	leaq	.LC2(%rip), %r12
	leaq	.LC1(%rip), %r14
	jmp	.L9
.L26:
	movslq	12(%rsp), %rax
	testl	%eax, %eax
	je	.L13
	movl	0(%rbp,%rax,4), %ecx
	movl	(%rbx,%rax,4), %edx
	movq	%r14, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L9:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	jne	.L26
.L13:
	movq	4024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$4032, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L27:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	dp_odd
	.bss
	.align 32
	.type	dp_odd, @object
	.size	dp_odd, 4000000
dp_odd:
	.zero	4000000
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 4000000
dp:
	.zero	4000000
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1000001
	.long	1000001
	.long	1000001
	.long	1000001
	.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>
#define N 1000000

int min(int a,int b){return (a>b)?b:a;}

int dp[N],dp_odd[N];

int main(void){
  int i,j,n,tmp;
  int plc[1000],num;

  for(i=0;i<N;i++)dp[i] = dp_odd[i] = N+1;
  dp[0] = dp_odd[0] = 0;

  tmp = 1;
  for(num=1;;num++){
    plc[num] = tmp;
    tmp *= num+3; tmp /= num;
    if(tmp>=N)break;
  }
  
  for(i=0;i<N;i++){
    for(j=1;j<num;j++){
      if(i<plc[j])break;
      dp[i] = min(dp[i],dp[i-plc[j]]+1);
      if(plc[j]&1)dp_odd[i] = min(dp_odd[i],dp_odd[i-plc[j]]+1);
    }
  }

  while(scanf("%d",&n) && n)printf("%d %d\n",dp[n],dp_odd[n]);
  return 0;
}
40
14
5
165
120
133
106
139
0
 40
14
5
98
120
133
106
139
0
 40
14
5
98
120
133
106
150
0
 40
14
5
70
120
133
106
150
0
 40
14
9
70
120
133
106
150
0
 40
14
9
70
72
133
106
150
0
 40
14
9
29
72
133
106
150
0
 40
14
9
29
79
133
106
150
0
 40
14
9
29
79
133
106
241
0
 40
14
9
20
79
133
106
241
0

2 6
2 14
2 5
1 1
1 18
4 31
4 4
3 37
 2 6
2 14
2 5
3 30
1 18
4 31
4 4
3 37
 2 6
2 14
2 5
3 30
1 18
4 31
4 4
3 14
 2 6
2 14
2 5
2 2
1 18
4 31
4 4
3 14
 2 6
2 14
3 9
2 2
1 18
4 31
4 4
3 14
 2 6
2 14
3 9
2 2
4 4
4 31
4 4
3 14
 2 6
2 14
3 9
4 29
4 4
4 31
4 4
3 14
 2 6
2 14
3 9
4 29
4 11
4 31
4 4
3 14
 2 6
2 14
3 9
4 29
4 11
4 31
4 4
3 9
 2 6
2 14
3 9
1 20
4 11
4 31
4 4
3 9

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>
#define N 1000000

int min(int a,int b){return (a>b)?b:a;}

int dp[N],dp_odd[N];

int main(void){
  int i,j,n,tmp;
  int plc[1000],num;

  for(i=0;i<N;i++)dp[i] = dp_odd[i] = N+1;
  dp[0] = dp_odd[0] = 0;

  tmp = 1;
  for(num=1;;num++){
    plc[num] = tmp;
    tmp *= num+3; tmp /= num;
    if(tmp>=N)break;
  }
  
  for(i=0;i<N;i++){
    for(j=1;j<num;j++){
      if(i<plc[j])break;
      dp[i] = min(dp[i],dp[i-plc[j]]+1);
      if(plc[j]&1)dp_odd[i] = min(dp_odd[i],dp_odd[i-plc[j]]+1);
    }
  }

  while(scanf("%d",&n) && n)printf("%d %d\n",dp[n],dp_odd[n]);
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	min
	.type	min, @function
min:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	min, .-min
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 4000000
dp:
	.zero	4000000
	.globl	dp_odd
	.align 32
	.type	dp_odd, @object
	.size	dp_odd, 4000000
dp_odd:
	.zero	4000000
	.section	.rodata
.LC0:
	.string	"%d %d\n"
.LC1:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$4048, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -4032(%rbp)
	jmp	.L4
.L5:
	movl	-4032(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp_odd(%rip), %rax
	movl	$1000001, (%rdx,%rax)
	movl	-4032(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp_odd(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-4032(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	dp(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -4032(%rbp)
.L4:
	cmpl	$999999, -4032(%rbp)
	jle	.L5
	movl	$0, dp_odd(%rip)
	movl	dp_odd(%rip), %eax
	movl	%eax, dp(%rip)
	movl	$1, -4024(%rbp)
	movl	$1, -4020(%rbp)
.L8:
	movl	-4020(%rbp), %eax
	cltq
	movl	-4024(%rbp), %edx
	movl	%edx, -4016(%rbp,%rax,4)
	movl	-4020(%rbp), %eax
	leal	3(%rax), %edx
	movl	-4024(%rbp), %eax
	imull	%edx, %eax
	movl	%eax, -4024(%rbp)
	movl	-4024(%rbp), %eax
	cltd
	idivl	-4020(%rbp)
	movl	%eax, -4024(%rbp)
	cmpl	$999999, -4024(%rbp)
	jg	.L22
	addl	$1, -4020(%rbp)
	jmp	.L8
.L22:
	nop
	movl	$0, -4032(%rbp)
	jmp	.L9
.L15:
	movl	$1, -4028(%rbp)
	jmp	.L10
.L14:
	movl	-4028(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	cmpl	%eax, -4032(%rbp)
	jl	.L23
	movl	-4028(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %edx
	movl	-4032(%rbp), %eax
	subl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %edx
	movl	-4032(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	dp(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	min
	movl	-4032(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	dp(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4028(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L13
	movl	-4028(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %edx
	movl	-4032(%rbp), %eax
	subl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp_odd(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %edx
	movl	-4032(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	dp_odd(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	min
	movl	-4032(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	dp_odd(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
.L13:
	addl	$1, -4028(%rbp)
.L10:
	movl	-4028(%rbp), %eax
	cmpl	-4020(%rbp), %eax
	jl	.L14
	jmp	.L12
.L23:
	nop
.L12:
	addl	$1, -4032(%rbp)
.L9:
	cmpl	$999999, -4032(%rbp)
	jle	.L15
	jmp	.L16
.L18:
	movl	-4036(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp_odd(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4036(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	dp(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L16:
	leaq	-4036(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L17
	movl	-4036(%rbp), %eax
	testl	%eax, %eax
	jne	.L18
.L17:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	min
	.type	min, @function
min:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	min, .-min
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 4000000
dp:
	.zero	4000000
	.globl	dp_odd
	.align 32
	.type	dp_odd, @object
	.size	dp_odd, 4000000
dp_odd:
	.zero	4000000
	.section	.rodata
.LC0:
	.string	"%d %d\n"
.LC1:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$4048, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -4032(%rbp)
	jmp	.L4
.L5:
	movl	-4032(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp_odd(%rip), %rax
	movl	$1000001, (%rdx,%rax)
	movl	-4032(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp_odd(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-4032(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	dp(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -4032(%rbp)
.L4:
	cmpl	$999999, -4032(%rbp)
	jle	.L5
	movl	$0, dp_odd(%rip)
	movl	dp_odd(%rip), %eax
	movl	%eax, dp(%rip)
	movl	$1, -4024(%rbp)
	movl	$1, -4020(%rbp)
.L8:
	movl	-4020(%rbp), %eax
	cltq
	movl	-4024(%rbp), %edx
	movl	%edx, -4016(%rbp,%rax,4)
	movl	-4020(%rbp), %eax
	leal	3(%rax), %edx
	movl	-4024(%rbp), %eax
	imull	%edx, %eax
	movl	%eax, -4024(%rbp)
	movl	-4024(%rbp), %eax
	cltd
	idivl	-4020(%rbp)
	movl	%eax, -4024(%rbp)
	cmpl	$999999, -4024(%rbp)
	jg	.L22
	addl	$1, -4020(%rbp)
	jmp	.L8
.L22:
	nop
	movl	$0, -4032(%rbp)
	jmp	.L9
.L15:
	movl	$1, -4028(%rbp)
	jmp	.L10
.L14:
	movl	-4028(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	cmpl	%eax, -4032(%rbp)
	jl	.L23
	movl	-4028(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %edx
	movl	-4032(%rbp), %eax
	subl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %edx
	movl	-4032(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	dp(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	min
	movl	-4032(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	dp(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4028(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L13
	movl	-4028(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %edx
	movl	-4032(%rbp), %eax
	subl	%edx, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp_odd(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %edx
	movl	-4032(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	dp_odd(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	min
	movl	-4032(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	dp_odd(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
.L13:
	addl	$1, -4028(%rbp)
.L10:
	movl	-4028(%rbp), %eax
	cmpl	-4020(%rbp), %eax
	jl	.L14
	jmp	.L12
.L23:
	nop
.L12:
	addl	$1, -4032(%rbp)
.L9:
	cmpl	$999999, -4032(%rbp)
	jle	.L15
	jmp	.L16
.L18:
	movl	-4036(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp_odd(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4036(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	dp(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L16:
	leaq	-4036(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L17
	movl	-4036(%rbp), %eax
	testl	%eax, %eax
	jne	.L18
.L17:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
