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>
#define CARDS_MAX 5000

short a,b,A[CARDS_MAX],B[CARDS_MAX];

int main(void){
	int i,j,k,m,n,t;
	scanf("%hd%hd",&a,&b);
	i = 0;
	while(i<a)scanf("%hd",A+i++);
	i = 0;
	while(i<b)scanf("%hd",B+i++);	
	i = 0;
	m = 0;
	while(i < b){
		n = 0;
		j = 0;
		k = i;
		while(j < a){
			if(A[j] == B[k])k++,n++;
			j++;
		}
		if(m < n)m = n;
		i++;
	}
	printf("%d\n",m);
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%hd%hd"
.LC1:
	.string	"%hd"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xorl	%eax, %eax
	leaq	b(%rip), %rdx
	leaq	a(%rip), %rsi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	call	__isoc99_scanf@PLT
	cmpw	$0, a(%rip)
	jle	.L2
	leaq	A(%rip), %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movswl	a(%rip), %eax
	addq	$2, %rbp
	cmpl	%ebx, %eax
	jg	.L3
.L2:
	cmpw	$0, b(%rip)
	jle	.L4
	leaq	B(%rip), %rbx
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r13
	movq	%rbx, %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movswl	b(%rip), %r10d
	addq	$2, %r12
	cmpl	%ebp, %r10d
	jg	.L5
	testl	%r10d, %r10d
	jle	.L4
	movswl	a(%rip), %eax
	leaq	A(%rip), %rbp
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	leal	-1(%rax), %edx
	movl	%eax, %r11d
	leaq	2(%rbp), %rax
	leaq	(%rax,%rdx,2), %rdi
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%rbp, %rax
	movl	%r8d, %ecx
	xorl	%esi, %esi
	testw	%r11w, %r11w
	jle	.L10
	.p2align 4,,10
	.p2align 3
.L8:
	movslq	%ecx, %rdx
	movzwl	(%rax), %r12d
	cmpw	%r12w, (%rbx,%rdx,2)
	jne	.L7
	addl	$1, %ecx
	addl	$1, %esi
.L7:
	addq	$2, %rax
	cmpq	%rax, %rdi
	jne	.L8
.L10:
	cmpl	%esi, %r9d
	cmovl	%esi, %r9d
	addl	$1, %r8d
	cmpl	%r8d, %r10d
	jne	.L6
.L9:
	movl	%r9d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$8, %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
.L4:
	.cfi_restore_state
	xorl	%r9d, %r9d
	jmp	.L9
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	B
	.bss
	.align 32
	.type	B, @object
	.size	B, 10000
B:
	.zero	10000
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 10000
A:
	.zero	10000
	.globl	b
	.align 2
	.type	b, @object
	.size	b, 2
b:
	.zero	2
	.globl	a
	.align 2
	.type	a, @object
	.size	a, 2
a:
	.zero	2
	.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	"%hd%hd"
.LC1:
	.string	"%hd"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xorl	%eax, %eax
	leaq	b(%rip), %rdx
	leaq	a(%rip), %rsi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	call	__isoc99_scanf@PLT
	cmpw	$0, a(%rip)
	jle	.L2
	leaq	A(%rip), %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movswl	a(%rip), %eax
	addq	$2, %rbp
	cmpl	%ebx, %eax
	jg	.L3
.L2:
	cmpw	$0, b(%rip)
	jle	.L4
	leaq	B(%rip), %rbx
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r13
	movq	%rbx, %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movswl	b(%rip), %r10d
	addq	$2, %r12
	cmpl	%ebp, %r10d
	jg	.L5
	testl	%r10d, %r10d
	jle	.L4
	movswl	a(%rip), %eax
	leaq	A(%rip), %rbp
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	leal	-1(%rax), %edx
	movl	%eax, %r11d
	leaq	2(%rbp), %rax
	leaq	(%rax,%rdx,2), %rdi
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%rbp, %rax
	movl	%r8d, %ecx
	xorl	%esi, %esi
	testw	%r11w, %r11w
	jle	.L10
	.p2align 4,,10
	.p2align 3
.L8:
	movslq	%ecx, %rdx
	movzwl	(%rax), %r12d
	cmpw	%r12w, (%rbx,%rdx,2)
	jne	.L7
	addl	$1, %ecx
	addl	$1, %esi
.L7:
	addq	$2, %rax
	cmpq	%rax, %rdi
	jne	.L8
.L10:
	cmpl	%esi, %r9d
	cmovl	%esi, %r9d
	addl	$1, %r8d
	cmpl	%r8d, %r10d
	jne	.L6
.L9:
	movl	%r9d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$8, %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
.L4:
	.cfi_restore_state
	xorl	%r9d, %r9d
	jmp	.L9
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	B
	.bss
	.align 32
	.type	B, @object
	.size	B, 10000
B:
	.zero	10000
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 10000
A:
	.zero	10000
	.globl	b
	.align 2
	.type	b, @object
	.size	b, 2
b:
	.zero	2
	.globl	a
	.align 2
	.type	a, @object
	.size	a, 2
a:
	.zero	2
	.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	"%hd%hd"
.LC1:
	.string	"%hd"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xorl	%eax, %eax
	leaq	b(%rip), %rdx
	leaq	a(%rip), %rsi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	call	__isoc99_scanf@PLT
	cmpw	$0, a(%rip)
	jle	.L2
	leaq	A(%rip), %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movswl	a(%rip), %eax
	addq	$2, %rbp
	cmpl	%ebx, %eax
	jg	.L3
.L2:
	cmpw	$0, b(%rip)
	jle	.L4
	leaq	B(%rip), %rbx
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r13
	movq	%rbx, %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movswl	b(%rip), %r10d
	addq	$2, %r12
	cmpl	%ebp, %r10d
	jg	.L5
	testl	%r10d, %r10d
	jle	.L4
	movswl	a(%rip), %eax
	leaq	A(%rip), %rbp
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	leal	-1(%rax), %edx
	movl	%eax, %r11d
	leaq	2(%rbp), %rax
	leaq	(%rax,%rdx,2), %rdi
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%rbp, %rax
	movl	%r8d, %ecx
	xorl	%esi, %esi
	testw	%r11w, %r11w
	jle	.L10
	.p2align 4,,10
	.p2align 3
.L8:
	movslq	%ecx, %rdx
	movzwl	(%rax), %r12d
	cmpw	%r12w, (%rbx,%rdx,2)
	jne	.L7
	addl	$1, %ecx
	addl	$1, %esi
.L7:
	addq	$2, %rax
	cmpq	%rax, %rdi
	jne	.L8
.L10:
	cmpl	%esi, %r9d
	cmovl	%esi, %r9d
	addl	$1, %r8d
	cmpl	%r8d, %r10d
	jne	.L6
.L9:
	movl	%r9d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$8, %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
.L4:
	.cfi_restore_state
	xorl	%r9d, %r9d
	jmp	.L9
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	B
	.bss
	.align 32
	.type	B, @object
	.size	B, 10000
B:
	.zero	10000
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 10000
A:
	.zero	10000
	.globl	b
	.align 2
	.type	b, @object
	.size	b, 2
b:
	.zero	2
	.globl	a
	.align 2
	.type	a, @object
	.size	a, 2
a:
	.zero	2
	.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>
#define CARDS_MAX 5000

short a,b,A[CARDS_MAX],B[CARDS_MAX];

int main(void){
	int i,j,k,m,n,t;
	scanf("%hd%hd",&a,&b);
	i = 0;
	while(i<a)scanf("%hd",A+i++);
	i = 0;
	while(i<b)scanf("%hd",B+i++);	
	i = 0;
	m = 0;
	while(i < b){
		n = 0;
		j = 0;
		k = i;
		while(j < a){
			if(A[j] == B[k])k++,n++;
			j++;
		}
		if(m < n)m = n;
		i++;
	}
	printf("%d\n",m);
	return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#define CARDS_MAX 5000

short a,b,A[CARDS_MAX],B[CARDS_MAX];

int main(void){
	int i,j,k,m,n,t;
	scanf("%hd%hd",&a,&b);
	i = 0;
	while(i<a)scanf("%hd",A+i++);
	i = 0;
	while(i<b)scanf("%hd",B+i++);	
	i = 0;
	m = 0;
	while(i < b){
		n = 0;
		j = 0;
		k = i;
		while(j < a){
			if(A[j] == B[k])k++,n++;
			j++;
		}
		if(m < n)m = n;
		i++;
	}
	printf("%d\n",m);
	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 4
1 2 3 4 5
3 1 4 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>
#define CARDS_MAX 5000

short a,b,A[CARDS_MAX],B[CARDS_MAX];

int main(void){
	int i,j,k,m,n,t;
	scanf("%hd%hd",&a,&b);
	i = 0;
	while(i<a)scanf("%hd",A+i++);
	i = 0;
	while(i<b)scanf("%hd",B+i++);	
	i = 0;
	m = 0;
	while(i < b){
		n = 0;
		j = 0;
		k = i;
		while(j < a){
			if(A[j] == B[k])k++,n++;
			j++;
		}
		if(m < n)m = n;
		i++;
	}
	printf("%d\n",m);
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%hd%hd"
.LC1:
	.string	"%hd"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xorl	%eax, %eax
	leaq	b(%rip), %rdx
	leaq	a(%rip), %rsi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	call	__isoc99_scanf@PLT
	cmpw	$0, a(%rip)
	jle	.L2
	leaq	A(%rip), %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movswl	a(%rip), %eax
	addq	$2, %rbp
	cmpl	%ebx, %eax
	jg	.L3
.L2:
	cmpw	$0, b(%rip)
	jle	.L4
	leaq	B(%rip), %rbx
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r13
	movq	%rbx, %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movswl	b(%rip), %r10d
	addq	$2, %r12
	cmpl	%ebp, %r10d
	jg	.L5
	testl	%r10d, %r10d
	jle	.L4
	movswl	a(%rip), %eax
	leaq	A(%rip), %rbp
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	leal	-1(%rax), %edx
	movl	%eax, %r11d
	leaq	2(%rbp), %rax
	leaq	(%rax,%rdx,2), %rdi
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%rbp, %rax
	movl	%r8d, %ecx
	xorl	%esi, %esi
	testw	%r11w, %r11w
	jle	.L10
	.p2align 4,,10
	.p2align 3
.L8:
	movslq	%ecx, %rdx
	movzwl	(%rax), %r12d
	cmpw	%r12w, (%rbx,%rdx,2)
	jne	.L7
	addl	$1, %ecx
	addl	$1, %esi
.L7:
	addq	$2, %rax
	cmpq	%rax, %rdi
	jne	.L8
.L10:
	cmpl	%esi, %r9d
	cmovl	%esi, %r9d
	addl	$1, %r8d
	cmpl	%r8d, %r10d
	jne	.L6
.L9:
	movl	%r9d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$8, %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
.L4:
	.cfi_restore_state
	xorl	%r9d, %r9d
	jmp	.L9
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	B
	.bss
	.align 32
	.type	B, @object
	.size	B, 10000
B:
	.zero	10000
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 10000
A:
	.zero	10000
	.globl	b
	.align 2
	.type	b, @object
	.size	b, 2
b:
	.zero	2
	.globl	a
	.align 2
	.type	a, @object
	.size	a, 2
a:
	.zero	2
	.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	"%hd%hd"
.LC1:
	.string	"%hd"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xorl	%eax, %eax
	leaq	b(%rip), %rdx
	leaq	a(%rip), %rsi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	call	__isoc99_scanf@PLT
	cmpw	$0, a(%rip)
	jle	.L2
	leaq	A(%rip), %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movswl	a(%rip), %eax
	addq	$2, %rbp
	cmpl	%ebx, %eax
	jg	.L3
.L2:
	cmpw	$0, b(%rip)
	jle	.L4
	leaq	B(%rip), %rbx
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r13
	movq	%rbx, %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movswl	b(%rip), %r10d
	addq	$2, %r12
	cmpl	%ebp, %r10d
	jg	.L5
	testl	%r10d, %r10d
	jle	.L4
	movswl	a(%rip), %eax
	leaq	A(%rip), %rbp
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	leal	-1(%rax), %edx
	movl	%eax, %r11d
	leaq	2(%rbp), %rax
	leaq	(%rax,%rdx,2), %rdi
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%rbp, %rax
	movl	%r8d, %ecx
	xorl	%esi, %esi
	testw	%r11w, %r11w
	jle	.L10
	.p2align 4,,10
	.p2align 3
.L8:
	movslq	%ecx, %rdx
	movzwl	(%rax), %r12d
	cmpw	%r12w, (%rbx,%rdx,2)
	jne	.L7
	addl	$1, %ecx
	addl	$1, %esi
.L7:
	addq	$2, %rax
	cmpq	%rax, %rdi
	jne	.L8
.L10:
	cmpl	%esi, %r9d
	cmovl	%esi, %r9d
	addl	$1, %r8d
	cmpl	%r8d, %r10d
	jne	.L6
.L9:
	movl	%r9d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$8, %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
.L4:
	.cfi_restore_state
	xorl	%r9d, %r9d
	jmp	.L9
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	B
	.bss
	.align 32
	.type	B, @object
	.size	B, 10000
B:
	.zero	10000
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 10000
A:
	.zero	10000
	.globl	b
	.align 2
	.type	b, @object
	.size	b, 2
b:
	.zero	2
	.globl	a
	.align 2
	.type	a, @object
	.size	a, 2
a:
	.zero	2
	.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:
```