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[12], b, c, d, e, f;
	while (1) {
		scanf("%d", &b);
		c = 0;
		if (b == 0) break;
		for (d = 0;d < 12;d++)
		{
			scanf("%d %d", &e, &f);
			c += e - f;
			a[d] = c;
		}
		for (d = 0;d < 12;d++){
			if (a[d] >= b)
			{
				printf("%d\n", d + 1);
				break;
			}
	}
	if (c < b)printf("NA\n");
}
return;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
.LC3:
	.string	"NA"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	leaq	.LC1(%rip), %r13
	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
	subq	$104, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 88(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rax
	movq	%rax, 8(%rsp)
.L7:
	leaq	80(%rsp), %r12
	leaq	28(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L6:
	movq	8(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	testl	%eax, %eax
	je	.L2
	leaq	32(%rsp), %r15
	xorl	%r14d, %r14d
	leaq	24(%rsp), %rbx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rdx
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %ecx
	addq	$4, %r15
	addl	%r14d, %ecx
	subl	28(%rsp), %ecx
	movl	%ecx, -4(%r15)
	movl	%ecx, %r14d
	cmpq	%r12, %r15
	jne	.L3
	movl	20(%rsp), %eax
	cmpl	%eax, 32(%rsp)
	jge	.L9
	cmpl	36(%rsp), %eax
	jle	.L10
	cmpl	40(%rsp), %eax
	jle	.L11
	cmpl	44(%rsp), %eax
	jle	.L12
	cmpl	48(%rsp), %eax
	jle	.L13
	cmpl	52(%rsp), %eax
	jle	.L14
	cmpl	56(%rsp), %eax
	jle	.L15
	cmpl	60(%rsp), %eax
	jle	.L16
	cmpl	64(%rsp), %eax
	jle	.L17
	cmpl	68(%rsp), %eax
	jle	.L18
	cmpl	72(%rsp), %eax
	jle	.L19
	movl	$12, %edx
	cmpl	76(%rsp), %eax
	jle	.L4
.L5:
	cmpl	%eax, %r14d
	jge	.L6
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L7
.L9:
	movl	$1, %edx
	.p2align 4,,10
	.p2align 3
.L4:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	20(%rsp), %eax
	jmp	.L5
.L2:
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L24
	addq	$104, %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
.L10:
	.cfi_restore_state
	movl	$2, %edx
	jmp	.L4
.L11:
	movl	$3, %edx
	jmp	.L4
.L12:
	movl	$4, %edx
	jmp	.L4
.L13:
	movl	$5, %edx
	jmp	.L4
.L14:
	movl	$6, %edx
	jmp	.L4
.L15:
	movl	$7, %edx
	jmp	.L4
.L16:
	movl	$8, %edx
	jmp	.L4
.L17:
	movl	$9, %edx
	jmp	.L4
.L18:
	movl	$10, %edx
	jmp	.L4
.L19:
	movl	$11, %edx
	jmp	.L4
.L24:
	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 %d"
.LC2:
	.string	"%d\n"
.LC3:
	.string	"NA"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	leaq	.LC1(%rip), %r13
	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
	subq	$104, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 88(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rax
	movq	%rax, 8(%rsp)
.L7:
	leaq	80(%rsp), %r12
	leaq	28(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L6:
	movq	8(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	testl	%eax, %eax
	je	.L2
	leaq	32(%rsp), %r15
	xorl	%r14d, %r14d
	leaq	24(%rsp), %rbx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rdx
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %ecx
	addq	$4, %r15
	addl	%r14d, %ecx
	subl	28(%rsp), %ecx
	movl	%ecx, -4(%r15)
	movl	%ecx, %r14d
	cmpq	%r12, %r15
	jne	.L3
	movl	20(%rsp), %eax
	cmpl	%eax, 32(%rsp)
	jge	.L9
	cmpl	36(%rsp), %eax
	jle	.L10
	cmpl	40(%rsp), %eax
	jle	.L11
	cmpl	44(%rsp), %eax
	jle	.L12
	cmpl	48(%rsp), %eax
	jle	.L13
	cmpl	52(%rsp), %eax
	jle	.L14
	cmpl	56(%rsp), %eax
	jle	.L15
	cmpl	60(%rsp), %eax
	jle	.L16
	cmpl	64(%rsp), %eax
	jle	.L17
	cmpl	68(%rsp), %eax
	jle	.L18
	cmpl	72(%rsp), %eax
	jle	.L19
	movl	$12, %edx
	cmpl	76(%rsp), %eax
	jle	.L4
.L5:
	cmpl	%eax, %r14d
	jge	.L6
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L7
.L9:
	movl	$1, %edx
	.p2align 4,,10
	.p2align 3
.L4:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	20(%rsp), %eax
	jmp	.L5
.L2:
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L24
	addq	$104, %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
.L10:
	.cfi_restore_state
	movl	$2, %edx
	jmp	.L4
.L11:
	movl	$3, %edx
	jmp	.L4
.L12:
	movl	$4, %edx
	jmp	.L4
.L13:
	movl	$5, %edx
	jmp	.L4
.L14:
	movl	$6, %edx
	jmp	.L4
.L15:
	movl	$7, %edx
	jmp	.L4
.L16:
	movl	$8, %edx
	jmp	.L4
.L17:
	movl	$9, %edx
	jmp	.L4
.L18:
	movl	$10, %edx
	jmp	.L4
.L19:
	movl	$11, %edx
	jmp	.L4
.L24:
	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 %d"
.LC2:
	.string	"%d\n"
.LC3:
	.string	"NA"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	leaq	.LC1(%rip), %r13
	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
	subq	$104, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 88(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rax
	movq	%rax, 8(%rsp)
.L7:
	leaq	80(%rsp), %r12
	leaq	28(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L6:
	movq	8(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	testl	%eax, %eax
	je	.L2
	leaq	32(%rsp), %r15
	xorl	%r14d, %r14d
	leaq	24(%rsp), %rbx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rdx
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %ecx
	addq	$4, %r15
	addl	%r14d, %ecx
	subl	28(%rsp), %ecx
	movl	%ecx, -4(%r15)
	movl	%ecx, %r14d
	cmpq	%r12, %r15
	jne	.L3
	movl	20(%rsp), %eax
	cmpl	%eax, 32(%rsp)
	jge	.L9
	cmpl	36(%rsp), %eax
	jle	.L10
	cmpl	40(%rsp), %eax
	jle	.L11
	cmpl	44(%rsp), %eax
	jle	.L12
	cmpl	48(%rsp), %eax
	jle	.L13
	cmpl	52(%rsp), %eax
	jle	.L14
	cmpl	56(%rsp), %eax
	jle	.L15
	cmpl	60(%rsp), %eax
	jle	.L16
	cmpl	64(%rsp), %eax
	jle	.L17
	cmpl	68(%rsp), %eax
	jle	.L18
	cmpl	72(%rsp), %eax
	jle	.L19
	movl	$12, %edx
	cmpl	76(%rsp), %eax
	jle	.L4
.L5:
	cmpl	%eax, %r14d
	jge	.L6
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L7
.L9:
	movl	$1, %edx
	.p2align 4,,10
	.p2align 3
.L4:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	20(%rsp), %eax
	jmp	.L5
.L2:
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L24
	addq	$104, %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
.L10:
	.cfi_restore_state
	movl	$2, %edx
	jmp	.L4
.L11:
	movl	$3, %edx
	jmp	.L4
.L12:
	movl	$4, %edx
	jmp	.L4
.L13:
	movl	$5, %edx
	jmp	.L4
.L14:
	movl	$6, %edx
	jmp	.L4
.L15:
	movl	$7, %edx
	jmp	.L4
.L16:
	movl	$8, %edx
	jmp	.L4
.L17:
	movl	$9, %edx
	jmp	.L4
.L18:
	movl	$10, %edx
	jmp	.L4
.L19:
	movl	$11, %edx
	jmp	.L4
.L24:
	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[12], b, c, d, e, f;
	while (1) {
		scanf("%d", &b);
		c = 0;
		if (b == 0) break;
		for (d = 0;d < 12;d++)
		{
			scanf("%d %d", &e, &f);
			c += e - f;
			a[d] = c;
		}
		for (d = 0;d < 12;d++){
			if (a[d] >= b)
			{
				printf("%d\n", d + 1);
				break;
			}
	}
	if (c < b)printf("NA\n");
}
return;
}```
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[12], b, c, d, e, f;
	while (1) {
		scanf("%d", &b);
		c = 0;
		if (b == 0) break;
		for (d = 0;d < 12;d++)
		{
			scanf("%d %d", &e, &f);
			c += e - f;
			a[d] = c;
		}
		for (d = 0;d < 12;d++){
			if (a[d] >= b)
			{
				printf("%d\n", d + 1);
				break;
			}
	}
	if (c < b)printf("NA\n");
}
return;
}```

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:

10000
5000 3150
5000 5000
0 0
5000 1050
5000 3980
5000 210
5000 5000
5000 5000
0 0
5000 2100
5000 2100
5000 2100
29170
100000 100000
100000 100000
100000 100000
100000 100000
100000 100000
100000 100000
100000 100000
100000 101000
100000 100000
100000 100000
100000 100000
100000 70831
0
 10000
1225 3150
5000 5000
0 0
5000 1050
5000 3980
5000 210
5000 5000
5000 5000
0 0
5000 2100
5000 2494
5000 2100
29170
100000 100000
100000 100000
100000 100000
100000 100000
100000 100000
100000 101000
100000 100000
100000 100000
100000 100000
100000 100000
100000 100000
100000 70831
0
 10000
1225 3150
5000 5000
0 0
5000 1050
5000 3980
5000 210
5000 5000
5000 5000
0 0
5075 2100
5000 2494
5000 2100
29170
100000 100000
100000 100000
100000 100000
100000 100000
100000 100000
100000 101000
100000 100000
100000 100000
100000 100000
100000 100000
100000 000000
100000 70831
0
 10000
1225 3150
5000 6694
0 0
5000 1050
5000 3980
5000 210
5000 5000
5000 5000
0 0
5075 2100
5000 2494
5000 2100
29170
100000 100000
100000 100000
100000 100000
100000 100000
100000 100000
100000 101000
100000 100000
100000 100000
100000 100000
100000 100000
100000 000000
100000 70831
0
 10000
1225 3150
5000 6694
0 0
5000 1050
5000 3980
5000 210
5000 5000
5000 5000
0 0
5075 2100
9143 2494
5000 2100
29170
100000 000000
100010 100000
100000 100000
100000 100000
100000 100000
100000 101000
100000 100000
100000 100000
100000 100000
100000 100000
100000 000000
100000 70831
0
 10000
1225 3150
5000 6694
0 0
5000 1050
5000 2519
5000 210
5000 5000
5000 5000
-1 0
5075 2100
9143 2494
5000 2100
29170
100000 000000
100010 110000
100000 100000
100000 100000
100000 100000
100000 101000
100000 100000
100000 100000
100000 100000
100000 100000
100000 000000
100000 70831
0
 10000
1225 3150
5000 5000
0 0
5000 1050
5000 3980
5000 210
5000 5000
5000 2831
0 0
5075 2100
5000 2494
5000 2100
29170
100000 100000
100000 100000
100000 100000
100000 100000
100000 100000
100000 101000
100000 100000
100000 100000
100000 100000
100000 100000
100000 000000
100000 70831
0
 10000
1225 3150
5000 6694
0 0
5000 1050
5000 3980
5000 210
5000 6907
5000 5000
0 0
5075 2100
5000 2494
5000 2100
29170
100000 100000
100010 100000
100000 100000
100000 100000
100000 100000
100000 101000
100000 100000
100000 100000
100000 100000
100000 100000
100000 000000
100000 70831
0
 10000
1225 3150
5000 6694
1 0
7545 1050
5000 2519
5000 210
5000 5000
5000 5000
-1 0
5075 1589
9143 2494
5000 2100
29170
100000 000000
100010 110000
100000 100000
100000 100000
100100 100000
100000 111000
100000 100000
101000 100000
100000 100000
100000 100000
100000 000000
100000 131331
0
 10000
1225 3150
5000 6694
0 0
5000 1050
5000 2519
5000 254
522 5000
5000 7588
-1 0
5075 3046
9143 2494
5000 2100
29170
100000 000000
100010 110000
100000 100000
100000 100000
101100 100000
100000 111000
101000 100000
101000 100000
100000 100000
100000 100000
100000 000000
100000 131331
0

6
NA
 10
NA
 10
11
 11
11
 11
1
 10
1
 8
11
 12
11
 6
1
 12
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[12], b, c, d, e, f;
	while (1) {
		scanf("%d", &b);
		c = 0;
		if (b == 0) break;
		for (d = 0;d < 12;d++)
		{
			scanf("%d %d", &e, &f);
			c += e - f;
			a[d] = c;
		}
		for (d = 0;d < 12;d++){
			if (a[d] >= b)
			{
				printf("%d\n", d + 1);
				break;
			}
	}
	if (c < b)printf("NA\n");
}
return;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
.LC3:
	.string	"NA"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	leaq	.LC1(%rip), %r13
	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
	subq	$104, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 88(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rax
	movq	%rax, 8(%rsp)
.L7:
	leaq	80(%rsp), %r12
	leaq	28(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L6:
	movq	8(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	testl	%eax, %eax
	je	.L2
	leaq	32(%rsp), %r15
	xorl	%r14d, %r14d
	leaq	24(%rsp), %rbx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rdx
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %ecx
	addq	$4, %r15
	addl	%r14d, %ecx
	subl	28(%rsp), %ecx
	movl	%ecx, -4(%r15)
	movl	%ecx, %r14d
	cmpq	%r12, %r15
	jne	.L3
	movl	20(%rsp), %eax
	cmpl	%eax, 32(%rsp)
	jge	.L9
	cmpl	36(%rsp), %eax
	jle	.L10
	cmpl	40(%rsp), %eax
	jle	.L11
	cmpl	44(%rsp), %eax
	jle	.L12
	cmpl	48(%rsp), %eax
	jle	.L13
	cmpl	52(%rsp), %eax
	jle	.L14
	cmpl	56(%rsp), %eax
	jle	.L15
	cmpl	60(%rsp), %eax
	jle	.L16
	cmpl	64(%rsp), %eax
	jle	.L17
	cmpl	68(%rsp), %eax
	jle	.L18
	cmpl	72(%rsp), %eax
	jle	.L19
	movl	$12, %edx
	cmpl	76(%rsp), %eax
	jle	.L4
.L5:
	cmpl	%eax, %r14d
	jge	.L6
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L7
.L9:
	movl	$1, %edx
	.p2align 4,,10
	.p2align 3
.L4:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	20(%rsp), %eax
	jmp	.L5
.L2:
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L24
	addq	$104, %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
.L10:
	.cfi_restore_state
	movl	$2, %edx
	jmp	.L4
.L11:
	movl	$3, %edx
	jmp	.L4
.L12:
	movl	$4, %edx
	jmp	.L4
.L13:
	movl	$5, %edx
	jmp	.L4
.L14:
	movl	$6, %edx
	jmp	.L4
.L15:
	movl	$7, %edx
	jmp	.L4
.L16:
	movl	$8, %edx
	jmp	.L4
.L17:
	movl	$9, %edx
	jmp	.L4
.L18:
	movl	$10, %edx
	jmp	.L4
.L19:
	movl	$11, %edx
	jmp	.L4
.L24:
	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 %d"
.LC2:
	.string	"%d\n"
.LC3:
	.string	"NA"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	leaq	.LC1(%rip), %r13
	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
	subq	$104, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 88(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rax
	movq	%rax, 8(%rsp)
.L7:
	leaq	80(%rsp), %r12
	leaq	28(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L6:
	movq	8(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	testl	%eax, %eax
	je	.L2
	leaq	32(%rsp), %r15
	xorl	%r14d, %r14d
	leaq	24(%rsp), %rbx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rdx
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %ecx
	addq	$4, %r15
	addl	%r14d, %ecx
	subl	28(%rsp), %ecx
	movl	%ecx, -4(%r15)
	movl	%ecx, %r14d
	cmpq	%r12, %r15
	jne	.L3
	movl	20(%rsp), %eax
	cmpl	%eax, 32(%rsp)
	jge	.L9
	cmpl	36(%rsp), %eax
	jle	.L10
	cmpl	40(%rsp), %eax
	jle	.L11
	cmpl	44(%rsp), %eax
	jle	.L12
	cmpl	48(%rsp), %eax
	jle	.L13
	cmpl	52(%rsp), %eax
	jle	.L14
	cmpl	56(%rsp), %eax
	jle	.L15
	cmpl	60(%rsp), %eax
	jle	.L16
	cmpl	64(%rsp), %eax
	jle	.L17
	cmpl	68(%rsp), %eax
	jle	.L18
	cmpl	72(%rsp), %eax
	jle	.L19
	movl	$12, %edx
	cmpl	76(%rsp), %eax
	jle	.L4
.L5:
	cmpl	%eax, %r14d
	jge	.L6
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L7
.L9:
	movl	$1, %edx
	.p2align 4,,10
	.p2align 3
.L4:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	20(%rsp), %eax
	jmp	.L5
.L2:
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L24
	addq	$104, %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
.L10:
	.cfi_restore_state
	movl	$2, %edx
	jmp	.L4
.L11:
	movl	$3, %edx
	jmp	.L4
.L12:
	movl	$4, %edx
	jmp	.L4
.L13:
	movl	$5, %edx
	jmp	.L4
.L14:
	movl	$6, %edx
	jmp	.L4
.L15:
	movl	$7, %edx
	jmp	.L4
.L16:
	movl	$8, %edx
	jmp	.L4
.L17:
	movl	$9, %edx
	jmp	.L4
.L18:
	movl	$10, %edx
	jmp	.L4
.L19:
	movl	$11, %edx
	jmp	.L4
.L24:
	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:
```