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<string.h>
 
int main(void) {
	int n, m;
	int p;
	char s[2];
 
	scanf("%d%d", &n, &m);
	int ac[100000] = { 0 }, wa[100000] = { 0 };
	for (int i = 0; i < m; i++) {
		scanf("%d%s", &p, s);
		if (!strcmp(s, "AC"))
			ac[p]++;
		else if (ac[p] <= 0)
			wa[p]++;
	}
 
	int correct = 0, failed = 0;
	for (int i = 1; i <= n; i++) {
		if (ac[i] > 0) {
			correct++;
			if (wa[i] > 0)
				failed += wa[i];
		}
	}
 
	printf("%d %d", correct, failed);
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d%s"
.LC2:
	.string	"%d %d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.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
	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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798776
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1320, %rsp
	.cfi_def_cfa_offset 800096
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 800024(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	leaq	16(%rsp), %rbp
	leaq	400016(%rsp), %r14
	call	__isoc99_scanf@PLT
	movl	$400000, %edx
	xorl	%esi, %esi
	movq	%rbp, %rdi
	call	memset@PLT
	xorl	%esi, %esi
	movl	$400000, %edx
	movq	%r14, %rdi
	call	memset@PLT
	movl	8(%rsp), %esi
	testl	%esi, %esi
	jle	.L2
	xorl	%ebx, %ebx
	leaq	800022(%rsp), %r15
	leaq	12(%rsp), %r13
	leaq	.LC1(%rip), %r12
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	addl	$1, %ebx
	cmpl	%ebx, 8(%rsp)
	jle	.L2
.L4:
	movq	%r15, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rax
	movl	16(%rsp,%rax,4), %ecx
	testl	%ecx, %ecx
	jg	.L3
	addl	$1, 400016(%rsp,%rax,4)
	addl	$1, %ebx
	cmpl	%ebx, 8(%rsp)
	jg	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L9
	leal	1(%rax), %edi
	xorl	%ecx, %ecx
	movl	$1, %eax
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L7:
	movl	0(%rbp,%rax,4), %edx
	testl	%edx, %edx
	jle	.L6
	movl	(%r14,%rax,4), %edx
	addl	$1, %r8d
	leal	(%rcx,%rdx), %esi
	testl	%edx, %edx
	cmovg	%esi, %ecx
.L6:
	addq	$1, %rax
	cmpq	%rax, %rdi
	jne	.L7
.L5:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	800024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$800040, %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
.L9:
	.cfi_restore_state
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	jmp	.L5
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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%d"
.LC1:
	.string	"%d%s"
.LC2:
	.string	"%d %d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.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
	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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798776
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1320, %rsp
	.cfi_def_cfa_offset 800096
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 800024(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	leaq	16(%rsp), %rbp
	leaq	400016(%rsp), %r14
	call	__isoc99_scanf@PLT
	movl	$400000, %edx
	xorl	%esi, %esi
	movq	%rbp, %rdi
	call	memset@PLT
	xorl	%esi, %esi
	movl	$400000, %edx
	movq	%r14, %rdi
	call	memset@PLT
	movl	8(%rsp), %esi
	testl	%esi, %esi
	jle	.L2
	xorl	%ebx, %ebx
	leaq	800022(%rsp), %r15
	leaq	12(%rsp), %r13
	leaq	.LC1(%rip), %r12
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	addl	$1, %ebx
	cmpl	%ebx, 8(%rsp)
	jle	.L2
.L4:
	movq	%r15, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rax
	movl	16(%rsp,%rax,4), %ecx
	testl	%ecx, %ecx
	jg	.L3
	addl	$1, 400016(%rsp,%rax,4)
	addl	$1, %ebx
	cmpl	%ebx, 8(%rsp)
	jg	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L9
	leal	1(%rax), %edi
	xorl	%ecx, %ecx
	movl	$1, %eax
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L7:
	movl	0(%rbp,%rax,4), %edx
	testl	%edx, %edx
	jle	.L6
	movl	(%r14,%rax,4), %edx
	addl	$1, %r8d
	leal	(%rcx,%rdx), %esi
	testl	%edx, %edx
	cmovg	%esi, %ecx
.L6:
	addq	$1, %rax
	cmpq	%rax, %rdi
	jne	.L7
.L5:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	800024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$800040, %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
.L9:
	.cfi_restore_state
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	jmp	.L5
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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%d"
.LC1:
	.string	"%d%s"
.LC2:
	.string	"%d %d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.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
	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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798776
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1320, %rsp
	.cfi_def_cfa_offset 800096
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 800024(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	leaq	16(%rsp), %rbp
	leaq	400016(%rsp), %r14
	call	__isoc99_scanf@PLT
	movl	$400000, %edx
	xorl	%esi, %esi
	movq	%rbp, %rdi
	call	memset@PLT
	xorl	%esi, %esi
	movl	$400000, %edx
	movq	%r14, %rdi
	call	memset@PLT
	movl	8(%rsp), %esi
	testl	%esi, %esi
	jle	.L2
	xorl	%ebx, %ebx
	leaq	800022(%rsp), %r15
	leaq	12(%rsp), %r13
	leaq	.LC1(%rip), %r12
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	addl	$1, %ebx
	cmpl	%ebx, 8(%rsp)
	jle	.L2
.L4:
	movq	%r15, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rax
	movl	16(%rsp,%rax,4), %ecx
	testl	%ecx, %ecx
	jg	.L3
	addl	$1, 400016(%rsp,%rax,4)
	addl	$1, %ebx
	cmpl	%ebx, 8(%rsp)
	jg	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L9
	leal	1(%rax), %edi
	xorl	%ecx, %ecx
	movl	$1, %eax
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L7:
	movl	0(%rbp,%rax,4), %edx
	testl	%edx, %edx
	jle	.L6
	movl	(%r14,%rax,4), %edx
	addl	$1, %r8d
	leal	(%rcx,%rdx), %esi
	testl	%edx, %edx
	cmovg	%esi, %ecx
.L6:
	addq	$1, %rax
	cmpq	%rax, %rdi
	jne	.L7
.L5:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	800024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$800040, %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
.L9:
	.cfi_restore_state
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	jmp	.L5
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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<string.h>
 
int main(void) {
	int n, m;
	int p;
	char s[2];
 
	scanf("%d%d", &n, &m);
	int ac[100000] = { 0 }, wa[100000] = { 0 };
	for (int i = 0; i < m; i++) {
		scanf("%d%s", &p, s);
		if (!strcmp(s, "AC"))
			ac[p]++;
		else if (ac[p] <= 0)
			wa[p]++;
	}
 
	int correct = 0, failed = 0;
	for (int i = 1; i <= n; i++) {
		if (ac[i] > 0) {
			correct++;
			if (wa[i] > 0)
				failed += wa[i];
		}
	}
 
	printf("%d %d", correct, failed);
	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<string.h>
 
int main(void) {
	int n, m;
	int p;
	char s[2];
 
	scanf("%d%d", &n, &m);
	int ac[100000] = { 0 }, wa[100000] = { 0 };
	for (int i = 0; i < m; i++) {
		scanf("%d%s", &p, s);
		if (!strcmp(s, "AC"))
			ac[p]++;
		else if (ac[p] <= 0)
			wa[p]++;
	}
 
	int correct = 0, failed = 0;
	for (int i = 1; i <= n; i++) {
		if (ac[i] > 0) {
			correct++;
			if (wa[i] > 0)
				failed += wa[i];
		}
	}
 
	printf("%d %d", correct, failed);
	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:

100000 3
7777 AC
7777 AC
7777 CA
 100000 3
12676 AC
7777 AC
7777 CA
 1 0
 4 5
1 WA
1 AC
2 WA
2 AC
2 WA
 4 5
1 WA
1 AC
0 WA
2 AC
2 WA
 100000 3
6234 AC
7777 AC
7777 AC
 2 0
 2 -1
 2 -2
 2 -4

1 0 2 0 0 0 2 2 2 1 2 0 0 0 0 0 0 0 0 0
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<string.h>
 
int main(void) {
	int n, m;
	int p;
	char s[2];
 
	scanf("%d%d", &n, &m);
	int ac[100000] = { 0 }, wa[100000] = { 0 };
	for (int i = 0; i < m; i++) {
		scanf("%d%s", &p, s);
		if (!strcmp(s, "AC"))
			ac[p]++;
		else if (ac[p] <= 0)
			wa[p]++;
	}
 
	int correct = 0, failed = 0;
	for (int i = 1; i <= n; i++) {
		if (ac[i] > 0) {
			correct++;
			if (wa[i] > 0)
				failed += wa[i];
		}
	}
 
	printf("%d %d", correct, failed);
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d%s"
.LC2:
	.string	"%d %d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.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
	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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798776
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1320, %rsp
	.cfi_def_cfa_offset 800096
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 800024(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	leaq	16(%rsp), %rbp
	leaq	400016(%rsp), %r14
	call	__isoc99_scanf@PLT
	movl	$400000, %edx
	xorl	%esi, %esi
	movq	%rbp, %rdi
	call	memset@PLT
	xorl	%esi, %esi
	movl	$400000, %edx
	movq	%r14, %rdi
	call	memset@PLT
	movl	8(%rsp), %esi
	testl	%esi, %esi
	jle	.L2
	xorl	%ebx, %ebx
	leaq	800022(%rsp), %r15
	leaq	12(%rsp), %r13
	leaq	.LC1(%rip), %r12
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	addl	$1, %ebx
	cmpl	%ebx, 8(%rsp)
	jle	.L2
.L4:
	movq	%r15, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rax
	movl	16(%rsp,%rax,4), %ecx
	testl	%ecx, %ecx
	jg	.L3
	addl	$1, 400016(%rsp,%rax,4)
	addl	$1, %ebx
	cmpl	%ebx, 8(%rsp)
	jg	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L9
	leal	1(%rax), %edi
	xorl	%ecx, %ecx
	movl	$1, %eax
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L7:
	movl	0(%rbp,%rax,4), %edx
	testl	%edx, %edx
	jle	.L6
	movl	(%r14,%rax,4), %edx
	addl	$1, %r8d
	leal	(%rcx,%rdx), %esi
	testl	%edx, %edx
	cmovg	%esi, %ecx
.L6:
	addq	$1, %rax
	cmpq	%rax, %rdi
	jne	.L7
.L5:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	800024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$800040, %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
.L9:
	.cfi_restore_state
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	jmp	.L5
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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%d"
.LC1:
	.string	"%d%s"
.LC2:
	.string	"%d %d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.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
	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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798776
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1320, %rsp
	.cfi_def_cfa_offset 800096
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 800024(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	leaq	16(%rsp), %rbp
	leaq	400016(%rsp), %r14
	call	__isoc99_scanf@PLT
	movl	$400000, %edx
	xorl	%esi, %esi
	movq	%rbp, %rdi
	call	memset@PLT
	xorl	%esi, %esi
	movl	$400000, %edx
	movq	%r14, %rdi
	call	memset@PLT
	movl	8(%rsp), %esi
	testl	%esi, %esi
	jle	.L2
	xorl	%ebx, %ebx
	leaq	800022(%rsp), %r15
	leaq	12(%rsp), %r13
	leaq	.LC1(%rip), %r12
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	addl	$1, %ebx
	cmpl	%ebx, 8(%rsp)
	jle	.L2
.L4:
	movq	%r15, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rax
	movl	16(%rsp,%rax,4), %ecx
	testl	%ecx, %ecx
	jg	.L3
	addl	$1, 400016(%rsp,%rax,4)
	addl	$1, %ebx
	cmpl	%ebx, 8(%rsp)
	jg	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L9
	leal	1(%rax), %edi
	xorl	%ecx, %ecx
	movl	$1, %eax
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L7:
	movl	0(%rbp,%rax,4), %edx
	testl	%edx, %edx
	jle	.L6
	movl	(%r14,%rax,4), %edx
	addl	$1, %r8d
	leal	(%rcx,%rdx), %esi
	testl	%edx, %edx
	cmovg	%esi, %ecx
.L6:
	addq	$1, %rax
	cmpq	%rax, %rdi
	jne	.L7
.L5:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	800024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$800040, %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
.L9:
	.cfi_restore_state
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	jmp	.L5
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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:
```