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

```c
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
	long long n,ans=0,total,j,i;
	scanf("%lld",&n);
	for(i=2;i<=sqrt(n);i++){
		if(n%i==0){
			total=0,j=1;
			while(n%i==0){
				n/=i;
				total++;
			}
			while(total-j>=0){
				total-=j;
				j++;ans++;
			}
		}
	}
	if(n!=1)ans++;
	printf("%lld\n",ans);
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	movl	$2, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movl	$2, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$40, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rsi
	call	__isoc99_scanf@PLT
	pxor	%xmm2, %xmm2
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	addq	$1, %rbp
.L2:
	movq	16(%rsp), %rbx
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdq	%rbp, %xmm1
	cvtsi2sdq	%rbx, %xmm0
	ucomisd	%xmm0, %xmm2
	ja	.L18
	sqrtsd	%xmm0, %xmm0
.L8:
	comisd	%xmm1, %xmm0
	jb	.L21
	movq	%rbx, %rax
	cqto
	idivq	%rbp
	movq	%rdx, %rsi
	testq	%rdx, %rdx
	jne	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rbx, %rax
	movq	%rsi, %rcx
	leaq	1(%rsi), %rsi
	cqto
	idivq	%rbp
	cqto
	movq	%rax, %rbx
	idivq	%rbp
	testq	%rdx, %rdx
	je	.L4
	movq	%rbx, 16(%rsp)
	movq	%r13, %rsi
	movq	%r12, %rax
	subq	%r12, %rsi
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	(%rsi,%rax), %rdx
	addq	$1, %rax
	subq	%rdx, %rcx
	jns	.L5
	movq	%rax, %r12
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L21:
	xorl	%eax, %eax
	cmpq	$1, %rbx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	setne	%al
	addq	%rax, %r12
	xorl	%eax, %eax
	movq	%r12, %rdx
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	movsd	%xmm1, 8(%rsp)
	call	sqrt@PLT
	movsd	8(%rsp), %xmm1
	pxor	%xmm2, %xmm2
	jmp	.L8
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	movl	$2, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movl	$2, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$40, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rsi
	call	__isoc99_scanf@PLT
	pxor	%xmm2, %xmm2
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	addq	$1, %rbp
.L2:
	movq	16(%rsp), %rbx
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdq	%rbp, %xmm1
	cvtsi2sdq	%rbx, %xmm0
	ucomisd	%xmm0, %xmm2
	ja	.L18
	sqrtsd	%xmm0, %xmm0
.L8:
	comisd	%xmm1, %xmm0
	jb	.L21
	movq	%rbx, %rax
	cqto
	idivq	%rbp
	movq	%rdx, %rsi
	testq	%rdx, %rdx
	jne	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rbx, %rax
	movq	%rsi, %rcx
	leaq	1(%rsi), %rsi
	cqto
	idivq	%rbp
	cqto
	movq	%rax, %rbx
	idivq	%rbp
	testq	%rdx, %rdx
	je	.L4
	movq	%rbx, 16(%rsp)
	movq	%r13, %rsi
	movq	%r12, %rax
	subq	%r12, %rsi
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	(%rsi,%rax), %rdx
	addq	$1, %rax
	subq	%rdx, %rcx
	jns	.L5
	movq	%rax, %r12
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L21:
	xorl	%eax, %eax
	cmpq	$1, %rbx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	setne	%al
	addq	%rax, %r12
	xorl	%eax, %eax
	movq	%r12, %rdx
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	movsd	%xmm1, 8(%rsp)
	call	sqrt@PLT
	movsd	8(%rsp), %xmm1
	pxor	%xmm2, %xmm2
	jmp	.L8
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	movl	$2, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movl	$2, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$40, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rsi
	call	__isoc99_scanf@PLT
	pxor	%xmm2, %xmm2
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	addq	$1, %rbp
.L2:
	movq	16(%rsp), %rbx
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdq	%rbp, %xmm1
	cvtsi2sdq	%rbx, %xmm0
	ucomisd	%xmm0, %xmm2
	ja	.L18
	sqrtsd	%xmm0, %xmm0
.L8:
	comisd	%xmm1, %xmm0
	jb	.L21
	movq	%rbx, %rax
	cqto
	idivq	%rbp
	movq	%rdx, %rsi
	testq	%rdx, %rdx
	jne	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rbx, %rax
	movq	%rsi, %rcx
	leaq	1(%rsi), %rsi
	cqto
	idivq	%rbp
	cqto
	movq	%rax, %rbx
	idivq	%rbp
	testq	%rdx, %rdx
	je	.L4
	movq	%rbx, 16(%rsp)
	movq	%r13, %rsi
	movq	%r12, %rax
	subq	%r12, %rsi
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	(%rsi,%rax), %rdx
	addq	$1, %rax
	subq	%rdx, %rcx
	jns	.L5
	movq	%rax, %r12
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L21:
	xorl	%eax, %eax
	cmpq	$1, %rbx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	setne	%al
	addq	%rax, %r12
	xorl	%eax, %eax
	movq	%r12, %rdx
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	movsd	%xmm1, 8(%rsp)
	call	sqrt@PLT
	movsd	8(%rsp), %xmm1
	pxor	%xmm2, %xmm2
	jmp	.L8
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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:
```
```c
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
	long long n,ans=0,total,j,i;
	scanf("%lld",&n);
	for(i=2;i<=sqrt(n);i++){
		if(n%i==0){
			total=0,j=1;
			while(n%i==0){
				n/=i;
				total++;
			}
			while(total-j>=0){
				total-=j;
				j++;ans++;
			}
		}
	}
	if(n!=1)ans++;
	printf("%lld\n",ans);
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
	long long n,ans=0,total,j,i;
	scanf("%lld",&n);
	for(i=2;i<=sqrt(n);i++){
		if(n%i==0){
			total=0,j=1;
			while(n%i==0){
				n/=i;
				total++;
			}
			while(total-j>=0){
				total-=j;
				j++;ans++;
			}
		}
	}
	if(n!=1)ans++;
	printf("%lld\n",ans);
}```

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.
Optimized Assembly Code:

1336021909504
 2
 1390976380
 116
 1130063570614
 72
 2986505832
 001
 30410688
 4

7
 1
 5
 2
 4
 3
 6
 0
 8
 1

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

```c
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
	long long n,ans=0,total,j,i;
	scanf("%lld",&n);
	for(i=2;i<=sqrt(n);i++){
		if(n%i==0){
			total=0,j=1;
			while(n%i==0){
				n/=i;
				total++;
			}
			while(total-j>=0){
				total-=j;
				j++;ans++;
			}
		}
	}
	if(n!=1)ans++;
	printf("%lld\n",ans);
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	movl	$2, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movl	$2, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$40, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rsi
	call	__isoc99_scanf@PLT
	pxor	%xmm2, %xmm2
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	addq	$1, %rbp
.L2:
	movq	16(%rsp), %rbx
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdq	%rbp, %xmm1
	cvtsi2sdq	%rbx, %xmm0
	ucomisd	%xmm0, %xmm2
	ja	.L18
	sqrtsd	%xmm0, %xmm0
.L8:
	comisd	%xmm1, %xmm0
	jb	.L21
	movq	%rbx, %rax
	cqto
	idivq	%rbp
	movq	%rdx, %rsi
	testq	%rdx, %rdx
	jne	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rbx, %rax
	movq	%rsi, %rcx
	leaq	1(%rsi), %rsi
	cqto
	idivq	%rbp
	cqto
	movq	%rax, %rbx
	idivq	%rbp
	testq	%rdx, %rdx
	je	.L4
	movq	%rbx, 16(%rsp)
	movq	%r13, %rsi
	movq	%r12, %rax
	subq	%r12, %rsi
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	(%rsi,%rax), %rdx
	addq	$1, %rax
	subq	%rdx, %rcx
	jns	.L5
	movq	%rax, %r12
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L21:
	xorl	%eax, %eax
	cmpq	$1, %rbx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	setne	%al
	addq	%rax, %r12
	xorl	%eax, %eax
	movq	%r12, %rdx
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	movsd	%xmm1, 8(%rsp)
	call	sqrt@PLT
	movsd	8(%rsp), %xmm1
	pxor	%xmm2, %xmm2
	jmp	.L8
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	movl	$2, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movl	$2, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$40, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rsi
	call	__isoc99_scanf@PLT
	pxor	%xmm2, %xmm2
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	addq	$1, %rbp
.L2:
	movq	16(%rsp), %rbx
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdq	%rbp, %xmm1
	cvtsi2sdq	%rbx, %xmm0
	ucomisd	%xmm0, %xmm2
	ja	.L18
	sqrtsd	%xmm0, %xmm0
.L8:
	comisd	%xmm1, %xmm0
	jb	.L21
	movq	%rbx, %rax
	cqto
	idivq	%rbp
	movq	%rdx, %rsi
	testq	%rdx, %rdx
	jne	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rbx, %rax
	movq	%rsi, %rcx
	leaq	1(%rsi), %rsi
	cqto
	idivq	%rbp
	cqto
	movq	%rax, %rbx
	idivq	%rbp
	testq	%rdx, %rdx
	je	.L4
	movq	%rbx, 16(%rsp)
	movq	%r13, %rsi
	movq	%r12, %rax
	subq	%r12, %rsi
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	(%rsi,%rax), %rdx
	addq	$1, %rax
	subq	%rdx, %rcx
	jns	.L5
	movq	%rax, %r12
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L21:
	xorl	%eax, %eax
	cmpq	$1, %rbx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	setne	%al
	addq	%rax, %r12
	xorl	%eax, %eax
	movq	%r12, %rdx
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	movsd	%xmm1, 8(%rsp)
	call	sqrt@PLT
	movsd	8(%rsp), %xmm1
	pxor	%xmm2, %xmm2
	jmp	.L8
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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:
```