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>

int main()
{
	long long N;
	scanf("%lld", &N);
	
	int p, q;
	long long div = 0, ans = 1;
	for (p = 2; p <= N; p++) {
		for (q = 2; q * q <= p; q++) if (p / q * q == p) break;
		if (q * q <= p) continue;
		for (q = (int)N / p, div = 0; q >= 1; q /= p) div += q;
		ans = ans * (div + 1) % 1000000007;
	}
	
	printf("%lld\n", ans);
	fflush(stdout);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lld"
.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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -24(%rbp)
	movq	$1, -16(%rbp)
	movl	$2, -40(%rbp)
	jmp	.L2
.L11:
	movl	$2, -36(%rbp)
	jmp	.L3
.L6:
	movl	-40(%rbp), %eax
	cltd
	idivl	-36(%rbp)
	imull	-36(%rbp), %eax
	cmpl	%eax, -40(%rbp)
	je	.L14
	addl	$1, -36(%rbp)
.L3:
	movl	-36(%rbp), %eax
	imull	%eax, %eax
	cmpl	%eax, -40(%rbp)
	jge	.L6
	jmp	.L5
.L14:
	nop
.L5:
	movl	-36(%rbp), %eax
	imull	%eax, %eax
	cmpl	%eax, -40(%rbp)
	jge	.L15
	movq	-32(%rbp), %rax
	cltd
	idivl	-40(%rbp)
	movl	%eax, -36(%rbp)
	movq	$0, -24(%rbp)
	jmp	.L9
.L10:
	movl	-36(%rbp), %eax
	cltq
	addq	%rax, -24(%rbp)
	movl	-36(%rbp), %eax
	cltd
	idivl	-40(%rbp)
	movl	%eax, -36(%rbp)
.L9:
	cmpl	$0, -36(%rbp)
	jg	.L10
	movq	-24(%rbp), %rax
	addq	$1, %rax
	imulq	-16(%rbp), %rax
	movq	%rax, %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
	movq	%rax, -16(%rbp)
	movq	-16(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -16(%rbp)
	jmp	.L8
.L15:
	nop
.L8:
	addl	$1, -40(%rbp)
.L2:
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	-32(%rbp), %rax
	cmpq	%rax, %rdx
	jle	.L11
	movq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	stdout(%rip), %rax
	movq	%rax, %rdi
	call	fflush@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	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	"%lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$24, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	(%rsp), %r9
	movl	$1, %r8d
	cmpq	$1, %r9
	jle	.L3
	movl	$3, %ebx
	movl	$3, %r11d
	movl	$1, %r8d
	movl	%r9d, %edi
	cmpl	%ebx, %r9d
	movl	$2, %r10d
	movabsq	$-8543223828751151131, %rbp
	cmovle	%r9d, %ebx
	.p2align 4,,10
	.p2align 3
.L5:
	movl	%edi, %eax
	xorl	%ecx, %ecx
	cltd
	idivl	%r10d
	testl	%eax, %eax
	jle	.L14
.L4:
	movslq	%eax, %rdx
	addq	%rdx, %rcx
	cltd
	idivl	%r10d
	testl	%eax, %eax
	jne	.L4
.L14:
	addq	$1, %rcx
	leal	1(%r10), %esi
	movl	$3, %r10d
	imulq	%r8, %rcx
	movq	%rcx, %rax
	mulq	%rbp
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	movq	%r11, %rax
	addq	$1, %r11
	movq	%rcx, %r8
	cmpl	%ebx, %esi
	jle	.L5
	movabsq	$-8543223828751151131, %r11
	movslq	%esi, %r10
	cmpq	%r9, %rax
	jg	.L3
	.p2align 4,,10
	.p2align 3
.L12:
	testb	$1, %sil
	je	.L7
	movl	$2, %ecx
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L26:
	movl	%esi, %eax
	cltd
	idivl	%ecx
	imull	%ecx, %eax
	cmpl	%eax, %esi
	je	.L7
.L9:
	addl	$1, %ecx
	movl	%ecx, %eax
	imull	%ecx, %eax
	cmpl	%eax, %esi
	jge	.L26
	movl	%edi, %eax
	xorl	%ecx, %ecx
	cltd
	idivl	%esi
	testl	%eax, %eax
	jle	.L10
	.p2align 4,,10
	.p2align 3
.L11:
	movslq	%eax, %rdx
	addq	%rdx, %rcx
	cltd
	idivl	%esi
	testl	%eax, %eax
	jne	.L11
.L10:
	addq	$1, %rcx
	imulq	%r8, %rcx
	movq	%rcx, %rax
	mulq	%r11
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %r8
.L7:
	addq	$1, %r10
	addl	$1, %esi
	cmpq	%r10, %r9
	jge	.L12
.L3:
	movl	$1, %edi
	xorl	%eax, %eax
	movq	%r8, %rdx
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L27:
	.cfi_restore_state
	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	"%lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$24, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	(%rsp), %r9
	movl	$1, %r8d
	cmpq	$1, %r9
	jle	.L3
	movl	$3, %ebx
	movl	$3, %r11d
	movl	$1, %r8d
	movl	%r9d, %edi
	cmpl	%ebx, %r9d
	movl	$2, %r10d
	movabsq	$-8543223828751151131, %rbp
	cmovle	%r9d, %ebx
	.p2align 4,,10
	.p2align 3
.L5:
	movl	%edi, %eax
	xorl	%ecx, %ecx
	cltd
	idivl	%r10d
	testl	%eax, %eax
	jle	.L14
.L4:
	movslq	%eax, %rdx
	addq	%rdx, %rcx
	cltd
	idivl	%r10d
	testl	%eax, %eax
	jne	.L4
.L14:
	addq	$1, %rcx
	leal	1(%r10), %esi
	movl	$3, %r10d
	imulq	%r8, %rcx
	movq	%rcx, %rax
	mulq	%rbp
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	movq	%r11, %rax
	addq	$1, %r11
	movq	%rcx, %r8
	cmpl	%ebx, %esi
	jle	.L5
	movabsq	$-8543223828751151131, %r11
	movslq	%esi, %r10
	cmpq	%r9, %rax
	jg	.L3
	.p2align 4,,10
	.p2align 3
.L12:
	testb	$1, %sil
	je	.L7
	movl	$2, %ecx
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L26:
	movl	%esi, %eax
	cltd
	idivl	%ecx
	imull	%ecx, %eax
	cmpl	%eax, %esi
	je	.L7
.L9:
	addl	$1, %ecx
	movl	%ecx, %eax
	imull	%ecx, %eax
	cmpl	%eax, %esi
	jge	.L26
	movl	%edi, %eax
	xorl	%ecx, %ecx
	cltd
	idivl	%esi
	testl	%eax, %eax
	jle	.L10
	.p2align 4,,10
	.p2align 3
.L11:
	movslq	%eax, %rdx
	addq	%rdx, %rcx
	cltd
	idivl	%esi
	testl	%eax, %eax
	jne	.L11
.L10:
	addq	$1, %rcx
	imulq	%r8, %rcx
	movq	%rcx, %rax
	mulq	%r11
	shrq	$29, %rdx
	imulq	$1000000007, %rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %r8
.L7:
	addq	$1, %r10
	addl	$1, %esi
	cmpq	%r10, %r9
	jge	.L12
.L3:
	movl	$1, %edi
	xorl	%eax, %eax
	movq	%r8, %rdx
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L27:
	.cfi_restore_state
	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>

int main()
{
	long long N;
	scanf("%lld", &N);
	
	int p, q;
	long long div = 0, ans = 1;
	for (p = 2; p <= N; p++) {
		for (q = 2; q * q <= p; q++) if (p / q * q == p) break;
		if (q * q <= p) continue;
		for (q = (int)N / p, div = 0; q >= 1; q /= p) div += q;
		ans = ans * (div + 1) % 1000000007;
	}
	
	printf("%lld\n", ans);
	fflush(stdout);
	return 0;
}
3

4

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>

int main()
{
	long long N;
	scanf("%lld", &N);
	
	int p, q;
	long long div = 0, ans = 1;
	for (p = 2; p <= N; p++) {
		for (q = 2; q * q <= p; q++) if (p / q * q == p) break;
		if (q * q <= p) continue;
		for (q = (int)N / p, div = 0; q >= 1; q /= p) div += q;
		ans = ans * (div + 1) % 1000000007;
	}
	
	printf("%lld\n", ans);
	fflush(stdout);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lld"
.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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -24(%rbp)
	movq	$1, -16(%rbp)
	movl	$2, -40(%rbp)
	jmp	.L2
.L11:
	movl	$2, -36(%rbp)
	jmp	.L3
.L6:
	movl	-40(%rbp), %eax
	cltd
	idivl	-36(%rbp)
	imull	-36(%rbp), %eax
	cmpl	%eax, -40(%rbp)
	je	.L14
	addl	$1, -36(%rbp)
.L3:
	movl	-36(%rbp), %eax
	imull	%eax, %eax
	cmpl	%eax, -40(%rbp)
	jge	.L6
	jmp	.L5
.L14:
	nop
.L5:
	movl	-36(%rbp), %eax
	imull	%eax, %eax
	cmpl	%eax, -40(%rbp)
	jge	.L15
	movq	-32(%rbp), %rax
	cltd
	idivl	-40(%rbp)
	movl	%eax, -36(%rbp)
	movq	$0, -24(%rbp)
	jmp	.L9
.L10:
	movl	-36(%rbp), %eax
	cltq
	addq	%rax, -24(%rbp)
	movl	-36(%rbp), %eax
	cltd
	idivl	-40(%rbp)
	movl	%eax, -36(%rbp)
.L9:
	cmpl	$0, -36(%rbp)
	jg	.L10
	movq	-24(%rbp), %rax
	addq	$1, %rax
	imulq	-16(%rbp), %rax
	movq	%rax, %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
	movq	%rax, -16(%rbp)
	movq	-16(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -16(%rbp)
	jmp	.L8
.L15:
	nop
.L8:
	addl	$1, -40(%rbp)
.L2:
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	-32(%rbp), %rax
	cmpq	%rax, %rdx
	jle	.L11
	movq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	stdout(%rip), %rax
	movq	%rax, %rdi
	call	fflush@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	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	"%lld"
.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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -24(%rbp)
	movq	$1, -16(%rbp)
	movl	$2, -40(%rbp)
	jmp	.L2
.L11:
	movl	$2, -36(%rbp)
	jmp	.L3
.L6:
	movl	-40(%rbp), %eax
	cltd
	idivl	-36(%rbp)
	imull	-36(%rbp), %eax
	cmpl	%eax, -40(%rbp)
	je	.L14
	addl	$1, -36(%rbp)
.L3:
	movl	-36(%rbp), %eax
	imull	%eax, %eax
	cmpl	%eax, -40(%rbp)
	jge	.L6
	jmp	.L5
.L14:
	nop
.L5:
	movl	-36(%rbp), %eax
	imull	%eax, %eax
	cmpl	%eax, -40(%rbp)
	jge	.L15
	movq	-32(%rbp), %rax
	cltd
	idivl	-40(%rbp)
	movl	%eax, -36(%rbp)
	movq	$0, -24(%rbp)
	jmp	.L9
.L10:
	movl	-36(%rbp), %eax
	cltq
	addq	%rax, -24(%rbp)
	movl	-36(%rbp), %eax
	cltd
	idivl	-40(%rbp)
	movl	%eax, -36(%rbp)
.L9:
	cmpl	$0, -36(%rbp)
	jg	.L10
	movq	-24(%rbp), %rax
	addq	$1, %rax
	imulq	-16(%rbp), %rax
	movq	%rax, %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
	movq	%rax, -16(%rbp)
	movq	-16(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -16(%rbp)
	jmp	.L8
.L15:
	nop
.L8:
	addl	$1, -40(%rbp)
.L2:
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	-32(%rbp), %rax
	cmpq	%rax, %rdx
	jle	.L11
	movq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	stdout(%rip), %rax
	movq	%rax, %rdi
	call	fflush@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	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:
