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 N 100
#define INF 1<<21

int G[N][N],p[N],H[N],L[N];

int min(int c,int r){
  if(c<r) return c;
  else return r;
  
}


int main(){
  
  int x,i,j,l,a,b,c;
  
  scanf("%d",&x);
  
  for(i=1;i<=x;i++){
    G[i][i]=0;
  }
for(i=1;i<=x;i++){
scanf("%d%d",&H[i],&L[i]);
}

  

 p[0]=H[1];
 p[1] = L[1];

 for(i=2;i<=x;i++){
   p[i] = L[i];
 }
  
  for(i=2;i<=x;i++){
    for(j = 1;j<=x-i+1;j++){
      a=j+i-1;
      G[j][a] = INF;
      for(l = j;l<=a-1;l++){
	b = G[j][l] + G[l+1][a] + p[j-1]*p[l]*p[a];
	G[j][a] = min(G[j][a],b);
      }
    }
  }
      
  printf("%d\n",G[1][x]);


return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	G
	.bss
	.align 32
	.type	G, @object
	.size	G, 40000
G:
	.zero	40000
	.globl	p
	.align 32
	.type	p, @object
	.size	p, 400
p:
	.zero	400
	.globl	H
	.align 32
	.type	H, @object
	.size	H, 400
H:
	.zero	400
	.globl	L
	.align 32
	.type	L, @object
	.size	L, 400
L:
	.zero	400
	.text
	.globl	min
	.type	min, @function
min:
.LFB0:
	.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	%esi, -8(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L2
	movl	-4(%rbp), %eax
	jmp	.L3
.L2:
	movl	-8(%rbp), %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	min, .-min
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.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	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -28(%rbp)
	jmp	.L5
.L6:
	movl	-28(%rbp), %eax
	cltq
	imulq	$404, %rax, %rax
	leaq	G(%rip), %rdx
	movl	$0, (%rax,%rdx)
	addl	$1, -28(%rbp)
.L5:
	movl	-32(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L6
	movl	$1, -28(%rbp)
	jmp	.L7
.L8:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	L(%rip), %rax
	addq	%rax, %rdx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	H(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -28(%rbp)
.L7:
	movl	-32(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L8
	movl	4+H(%rip), %eax
	movl	%eax, p(%rip)
	movl	4+L(%rip), %eax
	movl	%eax, 4+p(%rip)
	movl	$2, -28(%rbp)
	jmp	.L9
.L10:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	L(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	p(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -28(%rbp)
.L9:
	movl	-32(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L10
	movl	$2, -28(%rbp)
	jmp	.L11
.L16:
	movl	$1, -24(%rbp)
	jmp	.L12
.L15:
	movl	-24(%rbp), %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	movl	%eax, -16(%rbp)
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	$2097152, (%rdx,%rax)
	movl	-24(%rbp), %eax
	movl	%eax, -20(%rbp)
	jmp	.L13
.L14:
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-20(%rbp), %eax
	leal	1(%rax), %edx
	movl	-16(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	(%rcx,%rax), %esi
	movl	-24(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	p(%rip), %rax
	movl	(%rcx,%rax), %eax
	imull	%eax, %edx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	p(%rip), %rax
	movl	(%rcx,%rax), %eax
	imull	%edx, %eax
	addl	%esi, %eax
	movl	%eax, -12(%rbp)
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	movl	%edx, %esi
	movl	%eax, %edi
	call	min
	movl	%eax, %edx
	movl	-16(%rbp), %eax
	movslq	%eax, %rsi
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rcx
	leaq	G(%rip), %rax
	movl	%edx, (%rcx,%rax)
	addl	$1, -20(%rbp)
.L13:
	movl	-16(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jg	.L14
	addl	$1, -24(%rbp)
.L12:
	movl	-32(%rbp), %eax
	subl	-28(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -24(%rbp)
	jle	.L15
	addl	$1, -28(%rbp)
.L11:
	movl	-32(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L16
	movl	-32(%rbp), %eax
	cltq
	addq	$100, %rax
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	min
	.type	min, @function
min:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	movl	%esi, %eax
	cmovle	%edi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	min, .-min
	.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:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	36(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %edi
	movl	%edi, 24(%rsp)
	testl	%edi, %edi
	jle	.L4
	leal	-1(%rdi), %edx
	leaq	404+G(%rip), %rax
	imulq	$404, %rdx, %rdx
	leaq	404(%rax), %rcx
	addq	%rcx, %rdx
	.p2align 4,,10
	.p2align 3
.L5:
	movl	$0, (%rax)
	addq	$404, %rax
	cmpq	%rdx, %rax
	jne	.L5
	movl	$4, %ebx
	movl	$1, %ebp
	leaq	L(%rip), %r14
	leaq	H(%rip), %r13
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L6:
	leaq	(%r14,%rbx), %rdx
	leaq	0(%r13,%rbx), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %eax
	addl	$1, %ebp
	addq	$4, %rbx
	cmpl	%ebp, %eax
	jge	.L6
	movd	4+H(%rip), %xmm0
	movd	4+L(%rip), %xmm1
	movl	%eax, 24(%rsp)
	movl	%eax, %r15d
	punpckldq	%xmm1, %xmm0
	movq	%xmm0, p(%rip)
	cmpl	$1, %eax
	jle	.L14
	leal	-2(%rax), %ebx
	leaq	8+p(%rip), %r14
	leaq	4(,%rbx,4), %rdx
	leaq	8+L(%rip), %rsi
	movq	%r14, %rdi
	call	memcpy@PLT
	leaq	408+G(%rip), %rax
	leaq	-8(%r14), %rbp
	movq	$2, (%rsp)
	movq	%rax, 8(%rsp)
	leaq	3(%rbx), %rax
	movq	%rax, 16(%rsp)
	leal	1(%r15), %eax
	leaq	-12(%r14), %r15
	movl	%eax, 28(%rsp)
	.p2align 4,,10
	.p2align 3
.L8:
	movq	(%rsp), %rdi
	movl	28(%rsp), %eax
	subl	%edi, %eax
	movl	%edi, %r9d
	testl	%eax, %eax
	jle	.L11
	movl	24(%rsp), %r13d
	subl	(%rsp), %r13d
	leaq	400+G(%rip), %r10
	movl	$1, %r12d
	movq	8(%rsp), %r8
	addq	$2, %r13
	.p2align 4,,10
	.p2align 3
.L10:
	movl	$2097152, (%r8)
	cmpl	%r12d, %r9d
	jle	.L13
	movl	(%r15,%r12,4), %r11d
	movl	-4(%r14,%r12,4), %edi
	movq	%r8, %rsi
	movq	%r12, %rdx
	movl	$2097152, %ecx
	.p2align 4,,10
	.p2align 3
.L12:
	movl	0(%rbp,%rdx,4), %ebx
	movl	400(%rsi), %eax
	addl	(%r10,%rdx,4), %eax
	imull	%r11d, %ebx
	imull	%edi, %ebx
	addl	%ebx, %eax
	cmpl	%eax, %ecx
	cmovg	%eax, %ecx
	addq	$1, %rdx
	addq	$400, %rsi
	movl	%ecx, (%r8)
	cmpl	%edx, %r9d
	jg	.L12
.L13:
	addq	$1, %r12
	addq	$404, %r8
	addl	$1, %r9d
	addq	$400, %r10
	cmpq	%r13, %r12
	jne	.L10
.L11:
	addq	$1, (%rsp)
	addq	$4, %r14
	movq	(%rsp), %rax
	addq	$4, 8(%rsp)
	cmpq	16(%rsp), %rax
	jne	.L8
.L14:
	movslq	24(%rsp), %rdx
	leaq	G(%rip), %rax
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	movl	400(%rax,%rdx,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$56, %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
.L4:
	.cfi_restore_state
	movd	4+H(%rip), %xmm0
	movd	4+L(%rip), %xmm2
	punpckldq	%xmm2, %xmm0
	movq	%xmm0, p(%rip)
	jmp	.L14
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	L
	.bss
	.align 32
	.type	L, @object
	.size	L, 400
L:
	.zero	400
	.globl	H
	.align 32
	.type	H, @object
	.size	H, 400
H:
	.zero	400
	.globl	p
	.align 32
	.type	p, @object
	.size	p, 400
p:
	.zero	400
	.globl	G
	.align 32
	.type	G, @object
	.size	G, 40000
G:
	.zero	40000
	.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	min
	.type	min, @function
min:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	movl	%esi, %eax
	cmovle	%edi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	min, .-min
	.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:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	36(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %edi
	movl	%edi, 24(%rsp)
	testl	%edi, %edi
	jle	.L4
	leal	-1(%rdi), %edx
	leaq	404+G(%rip), %rax
	imulq	$404, %rdx, %rdx
	leaq	404(%rax), %rcx
	addq	%rcx, %rdx
	.p2align 4,,10
	.p2align 3
.L5:
	movl	$0, (%rax)
	addq	$404, %rax
	cmpq	%rdx, %rax
	jne	.L5
	movl	$4, %ebx
	movl	$1, %ebp
	leaq	L(%rip), %r14
	leaq	H(%rip), %r13
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L6:
	leaq	(%r14,%rbx), %rdx
	leaq	0(%r13,%rbx), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %eax
	addl	$1, %ebp
	addq	$4, %rbx
	cmpl	%ebp, %eax
	jge	.L6
	movd	4+H(%rip), %xmm0
	movd	4+L(%rip), %xmm1
	movl	%eax, 24(%rsp)
	movl	%eax, %r15d
	punpckldq	%xmm1, %xmm0
	movq	%xmm0, p(%rip)
	cmpl	$1, %eax
	jle	.L14
	leal	-2(%rax), %ebx
	leaq	8+p(%rip), %r14
	leaq	4(,%rbx,4), %rdx
	leaq	8+L(%rip), %rsi
	movq	%r14, %rdi
	call	memcpy@PLT
	leaq	408+G(%rip), %rax
	leaq	-8(%r14), %rbp
	movq	$2, (%rsp)
	movq	%rax, 8(%rsp)
	leaq	3(%rbx), %rax
	movq	%rax, 16(%rsp)
	leal	1(%r15), %eax
	leaq	-12(%r14), %r15
	movl	%eax, 28(%rsp)
	.p2align 4,,10
	.p2align 3
.L8:
	movq	(%rsp), %rdi
	movl	28(%rsp), %eax
	subl	%edi, %eax
	movl	%edi, %r9d
	testl	%eax, %eax
	jle	.L11
	movl	24(%rsp), %r13d
	subl	(%rsp), %r13d
	leaq	400+G(%rip), %r10
	movl	$1, %r12d
	movq	8(%rsp), %r8
	addq	$2, %r13
	.p2align 4,,10
	.p2align 3
.L10:
	movl	$2097152, (%r8)
	cmpl	%r12d, %r9d
	jle	.L13
	movl	(%r15,%r12,4), %r11d
	movl	-4(%r14,%r12,4), %edi
	movq	%r8, %rsi
	movq	%r12, %rdx
	movl	$2097152, %ecx
	.p2align 4,,10
	.p2align 3
.L12:
	movl	0(%rbp,%rdx,4), %ebx
	movl	400(%rsi), %eax
	addl	(%r10,%rdx,4), %eax
	imull	%r11d, %ebx
	imull	%edi, %ebx
	addl	%ebx, %eax
	cmpl	%eax, %ecx
	cmovg	%eax, %ecx
	addq	$1, %rdx
	addq	$400, %rsi
	movl	%ecx, (%r8)
	cmpl	%edx, %r9d
	jg	.L12
.L13:
	addq	$1, %r12
	addq	$404, %r8
	addl	$1, %r9d
	addq	$400, %r10
	cmpq	%r13, %r12
	jne	.L10
.L11:
	addq	$1, (%rsp)
	addq	$4, %r14
	movq	(%rsp), %rax
	addq	$4, 8(%rsp)
	cmpq	16(%rsp), %rax
	jne	.L8
.L14:
	movslq	24(%rsp), %rdx
	leaq	G(%rip), %rax
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	movl	400(%rax,%rdx,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$56, %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
.L4:
	.cfi_restore_state
	movd	4+H(%rip), %xmm0
	movd	4+L(%rip), %xmm2
	punpckldq	%xmm2, %xmm0
	movq	%xmm0, p(%rip)
	jmp	.L14
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	L
	.bss
	.align 32
	.type	L, @object
	.size	L, 400
L:
	.zero	400
	.globl	H
	.align 32
	.type	H, @object
	.size	H, 400
H:
	.zero	400
	.globl	p
	.align 32
	.type	p, @object
	.size	p, 400
p:
	.zero	400
	.globl	G
	.align 32
	.type	G, @object
	.size	G, 40000
G:
	.zero	40000
	.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 N 100
#define INF 1<<21

int G[N][N],p[N],H[N],L[N];

int min(int c,int r){
  if(c<r) return c;
  else return r;
  
}


int main(){
  
  int x,i,j,l,a,b,c;
  
  scanf("%d",&x);
  
  for(i=1;i<=x;i++){
    G[i][i]=0;
  }
for(i=1;i<=x;i++){
scanf("%d%d",&H[i],&L[i]);
}

  

 p[0]=H[1];
 p[1] = L[1];

 for(i=2;i<=x;i++){
   p[i] = L[i];
 }
  
  for(i=2;i<=x;i++){
    for(j = 1;j<=x-i+1;j++){
      a=j+i-1;
      G[j][a] = INF;
      for(l = j;l<=a-1;l++){
	b = G[j][l] + G[l+1][a] + p[j-1]*p[l]*p[a];
	G[j][a] = min(G[j][a],b);
      }
    }
  }
      
  printf("%d\n",G[1][x]);


return 0;
}


6
10 35
35 15
15 5
5 10
10 20
20 25
 6
1 35
35 15
15 5
5 10
10 20
20 25
 6
30 35
35 15
15 5
5 10
10 20
20 29
 6
2 35
35 15
15 5
5 10
10 20
20 25
 6
2 35
35 15
15 5
5 10
10 20
20 24
 6
30 35
35 15
15 5
5 10
10 20
20 27
 6
30 35
35 15
15 5
5 10
10 20
20 8
 6
30 35
35 15
15 5
5 10
10 20
20 7
 6
2 35
35 15
15 5
5 10
10 20
20 34
 6
29 35
35 15
15 5
5 10
10 20
20 7

9125
 1350
 16125
 2700
 2660
 15625
 10875
 10625
 3060
 10415

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 N 100
#define INF 1<<21

int G[N][N],p[N],H[N],L[N];

int min(int c,int r){
  if(c<r) return c;
  else return r;
  
}


int main(){
  
  int x,i,j,l,a,b,c;
  
  scanf("%d",&x);
  
  for(i=1;i<=x;i++){
    G[i][i]=0;
  }
for(i=1;i<=x;i++){
scanf("%d%d",&H[i],&L[i]);
}

  

 p[0]=H[1];
 p[1] = L[1];

 for(i=2;i<=x;i++){
   p[i] = L[i];
 }
  
  for(i=2;i<=x;i++){
    for(j = 1;j<=x-i+1;j++){
      a=j+i-1;
      G[j][a] = INF;
      for(l = j;l<=a-1;l++){
	b = G[j][l] + G[l+1][a] + p[j-1]*p[l]*p[a];
	G[j][a] = min(G[j][a],b);
      }
    }
  }
      
  printf("%d\n",G[1][x]);


return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	G
	.bss
	.align 32
	.type	G, @object
	.size	G, 40000
G:
	.zero	40000
	.globl	p
	.align 32
	.type	p, @object
	.size	p, 400
p:
	.zero	400
	.globl	H
	.align 32
	.type	H, @object
	.size	H, 400
H:
	.zero	400
	.globl	L
	.align 32
	.type	L, @object
	.size	L, 400
L:
	.zero	400
	.text
	.globl	min
	.type	min, @function
min:
.LFB0:
	.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	%esi, -8(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L2
	movl	-4(%rbp), %eax
	jmp	.L3
.L2:
	movl	-8(%rbp), %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	min, .-min
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.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	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -28(%rbp)
	jmp	.L5
.L6:
	movl	-28(%rbp), %eax
	cltq
	imulq	$404, %rax, %rax
	leaq	G(%rip), %rdx
	movl	$0, (%rax,%rdx)
	addl	$1, -28(%rbp)
.L5:
	movl	-32(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L6
	movl	$1, -28(%rbp)
	jmp	.L7
.L8:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	L(%rip), %rax
	addq	%rax, %rdx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	H(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -28(%rbp)
.L7:
	movl	-32(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L8
	movl	4+H(%rip), %eax
	movl	%eax, p(%rip)
	movl	4+L(%rip), %eax
	movl	%eax, 4+p(%rip)
	movl	$2, -28(%rbp)
	jmp	.L9
.L10:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	L(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	p(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -28(%rbp)
.L9:
	movl	-32(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L10
	movl	$2, -28(%rbp)
	jmp	.L11
.L16:
	movl	$1, -24(%rbp)
	jmp	.L12
.L15:
	movl	-24(%rbp), %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	movl	%eax, -16(%rbp)
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	$2097152, (%rdx,%rax)
	movl	-24(%rbp), %eax
	movl	%eax, -20(%rbp)
	jmp	.L13
.L14:
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-20(%rbp), %eax
	leal	1(%rax), %edx
	movl	-16(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	(%rcx,%rax), %esi
	movl	-24(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	p(%rip), %rax
	movl	(%rcx,%rax), %eax
	imull	%eax, %edx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	p(%rip), %rax
	movl	(%rcx,%rax), %eax
	imull	%edx, %eax
	addl	%esi, %eax
	movl	%eax, -12(%rbp)
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	movl	%edx, %esi
	movl	%eax, %edi
	call	min
	movl	%eax, %edx
	movl	-16(%rbp), %eax
	movslq	%eax, %rsi
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rcx
	leaq	G(%rip), %rax
	movl	%edx, (%rcx,%rax)
	addl	$1, -20(%rbp)
.L13:
	movl	-16(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jg	.L14
	addl	$1, -24(%rbp)
.L12:
	movl	-32(%rbp), %eax
	subl	-28(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -24(%rbp)
	jle	.L15
	addl	$1, -28(%rbp)
.L11:
	movl	-32(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L16
	movl	-32(%rbp), %eax
	cltq
	addq	$100, %rax
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	G
	.bss
	.align 32
	.type	G, @object
	.size	G, 40000
G:
	.zero	40000
	.globl	p
	.align 32
	.type	p, @object
	.size	p, 400
p:
	.zero	400
	.globl	H
	.align 32
	.type	H, @object
	.size	H, 400
H:
	.zero	400
	.globl	L
	.align 32
	.type	L, @object
	.size	L, 400
L:
	.zero	400
	.text
	.globl	min
	.type	min, @function
min:
.LFB0:
	.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	%esi, -8(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L2
	movl	-4(%rbp), %eax
	jmp	.L3
.L2:
	movl	-8(%rbp), %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	min, .-min
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.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	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -28(%rbp)
	jmp	.L5
.L6:
	movl	-28(%rbp), %eax
	cltq
	imulq	$404, %rax, %rax
	leaq	G(%rip), %rdx
	movl	$0, (%rax,%rdx)
	addl	$1, -28(%rbp)
.L5:
	movl	-32(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L6
	movl	$1, -28(%rbp)
	jmp	.L7
.L8:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	L(%rip), %rax
	addq	%rax, %rdx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	H(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -28(%rbp)
.L7:
	movl	-32(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L8
	movl	4+H(%rip), %eax
	movl	%eax, p(%rip)
	movl	4+L(%rip), %eax
	movl	%eax, 4+p(%rip)
	movl	$2, -28(%rbp)
	jmp	.L9
.L10:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	L(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	p(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -28(%rbp)
.L9:
	movl	-32(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L10
	movl	$2, -28(%rbp)
	jmp	.L11
.L16:
	movl	$1, -24(%rbp)
	jmp	.L12
.L15:
	movl	-24(%rbp), %edx
	movl	-28(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	movl	%eax, -16(%rbp)
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	$2097152, (%rdx,%rax)
	movl	-24(%rbp), %eax
	movl	%eax, -20(%rbp)
	jmp	.L13
.L14:
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-20(%rbp), %eax
	leal	1(%rax), %edx
	movl	-16(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	(%rcx,%rax), %esi
	movl	-24(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	p(%rip), %rax
	movl	(%rcx,%rax), %eax
	imull	%eax, %edx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	p(%rip), %rax
	movl	(%rcx,%rax), %eax
	imull	%edx, %eax
	addl	%esi, %eax
	movl	%eax, -12(%rbp)
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	movl	%edx, %esi
	movl	%eax, %edi
	call	min
	movl	%eax, %edx
	movl	-16(%rbp), %eax
	movslq	%eax, %rsi
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rcx
	leaq	G(%rip), %rax
	movl	%edx, (%rcx,%rax)
	addl	$1, -20(%rbp)
.L13:
	movl	-16(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jg	.L14
	addl	$1, -24(%rbp)
.L12:
	movl	-32(%rbp), %eax
	subl	-28(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -24(%rbp)
	jle	.L15
	addl	$1, -28(%rbp)
.L11:
	movl	-32(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L16
	movl	-32(%rbp), %eax
	cltq
	addq	$100, %rax
	leaq	0(,%rax,4), %rdx
	leaq	G(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
