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

```c
#include<stdio.h>
#include<stdlib.h>
#include<stdint.h>
#include<inttypes.h>
#include<string.h>

typedef int32_t i32;

void trans(uint8_t *dp,i32 k,i32 a){
  for(i32 i=k-1;i>=a;i--){
    dp[i]|=dp[i-a];
  }
}

i32 calc(i32 *a,i32 n,uint8_t *dp,i32 k){
  if(n==1){
    i32 v=a[0];
    if(v>=k) return 0;
    for(i32 i=k-v;i<k;i++) if(dp[i]) return 0;
    return 1;
  }
  i32 m=n/2;
  uint8_t *save=(uint8_t *)calloc(k,sizeof(uint8_t));
  memcpy(save,dp,sizeof(uint8_t)*k);
  for(i32 i=m;i<n;i++) trans(dp,k,a[i]);
  i32 p=calc(a,m,dp,k);
  memcpy(dp,save,sizeof(uint8_t)*k);
  free(save);
  for(i32 i=0;i<m;i++) trans(dp,k,a[i]);
  return p+calc(a+m,n-m,dp,k);
}

void run(void){
  i32 n,k;
  scanf("%" SCNi32 "%" SCNi32,&n,&k);
  i32 *a=(i32 *)calloc(n,sizeof(i32));
  for(i32 i=0;i<n;i++) scanf("%" SCNi32,a+i);
  uint8_t *dp=(uint8_t *)calloc(k,sizeof(uint8_t));
  dp[0]=1;
  i32 ans=calc(a,n,dp,k);
  printf("%" PRIi32 "\n",ans);
}

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

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	trans
	.type	trans, @function
trans:
.LFB6:
	.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)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	-28(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -4(%rbp)
	jmp	.L2
.L3:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %ecx
	movl	-4(%rbp), %eax
	subl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rsi
	movq	-24(%rbp), %rax
	addq	%rsi, %rax
	orl	%ecx, %edx
	movb	%dl, (%rax)
	subl	$1, -4(%rbp)
.L2:
	movl	-4(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jge	.L3
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	trans, .-trans
	.globl	calc
	.type	calc, @function
calc:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%rdi, -40(%rbp)
	movl	%esi, -44(%rbp)
	movq	%rdx, -56(%rbp)
	movl	%ecx, -48(%rbp)
	cmpl	$1, -44(%rbp)
	jne	.L5
	movq	-40(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -12(%rbp)
	movl	-12(%rbp), %eax
	cmpl	-48(%rbp), %eax
	jl	.L6
	movl	$0, %eax
	jmp	.L7
.L6:
	movl	-48(%rbp), %eax
	subl	-12(%rbp), %eax
	movl	%eax, -32(%rbp)
	jmp	.L8
.L10:
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	je	.L9
	movl	$0, %eax
	jmp	.L7
.L9:
	addl	$1, -32(%rbp)
.L8:
	movl	-32(%rbp), %eax
	cmpl	-48(%rbp), %eax
	jl	.L10
	movl	$1, %eax
	jmp	.L7
.L5:
	movl	-44(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -20(%rbp)
	movl	-48(%rbp), %eax
	cltq
	movl	$1, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, -8(%rbp)
	movl	-48(%rbp), %eax
	movslq	%eax, %rdx
	movq	-56(%rbp), %rcx
	movq	-8(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	memcpy@PLT
	movl	-20(%rbp), %eax
	movl	%eax, -28(%rbp)
	jmp	.L11
.L12:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-48(%rbp), %ecx
	movq	-56(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	trans
	addl	$1, -28(%rbp)
.L11:
	movl	-28(%rbp), %eax
	cmpl	-44(%rbp), %eax
	jl	.L12
	movl	-48(%rbp), %ecx
	movq	-56(%rbp), %rdx
	movl	-20(%rbp), %esi
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	calc
	movl	%eax, -16(%rbp)
	movl	-48(%rbp), %eax
	movslq	%eax, %rdx
	movq	-8(%rbp), %rcx
	movq	-56(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	memcpy@PLT
	movq	-8(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	movl	$0, -24(%rbp)
	jmp	.L13
.L14:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-48(%rbp), %ecx
	movq	-56(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	trans
	addl	$1, -24(%rbp)
.L13:
	movl	-24(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L14
	movl	-44(%rbp), %eax
	subl	-20(%rbp), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-40(%rbp), %rdx
	leaq	(%rcx,%rdx), %rdi
	movl	-48(%rbp), %ecx
	movq	-56(%rbp), %rdx
	movl	%eax, %esi
	call	calc
	movl	-16(%rbp), %edx
	addl	%edx, %eax
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	calc, .-calc
	.section	.rodata
.LC0:
	.string	"%i%i"
.LC1:
	.string	"%i"
.LC2:
	.string	"%i\n"
	.text
	.globl	run
	.type	run, @function
run:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-40(%rbp), %eax
	cltq
	movl	$4, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, -24(%rbp)
	movl	$0, -32(%rbp)
	jmp	.L16
.L17:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -32(%rbp)
.L16:
	movl	-40(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L17
	movl	-36(%rbp), %eax
	cltq
	movl	$1, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, -16(%rbp)
	movq	-16(%rbp), %rax
	movb	$1, (%rax)
	movl	-36(%rbp), %ecx
	movl	-40(%rbp), %esi
	movq	-16(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	calc
	movl	%eax, -28(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	run, .-run
	.globl	main
	.type	main, @function
main:
.LFB9:
	.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
.LFE9:
	.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	trans
	.type	trans, @function
trans:
.LFB51:
	.cfi_startproc
	endbr64
	subl	$1, %esi
	cmpl	%edx, %esi
	jl	.L1
	movslq	%edx, %rax
	movq	%rdi, %rcx
	movslq	%esi, %rsi
	subq	%rax, %rcx
	.p2align 4,,10
	.p2align 3
.L3:
	movzbl	(%rcx,%rsi), %eax
	orb	%al, (%rdi,%rsi)
	subq	$1, %rsi
	cmpl	%esi, %edx
	jle	.L3
.L1:
	ret
	.cfi_endproc
.LFE51:
	.size	trans, .-trans
	.p2align 4
	.globl	calc
	.type	calc, @function
calc:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	%esi, %r9d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rdi, %r14
	movslq	%ecx, %rdi
	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
	leal	-1(%rdi), %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rdx, %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movl	%edi, 28(%rsp)
	movq	%rdi, (%rsp)
	movl	$0, 24(%rsp)
	cmpl	$1, %esi
	je	.L19
.L20:
	movq	(%rsp), %r13
	movl	%r9d, %r12d
	movl	$1, %esi
	movl	%r9d, 8(%rsp)
	shrl	$31, %r12d
	movq	%r13, %rdi
	addl	%r9d, %r12d
	call	calloc@PLT
	movq	%r13, %rdx
	movq	%rbx, %rsi
	sarl	%r12d
	movq	%rax, %rdi
	movq	%rax, %r15
	call	memcpy@PLT
	movl	8(%rsp), %r9d
	movslq	%r12d, %r11
	cmpl	%r9d, %r12d
	jge	.L16
	leal	-1(%r9), %eax
	leaq	(%r14,%r11,4), %rsi
	subl	%r12d, %eax
	addq	%r11, %rax
	leaq	4(%r14,%rax,4), %r13
	.p2align 4,,10
	.p2align 3
.L15:
	movslq	(%rsi), %rdx
	movq	%rbx, %rdi
	movslq	%ebp, %rax
	movq	%rdx, %rcx
	subq	%rdx, %rdi
	cmpl	%ebp, %edx
	jg	.L18
	.p2align 4,,10
	.p2align 3
.L17:
	movzbl	(%rdi,%rax), %edx
	orb	%dl, (%rbx,%rax)
	subq	$1, %rax
	cmpl	%eax, %ecx
	jle	.L17
.L18:
	addq	$4, %rsi
	cmpq	%rsi, %r13
	jne	.L15
.L16:
	movl	28(%rsp), %ecx
	movq	%rbx, %rdx
	movl	%r12d, %esi
	movq	%r14, %rdi
	movl	%r9d, 20(%rsp)
	movq	%r11, 8(%rsp)
	call	calc
	movq	(%rsp), %rdx
	movq	%r15, %rsi
	movq	%rbx, %rdi
	movl	%eax, %r13d
	call	memcpy@PLT
	movq	%r15, %rdi
	call	free@PLT
	movl	20(%rsp), %r9d
	xorl	%edi, %edi
	movq	8(%rsp), %r11
	cmpl	$1, %r9d
	jle	.L13
	.p2align 4,,10
	.p2align 3
.L22:
	movslq	(%r14,%rdi,4), %rdx
	movq	%rbx, %rsi
	movslq	%ebp, %rax
	movq	%rdx, %rcx
	subq	%rdx, %rsi
	cmpl	%ebp, %edx
	jg	.L24
	.p2align 4,,10
	.p2align 3
.L23:
	movzbl	(%rsi,%rax), %edx
	orb	%dl, (%rbx,%rax)
	subq	$1, %rax
	cmpl	%eax, %ecx
	jle	.L23
.L24:
	addq	$1, %rdi
	cmpl	%edi, %r12d
	jg	.L22
.L13:
	subl	%r12d, %r9d
	addl	%r13d, 24(%rsp)
	leaq	(%r14,%r11,4), %r14
	cmpl	$1, %r9d
	jne	.L20
.L19:
	movl	(%r14), %eax
	movl	28(%rsp), %edi
	cmpl	%eax, %edi
	jle	.L6
	movl	%edi, %ecx
	subl	%eax, %ecx
	cmpl	%ecx, %edi
	jle	.L42
	movl	%edi, %r14d
	movslq	%ecx, %rdx
	subl	$1, %r14d
	leaq	(%rbx,%rdx), %rax
	leaq	1(%rbx,%rdx), %rdx
	subl	%ecx, %r14d
	addq	%r14, %rdx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L43:
	addq	$1, %rax
	cmpq	%rdx, %rax
	je	.L42
.L10:
	cmpb	$0, (%rax)
	je	.L43
.L6:
	movl	24(%rsp), %eax
	addq	$40, %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
.L42:
	.cfi_restore_state
	addl	$1, 24(%rsp)
	jmp	.L6
	.cfi_endproc
.LFE52:
	.size	calc, .-calc
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%i%i"
.LC1:
	.string	"%i"
.LC2:
	.string	"%i\n"
	.text
	.p2align 4
	.globl	run
	.type	run, @function
run:
.LFB53:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movslq	(%rsp), %rdi
	movl	$4, %esi
	movq	%rdi, %r12
	call	calloc@PLT
	movq	%rax, %r14
	testl	%r12d, %r12d
	jle	.L45
	movq	%rax, %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L46:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	(%rsp), %r12d
	addq	$4, %rbp
	cmpl	%ebx, %r12d
	jg	.L46
.L45:
	movslq	4(%rsp), %rdi
	movl	$1, %esi
	movq	%rdi, %r13
	call	calloc@PLT
	movl	%r12d, %esi
	movq	%r14, %rdi
	movl	%r13d, %ecx
	movb	$1, (%rax)
	movq	%rax, %rdx
	call	calc
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L50
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L50:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE53:
	.size	run, .-run
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB54:
	.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
.LFE54:
	.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	trans
	.type	trans, @function
trans:
.LFB51:
	.cfi_startproc
	endbr64
	subl	$1, %esi
	cmpl	%edx, %esi
	jl	.L1
	movslq	%edx, %rax
	movq	%rdi, %rcx
	movslq	%esi, %rsi
	subq	%rax, %rcx
	.p2align 4,,10
	.p2align 3
.L3:
	movzbl	(%rcx,%rsi), %eax
	orb	%al, (%rdi,%rsi)
	subq	$1, %rsi
	cmpl	%esi, %edx
	jle	.L3
.L1:
	ret
	.cfi_endproc
.LFE51:
	.size	trans, .-trans
	.p2align 4
	.globl	calc
	.type	calc, @function
calc:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	%esi, %r9d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rdi, %r14
	movslq	%ecx, %rdi
	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
	leal	-1(%rdi), %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rdx, %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movl	%edi, 28(%rsp)
	movq	%rdi, (%rsp)
	movl	$0, 24(%rsp)
	cmpl	$1, %esi
	je	.L19
.L20:
	movq	(%rsp), %r13
	movl	%r9d, %r12d
	movl	$1, %esi
	movl	%r9d, 8(%rsp)
	shrl	$31, %r12d
	movq	%r13, %rdi
	addl	%r9d, %r12d
	call	calloc@PLT
	movq	%r13, %rdx
	movq	%rbx, %rsi
	sarl	%r12d
	movq	%rax, %rdi
	movq	%rax, %r15
	call	memcpy@PLT
	movl	8(%rsp), %r9d
	movslq	%r12d, %r11
	cmpl	%r9d, %r12d
	jge	.L16
	leal	-1(%r9), %eax
	leaq	(%r14,%r11,4), %rsi
	subl	%r12d, %eax
	addq	%r11, %rax
	leaq	4(%r14,%rax,4), %r13
	.p2align 4,,10
	.p2align 3
.L15:
	movslq	(%rsi), %rdx
	movq	%rbx, %rdi
	movslq	%ebp, %rax
	movq	%rdx, %rcx
	subq	%rdx, %rdi
	cmpl	%ebp, %edx
	jg	.L18
	.p2align 4,,10
	.p2align 3
.L17:
	movzbl	(%rdi,%rax), %edx
	orb	%dl, (%rbx,%rax)
	subq	$1, %rax
	cmpl	%eax, %ecx
	jle	.L17
.L18:
	addq	$4, %rsi
	cmpq	%rsi, %r13
	jne	.L15
.L16:
	movl	28(%rsp), %ecx
	movq	%rbx, %rdx
	movl	%r12d, %esi
	movq	%r14, %rdi
	movl	%r9d, 20(%rsp)
	movq	%r11, 8(%rsp)
	call	calc
	movq	(%rsp), %rdx
	movq	%r15, %rsi
	movq	%rbx, %rdi
	movl	%eax, %r13d
	call	memcpy@PLT
	movq	%r15, %rdi
	call	free@PLT
	movl	20(%rsp), %r9d
	xorl	%edi, %edi
	movq	8(%rsp), %r11
	cmpl	$1, %r9d
	jle	.L13
	.p2align 4,,10
	.p2align 3
.L22:
	movslq	(%r14,%rdi,4), %rdx
	movq	%rbx, %rsi
	movslq	%ebp, %rax
	movq	%rdx, %rcx
	subq	%rdx, %rsi
	cmpl	%ebp, %edx
	jg	.L24
	.p2align 4,,10
	.p2align 3
.L23:
	movzbl	(%rsi,%rax), %edx
	orb	%dl, (%rbx,%rax)
	subq	$1, %rax
	cmpl	%eax, %ecx
	jle	.L23
.L24:
	addq	$1, %rdi
	cmpl	%edi, %r12d
	jg	.L22
.L13:
	subl	%r12d, %r9d
	addl	%r13d, 24(%rsp)
	leaq	(%r14,%r11,4), %r14
	cmpl	$1, %r9d
	jne	.L20
.L19:
	movl	(%r14), %eax
	movl	28(%rsp), %edi
	cmpl	%eax, %edi
	jle	.L6
	movl	%edi, %ecx
	subl	%eax, %ecx
	cmpl	%ecx, %edi
	jle	.L42
	movl	%edi, %r14d
	movslq	%ecx, %rdx
	subl	$1, %r14d
	leaq	(%rbx,%rdx), %rax
	leaq	1(%rbx,%rdx), %rdx
	subl	%ecx, %r14d
	addq	%r14, %rdx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L43:
	addq	$1, %rax
	cmpq	%rdx, %rax
	je	.L42
.L10:
	cmpb	$0, (%rax)
	je	.L43
.L6:
	movl	24(%rsp), %eax
	addq	$40, %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
.L42:
	.cfi_restore_state
	addl	$1, 24(%rsp)
	jmp	.L6
	.cfi_endproc
.LFE52:
	.size	calc, .-calc
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%i%i"
.LC1:
	.string	"%i"
.LC2:
	.string	"%i\n"
	.text
	.p2align 4
	.globl	run
	.type	run, @function
run:
.LFB53:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movslq	(%rsp), %rdi
	movl	$4, %esi
	movq	%rdi, %r12
	call	calloc@PLT
	movq	%rax, %r14
	testl	%r12d, %r12d
	jle	.L45
	movq	%rax, %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L46:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	(%rsp), %r12d
	addq	$4, %rbp
	cmpl	%ebx, %r12d
	jg	.L46
.L45:
	movslq	4(%rsp), %rdi
	movl	$1, %esi
	movq	%rdi, %r13
	call	calloc@PLT
	movl	%r12d, %esi
	movq	%r14, %rdi
	movl	%r13d, %ecx
	movb	$1, (%rax)
	movq	%rax, %rdx
	call	calc
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L50
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L50:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE53:
	.size	run, .-run
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB54:
	.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
.LFE54:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include<stdio.h>
#include<stdlib.h>
#include<stdint.h>
#include<inttypes.h>
#include<string.h>

typedef int32_t i32;

void trans(uint8_t *dp,i32 k,i32 a){
  for(i32 i=k-1;i>=a;i--){
    dp[i]|=dp[i-a];
  }
}

i32 calc(i32 *a,i32 n,uint8_t *dp,i32 k){
  if(n==1){
    i32 v=a[0];
    if(v>=k) return 0;
    for(i32 i=k-v;i<k;i++) if(dp[i]) return 0;
    return 1;
  }
  i32 m=n/2;
  uint8_t *save=(uint8_t *)calloc(k,sizeof(uint8_t));
  memcpy(save,dp,sizeof(uint8_t)*k);
  for(i32 i=m;i<n;i++) trans(dp,k,a[i]);
  i32 p=calc(a,m,dp,k);
  memcpy(dp,save,sizeof(uint8_t)*k);
  free(save);
  for(i32 i=0;i<m;i++) trans(dp,k,a[i]);
  return p+calc(a+m,n-m,dp,k);
}

void run(void){
  i32 n,k;
  scanf("%" SCNi32 "%" SCNi32,&n,&k);
  i32 *a=(i32 *)calloc(n,sizeof(i32));
  for(i32 i=0;i<n;i++) scanf("%" SCNi32,a+i);
  uint8_t *dp=(uint8_t *)calloc(k,sizeof(uint8_t));
  dp[0]=1;
  i32 ans=calc(a,n,dp,k);
  printf("%" PRIi32 "\n",ans);
}

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

1 400
3 1 4 1 5
 3 6
1 7 3
 3 6
1 5 2
 3 7
1 5 0
 4 590
0 1 1 1 5
 5 1135
1 1 1 2 5
 1 734
3 1 4 1 5
 3 6
1 7 2
 1 734
3 1 4 0 5
 1 1126
3 1 4 0 5

1
 2
 0
 3
 4
 5
 1
 2
 1
 1

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

```c
#include<stdio.h>
#include<stdlib.h>
#include<stdint.h>
#include<inttypes.h>
#include<string.h>

typedef int32_t i32;

void trans(uint8_t *dp,i32 k,i32 a){
  for(i32 i=k-1;i>=a;i--){
    dp[i]|=dp[i-a];
  }
}

i32 calc(i32 *a,i32 n,uint8_t *dp,i32 k){
  if(n==1){
    i32 v=a[0];
    if(v>=k) return 0;
    for(i32 i=k-v;i<k;i++) if(dp[i]) return 0;
    return 1;
  }
  i32 m=n/2;
  uint8_t *save=(uint8_t *)calloc(k,sizeof(uint8_t));
  memcpy(save,dp,sizeof(uint8_t)*k);
  for(i32 i=m;i<n;i++) trans(dp,k,a[i]);
  i32 p=calc(a,m,dp,k);
  memcpy(dp,save,sizeof(uint8_t)*k);
  free(save);
  for(i32 i=0;i<m;i++) trans(dp,k,a[i]);
  return p+calc(a+m,n-m,dp,k);
}

void run(void){
  i32 n,k;
  scanf("%" SCNi32 "%" SCNi32,&n,&k);
  i32 *a=(i32 *)calloc(n,sizeof(i32));
  for(i32 i=0;i<n;i++) scanf("%" SCNi32,a+i);
  uint8_t *dp=(uint8_t *)calloc(k,sizeof(uint8_t));
  dp[0]=1;
  i32 ans=calc(a,n,dp,k);
  printf("%" PRIi32 "\n",ans);
}

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

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	trans
	.type	trans, @function
trans:
.LFB6:
	.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)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	-28(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -4(%rbp)
	jmp	.L2
.L3:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %ecx
	movl	-4(%rbp), %eax
	subl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rsi
	movq	-24(%rbp), %rax
	addq	%rsi, %rax
	orl	%ecx, %edx
	movb	%dl, (%rax)
	subl	$1, -4(%rbp)
.L2:
	movl	-4(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jge	.L3
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	trans, .-trans
	.globl	calc
	.type	calc, @function
calc:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%rdi, -40(%rbp)
	movl	%esi, -44(%rbp)
	movq	%rdx, -56(%rbp)
	movl	%ecx, -48(%rbp)
	cmpl	$1, -44(%rbp)
	jne	.L5
	movq	-40(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -12(%rbp)
	movl	-12(%rbp), %eax
	cmpl	-48(%rbp), %eax
	jl	.L6
	movl	$0, %eax
	jmp	.L7
.L6:
	movl	-48(%rbp), %eax
	subl	-12(%rbp), %eax
	movl	%eax, -32(%rbp)
	jmp	.L8
.L10:
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	je	.L9
	movl	$0, %eax
	jmp	.L7
.L9:
	addl	$1, -32(%rbp)
.L8:
	movl	-32(%rbp), %eax
	cmpl	-48(%rbp), %eax
	jl	.L10
	movl	$1, %eax
	jmp	.L7
.L5:
	movl	-44(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -20(%rbp)
	movl	-48(%rbp), %eax
	cltq
	movl	$1, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, -8(%rbp)
	movl	-48(%rbp), %eax
	movslq	%eax, %rdx
	movq	-56(%rbp), %rcx
	movq	-8(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	memcpy@PLT
	movl	-20(%rbp), %eax
	movl	%eax, -28(%rbp)
	jmp	.L11
.L12:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-48(%rbp), %ecx
	movq	-56(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	trans
	addl	$1, -28(%rbp)
.L11:
	movl	-28(%rbp), %eax
	cmpl	-44(%rbp), %eax
	jl	.L12
	movl	-48(%rbp), %ecx
	movq	-56(%rbp), %rdx
	movl	-20(%rbp), %esi
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	calc
	movl	%eax, -16(%rbp)
	movl	-48(%rbp), %eax
	movslq	%eax, %rdx
	movq	-8(%rbp), %rcx
	movq	-56(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	memcpy@PLT
	movq	-8(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	movl	$0, -24(%rbp)
	jmp	.L13
.L14:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-48(%rbp), %ecx
	movq	-56(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	trans
	addl	$1, -24(%rbp)
.L13:
	movl	-24(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L14
	movl	-44(%rbp), %eax
	subl	-20(%rbp), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-40(%rbp), %rdx
	leaq	(%rcx,%rdx), %rdi
	movl	-48(%rbp), %ecx
	movq	-56(%rbp), %rdx
	movl	%eax, %esi
	call	calc
	movl	-16(%rbp), %edx
	addl	%edx, %eax
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	calc, .-calc
	.section	.rodata
.LC0:
	.string	"%i%i"
.LC1:
	.string	"%i"
.LC2:
	.string	"%i\n"
	.text
	.globl	run
	.type	run, @function
run:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-40(%rbp), %eax
	cltq
	movl	$4, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, -24(%rbp)
	movl	$0, -32(%rbp)
	jmp	.L16
.L17:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -32(%rbp)
.L16:
	movl	-40(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L17
	movl	-36(%rbp), %eax
	cltq
	movl	$1, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, -16(%rbp)
	movq	-16(%rbp), %rax
	movb	$1, (%rax)
	movl	-36(%rbp), %ecx
	movl	-40(%rbp), %esi
	movq	-16(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	calc
	movl	%eax, -28(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	run, .-run
	.globl	main
	.type	main, @function
main:
.LFB9:
	.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
.LFE9:
	.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	trans
	.type	trans, @function
trans:
.LFB6:
	.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)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	-28(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -4(%rbp)
	jmp	.L2
.L3:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %ecx
	movl	-4(%rbp), %eax
	subl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rsi
	movq	-24(%rbp), %rax
	addq	%rsi, %rax
	orl	%ecx, %edx
	movb	%dl, (%rax)
	subl	$1, -4(%rbp)
.L2:
	movl	-4(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jge	.L3
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	trans, .-trans
	.globl	calc
	.type	calc, @function
calc:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%rdi, -40(%rbp)
	movl	%esi, -44(%rbp)
	movq	%rdx, -56(%rbp)
	movl	%ecx, -48(%rbp)
	cmpl	$1, -44(%rbp)
	jne	.L5
	movq	-40(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -12(%rbp)
	movl	-12(%rbp), %eax
	cmpl	-48(%rbp), %eax
	jl	.L6
	movl	$0, %eax
	jmp	.L7
.L6:
	movl	-48(%rbp), %eax
	subl	-12(%rbp), %eax
	movl	%eax, -32(%rbp)
	jmp	.L8
.L10:
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	je	.L9
	movl	$0, %eax
	jmp	.L7
.L9:
	addl	$1, -32(%rbp)
.L8:
	movl	-32(%rbp), %eax
	cmpl	-48(%rbp), %eax
	jl	.L10
	movl	$1, %eax
	jmp	.L7
.L5:
	movl	-44(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -20(%rbp)
	movl	-48(%rbp), %eax
	cltq
	movl	$1, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, -8(%rbp)
	movl	-48(%rbp), %eax
	movslq	%eax, %rdx
	movq	-56(%rbp), %rcx
	movq	-8(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	memcpy@PLT
	movl	-20(%rbp), %eax
	movl	%eax, -28(%rbp)
	jmp	.L11
.L12:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-48(%rbp), %ecx
	movq	-56(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	trans
	addl	$1, -28(%rbp)
.L11:
	movl	-28(%rbp), %eax
	cmpl	-44(%rbp), %eax
	jl	.L12
	movl	-48(%rbp), %ecx
	movq	-56(%rbp), %rdx
	movl	-20(%rbp), %esi
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	calc
	movl	%eax, -16(%rbp)
	movl	-48(%rbp), %eax
	movslq	%eax, %rdx
	movq	-8(%rbp), %rcx
	movq	-56(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	memcpy@PLT
	movq	-8(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	movl	$0, -24(%rbp)
	jmp	.L13
.L14:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-48(%rbp), %ecx
	movq	-56(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	trans
	addl	$1, -24(%rbp)
.L13:
	movl	-24(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L14
	movl	-44(%rbp), %eax
	subl	-20(%rbp), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-40(%rbp), %rdx
	leaq	(%rcx,%rdx), %rdi
	movl	-48(%rbp), %ecx
	movq	-56(%rbp), %rdx
	movl	%eax, %esi
	call	calc
	movl	-16(%rbp), %edx
	addl	%edx, %eax
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	calc, .-calc
	.section	.rodata
.LC0:
	.string	"%i%i"
.LC1:
	.string	"%i"
.LC2:
	.string	"%i\n"
	.text
	.globl	run
	.type	run, @function
run:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-40(%rbp), %eax
	cltq
	movl	$4, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, -24(%rbp)
	movl	$0, -32(%rbp)
	jmp	.L16
.L17:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -32(%rbp)
.L16:
	movl	-40(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L17
	movl	-36(%rbp), %eax
	cltq
	movl	$1, %esi
	movq	%rax, %rdi
	call	calloc@PLT
	movq	%rax, -16(%rbp)
	movq	-16(%rbp), %rax
	movb	$1, (%rax)
	movl	-36(%rbp), %ecx
	movl	-40(%rbp), %esi
	movq	-16(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	calc
	movl	%eax, -28(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	run, .-run
	.globl	main
	.type	main, @function
main:
.LFB9:
	.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
.LFE9:
	.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:
