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 <math.h>

int min(int a, int b){
    return a<b?a:b;
}

int main(int argc, char** argv) {

    int size;
    scanf("%d",&size);
    
    int arr [size];
    int arr2 [size];
    
    if(size == 2){
        int a, b;
        scanf("%d %d", &a, &b);
        printf("%d", abs(a-b));
        return (EXIT_SUCCESS);
    }
    
    for (int i = 0; i < size; i++)
        scanf("%d", &arr[i]);
    
    arr2[0] = 0;
    arr2[1] = abs(arr[1] - arr[0]);
    
    for (int i = 2; i < size; i++)
        arr2[i] = min(arr2[i-1]+abs(arr[i]-arr[i-1]),arr2[i-2]+abs(arr[i]-arr[i-2]));
    
    printf("%d",arr2[size-1]);
    
    
    return (EXIT_SUCCESS);
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	min
	.type	min, @function
min:
.LFB6:
	.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), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	min, .-min
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
	.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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$120, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movl	%edi, -116(%rbp)
	movq	%rsi, -128(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-108(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -144(%rbp)
	movq	$0, -136(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -160(%rbp)
	movq	$0, -152(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L4:
	cmpq	%rdx, %rsp
	je	.L5
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L4
.L5:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L6
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L6:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L7:
	cmpq	%rdx, %rsp
	je	.L8
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L7
.L8:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L9
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L9:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	-108(%rbp), %eax
	cmpl	$2, %eax
	jne	.L10
	leaq	-100(%rbp), %rdx
	leaq	-104(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-104(%rbp), %eax
	movl	-100(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L11
.L10:
	movl	$0, -96(%rbp)
	jmp	.L12
.L13:
	movl	-96(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -96(%rbp)
.L12:
	movl	-108(%rbp), %eax
	cmpl	%eax, -96(%rbp)
	jl	.L13
	movq	-64(%rbp), %rax
	movl	$0, (%rax)
	movq	-80(%rbp), %rax
	movl	4(%rax), %edx
	movq	-80(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovs	%eax, %edx
	movq	-64(%rbp), %rax
	movl	%edx, 4(%rax)
	movl	$2, -92(%rbp)
	jmp	.L14
.L15:
	movl	-92(%rbp), %eax
	leal	-2(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %esi
	movq	-80(%rbp), %rax
	movl	-92(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movl	-92(%rbp), %eax
	leal	-2(%rax), %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	leal	(%rsi,%rax), %edx
	movl	-92(%rbp), %eax
	leal	-1(%rax), %ecx
	movq	-64(%rbp), %rax
	movslq	%ecx, %rcx
	movl	(%rax,%rcx,4), %edi
	movq	-80(%rbp), %rax
	movl	-92(%rbp), %ecx
	movslq	%ecx, %rcx
	movl	(%rax,%rcx,4), %esi
	movl	-92(%rbp), %eax
	leal	-1(%rax), %ecx
	movq	-80(%rbp), %rax
	movslq	%ecx, %rcx
	movl	(%rax,%rcx,4), %ecx
	movl	%esi, %eax
	subl	%ecx, %eax
	movl	%eax, %ecx
	negl	%ecx
	cmovns	%ecx, %eax
	addl	%edi, %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	min
	movq	-64(%rbp), %rdx
	movl	-92(%rbp), %ecx
	movslq	%ecx, %rcx
	movl	%eax, (%rdx,%rcx,4)
	addl	$1, -92(%rbp)
.L14:
	movl	-108(%rbp), %eax
	cmpl	%eax, -92(%rbp)
	jl	.L15
	movl	-108(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L11:
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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	min
	.type	min, @function
min:
.LFB39:
	.cfi_startproc
	endbr64
	cmpl	%edi, %esi
	movl	%edi, %eax
	cmovle	%esi, %eax
	ret
	.cfi_endproc
.LFE39:
	.size	min, .-min
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	.cfi_offset 15, -24
	leaq	.LC0(%rip), %r15
	pushq	%r14
	leaq	-68(%rbp), %rsi
	movq	%r15, %rdi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$72, %rsp
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-68(%rbp), %rdx
	movq	%rsp, %rsi
	movq	%rdx, %rax
	leaq	15(,%rdx,4), %rdx
	movq	%rdx, %rdi
	movq	%rdx, %rcx
	andq	$-4096, %rdi
	andq	$-16, %rcx
	subq	%rdi, %rsi
	cmpq	%rsi, %rsp
	je	.L5
.L33:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L33
.L5:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L34
.L6:
	leaq	3(%rsp), %r12
	movq	%rdx, %rcx
	movq	%rsp, %rsi
	andq	$-4096, %rdx
	movq	%r12, %rbx
	andq	$-16, %rcx
	andq	$-4, %r12
	subq	%rdx, %rsi
	shrq	$2, %rbx
	movq	%rbx, -88(%rbp)
.L7:
	cmpq	%rsi, %rsp
	je	.L8
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L7
.L34:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L6
.L8:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L35
.L9:
	leaq	3(%rsp), %rbx
	movq	%rbx, %rdi
	andq	$-4, %rbx
	shrq	$2, %rdi
	movq	%rdi, -96(%rbp)
	cmpl	$2, %eax
	je	.L10
	movq	%r12, %r13
	xorl	%r14d, %r14d
	testl	%eax, %eax
	jle	.L12
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%r13, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	movl	-68(%rbp), %eax
	addq	$4, %r13
	cmpl	%r14d, %eax
	jg	.L14
.L12:
	movq	-88(%rbp), %rdx
	movq	-96(%rbp), %rdi
	movl	4(,%rdx,4), %r11d
	movl	0(,%rdx,4), %r8d
	movl	$0, 0(,%rdi,4)
	movl	%r11d, %ecx
	subl	%r8d, %ecx
	movl	%ecx, %edx
	negl	%edx
	cmovs	%ecx, %edx
	movl	%edx, 4(,%rdi,4)
	cmpl	$2, %eax
	jle	.L15
	leal	-5(%rax), %edi
	movl	%edi, -88(%rbp)
	cmpl	$8, %eax
	jle	.L20
	movl	%eax, -96(%rbp)
	leaq	8(%r12), %r9
	movl	$8, %r10d
	xorl	%r14d, %r14d
	movq	%r12, -104(%rbp)
.L17:
	movl	(%r9), %eax
	movl	%eax, %esi
	movl	%eax, %edi
	subl	%r8d, %esi
	movl	%esi, %ecx
	negl	%ecx
	cmovs	%esi, %ecx
	subl	%r11d, %edi
	movl	%edi, %esi
	addl	%r14d, %ecx
	negl	%esi
	cmovs	%edi, %esi
	movl	4(%r9), %edi
	addl	%edx, %esi
	cmpl	%esi, %ecx
	cmovg	%esi, %ecx
	movl	%edi, %esi
	subl	%r11d, %esi
	movl	%esi, %r12d
	movd	%ecx, %xmm0
	negl	%r12d
	cmovs	%esi, %r12d
	movl	%edi, %esi
	subl	%eax, %esi
	addl	%edx, %r12d
	movl	%esi, %edx
	negl	%edx
	cmovs	%esi, %edx
	addl	%ecx, %edx
	cmpl	%edx, %r12d
	cmovg	%edx, %r12d
	movl	8(%r9), %edx
	movl	%edx, %esi
	movl	%edx, %r8d
	movd	%r12d, %xmm1
	subl	%eax, %esi
	punpckldq	%xmm1, %xmm0
	movl	%esi, %eax
	movq	%xmm0, -24(%rbx,%r10,4)
	negl	%eax
	cmovs	%esi, %eax
	subl	%edi, %r8d
	movl	%r8d, %esi
	addl	%ecx, %eax
	negl	%esi
	cmovs	%r8d, %esi
	addl	%r12d, %esi
	cmpl	%esi, %eax
	cmovg	%esi, %eax
	movl	12(%r9), %esi
	movl	%esi, %r8d
	movl	%esi, %r11d
	movd	%eax, %xmm0
	subl	%edi, %r8d
	movl	%r8d, %edi
	negl	%edi
	cmovs	%r8d, %edi
	subl	%edx, %r11d
	movl	%r11d, %r8d
	addl	%r12d, %edi
	negl	%r8d
	cmovs	%r11d, %r8d
	addl	%eax, %r8d
	cmpl	%r8d, %edi
	cmovg	%r8d, %edi
	movl	16(%r9), %r8d
	movl	%r8d, %r11d
	movd	%edi, %xmm2
	subl	%edx, %r11d
	punpckldq	%xmm2, %xmm0
	movl	%r11d, %r14d
	movq	%xmm0, -16(%rbx,%r10,4)
	negl	%r14d
	cmovs	%r11d, %r14d
	movl	%r8d, %r11d
	subl	%esi, %r11d
	movl	%r11d, %edx
	addl	%eax, %r14d
	negl	%edx
	cmovs	%r11d, %edx
	movl	20(%r9), %r11d
	addl	%edi, %edx
	movl	%r11d, %r13d
	cmpl	%edx, %r14d
	cmovg	%edx, %r14d
	subl	%esi, %r13d
	movl	%r13d, %edx
	negl	%edx
	movd	%r14d, %xmm0
	cmovs	%r13d, %edx
	movl	%r11d, %r13d
	subl	%r8d, %r13d
	movl	%r13d, %esi
	addl	%edi, %edx
	negl	%esi
	cmovs	%r13d, %esi
	addl	%r14d, %esi
	cmpl	%esi, %edx
	cmovg	%esi, %edx
	movl	%r10d, %esi
	addq	$24, %r9
	movd	%edx, %xmm3
	punpckldq	%xmm3, %xmm0
	movq	%xmm0, -8(%rbx,%r10,4)
	addq	$6, %r10
	leal	-5(%r10), %eax
	cmpl	%eax, -88(%rbp)
	jg	.L17
	movl	-96(%rbp), %eax
	movq	-104(%rbp), %r12
.L16:
	movslq	%esi, %rdx
	.p2align 4,,10
	.p2align 3
.L18:
	movl	(%r12,%rdx,4), %edi
	movl	%edi, %esi
	subl	-4(%r12,%rdx,4), %esi
	movl	%esi, %ecx
	negl	%ecx
	cmovs	%esi, %ecx
	subl	-8(%r12,%rdx,4), %edi
	addl	-4(%rbx,%rdx,4), %ecx
	movl	%edi, %esi
	negl	%esi
	cmovs	%edi, %esi
	addl	-8(%rbx,%rdx,4), %esi
	cmpl	%esi, %ecx
	cmovg	%esi, %ecx
	movl	%ecx, (%rbx,%rdx,4)
	addq	$1, %rdx
	cmpl	%edx, %eax
	jg	.L18
.L15:
	subl	$1, %eax
	movq	%r15, %rsi
	movl	$1, %edi
	cltq
	movl	(%rbx,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L13:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L36
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L10:
	.cfi_restore_state
	leaq	-60(%rbp), %rdx
	leaq	-64(%rbp), %rsi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	-64(%rbp), %eax
	subl	-60(%rbp), %eax
	movq	%r15, %rsi
	movl	%eax, %edx
	movl	$1, %edi
	negl	%edx
	cmovs	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L13
.L20:
	movl	$2, %esi
	jmp	.L16
.L35:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L9
.L36:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.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
	.p2align 4
	.globl	min
	.type	min, @function
min:
.LFB39:
	.cfi_startproc
	endbr64
	cmpl	%edi, %esi
	movl	%edi, %eax
	cmovle	%esi, %eax
	ret
	.cfi_endproc
.LFE39:
	.size	min, .-min
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	.cfi_offset 15, -24
	leaq	.LC0(%rip), %r15
	pushq	%r14
	leaq	-68(%rbp), %rsi
	movq	%r15, %rdi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$72, %rsp
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-68(%rbp), %rdx
	movq	%rsp, %rsi
	movq	%rdx, %rax
	leaq	15(,%rdx,4), %rdx
	movq	%rdx, %rdi
	movq	%rdx, %rcx
	andq	$-4096, %rdi
	andq	$-16, %rcx
	subq	%rdi, %rsi
	cmpq	%rsi, %rsp
	je	.L5
.L33:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L33
.L5:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L34
.L6:
	leaq	3(%rsp), %r12
	movq	%rdx, %rcx
	movq	%rsp, %rsi
	andq	$-4096, %rdx
	movq	%r12, %rbx
	andq	$-16, %rcx
	andq	$-4, %r12
	subq	%rdx, %rsi
	shrq	$2, %rbx
	movq	%rbx, -88(%rbp)
.L7:
	cmpq	%rsi, %rsp
	je	.L8
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L7
.L34:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L6
.L8:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L35
.L9:
	leaq	3(%rsp), %rbx
	movq	%rbx, %rdi
	andq	$-4, %rbx
	shrq	$2, %rdi
	movq	%rdi, -96(%rbp)
	cmpl	$2, %eax
	je	.L10
	movq	%r12, %r13
	xorl	%r14d, %r14d
	testl	%eax, %eax
	jle	.L12
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%r13, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	movl	-68(%rbp), %eax
	addq	$4, %r13
	cmpl	%r14d, %eax
	jg	.L14
.L12:
	movq	-88(%rbp), %rdx
	movq	-96(%rbp), %rdi
	movl	4(,%rdx,4), %r11d
	movl	0(,%rdx,4), %r8d
	movl	$0, 0(,%rdi,4)
	movl	%r11d, %ecx
	subl	%r8d, %ecx
	movl	%ecx, %edx
	negl	%edx
	cmovs	%ecx, %edx
	movl	%edx, 4(,%rdi,4)
	cmpl	$2, %eax
	jle	.L15
	leal	-5(%rax), %edi
	movl	%edi, -88(%rbp)
	cmpl	$8, %eax
	jle	.L20
	movl	%eax, -96(%rbp)
	leaq	8(%r12), %r9
	movl	$8, %r10d
	xorl	%r14d, %r14d
	movq	%r12, -104(%rbp)
.L17:
	movl	(%r9), %eax
	movl	%eax, %esi
	movl	%eax, %edi
	subl	%r8d, %esi
	movl	%esi, %ecx
	negl	%ecx
	cmovs	%esi, %ecx
	subl	%r11d, %edi
	movl	%edi, %esi
	addl	%r14d, %ecx
	negl	%esi
	cmovs	%edi, %esi
	movl	4(%r9), %edi
	addl	%edx, %esi
	cmpl	%esi, %ecx
	cmovg	%esi, %ecx
	movl	%edi, %esi
	subl	%r11d, %esi
	movl	%esi, %r12d
	movd	%ecx, %xmm0
	negl	%r12d
	cmovs	%esi, %r12d
	movl	%edi, %esi
	subl	%eax, %esi
	addl	%edx, %r12d
	movl	%esi, %edx
	negl	%edx
	cmovs	%esi, %edx
	addl	%ecx, %edx
	cmpl	%edx, %r12d
	cmovg	%edx, %r12d
	movl	8(%r9), %edx
	movl	%edx, %esi
	movl	%edx, %r8d
	movd	%r12d, %xmm1
	subl	%eax, %esi
	punpckldq	%xmm1, %xmm0
	movl	%esi, %eax
	movq	%xmm0, -24(%rbx,%r10,4)
	negl	%eax
	cmovs	%esi, %eax
	subl	%edi, %r8d
	movl	%r8d, %esi
	addl	%ecx, %eax
	negl	%esi
	cmovs	%r8d, %esi
	addl	%r12d, %esi
	cmpl	%esi, %eax
	cmovg	%esi, %eax
	movl	12(%r9), %esi
	movl	%esi, %r8d
	movl	%esi, %r11d
	movd	%eax, %xmm0
	subl	%edi, %r8d
	movl	%r8d, %edi
	negl	%edi
	cmovs	%r8d, %edi
	subl	%edx, %r11d
	movl	%r11d, %r8d
	addl	%r12d, %edi
	negl	%r8d
	cmovs	%r11d, %r8d
	addl	%eax, %r8d
	cmpl	%r8d, %edi
	cmovg	%r8d, %edi
	movl	16(%r9), %r8d
	movl	%r8d, %r11d
	movd	%edi, %xmm2
	subl	%edx, %r11d
	punpckldq	%xmm2, %xmm0
	movl	%r11d, %r14d
	movq	%xmm0, -16(%rbx,%r10,4)
	negl	%r14d
	cmovs	%r11d, %r14d
	movl	%r8d, %r11d
	subl	%esi, %r11d
	movl	%r11d, %edx
	addl	%eax, %r14d
	negl	%edx
	cmovs	%r11d, %edx
	movl	20(%r9), %r11d
	addl	%edi, %edx
	movl	%r11d, %r13d
	cmpl	%edx, %r14d
	cmovg	%edx, %r14d
	subl	%esi, %r13d
	movl	%r13d, %edx
	negl	%edx
	movd	%r14d, %xmm0
	cmovs	%r13d, %edx
	movl	%r11d, %r13d
	subl	%r8d, %r13d
	movl	%r13d, %esi
	addl	%edi, %edx
	negl	%esi
	cmovs	%r13d, %esi
	addl	%r14d, %esi
	cmpl	%esi, %edx
	cmovg	%esi, %edx
	movl	%r10d, %esi
	addq	$24, %r9
	movd	%edx, %xmm3
	punpckldq	%xmm3, %xmm0
	movq	%xmm0, -8(%rbx,%r10,4)
	addq	$6, %r10
	leal	-5(%r10), %eax
	cmpl	%eax, -88(%rbp)
	jg	.L17
	movl	-96(%rbp), %eax
	movq	-104(%rbp), %r12
.L16:
	movslq	%esi, %rdx
	.p2align 4,,10
	.p2align 3
.L18:
	movl	(%r12,%rdx,4), %edi
	movl	%edi, %esi
	subl	-4(%r12,%rdx,4), %esi
	movl	%esi, %ecx
	negl	%ecx
	cmovs	%esi, %ecx
	subl	-8(%r12,%rdx,4), %edi
	addl	-4(%rbx,%rdx,4), %ecx
	movl	%edi, %esi
	negl	%esi
	cmovs	%edi, %esi
	addl	-8(%rbx,%rdx,4), %esi
	cmpl	%esi, %ecx
	cmovg	%esi, %ecx
	movl	%ecx, (%rbx,%rdx,4)
	addq	$1, %rdx
	cmpl	%edx, %eax
	jg	.L18
.L15:
	subl	$1, %eax
	movq	%r15, %rsi
	movl	$1, %edi
	cltq
	movl	(%rbx,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L13:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L36
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L10:
	.cfi_restore_state
	leaq	-60(%rbp), %rdx
	leaq	-64(%rbp), %rsi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	-64(%rbp), %eax
	subl	-60(%rbp), %eax
	movq	%r15, %rsi
	movl	%eax, %edx
	movl	$1, %edi
	negl	%edx
	cmovs	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L13
.L20:
	movl	$2, %esi
	jmp	.L16
.L35:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L9
.L36:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.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>
#include <stdlib.h>
#include <math.h>

int min(int a, int b){
    return a<b?a:b;
}

int main(int argc, char** argv) {

    int size;
    scanf("%d",&size);
    
    int arr [size];
    int arr2 [size];
    
    if(size == 2){
        int a, b;
        scanf("%d %d", &a, &b);
        printf("%d", abs(a-b));
        return (EXIT_SUCCESS);
    }
    
    for (int i = 0; i < size; i++)
        scanf("%d", &arr[i]);
    
    arr2[0] = 0;
    arr2[1] = abs(arr[1] - arr[0]);
    
    for (int i = 2; i < size; i++)
        arr2[i] = min(arr2[i-1]+abs(arr[i]-arr[i-1]),arr2[i-2]+abs(arr[i]-arr[i-2]));
    
    printf("%d",arr2[size-1]);
    
    
    return (EXIT_SUCCESS);
}


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

int min(int a, int b){
    return a<b?a:b;
}

int main(int argc, char** argv) {

    int size;
    scanf("%d",&size);
    
    int arr [size];
    int arr2 [size];
    
    if(size == 2){
        int a, b;
        scanf("%d %d", &a, &b);
        printf("%d", abs(a-b));
        return (EXIT_SUCCESS);
    }
    
    for (int i = 0; i < size; i++)
        scanf("%d", &arr[i]);
    
    arr2[0] = 0;
    arr2[1] = abs(arr[1] - arr[0]);
    
    for (int i = 2; i < size; i++)
        arr2[i] = min(arr2[i-1]+abs(arr[i]-arr[i-1]),arr2[i-2]+abs(arr[i]-arr[i-2]));
    
    printf("%d",arr2[size-1]);
    
    
    return (EXIT_SUCCESS);
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	min
	.type	min, @function
min:
.LFB6:
	.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), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	min, .-min
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
	.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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$120, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movl	%edi, -116(%rbp)
	movq	%rsi, -128(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-108(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -144(%rbp)
	movq	$0, -136(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -160(%rbp)
	movq	$0, -152(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L4:
	cmpq	%rdx, %rsp
	je	.L5
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L4
.L5:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L6
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L6:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L7:
	cmpq	%rdx, %rsp
	je	.L8
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L7
.L8:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L9
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L9:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	-108(%rbp), %eax
	cmpl	$2, %eax
	jne	.L10
	leaq	-100(%rbp), %rdx
	leaq	-104(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-104(%rbp), %eax
	movl	-100(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L11
.L10:
	movl	$0, -96(%rbp)
	jmp	.L12
.L13:
	movl	-96(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -96(%rbp)
.L12:
	movl	-108(%rbp), %eax
	cmpl	%eax, -96(%rbp)
	jl	.L13
	movq	-64(%rbp), %rax
	movl	$0, (%rax)
	movq	-80(%rbp), %rax
	movl	4(%rax), %edx
	movq	-80(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovs	%eax, %edx
	movq	-64(%rbp), %rax
	movl	%edx, 4(%rax)
	movl	$2, -92(%rbp)
	jmp	.L14
.L15:
	movl	-92(%rbp), %eax
	leal	-2(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %esi
	movq	-80(%rbp), %rax
	movl	-92(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movl	-92(%rbp), %eax
	leal	-2(%rax), %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	leal	(%rsi,%rax), %edx
	movl	-92(%rbp), %eax
	leal	-1(%rax), %ecx
	movq	-64(%rbp), %rax
	movslq	%ecx, %rcx
	movl	(%rax,%rcx,4), %edi
	movq	-80(%rbp), %rax
	movl	-92(%rbp), %ecx
	movslq	%ecx, %rcx
	movl	(%rax,%rcx,4), %esi
	movl	-92(%rbp), %eax
	leal	-1(%rax), %ecx
	movq	-80(%rbp), %rax
	movslq	%ecx, %rcx
	movl	(%rax,%rcx,4), %ecx
	movl	%esi, %eax
	subl	%ecx, %eax
	movl	%eax, %ecx
	negl	%ecx
	cmovns	%ecx, %eax
	addl	%edi, %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	min
	movq	-64(%rbp), %rdx
	movl	-92(%rbp), %ecx
	movslq	%ecx, %rcx
	movl	%eax, (%rdx,%rcx,4)
	addl	$1, -92(%rbp)
.L14:
	movl	-108(%rbp), %eax
	cmpl	%eax, -92(%rbp)
	jl	.L15
	movl	-108(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L11:
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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	min
	.type	min, @function
min:
.LFB6:
	.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), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	min, .-min
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
	.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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$120, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movl	%edi, -116(%rbp)
	movq	%rsi, -128(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-108(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -144(%rbp)
	movq	$0, -136(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -160(%rbp)
	movq	$0, -152(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L4:
	cmpq	%rdx, %rsp
	je	.L5
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L4
.L5:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L6
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L6:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L7:
	cmpq	%rdx, %rsp
	je	.L8
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L7
.L8:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L9
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L9:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	-108(%rbp), %eax
	cmpl	$2, %eax
	jne	.L10
	leaq	-100(%rbp), %rdx
	leaq	-104(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-104(%rbp), %eax
	movl	-100(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L11
.L10:
	movl	$0, -96(%rbp)
	jmp	.L12
.L13:
	movl	-96(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -96(%rbp)
.L12:
	movl	-108(%rbp), %eax
	cmpl	%eax, -96(%rbp)
	jl	.L13
	movq	-64(%rbp), %rax
	movl	$0, (%rax)
	movq	-80(%rbp), %rax
	movl	4(%rax), %edx
	movq	-80(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovs	%eax, %edx
	movq	-64(%rbp), %rax
	movl	%edx, 4(%rax)
	movl	$2, -92(%rbp)
	jmp	.L14
.L15:
	movl	-92(%rbp), %eax
	leal	-2(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %esi
	movq	-80(%rbp), %rax
	movl	-92(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movl	-92(%rbp), %eax
	leal	-2(%rax), %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	leal	(%rsi,%rax), %edx
	movl	-92(%rbp), %eax
	leal	-1(%rax), %ecx
	movq	-64(%rbp), %rax
	movslq	%ecx, %rcx
	movl	(%rax,%rcx,4), %edi
	movq	-80(%rbp), %rax
	movl	-92(%rbp), %ecx
	movslq	%ecx, %rcx
	movl	(%rax,%rcx,4), %esi
	movl	-92(%rbp), %eax
	leal	-1(%rax), %ecx
	movq	-80(%rbp), %rax
	movslq	%ecx, %rcx
	movl	(%rax,%rcx,4), %ecx
	movl	%esi, %eax
	subl	%ecx, %eax
	movl	%eax, %ecx
	negl	%ecx
	cmovns	%ecx, %eax
	addl	%edi, %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	min
	movq	-64(%rbp), %rdx
	movl	-92(%rbp), %ecx
	movslq	%ecx, %rcx
	movl	%eax, (%rdx,%rcx,4)
	addl	$1, -92(%rbp)
.L14:
	movl	-108(%rbp), %eax
	cmpl	%eax, -92(%rbp)
	jl	.L15
	movl	-108(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L11:
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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:
