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

```c
long long l,i;main(r,x){for(;scanf("%lld",&l),l;printf("%d\n",(l>1?3:1)*r/2+1))for(i=r=1;++i*i<=l;r*=x)for(x=1;!(l%i);l/=i)x+=2;exit(0);}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	l(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC1(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movq	l(%rip), %rcx
	testq	%rcx, %rcx
	je	.L23
	xorl	%r9d, %r9d
	movl	$1, %r8d
	movl	$2, %esi
	movq	$2, i(%rip)
	cmpq	$3, %rcx
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rcx, %rax
	movl	$1, %edi
	cqto
	idivq	%rsi
	testq	%rdx, %rdx
	jne	.L7
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rcx, %rax
	addl	$2, %edi
	cqto
	idivq	%rsi
	cqto
	movq	%rax, %rcx
	idivq	%rsi
	testq	%rdx, %rdx
	je	.L5
	imull	%edi, %r8d
	movl	$1, %r9d
.L7:
	addq	$1, %rsi
	movq	%rsi, %rax
	imulq	%rsi, %rax
	cmpq	%rax, %rcx
	jge	.L3
	movq	%rsi, i(%rip)
	testb	%r9b, %r9b
	je	.L4
	movq	%rcx, l(%rip)
.L4:
	cmpq	$1, %rcx
	leal	(%r8,%r8,2), %eax
	movq	%r12, %rdi
	cmovg	%eax, %r8d
	xorl	%eax, %eax
	sarl	%r8d
	leal	1(%r8), %esi
	call	printf@PLT
	jmp	.L2
.L23:
	xorl	%edi, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	i
	.bss
	.align 8
	.type	i, @object
	.size	i, 8
i:
	.zero	8
	.globl	l
	.align 8
	.type	l, @object
	.size	l, 8
l:
	.zero	8
	.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	"%d\n"
.LC1:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	l(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC1(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movq	l(%rip), %rcx
	testq	%rcx, %rcx
	je	.L23
	xorl	%r9d, %r9d
	movl	$1, %r8d
	movl	$2, %esi
	movq	$2, i(%rip)
	cmpq	$3, %rcx
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rcx, %rax
	movl	$1, %edi
	cqto
	idivq	%rsi
	testq	%rdx, %rdx
	jne	.L7
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rcx, %rax
	addl	$2, %edi
	cqto
	idivq	%rsi
	cqto
	movq	%rax, %rcx
	idivq	%rsi
	testq	%rdx, %rdx
	je	.L5
	imull	%edi, %r8d
	movl	$1, %r9d
.L7:
	addq	$1, %rsi
	movq	%rsi, %rax
	imulq	%rsi, %rax
	cmpq	%rax, %rcx
	jge	.L3
	movq	%rsi, i(%rip)
	testb	%r9b, %r9b
	je	.L4
	movq	%rcx, l(%rip)
.L4:
	cmpq	$1, %rcx
	leal	(%r8,%r8,2), %eax
	movq	%r12, %rdi
	cmovg	%eax, %r8d
	xorl	%eax, %eax
	sarl	%r8d
	leal	1(%r8), %esi
	call	printf@PLT
	jmp	.L2
.L23:
	xorl	%edi, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	i
	.bss
	.align 8
	.type	i, @object
	.size	i, 8
i:
	.zero	8
	.globl	l
	.align 8
	.type	l, @object
	.size	l, 8
l:
	.zero	8
	.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	"%d\n"
.LC1:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	l(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC1(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movq	l(%rip), %rcx
	testq	%rcx, %rcx
	je	.L23
	xorl	%r9d, %r9d
	movl	$1, %r8d
	movl	$2, %esi
	movq	$2, i(%rip)
	cmpq	$3, %rcx
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rcx, %rax
	movl	$1, %edi
	cqto
	idivq	%rsi
	testq	%rdx, %rdx
	jne	.L7
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rcx, %rax
	addl	$2, %edi
	cqto
	idivq	%rsi
	cqto
	movq	%rax, %rcx
	idivq	%rsi
	testq	%rdx, %rdx
	je	.L5
	imull	%edi, %r8d
	movl	$1, %r9d
.L7:
	addq	$1, %rsi
	movq	%rsi, %rax
	imulq	%rsi, %rax
	cmpq	%rax, %rcx
	jge	.L3
	movq	%rsi, i(%rip)
	testb	%r9b, %r9b
	je	.L4
	movq	%rcx, l(%rip)
.L4:
	cmpq	$1, %rcx
	leal	(%r8,%r8,2), %eax
	movq	%r12, %rdi
	cmovg	%eax, %r8d
	xorl	%eax, %eax
	sarl	%r8d
	leal	1(%r8), %esi
	call	printf@PLT
	jmp	.L2
.L23:
	xorl	%edi, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	i
	.bss
	.align 8
	.type	i, @object
	.size	i, 8
i:
	.zero	8
	.globl	l
	.align 8
	.type	l, @object
	.size	l, 8
l:
	.zero	8
	.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
long long l,i;main(r,x){for(;scanf("%lld",&l),l;printf("%d\n",(l>1?3:1)*r/2+1))for(i=r=1;++i*i<=l;r*=x)for(x=1;!(l%i);l/=i)x+=2;exit(0);}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
long long l,i;main(r,x){for(;scanf("%lld",&l),l;printf("%d\n",(l>1?3:1)*r/2+1))for(i=r=1;++i*i<=l;r*=x)for(x=1;!(l%i);l/=i)x+=2;exit(0);}```

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:

12
11
2
0
 12
9
3
0
 12
8
2
0
 12
9
0
0
 12
0
3
0
 12
15
2
0
 12
9
1
0
 12
8
1
0
 12
9
4
0
 12
11
4
0

8
2
2
 8
3
2
 8
4
2
 8
3
 8
 8
5
2
 8
3
1
 8
4
1
 8
3
3
 8
2
3

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

```c
long long l,i;main(r,x){for(;scanf("%lld",&l),l;printf("%d\n",(l>1?3:1)*r/2+1))for(i=r=1;++i*i<=l;r*=x)for(x=1;!(l%i);l/=i)x+=2;exit(0);}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	l(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC1(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movq	l(%rip), %rcx
	testq	%rcx, %rcx
	je	.L23
	xorl	%r9d, %r9d
	movl	$1, %r8d
	movl	$2, %esi
	movq	$2, i(%rip)
	cmpq	$3, %rcx
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rcx, %rax
	movl	$1, %edi
	cqto
	idivq	%rsi
	testq	%rdx, %rdx
	jne	.L7
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rcx, %rax
	addl	$2, %edi
	cqto
	idivq	%rsi
	cqto
	movq	%rax, %rcx
	idivq	%rsi
	testq	%rdx, %rdx
	je	.L5
	imull	%edi, %r8d
	movl	$1, %r9d
.L7:
	addq	$1, %rsi
	movq	%rsi, %rax
	imulq	%rsi, %rax
	cmpq	%rax, %rcx
	jge	.L3
	movq	%rsi, i(%rip)
	testb	%r9b, %r9b
	je	.L4
	movq	%rcx, l(%rip)
.L4:
	cmpq	$1, %rcx
	leal	(%r8,%r8,2), %eax
	movq	%r12, %rdi
	cmovg	%eax, %r8d
	xorl	%eax, %eax
	sarl	%r8d
	leal	1(%r8), %esi
	call	printf@PLT
	jmp	.L2
.L23:
	xorl	%edi, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	i
	.bss
	.align 8
	.type	i, @object
	.size	i, 8
i:
	.zero	8
	.globl	l
	.align 8
	.type	l, @object
	.size	l, 8
l:
	.zero	8
	.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	"%d\n"
.LC1:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	l(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC1(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movq	l(%rip), %rcx
	testq	%rcx, %rcx
	je	.L23
	xorl	%r9d, %r9d
	movl	$1, %r8d
	movl	$2, %esi
	movq	$2, i(%rip)
	cmpq	$3, %rcx
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rcx, %rax
	movl	$1, %edi
	cqto
	idivq	%rsi
	testq	%rdx, %rdx
	jne	.L7
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rcx, %rax
	addl	$2, %edi
	cqto
	idivq	%rsi
	cqto
	movq	%rax, %rcx
	idivq	%rsi
	testq	%rdx, %rdx
	je	.L5
	imull	%edi, %r8d
	movl	$1, %r9d
.L7:
	addq	$1, %rsi
	movq	%rsi, %rax
	imulq	%rsi, %rax
	cmpq	%rax, %rcx
	jge	.L3
	movq	%rsi, i(%rip)
	testb	%r9b, %r9b
	je	.L4
	movq	%rcx, l(%rip)
.L4:
	cmpq	$1, %rcx
	leal	(%r8,%r8,2), %eax
	movq	%r12, %rdi
	cmovg	%eax, %r8d
	xorl	%eax, %eax
	sarl	%r8d
	leal	1(%r8), %esi
	call	printf@PLT
	jmp	.L2
.L23:
	xorl	%edi, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	i
	.bss
	.align 8
	.type	i, @object
	.size	i, 8
i:
	.zero	8
	.globl	l
	.align 8
	.type	l, @object
	.size	l, 8
l:
	.zero	8
	.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:
```