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>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <math.h>
#include <limits.h>
#include <assert.h>
#define FOR(i,a,n) for(i=(a);i<(n);i++)
#define swap(type,a,b) do{type t=a;a=b;b=t;}while(0)
#define MAX(a,b) (((a)>(b))?(a):(b))
#define MIN(a,b) (((a)<(b))?(a):(b))
#define ll long long
#define INF 100000000
#define MOD 1000000007
#define SIZE 100005
#define LOCAL
#ifdef LOCAL
    #define DEBUG(...) printf(" "__VA_ARGS__)
#else
    #define DEBUG(...)
#endif /* LOCAL */
int comp(const void* a,const void* b){
	return *(int*)a-*(int*)b;
}
int x[100000];
int main(void)
{
	int n,k,i;
	ll l,r,res=1e18;
	scanf("%d%d",&n,&k);
	FOR(i,0,n) scanf("%d",&x[i]);
	FOR(i,0,n-k+1){
		l=x[i],r=x[i+k-1];
		if(l>=0) res=MIN(res,r);
		else if(r<=0) res=MIN(res,-l);
		else{
			res=MIN(res,2*(-l)+r);
			res=MIN(res,-l+2*r);
		}
	}
	printf("%lld\n",res);
	return 0;
}
    
    
    
    
    ```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	comp
	.type	comp, @function
comp:
.LFB51:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	comp, .-comp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	testl	%eax, %eax
	jle	.L4
	leaq	x(%rip), %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	addq	$4, %rbp
	cmpl	%ebx, %eax
	jg	.L5
.L4:
	movabsq	$1000000000000000000, %r8
	movslq	4(%rsp), %rdi
	subl	%edi, %eax
	movslq	%eax, %rdx
	js	.L6
	leaq	x(%rip), %rax
	leaq	4(%rax), %rcx
	leaq	(%rcx,%rdx,4), %r9
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L16:
	cmpq	%rcx, %r8
	cmovg	%rcx, %r8
.L8:
	addq	$4, %rax
	cmpq	%rax, %r9
	je	.L6
.L10:
	movslq	(%rax), %rdx
	movslq	-4(%rax,%rdi,4), %rcx
	testq	%rdx, %rdx
	jns	.L16
	testq	%rcx, %rcx
	jle	.L17
	leaq	(%rcx,%rcx), %rsi
	subq	%rdx, %rsi
	negq	%rdx
	leaq	(%rcx,%rdx,2), %rdx
	cmpq	%rdx, %rsi
	cmovle	%rsi, %rdx
	cmpq	%rdx, %r8
	cmovg	%rdx, %r8
	addq	$4, %rax
	cmpq	%rax, %r9
	jne	.L10
.L6:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	negq	%rdx
	cmpq	%rdx, %r8
	cmovg	%rdx, %r8
	jmp	.L8
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.size	main, .-main
	.globl	x
	.bss
	.align 32
	.type	x, @object
	.size	x, 400000
x:
	.zero	400000
	.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	comp
	.type	comp, @function
comp:
.LFB51:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	comp, .-comp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	testl	%eax, %eax
	jle	.L4
	leaq	x(%rip), %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	addq	$4, %rbp
	cmpl	%ebx, %eax
	jg	.L5
.L4:
	movabsq	$1000000000000000000, %r8
	movslq	4(%rsp), %rdi
	subl	%edi, %eax
	movslq	%eax, %rdx
	js	.L6
	leaq	x(%rip), %rax
	leaq	4(%rax), %rcx
	leaq	(%rcx,%rdx,4), %r9
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L16:
	cmpq	%rcx, %r8
	cmovg	%rcx, %r8
.L8:
	addq	$4, %rax
	cmpq	%rax, %r9
	je	.L6
.L10:
	movslq	(%rax), %rdx
	movslq	-4(%rax,%rdi,4), %rcx
	testq	%rdx, %rdx
	jns	.L16
	testq	%rcx, %rcx
	jle	.L17
	leaq	(%rcx,%rcx), %rsi
	subq	%rdx, %rsi
	negq	%rdx
	leaq	(%rcx,%rdx,2), %rdx
	cmpq	%rdx, %rsi
	cmovle	%rsi, %rdx
	cmpq	%rdx, %r8
	cmovg	%rdx, %r8
	addq	$4, %rax
	cmpq	%rax, %r9
	jne	.L10
.L6:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	negq	%rdx
	cmpq	%rdx, %r8
	cmovg	%rdx, %r8
	jmp	.L8
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.size	main, .-main
	.globl	x
	.bss
	.align 32
	.type	x, @object
	.size	x, 400000
x:
	.zero	400000
	.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	comp
	.type	comp, @function
comp:
.LFB51:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	comp, .-comp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	testl	%eax, %eax
	jle	.L4
	leaq	x(%rip), %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	addq	$4, %rbp
	cmpl	%ebx, %eax
	jg	.L5
.L4:
	movabsq	$1000000000000000000, %r8
	movslq	4(%rsp), %rdi
	subl	%edi, %eax
	movslq	%eax, %rdx
	js	.L6
	leaq	x(%rip), %rax
	leaq	4(%rax), %rcx
	leaq	(%rcx,%rdx,4), %r9
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L16:
	cmpq	%rcx, %r8
	cmovg	%rcx, %r8
.L8:
	addq	$4, %rax
	cmpq	%rax, %r9
	je	.L6
.L10:
	movslq	(%rax), %rdx
	movslq	-4(%rax,%rdi,4), %rcx
	testq	%rdx, %rdx
	jns	.L16
	testq	%rcx, %rcx
	jle	.L17
	leaq	(%rcx,%rcx), %rsi
	subq	%rdx, %rsi
	negq	%rdx
	leaq	(%rcx,%rdx,2), %rdx
	cmpq	%rdx, %rsi
	cmovle	%rsi, %rdx
	cmpq	%rdx, %r8
	cmovg	%rdx, %r8
	addq	$4, %rax
	cmpq	%rax, %r9
	jne	.L10
.L6:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	negq	%rdx
	cmpq	%rdx, %r8
	cmovg	%rdx, %r8
	jmp	.L8
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.size	main, .-main
	.globl	x
	.bss
	.align 32
	.type	x, @object
	.size	x, 400000
x:
	.zero	400000
	.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>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <math.h>
#include <limits.h>
#include <assert.h>
#define FOR(i,a,n) for(i=(a);i<(n);i++)
#define swap(type,a,b) do{type t=a;a=b;b=t;}while(0)
#define MAX(a,b) (((a)>(b))?(a):(b))
#define MIN(a,b) (((a)<(b))?(a):(b))
#define ll long long
#define INF 100000000
#define MOD 1000000007
#define SIZE 100005
#define LOCAL
#ifdef LOCAL
    #define DEBUG(...) printf(" "__VA_ARGS__)
#else
    #define DEBUG(...)
#endif /* LOCAL */
int comp(const void* a,const void* b){
	return *(int*)a-*(int*)b;
}
int x[100000];
int main(void)
{
	int n,k,i;
	ll l,r,res=1e18;
	scanf("%d%d",&n,&k);
	FOR(i,0,n) scanf("%d",&x[i]);
	FOR(i,0,n-k+1){
		l=x[i],r=x[i+k-1];
		if(l>=0) res=MIN(res,r);
		else if(r<=0) res=MIN(res,-l);
		else{
			res=MIN(res,2*(-l)+r);
			res=MIN(res,-l+2*r);
		}
	}
	printf("%lld\n",res);
	return 0;
}
    
    
    
    
    ```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <math.h>
#include <limits.h>
#include <assert.h>
#define FOR(i,a,n) for(i=(a);i<(n);i++)
#define swap(type,a,b) do{type t=a;a=b;b=t;}while(0)
#define MAX(a,b) (((a)>(b))?(a):(b))
#define MIN(a,b) (((a)<(b))?(a):(b))
#define ll long long
#define INF 100000000
#define MOD 1000000007
#define SIZE 100005
#define LOCAL
#ifdef LOCAL
    #define DEBUG(...) printf(" "__VA_ARGS__)
#else
    #define DEBUG(...)
#endif /* LOCAL */
int comp(const void* a,const void* b){
	return *(int*)a-*(int*)b;
}
int x[100000];
int main(void)
{
	int n,k,i;
	ll l,r,res=1e18;
	scanf("%d%d",&n,&k);
	FOR(i,0,n) scanf("%d",&x[i]);
	FOR(i,0,n-k+1){
		l=x[i],r=x[i+k-1];
		if(l>=0) res=MIN(res,r);
		else if(r<=0) res=MIN(res,-l);
		else{
			res=MIN(res,2*(-l)+r);
			res=MIN(res,-l+2*r);
		}
	}
	printf("%lld\n",res);
	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
-30 -10 10 20 50

40

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>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <math.h>
#include <limits.h>
#include <assert.h>
#define FOR(i,a,n) for(i=(a);i<(n);i++)
#define swap(type,a,b) do{type t=a;a=b;b=t;}while(0)
#define MAX(a,b) (((a)>(b))?(a):(b))
#define MIN(a,b) (((a)<(b))?(a):(b))
#define ll long long
#define INF 100000000
#define MOD 1000000007
#define SIZE 100005
#define LOCAL
#ifdef LOCAL
    #define DEBUG(...) printf(" "__VA_ARGS__)
#else
    #define DEBUG(...)
#endif /* LOCAL */
int comp(const void* a,const void* b){
	return *(int*)a-*(int*)b;
}
int x[100000];
int main(void)
{
	int n,k,i;
	ll l,r,res=1e18;
	scanf("%d%d",&n,&k);
	FOR(i,0,n) scanf("%d",&x[i]);
	FOR(i,0,n-k+1){
		l=x[i],r=x[i+k-1];
		if(l>=0) res=MIN(res,r);
		else if(r<=0) res=MIN(res,-l);
		else{
			res=MIN(res,2*(-l)+r);
			res=MIN(res,-l+2*r);
		}
	}
	printf("%lld\n",res);
	return 0;
}
    
    
    
    
    ```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	comp
	.type	comp, @function
comp:
.LFB51:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	comp, .-comp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	testl	%eax, %eax
	jle	.L4
	leaq	x(%rip), %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	addq	$4, %rbp
	cmpl	%ebx, %eax
	jg	.L5
.L4:
	movabsq	$1000000000000000000, %r8
	movslq	4(%rsp), %rdi
	subl	%edi, %eax
	movslq	%eax, %rdx
	js	.L6
	leaq	x(%rip), %rax
	leaq	4(%rax), %rcx
	leaq	(%rcx,%rdx,4), %r9
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L16:
	cmpq	%rcx, %r8
	cmovg	%rcx, %r8
.L8:
	addq	$4, %rax
	cmpq	%rax, %r9
	je	.L6
.L10:
	movslq	(%rax), %rdx
	movslq	-4(%rax,%rdi,4), %rcx
	testq	%rdx, %rdx
	jns	.L16
	testq	%rcx, %rcx
	jle	.L17
	leaq	(%rcx,%rcx), %rsi
	subq	%rdx, %rsi
	negq	%rdx
	leaq	(%rcx,%rdx,2), %rdx
	cmpq	%rdx, %rsi
	cmovle	%rsi, %rdx
	cmpq	%rdx, %r8
	cmovg	%rdx, %r8
	addq	$4, %rax
	cmpq	%rax, %r9
	jne	.L10
.L6:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	negq	%rdx
	cmpq	%rdx, %r8
	cmovg	%rdx, %r8
	jmp	.L8
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.size	main, .-main
	.globl	x
	.bss
	.align 32
	.type	x, @object
	.size	x, 400000
x:
	.zero	400000
	.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	comp
	.type	comp, @function
comp:
.LFB51:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	comp, .-comp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	testl	%eax, %eax
	jle	.L4
	leaq	x(%rip), %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	addq	$4, %rbp
	cmpl	%ebx, %eax
	jg	.L5
.L4:
	movabsq	$1000000000000000000, %r8
	movslq	4(%rsp), %rdi
	subl	%edi, %eax
	movslq	%eax, %rdx
	js	.L6
	leaq	x(%rip), %rax
	leaq	4(%rax), %rcx
	leaq	(%rcx,%rdx,4), %r9
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L16:
	cmpq	%rcx, %r8
	cmovg	%rcx, %r8
.L8:
	addq	$4, %rax
	cmpq	%rax, %r9
	je	.L6
.L10:
	movslq	(%rax), %rdx
	movslq	-4(%rax,%rdi,4), %rcx
	testq	%rdx, %rdx
	jns	.L16
	testq	%rcx, %rcx
	jle	.L17
	leaq	(%rcx,%rcx), %rsi
	subq	%rdx, %rsi
	negq	%rdx
	leaq	(%rcx,%rdx,2), %rdx
	cmpq	%rdx, %rsi
	cmovle	%rsi, %rdx
	cmpq	%rdx, %r8
	cmovg	%rdx, %r8
	addq	$4, %rax
	cmpq	%rax, %r9
	jne	.L10
.L6:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	negq	%rdx
	cmpq	%rdx, %r8
	cmovg	%rdx, %r8
	jmp	.L8
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.size	main, .-main
	.globl	x
	.bss
	.align 32
	.type	x, @object
	.size	x, 400000
x:
	.zero	400000
	.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:
```