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

```c
#include <stdio.h>
#include <string.h>
char a[200];
int main()
{
  int n,i,j,t,h;
  for(;;){
    scanf("%d",&n);
    if(n==0) break;
    memset(a,0,sizeof(a));
    for(i=0;i<n;i++){
      scanf("%d",&j);
      a[j-1] = 1;
    }
    i=0;
    j=1;
    t=h=n;
    for(;;){
      for(;i<n*2;i++){
	if(a[i] == j){
	  if(j==1){
	    if(--t == 0) break;
	    j = 0;
	  }else{
	    if(--h == 0) break;
	    j = 1;
	  }
	  a[i] = -1;
	}
      }
      if(t == 0 || h == 0) break;
      if(i==n*2){
	i = 0;
	j = (j==1)?0:1;
      }
    }
    printf("%d\n%d\n",h,t);
  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 200
a:
	.zero	200
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L17:
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %eax
	testl	%eax, %eax
	je	.L21
	movl	$200, %edx
	movl	$0, %esi
	leaq	a(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -20(%rbp)
	jmp	.L4
.L5:
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	a(%rip), %rdx
	movb	$1, (%rax,%rdx)
	addl	$1, -20(%rbp)
.L4:
	movl	-28(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L5
	movl	$0, -20(%rbp)
	movl	$1, -24(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L6
.L13:
	movl	-20(%rbp), %eax
	cltq
	leaq	a(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %edx
	movl	-24(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L7
	movl	-24(%rbp), %eax
	cmpl	$1, %eax
	jne	.L8
	subl	$1, -16(%rbp)
	cmpl	$0, -16(%rbp)
	je	.L22
	movl	$0, -24(%rbp)
	jmp	.L11
.L8:
	subl	$1, -12(%rbp)
	cmpl	$0, -12(%rbp)
	je	.L23
	movl	$1, -24(%rbp)
.L11:
	movl	-20(%rbp), %eax
	cltq
	leaq	a(%rip), %rdx
	movb	$-1, (%rax,%rdx)
.L7:
	addl	$1, -20(%rbp)
.L6:
	movl	-28(%rbp), %eax
	addl	%eax, %eax
	cmpl	%eax, -20(%rbp)
	jl	.L13
	jmp	.L10
.L22:
	nop
	jmp	.L10
.L23:
	nop
.L10:
	cmpl	$0, -16(%rbp)
	je	.L14
	cmpl	$0, -12(%rbp)
	je	.L14
	movl	-28(%rbp), %eax
	addl	%eax, %eax
	cmpl	%eax, -20(%rbp)
	jne	.L6
	movl	$0, -20(%rbp)
	movl	-24(%rbp), %eax
	cmpl	$1, %eax
	setne	%al
	movzbl	%al, %eax
	movl	%eax, -24(%rbp)
	jmp	.L6
.L14:
	movl	-16(%rbp), %edx
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L17
.L21:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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
	.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:
.LFB35:
	.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	.LC1(%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	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	a(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %r13
	.p2align 4,,10
	.p2align 3
.L16:
	movq	%r13, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	(%rsp), %r8d
	testl	%r8d, %r8d
	je	.L2
	movl	$25, %ecx
	movl	$0, %eax
	movq	%rbx, %rdi
	rep stosq
	jle	.L3
	xorl	%r15d, %r15d
	leaq	4(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	movl	(%rsp), %r8d
	subl	$1, %eax
	cltq
	movb	$1, (%rbx,%rax)
	cmpl	%r15d, %r8d
	jg	.L4
.L3:
	movl	$1, 4(%rsp)
	movl	%r8d, %r9d
	xorl	%r10d, %r10d
	xorl	%eax, %eax
	leal	(%r8,%r8), %edx
	movl	$1, %ecx
	.p2align 4,,10
	.p2align 3
.L5:
	cmpl	%eax, %edx
	jg	.L12
.L33:
	testl	%r8d, %r8d
	je	.L13
	testl	%r9d, %r9d
	je	.L13
	cmpl	%eax, %edx
	jne	.L5
	xorl	%eax, %eax
	xorl	$1, %ecx
	movl	$1, %r10d
	cmpl	%eax, %edx
	jle	.L33
	.p2align 4,,10
	.p2align 3
.L12:
	movslq	%eax, %rsi
	movsbl	(%rbx,%rsi), %edi
	cmpl	%ecx, %edi
	je	.L34
.L6:
	addl	$1, %eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L34:
	cmpl	$1, %ecx
	je	.L35
	subl	$1, %r9d
	jne	.L19
.L13:
	testb	%r10b, %r10b
	je	.L10
	movl	%ecx, 4(%rsp)
.L10:
	movl	%r8d, %ecx
	movl	%r9d, %edx
	movq	%r14, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L35:
	subl	$1, %r8d
	jne	.L18
	testb	%r10b, %r10b
	je	.L10
	movl	$1, 4(%rsp)
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L19:
	movl	$1, %ecx
.L8:
	movb	$-1, (%rbx,%rsi)
	movl	$1, %r10d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L18:
	xorl	%ecx, %ecx
	jmp	.L8
.L2:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L36
	addq	$24, %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
.L36:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 200
a:
	.zero	200
	.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
	.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:
.LFB35:
	.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	.LC1(%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	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	a(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %r13
	.p2align 4,,10
	.p2align 3
.L16:
	movq	%r13, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	(%rsp), %r8d
	testl	%r8d, %r8d
	je	.L2
	movl	$25, %ecx
	movl	$0, %eax
	movq	%rbx, %rdi
	rep stosq
	jle	.L3
	xorl	%r15d, %r15d
	leaq	4(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	movl	(%rsp), %r8d
	subl	$1, %eax
	cltq
	movb	$1, (%rbx,%rax)
	cmpl	%r15d, %r8d
	jg	.L4
.L3:
	movl	$1, 4(%rsp)
	movl	%r8d, %r9d
	xorl	%r10d, %r10d
	xorl	%eax, %eax
	leal	(%r8,%r8), %edx
	movl	$1, %ecx
	.p2align 4,,10
	.p2align 3
.L5:
	cmpl	%eax, %edx
	jg	.L12
.L33:
	testl	%r8d, %r8d
	je	.L13
	testl	%r9d, %r9d
	je	.L13
	cmpl	%eax, %edx
	jne	.L5
	xorl	%eax, %eax
	xorl	$1, %ecx
	movl	$1, %r10d
	cmpl	%eax, %edx
	jle	.L33
	.p2align 4,,10
	.p2align 3
.L12:
	movslq	%eax, %rsi
	movsbl	(%rbx,%rsi), %edi
	cmpl	%ecx, %edi
	je	.L34
.L6:
	addl	$1, %eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L34:
	cmpl	$1, %ecx
	je	.L35
	subl	$1, %r9d
	jne	.L19
.L13:
	testb	%r10b, %r10b
	je	.L10
	movl	%ecx, 4(%rsp)
.L10:
	movl	%r8d, %ecx
	movl	%r9d, %edx
	movq	%r14, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L35:
	subl	$1, %r8d
	jne	.L18
	testb	%r10b, %r10b
	je	.L10
	movl	$1, 4(%rsp)
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L19:
	movl	$1, %ecx
.L8:
	movb	$-1, (%rbx,%rsi)
	movl	$1, %r10d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L18:
	xorl	%ecx, %ecx
	jmp	.L8
.L2:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L36
	addq	$24, %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
.L36:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 200
a:
	.zero	200
	.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 <stdio.h>
#include <string.h>
char a[200];
int main()
{
  int n,i,j,t,h;
  for(;;){
    scanf("%d",&n);
    if(n==0) break;
    memset(a,0,sizeof(a));
    for(i=0;i<n;i++){
      scanf("%d",&j);
      a[j-1] = 1;
    }
    i=0;
    j=1;
    t=h=n;
    for(;;){
      for(;i<n*2;i++){
	if(a[i] == j){
	  if(j==1){
	    if(--t == 0) break;
	    j = 0;
	  }else{
	    if(--h == 0) break;
	    j = 1;
	  }
	  a[i] = -1;
	}
      }
      if(t == 0 || h == 0) break;
      if(i==n*2){
	i = 0;
	j = (j==1)?0:1;
      }
    }
    printf("%d\n%d\n",h,t);
  }
  return 0;
}
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 unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <string.h>
char a[200];
int main()
{
  int n,i,j,t,h;
  for(;;){
    scanf("%d",&n);
    if(n==0) break;
    memset(a,0,sizeof(a));
    for(i=0;i<n;i++){
      scanf("%d",&j);
      a[j-1] = 1;
    }
    i=0;
    j=1;
    t=h=n;
    for(;;){
      for(;i<n*2;i++){
	if(a[i] == j){
	  if(j==1){
	    if(--t == 0) break;
	    j = 0;
	  }else{
	    if(--h == 0) break;
	    j = 1;
	  }
	  a[i] = -1;
	}
      }
      if(t == 0 || h == 0) break;
      if(i==n*2){
	i = 0;
	j = (j==1)?0:1;
      }
    }
    printf("%d\n%d\n",h,t);
  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 200
a:
	.zero	200
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L17:
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %eax
	testl	%eax, %eax
	je	.L21
	movl	$200, %edx
	movl	$0, %esi
	leaq	a(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -20(%rbp)
	jmp	.L4
.L5:
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	a(%rip), %rdx
	movb	$1, (%rax,%rdx)
	addl	$1, -20(%rbp)
.L4:
	movl	-28(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L5
	movl	$0, -20(%rbp)
	movl	$1, -24(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L6
.L13:
	movl	-20(%rbp), %eax
	cltq
	leaq	a(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %edx
	movl	-24(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L7
	movl	-24(%rbp), %eax
	cmpl	$1, %eax
	jne	.L8
	subl	$1, -16(%rbp)
	cmpl	$0, -16(%rbp)
	je	.L22
	movl	$0, -24(%rbp)
	jmp	.L11
.L8:
	subl	$1, -12(%rbp)
	cmpl	$0, -12(%rbp)
	je	.L23
	movl	$1, -24(%rbp)
.L11:
	movl	-20(%rbp), %eax
	cltq
	leaq	a(%rip), %rdx
	movb	$-1, (%rax,%rdx)
.L7:
	addl	$1, -20(%rbp)
.L6:
	movl	-28(%rbp), %eax
	addl	%eax, %eax
	cmpl	%eax, -20(%rbp)
	jl	.L13
	jmp	.L10
.L22:
	nop
	jmp	.L10
.L23:
	nop
.L10:
	cmpl	$0, -16(%rbp)
	je	.L14
	cmpl	$0, -12(%rbp)
	je	.L14
	movl	-28(%rbp), %eax
	addl	%eax, %eax
	cmpl	%eax, -20(%rbp)
	jne	.L6
	movl	$0, -20(%rbp)
	movl	-24(%rbp), %eax
	cmpl	$1, %eax
	setne	%al
	movzbl	%al, %eax
	movl	%eax, -24(%rbp)
	jmp	.L6
.L14:
	movl	-16(%rbp), %edx
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L17
.L21:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 200
a:
	.zero	200
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L17:
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %eax
	testl	%eax, %eax
	je	.L21
	movl	$200, %edx
	movl	$0, %esi
	leaq	a(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -20(%rbp)
	jmp	.L4
.L5:
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	a(%rip), %rdx
	movb	$1, (%rax,%rdx)
	addl	$1, -20(%rbp)
.L4:
	movl	-28(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L5
	movl	$0, -20(%rbp)
	movl	$1, -24(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L6
.L13:
	movl	-20(%rbp), %eax
	cltq
	leaq	a(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %edx
	movl	-24(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L7
	movl	-24(%rbp), %eax
	cmpl	$1, %eax
	jne	.L8
	subl	$1, -16(%rbp)
	cmpl	$0, -16(%rbp)
	je	.L22
	movl	$0, -24(%rbp)
	jmp	.L11
.L8:
	subl	$1, -12(%rbp)
	cmpl	$0, -12(%rbp)
	je	.L23
	movl	$1, -24(%rbp)
.L11:
	movl	-20(%rbp), %eax
	cltq
	leaq	a(%rip), %rdx
	movb	$-1, (%rax,%rdx)
.L7:
	addl	$1, -20(%rbp)
.L6:
	movl	-28(%rbp), %eax
	addl	%eax, %eax
	cmpl	%eax, -20(%rbp)
	jl	.L13
	jmp	.L10
.L22:
	nop
	jmp	.L10
.L23:
	nop
.L10:
	cmpl	$0, -16(%rbp)
	je	.L14
	cmpl	$0, -12(%rbp)
	je	.L14
	movl	-28(%rbp), %eax
	addl	%eax, %eax
	cmpl	%eax, -20(%rbp)
	jne	.L6
	movl	$0, -20(%rbp)
	movl	-24(%rbp), %eax
	cmpl	$1, %eax
	setne	%al
	movzbl	%al, %eax
	movl	%eax, -24(%rbp)
	jmp	.L6
.L14:
	movl	-16(%rbp), %edx
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L17
.L21:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
