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 dp[1001],n,m,i,j,a[1001],max;
int main()
{
    scanf("%d %d",&n,&m);
    while((m!=0)&&(n!=0))
    {
        max=-1;
        for(i=1;i<=n;i=i+1)
        {
            scanf("%d",&a[i]);
            for(j=1;j<i;j=j+1)
            {
                if(a[i]+a[j]<=m)
                    if(a[i]+a[j]>max)
                      max=a[i]+a[j];
            }
        }
        if(max!=-1)
          printf("%d\n",max);
        else
          printf("NONE\n");
       scanf("%d %d",&n,&m);
    }
    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	"%d\n"
.LC3:
	.string	"NONE"
	.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
	leaq	m(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	n(%rip), %r14
	movq	%r15, %rdx
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r14, %rsi
	leaq	.LC0(%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	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L25:
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	m(%rip), %edx
	testl	%edx, %edx
	je	.L16
	movl	n(%rip), %eax
	testl	%eax, %eax
	je	.L16
	movl	$-1, max(%rip)
	movl	$1, i(%rip)
	jle	.L3
	leaq	a(%rip), %rbx
	movl	$1, %ecx
	leaq	.LC1(%rip), %rbp
	leaq	8(%rbx), %r12
	.p2align 4,,10
	.p2align 3
.L9:
	movslq	%ecx, %rcx
	movq	%rbp, %rdi
	xorl	%eax, %eax
	leaq	(%rbx,%rcx,4), %rsi
	call	__isoc99_scanf@PLT
	movl	i(%rip), %ecx
	movl	$1, j(%rip)
	cmpl	$1, %ecx
	jle	.L5
	movslq	%ecx, %rax
	leal	-2(%rcx), %edx
	movl	m(%rip), %edi
	xorl	%r10d, %r10d
	movl	max(%rip), %r9d
	movl	(%rbx,%rax,4), %r8d
	leaq	(%r12,%rdx,4), %rsi
	leaq	4+a(%rip), %rax
	.p2align 4,,10
	.p2align 3
.L7:
	movl	(%rax), %edx
	addl	%r8d, %edx
	cmpl	%edx, %edi
	jl	.L6
	cmpl	%edx, %r9d
	jge	.L6
	movl	%edx, %r9d
	movl	$1, %r10d
.L6:
	addq	$4, %rax
	cmpq	%rax, %rsi
	jne	.L7
	movl	%ecx, j(%rip)
	testb	%r10b, %r10b
	je	.L5
	movl	%r9d, max(%rip)
.L5:
	addl	$1, %ecx
	cmpl	n(%rip), %ecx
	movl	%ecx, i(%rip)
	jle	.L9
	movl	max(%rip), %edx
	cmpl	$-1, %edx
	je	.L3
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L10:
	movq	%r15, %rdx
	movq	%r14, %rsi
	jmp	.L25
.L3:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L10
.L16:
	addq	$8, %rsp
	.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
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	max
	.bss
	.align 4
	.type	max, @object
	.size	max, 4
max:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 4004
a:
	.zero	4004
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 4004
dp:
	.zero	4004
	.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	"%d\n"
.LC3:
	.string	"NONE"
	.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
	leaq	m(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	n(%rip), %r14
	movq	%r15, %rdx
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r14, %rsi
	leaq	.LC0(%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	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L25:
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	m(%rip), %edx
	testl	%edx, %edx
	je	.L16
	movl	n(%rip), %eax
	testl	%eax, %eax
	je	.L16
	movl	$-1, max(%rip)
	movl	$1, i(%rip)
	jle	.L3
	leaq	a(%rip), %rbx
	movl	$1, %ecx
	leaq	.LC1(%rip), %rbp
	leaq	8(%rbx), %r12
	.p2align 4,,10
	.p2align 3
.L9:
	movslq	%ecx, %rcx
	movq	%rbp, %rdi
	xorl	%eax, %eax
	leaq	(%rbx,%rcx,4), %rsi
	call	__isoc99_scanf@PLT
	movl	i(%rip), %ecx
	movl	$1, j(%rip)
	cmpl	$1, %ecx
	jle	.L5
	movslq	%ecx, %rax
	leal	-2(%rcx), %edx
	movl	m(%rip), %edi
	xorl	%r10d, %r10d
	movl	max(%rip), %r9d
	movl	(%rbx,%rax,4), %r8d
	leaq	(%r12,%rdx,4), %rsi
	leaq	4+a(%rip), %rax
	.p2align 4,,10
	.p2align 3
.L7:
	movl	(%rax), %edx
	addl	%r8d, %edx
	cmpl	%edx, %edi
	jl	.L6
	cmpl	%edx, %r9d
	jge	.L6
	movl	%edx, %r9d
	movl	$1, %r10d
.L6:
	addq	$4, %rax
	cmpq	%rax, %rsi
	jne	.L7
	movl	%ecx, j(%rip)
	testb	%r10b, %r10b
	je	.L5
	movl	%r9d, max(%rip)
.L5:
	addl	$1, %ecx
	cmpl	n(%rip), %ecx
	movl	%ecx, i(%rip)
	jle	.L9
	movl	max(%rip), %edx
	cmpl	$-1, %edx
	je	.L3
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L10:
	movq	%r15, %rdx
	movq	%r14, %rsi
	jmp	.L25
.L3:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L10
.L16:
	addq	$8, %rsp
	.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
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	max
	.bss
	.align 4
	.type	max, @object
	.size	max, 4
max:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 4004
a:
	.zero	4004
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 4004
dp:
	.zero	4004
	.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	"%d\n"
.LC3:
	.string	"NONE"
	.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
	leaq	m(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	n(%rip), %r14
	movq	%r15, %rdx
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r14, %rsi
	leaq	.LC0(%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	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L25:
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	m(%rip), %edx
	testl	%edx, %edx
	je	.L16
	movl	n(%rip), %eax
	testl	%eax, %eax
	je	.L16
	movl	$-1, max(%rip)
	movl	$1, i(%rip)
	jle	.L3
	leaq	a(%rip), %rbx
	movl	$1, %ecx
	leaq	.LC1(%rip), %rbp
	leaq	8(%rbx), %r12
	.p2align 4,,10
	.p2align 3
.L9:
	movslq	%ecx, %rcx
	movq	%rbp, %rdi
	xorl	%eax, %eax
	leaq	(%rbx,%rcx,4), %rsi
	call	__isoc99_scanf@PLT
	movl	i(%rip), %ecx
	movl	$1, j(%rip)
	cmpl	$1, %ecx
	jle	.L5
	movslq	%ecx, %rax
	leal	-2(%rcx), %edx
	movl	m(%rip), %edi
	xorl	%r10d, %r10d
	movl	max(%rip), %r9d
	movl	(%rbx,%rax,4), %r8d
	leaq	(%r12,%rdx,4), %rsi
	leaq	4+a(%rip), %rax
	.p2align 4,,10
	.p2align 3
.L7:
	movl	(%rax), %edx
	addl	%r8d, %edx
	cmpl	%edx, %edi
	jl	.L6
	cmpl	%edx, %r9d
	jge	.L6
	movl	%edx, %r9d
	movl	$1, %r10d
.L6:
	addq	$4, %rax
	cmpq	%rax, %rsi
	jne	.L7
	movl	%ecx, j(%rip)
	testb	%r10b, %r10b
	je	.L5
	movl	%r9d, max(%rip)
.L5:
	addl	$1, %ecx
	cmpl	n(%rip), %ecx
	movl	%ecx, i(%rip)
	jle	.L9
	movl	max(%rip), %edx
	cmpl	$-1, %edx
	je	.L3
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L10:
	movq	%r15, %rdx
	movq	%r14, %rsi
	jmp	.L25
.L3:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L10
.L16:
	addq	$8, %rsp
	.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
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	max
	.bss
	.align 4
	.type	max, @object
	.size	max, 4
max:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 4004
a:
	.zero	4004
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 4004
dp:
	.zero	4004
	.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 dp[1001],n,m,i,j,a[1001],max;
int main()
{
    scanf("%d %d",&n,&m);
    while((m!=0)&&(n!=0))
    {
        max=-1;
        for(i=1;i<=n;i=i+1)
        {
            scanf("%d",&a[i]);
            for(j=1;j<i;j=j+1)
            {
                if(a[i]+a[j]<=m)
                    if(a[i]+a[j]>max)
                      max=a[i]+a[j];
            }
        }
        if(max!=-1)
          printf("%d\n",max);
        else
          printf("NONE\n");
       scanf("%d %d",&n,&m);
    }
    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 dp[1001],n,m,i,j,a[1001],max;
int main()
{
    scanf("%d %d",&n,&m);
    while((m!=0)&&(n!=0))
    {
        max=-1;
        for(i=1;i<=n;i=i+1)
        {
            scanf("%d",&a[i]);
            for(j=1;j<i;j=j+1)
            {
                if(a[i]+a[j]<=m)
                    if(a[i]+a[j]>max)
                      max=a[i]+a[j];
            }
        }
        if(max!=-1)
          printf("%d\n",max);
        else
          printf("NONE\n");
       scanf("%d %d",&n,&m);
    }
    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
 32
10
99
NONE
20
 37
10
 37
10
 37
7
 31
10
99
NONE
20
 37
10
 47
7
 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 dp[1001],n,m,i,j,a[1001],max;
int main()
{
    scanf("%d %d",&n,&m);
    while((m!=0)&&(n!=0))
    {
        max=-1;
        for(i=1;i<=n;i=i+1)
        {
            scanf("%d",&a[i]);
            for(j=1;j<i;j=j+1)
            {
                if(a[i]+a[j]<=m)
                    if(a[i]+a[j]>max)
                      max=a[i]+a[j];
            }
        }
        if(max!=-1)
          printf("%d\n",max);
        else
          printf("NONE\n");
       scanf("%d %d",&n,&m);
    }
    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	"%d\n"
.LC3:
	.string	"NONE"
	.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
	leaq	m(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	n(%rip), %r14
	movq	%r15, %rdx
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r14, %rsi
	leaq	.LC0(%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	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L25:
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	m(%rip), %edx
	testl	%edx, %edx
	je	.L16
	movl	n(%rip), %eax
	testl	%eax, %eax
	je	.L16
	movl	$-1, max(%rip)
	movl	$1, i(%rip)
	jle	.L3
	leaq	a(%rip), %rbx
	movl	$1, %ecx
	leaq	.LC1(%rip), %rbp
	leaq	8(%rbx), %r12
	.p2align 4,,10
	.p2align 3
.L9:
	movslq	%ecx, %rcx
	movq	%rbp, %rdi
	xorl	%eax, %eax
	leaq	(%rbx,%rcx,4), %rsi
	call	__isoc99_scanf@PLT
	movl	i(%rip), %ecx
	movl	$1, j(%rip)
	cmpl	$1, %ecx
	jle	.L5
	movslq	%ecx, %rax
	leal	-2(%rcx), %edx
	movl	m(%rip), %edi
	xorl	%r10d, %r10d
	movl	max(%rip), %r9d
	movl	(%rbx,%rax,4), %r8d
	leaq	(%r12,%rdx,4), %rsi
	leaq	4+a(%rip), %rax
	.p2align 4,,10
	.p2align 3
.L7:
	movl	(%rax), %edx
	addl	%r8d, %edx
	cmpl	%edx, %edi
	jl	.L6
	cmpl	%edx, %r9d
	jge	.L6
	movl	%edx, %r9d
	movl	$1, %r10d
.L6:
	addq	$4, %rax
	cmpq	%rax, %rsi
	jne	.L7
	movl	%ecx, j(%rip)
	testb	%r10b, %r10b
	je	.L5
	movl	%r9d, max(%rip)
.L5:
	addl	$1, %ecx
	cmpl	n(%rip), %ecx
	movl	%ecx, i(%rip)
	jle	.L9
	movl	max(%rip), %edx
	cmpl	$-1, %edx
	je	.L3
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L10:
	movq	%r15, %rdx
	movq	%r14, %rsi
	jmp	.L25
.L3:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L10
.L16:
	addq	$8, %rsp
	.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
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	max
	.bss
	.align 4
	.type	max, @object
	.size	max, 4
max:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 4004
a:
	.zero	4004
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 4004
dp:
	.zero	4004
	.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	"%d\n"
.LC3:
	.string	"NONE"
	.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
	leaq	m(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	n(%rip), %r14
	movq	%r15, %rdx
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r14, %rsi
	leaq	.LC0(%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	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L25:
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	m(%rip), %edx
	testl	%edx, %edx
	je	.L16
	movl	n(%rip), %eax
	testl	%eax, %eax
	je	.L16
	movl	$-1, max(%rip)
	movl	$1, i(%rip)
	jle	.L3
	leaq	a(%rip), %rbx
	movl	$1, %ecx
	leaq	.LC1(%rip), %rbp
	leaq	8(%rbx), %r12
	.p2align 4,,10
	.p2align 3
.L9:
	movslq	%ecx, %rcx
	movq	%rbp, %rdi
	xorl	%eax, %eax
	leaq	(%rbx,%rcx,4), %rsi
	call	__isoc99_scanf@PLT
	movl	i(%rip), %ecx
	movl	$1, j(%rip)
	cmpl	$1, %ecx
	jle	.L5
	movslq	%ecx, %rax
	leal	-2(%rcx), %edx
	movl	m(%rip), %edi
	xorl	%r10d, %r10d
	movl	max(%rip), %r9d
	movl	(%rbx,%rax,4), %r8d
	leaq	(%r12,%rdx,4), %rsi
	leaq	4+a(%rip), %rax
	.p2align 4,,10
	.p2align 3
.L7:
	movl	(%rax), %edx
	addl	%r8d, %edx
	cmpl	%edx, %edi
	jl	.L6
	cmpl	%edx, %r9d
	jge	.L6
	movl	%edx, %r9d
	movl	$1, %r10d
.L6:
	addq	$4, %rax
	cmpq	%rax, %rsi
	jne	.L7
	movl	%ecx, j(%rip)
	testb	%r10b, %r10b
	je	.L5
	movl	%r9d, max(%rip)
.L5:
	addl	$1, %ecx
	cmpl	n(%rip), %ecx
	movl	%ecx, i(%rip)
	jle	.L9
	movl	max(%rip), %edx
	cmpl	$-1, %edx
	je	.L3
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L10:
	movq	%r15, %rdx
	movq	%r14, %rsi
	jmp	.L25
.L3:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L10
.L16:
	addq	$8, %rsp
	.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
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	max
	.bss
	.align 4
	.type	max, @object
	.size	max, 4
max:
	.zero	4
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 4004
a:
	.zero	4004
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 4004
dp:
	.zero	4004
	.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:
```