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>
#include<math.h>

int isprime(int x);

int main(void){
	long int n,i,temp;
	/*n?????§????´???°???????????????*/
	scanf("%ld",&n);
	temp=n;
	printf("%ld:",n);
	if(isprime(n)==1){printf(" %ld\n",n);return 0;}
	while(temp!=0){
		for(i=2;i<=temp;i++){
			if(isprime(i)!=0 && temp%i==0){printf(" %ld",i);break;}
		}
		temp=temp/i;
	}
	printf("\n");
	return 0;
}


int isprime(int x){
	int i;
	if(x==2)return 1;
	if(x<2 || x%2==0)return 0;
	for(i=3;i < sqrt(x);i=i+2){
		if(x%i==0)return 0;
	}
	return 1;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%ld"
.LC1:
	.string	"%ld:"
.LC2:
	.string	" %ld\n"
.LC3:
	.string	" %ld"
	.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	$32, %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	-32(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	-32(%rbp), %rax
	movl	%eax, %edi
	call	isprime
	cmpl	$1, %eax
	jne	.L4
	movq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L10
.L9:
	movq	$2, -24(%rbp)
	jmp	.L5
.L8:
	movq	-24(%rbp), %rax
	movl	%eax, %edi
	call	isprime
	testl	%eax, %eax
	je	.L6
	movq	-16(%rbp), %rax
	cqto
	idivq	-24(%rbp)
	movq	%rdx, %rax
	testq	%rax, %rax
	jne	.L6
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L7
.L6:
	addq	$1, -24(%rbp)
.L5:
	movq	-24(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jle	.L8
.L7:
	movq	-16(%rbp), %rax
	cqto
	idivq	-24(%rbp)
	movq	%rax, -16(%rbp)
.L4:
	cmpq	$0, -16(%rbp)
	jne	.L9
	movl	$10, %edi
	call	putchar@PLT
	movl	$0, %eax
.L10:
	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
	.globl	isprime
	.type	isprime, @function
isprime:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	cmpl	$2, -20(%rbp)
	jne	.L13
	movl	$1, %eax
	jmp	.L14
.L13:
	cmpl	$1, -20(%rbp)
	jle	.L15
	movl	-20(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L16
.L15:
	movl	$0, %eax
	jmp	.L14
.L16:
	movl	$3, -4(%rbp)
	jmp	.L17
.L19:
	movl	-20(%rbp), %eax
	cltd
	idivl	-4(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L18
	movl	$0, %eax
	jmp	.L14
.L18:
	addl	$2, -4(%rbp)
.L17:
	pxor	%xmm1, %xmm1
	cvtsi2sdl	-4(%rbp), %xmm1
	movsd	%xmm1, -32(%rbp)
	pxor	%xmm2, %xmm2
	cvtsi2sdl	-20(%rbp), %xmm2
	movq	%xmm2, %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	movq	%xmm0, %rax
	movq	%rax, %xmm3
	comisd	-32(%rbp), %xmm3
	ja	.L19
	movl	$1, %eax
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	isprime, .-isprime
	.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	"%ld"
.LC1:
	.string	"%ld:"
.LC2:
	.string	" %ld\n"
.LC4:
	.string	" %ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	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
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$32, %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
	movq	16(%rsp), %r13
	leaq	.LC1(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	movq	%r13, %rdx
	call	__printf_chk@PLT
	movq	16(%rsp), %r12
	cmpl	$2, %r12d
	je	.L11
	cmpl	$1, %r12d
	jle	.L7
	testb	$1, %r12b
	je	.L7
	pxor	%xmm1, %xmm1
	pxor	%xmm0, %xmm0
	movl	%r12d, %ebx
	cvtsi2sdl	%r12d, %xmm1
	ucomisd	%xmm1, %xmm0
	ja	.L57
	sqrtsd	%xmm1, %xmm1
	movl	$3, %ecx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L13:
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	.L7
	addl	$2, %ecx
.L10:
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%ecx, %xmm0
	comisd	%xmm0, %xmm1
	ja	.L13
.L11:
	movq	%r12, %rdx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
.L7:
	pxor	%xmm2, %xmm2
	leaq	.LC4(%rip), %r12
	testq	%r13, %r13
	je	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	movl	$2, %ebp
	cmpq	$1, %r13
	jle	.L23
	.p2align 4,,10
	.p2align 3
.L24:
	movl	%ebp, %ebx
	cmpl	$2, %ebp
	je	.L20
	cmpl	$1, %ebp
	jle	.L16
	testb	$1, %bpl
	je	.L16
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%ebp, %xmm1
	ucomisd	%xmm1, %xmm2
	ja	.L58
	sqrtsd	%xmm1, %xmm1
	movl	$3, %ecx
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L22:
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	.L16
	addl	$2, %ecx
.L19:
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%ecx, %xmm0
	comisd	%xmm0, %xmm1
	ja	.L22
.L20:
	movq	%r13, %rax
	cqto
	idivq	%rbp
	testq	%rdx, %rdx
	je	.L61
.L16:
	addq	$1, %rbp
	cmpq	%rbp, %r13
	jge	.L24
.L23:
	movq	%r13, %rax
	cqto
	idivq	%rbp
	movq	%rax, %r13
	testq	%rax, %rax
	jne	.L5
.L6:
	movl	$10, %edi
	call	putchar@PLT
.L3:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L62
	addq	$32, %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
.L61:
	.cfi_restore_state
	movq	%rbp, %rdx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	%r13, %rax
	pxor	%xmm2, %xmm2
	cqto
	idivq	%rbp
	movq	%rax, %r13
	testq	%rax, %rax
	jne	.L5
	jmp	.L6
.L58:
	movl	$3, %r14d
	jmp	.L17
.L63:
	movl	%ebx, %eax
	cltd
	idivl	%r14d
	testl	%edx, %edx
	je	.L16
	movsd	8(%rsp), %xmm1
	addl	$2, %r14d
.L17:
	movapd	%xmm1, %xmm0
	movsd	%xmm1, 8(%rsp)
	call	sqrt@PLT
	pxor	%xmm2, %xmm2
	movapd	%xmm0, %xmm3
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%r14d, %xmm0
	comisd	%xmm0, %xmm3
	ja	.L63
	jmp	.L20
.L62:
	call	__stack_chk_fail@PLT
.L57:
	movl	$3, %ebp
	jmp	.L8
.L64:
	movl	%ebx, %eax
	cltd
	idivl	%ebp
	testl	%edx, %edx
	je	.L7
	movsd	8(%rsp), %xmm1
	addl	$2, %ebp
.L8:
	movapd	%xmm1, %xmm0
	movsd	%xmm1, 8(%rsp)
	call	sqrt@PLT
	movapd	%xmm0, %xmm2
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%ebp, %xmm0
	comisd	%xmm0, %xmm2
	ja	.L64
	jmp	.L11
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.text
	.p2align 4
	.globl	isprime
	.type	isprime, @function
isprime:
.LFB24:
	.cfi_startproc
	endbr64
	cmpl	$2, %edi
	je	.L90
	cmpl	$1, %edi
	jle	.L92
	testb	$1, %dil
	je	.L92
	pxor	%xmm1, %xmm1
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%edi, %xmm1
	ucomisd	%xmm1, %xmm0
	ja	.L88
	sqrtsd	%xmm1, %xmm1
	movl	$3, %ecx
	jmp	.L72
	.p2align 4,,10
	.p2align 3
.L77:
	movl	%edi, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	.L92
	addl	$2, %ecx
.L72:
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%ecx, %xmm0
	comisd	%xmm0, %xmm1
	ja	.L77
.L90:
	movl	$1, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L92:
	xorl	%eax, %eax
	ret
.L88:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movl	$3, %ebx
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	jmp	.L70
.L94:
	movl	12(%rsp), %edi
	movl	%edi, %eax
	cltd
	idivl	%ebx
	testl	%edx, %edx
	je	.L69
	movsd	(%rsp), %xmm1
	addl	$2, %ebx
.L70:
	movapd	%xmm1, %xmm0
	movl	%edi, 12(%rsp)
	movsd	%xmm1, (%rsp)
	call	sqrt@PLT
	movapd	%xmm0, %xmm2
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%ebx, %xmm0
	comisd	%xmm0, %xmm2
	ja	.L94
	movl	$1, %eax
.L65:
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L69:
	.cfi_restore_state
	xorl	%eax, %eax
	jmp	.L65
	.cfi_endproc
.LFE24:
	.size	isprime, .-isprime
	.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	"%ld"
.LC1:
	.string	"%ld:"
.LC2:
	.string	" %ld\n"
.LC4:
	.string	" %ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	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
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$32, %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
	movq	16(%rsp), %r13
	leaq	.LC1(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	movq	%r13, %rdx
	call	__printf_chk@PLT
	movq	16(%rsp), %r12
	cmpl	$2, %r12d
	je	.L11
	cmpl	$1, %r12d
	jle	.L7
	testb	$1, %r12b
	je	.L7
	pxor	%xmm1, %xmm1
	pxor	%xmm0, %xmm0
	movl	%r12d, %ebx
	cvtsi2sdl	%r12d, %xmm1
	ucomisd	%xmm1, %xmm0
	ja	.L57
	sqrtsd	%xmm1, %xmm1
	movl	$3, %ecx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L13:
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	.L7
	addl	$2, %ecx
.L10:
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%ecx, %xmm0
	comisd	%xmm0, %xmm1
	ja	.L13
.L11:
	movq	%r12, %rdx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
.L7:
	pxor	%xmm2, %xmm2
	leaq	.LC4(%rip), %r12
	testq	%r13, %r13
	je	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	movl	$2, %ebp
	cmpq	$1, %r13
	jle	.L23
	.p2align 4,,10
	.p2align 3
.L24:
	movl	%ebp, %ebx
	cmpl	$2, %ebp
	je	.L20
	cmpl	$1, %ebp
	jle	.L16
	testb	$1, %bpl
	je	.L16
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%ebp, %xmm1
	ucomisd	%xmm1, %xmm2
	ja	.L58
	sqrtsd	%xmm1, %xmm1
	movl	$3, %ecx
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L22:
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	.L16
	addl	$2, %ecx
.L19:
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%ecx, %xmm0
	comisd	%xmm0, %xmm1
	ja	.L22
.L20:
	movq	%r13, %rax
	cqto
	idivq	%rbp
	testq	%rdx, %rdx
	je	.L61
.L16:
	addq	$1, %rbp
	cmpq	%rbp, %r13
	jge	.L24
.L23:
	movq	%r13, %rax
	cqto
	idivq	%rbp
	movq	%rax, %r13
	testq	%rax, %rax
	jne	.L5
.L6:
	movl	$10, %edi
	call	putchar@PLT
.L3:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L62
	addq	$32, %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
.L61:
	.cfi_restore_state
	movq	%rbp, %rdx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	%r13, %rax
	pxor	%xmm2, %xmm2
	cqto
	idivq	%rbp
	movq	%rax, %r13
	testq	%rax, %rax
	jne	.L5
	jmp	.L6
.L58:
	movl	$3, %r14d
	jmp	.L17
.L63:
	movl	%ebx, %eax
	cltd
	idivl	%r14d
	testl	%edx, %edx
	je	.L16
	movsd	8(%rsp), %xmm1
	addl	$2, %r14d
.L17:
	movapd	%xmm1, %xmm0
	movsd	%xmm1, 8(%rsp)
	call	sqrt@PLT
	pxor	%xmm2, %xmm2
	movapd	%xmm0, %xmm3
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%r14d, %xmm0
	comisd	%xmm0, %xmm3
	ja	.L63
	jmp	.L20
.L62:
	call	__stack_chk_fail@PLT
.L57:
	movl	$3, %ebp
	jmp	.L8
.L64:
	movl	%ebx, %eax
	cltd
	idivl	%ebp
	testl	%edx, %edx
	je	.L7
	movsd	8(%rsp), %xmm1
	addl	$2, %ebp
.L8:
	movapd	%xmm1, %xmm0
	movsd	%xmm1, 8(%rsp)
	call	sqrt@PLT
	movapd	%xmm0, %xmm2
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%ebp, %xmm0
	comisd	%xmm0, %xmm2
	ja	.L64
	jmp	.L11
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.text
	.p2align 4
	.globl	isprime
	.type	isprime, @function
isprime:
.LFB24:
	.cfi_startproc
	endbr64
	cmpl	$2, %edi
	je	.L90
	cmpl	$1, %edi
	jle	.L92
	testb	$1, %dil
	je	.L92
	pxor	%xmm1, %xmm1
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%edi, %xmm1
	ucomisd	%xmm1, %xmm0
	ja	.L88
	sqrtsd	%xmm1, %xmm1
	movl	$3, %ecx
	jmp	.L72
	.p2align 4,,10
	.p2align 3
.L77:
	movl	%edi, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	.L92
	addl	$2, %ecx
.L72:
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%ecx, %xmm0
	comisd	%xmm0, %xmm1
	ja	.L77
.L90:
	movl	$1, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L92:
	xorl	%eax, %eax
	ret
.L88:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movl	$3, %ebx
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	jmp	.L70
.L94:
	movl	12(%rsp), %edi
	movl	%edi, %eax
	cltd
	idivl	%ebx
	testl	%edx, %edx
	je	.L69
	movsd	(%rsp), %xmm1
	addl	$2, %ebx
.L70:
	movapd	%xmm1, %xmm0
	movl	%edi, 12(%rsp)
	movsd	%xmm1, (%rsp)
	call	sqrt@PLT
	movapd	%xmm0, %xmm2
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%ebx, %xmm0
	comisd	%xmm0, %xmm2
	ja	.L94
	movl	$1, %eax
.L65:
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L69:
	.cfi_restore_state
	xorl	%eax, %eax
	jmp	.L65
	.cfi_endproc
.LFE24:
	.size	isprime, .-isprime
	.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>
#include<math.h>

int isprime(int x);

int main(void){
	long int n,i,temp;
	/*n?????§????´???°???????????????*/
	scanf("%ld",&n);
	temp=n;
	printf("%ld:",n);
	if(isprime(n)==1){printf(" %ld\n",n);return 0;}
	while(temp!=0){
		for(i=2;i<=temp;i++){
			if(isprime(i)!=0 && temp%i==0){printf(" %ld",i);break;}
		}
		temp=temp/i;
	}
	printf("\n");
	return 0;
}


int isprime(int x){
	int i;
	if(x==2)return 1;
	if(x<2 || x%2==0)return 0;
	for(i=3;i < sqrt(x);i=i+2){
		if(x%i==0)return 0;
	}
	return 1;
}
23
 7
 38
 22
 30
 4
 31
 6
 27
 3

23: 23
 7: 7
 38: 2 19
 22: 2 11
 30: 2 3 5
 4: 2 2
 31: 31
 6: 2 3
 27: 3 3 3
 3: 3

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>
#include<math.h>

int isprime(int x);

int main(void){
	long int n,i,temp;
	/*n?????§????´???°???????????????*/
	scanf("%ld",&n);
	temp=n;
	printf("%ld:",n);
	if(isprime(n)==1){printf(" %ld\n",n);return 0;}
	while(temp!=0){
		for(i=2;i<=temp;i++){
			if(isprime(i)!=0 && temp%i==0){printf(" %ld",i);break;}
		}
		temp=temp/i;
	}
	printf("\n");
	return 0;
}


int isprime(int x){
	int i;
	if(x==2)return 1;
	if(x<2 || x%2==0)return 0;
	for(i=3;i < sqrt(x);i=i+2){
		if(x%i==0)return 0;
	}
	return 1;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%ld"
.LC1:
	.string	"%ld:"
.LC2:
	.string	" %ld\n"
.LC3:
	.string	" %ld"
	.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	$32, %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	-32(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	-32(%rbp), %rax
	movl	%eax, %edi
	call	isprime
	cmpl	$1, %eax
	jne	.L4
	movq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L10
.L9:
	movq	$2, -24(%rbp)
	jmp	.L5
.L8:
	movq	-24(%rbp), %rax
	movl	%eax, %edi
	call	isprime
	testl	%eax, %eax
	je	.L6
	movq	-16(%rbp), %rax
	cqto
	idivq	-24(%rbp)
	movq	%rdx, %rax
	testq	%rax, %rax
	jne	.L6
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L7
.L6:
	addq	$1, -24(%rbp)
.L5:
	movq	-24(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jle	.L8
.L7:
	movq	-16(%rbp), %rax
	cqto
	idivq	-24(%rbp)
	movq	%rax, -16(%rbp)
.L4:
	cmpq	$0, -16(%rbp)
	jne	.L9
	movl	$10, %edi
	call	putchar@PLT
	movl	$0, %eax
.L10:
	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
	.globl	isprime
	.type	isprime, @function
isprime:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	cmpl	$2, -20(%rbp)
	jne	.L13
	movl	$1, %eax
	jmp	.L14
.L13:
	cmpl	$1, -20(%rbp)
	jle	.L15
	movl	-20(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L16
.L15:
	movl	$0, %eax
	jmp	.L14
.L16:
	movl	$3, -4(%rbp)
	jmp	.L17
.L19:
	movl	-20(%rbp), %eax
	cltd
	idivl	-4(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L18
	movl	$0, %eax
	jmp	.L14
.L18:
	addl	$2, -4(%rbp)
.L17:
	pxor	%xmm1, %xmm1
	cvtsi2sdl	-4(%rbp), %xmm1
	movsd	%xmm1, -32(%rbp)
	pxor	%xmm2, %xmm2
	cvtsi2sdl	-20(%rbp), %xmm2
	movq	%xmm2, %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	movq	%xmm0, %rax
	movq	%rax, %xmm3
	comisd	-32(%rbp), %xmm3
	ja	.L19
	movl	$1, %eax
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	isprime, .-isprime
	.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	"%ld"
.LC1:
	.string	"%ld:"
.LC2:
	.string	" %ld\n"
.LC3:
	.string	" %ld"
	.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	$32, %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	-32(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	-32(%rbp), %rax
	movl	%eax, %edi
	call	isprime
	cmpl	$1, %eax
	jne	.L4
	movq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L10
.L9:
	movq	$2, -24(%rbp)
	jmp	.L5
.L8:
	movq	-24(%rbp), %rax
	movl	%eax, %edi
	call	isprime
	testl	%eax, %eax
	je	.L6
	movq	-16(%rbp), %rax
	cqto
	idivq	-24(%rbp)
	movq	%rdx, %rax
	testq	%rax, %rax
	jne	.L6
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L7
.L6:
	addq	$1, -24(%rbp)
.L5:
	movq	-24(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jle	.L8
.L7:
	movq	-16(%rbp), %rax
	cqto
	idivq	-24(%rbp)
	movq	%rax, -16(%rbp)
.L4:
	cmpq	$0, -16(%rbp)
	jne	.L9
	movl	$10, %edi
	call	putchar@PLT
	movl	$0, %eax
.L10:
	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
	.globl	isprime
	.type	isprime, @function
isprime:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	cmpl	$2, -20(%rbp)
	jne	.L13
	movl	$1, %eax
	jmp	.L14
.L13:
	cmpl	$1, -20(%rbp)
	jle	.L15
	movl	-20(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L16
.L15:
	movl	$0, %eax
	jmp	.L14
.L16:
	movl	$3, -4(%rbp)
	jmp	.L17
.L19:
	movl	-20(%rbp), %eax
	cltd
	idivl	-4(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L18
	movl	$0, %eax
	jmp	.L14
.L18:
	addl	$2, -4(%rbp)
.L17:
	pxor	%xmm1, %xmm1
	cvtsi2sdl	-4(%rbp), %xmm1
	movsd	%xmm1, -32(%rbp)
	pxor	%xmm2, %xmm2
	cvtsi2sdl	-20(%rbp), %xmm2
	movq	%xmm2, %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	movq	%xmm0, %rax
	movq	%rax, %xmm3
	comisd	-32(%rbp), %xmm3
	ja	.L19
	movl	$1, %eax
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	isprime, .-isprime
	.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:
