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,i,j,total,max,s[1000];
    while(1){
        total=0;
        max=0;
        scanf("%d",&n);
        scanf("%d",&m);
        if(n==0){
            break;
        }
        for(i=0;i<n;i++){
            scanf("%d",&s[i]);
        }
        for(i=0;i<n;i++){
            total=s[i];
            for(j=i+1;j<n;j++){
                if((max<total + s[j])&&(total+s[j]<=m)){
                    max=total+s[j];
                }
            }
        }
        if(max!=0){
            printf("%d\n",max);
        }else{
            printf("NONE\n");
        }
    }
    return 0;
    
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"NONE"
.LC2:
	.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
	leaq	.LC0(%rip), %rbx
	subq	$4040, %rsp
	.cfi_def_cfa_offset 4096
	movq	%fs:40, %rax
	movq	%rax, 4024(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %r12
	leaq	12(%rsp), %rbp
	leaq	16(%rsp), %r15
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	je	.L3
	jle	.L6
	movq	%r15, %r14
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %ecx
	addq	$4, %r14
	cmpl	%r13d, %ecx
	jg	.L5
	testl	%ecx, %ecx
	jle	.L6
	movl	12(%rsp), %r9d
	movl	16(%rsp), %esi
	cmpl	$1, %ecx
	je	.L6
	movslq	%ecx, %r10
	movl	$1, %edi
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rdi, %rax
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%r15,%rax,4), %edx
	addl	%esi, %edx
	cmpl	%edx, %r8d
	jge	.L7
	cmpl	%edx, %r9d
	cmovge	%edx, %r8d
.L7:
	addq	$1, %rax
	cmpl	%eax, %ecx
	jg	.L8
	movl	(%r15,%rdi,4), %esi
	addq	$1, %rdi
	cmpq	%r10, %rdi
	jne	.L9
	testl	%r8d, %r8d
	je	.L6
	movl	%r8d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L6:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L2
.L3:
	movq	4024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$4040, %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
.L25:
	.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	"NONE"
.LC2:
	.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
	leaq	.LC0(%rip), %rbx
	subq	$4040, %rsp
	.cfi_def_cfa_offset 4096
	movq	%fs:40, %rax
	movq	%rax, 4024(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %r12
	leaq	12(%rsp), %rbp
	leaq	16(%rsp), %r15
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	je	.L3
	jle	.L6
	movq	%r15, %r14
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %ecx
	addq	$4, %r14
	cmpl	%r13d, %ecx
	jg	.L5
	testl	%ecx, %ecx
	jle	.L6
	movl	12(%rsp), %r9d
	movl	16(%rsp), %esi
	cmpl	$1, %ecx
	je	.L6
	movslq	%ecx, %r10
	movl	$1, %edi
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rdi, %rax
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%r15,%rax,4), %edx
	addl	%esi, %edx
	cmpl	%edx, %r8d
	jge	.L7
	cmpl	%edx, %r9d
	cmovge	%edx, %r8d
.L7:
	addq	$1, %rax
	cmpl	%eax, %ecx
	jg	.L8
	movl	(%r15,%rdi,4), %esi
	addq	$1, %rdi
	cmpq	%r10, %rdi
	jne	.L9
	testl	%r8d, %r8d
	je	.L6
	movl	%r8d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L6:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L2
.L3:
	movq	4024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$4040, %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
.L25:
	.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	"NONE"
.LC2:
	.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
	leaq	.LC0(%rip), %rbx
	subq	$4040, %rsp
	.cfi_def_cfa_offset 4096
	movq	%fs:40, %rax
	movq	%rax, 4024(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %r12
	leaq	12(%rsp), %rbp
	leaq	16(%rsp), %r15
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	je	.L3
	jle	.L6
	movq	%r15, %r14
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %ecx
	addq	$4, %r14
	cmpl	%r13d, %ecx
	jg	.L5
	testl	%ecx, %ecx
	jle	.L6
	movl	12(%rsp), %r9d
	movl	16(%rsp), %esi
	cmpl	$1, %ecx
	je	.L6
	movslq	%ecx, %r10
	movl	$1, %edi
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rdi, %rax
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%r15,%rax,4), %edx
	addl	%esi, %edx
	cmpl	%edx, %r8d
	jge	.L7
	cmpl	%edx, %r9d
	cmovge	%edx, %r8d
.L7:
	addq	$1, %rax
	cmpl	%eax, %ecx
	jg	.L8
	movl	(%r15,%rdi,4), %esi
	addq	$1, %rdi
	cmpq	%r10, %rdi
	jne	.L9
	testl	%r8d, %r8d
	je	.L6
	movl	%r8d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L6:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L2
.L3:
	movq	4024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$4040, %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
.L25:
	.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,i,j,total,max,s[1000];
    while(1){
        total=0;
        max=0;
        scanf("%d",&n);
        scanf("%d",&m);
        if(n==0){
            break;
        }
        for(i=0;i<n;i++){
            scanf("%d",&s[i]);
        }
        for(i=0;i<n;i++){
            total=s[i];
            for(j=i+1;j<n;j++){
                if((max<total + s[j])&&(total+s[j]<=m)){
                    max=total+s[j];
                }
            }
        }
        if(max!=0){
            printf("%d\n",max);
        }else{
            printf("NONE\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){
    int n,m,i,j,total,max,s[1000];
    while(1){
        total=0;
        max=0;
        scanf("%d",&n);
        scanf("%d",&m);
        if(n==0){
            break;
        }
        for(i=0;i<n;i++){
            scanf("%d",&s[i]);
        }
        for(i=0;i<n;i++){
            total=s[i];
            for(j=i+1;j<n;j++){
                if((max<total + s[j])&&(total+s[j]<=m)){
                    max=total+s[j];
                }
            }
        }
        if(max!=0){
            printf("%d\n",max);
        }else{
            printf("NONE\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:

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,i,j,total,max,s[1000];
    while(1){
        total=0;
        max=0;
        scanf("%d",&n);
        scanf("%d",&m);
        if(n==0){
            break;
        }
        for(i=0;i<n;i++){
            scanf("%d",&s[i]);
        }
        for(i=0;i<n;i++){
            total=s[i];
            for(j=i+1;j<n;j++){
                if((max<total + s[j])&&(total+s[j]<=m)){
                    max=total+s[j];
                }
            }
        }
        if(max!=0){
            printf("%d\n",max);
        }else{
            printf("NONE\n");
        }
    }
    return 0;
    
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"NONE"
.LC2:
	.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
	leaq	.LC0(%rip), %rbx
	subq	$4040, %rsp
	.cfi_def_cfa_offset 4096
	movq	%fs:40, %rax
	movq	%rax, 4024(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %r12
	leaq	12(%rsp), %rbp
	leaq	16(%rsp), %r15
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	je	.L3
	jle	.L6
	movq	%r15, %r14
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %ecx
	addq	$4, %r14
	cmpl	%r13d, %ecx
	jg	.L5
	testl	%ecx, %ecx
	jle	.L6
	movl	12(%rsp), %r9d
	movl	16(%rsp), %esi
	cmpl	$1, %ecx
	je	.L6
	movslq	%ecx, %r10
	movl	$1, %edi
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rdi, %rax
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%r15,%rax,4), %edx
	addl	%esi, %edx
	cmpl	%edx, %r8d
	jge	.L7
	cmpl	%edx, %r9d
	cmovge	%edx, %r8d
.L7:
	addq	$1, %rax
	cmpl	%eax, %ecx
	jg	.L8
	movl	(%r15,%rdi,4), %esi
	addq	$1, %rdi
	cmpq	%r10, %rdi
	jne	.L9
	testl	%r8d, %r8d
	je	.L6
	movl	%r8d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L6:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L2
.L3:
	movq	4024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$4040, %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
.L25:
	.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	"NONE"
.LC2:
	.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
	leaq	.LC0(%rip), %rbx
	subq	$4040, %rsp
	.cfi_def_cfa_offset 4096
	movq	%fs:40, %rax
	movq	%rax, 4024(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %r12
	leaq	12(%rsp), %rbp
	leaq	16(%rsp), %r15
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	je	.L3
	jle	.L6
	movq	%r15, %r14
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %ecx
	addq	$4, %r14
	cmpl	%r13d, %ecx
	jg	.L5
	testl	%ecx, %ecx
	jle	.L6
	movl	12(%rsp), %r9d
	movl	16(%rsp), %esi
	cmpl	$1, %ecx
	je	.L6
	movslq	%ecx, %r10
	movl	$1, %edi
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rdi, %rax
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%r15,%rax,4), %edx
	addl	%esi, %edx
	cmpl	%edx, %r8d
	jge	.L7
	cmpl	%edx, %r9d
	cmovge	%edx, %r8d
.L7:
	addq	$1, %rax
	cmpl	%eax, %ecx
	jg	.L8
	movl	(%r15,%rdi,4), %esi
	addq	$1, %rdi
	cmpq	%r10, %rdi
	jne	.L9
	testl	%r8d, %r8d
	je	.L6
	movl	%r8d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L6:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L2
.L3:
	movq	4024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$4040, %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
.L25:
	.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:
```