Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
int main(void){
	int m,n,q,r,a,i,j,t[100],s;
	for(;scanf("%d%d",&m,&n),m;printf("%d\n",q)){
		for(s=i=q=0;i<n;i++){
			scanf("%d",&a);
			t[i]=a;
			s+=a;
			if(q<a)q=a;
		}
		r=s>1500000?1500000:s;
		for(;q<r;){
			j=m;
			a=q+r>>1;
			s=0;
			for(i=0;i<n;i++){
				s+=t[i];
				if(s>a){
					if(!--j)break;
					s=t[i];
				}
			}
			if(i==n){	r=a;	}
			else{	q=a+1;	}
		}
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$448, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L14:
	movl	$0, -436(%rbp)
	movl	-436(%rbp), %eax
	movl	%eax, -428(%rbp)
	movl	-428(%rbp), %eax
	movl	%eax, -420(%rbp)
	jmp	.L3
.L5:
	leaq	-440(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-440(%rbp), %edx
	movl	-428(%rbp), %eax
	cltq
	movl	%edx, -416(%rbp,%rax,4)
	movl	-440(%rbp), %eax
	addl	%eax, -420(%rbp)
	movl	-440(%rbp), %eax
	cmpl	%eax, -436(%rbp)
	jge	.L4
	movl	-440(%rbp), %eax
	movl	%eax, -436(%rbp)
.L4:
	addl	$1, -428(%rbp)
.L3:
	movl	-444(%rbp), %eax
	cmpl	%eax, -428(%rbp)
	jl	.L5
	movl	-420(%rbp), %eax
	movl	$1500000, %edx
	cmpl	%edx, %eax
	cmovg	%edx, %eax
	movl	%eax, -432(%rbp)
	jmp	.L6
.L13:
	movl	-448(%rbp), %eax
	movl	%eax, -424(%rbp)
	movl	-436(%rbp), %edx
	movl	-432(%rbp), %eax
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -440(%rbp)
	movl	$0, -420(%rbp)
	movl	$0, -428(%rbp)
	jmp	.L7
.L11:
	movl	-428(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	addl	%eax, -420(%rbp)
	movl	-440(%rbp), %eax
	cmpl	%eax, -420(%rbp)
	jle	.L8
	subl	$1, -424(%rbp)
	cmpl	$0, -424(%rbp)
	je	.L17
	movl	-428(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	movl	%eax, -420(%rbp)
.L8:
	addl	$1, -428(%rbp)
.L7:
	movl	-444(%rbp), %eax
	cmpl	%eax, -428(%rbp)
	jl	.L11
	jmp	.L10
.L17:
	nop
.L10:
	movl	-444(%rbp), %eax
	cmpl	%eax, -428(%rbp)
	jne	.L12
	movl	-440(%rbp), %eax
	movl	%eax, -432(%rbp)
	jmp	.L6
.L12:
	movl	-440(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -436(%rbp)
.L6:
	movl	-436(%rbp), %eax
	cmpl	-432(%rbp), %eax
	jl	.L13
	movl	-436(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-444(%rbp), %rdx
	leaq	-448(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-448(%rbp), %eax
	testl	%eax, %eax
	jne	.L14
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d%d"
	.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	$456, %rsp
	.cfi_def_cfa_offset 512
	movq	%fs:40, %rax
	movq	%rax, 440(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movq	%rax, 8(%rsp)
	leaq	20(%rsp), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rdx
	movq	(%rsp), %rsi
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %edx
	testl	%edx, %edx
	je	.L11
	movl	24(%rsp), %eax
	xorl	%r12d, %r12d
	testl	%eax, %eax
	jle	.L4
	xorl	%ebp, %ebp
	xorl	%r14d, %r14d
	leaq	28(%rsp), %r15
	xorl	%r12d, %r12d
	leaq	32(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	xorl	%eax, %eax
	movq	%r15, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	movl	24(%rsp), %r10d
	addl	%eax, %r14d
	cmpl	%eax, %r12d
	movl	%eax, 0(%r13,%rbp,4)
	cmovl	%eax, %r12d
	addq	$1, %rbp
	cmpl	%ebp, %r10d
	jg	.L3
	movl	$1500000, %r11d
	cmpl	%r11d, %r14d
	cmovle	%r14d, %r11d
	cmpl	%r12d, %r11d
	jle	.L4
	movl	20(%rsp), %r14d
	leal	1(%r10), %r9d
	.p2align 4,,10
	.p2align 3
.L10:
	leal	(%r11,%r12), %edi
	sarl	%edi
	testl	%r10d, %r10d
	jle	.L13
	movl	%r14d, %esi
	movl	$1, %eax
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L8:
	movl	-4(%r13,%rax,4), %ecx
	addl	%ecx, %edx
	cmpl	%edx, %edi
	jge	.L6
	subl	$1, %esi
	je	.L7
	movl	%ecx, %edx
.L6:
	movl	%eax, %ecx
	addq	$1, %rax
	cmpq	%r9, %rax
	jne	.L8
.L5:
	cmpl	%ecx, %r10d
	jne	.L7
	movl	%edi, %r11d
.L9:
	cmpl	%r12d, %r11d
	jg	.L10
	movl	%edi, 28(%rsp)
.L4:
	movl	%r12d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L7:
	leal	1(%rdi), %r12d
	jmp	.L9
.L13:
	xorl	%ecx, %ecx
	jmp	.L5
.L11:
	movq	440(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$456, %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
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d%d"
	.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	$456, %rsp
	.cfi_def_cfa_offset 512
	movq	%fs:40, %rax
	movq	%rax, 440(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movq	%rax, 8(%rsp)
	leaq	20(%rsp), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rdx
	movq	(%rsp), %rsi
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %edx
	testl	%edx, %edx
	je	.L11
	movl	24(%rsp), %eax
	xorl	%r12d, %r12d
	testl	%eax, %eax
	jle	.L4
	xorl	%ebp, %ebp
	xorl	%r14d, %r14d
	leaq	28(%rsp), %r15
	xorl	%r12d, %r12d
	leaq	32(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	xorl	%eax, %eax
	movq	%r15, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	movl	24(%rsp), %r10d
	addl	%eax, %r14d
	cmpl	%eax, %r12d
	movl	%eax, 0(%r13,%rbp,4)
	cmovl	%eax, %r12d
	addq	$1, %rbp
	cmpl	%ebp, %r10d
	jg	.L3
	movl	$1500000, %r11d
	cmpl	%r11d, %r14d
	cmovle	%r14d, %r11d
	cmpl	%r12d, %r11d
	jle	.L4
	movl	20(%rsp), %r14d
	leal	1(%r10), %r9d
	.p2align 4,,10
	.p2align 3
.L10:
	leal	(%r11,%r12), %edi
	sarl	%edi
	testl	%r10d, %r10d
	jle	.L13
	movl	%r14d, %esi
	movl	$1, %eax
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L8:
	movl	-4(%r13,%rax,4), %ecx
	addl	%ecx, %edx
	cmpl	%edx, %edi
	jge	.L6
	subl	$1, %esi
	je	.L7
	movl	%ecx, %edx
.L6:
	movl	%eax, %ecx
	addq	$1, %rax
	cmpq	%r9, %rax
	jne	.L8
.L5:
	cmpl	%ecx, %r10d
	jne	.L7
	movl	%edi, %r11d
.L9:
	cmpl	%r12d, %r11d
	jg	.L10
	movl	%edi, 28(%rsp)
.L4:
	movl	%r12d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L7:
	leal	1(%rdi), %r12d
	jmp	.L9
.L13:
	xorl	%ecx, %ecx
	jmp	.L5
.L11:
	movq	440(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$456, %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:

#include <stdio.h>
int main(void){
	int m,n,q,r,a,i,j,t[100],s;
	for(;scanf("%d%d",&m,&n),m;printf("%d\n",q)){
		for(s=i=q=0;i<n;i++){
			scanf("%d",&a);
			t[i]=a;
			s+=a;
			if(q<a)q=a;
		}
		r=s>1500000?1500000:s;
		for(;q<r;){
			j=m;
			a=q+r>>1;
			s=0;
			for(i=0;i<n;i++){
				s+=t[i];
				if(s>a){
					if(!--j)break;
					s=t[i];
				}
			}
			if(i==n){	r=a;	}
			else{	q=a+1;	}
		}
	}
	return 0;
}
3 9
500
300
800
200
100
600
900
700
400
4 3
1000
1000
1010
0 0
 3 9
500
311
800
335
100
600
900
700
400
4 3
1000
1000
1010
0 0
 3 9
559
311
800
335
100
563
900
700
400
4 3
1000
1000
1010
0 0
 3 9
500
300
800
200
100
600
900
1032
400
4 3
1000
1000
1000
0 0
 3 9
500
300
800
200
000
600
900
700
400
4 3
1000
1000
1010
0 0
 3 9
500
253
800
335
100
600
900
700
400
4 3
1000
1000
1010
0 0
 3 9
559
311
800
335
110
600
900
700
400
4 3
1000
1000
1010
0 0
 3 9
559
311
656
335
100
563
900
700
400
4 3
1000
1000
1010
0 0
 3 9
500
300
800
200
100
871
900
1032
400
4 3
1000
1000
1000
0 0
 3 9
500
300
800
200
001
600
900
700
400
4 3
1000
1000
1010
0 0

1800
1010
 1935
1010
 1898
1010
 1800
1000
 1700
1010
 1888
1010
 1945
1010
 1861
1010
 1871
1000
 1701
1010

Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
int main(void){
	int m,n,q,r,a,i,j,t[100],s;
	for(;scanf("%d%d",&m,&n),m;printf("%d\n",q)){
		for(s=i=q=0;i<n;i++){
			scanf("%d",&a);
			t[i]=a;
			s+=a;
			if(q<a)q=a;
		}
		r=s>1500000?1500000:s;
		for(;q<r;){
			j=m;
			a=q+r>>1;
			s=0;
			for(i=0;i<n;i++){
				s+=t[i];
				if(s>a){
					if(!--j)break;
					s=t[i];
				}
			}
			if(i==n){	r=a;	}
			else{	q=a+1;	}
		}
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$448, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L14:
	movl	$0, -436(%rbp)
	movl	-436(%rbp), %eax
	movl	%eax, -428(%rbp)
	movl	-428(%rbp), %eax
	movl	%eax, -420(%rbp)
	jmp	.L3
.L5:
	leaq	-440(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-440(%rbp), %edx
	movl	-428(%rbp), %eax
	cltq
	movl	%edx, -416(%rbp,%rax,4)
	movl	-440(%rbp), %eax
	addl	%eax, -420(%rbp)
	movl	-440(%rbp), %eax
	cmpl	%eax, -436(%rbp)
	jge	.L4
	movl	-440(%rbp), %eax
	movl	%eax, -436(%rbp)
.L4:
	addl	$1, -428(%rbp)
.L3:
	movl	-444(%rbp), %eax
	cmpl	%eax, -428(%rbp)
	jl	.L5
	movl	-420(%rbp), %eax
	movl	$1500000, %edx
	cmpl	%edx, %eax
	cmovg	%edx, %eax
	movl	%eax, -432(%rbp)
	jmp	.L6
.L13:
	movl	-448(%rbp), %eax
	movl	%eax, -424(%rbp)
	movl	-436(%rbp), %edx
	movl	-432(%rbp), %eax
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -440(%rbp)
	movl	$0, -420(%rbp)
	movl	$0, -428(%rbp)
	jmp	.L7
.L11:
	movl	-428(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	addl	%eax, -420(%rbp)
	movl	-440(%rbp), %eax
	cmpl	%eax, -420(%rbp)
	jle	.L8
	subl	$1, -424(%rbp)
	cmpl	$0, -424(%rbp)
	je	.L17
	movl	-428(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	movl	%eax, -420(%rbp)
.L8:
	addl	$1, -428(%rbp)
.L7:
	movl	-444(%rbp), %eax
	cmpl	%eax, -428(%rbp)
	jl	.L11
	jmp	.L10
.L17:
	nop
.L10:
	movl	-444(%rbp), %eax
	cmpl	%eax, -428(%rbp)
	jne	.L12
	movl	-440(%rbp), %eax
	movl	%eax, -432(%rbp)
	jmp	.L6
.L12:
	movl	-440(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -436(%rbp)
.L6:
	movl	-436(%rbp), %eax
	cmpl	-432(%rbp), %eax
	jl	.L13
	movl	-436(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-444(%rbp), %rdx
	leaq	-448(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-448(%rbp), %eax
	testl	%eax, %eax
	jne	.L14
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$448, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L14:
	movl	$0, -436(%rbp)
	movl	-436(%rbp), %eax
	movl	%eax, -428(%rbp)
	movl	-428(%rbp), %eax
	movl	%eax, -420(%rbp)
	jmp	.L3
.L5:
	leaq	-440(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-440(%rbp), %edx
	movl	-428(%rbp), %eax
	cltq
	movl	%edx, -416(%rbp,%rax,4)
	movl	-440(%rbp), %eax
	addl	%eax, -420(%rbp)
	movl	-440(%rbp), %eax
	cmpl	%eax, -436(%rbp)
	jge	.L4
	movl	-440(%rbp), %eax
	movl	%eax, -436(%rbp)
.L4:
	addl	$1, -428(%rbp)
.L3:
	movl	-444(%rbp), %eax
	cmpl	%eax, -428(%rbp)
	jl	.L5
	movl	-420(%rbp), %eax
	movl	$1500000, %edx
	cmpl	%edx, %eax
	cmovg	%edx, %eax
	movl	%eax, -432(%rbp)
	jmp	.L6
.L13:
	movl	-448(%rbp), %eax
	movl	%eax, -424(%rbp)
	movl	-436(%rbp), %edx
	movl	-432(%rbp), %eax
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -440(%rbp)
	movl	$0, -420(%rbp)
	movl	$0, -428(%rbp)
	jmp	.L7
.L11:
	movl	-428(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	addl	%eax, -420(%rbp)
	movl	-440(%rbp), %eax
	cmpl	%eax, -420(%rbp)
	jle	.L8
	subl	$1, -424(%rbp)
	cmpl	$0, -424(%rbp)
	je	.L17
	movl	-428(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	movl	%eax, -420(%rbp)
.L8:
	addl	$1, -428(%rbp)
.L7:
	movl	-444(%rbp), %eax
	cmpl	%eax, -428(%rbp)
	jl	.L11
	jmp	.L10
.L17:
	nop
.L10:
	movl	-444(%rbp), %eax
	cmpl	%eax, -428(%rbp)
	jne	.L12
	movl	-440(%rbp), %eax
	movl	%eax, -432(%rbp)
	jmp	.L6
.L12:
	movl	-440(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -436(%rbp)
.L6:
	movl	-436(%rbp), %eax
	cmpl	-432(%rbp), %eax
	jl	.L13
	movl	-436(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-444(%rbp), %rdx
	leaq	-448(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-448(%rbp), %eax
	testl	%eax, %eax
	jne	.L14
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
