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 N;
int X[128];
int M;
int A[128];

char sugoroku[2048];

int main(void) {
	int i;
	if (scanf("%d", &N) != 1) return 1;
	for (i = 1; i <= N; i++) {
		if (scanf("%d", &X[i]) != 1) return 1;
		sugoroku[X[i]] = 1;
	}
	sugoroku[2020] = 1;
	if (scanf("%d", &M) != 1) return 1;
	for (i = 0; i < M; i++) {
		if (scanf("%d", &A[i]) != 1) return 1;
		if (!sugoroku[X[A[i]] + 1]) {
			sugoroku[X[A[i]]] = 0;
			sugoroku[X[A[i]] + 1] = 1;
			X[A[i]]++;
		}
	}
	for (i = 1; i <= N; i++) {
		printf("%d\n", X[i]);
	}
	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	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	xorl	%eax, %eax
	leaq	N(%rip), %rsi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	jne	.L5
	cmpl	$0, N(%rip)
	jle	.L4
	movl	%eax, %ebp
	leaq	4+X(%rip), %rbx
	leaq	sugoroku(%rip), %r13
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L16:
	movslq	(%rbx), %rax
	addl	$1, %ebp
	addq	$4, %rbx
	cmpl	%ebp, N(%rip)
	movb	$1, 0(%r13,%rax)
	jl	.L4
.L6:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L16
.L5:
	movl	$1, %eax
.L1:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L4:
	.cfi_restore_state
	xorl	%eax, %eax
	leaq	M(%rip), %rsi
	movq	%r12, %rdi
	movb	$1, 2020+sugoroku(%rip)
	call	__isoc99_scanf@PLT
	subl	$1, %eax
	jne	.L5
	cmpl	$0, M(%rip)
	jle	.L7
	leaq	A(%rip), %rbx
	xorl	%r14d, %r14d
	leaq	X(%rip), %r13
	leaq	sugoroku(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L10:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	jne	.L5
	movslq	(%rbx), %rdx
	movslq	0(%r13,%rdx,4), %rax
	leal	1(%rax), %ecx
	movslq	%ecx, %rsi
	cmpb	$0, 0(%rbp,%rsi)
	jne	.L8
	addl	$1, %r14d
	addq	$4, %rbx
	movb	$0, 0(%rbp,%rax)
	cmpl	M(%rip), %r14d
	movb	$1, 0(%rbp,%rsi)
	movl	%ecx, 0(%r13,%rdx,4)
	jl	.L10
.L7:
	xorl	%ebx, %ebx
	leaq	X(%rip), %r12
	leaq	.LC1(%rip), %rbp
	jmp	.L11
.L12:
	movl	(%r12,%rbx,4), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L11:
	addq	$1, %rbx
	cmpl	%ebx, N(%rip)
	jge	.L12
	xorl	%eax, %eax
	jmp	.L1
.L8:
	addl	$1, %r14d
	addq	$4, %rbx
	cmpl	%r14d, M(%rip)
	jg	.L10
	jmp	.L7
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	sugoroku
	.bss
	.align 32
	.type	sugoroku, @object
	.size	sugoroku, 2048
sugoroku:
	.zero	2048
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 512
A:
	.zero	512
	.globl	M
	.align 4
	.type	M, @object
	.size	M, 4
M:
	.zero	4
	.globl	X
	.align 32
	.type	X, @object
	.size	X, 512
X:
	.zero	512
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.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	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	xorl	%eax, %eax
	leaq	N(%rip), %rsi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	jne	.L5
	cmpl	$0, N(%rip)
	jle	.L4
	movl	%eax, %ebp
	leaq	4+X(%rip), %rbx
	leaq	sugoroku(%rip), %r13
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L16:
	movslq	(%rbx), %rax
	addl	$1, %ebp
	addq	$4, %rbx
	cmpl	%ebp, N(%rip)
	movb	$1, 0(%r13,%rax)
	jl	.L4
.L6:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L16
.L5:
	movl	$1, %eax
.L1:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L4:
	.cfi_restore_state
	xorl	%eax, %eax
	leaq	M(%rip), %rsi
	movq	%r12, %rdi
	movb	$1, 2020+sugoroku(%rip)
	call	__isoc99_scanf@PLT
	subl	$1, %eax
	jne	.L5
	cmpl	$0, M(%rip)
	jle	.L7
	leaq	A(%rip), %rbx
	xorl	%r14d, %r14d
	leaq	X(%rip), %r13
	leaq	sugoroku(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L10:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	jne	.L5
	movslq	(%rbx), %rdx
	movslq	0(%r13,%rdx,4), %rax
	leal	1(%rax), %ecx
	movslq	%ecx, %rsi
	cmpb	$0, 0(%rbp,%rsi)
	jne	.L8
	addl	$1, %r14d
	addq	$4, %rbx
	movb	$0, 0(%rbp,%rax)
	cmpl	M(%rip), %r14d
	movb	$1, 0(%rbp,%rsi)
	movl	%ecx, 0(%r13,%rdx,4)
	jl	.L10
.L7:
	xorl	%ebx, %ebx
	leaq	X(%rip), %r12
	leaq	.LC1(%rip), %rbp
	jmp	.L11
.L12:
	movl	(%r12,%rbx,4), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L11:
	addq	$1, %rbx
	cmpl	%ebx, N(%rip)
	jge	.L12
	xorl	%eax, %eax
	jmp	.L1
.L8:
	addl	$1, %r14d
	addq	$4, %rbx
	cmpl	%r14d, M(%rip)
	jg	.L10
	jmp	.L7
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	sugoroku
	.bss
	.align 32
	.type	sugoroku, @object
	.size	sugoroku, 2048
sugoroku:
	.zero	2048
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 512
A:
	.zero	512
	.globl	M
	.align 4
	.type	M, @object
	.size	M, 4
M:
	.zero	4
	.globl	X
	.align 32
	.type	X, @object
	.size	X, 512
X:
	.zero	512
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.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	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	xorl	%eax, %eax
	leaq	N(%rip), %rsi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	jne	.L5
	cmpl	$0, N(%rip)
	jle	.L4
	movl	%eax, %ebp
	leaq	4+X(%rip), %rbx
	leaq	sugoroku(%rip), %r13
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L16:
	movslq	(%rbx), %rax
	addl	$1, %ebp
	addq	$4, %rbx
	cmpl	%ebp, N(%rip)
	movb	$1, 0(%r13,%rax)
	jl	.L4
.L6:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L16
.L5:
	movl	$1, %eax
.L1:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L4:
	.cfi_restore_state
	xorl	%eax, %eax
	leaq	M(%rip), %rsi
	movq	%r12, %rdi
	movb	$1, 2020+sugoroku(%rip)
	call	__isoc99_scanf@PLT
	subl	$1, %eax
	jne	.L5
	cmpl	$0, M(%rip)
	jle	.L7
	leaq	A(%rip), %rbx
	xorl	%r14d, %r14d
	leaq	X(%rip), %r13
	leaq	sugoroku(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L10:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	jne	.L5
	movslq	(%rbx), %rdx
	movslq	0(%r13,%rdx,4), %rax
	leal	1(%rax), %ecx
	movslq	%ecx, %rsi
	cmpb	$0, 0(%rbp,%rsi)
	jne	.L8
	addl	$1, %r14d
	addq	$4, %rbx
	movb	$0, 0(%rbp,%rax)
	cmpl	M(%rip), %r14d
	movb	$1, 0(%rbp,%rsi)
	movl	%ecx, 0(%r13,%rdx,4)
	jl	.L10
.L7:
	xorl	%ebx, %ebx
	leaq	X(%rip), %r12
	leaq	.LC1(%rip), %rbp
	jmp	.L11
.L12:
	movl	(%r12,%rbx,4), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L11:
	addq	$1, %rbx
	cmpl	%ebx, N(%rip)
	jge	.L12
	xorl	%eax, %eax
	jmp	.L1
.L8:
	addl	$1, %r14d
	addq	$4, %rbx
	cmpl	%r14d, M(%rip)
	jg	.L10
	jmp	.L7
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	sugoroku
	.bss
	.align 32
	.type	sugoroku, @object
	.size	sugoroku, 2048
sugoroku:
	.zero	2048
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 512
A:
	.zero	512
	.globl	M
	.align 4
	.type	M, @object
	.size	M, 4
M:
	.zero	4
	.globl	X
	.align 32
	.type	X, @object
	.size	X, 512
X:
	.zero	512
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.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 N;
int X[128];
int M;
int A[128];

char sugoroku[2048];

int main(void) {
	int i;
	if (scanf("%d", &N) != 1) return 1;
	for (i = 1; i <= N; i++) {
		if (scanf("%d", &X[i]) != 1) return 1;
		sugoroku[X[i]] = 1;
	}
	sugoroku[2020] = 1;
	if (scanf("%d", &M) != 1) return 1;
	for (i = 0; i < M; i++) {
		if (scanf("%d", &A[i]) != 1) return 1;
		if (!sugoroku[X[A[i]] + 1]) {
			sugoroku[X[A[i]]] = 0;
			sugoroku[X[A[i]] + 1] = 1;
			X[A[i]]++;
		}
	}
	for (i = 1; i <= N; i++) {
		printf("%d\n", X[i]);
	}
	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 N;
int X[128];
int M;
int A[128];

char sugoroku[2048];

int main(void) {
	int i;
	if (scanf("%d", &N) != 1) return 1;
	for (i = 1; i <= N; i++) {
		if (scanf("%d", &X[i]) != 1) return 1;
		sugoroku[X[i]] = 1;
	}
	sugoroku[2020] = 1;
	if (scanf("%d", &M) != 1) return 1;
	for (i = 0; i < M; i++) {
		if (scanf("%d", &A[i]) != 1) return 1;
		if (!sugoroku[X[A[i]] + 1]) {
			sugoroku[X[A[i]]] = 0;
			sugoroku[X[A[i]] + 1] = 1;
			X[A[i]]++;
		}
	}
	for (i = 1; i <= N; i++) {
		printf("%d\n", X[i]);
	}
	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:

3
2 3 6
2
1 3

2
3
7

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 N;
int X[128];
int M;
int A[128];

char sugoroku[2048];

int main(void) {
	int i;
	if (scanf("%d", &N) != 1) return 1;
	for (i = 1; i <= N; i++) {
		if (scanf("%d", &X[i]) != 1) return 1;
		sugoroku[X[i]] = 1;
	}
	sugoroku[2020] = 1;
	if (scanf("%d", &M) != 1) return 1;
	for (i = 0; i < M; i++) {
		if (scanf("%d", &A[i]) != 1) return 1;
		if (!sugoroku[X[A[i]] + 1]) {
			sugoroku[X[A[i]]] = 0;
			sugoroku[X[A[i]] + 1] = 1;
			X[A[i]]++;
		}
	}
	for (i = 1; i <= N; i++) {
		printf("%d\n", X[i]);
	}
	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	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	xorl	%eax, %eax
	leaq	N(%rip), %rsi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	jne	.L5
	cmpl	$0, N(%rip)
	jle	.L4
	movl	%eax, %ebp
	leaq	4+X(%rip), %rbx
	leaq	sugoroku(%rip), %r13
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L16:
	movslq	(%rbx), %rax
	addl	$1, %ebp
	addq	$4, %rbx
	cmpl	%ebp, N(%rip)
	movb	$1, 0(%r13,%rax)
	jl	.L4
.L6:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L16
.L5:
	movl	$1, %eax
.L1:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L4:
	.cfi_restore_state
	xorl	%eax, %eax
	leaq	M(%rip), %rsi
	movq	%r12, %rdi
	movb	$1, 2020+sugoroku(%rip)
	call	__isoc99_scanf@PLT
	subl	$1, %eax
	jne	.L5
	cmpl	$0, M(%rip)
	jle	.L7
	leaq	A(%rip), %rbx
	xorl	%r14d, %r14d
	leaq	X(%rip), %r13
	leaq	sugoroku(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L10:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	jne	.L5
	movslq	(%rbx), %rdx
	movslq	0(%r13,%rdx,4), %rax
	leal	1(%rax), %ecx
	movslq	%ecx, %rsi
	cmpb	$0, 0(%rbp,%rsi)
	jne	.L8
	addl	$1, %r14d
	addq	$4, %rbx
	movb	$0, 0(%rbp,%rax)
	cmpl	M(%rip), %r14d
	movb	$1, 0(%rbp,%rsi)
	movl	%ecx, 0(%r13,%rdx,4)
	jl	.L10
.L7:
	xorl	%ebx, %ebx
	leaq	X(%rip), %r12
	leaq	.LC1(%rip), %rbp
	jmp	.L11
.L12:
	movl	(%r12,%rbx,4), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L11:
	addq	$1, %rbx
	cmpl	%ebx, N(%rip)
	jge	.L12
	xorl	%eax, %eax
	jmp	.L1
.L8:
	addl	$1, %r14d
	addq	$4, %rbx
	cmpl	%r14d, M(%rip)
	jg	.L10
	jmp	.L7
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	sugoroku
	.bss
	.align 32
	.type	sugoroku, @object
	.size	sugoroku, 2048
sugoroku:
	.zero	2048
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 512
A:
	.zero	512
	.globl	M
	.align 4
	.type	M, @object
	.size	M, 4
M:
	.zero	4
	.globl	X
	.align 32
	.type	X, @object
	.size	X, 512
X:
	.zero	512
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.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	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	xorl	%eax, %eax
	leaq	N(%rip), %rsi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	jne	.L5
	cmpl	$0, N(%rip)
	jle	.L4
	movl	%eax, %ebp
	leaq	4+X(%rip), %rbx
	leaq	sugoroku(%rip), %r13
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L16:
	movslq	(%rbx), %rax
	addl	$1, %ebp
	addq	$4, %rbx
	cmpl	%ebp, N(%rip)
	movb	$1, 0(%r13,%rax)
	jl	.L4
.L6:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L16
.L5:
	movl	$1, %eax
.L1:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L4:
	.cfi_restore_state
	xorl	%eax, %eax
	leaq	M(%rip), %rsi
	movq	%r12, %rdi
	movb	$1, 2020+sugoroku(%rip)
	call	__isoc99_scanf@PLT
	subl	$1, %eax
	jne	.L5
	cmpl	$0, M(%rip)
	jle	.L7
	leaq	A(%rip), %rbx
	xorl	%r14d, %r14d
	leaq	X(%rip), %r13
	leaq	sugoroku(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L10:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	jne	.L5
	movslq	(%rbx), %rdx
	movslq	0(%r13,%rdx,4), %rax
	leal	1(%rax), %ecx
	movslq	%ecx, %rsi
	cmpb	$0, 0(%rbp,%rsi)
	jne	.L8
	addl	$1, %r14d
	addq	$4, %rbx
	movb	$0, 0(%rbp,%rax)
	cmpl	M(%rip), %r14d
	movb	$1, 0(%rbp,%rsi)
	movl	%ecx, 0(%r13,%rdx,4)
	jl	.L10
.L7:
	xorl	%ebx, %ebx
	leaq	X(%rip), %r12
	leaq	.LC1(%rip), %rbp
	jmp	.L11
.L12:
	movl	(%r12,%rbx,4), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L11:
	addq	$1, %rbx
	cmpl	%ebx, N(%rip)
	jge	.L12
	xorl	%eax, %eax
	jmp	.L1
.L8:
	addl	$1, %r14d
	addq	$4, %rbx
	cmpl	%r14d, M(%rip)
	jg	.L10
	jmp	.L7
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	sugoroku
	.bss
	.align 32
	.type	sugoroku, @object
	.size	sugoroku, 2048
sugoroku:
	.zero	2048
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 512
A:
	.zero	512
	.globl	M
	.align 4
	.type	M, @object
	.size	M, 4
M:
	.zero	4
	.globl	X
	.align 32
	.type	X, @object
	.size	X, 512
X:
	.zero	512
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.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:
```