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>

long long int N, P, F, ans, l, i, j, k;

int main(void){
	scanf("%lld%lld", &N, &P);
	if(N==1){printf("%lld\n", P);return 0;}
	if(P==1){printf("1\n");return 0;}
	ans=1;
	j=0;while(P%2==0){P/=2;j++;}if(j/N!=0){for(k=0; k<j/N; k++){ans*=2;}}
	j=0;while(P%3==0){P/=3;j++;}if(j/N!=0){for(k=0; k<j/N; k++){ans*=3;}}
	j=0;while(P%5==0){P/=5;j++;}if(j/N!=0){for(k=0; k<j/N; k++){ans*=5;}}
	for(i=5, l=sqrt(P)+1; i<l; i+=6){
		j=0;while(P%i==0){P/=i;j++;}if(j/N!=0){for(k=0; k<j/N; k++){ans*=i;}}
		j=0;while(P%(i+2)==0){P/=(i+2);j++;}if(j/N!=0){for(k=0; k<j/N; k++){ans*=(i+2);}}
	}
	printf("%lld\n", ans);
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	N
	.bss
	.align 8
	.type	N, @object
	.size	N, 8
N:
	.zero	8
	.globl	P
	.align 8
	.type	P, @object
	.size	P, 8
P:
	.zero	8
	.globl	F
	.align 8
	.type	F, @object
	.size	F, 8
F:
	.zero	8
	.globl	ans
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.zero	8
	.globl	l
	.align 8
	.type	l, @object
	.size	l, 8
l:
	.zero	8
	.globl	i
	.align 8
	.type	i, @object
	.size	i, 8
i:
	.zero	8
	.globl	j
	.align 8
	.type	j, @object
	.size	j, 8
j:
	.zero	8
	.globl	k
	.align 8
	.type	k, @object
	.size	k, 8
k:
	.zero	8
	.section	.rodata
.LC0:
	.string	"%lld%lld"
.LC1:
	.string	"%lld\n"
.LC2:
	.string	"1"
	.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
	leaq	P(%rip), %rax
	movq	%rax, %rdx
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	N(%rip), %rax
	cmpq	$1, %rax
	jne	.L2
	movq	P(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L3
.L2:
	movq	P(%rip), %rax
	cmpq	$1, %rax
	jne	.L4
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L3
.L4:
	movq	$1, ans(%rip)
	movq	$0, j(%rip)
	jmp	.L5
.L6:
	movq	P(%rip), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, P(%rip)
	movq	j(%rip), %rax
	addq	$1, %rax
	movq	%rax, j(%rip)
.L5:
	movq	P(%rip), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L6
	movq	j(%rip), %rax
	movq	N(%rip), %rdi
	cqto
	idivq	%rdi
	testq	%rax, %rax
	je	.L7
	movq	$0, k(%rip)
	jmp	.L8
.L9:
	movq	ans(%rip), %rax
	addq	%rax, %rax
	movq	%rax, ans(%rip)
	movq	k(%rip), %rax
	addq	$1, %rax
	movq	%rax, k(%rip)
.L8:
	movq	j(%rip), %rax
	movq	N(%rip), %rdi
	cqto
	idivq	%rdi
	movq	%rax, %rdx
	movq	k(%rip), %rax
	cmpq	%rax, %rdx
	jg	.L9
.L7:
	movq	$0, j(%rip)
	jmp	.L10
.L11:
	movq	P(%rip), %rcx
	movabsq	$6148914691236517206, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	sarq	$63, %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	movq	%rax, P(%rip)
	movq	j(%rip), %rax
	addq	$1, %rax
	movq	%rax, j(%rip)
.L10:
	movq	P(%rip), %rcx
	movabsq	$6148914691236517206, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rcx, %rsi
	sarq	$63, %rsi
	movq	%rdx, %rax
	subq	%rsi, %rax
	movq	%rax, %rdx
	addq	%rdx, %rdx
	addq	%rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	testq	%rax, %rax
	je	.L11
	movq	j(%rip), %rax
	movq	N(%rip), %rsi
	cqto
	idivq	%rsi
	testq	%rax, %rax
	je	.L12
	movq	$0, k(%rip)
	jmp	.L13
.L14:
	movq	ans(%rip), %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, ans(%rip)
	movq	k(%rip), %rax
	addq	$1, %rax
	movq	%rax, k(%rip)
.L13:
	movq	j(%rip), %rax
	movq	N(%rip), %rdi
	cqto
	idivq	%rdi
	movq	%rax, %rdx
	movq	k(%rip), %rax
	cmpq	%rax, %rdx
	jg	.L14
.L12:
	movq	$0, j(%rip)
	jmp	.L15
.L16:
	movq	P(%rip), %rcx
	movabsq	$7378697629483820647, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	%rax
	sarq	$63, %rcx
	movq	%rcx, %rdx
	subq	%rdx, %rax
	movq	%rax, P(%rip)
	movq	j(%rip), %rax
	addq	$1, %rax
	movq	%rax, j(%rip)
.L15:
	movq	P(%rip), %rcx
	movabsq	$7378697629483820647, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	%rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, %rdx
	salq	$2, %rdx
	addq	%rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	testq	%rax, %rax
	je	.L16
	movq	j(%rip), %rax
	movq	N(%rip), %rsi
	cqto
	idivq	%rsi
	testq	%rax, %rax
	je	.L17
	movq	$0, k(%rip)
	jmp	.L18
.L19:
	movq	ans(%rip), %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, ans(%rip)
	movq	k(%rip), %rax
	addq	$1, %rax
	movq	%rax, k(%rip)
.L18:
	movq	j(%rip), %rax
	movq	N(%rip), %rdi
	cqto
	idivq	%rdi
	movq	%rax, %rdx
	movq	k(%rip), %rax
	cmpq	%rax, %rdx
	jg	.L19
.L17:
	movq	$5, i(%rip)
	movq	P(%rip), %rax
	pxor	%xmm2, %xmm2
	cvtsi2sdq	%rax, %xmm2
	movq	%xmm2, %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	movsd	.LC3(%rip), %xmm1
	addsd	%xmm1, %xmm0
	cvttsd2siq	%xmm0, %rax
	movq	%rax, l(%rip)
	jmp	.L20
.L31:
	movq	$0, j(%rip)
	jmp	.L21
.L22:
	movq	P(%rip), %rax
	movq	i(%rip), %rsi
	cqto
	idivq	%rsi
	movq	%rax, P(%rip)
	movq	j(%rip), %rax
	addq	$1, %rax
	movq	%rax, j(%rip)
.L21:
	movq	P(%rip), %rax
	movq	i(%rip), %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	testq	%rax, %rax
	je	.L22
	movq	j(%rip), %rax
	movq	N(%rip), %rdi
	cqto
	idivq	%rdi
	testq	%rax, %rax
	je	.L23
	movq	$0, k(%rip)
	jmp	.L24
.L25:
	movq	ans(%rip), %rdx
	movq	i(%rip), %rax
	imulq	%rdx, %rax
	movq	%rax, ans(%rip)
	movq	k(%rip), %rax
	addq	$1, %rax
	movq	%rax, k(%rip)
.L24:
	movq	j(%rip), %rax
	movq	N(%rip), %rsi
	cqto
	idivq	%rsi
	movq	%rax, %rdx
	movq	k(%rip), %rax
	cmpq	%rax, %rdx
	jg	.L25
.L23:
	movq	$0, j(%rip)
	jmp	.L26
.L27:
	movq	P(%rip), %rax
	movq	i(%rip), %rdx
	leaq	2(%rdx), %rdi
	cqto
	idivq	%rdi
	movq	%rax, P(%rip)
	movq	j(%rip), %rax
	addq	$1, %rax
	movq	%rax, j(%rip)
.L26:
	movq	P(%rip), %rax
	movq	i(%rip), %rdx
	leaq	2(%rdx), %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	testq	%rax, %rax
	je	.L27
	movq	j(%rip), %rax
	movq	N(%rip), %rsi
	cqto
	idivq	%rsi
	testq	%rax, %rax
	je	.L28
	movq	$0, k(%rip)
	jmp	.L29
.L30:
	movq	i(%rip), %rax
	leaq	2(%rax), %rdx
	movq	ans(%rip), %rax
	imulq	%rdx, %rax
	movq	%rax, ans(%rip)
	movq	k(%rip), %rax
	addq	$1, %rax
	movq	%rax, k(%rip)
.L29:
	movq	j(%rip), %rax
	movq	N(%rip), %rdi
	cqto
	idivq	%rdi
	movq	%rax, %rdx
	movq	k(%rip), %rax
	cmpq	%rax, %rdx
	jg	.L30
.L28:
	movq	i(%rip), %rax
	addq	$6, %rax
	movq	%rax, i(%rip)
.L20:
	movq	i(%rip), %rdx
	movq	l(%rip), %rax
	cmpq	%rax, %rdx
	jl	.L31
	movq	ans(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC3:
	.long	0
	.long	1072693248
	.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%lld"
.LC1:
	.string	"%lld\n"
.LC2:
	.string	"1"
	.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	P(%rip), %rdx
	leaq	N(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	leaq	.LC0(%rip), %rdi
	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
	call	__isoc99_scanf@PLT
	movq	N(%rip), %rbp
	cmpq	$1, %rbp
	je	.L81
	movq	P(%rip), %rbx
	movq	%rbx, %rcx
	cmpq	$1, %rbx
	je	.L82
	movq	%rbx, %rdi
	movl	$1, %esi
	movq	$1, ans(%rip)
	andl	$1, %edi
	jne	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rcx, %rdx
	movq	%rsi, %rax
	addq	$1, %rsi
	shrq	$63, %rdx
	addq	%rcx, %rdx
	movq	%rdx, %rcx
	sarq	%rcx
	andl	$2, %edx
	je	.L5
	cqto
	movq	%rcx, P(%rip)
	movq	%rcx, %rbx
	idivq	%rbp
	testq	%rax, %rax
	je	.L6
	movq	$0, k(%rip)
	jle	.L6
	movl	$1, %edx
	.p2align 4,,10
	.p2align 3
.L8:
	addq	$1, %rdi
	addq	%rdx, %rdx
	cmpq	%rax, %rdi
	jne	.L8
	movq	%rdx, ans(%rip)
	movq	P(%rip), %rbx
	movq	%rdi, k(%rip)
.L6:
	movabsq	$-6148914691236517205, %r9
	movq	%rbx, %rax
	movabsq	$3074457345618258602, %r8
	movabsq	$6148914691236517204, %rdi
	imulq	%r9, %rax
	movq	%rbx, %rcx
	movl	$1, %esi
	movabsq	$6148914691236517206, %r10
	addq	%r8, %rax
	cmpq	%rdi, %rax
	ja	.L10
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rcx, %rax
	imulq	%r10
	movq	%rcx, %rax
	sarq	$63, %rax
	movq	%rdx, %rcx
	subq	%rax, %rcx
	movq	%rsi, %rax
	addq	$1, %rsi
	movq	%rcx, %rdx
	imulq	%r9, %rdx
	addq	%r8, %rdx
	cmpq	%rdi, %rdx
	jbe	.L9
	cqto
	movq	%rcx, P(%rip)
	movq	%rcx, %rbx
	idivq	%rbp
	movq	ans(%rip), %rdx
	testq	%rax, %rax
	je	.L10
	movq	$0, k(%rip)
	jle	.L10
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L12:
	addq	$1, %rcx
	leaq	(%rdx,%rdx,2), %rdx
	cmpq	%rcx, %rax
	jne	.L12
	movq	%rdx, ans(%rip)
	movq	P(%rip), %rbx
	movq	%rax, k(%rip)
.L10:
	movabsq	$-3689348814741910323, %rsi
	movq	%rbx, %rax
	movabsq	$1844674407370955161, %rdi
	movabsq	$3689348814741910322, %r8
	movq	$0, j(%rip)
	imulq	%rsi, %rax
	addq	%rdi, %rax
	cmpq	%r8, %rax
	ja	.L13
	movabsq	$7378697629483820647, %r9
	movl	$1, %ecx
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%rbx, %rax
	imulq	%r9
	movq	%rbx, %rax
	sarq	$63, %rax
	sarq	%rdx
	movq	%rdx, %rbx
	subq	%rax, %rbx
	movq	%rcx, %rax
	addq	$1, %rcx
	movq	%rbx, %rdx
	imulq	%rsi, %rdx
	addq	%rdi, %rdx
	cmpq	%r8, %rdx
	jbe	.L14
	cqto
	movq	%rax, j(%rip)
	idivq	%rbp
	movq	%rbx, P(%rip)
	testq	%rax, %rax
	je	.L13
	movq	$0, k(%rip)
	movq	ans(%rip), %rdx
	jle	.L13
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L15:
	addq	$1, %rcx
	leaq	(%rdx,%rdx,4), %rdx
	cmpq	%rcx, %rax
	jne	.L15
	movq	%rdx, ans(%rip)
	movq	%rax, k(%rip)
.L13:
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	movq	$5, i(%rip)
	cvtsi2sdq	%rbx, %xmm0
	ucomisd	%xmm0, %xmm1
	ja	.L78
	sqrtsd	%xmm0, %xmm0
.L18:
	addsd	.LC4(%rip), %xmm0
	movq	ans(%rip), %r13
	movq	%r13, %r8
	cvttsd2siq	%xmm0, %r9
	movq	%r9, l(%rip)
	cmpq	$5, %r9
	jle	.L20
	xorl	%r14d, %r14d
	xorl	%r10d, %r10d
	xorl	%r11d, %r11d
	movl	$5, %ecx
	.p2align 4,,10
	.p2align 3
.L19:
	movq	%rbx, %rax
	cqto
	idivq	%rcx
	testq	%rdx, %rdx
	jne	.L21
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L22:
	movq	%rbx, %rax
	addq	$1, %rsi
	cqto
	idivq	%rcx
	cqto
	movq	%rax, %rbx
	idivq	%rcx
	testq	%rdx, %rdx
	je	.L22
	movq	%rsi, %rax
	movl	$1, %r14d
	cqto
	idivq	%rbp
	testq	%rax, %rax
	jne	.L83
.L21:
	movq	%rbx, %rax
	leaq	2(%rcx), %rsi
	cqto
	idivq	%rsi
	testq	%rdx, %rdx
	jne	.L35
	movl	$1, %r14d
	.p2align 4,,10
	.p2align 3
.L25:
	movq	%rbx, %rax
	movq	%r14, %rdi
	leaq	1(%r14), %r14
	cqto
	idivq	%rsi
	cqto
	movq	%rax, %rbx
	idivq	%rsi
	testq	%rdx, %rdx
	je	.L25
	movq	%rdi, %rax
	movl	$1, %r14d
	cqto
	idivq	%rbp
	testq	%rax, %rax
	jne	.L84
.L24:
	addq	$6, %rcx
	cmpq	%rcx, %r9
	jg	.L19
	movq	%rcx, i(%rip)
	movq	%rdi, j(%rip)
	testb	%r14b, %r14b
	je	.L27
	movq	%rbx, P(%rip)
.L27:
	testb	%r10b, %r10b
	je	.L28
	movq	%r12, k(%rip)
.L28:
	testb	%r11b, %r11b
	je	.L20
	movq	%r8, ans(%rip)
	movq	%r8, %r13
.L20:
	movq	%r13, %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L3:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	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
	.p2align 4,,10
	.p2align 3
.L84:
	.cfi_restore_state
	jle	.L37
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L26:
	addq	$1, %rdx
	imulq	%rsi, %r8
	cmpq	%rdx, %rax
	jne	.L26
	movq	%rax, %r12
	movl	$1, %r14d
	movl	$1, %r10d
	movl	$1, %r11d
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L83:
	jle	.L34
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L23:
	addq	$1, %rdx
	imulq	%rcx, %r8
	cmpq	%rdx, %rax
	jne	.L23
	movq	%rax, %r12
	movl	$1, %r14d
	movl	$1, %r10d
	movl	$1, %r11d
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L35:
	xorl	%edi, %edi
	jmp	.L24
.L34:
	xorl	%r12d, %r12d
	movl	$1, %r10d
	jmp	.L21
.L37:
	xorl	%r12d, %r12d
	movl	$1, %r10d
	jmp	.L24
.L81:
	movq	P(%rip), %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
.L82:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L3
.L78:
	call	sqrt@PLT
	jmp	.L18
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	k
	.bss
	.align 8
	.type	k, @object
	.size	k, 8
k:
	.zero	8
	.globl	j
	.align 8
	.type	j, @object
	.size	j, 8
j:
	.zero	8
	.globl	i
	.align 8
	.type	i, @object
	.size	i, 8
i:
	.zero	8
	.globl	l
	.align 8
	.type	l, @object
	.size	l, 8
l:
	.zero	8
	.globl	ans
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.zero	8
	.globl	F
	.align 8
	.type	F, @object
	.size	F, 8
F:
	.zero	8
	.globl	P
	.align 8
	.type	P, @object
	.size	P, 8
P:
	.zero	8
	.globl	N
	.align 8
	.type	N, @object
	.size	N, 8
N:
	.zero	8
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC4:
	.long	0
	.long	1072693248
	.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%lld"
.LC1:
	.string	"%lld\n"
.LC2:
	.string	"1"
	.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	P(%rip), %rdx
	leaq	N(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	leaq	.LC0(%rip), %rdi
	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
	call	__isoc99_scanf@PLT
	movq	N(%rip), %rbp
	cmpq	$1, %rbp
	je	.L81
	movq	P(%rip), %rbx
	movq	%rbx, %rcx
	cmpq	$1, %rbx
	je	.L82
	movq	%rbx, %rdi
	movl	$1, %esi
	movq	$1, ans(%rip)
	andl	$1, %edi
	jne	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rcx, %rdx
	movq	%rsi, %rax
	addq	$1, %rsi
	shrq	$63, %rdx
	addq	%rcx, %rdx
	movq	%rdx, %rcx
	sarq	%rcx
	andl	$2, %edx
	je	.L5
	cqto
	movq	%rcx, P(%rip)
	movq	%rcx, %rbx
	idivq	%rbp
	testq	%rax, %rax
	je	.L6
	movq	$0, k(%rip)
	jle	.L6
	movl	$1, %edx
	.p2align 4,,10
	.p2align 3
.L8:
	addq	$1, %rdi
	addq	%rdx, %rdx
	cmpq	%rax, %rdi
	jne	.L8
	movq	%rdx, ans(%rip)
	movq	P(%rip), %rbx
	movq	%rdi, k(%rip)
.L6:
	movabsq	$-6148914691236517205, %r9
	movq	%rbx, %rax
	movabsq	$3074457345618258602, %r8
	movabsq	$6148914691236517204, %rdi
	imulq	%r9, %rax
	movq	%rbx, %rcx
	movl	$1, %esi
	movabsq	$6148914691236517206, %r10
	addq	%r8, %rax
	cmpq	%rdi, %rax
	ja	.L10
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rcx, %rax
	imulq	%r10
	movq	%rcx, %rax
	sarq	$63, %rax
	movq	%rdx, %rcx
	subq	%rax, %rcx
	movq	%rsi, %rax
	addq	$1, %rsi
	movq	%rcx, %rdx
	imulq	%r9, %rdx
	addq	%r8, %rdx
	cmpq	%rdi, %rdx
	jbe	.L9
	cqto
	movq	%rcx, P(%rip)
	movq	%rcx, %rbx
	idivq	%rbp
	movq	ans(%rip), %rdx
	testq	%rax, %rax
	je	.L10
	movq	$0, k(%rip)
	jle	.L10
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L12:
	addq	$1, %rcx
	leaq	(%rdx,%rdx,2), %rdx
	cmpq	%rcx, %rax
	jne	.L12
	movq	%rdx, ans(%rip)
	movq	P(%rip), %rbx
	movq	%rax, k(%rip)
.L10:
	movabsq	$-3689348814741910323, %rsi
	movq	%rbx, %rax
	movabsq	$1844674407370955161, %rdi
	movabsq	$3689348814741910322, %r8
	movq	$0, j(%rip)
	imulq	%rsi, %rax
	addq	%rdi, %rax
	cmpq	%r8, %rax
	ja	.L13
	movabsq	$7378697629483820647, %r9
	movl	$1, %ecx
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%rbx, %rax
	imulq	%r9
	movq	%rbx, %rax
	sarq	$63, %rax
	sarq	%rdx
	movq	%rdx, %rbx
	subq	%rax, %rbx
	movq	%rcx, %rax
	addq	$1, %rcx
	movq	%rbx, %rdx
	imulq	%rsi, %rdx
	addq	%rdi, %rdx
	cmpq	%r8, %rdx
	jbe	.L14
	cqto
	movq	%rax, j(%rip)
	idivq	%rbp
	movq	%rbx, P(%rip)
	testq	%rax, %rax
	je	.L13
	movq	$0, k(%rip)
	movq	ans(%rip), %rdx
	jle	.L13
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L15:
	addq	$1, %rcx
	leaq	(%rdx,%rdx,4), %rdx
	cmpq	%rcx, %rax
	jne	.L15
	movq	%rdx, ans(%rip)
	movq	%rax, k(%rip)
.L13:
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	movq	$5, i(%rip)
	cvtsi2sdq	%rbx, %xmm0
	ucomisd	%xmm0, %xmm1
	ja	.L78
	sqrtsd	%xmm0, %xmm0
.L18:
	addsd	.LC4(%rip), %xmm0
	movq	ans(%rip), %r13
	movq	%r13, %r8
	cvttsd2siq	%xmm0, %r9
	movq	%r9, l(%rip)
	cmpq	$5, %r9
	jle	.L20
	xorl	%r14d, %r14d
	xorl	%r10d, %r10d
	xorl	%r11d, %r11d
	movl	$5, %ecx
	.p2align 4,,10
	.p2align 3
.L19:
	movq	%rbx, %rax
	cqto
	idivq	%rcx
	testq	%rdx, %rdx
	jne	.L21
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L22:
	movq	%rbx, %rax
	addq	$1, %rsi
	cqto
	idivq	%rcx
	cqto
	movq	%rax, %rbx
	idivq	%rcx
	testq	%rdx, %rdx
	je	.L22
	movq	%rsi, %rax
	movl	$1, %r14d
	cqto
	idivq	%rbp
	testq	%rax, %rax
	jne	.L83
.L21:
	movq	%rbx, %rax
	leaq	2(%rcx), %rsi
	cqto
	idivq	%rsi
	testq	%rdx, %rdx
	jne	.L35
	movl	$1, %r14d
	.p2align 4,,10
	.p2align 3
.L25:
	movq	%rbx, %rax
	movq	%r14, %rdi
	leaq	1(%r14), %r14
	cqto
	idivq	%rsi
	cqto
	movq	%rax, %rbx
	idivq	%rsi
	testq	%rdx, %rdx
	je	.L25
	movq	%rdi, %rax
	movl	$1, %r14d
	cqto
	idivq	%rbp
	testq	%rax, %rax
	jne	.L84
.L24:
	addq	$6, %rcx
	cmpq	%rcx, %r9
	jg	.L19
	movq	%rcx, i(%rip)
	movq	%rdi, j(%rip)
	testb	%r14b, %r14b
	je	.L27
	movq	%rbx, P(%rip)
.L27:
	testb	%r10b, %r10b
	je	.L28
	movq	%r12, k(%rip)
.L28:
	testb	%r11b, %r11b
	je	.L20
	movq	%r8, ans(%rip)
	movq	%r8, %r13
.L20:
	movq	%r13, %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L3:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	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
	.p2align 4,,10
	.p2align 3
.L84:
	.cfi_restore_state
	jle	.L37
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L26:
	addq	$1, %rdx
	imulq	%rsi, %r8
	cmpq	%rdx, %rax
	jne	.L26
	movq	%rax, %r12
	movl	$1, %r14d
	movl	$1, %r10d
	movl	$1, %r11d
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L83:
	jle	.L34
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L23:
	addq	$1, %rdx
	imulq	%rcx, %r8
	cmpq	%rdx, %rax
	jne	.L23
	movq	%rax, %r12
	movl	$1, %r14d
	movl	$1, %r10d
	movl	$1, %r11d
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L35:
	xorl	%edi, %edi
	jmp	.L24
.L34:
	xorl	%r12d, %r12d
	movl	$1, %r10d
	jmp	.L21
.L37:
	xorl	%r12d, %r12d
	movl	$1, %r10d
	jmp	.L24
.L81:
	movq	P(%rip), %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
.L82:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L3
.L78:
	call	sqrt@PLT
	jmp	.L18
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	k
	.bss
	.align 8
	.type	k, @object
	.size	k, 8
k:
	.zero	8
	.globl	j
	.align 8
	.type	j, @object
	.size	j, 8
j:
	.zero	8
	.globl	i
	.align 8
	.type	i, @object
	.size	i, 8
i:
	.zero	8
	.globl	l
	.align 8
	.type	l, @object
	.size	l, 8
l:
	.zero	8
	.globl	ans
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.zero	8
	.globl	F
	.align 8
	.type	F, @object
	.size	F, 8
F:
	.zero	8
	.globl	P
	.align 8
	.type	P, @object
	.size	P, 8
P:
	.zero	8
	.globl	N
	.align 8
	.type	N, @object
	.size	N, 8
N:
	.zero	8
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC4:
	.long	0
	.long	1072693248
	.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>

long long int N, P, F, ans, l, i, j, k;

int main(void){
	scanf("%lld%lld", &N, &P);
	if(N==1){printf("%lld\n", P);return 0;}
	if(P==1){printf("1\n");return 0;}
	ans=1;
	j=0;while(P%2==0){P/=2;j++;}if(j/N!=0){for(k=0; k<j/N; k++){ans*=2;}}
	j=0;while(P%3==0){P/=3;j++;}if(j/N!=0){for(k=0; k<j/N; k++){ans*=3;}}
	j=0;while(P%5==0){P/=5;j++;}if(j/N!=0){for(k=0; k<j/N; k++){ans*=5;}}
	for(i=5, l=sqrt(P)+1; i<l; i+=6){
		j=0;while(P%i==0){P/=i;j++;}if(j/N!=0){for(k=0; k<j/N; k++){ans*=i;}}
		j=0;while(P%(i+2)==0){P/=(i+2);j++;}if(j/N!=0){for(k=0; k<j/N; k++){ans*=(i+2);}}
	}
	printf("%lld\n", ans);
	return 0;
}

5 2
 1 972439611840
 1 110
 1 2
 1 534720932937
 1 18
 1 010
 1 3
 1 867963093279
 1 15

1
 972439611840
 110
 2
 534720932937
 18
 10
 3
 867963093279
 15

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>

long long int N, P, F, ans, l, i, j, k;

int main(void){
	scanf("%lld%lld", &N, &P);
	if(N==1){printf("%lld\n", P);return 0;}
	if(P==1){printf("1\n");return 0;}
	ans=1;
	j=0;while(P%2==0){P/=2;j++;}if(j/N!=0){for(k=0; k<j/N; k++){ans*=2;}}
	j=0;while(P%3==0){P/=3;j++;}if(j/N!=0){for(k=0; k<j/N; k++){ans*=3;}}
	j=0;while(P%5==0){P/=5;j++;}if(j/N!=0){for(k=0; k<j/N; k++){ans*=5;}}
	for(i=5, l=sqrt(P)+1; i<l; i+=6){
		j=0;while(P%i==0){P/=i;j++;}if(j/N!=0){for(k=0; k<j/N; k++){ans*=i;}}
		j=0;while(P%(i+2)==0){P/=(i+2);j++;}if(j/N!=0){for(k=0; k<j/N; k++){ans*=(i+2);}}
	}
	printf("%lld\n", ans);
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	N
	.bss
	.align 8
	.type	N, @object
	.size	N, 8
N:
	.zero	8
	.globl	P
	.align 8
	.type	P, @object
	.size	P, 8
P:
	.zero	8
	.globl	F
	.align 8
	.type	F, @object
	.size	F, 8
F:
	.zero	8
	.globl	ans
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.zero	8
	.globl	l
	.align 8
	.type	l, @object
	.size	l, 8
l:
	.zero	8
	.globl	i
	.align 8
	.type	i, @object
	.size	i, 8
i:
	.zero	8
	.globl	j
	.align 8
	.type	j, @object
	.size	j, 8
j:
	.zero	8
	.globl	k
	.align 8
	.type	k, @object
	.size	k, 8
k:
	.zero	8
	.section	.rodata
.LC0:
	.string	"%lld%lld"
.LC1:
	.string	"%lld\n"
.LC2:
	.string	"1"
	.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
	leaq	P(%rip), %rax
	movq	%rax, %rdx
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	N(%rip), %rax
	cmpq	$1, %rax
	jne	.L2
	movq	P(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L3
.L2:
	movq	P(%rip), %rax
	cmpq	$1, %rax
	jne	.L4
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L3
.L4:
	movq	$1, ans(%rip)
	movq	$0, j(%rip)
	jmp	.L5
.L6:
	movq	P(%rip), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, P(%rip)
	movq	j(%rip), %rax
	addq	$1, %rax
	movq	%rax, j(%rip)
.L5:
	movq	P(%rip), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L6
	movq	j(%rip), %rax
	movq	N(%rip), %rdi
	cqto
	idivq	%rdi
	testq	%rax, %rax
	je	.L7
	movq	$0, k(%rip)
	jmp	.L8
.L9:
	movq	ans(%rip), %rax
	addq	%rax, %rax
	movq	%rax, ans(%rip)
	movq	k(%rip), %rax
	addq	$1, %rax
	movq	%rax, k(%rip)
.L8:
	movq	j(%rip), %rax
	movq	N(%rip), %rdi
	cqto
	idivq	%rdi
	movq	%rax, %rdx
	movq	k(%rip), %rax
	cmpq	%rax, %rdx
	jg	.L9
.L7:
	movq	$0, j(%rip)
	jmp	.L10
.L11:
	movq	P(%rip), %rcx
	movabsq	$6148914691236517206, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	sarq	$63, %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	movq	%rax, P(%rip)
	movq	j(%rip), %rax
	addq	$1, %rax
	movq	%rax, j(%rip)
.L10:
	movq	P(%rip), %rcx
	movabsq	$6148914691236517206, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rcx, %rsi
	sarq	$63, %rsi
	movq	%rdx, %rax
	subq	%rsi, %rax
	movq	%rax, %rdx
	addq	%rdx, %rdx
	addq	%rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	testq	%rax, %rax
	je	.L11
	movq	j(%rip), %rax
	movq	N(%rip), %rsi
	cqto
	idivq	%rsi
	testq	%rax, %rax
	je	.L12
	movq	$0, k(%rip)
	jmp	.L13
.L14:
	movq	ans(%rip), %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, ans(%rip)
	movq	k(%rip), %rax
	addq	$1, %rax
	movq	%rax, k(%rip)
.L13:
	movq	j(%rip), %rax
	movq	N(%rip), %rdi
	cqto
	idivq	%rdi
	movq	%rax, %rdx
	movq	k(%rip), %rax
	cmpq	%rax, %rdx
	jg	.L14
.L12:
	movq	$0, j(%rip)
	jmp	.L15
.L16:
	movq	P(%rip), %rcx
	movabsq	$7378697629483820647, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	%rax
	sarq	$63, %rcx
	movq	%rcx, %rdx
	subq	%rdx, %rax
	movq	%rax, P(%rip)
	movq	j(%rip), %rax
	addq	$1, %rax
	movq	%rax, j(%rip)
.L15:
	movq	P(%rip), %rcx
	movabsq	$7378697629483820647, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	%rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, %rdx
	salq	$2, %rdx
	addq	%rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	testq	%rax, %rax
	je	.L16
	movq	j(%rip), %rax
	movq	N(%rip), %rsi
	cqto
	idivq	%rsi
	testq	%rax, %rax
	je	.L17
	movq	$0, k(%rip)
	jmp	.L18
.L19:
	movq	ans(%rip), %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, ans(%rip)
	movq	k(%rip), %rax
	addq	$1, %rax
	movq	%rax, k(%rip)
.L18:
	movq	j(%rip), %rax
	movq	N(%rip), %rdi
	cqto
	idivq	%rdi
	movq	%rax, %rdx
	movq	k(%rip), %rax
	cmpq	%rax, %rdx
	jg	.L19
.L17:
	movq	$5, i(%rip)
	movq	P(%rip), %rax
	pxor	%xmm2, %xmm2
	cvtsi2sdq	%rax, %xmm2
	movq	%xmm2, %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	movsd	.LC3(%rip), %xmm1
	addsd	%xmm1, %xmm0
	cvttsd2siq	%xmm0, %rax
	movq	%rax, l(%rip)
	jmp	.L20
.L31:
	movq	$0, j(%rip)
	jmp	.L21
.L22:
	movq	P(%rip), %rax
	movq	i(%rip), %rsi
	cqto
	idivq	%rsi
	movq	%rax, P(%rip)
	movq	j(%rip), %rax
	addq	$1, %rax
	movq	%rax, j(%rip)
.L21:
	movq	P(%rip), %rax
	movq	i(%rip), %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	testq	%rax, %rax
	je	.L22
	movq	j(%rip), %rax
	movq	N(%rip), %rdi
	cqto
	idivq	%rdi
	testq	%rax, %rax
	je	.L23
	movq	$0, k(%rip)
	jmp	.L24
.L25:
	movq	ans(%rip), %rdx
	movq	i(%rip), %rax
	imulq	%rdx, %rax
	movq	%rax, ans(%rip)
	movq	k(%rip), %rax
	addq	$1, %rax
	movq	%rax, k(%rip)
.L24:
	movq	j(%rip), %rax
	movq	N(%rip), %rsi
	cqto
	idivq	%rsi
	movq	%rax, %rdx
	movq	k(%rip), %rax
	cmpq	%rax, %rdx
	jg	.L25
.L23:
	movq	$0, j(%rip)
	jmp	.L26
.L27:
	movq	P(%rip), %rax
	movq	i(%rip), %rdx
	leaq	2(%rdx), %rdi
	cqto
	idivq	%rdi
	movq	%rax, P(%rip)
	movq	j(%rip), %rax
	addq	$1, %rax
	movq	%rax, j(%rip)
.L26:
	movq	P(%rip), %rax
	movq	i(%rip), %rdx
	leaq	2(%rdx), %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	testq	%rax, %rax
	je	.L27
	movq	j(%rip), %rax
	movq	N(%rip), %rsi
	cqto
	idivq	%rsi
	testq	%rax, %rax
	je	.L28
	movq	$0, k(%rip)
	jmp	.L29
.L30:
	movq	i(%rip), %rax
	leaq	2(%rax), %rdx
	movq	ans(%rip), %rax
	imulq	%rdx, %rax
	movq	%rax, ans(%rip)
	movq	k(%rip), %rax
	addq	$1, %rax
	movq	%rax, k(%rip)
.L29:
	movq	j(%rip), %rax
	movq	N(%rip), %rdi
	cqto
	idivq	%rdi
	movq	%rax, %rdx
	movq	k(%rip), %rax
	cmpq	%rax, %rdx
	jg	.L30
.L28:
	movq	i(%rip), %rax
	addq	$6, %rax
	movq	%rax, i(%rip)
.L20:
	movq	i(%rip), %rdx
	movq	l(%rip), %rax
	cmpq	%rax, %rdx
	jl	.L31
	movq	ans(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC3:
	.long	0
	.long	1072693248
	.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
	.globl	N
	.bss
	.align 8
	.type	N, @object
	.size	N, 8
N:
	.zero	8
	.globl	P
	.align 8
	.type	P, @object
	.size	P, 8
P:
	.zero	8
	.globl	F
	.align 8
	.type	F, @object
	.size	F, 8
F:
	.zero	8
	.globl	ans
	.align 8
	.type	ans, @object
	.size	ans, 8
ans:
	.zero	8
	.globl	l
	.align 8
	.type	l, @object
	.size	l, 8
l:
	.zero	8
	.globl	i
	.align 8
	.type	i, @object
	.size	i, 8
i:
	.zero	8
	.globl	j
	.align 8
	.type	j, @object
	.size	j, 8
j:
	.zero	8
	.globl	k
	.align 8
	.type	k, @object
	.size	k, 8
k:
	.zero	8
	.section	.rodata
.LC0:
	.string	"%lld%lld"
.LC1:
	.string	"%lld\n"
.LC2:
	.string	"1"
	.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
	leaq	P(%rip), %rax
	movq	%rax, %rdx
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	N(%rip), %rax
	cmpq	$1, %rax
	jne	.L2
	movq	P(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L3
.L2:
	movq	P(%rip), %rax
	cmpq	$1, %rax
	jne	.L4
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L3
.L4:
	movq	$1, ans(%rip)
	movq	$0, j(%rip)
	jmp	.L5
.L6:
	movq	P(%rip), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, P(%rip)
	movq	j(%rip), %rax
	addq	$1, %rax
	movq	%rax, j(%rip)
.L5:
	movq	P(%rip), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L6
	movq	j(%rip), %rax
	movq	N(%rip), %rdi
	cqto
	idivq	%rdi
	testq	%rax, %rax
	je	.L7
	movq	$0, k(%rip)
	jmp	.L8
.L9:
	movq	ans(%rip), %rax
	addq	%rax, %rax
	movq	%rax, ans(%rip)
	movq	k(%rip), %rax
	addq	$1, %rax
	movq	%rax, k(%rip)
.L8:
	movq	j(%rip), %rax
	movq	N(%rip), %rdi
	cqto
	idivq	%rdi
	movq	%rax, %rdx
	movq	k(%rip), %rax
	cmpq	%rax, %rdx
	jg	.L9
.L7:
	movq	$0, j(%rip)
	jmp	.L10
.L11:
	movq	P(%rip), %rcx
	movabsq	$6148914691236517206, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	sarq	$63, %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	movq	%rax, P(%rip)
	movq	j(%rip), %rax
	addq	$1, %rax
	movq	%rax, j(%rip)
.L10:
	movq	P(%rip), %rcx
	movabsq	$6148914691236517206, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rcx, %rsi
	sarq	$63, %rsi
	movq	%rdx, %rax
	subq	%rsi, %rax
	movq	%rax, %rdx
	addq	%rdx, %rdx
	addq	%rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	testq	%rax, %rax
	je	.L11
	movq	j(%rip), %rax
	movq	N(%rip), %rsi
	cqto
	idivq	%rsi
	testq	%rax, %rax
	je	.L12
	movq	$0, k(%rip)
	jmp	.L13
.L14:
	movq	ans(%rip), %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movq	%rax, ans(%rip)
	movq	k(%rip), %rax
	addq	$1, %rax
	movq	%rax, k(%rip)
.L13:
	movq	j(%rip), %rax
	movq	N(%rip), %rdi
	cqto
	idivq	%rdi
	movq	%rax, %rdx
	movq	k(%rip), %rax
	cmpq	%rax, %rdx
	jg	.L14
.L12:
	movq	$0, j(%rip)
	jmp	.L15
.L16:
	movq	P(%rip), %rcx
	movabsq	$7378697629483820647, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	%rax
	sarq	$63, %rcx
	movq	%rcx, %rdx
	subq	%rdx, %rax
	movq	%rax, P(%rip)
	movq	j(%rip), %rax
	addq	$1, %rax
	movq	%rax, j(%rip)
.L15:
	movq	P(%rip), %rcx
	movabsq	$7378697629483820647, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	%rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, %rdx
	salq	$2, %rdx
	addq	%rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	testq	%rax, %rax
	je	.L16
	movq	j(%rip), %rax
	movq	N(%rip), %rsi
	cqto
	idivq	%rsi
	testq	%rax, %rax
	je	.L17
	movq	$0, k(%rip)
	jmp	.L18
.L19:
	movq	ans(%rip), %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, ans(%rip)
	movq	k(%rip), %rax
	addq	$1, %rax
	movq	%rax, k(%rip)
.L18:
	movq	j(%rip), %rax
	movq	N(%rip), %rdi
	cqto
	idivq	%rdi
	movq	%rax, %rdx
	movq	k(%rip), %rax
	cmpq	%rax, %rdx
	jg	.L19
.L17:
	movq	$5, i(%rip)
	movq	P(%rip), %rax
	pxor	%xmm2, %xmm2
	cvtsi2sdq	%rax, %xmm2
	movq	%xmm2, %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	movsd	.LC3(%rip), %xmm1
	addsd	%xmm1, %xmm0
	cvttsd2siq	%xmm0, %rax
	movq	%rax, l(%rip)
	jmp	.L20
.L31:
	movq	$0, j(%rip)
	jmp	.L21
.L22:
	movq	P(%rip), %rax
	movq	i(%rip), %rsi
	cqto
	idivq	%rsi
	movq	%rax, P(%rip)
	movq	j(%rip), %rax
	addq	$1, %rax
	movq	%rax, j(%rip)
.L21:
	movq	P(%rip), %rax
	movq	i(%rip), %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	testq	%rax, %rax
	je	.L22
	movq	j(%rip), %rax
	movq	N(%rip), %rdi
	cqto
	idivq	%rdi
	testq	%rax, %rax
	je	.L23
	movq	$0, k(%rip)
	jmp	.L24
.L25:
	movq	ans(%rip), %rdx
	movq	i(%rip), %rax
	imulq	%rdx, %rax
	movq	%rax, ans(%rip)
	movq	k(%rip), %rax
	addq	$1, %rax
	movq	%rax, k(%rip)
.L24:
	movq	j(%rip), %rax
	movq	N(%rip), %rsi
	cqto
	idivq	%rsi
	movq	%rax, %rdx
	movq	k(%rip), %rax
	cmpq	%rax, %rdx
	jg	.L25
.L23:
	movq	$0, j(%rip)
	jmp	.L26
.L27:
	movq	P(%rip), %rax
	movq	i(%rip), %rdx
	leaq	2(%rdx), %rdi
	cqto
	idivq	%rdi
	movq	%rax, P(%rip)
	movq	j(%rip), %rax
	addq	$1, %rax
	movq	%rax, j(%rip)
.L26:
	movq	P(%rip), %rax
	movq	i(%rip), %rdx
	leaq	2(%rdx), %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	testq	%rax, %rax
	je	.L27
	movq	j(%rip), %rax
	movq	N(%rip), %rsi
	cqto
	idivq	%rsi
	testq	%rax, %rax
	je	.L28
	movq	$0, k(%rip)
	jmp	.L29
.L30:
	movq	i(%rip), %rax
	leaq	2(%rax), %rdx
	movq	ans(%rip), %rax
	imulq	%rdx, %rax
	movq	%rax, ans(%rip)
	movq	k(%rip), %rax
	addq	$1, %rax
	movq	%rax, k(%rip)
.L29:
	movq	j(%rip), %rax
	movq	N(%rip), %rdi
	cqto
	idivq	%rdi
	movq	%rax, %rdx
	movq	k(%rip), %rax
	cmpq	%rax, %rdx
	jg	.L30
.L28:
	movq	i(%rip), %rax
	addq	$6, %rax
	movq	%rax, i(%rip)
.L20:
	movq	i(%rip), %rdx
	movq	l(%rip), %rax
	cmpq	%rax, %rdx
	jl	.L31
	movq	ans(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC3:
	.long	0
	.long	1072693248
	.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:
