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 max 1000
int n;
 int m[max][max],p[max];


int main(){
  int c,r;
  int i,k;
 
  scanf("%d",&n);
  for(i=1;i<n+1;i++){
    scanf("%d %d",&p[i-1],&p[i]);
  }
  printf("%d\n", optimalParenthesization());
}

int optimalParenthesization(){
  int l,i,j;
  for(i=1;i<n+1;i++) m[i][i]=0;
  for(l=2;l<n+1;l++){  
    for(i=1;i<n+1;i++){
       j = i + l -1;
       
      m[i][j] = min(i,j);
    }
  }
 
  return m[1][n];
}
int min(int i,int j){
  int min,k;
  for(k=i; k<=j; k++){
    m[i][j] = m[i][k] + m[k+1][j] +p[i-1]*p[k]*p[j];
    
    if(k==i) min = m[i][j];
    if(k>i && m[i][j] < min) min = m[i][j];
  }
  // printf("i = %d,j = %d,%d\n",i,j,min);
  return min;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	m
	.align 32
	.type	m, @object
	.size	m, 4000000
m:
	.zero	4000000
	.globl	p
	.align 32
	.type	p, @object
	.size	p, 4000
p:
	.zero	4000
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -4(%rbp)
	jmp	.L2
.L3:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	p(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -4(%rbp)
.L2:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jle	.L3
	movl	$0, %eax
	call	optimalParenthesization
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	optimalParenthesization
	.type	optimalParenthesization, @function
optimalParenthesization:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$1, -8(%rbp)
	jmp	.L6
.L7:
	movl	-8(%rbp), %eax
	cltq
	imulq	$4004, %rax, %rax
	leaq	m(%rip), %rdx
	movl	$0, (%rax,%rdx)
	addl	$1, -8(%rbp)
.L6:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L7
	movl	$2, -12(%rbp)
	jmp	.L8
.L11:
	movl	$1, -8(%rbp)
	jmp	.L9
.L10:
	movl	-8(%rbp), %edx
	movl	-12(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	movl	$0, %eax
	call	min
	movl	-4(%rbp), %edx
	movslq	%edx, %rcx
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$1000, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	m(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -8(%rbp)
.L9:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L10
	addl	$1, -12(%rbp)
.L8:
	movl	n(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jle	.L11
	movl	n(%rip), %eax
	cltq
	addq	$1000, %rax
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	(%rdx,%rax), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	optimalParenthesization, .-optimalParenthesization
	.globl	min
	.type	min, @function
min:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L14
.L17:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-4(%rbp), %eax
	leal	1(%rax), %edx
	movl	-24(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rax
	imulq	$1000, %rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	(%rcx,%rax), %esi
	movl	-20(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	p(%rip), %rax
	movl	(%rcx,%rax), %eax
	imull	%eax, %edx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	p(%rip), %rax
	movl	(%rcx,%rax), %eax
	imull	%edx, %eax
	leal	(%rsi,%rax), %ecx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jne	.L15
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -8(%rbp)
.L15:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jle	.L16
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L16
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -8(%rbp)
.L16:
	addl	$1, -4(%rbp)
.L14:
	movl	-4(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L17
	movl	-8(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	min, .-min
	.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	optimalParenthesization
	.type	optimalParenthesization, @function
optimalParenthesization:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	n(%rip), %eax
	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
	movl	%eax, -4(%rsp)
	testl	%eax, %eax
	jle	.L14
	movl	%eax, %ebx
	leaq	4004+m(%rip), %rax
	leal	-1(%rbx), %edx
	leaq	4004(%rax), %rsi
	imulq	$4004, %rdx, %rdx
	addq	%rsi, %rdx
	.p2align 4,,10
	.p2align 3
.L5:
	movl	$0, (%rax)
	addq	$4004, %rax
	cmpq	%rdx, %rax
	jne	.L5
	cmpl	$1, -4(%rsp)
	jle	.L14
	leaq	8+p(%rip), %rax
	movq	$-8, %r15
	movq	$2, -24(%rsp)
	leaq	p(%rip), %r12
	movq	%rax, -32(%rsp)
	movl	-4(%rsp), %eax
	addl	$1, %eax
	movq	%rax, -40(%rsp)
	leaq	4000+m(%rip), %rax
	movq	%rax, -16(%rsp)
	.p2align 4,,10
	.p2align 3
.L13:
	movq	-16(%rsp), %r9
	leaq	4000+m(%rip), %rax
	movl	-24(%rsp), %r10d
	movl	$2, %r14d
	movq	%rax, -16(%rsp)
	movq	%rax, %r11
	movl	$1, %r13d
	subq	%r15, %r9
	.p2align 4,,10
	.p2align 3
.L12:
	movl	%r13d, %edi
	cmpl	%r10d, %r13d
	jg	.L8
	leaq	-4+p(%rip), %rax
	movl	4(%r9,%r15), %ecx
	movq	%r9, %rsi
	movq	%r14, %rdx
	movl	(%rax,%r13,4), %ebp
	movq	-32(%rsp), %rax
	addl	4000(%r9), %ecx
	movl	-4(%rax,%r13,4), %ebx
	movl	(%r12,%r13,4), %eax
	imull	%ebp, %eax
	imull	%ebx, %eax
	addl	%eax, %ecx
	movl	%ecx, %eax
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L11:
	movl	(%r12,%rdx,4), %r8d
	movl	8000(%rsi), %eax
	addl	(%r11,%rdx,4), %eax
	imull	%ebp, %r8d
	imull	%ebx, %r8d
	addl	%r8d, %eax
	cmpl	%edx, %edi
	cmove	%eax, %ecx
	addq	$1, %rdx
	addq	$4000, %rsi
.L15:
	cmpl	%eax, %ecx
	movl	%eax, (%r9)
	leal	-1(%rdx), %r8d
	cmovle	%ecx, %eax
	cmpl	%edi, %r8d
	cmovg	%eax, %ecx
	cmpl	%r10d, %edx
	jle	.L11
.L8:
	movl	%ecx, (%r9)
	addq	$1, %r13
	addq	$1, %r14
	addl	$1, %r10d
	addq	$4004, %r9
	addq	$4000, %r11
	cmpq	-40(%rsp), %r13
	jne	.L12
	addq	$1, -24(%rsp)
	subq	$4, %r15
	movq	-24(%rsp), %rax
	addq	$4, -32(%rsp)
	cmpq	-40(%rsp), %rax
	jne	.L13
.L14:
	movslq	-4(%rsp), %rdx
	leaq	m(%rip), %rax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	movl	4000(%rax,%rdx,4), %eax
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE24:
	.size	optimalParenthesization, .-optimalParenthesization
	.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:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	n(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L25
	leaq	p(%rip), %rbx
	movl	$1, %ebp
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L26:
	movq	%rbx, %rsi
	addq	$4, %rbx
	xorl	%eax, %eax
	movq	%r12, %rdi
	movq	%rbx, %rdx
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	cmpl	%ebp, n(%rip)
	jge	.L26
.L25:
	xorl	%eax, %eax
	call	optimalParenthesization
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	popq	%rbx
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.text
	.p2align 4
	.globl	min
	.type	min, @function
min:
.LFB25:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	jg	.L41
	movl	%esi, %r10d
	leal	1(%rdi), %esi
	leal	-1(%rdi), %eax
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movslq	%esi, %rdx
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	cltq
	leaq	m(%rip), %r11
	imulq	$1000, %rdx, %rcx
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	p(%rip), %rbp
	movslq	%edi, %r9
	movl	0(%rbp,%rax,4), %r13d
	movslq	%r10d, %rax
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	imulq	$4004, %r9, %rbx
	movl	0(%rbp,%rax,4), %r12d
	addq	%rax, %rcx
	movl	(%r11,%rcx,4), %r8d
	movl	0(%rbp,%r9,4), %ecx
	addl	(%r11,%rbx), %r8d
	imulq	$1000, %r9, %rbx
	imull	%r13d, %ecx
	addq	%rax, %rbx
	imull	%r12d, %ecx
	addl	%ecx, %r8d
	movl	%r8d, (%r11,%rbx,4)
	cmpl	%esi, %r10d
	jl	.L29
	imulq	$4000, %r9, %r9
	leaq	(%r11,%rbx,4), %rsi
	addq	%r11, %r9
	jmp	.L33
	.p2align 4,,10
	.p2align 3
.L42:
	cmpl	%eax, %r8d
	movl	%eax, %ecx
	cmovle	%r8d, %ecx
	cmpl	%edx, %edi
	cmovl	%ecx, %r8d
.L32:
	addq	$1, %rdx
	movl	%eax, (%r11,%rbx,4)
	addq	$4000, %rsi
	cmpl	%edx, %r10d
	jl	.L29
.L33:
	movl	0(%rbp,%rdx,4), %ecx
	movl	8000(%rsi), %eax
	addl	(%r9,%rdx,4), %eax
	imull	%r13d, %ecx
	imull	%r12d, %ecx
	addl	%ecx, %eax
	cmpl	%edx, %edi
	jne	.L42
	movl	%eax, %r8d
	jmp	.L32
	.p2align 4,,10
	.p2align 3
.L29:
	popq	%rbx
	.cfi_def_cfa_offset 32
	movl	%r8d, %eax
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L41:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE25:
	.size	min, .-min
	.globl	p
	.bss
	.align 32
	.type	p, @object
	.size	p, 4000
p:
	.zero	4000
	.globl	m
	.align 32
	.type	m, @object
	.size	m, 4000000
m:
	.zero	4000000
	.globl	n
	.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	optimalParenthesization
	.type	optimalParenthesization, @function
optimalParenthesization:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	n(%rip), %eax
	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
	movl	%eax, -4(%rsp)
	testl	%eax, %eax
	jle	.L14
	movl	%eax, %ebx
	leaq	4004+m(%rip), %rax
	leal	-1(%rbx), %edx
	leaq	4004(%rax), %rsi
	imulq	$4004, %rdx, %rdx
	addq	%rsi, %rdx
	.p2align 4,,10
	.p2align 3
.L5:
	movl	$0, (%rax)
	addq	$4004, %rax
	cmpq	%rdx, %rax
	jne	.L5
	cmpl	$1, -4(%rsp)
	jle	.L14
	leaq	8+p(%rip), %rax
	movq	$-8, %r15
	movq	$2, -24(%rsp)
	leaq	p(%rip), %r12
	movq	%rax, -32(%rsp)
	movl	-4(%rsp), %eax
	addl	$1, %eax
	movq	%rax, -40(%rsp)
	leaq	4000+m(%rip), %rax
	movq	%rax, -16(%rsp)
	.p2align 4,,10
	.p2align 3
.L13:
	movq	-16(%rsp), %r9
	leaq	4000+m(%rip), %rax
	movl	-24(%rsp), %r10d
	movl	$2, %r14d
	movq	%rax, -16(%rsp)
	movq	%rax, %r11
	movl	$1, %r13d
	subq	%r15, %r9
	.p2align 4,,10
	.p2align 3
.L12:
	movl	%r13d, %edi
	cmpl	%r10d, %r13d
	jg	.L8
	leaq	-4+p(%rip), %rax
	movl	4(%r9,%r15), %ecx
	movq	%r9, %rsi
	movq	%r14, %rdx
	movl	(%rax,%r13,4), %ebp
	movq	-32(%rsp), %rax
	addl	4000(%r9), %ecx
	movl	-4(%rax,%r13,4), %ebx
	movl	(%r12,%r13,4), %eax
	imull	%ebp, %eax
	imull	%ebx, %eax
	addl	%eax, %ecx
	movl	%ecx, %eax
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L11:
	movl	(%r12,%rdx,4), %r8d
	movl	8000(%rsi), %eax
	addl	(%r11,%rdx,4), %eax
	imull	%ebp, %r8d
	imull	%ebx, %r8d
	addl	%r8d, %eax
	cmpl	%edx, %edi
	cmove	%eax, %ecx
	addq	$1, %rdx
	addq	$4000, %rsi
.L15:
	cmpl	%eax, %ecx
	movl	%eax, (%r9)
	leal	-1(%rdx), %r8d
	cmovle	%ecx, %eax
	cmpl	%edi, %r8d
	cmovg	%eax, %ecx
	cmpl	%r10d, %edx
	jle	.L11
.L8:
	movl	%ecx, (%r9)
	addq	$1, %r13
	addq	$1, %r14
	addl	$1, %r10d
	addq	$4004, %r9
	addq	$4000, %r11
	cmpq	-40(%rsp), %r13
	jne	.L12
	addq	$1, -24(%rsp)
	subq	$4, %r15
	movq	-24(%rsp), %rax
	addq	$4, -32(%rsp)
	cmpq	-40(%rsp), %rax
	jne	.L13
.L14:
	movslq	-4(%rsp), %rdx
	leaq	m(%rip), %rax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	movl	4000(%rax,%rdx,4), %eax
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE24:
	.size	optimalParenthesization, .-optimalParenthesization
	.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:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	n(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L25
	leaq	p(%rip), %rbx
	movl	$1, %ebp
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L26:
	movq	%rbx, %rsi
	addq	$4, %rbx
	xorl	%eax, %eax
	movq	%r12, %rdi
	movq	%rbx, %rdx
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	cmpl	%ebp, n(%rip)
	jge	.L26
.L25:
	xorl	%eax, %eax
	call	optimalParenthesization
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	popq	%rbx
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.text
	.p2align 4
	.globl	min
	.type	min, @function
min:
.LFB25:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	jg	.L41
	movl	%esi, %r10d
	leal	1(%rdi), %esi
	leal	-1(%rdi), %eax
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movslq	%esi, %rdx
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	cltq
	leaq	m(%rip), %r11
	imulq	$1000, %rdx, %rcx
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	p(%rip), %rbp
	movslq	%edi, %r9
	movl	0(%rbp,%rax,4), %r13d
	movslq	%r10d, %rax
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	imulq	$4004, %r9, %rbx
	movl	0(%rbp,%rax,4), %r12d
	addq	%rax, %rcx
	movl	(%r11,%rcx,4), %r8d
	movl	0(%rbp,%r9,4), %ecx
	addl	(%r11,%rbx), %r8d
	imulq	$1000, %r9, %rbx
	imull	%r13d, %ecx
	addq	%rax, %rbx
	imull	%r12d, %ecx
	addl	%ecx, %r8d
	movl	%r8d, (%r11,%rbx,4)
	cmpl	%esi, %r10d
	jl	.L29
	imulq	$4000, %r9, %r9
	leaq	(%r11,%rbx,4), %rsi
	addq	%r11, %r9
	jmp	.L33
	.p2align 4,,10
	.p2align 3
.L42:
	cmpl	%eax, %r8d
	movl	%eax, %ecx
	cmovle	%r8d, %ecx
	cmpl	%edx, %edi
	cmovl	%ecx, %r8d
.L32:
	addq	$1, %rdx
	movl	%eax, (%r11,%rbx,4)
	addq	$4000, %rsi
	cmpl	%edx, %r10d
	jl	.L29
.L33:
	movl	0(%rbp,%rdx,4), %ecx
	movl	8000(%rsi), %eax
	addl	(%r9,%rdx,4), %eax
	imull	%r13d, %ecx
	imull	%r12d, %ecx
	addl	%ecx, %eax
	cmpl	%edx, %edi
	jne	.L42
	movl	%eax, %r8d
	jmp	.L32
	.p2align 4,,10
	.p2align 3
.L29:
	popq	%rbx
	.cfi_def_cfa_offset 32
	movl	%r8d, %eax
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L41:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE25:
	.size	min, .-min
	.globl	p
	.bss
	.align 32
	.type	p, @object
	.size	p, 4000
p:
	.zero	4000
	.globl	m
	.align 32
	.type	m, @object
	.size	m, 4000000
m:
	.zero	4000000
	.globl	n
	.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 max 1000
int n;
 int m[max][max],p[max];


int main(){
  int c,r;
  int i,k;
 
  scanf("%d",&n);
  for(i=1;i<n+1;i++){
    scanf("%d %d",&p[i-1],&p[i]);
  }
  printf("%d\n", optimalParenthesization());
}

int optimalParenthesization(){
  int l,i,j;
  for(i=1;i<n+1;i++) m[i][i]=0;
  for(l=2;l<n+1;l++){  
    for(i=1;i<n+1;i++){
       j = i + l -1;
       
      m[i][j] = min(i,j);
    }
  }
 
  return m[1][n];
}
int min(int i,int j){
  int min,k;
  for(k=i; k<=j; k++){
    m[i][j] = m[i][k] + m[k+1][j] +p[i-1]*p[k]*p[j];
    
    if(k==i) min = m[i][j];
    if(k>i && m[i][j] < min) min = m[i][j];
  }
  // printf("i = %d,j = %d,%d\n",i,j,min);
  return min;
}


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 max 1000
int n;
 int m[max][max],p[max];


int main(){
  int c,r;
  int i,k;
 
  scanf("%d",&n);
  for(i=1;i<n+1;i++){
    scanf("%d %d",&p[i-1],&p[i]);
  }
  printf("%d\n", optimalParenthesization());
}

int optimalParenthesization(){
  int l,i,j;
  for(i=1;i<n+1;i++) m[i][i]=0;
  for(l=2;l<n+1;l++){  
    for(i=1;i<n+1;i++){
       j = i + l -1;
       
      m[i][j] = min(i,j);
    }
  }
 
  return m[1][n];
}
int min(int i,int j){
  int min,k;
  for(k=i; k<=j; k++){
    m[i][j] = m[i][k] + m[k+1][j] +p[i-1]*p[k]*p[j];
    
    if(k==i) min = m[i][j];
    if(k>i && m[i][j] < min) min = m[i][j];
  }
  // printf("i = %d,j = %d,%d\n",i,j,min);
  return min;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	m
	.align 32
	.type	m, @object
	.size	m, 4000000
m:
	.zero	4000000
	.globl	p
	.align 32
	.type	p, @object
	.size	p, 4000
p:
	.zero	4000
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -4(%rbp)
	jmp	.L2
.L3:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	p(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -4(%rbp)
.L2:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jle	.L3
	movl	$0, %eax
	call	optimalParenthesization
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	optimalParenthesization
	.type	optimalParenthesization, @function
optimalParenthesization:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$1, -8(%rbp)
	jmp	.L6
.L7:
	movl	-8(%rbp), %eax
	cltq
	imulq	$4004, %rax, %rax
	leaq	m(%rip), %rdx
	movl	$0, (%rax,%rdx)
	addl	$1, -8(%rbp)
.L6:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L7
	movl	$2, -12(%rbp)
	jmp	.L8
.L11:
	movl	$1, -8(%rbp)
	jmp	.L9
.L10:
	movl	-8(%rbp), %edx
	movl	-12(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	movl	$0, %eax
	call	min
	movl	-4(%rbp), %edx
	movslq	%edx, %rcx
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$1000, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	m(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -8(%rbp)
.L9:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L10
	addl	$1, -12(%rbp)
.L8:
	movl	n(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jle	.L11
	movl	n(%rip), %eax
	cltq
	addq	$1000, %rax
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	(%rdx,%rax), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	optimalParenthesization, .-optimalParenthesization
	.globl	min
	.type	min, @function
min:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L14
.L17:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-4(%rbp), %eax
	leal	1(%rax), %edx
	movl	-24(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rax
	imulq	$1000, %rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	(%rcx,%rax), %esi
	movl	-20(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	p(%rip), %rax
	movl	(%rcx,%rax), %eax
	imull	%eax, %edx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	p(%rip), %rax
	movl	(%rcx,%rax), %eax
	imull	%edx, %eax
	leal	(%rsi,%rax), %ecx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jne	.L15
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -8(%rbp)
.L15:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jle	.L16
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L16
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -8(%rbp)
.L16:
	addl	$1, -4(%rbp)
.L14:
	movl	-4(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L17
	movl	-8(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	min, .-min
	.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
	.globl	m
	.align 32
	.type	m, @object
	.size	m, 4000000
m:
	.zero	4000000
	.globl	p
	.align 32
	.type	p, @object
	.size	p, 4000
p:
	.zero	4000
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -4(%rbp)
	jmp	.L2
.L3:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	p(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -4(%rbp)
.L2:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jle	.L3
	movl	$0, %eax
	call	optimalParenthesization
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	optimalParenthesization
	.type	optimalParenthesization, @function
optimalParenthesization:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$1, -8(%rbp)
	jmp	.L6
.L7:
	movl	-8(%rbp), %eax
	cltq
	imulq	$4004, %rax, %rax
	leaq	m(%rip), %rdx
	movl	$0, (%rax,%rdx)
	addl	$1, -8(%rbp)
.L6:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L7
	movl	$2, -12(%rbp)
	jmp	.L8
.L11:
	movl	$1, -8(%rbp)
	jmp	.L9
.L10:
	movl	-8(%rbp), %edx
	movl	-12(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	movl	$0, %eax
	call	min
	movl	-4(%rbp), %edx
	movslq	%edx, %rcx
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$1000, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	m(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -8(%rbp)
.L9:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L10
	addl	$1, -12(%rbp)
.L8:
	movl	n(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jle	.L11
	movl	n(%rip), %eax
	cltq
	addq	$1000, %rax
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	(%rdx,%rax), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	optimalParenthesization, .-optimalParenthesization
	.globl	min
	.type	min, @function
min:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L14
.L17:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-4(%rbp), %eax
	leal	1(%rax), %edx
	movl	-24(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rax
	imulq	$1000, %rax, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	(%rcx,%rax), %esi
	movl	-20(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	p(%rip), %rax
	movl	(%rcx,%rax), %eax
	imull	%eax, %edx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	p(%rip), %rax
	movl	(%rcx,%rax), %eax
	imull	%edx, %eax
	leal	(%rsi,%rax), %ecx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jne	.L15
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -8(%rbp)
.L15:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jle	.L16
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L16
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	$1000, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	m(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -8(%rbp)
.L16:
	addl	$1, -4(%rbp)
.L14:
	movl	-4(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L17
	movl	-8(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	min, .-min
	.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:
