Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
#define ck 26

int d;
int c[32];
int s[512][32];
int res[512];

int eval(){
  int i,j,lc[32],r=0;
  for(i=1;i<=ck;i++){lc[i]=-1;}
  for(i=0;i<d;i++){
    r+=s[i][res[i]];
    lc[res[i]]=i;
    for(j=1;j<=ck;j++){
      r-=c[j]*(i-lc[j]);
    }
  }
  return r;
}

int sum(int x){
  return (x*(x+1))/2;
}

int delq(int tg,int x){
  int r,i;
  int bfb=-1,bff=d,afb=-1,aff=d;
  r=s[tg][x]-s[tg][res[tg]];

  for(i=tg-1;i>=0;i--){
    if(res[i]==res[tg]){bfb=i;break;}
  }
  for(i=tg+1;i<d;i++){
    if(res[i]==res[tg]){bff=i;break;}
  }

  for(i=tg-1;i>=0;i--){
    if(res[i]==x){afb=i;break;}
  }
  for(i=tg+1;i<d;i++){
    if(res[i]==x){aff=i;break;}
  }
  
  r+=c[res[tg]]*sum((tg-bfb)-1);
  r+=c[res[tg]]*sum((bff-tg)-1);
  r-=c[res[tg]]*sum((bff-bfb)-1);

  r-=c[x]*sum((tg-afb)-1);
  r-=c[x]*sum((aff-tg)-1);
  r+=c[x]*sum((aff-afb)-1);
  return r;
}

int main(){
  int i,j,q,r,tg,x;
  scanf("%d",&d);
  for(i=1;i<=ck;i++){scanf("%d",&c[i]);}
  for(i=0;i<d;i++){
    for(j=1;j<=ck;j++){
      scanf("%d",&s[i][j]);
    }
  }
  for(i=0;i<d;i++){
    scanf("%d",&res[i]);
  }
  r=eval();
  scanf("%d",&q);
  while(q>0){
    q--;
    scanf("%d%d",&tg,&x);
    tg--;
    r+=delq(tg,x);
    res[tg]=x;
    printf("%d\n",r);
  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	d
	.bss
	.align 4
	.type	d, @object
	.size	d, 4
d:
	.zero	4
	.globl	c
	.align 32
	.type	c, @object
	.size	c, 128
c:
	.zero	128
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 65536
s:
	.zero	65536
	.globl	res
	.align 32
	.type	res, @object
	.size	res, 2048
res:
	.zero	2048
	.text
	.globl	eval
	.type	eval, @function
eval:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$160, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -148(%rbp)
	movl	$1, -156(%rbp)
	jmp	.L2
.L3:
	movl	-156(%rbp), %eax
	cltq
	movl	$-1, -144(%rbp,%rax,4)
	addl	$1, -156(%rbp)
.L2:
	cmpl	$26, -156(%rbp)
	jle	.L3
	movl	$0, -156(%rbp)
	jmp	.L4
.L7:
	movl	-156(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	res(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	movl	-156(%rbp), %eax
	cltq
	salq	$5, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, -148(%rbp)
	movl	-156(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	res(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	movl	-156(%rbp), %edx
	movl	%edx, -144(%rbp,%rax,4)
	movl	$1, -152(%rbp)
	jmp	.L5
.L6:
	movl	-152(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-152(%rbp), %eax
	cltq
	movl	-144(%rbp,%rax,4), %ecx
	movl	-156(%rbp), %eax
	subl	%ecx, %eax
	imull	%edx, %eax
	subl	%eax, -148(%rbp)
	addl	$1, -152(%rbp)
.L5:
	cmpl	$26, -152(%rbp)
	jle	.L6
	addl	$1, -156(%rbp)
.L4:
	movl	d(%rip), %eax
	cmpl	%eax, -156(%rbp)
	jl	.L7
	movl	-148(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	eval, .-eval
	.globl	sum
	.type	sum, @function
sum:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	-4(%rbp), %eax
	addl	$1, %eax
	imull	-4(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	sum, .-sum
	.globl	delq
	.type	delq, @function
delq:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 3, -24
	movl	%edi, -44(%rbp)
	movl	%esi, -48(%rbp)
	movl	$-1, -28(%rbp)
	movl	d(%rip), %eax
	movl	%eax, -24(%rbp)
	movl	$-1, -20(%rbp)
	movl	d(%rip), %eax
	movl	%eax, -16(%rbp)
	movl	-48(%rbp), %eax
	movslq	%eax, %rdx
	movl	-44(%rbp), %eax
	cltq
	salq	$5, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-44(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	res(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%edx, %rcx
	movl	-44(%rbp), %edx
	movslq	%edx, %rdx
	salq	$5, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	s(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	-44(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -32(%rbp)
	jmp	.L13
.L16:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	res(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	res(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L14
	movl	-32(%rbp), %eax
	movl	%eax, -28(%rbp)
	jmp	.L15
.L14:
	subl	$1, -32(%rbp)
.L13:
	cmpl	$0, -32(%rbp)
	jns	.L16
.L15:
	movl	-44(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -32(%rbp)
	jmp	.L17
.L20:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	res(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	res(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L18
	movl	-32(%rbp), %eax
	movl	%eax, -24(%rbp)
	jmp	.L19
.L18:
	addl	$1, -32(%rbp)
.L17:
	movl	d(%rip), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L20
.L19:
	movl	-44(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -32(%rbp)
	jmp	.L21
.L24:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	res(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -48(%rbp)
	jne	.L22
	movl	-32(%rbp), %eax
	movl	%eax, -20(%rbp)
	jmp	.L23
.L22:
	subl	$1, -32(%rbp)
.L21:
	cmpl	$0, -32(%rbp)
	jns	.L24
.L23:
	movl	-44(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -32(%rbp)
	jmp	.L25
.L28:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	res(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -48(%rbp)
	jne	.L26
	movl	-32(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L27
.L26:
	addl	$1, -32(%rbp)
.L25:
	movl	d(%rip), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L28
.L27:
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	res(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %ebx
	movl	-44(%rbp), %eax
	subl	-28(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %edi
	call	sum
	imull	%ebx, %eax
	addl	%eax, -12(%rbp)
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	res(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %ebx
	movl	-24(%rbp), %eax
	subl	-44(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %edi
	call	sum
	imull	%ebx, %eax
	addl	%eax, -12(%rbp)
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	res(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %ebx
	movl	-24(%rbp), %eax
	subl	-28(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %edi
	call	sum
	imull	%ebx, %eax
	subl	%eax, -12(%rbp)
	movl	-48(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %ebx
	movl	-44(%rbp), %eax
	subl	-20(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %edi
	call	sum
	imull	%ebx, %eax
	subl	%eax, -12(%rbp)
	movl	-48(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %ebx
	movl	-16(%rbp), %eax
	subl	-44(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %edi
	call	sum
	imull	%ebx, %eax
	subl	%eax, -12(%rbp)
	movl	-48(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %ebx
	movl	-16(%rbp), %eax
	subl	-20(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %edi
	call	sum
	imull	%ebx, %eax
	addl	%eax, -12(%rbp)
	movl	-12(%rbp), %eax
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	delq, .-delq
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	d(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -20(%rbp)
	jmp	.L31
.L32:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -20(%rbp)
.L31:
	cmpl	$26, -20(%rbp)
	jle	.L32
	movl	$0, -20(%rbp)
	jmp	.L33
.L36:
	movl	$1, -16(%rbp)
	jmp	.L34
.L35:
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$5, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -16(%rbp)
.L34:
	cmpl	$26, -16(%rbp)
	jle	.L35
	addl	$1, -20(%rbp)
.L33:
	movl	d(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L36
	movl	$0, -20(%rbp)
	jmp	.L37
.L38:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	res(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -20(%rbp)
.L37:
	movl	d(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L38
	movl	$0, %eax
	call	eval
	movl	%eax, -12(%rbp)
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L39
.L40:
	movl	-32(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -32(%rbp)
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -28(%rbp)
	movl	-24(%rbp), %edx
	movl	-28(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	delq
	addl	%eax, -12(%rbp)
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	res(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L39:
	movl	-32(%rbp), %eax
	testl	%eax, %eax
	jg	.L40
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L42
	call	__stack_chk_fail@PLT
.L42:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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	eval
	.type	eval, @function
eval:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$168, %rsp
	.cfi_def_cfa_offset 176
	movslq	d(%rip), %rsi
	pcmpeqd	%xmm0, %xmm0
	movq	%fs:40, %rax
	movq	%rax, 152(%rsp)
	xorl	%eax, %eax
	movups	%xmm0, 20(%rsp)
	movq	$-1, 116(%rsp)
	movups	%xmm0, 36(%rsp)
	movups	%xmm0, 52(%rsp)
	movups	%xmm0, 68(%rsp)
	movups	%xmm0, 84(%rsp)
	movups	%xmm0, 100(%rsp)
	testl	%esi, %esi
	jle	.L5
	movdqu	4+c(%rip), %xmm9
	movdqu	84+c(%rip), %xmm4
	xorl	%ecx, %ecx
	leaq	res(%rip), %r8
	movdqu	20+c(%rip), %xmm8
	movdqu	36+c(%rip), %xmm7
	leaq	s(%rip), %rdi
	pxor	%xmm10, %xmm10
	movdqa	%xmm4, %xmm1
	movdqu	52+c(%rip), %xmm6
	movdqu	68+c(%rip), %xmm5
	movdqa	%xmm9, %xmm15
	movdqa	%xmm8, %xmm14
	movdqa	%xmm7, %xmm13
	movl	100+c(%rip), %r10d
	movl	104+c(%rip), %r9d
	movdqa	%xmm6, %xmm12
	psrlq	$32, %xmm1
	movdqa	%xmm5, %xmm11
	psrlq	$32, %xmm15
	psrlq	$32, %xmm14
	movaps	%xmm1, (%rsp)
	psrlq	$32, %xmm13
	psrlq	$32, %xmm12
	psrlq	$32, %xmm11
	.p2align 4,,10
	.p2align 3
.L3:
	movslq	(%r8,%rcx,4), %r11
	movd	%ecx, %xmm1
	movslq	%ecx, %rdx
	pshufd	$0, %xmm1, %xmm1
	salq	$5, %rdx
	movl	%ecx, 16(%rsp,%r11,4)
	movdqu	20(%rsp), %xmm3
	movdqa	%xmm1, %xmm0
	addq	%r11, %rdx
	addl	(%rdi,%rdx,4), %eax
	psubd	%xmm3, %xmm0
	movdqu	36(%rsp), %xmm3
	movdqa	%xmm0, %xmm2
	psrlq	$32, %xmm0
	pmuludq	%xmm9, %xmm2
	pmuludq	%xmm15, %xmm0
	pshufd	$8, %xmm2, %xmm2
	pshufd	$8, %xmm0, %xmm0
	punpckldq	%xmm0, %xmm2
	movdqa	%xmm10, %xmm0
	psubd	%xmm2, %xmm0
	movdqa	%xmm1, %xmm2
	psubd	%xmm3, %xmm2
	movdqa	%xmm2, %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm8, %xmm3
	pmuludq	%xmm14, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	movdqa	%xmm1, %xmm2
	psubd	%xmm3, %xmm0
	movdqu	52(%rsp), %xmm3
	psubd	%xmm3, %xmm2
	movdqa	%xmm2, %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm7, %xmm3
	pmuludq	%xmm13, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	movdqa	%xmm1, %xmm2
	psubd	%xmm3, %xmm0
	movdqu	68(%rsp), %xmm3
	psubd	%xmm3, %xmm2
	movdqa	%xmm2, %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm6, %xmm3
	pmuludq	%xmm12, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	movdqa	%xmm1, %xmm2
	psubd	%xmm3, %xmm0
	movdqu	84(%rsp), %xmm3
	psubd	%xmm3, %xmm2
	movdqa	%xmm2, %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm5, %xmm3
	pmuludq	%xmm11, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	psubd	%xmm3, %xmm0
	movdqu	100(%rsp), %xmm3
	psubd	%xmm3, %xmm1
	movdqa	%xmm1, %xmm2
	psrlq	$32, %xmm1
	pmuludq	(%rsp), %xmm1
	pshufd	$8, %xmm1, %xmm1
	pmuludq	%xmm4, %xmm2
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm1, %xmm2
	psubd	%xmm2, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
	addl	%edx, %eax
	movl	%ecx, %edx
	subl	116(%rsp), %edx
	imull	%r10d, %edx
	subl	%edx, %eax
	movl	%ecx, %edx
	subl	120(%rsp), %edx
	addq	$1, %rcx
	imull	%r9d, %edx
	subl	%edx, %eax
	cmpq	%rsi, %rcx
	jne	.L3
.L1:
	movq	152(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L9
	addq	$168, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L5:
	.cfi_restore_state
	xorl	%eax, %eax
	jmp	.L1
.L9:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	eval, .-eval
	.p2align 4
	.globl	sum
	.type	sum, @function
sum:
.LFB24:
	.cfi_startproc
	endbr64
	leal	1(%rdi), %edx
	imull	%edi, %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	ret
	.cfi_endproc
.LFE24:
	.size	sum, .-sum
	.p2align 4
	.globl	delq
	.type	delq, @function
delq:
.LFB25:
	.cfi_startproc
	endbr64
	movslq	%edi, %rax
	leaq	res(%rip), %rcx
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	s(%rip), %rdx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rax, %r10
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%r10d, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movslq	%esi, %rbp
	movl	d(%rip), %esi
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movslq	(%rcx,%rax,4), %rbx
	salq	$5, %rax
	movq	%rbp, %rdi
	leaq	(%rax,%rbp), %r9
	addq	%rbx, %rax
	movl	(%rdx,%r9,4), %r11d
	movq	%rbx, %r8
	subl	(%rdx,%rax,4), %r11d
	subl	$1, %r13d
	js	.L12
	movslq	%r13d, %rax
	movq	%rax, %rdx
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L35:
	subq	$1, %rdx
	testl	%edx, %edx
	js	.L34
.L14:
	movl	%edx, %r9d
	cmpl	(%rcx,%rdx,4), %r8d
	jne	.L35
.L13:
	leal	1(%r10), %r12d
	movl	%esi, %edx
	cmpl	%r12d, %esi
	jle	.L18
.L24:
	movslq	%r12d, %r14
	movq	%r14, %rax
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L37:
	addq	$1, %rax
	cmpl	%eax, %esi
	jle	.L36
.L16:
	movl	%eax, %edx
	cmpl	(%rcx,%rax,4), %r8d
	jne	.L37
	movslq	%r13d, %rax
	testl	%r13d, %r13d
	jns	.L18
.L41:
	movl	%r10d, %r15d
	movl	%r12d, %r13d
	movl	$-1, %r8d
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L39:
	subq	$1, %rax
	testl	%eax, %eax
	js	.L38
.L18:
	movl	%eax, %r8d
	cmpl	%edi, (%rcx,%rax,4)
	jne	.L39
	movl	%r10d, %r13d
	subl	%eax, %r13d
	leal	-1(%r13), %r15d
.L19:
	cmpl	%r12d, %esi
	jle	.L20
	movslq	%r12d, %r14
.L23:
	movq	%r14, %rax
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L40:
	addq	$1, %rax
	cmpl	%eax, %esi
	jle	.L20
.L21:
	cmpl	%edi, (%rcx,%rax,4)
	jne	.L40
	movl	%eax, %esi
.L20:
	movl	%r10d, %eax
	imull	%r15d, %r13d
	leaq	c(%rip), %rdi
	subl	%r9d, %eax
	movl	(%rdi,%rbx,4), %ebx
	leal	-1(%rax), %ecx
	imull	%eax, %ecx
	movl	%ecx, %eax
	shrl	$31, %eax
	addl	%ecx, %eax
	movl	%edx, %ecx
	subl	%r9d, %edx
	sarl	%eax
	subl	%r10d, %ecx
	imull	%ebx, %eax
	addl	%r11d, %eax
	leal	-1(%rcx), %r11d
	imull	%ecx, %r11d
	movl	%r11d, %ecx
	shrl	$31, %ecx
	addl	%r11d, %ecx
	sarl	%ecx
	imull	%ebx, %ecx
	addl	%ecx, %eax
	movl	%edx, %ecx
	leal	-1(%rdx), %edx
	imull	%ecx, %edx
	movl	%edx, %ecx
	shrl	$31, %ecx
	addl	%edx, %ecx
	sarl	%ecx
	imull	%ebx, %ecx
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	subl	%ecx, %eax
	movl	(%rdi,%rbp,4), %ecx
	popq	%rbp
	.cfi_def_cfa_offset 40
	movl	%eax, %edx
	movl	%r13d, %eax
	popq	%r12
	.cfi_def_cfa_offset 32
	shrl	$31, %eax
	addl	%r13d, %eax
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	sarl	%eax
	popq	%r15
	.cfi_def_cfa_offset 8
	imull	%ecx, %eax
	subl	%eax, %edx
	movl	%esi, %eax
	subl	%r10d, %eax
	leal	-1(%rax), %edi
	imull	%eax, %edi
	movl	%edi, %eax
	shrl	$31, %eax
	addl	%edi, %eax
	sarl	%eax
	imull	%ecx, %eax
	subl	%r8d, %esi
	subl	%eax, %edx
	leal	-1(%rsi), %eax
	imull	%eax, %esi
	movl	%esi, %eax
	shrl	$31, %eax
	addl	%esi, %eax
	sarl	%eax
	imull	%ecx, %eax
	addl	%edx, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L36:
	.cfi_restore_state
	movl	%esi, %edx
	movslq	%r13d, %rax
	testl	%r13d, %r13d
	jns	.L18
	jmp	.L41
	.p2align 4,,10
	.p2align 3
.L38:
	movl	%r10d, %r15d
	movl	%r12d, %r13d
	movl	$-1, %r8d
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L34:
	movl	$-1, %r9d
	jmp	.L13
.L12:
	leal	1(%r10), %r12d
	movl	$-1, %r9d
	cmpl	%r12d, %esi
	jg	.L24
	movl	%r10d, %r15d
	movl	%r12d, %r13d
	movl	%esi, %edx
	movl	$-1, %r8d
	jmp	.L20
	.cfi_endproc
.LFE25:
	.size	delq, .-delq
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	d(%rip), %rsi
	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
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rbp, %rdi
	leaq	4+c(%rip), %rbx
	leaq	104(%rbx), %r12
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	.p2align 4,,10
	.p2align 3
.L43:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%r12, %rbx
	jne	.L43
	movl	d(%rip), %eax
	leaq	108+s(%rip), %r12
	xorl	%r13d, %r13d
	testl	%eax, %eax
	jle	.L49
	.p2align 4,,10
	.p2align 3
.L48:
	leaq	-104(%r12), %rbx
	.p2align 4,,10
	.p2align 3
.L47:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%rbx, %r12
	jne	.L47
	movl	d(%rip), %eax
	addq	$1, %r13
	subq	$-128, %r12
	cmpl	%r13d, %eax
	jg	.L48
	testl	%eax, %eax
	jle	.L49
	leaq	res(%rip), %r12
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L50:
	movq	%r12, %rsi
	xorl	%eax, %eax
	movq	%rbp, %rdi
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	addq	$4, %r12
	cmpl	%ebx, d(%rip)
	jg	.L50
.L49:
	xorl	%eax, %eax
	leaq	20(%rsp), %r14
	leaq	16(%rsp), %r13
	call	eval
	leaq	12(%rsp), %rsi
	movq	%rbp, %rdi
	leaq	.LC1(%rip), %r12
	movl	%eax, %ebx
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L46
	.p2align 4,,10
	.p2align 3
.L45:
	subl	$1, %eax
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	movl	%eax, 12(%rsp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %eax
	movl	20(%rsp), %r15d
	leal	-1(%rax), %ebp
	movl	%r15d, %esi
	movl	%ebp, %edi
	movl	%ebp, 16(%rsp)
	call	delq
	movslq	%ebp, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	addl	%eax, %ebx
	leaq	res(%rip), %rax
	movl	%r15d, (%rax,%rdx,4)
	movl	%ebx, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jg	.L45
.L46:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L62
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	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
.L62:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE26:
	.size	main, .-main
	.globl	res
	.bss
	.align 32
	.type	res, @object
	.size	res, 2048
res:
	.zero	2048
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 65536
s:
	.zero	65536
	.globl	c
	.align 32
	.type	c, @object
	.size	c, 128
c:
	.zero	128
	.globl	d
	.align 4
	.type	d, @object
	.size	d, 4
d:
	.zero	4
	.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	eval
	.type	eval, @function
eval:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$168, %rsp
	.cfi_def_cfa_offset 176
	movslq	d(%rip), %rsi
	pcmpeqd	%xmm0, %xmm0
	movq	%fs:40, %rax
	movq	%rax, 152(%rsp)
	xorl	%eax, %eax
	movups	%xmm0, 20(%rsp)
	movq	$-1, 116(%rsp)
	movups	%xmm0, 36(%rsp)
	movups	%xmm0, 52(%rsp)
	movups	%xmm0, 68(%rsp)
	movups	%xmm0, 84(%rsp)
	movups	%xmm0, 100(%rsp)
	testl	%esi, %esi
	jle	.L5
	movdqu	4+c(%rip), %xmm9
	movdqu	84+c(%rip), %xmm4
	xorl	%ecx, %ecx
	leaq	res(%rip), %r8
	movdqu	20+c(%rip), %xmm8
	movdqu	36+c(%rip), %xmm7
	leaq	s(%rip), %rdi
	pxor	%xmm10, %xmm10
	movdqa	%xmm4, %xmm1
	movdqu	52+c(%rip), %xmm6
	movdqu	68+c(%rip), %xmm5
	movdqa	%xmm9, %xmm15
	movdqa	%xmm8, %xmm14
	movdqa	%xmm7, %xmm13
	movl	100+c(%rip), %r10d
	movl	104+c(%rip), %r9d
	movdqa	%xmm6, %xmm12
	psrlq	$32, %xmm1
	movdqa	%xmm5, %xmm11
	psrlq	$32, %xmm15
	psrlq	$32, %xmm14
	movaps	%xmm1, (%rsp)
	psrlq	$32, %xmm13
	psrlq	$32, %xmm12
	psrlq	$32, %xmm11
	.p2align 4,,10
	.p2align 3
.L3:
	movslq	(%r8,%rcx,4), %r11
	movd	%ecx, %xmm1
	movslq	%ecx, %rdx
	pshufd	$0, %xmm1, %xmm1
	salq	$5, %rdx
	movl	%ecx, 16(%rsp,%r11,4)
	movdqu	20(%rsp), %xmm3
	movdqa	%xmm1, %xmm0
	addq	%r11, %rdx
	addl	(%rdi,%rdx,4), %eax
	psubd	%xmm3, %xmm0
	movdqu	36(%rsp), %xmm3
	movdqa	%xmm0, %xmm2
	psrlq	$32, %xmm0
	pmuludq	%xmm9, %xmm2
	pmuludq	%xmm15, %xmm0
	pshufd	$8, %xmm2, %xmm2
	pshufd	$8, %xmm0, %xmm0
	punpckldq	%xmm0, %xmm2
	movdqa	%xmm10, %xmm0
	psubd	%xmm2, %xmm0
	movdqa	%xmm1, %xmm2
	psubd	%xmm3, %xmm2
	movdqa	%xmm2, %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm8, %xmm3
	pmuludq	%xmm14, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	movdqa	%xmm1, %xmm2
	psubd	%xmm3, %xmm0
	movdqu	52(%rsp), %xmm3
	psubd	%xmm3, %xmm2
	movdqa	%xmm2, %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm7, %xmm3
	pmuludq	%xmm13, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	movdqa	%xmm1, %xmm2
	psubd	%xmm3, %xmm0
	movdqu	68(%rsp), %xmm3
	psubd	%xmm3, %xmm2
	movdqa	%xmm2, %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm6, %xmm3
	pmuludq	%xmm12, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	movdqa	%xmm1, %xmm2
	psubd	%xmm3, %xmm0
	movdqu	84(%rsp), %xmm3
	psubd	%xmm3, %xmm2
	movdqa	%xmm2, %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm5, %xmm3
	pmuludq	%xmm11, %xmm2
	pshufd	$8, %xmm3, %xmm3
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm2, %xmm3
	psubd	%xmm3, %xmm0
	movdqu	100(%rsp), %xmm3
	psubd	%xmm3, %xmm1
	movdqa	%xmm1, %xmm2
	psrlq	$32, %xmm1
	pmuludq	(%rsp), %xmm1
	pshufd	$8, %xmm1, %xmm1
	pmuludq	%xmm4, %xmm2
	pshufd	$8, %xmm2, %xmm2
	punpckldq	%xmm1, %xmm2
	psubd	%xmm2, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
	addl	%edx, %eax
	movl	%ecx, %edx
	subl	116(%rsp), %edx
	imull	%r10d, %edx
	subl	%edx, %eax
	movl	%ecx, %edx
	subl	120(%rsp), %edx
	addq	$1, %rcx
	imull	%r9d, %edx
	subl	%edx, %eax
	cmpq	%rsi, %rcx
	jne	.L3
.L1:
	movq	152(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L9
	addq	$168, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L5:
	.cfi_restore_state
	xorl	%eax, %eax
	jmp	.L1
.L9:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	eval, .-eval
	.p2align 4
	.globl	sum
	.type	sum, @function
sum:
.LFB24:
	.cfi_startproc
	endbr64
	leal	1(%rdi), %edx
	imull	%edi, %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	ret
	.cfi_endproc
.LFE24:
	.size	sum, .-sum
	.p2align 4
	.globl	delq
	.type	delq, @function
delq:
.LFB25:
	.cfi_startproc
	endbr64
	movslq	%edi, %rax
	leaq	res(%rip), %rcx
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	s(%rip), %rdx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rax, %r10
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%r10d, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movslq	%esi, %rbp
	movl	d(%rip), %esi
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movslq	(%rcx,%rax,4), %rbx
	salq	$5, %rax
	movq	%rbp, %rdi
	leaq	(%rax,%rbp), %r9
	addq	%rbx, %rax
	movl	(%rdx,%r9,4), %r11d
	movq	%rbx, %r8
	subl	(%rdx,%rax,4), %r11d
	subl	$1, %r13d
	js	.L12
	movslq	%r13d, %rax
	movq	%rax, %rdx
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L35:
	subq	$1, %rdx
	testl	%edx, %edx
	js	.L34
.L14:
	movl	%edx, %r9d
	cmpl	(%rcx,%rdx,4), %r8d
	jne	.L35
.L13:
	leal	1(%r10), %r12d
	movl	%esi, %edx
	cmpl	%r12d, %esi
	jle	.L18
.L24:
	movslq	%r12d, %r14
	movq	%r14, %rax
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L37:
	addq	$1, %rax
	cmpl	%eax, %esi
	jle	.L36
.L16:
	movl	%eax, %edx
	cmpl	(%rcx,%rax,4), %r8d
	jne	.L37
	movslq	%r13d, %rax
	testl	%r13d, %r13d
	jns	.L18
.L41:
	movl	%r10d, %r15d
	movl	%r12d, %r13d
	movl	$-1, %r8d
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L39:
	subq	$1, %rax
	testl	%eax, %eax
	js	.L38
.L18:
	movl	%eax, %r8d
	cmpl	%edi, (%rcx,%rax,4)
	jne	.L39
	movl	%r10d, %r13d
	subl	%eax, %r13d
	leal	-1(%r13), %r15d
.L19:
	cmpl	%r12d, %esi
	jle	.L20
	movslq	%r12d, %r14
.L23:
	movq	%r14, %rax
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L40:
	addq	$1, %rax
	cmpl	%eax, %esi
	jle	.L20
.L21:
	cmpl	%edi, (%rcx,%rax,4)
	jne	.L40
	movl	%eax, %esi
.L20:
	movl	%r10d, %eax
	imull	%r15d, %r13d
	leaq	c(%rip), %rdi
	subl	%r9d, %eax
	movl	(%rdi,%rbx,4), %ebx
	leal	-1(%rax), %ecx
	imull	%eax, %ecx
	movl	%ecx, %eax
	shrl	$31, %eax
	addl	%ecx, %eax
	movl	%edx, %ecx
	subl	%r9d, %edx
	sarl	%eax
	subl	%r10d, %ecx
	imull	%ebx, %eax
	addl	%r11d, %eax
	leal	-1(%rcx), %r11d
	imull	%ecx, %r11d
	movl	%r11d, %ecx
	shrl	$31, %ecx
	addl	%r11d, %ecx
	sarl	%ecx
	imull	%ebx, %ecx
	addl	%ecx, %eax
	movl	%edx, %ecx
	leal	-1(%rdx), %edx
	imull	%ecx, %edx
	movl	%edx, %ecx
	shrl	$31, %ecx
	addl	%edx, %ecx
	sarl	%ecx
	imull	%ebx, %ecx
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	subl	%ecx, %eax
	movl	(%rdi,%rbp,4), %ecx
	popq	%rbp
	.cfi_def_cfa_offset 40
	movl	%eax, %edx
	movl	%r13d, %eax
	popq	%r12
	.cfi_def_cfa_offset 32
	shrl	$31, %eax
	addl	%r13d, %eax
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	sarl	%eax
	popq	%r15
	.cfi_def_cfa_offset 8
	imull	%ecx, %eax
	subl	%eax, %edx
	movl	%esi, %eax
	subl	%r10d, %eax
	leal	-1(%rax), %edi
	imull	%eax, %edi
	movl	%edi, %eax
	shrl	$31, %eax
	addl	%edi, %eax
	sarl	%eax
	imull	%ecx, %eax
	subl	%r8d, %esi
	subl	%eax, %edx
	leal	-1(%rsi), %eax
	imull	%eax, %esi
	movl	%esi, %eax
	shrl	$31, %eax
	addl	%esi, %eax
	sarl	%eax
	imull	%ecx, %eax
	addl	%edx, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L36:
	.cfi_restore_state
	movl	%esi, %edx
	movslq	%r13d, %rax
	testl	%r13d, %r13d
	jns	.L18
	jmp	.L41
	.p2align 4,,10
	.p2align 3
.L38:
	movl	%r10d, %r15d
	movl	%r12d, %r13d
	movl	$-1, %r8d
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L34:
	movl	$-1, %r9d
	jmp	.L13
.L12:
	leal	1(%r10), %r12d
	movl	$-1, %r9d
	cmpl	%r12d, %esi
	jg	.L24
	movl	%r10d, %r15d
	movl	%r12d, %r13d
	movl	%esi, %edx
	movl	$-1, %r8d
	jmp	.L20
	.cfi_endproc
.LFE25:
	.size	delq, .-delq
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	d(%rip), %rsi
	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
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rbp, %rdi
	leaq	4+c(%rip), %rbx
	leaq	104(%rbx), %r12
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	.p2align 4,,10
	.p2align 3
.L43:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%r12, %rbx
	jne	.L43
	movl	d(%rip), %eax
	leaq	108+s(%rip), %r12
	xorl	%r13d, %r13d
	testl	%eax, %eax
	jle	.L49
	.p2align 4,,10
	.p2align 3
.L48:
	leaq	-104(%r12), %rbx
	.p2align 4,,10
	.p2align 3
.L47:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%rbx, %r12
	jne	.L47
	movl	d(%rip), %eax
	addq	$1, %r13
	subq	$-128, %r12
	cmpl	%r13d, %eax
	jg	.L48
	testl	%eax, %eax
	jle	.L49
	leaq	res(%rip), %r12
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L50:
	movq	%r12, %rsi
	xorl	%eax, %eax
	movq	%rbp, %rdi
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	addq	$4, %r12
	cmpl	%ebx, d(%rip)
	jg	.L50
.L49:
	xorl	%eax, %eax
	leaq	20(%rsp), %r14
	leaq	16(%rsp), %r13
	call	eval
	leaq	12(%rsp), %rsi
	movq	%rbp, %rdi
	leaq	.LC1(%rip), %r12
	movl	%eax, %ebx
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L46
	.p2align 4,,10
	.p2align 3
.L45:
	subl	$1, %eax
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	movl	%eax, 12(%rsp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %eax
	movl	20(%rsp), %r15d
	leal	-1(%rax), %ebp
	movl	%r15d, %esi
	movl	%ebp, %edi
	movl	%ebp, 16(%rsp)
	call	delq
	movslq	%ebp, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	addl	%eax, %ebx
	leaq	res(%rip), %rax
	movl	%r15d, (%rax,%rdx,4)
	movl	%ebx, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jg	.L45
.L46:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L62
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	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
.L62:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE26:
	.size	main, .-main
	.globl	res
	.bss
	.align 32
	.type	res, @object
	.size	res, 2048
res:
	.zero	2048
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 65536
s:
	.zero	65536
	.globl	c
	.align 32
	.type	c, @object
	.size	c, 128
c:
	.zero	128
	.globl	d
	.align 4
	.type	d, @object
	.size	d, 4
d:
	.zero	4
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include<stdio.h>
#define ck 26

int d;
int c[32];
int s[512][32];
int res[512];

int eval(){
  int i,j,lc[32],r=0;
  for(i=1;i<=ck;i++){lc[i]=-1;}
  for(i=0;i<d;i++){
    r+=s[i][res[i]];
    lc[res[i]]=i;
    for(j=1;j<=ck;j++){
      r-=c[j]*(i-lc[j]);
    }
  }
  return r;
}

int sum(int x){
  return (x*(x+1))/2;
}

int delq(int tg,int x){
  int r,i;
  int bfb=-1,bff=d,afb=-1,aff=d;
  r=s[tg][x]-s[tg][res[tg]];

  for(i=tg-1;i>=0;i--){
    if(res[i]==res[tg]){bfb=i;break;}
  }
  for(i=tg+1;i<d;i++){
    if(res[i]==res[tg]){bff=i;break;}
  }

  for(i=tg-1;i>=0;i--){
    if(res[i]==x){afb=i;break;}
  }
  for(i=tg+1;i<d;i++){
    if(res[i]==x){aff=i;break;}
  }
  
  r+=c[res[tg]]*sum((tg-bfb)-1);
  r+=c[res[tg]]*sum((bff-tg)-1);
  r-=c[res[tg]]*sum((bff-bfb)-1);

  r-=c[x]*sum((tg-afb)-1);
  r-=c[x]*sum((aff-tg)-1);
  r+=c[x]*sum((aff-afb)-1);
  return r;
}

int main(){
  int i,j,q,r,tg,x;
  scanf("%d",&d);
  for(i=1;i<=ck;i++){scanf("%d",&c[i]);}
  for(i=0;i<d;i++){
    for(j=1;j<=ck;j++){
      scanf("%d",&s[i][j]);
    }
  }
  for(i=0;i<d;i++){
    scanf("%d",&res[i]);
  }
  r=eval();
  scanf("%d",&q);
  while(q>0){
    q--;
    scanf("%d%d",&tg,&x);
    tg--;
    r+=delq(tg,x);
    res[tg]=x;
    printf("%d\n",r);
  }
  return 0;
}
5
86 90 69 51 2 96 71 47 88 34 45 46 89 34 31 38 97 84 41 80 14 4 50 83 7 82
19771 12979 18912 10432 10544 12928 13403 3047 10527 9740 8100 92 2856 14730 1396 15905 6534 4650 11469 3628 8433 2994 10899 16396 18355 11424
6674 17707 13855 16407 12232 2886 11908 1705 5000 1537 10440 10711 4917 10770 17272 15364 19277 18094 3929 3705 7169 6159 18683 15410 9092 4570
6878 4239 19925 1799 375 9563 3445 5658 19857 11401 6997 6498 19933 3848 2426 2146 19745 16880 17773 18359 3921 14172 16730 11157 5439 256
8633 15862 15303 10749 18499 7792 10317 5901 9395 11433 3514 3959 5202 19850 19469 9790 5653 784 18500 10552 17975 16615 7852 197 8471 7452
19855 17918 7990 10572 4333 438 9140 9104 12622 4985 12319 4028 19922 12132 16259 17476 2976 547 19195 19830 16285 4806 4471 9457 2864 2192
1
17
13
14
13
5
1 7
4 11
2 4
5 24
4 19
 5
86 90 69 51 2 96 71 47 88 34 45 46 89 34 31 38 97 84 41 80 14 4 50 83 7 82
19771 12979 18912 10432 10544 12928 13403 3047 10527 9740 8100 92 2856 14730 1396 15905 6534 4650 11469 3628 8433 2994 10899 16396 18355 11424
6674 17707 13855 8378 12232 2886 11908 1705 5000 1537 10440 10711 4917 10770 17272 15364 19277 18094 3929 3705 7169 6159 18683 15410 9092 4570
6878 4239 19925 1799 375 9563 3445 5658 19857 11401 6997 6498 19933 3848 2426 2146 19745 16880 17773 18359 3921 14172 16730 11157 5439 256
8633 15862 15303 10749 18499 7792 10317 5901 9395 11433 3514 3959 5202 19850 19469 9790 5653 784 18500 10552 17975 16615 7852 197 8471 7452
19855 17918 7990 10572 4333 438 9140 9104 12622 4985 12319 4028 19922 12132 16259 17476 2976 547 19195 19830 16285 4806 4471 9457 2864 2192
1
17
13
14
13
5
1 7
4 11
2 4
5 24
4 19
 5
86 90 69 51 2 96 71 47 88 34 45 46 89 34 31 38 27 84 41 80 14 4 50 83 7 82
19771 12979 18912 10432 10544 12928 13403 3047 10527 9740 8100 92 2856 14730 1396 15905 6534 4650 11469 3628 8433 2994 10899 16396 18355 11424
6674 17707 13855 8378 12232 2886 11908 1705 5000 1537 10440 10711 4917 10770 17272 15364 19277 18094 3929 3705 7169 6159 18683 15410 9092 4570
6878 4239 19925 1799 375 9563 3445 5658 19857 11401 6997 6498 19933 3848 2426 2146 19745 16880 17773 18359 3921 14172 16730 11157 5439 256
8633 15862 15303 10749 18499 7792 10317 5901 9395 11433 3514 3959 5202 19850 19469 9790 5653 784 18500 10552 17975 16615 7852 197 8471 7452
19855 17918 7990 10572 4333 438 9140 9104 12622 4985 12319 4028 19922 12132 16259 17476 2976 547 19195 19830 16285 4806 4471 9457 2864 2192
1
17
13
14
13
5
1 7
4 11
2 4
5 24
4 19
 5
85 90 69 51 2 96 71 47 88 34 45 46 89 34 31 38 27 84 41 80 14 4 50 83 7 82
19771 12979 18912 10432 10544 12928 13403 280 10527 9740 8100 92 2856 14730 1396 15905 6534 4650 11469 3628 8433 2994 10899 16396 18355 11424
6674 17707 13855 8378 12232 2886 11908 1705 5000 1537 10440 10711 4917 10770 17272 29875 19277 18094 3929 3705 7169 6159 18683 15410 9092 4570
6878 4239 19925 1799 396 9563 3445 5658 19857 11401 6997 6498 19933 3848 2426 1432 19745 16880 17773 18359 3921 14172 16730 11157 5439 256
8633 15862 15303 10749 18499 7792 10317 5901 9395 11433 3514 3959 5202 19850 19469 9790 5653 784 18500 10552 17975 16615 7852 197 8471 7452
19855 17918 7990 10572 4333 438 9140 9104 12622 4985 12319 4028 19922 12132 16259 17476 2976 547 19195 19830 16285 4806 4471 9457 2864 2192
2
17
13
14
13
5
1 7
4 11
2 4
5 24
4 19
 5
85 90 69 51 2 96 71 47 88 34 45 46 89 34 31 38 27 84 41 80 14 4 50 83 7 82
19771 12979 18912 10432 10544 12928 13403 280 10527 9740 8100 92 2856 14730 1396 15905 6534 4650 11469 3628 8433 2994 10899 16396 18355 11424
6674 17707 13855 8378 12232 2886 11908 1705 5000 1537 10440 10711 4917 10770 17272 29875 19277 18094 3929 3705 7169 6159 18683 15410 9092 4570
6878 4239 19925 1799 396 9563 3445 5658 19857 11401 6997 6498 19933 3848 2426 1432 19745 16880 17773 18359 3921 14172 16730 11157 5439 256
8633 15862 15303 10749 18499 7792 10317 5901 9395 11433 3514 3959 5202 19850 19469 9790 5653 784 18500 10552 17975 16615 7852 197 8471 7452
19855 17918 7990 10572 4333 438 9140 9104 12622 4985 12319 4028 19922 12132 16259 17476 2976 547 19195 19830 16285 4806 4471 9457 2864 2192
2
17
13
14
13
5
1 7
4 11
2 4
1 24
4 19
 5
86 90 69 51 2 96 71 47 88 34 45 46 89 34 31 38 97 84 41 80 14 4 50 83 7 82
19771 12979 18912 10432 10544 12928 13403 3047 10527 9740 8100 92 2856 14730 1396 15905 6534 4650 11469 3628 8433 2994 10899 16396 18355 11424
6674 17707 13855 16407 12232 2886 11908 1705 5000 1537 10440 10711 4917 10770 17272 15364 19277 18094 3929 3705 7169 6159 18683 15410 9092 4570
6878 4239 19925 1799 375 9563 3445 5658 19857 11401 6997 6498 19933 3848 2426 2146 19745 16880 17773 18359 3921 14172 16730 11157 5439 256
8633 15862 15303 10749 18499 7792 10317 5901 9395 11433 3514 3959 5202 19850 19469 9790 5653 784 18500 10552 17975 16615 7852 197 8471 7452
19855 17918 7990 10572 4333 438 9812 9104 12622 4985 12319 4028 19922 12132 16259 17476 2976 547 19195 19830 16285 4806 4471 9457 2864 2192
1
17
13
14
13
5
1 7
4 11
3 4
5 24
4 19
 5
86 90 69 51 2 96 71 47 88 34 45 46 89 34 31 38 27 84 41 80 14 4 50 83 7 82
19771 12979 18912 10432 10544 12928 13403 3047 10527 9740 8100 92 2856 14730 1396 15905 6534 4650 11469 3628 8433 2994 10899 16396 18355 11424
6674 17707 13855 8378 12232 2886 11908 1705 5000 1537 10440 10711 4917 10770 17272 15364 19277 18094 3929 3705 7169 6159 18683 15410 9092 4570
6878 4239 19925 1799 375 9563 3445 5658 19857 11401 6997 6498 19933 3848 2426 2146 19745 16880 17773 18359 3921 14172 16730 11157 5439 256
8633 15862 15303 10749 18499 7792 10317 5901 9395 11433 3514 3959 5202 19850 19469 9790 5653 784 18500 10552 17975 16615 7852 197 8471 7452
19855 17918 7990 10572 4333 438 9140 9104 12622 4985 12319 4028 19922 12132 16259 17476 2976 547 19195 19830 16285 4806 4471 9457 2864 2192
1
17
13
14
13
5
1 7
4 11
2 8
5 24
4 19
 5
86 90 69 51 2 96 71 47 88 34 45 46 89 34 31 38 27 84 41 80 14 4 50 83 2 82
19771 12979 18912 10432 10544 12928 13403 280 10527 9740 8100 92 2856 14730 1396 15905 6534 4650 11469 3628 8433 2994 10899 16396 18355 11424
6674 17707 13855 8378 12232 2886 11908 1705 5000 1537 10440 10711 4917 10770 17272 15364 19277 18094 3929 3705 7169 6159 18683 15410 9092 4570
6878 4239 19925 1799 396 9563 3445 5658 19857 11401 6997 6498 19933 3848 2426 2146 19745 16880 17773 18359 3921 14172 16730 11157 5439 256
8633 15862 15303 10749 18499 7792 10317 5901 9395 11433 3514 3959 5202 19850 19469 9790 5653 784 18500 10552 17975 16615 7852 197 8471 7452
19855 17918 7990 10572 4333 438 9140 9104 12622 4985 12319 4028 19922 12132 16259 17476 2976 547 19195 19830 16285 4806 4471 9457 2864 2192
2
17
13
14
13
5
1 7
4 11
2 4
5 24
4 19
 5
86 90 69 51 2 96 71 47 88 34 45 46 89 34 31 38 27 7 41 80 14 4 50 83 7 82
19771 12979 18912 10432 10544 12928 13403 280 10527 9740 8100 92 2856 14730 1396 15905 6534 4650 11469 3628 8433 2994 10899 16396 18355 11424
6674 17707 13855 8378 12232 2886 11908 1705 5000 1537 10440 10711 4917 10770 17272 29875 19277 18094 3929 3705 7169 6159 18683 15410 9092 4570
6878 4239 19925 1799 396 9563 3445 5658 19857 11401 6997 6498 19933 3848 2426 2146 19745 16880 17773 18359 3921 14172 16730 11157 5439 256
8633 15862 15303 10749 18499 7792 10317 5901 9395 11433 3514 3959 5202 19850 19469 9790 5653 784 18500 10552 17975 16615 7852 197 8471 7452
19855 17918 7990 10572 4333 438 9140 9104 12622 4985 12319 4028 19922 12132 16259 17476 2976 547 19195 19830 16285 4806 4471 9457 2864 2192
2
17
13
14
13
5
1 7
4 11
2 4
5 24
4 19
 5
85 90 135 51 2 96 71 47 88 34 45 46 89 34 31 38 27 84 41 80 14 4 50 83 7 82
19771 12979 18912 10432 10544 12928 13403 280 10527 9740 8100 92 2856 14730 1396 15905 6534 4650 11469 3628 8433 2994 10899 16396 18355 11424
6674 17707 13855 8378 12232 2886 11908 1705 5000 1537 10440 10711 4917 10770 17272 29875 19277 18094 3929 3705 7169 6159 18683 15410 9092 4570
6878 4239 19925 1799 396 9563 3445 5658 19857 11401 6997 6498 19933 3848 2426 1432 19745 16880 17773 18359 3921 14172 16730 11157 5439 256
8633 15862 15303 10749 18499 7792 10317 5901 9395 11433 3514 3959 5202 19850 19469 9790 5653 784 18500 10552 17975 16615 7852 197 8471 7452
19855 17918 7990 10572 4333 438 9140 9104 12622 4985 12319 4028 19922 12132 16259 17476 2976 547 19195 19830 16285 4806 4471 9457 2864 2192
2
17
13
14
13
5
1 7
4 11
2 4
1 24
4 19

72882
56634
53396
43168
58122
 72882
56634
45367
35139
50093
 73372
57124
46417
36189
51143
 73387
57139
46432
36204
51158
 73387
57139
46432
49485
64439
 72882
56634
38425
27930
42884
 73372
57124
39712
29484
44438
 73447
57199
46492
36264
51218
 74527
58279
47572
37344
52298
 72397
56149
45442
48495
63449

Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
#define ck 26

int d;
int c[32];
int s[512][32];
int res[512];

int eval(){
  int i,j,lc[32],r=0;
  for(i=1;i<=ck;i++){lc[i]=-1;}
  for(i=0;i<d;i++){
    r+=s[i][res[i]];
    lc[res[i]]=i;
    for(j=1;j<=ck;j++){
      r-=c[j]*(i-lc[j]);
    }
  }
  return r;
}

int sum(int x){
  return (x*(x+1))/2;
}

int delq(int tg,int x){
  int r,i;
  int bfb=-1,bff=d,afb=-1,aff=d;
  r=s[tg][x]-s[tg][res[tg]];

  for(i=tg-1;i>=0;i--){
    if(res[i]==res[tg]){bfb=i;break;}
  }
  for(i=tg+1;i<d;i++){
    if(res[i]==res[tg]){bff=i;break;}
  }

  for(i=tg-1;i>=0;i--){
    if(res[i]==x){afb=i;break;}
  }
  for(i=tg+1;i<d;i++){
    if(res[i]==x){aff=i;break;}
  }
  
  r+=c[res[tg]]*sum((tg-bfb)-1);
  r+=c[res[tg]]*sum((bff-tg)-1);
  r-=c[res[tg]]*sum((bff-bfb)-1);

  r-=c[x]*sum((tg-afb)-1);
  r-=c[x]*sum((aff-tg)-1);
  r+=c[x]*sum((aff-afb)-1);
  return r;
}

int main(){
  int i,j,q,r,tg,x;
  scanf("%d",&d);
  for(i=1;i<=ck;i++){scanf("%d",&c[i]);}
  for(i=0;i<d;i++){
    for(j=1;j<=ck;j++){
      scanf("%d",&s[i][j]);
    }
  }
  for(i=0;i<d;i++){
    scanf("%d",&res[i]);
  }
  r=eval();
  scanf("%d",&q);
  while(q>0){
    q--;
    scanf("%d%d",&tg,&x);
    tg--;
    r+=delq(tg,x);
    res[tg]=x;
    printf("%d\n",r);
  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	d
	.bss
	.align 4
	.type	d, @object
	.size	d, 4
d:
	.zero	4
	.globl	c
	.align 32
	.type	c, @object
	.size	c, 128
c:
	.zero	128
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 65536
s:
	.zero	65536
	.globl	res
	.align 32
	.type	res, @object
	.size	res, 2048
res:
	.zero	2048
	.text
	.globl	eval
	.type	eval, @function
eval:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$160, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -148(%rbp)
	movl	$1, -156(%rbp)
	jmp	.L2
.L3:
	movl	-156(%rbp), %eax
	cltq
	movl	$-1, -144(%rbp,%rax,4)
	addl	$1, -156(%rbp)
.L2:
	cmpl	$26, -156(%rbp)
	jle	.L3
	movl	$0, -156(%rbp)
	jmp	.L4
.L7:
	movl	-156(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	res(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	movl	-156(%rbp), %eax
	cltq
	salq	$5, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, -148(%rbp)
	movl	-156(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	res(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	movl	-156(%rbp), %edx
	movl	%edx, -144(%rbp,%rax,4)
	movl	$1, -152(%rbp)
	jmp	.L5
.L6:
	movl	-152(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-152(%rbp), %eax
	cltq
	movl	-144(%rbp,%rax,4), %ecx
	movl	-156(%rbp), %eax
	subl	%ecx, %eax
	imull	%edx, %eax
	subl	%eax, -148(%rbp)
	addl	$1, -152(%rbp)
.L5:
	cmpl	$26, -152(%rbp)
	jle	.L6
	addl	$1, -156(%rbp)
.L4:
	movl	d(%rip), %eax
	cmpl	%eax, -156(%rbp)
	jl	.L7
	movl	-148(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	eval, .-eval
	.globl	sum
	.type	sum, @function
sum:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	-4(%rbp), %eax
	addl	$1, %eax
	imull	-4(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	sum, .-sum
	.globl	delq
	.type	delq, @function
delq:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 3, -24
	movl	%edi, -44(%rbp)
	movl	%esi, -48(%rbp)
	movl	$-1, -28(%rbp)
	movl	d(%rip), %eax
	movl	%eax, -24(%rbp)
	movl	$-1, -20(%rbp)
	movl	d(%rip), %eax
	movl	%eax, -16(%rbp)
	movl	-48(%rbp), %eax
	movslq	%eax, %rdx
	movl	-44(%rbp), %eax
	cltq
	salq	$5, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-44(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	res(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%edx, %rcx
	movl	-44(%rbp), %edx
	movslq	%edx, %rdx
	salq	$5, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	s(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	-44(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -32(%rbp)
	jmp	.L13
.L16:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	res(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	res(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L14
	movl	-32(%rbp), %eax
	movl	%eax, -28(%rbp)
	jmp	.L15
.L14:
	subl	$1, -32(%rbp)
.L13:
	cmpl	$0, -32(%rbp)
	jns	.L16
.L15:
	movl	-44(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -32(%rbp)
	jmp	.L17
.L20:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	res(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	res(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L18
	movl	-32(%rbp), %eax
	movl	%eax, -24(%rbp)
	jmp	.L19
.L18:
	addl	$1, -32(%rbp)
.L17:
	movl	d(%rip), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L20
.L19:
	movl	-44(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -32(%rbp)
	jmp	.L21
.L24:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	res(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -48(%rbp)
	jne	.L22
	movl	-32(%rbp), %eax
	movl	%eax, -20(%rbp)
	jmp	.L23
.L22:
	subl	$1, -32(%rbp)
.L21:
	cmpl	$0, -32(%rbp)
	jns	.L24
.L23:
	movl	-44(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -32(%rbp)
	jmp	.L25
.L28:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	res(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -48(%rbp)
	jne	.L26
	movl	-32(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L27
.L26:
	addl	$1, -32(%rbp)
.L25:
	movl	d(%rip), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L28
.L27:
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	res(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %ebx
	movl	-44(%rbp), %eax
	subl	-28(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %edi
	call	sum
	imull	%ebx, %eax
	addl	%eax, -12(%rbp)
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	res(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %ebx
	movl	-24(%rbp), %eax
	subl	-44(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %edi
	call	sum
	imull	%ebx, %eax
	addl	%eax, -12(%rbp)
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	res(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %ebx
	movl	-24(%rbp), %eax
	subl	-28(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %edi
	call	sum
	imull	%ebx, %eax
	subl	%eax, -12(%rbp)
	movl	-48(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %ebx
	movl	-44(%rbp), %eax
	subl	-20(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %edi
	call	sum
	imull	%ebx, %eax
	subl	%eax, -12(%rbp)
	movl	-48(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %ebx
	movl	-16(%rbp), %eax
	subl	-44(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %edi
	call	sum
	imull	%ebx, %eax
	subl	%eax, -12(%rbp)
	movl	-48(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %ebx
	movl	-16(%rbp), %eax
	subl	-20(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %edi
	call	sum
	imull	%ebx, %eax
	addl	%eax, -12(%rbp)
	movl	-12(%rbp), %eax
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	delq, .-delq
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	d(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -20(%rbp)
	jmp	.L31
.L32:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -20(%rbp)
.L31:
	cmpl	$26, -20(%rbp)
	jle	.L32
	movl	$0, -20(%rbp)
	jmp	.L33
.L36:
	movl	$1, -16(%rbp)
	jmp	.L34
.L35:
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$5, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -16(%rbp)
.L34:
	cmpl	$26, -16(%rbp)
	jle	.L35
	addl	$1, -20(%rbp)
.L33:
	movl	d(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L36
	movl	$0, -20(%rbp)
	jmp	.L37
.L38:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	res(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -20(%rbp)
.L37:
	movl	d(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L38
	movl	$0, %eax
	call	eval
	movl	%eax, -12(%rbp)
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L39
.L40:
	movl	-32(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -32(%rbp)
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -28(%rbp)
	movl	-24(%rbp), %edx
	movl	-28(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	delq
	addl	%eax, -12(%rbp)
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	res(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L39:
	movl	-32(%rbp), %eax
	testl	%eax, %eax
	jg	.L40
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L42
	call	__stack_chk_fail@PLT
.L42:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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	d
	.bss
	.align 4
	.type	d, @object
	.size	d, 4
d:
	.zero	4
	.globl	c
	.align 32
	.type	c, @object
	.size	c, 128
c:
	.zero	128
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 65536
s:
	.zero	65536
	.globl	res
	.align 32
	.type	res, @object
	.size	res, 2048
res:
	.zero	2048
	.text
	.globl	eval
	.type	eval, @function
eval:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$160, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -148(%rbp)
	movl	$1, -156(%rbp)
	jmp	.L2
.L3:
	movl	-156(%rbp), %eax
	cltq
	movl	$-1, -144(%rbp,%rax,4)
	addl	$1, -156(%rbp)
.L2:
	cmpl	$26, -156(%rbp)
	jle	.L3
	movl	$0, -156(%rbp)
	jmp	.L4
.L7:
	movl	-156(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	res(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	movl	-156(%rbp), %eax
	cltq
	salq	$5, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, -148(%rbp)
	movl	-156(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	res(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	movl	-156(%rbp), %edx
	movl	%edx, -144(%rbp,%rax,4)
	movl	$1, -152(%rbp)
	jmp	.L5
.L6:
	movl	-152(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-152(%rbp), %eax
	cltq
	movl	-144(%rbp,%rax,4), %ecx
	movl	-156(%rbp), %eax
	subl	%ecx, %eax
	imull	%edx, %eax
	subl	%eax, -148(%rbp)
	addl	$1, -152(%rbp)
.L5:
	cmpl	$26, -152(%rbp)
	jle	.L6
	addl	$1, -156(%rbp)
.L4:
	movl	d(%rip), %eax
	cmpl	%eax, -156(%rbp)
	jl	.L7
	movl	-148(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	eval, .-eval
	.globl	sum
	.type	sum, @function
sum:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	-4(%rbp), %eax
	addl	$1, %eax
	imull	-4(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	sum, .-sum
	.globl	delq
	.type	delq, @function
delq:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 3, -24
	movl	%edi, -44(%rbp)
	movl	%esi, -48(%rbp)
	movl	$-1, -28(%rbp)
	movl	d(%rip), %eax
	movl	%eax, -24(%rbp)
	movl	$-1, -20(%rbp)
	movl	d(%rip), %eax
	movl	%eax, -16(%rbp)
	movl	-48(%rbp), %eax
	movslq	%eax, %rdx
	movl	-44(%rbp), %eax
	cltq
	salq	$5, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-44(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	res(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%edx, %rcx
	movl	-44(%rbp), %edx
	movslq	%edx, %rdx
	salq	$5, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	s(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	-44(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -32(%rbp)
	jmp	.L13
.L16:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	res(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	res(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L14
	movl	-32(%rbp), %eax
	movl	%eax, -28(%rbp)
	jmp	.L15
.L14:
	subl	$1, -32(%rbp)
.L13:
	cmpl	$0, -32(%rbp)
	jns	.L16
.L15:
	movl	-44(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -32(%rbp)
	jmp	.L17
.L20:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	res(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	res(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L18
	movl	-32(%rbp), %eax
	movl	%eax, -24(%rbp)
	jmp	.L19
.L18:
	addl	$1, -32(%rbp)
.L17:
	movl	d(%rip), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L20
.L19:
	movl	-44(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -32(%rbp)
	jmp	.L21
.L24:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	res(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -48(%rbp)
	jne	.L22
	movl	-32(%rbp), %eax
	movl	%eax, -20(%rbp)
	jmp	.L23
.L22:
	subl	$1, -32(%rbp)
.L21:
	cmpl	$0, -32(%rbp)
	jns	.L24
.L23:
	movl	-44(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -32(%rbp)
	jmp	.L25
.L28:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	res(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -48(%rbp)
	jne	.L26
	movl	-32(%rbp), %eax
	movl	%eax, -16(%rbp)
	jmp	.L27
.L26:
	addl	$1, -32(%rbp)
.L25:
	movl	d(%rip), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L28
.L27:
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	res(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %ebx
	movl	-44(%rbp), %eax
	subl	-28(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %edi
	call	sum
	imull	%ebx, %eax
	addl	%eax, -12(%rbp)
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	res(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %ebx
	movl	-24(%rbp), %eax
	subl	-44(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %edi
	call	sum
	imull	%ebx, %eax
	addl	%eax, -12(%rbp)
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	res(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %ebx
	movl	-24(%rbp), %eax
	subl	-28(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %edi
	call	sum
	imull	%ebx, %eax
	subl	%eax, -12(%rbp)
	movl	-48(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %ebx
	movl	-44(%rbp), %eax
	subl	-20(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %edi
	call	sum
	imull	%ebx, %eax
	subl	%eax, -12(%rbp)
	movl	-48(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %ebx
	movl	-16(%rbp), %eax
	subl	-44(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %edi
	call	sum
	imull	%ebx, %eax
	subl	%eax, -12(%rbp)
	movl	-48(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %ebx
	movl	-16(%rbp), %eax
	subl	-20(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %edi
	call	sum
	imull	%ebx, %eax
	addl	%eax, -12(%rbp)
	movl	-12(%rbp), %eax
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	delq, .-delq
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	d(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -20(%rbp)
	jmp	.L31
.L32:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -20(%rbp)
.L31:
	cmpl	$26, -20(%rbp)
	jle	.L32
	movl	$0, -20(%rbp)
	jmp	.L33
.L36:
	movl	$1, -16(%rbp)
	jmp	.L34
.L35:
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$5, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -16(%rbp)
.L34:
	cmpl	$26, -16(%rbp)
	jle	.L35
	addl	$1, -20(%rbp)
.L33:
	movl	d(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L36
	movl	$0, -20(%rbp)
	jmp	.L37
.L38:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	res(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -20(%rbp)
.L37:
	movl	d(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L38
	movl	$0, %eax
	call	eval
	movl	%eax, -12(%rbp)
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L39
.L40:
	movl	-32(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -32(%rbp)
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -28(%rbp)
	movl	-24(%rbp), %edx
	movl	-28(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	delq
	addl	%eax, -12(%rbp)
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	res(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L39:
	movl	-32(%rbp), %eax
	testl	%eax, %eax
	jg	.L40
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L42
	call	__stack_chk_fail@PLT
.L42:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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:
