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(void)
{
	int a[101][3] = {0}, N, X, Y, Z, q, w, e, r, t, y, u,i=0;
	scanf("%d", &N);
	scanf("%d", &X);
	for (q = 0; q < X; q++)
	{
		scanf("%d", &r);
		a[r][0] = 1;
	}
	scanf("%d", &Y);
	for (w = 0; w < Y; w++)
	{
		scanf("%d", &t);
		a[t][1] = 1;
	}
	scanf("%d", &Z);
	for (e = 0; e < Z; e++)
	{
		scanf("%d", &y);
		a[y][2] = 1;
	}
	for (u = 1; u <=N; u++)
	{
		if (a[u][0] == 0 && a[u][2] == 1 || a[u][1] == 1 && a[u][2] == 1)
			i++;
	}
	printf("%d\n", 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	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	$151, %ecx
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC0(%rip), %rbx
	subq	$1264, %rsp
	.cfi_def_cfa_offset 1296
	movq	%fs:40, %rax
	movq	%rax, 1256(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rdi
	leaq	4(%rsp), %rsi
	rep stosq
	movl	$0, (%rdi)
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	leaq	8(%rsp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %r8d
	testl	%r8d, %r8d
	jle	.L2
	xorl	%ebp, %ebp
	leaq	20(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movslq	20(%rsp), %rax
	leaq	(%rax,%rax,2), %rax
	movl	$1, 32(%rsp,%rax,4)
	cmpl	%ebp, 8(%rsp)
	jg	.L3
.L2:
	movq	%rbx, %rdi
	leaq	12(%rsp), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edi
	testl	%edi, %edi
	jle	.L4
	xorl	%ebp, %ebp
	leaq	24(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movslq	24(%rsp), %rax
	leaq	(%rax,%rax,2), %rax
	movl	$1, 36(%rsp,%rax,4)
	cmpl	%ebp, 12(%rsp)
	jg	.L5
.L4:
	leaq	16(%rsp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %esi
	testl	%esi, %esi
	jle	.L6
	xorl	%ebp, %ebp
	leaq	28(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movslq	28(%rsp), %rax
	leaq	(%rax,%rax,2), %rax
	movl	$1, 40(%rsp,%rax,4)
	cmpl	%ebp, 16(%rsp)
	jg	.L7
.L6:
	movl	4(%rsp), %edx
	testl	%edx, %edx
	jle	.L13
	subl	$1, %edx
	leaq	44(%rsp), %rax
	leaq	(%rdx,%rdx,2), %rdx
	leaq	56(%rsp,%rdx,4), %rsi
	xorl	%edx, %edx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L20:
	cmpl	$1, 4(%rax)
	je	.L9
	addq	$12, %rax
	cmpq	%rsi, %rax
	je	.L8
.L11:
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jne	.L20
.L9:
	xorl	%ecx, %ecx
	cmpl	$1, 8(%rax)
	sete	%cl
	addq	$12, %rax
	addl	%ecx, %edx
	cmpq	%rsi, %rax
	jne	.L11
.L8:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	1256(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$1264, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L13:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L8
.L21:
	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	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	$151, %ecx
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC0(%rip), %rbx
	subq	$1264, %rsp
	.cfi_def_cfa_offset 1296
	movq	%fs:40, %rax
	movq	%rax, 1256(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rdi
	leaq	4(%rsp), %rsi
	rep stosq
	movl	$0, (%rdi)
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	leaq	8(%rsp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %r8d
	testl	%r8d, %r8d
	jle	.L2
	xorl	%ebp, %ebp
	leaq	20(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movslq	20(%rsp), %rax
	leaq	(%rax,%rax,2), %rax
	movl	$1, 32(%rsp,%rax,4)
	cmpl	%ebp, 8(%rsp)
	jg	.L3
.L2:
	movq	%rbx, %rdi
	leaq	12(%rsp), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edi
	testl	%edi, %edi
	jle	.L4
	xorl	%ebp, %ebp
	leaq	24(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movslq	24(%rsp), %rax
	leaq	(%rax,%rax,2), %rax
	movl	$1, 36(%rsp,%rax,4)
	cmpl	%ebp, 12(%rsp)
	jg	.L5
.L4:
	leaq	16(%rsp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %esi
	testl	%esi, %esi
	jle	.L6
	xorl	%ebp, %ebp
	leaq	28(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movslq	28(%rsp), %rax
	leaq	(%rax,%rax,2), %rax
	movl	$1, 40(%rsp,%rax,4)
	cmpl	%ebp, 16(%rsp)
	jg	.L7
.L6:
	movl	4(%rsp), %edx
	testl	%edx, %edx
	jle	.L13
	subl	$1, %edx
	leaq	44(%rsp), %rax
	leaq	(%rdx,%rdx,2), %rdx
	leaq	56(%rsp,%rdx,4), %rsi
	xorl	%edx, %edx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L20:
	cmpl	$1, 4(%rax)
	je	.L9
	addq	$12, %rax
	cmpq	%rsi, %rax
	je	.L8
.L11:
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jne	.L20
.L9:
	xorl	%ecx, %ecx
	cmpl	$1, 8(%rax)
	sete	%cl
	addq	$12, %rax
	addl	%ecx, %edx
	cmpq	%rsi, %rax
	jne	.L11
.L8:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	1256(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$1264, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L13:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L8
.L21:
	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	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	$151, %ecx
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC0(%rip), %rbx
	subq	$1264, %rsp
	.cfi_def_cfa_offset 1296
	movq	%fs:40, %rax
	movq	%rax, 1256(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rdi
	leaq	4(%rsp), %rsi
	rep stosq
	movl	$0, (%rdi)
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	leaq	8(%rsp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %r8d
	testl	%r8d, %r8d
	jle	.L2
	xorl	%ebp, %ebp
	leaq	20(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movslq	20(%rsp), %rax
	leaq	(%rax,%rax,2), %rax
	movl	$1, 32(%rsp,%rax,4)
	cmpl	%ebp, 8(%rsp)
	jg	.L3
.L2:
	movq	%rbx, %rdi
	leaq	12(%rsp), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edi
	testl	%edi, %edi
	jle	.L4
	xorl	%ebp, %ebp
	leaq	24(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movslq	24(%rsp), %rax
	leaq	(%rax,%rax,2), %rax
	movl	$1, 36(%rsp,%rax,4)
	cmpl	%ebp, 12(%rsp)
	jg	.L5
.L4:
	leaq	16(%rsp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %esi
	testl	%esi, %esi
	jle	.L6
	xorl	%ebp, %ebp
	leaq	28(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movslq	28(%rsp), %rax
	leaq	(%rax,%rax,2), %rax
	movl	$1, 40(%rsp,%rax,4)
	cmpl	%ebp, 16(%rsp)
	jg	.L7
.L6:
	movl	4(%rsp), %edx
	testl	%edx, %edx
	jle	.L13
	subl	$1, %edx
	leaq	44(%rsp), %rax
	leaq	(%rdx,%rdx,2), %rdx
	leaq	56(%rsp,%rdx,4), %rsi
	xorl	%edx, %edx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L20:
	cmpl	$1, 4(%rax)
	je	.L9
	addq	$12, %rax
	cmpq	%rsi, %rax
	je	.L8
.L11:
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jne	.L20
.L9:
	xorl	%ecx, %ecx
	cmpl	$1, 8(%rax)
	sete	%cl
	addq	$12, %rax
	addl	%ecx, %edx
	cmpq	%rsi, %rax
	jne	.L11
.L8:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	1256(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$1264, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L13:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L8
.L21:
	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(void)
{
	int a[101][3] = {0}, N, X, Y, Z, q, w, e, r, t, y, u,i=0;
	scanf("%d", &N);
	scanf("%d", &X);
	for (q = 0; q < X; q++)
	{
		scanf("%d", &r);
		a[r][0] = 1;
	}
	scanf("%d", &Y);
	for (w = 0; w < Y; w++)
	{
		scanf("%d", &t);
		a[t][1] = 1;
	}
	scanf("%d", &Z);
	for (e = 0; e < Z; e++)
	{
		scanf("%d", &y);
		a[y][2] = 1;
	}
	for (u = 1; u <=N; u++)
	{
		if (a[u][0] == 0 && a[u][2] == 1 || a[u][1] == 1 && a[u][2] == 1)
			i++;
	}
	printf("%d\n", 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 main(void)
{
	int a[101][3] = {0}, N, X, Y, Z, q, w, e, r, t, y, u,i=0;
	scanf("%d", &N);
	scanf("%d", &X);
	for (q = 0; q < X; q++)
	{
		scanf("%d", &r);
		a[r][0] = 1;
	}
	scanf("%d", &Y);
	for (w = 0; w < Y; w++)
	{
		scanf("%d", &t);
		a[t][1] = 1;
	}
	scanf("%d", &Z);
	for (e = 0; e < Z; e++)
	{
		scanf("%d", &y);
		a[y][2] = 1;
	}
	for (u = 1; u <=N; u++)
	{
		if (a[u][0] == 0 && a[u][2] == 1 || a[u][1] == 1 && a[u][2] == 1)
			i++;
	}
	printf("%d\n", 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:

5
3 1 2 3
2 4 5
2 2 4
 5
3 1 2 1
2 4 5
2 3 4
 5
3 1 2 3
2 4 5
2 3 2
 5
3 1 4 3
2 4 5
2 3 4
 100
3 1 100 4
0
2 4 3
 5
3 2 4 3
2 4 5
2 3 4
 100
3 0 100 4
0
2 4 3
 100
3 0 000 4
0
2 4 3
 100
3 1 100 4
-1
2 2 3
 5
3 1 2 5
2 4 5
2 2 4

1
 2
 0
 1
 1
 1
 1
 1
 2
 1

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(void)
{
	int a[101][3] = {0}, N, X, Y, Z, q, w, e, r, t, y, u,i=0;
	scanf("%d", &N);
	scanf("%d", &X);
	for (q = 0; q < X; q++)
	{
		scanf("%d", &r);
		a[r][0] = 1;
	}
	scanf("%d", &Y);
	for (w = 0; w < Y; w++)
	{
		scanf("%d", &t);
		a[t][1] = 1;
	}
	scanf("%d", &Z);
	for (e = 0; e < Z; e++)
	{
		scanf("%d", &y);
		a[y][2] = 1;
	}
	for (u = 1; u <=N; u++)
	{
		if (a[u][0] == 0 && a[u][2] == 1 || a[u][1] == 1 && a[u][2] == 1)
			i++;
	}
	printf("%d\n", 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	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	$151, %ecx
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC0(%rip), %rbx
	subq	$1264, %rsp
	.cfi_def_cfa_offset 1296
	movq	%fs:40, %rax
	movq	%rax, 1256(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rdi
	leaq	4(%rsp), %rsi
	rep stosq
	movl	$0, (%rdi)
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	leaq	8(%rsp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %r8d
	testl	%r8d, %r8d
	jle	.L2
	xorl	%ebp, %ebp
	leaq	20(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movslq	20(%rsp), %rax
	leaq	(%rax,%rax,2), %rax
	movl	$1, 32(%rsp,%rax,4)
	cmpl	%ebp, 8(%rsp)
	jg	.L3
.L2:
	movq	%rbx, %rdi
	leaq	12(%rsp), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edi
	testl	%edi, %edi
	jle	.L4
	xorl	%ebp, %ebp
	leaq	24(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movslq	24(%rsp), %rax
	leaq	(%rax,%rax,2), %rax
	movl	$1, 36(%rsp,%rax,4)
	cmpl	%ebp, 12(%rsp)
	jg	.L5
.L4:
	leaq	16(%rsp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %esi
	testl	%esi, %esi
	jle	.L6
	xorl	%ebp, %ebp
	leaq	28(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movslq	28(%rsp), %rax
	leaq	(%rax,%rax,2), %rax
	movl	$1, 40(%rsp,%rax,4)
	cmpl	%ebp, 16(%rsp)
	jg	.L7
.L6:
	movl	4(%rsp), %edx
	testl	%edx, %edx
	jle	.L13
	subl	$1, %edx
	leaq	44(%rsp), %rax
	leaq	(%rdx,%rdx,2), %rdx
	leaq	56(%rsp,%rdx,4), %rsi
	xorl	%edx, %edx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L20:
	cmpl	$1, 4(%rax)
	je	.L9
	addq	$12, %rax
	cmpq	%rsi, %rax
	je	.L8
.L11:
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jne	.L20
.L9:
	xorl	%ecx, %ecx
	cmpl	$1, 8(%rax)
	sete	%cl
	addq	$12, %rax
	addl	%ecx, %edx
	cmpq	%rsi, %rax
	jne	.L11
.L8:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	1256(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$1264, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L13:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L8
.L21:
	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	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	$151, %ecx
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC0(%rip), %rbx
	subq	$1264, %rsp
	.cfi_def_cfa_offset 1296
	movq	%fs:40, %rax
	movq	%rax, 1256(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rdi
	leaq	4(%rsp), %rsi
	rep stosq
	movl	$0, (%rdi)
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	leaq	8(%rsp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %r8d
	testl	%r8d, %r8d
	jle	.L2
	xorl	%ebp, %ebp
	leaq	20(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movslq	20(%rsp), %rax
	leaq	(%rax,%rax,2), %rax
	movl	$1, 32(%rsp,%rax,4)
	cmpl	%ebp, 8(%rsp)
	jg	.L3
.L2:
	movq	%rbx, %rdi
	leaq	12(%rsp), %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edi
	testl	%edi, %edi
	jle	.L4
	xorl	%ebp, %ebp
	leaq	24(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movslq	24(%rsp), %rax
	leaq	(%rax,%rax,2), %rax
	movl	$1, 36(%rsp,%rax,4)
	cmpl	%ebp, 12(%rsp)
	jg	.L5
.L4:
	leaq	16(%rsp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %esi
	testl	%esi, %esi
	jle	.L6
	xorl	%ebp, %ebp
	leaq	28(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movslq	28(%rsp), %rax
	leaq	(%rax,%rax,2), %rax
	movl	$1, 40(%rsp,%rax,4)
	cmpl	%ebp, 16(%rsp)
	jg	.L7
.L6:
	movl	4(%rsp), %edx
	testl	%edx, %edx
	jle	.L13
	subl	$1, %edx
	leaq	44(%rsp), %rax
	leaq	(%rdx,%rdx,2), %rdx
	leaq	56(%rsp,%rdx,4), %rsi
	xorl	%edx, %edx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L20:
	cmpl	$1, 4(%rax)
	je	.L9
	addq	$12, %rax
	cmpq	%rsi, %rax
	je	.L8
.L11:
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jne	.L20
.L9:
	xorl	%ecx, %ecx
	cmpl	$1, 8(%rax)
	sete	%cl
	addq	$12, %rax
	addl	%ecx, %edx
	cmpq	%rsi, %rax
	jne	.L11
.L8:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	1256(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$1264, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L13:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L8
.L21:
	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:
```