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

int main(void)
{
  int n;
  long long  h[100010];
  long long  dp[100010];
  long long INF=1<<30;
  scanf("%d",&n);
  for(int i=0;i<n;i++){
    scanf("%lld",&h[i]);
  }

  for(int i=0;i<100010;i++){
    dp[i]=INF;
  }


  dp[0]=0;
  for(int i=1;i<n;i++){
    if(dp[i]>dp[i-1]+abs(h[i]-h[i-1])){
      dp[i]=dp[i-1]+abs(h[i]-h[i-1]);
    }
    if(i>1){
      if(dp[i]>dp[i-2]+abs(h[i]-h[i-2])){
        dp[i]=dp[i-2]+abs(h[i]-h[i-2]);
      }
    }
  }

  printf("%lld\n",dp[n-1]);
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
.LC2:
	.string	"%lld\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	-1597440(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2768, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$1073741824, -1600184(%rbp)
	leaq	-1600200(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -1600196(%rbp)
	jmp	.L2
.L3:
	leaq	-1600176(%rbp), %rdx
	movl	-1600196(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -1600196(%rbp)
.L2:
	movl	-1600200(%rbp), %eax
	cmpl	%eax, -1600196(%rbp)
	jl	.L3
	movl	$0, -1600192(%rbp)
	jmp	.L4
.L5:
	movl	-1600192(%rbp), %eax
	cltq
	movq	-1600184(%rbp), %rdx
	movq	%rdx, -800096(%rbp,%rax,8)
	addl	$1, -1600192(%rbp)
.L4:
	cmpl	$100009, -1600192(%rbp)
	jle	.L5
	movq	$0, -800096(%rbp)
	movl	$1, -1600188(%rbp)
	jmp	.L6
.L9:
	movl	-1600188(%rbp), %eax
	cltq
	movq	-800096(%rbp,%rax,8), %rdx
	movl	-1600188(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	-800096(%rbp,%rax,8), %rsi
	movl	-1600188(%rbp), %eax
	cltq
	movq	-1600176(%rbp,%rax,8), %rax
	movl	%eax, %ecx
	movl	-1600188(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	-1600176(%rbp,%rax,8), %rax
	movl	%eax, %edi
	movl	%ecx, %eax
	subl	%edi, %eax
	movl	%eax, %ecx
	negl	%ecx
	cmovns	%ecx, %eax
	cltq
	addq	%rsi, %rax
	cmpq	%rax, %rdx
	jle	.L7
	movl	-1600188(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	-800096(%rbp,%rax,8), %rcx
	movl	-1600188(%rbp), %eax
	cltq
	movq	-1600176(%rbp,%rax,8), %rax
	movl	%eax, %edx
	movl	-1600188(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	-1600176(%rbp,%rax,8), %rax
	movl	%eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	cltq
	leaq	(%rcx,%rax), %rdx
	movl	-1600188(%rbp), %eax
	cltq
	movq	%rdx, -800096(%rbp,%rax,8)
.L7:
	cmpl	$1, -1600188(%rbp)
	jle	.L8
	movl	-1600188(%rbp), %eax
	cltq
	movq	-800096(%rbp,%rax,8), %rdx
	movl	-1600188(%rbp), %eax
	subl	$2, %eax
	cltq
	movq	-800096(%rbp,%rax,8), %rsi
	movl	-1600188(%rbp), %eax
	cltq
	movq	-1600176(%rbp,%rax,8), %rax
	movl	%eax, %ecx
	movl	-1600188(%rbp), %eax
	subl	$2, %eax
	cltq
	movq	-1600176(%rbp,%rax,8), %rax
	movl	%eax, %edi
	movl	%ecx, %eax
	subl	%edi, %eax
	movl	%eax, %ecx
	negl	%ecx
	cmovns	%ecx, %eax
	cltq
	addq	%rsi, %rax
	cmpq	%rax, %rdx
	jle	.L8
	movl	-1600188(%rbp), %eax
	subl	$2, %eax
	cltq
	movq	-800096(%rbp,%rax,8), %rcx
	movl	-1600188(%rbp), %eax
	cltq
	movq	-1600176(%rbp,%rax,8), %rax
	movl	%eax, %edx
	movl	-1600188(%rbp), %eax
	subl	$2, %eax
	cltq
	movq	-1600176(%rbp,%rax,8), %rax
	movl	%eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	cltq
	leaq	(%rcx,%rax), %rdx
	movl	-1600188(%rbp), %eax
	cltq
	movq	%rdx, -800096(%rbp,%rax,8)
.L8:
	addl	$1, -1600188(%rbp)
.L6:
	movl	-1600200(%rbp), %eax
	cmpl	%eax, -1600188(%rbp)
	jl	.L9
	movl	-1600200(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	-800096(%rbp,%rax,8), %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	.L11
	call	__stack_chk_fail@PLT
.L11:
	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
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
.LC3:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.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	-1597440(%rsp), %r11
	.cfi_def_cfa 11, 1597472
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2752, %rsp
	.cfi_def_cfa_offset 1600224
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 1600184(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edi
	testl	%edi, %edi
	jle	.L2
	leaq	16(%rsp), %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%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	12(%rsp), %edi
	addq	$8, %rbp
	cmpl	%ebx, %edi
	jg	.L3
.L2:
	leaq	800096(%rsp), %rcx
	movdqa	.LC2(%rip), %xmm0
	leaq	1600176(%rsp), %rdx
	movq	%rcx, %rax
	.p2align 4,,10
	.p2align 3
.L4:
	movaps	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rax, %rdx
	jne	.L4
	leaq	16(%rsp), %r8
	movl	$1, %r9d
	movq	$0, 800096(%rsp)
	cmpl	$1, %edi
	jle	.L8
	.p2align 4,,10
	.p2align 3
.L7:
	movq	8(%r8), %rsi
	movl	%esi, %edx
	subl	(%r8), %edx
	movl	%edx, %eax
	negl	%eax
	cmovs	%edx, %eax
	movq	8(%rcx), %rdx
	cltq
	addq	(%rcx), %rax
	cmpq	%rdx, %rax
	cmovg	%rdx, %rax
	movq	%rax, 8(%rcx)
	cmpl	$1, %r9d
	je	.L6
	subl	-8(%r8), %esi
	movl	%esi, %edx
	negl	%edx
	cmovs	%esi, %edx
	movslq	%edx, %rdx
	addq	-8(%rcx), %rdx
	cmpq	%rax, %rdx
	jge	.L6
	movq	%rdx, 8(%rcx)
.L6:
	addl	$1, %r9d
	addq	$8, %rcx
	addq	$8, %r8
	cmpl	%edi, %r9d
	jne	.L7
.L8:
	leal	-1(%rdi), %eax
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	cltq
	movq	800096(%rsp,%rax,8), %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	1600184(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$1600192, %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
.L20:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.quad	1073741824
	.quad	1073741824
	.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"
.LC1:
	.string	"%lld"
.LC3:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.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	-1597440(%rsp), %r11
	.cfi_def_cfa 11, 1597472
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2752, %rsp
	.cfi_def_cfa_offset 1600224
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 1600184(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edi
	testl	%edi, %edi
	jle	.L2
	leaq	16(%rsp), %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%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	12(%rsp), %edi
	addq	$8, %rbp
	cmpl	%ebx, %edi
	jg	.L3
.L2:
	leaq	800096(%rsp), %rcx
	movdqa	.LC2(%rip), %xmm0
	leaq	1600176(%rsp), %rdx
	movq	%rcx, %rax
	.p2align 4,,10
	.p2align 3
.L4:
	movaps	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rax, %rdx
	jne	.L4
	leaq	16(%rsp), %r8
	movl	$1, %r9d
	movq	$0, 800096(%rsp)
	cmpl	$1, %edi
	jle	.L8
	.p2align 4,,10
	.p2align 3
.L7:
	movq	8(%r8), %rsi
	movl	%esi, %edx
	subl	(%r8), %edx
	movl	%edx, %eax
	negl	%eax
	cmovs	%edx, %eax
	movq	8(%rcx), %rdx
	cltq
	addq	(%rcx), %rax
	cmpq	%rdx, %rax
	cmovg	%rdx, %rax
	movq	%rax, 8(%rcx)
	cmpl	$1, %r9d
	je	.L6
	subl	-8(%r8), %esi
	movl	%esi, %edx
	negl	%edx
	cmovs	%esi, %edx
	movslq	%edx, %rdx
	addq	-8(%rcx), %rdx
	cmpq	%rax, %rdx
	jge	.L6
	movq	%rdx, 8(%rcx)
.L6:
	addl	$1, %r9d
	addq	$8, %rcx
	addq	$8, %r8
	cmpl	%edi, %r9d
	jne	.L7
.L8:
	leal	-1(%rdi), %eax
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	cltq
	movq	800096(%rsp,%rax,8), %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	1600184(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$1600192, %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
.L20:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.quad	1073741824
	.quad	1073741824
	.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<math.h>
#include<stdlib.h>

int main(void)
{
  int n;
  long long  h[100010];
  long long  dp[100010];
  long long INF=1<<30;
  scanf("%d",&n);
  for(int i=0;i<n;i++){
    scanf("%lld",&h[i]);
  }

  for(int i=0;i<100010;i++){
    dp[i]=INF;
  }


  dp[0]=0;
  for(int i=1;i<n;i++){
    if(dp[i]>dp[i-1]+abs(h[i]-h[i-1])){
      dp[i]=dp[i-1]+abs(h[i]-h[i-1]);
    }
    if(i>1){
      if(dp[i]>dp[i-2]+abs(h[i]-h[i-2])){
        dp[i]=dp[i-2]+abs(h[i]-h[i-2]);
      }
    }
  }

  printf("%lld\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>
#include<math.h>
#include<stdlib.h>

int main(void)
{
  int n;
  long long  h[100010];
  long long  dp[100010];
  long long INF=1<<30;
  scanf("%d",&n);
  for(int i=0;i<n;i++){
    scanf("%lld",&h[i]);
  }

  for(int i=0;i<100010;i++){
    dp[i]=INF;
  }


  dp[0]=0;
  for(int i=1;i<n;i++){
    if(dp[i]>dp[i-1]+abs(h[i]-h[i-1])){
      dp[i]=dp[i-1]+abs(h[i]-h[i-1]);
    }
    if(i>1){
      if(dp[i]>dp[i-2]+abs(h[i]-h[i-2])){
        dp[i]=dp[i-2]+abs(h[i]-h[i-2]);
      }
    }
  }

  printf("%lld\n",dp[n-1]);
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
.LC2:
	.string	"%lld\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	-1597440(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2768, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$1073741824, -1600184(%rbp)
	leaq	-1600200(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -1600196(%rbp)
	jmp	.L2
.L3:
	leaq	-1600176(%rbp), %rdx
	movl	-1600196(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -1600196(%rbp)
.L2:
	movl	-1600200(%rbp), %eax
	cmpl	%eax, -1600196(%rbp)
	jl	.L3
	movl	$0, -1600192(%rbp)
	jmp	.L4
.L5:
	movl	-1600192(%rbp), %eax
	cltq
	movq	-1600184(%rbp), %rdx
	movq	%rdx, -800096(%rbp,%rax,8)
	addl	$1, -1600192(%rbp)
.L4:
	cmpl	$100009, -1600192(%rbp)
	jle	.L5
	movq	$0, -800096(%rbp)
	movl	$1, -1600188(%rbp)
	jmp	.L6
.L9:
	movl	-1600188(%rbp), %eax
	cltq
	movq	-800096(%rbp,%rax,8), %rdx
	movl	-1600188(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	-800096(%rbp,%rax,8), %rsi
	movl	-1600188(%rbp), %eax
	cltq
	movq	-1600176(%rbp,%rax,8), %rax
	movl	%eax, %ecx
	movl	-1600188(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	-1600176(%rbp,%rax,8), %rax
	movl	%eax, %edi
	movl	%ecx, %eax
	subl	%edi, %eax
	movl	%eax, %ecx
	negl	%ecx
	cmovns	%ecx, %eax
	cltq
	addq	%rsi, %rax
	cmpq	%rax, %rdx
	jle	.L7
	movl	-1600188(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	-800096(%rbp,%rax,8), %rcx
	movl	-1600188(%rbp), %eax
	cltq
	movq	-1600176(%rbp,%rax,8), %rax
	movl	%eax, %edx
	movl	-1600188(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	-1600176(%rbp,%rax,8), %rax
	movl	%eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	cltq
	leaq	(%rcx,%rax), %rdx
	movl	-1600188(%rbp), %eax
	cltq
	movq	%rdx, -800096(%rbp,%rax,8)
.L7:
	cmpl	$1, -1600188(%rbp)
	jle	.L8
	movl	-1600188(%rbp), %eax
	cltq
	movq	-800096(%rbp,%rax,8), %rdx
	movl	-1600188(%rbp), %eax
	subl	$2, %eax
	cltq
	movq	-800096(%rbp,%rax,8), %rsi
	movl	-1600188(%rbp), %eax
	cltq
	movq	-1600176(%rbp,%rax,8), %rax
	movl	%eax, %ecx
	movl	-1600188(%rbp), %eax
	subl	$2, %eax
	cltq
	movq	-1600176(%rbp,%rax,8), %rax
	movl	%eax, %edi
	movl	%ecx, %eax
	subl	%edi, %eax
	movl	%eax, %ecx
	negl	%ecx
	cmovns	%ecx, %eax
	cltq
	addq	%rsi, %rax
	cmpq	%rax, %rdx
	jle	.L8
	movl	-1600188(%rbp), %eax
	subl	$2, %eax
	cltq
	movq	-800096(%rbp,%rax,8), %rcx
	movl	-1600188(%rbp), %eax
	cltq
	movq	-1600176(%rbp,%rax,8), %rax
	movl	%eax, %edx
	movl	-1600188(%rbp), %eax
	subl	$2, %eax
	cltq
	movq	-1600176(%rbp,%rax,8), %rax
	movl	%eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	cltq
	leaq	(%rcx,%rax), %rdx
	movl	-1600188(%rbp), %eax
	cltq
	movq	%rdx, -800096(%rbp,%rax,8)
.L8:
	addl	$1, -1600188(%rbp)
.L6:
	movl	-1600200(%rbp), %eax
	cmpl	%eax, -1600188(%rbp)
	jl	.L9
	movl	-1600200(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	-800096(%rbp,%rax,8), %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	.L11
	call	__stack_chk_fail@PLT
.L11:
	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.
val
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
.LC2:
	.string	"%lld\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	-1597440(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2768, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$1073741824, -1600184(%rbp)
	leaq	-1600200(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -1600196(%rbp)
	jmp	.L2
.L3:
	leaq	-1600176(%rbp), %rdx
	movl	-1600196(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -1600196(%rbp)
.L2:
	movl	-1600200(%rbp), %eax
	cmpl	%eax, -1600196(%rbp)
	jl	.L3
	movl	$0, -1600192(%rbp)
	jmp	.L4
.L5:
	movl	-1600192(%rbp), %eax
	cltq
	movq	-1600184(%rbp), %rdx
	movq	%rdx, -800096(%rbp,%rax,8)
	addl	$1, -1600192(%rbp)
.L4:
	cmpl	$100009, -1600192(%rbp)
	jle	.L5
	movq	$0, -800096(%rbp)
	movl	$1, -1600188(%rbp)
	jmp	.L6
.L9:
	movl	-1600188(%rbp), %eax
	cltq
	movq	-800096(%rbp,%rax,8), %rdx
	movl	-1600188(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	-800096(%rbp,%rax,8), %rsi
	movl	-1600188(%rbp), %eax
	cltq
	movq	-1600176(%rbp,%rax,8), %rax
	movl	%eax, %ecx
	movl	-1600188(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	-1600176(%rbp,%rax,8), %rax
	movl	%eax, %edi
	movl	%ecx, %eax
	subl	%edi, %eax
	movl	%eax, %ecx
	negl	%ecx
	cmovns	%ecx, %eax
	cltq
	addq	%rsi, %rax
	cmpq	%rax, %rdx
	jle	.L7
	movl	-1600188(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	-800096(%rbp,%rax,8), %rcx
	movl	-1600188(%rbp), %eax
	cltq
	movq	-1600176(%rbp,%rax,8), %rax
	movl	%eax, %edx
	movl	-1600188(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	-1600176(%rbp,%rax,8), %rax
	movl	%eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	cltq
	leaq	(%rcx,%rax), %rdx
	movl	-1600188(%rbp), %eax
	cltq
	movq	%rdx, -800096(%rbp,%rax,8)
.L7:
	cmpl	$1, -1600188(%rbp)
	jle	.L8
	movl	-1600188(%rbp), %eax
	cltq
	movq	-800096(%rbp,%rax,8), %rdx
	movl	-1600188(%rbp), %eax
	subl	$2, %eax
	cltq
	movq	-800096(%rbp,%rax,8), %rsi
	movl	-1600188(%rbp), %eax
	cltq
	movq	-1600176(%rbp,%rax,8), %rax
	movl	%eax, %ecx
	movl	-1600188(%rbp), %eax
	subl	$2, %eax
	cltq
	movq	-1600176(%rbp,%rax,8), %rax
	movl	%eax, %edi
	movl	%ecx, %eax
	subl	%edi, %eax
	movl	%eax, %ecx
	negl	%ecx
	cmovns	%ecx, %eax
	cltq
	addq	%rsi, %rax
	cmpq	%rax, %rdx
	jle	.L8
	movl	-1600188(%rbp), %eax
	subl	$2, %eax
	cltq
	movq	-800096(%rbp,%rax,8), %rcx
	movl	-1600188(%rbp), %eax
	cltq
	movq	-1600176(%rbp,%rax,8), %rax
	movl	%eax, %edx
	movl	-1600188(%rbp), %eax
	subl	$2, %eax
	cltq
	movq	-1600176(%rbp,%rax,8), %rax
	movl	%eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	cltq
	leaq	(%rcx,%rax), %rdx
	movl	-1600188(%rbp), %eax
	cltq
	movq	%rdx, -800096(%rbp,%rax,8)
.L8:
	addl	$1, -1600188(%rbp)
.L6:
	movl	-1600200(%rbp), %eax
	cmpl	%eax, -1600188(%rbp)
	jl	.L9
	movl	-1600200(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	-800096(%rbp,%rax,8), %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	.L11
	call	__stack_chk_fail@PLT
.L11:
	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:
