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 MAX(a,b) ((a)>(b)?(a):(b))
#define MIN(a,b) ((a)<(b)?(a):(b))

typedef struct indexVal{
  int64 val;
  int index;
} node;

typedef struct deque{
  node *a;
  int front;
  int last;
  int len;
} deque;

deque* newDeque(int len){
  deque *d=(deque *)calloc(1,sizeof(deque));
  d->a=(node *)calloc(len,sizeof(node));
  d->front=d->last=0;
  d->len=len;
  return d;
}

void push_back(deque *d,node v){
  d->a[d->last++]=v;
  d->last%=d->len;
}

node pop_front(deque *d){
  node t=d->a[d->front++];
  d->front%=d->len;
  return t;
}

node pop_back(deque *d){
  d->last=(d->last+d->len-1)%d->len;
  return d->a[d->last];
}

node get_front(deque *d){
  return d->a[d->front];
}

node get_back(deque *d){
  return d->a[(d->last+d->len-1)%d->len];
}

int isEmpty(deque *d){
  return d->front==d->last;
}

#define POS(i,j) ((i)*(k+1)+(j))

void run(void){
  int n,m,k;
  scanf("%d%d%d",&n,&m,&k);
  int *a=(int *)calloc(n+1,sizeof(int));
  int i;
  for(i=1;i<=n;i++) scanf("%d",a+i);
  deque **deq=(deque **)calloc(k,sizeof(deque *));
  for(i=0;i<k;i++) deq[i]=newDeque(m+1);
  push_back(deq[0],(node){0,n});
  int64 ans=0;
  for(i=1;i<=n;i++){
    for(int j=MIN(k,i);j>=1;j--){
      node t=get_front(deq[j-1]);
      while(t.index<i-m){
	pop_front(deq[j-1]);
	t=get_front(deq[j-1]);
      }
      int64 local=(int64)j*a[i]+t.val;
      if(j==k){
	ans=MAX(ans,local);
      } else {
	while(!isEmpty(deq[j])){
	  node t=get_back(deq[j]);
	  if(t.val>local) break;
	  pop_back(deq[j]);
	}
	push_back(deq[j],(node){local,i});
      }
    }
  }
  printf("%lld\n",ans);
}

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

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	newDeque
	.type	newDeque, @function
newDeque:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	$24, %esi
	movl	$1, %edi
	call	calloc@PLT
	movq	%rax, -8(%rbp)
	movl	-20(%rbp), %eax
	cltq
	movl	$16, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-8(%rbp), %rax
	movl	$0, 12(%rax)
	movq	-8(%rbp), %rax
	movl	12(%rax), %edx
	movq	-8(%rbp), %rax
	movl	%edx, 8(%rax)
	movq	-8(%rbp), %rax
	movl	-20(%rbp), %edx
	movl	%edx, 16(%rax)
	movq	-8(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	newDeque, .-newDeque
	.globl	push_back
	.type	push_back, @function
push_back:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rdx, %rcx
	movq	%rsi, %rax
	movq	%rdi, %rdx
	movq	%rcx, %rdx
	movq	%rax, -32(%rbp)
	movq	%rdx, -24(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rsi
	movq	-8(%rbp), %rax
	movl	12(%rax), %eax
	leal	1(%rax), %ecx
	movq	-8(%rbp), %rdx
	movl	%ecx, 12(%rdx)
	cltq
	salq	$4, %rax
	leaq	(%rsi,%rax), %rcx
	movq	-32(%rbp), %rax
	movq	-24(%rbp), %rdx
	movq	%rax, (%rcx)
	movq	%rdx, 8(%rcx)
	movq	-8(%rbp), %rax
	movl	12(%rax), %eax
	movq	-8(%rbp), %rdx
	movl	16(%rdx), %ecx
	cltd
	idivl	%ecx
	movq	-8(%rbp), %rax
	movl	%edx, 12(%rax)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	push_back, .-push_back
	.globl	pop_front
	.type	pop_front, @function
pop_front:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rsi
	movq	-24(%rbp), %rax
	movl	8(%rax), %eax
	leal	1(%rax), %ecx
	movq	-24(%rbp), %rdx
	movl	%ecx, 8(%rdx)
	cltq
	salq	$4, %rax
	addq	%rsi, %rax
	movq	8(%rax), %rdx
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	movq	%rdx, -8(%rbp)
	movq	-24(%rbp), %rax
	movl	8(%rax), %eax
	movq	-24(%rbp), %rdx
	movl	16(%rdx), %ecx
	cltd
	idivl	%ecx
	movq	-24(%rbp), %rax
	movl	%edx, 8(%rax)
	movq	-16(%rbp), %rax
	movq	-8(%rbp), %rdx
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	pop_front, .-pop_front
	.globl	pop_back
	.type	pop_back, @function
pop_back:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	12(%rax), %edx
	movq	-8(%rbp), %rax
	movl	16(%rax), %eax
	addl	%edx, %eax
	leal	-1(%rax), %edx
	movq	-8(%rbp), %rax
	movl	16(%rax), %ecx
	movl	%edx, %eax
	cltd
	idivl	%ecx
	movq	-8(%rbp), %rax
	movl	%edx, 12(%rax)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-8(%rbp), %rax
	movl	12(%rax), %eax
	cltq
	salq	$4, %rax
	addq	%rdx, %rax
	movq	8(%rax), %rdx
	movq	(%rax), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	pop_back, .-pop_back
	.globl	get_front
	.type	get_front, @function
get_front:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-8(%rbp), %rax
	movl	8(%rax), %eax
	cltq
	salq	$4, %rax
	addq	%rdx, %rax
	movq	8(%rax), %rdx
	movq	(%rax), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	get_front, .-get_front
	.globl	get_back
	.type	get_back, @function
get_back:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rsi
	movq	-8(%rbp), %rax
	movl	12(%rax), %edx
	movq	-8(%rbp), %rax
	movl	16(%rax), %eax
	addl	%edx, %eax
	leal	-1(%rax), %edx
	movq	-8(%rbp), %rax
	movl	16(%rax), %ecx
	movl	%edx, %eax
	cltd
	idivl	%ecx
	movl	%edx, %eax
	cltq
	salq	$4, %rax
	addq	%rsi, %rax
	movq	8(%rax), %rdx
	movq	(%rax), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	get_back, .-get_back
	.globl	isEmpty
	.type	isEmpty, @function
isEmpty:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	8(%rax), %edx
	movq	-8(%rbp), %rax
	movl	12(%rax), %eax
	cmpl	%eax, %edx
	sete	%al
	movzbl	%al, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	isEmpty, .-isEmpty
	.section	.rodata
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.text
	.globl	run
	.type	run, @function
run:
.LFB13:
	.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
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	leaq	-140(%rbp), %rcx
	leaq	-144(%rbp), %rdx
	leaq	-148(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-148(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	$4, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, -120(%rbp)
	movl	$1, -136(%rbp)
	jmp	.L15
.L16:
	movl	-136(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-120(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -136(%rbp)
.L15:
	movl	-148(%rbp), %eax
	cmpl	%eax, -136(%rbp)
	jle	.L16
	movl	-140(%rbp), %eax
	cltq
	movl	$8, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, -112(%rbp)
	movl	$0, -136(%rbp)
	jmp	.L17
.L18:
	movl	-144(%rbp), %eax
	addl	$1, %eax
	movl	-136(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-112(%rbp), %rdx
	leaq	(%rcx,%rdx), %rbx
	movl	%eax, %edi
	call	newDeque
	movq	%rax, (%rbx)
	addl	$1, -136(%rbp)
.L17:
	movl	-140(%rbp), %eax
	cmpl	%eax, -136(%rbp)
	jl	.L18
	movl	$0, %r14d
	movl	-148(%rbp), %eax
	movl	%eax, %edx
	movq	%r15, %rcx
	movabsq	$-4294967296, %rax
	andq	%rcx, %rax
	orq	%rdx, %rax
	movq	%rax, %r15
	movq	-112(%rbp), %rax
	movq	(%rax), %rax
	movq	%r14, %rsi
	movq	%r15, %rdi
	movq	%r14, %rcx
	movq	%r15, %rbx
	movq	%rbx, %rdx
	movq	%rax, %rdi
	call	push_back
	movq	$0, -128(%rbp)
	movl	$1, -136(%rbp)
	jmp	.L19
.L30:
	movl	-140(%rbp), %eax
	movl	-136(%rbp), %edx
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, -132(%rbp)
	jmp	.L20
.L29:
	movl	-132(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rdx
	movq	-112(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	get_front
	movq	%rax, -96(%rbp)
	movq	%rdx, -88(%rbp)
	jmp	.L21
.L22:
	movl	-132(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rdx
	movq	-112(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	pop_front
	movl	-132(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rdx
	movq	-112(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	get_front
	movq	%rax, -96(%rbp)
	movq	%rdx, -88(%rbp)
.L21:
	movl	-88(%rbp), %eax
	movl	-144(%rbp), %ecx
	movl	-136(%rbp), %edx
	subl	%ecx, %edx
	cmpl	%edx, %eax
	jl	.L22
	movl	-132(%rbp), %eax
	movslq	%eax, %rdx
	movl	-136(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-120(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cltq
	imulq	%rax, %rdx
	movq	-96(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, -104(%rbp)
	movl	-140(%rbp), %eax
	cmpl	%eax, -132(%rbp)
	jne	.L25
	movq	-128(%rbp), %rdx
	movq	-104(%rbp), %rax
	cmpq	%rax, %rdx
	cmovge	%rdx, %rax
	movq	%rax, -128(%rbp)
	jmp	.L24
.L28:
	movl	-132(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-112(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	get_back
	movq	%rax, -80(%rbp)
	movq	%rdx, -72(%rbp)
	movq	-80(%rbp), %rax
	cmpq	%rax, -104(%rbp)
	jl	.L32
	movl	-132(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-112(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	pop_back
.L25:
	movl	-132(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-112(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	isEmpty
	testl	%eax, %eax
	je	.L28
	jmp	.L27
.L32:
	nop
.L27:
	movq	-104(%rbp), %r12
	movl	-136(%rbp), %eax
	movq	%r13, %rcx
	movabsq	$-4294967296, %rdx
	andq	%rcx, %rdx
	orq	%rdx, %rax
	movq	%rax, %r13
	movl	-132(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-112(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%r12, %rsi
	movq	%r13, %rdi
	movq	%r12, %rcx
	movq	%r13, %rbx
	movq	%rbx, %rdx
	movq	%rax, %rdi
	call	push_back
.L24:
	subl	$1, -132(%rbp)
.L20:
	cmpl	$0, -132(%rbp)
	jg	.L29
	addl	$1, -136(%rbp)
.L19:
	movl	-148(%rbp), %eax
	cmpl	%eax, -136(%rbp)
	jle	.L30
	movq	-128(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	run, .-run
	.globl	main
	.type	main, @function
main:
.LFB14:
	.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
.LFE14:
	.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	newDeque
	.type	newDeque, @function
newDeque:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	$24, %esi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movl	%edi, %ebx
	movl	$1, %edi
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	call	calloc@PLT
	movslq	%ebx, %rdi
	movl	$16, %esi
	movq	%rax, %r12
	call	calloc@PLT
	movl	%ebx, 16(%r12)
	movq	%rax, (%r12)
	movq	%r12, %rax
	movq	$0, 8(%r12)
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE39:
	.size	newDeque, .-newDeque
	.p2align 4
	.globl	push_back
	.type	push_back, @function
push_back:
.LFB40:
	.cfi_startproc
	endbr64
	movq	%rdx, %r8
	movslq	12(%rdi), %rdx
	movq	%rdx, %rax
	salq	$4, %rdx
	addq	(%rdi), %rdx
	addl	$1, %eax
	movq	%rsi, (%rdx)
	movq	%r8, 8(%rdx)
	cltd
	idivl	16(%rdi)
	movl	%edx, 12(%rdi)
	ret
	.cfi_endproc
.LFE40:
	.size	push_back, .-push_back
	.p2align 4
	.globl	pop_front
	.type	pop_front, @function
pop_front:
.LFB41:
	.cfi_startproc
	endbr64
	movslq	8(%rdi), %rdx
	movq	%rdx, %rax
	salq	$4, %rdx
	addq	(%rdi), %rdx
	addl	$1, %eax
	movq	(%rdx), %r8
	movl	8(%rdx), %ecx
	cltd
	idivl	16(%rdi)
	movq	%r8, %rax
	movl	%edx, 8(%rdi)
	movl	%ecx, %edx
	ret
	.cfi_endproc
.LFE41:
	.size	pop_front, .-pop_front
	.p2align 4
	.globl	pop_back
	.type	pop_back, @function
pop_back:
.LFB42:
	.cfi_startproc
	endbr64
	movl	16(%rdi), %ecx
	movl	12(%rdi), %eax
	addl	%ecx, %eax
	subl	$1, %eax
	cltd
	idivl	%ecx
	movl	%edx, 12(%rdi)
	movslq	%edx, %rdx
	salq	$4, %rdx
	addq	(%rdi), %rdx
	movq	(%rdx), %rax
	movq	8(%rdx), %rdx
	ret
	.cfi_endproc
.LFE42:
	.size	pop_back, .-pop_back
	.p2align 4
	.globl	get_front
	.type	get_front, @function
get_front:
.LFB43:
	.cfi_startproc
	endbr64
	movslq	8(%rdi), %rax
	salq	$4, %rax
	addq	(%rdi), %rax
	movq	8(%rax), %rdx
	movq	(%rax), %rax
	ret
	.cfi_endproc
.LFE43:
	.size	get_front, .-get_front
	.p2align 4
	.globl	get_back
	.type	get_back, @function
get_back:
.LFB44:
	.cfi_startproc
	endbr64
	movl	16(%rdi), %ecx
	movl	12(%rdi), %eax
	addl	%ecx, %eax
	subl	$1, %eax
	cltd
	idivl	%ecx
	movslq	%edx, %rdx
	salq	$4, %rdx
	addq	(%rdi), %rdx
	movq	(%rdx), %rax
	movq	8(%rdx), %rdx
	ret
	.cfi_endproc
.LFE44:
	.size	get_back, .-get_back
	.p2align 4
	.globl	isEmpty
	.type	isEmpty, @function
isEmpty:
.LFB45:
	.cfi_startproc
	endbr64
	movl	12(%rdi), %eax
	cmpl	%eax, 8(%rdi)
	sete	%al
	movzbl	%al, %eax
	ret
	.cfi_endproc
.LFE45:
	.size	isEmpty, .-isEmpty
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.text
	.p2align 4
	.globl	run
	.type	run, @function
run:
.LFB46:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	36(%rsp), %rcx
	leaq	32(%rsp), %rdx
	leaq	28(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %ebx
	movl	$4, %esi
	leal	1(%rbx), %edi
	movslq	%edi, %rdi
	call	calloc@PLT
	movq	%rax, %r15
	testl	%ebx, %ebx
	jle	.L11
	leaq	4(%rax), %r12
	movl	$1, %ebp
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L12:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %ebx
	addq	$4, %r12
	cmpl	%ebp, %ebx
	jge	.L12
.L11:
	movslq	36(%rsp), %rdi
	movl	$8, %esi
	movq	%rdi, %r13
	call	calloc@PLT
	movq	%rax, %rbp
	testl	%r13d, %r13d
	jle	.L17
	movl	32(%rsp), %eax
	movl	%ebx, (%rsp)
	movl	%r13d, 4(%rsp)
	leal	1(%rax), %edi
	movl	%r13d, %eax
	movq	%rbp, 8(%rsp)
	movq	%rbp, %r13
	leaq	0(%rbp,%rax,8), %rax
	movslq	%edi, %r12
	movl	%edi, %ebx
	movq	%rax, %rbp
	.p2align 4,,10
	.p2align 3
.L16:
	movl	$24, %esi
	movl	$1, %edi
	addq	$8, %r13
	call	calloc@PLT
	movl	$16, %esi
	movq	%r12, %rdi
	movq	%rax, %r14
	call	calloc@PLT
	movq	%r14, -8(%r13)
	movq	%rax, (%r14)
	movq	$0, 8(%r14)
	movl	%ebx, 16(%r14)
	cmpq	%rbp, %r13
	jne	.L16
	movl	(%rsp), %ebx
	movl	4(%rsp), %r13d
	movq	8(%rsp), %rbp
.L17:
	movq	0(%rbp), %rcx
	xorl	%r14d, %r14d
	movslq	12(%rcx), %rdx
	movq	%rdx, %rax
	salq	$4, %rdx
	addq	(%rcx), %rdx
	addl	$1, %eax
	movq	$0, (%rdx)
	movl	%ebx, 8(%rdx)
	cltd
	idivl	16(%rcx)
	movl	%edx, 12(%rcx)
	testl	%ebx, %ebx
	jle	.L15
	movl	$1, %r8d
	subl	32(%rsp), %r8d
	movl	$1, %r12d
	xorl	%r14d, %r14d
	leal	(%rbx,%r8), %eax
	movl	%eax, 4(%rsp)
	.p2align 4,,10
	.p2align 3
.L26:
	movl	%r12d, %eax
	cmpl	%r12d, %r13d
	movl	%r12d, (%rsp)
	cmovle	%r13d, %eax
	testl	%eax, %eax
	jle	.L18
	movslq	%eax, %rbx
	.p2align 4,,10
	.p2align 3
.L25:
	movq	-8(%rbp,%rbx,8), %rdi
	movslq	8(%rdi), %rax
	movq	(%rdi), %rsi
	movq	%rax, %rdx
	salq	$4, %rax
	addq	%rsi, %rax
	movq	(%rax), %rcx
	cmpl	%r8d, 8(%rax)
	jge	.L19
	movl	16(%rdi), %ecx
	.p2align 4,,10
	.p2align 3
.L20:
	leal	1(%rdx), %eax
	cltd
	idivl	%ecx
	movslq	%edx, %rax
	salq	$4, %rax
	addq	%rsi, %rax
	cmpl	%r8d, 8(%rax)
	jl	.L20
	movl	%edx, 8(%rdi)
	movq	(%rax), %rcx
.L19:
	movslq	(%r15,%r12,4), %rsi
	imulq	%rbx, %rsi
	addq	%rcx, %rsi
	cmpl	%ebx, %r13d
	je	.L21
	movq	0(%rbp,%rbx,8), %r10
	movl	8(%r10), %r9d
	movl	12(%r10), %edx
	movq	(%r10), %r11
	movl	16(%r10), %ecx
	cmpl	%r9d, %edx
	jne	.L22
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L38:
	movl	%edx, 12(%r10)
	cmpl	%r9d, %edx
	je	.L23
.L22:
	leal	-1(%rdx,%rcx), %eax
	movl	%edx, %edi
	cltd
	idivl	%ecx
	movslq	%edx, %rax
	salq	$4, %rax
	cmpq	(%r11,%rax), %rsi
	jge	.L38
	movl	%edi, %r9d
.L23:
	movslq	%r9d, %rax
	salq	$4, %rax
	addq	%rax, %r11
	movl	(%rsp), %eax
	movq	%rsi, (%r11)
	movl	%eax, 8(%r11)
	leal	1(%r9), %eax
	cltd
	idivl	%ecx
	movl	%edx, 12(%r10)
.L24:
	subq	$1, %rbx
	testl	%ebx, %ebx
	jg	.L25
.L18:
	addq	$1, %r12
	addl	$1, %r8d
	cmpl	4(%rsp), %r8d
	jne	.L26
.L15:
	xorl	%eax, %eax
	movq	%r14, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L39
	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
.L21:
	.cfi_restore_state
	cmpq	%rsi, %r14
	cmovl	%rsi, %r14
	jmp	.L24
.L39:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE46:
	.size	run, .-run
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB47:
	.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
.LFE47:
	.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	newDeque
	.type	newDeque, @function
newDeque:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	$24, %esi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movl	%edi, %ebx
	movl	$1, %edi
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	call	calloc@PLT
	movslq	%ebx, %rdi
	movl	$16, %esi
	movq	%rax, %r12
	call	calloc@PLT
	movl	%ebx, 16(%r12)
	movq	%rax, (%r12)
	movq	%r12, %rax
	movq	$0, 8(%r12)
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE39:
	.size	newDeque, .-newDeque
	.p2align 4
	.globl	push_back
	.type	push_back, @function
push_back:
.LFB40:
	.cfi_startproc
	endbr64
	movq	%rdx, %r8
	movslq	12(%rdi), %rdx
	movq	%rdx, %rax
	salq	$4, %rdx
	addq	(%rdi), %rdx
	addl	$1, %eax
	movq	%rsi, (%rdx)
	movq	%r8, 8(%rdx)
	cltd
	idivl	16(%rdi)
	movl	%edx, 12(%rdi)
	ret
	.cfi_endproc
.LFE40:
	.size	push_back, .-push_back
	.p2align 4
	.globl	pop_front
	.type	pop_front, @function
pop_front:
.LFB41:
	.cfi_startproc
	endbr64
	movslq	8(%rdi), %rdx
	movq	%rdx, %rax
	salq	$4, %rdx
	addq	(%rdi), %rdx
	addl	$1, %eax
	movq	(%rdx), %r8
	movl	8(%rdx), %ecx
	cltd
	idivl	16(%rdi)
	movq	%r8, %rax
	movl	%edx, 8(%rdi)
	movl	%ecx, %edx
	ret
	.cfi_endproc
.LFE41:
	.size	pop_front, .-pop_front
	.p2align 4
	.globl	pop_back
	.type	pop_back, @function
pop_back:
.LFB42:
	.cfi_startproc
	endbr64
	movl	16(%rdi), %ecx
	movl	12(%rdi), %eax
	addl	%ecx, %eax
	subl	$1, %eax
	cltd
	idivl	%ecx
	movl	%edx, 12(%rdi)
	movslq	%edx, %rdx
	salq	$4, %rdx
	addq	(%rdi), %rdx
	movq	(%rdx), %rax
	movq	8(%rdx), %rdx
	ret
	.cfi_endproc
.LFE42:
	.size	pop_back, .-pop_back
	.p2align 4
	.globl	get_front
	.type	get_front, @function
get_front:
.LFB43:
	.cfi_startproc
	endbr64
	movslq	8(%rdi), %rax
	salq	$4, %rax
	addq	(%rdi), %rax
	movq	8(%rax), %rdx
	movq	(%rax), %rax
	ret
	.cfi_endproc
.LFE43:
	.size	get_front, .-get_front
	.p2align 4
	.globl	get_back
	.type	get_back, @function
get_back:
.LFB44:
	.cfi_startproc
	endbr64
	movl	16(%rdi), %ecx
	movl	12(%rdi), %eax
	addl	%ecx, %eax
	subl	$1, %eax
	cltd
	idivl	%ecx
	movslq	%edx, %rdx
	salq	$4, %rdx
	addq	(%rdi), %rdx
	movq	(%rdx), %rax
	movq	8(%rdx), %rdx
	ret
	.cfi_endproc
.LFE44:
	.size	get_back, .-get_back
	.p2align 4
	.globl	isEmpty
	.type	isEmpty, @function
isEmpty:
.LFB45:
	.cfi_startproc
	endbr64
	movl	12(%rdi), %eax
	cmpl	%eax, 8(%rdi)
	sete	%al
	movzbl	%al, %eax
	ret
	.cfi_endproc
.LFE45:
	.size	isEmpty, .-isEmpty
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.text
	.p2align 4
	.globl	run
	.type	run, @function
run:
.LFB46:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	36(%rsp), %rcx
	leaq	32(%rsp), %rdx
	leaq	28(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %ebx
	movl	$4, %esi
	leal	1(%rbx), %edi
	movslq	%edi, %rdi
	call	calloc@PLT
	movq	%rax, %r15
	testl	%ebx, %ebx
	jle	.L11
	leaq	4(%rax), %r12
	movl	$1, %ebp
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L12:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %ebx
	addq	$4, %r12
	cmpl	%ebp, %ebx
	jge	.L12
.L11:
	movslq	36(%rsp), %rdi
	movl	$8, %esi
	movq	%rdi, %r13
	call	calloc@PLT
	movq	%rax, %rbp
	testl	%r13d, %r13d
	jle	.L17
	movl	32(%rsp), %eax
	movl	%ebx, (%rsp)
	movl	%r13d, 4(%rsp)
	leal	1(%rax), %edi
	movl	%r13d, %eax
	movq	%rbp, 8(%rsp)
	movq	%rbp, %r13
	leaq	0(%rbp,%rax,8), %rax
	movslq	%edi, %r12
	movl	%edi, %ebx
	movq	%rax, %rbp
	.p2align 4,,10
	.p2align 3
.L16:
	movl	$24, %esi
	movl	$1, %edi
	addq	$8, %r13
	call	calloc@PLT
	movl	$16, %esi
	movq	%r12, %rdi
	movq	%rax, %r14
	call	calloc@PLT
	movq	%r14, -8(%r13)
	movq	%rax, (%r14)
	movq	$0, 8(%r14)
	movl	%ebx, 16(%r14)
	cmpq	%rbp, %r13
	jne	.L16
	movl	(%rsp), %ebx
	movl	4(%rsp), %r13d
	movq	8(%rsp), %rbp
.L17:
	movq	0(%rbp), %rcx
	xorl	%r14d, %r14d
	movslq	12(%rcx), %rdx
	movq	%rdx, %rax
	salq	$4, %rdx
	addq	(%rcx), %rdx
	addl	$1, %eax
	movq	$0, (%rdx)
	movl	%ebx, 8(%rdx)
	cltd
	idivl	16(%rcx)
	movl	%edx, 12(%rcx)
	testl	%ebx, %ebx
	jle	.L15
	movl	$1, %r8d
	subl	32(%rsp), %r8d
	movl	$1, %r12d
	xorl	%r14d, %r14d
	leal	(%rbx,%r8), %eax
	movl	%eax, 4(%rsp)
	.p2align 4,,10
	.p2align 3
.L26:
	movl	%r12d, %eax
	cmpl	%r12d, %r13d
	movl	%r12d, (%rsp)
	cmovle	%r13d, %eax
	testl	%eax, %eax
	jle	.L18
	movslq	%eax, %rbx
	.p2align 4,,10
	.p2align 3
.L25:
	movq	-8(%rbp,%rbx,8), %rdi
	movslq	8(%rdi), %rax
	movq	(%rdi), %rsi
	movq	%rax, %rdx
	salq	$4, %rax
	addq	%rsi, %rax
	movq	(%rax), %rcx
	cmpl	%r8d, 8(%rax)
	jge	.L19
	movl	16(%rdi), %ecx
	.p2align 4,,10
	.p2align 3
.L20:
	leal	1(%rdx), %eax
	cltd
	idivl	%ecx
	movslq	%edx, %rax
	salq	$4, %rax
	addq	%rsi, %rax
	cmpl	%r8d, 8(%rax)
	jl	.L20
	movl	%edx, 8(%rdi)
	movq	(%rax), %rcx
.L19:
	movslq	(%r15,%r12,4), %rsi
	imulq	%rbx, %rsi
	addq	%rcx, %rsi
	cmpl	%ebx, %r13d
	je	.L21
	movq	0(%rbp,%rbx,8), %r10
	movl	8(%r10), %r9d
	movl	12(%r10), %edx
	movq	(%r10), %r11
	movl	16(%r10), %ecx
	cmpl	%r9d, %edx
	jne	.L22
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L38:
	movl	%edx, 12(%r10)
	cmpl	%r9d, %edx
	je	.L23
.L22:
	leal	-1(%rdx,%rcx), %eax
	movl	%edx, %edi
	cltd
	idivl	%ecx
	movslq	%edx, %rax
	salq	$4, %rax
	cmpq	(%r11,%rax), %rsi
	jge	.L38
	movl	%edi, %r9d
.L23:
	movslq	%r9d, %rax
	salq	$4, %rax
	addq	%rax, %r11
	movl	(%rsp), %eax
	movq	%rsi, (%r11)
	movl	%eax, 8(%r11)
	leal	1(%r9), %eax
	cltd
	idivl	%ecx
	movl	%edx, 12(%r10)
.L24:
	subq	$1, %rbx
	testl	%ebx, %ebx
	jg	.L25
.L18:
	addq	$1, %r12
	addl	$1, %r8d
	cmpl	4(%rsp), %r8d
	jne	.L26
.L15:
	xorl	%eax, %eax
	movq	%r14, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L39
	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
.L21:
	.cfi_restore_state
	cmpq	%rsi, %r14
	cmovl	%rsi, %r14
	jmp	.L24
.L39:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE46:
	.size	run, .-run
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB47:
	.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
.LFE47:
	.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 MAX(a,b) ((a)>(b)?(a):(b))
#define MIN(a,b) ((a)<(b)?(a):(b))

typedef struct indexVal{
  int64 val;
  int index;
} node;

typedef struct deque{
  node *a;
  int front;
  int last;
  int len;
} deque;

deque* newDeque(int len){
  deque *d=(deque *)calloc(1,sizeof(deque));
  d->a=(node *)calloc(len,sizeof(node));
  d->front=d->last=0;
  d->len=len;
  return d;
}

void push_back(deque *d,node v){
  d->a[d->last++]=v;
  d->last%=d->len;
}

node pop_front(deque *d){
  node t=d->a[d->front++];
  d->front%=d->len;
  return t;
}

node pop_back(deque *d){
  d->last=(d->last+d->len-1)%d->len;
  return d->a[d->last];
}

node get_front(deque *d){
  return d->a[d->front];
}

node get_back(deque *d){
  return d->a[(d->last+d->len-1)%d->len];
}

int isEmpty(deque *d){
  return d->front==d->last;
}

#define POS(i,j) ((i)*(k+1)+(j))

void run(void){
  int n,m,k;
  scanf("%d%d%d",&n,&m,&k);
  int *a=(int *)calloc(n+1,sizeof(int));
  int i;
  for(i=1;i<=n;i++) scanf("%d",a+i);
  deque **deq=(deque **)calloc(k,sizeof(deque *));
  for(i=0;i<k;i++) deq[i]=newDeque(m+1);
  push_back(deq[0],(node){0,n});
  int64 ans=0;
  for(i=1;i<=n;i++){
    for(int j=MIN(k,i);j>=1;j--){
      node t=get_front(deq[j-1]);
      while(t.index<i-m){
	pop_front(deq[j-1]);
	t=get_front(deq[j-1]);
      }
      int64 local=(int64)j*a[i]+t.val;
      if(j==k){
	ans=MAX(ans,local);
      } else {
	while(!isEmpty(deq[j])){
	  node t=get_back(deq[j]);
	  if(t.val>local) break;
	  pop_back(deq[j]);
	}
	push_back(deq[j],(node){local,i});
      }
    }
  }
  printf("%lld\n",ans);
}

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

5 2 3
10 2 11 10 2
 10 3 5
0 7 2 6 9 4 8 5 1 1000000000
 5 5 2
1 2 10 5 9
 10 3 5
0 7 2 6 9 4 2 5 1 1000000000
 5 5 2
1 2 5 5 9
 5 2 2
10 2 11 10 1
 5 2 2
5 2 11 10 1
 5 5 2
2 2 5 8 9
 5 2 2
5 2 11 6 1
 5 5 2
2 2 5 8 6

62
 5000000078
 28
 5000000066
 23
 32
 31
 26
 27
 21

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 MAX(a,b) ((a)>(b)?(a):(b))
#define MIN(a,b) ((a)<(b)?(a):(b))

typedef struct indexVal{
  int64 val;
  int index;
} node;

typedef struct deque{
  node *a;
  int front;
  int last;
  int len;
} deque;

deque* newDeque(int len){
  deque *d=(deque *)calloc(1,sizeof(deque));
  d->a=(node *)calloc(len,sizeof(node));
  d->front=d->last=0;
  d->len=len;
  return d;
}

void push_back(deque *d,node v){
  d->a[d->last++]=v;
  d->last%=d->len;
}

node pop_front(deque *d){
  node t=d->a[d->front++];
  d->front%=d->len;
  return t;
}

node pop_back(deque *d){
  d->last=(d->last+d->len-1)%d->len;
  return d->a[d->last];
}

node get_front(deque *d){
  return d->a[d->front];
}

node get_back(deque *d){
  return d->a[(d->last+d->len-1)%d->len];
}

int isEmpty(deque *d){
  return d->front==d->last;
}

#define POS(i,j) ((i)*(k+1)+(j))

void run(void){
  int n,m,k;
  scanf("%d%d%d",&n,&m,&k);
  int *a=(int *)calloc(n+1,sizeof(int));
  int i;
  for(i=1;i<=n;i++) scanf("%d",a+i);
  deque **deq=(deque **)calloc(k,sizeof(deque *));
  for(i=0;i<k;i++) deq[i]=newDeque(m+1);
  push_back(deq[0],(node){0,n});
  int64 ans=0;
  for(i=1;i<=n;i++){
    for(int j=MIN(k,i);j>=1;j--){
      node t=get_front(deq[j-1]);
      while(t.index<i-m){
	pop_front(deq[j-1]);
	t=get_front(deq[j-1]);
      }
      int64 local=(int64)j*a[i]+t.val;
      if(j==k){
	ans=MAX(ans,local);
      } else {
	while(!isEmpty(deq[j])){
	  node t=get_back(deq[j]);
	  if(t.val>local) break;
	  pop_back(deq[j]);
	}
	push_back(deq[j],(node){local,i});
      }
    }
  }
  printf("%lld\n",ans);
}

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

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	newDeque
	.type	newDeque, @function
newDeque:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	$24, %esi
	movl	$1, %edi
	call	calloc@PLT
	movq	%rax, -8(%rbp)
	movl	-20(%rbp), %eax
	cltq
	movl	$16, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-8(%rbp), %rax
	movl	$0, 12(%rax)
	movq	-8(%rbp), %rax
	movl	12(%rax), %edx
	movq	-8(%rbp), %rax
	movl	%edx, 8(%rax)
	movq	-8(%rbp), %rax
	movl	-20(%rbp), %edx
	movl	%edx, 16(%rax)
	movq	-8(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	newDeque, .-newDeque
	.globl	push_back
	.type	push_back, @function
push_back:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rdx, %rcx
	movq	%rsi, %rax
	movq	%rdi, %rdx
	movq	%rcx, %rdx
	movq	%rax, -32(%rbp)
	movq	%rdx, -24(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rsi
	movq	-8(%rbp), %rax
	movl	12(%rax), %eax
	leal	1(%rax), %ecx
	movq	-8(%rbp), %rdx
	movl	%ecx, 12(%rdx)
	cltq
	salq	$4, %rax
	leaq	(%rsi,%rax), %rcx
	movq	-32(%rbp), %rax
	movq	-24(%rbp), %rdx
	movq	%rax, (%rcx)
	movq	%rdx, 8(%rcx)
	movq	-8(%rbp), %rax
	movl	12(%rax), %eax
	movq	-8(%rbp), %rdx
	movl	16(%rdx), %ecx
	cltd
	idivl	%ecx
	movq	-8(%rbp), %rax
	movl	%edx, 12(%rax)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	push_back, .-push_back
	.globl	pop_front
	.type	pop_front, @function
pop_front:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rsi
	movq	-24(%rbp), %rax
	movl	8(%rax), %eax
	leal	1(%rax), %ecx
	movq	-24(%rbp), %rdx
	movl	%ecx, 8(%rdx)
	cltq
	salq	$4, %rax
	addq	%rsi, %rax
	movq	8(%rax), %rdx
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	movq	%rdx, -8(%rbp)
	movq	-24(%rbp), %rax
	movl	8(%rax), %eax
	movq	-24(%rbp), %rdx
	movl	16(%rdx), %ecx
	cltd
	idivl	%ecx
	movq	-24(%rbp), %rax
	movl	%edx, 8(%rax)
	movq	-16(%rbp), %rax
	movq	-8(%rbp), %rdx
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	pop_front, .-pop_front
	.globl	pop_back
	.type	pop_back, @function
pop_back:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	12(%rax), %edx
	movq	-8(%rbp), %rax
	movl	16(%rax), %eax
	addl	%edx, %eax
	leal	-1(%rax), %edx
	movq	-8(%rbp), %rax
	movl	16(%rax), %ecx
	movl	%edx, %eax
	cltd
	idivl	%ecx
	movq	-8(%rbp), %rax
	movl	%edx, 12(%rax)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-8(%rbp), %rax
	movl	12(%rax), %eax
	cltq
	salq	$4, %rax
	addq	%rdx, %rax
	movq	8(%rax), %rdx
	movq	(%rax), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	pop_back, .-pop_back
	.globl	get_front
	.type	get_front, @function
get_front:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-8(%rbp), %rax
	movl	8(%rax), %eax
	cltq
	salq	$4, %rax
	addq	%rdx, %rax
	movq	8(%rax), %rdx
	movq	(%rax), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	get_front, .-get_front
	.globl	get_back
	.type	get_back, @function
get_back:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rsi
	movq	-8(%rbp), %rax
	movl	12(%rax), %edx
	movq	-8(%rbp), %rax
	movl	16(%rax), %eax
	addl	%edx, %eax
	leal	-1(%rax), %edx
	movq	-8(%rbp), %rax
	movl	16(%rax), %ecx
	movl	%edx, %eax
	cltd
	idivl	%ecx
	movl	%edx, %eax
	cltq
	salq	$4, %rax
	addq	%rsi, %rax
	movq	8(%rax), %rdx
	movq	(%rax), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	get_back, .-get_back
	.globl	isEmpty
	.type	isEmpty, @function
isEmpty:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	8(%rax), %edx
	movq	-8(%rbp), %rax
	movl	12(%rax), %eax
	cmpl	%eax, %edx
	sete	%al
	movzbl	%al, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	isEmpty, .-isEmpty
	.section	.rodata
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.text
	.globl	run
	.type	run, @function
run:
.LFB13:
	.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
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	leaq	-140(%rbp), %rcx
	leaq	-144(%rbp), %rdx
	leaq	-148(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-148(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	$4, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, -120(%rbp)
	movl	$1, -136(%rbp)
	jmp	.L15
.L16:
	movl	-136(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-120(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -136(%rbp)
.L15:
	movl	-148(%rbp), %eax
	cmpl	%eax, -136(%rbp)
	jle	.L16
	movl	-140(%rbp), %eax
	cltq
	movl	$8, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, -112(%rbp)
	movl	$0, -136(%rbp)
	jmp	.L17
.L18:
	movl	-144(%rbp), %eax
	addl	$1, %eax
	movl	-136(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-112(%rbp), %rdx
	leaq	(%rcx,%rdx), %rbx
	movl	%eax, %edi
	call	newDeque
	movq	%rax, (%rbx)
	addl	$1, -136(%rbp)
.L17:
	movl	-140(%rbp), %eax
	cmpl	%eax, -136(%rbp)
	jl	.L18
	movl	$0, %r14d
	movl	-148(%rbp), %eax
	movl	%eax, %edx
	movq	%r15, %rcx
	movabsq	$-4294967296, %rax
	andq	%rcx, %rax
	orq	%rdx, %rax
	movq	%rax, %r15
	movq	-112(%rbp), %rax
	movq	(%rax), %rax
	movq	%r14, %rsi
	movq	%r15, %rdi
	movq	%r14, %rcx
	movq	%r15, %rbx
	movq	%rbx, %rdx
	movq	%rax, %rdi
	call	push_back
	movq	$0, -128(%rbp)
	movl	$1, -136(%rbp)
	jmp	.L19
.L30:
	movl	-140(%rbp), %eax
	movl	-136(%rbp), %edx
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, -132(%rbp)
	jmp	.L20
.L29:
	movl	-132(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rdx
	movq	-112(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	get_front
	movq	%rax, -96(%rbp)
	movq	%rdx, -88(%rbp)
	jmp	.L21
.L22:
	movl	-132(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rdx
	movq	-112(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	pop_front
	movl	-132(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rdx
	movq	-112(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	get_front
	movq	%rax, -96(%rbp)
	movq	%rdx, -88(%rbp)
.L21:
	movl	-88(%rbp), %eax
	movl	-144(%rbp), %ecx
	movl	-136(%rbp), %edx
	subl	%ecx, %edx
	cmpl	%edx, %eax
	jl	.L22
	movl	-132(%rbp), %eax
	movslq	%eax, %rdx
	movl	-136(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-120(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cltq
	imulq	%rax, %rdx
	movq	-96(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, -104(%rbp)
	movl	-140(%rbp), %eax
	cmpl	%eax, -132(%rbp)
	jne	.L25
	movq	-128(%rbp), %rdx
	movq	-104(%rbp), %rax
	cmpq	%rax, %rdx
	cmovge	%rdx, %rax
	movq	%rax, -128(%rbp)
	jmp	.L24
.L28:
	movl	-132(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-112(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	get_back
	movq	%rax, -80(%rbp)
	movq	%rdx, -72(%rbp)
	movq	-80(%rbp), %rax
	cmpq	%rax, -104(%rbp)
	jl	.L32
	movl	-132(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-112(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	pop_back
.L25:
	movl	-132(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-112(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	isEmpty
	testl	%eax, %eax
	je	.L28
	jmp	.L27
.L32:
	nop
.L27:
	movq	-104(%rbp), %r12
	movl	-136(%rbp), %eax
	movq	%r13, %rcx
	movabsq	$-4294967296, %rdx
	andq	%rcx, %rdx
	orq	%rdx, %rax
	movq	%rax, %r13
	movl	-132(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-112(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%r12, %rsi
	movq	%r13, %rdi
	movq	%r12, %rcx
	movq	%r13, %rbx
	movq	%rbx, %rdx
	movq	%rax, %rdi
	call	push_back
.L24:
	subl	$1, -132(%rbp)
.L20:
	cmpl	$0, -132(%rbp)
	jg	.L29
	addl	$1, -136(%rbp)
.L19:
	movl	-148(%rbp), %eax
	cmpl	%eax, -136(%rbp)
	jle	.L30
	movq	-128(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	run, .-run
	.globl	main
	.type	main, @function
main:
.LFB14:
	.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
.LFE14:
	.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	newDeque
	.type	newDeque, @function
newDeque:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	$24, %esi
	movl	$1, %edi
	call	calloc@PLT
	movq	%rax, -8(%rbp)
	movl	-20(%rbp), %eax
	cltq
	movl	$16, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-8(%rbp), %rax
	movl	$0, 12(%rax)
	movq	-8(%rbp), %rax
	movl	12(%rax), %edx
	movq	-8(%rbp), %rax
	movl	%edx, 8(%rax)
	movq	-8(%rbp), %rax
	movl	-20(%rbp), %edx
	movl	%edx, 16(%rax)
	movq	-8(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	newDeque, .-newDeque
	.globl	push_back
	.type	push_back, @function
push_back:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rdx, %rcx
	movq	%rsi, %rax
	movq	%rdi, %rdx
	movq	%rcx, %rdx
	movq	%rax, -32(%rbp)
	movq	%rdx, -24(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rsi
	movq	-8(%rbp), %rax
	movl	12(%rax), %eax
	leal	1(%rax), %ecx
	movq	-8(%rbp), %rdx
	movl	%ecx, 12(%rdx)
	cltq
	salq	$4, %rax
	leaq	(%rsi,%rax), %rcx
	movq	-32(%rbp), %rax
	movq	-24(%rbp), %rdx
	movq	%rax, (%rcx)
	movq	%rdx, 8(%rcx)
	movq	-8(%rbp), %rax
	movl	12(%rax), %eax
	movq	-8(%rbp), %rdx
	movl	16(%rdx), %ecx
	cltd
	idivl	%ecx
	movq	-8(%rbp), %rax
	movl	%edx, 12(%rax)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	push_back, .-push_back
	.globl	pop_front
	.type	pop_front, @function
pop_front:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rsi
	movq	-24(%rbp), %rax
	movl	8(%rax), %eax
	leal	1(%rax), %ecx
	movq	-24(%rbp), %rdx
	movl	%ecx, 8(%rdx)
	cltq
	salq	$4, %rax
	addq	%rsi, %rax
	movq	8(%rax), %rdx
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	movq	%rdx, -8(%rbp)
	movq	-24(%rbp), %rax
	movl	8(%rax), %eax
	movq	-24(%rbp), %rdx
	movl	16(%rdx), %ecx
	cltd
	idivl	%ecx
	movq	-24(%rbp), %rax
	movl	%edx, 8(%rax)
	movq	-16(%rbp), %rax
	movq	-8(%rbp), %rdx
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	pop_front, .-pop_front
	.globl	pop_back
	.type	pop_back, @function
pop_back:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	12(%rax), %edx
	movq	-8(%rbp), %rax
	movl	16(%rax), %eax
	addl	%edx, %eax
	leal	-1(%rax), %edx
	movq	-8(%rbp), %rax
	movl	16(%rax), %ecx
	movl	%edx, %eax
	cltd
	idivl	%ecx
	movq	-8(%rbp), %rax
	movl	%edx, 12(%rax)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-8(%rbp), %rax
	movl	12(%rax), %eax
	cltq
	salq	$4, %rax
	addq	%rdx, %rax
	movq	8(%rax), %rdx
	movq	(%rax), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	pop_back, .-pop_back
	.globl	get_front
	.type	get_front, @function
get_front:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-8(%rbp), %rax
	movl	8(%rax), %eax
	cltq
	salq	$4, %rax
	addq	%rdx, %rax
	movq	8(%rax), %rdx
	movq	(%rax), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	get_front, .-get_front
	.globl	get_back
	.type	get_back, @function
get_back:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rsi
	movq	-8(%rbp), %rax
	movl	12(%rax), %edx
	movq	-8(%rbp), %rax
	movl	16(%rax), %eax
	addl	%edx, %eax
	leal	-1(%rax), %edx
	movq	-8(%rbp), %rax
	movl	16(%rax), %ecx
	movl	%edx, %eax
	cltd
	idivl	%ecx
	movl	%edx, %eax
	cltq
	salq	$4, %rax
	addq	%rsi, %rax
	movq	8(%rax), %rdx
	movq	(%rax), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	get_back, .-get_back
	.globl	isEmpty
	.type	isEmpty, @function
isEmpty:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	8(%rax), %edx
	movq	-8(%rbp), %rax
	movl	12(%rax), %eax
	cmpl	%eax, %edx
	sete	%al
	movzbl	%al, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	isEmpty, .-isEmpty
	.section	.rodata
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%lld\n"
	.text
	.globl	run
	.type	run, @function
run:
.LFB13:
	.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
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	leaq	-140(%rbp), %rcx
	leaq	-144(%rbp), %rdx
	leaq	-148(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-148(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	$4, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, -120(%rbp)
	movl	$1, -136(%rbp)
	jmp	.L15
.L16:
	movl	-136(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-120(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -136(%rbp)
.L15:
	movl	-148(%rbp), %eax
	cmpl	%eax, -136(%rbp)
	jle	.L16
	movl	-140(%rbp), %eax
	cltq
	movl	$8, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, -112(%rbp)
	movl	$0, -136(%rbp)
	jmp	.L17
.L18:
	movl	-144(%rbp), %eax
	addl	$1, %eax
	movl	-136(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	movq	-112(%rbp), %rdx
	leaq	(%rcx,%rdx), %rbx
	movl	%eax, %edi
	call	newDeque
	movq	%rax, (%rbx)
	addl	$1, -136(%rbp)
.L17:
	movl	-140(%rbp), %eax
	cmpl	%eax, -136(%rbp)
	jl	.L18
	movl	$0, %r14d
	movl	-148(%rbp), %eax
	movl	%eax, %edx
	movq	%r15, %rcx
	movabsq	$-4294967296, %rax
	andq	%rcx, %rax
	orq	%rdx, %rax
	movq	%rax, %r15
	movq	-112(%rbp), %rax
	movq	(%rax), %rax
	movq	%r14, %rsi
	movq	%r15, %rdi
	movq	%r14, %rcx
	movq	%r15, %rbx
	movq	%rbx, %rdx
	movq	%rax, %rdi
	call	push_back
	movq	$0, -128(%rbp)
	movl	$1, -136(%rbp)
	jmp	.L19
.L30:
	movl	-140(%rbp), %eax
	movl	-136(%rbp), %edx
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, -132(%rbp)
	jmp	.L20
.L29:
	movl	-132(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rdx
	movq	-112(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	get_front
	movq	%rax, -96(%rbp)
	movq	%rdx, -88(%rbp)
	jmp	.L21
.L22:
	movl	-132(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rdx
	movq	-112(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	pop_front
	movl	-132(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rdx
	movq	-112(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	get_front
	movq	%rax, -96(%rbp)
	movq	%rdx, -88(%rbp)
.L21:
	movl	-88(%rbp), %eax
	movl	-144(%rbp), %ecx
	movl	-136(%rbp), %edx
	subl	%ecx, %edx
	cmpl	%edx, %eax
	jl	.L22
	movl	-132(%rbp), %eax
	movslq	%eax, %rdx
	movl	-136(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	movq	-120(%rbp), %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	cltq
	imulq	%rax, %rdx
	movq	-96(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, -104(%rbp)
	movl	-140(%rbp), %eax
	cmpl	%eax, -132(%rbp)
	jne	.L25
	movq	-128(%rbp), %rdx
	movq	-104(%rbp), %rax
	cmpq	%rax, %rdx
	cmovge	%rdx, %rax
	movq	%rax, -128(%rbp)
	jmp	.L24
.L28:
	movl	-132(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-112(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	get_back
	movq	%rax, -80(%rbp)
	movq	%rdx, -72(%rbp)
	movq	-80(%rbp), %rax
	cmpq	%rax, -104(%rbp)
	jl	.L32
	movl	-132(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-112(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	pop_back
.L25:
	movl	-132(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-112(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	isEmpty
	testl	%eax, %eax
	je	.L28
	jmp	.L27
.L32:
	nop
.L27:
	movq	-104(%rbp), %r12
	movl	-136(%rbp), %eax
	movq	%r13, %rcx
	movabsq	$-4294967296, %rdx
	andq	%rcx, %rdx
	orq	%rdx, %rax
	movq	%rax, %r13
	movl	-132(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-112(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%r12, %rsi
	movq	%r13, %rdi
	movq	%r12, %rcx
	movq	%r13, %rbx
	movq	%rbx, %rdx
	movq	%rax, %rdi
	call	push_back
.L24:
	subl	$1, -132(%rbp)
.L20:
	cmpl	$0, -132(%rbp)
	jg	.L29
	addl	$1, -136(%rbp)
.L19:
	movl	-148(%rbp), %eax
	cmpl	%eax, -136(%rbp)
	jle	.L30
	movq	-128(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	run, .-run
	.globl	main
	.type	main, @function
main:
.LFB14:
	.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
.LFE14:
	.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:
