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>

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 ;
}```

Assembly Code:

```assembly
	.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:
```

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
	.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
```assembly
	.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:
```
```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 ;
}```
Given the following C 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 ;
}```

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:

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 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 ;
}```

Assembly Code:

```assembly
	.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:
```

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
	.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:
```