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>

main(){
  int data[20],i,n,p,ans,temp=1;

  data[0]=1;
  for(i=1;;i++){
    temp*=4;
    data[i]=temp;
    if(temp>=1500000){
      data[i]=-1;
      break;
    }
  }
  while(1){
    scanf("%d", &n);
    if(n==-1) break;
    if(n==0){
      printf("0\n");
      continue;
    }

    for(i=0;;i++){
      if(data[i]==-1) break;
      if(n<data[i]){
	p=i;
	break;
      }
    }

    for(i=p-1;i>=0;i--){
      ans=n/data[i];
      n = n-data[i]*ans;
      printf("%d", ans);
    }
    printf("\n");
  }
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC3:
	.string	"%d"
.LC4:
	.string	"0"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC4(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC3(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$120, %rsp
	.cfi_def_cfa_offset 176
	movdqa	.LC0(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %r13
	movaps	%xmm0, 16(%rsp)
	movdqa	.LC1(%rip), %xmm0
	movaps	%xmm0, 32(%rsp)
	movdqa	.LC2(%rip), %xmm0
	movaps	%xmm0, 48(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r13, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	cmpl	$-1, %eax
	je	.L3
	xorl	%edx, %edx
	movl	$1, %ecx
	testl	%eax, %eax
	jne	.L4
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L20:
	addq	$1, %rdx
	movl	16(%rsp,%rdx,4), %ecx
	cmpl	$-1, %ecx
	je	.L6
.L4:
	cmpl	%ecx, %eax
	jge	.L20
	movl	%edx, %r12d
.L6:
	leal	-1(%r12), %r15d
	testl	%r12d, %r12d
	je	.L7
	movslq	%r15d, %r15
	leaq	16(%rsp), %rbx
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L21:
	movl	12(%rsp), %eax
.L8:
	cltd
	movq	%rbp, %rsi
	movl	$1, %edi
	idivl	(%rbx,%r15,4)
	subq	$1, %r15
	movl	%edx, 12(%rsp)
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	cmpl	$-1, %r15d
	jne	.L21
.L7:
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L19:
	movq	%r14, %rdi
	call	puts@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$120, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L22:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	4
	.long	16
	.long	64
	.align 16
.LC1:
	.long	256
	.long	1024
	.long	4096
	.long	16384
	.align 16
.LC2:
	.long	65536
	.long	262144
	.long	1048576
	.long	-1
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC3:
	.string	"%d"
.LC4:
	.string	"0"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC4(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC3(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$120, %rsp
	.cfi_def_cfa_offset 176
	movdqa	.LC0(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %r13
	movaps	%xmm0, 16(%rsp)
	movdqa	.LC1(%rip), %xmm0
	movaps	%xmm0, 32(%rsp)
	movdqa	.LC2(%rip), %xmm0
	movaps	%xmm0, 48(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r13, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	cmpl	$-1, %eax
	je	.L3
	xorl	%edx, %edx
	movl	$1, %ecx
	testl	%eax, %eax
	jne	.L4
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L20:
	addq	$1, %rdx
	movl	16(%rsp,%rdx,4), %ecx
	cmpl	$-1, %ecx
	je	.L6
.L4:
	cmpl	%ecx, %eax
	jge	.L20
	movl	%edx, %r12d
.L6:
	leal	-1(%r12), %r15d
	testl	%r12d, %r12d
	je	.L7
	movslq	%r15d, %r15
	leaq	16(%rsp), %rbx
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L21:
	movl	12(%rsp), %eax
.L8:
	cltd
	movq	%rbp, %rsi
	movl	$1, %edi
	idivl	(%rbx,%r15,4)
	subq	$1, %r15
	movl	%edx, 12(%rsp)
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	cmpl	$-1, %r15d
	jne	.L21
.L7:
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L19:
	movq	%r14, %rdi
	call	puts@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$120, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L22:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	4
	.long	16
	.long	64
	.align 16
.LC1:
	.long	256
	.long	1024
	.long	4096
	.long	16384
	.align 16
.LC2:
	.long	65536
	.long	262144
	.long	1048576
	.long	-1
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC3:
	.string	"%d"
.LC4:
	.string	"0"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC4(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC3(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$120, %rsp
	.cfi_def_cfa_offset 176
	movdqa	.LC0(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %r13
	movaps	%xmm0, 16(%rsp)
	movdqa	.LC1(%rip), %xmm0
	movaps	%xmm0, 32(%rsp)
	movdqa	.LC2(%rip), %xmm0
	movaps	%xmm0, 48(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r13, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	cmpl	$-1, %eax
	je	.L3
	xorl	%edx, %edx
	movl	$1, %ecx
	testl	%eax, %eax
	jne	.L4
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L20:
	addq	$1, %rdx
	movl	16(%rsp,%rdx,4), %ecx
	cmpl	$-1, %ecx
	je	.L6
.L4:
	cmpl	%ecx, %eax
	jge	.L20
	movl	%edx, %r12d
.L6:
	leal	-1(%r12), %r15d
	testl	%r12d, %r12d
	je	.L7
	movslq	%r15d, %r15
	leaq	16(%rsp), %rbx
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L21:
	movl	12(%rsp), %eax
.L8:
	cltd
	movq	%rbp, %rsi
	movl	$1, %edi
	idivl	(%rbx,%r15,4)
	subq	$1, %r15
	movl	%edx, 12(%rsp)
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	cmpl	$-1, %r15d
	jne	.L21
.L7:
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L19:
	movq	%r14, %rdi
	call	puts@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$120, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L22:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	4
	.long	16
	.long	64
	.align 16
.LC1:
	.long	256
	.long	1024
	.long	4096
	.long	16384
	.align 16
.LC2:
	.long	65536
	.long	262144
	.long	1048576
	.long	-1
	.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>

main(){
  int data[20],i,n,p,ans,temp=1;

  data[0]=1;
  for(i=1;;i++){
    temp*=4;
    data[i]=temp;
    if(temp>=1500000){
      data[i]=-1;
      break;
    }
  }
  while(1){
    scanf("%d", &n);
    if(n==-1) break;
    if(n==0){
      printf("0\n");
      continue;
    }

    for(i=0;;i++){
      if(data[i]==-1) break;
      if(n<data[i]){
	p=i;
	break;
      }
    }

    for(i=p-1;i>=0;i--){
      ans=n/data[i];
      n = n-data[i]*ans;
      printf("%d", ans);
    }
    printf("\n");
  }
  return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>

main(){
  int data[20],i,n,p,ans,temp=1;

  data[0]=1;
  for(i=1;;i++){
    temp*=4;
    data[i]=temp;
    if(temp>=1500000){
      data[i]=-1;
      break;
    }
  }
  while(1){
    scanf("%d", &n);
    if(n==-1) break;
    if(n==0){
      printf("0\n");
      continue;
    }

    for(i=0;;i++){
      if(data[i]==-1) break;
      if(n<data[i]){
	p=i;
	break;
      }
    }

    for(i=p-1;i>=0;i--){
      ans=n/data[i];
      n = n-data[i]*ans;
      printf("%d", ans);
    }
    printf("\n");
  }
  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:

7
4
0
12
10
10010
-1
 7
4
0
12
4
10000
-1
 7
4
0
13
10
10010
-1
 7
4
0
12
6
10000
-1
 7
4
0
24
10
10010
-1
 7
4
1
12
6
10000
-1
 7
4
1
24
10
10010
-1
 7
6
1
12
6
10000
-1
 7
1
1
24
10
10010
-1
 7
6
1
12
11
10000
-1

13
10
0
30
22
2130122
 13
10
0
30
10
2130100
 13
10
0
31
22
2130122
 13
10
0
30
12
2130100
 13
10
0
120
22
2130122
 13
10
1
30
12
2130100
 13
10
1
120
22
2130122
 13
12
1
30
12
2130100
 13
1
1
120
22
2130122
 13
12
1
30
23
2130100

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>

main(){
  int data[20],i,n,p,ans,temp=1;

  data[0]=1;
  for(i=1;;i++){
    temp*=4;
    data[i]=temp;
    if(temp>=1500000){
      data[i]=-1;
      break;
    }
  }
  while(1){
    scanf("%d", &n);
    if(n==-1) break;
    if(n==0){
      printf("0\n");
      continue;
    }

    for(i=0;;i++){
      if(data[i]==-1) break;
      if(n<data[i]){
	p=i;
	break;
      }
    }

    for(i=p-1;i>=0;i--){
      ans=n/data[i];
      n = n-data[i]*ans;
      printf("%d", ans);
    }
    printf("\n");
  }
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC3:
	.string	"%d"
.LC4:
	.string	"0"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC4(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC3(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$120, %rsp
	.cfi_def_cfa_offset 176
	movdqa	.LC0(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %r13
	movaps	%xmm0, 16(%rsp)
	movdqa	.LC1(%rip), %xmm0
	movaps	%xmm0, 32(%rsp)
	movdqa	.LC2(%rip), %xmm0
	movaps	%xmm0, 48(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r13, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	cmpl	$-1, %eax
	je	.L3
	xorl	%edx, %edx
	movl	$1, %ecx
	testl	%eax, %eax
	jne	.L4
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L20:
	addq	$1, %rdx
	movl	16(%rsp,%rdx,4), %ecx
	cmpl	$-1, %ecx
	je	.L6
.L4:
	cmpl	%ecx, %eax
	jge	.L20
	movl	%edx, %r12d
.L6:
	leal	-1(%r12), %r15d
	testl	%r12d, %r12d
	je	.L7
	movslq	%r15d, %r15
	leaq	16(%rsp), %rbx
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L21:
	movl	12(%rsp), %eax
.L8:
	cltd
	movq	%rbp, %rsi
	movl	$1, %edi
	idivl	(%rbx,%r15,4)
	subq	$1, %r15
	movl	%edx, 12(%rsp)
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	cmpl	$-1, %r15d
	jne	.L21
.L7:
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L19:
	movq	%r14, %rdi
	call	puts@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$120, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L22:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	4
	.long	16
	.long	64
	.align 16
.LC1:
	.long	256
	.long	1024
	.long	4096
	.long	16384
	.align 16
.LC2:
	.long	65536
	.long	262144
	.long	1048576
	.long	-1
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC3:
	.string	"%d"
.LC4:
	.string	"0"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC4(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC3(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$120, %rsp
	.cfi_def_cfa_offset 176
	movdqa	.LC0(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %r13
	movaps	%xmm0, 16(%rsp)
	movdqa	.LC1(%rip), %xmm0
	movaps	%xmm0, 32(%rsp)
	movdqa	.LC2(%rip), %xmm0
	movaps	%xmm0, 48(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r13, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	cmpl	$-1, %eax
	je	.L3
	xorl	%edx, %edx
	movl	$1, %ecx
	testl	%eax, %eax
	jne	.L4
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L20:
	addq	$1, %rdx
	movl	16(%rsp,%rdx,4), %ecx
	cmpl	$-1, %ecx
	je	.L6
.L4:
	cmpl	%ecx, %eax
	jge	.L20
	movl	%edx, %r12d
.L6:
	leal	-1(%r12), %r15d
	testl	%r12d, %r12d
	je	.L7
	movslq	%r15d, %r15
	leaq	16(%rsp), %rbx
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L21:
	movl	12(%rsp), %eax
.L8:
	cltd
	movq	%rbp, %rsi
	movl	$1, %edi
	idivl	(%rbx,%r15,4)
	subq	$1, %r15
	movl	%edx, 12(%rsp)
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	cmpl	$-1, %r15d
	jne	.L21
.L7:
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L19:
	movq	%r14, %rdi
	call	puts@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$120, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L22:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	4
	.long	16
	.long	64
	.align 16
.LC1:
	.long	256
	.long	1024
	.long	4096
	.long	16384
	.align 16
.LC2:
	.long	65536
	.long	262144
	.long	1048576
	.long	-1
	.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:
```