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<string.h>
#include<stdlib.h>

typedef struct{
  char name[128];
  unsigned int minprice;
  short fr_oth;
} item;

typedef struct{
  char to[128];
  unsigned int num;
  char from[100][128];
} gosei;

item list[100];
gosei makelist[100];
unsigned int m,n;

unsigned int makeans(int var);

int main(void){
  unsigned int i,j,k,ans;
  char tmpstr[128];
  unsigned int inputs;
  while(scanf("%u%*c",&n) &&n){
    for(i=0;i<n;i++)
      scanf("%s %u%*c",list[i].name,&(list[i].minprice));

    scanf("%u%*c",&m);
    for(i=0;i<m;i++){
      scanf("%s %u%*c",tmpstr,&inputs);
      for(j=0;j<n;j++){
	if(strcmp(list[j].name,tmpstr))continue;
	list[j].fr_oth=1;
	break;
      }
      strcpy(makelist[i].to,tmpstr);
      makelist[i].num=inputs;
      for(j=0;j<makelist[i].num;j++)
	scanf("%s%*c",makelist[i].from[j]);
    }
    scanf("%s%*c",tmpstr);
    for(i=0;i<n;i++){
      if(strcmp(list[i].name,tmpstr)) continue;
      k=i;
      break;
    }
    
    ans=makeans(k);
    printf("%u\n",ans);
  }
  return 0;
}

unsigned int makeans(int var){
  unsigned int i,j,k,tmp;
  if(list[var].fr_oth==1){
    tmp=0;
    for(i=0;i<m;i++){
      if(strcmp(makelist[i].to,list[var].name)) continue;
      k=i;
      break;
    }
    for(i=0;i<makelist[k].num;i++){
      for(j=0;j<n;j++){
	if(strcmp(makelist[k].from[i],list[j].name)) continue;
	break;
      }
      tmp+=makeans(j);
    }
    if(list[var].minprice>tmp) list[var].minprice=tmp;
    list[var].fr_oth=0;
  }
  return list[var].minprice;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	list
	.bss
	.align 32
	.type	list, @object
	.size	list, 13600
list:
	.zero	13600
	.globl	makelist
	.align 32
	.type	makelist, @object
	.size	makelist, 1293200
makelist:
	.zero	1293200
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%s %u%*c"
.LC1:
	.string	"%u%*c"
.LC2:
	.string	"%s%*c"
.LC3:
	.string	"%u\n"
	.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	$176, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L20:
	movl	$0, -160(%rbp)
	jmp	.L3
.L4:
	movl	-160(%rbp), %edx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	128(%rax), %rdx
	leaq	list(%rip), %rax
	addq	%rax, %rdx
	movl	-160(%rbp), %ecx
	movq	%rcx, %rax
	salq	$4, %rax
	addq	%rcx, %rax
	salq	$3, %rax
	leaq	list(%rip), %rcx
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -160(%rbp)
.L3:
	movl	n(%rip), %eax
	cmpl	%eax, -160(%rbp)
	jb	.L4
	leaq	m(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -160(%rbp)
	jmp	.L5
.L13:
	leaq	-164(%rbp), %rdx
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -156(%rbp)
	jmp	.L6
.L10:
	movl	-156(%rbp), %edx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	list(%rip), %rdx
	addq	%rax, %rdx
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L25
	movl	-156(%rbp), %edx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	132+list(%rip), %rax
	movw	$1, (%rdx,%rax)
	jmp	.L9
.L25:
	nop
	addl	$1, -156(%rbp)
.L6:
	movl	n(%rip), %eax
	cmpl	%eax, -156(%rbp)
	jb	.L10
.L9:
	movl	-160(%rbp), %eax
	imulq	$12932, %rax, %rax
	leaq	makelist(%rip), %rdx
	addq	%rax, %rdx
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	-164(%rbp), %edx
	movl	-160(%rbp), %eax
	imulq	$12932, %rax, %rax
	leaq	128+makelist(%rip), %rcx
	movl	%edx, (%rax,%rcx)
	movl	$0, -156(%rbp)
	jmp	.L11
.L12:
	movl	-156(%rbp), %eax
	addq	$1, %rax
	salq	$7, %rax
	movq	%rax, %rdx
	movl	-160(%rbp), %eax
	imulq	$12932, %rax, %rax
	addq	%rax, %rdx
	leaq	makelist(%rip), %rax
	addq	%rdx, %rax
	addq	$4, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -156(%rbp)
.L11:
	movl	-160(%rbp), %eax
	imulq	$12932, %rax, %rax
	leaq	128+makelist(%rip), %rdx
	movl	(%rax,%rdx), %eax
	cmpl	%eax, -156(%rbp)
	jb	.L12
	addl	$1, -160(%rbp)
.L5:
	movl	m(%rip), %eax
	cmpl	%eax, -160(%rbp)
	jb	.L13
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -160(%rbp)
	jmp	.L14
.L18:
	movl	-160(%rbp), %edx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	list(%rip), %rdx
	addq	%rax, %rdx
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L26
	movl	-160(%rbp), %eax
	movl	%eax, -152(%rbp)
	jmp	.L17
.L26:
	nop
	addl	$1, -160(%rbp)
.L14:
	movl	n(%rip), %eax
	cmpl	%eax, -160(%rbp)
	jb	.L18
.L17:
	movl	-152(%rbp), %eax
	movl	%eax, %edi
	call	makeans
	movl	%eax, -148(%rbp)
	movl	-148(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L19
	movl	n(%rip), %eax
	testl	%eax, %eax
	jne	.L20
.L19:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	makeans
	.type	makeans, @function
makeans:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	132+list(%rip), %rax
	movzwl	(%rdx,%rax), %eax
	cmpw	$1, %ax
	jne	.L28
	movl	$0, -4(%rbp)
	movl	$0, -16(%rbp)
	jmp	.L29
.L33:
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	list(%rip), %rdx
	addq	%rax, %rdx
	movl	-16(%rbp), %eax
	imulq	$12932, %rax, %rax
	leaq	makelist(%rip), %rcx
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L44
	movl	-16(%rbp), %eax
	movl	%eax, -8(%rbp)
	jmp	.L32
.L44:
	nop
	addl	$1, -16(%rbp)
.L29:
	movl	m(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jb	.L33
.L32:
	movl	$0, -16(%rbp)
	jmp	.L34
.L40:
	movl	$0, -12(%rbp)
	jmp	.L35
.L39:
	movl	-12(%rbp), %edx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	list(%rip), %rdx
	addq	%rax, %rdx
	movl	-16(%rbp), %eax
	addq	$1, %rax
	salq	$7, %rax
	movq	%rax, %rcx
	movl	-8(%rbp), %eax
	imulq	$12932, %rax, %rax
	addq	%rax, %rcx
	leaq	makelist(%rip), %rax
	addq	%rcx, %rax
	addq	$4, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	je	.L45
	nop
	addl	$1, -12(%rbp)
.L35:
	movl	n(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jb	.L39
	jmp	.L38
.L45:
	nop
.L38:
	movl	-12(%rbp), %eax
	movl	%eax, %edi
	call	makeans
	addl	%eax, -4(%rbp)
	addl	$1, -16(%rbp)
.L34:
	movl	-8(%rbp), %eax
	imulq	$12932, %rax, %rax
	leaq	128+makelist(%rip), %rdx
	movl	(%rax,%rdx), %eax
	cmpl	%eax, -16(%rbp)
	jb	.L40
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	128+list(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4(%rbp)
	jnb	.L41
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rcx
	leaq	128+list(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L41:
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	132+list(%rip), %rax
	movw	$0, (%rdx,%rax)
.L28:
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	128+list(%rip), %rax
	movl	(%rdx,%rax), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	makeans, .-makeans
	.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	makeans
	.type	makeans, @function
makeans:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	list(%rip), %r13
	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
	movslq	%edi, %rbx
	movq	%rbx, %rax
	salq	$4, %rax
	addq	%rbx, %rax
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	leaq	0(%r13,%rax,8), %r12
	cmpw	$1, 132(%r12)
	je	.L24
.L2:
	movq	%rbx, %rax
	salq	$4, %rax
	addq	%rbx, %rax
	movl	128(%r13,%rax,8), %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L24:
	.cfi_restore_state
	movl	m(%rip), %eax
	movl	%eax, 4(%rsp)
	testl	%eax, %eax
	je	.L12
	leaq	makelist(%rip), %r14
	xorl	%ebp, %ebp
	movq	%r14, %r15
.L4:
	movq	%r12, %rsi
	movq	%r15, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L25
.L3:
	movl	%ebp, %eax
	imulq	$12932, %rax, %rax
	movl	128(%r14,%rax), %r12d
	testl	%r12d, %r12d
	je	.L5
	leal	-1(%r12), %edx
	leaq	260+makelist(%rip), %rcx
	xorl	%r12d, %r12d
	leaq	132(%r14,%rax), %r14
	salq	$7, %rdx
	addq	%rcx, %rax
	addq	%rdx, %rax
	movq	%rax, 8(%rsp)
.L6:
	movl	n(%rip), %eax
	leaq	list(%rip), %r15
	xorl	%ebp, %ebp
	xorl	%edi, %edi
	movl	%eax, 4(%rsp)
	testl	%eax, %eax
	je	.L9
.L8:
	movq	%r15, %rsi
	movq	%r14, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L26
.L7:
	movl	%ebp, %edi
.L9:
	call	makeans
	subq	$-128, %r14
	addl	%eax, %r12d
	cmpq	8(%rsp), %r14
	jne	.L6
.L5:
	movq	%rbx, %rax
	salq	$4, %rax
	addq	%rbx, %rax
	leaq	0(%r13,%rax,8), %rax
	cmpl	%r12d, 128(%rax)
	jbe	.L11
	movl	%r12d, 128(%rax)
.L11:
	movq	%rbx, %rax
	xorl	%edx, %edx
	salq	$4, %rax
	addq	%rbx, %rax
	movw	%dx, 132(%r13,%rax,8)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L26:
	addl	$1, %ebp
	addq	$136, %r15
	cmpl	4(%rsp), %ebp
	jne	.L8
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L25:
	addl	$1, %ebp
	addq	$12932, %r15
	cmpl	4(%rsp), %ebp
	jne	.L4
	xorl	%ebp, %ebp
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L12:
	xorl	%ebp, %ebp
	leaq	makelist(%rip), %r14
	jmp	.L3
	.cfi_endproc
.LFE52:
	.size	makeans, .-makeans
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s %u%*c"
.LC1:
	.string	"%u%*c"
.LC2:
	.string	"%s%*c"
.LC3:
	.string	"%u\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	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	makelist(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$200, %rsp
	.cfi_def_cfa_offset 256
	movq	%fs:40, %rax
	movq	%rax, 184(%rsp)
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L28:
	xorl	%eax, %eax
	leaq	n(%rip), %rsi
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L41
	movl	n(%rip), %eax
	testl	%eax, %eax
	je	.L41
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L29:
	movl	%ebx, %eax
	leaq	.LC0(%rip), %rdi
	addl	$1, %ebx
	movq	%rax, %rsi
	salq	$4, %rsi
	addq	%rax, %rsi
	leaq	list(%rip), %rax
	salq	$3, %rsi
	leaq	128(%rax,%rsi), %rdx
	addq	%rax, %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	cmpl	%ebx, n(%rip)
	ja	.L29
	leaq	m(%rip), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	m(%rip), %ecx
	testl	%ecx, %ecx
	je	.L66
	leaq	44(%rsp), %rax
	movl	$0, 12(%rsp)
	leaq	makelist(%rip), %rbx
	movq	%rax, 16(%rsp)
	leaq	48(%rsp), %r14
	leaq	.LC2(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L37:
	movq	16(%rsp), %rdx
	movq	%r14, %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	movl	%eax, 24(%rsp)
	testl	%eax, %eax
	je	.L33
	leaq	list(%rip), %r12
	xorl	%r15d, %r15d
.L35:
	movq	%r14, %rsi
	movq	%r12, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L67
	movl	%r15d, %edx
	leaq	list(%rip), %rcx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	movl	$1, %edx
	movw	%dx, 132(%rcx,%rax,8)
.L33:
	movl	$128, %edx
	movq	%r14, %rsi
	movq	%rbx, %rdi
	movq	%rbx, %r12
	call	__strcpy_chk@PLT
	movl	44(%rsp), %eax
	subq	%rbp, %r12
	xorl	%r15d, %r15d
	addq	$4, %r12
	movl	%eax, 128(%rbx)
	testl	%eax, %eax
	je	.L39
	.p2align 4,,10
	.p2align 3
.L36:
	movl	%r15d, %esi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	addq	$1, %rsi
	salq	$7, %rsi
	addq	%r12, %rsi
	addq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	cmpl	%r15d, 128(%rbx)
	ja	.L36
.L39:
	addl	$1, 12(%rsp)
	addq	$12932, %rbx
	movl	12(%rsp), %eax
	cmpl	%eax, m(%rip)
	ja	.L37
.L38:
	movq	%r13, %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	xorl	%ebx, %ebx
	call	__isoc99_scanf@PLT
	movl	n(%rip), %r13d
	leaq	list(%rip), %r12
	testl	%r13d, %r13d
	je	.L65
.L40:
	movq	%r14, %rsi
	movq	%r12, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L68
.L32:
	movl	%ebx, %edi
	call	makeans
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	%ebx, 28(%rsp)
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L67:
	addl	$1, %r15d
	addq	$136, %r12
	cmpl	24(%rsp), %r15d
	jne	.L35
	jmp	.L33
.L68:
	addl	$1, %ebx
	addq	$136, %r12
	cmpl	%r13d, %ebx
	jne	.L40
.L65:
	movl	28(%rsp), %ebx
	jmp	.L32
.L41:
	movq	184(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L69
	addq	$200, %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
.L66:
	.cfi_restore_state
	leaq	48(%rsp), %r14
	leaq	.LC2(%rip), %r13
	jmp	.L38
.L69:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	makelist
	.align 32
	.type	makelist, @object
	.size	makelist, 1293200
makelist:
	.zero	1293200
	.globl	list
	.align 32
	.type	list, @object
	.size	list, 13600
list:
	.zero	13600
	.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	makeans
	.type	makeans, @function
makeans:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	list(%rip), %r13
	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
	movslq	%edi, %rbx
	movq	%rbx, %rax
	salq	$4, %rax
	addq	%rbx, %rax
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	leaq	0(%r13,%rax,8), %r12
	cmpw	$1, 132(%r12)
	je	.L24
.L2:
	movq	%rbx, %rax
	salq	$4, %rax
	addq	%rbx, %rax
	movl	128(%r13,%rax,8), %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L24:
	.cfi_restore_state
	movl	m(%rip), %eax
	movl	%eax, 4(%rsp)
	testl	%eax, %eax
	je	.L12
	leaq	makelist(%rip), %r14
	xorl	%ebp, %ebp
	movq	%r14, %r15
.L4:
	movq	%r12, %rsi
	movq	%r15, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L25
.L3:
	movl	%ebp, %eax
	imulq	$12932, %rax, %rax
	movl	128(%r14,%rax), %r12d
	testl	%r12d, %r12d
	je	.L5
	leal	-1(%r12), %edx
	leaq	260+makelist(%rip), %rcx
	xorl	%r12d, %r12d
	leaq	132(%r14,%rax), %r14
	salq	$7, %rdx
	addq	%rcx, %rax
	addq	%rdx, %rax
	movq	%rax, 8(%rsp)
.L6:
	movl	n(%rip), %eax
	leaq	list(%rip), %r15
	xorl	%ebp, %ebp
	xorl	%edi, %edi
	movl	%eax, 4(%rsp)
	testl	%eax, %eax
	je	.L9
.L8:
	movq	%r15, %rsi
	movq	%r14, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L26
.L7:
	movl	%ebp, %edi
.L9:
	call	makeans
	subq	$-128, %r14
	addl	%eax, %r12d
	cmpq	8(%rsp), %r14
	jne	.L6
.L5:
	movq	%rbx, %rax
	salq	$4, %rax
	addq	%rbx, %rax
	leaq	0(%r13,%rax,8), %rax
	cmpl	%r12d, 128(%rax)
	jbe	.L11
	movl	%r12d, 128(%rax)
.L11:
	movq	%rbx, %rax
	xorl	%edx, %edx
	salq	$4, %rax
	addq	%rbx, %rax
	movw	%dx, 132(%r13,%rax,8)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L26:
	addl	$1, %ebp
	addq	$136, %r15
	cmpl	4(%rsp), %ebp
	jne	.L8
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L25:
	addl	$1, %ebp
	addq	$12932, %r15
	cmpl	4(%rsp), %ebp
	jne	.L4
	xorl	%ebp, %ebp
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L12:
	xorl	%ebp, %ebp
	leaq	makelist(%rip), %r14
	jmp	.L3
	.cfi_endproc
.LFE52:
	.size	makeans, .-makeans
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s %u%*c"
.LC1:
	.string	"%u%*c"
.LC2:
	.string	"%s%*c"
.LC3:
	.string	"%u\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	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	makelist(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$200, %rsp
	.cfi_def_cfa_offset 256
	movq	%fs:40, %rax
	movq	%rax, 184(%rsp)
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L28:
	xorl	%eax, %eax
	leaq	n(%rip), %rsi
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L41
	movl	n(%rip), %eax
	testl	%eax, %eax
	je	.L41
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L29:
	movl	%ebx, %eax
	leaq	.LC0(%rip), %rdi
	addl	$1, %ebx
	movq	%rax, %rsi
	salq	$4, %rsi
	addq	%rax, %rsi
	leaq	list(%rip), %rax
	salq	$3, %rsi
	leaq	128(%rax,%rsi), %rdx
	addq	%rax, %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	cmpl	%ebx, n(%rip)
	ja	.L29
	leaq	m(%rip), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	m(%rip), %ecx
	testl	%ecx, %ecx
	je	.L66
	leaq	44(%rsp), %rax
	movl	$0, 12(%rsp)
	leaq	makelist(%rip), %rbx
	movq	%rax, 16(%rsp)
	leaq	48(%rsp), %r14
	leaq	.LC2(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L37:
	movq	16(%rsp), %rdx
	movq	%r14, %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	movl	%eax, 24(%rsp)
	testl	%eax, %eax
	je	.L33
	leaq	list(%rip), %r12
	xorl	%r15d, %r15d
.L35:
	movq	%r14, %rsi
	movq	%r12, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L67
	movl	%r15d, %edx
	leaq	list(%rip), %rcx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	movl	$1, %edx
	movw	%dx, 132(%rcx,%rax,8)
.L33:
	movl	$128, %edx
	movq	%r14, %rsi
	movq	%rbx, %rdi
	movq	%rbx, %r12
	call	__strcpy_chk@PLT
	movl	44(%rsp), %eax
	subq	%rbp, %r12
	xorl	%r15d, %r15d
	addq	$4, %r12
	movl	%eax, 128(%rbx)
	testl	%eax, %eax
	je	.L39
	.p2align 4,,10
	.p2align 3
.L36:
	movl	%r15d, %esi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	addq	$1, %rsi
	salq	$7, %rsi
	addq	%r12, %rsi
	addq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	cmpl	%r15d, 128(%rbx)
	ja	.L36
.L39:
	addl	$1, 12(%rsp)
	addq	$12932, %rbx
	movl	12(%rsp), %eax
	cmpl	%eax, m(%rip)
	ja	.L37
.L38:
	movq	%r13, %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	xorl	%ebx, %ebx
	call	__isoc99_scanf@PLT
	movl	n(%rip), %r13d
	leaq	list(%rip), %r12
	testl	%r13d, %r13d
	je	.L65
.L40:
	movq	%r14, %rsi
	movq	%r12, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L68
.L32:
	movl	%ebx, %edi
	call	makeans
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	%ebx, 28(%rsp)
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L67:
	addl	$1, %r15d
	addq	$136, %r12
	cmpl	24(%rsp), %r15d
	jne	.L35
	jmp	.L33
.L68:
	addl	$1, %ebx
	addq	$136, %r12
	cmpl	%r13d, %ebx
	jne	.L40
.L65:
	movl	28(%rsp), %ebx
	jmp	.L32
.L41:
	movq	184(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L69
	addq	$200, %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
.L66:
	.cfi_restore_state
	leaq	48(%rsp), %r14
	leaq	.LC2(%rip), %r13
	jmp	.L38
.L69:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	makelist
	.align 32
	.type	makelist, @object
	.size	makelist, 1293200
makelist:
	.zero	1293200
	.globl	list
	.align 32
	.type	list, @object
	.size	list, 13600
list:
	.zero	13600
	.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<string.h>
#include<stdlib.h>

typedef struct{
  char name[128];
  unsigned int minprice;
  short fr_oth;
} item;

typedef struct{
  char to[128];
  unsigned int num;
  char from[100][128];
} gosei;

item list[100];
gosei makelist[100];
unsigned int m,n;

unsigned int makeans(int var);

int main(void){
  unsigned int i,j,k,ans;
  char tmpstr[128];
  unsigned int inputs;
  while(scanf("%u%*c",&n) &&n){
    for(i=0;i<n;i++)
      scanf("%s %u%*c",list[i].name,&(list[i].minprice));

    scanf("%u%*c",&m);
    for(i=0;i<m;i++){
      scanf("%s %u%*c",tmpstr,&inputs);
      for(j=0;j<n;j++){
	if(strcmp(list[j].name,tmpstr))continue;
	list[j].fr_oth=1;
	break;
      }
      strcpy(makelist[i].to,tmpstr);
      makelist[i].num=inputs;
      for(j=0;j<makelist[i].num;j++)
	scanf("%s%*c",makelist[i].from[j]);
    }
    scanf("%s%*c",tmpstr);
    for(i=0;i<n;i++){
      if(strcmp(list[i].name,tmpstr)) continue;
      k=i;
      break;
    }
    
    ans=makeans(k);
    printf("%u\n",ans);
  }
  return 0;
}

unsigned int makeans(int var){
  unsigned int i,j,k,tmp;
  if(list[var].fr_oth==1){
    tmp=0;
    for(i=0;i<m;i++){
      if(strcmp(makelist[i].to,list[var].name)) continue;
      k=i;
      break;
    }
    for(i=0;i<makelist[k].num;i++){
      for(j=0;j<n;j++){
	if(strcmp(makelist[k].from[i],list[j].name)) continue;
	break;
      }
      tmp+=makeans(j);
    }
    if(list[var].minprice>tmp) list[var].minprice=tmp;
    list[var].fr_oth=0;
  }
  return list[var].minprice;
}
8
wood 3000
string 800
rice 36
water 0
racket 5000
microphone 4961
onigiri 140
guitar 98000
3
racket 2 wood string
onigiri 2 rice water
guitar 3 racket microphone onigiri
guitar
1
computer 300000
0
computer
0
 8
wood 5003
string 800
rice 36
water 0
racket 5000
microphone 4961
onigiri 140
guitar 98000
3
racket 2 wood string
onigiri 2 rice water
guitar 3 racket microphone onigiri
guitar
1
computer 300000
0
computer
0
 8
wood 5003
string 800
rice 36
water 0
racket 5000
microphone 4961
onigiri 140
guitar 98000
3
racket 2 wood string
onigiri 2 rice water
guitar 3 racket microphone onigiri
guitar
1
computer 112750
0
computer
0
 8
wood 3000
string 800
rice 1
water 0
racket 5000
microphone 4961
onigiri 113
guitar 98000
3
racket 2 wood string
onigiri 2 rice water
guitar 3 racket microphone onigiri
guitar
1
computer 300000
0
computer
0
 8
wood 5003
string 800
rice 36
water 0
racket 5000
microphone 4961
onigiri 140
guitar 98000
3
racket 2 wood string
onigiri 2 rice water
guitar 3 tekcar microphone onigiri
guitar
1
computer 112750
0
computer
0
 8
wood 3000
string 800
rice 1
water 0
racket 5000
enohporcim 4961
onigiri 113
guitar 98000
3
racket 2 wood string
onigiri 2 rice water
guitar 3 racket microphone onigiri
guitar
1
computer 300000
0
computer
0
 8
wood 5003
string 800
rice 36
water 0
racket 5000
microphone 4961
onigiri 140
guitar 98000
3
racket 2 wood string
onigiri 2 rice water
guitar 3 tekcar enohporcim onigiri
guitar
1
computer 112750
0
computer
0

8797
300000
 9997
300000
 9997
112750
 8762
300000
 4997
112750
 3801
300000
 36
112750

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<string.h>
#include<stdlib.h>

typedef struct{
  char name[128];
  unsigned int minprice;
  short fr_oth;
} item;

typedef struct{
  char to[128];
  unsigned int num;
  char from[100][128];
} gosei;

item list[100];
gosei makelist[100];
unsigned int m,n;

unsigned int makeans(int var);

int main(void){
  unsigned int i,j,k,ans;
  char tmpstr[128];
  unsigned int inputs;
  while(scanf("%u%*c",&n) &&n){
    for(i=0;i<n;i++)
      scanf("%s %u%*c",list[i].name,&(list[i].minprice));

    scanf("%u%*c",&m);
    for(i=0;i<m;i++){
      scanf("%s %u%*c",tmpstr,&inputs);
      for(j=0;j<n;j++){
	if(strcmp(list[j].name,tmpstr))continue;
	list[j].fr_oth=1;
	break;
      }
      strcpy(makelist[i].to,tmpstr);
      makelist[i].num=inputs;
      for(j=0;j<makelist[i].num;j++)
	scanf("%s%*c",makelist[i].from[j]);
    }
    scanf("%s%*c",tmpstr);
    for(i=0;i<n;i++){
      if(strcmp(list[i].name,tmpstr)) continue;
      k=i;
      break;
    }
    
    ans=makeans(k);
    printf("%u\n",ans);
  }
  return 0;
}

unsigned int makeans(int var){
  unsigned int i,j,k,tmp;
  if(list[var].fr_oth==1){
    tmp=0;
    for(i=0;i<m;i++){
      if(strcmp(makelist[i].to,list[var].name)) continue;
      k=i;
      break;
    }
    for(i=0;i<makelist[k].num;i++){
      for(j=0;j<n;j++){
	if(strcmp(makelist[k].from[i],list[j].name)) continue;
	break;
      }
      tmp+=makeans(j);
    }
    if(list[var].minprice>tmp) list[var].minprice=tmp;
    list[var].fr_oth=0;
  }
  return list[var].minprice;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	list
	.bss
	.align 32
	.type	list, @object
	.size	list, 13600
list:
	.zero	13600
	.globl	makelist
	.align 32
	.type	makelist, @object
	.size	makelist, 1293200
makelist:
	.zero	1293200
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%s %u%*c"
.LC1:
	.string	"%u%*c"
.LC2:
	.string	"%s%*c"
.LC3:
	.string	"%u\n"
	.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	$176, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L20:
	movl	$0, -160(%rbp)
	jmp	.L3
.L4:
	movl	-160(%rbp), %edx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	128(%rax), %rdx
	leaq	list(%rip), %rax
	addq	%rax, %rdx
	movl	-160(%rbp), %ecx
	movq	%rcx, %rax
	salq	$4, %rax
	addq	%rcx, %rax
	salq	$3, %rax
	leaq	list(%rip), %rcx
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -160(%rbp)
.L3:
	movl	n(%rip), %eax
	cmpl	%eax, -160(%rbp)
	jb	.L4
	leaq	m(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -160(%rbp)
	jmp	.L5
.L13:
	leaq	-164(%rbp), %rdx
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -156(%rbp)
	jmp	.L6
.L10:
	movl	-156(%rbp), %edx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	list(%rip), %rdx
	addq	%rax, %rdx
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L25
	movl	-156(%rbp), %edx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	132+list(%rip), %rax
	movw	$1, (%rdx,%rax)
	jmp	.L9
.L25:
	nop
	addl	$1, -156(%rbp)
.L6:
	movl	n(%rip), %eax
	cmpl	%eax, -156(%rbp)
	jb	.L10
.L9:
	movl	-160(%rbp), %eax
	imulq	$12932, %rax, %rax
	leaq	makelist(%rip), %rdx
	addq	%rax, %rdx
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	-164(%rbp), %edx
	movl	-160(%rbp), %eax
	imulq	$12932, %rax, %rax
	leaq	128+makelist(%rip), %rcx
	movl	%edx, (%rax,%rcx)
	movl	$0, -156(%rbp)
	jmp	.L11
.L12:
	movl	-156(%rbp), %eax
	addq	$1, %rax
	salq	$7, %rax
	movq	%rax, %rdx
	movl	-160(%rbp), %eax
	imulq	$12932, %rax, %rax
	addq	%rax, %rdx
	leaq	makelist(%rip), %rax
	addq	%rdx, %rax
	addq	$4, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -156(%rbp)
.L11:
	movl	-160(%rbp), %eax
	imulq	$12932, %rax, %rax
	leaq	128+makelist(%rip), %rdx
	movl	(%rax,%rdx), %eax
	cmpl	%eax, -156(%rbp)
	jb	.L12
	addl	$1, -160(%rbp)
.L5:
	movl	m(%rip), %eax
	cmpl	%eax, -160(%rbp)
	jb	.L13
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -160(%rbp)
	jmp	.L14
.L18:
	movl	-160(%rbp), %edx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	list(%rip), %rdx
	addq	%rax, %rdx
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L26
	movl	-160(%rbp), %eax
	movl	%eax, -152(%rbp)
	jmp	.L17
.L26:
	nop
	addl	$1, -160(%rbp)
.L14:
	movl	n(%rip), %eax
	cmpl	%eax, -160(%rbp)
	jb	.L18
.L17:
	movl	-152(%rbp), %eax
	movl	%eax, %edi
	call	makeans
	movl	%eax, -148(%rbp)
	movl	-148(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L19
	movl	n(%rip), %eax
	testl	%eax, %eax
	jne	.L20
.L19:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	makeans
	.type	makeans, @function
makeans:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	132+list(%rip), %rax
	movzwl	(%rdx,%rax), %eax
	cmpw	$1, %ax
	jne	.L28
	movl	$0, -4(%rbp)
	movl	$0, -16(%rbp)
	jmp	.L29
.L33:
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	list(%rip), %rdx
	addq	%rax, %rdx
	movl	-16(%rbp), %eax
	imulq	$12932, %rax, %rax
	leaq	makelist(%rip), %rcx
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L44
	movl	-16(%rbp), %eax
	movl	%eax, -8(%rbp)
	jmp	.L32
.L44:
	nop
	addl	$1, -16(%rbp)
.L29:
	movl	m(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jb	.L33
.L32:
	movl	$0, -16(%rbp)
	jmp	.L34
.L40:
	movl	$0, -12(%rbp)
	jmp	.L35
.L39:
	movl	-12(%rbp), %edx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	list(%rip), %rdx
	addq	%rax, %rdx
	movl	-16(%rbp), %eax
	addq	$1, %rax
	salq	$7, %rax
	movq	%rax, %rcx
	movl	-8(%rbp), %eax
	imulq	$12932, %rax, %rax
	addq	%rax, %rcx
	leaq	makelist(%rip), %rax
	addq	%rcx, %rax
	addq	$4, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	je	.L45
	nop
	addl	$1, -12(%rbp)
.L35:
	movl	n(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jb	.L39
	jmp	.L38
.L45:
	nop
.L38:
	movl	-12(%rbp), %eax
	movl	%eax, %edi
	call	makeans
	addl	%eax, -4(%rbp)
	addl	$1, -16(%rbp)
.L34:
	movl	-8(%rbp), %eax
	imulq	$12932, %rax, %rax
	leaq	128+makelist(%rip), %rdx
	movl	(%rax,%rdx), %eax
	cmpl	%eax, -16(%rbp)
	jb	.L40
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	128+list(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4(%rbp)
	jnb	.L41
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rcx
	leaq	128+list(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L41:
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	132+list(%rip), %rax
	movw	$0, (%rdx,%rax)
.L28:
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	128+list(%rip), %rax
	movl	(%rdx,%rax), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	makeans, .-makeans
	.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	list
	.bss
	.align 32
	.type	list, @object
	.size	list, 13600
list:
	.zero	13600
	.globl	makelist
	.align 32
	.type	makelist, @object
	.size	makelist, 1293200
makelist:
	.zero	1293200
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%s %u%*c"
.LC1:
	.string	"%u%*c"
.LC2:
	.string	"%s%*c"
.LC3:
	.string	"%u\n"
	.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	$176, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L20:
	movl	$0, -160(%rbp)
	jmp	.L3
.L4:
	movl	-160(%rbp), %edx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	128(%rax), %rdx
	leaq	list(%rip), %rax
	addq	%rax, %rdx
	movl	-160(%rbp), %ecx
	movq	%rcx, %rax
	salq	$4, %rax
	addq	%rcx, %rax
	salq	$3, %rax
	leaq	list(%rip), %rcx
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -160(%rbp)
.L3:
	movl	n(%rip), %eax
	cmpl	%eax, -160(%rbp)
	jb	.L4
	leaq	m(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -160(%rbp)
	jmp	.L5
.L13:
	leaq	-164(%rbp), %rdx
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -156(%rbp)
	jmp	.L6
.L10:
	movl	-156(%rbp), %edx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	list(%rip), %rdx
	addq	%rax, %rdx
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L25
	movl	-156(%rbp), %edx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	132+list(%rip), %rax
	movw	$1, (%rdx,%rax)
	jmp	.L9
.L25:
	nop
	addl	$1, -156(%rbp)
.L6:
	movl	n(%rip), %eax
	cmpl	%eax, -156(%rbp)
	jb	.L10
.L9:
	movl	-160(%rbp), %eax
	imulq	$12932, %rax, %rax
	leaq	makelist(%rip), %rdx
	addq	%rax, %rdx
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	movl	-164(%rbp), %edx
	movl	-160(%rbp), %eax
	imulq	$12932, %rax, %rax
	leaq	128+makelist(%rip), %rcx
	movl	%edx, (%rax,%rcx)
	movl	$0, -156(%rbp)
	jmp	.L11
.L12:
	movl	-156(%rbp), %eax
	addq	$1, %rax
	salq	$7, %rax
	movq	%rax, %rdx
	movl	-160(%rbp), %eax
	imulq	$12932, %rax, %rax
	addq	%rax, %rdx
	leaq	makelist(%rip), %rax
	addq	%rdx, %rax
	addq	$4, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -156(%rbp)
.L11:
	movl	-160(%rbp), %eax
	imulq	$12932, %rax, %rax
	leaq	128+makelist(%rip), %rdx
	movl	(%rax,%rdx), %eax
	cmpl	%eax, -156(%rbp)
	jb	.L12
	addl	$1, -160(%rbp)
.L5:
	movl	m(%rip), %eax
	cmpl	%eax, -160(%rbp)
	jb	.L13
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -160(%rbp)
	jmp	.L14
.L18:
	movl	-160(%rbp), %edx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	list(%rip), %rdx
	addq	%rax, %rdx
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L26
	movl	-160(%rbp), %eax
	movl	%eax, -152(%rbp)
	jmp	.L17
.L26:
	nop
	addl	$1, -160(%rbp)
.L14:
	movl	n(%rip), %eax
	cmpl	%eax, -160(%rbp)
	jb	.L18
.L17:
	movl	-152(%rbp), %eax
	movl	%eax, %edi
	call	makeans
	movl	%eax, -148(%rbp)
	movl	-148(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L19
	movl	n(%rip), %eax
	testl	%eax, %eax
	jne	.L20
.L19:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	makeans
	.type	makeans, @function
makeans:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	132+list(%rip), %rax
	movzwl	(%rdx,%rax), %eax
	cmpw	$1, %ax
	jne	.L28
	movl	$0, -4(%rbp)
	movl	$0, -16(%rbp)
	jmp	.L29
.L33:
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	list(%rip), %rdx
	addq	%rax, %rdx
	movl	-16(%rbp), %eax
	imulq	$12932, %rax, %rax
	leaq	makelist(%rip), %rcx
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L44
	movl	-16(%rbp), %eax
	movl	%eax, -8(%rbp)
	jmp	.L32
.L44:
	nop
	addl	$1, -16(%rbp)
.L29:
	movl	m(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jb	.L33
.L32:
	movl	$0, -16(%rbp)
	jmp	.L34
.L40:
	movl	$0, -12(%rbp)
	jmp	.L35
.L39:
	movl	-12(%rbp), %edx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	list(%rip), %rdx
	addq	%rax, %rdx
	movl	-16(%rbp), %eax
	addq	$1, %rax
	salq	$7, %rax
	movq	%rax, %rcx
	movl	-8(%rbp), %eax
	imulq	$12932, %rax, %rax
	addq	%rax, %rcx
	leaq	makelist(%rip), %rax
	addq	%rcx, %rax
	addq	$4, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	je	.L45
	nop
	addl	$1, -12(%rbp)
.L35:
	movl	n(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jb	.L39
	jmp	.L38
.L45:
	nop
.L38:
	movl	-12(%rbp), %eax
	movl	%eax, %edi
	call	makeans
	addl	%eax, -4(%rbp)
	addl	$1, -16(%rbp)
.L34:
	movl	-8(%rbp), %eax
	imulq	$12932, %rax, %rax
	leaq	128+makelist(%rip), %rdx
	movl	(%rax,%rdx), %eax
	cmpl	%eax, -16(%rbp)
	jb	.L40
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	128+list(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -4(%rbp)
	jnb	.L41
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rcx
	leaq	128+list(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L41:
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	132+list(%rip), %rax
	movw	$0, (%rdx,%rax)
.L28:
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	128+list(%rip), %rax
	movl	(%rdx,%rax), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	makeans, .-makeans
	.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:
