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 INF 1000000000
#define N 101

int n;

int matrixChainOrder(int p[]){
  int i,j,k,l;
  int q;
  int m[n+1][n+1];
  
  for(i=1;i<=n;i++){
    m[i][i] = 0;
  }
  for(l=2;l<=n;l++){
    for(i=1;i<=n-l+1;i++){
      j = i+l-1;
      m[i][j] = INF;
      for(k=i;k<=j-1;k++){
	q = m[i][k] + m[k+1][j] + (p[i-1]*p[k]*p[j]);
	if(m[i][j]>q) m[i][j] = q;
      }
    }
  }

  /*for(i=1;i<=n;i++){
    for(j=1;j<=n;j++){
      if(i<=j) printf("m[%d][%d] = %d\n",i,j,m[i][j]);
    }
    }*/


  return m[1][n];
}

int main(){

  int i;
  
  scanf("%d",&n);

  int x,p[N];
  
  for(i=0;i<n;i++){
    if(i==0) scanf("%d%d",&p[0],&p[1]);
    else scanf("%d%d",&x,&p[i+1]);
  }

  x = matrixChainOrder(p);
  
  printf("%d\n",x);
  
  return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.text
	.globl	matrixChainOrder
	.type	matrixChainOrder, @function
matrixChainOrder:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$104, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%rdi, -120(%rbp)
	movq	%fs:40, %rcx
	movq	%rcx, -56(%rbp)
	xorl	%ecx, %ecx
	movq	%rsp, %rcx
	movq	%rcx, %r15
	movl	n(%rip), %ecx
	leal	1(%rcx), %esi
	movl	n(%rip), %ecx
	leal	1(%rcx), %edi
	movslq	%esi, %rcx
	subq	$1, %rcx
	movq	%rcx, -80(%rbp)
	movslq	%esi, %rcx
	movq	%rcx, -144(%rbp)
	movq	$0, -136(%rbp)
	movslq	%esi, %rcx
	salq	$2, %rcx
	movslq	%edi, %rbx
	subq	$1, %rbx
	movq	%rbx, -72(%rbp)
	movslq	%esi, %rbx
	movq	%rbx, %r12
	movl	$0, %r13d
	movslq	%edi, %rbx
	movq	%rbx, %rax
	movl	$0, %edx
	movq	%r13, %r14
	imulq	%rax, %r14
	movq	%rdx, %rbx
	imulq	%r12, %rbx
	addq	%r14, %rbx
	mulq	%r12
	addq	%rdx, %rbx
	movq	%rbx, %rdx
	movslq	%esi, %rax
	movq	%rax, %r10
	movl	$0, %r11d
	movslq	%edi, %rax
	movq	%rax, %r8
	movl	$0, %r9d
	movq	%r11, %rdx
	imulq	%r8, %rdx
	movq	%r9, %rax
	imulq	%r10, %rax
	leaq	(%rdx,%rax), %rbx
	movq	%r10, %rax
	mulq	%r8
	leaq	(%rbx,%rdx), %r8
	movq	%r8, %rdx
	movslq	%esi, %rdx
	movslq	%edi, %rax
	imulq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rsi
	andq	$-4096, %rsi
	movq	%rsp, %rdx
	subq	%rsi, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$1, -100(%rbp)
	jmp	.L5
.L6:
	movq	%rcx, %rdx
	shrq	$2, %rdx
	movq	-64(%rbp), %rax
	leaq	1(%rdx), %rsi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rsi, %rdx
	movl	$0, (%rax,%rdx,4)
	addl	$1, -100(%rbp)
.L5:
	movl	n(%rip), %eax
	cmpl	%eax, -100(%rbp)
	jle	.L6
	movl	$2, -92(%rbp)
	jmp	.L7
.L13:
	movl	$1, -100(%rbp)
	jmp	.L8
.L12:
	movl	-100(%rbp), %edx
	movl	-92(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	movl	%eax, -88(%rbp)
	movq	%rcx, %rsi
	shrq	$2, %rsi
	movq	-64(%rbp), %rax
	movl	-88(%rbp), %edx
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rsi, %rdx
	addq	%rdi, %rdx
	movl	$1000000000, (%rax,%rdx,4)
	movl	-100(%rbp), %eax
	movl	%eax, -96(%rbp)
	jmp	.L9
.L11:
	movq	%rcx, %rsi
	shrq	$2, %rsi
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rsi, %rdx
	addq	%rdi, %rdx
	movl	(%rax,%rdx,4), %r8d
	movq	%rcx, %rsi
	shrq	$2, %rsi
	movl	-96(%rbp), %eax
	leal	1(%rax), %edi
	movq	-64(%rbp), %rax
	movl	-88(%rbp), %edx
	movslq	%edx, %r9
	movslq	%edi, %rdx
	imulq	%rsi, %rdx
	addq	%r9, %rdx
	movl	(%rax,%rdx,4), %eax
	leal	(%r8,%rax), %esi
	movl	-100(%rbp), %eax
	cltq
	salq	$2, %rax
	leaq	-4(%rax), %rdx
	movq	-120(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-96(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdi
	movq	-120(%rbp), %rax
	addq	%rdi, %rax
	movl	(%rax), %eax
	imull	%eax, %edx
	movl	-88(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdi
	movq	-120(%rbp), %rax
	addq	%rdi, %rax
	movl	(%rax), %eax
	imull	%edx, %eax
	addl	%esi, %eax
	movl	%eax, -84(%rbp)
	movq	%rcx, %rsi
	shrq	$2, %rsi
	movq	-64(%rbp), %rax
	movl	-88(%rbp), %edx
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rsi, %rdx
	addq	%rdi, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, -84(%rbp)
	jge	.L10
	movq	%rcx, %rsi
	shrq	$2, %rsi
	movq	-64(%rbp), %rax
	movl	-88(%rbp), %edx
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rsi, %rdx
	leaq	(%rdi,%rdx), %rsi
	movl	-84(%rbp), %edx
	movl	%edx, (%rax,%rsi,4)
.L10:
	addl	$1, -96(%rbp)
.L9:
	movl	-88(%rbp), %eax
	cmpl	-96(%rbp), %eax
	jg	.L11
	addl	$1, -100(%rbp)
.L8:
	movl	n(%rip), %eax
	subl	-92(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -100(%rbp)
	jle	.L12
	addl	$1, -92(%rbp)
.L7:
	movl	n(%rip), %eax
	cmpl	%eax, -92(%rbp)
	jle	.L13
	shrq	$2, %rcx
	movl	n(%rip), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	addq	%rcx, %rdx
	movl	(%rax,%rdx,4), %eax
	movq	%r15, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	matrixChainOrder, .-matrixChainOrder
	.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	$432, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -420(%rbp)
	jmp	.L17
.L20:
	cmpl	$0, -420(%rbp)
	jne	.L18
	leaq	-416(%rbp), %rax
	leaq	4(%rax), %rdx
	leaq	-416(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L19
.L18:
	movl	-420(%rbp), %eax
	addl	$1, %eax
	leaq	-416(%rbp), %rdx
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-424(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
.L19:
	addl	$1, -420(%rbp)
.L17:
	movl	n(%rip), %eax
	cmpl	%eax, -420(%rbp)
	jl	.L20
	leaq	-416(%rbp), %rax
	movq	%rax, %rdi
	call	matrixChainOrder
	movl	%eax, -424(%rbp)
	movl	-424(%rbp), %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	.L22
	call	__stack_chk_fail@PLT
.L22:
	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	matrixChainOrder
	.type	matrixChainOrder, @function
matrixChainOrder:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	movq	%rdi, %r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	movl	n(%rip), %eax
	movq	%rsp, %rcx
	movl	%eax, -100(%rbp)
	addl	$1, %eax
	movl	%eax, -104(%rbp)
	cltq
	leaq	0(,%rax,4), %rbx
	imulq	%rax, %rax
	movq	%rbx, -88(%rbp)
	leaq	15(,%rax,4), %rdx
	movq	%rdx, %rax
	andq	$-4096, %rdx
	subq	%rdx, %rcx
	andq	$-16, %rax
	cmpq	%rcx, %rsp
	je	.L3
.L31:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L31
.L3:
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L32
.L4:
	movq	-88(%rbp), %r15
	movl	-100(%rbp), %edx
	movq	%rsp, %rsi
	movl	$1, %eax
	movl	-100(%rbp), %edi
	shrq	$2, %r15
	leaq	1(%r15), %rcx
	testl	%edx, %edx
	jle	.L15
	.p2align 4,,10
	.p2align 3
.L5:
	movslq	%eax, %rdx
	imulq	%rcx, %rdx
	movl	$0, (%rsi,%rdx,4)
	movl	%eax, %edx
	addl	$1, %eax
	cmpl	%edx, %edi
	jne	.L5
	cmpl	$1, -100(%rbp)
	jle	.L15
	leaq	8(%r14), %rax
	movq	$0, -112(%rbp)
	movq	%rax, -96(%rbp)
	movq	-88(%rbp), %rax
	movl	$2, -72(%rbp)
	movl	-72(%rbp), %ebx
	addq	%rsi, %rax
	movq	%rax, -120(%rbp)
	.p2align 4,,10
	.p2align 3
.L7:
	movl	-104(%rbp), %eax
	movl	%ebx, -68(%rbp)
	subl	%ebx, %eax
	testl	%eax, %eax
	jle	.L11
	movq	-112(%rbp), %rax
	movq	-120(%rbp), %r11
	movl	$1, %r9d
	leaq	3(%rax), %rbx
	movl	-100(%rbp), %eax
	subl	-72(%rbp), %eax
	addq	$2, %rax
	movq	%rax, -80(%rbp)
	.p2align 4,,10
	.p2align 3
.L10:
	movslq	%r9d, %rax
	movslq	-68(%rbp), %r8
	movslq	%r9d, %r10
	imulq	%r15, %rax
	addq	%r8, %rax
	movl	$1000000000, (%rsi,%rax,4)
	cmpl	%r9d, %r8d
	jle	.L33
	imulq	%r15, %r10
	movq	-96(%rbp), %rax
	movl	-4(%r14,%r9,4), %r13d
	movl	$1000000000, %edi
	movl	-4(%rax,%r9,4), %r12d
	addq	$1, %r9
	movq	%r9, %rdx
	addq	%r8, %r10
	.p2align 4,,10
	.p2align 3
.L13:
	movl	-4(%r14,%rdx,4), %ecx
	movslq	%edx, %rax
	imulq	%r15, %rax
	imull	%r13d, %ecx
	addq	%r8, %rax
	imull	%r12d, %ecx
	movl	(%rsi,%rax,4), %eax
	addl	-4(%r11,%rdx,4), %eax
	addl	%ecx, %eax
	cmpl	%edi, %eax
	jge	.L12
	movl	%eax, (%rsi,%r10,4)
	movl	%eax, %edi
.L12:
	addq	$1, %rdx
	cmpq	%rdx, %rbx
	jne	.L13
.L14:
	addl	$1, -68(%rbp)
	addq	$1, %rbx
	addq	-88(%rbp), %r11
	cmpq	-80(%rbp), %r9
	jne	.L10
.L11:
	movl	-72(%rbp), %ebx
	addq	$1, -112(%rbp)
	addq	$4, -96(%rbp)
	leal	1(%rbx), %eax
	cmpl	%ebx, -100(%rbp)
	je	.L15
	movl	%eax, -72(%rbp)
	movl	%eax, %ebx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L33:
	addq	$1, %r9
	jmp	.L14
.L15:
	movslq	-100(%rbp), %rax
	addq	%r15, %rax
	movl	(%rsi,%rax,4), %eax
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	jne	.L34
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L32:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rax)
	jmp	.L4
.L34:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	matrixChainOrder, .-matrixChainOrder
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d%d"
	.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	n(%rip), %rsi
	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	$440, %rsp
	.cfi_def_cfa_offset 496
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L45
	leaq	20(%rsp), %r14
	xorl	%ebx, %ebx
	leaq	16(%rsp), %r13
	movq	%r14, %rbp
	leaq	.LC2(%rip), %r12
	leaq	12(%rsp), %r15
	.p2align 4,,10
	.p2align 3
.L40:
	testl	%ebx, %ebx
	jne	.L37
	xorl	%eax, %eax
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	addq	$4, %rbp
	cmpl	$1, n(%rip)
	jle	.L39
	movl	$1, %ebx
.L37:
	movq	%rbp, %rdx
	xorl	%eax, %eax
	movq	%r15, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	addl	$1, %ebx
	addq	$4, %rbp
	cmpl	%ebx, n(%rip)
	jg	.L40
.L39:
	movq	%r13, %rdi
	call	matrixChainOrder
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	movl	%eax, 12(%rsp)
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L46
	addq	$440, %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
.L45:
	.cfi_restore_state
	leaq	16(%rsp), %r13
	jmp	.L39
.L46:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.p2align 4
	.globl	matrixChainOrder
	.type	matrixChainOrder, @function
matrixChainOrder:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	movq	%rdi, %r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	movl	n(%rip), %eax
	movq	%rsp, %rcx
	movl	%eax, -100(%rbp)
	addl	$1, %eax
	movl	%eax, -104(%rbp)
	cltq
	leaq	0(,%rax,4), %rbx
	imulq	%rax, %rax
	movq	%rbx, -88(%rbp)
	leaq	15(,%rax,4), %rdx
	movq	%rdx, %rax
	andq	$-4096, %rdx
	subq	%rdx, %rcx
	andq	$-16, %rax
	cmpq	%rcx, %rsp
	je	.L3
.L31:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L31
.L3:
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L32
.L4:
	movq	-88(%rbp), %r15
	movl	-100(%rbp), %edx
	movq	%rsp, %rsi
	movl	$1, %eax
	movl	-100(%rbp), %edi
	shrq	$2, %r15
	leaq	1(%r15), %rcx
	testl	%edx, %edx
	jle	.L15
	.p2align 4,,10
	.p2align 3
.L5:
	movslq	%eax, %rdx
	imulq	%rcx, %rdx
	movl	$0, (%rsi,%rdx,4)
	movl	%eax, %edx
	addl	$1, %eax
	cmpl	%edx, %edi
	jne	.L5
	cmpl	$1, -100(%rbp)
	jle	.L15
	leaq	8(%r14), %rax
	movq	$0, -112(%rbp)
	movq	%rax, -96(%rbp)
	movq	-88(%rbp), %rax
	movl	$2, -72(%rbp)
	movl	-72(%rbp), %ebx
	addq	%rsi, %rax
	movq	%rax, -120(%rbp)
	.p2align 4,,10
	.p2align 3
.L7:
	movl	-104(%rbp), %eax
	movl	%ebx, -68(%rbp)
	subl	%ebx, %eax
	testl	%eax, %eax
	jle	.L11
	movq	-112(%rbp), %rax
	movq	-120(%rbp), %r11
	movl	$1, %r9d
	leaq	3(%rax), %rbx
	movl	-100(%rbp), %eax
	subl	-72(%rbp), %eax
	addq	$2, %rax
	movq	%rax, -80(%rbp)
	.p2align 4,,10
	.p2align 3
.L10:
	movslq	%r9d, %rax
	movslq	-68(%rbp), %r8
	movslq	%r9d, %r10
	imulq	%r15, %rax
	addq	%r8, %rax
	movl	$1000000000, (%rsi,%rax,4)
	cmpl	%r9d, %r8d
	jle	.L33
	imulq	%r15, %r10
	movq	-96(%rbp), %rax
	movl	-4(%r14,%r9,4), %r13d
	movl	$1000000000, %edi
	movl	-4(%rax,%r9,4), %r12d
	addq	$1, %r9
	movq	%r9, %rdx
	addq	%r8, %r10
	.p2align 4,,10
	.p2align 3
.L13:
	movl	-4(%r14,%rdx,4), %ecx
	movslq	%edx, %rax
	imulq	%r15, %rax
	imull	%r13d, %ecx
	addq	%r8, %rax
	imull	%r12d, %ecx
	movl	(%rsi,%rax,4), %eax
	addl	-4(%r11,%rdx,4), %eax
	addl	%ecx, %eax
	cmpl	%edi, %eax
	jge	.L12
	movl	%eax, (%rsi,%r10,4)
	movl	%eax, %edi
.L12:
	addq	$1, %rdx
	cmpq	%rdx, %rbx
	jne	.L13
.L14:
	addl	$1, -68(%rbp)
	addq	$1, %rbx
	addq	-88(%rbp), %r11
	cmpq	-80(%rbp), %r9
	jne	.L10
.L11:
	movl	-72(%rbp), %ebx
	addq	$1, -112(%rbp)
	addq	$4, -96(%rbp)
	leal	1(%rbx), %eax
	cmpl	%ebx, -100(%rbp)
	je	.L15
	movl	%eax, -72(%rbp)
	movl	%eax, %ebx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L33:
	addq	$1, %r9
	jmp	.L14
.L15:
	movslq	-100(%rbp), %rax
	addq	%r15, %rax
	movl	(%rsi,%rax,4), %eax
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	jne	.L34
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L32:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rax)
	jmp	.L4
.L34:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	matrixChainOrder, .-matrixChainOrder
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d%d"
	.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	n(%rip), %rsi
	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	$440, %rsp
	.cfi_def_cfa_offset 496
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L45
	leaq	20(%rsp), %r14
	xorl	%ebx, %ebx
	leaq	16(%rsp), %r13
	movq	%r14, %rbp
	leaq	.LC2(%rip), %r12
	leaq	12(%rsp), %r15
	.p2align 4,,10
	.p2align 3
.L40:
	testl	%ebx, %ebx
	jne	.L37
	xorl	%eax, %eax
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	addq	$4, %rbp
	cmpl	$1, n(%rip)
	jle	.L39
	movl	$1, %ebx
.L37:
	movq	%rbp, %rdx
	xorl	%eax, %eax
	movq	%r15, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	addl	$1, %ebx
	addq	$4, %rbp
	cmpl	%ebx, n(%rip)
	jg	.L40
.L39:
	movq	%r13, %rdi
	call	matrixChainOrder
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	movl	%eax, 12(%rsp)
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L46
	addq	$440, %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
.L45:
	.cfi_restore_state
	leaq	16(%rsp), %r13
	jmp	.L39
.L46:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include<stdio.h>
#define INF 1000000000
#define N 101

int n;

int matrixChainOrder(int p[]){
  int i,j,k,l;
  int q;
  int m[n+1][n+1];
  
  for(i=1;i<=n;i++){
    m[i][i] = 0;
  }
  for(l=2;l<=n;l++){
    for(i=1;i<=n-l+1;i++){
      j = i+l-1;
      m[i][j] = INF;
      for(k=i;k<=j-1;k++){
	q = m[i][k] + m[k+1][j] + (p[i-1]*p[k]*p[j]);
	if(m[i][j]>q) m[i][j] = q;
      }
    }
  }

  /*for(i=1;i<=n;i++){
    for(j=1;j<=n;j++){
      if(i<=j) printf("m[%d][%d] = %d\n",i,j,m[i][j]);
    }
    }*/


  return m[1][n];
}

int main(){

  int i;
  
  scanf("%d",&n);

  int x,p[N];
  
  for(i=0;i<n;i++){
    if(i==0) scanf("%d%d",&p[0],&p[1]);
    else scanf("%d%d",&x,&p[i+1]);
  }

  x = matrixChainOrder(p);
  
  printf("%d\n",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 INF 1000000000
#define N 101

int n;

int matrixChainOrder(int p[]){
  int i,j,k,l;
  int q;
  int m[n+1][n+1];
  
  for(i=1;i<=n;i++){
    m[i][i] = 0;
  }
  for(l=2;l<=n;l++){
    for(i=1;i<=n-l+1;i++){
      j = i+l-1;
      m[i][j] = INF;
      for(k=i;k<=j-1;k++){
	q = m[i][k] + m[k+1][j] + (p[i-1]*p[k]*p[j]);
	if(m[i][j]>q) m[i][j] = q;
      }
    }
  }

  /*for(i=1;i<=n;i++){
    for(j=1;j<=n;j++){
      if(i<=j) printf("m[%d][%d] = %d\n",i,j,m[i][j]);
    }
    }*/


  return m[1][n];
}

int main(){

  int i;
  
  scanf("%d",&n);

  int x,p[N];
  
  for(i=0;i<n;i++){
    if(i==0) scanf("%d%d",&p[0],&p[1]);
    else scanf("%d%d",&x,&p[i+1]);
  }

  x = matrixChainOrder(p);
  
  printf("%d\n",x);
  
  return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.text
	.globl	matrixChainOrder
	.type	matrixChainOrder, @function
matrixChainOrder:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$104, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%rdi, -120(%rbp)
	movq	%fs:40, %rcx
	movq	%rcx, -56(%rbp)
	xorl	%ecx, %ecx
	movq	%rsp, %rcx
	movq	%rcx, %r15
	movl	n(%rip), %ecx
	leal	1(%rcx), %esi
	movl	n(%rip), %ecx
	leal	1(%rcx), %edi
	movslq	%esi, %rcx
	subq	$1, %rcx
	movq	%rcx, -80(%rbp)
	movslq	%esi, %rcx
	movq	%rcx, -144(%rbp)
	movq	$0, -136(%rbp)
	movslq	%esi, %rcx
	salq	$2, %rcx
	movslq	%edi, %rbx
	subq	$1, %rbx
	movq	%rbx, -72(%rbp)
	movslq	%esi, %rbx
	movq	%rbx, %r12
	movl	$0, %r13d
	movslq	%edi, %rbx
	movq	%rbx, %rax
	movl	$0, %edx
	movq	%r13, %r14
	imulq	%rax, %r14
	movq	%rdx, %rbx
	imulq	%r12, %rbx
	addq	%r14, %rbx
	mulq	%r12
	addq	%rdx, %rbx
	movq	%rbx, %rdx
	movslq	%esi, %rax
	movq	%rax, %r10
	movl	$0, %r11d
	movslq	%edi, %rax
	movq	%rax, %r8
	movl	$0, %r9d
	movq	%r11, %rdx
	imulq	%r8, %rdx
	movq	%r9, %rax
	imulq	%r10, %rax
	leaq	(%rdx,%rax), %rbx
	movq	%r10, %rax
	mulq	%r8
	leaq	(%rbx,%rdx), %r8
	movq	%r8, %rdx
	movslq	%esi, %rdx
	movslq	%edi, %rax
	imulq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rsi
	andq	$-4096, %rsi
	movq	%rsp, %rdx
	subq	%rsi, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$1, -100(%rbp)
	jmp	.L5
.L6:
	movq	%rcx, %rdx
	shrq	$2, %rdx
	movq	-64(%rbp), %rax
	leaq	1(%rdx), %rsi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rsi, %rdx
	movl	$0, (%rax,%rdx,4)
	addl	$1, -100(%rbp)
.L5:
	movl	n(%rip), %eax
	cmpl	%eax, -100(%rbp)
	jle	.L6
	movl	$2, -92(%rbp)
	jmp	.L7
.L13:
	movl	$1, -100(%rbp)
	jmp	.L8
.L12:
	movl	-100(%rbp), %edx
	movl	-92(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	movl	%eax, -88(%rbp)
	movq	%rcx, %rsi
	shrq	$2, %rsi
	movq	-64(%rbp), %rax
	movl	-88(%rbp), %edx
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rsi, %rdx
	addq	%rdi, %rdx
	movl	$1000000000, (%rax,%rdx,4)
	movl	-100(%rbp), %eax
	movl	%eax, -96(%rbp)
	jmp	.L9
.L11:
	movq	%rcx, %rsi
	shrq	$2, %rsi
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rsi, %rdx
	addq	%rdi, %rdx
	movl	(%rax,%rdx,4), %r8d
	movq	%rcx, %rsi
	shrq	$2, %rsi
	movl	-96(%rbp), %eax
	leal	1(%rax), %edi
	movq	-64(%rbp), %rax
	movl	-88(%rbp), %edx
	movslq	%edx, %r9
	movslq	%edi, %rdx
	imulq	%rsi, %rdx
	addq	%r9, %rdx
	movl	(%rax,%rdx,4), %eax
	leal	(%r8,%rax), %esi
	movl	-100(%rbp), %eax
	cltq
	salq	$2, %rax
	leaq	-4(%rax), %rdx
	movq	-120(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-96(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdi
	movq	-120(%rbp), %rax
	addq	%rdi, %rax
	movl	(%rax), %eax
	imull	%eax, %edx
	movl	-88(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdi
	movq	-120(%rbp), %rax
	addq	%rdi, %rax
	movl	(%rax), %eax
	imull	%edx, %eax
	addl	%esi, %eax
	movl	%eax, -84(%rbp)
	movq	%rcx, %rsi
	shrq	$2, %rsi
	movq	-64(%rbp), %rax
	movl	-88(%rbp), %edx
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rsi, %rdx
	addq	%rdi, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, -84(%rbp)
	jge	.L10
	movq	%rcx, %rsi
	shrq	$2, %rsi
	movq	-64(%rbp), %rax
	movl	-88(%rbp), %edx
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rsi, %rdx
	leaq	(%rdi,%rdx), %rsi
	movl	-84(%rbp), %edx
	movl	%edx, (%rax,%rsi,4)
.L10:
	addl	$1, -96(%rbp)
.L9:
	movl	-88(%rbp), %eax
	cmpl	-96(%rbp), %eax
	jg	.L11
	addl	$1, -100(%rbp)
.L8:
	movl	n(%rip), %eax
	subl	-92(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -100(%rbp)
	jle	.L12
	addl	$1, -92(%rbp)
.L7:
	movl	n(%rip), %eax
	cmpl	%eax, -92(%rbp)
	jle	.L13
	shrq	$2, %rcx
	movl	n(%rip), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	addq	%rcx, %rdx
	movl	(%rax,%rdx,4), %eax
	movq	%r15, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	matrixChainOrder, .-matrixChainOrder
	.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	$432, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -420(%rbp)
	jmp	.L17
.L20:
	cmpl	$0, -420(%rbp)
	jne	.L18
	leaq	-416(%rbp), %rax
	leaq	4(%rax), %rdx
	leaq	-416(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L19
.L18:
	movl	-420(%rbp), %eax
	addl	$1, %eax
	leaq	-416(%rbp), %rdx
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-424(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
.L19:
	addl	$1, -420(%rbp)
.L17:
	movl	n(%rip), %eax
	cmpl	%eax, -420(%rbp)
	jl	.L20
	leaq	-416(%rbp), %rax
	movq	%rax, %rdi
	call	matrixChainOrder
	movl	%eax, -424(%rbp)
	movl	-424(%rbp), %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	.L22
	call	__stack_chk_fail@PLT
.L22:
	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	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.text
	.globl	matrixChainOrder
	.type	matrixChainOrder, @function
matrixChainOrder:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$104, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%rdi, -120(%rbp)
	movq	%fs:40, %rcx
	movq	%rcx, -56(%rbp)
	xorl	%ecx, %ecx
	movq	%rsp, %rcx
	movq	%rcx, %r15
	movl	n(%rip), %ecx
	leal	1(%rcx), %esi
	movl	n(%rip), %ecx
	leal	1(%rcx), %edi
	movslq	%esi, %rcx
	subq	$1, %rcx
	movq	%rcx, -80(%rbp)
	movslq	%esi, %rcx
	movq	%rcx, -144(%rbp)
	movq	$0, -136(%rbp)
	movslq	%esi, %rcx
	salq	$2, %rcx
	movslq	%edi, %rbx
	subq	$1, %rbx
	movq	%rbx, -72(%rbp)
	movslq	%esi, %rbx
	movq	%rbx, %r12
	movl	$0, %r13d
	movslq	%edi, %rbx
	movq	%rbx, %rax
	movl	$0, %edx
	movq	%r13, %r14
	imulq	%rax, %r14
	movq	%rdx, %rbx
	imulq	%r12, %rbx
	addq	%r14, %rbx
	mulq	%r12
	addq	%rdx, %rbx
	movq	%rbx, %rdx
	movslq	%esi, %rax
	movq	%rax, %r10
	movl	$0, %r11d
	movslq	%edi, %rax
	movq	%rax, %r8
	movl	$0, %r9d
	movq	%r11, %rdx
	imulq	%r8, %rdx
	movq	%r9, %rax
	imulq	%r10, %rax
	leaq	(%rdx,%rax), %rbx
	movq	%r10, %rax
	mulq	%r8
	leaq	(%rbx,%rdx), %r8
	movq	%r8, %rdx
	movslq	%esi, %rdx
	movslq	%edi, %rax
	imulq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rsi
	andq	$-4096, %rsi
	movq	%rsp, %rdx
	subq	%rsi, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$1, -100(%rbp)
	jmp	.L5
.L6:
	movq	%rcx, %rdx
	shrq	$2, %rdx
	movq	-64(%rbp), %rax
	leaq	1(%rdx), %rsi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rsi, %rdx
	movl	$0, (%rax,%rdx,4)
	addl	$1, -100(%rbp)
.L5:
	movl	n(%rip), %eax
	cmpl	%eax, -100(%rbp)
	jle	.L6
	movl	$2, -92(%rbp)
	jmp	.L7
.L13:
	movl	$1, -100(%rbp)
	jmp	.L8
.L12:
	movl	-100(%rbp), %edx
	movl	-92(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	movl	%eax, -88(%rbp)
	movq	%rcx, %rsi
	shrq	$2, %rsi
	movq	-64(%rbp), %rax
	movl	-88(%rbp), %edx
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rsi, %rdx
	addq	%rdi, %rdx
	movl	$1000000000, (%rax,%rdx,4)
	movl	-100(%rbp), %eax
	movl	%eax, -96(%rbp)
	jmp	.L9
.L11:
	movq	%rcx, %rsi
	shrq	$2, %rsi
	movq	-64(%rbp), %rax
	movl	-96(%rbp), %edx
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rsi, %rdx
	addq	%rdi, %rdx
	movl	(%rax,%rdx,4), %r8d
	movq	%rcx, %rsi
	shrq	$2, %rsi
	movl	-96(%rbp), %eax
	leal	1(%rax), %edi
	movq	-64(%rbp), %rax
	movl	-88(%rbp), %edx
	movslq	%edx, %r9
	movslq	%edi, %rdx
	imulq	%rsi, %rdx
	addq	%r9, %rdx
	movl	(%rax,%rdx,4), %eax
	leal	(%r8,%rax), %esi
	movl	-100(%rbp), %eax
	cltq
	salq	$2, %rax
	leaq	-4(%rax), %rdx
	movq	-120(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-96(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdi
	movq	-120(%rbp), %rax
	addq	%rdi, %rax
	movl	(%rax), %eax
	imull	%eax, %edx
	movl	-88(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdi
	movq	-120(%rbp), %rax
	addq	%rdi, %rax
	movl	(%rax), %eax
	imull	%edx, %eax
	addl	%esi, %eax
	movl	%eax, -84(%rbp)
	movq	%rcx, %rsi
	shrq	$2, %rsi
	movq	-64(%rbp), %rax
	movl	-88(%rbp), %edx
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rsi, %rdx
	addq	%rdi, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, -84(%rbp)
	jge	.L10
	movq	%rcx, %rsi
	shrq	$2, %rsi
	movq	-64(%rbp), %rax
	movl	-88(%rbp), %edx
	movslq	%edx, %rdi
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rsi, %rdx
	leaq	(%rdi,%rdx), %rsi
	movl	-84(%rbp), %edx
	movl	%edx, (%rax,%rsi,4)
.L10:
	addl	$1, -96(%rbp)
.L9:
	movl	-88(%rbp), %eax
	cmpl	-96(%rbp), %eax
	jg	.L11
	addl	$1, -100(%rbp)
.L8:
	movl	n(%rip), %eax
	subl	-92(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -100(%rbp)
	jle	.L12
	addl	$1, -92(%rbp)
.L7:
	movl	n(%rip), %eax
	cmpl	%eax, -92(%rbp)
	jle	.L13
	shrq	$2, %rcx
	movl	n(%rip), %edx
	movq	-64(%rbp), %rax
	movslq	%edx, %rdx
	addq	%rcx, %rdx
	movl	(%rax,%rdx,4), %eax
	movq	%r15, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	matrixChainOrder, .-matrixChainOrder
	.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	$432, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -420(%rbp)
	jmp	.L17
.L20:
	cmpl	$0, -420(%rbp)
	jne	.L18
	leaq	-416(%rbp), %rax
	leaq	4(%rax), %rdx
	leaq	-416(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L19
.L18:
	movl	-420(%rbp), %eax
	addl	$1, %eax
	leaq	-416(%rbp), %rdx
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-424(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
.L19:
	addl	$1, -420(%rbp)
.L17:
	movl	n(%rip), %eax
	cmpl	%eax, -420(%rbp)
	jl	.L20
	leaq	-416(%rbp), %rax
	movq	%rax, %rdi
	call	matrixChainOrder
	movl	%eax, -424(%rbp)
	movl	-424(%rbp), %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	.L22
	call	__stack_chk_fail@PLT
.L22:
	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:
