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>

int main(void)
{
  int n,m,k,i,j,time,limit,count=0;
  long long int temp,*a,*b;
  
  scanf("%d",&n);
  scanf("%d",&m);
  scanf("%d",&k);
  
  a=(long long int)malloc(sizeof(long long int)*n+1);
  a[0]=0;
  for(i=1;i<=n;i++)
  {
    scanf("%lld",&temp);
    a[i]=temp+a[i-1];
  }
  
   b=(long long int)malloc(sizeof(long long int)*m+1);
  b[0]=0;
  for(i=1;i<=m;i++)
  {
    scanf("%lld",&temp);
    b[i]=b[i-1]+temp;
  }
  

  limit=m;
  for(i=0;i<=n;i++)
  {
    if(k<a[i])break;
    j=limit;
    while(b[j]>k-a[i])
    {
      j--;
    }
    limit=j;
    if(count<i+j)count=i+j;
  }
  
  printf("%d",count);
  
  free(a);
  free(b);
  
  return 0;
}
  ```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -36(%rbp)
	leaq	-60(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-52(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-60(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	$1, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -24(%rbp)
	movq	-24(%rbp), %rax
	movq	$0, (%rax)
	movl	$1, -48(%rbp)
	jmp	.L2
.L3:
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-48(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rcx
	movq	-32(%rbp), %rdx
	movl	-48(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rsi
	movq	-24(%rbp), %rax
	addq	%rsi, %rax
	addq	%rcx, %rdx
	movq	%rdx, (%rax)
	addl	$1, -48(%rbp)
.L2:
	movl	-60(%rbp), %eax
	cmpl	%eax, -48(%rbp)
	jle	.L3
	movl	-56(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	$1, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -16(%rbp)
	movq	-16(%rbp), %rax
	movq	$0, (%rax)
	movl	$1, -48(%rbp)
	jmp	.L4
.L5:
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-48(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rcx
	movq	-32(%rbp), %rdx
	movl	-48(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rsi
	movq	-16(%rbp), %rax
	addq	%rsi, %rax
	addq	%rcx, %rdx
	movq	%rdx, (%rax)
	addl	$1, -48(%rbp)
.L4:
	movl	-56(%rbp), %eax
	cmpl	%eax, -48(%rbp)
	jle	.L5
	movl	-56(%rbp), %eax
	movl	%eax, -40(%rbp)
	movl	$0, -48(%rbp)
	jmp	.L6
.L12:
	movl	-52(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L15
	movl	-40(%rbp), %eax
	movl	%eax, -44(%rbp)
	jmp	.L9
.L10:
	subl	$1, -44(%rbp)
.L9:
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movl	-52(%rbp), %edx
	movslq	%edx, %rdx
	movl	-48(%rbp), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,8), %rsi
	movq	-24(%rbp), %rcx
	addq	%rsi, %rcx
	movq	(%rcx), %rcx
	subq	%rcx, %rdx
	cmpq	%rdx, %rax
	jg	.L10
	movl	-44(%rbp), %eax
	movl	%eax, -40(%rbp)
	movl	-48(%rbp), %edx
	movl	-44(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jge	.L11
	movl	-48(%rbp), %edx
	movl	-44(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -36(%rbp)
.L11:
	addl	$1, -48(%rbp)
.L6:
	movl	-60(%rbp), %eax
	cmpl	%eax, -48(%rbp)
	jle	.L12
	jmp	.L8
.L15:
	nop
.L8:
	movl	-36(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	-16(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.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	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	8(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	12(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rax
	leaq	1(,%rax,8), %rdi
	movq	%rax, %rbx
	call	malloc@PLT
	movq	$0, (%rax)
	movq	%rax, %r12
	testl	%ebx, %ebx
	jle	.L2
	movl	$1, %ebx
	leaq	16(%rsp), %r15
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r15, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rax
	addq	-8(%r12,%rbx,8), %rax
	movq	%rax, (%r12,%rbx,8)
	addq	$1, %rbx
	cmpl	%ebx, 4(%rsp)
	jge	.L3
.L2:
	movslq	8(%rsp), %rax
	leaq	1(,%rax,8), %rdi
	movq	%rax, %rbx
	call	malloc@PLT
	movq	$0, (%rax)
	movq	%rax, %rbp
	testl	%ebx, %ebx
	jle	.L4
	movl	$1, %r13d
	leaq	16(%rsp), %r15
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r15, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rax
	movl	8(%rsp), %ebx
	addq	-8(%rbp,%r13,8), %rax
	movq	%rax, 0(%rbp,%r13,8)
	addq	$1, %r13
	cmpl	%r13d, %ebx
	jge	.L5
.L4:
	movl	4(%rsp), %r9d
	testl	%r9d, %r9d
	js	.L11
	movslq	12(%rsp), %rdi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L9:
	movq	(%r12,%rcx,8), %rax
	movl	%ecx, %esi
	cmpq	%rax, %rdi
	jl	.L6
	movq	%rdi, %rdx
	subq	%rax, %rdx
	movslq	%ebx, %rax
	cmpq	0(%rbp,%rax,8), %rdx
	jge	.L7
	leal	-1(%rbx), %eax
	cltq
	.p2align 4,,10
	.p2align 3
.L8:
	movl	%eax, %ebx
	subq	$1, %rax
	cmpq	%rdx, 8(%rbp,%rax,8)
	jg	.L8
.L7:
	leal	(%rsi,%rbx), %eax
	cmpl	%eax, %r8d
	cmovl	%eax, %r8d
	addq	$1, %rcx
	cmpl	%ecx, %r9d
	jge	.L9
.L6:
	movl	%r8d, %edx
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	%r12, %rdi
	call	free@PLT
	movq	%rbp, %rdi
	call	free@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	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
.L11:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L6
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.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	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	8(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	12(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rax
	leaq	1(,%rax,8), %rdi
	movq	%rax, %rbx
	call	malloc@PLT
	movq	$0, (%rax)
	movq	%rax, %r12
	testl	%ebx, %ebx
	jle	.L2
	movl	$1, %ebx
	leaq	16(%rsp), %r15
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r15, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rax
	addq	-8(%r12,%rbx,8), %rax
	movq	%rax, (%r12,%rbx,8)
	addq	$1, %rbx
	cmpl	%ebx, 4(%rsp)
	jge	.L3
.L2:
	movslq	8(%rsp), %rax
	leaq	1(,%rax,8), %rdi
	movq	%rax, %rbx
	call	malloc@PLT
	movq	$0, (%rax)
	movq	%rax, %rbp
	testl	%ebx, %ebx
	jle	.L4
	movl	$1, %r13d
	leaq	16(%rsp), %r15
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r15, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rax
	movl	8(%rsp), %ebx
	addq	-8(%rbp,%r13,8), %rax
	movq	%rax, 0(%rbp,%r13,8)
	addq	$1, %r13
	cmpl	%r13d, %ebx
	jge	.L5
.L4:
	movl	4(%rsp), %r9d
	testl	%r9d, %r9d
	js	.L11
	movslq	12(%rsp), %rdi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L9:
	movq	(%r12,%rcx,8), %rax
	movl	%ecx, %esi
	cmpq	%rax, %rdi
	jl	.L6
	movq	%rdi, %rdx
	subq	%rax, %rdx
	movslq	%ebx, %rax
	cmpq	0(%rbp,%rax,8), %rdx
	jge	.L7
	leal	-1(%rbx), %eax
	cltq
	.p2align 4,,10
	.p2align 3
.L8:
	movl	%eax, %ebx
	subq	$1, %rax
	cmpq	%rdx, 8(%rbp,%rax,8)
	jg	.L8
.L7:
	leal	(%rsi,%rbx), %eax
	cmpl	%eax, %r8d
	cmovl	%eax, %r8d
	addq	$1, %rcx
	cmpl	%ecx, %r9d
	jge	.L9
.L6:
	movl	%r8d, %edx
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	%r12, %rdi
	call	free@PLT
	movq	%rbp, %rdi
	call	free@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	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
.L11:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L6
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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>

int main(void)
{
  int n,m,k,i,j,time,limit,count=0;
  long long int temp,*a,*b;
  
  scanf("%d",&n);
  scanf("%d",&m);
  scanf("%d",&k);
  
  a=(long long int)malloc(sizeof(long long int)*n+1);
  a[0]=0;
  for(i=1;i<=n;i++)
  {
    scanf("%lld",&temp);
    a[i]=temp+a[i-1];
  }
  
   b=(long long int)malloc(sizeof(long long int)*m+1);
  b[0]=0;
  for(i=1;i<=m;i++)
  {
    scanf("%lld",&temp);
    b[i]=b[i-1]+temp;
  }
  

  limit=m;
  for(i=0;i<=n;i++)
  {
    if(k<a[i])break;
    j=limit;
    while(b[j]>k-a[i])
    {
      j--;
    }
    limit=j;
    if(count<i+j)count=i+j;
  }
  
  printf("%d",count);
  
  free(a);
  free(b);
  
  return 0;
}
  
5 4 1
1000000000 1000000000 1000000000 1000000000 1000000000
1000000000 1000000000 1000000010 1000000000
 3 4 194
60 90 120
80 150 80 150
 3 4 730
60 9 120
80 150 80 150
 3 4 194
60 90 120
80 34 80 150
 3 4 376
60 9 120
80 150 80 150
 3 4 449
60 9 120
80 150 80 150
 3 3 100
96 16 120
30 94 80 150
 3 4 730
60 90 120
85 150 80 150
 3 4 194
60 90 120
80 35 80 150
 3 4 100
60 9 120
80 150 80 150

0 2 7 3 4 5 1 6 3 2
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>

int main(void)
{
  int n,m,k,i,j,time,limit,count=0;
  long long int temp,*a,*b;
  
  scanf("%d",&n);
  scanf("%d",&m);
  scanf("%d",&k);
  
  a=(long long int)malloc(sizeof(long long int)*n+1);
  a[0]=0;
  for(i=1;i<=n;i++)
  {
    scanf("%lld",&temp);
    a[i]=temp+a[i-1];
  }
  
   b=(long long int)malloc(sizeof(long long int)*m+1);
  b[0]=0;
  for(i=1;i<=m;i++)
  {
    scanf("%lld",&temp);
    b[i]=b[i-1]+temp;
  }
  

  limit=m;
  for(i=0;i<=n;i++)
  {
    if(k<a[i])break;
    j=limit;
    while(b[j]>k-a[i])
    {
      j--;
    }
    limit=j;
    if(count<i+j)count=i+j;
  }
  
  printf("%d",count);
  
  free(a);
  free(b);
  
  return 0;
}
  ```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -36(%rbp)
	leaq	-60(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-52(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-60(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	$1, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -24(%rbp)
	movq	-24(%rbp), %rax
	movq	$0, (%rax)
	movl	$1, -48(%rbp)
	jmp	.L2
.L3:
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-48(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rcx
	movq	-32(%rbp), %rdx
	movl	-48(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rsi
	movq	-24(%rbp), %rax
	addq	%rsi, %rax
	addq	%rcx, %rdx
	movq	%rdx, (%rax)
	addl	$1, -48(%rbp)
.L2:
	movl	-60(%rbp), %eax
	cmpl	%eax, -48(%rbp)
	jle	.L3
	movl	-56(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	$1, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -16(%rbp)
	movq	-16(%rbp), %rax
	movq	$0, (%rax)
	movl	$1, -48(%rbp)
	jmp	.L4
.L5:
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-48(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rcx
	movq	-32(%rbp), %rdx
	movl	-48(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rsi
	movq	-16(%rbp), %rax
	addq	%rsi, %rax
	addq	%rcx, %rdx
	movq	%rdx, (%rax)
	addl	$1, -48(%rbp)
.L4:
	movl	-56(%rbp), %eax
	cmpl	%eax, -48(%rbp)
	jle	.L5
	movl	-56(%rbp), %eax
	movl	%eax, -40(%rbp)
	movl	$0, -48(%rbp)
	jmp	.L6
.L12:
	movl	-52(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L15
	movl	-40(%rbp), %eax
	movl	%eax, -44(%rbp)
	jmp	.L9
.L10:
	subl	$1, -44(%rbp)
.L9:
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movl	-52(%rbp), %edx
	movslq	%edx, %rdx
	movl	-48(%rbp), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,8), %rsi
	movq	-24(%rbp), %rcx
	addq	%rsi, %rcx
	movq	(%rcx), %rcx
	subq	%rcx, %rdx
	cmpq	%rdx, %rax
	jg	.L10
	movl	-44(%rbp), %eax
	movl	%eax, -40(%rbp)
	movl	-48(%rbp), %edx
	movl	-44(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jge	.L11
	movl	-48(%rbp), %edx
	movl	-44(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -36(%rbp)
.L11:
	addl	$1, -48(%rbp)
.L6:
	movl	-60(%rbp), %eax
	cmpl	%eax, -48(%rbp)
	jle	.L12
	jmp	.L8
.L15:
	nop
.L8:
	movl	-36(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	-16(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -36(%rbp)
	leaq	-60(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-52(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-60(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	$1, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -24(%rbp)
	movq	-24(%rbp), %rax
	movq	$0, (%rax)
	movl	$1, -48(%rbp)
	jmp	.L2
.L3:
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-48(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rcx
	movq	-32(%rbp), %rdx
	movl	-48(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rsi
	movq	-24(%rbp), %rax
	addq	%rsi, %rax
	addq	%rcx, %rdx
	movq	%rdx, (%rax)
	addl	$1, -48(%rbp)
.L2:
	movl	-60(%rbp), %eax
	cmpl	%eax, -48(%rbp)
	jle	.L3
	movl	-56(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	$1, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -16(%rbp)
	movq	-16(%rbp), %rax
	movq	$0, (%rax)
	movl	$1, -48(%rbp)
	jmp	.L4
.L5:
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-48(%rbp), %eax
	cltq
	salq	$3, %rax
	leaq	-8(%rax), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rcx
	movq	-32(%rbp), %rdx
	movl	-48(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rsi
	movq	-16(%rbp), %rax
	addq	%rsi, %rax
	addq	%rcx, %rdx
	movq	%rdx, (%rax)
	addl	$1, -48(%rbp)
.L4:
	movl	-56(%rbp), %eax
	cmpl	%eax, -48(%rbp)
	jle	.L5
	movl	-56(%rbp), %eax
	movl	%eax, -40(%rbp)
	movl	$0, -48(%rbp)
	jmp	.L6
.L12:
	movl	-52(%rbp), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L15
	movl	-40(%rbp), %eax
	movl	%eax, -44(%rbp)
	jmp	.L9
.L10:
	subl	$1, -44(%rbp)
.L9:
	movl	-44(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movl	-52(%rbp), %edx
	movslq	%edx, %rdx
	movl	-48(%rbp), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,8), %rsi
	movq	-24(%rbp), %rcx
	addq	%rsi, %rcx
	movq	(%rcx), %rcx
	subq	%rcx, %rdx
	cmpq	%rdx, %rax
	jg	.L10
	movl	-44(%rbp), %eax
	movl	%eax, -40(%rbp)
	movl	-48(%rbp), %edx
	movl	-44(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jge	.L11
	movl	-48(%rbp), %edx
	movl	-44(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -36(%rbp)
.L11:
	addl	$1, -48(%rbp)
.L6:
	movl	-60(%rbp), %eax
	cmpl	%eax, -48(%rbp)
	jle	.L12
	jmp	.L8
.L15:
	nop
.L8:
	movl	-36(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	-16(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
