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) {
	while(1){
		int l;
		scanf("%d",&l);
		if(l==0) break;
		int i,m[12],n[12];
		for(i=0;i<12;i++){
			scanf("%d %d",&m[i],&n[i]);
		}
		int p[12];
		for(i=0;i<12;i++){
			p[i]=m[i]-n[i];
		}
		int sum=p[0],k=1;
		for(i=0;i<12;i++){
			while(l>sum){
				i++;
				sum=sum+p[i];
				k++;
			}
		}
		if(k<=12){
		    printf("%d\n",k);
		}
		else{
		    printf("NA\n");
		}
	}
	return 0;
}
```

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
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC1(%rip), %rbx
	subq	$184, %rsp
	.cfi_def_cfa_offset 240
	movq	%fs:40, %rax
	movq	%rax, 168(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	je	.L2
	leaq	64(%rsp), %r13
	leaq	16(%rsp), %r14
	movq	%r13, %r15
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r13, %rdx
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$4, %r14
	addq	$4, %r13
	cmpq	%r15, %r14
	jne	.L3
	movdqu	36(%rsp), %xmm0
	movdqu	84(%rsp), %xmm2
	movl	$1, %r8d
	xorl	%ecx, %ecx
	movdqu	20(%rsp), %xmm1
	movdqu	68(%rsp), %xmm3
	movl	52(%rsp), %edx
	subl	100(%rsp), %edx
	psubd	%xmm2, %xmm0
	movl	%edx, 148(%rsp)
	movl	60(%rsp), %r9d
	psubd	%xmm3, %xmm1
	movl	56(%rsp), %edx
	subl	108(%rsp), %r9d
	movups	%xmm1, 116(%rsp)
	subl	104(%rsp), %edx
	movl	16(%rsp), %eax
	movl	%r9d, 156(%rsp)
	movl	12(%rsp), %esi
	movl	%edx, 152(%rsp)
	subl	64(%rsp), %eax
	movups	%xmm0, 132(%rsp)
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L7:
	leal	1(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	1(%r8), %edi
	cmpl	%esi, %eax
	jge	.L24
	leal	2(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	2(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	3(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	3(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	4(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	4(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	5(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	5(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	6(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	6(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	7(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	7(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	8(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	8(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	9(%rcx), %edx
	leal	9(%r8), %r10d
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	movl	%eax, %edi
	cmpl	%eax, %esi
	jle	.L22
	leal	10(%rcx), %edx
	movslq	%edx, %rax
	addl	112(%rsp,%rax,4), %edi
	movl	%edi, %eax
	leal	10(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	addl	%r9d, %eax
	leal	11(%rcx), %edx
	leal	11(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	12(%rcx), %edx
	addl	$12, %r8d
	movslq	%edx, %rcx
	addl	112(%rsp,%rcx,4), %eax
.L5:
	leal	1(%rdx), %ecx
	cmpl	$11, %ecx
	jg	.L6
.L4:
	cmpl	%esi, %eax
	jl	.L7
.L6:
	cmpl	$12, %r8d
	jg	.L9
	movl	%r8d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L24:
	movl	%edi, %r8d
	jmp	.L5
.L9:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L11
.L22:
	movl	%r10d, %r8d
	jmp	.L5
.L2:
	movq	168(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L41
	addq	$184, %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
.L41:
	.cfi_restore_state
	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
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC1(%rip), %rbx
	subq	$184, %rsp
	.cfi_def_cfa_offset 240
	movq	%fs:40, %rax
	movq	%rax, 168(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	je	.L2
	leaq	64(%rsp), %r13
	leaq	16(%rsp), %r14
	movq	%r13, %r15
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r13, %rdx
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$4, %r14
	addq	$4, %r13
	cmpq	%r15, %r14
	jne	.L3
	movdqu	36(%rsp), %xmm0
	movdqu	84(%rsp), %xmm2
	movl	$1, %r8d
	xorl	%ecx, %ecx
	movdqu	20(%rsp), %xmm1
	movdqu	68(%rsp), %xmm3
	movl	52(%rsp), %edx
	subl	100(%rsp), %edx
	psubd	%xmm2, %xmm0
	movl	%edx, 148(%rsp)
	movl	60(%rsp), %r9d
	psubd	%xmm3, %xmm1
	movl	56(%rsp), %edx
	subl	108(%rsp), %r9d
	movups	%xmm1, 116(%rsp)
	subl	104(%rsp), %edx
	movl	16(%rsp), %eax
	movl	%r9d, 156(%rsp)
	movl	12(%rsp), %esi
	movl	%edx, 152(%rsp)
	subl	64(%rsp), %eax
	movups	%xmm0, 132(%rsp)
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L7:
	leal	1(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	1(%r8), %edi
	cmpl	%esi, %eax
	jge	.L24
	leal	2(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	2(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	3(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	3(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	4(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	4(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	5(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	5(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	6(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	6(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	7(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	7(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	8(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	8(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	9(%rcx), %edx
	leal	9(%r8), %r10d
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	movl	%eax, %edi
	cmpl	%eax, %esi
	jle	.L22
	leal	10(%rcx), %edx
	movslq	%edx, %rax
	addl	112(%rsp,%rax,4), %edi
	movl	%edi, %eax
	leal	10(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	addl	%r9d, %eax
	leal	11(%rcx), %edx
	leal	11(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	12(%rcx), %edx
	addl	$12, %r8d
	movslq	%edx, %rcx
	addl	112(%rsp,%rcx,4), %eax
.L5:
	leal	1(%rdx), %ecx
	cmpl	$11, %ecx
	jg	.L6
.L4:
	cmpl	%esi, %eax
	jl	.L7
.L6:
	cmpl	$12, %r8d
	jg	.L9
	movl	%r8d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L24:
	movl	%edi, %r8d
	jmp	.L5
.L9:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L11
.L22:
	movl	%r10d, %r8d
	jmp	.L5
.L2:
	movq	168(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L41
	addq	$184, %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
.L41:
	.cfi_restore_state
	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
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC1(%rip), %rbx
	subq	$184, %rsp
	.cfi_def_cfa_offset 240
	movq	%fs:40, %rax
	movq	%rax, 168(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	je	.L2
	leaq	64(%rsp), %r13
	leaq	16(%rsp), %r14
	movq	%r13, %r15
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r13, %rdx
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$4, %r14
	addq	$4, %r13
	cmpq	%r15, %r14
	jne	.L3
	movdqu	36(%rsp), %xmm0
	movdqu	84(%rsp), %xmm2
	movl	$1, %r8d
	xorl	%ecx, %ecx
	movdqu	20(%rsp), %xmm1
	movdqu	68(%rsp), %xmm3
	movl	52(%rsp), %edx
	subl	100(%rsp), %edx
	psubd	%xmm2, %xmm0
	movl	%edx, 148(%rsp)
	movl	60(%rsp), %r9d
	psubd	%xmm3, %xmm1
	movl	56(%rsp), %edx
	subl	108(%rsp), %r9d
	movups	%xmm1, 116(%rsp)
	subl	104(%rsp), %edx
	movl	16(%rsp), %eax
	movl	%r9d, 156(%rsp)
	movl	12(%rsp), %esi
	movl	%edx, 152(%rsp)
	subl	64(%rsp), %eax
	movups	%xmm0, 132(%rsp)
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L7:
	leal	1(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	1(%r8), %edi
	cmpl	%esi, %eax
	jge	.L24
	leal	2(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	2(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	3(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	3(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	4(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	4(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	5(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	5(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	6(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	6(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	7(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	7(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	8(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	8(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	9(%rcx), %edx
	leal	9(%r8), %r10d
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	movl	%eax, %edi
	cmpl	%eax, %esi
	jle	.L22
	leal	10(%rcx), %edx
	movslq	%edx, %rax
	addl	112(%rsp,%rax,4), %edi
	movl	%edi, %eax
	leal	10(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	addl	%r9d, %eax
	leal	11(%rcx), %edx
	leal	11(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	12(%rcx), %edx
	addl	$12, %r8d
	movslq	%edx, %rcx
	addl	112(%rsp,%rcx,4), %eax
.L5:
	leal	1(%rdx), %ecx
	cmpl	$11, %ecx
	jg	.L6
.L4:
	cmpl	%esi, %eax
	jl	.L7
.L6:
	cmpl	$12, %r8d
	jg	.L9
	movl	%r8d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L24:
	movl	%edi, %r8d
	jmp	.L5
.L9:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L11
.L22:
	movl	%r10d, %r8d
	jmp	.L5
.L2:
	movq	168(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L41
	addq	$184, %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
.L41:
	.cfi_restore_state
	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) {
	while(1){
		int l;
		scanf("%d",&l);
		if(l==0) break;
		int i,m[12],n[12];
		for(i=0;i<12;i++){
			scanf("%d %d",&m[i],&n[i]);
		}
		int p[12];
		for(i=0;i<12;i++){
			p[i]=m[i]-n[i];
		}
		int sum=p[0],k=1;
		for(i=0;i<12;i++){
			while(l>sum){
				i++;
				sum=sum+p[i];
				k++;
			}
		}
		if(k<=12){
		    printf("%d\n",k);
		}
		else{
		    printf("NA\n");
		}
	}
	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) {
	while(1){
		int l;
		scanf("%d",&l);
		if(l==0) break;
		int i,m[12],n[12];
		for(i=0;i<12;i++){
			scanf("%d %d",&m[i],&n[i]);
		}
		int p[12];
		for(i=0;i<12;i++){
			p[i]=m[i]-n[i];
		}
		int sum=p[0],k=1;
		for(i=0;i<12;i++){
			while(l>sum){
				i++;
				sum=sum+p[i];
				k++;
			}
		}
		if(k<=12){
		    printf("%d\n",k);
		}
		else{
		    printf("NA\n");
		}
	}
	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:

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) {
	while(1){
		int l;
		scanf("%d",&l);
		if(l==0) break;
		int i,m[12],n[12];
		for(i=0;i<12;i++){
			scanf("%d %d",&m[i],&n[i]);
		}
		int p[12];
		for(i=0;i<12;i++){
			p[i]=m[i]-n[i];
		}
		int sum=p[0],k=1;
		for(i=0;i<12;i++){
			while(l>sum){
				i++;
				sum=sum+p[i];
				k++;
			}
		}
		if(k<=12){
		    printf("%d\n",k);
		}
		else{
		    printf("NA\n");
		}
	}
	return 0;
}
```

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
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC1(%rip), %rbx
	subq	$184, %rsp
	.cfi_def_cfa_offset 240
	movq	%fs:40, %rax
	movq	%rax, 168(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	je	.L2
	leaq	64(%rsp), %r13
	leaq	16(%rsp), %r14
	movq	%r13, %r15
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r13, %rdx
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$4, %r14
	addq	$4, %r13
	cmpq	%r15, %r14
	jne	.L3
	movdqu	36(%rsp), %xmm0
	movdqu	84(%rsp), %xmm2
	movl	$1, %r8d
	xorl	%ecx, %ecx
	movdqu	20(%rsp), %xmm1
	movdqu	68(%rsp), %xmm3
	movl	52(%rsp), %edx
	subl	100(%rsp), %edx
	psubd	%xmm2, %xmm0
	movl	%edx, 148(%rsp)
	movl	60(%rsp), %r9d
	psubd	%xmm3, %xmm1
	movl	56(%rsp), %edx
	subl	108(%rsp), %r9d
	movups	%xmm1, 116(%rsp)
	subl	104(%rsp), %edx
	movl	16(%rsp), %eax
	movl	%r9d, 156(%rsp)
	movl	12(%rsp), %esi
	movl	%edx, 152(%rsp)
	subl	64(%rsp), %eax
	movups	%xmm0, 132(%rsp)
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L7:
	leal	1(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	1(%r8), %edi
	cmpl	%esi, %eax
	jge	.L24
	leal	2(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	2(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	3(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	3(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	4(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	4(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	5(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	5(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	6(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	6(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	7(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	7(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	8(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	8(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	9(%rcx), %edx
	leal	9(%r8), %r10d
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	movl	%eax, %edi
	cmpl	%eax, %esi
	jle	.L22
	leal	10(%rcx), %edx
	movslq	%edx, %rax
	addl	112(%rsp,%rax,4), %edi
	movl	%edi, %eax
	leal	10(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	addl	%r9d, %eax
	leal	11(%rcx), %edx
	leal	11(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	12(%rcx), %edx
	addl	$12, %r8d
	movslq	%edx, %rcx
	addl	112(%rsp,%rcx,4), %eax
.L5:
	leal	1(%rdx), %ecx
	cmpl	$11, %ecx
	jg	.L6
.L4:
	cmpl	%esi, %eax
	jl	.L7
.L6:
	cmpl	$12, %r8d
	jg	.L9
	movl	%r8d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L24:
	movl	%edi, %r8d
	jmp	.L5
.L9:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L11
.L22:
	movl	%r10d, %r8d
	jmp	.L5
.L2:
	movq	168(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L41
	addq	$184, %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
.L41:
	.cfi_restore_state
	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
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC1(%rip), %rbx
	subq	$184, %rsp
	.cfi_def_cfa_offset 240
	movq	%fs:40, %rax
	movq	%rax, 168(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	je	.L2
	leaq	64(%rsp), %r13
	leaq	16(%rsp), %r14
	movq	%r13, %r15
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r13, %rdx
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$4, %r14
	addq	$4, %r13
	cmpq	%r15, %r14
	jne	.L3
	movdqu	36(%rsp), %xmm0
	movdqu	84(%rsp), %xmm2
	movl	$1, %r8d
	xorl	%ecx, %ecx
	movdqu	20(%rsp), %xmm1
	movdqu	68(%rsp), %xmm3
	movl	52(%rsp), %edx
	subl	100(%rsp), %edx
	psubd	%xmm2, %xmm0
	movl	%edx, 148(%rsp)
	movl	60(%rsp), %r9d
	psubd	%xmm3, %xmm1
	movl	56(%rsp), %edx
	subl	108(%rsp), %r9d
	movups	%xmm1, 116(%rsp)
	subl	104(%rsp), %edx
	movl	16(%rsp), %eax
	movl	%r9d, 156(%rsp)
	movl	12(%rsp), %esi
	movl	%edx, 152(%rsp)
	subl	64(%rsp), %eax
	movups	%xmm0, 132(%rsp)
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L7:
	leal	1(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	1(%r8), %edi
	cmpl	%esi, %eax
	jge	.L24
	leal	2(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	2(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	3(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	3(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	4(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	4(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	5(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	5(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	6(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	6(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	7(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	7(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	8(%rcx), %edx
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	leal	8(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	9(%rcx), %edx
	leal	9(%r8), %r10d
	movslq	%edx, %rdi
	addl	112(%rsp,%rdi,4), %eax
	movl	%eax, %edi
	cmpl	%eax, %esi
	jle	.L22
	leal	10(%rcx), %edx
	movslq	%edx, %rax
	addl	112(%rsp,%rax,4), %edi
	movl	%edi, %eax
	leal	10(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	addl	%r9d, %eax
	leal	11(%rcx), %edx
	leal	11(%r8), %edi
	cmpl	%eax, %esi
	jle	.L24
	leal	12(%rcx), %edx
	addl	$12, %r8d
	movslq	%edx, %rcx
	addl	112(%rsp,%rcx,4), %eax
.L5:
	leal	1(%rdx), %ecx
	cmpl	$11, %ecx
	jg	.L6
.L4:
	cmpl	%esi, %eax
	jl	.L7
.L6:
	cmpl	$12, %r8d
	jg	.L9
	movl	%r8d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L24:
	movl	%edi, %r8d
	jmp	.L5
.L9:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L11
.L22:
	movl	%r10d, %r8d
	jmp	.L5
.L2:
	movq	168(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L41
	addq	$184, %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
.L41:
	.cfi_restore_state
	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:
```