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

#define max(a,b) ((a)>(b))?(a):(b)
#define min(a,b) ((a)>(b))?(b):(a)

typedef long long ll;
typedef unsigned long long ull;

ll gcd(ll a, ll b)
{
	if (a % b) { return gcd(b, a % b); }
	return b;
}

int main(void)
{
	ll a, b;
	scanf("%lld%lld", &a, &b);
	a = gcd(a, b);

	ll n = 3;
	int pre = 0, cnt = 0;
	ll sqrt_a = sqrt(a);

	while (!(a % 2))
	{
		a /= 2;
		pre = 2;
	}
	while (a != 1)
	{
		if (!(a % n))
		{
			a /= n;
			if (pre && pre != n)
			{
				cnt++;
			}
			pre = n;
		}
		else
		{
			n += 2;
			if (n > sqrt_a)
			{
				n = a;
			}
		}
	}
	if (pre)cnt++;

	printf("%d", cnt + 1);
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB39:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	movq	%rsi, %rdx
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rdx, %rcx
	cqto
	idivq	%rcx
	movq	%rcx, %rax
	testq	%rdx, %rdx
	jne	.L2
	ret
	.cfi_endproc
.LFE39:
	.size	gcd, .-gcd
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld%lld"
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	.LC0(%rip), %rdi
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rdx
	movq	8(%rsp), %rax
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%rdx, %rbx
	cqto
	idivq	%rbx
	movq	%rbx, %rax
	testq	%rdx, %rdx
	jne	.L6
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	movq	%rbx, 8(%rsp)
	cvtsi2sdq	%rbx, %xmm0
	ucomisd	%xmm0, %xmm1
	ja	.L39
	sqrtsd	%xmm0, %xmm0
.L9:
	cvttsd2siq	%xmm0, %r9
	testb	$1, %bl
	jne	.L10
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%rbx, %rax
	shrq	$63, %rax
	addq	%rbx, %rax
	movq	%rax, %rbx
	sarq	%rbx
	testb	$2, %al
	je	.L11
	movq	%rbx, 8(%rsp)
	cmpq	$1, %rbx
	je	.L23
	movl	$2, %esi
.L13:
	xorl	%r8d, %r8d
	xorl	%edi, %edi
	movl	$3, %ecx
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L43:
	movq	%rax, %rbx
	testl	%esi, %esi
	je	.L17
	xorl	%eax, %eax
	cmpq	%rcx, %rsi
	setne	%al
	addl	%eax, %edi
.L17:
	movslq	%ecx, %rsi
	movl	$1, %r8d
	cmpq	$1, %rbx
	je	.L42
.L19:
	movq	%rbx, %rax
	cqto
	idivq	%rcx
	testq	%rdx, %rdx
	je	.L43
	addq	$2, %rcx
	cmpq	%rcx, %r9
	cmovl	%rbx, %rcx
	cmpq	$1, %rbx
	jne	.L19
.L42:
	testb	%r8b, %r8b
	je	.L20
	movq	$1, 8(%rsp)
.L20:
	testl	%esi, %esi
	jne	.L15
.L14:
	leal	1(%rdi), %edx
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L44
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L23:
	.cfi_restore_state
	xorl	%edi, %edi
.L15:
	addl	$1, %edi
	jmp	.L14
.L10:
	xorl	%esi, %esi
	xorl	%edi, %edi
	cmpq	$1, %rbx
	jne	.L13
	jmp	.L14
.L39:
	call	sqrt@PLT
	jmp	.L9
.L44:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.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
	.p2align 4
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB39:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	movq	%rsi, %rdx
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rdx, %rcx
	cqto
	idivq	%rcx
	movq	%rcx, %rax
	testq	%rdx, %rdx
	jne	.L2
	ret
	.cfi_endproc
.LFE39:
	.size	gcd, .-gcd
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld%lld"
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	.LC0(%rip), %rdi
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rdx
	movq	8(%rsp), %rax
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%rdx, %rbx
	cqto
	idivq	%rbx
	movq	%rbx, %rax
	testq	%rdx, %rdx
	jne	.L6
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	movq	%rbx, 8(%rsp)
	cvtsi2sdq	%rbx, %xmm0
	ucomisd	%xmm0, %xmm1
	ja	.L39
	sqrtsd	%xmm0, %xmm0
.L9:
	cvttsd2siq	%xmm0, %r9
	testb	$1, %bl
	jne	.L10
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%rbx, %rax
	shrq	$63, %rax
	addq	%rbx, %rax
	movq	%rax, %rbx
	sarq	%rbx
	testb	$2, %al
	je	.L11
	movq	%rbx, 8(%rsp)
	cmpq	$1, %rbx
	je	.L23
	movl	$2, %esi
.L13:
	xorl	%r8d, %r8d
	xorl	%edi, %edi
	movl	$3, %ecx
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L43:
	movq	%rax, %rbx
	testl	%esi, %esi
	je	.L17
	xorl	%eax, %eax
	cmpq	%rcx, %rsi
	setne	%al
	addl	%eax, %edi
.L17:
	movslq	%ecx, %rsi
	movl	$1, %r8d
	cmpq	$1, %rbx
	je	.L42
.L19:
	movq	%rbx, %rax
	cqto
	idivq	%rcx
	testq	%rdx, %rdx
	je	.L43
	addq	$2, %rcx
	cmpq	%rcx, %r9
	cmovl	%rbx, %rcx
	cmpq	$1, %rbx
	jne	.L19
.L42:
	testb	%r8b, %r8b
	je	.L20
	movq	$1, 8(%rsp)
.L20:
	testl	%esi, %esi
	jne	.L15
.L14:
	leal	1(%rdi), %edx
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L44
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L23:
	.cfi_restore_state
	xorl	%edi, %edi
.L15:
	addl	$1, %edi
	jmp	.L14
.L10:
	xorl	%esi, %esi
	xorl	%edi, %edi
	cmpq	$1, %rbx
	jne	.L13
	jmp	.L14
.L39:
	call	sqrt@PLT
	jmp	.L9
.L44:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.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
	.p2align 4
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB39:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	movq	%rsi, %rdx
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rdx, %rcx
	cqto
	idivq	%rcx
	movq	%rcx, %rax
	testq	%rdx, %rdx
	jne	.L2
	ret
	.cfi_endproc
.LFE39:
	.size	gcd, .-gcd
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld%lld"
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	.LC0(%rip), %rdi
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rdx
	movq	8(%rsp), %rax
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%rdx, %rbx
	cqto
	idivq	%rbx
	movq	%rbx, %rax
	testq	%rdx, %rdx
	jne	.L6
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	movq	%rbx, 8(%rsp)
	cvtsi2sdq	%rbx, %xmm0
	ucomisd	%xmm0, %xmm1
	ja	.L39
	sqrtsd	%xmm0, %xmm0
.L9:
	cvttsd2siq	%xmm0, %r9
	testb	$1, %bl
	jne	.L10
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%rbx, %rax
	shrq	$63, %rax
	addq	%rbx, %rax
	movq	%rax, %rbx
	sarq	%rbx
	testb	$2, %al
	je	.L11
	movq	%rbx, 8(%rsp)
	cmpq	$1, %rbx
	je	.L23
	movl	$2, %esi
.L13:
	xorl	%r8d, %r8d
	xorl	%edi, %edi
	movl	$3, %ecx
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L43:
	movq	%rax, %rbx
	testl	%esi, %esi
	je	.L17
	xorl	%eax, %eax
	cmpq	%rcx, %rsi
	setne	%al
	addl	%eax, %edi
.L17:
	movslq	%ecx, %rsi
	movl	$1, %r8d
	cmpq	$1, %rbx
	je	.L42
.L19:
	movq	%rbx, %rax
	cqto
	idivq	%rcx
	testq	%rdx, %rdx
	je	.L43
	addq	$2, %rcx
	cmpq	%rcx, %r9
	cmovl	%rbx, %rcx
	cmpq	$1, %rbx
	jne	.L19
.L42:
	testb	%r8b, %r8b
	je	.L20
	movq	$1, 8(%rsp)
.L20:
	testl	%esi, %esi
	jne	.L15
.L14:
	leal	1(%rdi), %edx
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L44
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L23:
	.cfi_restore_state
	xorl	%edi, %edi
.L15:
	addl	$1, %edi
	jmp	.L14
.L10:
	xorl	%esi, %esi
	xorl	%edi, %edi
	cmpq	$1, %rbx
	jne	.L13
	jmp	.L14
.L39:
	call	sqrt@PLT
	jmp	.L9
.L44:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.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>
#include<stdlib.h>
#include<math.h>
#include<assert.h>

#define max(a,b) ((a)>(b))?(a):(b)
#define min(a,b) ((a)>(b))?(b):(a)

typedef long long ll;
typedef unsigned long long ull;

ll gcd(ll a, ll b)
{
	if (a % b) { return gcd(b, a % b); }
	return b;
}

int main(void)
{
	ll a, b;
	scanf("%lld%lld", &a, &b);
	a = gcd(a, b);

	ll n = 3;
	int pre = 0, cnt = 0;
	ll sqrt_a = sqrt(a);

	while (!(a % 2))
	{
		a /= 2;
		pre = 2;
	}
	while (a != 1)
	{
		if (!(a % n))
		{
			a /= n;
			if (pre && pre != n)
			{
				cnt++;
			}
			pre = n;
		}
		else
		{
			n += 2;
			if (n > sqrt_a)
			{
				n = a;
			}
		}
	}
	if (pre)cnt++;

	printf("%d", cnt + 1);
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c

#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<assert.h>

#define max(a,b) ((a)>(b))?(a):(b)
#define min(a,b) ((a)>(b))?(b):(a)

typedef long long ll;
typedef unsigned long long ull;

ll gcd(ll a, ll b)
{
	if (a % b) { return gcd(b, a % b); }
	return b;
}

int main(void)
{
	ll a, b;
	scanf("%lld%lld", &a, &b);
	a = gcd(a, b);

	ll n = 3;
	int pre = 0, cnt = 0;
	ll sqrt_a = sqrt(a);

	while (!(a % 2))
	{
		a /= 2;
		pre = 2;
	}
	while (a != 1)
	{
		if (!(a % n))
		{
			a /= n;
			if (pre && pre != n)
			{
				cnt++;
			}
			pre = n;
		}
		else
		{
			n += 2;
			if (n > sqrt_a)
			{
				n = a;
			}
		}
	}
	if (pre)cnt++;

	printf("%d", cnt + 1);
}```

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:

2 2019
 420 324
 3 2019
 19 18
 19 16
 420 71
 6 2019
 19 9
 420 47
 6 949

1 3 2 1 1 1 2 1 1 1
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>
#include<stdlib.h>
#include<math.h>
#include<assert.h>

#define max(a,b) ((a)>(b))?(a):(b)
#define min(a,b) ((a)>(b))?(b):(a)

typedef long long ll;
typedef unsigned long long ull;

ll gcd(ll a, ll b)
{
	if (a % b) { return gcd(b, a % b); }
	return b;
}

int main(void)
{
	ll a, b;
	scanf("%lld%lld", &a, &b);
	a = gcd(a, b);

	ll n = 3;
	int pre = 0, cnt = 0;
	ll sqrt_a = sqrt(a);

	while (!(a % 2))
	{
		a /= 2;
		pre = 2;
	}
	while (a != 1)
	{
		if (!(a % n))
		{
			a /= n;
			if (pre && pre != n)
			{
				cnt++;
			}
			pre = n;
		}
		else
		{
			n += 2;
			if (n > sqrt_a)
			{
				n = a;
			}
		}
	}
	if (pre)cnt++;

	printf("%d", cnt + 1);
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB39:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	movq	%rsi, %rdx
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rdx, %rcx
	cqto
	idivq	%rcx
	movq	%rcx, %rax
	testq	%rdx, %rdx
	jne	.L2
	ret
	.cfi_endproc
.LFE39:
	.size	gcd, .-gcd
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld%lld"
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	.LC0(%rip), %rdi
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rdx
	movq	8(%rsp), %rax
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%rdx, %rbx
	cqto
	idivq	%rbx
	movq	%rbx, %rax
	testq	%rdx, %rdx
	jne	.L6
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	movq	%rbx, 8(%rsp)
	cvtsi2sdq	%rbx, %xmm0
	ucomisd	%xmm0, %xmm1
	ja	.L39
	sqrtsd	%xmm0, %xmm0
.L9:
	cvttsd2siq	%xmm0, %r9
	testb	$1, %bl
	jne	.L10
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%rbx, %rax
	shrq	$63, %rax
	addq	%rbx, %rax
	movq	%rax, %rbx
	sarq	%rbx
	testb	$2, %al
	je	.L11
	movq	%rbx, 8(%rsp)
	cmpq	$1, %rbx
	je	.L23
	movl	$2, %esi
.L13:
	xorl	%r8d, %r8d
	xorl	%edi, %edi
	movl	$3, %ecx
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L43:
	movq	%rax, %rbx
	testl	%esi, %esi
	je	.L17
	xorl	%eax, %eax
	cmpq	%rcx, %rsi
	setne	%al
	addl	%eax, %edi
.L17:
	movslq	%ecx, %rsi
	movl	$1, %r8d
	cmpq	$1, %rbx
	je	.L42
.L19:
	movq	%rbx, %rax
	cqto
	idivq	%rcx
	testq	%rdx, %rdx
	je	.L43
	addq	$2, %rcx
	cmpq	%rcx, %r9
	cmovl	%rbx, %rcx
	cmpq	$1, %rbx
	jne	.L19
.L42:
	testb	%r8b, %r8b
	je	.L20
	movq	$1, 8(%rsp)
.L20:
	testl	%esi, %esi
	jne	.L15
.L14:
	leal	1(%rdi), %edx
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L44
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L23:
	.cfi_restore_state
	xorl	%edi, %edi
.L15:
	addl	$1, %edi
	jmp	.L14
.L10:
	xorl	%esi, %esi
	xorl	%edi, %edi
	cmpq	$1, %rbx
	jne	.L13
	jmp	.L14
.L39:
	call	sqrt@PLT
	jmp	.L9
.L44:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.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
	.p2align 4
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB39:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	movq	%rsi, %rdx
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rdx, %rcx
	cqto
	idivq	%rcx
	movq	%rcx, %rax
	testq	%rdx, %rdx
	jne	.L2
	ret
	.cfi_endproc
.LFE39:
	.size	gcd, .-gcd
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld%lld"
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	.LC0(%rip), %rdi
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rdx
	movq	8(%rsp), %rax
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%rdx, %rbx
	cqto
	idivq	%rbx
	movq	%rbx, %rax
	testq	%rdx, %rdx
	jne	.L6
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	movq	%rbx, 8(%rsp)
	cvtsi2sdq	%rbx, %xmm0
	ucomisd	%xmm0, %xmm1
	ja	.L39
	sqrtsd	%xmm0, %xmm0
.L9:
	cvttsd2siq	%xmm0, %r9
	testb	$1, %bl
	jne	.L10
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%rbx, %rax
	shrq	$63, %rax
	addq	%rbx, %rax
	movq	%rax, %rbx
	sarq	%rbx
	testb	$2, %al
	je	.L11
	movq	%rbx, 8(%rsp)
	cmpq	$1, %rbx
	je	.L23
	movl	$2, %esi
.L13:
	xorl	%r8d, %r8d
	xorl	%edi, %edi
	movl	$3, %ecx
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L43:
	movq	%rax, %rbx
	testl	%esi, %esi
	je	.L17
	xorl	%eax, %eax
	cmpq	%rcx, %rsi
	setne	%al
	addl	%eax, %edi
.L17:
	movslq	%ecx, %rsi
	movl	$1, %r8d
	cmpq	$1, %rbx
	je	.L42
.L19:
	movq	%rbx, %rax
	cqto
	idivq	%rcx
	testq	%rdx, %rdx
	je	.L43
	addq	$2, %rcx
	cmpq	%rcx, %r9
	cmovl	%rbx, %rcx
	cmpq	$1, %rbx
	jne	.L19
.L42:
	testb	%r8b, %r8b
	je	.L20
	movq	$1, 8(%rsp)
.L20:
	testl	%esi, %esi
	jne	.L15
.L14:
	leal	1(%rdi), %edx
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L44
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L23:
	.cfi_restore_state
	xorl	%edi, %edi
.L15:
	addl	$1, %edi
	jmp	.L14
.L10:
	xorl	%esi, %esi
	xorl	%edi, %edi
	cmpq	$1, %rbx
	jne	.L13
	jmp	.L14
.L39:
	call	sqrt@PLT
	jmp	.L9
.L44:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.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:
```