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 i,j,c,s,n,d[10010],M=100010;
  char p[100010]={1,1};
  for(i=2;i*i<M;i++){
    if(p[i])continue;
    for(j=i*i;j<M;j+=i)p[j]=1;
  }
  for(i=c=0;i<M;i++){
    if(p[i]==0)d[c++]=i;
  }
  while(scanf("%d",&n),n){
    for(i=c=0;d[i]<=n;i++){
      for(j=s=0;s<n;j++)s+=d[i+j];
      if(s==n)c++;
    }
    printf("%d\n",c);
  }
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-139264(%rsp), %r11
	.cfi_def_cfa 11, 139296
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$832, %rsp
	.cfi_def_cfa_offset 140128
	movl	$99994, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 140088(%rsp)
	xorl	%eax, %eax
	leaq	40080(%rsp), %rdi
	movq	$257, 40064(%rsp)
	movq	$0, 40072(%rsp)
	call	memset@PLT
	movl	$2, %edx
	movl	$4, %eax
	leaq	40064(%rsp), %rcx
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	leal	1(%rsi), %eax
	addq	$1, %rdx
	imull	%eax, %eax
	cmpl	$100009, %eax
	jg	.L23
.L4:
	cmpb	$0, (%rcx,%rdx)
	movl	%edx, %esi
	jne	.L2
	cltq
	.p2align 4,,10
	.p2align 3
.L3:
	movb	$1, (%rcx,%rax)
	addq	%rdx, %rax
	cmpl	$100009, %eax
	jle	.L3
	jmp	.L2
.L23:
	xorl	%eax, %eax
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L6:
	cmpb	$0, (%rcx,%rax)
	jne	.L5
	movslq	%edx, %rsi
	addl	$1, %edx
	movl	%eax, 16(%rsp,%rsi,4)
.L5:
	addq	$1, %rax
	cmpq	$100010, %rax
	jne	.L6
	leaq	12(%rsp), %rbp
	leaq	.LC1(%rip), %rbx
	leaq	.LC0(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	testl	%ecx, %ecx
	je	.L11
	cmpl	%ecx, 16(%rsp)
	jg	.L15
	leaq	16(%rsp), %rsi
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L12:
	movq	%rsi, %rdx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jle	.L9
	.p2align 4,,10
	.p2align 3
.L8:
	addl	(%rdx), %eax
	addq	$4, %rdx
	cmpl	%eax, %ecx
	jg	.L8
	sete	%al
	movzbl	%al, %eax
	addl	%eax, %r8d
.L9:
	addq	$4, %rsi
	cmpl	%ecx, (%rsi)
	jle	.L12
.L10:
	movl	%r8d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L7
.L11:
	movq	140088(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L24
	addq	$140096, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L15:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L10
.L24:
	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\n"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-139264(%rsp), %r11
	.cfi_def_cfa 11, 139296
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$832, %rsp
	.cfi_def_cfa_offset 140128
	movl	$99994, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 140088(%rsp)
	xorl	%eax, %eax
	leaq	40080(%rsp), %rdi
	movq	$257, 40064(%rsp)
	movq	$0, 40072(%rsp)
	call	memset@PLT
	movl	$2, %edx
	movl	$4, %eax
	leaq	40064(%rsp), %rcx
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	leal	1(%rsi), %eax
	addq	$1, %rdx
	imull	%eax, %eax
	cmpl	$100009, %eax
	jg	.L23
.L4:
	cmpb	$0, (%rcx,%rdx)
	movl	%edx, %esi
	jne	.L2
	cltq
	.p2align 4,,10
	.p2align 3
.L3:
	movb	$1, (%rcx,%rax)
	addq	%rdx, %rax
	cmpl	$100009, %eax
	jle	.L3
	jmp	.L2
.L23:
	xorl	%eax, %eax
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L6:
	cmpb	$0, (%rcx,%rax)
	jne	.L5
	movslq	%edx, %rsi
	addl	$1, %edx
	movl	%eax, 16(%rsp,%rsi,4)
.L5:
	addq	$1, %rax
	cmpq	$100010, %rax
	jne	.L6
	leaq	12(%rsp), %rbp
	leaq	.LC1(%rip), %rbx
	leaq	.LC0(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	testl	%ecx, %ecx
	je	.L11
	cmpl	%ecx, 16(%rsp)
	jg	.L15
	leaq	16(%rsp), %rsi
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L12:
	movq	%rsi, %rdx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jle	.L9
	.p2align 4,,10
	.p2align 3
.L8:
	addl	(%rdx), %eax
	addq	$4, %rdx
	cmpl	%eax, %ecx
	jg	.L8
	sete	%al
	movzbl	%al, %eax
	addl	%eax, %r8d
.L9:
	addq	$4, %rsi
	cmpl	%ecx, (%rsi)
	jle	.L12
.L10:
	movl	%r8d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L7
.L11:
	movq	140088(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L24
	addq	$140096, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L15:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L10
.L24:
	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\n"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-139264(%rsp), %r11
	.cfi_def_cfa 11, 139296
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$832, %rsp
	.cfi_def_cfa_offset 140128
	movl	$99994, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 140088(%rsp)
	xorl	%eax, %eax
	leaq	40080(%rsp), %rdi
	movq	$257, 40064(%rsp)
	movq	$0, 40072(%rsp)
	call	memset@PLT
	movl	$2, %edx
	movl	$4, %eax
	leaq	40064(%rsp), %rcx
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	leal	1(%rsi), %eax
	addq	$1, %rdx
	imull	%eax, %eax
	cmpl	$100009, %eax
	jg	.L23
.L4:
	cmpb	$0, (%rcx,%rdx)
	movl	%edx, %esi
	jne	.L2
	cltq
	.p2align 4,,10
	.p2align 3
.L3:
	movb	$1, (%rcx,%rax)
	addq	%rdx, %rax
	cmpl	$100009, %eax
	jle	.L3
	jmp	.L2
.L23:
	xorl	%eax, %eax
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L6:
	cmpb	$0, (%rcx,%rax)
	jne	.L5
	movslq	%edx, %rsi
	addl	$1, %edx
	movl	%eax, 16(%rsp,%rsi,4)
.L5:
	addq	$1, %rax
	cmpq	$100010, %rax
	jne	.L6
	leaq	12(%rsp), %rbp
	leaq	.LC1(%rip), %rbx
	leaq	.LC0(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	testl	%ecx, %ecx
	je	.L11
	cmpl	%ecx, 16(%rsp)
	jg	.L15
	leaq	16(%rsp), %rsi
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L12:
	movq	%rsi, %rdx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jle	.L9
	.p2align 4,,10
	.p2align 3
.L8:
	addl	(%rdx), %eax
	addq	$4, %rdx
	cmpl	%eax, %ecx
	jg	.L8
	sete	%al
	movzbl	%al, %eax
	addl	%eax, %r8d
.L9:
	addq	$4, %rsi
	cmpl	%ecx, (%rsi)
	jle	.L12
.L10:
	movl	%r8d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L7
.L11:
	movq	140088(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L24
	addq	$140096, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L15:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L10
.L24:
	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 i,j,c,s,n,d[10010],M=100010;
  char p[100010]={1,1};
  for(i=2;i*i<M;i++){
    if(p[i])continue;
    for(j=i*i;j<M;j+=i)p[j]=1;
  }
  for(i=c=0;i<M;i++){
    if(p[i]==0)d[c++]=i;
  }
  while(scanf("%d",&n),n){
    for(i=c=0;d[i]<=n;i++){
      for(j=s=0;s<n;j++)s+=d[i+j];
      if(s==n)c++;
    }
    printf("%d\n",c);
  }
  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 i,j,c,s,n,d[10010],M=100010;
  char p[100010]={1,1};
  for(i=2;i*i<M;i++){
    if(p[i])continue;
    for(j=i*i;j<M;j+=i)p[j]=1;
  }
  for(i=c=0;i<M;i++){
    if(p[i]==0)d[c++]=i;
  }
  while(scanf("%d",&n),n){
    for(i=c=0;d[i]<=n;i++){
      for(j=s=0;s<n;j++)s+=d[i+j];
      if(s==n)c++;
    }
    printf("%d\n",c);
  }
  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:

2
3
17
41
20
666
24
53
0
 2
3
17
41
20
666
24
56
0
 2
3
17
41
20
666
24
20
0
 2
3
17
41
20
666
46
53
0
 2
3
17
70
20
666
24
56
0
 2
3
17
34
20
666
24
20
0
 2
6
17
34
20
666
24
20
0
 2
3
2
41
20
666
46
53
0
 2
6
17
34
20
666
24
17
0
 2
3
2
41
20
1171
46
53
0

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

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 i,j,c,s,n,d[10010],M=100010;
  char p[100010]={1,1};
  for(i=2;i*i<M;i++){
    if(p[i])continue;
    for(j=i*i;j<M;j+=i)p[j]=1;
  }
  for(i=c=0;i<M;i++){
    if(p[i]==0)d[c++]=i;
  }
  while(scanf("%d",&n),n){
    for(i=c=0;d[i]<=n;i++){
      for(j=s=0;s<n;j++)s+=d[i+j];
      if(s==n)c++;
    }
    printf("%d\n",c);
  }
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-139264(%rsp), %r11
	.cfi_def_cfa 11, 139296
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$832, %rsp
	.cfi_def_cfa_offset 140128
	movl	$99994, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 140088(%rsp)
	xorl	%eax, %eax
	leaq	40080(%rsp), %rdi
	movq	$257, 40064(%rsp)
	movq	$0, 40072(%rsp)
	call	memset@PLT
	movl	$2, %edx
	movl	$4, %eax
	leaq	40064(%rsp), %rcx
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	leal	1(%rsi), %eax
	addq	$1, %rdx
	imull	%eax, %eax
	cmpl	$100009, %eax
	jg	.L23
.L4:
	cmpb	$0, (%rcx,%rdx)
	movl	%edx, %esi
	jne	.L2
	cltq
	.p2align 4,,10
	.p2align 3
.L3:
	movb	$1, (%rcx,%rax)
	addq	%rdx, %rax
	cmpl	$100009, %eax
	jle	.L3
	jmp	.L2
.L23:
	xorl	%eax, %eax
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L6:
	cmpb	$0, (%rcx,%rax)
	jne	.L5
	movslq	%edx, %rsi
	addl	$1, %edx
	movl	%eax, 16(%rsp,%rsi,4)
.L5:
	addq	$1, %rax
	cmpq	$100010, %rax
	jne	.L6
	leaq	12(%rsp), %rbp
	leaq	.LC1(%rip), %rbx
	leaq	.LC0(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	testl	%ecx, %ecx
	je	.L11
	cmpl	%ecx, 16(%rsp)
	jg	.L15
	leaq	16(%rsp), %rsi
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L12:
	movq	%rsi, %rdx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jle	.L9
	.p2align 4,,10
	.p2align 3
.L8:
	addl	(%rdx), %eax
	addq	$4, %rdx
	cmpl	%eax, %ecx
	jg	.L8
	sete	%al
	movzbl	%al, %eax
	addl	%eax, %r8d
.L9:
	addq	$4, %rsi
	cmpl	%ecx, (%rsi)
	jle	.L12
.L10:
	movl	%r8d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L7
.L11:
	movq	140088(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L24
	addq	$140096, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L15:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L10
.L24:
	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\n"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-139264(%rsp), %r11
	.cfi_def_cfa 11, 139296
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$832, %rsp
	.cfi_def_cfa_offset 140128
	movl	$99994, %edx
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 140088(%rsp)
	xorl	%eax, %eax
	leaq	40080(%rsp), %rdi
	movq	$257, 40064(%rsp)
	movq	$0, 40072(%rsp)
	call	memset@PLT
	movl	$2, %edx
	movl	$4, %eax
	leaq	40064(%rsp), %rcx
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	leal	1(%rsi), %eax
	addq	$1, %rdx
	imull	%eax, %eax
	cmpl	$100009, %eax
	jg	.L23
.L4:
	cmpb	$0, (%rcx,%rdx)
	movl	%edx, %esi
	jne	.L2
	cltq
	.p2align 4,,10
	.p2align 3
.L3:
	movb	$1, (%rcx,%rax)
	addq	%rdx, %rax
	cmpl	$100009, %eax
	jle	.L3
	jmp	.L2
.L23:
	xorl	%eax, %eax
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L6:
	cmpb	$0, (%rcx,%rax)
	jne	.L5
	movslq	%edx, %rsi
	addl	$1, %edx
	movl	%eax, 16(%rsp,%rsi,4)
.L5:
	addq	$1, %rax
	cmpq	$100010, %rax
	jne	.L6
	leaq	12(%rsp), %rbp
	leaq	.LC1(%rip), %rbx
	leaq	.LC0(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	testl	%ecx, %ecx
	je	.L11
	cmpl	%ecx, 16(%rsp)
	jg	.L15
	leaq	16(%rsp), %rsi
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L12:
	movq	%rsi, %rdx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jle	.L9
	.p2align 4,,10
	.p2align 3
.L8:
	addl	(%rdx), %eax
	addq	$4, %rdx
	cmpl	%eax, %ecx
	jg	.L8
	sete	%al
	movzbl	%al, %eax
	addl	%eax, %r8d
.L9:
	addq	$4, %rsi
	cmpl	%ecx, (%rsi)
	jle	.L12
.L10:
	movl	%r8d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L7
.L11:
	movq	140088(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L24
	addq	$140096, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L15:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L10
.L24:
	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:
```