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 main(void){
    long N,P,c;
    scanf("%ld%ld",&N,&P);
    c=1;
    while(pow(c,N)<=P){
        c+=100000;
    }
    while(pow(c,N)>P){
        c-=1;
    }
    while(1){
        if(P%(long)(pow(c,N))==0){
            break;
        }
        c-=1;
    }
    
    printf("%ld\n",c);
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%ld%ld"
.LC1:
	.string	"%ld\n"
	.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
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	leaq	-40(%rbp), %rdx
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$1, -32(%rbp)
	jmp	.L2
.L3:
	addq	$100000, -32(%rbp)
.L2:
	movq	-48(%rbp), %rax
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rax, %xmm0
	pxor	%xmm2, %xmm2
	cvtsi2sdq	-32(%rbp), %xmm2
	movq	%xmm2, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movq	-40(%rbp), %rax
	pxor	%xmm1, %xmm1
	cvtsi2sdq	%rax, %xmm1
	comisd	%xmm0, %xmm1
	jnb	.L3
	jmp	.L4
.L5:
	subq	$1, -32(%rbp)
.L4:
	movq	-48(%rbp), %rax
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rax, %xmm0
	pxor	%xmm3, %xmm3
	cvtsi2sdq	-32(%rbp), %xmm3
	movq	%xmm3, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movq	%xmm0, %rax
	movq	-40(%rbp), %rdx
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rdx, %xmm0
	movq	%rax, %xmm4
	comisd	%xmm0, %xmm4
	ja	.L5
.L8:
	movq	-40(%rbp), %rbx
	movq	-48(%rbp), %rax
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rax, %xmm0
	pxor	%xmm5, %xmm5
	cvtsi2sdq	-32(%rbp), %xmm5
	movq	%xmm5, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	cvttsd2siq	%xmm0, %rcx
	movq	%rbx, %rax
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	testq	%rax, %rax
	je	.L12
	subq	$1, -32(%rbp)
	jmp	.L8
.L12:
	nop
	movq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld%ld"
.LC1:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %rdi
	movl	$1, %r12d
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$72, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	48(%rsp), %rdx
	leaq	40(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	48(%rsp), %rbx
	pxor	%xmm5, %xmm5
	pxor	%xmm1, %xmm1
	cvtsi2sdq	40(%rsp), %xmm1
	cvtsi2sdq	%rbx, %xmm5
	movsd	%xmm5, 8(%rsp)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	addq	$100000, %r12
.L2:
	pxor	%xmm2, %xmm2
	movsd	%xmm1, 24(%rsp)
	cvtsi2sdq	%r12, %xmm2
	movapd	%xmm2, %xmm0
	movsd	%xmm2, 16(%rsp)
	call	pow@PLT
	movsd	8(%rsp), %xmm3
	movsd	16(%rsp), %xmm2
	movsd	24(%rsp), %xmm1
	comisd	%xmm0, %xmm3
	jnb	.L3
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	subq	$1, %r12
	pxor	%xmm2, %xmm2
	cvtsi2sdq	%r12, %xmm2
.L4:
	movapd	%xmm2, %xmm0
	movsd	%xmm1, 24(%rsp)
	movsd	%xmm2, 16(%rsp)
	call	pow@PLT
	comisd	8(%rsp), %xmm0
	movsd	16(%rsp), %xmm2
	movsd	24(%rsp), %xmm1
	ja	.L5
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L11:
	subq	$1, %r12
	pxor	%xmm2, %xmm2
	movsd	8(%rsp), %xmm1
	cvtsi2sdq	%r12, %xmm2
.L7:
	movapd	%xmm2, %xmm0
	movsd	%xmm1, 8(%rsp)
	call	pow@PLT
	movq	%rbx, %rax
	cvttsd2siq	%xmm0, %rcx
	cqto
	idivq	%rcx
	testq	%rdx, %rdx
	jne	.L11
	xorl	%eax, %eax
	movq	%r12, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	addq	$72, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L12:
	.cfi_restore_state
	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
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld%ld"
.LC1:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %rdi
	movl	$1, %r12d
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$72, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	48(%rsp), %rdx
	leaq	40(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	48(%rsp), %rbx
	pxor	%xmm5, %xmm5
	pxor	%xmm1, %xmm1
	cvtsi2sdq	40(%rsp), %xmm1
	cvtsi2sdq	%rbx, %xmm5
	movsd	%xmm5, 8(%rsp)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	addq	$100000, %r12
.L2:
	pxor	%xmm2, %xmm2
	movsd	%xmm1, 24(%rsp)
	cvtsi2sdq	%r12, %xmm2
	movapd	%xmm2, %xmm0
	movsd	%xmm2, 16(%rsp)
	call	pow@PLT
	movsd	8(%rsp), %xmm3
	movsd	16(%rsp), %xmm2
	movsd	24(%rsp), %xmm1
	comisd	%xmm0, %xmm3
	jnb	.L3
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	subq	$1, %r12
	pxor	%xmm2, %xmm2
	cvtsi2sdq	%r12, %xmm2
.L4:
	movapd	%xmm2, %xmm0
	movsd	%xmm1, 24(%rsp)
	movsd	%xmm2, 16(%rsp)
	call	pow@PLT
	comisd	8(%rsp), %xmm0
	movsd	16(%rsp), %xmm2
	movsd	24(%rsp), %xmm1
	ja	.L5
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L11:
	subq	$1, %r12
	pxor	%xmm2, %xmm2
	movsd	8(%rsp), %xmm1
	cvtsi2sdq	%r12, %xmm2
.L7:
	movapd	%xmm2, %xmm0
	movsd	%xmm1, 8(%rsp)
	call	pow@PLT
	movq	%rbx, %rax
	cvttsd2siq	%xmm0, %rcx
	cqto
	idivq	%rcx
	testq	%rdx, %rdx
	jne	.L11
	xorl	%eax, %eax
	movq	%r12, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	addq	$72, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L12:
	.cfi_restore_state
	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:

#include<stdio.h>
#include<math.h>
int main(void){
    long N,P,c;
    scanf("%ld%ld",&N,&P);
    c=1;
    while(pow(c,N)<=P){
        c+=100000;
    }
    while(pow(c,N)>P){
        c-=1;
    }
    while(1){
        if(P%(long)(pow(c,N))==0){
            break;
        }
        c-=1;
    }
    
    printf("%ld\n",c);
    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>
int main(void){
    long N,P,c;
    scanf("%ld%ld",&N,&P);
    c=1;
    while(pow(c,N)<=P){
        c+=100000;
    }
    while(pow(c,N)>P){
        c-=1;
    }
    while(1){
        if(P%(long)(pow(c,N))==0){
            break;
        }
        c-=1;
    }
    
    printf("%ld\n",c);
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%ld%ld"
.LC1:
	.string	"%ld\n"
	.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
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	leaq	-40(%rbp), %rdx
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$1, -32(%rbp)
	jmp	.L2
.L3:
	addq	$100000, -32(%rbp)
.L2:
	movq	-48(%rbp), %rax
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rax, %xmm0
	pxor	%xmm2, %xmm2
	cvtsi2sdq	-32(%rbp), %xmm2
	movq	%xmm2, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movq	-40(%rbp), %rax
	pxor	%xmm1, %xmm1
	cvtsi2sdq	%rax, %xmm1
	comisd	%xmm0, %xmm1
	jnb	.L3
	jmp	.L4
.L5:
	subq	$1, -32(%rbp)
.L4:
	movq	-48(%rbp), %rax
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rax, %xmm0
	pxor	%xmm3, %xmm3
	cvtsi2sdq	-32(%rbp), %xmm3
	movq	%xmm3, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movq	%xmm0, %rax
	movq	-40(%rbp), %rdx
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rdx, %xmm0
	movq	%rax, %xmm4
	comisd	%xmm0, %xmm4
	ja	.L5
.L8:
	movq	-40(%rbp), %rbx
	movq	-48(%rbp), %rax
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rax, %xmm0
	pxor	%xmm5, %xmm5
	cvtsi2sdq	-32(%rbp), %xmm5
	movq	%xmm5, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	cvttsd2siq	%xmm0, %rcx
	movq	%rbx, %rax
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	testq	%rax, %rax
	je	.L12
	subq	$1, -32(%rbp)
	jmp	.L8
.L12:
	nop
	movq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%ld%ld"
.LC1:
	.string	"%ld\n"
	.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
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	leaq	-40(%rbp), %rdx
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$1, -32(%rbp)
	jmp	.L2
.L3:
	addq	$100000, -32(%rbp)
.L2:
	movq	-48(%rbp), %rax
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rax, %xmm0
	pxor	%xmm2, %xmm2
	cvtsi2sdq	-32(%rbp), %xmm2
	movq	%xmm2, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movq	-40(%rbp), %rax
	pxor	%xmm1, %xmm1
	cvtsi2sdq	%rax, %xmm1
	comisd	%xmm0, %xmm1
	jnb	.L3
	jmp	.L4
.L5:
	subq	$1, -32(%rbp)
.L4:
	movq	-48(%rbp), %rax
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rax, %xmm0
	pxor	%xmm3, %xmm3
	cvtsi2sdq	-32(%rbp), %xmm3
	movq	%xmm3, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movq	%xmm0, %rax
	movq	-40(%rbp), %rdx
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rdx, %xmm0
	movq	%rax, %xmm4
	comisd	%xmm0, %xmm4
	ja	.L5
.L8:
	movq	-40(%rbp), %rbx
	movq	-48(%rbp), %rax
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rax, %xmm0
	pxor	%xmm5, %xmm5
	cvtsi2sdq	-32(%rbp), %xmm5
	movq	%xmm5, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	cvttsd2siq	%xmm0, %rcx
	movq	%rbx, %rax
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	testq	%rax, %rax
	je	.L12
	subq	$1, -32(%rbp)
	jmp	.L8
.L12:
	nop
	movq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
