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>
typedef long long ll;
int main() {
	ll n = 1, p, ans = 1;
	int cnt = 0;
	scanf("%lld%lld", &n, &p);
	if (n == 1) {
		printf("%lld\n", p);
		return 0;
	}
	for (int i = 2; (ll)i * i <= p; i++) {
		while (p % i == 0) {
			cnt++;
			p /= i;
			// printf("%d * ", i);
		}
		if (cnt >= n) {
			for (int j = 0; j < cnt / n; j++) {
				ans *= i;
			}
		}
		cnt = 0;
	}
	printf("%lld\n", ans);
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld%lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	8(%rsp), %rsi
	movq	$1, 8(%rsp)
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %r9
	cmpq	$1, %r9
	je	.L2
	movq	16(%rsp), %rcx
	xorl	%r10d, %r10d
	movl	$1, %r8d
	movl	$2, %esi
	cmpq	$3, %rcx
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rcx, %rax
	xorl	%edi, %edi
	cqto
	idivq	%rsi
	testq	%rdx, %rdx
	jne	.L7
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%rcx, %rax
	addl	$1, %edi
	cqto
	idivq	%rsi
	cqto
	movq	%rax, %rcx
	idivq	%rsi
	testq	%rdx, %rdx
	je	.L6
	movslq	%edi, %rax
	movl	$1, %r10d
	cmpq	%rax, %r9
	jle	.L27
.L7:
	addq	$1, %rsi
	movq	%rsi, %rax
	imulq	%rsi, %rax
	cmpq	%rcx, %rax
	jle	.L3
	testb	%r10b, %r10b
	je	.L4
	movq	%rcx, 16(%rsp)
.L4:
	movq	%r8, %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L5:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L28
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L27:
	.cfi_restore_state
	cqto
	idivq	%r9
	testq	%rax, %rax
	jle	.L7
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L8:
	addl	$1, %edx
	imulq	%rsi, %r8
	cmpl	%eax, %edx
	jne	.L8
	movl	$1, %r10d
	jmp	.L7
.L2:
	movq	16(%rsp), %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L5
.L28:
	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:
```

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%lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	8(%rsp), %rsi
	movq	$1, 8(%rsp)
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %r9
	cmpq	$1, %r9
	je	.L2
	movq	16(%rsp), %rcx
	xorl	%r10d, %r10d
	movl	$1, %r8d
	movl	$2, %esi
	cmpq	$3, %rcx
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rcx, %rax
	xorl	%edi, %edi
	cqto
	idivq	%rsi
	testq	%rdx, %rdx
	jne	.L7
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%rcx, %rax
	addl	$1, %edi
	cqto
	idivq	%rsi
	cqto
	movq	%rax, %rcx
	idivq	%rsi
	testq	%rdx, %rdx
	je	.L6
	movslq	%edi, %rax
	movl	$1, %r10d
	cmpq	%rax, %r9
	jle	.L27
.L7:
	addq	$1, %rsi
	movq	%rsi, %rax
	imulq	%rsi, %rax
	cmpq	%rcx, %rax
	jle	.L3
	testb	%r10b, %r10b
	je	.L4
	movq	%rcx, 16(%rsp)
.L4:
	movq	%r8, %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L5:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L28
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L27:
	.cfi_restore_state
	cqto
	idivq	%r9
	testq	%rax, %rax
	jle	.L7
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L8:
	addl	$1, %edx
	imulq	%rsi, %r8
	cmpl	%eax, %edx
	jne	.L8
	movl	$1, %r10d
	jmp	.L7
.L2:
	movq	16(%rsp), %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L5
.L28:
	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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld%lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	8(%rsp), %rsi
	movq	$1, 8(%rsp)
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %r9
	cmpq	$1, %r9
	je	.L2
	movq	16(%rsp), %rcx
	xorl	%r10d, %r10d
	movl	$1, %r8d
	movl	$2, %esi
	cmpq	$3, %rcx
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rcx, %rax
	xorl	%edi, %edi
	cqto
	idivq	%rsi
	testq	%rdx, %rdx
	jne	.L7
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%rcx, %rax
	addl	$1, %edi
	cqto
	idivq	%rsi
	cqto
	movq	%rax, %rcx
	idivq	%rsi
	testq	%rdx, %rdx
	je	.L6
	movslq	%edi, %rax
	movl	$1, %r10d
	cmpq	%rax, %r9
	jle	.L27
.L7:
	addq	$1, %rsi
	movq	%rsi, %rax
	imulq	%rsi, %rax
	cmpq	%rcx, %rax
	jle	.L3
	testb	%r10b, %r10b
	je	.L4
	movq	%rcx, 16(%rsp)
.L4:
	movq	%r8, %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L5:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L28
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L27:
	.cfi_restore_state
	cqto
	idivq	%r9
	testq	%rax, %rax
	jle	.L7
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L8:
	addl	$1, %edx
	imulq	%rsi, %r8
	cmpl	%eax, %edx
	jne	.L8
	movl	$1, %r10d
	jmp	.L7
.L2:
	movq	16(%rsp), %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L5
.L28:
	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:
```
```c
#include <stdio.h>
typedef long long ll;
int main() {
	ll n = 1, p, ans = 1;
	int cnt = 0;
	scanf("%lld%lld", &n, &p);
	if (n == 1) {
		printf("%lld\n", p);
		return 0;
	}
	for (int i = 2; (ll)i * i <= p; i++) {
		while (p % i == 0) {
			cnt++;
			p /= i;
			// printf("%d * ", i);
		}
		if (cnt >= n) {
			for (int j = 0; j < cnt / n; j++) {
				ans *= i;
			}
		}
		cnt = 0;
	}
	printf("%lld\n", ans);
	return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
typedef long long ll;
int main() {
	ll n = 1, p, ans = 1;
	int cnt = 0;
	scanf("%lld%lld", &n, &p);
	if (n == 1) {
		printf("%lld\n", p);
		return 0;
	}
	for (int i = 2; (ll)i * i <= p; i++) {
		while (p % i == 0) {
			cnt++;
			p /= i;
			// printf("%d * ", i);
		}
		if (cnt >= n) {
			for (int j = 0; j < cnt / n; j++) {
				ans *= i;
			}
		}
		cnt = 0;
	}
	printf("%lld\n", ans);
	return 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:

3 24

2

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>
typedef long long ll;
int main() {
	ll n = 1, p, ans = 1;
	int cnt = 0;
	scanf("%lld%lld", &n, &p);
	if (n == 1) {
		printf("%lld\n", p);
		return 0;
	}
	for (int i = 2; (ll)i * i <= p; i++) {
		while (p % i == 0) {
			cnt++;
			p /= i;
			// printf("%d * ", i);
		}
		if (cnt >= n) {
			for (int j = 0; j < cnt / n; j++) {
				ans *= i;
			}
		}
		cnt = 0;
	}
	printf("%lld\n", ans);
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld%lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	8(%rsp), %rsi
	movq	$1, 8(%rsp)
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %r9
	cmpq	$1, %r9
	je	.L2
	movq	16(%rsp), %rcx
	xorl	%r10d, %r10d
	movl	$1, %r8d
	movl	$2, %esi
	cmpq	$3, %rcx
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rcx, %rax
	xorl	%edi, %edi
	cqto
	idivq	%rsi
	testq	%rdx, %rdx
	jne	.L7
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%rcx, %rax
	addl	$1, %edi
	cqto
	idivq	%rsi
	cqto
	movq	%rax, %rcx
	idivq	%rsi
	testq	%rdx, %rdx
	je	.L6
	movslq	%edi, %rax
	movl	$1, %r10d
	cmpq	%rax, %r9
	jle	.L27
.L7:
	addq	$1, %rsi
	movq	%rsi, %rax
	imulq	%rsi, %rax
	cmpq	%rcx, %rax
	jle	.L3
	testb	%r10b, %r10b
	je	.L4
	movq	%rcx, 16(%rsp)
.L4:
	movq	%r8, %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L5:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L28
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L27:
	.cfi_restore_state
	cqto
	idivq	%r9
	testq	%rax, %rax
	jle	.L7
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L8:
	addl	$1, %edx
	imulq	%rsi, %r8
	cmpl	%eax, %edx
	jne	.L8
	movl	$1, %r10d
	jmp	.L7
.L2:
	movq	16(%rsp), %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L5
.L28:
	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:
```

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%lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	8(%rsp), %rsi
	movq	$1, 8(%rsp)
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %r9
	cmpq	$1, %r9
	je	.L2
	movq	16(%rsp), %rcx
	xorl	%r10d, %r10d
	movl	$1, %r8d
	movl	$2, %esi
	cmpq	$3, %rcx
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rcx, %rax
	xorl	%edi, %edi
	cqto
	idivq	%rsi
	testq	%rdx, %rdx
	jne	.L7
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%rcx, %rax
	addl	$1, %edi
	cqto
	idivq	%rsi
	cqto
	movq	%rax, %rcx
	idivq	%rsi
	testq	%rdx, %rdx
	je	.L6
	movslq	%edi, %rax
	movl	$1, %r10d
	cmpq	%rax, %r9
	jle	.L27
.L7:
	addq	$1, %rsi
	movq	%rsi, %rax
	imulq	%rsi, %rax
	cmpq	%rcx, %rax
	jle	.L3
	testb	%r10b, %r10b
	je	.L4
	movq	%rcx, 16(%rsp)
.L4:
	movq	%r8, %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L5:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L28
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L27:
	.cfi_restore_state
	cqto
	idivq	%r9
	testq	%rax, %rax
	jle	.L7
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L8:
	addl	$1, %edx
	imulq	%rsi, %r8
	cmpl	%eax, %edx
	jne	.L8
	movl	$1, %r10d
	jmp	.L7
.L2:
	movq	16(%rsp), %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L5
.L28:
	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:
```