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>
int main(void){
    int x[9<<14];
    int i=0;
    int j=0;
    int min=9<<25;
    
    for(;~scanf("%d",x+i);i++);
    for(j=1;j<x[0]-x[1]+2;j++)min=fmin(x[j+x[1]]-x[j+1]+fmin(abs(x[j+1]),abs(x[j+x[1]])),min);
    printf("%d",min);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-589824(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -589852(%rbp)
	movl	$0, -589848(%rbp)
	movl	$301989888, -589844(%rbp)
	jmp	.L2
.L3:
	addl	$1, -589852(%rbp)
.L2:
	movl	-589852(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-589840(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L3
	movl	$1, -589848(%rbp)
	jmp	.L4
.L5:
	pxor	%xmm2, %xmm2
	cvtsi2sdl	-589844(%rbp), %xmm2
	movsd	%xmm2, -589864(%rbp)
	movl	-589836(%rbp), %edx
	movl	-589848(%rbp), %eax
	addl	%edx, %eax
	cltq
	movl	-589840(%rbp,%rax,4), %edx
	movl	-589848(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-589840(%rbp,%rax,4), %eax
	subl	%eax, %edx
	pxor	%xmm3, %xmm3
	cvtsi2sdl	%edx, %xmm3
	movsd	%xmm3, -589872(%rbp)
	movl	-589836(%rbp), %edx
	movl	-589848(%rbp), %eax
	addl	%edx, %eax
	cltq
	movl	-589840(%rbp,%rax,4), %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movl	-589848(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-589840(%rbp,%rax,4), %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	pxor	%xmm4, %xmm4
	cvtsi2sdl	%eax, %xmm4
	movq	%xmm4, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	fmin@PLT
	addsd	-589872(%rbp), %xmm0
	movq	%xmm0, %rax
	movsd	-589864(%rbp), %xmm1
	movq	%rax, %xmm0
	call	fmin@PLT
	cvttsd2sil	%xmm0, %eax
	movl	%eax, -589844(%rbp)
	addl	$1, -589848(%rbp)
.L4:
	movl	-589840(%rbp), %eax
	movl	-589836(%rbp), %edx
	subl	%edx, %eax
	addl	$1, %eax
	cmpl	%eax, -589848(%rbp)
	jle	.L5
	movl	-589844(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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
.LC0:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-589824(%rsp), %r11
	.cfi_def_cfa 11, 589880
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$40, %rsp
	.cfi_def_cfa_offset 589920
	leaq	.LC0(%rip), %r13
	movq	%fs:40, %rax
	movq	%rax, 589848(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r14
	movq	%r14, %rbx
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L2
	movslq	20(%rsp), %r12
	movl	16(%rsp), %eax
	subl	%r12d, %eax
	js	.L6
	movl	%eax, %eax
	leaq	24(%rsp), %rbp
	leaq	12(%r14,%rax,4), %rax
	movl	$301989888, %r14d
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L4:
	movl	-4(%rbp,%r12,4), %ebx
	movl	0(%rbp), %r15d
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	movl	%ebx, %eax
	movl	%r15d, %edx
	negl	%eax
	cmovs	%ebx, %eax
	negl	%edx
	cmovs	%r15d, %edx
	subl	%r15d, %ebx
	addq	$4, %rbp
	cvtsi2sdl	%eax, %xmm1
	cvtsi2sdl	%edx, %xmm0
	call	fmin@PLT
	movapd	%xmm0, %xmm1
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%ebx, %xmm0
	addsd	%xmm1, %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%r14d, %xmm1
	call	fmin@PLT
	cvttsd2sil	%xmm0, %r14d
	cmpq	%rbp, 8(%rsp)
	jne	.L4
.L3:
	xorl	%eax, %eax
	movl	%r14d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	589848(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L11
	addq	$589864, %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
.L6:
	.cfi_restore_state
	movl	$301989888, %r14d
	jmp	.L3
.L11:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-589824(%rsp), %r11
	.cfi_def_cfa 11, 589880
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$40, %rsp
	.cfi_def_cfa_offset 589920
	leaq	.LC0(%rip), %r13
	movq	%fs:40, %rax
	movq	%rax, 589848(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r14
	movq	%r14, %rbx
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L2
	movslq	20(%rsp), %r12
	movl	16(%rsp), %eax
	subl	%r12d, %eax
	js	.L6
	movl	%eax, %eax
	leaq	24(%rsp), %rbp
	leaq	12(%r14,%rax,4), %rax
	movl	$301989888, %r14d
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L4:
	movl	-4(%rbp,%r12,4), %ebx
	movl	0(%rbp), %r15d
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	movl	%ebx, %eax
	movl	%r15d, %edx
	negl	%eax
	cmovs	%ebx, %eax
	negl	%edx
	cmovs	%r15d, %edx
	subl	%r15d, %ebx
	addq	$4, %rbp
	cvtsi2sdl	%eax, %xmm1
	cvtsi2sdl	%edx, %xmm0
	call	fmin@PLT
	movapd	%xmm0, %xmm1
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%ebx, %xmm0
	addsd	%xmm1, %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%r14d, %xmm1
	call	fmin@PLT
	cvttsd2sil	%xmm0, %r14d
	cmpq	%rbp, 8(%rsp)
	jne	.L4
.L3:
	xorl	%eax, %eax
	movl	%r14d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	589848(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L11
	addq	$589864, %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
.L6:
	.cfi_restore_state
	movl	$301989888, %r14d
	jmp	.L3
.L11:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:

#include <stdio.h>
int main(void){
    int x[9<<14];
    int i=0;
    int j=0;
    int min=9<<25;
    
    for(;~scanf("%d",x+i);i++);
    for(j=1;j<x[0]-x[1]+2;j++)min=fmin(x[j+x[1]]-x[j+1]+fmin(abs(x[j+1]),abs(x[j+x[1]])),min);
    printf("%d",min);
}
8 5
-9 -7 -4 -3 1 2 4 4
 5 5
-30 -10 10 20 50
 3 2
10 18 30
 5 3
-30 -5 10 20 50
 3 2
10 20 43
 8 1
-9 -7 -4 -3 1 2 4 4
 5 5
-30 -10 8 20 76
 5 5
-19 -10 8 20 76
 8 4
-14 -7 -4 -11 1 2 3 4
 5 4
-30 -5 16 20 67

10 110 18 30 20 1 136 114 4 70
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>
int main(void){
    int x[9<<14];
    int i=0;
    int j=0;
    int min=9<<25;
    
    for(;~scanf("%d",x+i);i++);
    for(j=1;j<x[0]-x[1]+2;j++)min=fmin(x[j+x[1]]-x[j+1]+fmin(abs(x[j+1]),abs(x[j+x[1]])),min);
    printf("%d",min);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-589824(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -589852(%rbp)
	movl	$0, -589848(%rbp)
	movl	$301989888, -589844(%rbp)
	jmp	.L2
.L3:
	addl	$1, -589852(%rbp)
.L2:
	movl	-589852(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-589840(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L3
	movl	$1, -589848(%rbp)
	jmp	.L4
.L5:
	pxor	%xmm2, %xmm2
	cvtsi2sdl	-589844(%rbp), %xmm2
	movsd	%xmm2, -589864(%rbp)
	movl	-589836(%rbp), %edx
	movl	-589848(%rbp), %eax
	addl	%edx, %eax
	cltq
	movl	-589840(%rbp,%rax,4), %edx
	movl	-589848(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-589840(%rbp,%rax,4), %eax
	subl	%eax, %edx
	pxor	%xmm3, %xmm3
	cvtsi2sdl	%edx, %xmm3
	movsd	%xmm3, -589872(%rbp)
	movl	-589836(%rbp), %edx
	movl	-589848(%rbp), %eax
	addl	%edx, %eax
	cltq
	movl	-589840(%rbp,%rax,4), %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movl	-589848(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-589840(%rbp,%rax,4), %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	pxor	%xmm4, %xmm4
	cvtsi2sdl	%eax, %xmm4
	movq	%xmm4, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	fmin@PLT
	addsd	-589872(%rbp), %xmm0
	movq	%xmm0, %rax
	movsd	-589864(%rbp), %xmm1
	movq	%rax, %xmm0
	call	fmin@PLT
	cvttsd2sil	%xmm0, %eax
	movl	%eax, -589844(%rbp)
	addl	$1, -589848(%rbp)
.L4:
	movl	-589840(%rbp), %eax
	movl	-589836(%rbp), %edx
	subl	%edx, %eax
	addl	$1, %eax
	cmpl	%eax, -589848(%rbp)
	jle	.L5
	movl	-589844(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-589824(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -589852(%rbp)
	movl	$0, -589848(%rbp)
	movl	$301989888, -589844(%rbp)
	jmp	.L2
.L3:
	addl	$1, -589852(%rbp)
.L2:
	movl	-589852(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-589840(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	jne	.L3
	movl	$1, -589848(%rbp)
	jmp	.L4
.L5:
	pxor	%xmm2, %xmm2
	cvtsi2sdl	-589844(%rbp), %xmm2
	movsd	%xmm2, -589864(%rbp)
	movl	-589836(%rbp), %edx
	movl	-589848(%rbp), %eax
	addl	%edx, %eax
	cltq
	movl	-589840(%rbp,%rax,4), %edx
	movl	-589848(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-589840(%rbp,%rax,4), %eax
	subl	%eax, %edx
	pxor	%xmm3, %xmm3
	cvtsi2sdl	%edx, %xmm3
	movsd	%xmm3, -589872(%rbp)
	movl	-589836(%rbp), %edx
	movl	-589848(%rbp), %eax
	addl	%edx, %eax
	cltq
	movl	-589840(%rbp,%rax,4), %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movl	-589848(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-589840(%rbp,%rax,4), %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	pxor	%xmm4, %xmm4
	cvtsi2sdl	%eax, %xmm4
	movq	%xmm4, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	fmin@PLT
	addsd	-589872(%rbp), %xmm0
	movq	%xmm0, %rax
	movsd	-589864(%rbp), %xmm1
	movq	%rax, %xmm0
	call	fmin@PLT
	cvttsd2sil	%xmm0, %eax
	movl	%eax, -589844(%rbp)
	addl	$1, -589848(%rbp)
.L4:
	movl	-589840(%rbp), %eax
	movl	-589836(%rbp), %edx
	subl	%edx, %eax
	addl	$1, %eax
	cmpl	%eax, -589848(%rbp)
	jle	.L5
	movl	-589844(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
