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 main(){
  int n,x[20]={},d[100001]={},e[100001]={},i,j,t,k,r=0;
  scanf("%d",&n);
  for(t=1,k=0;t<100001;t*=6){x[k]=t;k++;}for(t=9;t<100001;t*=9){x[k]=t;k++;}
  d[0]=1;
  while(1){
    r++;
    for(i=0;i<100001;i++)e[i]=0;
    for(i=0;i<100001;i++)if(d[i])for(j=0;j<k;j++)if(i+x[j]<100001)e[i+x[j]]=1;
    for(i=0;i<100001;i++)d[i]=e[i];
    if(d[n]){printf("%d",r);return 0;}
  }
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.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
	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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798776
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1336, %rsp
	.cfi_def_cfa_offset 800112
	movl	$400004, %edx
	xorl	%esi, %esi
	leaq	.LC0(%rip), %r14
	xorl	%r12d, %r12d
	movq	%fs:40, %rax
	movq	%rax, 800040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r15
	leaq	400032(%rsp), %rbx
	movq	%r15, %rdi
	leaq	400036(%rsp), %r13
	call	memset@PLT
	leaq	12(%rsp), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	$1, 16(%rsp)
	movslq	12(%rsp), %rbp
.L16:
	movl	$400004, %edx
	xorl	%esi, %esi
	movq	%rbx, %rdi
	addl	$1, %r12d
	call	memset@PLT
	movq	%r13, %rdx
	movl	$1, %eax
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L2:
	addq	$1, %rax
	addq	$4, %rdx
	cmpq	$100002, %rax
	je	.L25
.L15:
	movl	-4(%r15,%rax,4), %ecx
	testl	%ecx, %ecx
	je	.L2
	cmpq	$100001, %rax
	je	.L3
	movl	$1, (%rdx)
.L3:
	leal	5(%rax), %esi
	movl	%eax, %ecx
	cmpl	$100000, %esi
	ja	.L4
	movl	$1, 20(%rdx)
.L4:
	leal	35(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L5
	movl	$1, 140(%rdx)
.L5:
	leal	215(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L6
	movl	$1, 860(%rdx)
.L6:
	leal	1295(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L7
	movl	$1, 5180(%rdx)
.L7:
	leal	7775(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L8
	movl	$1, 31100(%rdx)
.L8:
	leal	46655(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L9
	movl	$1, 186620(%rdx)
.L9:
	leal	8(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L10
	movl	$1, 32(%rdx)
.L10:
	leal	80(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L11
	movl	$1, 320(%rdx)
.L11:
	leal	728(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L12
	movl	$1, 2912(%rdx)
.L12:
	leal	6560(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L13
	movl	$1, 26240(%rdx)
.L13:
	addl	$59048, %ecx
	cmpl	$100000, %ecx
	ja	.L2
	addq	$1, %rax
	addq	$4, %rdx
	movl	$1, 236188(%rdx)
	cmpq	$100002, %rax
	jne	.L15
.L25:
	movl	$400004, %edx
	movq	%rbx, %rsi
	movq	%r15, %rdi
	call	memcpy@PLT
	movl	16(%rsp,%rbp,4), %eax
	testl	%eax, %eax
	je	.L16
	xorl	%eax, %eax
	movl	%r12d, %edx
	movq	%r14, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	800040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$800056, %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
.L26:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

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
.LC0:
	.string	"%d"
	.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
	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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798776
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1336, %rsp
	.cfi_def_cfa_offset 800112
	movl	$400004, %edx
	xorl	%esi, %esi
	leaq	.LC0(%rip), %r14
	xorl	%r12d, %r12d
	movq	%fs:40, %rax
	movq	%rax, 800040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r15
	leaq	400032(%rsp), %rbx
	movq	%r15, %rdi
	leaq	400036(%rsp), %r13
	call	memset@PLT
	leaq	12(%rsp), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	$1, 16(%rsp)
	movslq	12(%rsp), %rbp
.L16:
	movl	$400004, %edx
	xorl	%esi, %esi
	movq	%rbx, %rdi
	addl	$1, %r12d
	call	memset@PLT
	movq	%r13, %rdx
	movl	$1, %eax
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L2:
	addq	$1, %rax
	addq	$4, %rdx
	cmpq	$100002, %rax
	je	.L25
.L15:
	movl	-4(%r15,%rax,4), %ecx
	testl	%ecx, %ecx
	je	.L2
	cmpq	$100001, %rax
	je	.L3
	movl	$1, (%rdx)
.L3:
	leal	5(%rax), %esi
	movl	%eax, %ecx
	cmpl	$100000, %esi
	ja	.L4
	movl	$1, 20(%rdx)
.L4:
	leal	35(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L5
	movl	$1, 140(%rdx)
.L5:
	leal	215(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L6
	movl	$1, 860(%rdx)
.L6:
	leal	1295(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L7
	movl	$1, 5180(%rdx)
.L7:
	leal	7775(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L8
	movl	$1, 31100(%rdx)
.L8:
	leal	46655(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L9
	movl	$1, 186620(%rdx)
.L9:
	leal	8(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L10
	movl	$1, 32(%rdx)
.L10:
	leal	80(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L11
	movl	$1, 320(%rdx)
.L11:
	leal	728(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L12
	movl	$1, 2912(%rdx)
.L12:
	leal	6560(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L13
	movl	$1, 26240(%rdx)
.L13:
	addl	$59048, %ecx
	cmpl	$100000, %ecx
	ja	.L2
	addq	$1, %rax
	addq	$4, %rdx
	movl	$1, 236188(%rdx)
	cmpq	$100002, %rax
	jne	.L15
.L25:
	movl	$400004, %edx
	movq	%rbx, %rsi
	movq	%r15, %rdi
	call	memcpy@PLT
	movl	16(%rsp,%rbp,4), %eax
	testl	%eax, %eax
	je	.L16
	xorl	%eax, %eax
	movl	%r12d, %edx
	movq	%r14, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	800040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$800056, %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
.L26:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```
rule
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.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
	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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798776
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1336, %rsp
	.cfi_def_cfa_offset 800112
	movl	$400004, %edx
	xorl	%esi, %esi
	leaq	.LC0(%rip), %r14
	xorl	%r12d, %r12d
	movq	%fs:40, %rax
	movq	%rax, 800040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r15
	leaq	400032(%rsp), %rbx
	movq	%r15, %rdi
	leaq	400036(%rsp), %r13
	call	memset@PLT
	leaq	12(%rsp), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	$1, 16(%rsp)
	movslq	12(%rsp), %rbp
.L16:
	movl	$400004, %edx
	xorl	%esi, %esi
	movq	%rbx, %rdi
	addl	$1, %r12d
	call	memset@PLT
	movq	%r13, %rdx
	movl	$1, %eax
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L2:
	addq	$1, %rax
	addq	$4, %rdx
	cmpq	$100002, %rax
	je	.L25
.L15:
	movl	-4(%r15,%rax,4), %ecx
	testl	%ecx, %ecx
	je	.L2
	cmpq	$100001, %rax
	je	.L3
	movl	$1, (%rdx)
.L3:
	leal	5(%rax), %esi
	movl	%eax, %ecx
	cmpl	$100000, %esi
	ja	.L4
	movl	$1, 20(%rdx)
.L4:
	leal	35(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L5
	movl	$1, 140(%rdx)
.L5:
	leal	215(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L6
	movl	$1, 860(%rdx)
.L6:
	leal	1295(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L7
	movl	$1, 5180(%rdx)
.L7:
	leal	7775(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L8
	movl	$1, 31100(%rdx)
.L8:
	leal	46655(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L9
	movl	$1, 186620(%rdx)
.L9:
	leal	8(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L10
	movl	$1, 32(%rdx)
.L10:
	leal	80(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L11
	movl	$1, 320(%rdx)
.L11:
	leal	728(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L12
	movl	$1, 2912(%rdx)
.L12:
	leal	6560(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L13
	movl	$1, 26240(%rdx)
.L13:
	addl	$59048, %ecx
	cmpl	$100000, %ecx
	ja	.L2
	addq	$1, %rax
	addq	$4, %rdx
	movl	$1, 236188(%rdx)
	cmpq	$100002, %rax
	jne	.L15
.L25:
	movl	$400004, %edx
	movq	%rbx, %rsi
	movq	%r15, %rdi
	call	memcpy@PLT
	movl	16(%rsp,%rbp,4), %eax
	testl	%eax, %eax
	je	.L16
	xorl	%eax, %eax
	movl	%r12d, %edx
	movq	%r14, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	800040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$800056, %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
.L26:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```
```c
#include<stdio.h>
int main(){
  int n,x[20]={},d[100001]={},e[100001]={},i,j,t,k,r=0;
  scanf("%d",&n);
  for(t=1,k=0;t<100001;t*=6){x[k]=t;k++;}for(t=9;t<100001;t*=9){x[k]=t;k++;}
  d[0]=1;
  while(1){
    r++;
    for(i=0;i<100001;i++)e[i]=0;
    for(i=0;i<100001;i++)if(d[i])for(j=0;j<k;j++)if(i+x[j]<100001)e[i+x[j]]=1;
    for(i=0;i<100001;i++)d[i]=e[i];
    if(d[n]){printf("%d",r);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 main(){
  int n,x[20]={},d[100001]={},e[100001]={},i,j,t,k,r=0;
  scanf("%d",&n);
  for(t=1,k=0;t<100001;t*=6){x[k]=t;k++;}for(t=9;t<100001;t*=9){x[k]=t;k++;}
  d[0]=1;
  while(1){
    r++;
    for(i=0;i<100001;i++)e[i]=0;
    for(i=0;i<100001;i++)if(d[i])for(j=0;j<k;j++)if(i+x[j]<100001)e[i+x[j]]=1;
    for(i=0;i<100001;i++)d[i]=e[i];
    if(d[n]){printf("%d",r);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:

1
 66223
 181

1 9 5
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 main(){
  int n,x[20]={},d[100001]={},e[100001]={},i,j,t,k,r=0;
  scanf("%d",&n);
  for(t=1,k=0;t<100001;t*=6){x[k]=t;k++;}for(t=9;t<100001;t*=9){x[k]=t;k++;}
  d[0]=1;
  while(1){
    r++;
    for(i=0;i<100001;i++)e[i]=0;
    for(i=0;i<100001;i++)if(d[i])for(j=0;j<k;j++)if(i+x[j]<100001)e[i+x[j]]=1;
    for(i=0;i<100001;i++)d[i]=e[i];
    if(d[n]){printf("%d",r);return 0;}
  }
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.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
	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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798776
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1336, %rsp
	.cfi_def_cfa_offset 800112
	movl	$400004, %edx
	xorl	%esi, %esi
	leaq	.LC0(%rip), %r14
	xorl	%r12d, %r12d
	movq	%fs:40, %rax
	movq	%rax, 800040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r15
	leaq	400032(%rsp), %rbx
	movq	%r15, %rdi
	leaq	400036(%rsp), %r13
	call	memset@PLT
	leaq	12(%rsp), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	$1, 16(%rsp)
	movslq	12(%rsp), %rbp
.L16:
	movl	$400004, %edx
	xorl	%esi, %esi
	movq	%rbx, %rdi
	addl	$1, %r12d
	call	memset@PLT
	movq	%r13, %rdx
	movl	$1, %eax
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L2:
	addq	$1, %rax
	addq	$4, %rdx
	cmpq	$100002, %rax
	je	.L25
.L15:
	movl	-4(%r15,%rax,4), %ecx
	testl	%ecx, %ecx
	je	.L2
	cmpq	$100001, %rax
	je	.L3
	movl	$1, (%rdx)
.L3:
	leal	5(%rax), %esi
	movl	%eax, %ecx
	cmpl	$100000, %esi
	ja	.L4
	movl	$1, 20(%rdx)
.L4:
	leal	35(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L5
	movl	$1, 140(%rdx)
.L5:
	leal	215(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L6
	movl	$1, 860(%rdx)
.L6:
	leal	1295(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L7
	movl	$1, 5180(%rdx)
.L7:
	leal	7775(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L8
	movl	$1, 31100(%rdx)
.L8:
	leal	46655(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L9
	movl	$1, 186620(%rdx)
.L9:
	leal	8(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L10
	movl	$1, 32(%rdx)
.L10:
	leal	80(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L11
	movl	$1, 320(%rdx)
.L11:
	leal	728(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L12
	movl	$1, 2912(%rdx)
.L12:
	leal	6560(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L13
	movl	$1, 26240(%rdx)
.L13:
	addl	$59048, %ecx
	cmpl	$100000, %ecx
	ja	.L2
	addq	$1, %rax
	addq	$4, %rdx
	movl	$1, 236188(%rdx)
	cmpq	$100002, %rax
	jne	.L15
.L25:
	movl	$400004, %edx
	movq	%rbx, %rsi
	movq	%r15, %rdi
	call	memcpy@PLT
	movl	16(%rsp,%rbp,4), %eax
	testl	%eax, %eax
	je	.L16
	xorl	%eax, %eax
	movl	%r12d, %edx
	movq	%r14, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	800040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$800056, %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
.L26:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

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
.LC0:
	.string	"%d"
	.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
	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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798776
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1336, %rsp
	.cfi_def_cfa_offset 800112
	movl	$400004, %edx
	xorl	%esi, %esi
	leaq	.LC0(%rip), %r14
	xorl	%r12d, %r12d
	movq	%fs:40, %rax
	movq	%rax, 800040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r15
	leaq	400032(%rsp), %rbx
	movq	%r15, %rdi
	leaq	400036(%rsp), %r13
	call	memset@PLT
	leaq	12(%rsp), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	$1, 16(%rsp)
	movslq	12(%rsp), %rbp
.L16:
	movl	$400004, %edx
	xorl	%esi, %esi
	movq	%rbx, %rdi
	addl	$1, %r12d
	call	memset@PLT
	movq	%r13, %rdx
	movl	$1, %eax
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L2:
	addq	$1, %rax
	addq	$4, %rdx
	cmpq	$100002, %rax
	je	.L25
.L15:
	movl	-4(%r15,%rax,4), %ecx
	testl	%ecx, %ecx
	je	.L2
	cmpq	$100001, %rax
	je	.L3
	movl	$1, (%rdx)
.L3:
	leal	5(%rax), %esi
	movl	%eax, %ecx
	cmpl	$100000, %esi
	ja	.L4
	movl	$1, 20(%rdx)
.L4:
	leal	35(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L5
	movl	$1, 140(%rdx)
.L5:
	leal	215(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L6
	movl	$1, 860(%rdx)
.L6:
	leal	1295(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L7
	movl	$1, 5180(%rdx)
.L7:
	leal	7775(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L8
	movl	$1, 31100(%rdx)
.L8:
	leal	46655(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L9
	movl	$1, 186620(%rdx)
.L9:
	leal	8(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L10
	movl	$1, 32(%rdx)
.L10:
	leal	80(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L11
	movl	$1, 320(%rdx)
.L11:
	leal	728(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L12
	movl	$1, 2912(%rdx)
.L12:
	leal	6560(%rcx), %esi
	cmpl	$100000, %esi
	ja	.L13
	movl	$1, 26240(%rdx)
.L13:
	addl	$59048, %ecx
	cmpl	$100000, %ecx
	ja	.L2
	addq	$1, %rax
	addq	$4, %rdx
	movl	$1, 236188(%rdx)
	cmpq	$100002, %rax
	jne	.L15
.L25:
	movl	$400004, %edx
	movq	%rbx, %rsi
	movq	%r15, %rdi
	call	memcpy@PLT
	movl	16(%rsp,%rbp,4), %eax
	testl	%eax, %eax
	je	.L16
	xorl	%eax, %eax
	movl	%r12d, %edx
	movq	%r14, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	800040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$800056, %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
.L26:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```