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>

int digits(int long long n)
{
  int count=0;
  while(n>0)
  {
    n=n/10;
    count++;
  }
  return count;
}   

int main()
{
  long long n;
  long long a,b;
  int ans;
  int f;
  
  scanf("%lld",&n);
  
  ans=digits(n);
  
  for(a=2;a*a<=n;a++)
  {
    if(n%a==0)
    {
      b=n/a;
    
     if(digits(a)>=digits(b))
     {
      f=digits(a);
     }
     else
     {
      f=digits(b);
     } 
    
     if(f<ans)
     {
      ans=f;
     }
    }
  }
  
  printf("%d\n",ans);
  
  return 0;
}
  ```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	digits
	.type	digits, @function
digits:
.LFB23:
	.cfi_startproc
	endbr64
	movq	%rdi, %rdx
	xorl	%r8d, %r8d
	testq	%rdi, %rdi
	jle	.L1
	movabsq	$-3689348814741910323, %rsi
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rdx, %rax
	movq	%rdx, %rcx
	addl	$1, %r8d
	mulq	%rsi
	shrq	$3, %rdx
	cmpq	$9, %rcx
	jg	.L3
.L1:
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	digits, .-digits
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	.LC0(%rip), %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	(%rsp), %r9
	testq	%r9, %r9
	jle	.L19
	movabsq	$-3689348814741910323, %rsi
	movq	%r9, %rdx
	xorl	%r10d, %r10d
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rdx, %rax
	movq	%rdx, %rcx
	addl	$1, %r10d
	mulq	%rsi
	shrq	$3, %rdx
	cmpq	$9, %rcx
	jg	.L9
	cmpq	$3, %r9
	jle	.L8
	movabsq	$-3689348814741910323, %rsi
	movl	$2, %edi
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L10:
	addq	$1, %rdi
	movq	%rdi, %rax
	imulq	%rdi, %rax
	cmpq	%rax, %r9
	jl	.L8
.L17:
	movq	%r9, %rax
	cqto
	idivq	%rdi
	movq	%rax, %rcx
	testq	%rdx, %rdx
	jne	.L10
	movq	%rax, %r8
	movq	%rdi, %rdx
	xorl	%r11d, %r11d
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%rdx, %rax
	movl	%r11d, %ebx
	leal	1(%r11), %r11d
	mulq	%rsi
	shrq	$3, %rdx
	jne	.L11
	testq	%rcx, %rcx
	je	.L21
	movq	%rcx, %rdx
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%rdx, %rax
	mulq	%rsi
	movl	%ecx, %eax
	addl	$1, %ecx
	shrq	$3, %rdx
	jne	.L13
	xorl	%ecx, %ecx
	cmpl	%eax, %ebx
	jl	.L16
.L21:
	movq	%rdi, %rdx
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L22:
	movq	%rdx, %rax
	addl	$1, %ecx
	mulq	%rsi
	shrq	$3, %rdx
	jne	.L22
.L15:
	cmpl	%ecx, %r10d
	cmovg	%ecx, %r10d
	addq	$1, %rdi
	movq	%rdi, %rax
	imulq	%rdi, %rax
	cmpq	%rax, %r9
	jge	.L17
.L8:
	xorl	%eax, %eax
	movl	%r10d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L32
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	movq	%r8, %rax
	addl	$1, %ecx
	mulq	%rsi
	movq	%rdx, %r8
	shrq	$3, %r8
	jne	.L16
	jmp	.L15
.L19:
	xorl	%r10d, %r10d
	jmp	.L8
.L32:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.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	digits
	.type	digits, @function
digits:
.LFB23:
	.cfi_startproc
	endbr64
	movq	%rdi, %rdx
	xorl	%r8d, %r8d
	testq	%rdi, %rdi
	jle	.L1
	movabsq	$-3689348814741910323, %rsi
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rdx, %rax
	movq	%rdx, %rcx
	addl	$1, %r8d
	mulq	%rsi
	shrq	$3, %rdx
	cmpq	$9, %rcx
	jg	.L3
.L1:
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	digits, .-digits
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	.LC0(%rip), %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	(%rsp), %r9
	testq	%r9, %r9
	jle	.L19
	movabsq	$-3689348814741910323, %rsi
	movq	%r9, %rdx
	xorl	%r10d, %r10d
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rdx, %rax
	movq	%rdx, %rcx
	addl	$1, %r10d
	mulq	%rsi
	shrq	$3, %rdx
	cmpq	$9, %rcx
	jg	.L9
	cmpq	$3, %r9
	jle	.L8
	movabsq	$-3689348814741910323, %rsi
	movl	$2, %edi
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L10:
	addq	$1, %rdi
	movq	%rdi, %rax
	imulq	%rdi, %rax
	cmpq	%rax, %r9
	jl	.L8
.L17:
	movq	%r9, %rax
	cqto
	idivq	%rdi
	movq	%rax, %rcx
	testq	%rdx, %rdx
	jne	.L10
	movq	%rax, %r8
	movq	%rdi, %rdx
	xorl	%r11d, %r11d
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%rdx, %rax
	movl	%r11d, %ebx
	leal	1(%r11), %r11d
	mulq	%rsi
	shrq	$3, %rdx
	jne	.L11
	testq	%rcx, %rcx
	je	.L21
	movq	%rcx, %rdx
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%rdx, %rax
	mulq	%rsi
	movl	%ecx, %eax
	addl	$1, %ecx
	shrq	$3, %rdx
	jne	.L13
	xorl	%ecx, %ecx
	cmpl	%eax, %ebx
	jl	.L16
.L21:
	movq	%rdi, %rdx
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L22:
	movq	%rdx, %rax
	addl	$1, %ecx
	mulq	%rsi
	shrq	$3, %rdx
	jne	.L22
.L15:
	cmpl	%ecx, %r10d
	cmovg	%ecx, %r10d
	addq	$1, %rdi
	movq	%rdi, %rax
	imulq	%rdi, %rax
	cmpq	%rax, %r9
	jge	.L17
.L8:
	xorl	%eax, %eax
	movl	%r10d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L32
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	movq	%r8, %rax
	addl	$1, %ecx
	mulq	%rsi
	movq	%rdx, %r8
	shrq	$3, %r8
	jne	.L16
	jmp	.L15
.L19:
	xorl	%r10d, %r10d
	jmp	.L8
.L32:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.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	digits
	.type	digits, @function
digits:
.LFB23:
	.cfi_startproc
	endbr64
	movq	%rdi, %rdx
	xorl	%r8d, %r8d
	testq	%rdi, %rdi
	jle	.L1
	movabsq	$-3689348814741910323, %rsi
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rdx, %rax
	movq	%rdx, %rcx
	addl	$1, %r8d
	mulq	%rsi
	shrq	$3, %rdx
	cmpq	$9, %rcx
	jg	.L3
.L1:
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	digits, .-digits
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	.LC0(%rip), %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	(%rsp), %r9
	testq	%r9, %r9
	jle	.L19
	movabsq	$-3689348814741910323, %rsi
	movq	%r9, %rdx
	xorl	%r10d, %r10d
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rdx, %rax
	movq	%rdx, %rcx
	addl	$1, %r10d
	mulq	%rsi
	shrq	$3, %rdx
	cmpq	$9, %rcx
	jg	.L9
	cmpq	$3, %r9
	jle	.L8
	movabsq	$-3689348814741910323, %rsi
	movl	$2, %edi
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L10:
	addq	$1, %rdi
	movq	%rdi, %rax
	imulq	%rdi, %rax
	cmpq	%rax, %r9
	jl	.L8
.L17:
	movq	%r9, %rax
	cqto
	idivq	%rdi
	movq	%rax, %rcx
	testq	%rdx, %rdx
	jne	.L10
	movq	%rax, %r8
	movq	%rdi, %rdx
	xorl	%r11d, %r11d
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%rdx, %rax
	movl	%r11d, %ebx
	leal	1(%r11), %r11d
	mulq	%rsi
	shrq	$3, %rdx
	jne	.L11
	testq	%rcx, %rcx
	je	.L21
	movq	%rcx, %rdx
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%rdx, %rax
	mulq	%rsi
	movl	%ecx, %eax
	addl	$1, %ecx
	shrq	$3, %rdx
	jne	.L13
	xorl	%ecx, %ecx
	cmpl	%eax, %ebx
	jl	.L16
.L21:
	movq	%rdi, %rdx
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L22:
	movq	%rdx, %rax
	addl	$1, %ecx
	mulq	%rsi
	shrq	$3, %rdx
	jne	.L22
.L15:
	cmpl	%ecx, %r10d
	cmovg	%ecx, %r10d
	addq	$1, %rdi
	movq	%rdi, %rax
	imulq	%rdi, %rax
	cmpq	%rax, %r9
	jge	.L17
.L8:
	xorl	%eax, %eax
	movl	%r10d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L32
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	movq	%r8, %rax
	addl	$1, %ecx
	mulq	%rsi
	movq	%rdx, %r8
	shrq	$3, %r8
	jne	.L16
	jmp	.L15
.L19:
	xorl	%r10d, %r10d
	jmp	.L8
.L32:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.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>

int digits(int long long n)
{
  int count=0;
  while(n>0)
  {
    n=n/10;
    count++;
  }
  return count;
}   

int main()
{
  long long n;
  long long a,b;
  int ans;
  int f;
  
  scanf("%lld",&n);
  
  ans=digits(n);
  
  for(a=2;a*a<=n;a++)
  {
    if(n%a==0)
    {
      b=n/a;
    
     if(digits(a)>=digits(b))
     {
      f=digits(a);
     }
     else
     {
      f=digits(b);
     } 
    
     if(f<ans)
     {
      ans=f;
     }
    }
  }
  
  printf("%d\n",ans);
  
  return 0;
}
  ```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>

int digits(int long long n)
{
  int count=0;
  while(n>0)
  {
    n=n/10;
    count++;
  }
  return count;
}   

int main()
{
  long long n;
  long long a,b;
  int ans;
  int f;
  
  scanf("%lld",&n);
  
  ans=digits(n);
  
  for(a=2;a*a<=n;a++)
  {
    if(n%a==0)
    {
      b=n/a;
    
     if(digits(a)>=digits(b))
     {
      f=digits(a);
     }
     else
     {
      f=digits(b);
     } 
    
     if(f<ans)
     {
      ans=f;
     }
    }
  }
  
  printf("%d\n",ans);
  
  return 0;
}
  ```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

101914
 17346
 2771679283
 7026
 5110764300
 472
 10211397040
 16034112351
 010
 53937807463

5
 3
 9
 4
 7
 2
 6
 8
 1
 10

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>

int digits(int long long n)
{
  int count=0;
  while(n>0)
  {
    n=n/10;
    count++;
  }
  return count;
}   

int main()
{
  long long n;
  long long a,b;
  int ans;
  int f;
  
  scanf("%lld",&n);
  
  ans=digits(n);
  
  for(a=2;a*a<=n;a++)
  {
    if(n%a==0)
    {
      b=n/a;
    
     if(digits(a)>=digits(b))
     {
      f=digits(a);
     }
     else
     {
      f=digits(b);
     } 
    
     if(f<ans)
     {
      ans=f;
     }
    }
  }
  
  printf("%d\n",ans);
  
  return 0;
}
  ```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	digits
	.type	digits, @function
digits:
.LFB23:
	.cfi_startproc
	endbr64
	movq	%rdi, %rdx
	xorl	%r8d, %r8d
	testq	%rdi, %rdi
	jle	.L1
	movabsq	$-3689348814741910323, %rsi
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rdx, %rax
	movq	%rdx, %rcx
	addl	$1, %r8d
	mulq	%rsi
	shrq	$3, %rdx
	cmpq	$9, %rcx
	jg	.L3
.L1:
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	digits, .-digits
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	.LC0(%rip), %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	(%rsp), %r9
	testq	%r9, %r9
	jle	.L19
	movabsq	$-3689348814741910323, %rsi
	movq	%r9, %rdx
	xorl	%r10d, %r10d
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rdx, %rax
	movq	%rdx, %rcx
	addl	$1, %r10d
	mulq	%rsi
	shrq	$3, %rdx
	cmpq	$9, %rcx
	jg	.L9
	cmpq	$3, %r9
	jle	.L8
	movabsq	$-3689348814741910323, %rsi
	movl	$2, %edi
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L10:
	addq	$1, %rdi
	movq	%rdi, %rax
	imulq	%rdi, %rax
	cmpq	%rax, %r9
	jl	.L8
.L17:
	movq	%r9, %rax
	cqto
	idivq	%rdi
	movq	%rax, %rcx
	testq	%rdx, %rdx
	jne	.L10
	movq	%rax, %r8
	movq	%rdi, %rdx
	xorl	%r11d, %r11d
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%rdx, %rax
	movl	%r11d, %ebx
	leal	1(%r11), %r11d
	mulq	%rsi
	shrq	$3, %rdx
	jne	.L11
	testq	%rcx, %rcx
	je	.L21
	movq	%rcx, %rdx
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%rdx, %rax
	mulq	%rsi
	movl	%ecx, %eax
	addl	$1, %ecx
	shrq	$3, %rdx
	jne	.L13
	xorl	%ecx, %ecx
	cmpl	%eax, %ebx
	jl	.L16
.L21:
	movq	%rdi, %rdx
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L22:
	movq	%rdx, %rax
	addl	$1, %ecx
	mulq	%rsi
	shrq	$3, %rdx
	jne	.L22
.L15:
	cmpl	%ecx, %r10d
	cmovg	%ecx, %r10d
	addq	$1, %rdi
	movq	%rdi, %rax
	imulq	%rdi, %rax
	cmpq	%rax, %r9
	jge	.L17
.L8:
	xorl	%eax, %eax
	movl	%r10d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L32
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	movq	%r8, %rax
	addl	$1, %ecx
	mulq	%rsi
	movq	%rdx, %r8
	shrq	$3, %r8
	jne	.L16
	jmp	.L15
.L19:
	xorl	%r10d, %r10d
	jmp	.L8
.L32:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.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	digits
	.type	digits, @function
digits:
.LFB23:
	.cfi_startproc
	endbr64
	movq	%rdi, %rdx
	xorl	%r8d, %r8d
	testq	%rdi, %rdi
	jle	.L1
	movabsq	$-3689348814741910323, %rsi
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rdx, %rax
	movq	%rdx, %rcx
	addl	$1, %r8d
	mulq	%rsi
	shrq	$3, %rdx
	cmpq	$9, %rcx
	jg	.L3
.L1:
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	digits, .-digits
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	.LC0(%rip), %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	(%rsp), %r9
	testq	%r9, %r9
	jle	.L19
	movabsq	$-3689348814741910323, %rsi
	movq	%r9, %rdx
	xorl	%r10d, %r10d
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rdx, %rax
	movq	%rdx, %rcx
	addl	$1, %r10d
	mulq	%rsi
	shrq	$3, %rdx
	cmpq	$9, %rcx
	jg	.L9
	cmpq	$3, %r9
	jle	.L8
	movabsq	$-3689348814741910323, %rsi
	movl	$2, %edi
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L10:
	addq	$1, %rdi
	movq	%rdi, %rax
	imulq	%rdi, %rax
	cmpq	%rax, %r9
	jl	.L8
.L17:
	movq	%r9, %rax
	cqto
	idivq	%rdi
	movq	%rax, %rcx
	testq	%rdx, %rdx
	jne	.L10
	movq	%rax, %r8
	movq	%rdi, %rdx
	xorl	%r11d, %r11d
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%rdx, %rax
	movl	%r11d, %ebx
	leal	1(%r11), %r11d
	mulq	%rsi
	shrq	$3, %rdx
	jne	.L11
	testq	%rcx, %rcx
	je	.L21
	movq	%rcx, %rdx
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%rdx, %rax
	mulq	%rsi
	movl	%ecx, %eax
	addl	$1, %ecx
	shrq	$3, %rdx
	jne	.L13
	xorl	%ecx, %ecx
	cmpl	%eax, %ebx
	jl	.L16
.L21:
	movq	%rdi, %rdx
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L22:
	movq	%rdx, %rax
	addl	$1, %ecx
	mulq	%rsi
	shrq	$3, %rdx
	jne	.L22
.L15:
	cmpl	%ecx, %r10d
	cmovg	%ecx, %r10d
	addq	$1, %rdi
	movq	%rdi, %rax
	imulq	%rdi, %rax
	cmpq	%rax, %r9
	jge	.L17
.L8:
	xorl	%eax, %eax
	movl	%r10d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L32
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	movq	%r8, %rax
	addl	$1, %ecx
	mulq	%rsi
	movq	%rdx, %r8
	shrq	$3, %r8
	jne	.L16
	jmp	.L15
.L19:
	xorl	%r10d, %r10d
	jmp	.L8
.L32:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.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:
```