Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <float.h>
#include <inttypes.h>
#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <math.h>
#ifdef __cplusplus
#include <bits/stdc++.h>
#endif

int comp(const void *a, const void *b){return (*(int*)a>*(int*)b)-(*(int*)a<*(int*)b);}
int compr(const void *a, const void *b){return (*(int*)a<*(int*)b)-(*(int*)a>*(int*)b);}

uint32_t nextpint(void){ char c=getc_unlocked(stdin); while(c<'0'||'9'<c) c=getc_unlocked(stdin); uint32_t x=0; while('0'<=c && c<='9'){ x=x*10+c-'0'; c=getc_unlocked(stdin); } return x; }
uint64_t nextplong(void){ char c=getc_unlocked(stdin); while(c<'0'||'9'<c) c=getc_unlocked(stdin); uint64_t x=0; while('0'<=c && c<='9'){ x=x*10+c-'0'; c=getc_unlocked(stdin); } return x; }
uint32_t nextstr(char *s){ char c=getc_unlocked(stdin); while(c==' '||c=='\n') c=getc_unlocked(stdin); uint32_t len=0; while(c!=' '&&c!='\n'){ *s++=c; len++; c=getc_unlocked(stdin); } *s='\0'; return len; }

inline int max2(const int a, const int b){return a>b?a:b;}
inline int min2(const int a, const int b){return a>b?b:a;}
inline int dif2(const int a, const int b){return a>b?a-b:b-a;}
inline int abs2(const int a){return a>=0?a:-a;}

int main(void){
	long n=nextplong();
	if(n==2){
		puts("1");
		return 0;
	}
	long ans=0;
	{
		long m=sqrt(n-1);
		for(int i=2; i<=m; i++){
			if((n-1)%i==0){ans+=2; /*printf("%d ", i);*/}
		}
		if(m*m==n-1) ans--;
		ans++; //n-1
		//putchar(10);
	}{
		long m=sqrt(n);
		for(int i=2; i<=m; i++){
			if(n%i==0){
			long s=n;
			while(s%i==0) s/=i;
			if(s%i==1){ans++; /*printf("%d ", i);*/}
			s=n;
			long j=n/i;
			if(j==i) continue;
			while(s%j==0) s/=j;
			if(s%j==1){ans++; /*printf("%ld ", j);*/}
			}
		}
		ans++; //n
		//putchar(10);
	}
	printf("%ld\n", ans);
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	comp
	.type	comp, @function
comp:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	setg	%al
	movzbl	%al, %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %ecx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ecx
	setl	%al
	movzbl	%al, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	comp, .-comp
	.globl	compr
	.type	compr, @function
compr:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	setl	%al
	movzbl	%al, %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %ecx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ecx
	setg	%al
	movzbl	%al, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	compr, .-compr
	.globl	nextpint
	.type	nextpint, @function
nextpint:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	stdin(%rip), %rax
	movq	%rax, %rdi
	call	getc_unlocked@PLT
	movb	%al, -5(%rbp)
	jmp	.L6
.L7:
	movq	stdin(%rip), %rax
	movq	%rax, %rdi
	call	getc_unlocked@PLT
	movb	%al, -5(%rbp)
.L6:
	cmpb	$47, -5(%rbp)
	jle	.L7
	cmpb	$57, -5(%rbp)
	jg	.L7
	movl	$0, -4(%rbp)
	jmp	.L8
.L10:
	movl	-4(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %edx
	movsbl	-5(%rbp), %eax
	addl	%edx, %eax
	subl	$48, %eax
	movl	%eax, -4(%rbp)
	movq	stdin(%rip), %rax
	movq	%rax, %rdi
	call	getc_unlocked@PLT
	movb	%al, -5(%rbp)
.L8:
	cmpb	$47, -5(%rbp)
	jle	.L9
	cmpb	$57, -5(%rbp)
	jle	.L10
.L9:
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	nextpint, .-nextpint
	.globl	nextplong
	.type	nextplong, @function
nextplong:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	stdin(%rip), %rax
	movq	%rax, %rdi
	call	getc_unlocked@PLT
	movb	%al, -9(%rbp)
	jmp	.L13
.L14:
	movq	stdin(%rip), %rax
	movq	%rax, %rdi
	call	getc_unlocked@PLT
	movb	%al, -9(%rbp)
.L13:
	cmpb	$47, -9(%rbp)
	jle	.L14
	cmpb	$57, -9(%rbp)
	jg	.L14
	movq	$0, -8(%rbp)
	jmp	.L15
.L17:
	movq	-8(%rbp), %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	movq	%rax, %rdx
	movsbq	-9(%rbp), %rax
	addq	%rdx, %rax
	subq	$48, %rax
	movq	%rax, -8(%rbp)
	movq	stdin(%rip), %rax
	movq	%rax, %rdi
	call	getc_unlocked@PLT
	movb	%al, -9(%rbp)
.L15:
	cmpb	$47, -9(%rbp)
	jle	.L16
	cmpb	$57, -9(%rbp)
	jle	.L17
.L16:
	movq	-8(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	nextplong, .-nextplong
	.globl	nextstr
	.type	nextstr, @function
nextstr:
.LFB10:
	.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	%rdi, -24(%rbp)
	movq	stdin(%rip), %rax
	movq	%rax, %rdi
	call	getc_unlocked@PLT
	movb	%al, -5(%rbp)
	jmp	.L20
.L21:
	movq	stdin(%rip), %rax
	movq	%rax, %rdi
	call	getc_unlocked@PLT
	movb	%al, -5(%rbp)
.L20:
	cmpb	$32, -5(%rbp)
	je	.L21
	cmpb	$10, -5(%rbp)
	je	.L21
	movl	$0, -4(%rbp)
	jmp	.L22
.L24:
	movq	-24(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -24(%rbp)
	movzbl	-5(%rbp), %edx
	movb	%dl, (%rax)
	addl	$1, -4(%rbp)
	movq	stdin(%rip), %rax
	movq	%rax, %rdi
	call	getc_unlocked@PLT
	movb	%al, -5(%rbp)
.L22:
	cmpb	$32, -5(%rbp)
	je	.L23
	cmpb	$10, -5(%rbp)
	jne	.L24
.L23:
	movq	-24(%rbp), %rax
	movb	$0, (%rax)
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	nextstr, .-nextstr
	.section	.rodata
.LC0:
	.string	"1"
.LC1:
	.string	"%ld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB15:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	call	nextplong
	movq	%rax, -32(%rbp)
	cmpq	$2, -32(%rbp)
	jne	.L27
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L28
.L27:
	movq	$0, -48(%rbp)
	movq	-32(%rbp), %rax
	subq	$1, %rax
	pxor	%xmm1, %xmm1
	cvtsi2sdq	%rax, %xmm1
	movq	%xmm1, %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	cvttsd2siq	%xmm0, %rax
	movq	%rax, -24(%rbp)
	movl	$2, -56(%rbp)
	jmp	.L29
.L31:
	movq	-32(%rbp), %rax
	subq	$1, %rax
	movl	-56(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	testq	%rax, %rax
	jne	.L30
	addq	$2, -48(%rbp)
.L30:
	addl	$1, -56(%rbp)
.L29:
	movl	-56(%rbp), %eax
	cltq
	cmpq	%rax, -24(%rbp)
	jge	.L31
	movq	-24(%rbp), %rax
	imulq	%rax, %rax
	movq	-32(%rbp), %rdx
	subq	$1, %rdx
	cmpq	%rdx, %rax
	jne	.L32
	subq	$1, -48(%rbp)
.L32:
	addq	$1, -48(%rbp)
	pxor	%xmm2, %xmm2
	cvtsi2sdq	-32(%rbp), %xmm2
	movq	%xmm2, %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	cvttsd2siq	%xmm0, %rax
	movq	%rax, -16(%rbp)
	movl	$2, -52(%rbp)
	jmp	.L33
.L41:
	movl	-52(%rbp), %eax
	movslq	%eax, %rcx
	movq	-32(%rbp), %rax
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	testq	%rax, %rax
	jne	.L34
	movq	-32(%rbp), %rax
	movq	%rax, -40(%rbp)
	jmp	.L35
.L36:
	movl	-52(%rbp), %eax
	movslq	%eax, %rsi
	movq	-40(%rbp), %rax
	cqto
	idivq	%rsi
	movq	%rax, -40(%rbp)
.L35:
	movl	-52(%rbp), %eax
	movslq	%eax, %rcx
	movq	-40(%rbp), %rax
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	testq	%rax, %rax
	je	.L36
	movl	-52(%rbp), %eax
	movslq	%eax, %rcx
	movq	-40(%rbp), %rax
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	cmpq	$1, %rax
	jne	.L37
	addq	$1, -48(%rbp)
.L37:
	movq	-32(%rbp), %rax
	movq	%rax, -40(%rbp)
	movl	-52(%rbp), %eax
	movslq	%eax, %rdi
	movq	-32(%rbp), %rax
	cqto
	idivq	%rdi
	movq	%rax, -8(%rbp)
	movl	-52(%rbp), %eax
	cltq
	cmpq	%rax, -8(%rbp)
	je	.L42
	jmp	.L39
.L40:
	movq	-40(%rbp), %rax
	cqto
	idivq	-8(%rbp)
	movq	%rax, -40(%rbp)
.L39:
	movq	-40(%rbp), %rax
	cqto
	idivq	-8(%rbp)
	movq	%rdx, %rax
	testq	%rax, %rax
	je	.L40
	movq	-40(%rbp), %rax
	cqto
	idivq	-8(%rbp)
	movq	%rdx, %rax
	cmpq	$1, %rax
	jne	.L34
	addq	$1, -48(%rbp)
	jmp	.L34
.L42:
	nop
.L34:
	addl	$1, -52(%rbp)
.L33:
	movl	-52(%rbp), %eax
	cltq
	cmpq	%rax, -16(%rbp)
	jge	.L41
	addq	$1, -48(%rbp)
	movq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L28:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.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
	.p2align 4
	.globl	comp
	.type	comp, @function
comp:
.LFB63:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	cmpl	%eax, (%rdi)
	setg	%al
	setl	%dl
	movzbl	%dl, %edx
	movzbl	%al, %eax
	subl	%edx, %eax
	ret
	.cfi_endproc
.LFE63:
	.size	comp, .-comp
	.p2align 4
	.globl	compr
	.type	compr, @function
compr:
.LFB64:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	cmpl	%eax, (%rdi)
	setl	%al
	setg	%dl
	movzbl	%dl, %edx
	movzbl	%al, %eax
	subl	%edx, %eax
	ret
	.cfi_endproc
.LFE64:
	.size	compr, .-compr
	.p2align 4
	.globl	nextpint
	.type	nextpint, @function
nextpint:
.LFB65:
	.cfi_startproc
	endbr64
	movq	stdin(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	8(%rdi), %rax
	movq	16(%rdi), %rsi
	cmpq	%rsi, %rax
	jnb	.L19
	leaq	1(%rax), %rcx
	movq	%rcx, 8(%rdi)
	movzbl	(%rax), %edx
	movl	%edx, %eax
.L6:
	subl	$48, %eax
	cmpb	$9, %al
	ja	.L11
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L8:
	leaq	1(%rcx), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%rcx), %edx
	movl	%edx, %ecx
	subl	$48, %ecx
	cmpb	$9, %cl
	jbe	.L12
.L9:
	movq	%rax, %rcx
.L11:
	cmpq	%rsi, %rcx
	jb	.L8
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movl	%eax, %edx
	leal	-48(%rdx), %ecx
	movq	8(%rdi), %rax
	movq	16(%rdi), %rsi
	cmpb	$9, %cl
	ja	.L9
	.p2align 4,,10
	.p2align 3
.L12:
	xorl	%r12d, %r12d
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L13:
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %edx
	leal	-48(%rdx), %eax
	cmpb	$9, %al
	ja	.L4
.L14:
	movq	8(%rdi), %rax
	movq	16(%rdi), %rsi
.L16:
	leal	(%r12,%r12,4), %ecx
	movsbl	%dl, %edx
	leal	-48(%rdx,%rcx,2), %r12d
	cmpq	%rsi, %rax
	jb	.L13
	call	__uflow@PLT
	movl	%eax, %edx
	subl	$48, %eax
	cmpb	$9, %al
	ja	.L4
	movq	stdin(%rip), %rdi
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L4:
	movl	%r12d, %eax
	popq	%r12
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	movq	%rcx, %rax
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L19:
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movl	%eax, %edx
	movq	8(%rdi), %rcx
	movq	16(%rdi), %rsi
	jmp	.L6
	.cfi_endproc
.LFE65:
	.size	nextpint, .-nextpint
	.p2align 4
	.globl	nextplong
	.type	nextplong, @function
nextplong:
.LFB66:
	.cfi_startproc
	endbr64
	movq	stdin(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	8(%rdi), %rax
	movq	16(%rdi), %rsi
	cmpq	%rsi, %rax
	jnb	.L35
	leaq	1(%rax), %rcx
	movq	%rcx, 8(%rdi)
	movzbl	(%rax), %edx
	movl	%edx, %eax
.L22:
	subl	$48, %eax
	cmpb	$9, %al
	ja	.L27
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L24:
	leaq	1(%rcx), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%rcx), %edx
	movl	%edx, %ecx
	subl	$48, %ecx
	cmpb	$9, %cl
	jbe	.L28
.L25:
	movq	%rax, %rcx
.L27:
	cmpq	%rsi, %rcx
	jb	.L24
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movl	%eax, %edx
	leal	-48(%rdx), %ecx
	movq	8(%rdi), %rax
	movq	16(%rdi), %rsi
	cmpb	$9, %cl
	ja	.L25
	.p2align 4,,10
	.p2align 3
.L28:
	xorl	%r12d, %r12d
	jmp	.L32
	.p2align 4,,10
	.p2align 3
.L29:
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %edx
	leal	-48(%rdx), %eax
	cmpb	$9, %al
	ja	.L20
.L30:
	movq	8(%rdi), %rax
	movq	16(%rdi), %rsi
.L32:
	leaq	(%r12,%r12,4), %rcx
	movsbq	%dl, %rdx
	leaq	-48(%rdx,%rcx,2), %r12
	cmpq	%rsi, %rax
	jb	.L29
	call	__uflow@PLT
	movl	%eax, %edx
	subl	$48, %eax
	cmpb	$9, %al
	ja	.L20
	movq	stdin(%rip), %rdi
	jmp	.L30
	.p2align 4,,10
	.p2align 3
.L20:
	movq	%r12, %rax
	popq	%r12
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	movq	%rcx, %rax
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L35:
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movl	%eax, %edx
	movq	8(%rdi), %rcx
	movq	16(%rdi), %rsi
	jmp	.L22
	.cfi_endproc
.LFE66:
	.size	nextplong, .-nextplong
	.p2align 4
	.globl	nextstr
	.type	nextstr, @function
nextstr:
.LFB67:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rdi, %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rax
	cmpq	16(%rdi), %rax
	jnb	.L69
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %eax
.L68:
	movl	%eax, %edx
	cmpb	$10, %al
	je	.L40
	cmpb	$32, %al
	jne	.L39
.L40:
	movq	stdin(%rip), %rdi
	.p2align 4,,10
	.p2align 3
.L44:
	movq	8(%rdi), %rax
	cmpq	16(%rdi), %rax
	jnb	.L69
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %edx
	cmpb	$32, %dl
	je	.L44
	cmpb	$10, %dl
	je	.L44
.L39:
	xorl	%r12d, %r12d
	jmp	.L50
	.p2align 4,,10
	.p2align 3
.L45:
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %edx
	cmpb	$32, %dl
	je	.L48
	cmpb	$10, %dl
	je	.L48
.L50:
	movb	%dl, (%rbx)
	movq	stdin(%rip), %rdi
	addq	$1, %rbx
	addl	$1, %r12d
	movq	8(%rdi), %rax
	cmpq	16(%rdi), %rax
	jb	.L45
	call	__uflow@PLT
	movl	%eax, %edx
	cmpb	$10, %al
	je	.L48
	cmpb	$32, %al
	jne	.L50
.L48:
	movb	$0, (%rbx)
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	movl	%r12d, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L69:
	.cfi_restore_state
	call	__uflow@PLT
	jmp	.L68
	.cfi_endproc
.LFE67:
	.size	nextstr, .-nextstr
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"1"
.LC2:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB72:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	call	nextplong
	cmpq	$2, %rax
	je	.L102
	leaq	-1(%rax), %rbx
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	movq	%rax, %rbp
	cvtsi2sdq	%rbx, %xmm0
	ucomisd	%xmm0, %xmm1
	ja	.L99
	sqrtsd	%xmm0, %xmm0
.L75:
	cvttsd2siq	%xmm0, %rdi
	cmpq	$1, %rdi
	jle	.L90
	movl	$2, %ecx
	xorl	%esi, %esi
	jmp	.L78
	.p2align 4,,10
	.p2align 3
.L91:
	movq	%rax, %rcx
.L78:
	movq	%rbx, %rax
	cqto
	idivq	%rcx
	leaq	2(%rsi), %rax
	testq	%rdx, %rdx
	cmove	%rax, %rsi
	leaq	1(%rcx), %rax
	cmpq	%rdi, %rcx
	jne	.L91
.L76:
	imulq	%rdi, %rdi
	pxor	%xmm0, %xmm0
	xorl	%eax, %eax
	cvtsi2sdq	%rbp, %xmm0
	cmpq	%rdi, %rbx
	sete	%al
	subq	%rax, %rsi
	ucomisd	%xmm0, %xmm1
	leaq	1(%rsi), %rbx
	ja	.L100
	sqrtsd	%xmm0, %xmm0
.L82:
	cvttsd2siq	%xmm0, %r8
	cmpq	$1, %r8
	jle	.L83
	movl	$2, %ecx
	jmp	.L89
	.p2align 4,,10
	.p2align 3
.L84:
	leaq	1(%rcx), %rax
	cmpq	%r8, %rcx
	je	.L83
.L92:
	movq	%rax, %rcx
.L89:
	movq	%rbp, %rax
	cqto
	idivq	%rcx
	movq	%rax, %rdi
	testq	%rdx, %rdx
	jne	.L84
	movq	%rbp, %rsi
	.p2align 4,,10
	.p2align 3
.L85:
	movq	%rsi, %rax
	cqto
	idivq	%rcx
	cqto
	movq	%rax, %rsi
	idivq	%rcx
	testq	%rdx, %rdx
	je	.L85
	xorl	%eax, %eax
	cmpq	$1, %rdx
	sete	%al
	addq	%rax, %rbx
	cmpq	%rcx, %rdi
	je	.L84
	movq	%rbp, %rax
	cqto
	idivq	%rdi
	testq	%rdx, %rdx
	jne	.L87
	movq	%rbp, %rsi
	.p2align 4,,10
	.p2align 3
.L88:
	movq	%rsi, %rax
	cqto
	idivq	%rdi
	cqto
	movq	%rax, %rsi
	idivq	%rdi
	testq	%rdx, %rdx
	je	.L88
.L87:
	xorl	%eax, %eax
	cmpq	$1, %rdx
	sete	%al
	addq	%rax, %rbx
	leaq	1(%rcx), %rax
	cmpq	%r8, %rcx
	jne	.L92
	.p2align 4,,10
	.p2align 3
.L83:
	leaq	1(%rbx), %rdx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L72:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L102:
	.cfi_restore_state
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
	jmp	.L72
.L90:
	xorl	%esi, %esi
	jmp	.L76
.L99:
	call	sqrt@PLT
	pxor	%xmm1, %xmm1
	jmp	.L75
.L100:
	call	sqrt@PLT
	jmp	.L82
	.cfi_endproc
.LFE72:
	.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
	.p2align 4
	.globl	comp
	.type	comp, @function
comp:
.LFB63:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	cmpl	%eax, (%rdi)
	setg	%al
	setl	%dl
	movzbl	%dl, %edx
	movzbl	%al, %eax
	subl	%edx, %eax
	ret
	.cfi_endproc
.LFE63:
	.size	comp, .-comp
	.p2align 4
	.globl	compr
	.type	compr, @function
compr:
.LFB64:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	cmpl	%eax, (%rdi)
	setl	%al
	setg	%dl
	movzbl	%dl, %edx
	movzbl	%al, %eax
	subl	%edx, %eax
	ret
	.cfi_endproc
.LFE64:
	.size	compr, .-compr
	.p2align 4
	.globl	nextpint
	.type	nextpint, @function
nextpint:
.LFB65:
	.cfi_startproc
	endbr64
	movq	stdin(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	8(%rdi), %rax
	movq	16(%rdi), %rsi
	cmpq	%rsi, %rax
	jnb	.L19
	leaq	1(%rax), %rcx
	movq	%rcx, 8(%rdi)
	movzbl	(%rax), %edx
	movl	%edx, %eax
.L6:
	subl	$48, %eax
	cmpb	$9, %al
	ja	.L11
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L8:
	leaq	1(%rcx), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%rcx), %edx
	movl	%edx, %ecx
	subl	$48, %ecx
	cmpb	$9, %cl
	jbe	.L12
.L9:
	movq	%rax, %rcx
.L11:
	cmpq	%rsi, %rcx
	jb	.L8
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movl	%eax, %edx
	leal	-48(%rdx), %ecx
	movq	8(%rdi), %rax
	movq	16(%rdi), %rsi
	cmpb	$9, %cl
	ja	.L9
	.p2align 4,,10
	.p2align 3
.L12:
	xorl	%r12d, %r12d
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L13:
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %edx
	leal	-48(%rdx), %eax
	cmpb	$9, %al
	ja	.L4
.L14:
	movq	8(%rdi), %rax
	movq	16(%rdi), %rsi
.L16:
	leal	(%r12,%r12,4), %ecx
	movsbl	%dl, %edx
	leal	-48(%rdx,%rcx,2), %r12d
	cmpq	%rsi, %rax
	jb	.L13
	call	__uflow@PLT
	movl	%eax, %edx
	subl	$48, %eax
	cmpb	$9, %al
	ja	.L4
	movq	stdin(%rip), %rdi
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L4:
	movl	%r12d, %eax
	popq	%r12
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	movq	%rcx, %rax
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L19:
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movl	%eax, %edx
	movq	8(%rdi), %rcx
	movq	16(%rdi), %rsi
	jmp	.L6
	.cfi_endproc
.LFE65:
	.size	nextpint, .-nextpint
	.p2align 4
	.globl	nextplong
	.type	nextplong, @function
nextplong:
.LFB66:
	.cfi_startproc
	endbr64
	movq	stdin(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	8(%rdi), %rax
	movq	16(%rdi), %rsi
	cmpq	%rsi, %rax
	jnb	.L35
	leaq	1(%rax), %rcx
	movq	%rcx, 8(%rdi)
	movzbl	(%rax), %edx
	movl	%edx, %eax
.L22:
	subl	$48, %eax
	cmpb	$9, %al
	ja	.L27
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L24:
	leaq	1(%rcx), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%rcx), %edx
	movl	%edx, %ecx
	subl	$48, %ecx
	cmpb	$9, %cl
	jbe	.L28
.L25:
	movq	%rax, %rcx
.L27:
	cmpq	%rsi, %rcx
	jb	.L24
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movl	%eax, %edx
	leal	-48(%rdx), %ecx
	movq	8(%rdi), %rax
	movq	16(%rdi), %rsi
	cmpb	$9, %cl
	ja	.L25
	.p2align 4,,10
	.p2align 3
.L28:
	xorl	%r12d, %r12d
	jmp	.L32
	.p2align 4,,10
	.p2align 3
.L29:
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %edx
	leal	-48(%rdx), %eax
	cmpb	$9, %al
	ja	.L20
.L30:
	movq	8(%rdi), %rax
	movq	16(%rdi), %rsi
.L32:
	leaq	(%r12,%r12,4), %rcx
	movsbq	%dl, %rdx
	leaq	-48(%rdx,%rcx,2), %r12
	cmpq	%rsi, %rax
	jb	.L29
	call	__uflow@PLT
	movl	%eax, %edx
	subl	$48, %eax
	cmpb	$9, %al
	ja	.L20
	movq	stdin(%rip), %rdi
	jmp	.L30
	.p2align 4,,10
	.p2align 3
.L20:
	movq	%r12, %rax
	popq	%r12
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	movq	%rcx, %rax
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L35:
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movl	%eax, %edx
	movq	8(%rdi), %rcx
	movq	16(%rdi), %rsi
	jmp	.L22
	.cfi_endproc
.LFE66:
	.size	nextplong, .-nextplong
	.p2align 4
	.globl	nextstr
	.type	nextstr, @function
nextstr:
.LFB67:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rdi, %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rax
	cmpq	16(%rdi), %rax
	jnb	.L69
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %eax
.L68:
	movl	%eax, %edx
	cmpb	$10, %al
	je	.L40
	cmpb	$32, %al
	jne	.L39
.L40:
	movq	stdin(%rip), %rdi
	.p2align 4,,10
	.p2align 3
.L44:
	movq	8(%rdi), %rax
	cmpq	16(%rdi), %rax
	jnb	.L69
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %edx
	cmpb	$32, %dl
	je	.L44
	cmpb	$10, %dl
	je	.L44
.L39:
	xorl	%r12d, %r12d
	jmp	.L50
	.p2align 4,,10
	.p2align 3
.L45:
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %edx
	cmpb	$32, %dl
	je	.L48
	cmpb	$10, %dl
	je	.L48
.L50:
	movb	%dl, (%rbx)
	movq	stdin(%rip), %rdi
	addq	$1, %rbx
	addl	$1, %r12d
	movq	8(%rdi), %rax
	cmpq	16(%rdi), %rax
	jb	.L45
	call	__uflow@PLT
	movl	%eax, %edx
	cmpb	$10, %al
	je	.L48
	cmpb	$32, %al
	jne	.L50
.L48:
	movb	$0, (%rbx)
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	movl	%r12d, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L69:
	.cfi_restore_state
	call	__uflow@PLT
	jmp	.L68
	.cfi_endproc
.LFE67:
	.size	nextstr, .-nextstr
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"1"
.LC2:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB72:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	call	nextplong
	cmpq	$2, %rax
	je	.L102
	leaq	-1(%rax), %rbx
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	movq	%rax, %rbp
	cvtsi2sdq	%rbx, %xmm0
	ucomisd	%xmm0, %xmm1
	ja	.L99
	sqrtsd	%xmm0, %xmm0
.L75:
	cvttsd2siq	%xmm0, %rdi
	cmpq	$1, %rdi
	jle	.L90
	movl	$2, %ecx
	xorl	%esi, %esi
	jmp	.L78
	.p2align 4,,10
	.p2align 3
.L91:
	movq	%rax, %rcx
.L78:
	movq	%rbx, %rax
	cqto
	idivq	%rcx
	leaq	2(%rsi), %rax
	testq	%rdx, %rdx
	cmove	%rax, %rsi
	leaq	1(%rcx), %rax
	cmpq	%rdi, %rcx
	jne	.L91
.L76:
	imulq	%rdi, %rdi
	pxor	%xmm0, %xmm0
	xorl	%eax, %eax
	cvtsi2sdq	%rbp, %xmm0
	cmpq	%rdi, %rbx
	sete	%al
	subq	%rax, %rsi
	ucomisd	%xmm0, %xmm1
	leaq	1(%rsi), %rbx
	ja	.L100
	sqrtsd	%xmm0, %xmm0
.L82:
	cvttsd2siq	%xmm0, %r8
	cmpq	$1, %r8
	jle	.L83
	movl	$2, %ecx
	jmp	.L89
	.p2align 4,,10
	.p2align 3
.L84:
	leaq	1(%rcx), %rax
	cmpq	%r8, %rcx
	je	.L83
.L92:
	movq	%rax, %rcx
.L89:
	movq	%rbp, %rax
	cqto
	idivq	%rcx
	movq	%rax, %rdi
	testq	%rdx, %rdx
	jne	.L84
	movq	%rbp, %rsi
	.p2align 4,,10
	.p2align 3
.L85:
	movq	%rsi, %rax
	cqto
	idivq	%rcx
	cqto
	movq	%rax, %rsi
	idivq	%rcx
	testq	%rdx, %rdx
	je	.L85
	xorl	%eax, %eax
	cmpq	$1, %rdx
	sete	%al
	addq	%rax, %rbx
	cmpq	%rcx, %rdi
	je	.L84
	movq	%rbp, %rax
	cqto
	idivq	%rdi
	testq	%rdx, %rdx
	jne	.L87
	movq	%rbp, %rsi
	.p2align 4,,10
	.p2align 3
.L88:
	movq	%rsi, %rax
	cqto
	idivq	%rdi
	cqto
	movq	%rax, %rsi
	idivq	%rdi
	testq	%rdx, %rdx
	je	.L88
.L87:
	xorl	%eax, %eax
	cmpq	$1, %rdx
	sete	%al
	addq	%rax, %rbx
	leaq	1(%rcx), %rax
	cmpq	%r8, %rcx
	jne	.L92
	.p2align 4,,10
	.p2align 3
.L83:
	leaq	1(%rbx), %rdx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L72:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L102:
	.cfi_restore_state
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
	jmp	.L72
.L90:
	xorl	%esi, %esi
	jmp	.L76
.L99:
	call	sqrt@PLT
	pxor	%xmm1, %xmm1
	jmp	.L75
.L100:
	call	sqrt@PLT
	jmp	.L82
	.cfi_endproc
.LFE72:
	.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 <float.h>
#include <inttypes.h>
#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <math.h>
#ifdef __cplusplus
#include <bits/stdc++.h>
#endif

int comp(const void *a, const void *b){return (*(int*)a>*(int*)b)-(*(int*)a<*(int*)b);}
int compr(const void *a, const void *b){return (*(int*)a<*(int*)b)-(*(int*)a>*(int*)b);}

uint32_t nextpint(void){ char c=getc_unlocked(stdin); while(c<'0'||'9'<c) c=getc_unlocked(stdin); uint32_t x=0; while('0'<=c && c<='9'){ x=x*10+c-'0'; c=getc_unlocked(stdin); } return x; }
uint64_t nextplong(void){ char c=getc_unlocked(stdin); while(c<'0'||'9'<c) c=getc_unlocked(stdin); uint64_t x=0; while('0'<=c && c<='9'){ x=x*10+c-'0'; c=getc_unlocked(stdin); } return x; }
uint32_t nextstr(char *s){ char c=getc_unlocked(stdin); while(c==' '||c=='\n') c=getc_unlocked(stdin); uint32_t len=0; while(c!=' '&&c!='\n'){ *s++=c; len++; c=getc_unlocked(stdin); } *s='\0'; return len; }

inline int max2(const int a, const int b){return a>b?a:b;}
inline int min2(const int a, const int b){return a>b?b:a;}
inline int dif2(const int a, const int b){return a>b?a-b:b-a;}
inline int abs2(const int a){return a>=0?a:-a;}

int main(void){
	long n=nextplong();
	if(n==2){
		puts("1");
		return 0;
	}
	long ans=0;
	{
		long m=sqrt(n-1);
		for(int i=2; i<=m; i++){
			if((n-1)%i==0){ans+=2; /*printf("%d ", i);*/}
		}
		if(m*m==n-1) ans--;
		ans++; //n-1
		//putchar(10);
	}{
		long m=sqrt(n);
		for(int i=2; i<=m; i++){
			if(n%i==0){
			long s=n;
			while(s%i==0) s/=i;
			if(s%i==1){ans++; /*printf("%d ", i);*/}
			s=n;
			long j=n/i;
			if(j==i) continue;
			while(s%j==0) s/=j;
			if(s%j==1){ans++; /*printf("%ld ", j);*/}
			}
		}
		ans++; //n
		//putchar(10);
	}
	printf("%ld\n", ans);
}

7705668993
 2827
 6363881708
 2031
 10229584853
 308
 13543667986
 23472293460
 45468207033
 9

64
 12
 17
 16
 6
 4
 33
 11
 48
 5

Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <float.h>
#include <inttypes.h>
#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <math.h>
#ifdef __cplusplus
#include <bits/stdc++.h>
#endif

int comp(const void *a, const void *b){return (*(int*)a>*(int*)b)-(*(int*)a<*(int*)b);}
int compr(const void *a, const void *b){return (*(int*)a<*(int*)b)-(*(int*)a>*(int*)b);}

uint32_t nextpint(void){ char c=getc_unlocked(stdin); while(c<'0'||'9'<c) c=getc_unlocked(stdin); uint32_t x=0; while('0'<=c && c<='9'){ x=x*10+c-'0'; c=getc_unlocked(stdin); } return x; }
uint64_t nextplong(void){ char c=getc_unlocked(stdin); while(c<'0'||'9'<c) c=getc_unlocked(stdin); uint64_t x=0; while('0'<=c && c<='9'){ x=x*10+c-'0'; c=getc_unlocked(stdin); } return x; }
uint32_t nextstr(char *s){ char c=getc_unlocked(stdin); while(c==' '||c=='\n') c=getc_unlocked(stdin); uint32_t len=0; while(c!=' '&&c!='\n'){ *s++=c; len++; c=getc_unlocked(stdin); } *s='\0'; return len; }

inline int max2(const int a, const int b){return a>b?a:b;}
inline int min2(const int a, const int b){return a>b?b:a;}
inline int dif2(const int a, const int b){return a>b?a-b:b-a;}
inline int abs2(const int a){return a>=0?a:-a;}

int main(void){
	long n=nextplong();
	if(n==2){
		puts("1");
		return 0;
	}
	long ans=0;
	{
		long m=sqrt(n-1);
		for(int i=2; i<=m; i++){
			if((n-1)%i==0){ans+=2; /*printf("%d ", i);*/}
		}
		if(m*m==n-1) ans--;
		ans++; //n-1
		//putchar(10);
	}{
		long m=sqrt(n);
		for(int i=2; i<=m; i++){
			if(n%i==0){
			long s=n;
			while(s%i==0) s/=i;
			if(s%i==1){ans++; /*printf("%d ", i);*/}
			s=n;
			long j=n/i;
			if(j==i) continue;
			while(s%j==0) s/=j;
			if(s%j==1){ans++; /*printf("%ld ", j);*/}
			}
		}
		ans++; //n
		//putchar(10);
	}
	printf("%ld\n", ans);
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	comp
	.type	comp, @function
comp:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	setg	%al
	movzbl	%al, %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %ecx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ecx
	setl	%al
	movzbl	%al, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	comp, .-comp
	.globl	compr
	.type	compr, @function
compr:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	setl	%al
	movzbl	%al, %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %ecx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ecx
	setg	%al
	movzbl	%al, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	compr, .-compr
	.globl	nextpint
	.type	nextpint, @function
nextpint:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	stdin(%rip), %rax
	movq	%rax, %rdi
	call	getc_unlocked@PLT
	movb	%al, -5(%rbp)
	jmp	.L6
.L7:
	movq	stdin(%rip), %rax
	movq	%rax, %rdi
	call	getc_unlocked@PLT
	movb	%al, -5(%rbp)
.L6:
	cmpb	$47, -5(%rbp)
	jle	.L7
	cmpb	$57, -5(%rbp)
	jg	.L7
	movl	$0, -4(%rbp)
	jmp	.L8
.L10:
	movl	-4(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %edx
	movsbl	-5(%rbp), %eax
	addl	%edx, %eax
	subl	$48, %eax
	movl	%eax, -4(%rbp)
	movq	stdin(%rip), %rax
	movq	%rax, %rdi
	call	getc_unlocked@PLT
	movb	%al, -5(%rbp)
.L8:
	cmpb	$47, -5(%rbp)
	jle	.L9
	cmpb	$57, -5(%rbp)
	jle	.L10
.L9:
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	nextpint, .-nextpint
	.globl	nextplong
	.type	nextplong, @function
nextplong:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	stdin(%rip), %rax
	movq	%rax, %rdi
	call	getc_unlocked@PLT
	movb	%al, -9(%rbp)
	jmp	.L13
.L14:
	movq	stdin(%rip), %rax
	movq	%rax, %rdi
	call	getc_unlocked@PLT
	movb	%al, -9(%rbp)
.L13:
	cmpb	$47, -9(%rbp)
	jle	.L14
	cmpb	$57, -9(%rbp)
	jg	.L14
	movq	$0, -8(%rbp)
	jmp	.L15
.L17:
	movq	-8(%rbp), %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	movq	%rax, %rdx
	movsbq	-9(%rbp), %rax
	addq	%rdx, %rax
	subq	$48, %rax
	movq	%rax, -8(%rbp)
	movq	stdin(%rip), %rax
	movq	%rax, %rdi
	call	getc_unlocked@PLT
	movb	%al, -9(%rbp)
.L15:
	cmpb	$47, -9(%rbp)
	jle	.L16
	cmpb	$57, -9(%rbp)
	jle	.L17
.L16:
	movq	-8(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	nextplong, .-nextplong
	.globl	nextstr
	.type	nextstr, @function
nextstr:
.LFB10:
	.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	%rdi, -24(%rbp)
	movq	stdin(%rip), %rax
	movq	%rax, %rdi
	call	getc_unlocked@PLT
	movb	%al, -5(%rbp)
	jmp	.L20
.L21:
	movq	stdin(%rip), %rax
	movq	%rax, %rdi
	call	getc_unlocked@PLT
	movb	%al, -5(%rbp)
.L20:
	cmpb	$32, -5(%rbp)
	je	.L21
	cmpb	$10, -5(%rbp)
	je	.L21
	movl	$0, -4(%rbp)
	jmp	.L22
.L24:
	movq	-24(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -24(%rbp)
	movzbl	-5(%rbp), %edx
	movb	%dl, (%rax)
	addl	$1, -4(%rbp)
	movq	stdin(%rip), %rax
	movq	%rax, %rdi
	call	getc_unlocked@PLT
	movb	%al, -5(%rbp)
.L22:
	cmpb	$32, -5(%rbp)
	je	.L23
	cmpb	$10, -5(%rbp)
	jne	.L24
.L23:
	movq	-24(%rbp), %rax
	movb	$0, (%rax)
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	nextstr, .-nextstr
	.section	.rodata
.LC0:
	.string	"1"
.LC1:
	.string	"%ld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB15:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	call	nextplong
	movq	%rax, -32(%rbp)
	cmpq	$2, -32(%rbp)
	jne	.L27
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L28
.L27:
	movq	$0, -48(%rbp)
	movq	-32(%rbp), %rax
	subq	$1, %rax
	pxor	%xmm1, %xmm1
	cvtsi2sdq	%rax, %xmm1
	movq	%xmm1, %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	cvttsd2siq	%xmm0, %rax
	movq	%rax, -24(%rbp)
	movl	$2, -56(%rbp)
	jmp	.L29
.L31:
	movq	-32(%rbp), %rax
	subq	$1, %rax
	movl	-56(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	testq	%rax, %rax
	jne	.L30
	addq	$2, -48(%rbp)
.L30:
	addl	$1, -56(%rbp)
.L29:
	movl	-56(%rbp), %eax
	cltq
	cmpq	%rax, -24(%rbp)
	jge	.L31
	movq	-24(%rbp), %rax
	imulq	%rax, %rax
	movq	-32(%rbp), %rdx
	subq	$1, %rdx
	cmpq	%rdx, %rax
	jne	.L32
	subq	$1, -48(%rbp)
.L32:
	addq	$1, -48(%rbp)
	pxor	%xmm2, %xmm2
	cvtsi2sdq	-32(%rbp), %xmm2
	movq	%xmm2, %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	cvttsd2siq	%xmm0, %rax
	movq	%rax, -16(%rbp)
	movl	$2, -52(%rbp)
	jmp	.L33
.L41:
	movl	-52(%rbp), %eax
	movslq	%eax, %rcx
	movq	-32(%rbp), %rax
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	testq	%rax, %rax
	jne	.L34
	movq	-32(%rbp), %rax
	movq	%rax, -40(%rbp)
	jmp	.L35
.L36:
	movl	-52(%rbp), %eax
	movslq	%eax, %rsi
	movq	-40(%rbp), %rax
	cqto
	idivq	%rsi
	movq	%rax, -40(%rbp)
.L35:
	movl	-52(%rbp), %eax
	movslq	%eax, %rcx
	movq	-40(%rbp), %rax
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	testq	%rax, %rax
	je	.L36
	movl	-52(%rbp), %eax
	movslq	%eax, %rcx
	movq	-40(%rbp), %rax
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	cmpq	$1, %rax
	jne	.L37
	addq	$1, -48(%rbp)
.L37:
	movq	-32(%rbp), %rax
	movq	%rax, -40(%rbp)
	movl	-52(%rbp), %eax
	movslq	%eax, %rdi
	movq	-32(%rbp), %rax
	cqto
	idivq	%rdi
	movq	%rax, -8(%rbp)
	movl	-52(%rbp), %eax
	cltq
	cmpq	%rax, -8(%rbp)
	je	.L42
	jmp	.L39
.L40:
	movq	-40(%rbp), %rax
	cqto
	idivq	-8(%rbp)
	movq	%rax, -40(%rbp)
.L39:
	movq	-40(%rbp), %rax
	cqto
	idivq	-8(%rbp)
	movq	%rdx, %rax
	testq	%rax, %rax
	je	.L40
	movq	-40(%rbp), %rax
	cqto
	idivq	-8(%rbp)
	movq	%rdx, %rax
	cmpq	$1, %rax
	jne	.L34
	addq	$1, -48(%rbp)
	jmp	.L34
.L42:
	nop
.L34:
	addl	$1, -52(%rbp)
.L33:
	movl	-52(%rbp), %eax
	cltq
	cmpq	%rax, -16(%rbp)
	jge	.L41
	addq	$1, -48(%rbp)
	movq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L28:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.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
	.globl	comp
	.type	comp, @function
comp:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	setg	%al
	movzbl	%al, %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %ecx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ecx
	setl	%al
	movzbl	%al, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	comp, .-comp
	.globl	compr
	.type	compr, @function
compr:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	setl	%al
	movzbl	%al, %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %ecx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ecx
	setg	%al
	movzbl	%al, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	compr, .-compr
	.globl	nextpint
	.type	nextpint, @function
nextpint:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	stdin(%rip), %rax
	movq	%rax, %rdi
	call	getc_unlocked@PLT
	movb	%al, -5(%rbp)
	jmp	.L6
.L7:
	movq	stdin(%rip), %rax
	movq	%rax, %rdi
	call	getc_unlocked@PLT
	movb	%al, -5(%rbp)
.L6:
	cmpb	$47, -5(%rbp)
	jle	.L7
	cmpb	$57, -5(%rbp)
	jg	.L7
	movl	$0, -4(%rbp)
	jmp	.L8
.L10:
	movl	-4(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %edx
	movsbl	-5(%rbp), %eax
	addl	%edx, %eax
	subl	$48, %eax
	movl	%eax, -4(%rbp)
	movq	stdin(%rip), %rax
	movq	%rax, %rdi
	call	getc_unlocked@PLT
	movb	%al, -5(%rbp)
.L8:
	cmpb	$47, -5(%rbp)
	jle	.L9
	cmpb	$57, -5(%rbp)
	jle	.L10
.L9:
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	nextpint, .-nextpint
	.globl	nextplong
	.type	nextplong, @function
nextplong:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	stdin(%rip), %rax
	movq	%rax, %rdi
	call	getc_unlocked@PLT
	movb	%al, -9(%rbp)
	jmp	.L13
.L14:
	movq	stdin(%rip), %rax
	movq	%rax, %rdi
	call	getc_unlocked@PLT
	movb	%al, -9(%rbp)
.L13:
	cmpb	$47, -9(%rbp)
	jle	.L14
	cmpb	$57, -9(%rbp)
	jg	.L14
	movq	$0, -8(%rbp)
	jmp	.L15
.L17:
	movq	-8(%rbp), %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	movq	%rax, %rdx
	movsbq	-9(%rbp), %rax
	addq	%rdx, %rax
	subq	$48, %rax
	movq	%rax, -8(%rbp)
	movq	stdin(%rip), %rax
	movq	%rax, %rdi
	call	getc_unlocked@PLT
	movb	%al, -9(%rbp)
.L15:
	cmpb	$47, -9(%rbp)
	jle	.L16
	cmpb	$57, -9(%rbp)
	jle	.L17
.L16:
	movq	-8(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	nextplong, .-nextplong
	.globl	nextstr
	.type	nextstr, @function
nextstr:
.LFB10:
	.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	%rdi, -24(%rbp)
	movq	stdin(%rip), %rax
	movq	%rax, %rdi
	call	getc_unlocked@PLT
	movb	%al, -5(%rbp)
	jmp	.L20
.L21:
	movq	stdin(%rip), %rax
	movq	%rax, %rdi
	call	getc_unlocked@PLT
	movb	%al, -5(%rbp)
.L20:
	cmpb	$32, -5(%rbp)
	je	.L21
	cmpb	$10, -5(%rbp)
	je	.L21
	movl	$0, -4(%rbp)
	jmp	.L22
.L24:
	movq	-24(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -24(%rbp)
	movzbl	-5(%rbp), %edx
	movb	%dl, (%rax)
	addl	$1, -4(%rbp)
	movq	stdin(%rip), %rax
	movq	%rax, %rdi
	call	getc_unlocked@PLT
	movb	%al, -5(%rbp)
.L22:
	cmpb	$32, -5(%rbp)
	je	.L23
	cmpb	$10, -5(%rbp)
	jne	.L24
.L23:
	movq	-24(%rbp), %rax
	movb	$0, (%rax)
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	nextstr, .-nextstr
	.section	.rodata
.LC0:
	.string	"1"
.LC1:
	.string	"%ld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB15:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	call	nextplong
	movq	%rax, -32(%rbp)
	cmpq	$2, -32(%rbp)
	jne	.L27
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L28
.L27:
	movq	$0, -48(%rbp)
	movq	-32(%rbp), %rax
	subq	$1, %rax
	pxor	%xmm1, %xmm1
	cvtsi2sdq	%rax, %xmm1
	movq	%xmm1, %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	cvttsd2siq	%xmm0, %rax
	movq	%rax, -24(%rbp)
	movl	$2, -56(%rbp)
	jmp	.L29
.L31:
	movq	-32(%rbp), %rax
	subq	$1, %rax
	movl	-56(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	testq	%rax, %rax
	jne	.L30
	addq	$2, -48(%rbp)
.L30:
	addl	$1, -56(%rbp)
.L29:
	movl	-56(%rbp), %eax
	cltq
	cmpq	%rax, -24(%rbp)
	jge	.L31
	movq	-24(%rbp), %rax
	imulq	%rax, %rax
	movq	-32(%rbp), %rdx
	subq	$1, %rdx
	cmpq	%rdx, %rax
	jne	.L32
	subq	$1, -48(%rbp)
.L32:
	addq	$1, -48(%rbp)
	pxor	%xmm2, %xmm2
	cvtsi2sdq	-32(%rbp), %xmm2
	movq	%xmm2, %rax
	movq	%rax, %xmm0
	call	sqrt@PLT
	cvttsd2siq	%xmm0, %rax
	movq	%rax, -16(%rbp)
	movl	$2, -52(%rbp)
	jmp	.L33
.L41:
	movl	-52(%rbp), %eax
	movslq	%eax, %rcx
	movq	-32(%rbp), %rax
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	testq	%rax, %rax
	jne	.L34
	movq	-32(%rbp), %rax
	movq	%rax, -40(%rbp)
	jmp	.L35
.L36:
	movl	-52(%rbp), %eax
	movslq	%eax, %rsi
	movq	-40(%rbp), %rax
	cqto
	idivq	%rsi
	movq	%rax, -40(%rbp)
.L35:
	movl	-52(%rbp), %eax
	movslq	%eax, %rcx
	movq	-40(%rbp), %rax
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	testq	%rax, %rax
	je	.L36
	movl	-52(%rbp), %eax
	movslq	%eax, %rcx
	movq	-40(%rbp), %rax
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	cmpq	$1, %rax
	jne	.L37
	addq	$1, -48(%rbp)
.L37:
	movq	-32(%rbp), %rax
	movq	%rax, -40(%rbp)
	movl	-52(%rbp), %eax
	movslq	%eax, %rdi
	movq	-32(%rbp), %rax
	cqto
	idivq	%rdi
	movq	%rax, -8(%rbp)
	movl	-52(%rbp), %eax
	cltq
	cmpq	%rax, -8(%rbp)
	je	.L42
	jmp	.L39
.L40:
	movq	-40(%rbp), %rax
	cqto
	idivq	-8(%rbp)
	movq	%rax, -40(%rbp)
.L39:
	movq	-40(%rbp), %rax
	cqto
	idivq	-8(%rbp)
	movq	%rdx, %rax
	testq	%rax, %rax
	je	.L40
	movq	-40(%rbp), %rax
	cqto
	idivq	-8(%rbp)
	movq	%rdx, %rax
	cmpq	$1, %rax
	jne	.L34
	addq	$1, -48(%rbp)
	jmp	.L34
.L42:
	nop
.L34:
	addl	$1, -52(%rbp)
.L33:
	movl	-52(%rbp), %eax
	cltq
	cmpq	%rax, -16(%rbp)
	jge	.L41
	addq	$1, -48(%rbp)
	movq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L28:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.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:
