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,m,i,j,cnt=0;
  scanf("%d",&n);
  int a[n];
  for(i=0; i<n; i++) scanf("%d",&a[i]);
  scanf("%d",&m);
  for(i=0; i<m; i++) {
    int x;
    scanf("%d",&x);
    int l=-1,r=n+1;
    while(l+1!=r) {
      int m=(l+r)/2;
      if(a[m]==x) {
    cnt++;
    break;
      }
      if(a[m]<x) l=m;
      else r=m;
    } 
  }
  printf("%d\n",cnt);
  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:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-68(%rbp), %rsi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	movq	%rbx, %rdi
	subq	$40, %rsp
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-68(%rbp), %rax
	movq	%rsp, %rsi
	movq	%rax, %rdx
	leaq	15(,%rax,4), %rax
	movq	%rax, %rcx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rcx
	cmpq	%rsi, %rsp
	je	.L3
.L24:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L24
.L3:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L25
.L4:
	movq	%rsp, %r14
	testl	%edx, %edx
	jle	.L5
	movq	%r14, %r13
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	addq	$4, %r13
	cmpl	%r12d, -68(%rbp)
	jg	.L6
.L5:
	leaq	-64(%rbp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	xorl	%r12d, %r12d
	call	__isoc99_scanf@PLT
	movl	-64(%rbp), %eax
	testl	%eax, %eax
	jle	.L7
	xorl	%r15d, %r15d
	leaq	-60(%rbp), %r13
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-68(%rbp), %eax
	movl	-60(%rbp), %r8d
	xorl	%edi, %edi
	movl	$-1, %ecx
	leal	1(%rax), %esi
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L12:
	leal	(%rsi,%rcx), %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	movslq	%eax, %rdx
	cmpl	%r8d, (%r14,%rdx,4)
	je	.L26
	jge	.L27
	movl	%eax, %ecx
	leal	1(%rax), %edi
.L11:
	cmpl	%edi, %esi
	jne	.L12
	addl	$1, %r15d
	cmpl	%r15d, -64(%rbp)
	jg	.L13
.L7:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L28
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L26:
	.cfi_restore_state
	addl	$1, %r12d
	addl	$1, %r15d
	cmpl	%r15d, -64(%rbp)
	jg	.L13
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L27:
	movl	%eax, %esi
	jmp	.L11
.L25:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L4
.L28:
	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"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-68(%rbp), %rsi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	movq	%rbx, %rdi
	subq	$40, %rsp
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-68(%rbp), %rax
	movq	%rsp, %rsi
	movq	%rax, %rdx
	leaq	15(,%rax,4), %rax
	movq	%rax, %rcx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rcx
	cmpq	%rsi, %rsp
	je	.L3
.L24:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L24
.L3:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L25
.L4:
	movq	%rsp, %r14
	testl	%edx, %edx
	jle	.L5
	movq	%r14, %r13
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	addq	$4, %r13
	cmpl	%r12d, -68(%rbp)
	jg	.L6
.L5:
	leaq	-64(%rbp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	xorl	%r12d, %r12d
	call	__isoc99_scanf@PLT
	movl	-64(%rbp), %eax
	testl	%eax, %eax
	jle	.L7
	xorl	%r15d, %r15d
	leaq	-60(%rbp), %r13
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-68(%rbp), %eax
	movl	-60(%rbp), %r8d
	xorl	%edi, %edi
	movl	$-1, %ecx
	leal	1(%rax), %esi
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L12:
	leal	(%rsi,%rcx), %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	movslq	%eax, %rdx
	cmpl	%r8d, (%r14,%rdx,4)
	je	.L26
	jge	.L27
	movl	%eax, %ecx
	leal	1(%rax), %edi
.L11:
	cmpl	%edi, %esi
	jne	.L12
	addl	$1, %r15d
	cmpl	%r15d, -64(%rbp)
	jg	.L13
.L7:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L28
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L26:
	.cfi_restore_state
	addl	$1, %r12d
	addl	$1, %r15d
	cmpl	%r15d, -64(%rbp)
	jg	.L13
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L27:
	movl	%eax, %esi
	jmp	.L11
.L25:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L4
.L28:
	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"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-68(%rbp), %rsi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	movq	%rbx, %rdi
	subq	$40, %rsp
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-68(%rbp), %rax
	movq	%rsp, %rsi
	movq	%rax, %rdx
	leaq	15(,%rax,4), %rax
	movq	%rax, %rcx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rcx
	cmpq	%rsi, %rsp
	je	.L3
.L24:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L24
.L3:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L25
.L4:
	movq	%rsp, %r14
	testl	%edx, %edx
	jle	.L5
	movq	%r14, %r13
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	addq	$4, %r13
	cmpl	%r12d, -68(%rbp)
	jg	.L6
.L5:
	leaq	-64(%rbp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	xorl	%r12d, %r12d
	call	__isoc99_scanf@PLT
	movl	-64(%rbp), %eax
	testl	%eax, %eax
	jle	.L7
	xorl	%r15d, %r15d
	leaq	-60(%rbp), %r13
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-68(%rbp), %eax
	movl	-60(%rbp), %r8d
	xorl	%edi, %edi
	movl	$-1, %ecx
	leal	1(%rax), %esi
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L12:
	leal	(%rsi,%rcx), %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	movslq	%eax, %rdx
	cmpl	%r8d, (%r14,%rdx,4)
	je	.L26
	jge	.L27
	movl	%eax, %ecx
	leal	1(%rax), %edi
.L11:
	cmpl	%edi, %esi
	jne	.L12
	addl	$1, %r15d
	cmpl	%r15d, -64(%rbp)
	jg	.L13
.L7:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L28
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L26:
	.cfi_restore_state
	addl	$1, %r12d
	addl	$1, %r15d
	cmpl	%r15d, -64(%rbp)
	jg	.L13
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L27:
	movl	%eax, %esi
	jmp	.L11
.L25:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L4
.L28:
	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,m,i,j,cnt=0;
  scanf("%d",&n);
  int a[n];
  for(i=0; i<n; i++) scanf("%d",&a[i]);
  scanf("%d",&m);
  for(i=0; i<m; i++) {
    int x;
    scanf("%d",&x);
    int l=-1,r=n+1;
    while(l+1!=r) {
      int m=(l+r)/2;
      if(a[m]==x) {
    cnt++;
    break;
      }
      if(a[m]<x) l=m;
      else r=m;
    } 
  }
  printf("%d\n",cnt);
  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,m,i,j,cnt=0;
  scanf("%d",&n);
  int a[n];
  for(i=0; i<n; i++) scanf("%d",&a[i]);
  scanf("%d",&m);
  for(i=0; i<m; i++) {
    int x;
    scanf("%d",&x);
    int l=-1,r=n+1;
    while(l+1!=r) {
      int m=(l+r)/2;
      if(a[m]==x) {
    cnt++;
    break;
      }
      if(a[m]<x) l=m;
      else r=m;
    } 
  }
  printf("%d\n",cnt);
  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 0 2 2 3
2
1 2
 3
2 2 3
1
5
 5
1 0 4 2 3
2
1 1
 5
1 2 3 4 1
5
2 4 1
 5
1 2 3 4 5
3
1 4 1
 5
1 0 4 2 3
2
1 2
 3
1 2 3
1
4
 5
1 4 3 4 5
3
1 4 1
 3
1 2 4
1
4
 5
1 4 3 4 6
3
1 4 1

2
 0
 2
 4
 3
 1
 0
 3
 1
 3

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,m,i,j,cnt=0;
  scanf("%d",&n);
  int a[n];
  for(i=0; i<n; i++) scanf("%d",&a[i]);
  scanf("%d",&m);
  for(i=0; i<m; i++) {
    int x;
    scanf("%d",&x);
    int l=-1,r=n+1;
    while(l+1!=r) {
      int m=(l+r)/2;
      if(a[m]==x) {
    cnt++;
    break;
      }
      if(a[m]<x) l=m;
      else r=m;
    } 
  }
  printf("%d\n",cnt);
  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:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-68(%rbp), %rsi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	movq	%rbx, %rdi
	subq	$40, %rsp
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-68(%rbp), %rax
	movq	%rsp, %rsi
	movq	%rax, %rdx
	leaq	15(,%rax,4), %rax
	movq	%rax, %rcx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rcx
	cmpq	%rsi, %rsp
	je	.L3
.L24:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L24
.L3:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L25
.L4:
	movq	%rsp, %r14
	testl	%edx, %edx
	jle	.L5
	movq	%r14, %r13
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	addq	$4, %r13
	cmpl	%r12d, -68(%rbp)
	jg	.L6
.L5:
	leaq	-64(%rbp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	xorl	%r12d, %r12d
	call	__isoc99_scanf@PLT
	movl	-64(%rbp), %eax
	testl	%eax, %eax
	jle	.L7
	xorl	%r15d, %r15d
	leaq	-60(%rbp), %r13
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-68(%rbp), %eax
	movl	-60(%rbp), %r8d
	xorl	%edi, %edi
	movl	$-1, %ecx
	leal	1(%rax), %esi
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L12:
	leal	(%rsi,%rcx), %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	movslq	%eax, %rdx
	cmpl	%r8d, (%r14,%rdx,4)
	je	.L26
	jge	.L27
	movl	%eax, %ecx
	leal	1(%rax), %edi
.L11:
	cmpl	%edi, %esi
	jne	.L12
	addl	$1, %r15d
	cmpl	%r15d, -64(%rbp)
	jg	.L13
.L7:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L28
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L26:
	.cfi_restore_state
	addl	$1, %r12d
	addl	$1, %r15d
	cmpl	%r15d, -64(%rbp)
	jg	.L13
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L27:
	movl	%eax, %esi
	jmp	.L11
.L25:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L4
.L28:
	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"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-68(%rbp), %rsi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	movq	%rbx, %rdi
	subq	$40, %rsp
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-68(%rbp), %rax
	movq	%rsp, %rsi
	movq	%rax, %rdx
	leaq	15(,%rax,4), %rax
	movq	%rax, %rcx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rcx
	cmpq	%rsi, %rsp
	je	.L3
.L24:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L24
.L3:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L25
.L4:
	movq	%rsp, %r14
	testl	%edx, %edx
	jle	.L5
	movq	%r14, %r13
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	addq	$4, %r13
	cmpl	%r12d, -68(%rbp)
	jg	.L6
.L5:
	leaq	-64(%rbp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	xorl	%r12d, %r12d
	call	__isoc99_scanf@PLT
	movl	-64(%rbp), %eax
	testl	%eax, %eax
	jle	.L7
	xorl	%r15d, %r15d
	leaq	-60(%rbp), %r13
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-68(%rbp), %eax
	movl	-60(%rbp), %r8d
	xorl	%edi, %edi
	movl	$-1, %ecx
	leal	1(%rax), %esi
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L12:
	leal	(%rsi,%rcx), %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	movslq	%eax, %rdx
	cmpl	%r8d, (%r14,%rdx,4)
	je	.L26
	jge	.L27
	movl	%eax, %ecx
	leal	1(%rax), %edi
.L11:
	cmpl	%edi, %esi
	jne	.L12
	addl	$1, %r15d
	cmpl	%r15d, -64(%rbp)
	jg	.L13
.L7:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L28
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L26:
	.cfi_restore_state
	addl	$1, %r12d
	addl	$1, %r15d
	cmpl	%r15d, -64(%rbp)
	jg	.L13
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L27:
	movl	%eax, %esi
	jmp	.L11
.L25:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L4
.L28:
	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:
```