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 MOD_N 1000000007

int main(void){

    int N,i,j,tmp,pow[1001] = {0};
    long long int ans = 1;

    scanf("%d",&N);

    for(i = 2;i <= N;i++){
        tmp = i;
        for(j = 2;j <= i;j++){
            while(tmp % j == 0){
                tmp /= j;
                pow[j]++;
            }
        }
    }

    for(i = 0;i <= N;i++){
        ans *= (pow[i]+1);
        ans %= MOD_N;
    }

    printf("%lld\n",ans);
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.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	$4048, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-4016(%rbp), %rdx
	movl	$0, %eax
	movl	$500, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	%rdi, %rdx
	movl	%eax, (%rdx)
	addq	$4, %rdx
	movq	$1, -4024(%rbp)
	leaq	-4040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$2, -4036(%rbp)
	jmp	.L2
.L7:
	movl	-4036(%rbp), %eax
	movl	%eax, -4028(%rbp)
	movl	$2, -4032(%rbp)
	jmp	.L3
.L5:
	movl	-4028(%rbp), %eax
	cltd
	idivl	-4032(%rbp)
	movl	%eax, -4028(%rbp)
	movl	-4032(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-4032(%rbp), %eax
	cltq
	movl	%edx, -4016(%rbp,%rax,4)
.L4:
	movl	-4028(%rbp), %eax
	cltd
	idivl	-4032(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	je	.L5
	addl	$1, -4032(%rbp)
.L3:
	movl	-4032(%rbp), %eax
	cmpl	-4036(%rbp), %eax
	jle	.L4
	addl	$1, -4036(%rbp)
.L2:
	movl	-4040(%rbp), %eax
	cmpl	%eax, -4036(%rbp)
	jle	.L7
	movl	$0, -4036(%rbp)
	jmp	.L8
.L9:
	movl	-4036(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	addl	$1, %eax
	cltq
	movq	-4024(%rbp), %rdx
	imulq	%rdx, %rax
	movq	%rax, -4024(%rbp)
	movq	-4024(%rbp), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -4024(%rbp)
	addl	$1, -4036(%rbp)
.L8:
	movl	-4040(%rbp), %eax
	cmpl	%eax, -4036(%rbp)
	jle	.L9
	movq	-4024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@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
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	$500, %ecx
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$4032, %rsp
	.cfi_def_cfa_offset 4064
	movq	%fs:40, %rax
	movq	%rax, 4024(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	leaq	12(%rsp), %rsi
	movq	%rbx, %rdi
	leaq	24(%rsp), %rbp
	rep stosq
	movl	$0, (%rdi)
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r11d
	movl	$3, %r10d
	leal	2(%r11), %r12d
	cmpl	$1, %r11d
	jle	.L23
	.p2align 4,,10
	.p2align 3
.L8:
	leal	-1(%r10), %ecx
	movq	%rbp, %r9
	movl	$2, %esi
	.p2align 4,,10
	.p2align 3
.L10:
	movl	%ecx, %eax
	cltd
	idivl	%esi
	testl	%edx, %edx
	jne	.L7
	movl	(%r9), %eax
	leal	1(%rax), %edi
	.p2align 4,,10
	.p2align 3
.L4:
	movl	%ecx, %eax
	movl	%edi, %r8d
	addl	$1, %edi
	cltd
	idivl	%esi
	cltd
	movl	%eax, %ecx
	idivl	%esi
	testl	%edx, %edx
	je	.L4
	movl	%r8d, (%r9)
.L7:
	addl	$1, %esi
	addq	$4, %r9
	cmpl	%r10d, %esi
	jne	.L10
	addl	$1, %r10d
	cmpl	%r12d, %r10d
	jne	.L8
.L11:
	xorl	%esi, %esi
	movl	$1, %edx
	movabsq	$-8543223828751151131, %rdi
	.p2align 4,,10
	.p2align 3
.L9:
	movl	(%rbx,%rsi,4), %eax
	addq	$1, %rsi
	leal	1(%rax), %ecx
	movslq	%ecx, %rcx
	imulq	%rdx, %rcx
	movq	%rcx, %rax
	imulq	%rdi
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	cmpl	%esi, %r11d
	jge	.L9
.L12:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	4024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L24
	addq	$4032, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L23:
	.cfi_restore_state
	testl	%r11d, %r11d
	jns	.L11
	movl	$1, %edx
	jmp	.L12
.L24:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	$500, %ecx
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$4032, %rsp
	.cfi_def_cfa_offset 4064
	movq	%fs:40, %rax
	movq	%rax, 4024(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	leaq	12(%rsp), %rsi
	movq	%rbx, %rdi
	leaq	24(%rsp), %rbp
	rep stosq
	movl	$0, (%rdi)
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r11d
	movl	$3, %r10d
	leal	2(%r11), %r12d
	cmpl	$1, %r11d
	jle	.L23
	.p2align 4,,10
	.p2align 3
.L8:
	leal	-1(%r10), %ecx
	movq	%rbp, %r9
	movl	$2, %esi
	.p2align 4,,10
	.p2align 3
.L10:
	movl	%ecx, %eax
	cltd
	idivl	%esi
	testl	%edx, %edx
	jne	.L7
	movl	(%r9), %eax
	leal	1(%rax), %edi
	.p2align 4,,10
	.p2align 3
.L4:
	movl	%ecx, %eax
	movl	%edi, %r8d
	addl	$1, %edi
	cltd
	idivl	%esi
	cltd
	movl	%eax, %ecx
	idivl	%esi
	testl	%edx, %edx
	je	.L4
	movl	%r8d, (%r9)
.L7:
	addl	$1, %esi
	addq	$4, %r9
	cmpl	%r10d, %esi
	jne	.L10
	addl	$1, %r10d
	cmpl	%r12d, %r10d
	jne	.L8
.L11:
	xorl	%esi, %esi
	movl	$1, %edx
	movabsq	$-8543223828751151131, %rdi
	.p2align 4,,10
	.p2align 3
.L9:
	movl	(%rbx,%rsi,4), %eax
	addq	$1, %rsi
	leal	1(%rax), %ecx
	movslq	%ecx, %rcx
	imulq	%rdx, %rcx
	movq	%rcx, %rax
	imulq	%rdi
	movq	%rcx, %rax
	sarq	$63, %rax
	addq	%rcx, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	cmpl	%esi, %r11d
	jge	.L9
.L12:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	4024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L24
	addq	$4032, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L23:
	.cfi_restore_state
	testl	%r11d, %r11d
	jns	.L11
	movl	$1, %edx
	jmp	.L12
.L24:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:

#include<stdio.h>

#define MOD_N 1000000007

int main(void){

    int N,i,j,tmp,pow[1001] = {0};
    long long int ans = 1;

    scanf("%d",&N);

    for(i = 2;i <= N;i++){
        tmp = i;
        for(j = 2;j <= i;j++){
            while(tmp % j == 0){
                tmp /= j;
                pow[j]++;
            }
        }
    }

    for(i = 0;i <= N;i++){
        ans *= (pow[i]+1);
        ans %= MOD_N;
    }

    printf("%lld\n",ans);
    return 0;
}
8
 0
 15
 18
 2
 4
 9
 5
 10
 7

96
 1
 4032
 14688
 2
 8
 160
 16
 270
 60

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 MOD_N 1000000007

int main(void){

    int N,i,j,tmp,pow[1001] = {0};
    long long int ans = 1;

    scanf("%d",&N);

    for(i = 2;i <= N;i++){
        tmp = i;
        for(j = 2;j <= i;j++){
            while(tmp % j == 0){
                tmp /= j;
                pow[j]++;
            }
        }
    }

    for(i = 0;i <= N;i++){
        ans *= (pow[i]+1);
        ans %= MOD_N;
    }

    printf("%lld\n",ans);
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.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	$4048, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-4016(%rbp), %rdx
	movl	$0, %eax
	movl	$500, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	%rdi, %rdx
	movl	%eax, (%rdx)
	addq	$4, %rdx
	movq	$1, -4024(%rbp)
	leaq	-4040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$2, -4036(%rbp)
	jmp	.L2
.L7:
	movl	-4036(%rbp), %eax
	movl	%eax, -4028(%rbp)
	movl	$2, -4032(%rbp)
	jmp	.L3
.L5:
	movl	-4028(%rbp), %eax
	cltd
	idivl	-4032(%rbp)
	movl	%eax, -4028(%rbp)
	movl	-4032(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-4032(%rbp), %eax
	cltq
	movl	%edx, -4016(%rbp,%rax,4)
.L4:
	movl	-4028(%rbp), %eax
	cltd
	idivl	-4032(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	je	.L5
	addl	$1, -4032(%rbp)
.L3:
	movl	-4032(%rbp), %eax
	cmpl	-4036(%rbp), %eax
	jle	.L4
	addl	$1, -4036(%rbp)
.L2:
	movl	-4040(%rbp), %eax
	cmpl	%eax, -4036(%rbp)
	jle	.L7
	movl	$0, -4036(%rbp)
	jmp	.L8
.L9:
	movl	-4036(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	addl	$1, %eax
	cltq
	movq	-4024(%rbp), %rdx
	imulq	%rdx, %rax
	movq	%rax, -4024(%rbp)
	movq	-4024(%rbp), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -4024(%rbp)
	addl	$1, -4036(%rbp)
.L8:
	movl	-4040(%rbp), %eax
	cmpl	%eax, -4036(%rbp)
	jle	.L9
	movq	-4024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@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
.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
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.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	$4048, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-4016(%rbp), %rdx
	movl	$0, %eax
	movl	$500, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	%rdi, %rdx
	movl	%eax, (%rdx)
	addq	$4, %rdx
	movq	$1, -4024(%rbp)
	leaq	-4040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$2, -4036(%rbp)
	jmp	.L2
.L7:
	movl	-4036(%rbp), %eax
	movl	%eax, -4028(%rbp)
	movl	$2, -4032(%rbp)
	jmp	.L3
.L5:
	movl	-4028(%rbp), %eax
	cltd
	idivl	-4032(%rbp)
	movl	%eax, -4028(%rbp)
	movl	-4032(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-4032(%rbp), %eax
	cltq
	movl	%edx, -4016(%rbp,%rax,4)
.L4:
	movl	-4028(%rbp), %eax
	cltd
	idivl	-4032(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	je	.L5
	addl	$1, -4032(%rbp)
.L3:
	movl	-4032(%rbp), %eax
	cmpl	-4036(%rbp), %eax
	jle	.L4
	addl	$1, -4036(%rbp)
.L2:
	movl	-4040(%rbp), %eax
	cmpl	%eax, -4036(%rbp)
	jle	.L7
	movl	$0, -4036(%rbp)
	jmp	.L8
.L9:
	movl	-4036(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	addl	$1, %eax
	cltq
	movq	-4024(%rbp), %rdx
	imulq	%rdx, %rax
	movq	%rax, -4024(%rbp)
	movq	-4024(%rbp), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -4024(%rbp)
	addl	$1, -4036(%rbp)
.L8:
	movl	-4040(%rbp), %eax
	cmpl	%eax, -4036(%rbp)
	jle	.L9
	movq	-4024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@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
.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:
