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>
#define N 100000
int a[N+1];
int dp[N+1];

int min(int a, int b){
  if(b>a)return a;
  else return b;
}
int abs(int a){
  if(a<0)return -1*a;
  else return a;
}
int main(){
   int i,j, n;
   scanf("%d", &n);
   for(i=0;i<n;i++)scanf("%d", &a[i]);
   dp[0]=0;

   for(i=1;i<n;i++){
     if(i==1)dp[i]=dp[0]+abs(a[i]-a[i-1]);
     else{
       dp[i]=min(dp[i-1]+abs(a[i]-a[i-1]), dp[i-2]+abs(a[i]-a[i-2]));
     }
   }

   printf("%d\n", dp[n-1]);


   return 0;
 }
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 400004
a:
	.zero	400004
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 400004
dp:
	.zero	400004
	.text
	.globl	min
	.type	min, @function
min:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jle	.L2
	movl	-4(%rbp), %eax
	jmp	.L3
.L2:
	movl	-8(%rbp), %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	min, .-min
	.globl	abs
	.type	abs, @function
abs:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	cmpl	$0, -4(%rbp)
	jns	.L5
	movl	-4(%rbp), %eax
	negl	%eax
	jmp	.L6
.L5:
	movl	-4(%rbp), %eax
.L6:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	abs, .-abs
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L8
.L9:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -12(%rbp)
.L8:
	movl	-16(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L9
	movl	$0, dp(%rip)
	movl	$1, -12(%rbp)
	jmp	.L10
.L13:
	cmpl	$1, -12(%rbp)
	jne	.L11
	movl	dp(%rip), %esi
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	subl	$1, %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	leal	(%rsi,%rax), %ecx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	jmp	.L12
.L11:
	movl	-12(%rbp), %eax
	subl	$2, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %esi
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	subl	$2, %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	leal	(%rsi,%rax), %edx
	movl	-12(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	dp(%rip), %rax
	movl	(%rcx,%rax), %edi
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	-12(%rbp), %ecx
	subl	$1, %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	a(%rip), %rcx
	movl	(%rsi,%rcx), %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	negl	%ecx
	cmovns	%ecx, %eax
	addl	%edi, %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	min
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	dp(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
.L12:
	addl	$1, -12(%rbp)
.L10:
	movl	-16(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L13
	movl	-16(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	min
	.type	min, @function
min:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%edi, %esi
	movl	%edi, %eax
	cmovle	%esi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	min, .-min
	.p2align 4
	.globl	abs
	.type	abs, @function
abs:
.LFB24:
	.cfi_startproc
	endbr64
	movl	%edi, %eax
	negl	%eax
	cmovs	%edi, %eax
	ret
	.cfi_endproc
.LFE24:
	.size	abs, .-abs
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%r12, %rdi
	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), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %r8d
	testl	%r8d, %r8d
	jle	.L5
	leaq	a(%rip), %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %r8d
	addq	$4, %rbp
	cmpl	%ebx, %r8d
	jg	.L6
	movl	$0, dp(%rip)
	leaq	dp(%rip), %r11
	cmpl	$1, %r8d
	jle	.L9
	movl	4+a(%rip), %eax
	subl	a(%rip), %eax
	movq	%r11, %rdi
	leaq	a(%rip), %rsi
	movl	%eax, %r10d
	movl	$1, %r9d
	negl	%r10d
	cmovs	%eax, %r10d
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L8:
	movl	4(%rsi), %ecx
	movl	%ecx, %edx
	subl	-4(%rsi), %edx
	movl	%edx, %eax
	negl	%eax
	cmovs	%edx, %eax
	subl	(%rsi), %ecx
	addl	-4(%rdi), %eax
	movl	%ecx, %edx
	negl	%edx
	cmovs	%ecx, %edx
	addl	(%rdi), %edx
	cmpl	%edx, %eax
	cmovg	%edx, %eax
	addl	$1, %r9d
	addq	$4, %rdi
	addq	$4, %rsi
	movl	%eax, (%rdi)
	cmpl	%r9d, %r8d
	je	.L9
.L10:
	cmpl	$1, %r9d
	jne	.L8
	movl	%r10d, 4+dp(%rip)
	addq	$4, %rdi
	addq	$4, %rsi
	cmpl	$2, %r8d
	je	.L9
	movl	$2, %r9d
	jmp	.L8
.L5:
	movl	$0, dp(%rip)
	leaq	dp(%rip), %r11
	.p2align 4,,10
	.p2align 3
.L9:
	subl	$1, %r8d
	xorl	%eax, %eax
	movl	$1, %edi
	movslq	%r8d, %r8
	leaq	.LC1(%rip), %rsi
	movl	(%r11,%r8,4), %edx
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	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
.L19:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 400004
dp:
	.zero	400004
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 400004
a:
	.zero	400004
	.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	min
	.type	min, @function
min:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%edi, %esi
	movl	%edi, %eax
	cmovle	%esi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	min, .-min
	.p2align 4
	.globl	abs
	.type	abs, @function
abs:
.LFB24:
	.cfi_startproc
	endbr64
	movl	%edi, %eax
	negl	%eax
	cmovs	%edi, %eax
	ret
	.cfi_endproc
.LFE24:
	.size	abs, .-abs
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%r12, %rdi
	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), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %r8d
	testl	%r8d, %r8d
	jle	.L5
	leaq	a(%rip), %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %r8d
	addq	$4, %rbp
	cmpl	%ebx, %r8d
	jg	.L6
	movl	$0, dp(%rip)
	leaq	dp(%rip), %r11
	cmpl	$1, %r8d
	jle	.L9
	movl	4+a(%rip), %eax
	subl	a(%rip), %eax
	movq	%r11, %rdi
	leaq	a(%rip), %rsi
	movl	%eax, %r10d
	movl	$1, %r9d
	negl	%r10d
	cmovs	%eax, %r10d
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L8:
	movl	4(%rsi), %ecx
	movl	%ecx, %edx
	subl	-4(%rsi), %edx
	movl	%edx, %eax
	negl	%eax
	cmovs	%edx, %eax
	subl	(%rsi), %ecx
	addl	-4(%rdi), %eax
	movl	%ecx, %edx
	negl	%edx
	cmovs	%ecx, %edx
	addl	(%rdi), %edx
	cmpl	%edx, %eax
	cmovg	%edx, %eax
	addl	$1, %r9d
	addq	$4, %rdi
	addq	$4, %rsi
	movl	%eax, (%rdi)
	cmpl	%r9d, %r8d
	je	.L9
.L10:
	cmpl	$1, %r9d
	jne	.L8
	movl	%r10d, 4+dp(%rip)
	addq	$4, %rdi
	addq	$4, %rsi
	cmpl	$2, %r8d
	je	.L9
	movl	$2, %r9d
	jmp	.L8
.L5:
	movl	$0, dp(%rip)
	leaq	dp(%rip), %r11
	.p2align 4,,10
	.p2align 3
.L9:
	subl	$1, %r8d
	xorl	%eax, %eax
	movl	$1, %edi
	movslq	%r8d, %r8
	leaq	.LC1(%rip), %rsi
	movl	(%r11,%r8,4), %edx
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	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
.L19:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	dp
	.bss
	.align 32
	.type	dp, @object
	.size	dp, 400004
dp:
	.zero	400004
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 400004
a:
	.zero	400004
	.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>
#define N 100000
int a[N+1];
int dp[N+1];

int min(int a, int b){
  if(b>a)return a;
  else return b;
}
int abs(int a){
  if(a<0)return -1*a;
  else return a;
}
int main(){
   int i,j, n;
   scanf("%d", &n);
   for(i=0;i<n;i++)scanf("%d", &a[i]);
   dp[0]=0;

   for(i=1;i<n;i++){
     if(i==1)dp[i]=dp[0]+abs(a[i]-a[i-1]);
     else{
       dp[i]=min(dp[i-1]+abs(a[i]-a[i-1]), dp[i-2]+abs(a[i]-a[i-2]));
     }
   }

   printf("%d\n", dp[n-1]);


   return 0;
 }

6
30 10 60 10 60 57
 4
10 14 40 20
 2
18 10
 4
5 14 40 20
 2
33 10
 6
30 12 60 10 60 9
 2
9 10
 6
30 12 60 17 60 9
 2
9 18
 6
30 12 60 33 60 9

33
 10
 8
 15
 23
 21
 1
 31
 9
 63

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>
#define N 100000
int a[N+1];
int dp[N+1];

int min(int a, int b){
  if(b>a)return a;
  else return b;
}
int abs(int a){
  if(a<0)return -1*a;
  else return a;
}
int main(){
   int i,j, n;
   scanf("%d", &n);
   for(i=0;i<n;i++)scanf("%d", &a[i]);
   dp[0]=0;

   for(i=1;i<n;i++){
     if(i==1)dp[i]=dp[0]+abs(a[i]-a[i-1]);
     else{
       dp[i]=min(dp[i-1]+abs(a[i]-a[i-1]), dp[i-2]+abs(a[i]-a[i-2]));
     }
   }

   printf("%d\n", dp[n-1]);


   return 0;
 }
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 400004
a:
	.zero	400004
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 400004
dp:
	.zero	400004
	.text
	.globl	min
	.type	min, @function
min:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jle	.L2
	movl	-4(%rbp), %eax
	jmp	.L3
.L2:
	movl	-8(%rbp), %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	min, .-min
	.globl	abs
	.type	abs, @function
abs:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	cmpl	$0, -4(%rbp)
	jns	.L5
	movl	-4(%rbp), %eax
	negl	%eax
	jmp	.L6
.L5:
	movl	-4(%rbp), %eax
.L6:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	abs, .-abs
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L8
.L9:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -12(%rbp)
.L8:
	movl	-16(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L9
	movl	$0, dp(%rip)
	movl	$1, -12(%rbp)
	jmp	.L10
.L13:
	cmpl	$1, -12(%rbp)
	jne	.L11
	movl	dp(%rip), %esi
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	subl	$1, %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	leal	(%rsi,%rax), %ecx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	jmp	.L12
.L11:
	movl	-12(%rbp), %eax
	subl	$2, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %esi
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	subl	$2, %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	leal	(%rsi,%rax), %edx
	movl	-12(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	dp(%rip), %rax
	movl	(%rcx,%rax), %edi
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	-12(%rbp), %ecx
	subl	$1, %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	a(%rip), %rcx
	movl	(%rsi,%rcx), %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	negl	%ecx
	cmovns	%ecx, %eax
	addl	%edi, %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	min
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	dp(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
.L12:
	addl	$1, -12(%rbp)
.L10:
	movl	-16(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L13
	movl	-16(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 400004
a:
	.zero	400004
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 400004
dp:
	.zero	400004
	.text
	.globl	min
	.type	min, @function
min:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jle	.L2
	movl	-4(%rbp), %eax
	jmp	.L3
.L2:
	movl	-8(%rbp), %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	min, .-min
	.globl	abs
	.type	abs, @function
abs:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	cmpl	$0, -4(%rbp)
	jns	.L5
	movl	-4(%rbp), %eax
	negl	%eax
	jmp	.L6
.L5:
	movl	-4(%rbp), %eax
.L6:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	abs, .-abs
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L8
.L9:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -12(%rbp)
.L8:
	movl	-16(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L9
	movl	$0, dp(%rip)
	movl	$1, -12(%rbp)
	jmp	.L10
.L13:
	cmpl	$1, -12(%rbp)
	jne	.L11
	movl	dp(%rip), %esi
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	subl	$1, %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	leal	(%rsi,%rax), %ecx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	jmp	.L12
.L11:
	movl	-12(%rbp), %eax
	subl	$2, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %esi
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	subl	$2, %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	a(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	leal	(%rsi,%rax), %edx
	movl	-12(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	dp(%rip), %rax
	movl	(%rcx,%rax), %edi
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	-12(%rbp), %ecx
	subl	$1, %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	a(%rip), %rcx
	movl	(%rsi,%rcx), %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	negl	%ecx
	cmovns	%ecx, %eax
	addl	%edi, %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	min
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	dp(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
.L12:
	addl	$1, -12(%rbp)
.L10:
	movl	-16(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L13
	movl	-16(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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:
