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 n,i,j,temp;
  while(1){

    int taro[201]={0};
    int hana[201]={0};
    int tc=0;
    int hc=0;

    scanf("%d",&n);

    if(n==0) break;

    for(i=0;i<n;i++){
      scanf("%d",&temp);
      taro[temp]=temp;
    }

    for(i=1;i<=2*n;i++){
      if(taro[i]==0)
	hana[i]=i;
    }

    int fl=0;//taroツづ個づつォ0ツ嘉板子ツづ個づつォ1

    while(1){
      for(i=1;i<=2*n;i++){
	if(taro[i]!=0 && fl==0){
	  //printf("t...%d %d\n",i,taro[i]);
	  taro[i]=0;
	  fl=1;
	  tc++;
	}
	else if(hana[i]!=0 && fl==1){
	  //printf("h...%d %d\n",i,hana[i]);
	  hana[i]=0;
	  fl=0;
	  hc++;
	}
	if(tc==n || hc==n) break;
      }
      if(tc==n || hc==n) break;
      if(fl) fl=0;
      else fl=1;
      //printf("f..%d\n",fl);
    }
    printf("%d\n%d\n",n-hc,n-tc);
  }
  return 0;
}


    ```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n%d\n"
	.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
	movl	$1, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$1672, %rsp
	.cfi_def_cfa_offset 1728
	movq	%fs:40, %rax
	movq	%rax, 1656(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	leaq	32(%rsp), %rbx
	movq	%rax, 8(%rsp)
	leaq	848(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L15:
	xorl	%eax, %eax
	movl	$100, %ecx
	movq	%rbx, %rdi
	movq	8(%rsp), %rsi
	rep stosq
	movl	$100, %ecx
	movl	$0, (%rdi)
	movq	%r14, %rdi
	rep stosq
	movl	$0, (%rdi)
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %edx
	testl	%edx, %edx
	je	.L2
	jle	.L3
	xorl	%r15d, %r15d
	leaq	28(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movslq	28(%rsp), %rdx
	movl	%edx, 32(%rsp,%rdx,4)
	movl	24(%rsp), %edx
	cmpl	%r15d, %edx
	jg	.L4
.L3:
	leal	(%rdx,%rdx), %r10d
	testl	%r10d, %r10d
	jle	.L5
	leal	1(%r10), %ecx
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L7:
	movl	(%rbx,%rax,4), %r15d
	testl	%r15d, %r15d
	jne	.L6
	movl	%eax, (%r14,%rax,4)
.L6:
	addq	$1, %rax
	cmpq	%rcx, %rax
	jne	.L7
.L5:
	leal	-1(%r10), %eax
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	xorl	%edi, %edi
	leaq	40(%rsp,%rax,4), %r9
	.p2align 4,,10
	.p2align 3
.L14:
	testl	%r10d, %r10d
	jle	.L8
	leaq	36(%rsp), %rax
	leaq	852(%rsp), %rcx
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L9:
	movl	(%rcx), %r11d
	testl	%r11d, %r11d
	je	.L10
	cmpl	$1, %esi
	jne	.L10
	movl	$0, (%rcx)
	addl	$1, %r8d
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L10:
	cmpl	%edi, %edx
	je	.L11
.L28:
	cmpl	%r8d, %edx
	je	.L11
	addq	$4, %rax
	addq	$4, %rcx
	cmpq	%r9, %rax
	je	.L13
.L12:
	movl	(%rax), %r12d
	testl	%r12d, %r12d
	je	.L9
	testb	$1, %sil
	jne	.L9
	addl	$1, %edi
	movl	$0, (%rax)
	movl	$1, %esi
	cmpl	%edi, %edx
	jne	.L28
	.p2align 4,,10
	.p2align 3
.L11:
	movl	%edx, %ecx
	leaq	.LC1(%rip), %rsi
	subl	%r8d, %edx
	xorl	%eax, %eax
	subl	%edi, %ecx
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L15
.L8:
	cmpl	%edi, %edx
	je	.L11
	cmpl	%r8d, %edx
	je	.L11
.L13:
	movl	%r13d, %eax
	subl	%esi, %eax
	movl	%eax, %esi
	jmp	.L14
.L2:
	movq	1656(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$1672, %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
.L29:
	.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"
.LC1:
	.string	"%d\n%d\n"
	.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
	movl	$1, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$1672, %rsp
	.cfi_def_cfa_offset 1728
	movq	%fs:40, %rax
	movq	%rax, 1656(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	leaq	32(%rsp), %rbx
	movq	%rax, 8(%rsp)
	leaq	848(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L15:
	xorl	%eax, %eax
	movl	$100, %ecx
	movq	%rbx, %rdi
	movq	8(%rsp), %rsi
	rep stosq
	movl	$100, %ecx
	movl	$0, (%rdi)
	movq	%r14, %rdi
	rep stosq
	movl	$0, (%rdi)
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %edx
	testl	%edx, %edx
	je	.L2
	jle	.L3
	xorl	%r15d, %r15d
	leaq	28(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movslq	28(%rsp), %rdx
	movl	%edx, 32(%rsp,%rdx,4)
	movl	24(%rsp), %edx
	cmpl	%r15d, %edx
	jg	.L4
.L3:
	leal	(%rdx,%rdx), %r10d
	testl	%r10d, %r10d
	jle	.L5
	leal	1(%r10), %ecx
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L7:
	movl	(%rbx,%rax,4), %r15d
	testl	%r15d, %r15d
	jne	.L6
	movl	%eax, (%r14,%rax,4)
.L6:
	addq	$1, %rax
	cmpq	%rcx, %rax
	jne	.L7
.L5:
	leal	-1(%r10), %eax
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	xorl	%edi, %edi
	leaq	40(%rsp,%rax,4), %r9
	.p2align 4,,10
	.p2align 3
.L14:
	testl	%r10d, %r10d
	jle	.L8
	leaq	36(%rsp), %rax
	leaq	852(%rsp), %rcx
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L9:
	movl	(%rcx), %r11d
	testl	%r11d, %r11d
	je	.L10
	cmpl	$1, %esi
	jne	.L10
	movl	$0, (%rcx)
	addl	$1, %r8d
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L10:
	cmpl	%edi, %edx
	je	.L11
.L28:
	cmpl	%r8d, %edx
	je	.L11
	addq	$4, %rax
	addq	$4, %rcx
	cmpq	%r9, %rax
	je	.L13
.L12:
	movl	(%rax), %r12d
	testl	%r12d, %r12d
	je	.L9
	testb	$1, %sil
	jne	.L9
	addl	$1, %edi
	movl	$0, (%rax)
	movl	$1, %esi
	cmpl	%edi, %edx
	jne	.L28
	.p2align 4,,10
	.p2align 3
.L11:
	movl	%edx, %ecx
	leaq	.LC1(%rip), %rsi
	subl	%r8d, %edx
	xorl	%eax, %eax
	subl	%edi, %ecx
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L15
.L8:
	cmpl	%edi, %edx
	je	.L11
	cmpl	%r8d, %edx
	je	.L11
.L13:
	movl	%r13d, %eax
	subl	%esi, %eax
	movl	%eax, %esi
	jmp	.L14
.L2:
	movq	1656(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$1672, %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
.L29:
	.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"
.LC1:
	.string	"%d\n%d\n"
	.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
	movl	$1, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$1672, %rsp
	.cfi_def_cfa_offset 1728
	movq	%fs:40, %rax
	movq	%rax, 1656(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	leaq	32(%rsp), %rbx
	movq	%rax, 8(%rsp)
	leaq	848(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L15:
	xorl	%eax, %eax
	movl	$100, %ecx
	movq	%rbx, %rdi
	movq	8(%rsp), %rsi
	rep stosq
	movl	$100, %ecx
	movl	$0, (%rdi)
	movq	%r14, %rdi
	rep stosq
	movl	$0, (%rdi)
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %edx
	testl	%edx, %edx
	je	.L2
	jle	.L3
	xorl	%r15d, %r15d
	leaq	28(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movslq	28(%rsp), %rdx
	movl	%edx, 32(%rsp,%rdx,4)
	movl	24(%rsp), %edx
	cmpl	%r15d, %edx
	jg	.L4
.L3:
	leal	(%rdx,%rdx), %r10d
	testl	%r10d, %r10d
	jle	.L5
	leal	1(%r10), %ecx
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L7:
	movl	(%rbx,%rax,4), %r15d
	testl	%r15d, %r15d
	jne	.L6
	movl	%eax, (%r14,%rax,4)
.L6:
	addq	$1, %rax
	cmpq	%rcx, %rax
	jne	.L7
.L5:
	leal	-1(%r10), %eax
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	xorl	%edi, %edi
	leaq	40(%rsp,%rax,4), %r9
	.p2align 4,,10
	.p2align 3
.L14:
	testl	%r10d, %r10d
	jle	.L8
	leaq	36(%rsp), %rax
	leaq	852(%rsp), %rcx
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L9:
	movl	(%rcx), %r11d
	testl	%r11d, %r11d
	je	.L10
	cmpl	$1, %esi
	jne	.L10
	movl	$0, (%rcx)
	addl	$1, %r8d
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L10:
	cmpl	%edi, %edx
	je	.L11
.L28:
	cmpl	%r8d, %edx
	je	.L11
	addq	$4, %rax
	addq	$4, %rcx
	cmpq	%r9, %rax
	je	.L13
.L12:
	movl	(%rax), %r12d
	testl	%r12d, %r12d
	je	.L9
	testb	$1, %sil
	jne	.L9
	addl	$1, %edi
	movl	$0, (%rax)
	movl	$1, %esi
	cmpl	%edi, %edx
	jne	.L28
	.p2align 4,,10
	.p2align 3
.L11:
	movl	%edx, %ecx
	leaq	.LC1(%rip), %rsi
	subl	%r8d, %edx
	xorl	%eax, %eax
	subl	%edi, %ecx
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L15
.L8:
	cmpl	%edi, %edx
	je	.L11
	cmpl	%r8d, %edx
	je	.L11
.L13:
	movl	%r13d, %eax
	subl	%esi, %eax
	movl	%eax, %esi
	jmp	.L14
.L2:
	movq	1656(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$1672, %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
.L29:
	.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>
main(){
  int n,i,j,temp;
  while(1){

    int taro[201]={0};
    int hana[201]={0};
    int tc=0;
    int hc=0;

    scanf("%d",&n);

    if(n==0) break;

    for(i=0;i<n;i++){
      scanf("%d",&temp);
      taro[temp]=temp;
    }

    for(i=1;i<=2*n;i++){
      if(taro[i]==0)
	hana[i]=i;
    }

    int fl=0;//taroツづ個づつォ0ツ嘉板子ツづ個づつォ1

    while(1){
      for(i=1;i<=2*n;i++){
	if(taro[i]!=0 && fl==0){
	  //printf("t...%d %d\n",i,taro[i]);
	  taro[i]=0;
	  fl=1;
	  tc++;
	}
	else if(hana[i]!=0 && fl==1){
	  //printf("h...%d %d\n",i,hana[i]);
	  hana[i]=0;
	  fl=0;
	  hc++;
	}
	if(tc==n || hc==n) break;
      }
      if(tc==n || hc==n) break;
      if(fl) fl=0;
      else fl=1;
      //printf("f..%d\n",fl);
    }
    printf("%d\n%d\n",n-hc,n-tc);
  }
  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 n,i,j,temp;
  while(1){

    int taro[201]={0};
    int hana[201]={0};
    int tc=0;
    int hc=0;

    scanf("%d",&n);

    if(n==0) break;

    for(i=0;i<n;i++){
      scanf("%d",&temp);
      taro[temp]=temp;
    }

    for(i=1;i<=2*n;i++){
      if(taro[i]==0)
	hana[i]=i;
    }

    int fl=0;//taroツづ個づつォ0ツ嘉板子ツづ個づつォ1

    while(1){
      for(i=1;i<=2*n;i++){
	if(taro[i]!=0 && fl==0){
	  //printf("t...%d %d\n",i,taro[i]);
	  taro[i]=0;
	  fl=1;
	  tc++;
	}
	else if(hana[i]!=0 && fl==1){
	  //printf("h...%d %d\n",i,hana[i]);
	  hana[i]=0;
	  fl=0;
	  hc++;
	}
	if(tc==n || hc==n) break;
      }
      if(tc==n || hc==n) break;
      if(fl) fl=0;
      else fl=1;
      //printf("f..%d\n",fl);
    }
    printf("%d\n%d\n",n-hc,n-tc);
  }
  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:

5
1
7
9
6
10
10
8
7
14
18
2
11
3
17
5
19
0
 5
1
7
9
6
5
10
8
7
14
18
4
11
6
17
5
19
0
 5
1
7
9
6
10
10
4
7
14
18
2
11
3
17
5
19
0
 5
1
7
9
6
5
10
8
7
13
18
1
11
6
17
5
19
0
 5
1
7
9
6
10
10
8
7
14
18
2
11
3
1
5
19
0
 5
1
2
9
6
10
10
8
7
14
18
4
11
6
17
5
19
0
 5
1
7
9
6
10
10
8
7
14
18
2
17
3
1
5
19
0
 5
2
7
9
6
8
10
8
7
14
18
2
17
3
1
5
19
0
 5
1
7
9
6
5
10
8
7
13
18
1
11
6
16
5
19
0
 5
1
7
9
6
4
10
10
7
13
18
1
11
12
17
5
19
0

3
0
1
0
 1
0
1
0
 3
0
2
0
 1
0
2
0
 3
0
0
2
 2
0
1
0
 3
0
0
1
 2
0
0
1
 1
0
0
1
 0
1
2
0

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 n,i,j,temp;
  while(1){

    int taro[201]={0};
    int hana[201]={0};
    int tc=0;
    int hc=0;

    scanf("%d",&n);

    if(n==0) break;

    for(i=0;i<n;i++){
      scanf("%d",&temp);
      taro[temp]=temp;
    }

    for(i=1;i<=2*n;i++){
      if(taro[i]==0)
	hana[i]=i;
    }

    int fl=0;//taroツづ個づつォ0ツ嘉板子ツづ個づつォ1

    while(1){
      for(i=1;i<=2*n;i++){
	if(taro[i]!=0 && fl==0){
	  //printf("t...%d %d\n",i,taro[i]);
	  taro[i]=0;
	  fl=1;
	  tc++;
	}
	else if(hana[i]!=0 && fl==1){
	  //printf("h...%d %d\n",i,hana[i]);
	  hana[i]=0;
	  fl=0;
	  hc++;
	}
	if(tc==n || hc==n) break;
      }
      if(tc==n || hc==n) break;
      if(fl) fl=0;
      else fl=1;
      //printf("f..%d\n",fl);
    }
    printf("%d\n%d\n",n-hc,n-tc);
  }
  return 0;
}


    ```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n%d\n"
	.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
	movl	$1, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$1672, %rsp
	.cfi_def_cfa_offset 1728
	movq	%fs:40, %rax
	movq	%rax, 1656(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	leaq	32(%rsp), %rbx
	movq	%rax, 8(%rsp)
	leaq	848(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L15:
	xorl	%eax, %eax
	movl	$100, %ecx
	movq	%rbx, %rdi
	movq	8(%rsp), %rsi
	rep stosq
	movl	$100, %ecx
	movl	$0, (%rdi)
	movq	%r14, %rdi
	rep stosq
	movl	$0, (%rdi)
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %edx
	testl	%edx, %edx
	je	.L2
	jle	.L3
	xorl	%r15d, %r15d
	leaq	28(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movslq	28(%rsp), %rdx
	movl	%edx, 32(%rsp,%rdx,4)
	movl	24(%rsp), %edx
	cmpl	%r15d, %edx
	jg	.L4
.L3:
	leal	(%rdx,%rdx), %r10d
	testl	%r10d, %r10d
	jle	.L5
	leal	1(%r10), %ecx
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L7:
	movl	(%rbx,%rax,4), %r15d
	testl	%r15d, %r15d
	jne	.L6
	movl	%eax, (%r14,%rax,4)
.L6:
	addq	$1, %rax
	cmpq	%rcx, %rax
	jne	.L7
.L5:
	leal	-1(%r10), %eax
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	xorl	%edi, %edi
	leaq	40(%rsp,%rax,4), %r9
	.p2align 4,,10
	.p2align 3
.L14:
	testl	%r10d, %r10d
	jle	.L8
	leaq	36(%rsp), %rax
	leaq	852(%rsp), %rcx
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L9:
	movl	(%rcx), %r11d
	testl	%r11d, %r11d
	je	.L10
	cmpl	$1, %esi
	jne	.L10
	movl	$0, (%rcx)
	addl	$1, %r8d
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L10:
	cmpl	%edi, %edx
	je	.L11
.L28:
	cmpl	%r8d, %edx
	je	.L11
	addq	$4, %rax
	addq	$4, %rcx
	cmpq	%r9, %rax
	je	.L13
.L12:
	movl	(%rax), %r12d
	testl	%r12d, %r12d
	je	.L9
	testb	$1, %sil
	jne	.L9
	addl	$1, %edi
	movl	$0, (%rax)
	movl	$1, %esi
	cmpl	%edi, %edx
	jne	.L28
	.p2align 4,,10
	.p2align 3
.L11:
	movl	%edx, %ecx
	leaq	.LC1(%rip), %rsi
	subl	%r8d, %edx
	xorl	%eax, %eax
	subl	%edi, %ecx
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L15
.L8:
	cmpl	%edi, %edx
	je	.L11
	cmpl	%r8d, %edx
	je	.L11
.L13:
	movl	%r13d, %eax
	subl	%esi, %eax
	movl	%eax, %esi
	jmp	.L14
.L2:
	movq	1656(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$1672, %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
.L29:
	.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"
.LC1:
	.string	"%d\n%d\n"
	.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
	movl	$1, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$1672, %rsp
	.cfi_def_cfa_offset 1728
	movq	%fs:40, %rax
	movq	%rax, 1656(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	leaq	32(%rsp), %rbx
	movq	%rax, 8(%rsp)
	leaq	848(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L15:
	xorl	%eax, %eax
	movl	$100, %ecx
	movq	%rbx, %rdi
	movq	8(%rsp), %rsi
	rep stosq
	movl	$100, %ecx
	movl	$0, (%rdi)
	movq	%r14, %rdi
	rep stosq
	movl	$0, (%rdi)
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %edx
	testl	%edx, %edx
	je	.L2
	jle	.L3
	xorl	%r15d, %r15d
	leaq	28(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movslq	28(%rsp), %rdx
	movl	%edx, 32(%rsp,%rdx,4)
	movl	24(%rsp), %edx
	cmpl	%r15d, %edx
	jg	.L4
.L3:
	leal	(%rdx,%rdx), %r10d
	testl	%r10d, %r10d
	jle	.L5
	leal	1(%r10), %ecx
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L7:
	movl	(%rbx,%rax,4), %r15d
	testl	%r15d, %r15d
	jne	.L6
	movl	%eax, (%r14,%rax,4)
.L6:
	addq	$1, %rax
	cmpq	%rcx, %rax
	jne	.L7
.L5:
	leal	-1(%r10), %eax
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	xorl	%edi, %edi
	leaq	40(%rsp,%rax,4), %r9
	.p2align 4,,10
	.p2align 3
.L14:
	testl	%r10d, %r10d
	jle	.L8
	leaq	36(%rsp), %rax
	leaq	852(%rsp), %rcx
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L9:
	movl	(%rcx), %r11d
	testl	%r11d, %r11d
	je	.L10
	cmpl	$1, %esi
	jne	.L10
	movl	$0, (%rcx)
	addl	$1, %r8d
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L10:
	cmpl	%edi, %edx
	je	.L11
.L28:
	cmpl	%r8d, %edx
	je	.L11
	addq	$4, %rax
	addq	$4, %rcx
	cmpq	%r9, %rax
	je	.L13
.L12:
	movl	(%rax), %r12d
	testl	%r12d, %r12d
	je	.L9
	testb	$1, %sil
	jne	.L9
	addl	$1, %edi
	movl	$0, (%rax)
	movl	$1, %esi
	cmpl	%edi, %edx
	jne	.L28
	.p2align 4,,10
	.p2align 3
.L11:
	movl	%edx, %ecx
	leaq	.LC1(%rip), %rsi
	subl	%r8d, %edx
	xorl	%eax, %eax
	subl	%edi, %ecx
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L15
.L8:
	cmpl	%edi, %edx
	je	.L11
	cmpl	%r8d, %edx
	je	.L11
.L13:
	movl	%r13d, %eax
	subl	%esi, %eax
	movl	%eax, %esi
	jmp	.L14
.L2:
	movq	1656(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$1672, %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
.L29:
	.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:
```