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 n, m;	/* n:??????????????°, m:?????§????????? */
	int max = 0;
	int price[1000];
	int i = 0, j;

	while (1) {
		scanf("%d %d", &n, &m);
		if (n == 0 && m == 0)
			break;
		else {
			for (i = 0; i < n; i++) {
				scanf("%d", &price[i]);
			}
			/* printf("n = %d, m = %d\n", n, m);
			for (i = 0; i < n; i++)
				printf("price[%d] = %d\n", i, price[i]);
			*/

			for (i = 0; i < n - 1; i++) {
				for (j = i + 1; j < n; j++) {
					if (max < (price[i] + price[j]) && m >= (price[i] + price[j])) {
						max = (price[i] + price[j]);
					}
					/*printf("i = %d, j = %d, max = %d, price+ = %d\n", i, j, max, price[i] + price[j]);*/
				}
			}
			if (max == 0)
				printf("NONE\n");
			else
				printf("%d\n", max);
		}
		max = 0;

	}

	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"NONE"
.LC3:
	.string	"%d\n"
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$4056, %rsp
	.cfi_def_cfa_offset 4112
	movq	%fs:40, %rax
	movq	%rax, 4040(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rax
	leaq	28(%rsp), %r13
	movq	%rax, 8(%rsp)
	leaq	24(%rsp), %r12
	leaq	36(%rsp), %rbx
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r13, %rdx
	movq	%r12, %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %r11d
	testl	%r11d, %r11d
	jne	.L21
	movl	28(%rsp), %eax
	testl	%eax, %eax
	je	.L22
.L7:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L2
.L21:
	jle	.L5
	leaq	32(%rsp), %r15
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r15, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %r11d
	addq	$4, %r15
	cmpl	%ebp, %r11d
	jg	.L8
.L5:
	cmpl	$1, %r11d
	jle	.L7
	leal	-2(%r11), %ebp
	movl	28(%rsp), %r9d
	xorl	%r8d, %r8d
	leal	-1(%r11), %r14d
	movq	8(%rsp), %r10
	addq	$2, %rbp
	movl	$1, %edi
	.p2align 4,,10
	.p2align 3
.L12:
	cmpl	%edi, %r11d
	jle	.L9
	movl	%r14d, %eax
	movl	(%r10), %esi
	subl	%edi, %eax
	leaq	-1(%rdi,%rax), %rax
	leaq	(%rbx,%rax,4), %rcx
	movq	%r10, %rax
	.p2align 4,,10
	.p2align 3
.L11:
	movl	4(%rax), %edx
	addl	%esi, %edx
	cmpl	%edx, %r8d
	jge	.L10
	cmpl	%edx, %r9d
	cmovge	%edx, %r8d
.L10:
	addq	$4, %rax
	cmpq	%rcx, %rax
	jne	.L11
.L9:
	addq	$1, %rdi
	addq	$4, %r10
	cmpq	%rbp, %rdi
	jne	.L12
	testl	%r8d, %r8d
	je	.L7
	movl	%r8d, %edx
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L22:
	movq	4040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$4056, %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
.L23:
	.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 %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"NONE"
.LC3:
	.string	"%d\n"
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$4056, %rsp
	.cfi_def_cfa_offset 4112
	movq	%fs:40, %rax
	movq	%rax, 4040(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rax
	leaq	28(%rsp), %r13
	movq	%rax, 8(%rsp)
	leaq	24(%rsp), %r12
	leaq	36(%rsp), %rbx
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r13, %rdx
	movq	%r12, %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %r11d
	testl	%r11d, %r11d
	jne	.L21
	movl	28(%rsp), %eax
	testl	%eax, %eax
	je	.L22
.L7:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L2
.L21:
	jle	.L5
	leaq	32(%rsp), %r15
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r15, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %r11d
	addq	$4, %r15
	cmpl	%ebp, %r11d
	jg	.L8
.L5:
	cmpl	$1, %r11d
	jle	.L7
	leal	-2(%r11), %ebp
	movl	28(%rsp), %r9d
	xorl	%r8d, %r8d
	leal	-1(%r11), %r14d
	movq	8(%rsp), %r10
	addq	$2, %rbp
	movl	$1, %edi
	.p2align 4,,10
	.p2align 3
.L12:
	cmpl	%edi, %r11d
	jle	.L9
	movl	%r14d, %eax
	movl	(%r10), %esi
	subl	%edi, %eax
	leaq	-1(%rdi,%rax), %rax
	leaq	(%rbx,%rax,4), %rcx
	movq	%r10, %rax
	.p2align 4,,10
	.p2align 3
.L11:
	movl	4(%rax), %edx
	addl	%esi, %edx
	cmpl	%edx, %r8d
	jge	.L10
	cmpl	%edx, %r9d
	cmovge	%edx, %r8d
.L10:
	addq	$4, %rax
	cmpq	%rcx, %rax
	jne	.L11
.L9:
	addq	$1, %rdi
	addq	$4, %r10
	cmpq	%rbp, %rdi
	jne	.L12
	testl	%r8d, %r8d
	je	.L7
	movl	%r8d, %edx
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L22:
	movq	4040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$4056, %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
.L23:
	.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 %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"NONE"
.LC3:
	.string	"%d\n"
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$4056, %rsp
	.cfi_def_cfa_offset 4112
	movq	%fs:40, %rax
	movq	%rax, 4040(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rax
	leaq	28(%rsp), %r13
	movq	%rax, 8(%rsp)
	leaq	24(%rsp), %r12
	leaq	36(%rsp), %rbx
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r13, %rdx
	movq	%r12, %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %r11d
	testl	%r11d, %r11d
	jne	.L21
	movl	28(%rsp), %eax
	testl	%eax, %eax
	je	.L22
.L7:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L2
.L21:
	jle	.L5
	leaq	32(%rsp), %r15
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r15, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %r11d
	addq	$4, %r15
	cmpl	%ebp, %r11d
	jg	.L8
.L5:
	cmpl	$1, %r11d
	jle	.L7
	leal	-2(%r11), %ebp
	movl	28(%rsp), %r9d
	xorl	%r8d, %r8d
	leal	-1(%r11), %r14d
	movq	8(%rsp), %r10
	addq	$2, %rbp
	movl	$1, %edi
	.p2align 4,,10
	.p2align 3
.L12:
	cmpl	%edi, %r11d
	jle	.L9
	movl	%r14d, %eax
	movl	(%r10), %esi
	subl	%edi, %eax
	leaq	-1(%rdi,%rax), %rax
	leaq	(%rbx,%rax,4), %rcx
	movq	%r10, %rax
	.p2align 4,,10
	.p2align 3
.L11:
	movl	4(%rax), %edx
	addl	%esi, %edx
	cmpl	%edx, %r8d
	jge	.L10
	cmpl	%edx, %r9d
	cmovge	%edx, %r8d
.L10:
	addq	$4, %rax
	cmpq	%rcx, %rax
	jne	.L11
.L9:
	addq	$1, %rdi
	addq	$4, %r10
	cmpq	%rbp, %rdi
	jne	.L12
	testl	%r8d, %r8d
	je	.L7
	movl	%r8d, %edx
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L22:
	movq	4040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$4056, %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
.L23:
	.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)
{
	int n, m;	/* n:??????????????°, m:?????§????????? */
	int max = 0;
	int price[1000];
	int i = 0, j;

	while (1) {
		scanf("%d %d", &n, &m);
		if (n == 0 && m == 0)
			break;
		else {
			for (i = 0; i < n; i++) {
				scanf("%d", &price[i]);
			}
			/* printf("n = %d, m = %d\n", n, m);
			for (i = 0; i < n; i++)
				printf("price[%d] = %d\n", i, price[i]);
			*/

			for (i = 0; i < n - 1; i++) {
				for (j = i + 1; j < n; j++) {
					if (max < (price[i] + price[j]) && m >= (price[i] + price[j])) {
						max = (price[i] + price[j]);
					}
					/*printf("i = %d, j = %d, max = %d, price+ = %d\n", i, j, max, price[i] + price[j]);*/
				}
			}
			if (max == 0)
				printf("NONE\n");
			else
				printf("%d\n", max);
		}
		max = 0;

	}

	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 n, m;	/* n:??????????????°, m:?????§????????? */
	int max = 0;
	int price[1000];
	int i = 0, j;

	while (1) {
		scanf("%d %d", &n, &m);
		if (n == 0 && m == 0)
			break;
		else {
			for (i = 0; i < n; i++) {
				scanf("%d", &price[i]);
			}
			/* printf("n = %d, m = %d\n", n, m);
			for (i = 0; i < n; i++)
				printf("price[%d] = %d\n", i, price[i]);
			*/

			for (i = 0; i < n - 1; i++) {
				for (j = i + 1; j < n; j++) {
					if (max < (price[i] + price[j]) && m >= (price[i] + price[j])) {
						max = (price[i] + price[j]);
					}
					/*printf("i = %d, j = %d, max = %d, price+ = %d\n", i, j, max, price[i] + price[j]);*/
				}
			}
			if (max == 0)
				printf("NONE\n");
			else
				printf("%d\n", max);
		}
		max = 0;

	}

	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 45
17 20 30
6 10
1 2 5 8 9 11
7 100
11 34 83 47 59 29 70
4 100
80 70 60 50
4 20
10 5 10 16
0 0
 3 45
17 20 30
6 10
1 2 5 8 4 11
7 000
11 34 83 47 59 29 70
4 100
80 70 62 50
4 20
10 5 10 16
0 0
 3 45
2 20 30
6 10
1 2 5 8 4 11
7 100
11 34 83 47 59 29 70
4 100
80 70 62 50
4 20
10 5 10 16
0 0
 3 45
17 20 30
6 10
1 2 5 8 4 11
7 000
11 34 83 47 59 29 70
4 100
80 70 62 50
4 20
10 5 1 16
0 0
 3 45
17 20 30
6 10
1 2 5 8 4 11
7 000
22 34 83 47 59 29 70
4 100
3 70 62 50
4 20
10 5 10 16
0 0
 3 45
17 20 30
6 7
1 2 5 8 4 11
7 000
22 34 102 94 59 29 70
4 100
80 70 80 50
4 20
10 5 10 16
0 0
 3 45
1 20 30
6 10
1 2 8 8 9 11
7 100
11 34 83 47 59 29 70
4 100
80 70 60 50
4 20
10 5 10 16
0 0
 3 45
17 20 30
6 10
1 2 5 8 1 11
7 000
22 34 83 94 59 29 70
4 100
6 70 80 50
4 20
10 5 10 16
0 0
 3 48
17 20 30
6 7
1 2 5 1 4 11
7 000
22 34 102 94 59 39 70
4 100
80 70 119 50
4 20
10 5 10 16
0 0
 3 45
10 20 30
6 10
1 2 5 8 9 11
7 100
11 34 83 47 59 29 70
4 110
80 70 60 50
4 20
10 5 10 16
0 0

37
10
99
NONE
20
 37
10
NONE
NONE
20
 32
10
99
NONE
20
 37
10
NONE
NONE
17
 37
10
NONE
73
20
 37
7
NONE
NONE
20
 31
10
99
NONE
20
 37
10
NONE
86
20
 47
7
NONE
NONE
20
 40
10
99
110
20

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 n, m;	/* n:??????????????°, m:?????§????????? */
	int max = 0;
	int price[1000];
	int i = 0, j;

	while (1) {
		scanf("%d %d", &n, &m);
		if (n == 0 && m == 0)
			break;
		else {
			for (i = 0; i < n; i++) {
				scanf("%d", &price[i]);
			}
			/* printf("n = %d, m = %d\n", n, m);
			for (i = 0; i < n; i++)
				printf("price[%d] = %d\n", i, price[i]);
			*/

			for (i = 0; i < n - 1; i++) {
				for (j = i + 1; j < n; j++) {
					if (max < (price[i] + price[j]) && m >= (price[i] + price[j])) {
						max = (price[i] + price[j]);
					}
					/*printf("i = %d, j = %d, max = %d, price+ = %d\n", i, j, max, price[i] + price[j]);*/
				}
			}
			if (max == 0)
				printf("NONE\n");
			else
				printf("%d\n", max);
		}
		max = 0;

	}

	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"NONE"
.LC3:
	.string	"%d\n"
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$4056, %rsp
	.cfi_def_cfa_offset 4112
	movq	%fs:40, %rax
	movq	%rax, 4040(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rax
	leaq	28(%rsp), %r13
	movq	%rax, 8(%rsp)
	leaq	24(%rsp), %r12
	leaq	36(%rsp), %rbx
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r13, %rdx
	movq	%r12, %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %r11d
	testl	%r11d, %r11d
	jne	.L21
	movl	28(%rsp), %eax
	testl	%eax, %eax
	je	.L22
.L7:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L2
.L21:
	jle	.L5
	leaq	32(%rsp), %r15
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r15, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %r11d
	addq	$4, %r15
	cmpl	%ebp, %r11d
	jg	.L8
.L5:
	cmpl	$1, %r11d
	jle	.L7
	leal	-2(%r11), %ebp
	movl	28(%rsp), %r9d
	xorl	%r8d, %r8d
	leal	-1(%r11), %r14d
	movq	8(%rsp), %r10
	addq	$2, %rbp
	movl	$1, %edi
	.p2align 4,,10
	.p2align 3
.L12:
	cmpl	%edi, %r11d
	jle	.L9
	movl	%r14d, %eax
	movl	(%r10), %esi
	subl	%edi, %eax
	leaq	-1(%rdi,%rax), %rax
	leaq	(%rbx,%rax,4), %rcx
	movq	%r10, %rax
	.p2align 4,,10
	.p2align 3
.L11:
	movl	4(%rax), %edx
	addl	%esi, %edx
	cmpl	%edx, %r8d
	jge	.L10
	cmpl	%edx, %r9d
	cmovge	%edx, %r8d
.L10:
	addq	$4, %rax
	cmpq	%rcx, %rax
	jne	.L11
.L9:
	addq	$1, %rdi
	addq	$4, %r10
	cmpq	%rbp, %rdi
	jne	.L12
	testl	%r8d, %r8d
	je	.L7
	movl	%r8d, %edx
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L22:
	movq	4040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$4056, %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
.L23:
	.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 %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"NONE"
.LC3:
	.string	"%d\n"
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$4056, %rsp
	.cfi_def_cfa_offset 4112
	movq	%fs:40, %rax
	movq	%rax, 4040(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rax
	leaq	28(%rsp), %r13
	movq	%rax, 8(%rsp)
	leaq	24(%rsp), %r12
	leaq	36(%rsp), %rbx
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r13, %rdx
	movq	%r12, %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %r11d
	testl	%r11d, %r11d
	jne	.L21
	movl	28(%rsp), %eax
	testl	%eax, %eax
	je	.L22
.L7:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L2
.L21:
	jle	.L5
	leaq	32(%rsp), %r15
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r15, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %r11d
	addq	$4, %r15
	cmpl	%ebp, %r11d
	jg	.L8
.L5:
	cmpl	$1, %r11d
	jle	.L7
	leal	-2(%r11), %ebp
	movl	28(%rsp), %r9d
	xorl	%r8d, %r8d
	leal	-1(%r11), %r14d
	movq	8(%rsp), %r10
	addq	$2, %rbp
	movl	$1, %edi
	.p2align 4,,10
	.p2align 3
.L12:
	cmpl	%edi, %r11d
	jle	.L9
	movl	%r14d, %eax
	movl	(%r10), %esi
	subl	%edi, %eax
	leaq	-1(%rdi,%rax), %rax
	leaq	(%rbx,%rax,4), %rcx
	movq	%r10, %rax
	.p2align 4,,10
	.p2align 3
.L11:
	movl	4(%rax), %edx
	addl	%esi, %edx
	cmpl	%edx, %r8d
	jge	.L10
	cmpl	%edx, %r9d
	cmovge	%edx, %r8d
.L10:
	addq	$4, %rax
	cmpq	%rcx, %rax
	jne	.L11
.L9:
	addq	$1, %rdi
	addq	$4, %r10
	cmpq	%rbp, %rdi
	jne	.L12
	testl	%r8d, %r8d
	je	.L7
	movl	%r8d, %edx
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L22:
	movq	4040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$4056, %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
.L23:
	.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:
```