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>

long ans[ 100000000 ] ;


long max( long a ,long b )
{
	if( a < b )
	{
		return b ;
	}

	return a ;
}


int main()
{
	long n ,k ;

	while( scanf( "%ld %ld" ,&n ,&k ) ,n || k )
	{

		long i ;
		for( i = 1 ; i <= n ; i++ )
		{
			scanf( "%ld" ,&ans[ i ] ) ;

			ans[ i ] += ans[ i - 1 ] ;

			if( i >= k )
			{
				ans[ 0 ] = max( ans[ i ] - ans[ i - k ] ,ans[ 0 ] ) ;
			}
		}

		printf( "%ld\n" ,ans[ 0 ] ) ;
	}

	return 0 ;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	ans
	.bss
	.align 32
	.type	ans, @object
	.size	ans, 800000000
ans:
	.zero	800000000
	.text
	.globl	max
	.type	max, @function
max:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jge	.L2
	movq	-16(%rbp), %rax
	jmp	.L3
.L2:
	movq	-8(%rbp), %rax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	max, .-max
	.section	.rodata
.LC0:
	.string	"%ld"
.LC1:
	.string	"%ld\n"
.LC2:
	.string	"%ld %ld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L5
.L12:
	movq	$1, -16(%rbp)
	jmp	.L6
.L8:
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	ans(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	ans(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movq	-16(%rbp), %rax
	subq	$1, %rax
	leaq	0(,%rax,8), %rdx
	leaq	ans(%rip), %rax
	movq	(%rdx,%rax), %rax
	addq	%rax, %rcx
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	ans(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	movq	-24(%rbp), %rax
	cmpq	%rax, -16(%rbp)
	jl	.L7
	movq	ans(%rip), %rax
	movq	-16(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	ans(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	movq	-24(%rbp), %rsi
	movq	-16(%rbp), %rcx
	subq	%rsi, %rcx
	leaq	0(,%rcx,8), %rsi
	leaq	ans(%rip), %rcx
	movq	(%rsi,%rcx), %rcx
	subq	%rcx, %rdx
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	max
	movq	%rax, ans(%rip)
.L7:
	addq	$1, -16(%rbp)
.L6:
	movq	-32(%rbp), %rax
	cmpq	%rax, -16(%rbp)
	jle	.L8
	movq	ans(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L5:
	leaq	-24(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-32(%rbp), %rax
	testq	%rax, %rax
	jne	.L9
	movq	-24(%rbp), %rax
	testq	%rax, %rax
	je	.L10
.L9:
	movl	$1, %eax
	jmp	.L11
.L10:
	movl	$0, %eax
.L11:
	testl	%eax, %eax
	jne	.L12
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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
	.p2align 4
	.globl	max
	.type	max, @function
max:
.LFB23:
	.cfi_startproc
	endbr64
	cmpq	%rsi, %rdi
	movq	%rsi, %rax
	cmovge	%rdi, %rax
	ret
	.cfi_endproc
.LFE23:
	.size	max, .-max
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld"
.LC1:
	.string	"%ld %ld"
.LC2:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.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	ans(%rip), %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r14
	leaq	8(%rsp), %r13
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L9:
	cmpq	$0, 16(%rsp)
	je	.L15
.L7:
	movq	(%rbx), %rdx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L4:
	xorl	%eax, %eax
	movq	%r14, %rdx
	leaq	.LC1(%rip), %rdi
	movq	%r13, %rsi
	call	__isoc99_scanf@PLT
	cmpq	$0, 8(%rsp)
	je	.L9
	jle	.L7
	leaq	8+ans(%rip), %r12
	movl	$1, %r15d
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rsi
	movq	-8(%r12), %rax
	addq	(%r12), %rax
	movq	%rax, (%r12)
	cmpq	%r15, %rsi
	jg	.L5
	movq	%r15, %rdi
	subq	%rsi, %rdi
	movq	(%rbx), %rsi
	subq	(%rbx,%rdi,8), %rax
	cmpq	%rsi, %rax
	cmovl	%rsi, %rax
	addq	$1, %r15
	addq	$8, %r12
	movq	%rax, (%rbx)
	cmpq	8(%rsp), %r15
	jle	.L8
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L5:
	addq	$1, %r15
	addq	$8, %r12
	cmpq	%r15, 8(%rsp)
	jge	.L8
	jmp	.L7
.L15:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$40, %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
.L16:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	ans
	.bss
	.align 32
	.type	ans, @object
	.size	ans, 800000000
ans:
	.zero	800000000
	.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
	.p2align 4
	.globl	max
	.type	max, @function
max:
.LFB23:
	.cfi_startproc
	endbr64
	cmpq	%rsi, %rdi
	movq	%rsi, %rax
	cmovge	%rdi, %rax
	ret
	.cfi_endproc
.LFE23:
	.size	max, .-max
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld"
.LC1:
	.string	"%ld %ld"
.LC2:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.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	ans(%rip), %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r14
	leaq	8(%rsp), %r13
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L9:
	cmpq	$0, 16(%rsp)
	je	.L15
.L7:
	movq	(%rbx), %rdx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L4:
	xorl	%eax, %eax
	movq	%r14, %rdx
	leaq	.LC1(%rip), %rdi
	movq	%r13, %rsi
	call	__isoc99_scanf@PLT
	cmpq	$0, 8(%rsp)
	je	.L9
	jle	.L7
	leaq	8+ans(%rip), %r12
	movl	$1, %r15d
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rsi
	movq	-8(%r12), %rax
	addq	(%r12), %rax
	movq	%rax, (%r12)
	cmpq	%r15, %rsi
	jg	.L5
	movq	%r15, %rdi
	subq	%rsi, %rdi
	movq	(%rbx), %rsi
	subq	(%rbx,%rdi,8), %rax
	cmpq	%rsi, %rax
	cmovl	%rsi, %rax
	addq	$1, %r15
	addq	$8, %r12
	movq	%rax, (%rbx)
	cmpq	8(%rsp), %r15
	jle	.L8
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L5:
	addq	$1, %r15
	addq	$8, %r12
	cmpq	%r15, 8(%rsp)
	jge	.L8
	jmp	.L7
.L15:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$40, %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
.L16:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	ans
	.bss
	.align 32
	.type	ans, @object
	.size	ans, 800000000
ans:
	.zero	800000000
	.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>

long ans[ 100000000 ] ;


long max( long a ,long b )
{
	if( a < b )
	{
		return b ;
	}

	return a ;
}


int main()
{
	long n ,k ;

	while( scanf( "%ld %ld" ,&n ,&k ) ,n || k )
	{

		long i ;
		for( i = 1 ; i <= n ; i++ )
		{
			scanf( "%ld" ,&ans[ i ] ) ;

			ans[ i ] += ans[ i - 1 ] ;

			if( i >= k )
			{
				ans[ 0 ] = max( ans[ i ] - ans[ i - k ] ,ans[ 0 ] ) ;
			}
		}

		printf( "%ld\n" ,ans[ 0 ] ) ;
	}

	return 0 ;
}
5 3
2
5
-4
8
3
0 0
 5 3
2
5
-4
12
3
0 0
 5 3
2
5
-4
14
3
0 0
 5 3
2
9
-4
14
1
0 0
 5 3
1
9
-4
2
1
0 0
 5 3
2
8
-4
12
3
0 0
 5 1
2
9
-4
14
1
0 0
 5 3
1
9
-4
13
1
0 0
 5 3
1
2
-4
13
1
0 0
 5 3
2
5
-4
5
3
0 0

9
 13
 15
 19
 7
 16
 14
 18
 11
 6

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>

long ans[ 100000000 ] ;


long max( long a ,long b )
{
	if( a < b )
	{
		return b ;
	}

	return a ;
}


int main()
{
	long n ,k ;

	while( scanf( "%ld %ld" ,&n ,&k ) ,n || k )
	{

		long i ;
		for( i = 1 ; i <= n ; i++ )
		{
			scanf( "%ld" ,&ans[ i ] ) ;

			ans[ i ] += ans[ i - 1 ] ;

			if( i >= k )
			{
				ans[ 0 ] = max( ans[ i ] - ans[ i - k ] ,ans[ 0 ] ) ;
			}
		}

		printf( "%ld\n" ,ans[ 0 ] ) ;
	}

	return 0 ;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	ans
	.bss
	.align 32
	.type	ans, @object
	.size	ans, 800000000
ans:
	.zero	800000000
	.text
	.globl	max
	.type	max, @function
max:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jge	.L2
	movq	-16(%rbp), %rax
	jmp	.L3
.L2:
	movq	-8(%rbp), %rax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	max, .-max
	.section	.rodata
.LC0:
	.string	"%ld"
.LC1:
	.string	"%ld\n"
.LC2:
	.string	"%ld %ld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L5
.L12:
	movq	$1, -16(%rbp)
	jmp	.L6
.L8:
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	ans(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	ans(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movq	-16(%rbp), %rax
	subq	$1, %rax
	leaq	0(,%rax,8), %rdx
	leaq	ans(%rip), %rax
	movq	(%rdx,%rax), %rax
	addq	%rax, %rcx
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	ans(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	movq	-24(%rbp), %rax
	cmpq	%rax, -16(%rbp)
	jl	.L7
	movq	ans(%rip), %rax
	movq	-16(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	ans(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	movq	-24(%rbp), %rsi
	movq	-16(%rbp), %rcx
	subq	%rsi, %rcx
	leaq	0(,%rcx,8), %rsi
	leaq	ans(%rip), %rcx
	movq	(%rsi,%rcx), %rcx
	subq	%rcx, %rdx
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	max
	movq	%rax, ans(%rip)
.L7:
	addq	$1, -16(%rbp)
.L6:
	movq	-32(%rbp), %rax
	cmpq	%rax, -16(%rbp)
	jle	.L8
	movq	ans(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L5:
	leaq	-24(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-32(%rbp), %rax
	testq	%rax, %rax
	jne	.L9
	movq	-24(%rbp), %rax
	testq	%rax, %rax
	je	.L10
.L9:
	movl	$1, %eax
	jmp	.L11
.L10:
	movl	$0, %eax
.L11:
	testl	%eax, %eax
	jne	.L12
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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.
val
	.file	"temp.c"
	.text
	.globl	ans
	.bss
	.align 32
	.type	ans, @object
	.size	ans, 800000000
ans:
	.zero	800000000
	.text
	.globl	max
	.type	max, @function
max:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jge	.L2
	movq	-16(%rbp), %rax
	jmp	.L3
.L2:
	movq	-8(%rbp), %rax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	max, .-max
	.section	.rodata
.LC0:
	.string	"%ld"
.LC1:
	.string	"%ld\n"
.LC2:
	.string	"%ld %ld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L5
.L12:
	movq	$1, -16(%rbp)
	jmp	.L6
.L8:
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	ans(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	ans(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movq	-16(%rbp), %rax
	subq	$1, %rax
	leaq	0(,%rax,8), %rdx
	leaq	ans(%rip), %rax
	movq	(%rdx,%rax), %rax
	addq	%rax, %rcx
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	ans(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	movq	-24(%rbp), %rax
	cmpq	%rax, -16(%rbp)
	jl	.L7
	movq	ans(%rip), %rax
	movq	-16(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	ans(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	movq	-24(%rbp), %rsi
	movq	-16(%rbp), %rcx
	subq	%rsi, %rcx
	leaq	0(,%rcx,8), %rsi
	leaq	ans(%rip), %rcx
	movq	(%rsi,%rcx), %rcx
	subq	%rcx, %rdx
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	max
	movq	%rax, ans(%rip)
.L7:
	addq	$1, -16(%rbp)
.L6:
	movq	-32(%rbp), %rax
	cmpq	%rax, -16(%rbp)
	jle	.L8
	movq	ans(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L5:
	leaq	-24(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-32(%rbp), %rax
	testq	%rax, %rax
	jne	.L9
	movq	-24(%rbp), %rax
	testq	%rax, %rax
	je	.L10
.L9:
	movl	$1, %eax
	jmp	.L11
.L10:
	movl	$0, %eax
.L11:
	testl	%eax, %eax
	jne	.L12
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
