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

```c
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>

int main(void){
	int n, k, i;
	int x[100000];
	scanf("%d%d", &n, &k);
	for(i=0; i<n; i++){
		scanf("%d", x+i);
	}
	int l=n-k+1;
	int min=INT_MAX;
	for(i=0; i<l; i++){
		int now;
		if(x[i]>=0){
			now = x[i+k-1];
		}else if(x[i+k-1]<=0){
			now = -x[i];
		}else if(-x[i]<=x[i+k-1]){
			now = -x[i]*2 + x[i+k-1];
		}else{
			now = x[i+k-1]*2 - x[i];
		}
		if(now<min) min=now;
	}
	printf("%d\n", min);
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2736, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-400036(%rbp), %rdx
	leaq	-400040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -400032(%rbp)
	jmp	.L2
.L3:
	movl	-400032(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-400016(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -400032(%rbp)
.L2:
	movl	-400040(%rbp), %eax
	cmpl	%eax, -400032(%rbp)
	jl	.L3
	movl	-400040(%rbp), %eax
	movl	-400036(%rbp), %edx
	subl	%edx, %eax
	addl	$1, %eax
	movl	%eax, -400020(%rbp)
	movl	$2147483647, -400028(%rbp)
	movl	$0, -400032(%rbp)
	jmp	.L4
.L10:
	movl	-400032(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	testl	%eax, %eax
	js	.L5
	movl	-400036(%rbp), %edx
	movl	-400032(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	movl	%eax, -400024(%rbp)
	jmp	.L6
.L5:
	movl	-400036(%rbp), %edx
	movl	-400032(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jg	.L7
	movl	-400032(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	negl	%eax
	movl	%eax, -400024(%rbp)
	jmp	.L6
.L7:
	movl	-400032(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	negl	%eax
	movl	%eax, %edx
	movl	-400036(%rbp), %ecx
	movl	-400032(%rbp), %eax
	addl	%ecx, %eax
	subl	$1, %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jg	.L8
	movl	-400032(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %edx
	movl	$0, %eax
	subl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %ecx
	movl	-400036(%rbp), %edx
	movl	-400032(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	addl	%ecx, %eax
	movl	%eax, -400024(%rbp)
	jmp	.L6
.L8:
	movl	-400036(%rbp), %edx
	movl	-400032(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	leal	(%rax,%rax), %edx
	movl	-400032(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -400024(%rbp)
.L6:
	movl	-400024(%rbp), %eax
	cmpl	-400028(%rbp), %eax
	jge	.L9
	movl	-400024(%rbp), %eax
	movl	%eax, -400028(%rbp)
.L9:
	addl	$1, -400032(%rbp)
.L4:
	movl	-400032(%rbp), %eax
	cmpl	-400020(%rbp), %eax
	jl	.L10
	movl	-400028(%rbp), %eax
	movl	%eax, %esi
	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
.LFE6:
	.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
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397344
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2720, %rsp
	.cfi_def_cfa_offset 400064
	leaq	.LC1(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 400024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	16(%rsp), %rbp
	xorl	%ebx, %ebx
	leaq	.LC2(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	addq	$4, %rbp
	cmpl	%ebx, %eax
	jg	.L3
.L2:
	movl	12(%rsp), %esi
	subl	%esi, %eax
	movl	%eax, %edx
	js	.L19
	leal	1(%rax), %r9d
	cmpl	$2, %eax
	jle	.L20
	movl	%r9d, %ecx
	leaq	16(%rsp), %r8
	pxor	%xmm5, %xmm5
	movslq	%esi, %rax
	shrl	$2, %ecx
	movdqa	.LC0(%rip), %xmm6
	leaq	12(%rsp,%rax,4), %rdi
	xorl	%eax, %eax
	salq	$4, %rcx
	.p2align 4,,10
	.p2align 3
.L6:
	movdqa	(%r8,%rax), %xmm11
	movdqa	%xmm5, %xmm4
	movdqu	(%rdi,%rax), %xmm8
	movdqa	%xmm5, %xmm3
	addq	$16, %rax
	psubd	%xmm11, %xmm4
	movdqa	%xmm8, %xmm9
	movdqa	%xmm8, %xmm7
	movdqa	%xmm4, %xmm0
	pcmpgtd	%xmm5, %xmm9
	movdqa	%xmm4, %xmm10
	pcmpgtd	%xmm8, %xmm0
	pcmpgtd	%xmm11, %xmm3
	pslld	$1, %xmm10
	pslld	$1, %xmm7
	movdqa	%xmm9, %xmm2
	paddd	%xmm8, %xmm10
	psubd	%xmm11, %xmm7
	movdqa	%xmm0, %xmm1
	pcmpeqd	%xmm5, %xmm2
	pand	%xmm3, %xmm9
	pcmpeqd	%xmm5, %xmm1
	pand	%xmm9, %xmm0
	pand	%xmm0, %xmm7
	pand	%xmm3, %xmm2
	pand	%xmm9, %xmm1
	movdqa	%xmm4, %xmm9
	pand	%xmm2, %xmm4
	pand	%xmm3, %xmm9
	pandn	%xmm8, %xmm3
	por	%xmm9, %xmm3
	pandn	%xmm3, %xmm2
	movdqa	%xmm10, %xmm3
	por	%xmm4, %xmm2
	pand	%xmm1, %xmm3
	pandn	%xmm2, %xmm1
	por	%xmm3, %xmm1
	pandn	%xmm1, %xmm0
	movdqa	%xmm6, %xmm1
	por	%xmm7, %xmm0
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm6, %xmm1
	movdqa	%xmm1, %xmm6
	por	%xmm0, %xmm6
	cmpq	%rcx, %rax
	jne	.L6
	movdqa	%xmm6, %xmm1
	movl	%r9d, %eax
	psrldq	$8, %xmm1
	andl	$-4, %eax
	andl	$3, %r9d
	movdqa	%xmm1, %xmm0
	pcmpgtd	%xmm6, %xmm0
	pand	%xmm0, %xmm6
	pandn	%xmm1, %xmm0
	por	%xmm6, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm0, %xmm1
	movd	%xmm1, %r8d
	je	.L4
.L5:
	movslq	%eax, %rcx
	movl	16(%rsp,%rcx,4), %edi
	leal	-1(%rsi,%rax), %ecx
	movslq	%ecx, %rcx
	movl	16(%rsp,%rcx,4), %ecx
	testl	%edi, %edi
	js	.L30
.L9:
	cmpl	%ecx, %r8d
	cmovg	%ecx, %r8d
	leal	1(%rax), %ecx
	cmpl	%ecx, %edx
	jl	.L4
	movslq	%ecx, %rdi
	leal	-1(%rsi,%rcx), %ecx
	movl	16(%rsp,%rdi,4), %edi
	movslq	%ecx, %rcx
	movl	16(%rsp,%rcx,4), %ecx
	testl	%edi, %edi
	js	.L31
.L11:
	cmpl	%ecx, %r8d
	cmovg	%ecx, %r8d
	addl	$2, %eax
	cmpl	%eax, %edx
	jl	.L4
	movslq	%eax, %rdx
	leal	-1(%rsi,%rax), %eax
	movl	16(%rsp,%rdx,4), %edx
	cltq
	movl	16(%rsp,%rax,4), %eax
	testl	%edx, %edx
	js	.L32
.L14:
	cmpl	%eax, %r8d
	cmovg	%eax, %r8d
.L4:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC3(%rip), %rsi
	call	__printf_chk@PLT
	movq	400024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L33
	addq	$400032, %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
.L30:
	.cfi_restore_state
	movl	%edi, %r9d
	negl	%r9d
	testl	%ecx, %ecx
	jle	.L21
	cmpl	%r9d, %ecx
	jl	.L10
	imull	$-2, %edi, %edi
	addl	%edi, %ecx
	jmp	.L9
.L31:
	movl	%edi, %r9d
	negl	%r9d
	testl	%ecx, %ecx
	jle	.L22
	cmpl	%ecx, %r9d
	jg	.L12
	imull	$-2, %edi, %edi
	addl	%edi, %ecx
	jmp	.L11
.L32:
	movl	%edx, %ecx
	negl	%ecx
	testl	%eax, %eax
	jle	.L34
	cmpl	%ecx, %eax
	jl	.L35
	imull	$-2, %edx, %edx
	addl	%edx, %eax
	jmp	.L14
.L21:
	movl	%r9d, %ecx
	jmp	.L9
.L22:
	movl	%r9d, %ecx
	jmp	.L11
.L34:
	movl	%ecx, %eax
	jmp	.L14
.L19:
	movl	$2147483647, %r8d
	jmp	.L4
.L20:
	movl	$2147483647, %r8d
	xorl	%eax, %eax
	jmp	.L5
.L10:
	addl	%ecx, %ecx
	subl	%edi, %ecx
	jmp	.L9
.L12:
	addl	%ecx, %ecx
	subl	%edi, %ecx
	jmp	.L11
.L35:
	addl	%eax, %eax
	subl	%edx, %eax
	jmp	.L14
.L33:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	2147483647
	.long	2147483647
	.long	2147483647
	.long	2147483647
	.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
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397344
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2720, %rsp
	.cfi_def_cfa_offset 400064
	leaq	.LC1(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 400024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	16(%rsp), %rbp
	xorl	%ebx, %ebx
	leaq	.LC2(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	addq	$4, %rbp
	cmpl	%ebx, %eax
	jg	.L3
.L2:
	movl	12(%rsp), %esi
	subl	%esi, %eax
	movl	%eax, %edx
	js	.L19
	leal	1(%rax), %r9d
	cmpl	$2, %eax
	jle	.L20
	movl	%r9d, %ecx
	leaq	16(%rsp), %r8
	pxor	%xmm5, %xmm5
	movslq	%esi, %rax
	shrl	$2, %ecx
	movdqa	.LC0(%rip), %xmm6
	leaq	12(%rsp,%rax,4), %rdi
	xorl	%eax, %eax
	salq	$4, %rcx
	.p2align 4,,10
	.p2align 3
.L6:
	movdqa	(%r8,%rax), %xmm11
	movdqa	%xmm5, %xmm4
	movdqu	(%rdi,%rax), %xmm8
	movdqa	%xmm5, %xmm3
	addq	$16, %rax
	psubd	%xmm11, %xmm4
	movdqa	%xmm8, %xmm9
	movdqa	%xmm8, %xmm7
	movdqa	%xmm4, %xmm0
	pcmpgtd	%xmm5, %xmm9
	movdqa	%xmm4, %xmm10
	pcmpgtd	%xmm8, %xmm0
	pcmpgtd	%xmm11, %xmm3
	pslld	$1, %xmm10
	pslld	$1, %xmm7
	movdqa	%xmm9, %xmm2
	paddd	%xmm8, %xmm10
	psubd	%xmm11, %xmm7
	movdqa	%xmm0, %xmm1
	pcmpeqd	%xmm5, %xmm2
	pand	%xmm3, %xmm9
	pcmpeqd	%xmm5, %xmm1
	pand	%xmm9, %xmm0
	pand	%xmm0, %xmm7
	pand	%xmm3, %xmm2
	pand	%xmm9, %xmm1
	movdqa	%xmm4, %xmm9
	pand	%xmm2, %xmm4
	pand	%xmm3, %xmm9
	pandn	%xmm8, %xmm3
	por	%xmm9, %xmm3
	pandn	%xmm3, %xmm2
	movdqa	%xmm10, %xmm3
	por	%xmm4, %xmm2
	pand	%xmm1, %xmm3
	pandn	%xmm2, %xmm1
	por	%xmm3, %xmm1
	pandn	%xmm1, %xmm0
	movdqa	%xmm6, %xmm1
	por	%xmm7, %xmm0
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm6, %xmm1
	movdqa	%xmm1, %xmm6
	por	%xmm0, %xmm6
	cmpq	%rcx, %rax
	jne	.L6
	movdqa	%xmm6, %xmm1
	movl	%r9d, %eax
	psrldq	$8, %xmm1
	andl	$-4, %eax
	andl	$3, %r9d
	movdqa	%xmm1, %xmm0
	pcmpgtd	%xmm6, %xmm0
	pand	%xmm0, %xmm6
	pandn	%xmm1, %xmm0
	por	%xmm6, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm0, %xmm1
	movd	%xmm1, %r8d
	je	.L4
.L5:
	movslq	%eax, %rcx
	movl	16(%rsp,%rcx,4), %edi
	leal	-1(%rsi,%rax), %ecx
	movslq	%ecx, %rcx
	movl	16(%rsp,%rcx,4), %ecx
	testl	%edi, %edi
	js	.L30
.L9:
	cmpl	%ecx, %r8d
	cmovg	%ecx, %r8d
	leal	1(%rax), %ecx
	cmpl	%ecx, %edx
	jl	.L4
	movslq	%ecx, %rdi
	leal	-1(%rsi,%rcx), %ecx
	movl	16(%rsp,%rdi,4), %edi
	movslq	%ecx, %rcx
	movl	16(%rsp,%rcx,4), %ecx
	testl	%edi, %edi
	js	.L31
.L11:
	cmpl	%ecx, %r8d
	cmovg	%ecx, %r8d
	addl	$2, %eax
	cmpl	%eax, %edx
	jl	.L4
	movslq	%eax, %rdx
	leal	-1(%rsi,%rax), %eax
	movl	16(%rsp,%rdx,4), %edx
	cltq
	movl	16(%rsp,%rax,4), %eax
	testl	%edx, %edx
	js	.L32
.L14:
	cmpl	%eax, %r8d
	cmovg	%eax, %r8d
.L4:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC3(%rip), %rsi
	call	__printf_chk@PLT
	movq	400024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L33
	addq	$400032, %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
.L30:
	.cfi_restore_state
	movl	%edi, %r9d
	negl	%r9d
	testl	%ecx, %ecx
	jle	.L21
	cmpl	%r9d, %ecx
	jl	.L10
	imull	$-2, %edi, %edi
	addl	%edi, %ecx
	jmp	.L9
.L31:
	movl	%edi, %r9d
	negl	%r9d
	testl	%ecx, %ecx
	jle	.L22
	cmpl	%ecx, %r9d
	jg	.L12
	imull	$-2, %edi, %edi
	addl	%edi, %ecx
	jmp	.L11
.L32:
	movl	%edx, %ecx
	negl	%ecx
	testl	%eax, %eax
	jle	.L34
	cmpl	%ecx, %eax
	jl	.L35
	imull	$-2, %edx, %edx
	addl	%edx, %eax
	jmp	.L14
.L21:
	movl	%r9d, %ecx
	jmp	.L9
.L22:
	movl	%r9d, %ecx
	jmp	.L11
.L34:
	movl	%ecx, %eax
	jmp	.L14
.L19:
	movl	$2147483647, %r8d
	jmp	.L4
.L20:
	movl	$2147483647, %r8d
	xorl	%eax, %eax
	jmp	.L5
.L10:
	addl	%ecx, %ecx
	subl	%edi, %ecx
	jmp	.L9
.L12:
	addl	%ecx, %ecx
	subl	%edi, %ecx
	jmp	.L11
.L35:
	addl	%eax, %eax
	subl	%edx, %eax
	jmp	.L14
.L33:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	2147483647
	.long	2147483647
	.long	2147483647
	.long	2147483647
	.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 <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>

int main(void){
	int n, k, i;
	int x[100000];
	scanf("%d%d", &n, &k);
	for(i=0; i<n; i++){
		scanf("%d", x+i);
	}
	int l=n-k+1;
	int min=INT_MAX;
	for(i=0; i<l; i++){
		int now;
		if(x[i]>=0){
			now = x[i+k-1];
		}else if(x[i+k-1]<=0){
			now = -x[i];
		}else if(-x[i]<=x[i+k-1]){
			now = -x[i]*2 + x[i+k-1];
		}else{
			now = x[i+k-1]*2 - x[i];
		}
		if(now<min) min=now;
	}
	printf("%d\n", min);
}

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 <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>

int main(void){
	int n, k, i;
	int x[100000];
	scanf("%d%d", &n, &k);
	for(i=0; i<n; i++){
		scanf("%d", x+i);
	}
	int l=n-k+1;
	int min=INT_MAX;
	for(i=0; i<l; i++){
		int now;
		if(x[i]>=0){
			now = x[i+k-1];
		}else if(x[i+k-1]<=0){
			now = -x[i];
		}else if(-x[i]<=x[i+k-1]){
			now = -x[i]*2 + x[i+k-1];
		}else{
			now = x[i+k-1]*2 - x[i];
		}
		if(now<min) min=now;
	}
	printf("%d\n", min);
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2736, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-400036(%rbp), %rdx
	leaq	-400040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -400032(%rbp)
	jmp	.L2
.L3:
	movl	-400032(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-400016(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -400032(%rbp)
.L2:
	movl	-400040(%rbp), %eax
	cmpl	%eax, -400032(%rbp)
	jl	.L3
	movl	-400040(%rbp), %eax
	movl	-400036(%rbp), %edx
	subl	%edx, %eax
	addl	$1, %eax
	movl	%eax, -400020(%rbp)
	movl	$2147483647, -400028(%rbp)
	movl	$0, -400032(%rbp)
	jmp	.L4
.L10:
	movl	-400032(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	testl	%eax, %eax
	js	.L5
	movl	-400036(%rbp), %edx
	movl	-400032(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	movl	%eax, -400024(%rbp)
	jmp	.L6
.L5:
	movl	-400036(%rbp), %edx
	movl	-400032(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jg	.L7
	movl	-400032(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	negl	%eax
	movl	%eax, -400024(%rbp)
	jmp	.L6
.L7:
	movl	-400032(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	negl	%eax
	movl	%eax, %edx
	movl	-400036(%rbp), %ecx
	movl	-400032(%rbp), %eax
	addl	%ecx, %eax
	subl	$1, %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jg	.L8
	movl	-400032(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %edx
	movl	$0, %eax
	subl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %ecx
	movl	-400036(%rbp), %edx
	movl	-400032(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	addl	%ecx, %eax
	movl	%eax, -400024(%rbp)
	jmp	.L6
.L8:
	movl	-400036(%rbp), %edx
	movl	-400032(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	leal	(%rax,%rax), %edx
	movl	-400032(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -400024(%rbp)
.L6:
	movl	-400024(%rbp), %eax
	cmpl	-400028(%rbp), %eax
	jge	.L9
	movl	-400024(%rbp), %eax
	movl	%eax, -400028(%rbp)
.L9:
	addl	$1, -400032(%rbp)
.L4:
	movl	-400032(%rbp), %eax
	cmpl	-400020(%rbp), %eax
	jl	.L10
	movl	-400028(%rbp), %eax
	movl	%eax, %esi
	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
.LFE6:
	.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%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2736, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-400036(%rbp), %rdx
	leaq	-400040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -400032(%rbp)
	jmp	.L2
.L3:
	movl	-400032(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-400016(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -400032(%rbp)
.L2:
	movl	-400040(%rbp), %eax
	cmpl	%eax, -400032(%rbp)
	jl	.L3
	movl	-400040(%rbp), %eax
	movl	-400036(%rbp), %edx
	subl	%edx, %eax
	addl	$1, %eax
	movl	%eax, -400020(%rbp)
	movl	$2147483647, -400028(%rbp)
	movl	$0, -400032(%rbp)
	jmp	.L4
.L10:
	movl	-400032(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	testl	%eax, %eax
	js	.L5
	movl	-400036(%rbp), %edx
	movl	-400032(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	movl	%eax, -400024(%rbp)
	jmp	.L6
.L5:
	movl	-400036(%rbp), %edx
	movl	-400032(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jg	.L7
	movl	-400032(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	negl	%eax
	movl	%eax, -400024(%rbp)
	jmp	.L6
.L7:
	movl	-400032(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	negl	%eax
	movl	%eax, %edx
	movl	-400036(%rbp), %ecx
	movl	-400032(%rbp), %eax
	addl	%ecx, %eax
	subl	$1, %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jg	.L8
	movl	-400032(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %edx
	movl	$0, %eax
	subl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %ecx
	movl	-400036(%rbp), %edx
	movl	-400032(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	addl	%ecx, %eax
	movl	%eax, -400024(%rbp)
	jmp	.L6
.L8:
	movl	-400036(%rbp), %edx
	movl	-400032(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	leal	(%rax,%rax), %edx
	movl	-400032(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -400024(%rbp)
.L6:
	movl	-400024(%rbp), %eax
	cmpl	-400028(%rbp), %eax
	jge	.L9
	movl	-400024(%rbp), %eax
	movl	%eax, -400028(%rbp)
.L9:
	addl	$1, -400032(%rbp)
.L4:
	movl	-400032(%rbp), %eax
	cmpl	-400020(%rbp), %eax
	jl	.L10
	movl	-400028(%rbp), %eax
	movl	%eax, %esi
	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
.LFE6:
	.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:
