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

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	comp
	.type	comp, @function
comp:
.LFB6:
	.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
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	comp, .-comp
	.globl	x
	.bss
	.align 32
	.type	x, @object
	.size	x, 400000
x:
	.zero	400000
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movabsq	$1000000000000000000, %rax
	movq	%rax, -32(%rbp)
	leaq	-40(%rbp), %rdx
	leaq	-44(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -36(%rbp)
	jmp	.L4
.L5:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -36(%rbp)
.L4:
	movl	-44(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L5
	movl	$0, -36(%rbp)
	jmp	.L6
.L10:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	movq	%rax, -24(%rbp)
	movl	-40(%rbp), %edx
	movl	-36(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	movq	%rax, -16(%rbp)
	cmpq	$0, -24(%rbp)
	js	.L7
	movq	-32(%rbp), %rdx
	movq	-16(%rbp), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, -32(%rbp)
	jmp	.L8
.L7:
	cmpq	$0, -16(%rbp)
	jg	.L9
	movq	-24(%rbp), %rax
	negq	%rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	cmpq	%rdx, %rax
	cmovg	%rdx, %rax
	movq	%rax, -32(%rbp)
	jmp	.L8
.L9:
	movq	-24(%rbp), %rdx
	movl	$0, %eax
	subq	%rdx, %rax
	addq	%rax, %rax
	movq	%rax, %rdx
	movq	-16(%rbp), %rax
	addq	%rax, %rdx
	movq	-32(%rbp), %rax
	cmpq	%rdx, %rax
	cmovg	%rdx, %rax
	movq	%rax, -32(%rbp)
	movq	-16(%rbp), %rax
	addq	%rax, %rax
	subq	-24(%rbp), %rax
	movq	-32(%rbp), %rdx
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, -32(%rbp)
.L8:
	addl	$1, -36(%rbp)
.L6:
	movl	-44(%rbp), %eax
	movl	-40(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jle	.L10
	movq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	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
	.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:

#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;
}
    
    
    
    
    
5 3
-30 -10 10 20 50

40

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

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	comp
	.type	comp, @function
comp:
.LFB6:
	.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
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	comp, .-comp
	.globl	x
	.bss
	.align 32
	.type	x, @object
	.size	x, 400000
x:
	.zero	400000
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movabsq	$1000000000000000000, %rax
	movq	%rax, -32(%rbp)
	leaq	-40(%rbp), %rdx
	leaq	-44(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -36(%rbp)
	jmp	.L4
.L5:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -36(%rbp)
.L4:
	movl	-44(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L5
	movl	$0, -36(%rbp)
	jmp	.L6
.L10:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	movq	%rax, -24(%rbp)
	movl	-40(%rbp), %edx
	movl	-36(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	movq	%rax, -16(%rbp)
	cmpq	$0, -24(%rbp)
	js	.L7
	movq	-32(%rbp), %rdx
	movq	-16(%rbp), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, -32(%rbp)
	jmp	.L8
.L7:
	cmpq	$0, -16(%rbp)
	jg	.L9
	movq	-24(%rbp), %rax
	negq	%rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	cmpq	%rdx, %rax
	cmovg	%rdx, %rax
	movq	%rax, -32(%rbp)
	jmp	.L8
.L9:
	movq	-24(%rbp), %rdx
	movl	$0, %eax
	subq	%rdx, %rax
	addq	%rax, %rax
	movq	%rax, %rdx
	movq	-16(%rbp), %rax
	addq	%rax, %rdx
	movq	-32(%rbp), %rax
	cmpq	%rdx, %rax
	cmovg	%rdx, %rax
	movq	%rax, -32(%rbp)
	movq	-16(%rbp), %rax
	addq	%rax, %rax
	subq	-24(%rbp), %rax
	movq	-32(%rbp), %rdx
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, -32(%rbp)
.L8:
	addl	$1, -36(%rbp)
.L6:
	movl	-44(%rbp), %eax
	movl	-40(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jle	.L10
	movq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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
	.globl	comp
	.type	comp, @function
comp:
.LFB6:
	.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
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	comp, .-comp
	.globl	x
	.bss
	.align 32
	.type	x, @object
	.size	x, 400000
x:
	.zero	400000
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movabsq	$1000000000000000000, %rax
	movq	%rax, -32(%rbp)
	leaq	-40(%rbp), %rdx
	leaq	-44(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -36(%rbp)
	jmp	.L4
.L5:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -36(%rbp)
.L4:
	movl	-44(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L5
	movl	$0, -36(%rbp)
	jmp	.L6
.L10:
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	movq	%rax, -24(%rbp)
	movl	-40(%rbp), %edx
	movl	-36(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	movq	%rax, -16(%rbp)
	cmpq	$0, -24(%rbp)
	js	.L7
	movq	-32(%rbp), %rdx
	movq	-16(%rbp), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, -32(%rbp)
	jmp	.L8
.L7:
	cmpq	$0, -16(%rbp)
	jg	.L9
	movq	-24(%rbp), %rax
	negq	%rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	cmpq	%rdx, %rax
	cmovg	%rdx, %rax
	movq	%rax, -32(%rbp)
	jmp	.L8
.L9:
	movq	-24(%rbp), %rdx
	movl	$0, %eax
	subq	%rdx, %rax
	addq	%rax, %rax
	movq	%rax, %rdx
	movq	-16(%rbp), %rax
	addq	%rax, %rdx
	movq	-32(%rbp), %rax
	cmpq	%rdx, %rax
	cmovg	%rdx, %rax
	movq	%rax, -32(%rbp)
	movq	-16(%rbp), %rax
	addq	%rax, %rax
	subq	-24(%rbp), %rax
	movq	-32(%rbp), %rdx
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, -32(%rbp)
.L8:
	addl	$1, -36(%rbp)
.L6:
	movl	-44(%rbp), %eax
	movl	-40(%rbp), %edx
	subl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jle	.L10
	movq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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:
