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>

typedef long long int int64;

#define MIN(a,b) ((a)<(b)?(a):(b))

#define POS(i,j) ((i)*5+(j))

void run(void){
  int n;
  scanf("%d",&n);
  int *a=(int *)calloc(n,sizeof(int));
  int i;
  for(i=0;i<n;i++) scanf("%d",a+i);
  int64 *dp=(int64 *)calloc(5*2,sizeof(int64));
  int now=0;
  for(i=0;i<n;i++){
    int next=now^1;
    int v=a[i];
    if(v>0){
      dp[POS(next,0)]=dp[POS(now,0)]+v;
      dp[POS(next,1)]=MIN(dp[POS(now,0)],dp[POS(now,1)])+(v&1);
      dp[POS(next,2)]=MIN(dp[POS(now,0)],MIN(dp[POS(now,1)],dp[POS(now,2)]))+((v+1)&1);
      dp[POS(next,3)]=MIN(dp[POS(now,2)],dp[POS(now,3)])+(v&1);
      dp[POS(next,4)]=MIN(dp[POS(now,1)],MIN(dp[POS(now,2)],MIN(dp[POS(now,3)],dp[POS(now,4)])))+v;
    } else {
      dp[POS(next,0)]=dp[POS(now,0)]+v;
      dp[POS(next,1)]=MIN(dp[POS(now,0)],dp[POS(now,1)])+2;
      dp[POS(next,2)]=MIN(dp[POS(now,0)],MIN(dp[POS(now,1)],dp[POS(now,2)]))+1;
      dp[POS(next,3)]=MIN(dp[POS(now,2)],dp[POS(now,3)])+2;
      dp[POS(next,4)]=MIN(dp[POS(now,1)],MIN(dp[POS(now,2)],MIN(dp[POS(now,3)],dp[POS(now,4)])))+v;
    }
    now=next;
  }
  int64 res=dp[POS(now,0)];
  for(i=1;i<5;i++) res=MIN(res,dp[POS(now,i)]);
  printf("%lld\n",res);
}

int main(void){
  run();
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\n"
	.text
	.globl	run
	.type	run, @function
run:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-52(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-52(%rbp), %eax
	cltq
	movl	$4, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, -24(%rbp)
	movl	$0, -48(%rbp)
	jmp	.L2
.L3:
	movl	-48(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -48(%rbp)
.L2:
	movl	-52(%rbp), %eax
	cmpl	%eax, -48(%rbp)
	jl	.L3
	movl	$8, %esi
	movl	$10, %edi
	call	calloc@PLT
	movq	%rax, -16(%rbp)
	movl	$0, -44(%rbp)
	movl	$0, -48(%rbp)
	jmp	.L4
.L7:
	movl	-44(%rbp), %eax
	xorl	$1, %eax
	movl	%eax, -40(%rbp)
	movl	-48(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -36(%rbp)
	cmpl	$0, -36(%rbp)
	jle	.L5
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rsi
	movl	-36(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	(%rsi,%rcx), %rdx
	movq	%rdx, (%rax)
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$1, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, %rcx
	movl	-36(%rbp), %eax
	cltq
	andl	$1, %eax
	movq	%rax, %rsi
	movl	-40(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$1, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	(%rcx,%rsi), %rdx
	movq	%rdx, (%rax)
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$2, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	addq	$1, %rax
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, %rcx
	movl	-36(%rbp), %eax
	addl	$1, %eax
	cltq
	andl	$1, %eax
	movq	%rax, %rsi
	movl	-40(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$2, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	(%rcx,%rsi), %rdx
	movq	%rdx, (%rax)
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$3, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	addq	$2, %rax
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, %rcx
	movl	-36(%rbp), %eax
	cltq
	andl	$1, %eax
	movq	%rax, %rsi
	movl	-40(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$3, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	(%rcx,%rsi), %rdx
	movq	%rdx, (%rax)
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$4, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	addq	$3, %rax
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	addq	$2, %rax
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	addq	$1, %rax
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, %rsi
	movl	-36(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$4, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	(%rsi,%rcx), %rdx
	movq	%rdx, (%rax)
	jmp	.L6
.L5:
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rsi
	movl	-36(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	(%rsi,%rcx), %rdx
	movq	%rdx, (%rax)
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$1, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, %rcx
	movl	-40(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$1, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	2(%rcx), %rdx
	movq	%rdx, (%rax)
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$2, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	addq	$1, %rax
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, %rcx
	movl	-40(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$2, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	1(%rcx), %rdx
	movq	%rdx, (%rax)
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$3, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	addq	$2, %rax
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, %rcx
	movl	-40(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$3, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	2(%rcx), %rdx
	movq	%rdx, (%rax)
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$4, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	addq	$3, %rax
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	addq	$2, %rax
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	addq	$1, %rax
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, %rsi
	movl	-36(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$4, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	(%rsi,%rcx), %rdx
	movq	%rdx, (%rax)
.L6:
	movl	-40(%rbp), %eax
	movl	%eax, -44(%rbp)
	addl	$1, -48(%rbp)
.L4:
	movl	-52(%rbp), %eax
	cmpl	%eax, -48(%rbp)
	jl	.L7
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movl	$1, -48(%rbp)
	jmp	.L8
.L9:
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%eax, %edx
	movl	-48(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	-32(%rbp), %rdx
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, -32(%rbp)
	addl	$1, -48(%rbp)
.L8:
	cmpl	$4, -48(%rbp)
	jle	.L9
	movq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	run, .-run
	.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
	call	run
	movl	$0, %eax
	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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\n"
	.text
	.p2align 4
	.globl	run
	.type	run, @function
run:
.LFB39:
	.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
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r14, %rdi
	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
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	36(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	36(%rsp), %rdi
	movl	$4, %esi
	movq	%rdi, %rbx
	call	calloc@PLT
	movq	%rax, (%rsp)
	testl	%ebx, %ebx
	jle	.L2
	movq	%rax, %r13
	movq	%rax, %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %r12d
	addq	$4, %rbp
	cmpl	%ebx, %r12d
	jg	.L3
	movl	$8, %esi
	movl	$10, %edi
	call	calloc@PLT
	movq	%rax, %r15
	testl	%r12d, %r12d
	jle	.L9
	movq	(%rsp), %rax
	xorl	%edx, %edx
	leaq	(%rax,%r12,4), %rax
	movq	%rax, 24(%rsp)
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L15:
	movl	%r9d, %edx
	andl	$1, %edx
	movq	%rdx, 8(%rsp)
	movq	(%rcx), %rdx
	cmpq	(%rsi), %rdx
	cmovg	(%rsi), %rdx
	addq	8(%rsp), %rdx
	movq	%rdx, (%rbx)
	movq	(%rsi), %rbx
	movq	(%rdi), %rdx
	movq	(%rcx), %rcx
	cmpq	%rdx, %rbx
	cmovle	%rbx, %rdx
	cmpq	%rcx, %rdx
	cmovle	%rdx, %rcx
	addl	$1, %eax
	andl	$1, %eax
	addq	%rax, %rcx
	movq	(%rsp), %rax
	movq	%rcx, (%rax)
	movq	(%rdi), %rdx
	movq	(%r10), %rax
	cmpq	%rdx, %rax
	cmovg	%rdx, %rax
	addq	8(%rsp), %rax
	movq	%rax, (%r12)
	movq	(%r10), %rdx
	movq	0(%rbp), %rax
	cmpq	%rdx, %rax
	cmovg	%rdx, %rax
	movq	(%rdi), %rdx
	cmpq	%rdx, %rax
	cmovg	%rdx, %rax
	movq	(%rsi), %rdx
	cmpq	%rdx, %rax
	cmovg	%rdx, %rax
	addq	$4, %r13
	addq	%r9, %rax
	movq	%rax, (%r11)
	cmpq	24(%rsp), %r13
	je	.L4
.L6:
	movl	%r8d, %edx
.L7:
	movl	%edx, %r8d
	leal	(%rdx,%rdx,4), %esi
	movslq	0(%r13), %r9
	movslq	%esi, %rsi
	xorl	$1, %r8d
	leal	(%r8,%r8,4), %ebx
	leaq	(%r15,%rsi,8), %rcx
	movq	%r9, %rax
	movslq	%ebx, %rdi
	movq	(%rcx), %rdx
	leaq	8(,%rsi,8), %rbp
	movl	%ebx, 20(%rsp)
	leaq	8(,%rdi,8), %r11
	leaq	(%r15,%rdi,8), %r14
	leaq	8(%r15,%r11), %r10
	addq	%r9, %rdx
	leaq	(%r15,%rbp), %rsi
	movq	%r10, (%rsp)
	leaq	(%r15,%r11), %rbx
	leaq	8(%r15,%rbp), %rdi
	leaq	16(%r15,%rbp), %r10
	leaq	16(%r15,%r11), %r12
	movq	%rdx, (%r14)
	leaq	24(%r15,%rbp), %rbp
	leaq	24(%r15,%r11), %r11
	testl	%r9d, %r9d
	jg	.L15
	movq	(%rcx), %rax
	movq	(%rsi), %rdx
	cmpq	%rdx, %rax
	cmovg	%rdx, %rax
	addq	$2, %rax
	movq	%rax, (%rbx)
	movq	(%rsi), %rdx
	movq	(%rdi), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	(%rcx), %rdx
	movq	(%rsp), %rcx
	cmpq	%rdx, %rax
	cmovg	%rdx, %rax
	addq	$1, %rax
	movq	%rax, (%rcx)
	movq	(%r10), %rdx
	movq	(%rdi), %rax
	cmpq	%rdx, %rax
	cmovg	%rdx, %rax
	addq	$2, %rax
	movq	%rax, (%r12)
	movq	0(%rbp), %rdx
	movq	(%r10), %rax
	cmpq	%rdx, %rax
	cmovg	%rdx, %rax
	movq	(%rdi), %rdx
	cmpq	%rdx, %rax
	cmovg	%rdx, %rax
	movq	(%rsi), %rdx
	cmpq	%rdx, %rax
	cmovg	%rdx, %rax
	addq	$4, %r13
	addq	%r9, %rax
	movq	%rax, (%r11)
	cmpq	%r13, 24(%rsp)
	jne	.L6
.L4:
	movl	20(%rsp), %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	addl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	(%r15,%rax,8), %rax
	movq	8(%r15,%rcx), %rdx
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	movq	(%r14), %rax
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	movq	16(%r15,%rcx), %rax
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	movq	24(%r15,%rcx), %rax
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	movl	$8, %esi
	movl	$10, %edi
	call	calloc@PLT
	movl	$0, 20(%rsp)
	movq	%rax, %r15
	movq	%rax, %r14
	jmp	.L4
.L9:
	movl	$0, 20(%rsp)
	movq	%rax, %r14
	jmp	.L4
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	run, .-run
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	call	run
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\n"
	.text
	.p2align 4
	.globl	run
	.type	run, @function
run:
.LFB39:
	.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
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r14, %rdi
	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
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	36(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	36(%rsp), %rdi
	movl	$4, %esi
	movq	%rdi, %rbx
	call	calloc@PLT
	movq	%rax, (%rsp)
	testl	%ebx, %ebx
	jle	.L2
	movq	%rax, %r13
	movq	%rax, %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %r12d
	addq	$4, %rbp
	cmpl	%ebx, %r12d
	jg	.L3
	movl	$8, %esi
	movl	$10, %edi
	call	calloc@PLT
	movq	%rax, %r15
	testl	%r12d, %r12d
	jle	.L9
	movq	(%rsp), %rax
	xorl	%edx, %edx
	leaq	(%rax,%r12,4), %rax
	movq	%rax, 24(%rsp)
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L15:
	movl	%r9d, %edx
	andl	$1, %edx
	movq	%rdx, 8(%rsp)
	movq	(%rcx), %rdx
	cmpq	(%rsi), %rdx
	cmovg	(%rsi), %rdx
	addq	8(%rsp), %rdx
	movq	%rdx, (%rbx)
	movq	(%rsi), %rbx
	movq	(%rdi), %rdx
	movq	(%rcx), %rcx
	cmpq	%rdx, %rbx
	cmovle	%rbx, %rdx
	cmpq	%rcx, %rdx
	cmovle	%rdx, %rcx
	addl	$1, %eax
	andl	$1, %eax
	addq	%rax, %rcx
	movq	(%rsp), %rax
	movq	%rcx, (%rax)
	movq	(%rdi), %rdx
	movq	(%r10), %rax
	cmpq	%rdx, %rax
	cmovg	%rdx, %rax
	addq	8(%rsp), %rax
	movq	%rax, (%r12)
	movq	(%r10), %rdx
	movq	0(%rbp), %rax
	cmpq	%rdx, %rax
	cmovg	%rdx, %rax
	movq	(%rdi), %rdx
	cmpq	%rdx, %rax
	cmovg	%rdx, %rax
	movq	(%rsi), %rdx
	cmpq	%rdx, %rax
	cmovg	%rdx, %rax
	addq	$4, %r13
	addq	%r9, %rax
	movq	%rax, (%r11)
	cmpq	24(%rsp), %r13
	je	.L4
.L6:
	movl	%r8d, %edx
.L7:
	movl	%edx, %r8d
	leal	(%rdx,%rdx,4), %esi
	movslq	0(%r13), %r9
	movslq	%esi, %rsi
	xorl	$1, %r8d
	leal	(%r8,%r8,4), %ebx
	leaq	(%r15,%rsi,8), %rcx
	movq	%r9, %rax
	movslq	%ebx, %rdi
	movq	(%rcx), %rdx
	leaq	8(,%rsi,8), %rbp
	movl	%ebx, 20(%rsp)
	leaq	8(,%rdi,8), %r11
	leaq	(%r15,%rdi,8), %r14
	leaq	8(%r15,%r11), %r10
	addq	%r9, %rdx
	leaq	(%r15,%rbp), %rsi
	movq	%r10, (%rsp)
	leaq	(%r15,%r11), %rbx
	leaq	8(%r15,%rbp), %rdi
	leaq	16(%r15,%rbp), %r10
	leaq	16(%r15,%r11), %r12
	movq	%rdx, (%r14)
	leaq	24(%r15,%rbp), %rbp
	leaq	24(%r15,%r11), %r11
	testl	%r9d, %r9d
	jg	.L15
	movq	(%rcx), %rax
	movq	(%rsi), %rdx
	cmpq	%rdx, %rax
	cmovg	%rdx, %rax
	addq	$2, %rax
	movq	%rax, (%rbx)
	movq	(%rsi), %rdx
	movq	(%rdi), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	(%rcx), %rdx
	movq	(%rsp), %rcx
	cmpq	%rdx, %rax
	cmovg	%rdx, %rax
	addq	$1, %rax
	movq	%rax, (%rcx)
	movq	(%r10), %rdx
	movq	(%rdi), %rax
	cmpq	%rdx, %rax
	cmovg	%rdx, %rax
	addq	$2, %rax
	movq	%rax, (%r12)
	movq	0(%rbp), %rdx
	movq	(%r10), %rax
	cmpq	%rdx, %rax
	cmovg	%rdx, %rax
	movq	(%rdi), %rdx
	cmpq	%rdx, %rax
	cmovg	%rdx, %rax
	movq	(%rsi), %rdx
	cmpq	%rdx, %rax
	cmovg	%rdx, %rax
	addq	$4, %r13
	addq	%r9, %rax
	movq	%rax, (%r11)
	cmpq	%r13, 24(%rsp)
	jne	.L6
.L4:
	movl	20(%rsp), %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	addl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	(%r15,%rax,8), %rax
	movq	8(%r15,%rcx), %rdx
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	movq	(%r14), %rax
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	movq	16(%r15,%rcx), %rax
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	movq	24(%r15,%rcx), %rax
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	movl	$8, %esi
	movl	$10, %edi
	call	calloc@PLT
	movl	$0, 20(%rsp)
	movq	%rax, %r15
	movq	%rax, %r14
	jmp	.L4
.L9:
	movl	$0, 20(%rsp)
	movq	%rax, %r14
	jmp	.L4
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	run, .-run
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	call	run
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.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>

typedef long long int int64;

#define MIN(a,b) ((a)<(b)?(a):(b))

#define POS(i,j) ((i)*5+(j))

void run(void){
  int n;
  scanf("%d",&n);
  int *a=(int *)calloc(n,sizeof(int));
  int i;
  for(i=0;i<n;i++) scanf("%d",a+i);
  int64 *dp=(int64 *)calloc(5*2,sizeof(int64));
  int now=0;
  for(i=0;i<n;i++){
    int next=now^1;
    int v=a[i];
    if(v>0){
      dp[POS(next,0)]=dp[POS(now,0)]+v;
      dp[POS(next,1)]=MIN(dp[POS(now,0)],dp[POS(now,1)])+(v&1);
      dp[POS(next,2)]=MIN(dp[POS(now,0)],MIN(dp[POS(now,1)],dp[POS(now,2)]))+((v+1)&1);
      dp[POS(next,3)]=MIN(dp[POS(now,2)],dp[POS(now,3)])+(v&1);
      dp[POS(next,4)]=MIN(dp[POS(now,1)],MIN(dp[POS(now,2)],MIN(dp[POS(now,3)],dp[POS(now,4)])))+v;
    } else {
      dp[POS(next,0)]=dp[POS(now,0)]+v;
      dp[POS(next,1)]=MIN(dp[POS(now,0)],dp[POS(now,1)])+2;
      dp[POS(next,2)]=MIN(dp[POS(now,0)],MIN(dp[POS(now,1)],dp[POS(now,2)]))+1;
      dp[POS(next,3)]=MIN(dp[POS(now,2)],dp[POS(now,3)])+2;
      dp[POS(next,4)]=MIN(dp[POS(now,1)],MIN(dp[POS(now,2)],MIN(dp[POS(now,3)],dp[POS(now,4)])))+v;
    }
    now=next;
  }
  int64 res=dp[POS(now,0)];
  for(i=1;i<5;i++) res=MIN(res,dp[POS(now,i)]);
  printf("%lld\n",res);
}

int main(void){
  run();
  return 0;
}

4
1
0
4
3
 8
2
0
0
2
0
3
4
1
 4
0
0
4
3
 8
2
0
1
2
0
1
0
1
 8
2
0
1
2
0
1
0
0
 8
4
0
0
2
0
1
2
1
 7
314159265
429733551
846264338
327950288
419716939
937510582
0
 8
2
0
0
2
0
0
4
1
 7
314159265
429733551
846264338
327950288
419716939
937510582
-1
 4
0
1
4
3

1
 4
 0
 3
 2
 5
 1
 4
 0
 1

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>

typedef long long int int64;

#define MIN(a,b) ((a)<(b)?(a):(b))

#define POS(i,j) ((i)*5+(j))

void run(void){
  int n;
  scanf("%d",&n);
  int *a=(int *)calloc(n,sizeof(int));
  int i;
  for(i=0;i<n;i++) scanf("%d",a+i);
  int64 *dp=(int64 *)calloc(5*2,sizeof(int64));
  int now=0;
  for(i=0;i<n;i++){
    int next=now^1;
    int v=a[i];
    if(v>0){
      dp[POS(next,0)]=dp[POS(now,0)]+v;
      dp[POS(next,1)]=MIN(dp[POS(now,0)],dp[POS(now,1)])+(v&1);
      dp[POS(next,2)]=MIN(dp[POS(now,0)],MIN(dp[POS(now,1)],dp[POS(now,2)]))+((v+1)&1);
      dp[POS(next,3)]=MIN(dp[POS(now,2)],dp[POS(now,3)])+(v&1);
      dp[POS(next,4)]=MIN(dp[POS(now,1)],MIN(dp[POS(now,2)],MIN(dp[POS(now,3)],dp[POS(now,4)])))+v;
    } else {
      dp[POS(next,0)]=dp[POS(now,0)]+v;
      dp[POS(next,1)]=MIN(dp[POS(now,0)],dp[POS(now,1)])+2;
      dp[POS(next,2)]=MIN(dp[POS(now,0)],MIN(dp[POS(now,1)],dp[POS(now,2)]))+1;
      dp[POS(next,3)]=MIN(dp[POS(now,2)],dp[POS(now,3)])+2;
      dp[POS(next,4)]=MIN(dp[POS(now,1)],MIN(dp[POS(now,2)],MIN(dp[POS(now,3)],dp[POS(now,4)])))+v;
    }
    now=next;
  }
  int64 res=dp[POS(now,0)];
  for(i=1;i<5;i++) res=MIN(res,dp[POS(now,i)]);
  printf("%lld\n",res);
}

int main(void){
  run();
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\n"
	.text
	.globl	run
	.type	run, @function
run:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-52(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-52(%rbp), %eax
	cltq
	movl	$4, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, -24(%rbp)
	movl	$0, -48(%rbp)
	jmp	.L2
.L3:
	movl	-48(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -48(%rbp)
.L2:
	movl	-52(%rbp), %eax
	cmpl	%eax, -48(%rbp)
	jl	.L3
	movl	$8, %esi
	movl	$10, %edi
	call	calloc@PLT
	movq	%rax, -16(%rbp)
	movl	$0, -44(%rbp)
	movl	$0, -48(%rbp)
	jmp	.L4
.L7:
	movl	-44(%rbp), %eax
	xorl	$1, %eax
	movl	%eax, -40(%rbp)
	movl	-48(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -36(%rbp)
	cmpl	$0, -36(%rbp)
	jle	.L5
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rsi
	movl	-36(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	(%rsi,%rcx), %rdx
	movq	%rdx, (%rax)
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$1, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, %rcx
	movl	-36(%rbp), %eax
	cltq
	andl	$1, %eax
	movq	%rax, %rsi
	movl	-40(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$1, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	(%rcx,%rsi), %rdx
	movq	%rdx, (%rax)
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$2, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	addq	$1, %rax
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, %rcx
	movl	-36(%rbp), %eax
	addl	$1, %eax
	cltq
	andl	$1, %eax
	movq	%rax, %rsi
	movl	-40(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$2, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	(%rcx,%rsi), %rdx
	movq	%rdx, (%rax)
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$3, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	addq	$2, %rax
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, %rcx
	movl	-36(%rbp), %eax
	cltq
	andl	$1, %eax
	movq	%rax, %rsi
	movl	-40(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$3, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	(%rcx,%rsi), %rdx
	movq	%rdx, (%rax)
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$4, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	addq	$3, %rax
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	addq	$2, %rax
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	addq	$1, %rax
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, %rsi
	movl	-36(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$4, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	(%rsi,%rcx), %rdx
	movq	%rdx, (%rax)
	jmp	.L6
.L5:
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rsi
	movl	-36(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	(%rsi,%rcx), %rdx
	movq	%rdx, (%rax)
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$1, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, %rcx
	movl	-40(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$1, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	2(%rcx), %rdx
	movq	%rdx, (%rax)
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$2, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	addq	$1, %rax
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, %rcx
	movl	-40(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$2, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	1(%rcx), %rdx
	movq	%rdx, (%rax)
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$3, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	addq	$2, %rax
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, %rcx
	movl	-40(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$3, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	2(%rcx), %rdx
	movq	%rdx, (%rax)
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$4, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	addq	$3, %rax
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	addq	$2, %rax
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	addq	$1, %rax
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, %rsi
	movl	-36(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$4, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	(%rsi,%rcx), %rdx
	movq	%rdx, (%rax)
.L6:
	movl	-40(%rbp), %eax
	movl	%eax, -44(%rbp)
	addl	$1, -48(%rbp)
.L4:
	movl	-52(%rbp), %eax
	cmpl	%eax, -48(%rbp)
	jl	.L7
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movl	$1, -48(%rbp)
	jmp	.L8
.L9:
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%eax, %edx
	movl	-48(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	-32(%rbp), %rdx
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, -32(%rbp)
	addl	$1, -48(%rbp)
.L8:
	cmpl	$4, -48(%rbp)
	jle	.L9
	movq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	run, .-run
	.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
	call	run
	movl	$0, %eax
	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
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\n"
	.text
	.globl	run
	.type	run, @function
run:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-52(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-52(%rbp), %eax
	cltq
	movl	$4, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, -24(%rbp)
	movl	$0, -48(%rbp)
	jmp	.L2
.L3:
	movl	-48(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -48(%rbp)
.L2:
	movl	-52(%rbp), %eax
	cmpl	%eax, -48(%rbp)
	jl	.L3
	movl	$8, %esi
	movl	$10, %edi
	call	calloc@PLT
	movq	%rax, -16(%rbp)
	movl	$0, -44(%rbp)
	movl	$0, -48(%rbp)
	jmp	.L4
.L7:
	movl	-44(%rbp), %eax
	xorl	$1, %eax
	movl	%eax, -40(%rbp)
	movl	-48(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -36(%rbp)
	cmpl	$0, -36(%rbp)
	jle	.L5
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rsi
	movl	-36(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	(%rsi,%rcx), %rdx
	movq	%rdx, (%rax)
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$1, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, %rcx
	movl	-36(%rbp), %eax
	cltq
	andl	$1, %eax
	movq	%rax, %rsi
	movl	-40(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$1, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	(%rcx,%rsi), %rdx
	movq	%rdx, (%rax)
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$2, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	addq	$1, %rax
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, %rcx
	movl	-36(%rbp), %eax
	addl	$1, %eax
	cltq
	andl	$1, %eax
	movq	%rax, %rsi
	movl	-40(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$2, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	(%rcx,%rsi), %rdx
	movq	%rdx, (%rax)
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$3, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	addq	$2, %rax
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, %rcx
	movl	-36(%rbp), %eax
	cltq
	andl	$1, %eax
	movq	%rax, %rsi
	movl	-40(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$3, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	(%rcx,%rsi), %rdx
	movq	%rdx, (%rax)
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$4, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	addq	$3, %rax
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	addq	$2, %rax
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	addq	$1, %rax
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, %rsi
	movl	-36(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$4, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	(%rsi,%rcx), %rdx
	movq	%rdx, (%rax)
	jmp	.L6
.L5:
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rsi
	movl	-36(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	(%rsi,%rcx), %rdx
	movq	%rdx, (%rax)
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$1, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, %rcx
	movl	-40(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$1, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	2(%rcx), %rdx
	movq	%rdx, (%rax)
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$2, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	addq	$1, %rax
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, %rcx
	movl	-40(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$2, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	1(%rcx), %rdx
	movq	%rdx, (%rax)
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$3, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	addq	$2, %rax
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, %rcx
	movl	-40(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$3, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	2(%rcx), %rdx
	movq	%rdx, (%rax)
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$4, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	addq	$3, %rax
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	addq	$2, %rax
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovg	%rax, %rdx
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	cltq
	addq	$1, %rax
	leaq	0(,%rax,8), %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, %rsi
	movl	-36(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	addq	$4, %rax
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	(%rsi,%rcx), %rdx
	movq	%rdx, (%rax)
.L6:
	movl	-40(%rbp), %eax
	movl	%eax, -44(%rbp)
	addl	$1, -48(%rbp)
.L4:
	movl	-52(%rbp), %eax
	cmpl	%eax, -48(%rbp)
	jl	.L7
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movl	$1, -48(%rbp)
	jmp	.L8
.L9:
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%eax, %edx
	movl	-48(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	-32(%rbp), %rdx
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	movq	%rax, -32(%rbp)
	addl	$1, -48(%rbp)
.L8:
	cmpl	$4, -48(%rbp)
	jle	.L9
	movq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	run, .-run
	.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
	call	run
	movl	$0, %eax
	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:
