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>
#include<stdlib.h>
#include<math.h>
#define M 32769

int main(void){

  int i,j;
  int n;
  char a[M];
  int count;

  // a = (char *)malloc(sizeof(char)*M);

  for(i=2;i<M;i++)a[i] = 1;
  a[0]=0;
  a[1]=0;

  i=2;
  while(i<M){
    for(j=2*i;j<M;j+=i)a[j] = 0;
    while(!a[++i]);
  }

  while(1){
    scanf("%d",&n);
    if(n==0)break;
    count = 0;

    for(i=1;i<=n/2;i++)if(a[i] && a[n-i])count++;

    printf("%d\n",count);
  }

  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-32768(%rsp), %r11
	.cfi_def_cfa 11, 32808
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$40, %rsp
	.cfi_def_cfa_offset 32848
	movl	$32767, %edx
	movl	$1, %esi
	movq	%fs:40, %rax
	movq	%rax, 32792(%rsp)
	xorl	%eax, %eax
	leaq	18(%rsp), %rbx
	movq	%rbx, %rdi
	call	memset@PLT
	xorl	%eax, %eax
	movl	$2, %edx
	leaq	15(%rsp), %rcx
	movw	%ax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L5:
	leal	(%rdx,%rdx), %eax
	cmpl	$32768, %eax
	jg	.L2
	movslq	%edx, %rdi
	cltq
	leaq	16(%rsp), %rsi
	.p2align 4,,10
	.p2align 3
.L3:
	movb	$0, (%rsi,%rax)
	addq	%rdi, %rax
	cmpl	$32768, %eax
	jle	.L3
.L2:
	addl	$1, %edx
	movslq	%edx, %rax
	.p2align 4,,10
	.p2align 3
.L4:
	movl	%eax, %edx
	addq	$1, %rax
	cmpb	$0, (%rcx,%rax)
	je	.L4
	cmpl	$32768, %edx
	jle	.L5
	leaq	12(%rsp), %r12
	leaq	.LC0(%rip), %rbp
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	testl	%edx, %edx
	je	.L6
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	cmpl	$1, %edx
	jle	.L13
	cmpl	$3, %edx
	jle	.L13
	subl	$2, %eax
	xorl	%r8d, %r8d
	leal	-2(%rdx,%rbx), %esi
	leaq	19(%rsp,%rax), %rcx
	movq	%rbx, %rax
	.p2align 4,,10
	.p2align 3
.L10:
	cmpb	$0, (%rax)
	je	.L9
	movl	%esi, %edx
	subl	%eax, %edx
	movslq	%edx, %rdx
	cmpb	$1, 16(%rsp,%rdx)
	sbbl	$-1, %r8d
.L9:
	addq	$1, %rax
	cmpq	%rcx, %rax
	jne	.L10
.L7:
	movl	%r8d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L13:
	xorl	%r8d, %r8d
	jmp	.L7
.L6:
	movq	32792(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$32808, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L21:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-32768(%rsp), %r11
	.cfi_def_cfa 11, 32808
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$40, %rsp
	.cfi_def_cfa_offset 32848
	movl	$32767, %edx
	movl	$1, %esi
	movq	%fs:40, %rax
	movq	%rax, 32792(%rsp)
	xorl	%eax, %eax
	leaq	18(%rsp), %rbx
	movq	%rbx, %rdi
	call	memset@PLT
	xorl	%eax, %eax
	movl	$2, %edx
	leaq	15(%rsp), %rcx
	movw	%ax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L5:
	leal	(%rdx,%rdx), %eax
	cmpl	$32768, %eax
	jg	.L2
	movslq	%edx, %rdi
	cltq
	leaq	16(%rsp), %rsi
	.p2align 4,,10
	.p2align 3
.L3:
	movb	$0, (%rsi,%rax)
	addq	%rdi, %rax
	cmpl	$32768, %eax
	jle	.L3
.L2:
	addl	$1, %edx
	movslq	%edx, %rax
	.p2align 4,,10
	.p2align 3
.L4:
	movl	%eax, %edx
	addq	$1, %rax
	cmpb	$0, (%rcx,%rax)
	je	.L4
	cmpl	$32768, %edx
	jle	.L5
	leaq	12(%rsp), %r12
	leaq	.LC0(%rip), %rbp
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	testl	%edx, %edx
	je	.L6
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	cmpl	$1, %edx
	jle	.L13
	cmpl	$3, %edx
	jle	.L13
	subl	$2, %eax
	xorl	%r8d, %r8d
	leal	-2(%rdx,%rbx), %esi
	leaq	19(%rsp,%rax), %rcx
	movq	%rbx, %rax
	.p2align 4,,10
	.p2align 3
.L10:
	cmpb	$0, (%rax)
	je	.L9
	movl	%esi, %edx
	subl	%eax, %edx
	movslq	%edx, %rdx
	cmpb	$1, 16(%rsp,%rdx)
	sbbl	$-1, %r8d
.L9:
	addq	$1, %rax
	cmpq	%rcx, %rax
	jne	.L10
.L7:
	movl	%r8d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L13:
	xorl	%r8d, %r8d
	jmp	.L7
.L6:
	movq	32792(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$32808, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L21:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-32768(%rsp), %r11
	.cfi_def_cfa 11, 32808
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$40, %rsp
	.cfi_def_cfa_offset 32848
	movl	$32767, %edx
	movl	$1, %esi
	movq	%fs:40, %rax
	movq	%rax, 32792(%rsp)
	xorl	%eax, %eax
	leaq	18(%rsp), %rbx
	movq	%rbx, %rdi
	call	memset@PLT
	xorl	%eax, %eax
	movl	$2, %edx
	leaq	15(%rsp), %rcx
	movw	%ax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L5:
	leal	(%rdx,%rdx), %eax
	cmpl	$32768, %eax
	jg	.L2
	movslq	%edx, %rdi
	cltq
	leaq	16(%rsp), %rsi
	.p2align 4,,10
	.p2align 3
.L3:
	movb	$0, (%rsi,%rax)
	addq	%rdi, %rax
	cmpl	$32768, %eax
	jle	.L3
.L2:
	addl	$1, %edx
	movslq	%edx, %rax
	.p2align 4,,10
	.p2align 3
.L4:
	movl	%eax, %edx
	addq	$1, %rax
	cmpb	$0, (%rcx,%rax)
	je	.L4
	cmpl	$32768, %edx
	jle	.L5
	leaq	12(%rsp), %r12
	leaq	.LC0(%rip), %rbp
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	testl	%edx, %edx
	je	.L6
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	cmpl	$1, %edx
	jle	.L13
	cmpl	$3, %edx
	jle	.L13
	subl	$2, %eax
	xorl	%r8d, %r8d
	leal	-2(%rdx,%rbx), %esi
	leaq	19(%rsp,%rax), %rcx
	movq	%rbx, %rax
	.p2align 4,,10
	.p2align 3
.L10:
	cmpb	$0, (%rax)
	je	.L9
	movl	%esi, %edx
	subl	%eax, %edx
	movslq	%edx, %rdx
	cmpb	$1, 16(%rsp,%rdx)
	sbbl	$-1, %r8d
.L9:
	addq	$1, %rax
	cmpq	%rcx, %rax
	jne	.L10
.L7:
	movl	%r8d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L13:
	xorl	%r8d, %r8d
	jmp	.L7
.L6:
	movq	32792(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$32808, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L21:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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>
#include<stdlib.h>
#include<math.h>
#define M 32769

int main(void){

  int i,j;
  int n;
  char a[M];
  int count;

  // a = (char *)malloc(sizeof(char)*M);

  for(i=2;i<M;i++)a[i] = 1;
  a[0]=0;
  a[1]=0;

  i=2;
  while(i<M){
    for(j=2*i;j<M;j+=i)a[j] = 0;
    while(!a[++i]);
  }

  while(1){
    scanf("%d",&n);
    if(n==0)break;
    count = 0;

    for(i=1;i<=n/2;i++)if(a[i] && a[n-i])count++;

    printf("%d\n",count);
  }

  return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#define M 32769

int main(void){

  int i,j;
  int n;
  char a[M];
  int count;

  // a = (char *)malloc(sizeof(char)*M);

  for(i=2;i<M;i++)a[i] = 1;
  a[0]=0;
  a[1]=0;

  i=2;
  while(i<M){
    for(j=2*i;j<M;j+=i)a[j] = 0;
    while(!a[++i]);
  }

  while(1){
    scanf("%d",&n);
    if(n==0)break;
    count = 0;

    for(i=1;i<=n/2;i++)if(a[i] && a[n-i])count++;

    printf("%d\n",count);
  }

  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:

6
1
12
0
 6
10
8
0
 6
4
12
0
 6
1
3
0
 6
4
2
0
 6
0
2
0
 6
4
0
0
 6
2
14
0
 6
1
0
0
 6
16
0
0

1
0
1
 1
2
1
 1
1
1
 1
0
0
 1
1
0
 1
 1
1
 1
0
2
 1
0
 1
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>
#include<stdlib.h>
#include<math.h>
#define M 32769

int main(void){

  int i,j;
  int n;
  char a[M];
  int count;

  // a = (char *)malloc(sizeof(char)*M);

  for(i=2;i<M;i++)a[i] = 1;
  a[0]=0;
  a[1]=0;

  i=2;
  while(i<M){
    for(j=2*i;j<M;j+=i)a[j] = 0;
    while(!a[++i]);
  }

  while(1){
    scanf("%d",&n);
    if(n==0)break;
    count = 0;

    for(i=1;i<=n/2;i++)if(a[i] && a[n-i])count++;

    printf("%d\n",count);
  }

  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-32768(%rsp), %r11
	.cfi_def_cfa 11, 32808
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$40, %rsp
	.cfi_def_cfa_offset 32848
	movl	$32767, %edx
	movl	$1, %esi
	movq	%fs:40, %rax
	movq	%rax, 32792(%rsp)
	xorl	%eax, %eax
	leaq	18(%rsp), %rbx
	movq	%rbx, %rdi
	call	memset@PLT
	xorl	%eax, %eax
	movl	$2, %edx
	leaq	15(%rsp), %rcx
	movw	%ax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L5:
	leal	(%rdx,%rdx), %eax
	cmpl	$32768, %eax
	jg	.L2
	movslq	%edx, %rdi
	cltq
	leaq	16(%rsp), %rsi
	.p2align 4,,10
	.p2align 3
.L3:
	movb	$0, (%rsi,%rax)
	addq	%rdi, %rax
	cmpl	$32768, %eax
	jle	.L3
.L2:
	addl	$1, %edx
	movslq	%edx, %rax
	.p2align 4,,10
	.p2align 3
.L4:
	movl	%eax, %edx
	addq	$1, %rax
	cmpb	$0, (%rcx,%rax)
	je	.L4
	cmpl	$32768, %edx
	jle	.L5
	leaq	12(%rsp), %r12
	leaq	.LC0(%rip), %rbp
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	testl	%edx, %edx
	je	.L6
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	cmpl	$1, %edx
	jle	.L13
	cmpl	$3, %edx
	jle	.L13
	subl	$2, %eax
	xorl	%r8d, %r8d
	leal	-2(%rdx,%rbx), %esi
	leaq	19(%rsp,%rax), %rcx
	movq	%rbx, %rax
	.p2align 4,,10
	.p2align 3
.L10:
	cmpb	$0, (%rax)
	je	.L9
	movl	%esi, %edx
	subl	%eax, %edx
	movslq	%edx, %rdx
	cmpb	$1, 16(%rsp,%rdx)
	sbbl	$-1, %r8d
.L9:
	addq	$1, %rax
	cmpq	%rcx, %rax
	jne	.L10
.L7:
	movl	%r8d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L13:
	xorl	%r8d, %r8d
	jmp	.L7
.L6:
	movq	32792(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$32808, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L21:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	-32768(%rsp), %r11
	.cfi_def_cfa 11, 32808
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$40, %rsp
	.cfi_def_cfa_offset 32848
	movl	$32767, %edx
	movl	$1, %esi
	movq	%fs:40, %rax
	movq	%rax, 32792(%rsp)
	xorl	%eax, %eax
	leaq	18(%rsp), %rbx
	movq	%rbx, %rdi
	call	memset@PLT
	xorl	%eax, %eax
	movl	$2, %edx
	leaq	15(%rsp), %rcx
	movw	%ax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L5:
	leal	(%rdx,%rdx), %eax
	cmpl	$32768, %eax
	jg	.L2
	movslq	%edx, %rdi
	cltq
	leaq	16(%rsp), %rsi
	.p2align 4,,10
	.p2align 3
.L3:
	movb	$0, (%rsi,%rax)
	addq	%rdi, %rax
	cmpl	$32768, %eax
	jle	.L3
.L2:
	addl	$1, %edx
	movslq	%edx, %rax
	.p2align 4,,10
	.p2align 3
.L4:
	movl	%eax, %edx
	addq	$1, %rax
	cmpb	$0, (%rcx,%rax)
	je	.L4
	cmpl	$32768, %edx
	jle	.L5
	leaq	12(%rsp), %r12
	leaq	.LC0(%rip), %rbp
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	testl	%edx, %edx
	je	.L6
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	cmpl	$1, %edx
	jle	.L13
	cmpl	$3, %edx
	jle	.L13
	subl	$2, %eax
	xorl	%r8d, %r8d
	leal	-2(%rdx,%rbx), %esi
	leaq	19(%rsp,%rax), %rcx
	movq	%rbx, %rax
	.p2align 4,,10
	.p2align 3
.L10:
	cmpb	$0, (%rax)
	je	.L9
	movl	%esi, %edx
	subl	%eax, %edx
	movslq	%edx, %rdx
	cmpb	$1, 16(%rsp,%rdx)
	sbbl	$-1, %r8d
.L9:
	addq	$1, %rax
	cmpq	%rcx, %rax
	jne	.L10
.L7:
	movl	%r8d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L13:
	xorl	%r8d, %r8d
	jmp	.L7
.L6:
	movq	32792(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$32808, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L21:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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:
```