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 100
#define INFTY (1<<21)
#define WHITE 0
#define GRAY 1
#define BLACK 2

int n,M[MAX][MAX];

int prim(){
  int i,v,u,minv;
  int d[MAX],p[MAX],color[MAX];

  for(i = 0;i<n;i++){
    d[i] = INFTY;
    p[i] = -1;
    color[i] = WHITE;
  }

  d[0] = 0;

  while(1){
    minv = INFTY;
    u = -1;
    for(i = 0; i<n; i++){
      if(minv>d[i] && color[i]!=BLACK){
	u = i;
	minv = d[i];
      }
    }
    if(u == -1) break;
    color[u] = BLACK;
    for(v = 0; v < n; v++){
      if(color[v] != BLACK && M[u][v] != INFTY){
	if(d[v] > M[u][v]){
	  d[v] = M[u][v];
	  p[v] = u;
	  color[v] = GRAY;
	}
      }
    }
  }
  int sum = 0;
  for(i = 0; i<n; i++){
    if(p[i]!=-1) sum+=M[i][p[i]];
  }
  return sum;
}

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

  for(i = 0; i<n;i++){
    for(j = 0; j<n; j++){
      int e;
      scanf("%d",&e);
      M[i][j] = (e==-1)?INFTY:e;
    }
  }

  printf("%d\n",prim());

  return 0;
}



```

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, 40000
M:
	.zero	40000
	.text
	.globl	prim
	.type	prim, @function
prim:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$1248, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -1236(%rbp)
	jmp	.L2
.L3:
	movl	-1236(%rbp), %eax
	cltq
	movl	$2097152, -1216(%rbp,%rax,4)
	movl	-1236(%rbp), %eax
	cltq
	movl	$-1, -816(%rbp,%rax,4)
	movl	-1236(%rbp), %eax
	cltq
	movl	$0, -416(%rbp,%rax,4)
	addl	$1, -1236(%rbp)
.L2:
	movl	n(%rip), %eax
	cmpl	%eax, -1236(%rbp)
	jl	.L3
	movl	$0, -1216(%rbp)
.L12:
	movl	$2097152, -1224(%rbp)
	movl	$-1, -1228(%rbp)
	movl	$0, -1236(%rbp)
	jmp	.L4
.L6:
	movl	-1236(%rbp), %eax
	cltq
	movl	-1216(%rbp,%rax,4), %eax
	cmpl	%eax, -1224(%rbp)
	jle	.L5
	movl	-1236(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	$2, %eax
	je	.L5
	movl	-1236(%rbp), %eax
	movl	%eax, -1228(%rbp)
	movl	-1236(%rbp), %eax
	cltq
	movl	-1216(%rbp,%rax,4), %eax
	movl	%eax, -1224(%rbp)
.L5:
	addl	$1, -1236(%rbp)
.L4:
	movl	n(%rip), %eax
	cmpl	%eax, -1236(%rbp)
	jl	.L6
	cmpl	$-1, -1228(%rbp)
	je	.L19
	movl	-1228(%rbp), %eax
	cltq
	movl	$2, -416(%rbp,%rax,4)
	movl	$0, -1232(%rbp)
	jmp	.L9
.L11:
	movl	-1232(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	$2, %eax
	je	.L10
	movl	-1232(%rbp), %eax
	movslq	%eax, %rcx
	movl	-1228(%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	M(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$2097152, %eax
	je	.L10
	movl	-1232(%rbp), %eax
	cltq
	movl	-1216(%rbp,%rax,4), %ecx
	movl	-1232(%rbp), %eax
	movslq	%eax, %rsi
	movl	-1228(%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	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	M(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jle	.L10
	movl	-1232(%rbp), %eax
	movslq	%eax, %rcx
	movl	-1228(%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	M(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-1232(%rbp), %eax
	cltq
	movl	%edx, -1216(%rbp,%rax,4)
	movl	-1232(%rbp), %eax
	cltq
	movl	-1228(%rbp), %edx
	movl	%edx, -816(%rbp,%rax,4)
	movl	-1232(%rbp), %eax
	cltq
	movl	$1, -416(%rbp,%rax,4)
.L10:
	addl	$1, -1232(%rbp)
.L9:
	movl	n(%rip), %eax
	cmpl	%eax, -1232(%rbp)
	jl	.L11
	jmp	.L12
.L19:
	nop
	movl	$0, -1220(%rbp)
	movl	$0, -1236(%rbp)
	jmp	.L13
.L15:
	movl	-1236(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	cmpl	$-1, %eax
	je	.L14
	movl	-1236(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	movslq	%eax, %rcx
	movl	-1236(%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	M(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, -1220(%rbp)
.L14:
	addl	$1, -1236(%rbp)
.L13:
	movl	n(%rip), %eax
	cmpl	%eax, -1236(%rbp)
	jl	.L15
	movl	-1220(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	prim, .-prim
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.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	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L21
.L26:
	movl	$0, -12(%rbp)
	jmp	.L22
.L25:
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %eax
	cmpl	$-1, %eax
	je	.L23
	movl	-20(%rbp), %edx
	jmp	.L24
.L23:
	movl	$2097152, %edx
.L24:
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movl	-16(%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	M(%rip), %rax
	movl	%edx, (%rcx,%rax)
	addl	$1, -12(%rbp)
.L22:
	movl	n(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L25
	addl	$1, -16(%rbp)
.L21:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L26
	movl	$0, %eax
	call	prim
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L28
	call	__stack_chk_fail@PLT
.L28:
	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	prim
	.type	prim, @function
prim:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$1224, %rsp
	.cfi_def_cfa_offset 1248
	movl	n(%rip), %ebx
	movq	%fs:40, %rax
	movq	%rax, 1208(%rsp)
	xorl	%eax, %eax
	testl	%ebx, %ebx
	jle	.L2
	leal	-1(%rbx), %eax
	cmpl	$2, %eax
	jbe	.L15
	movl	%ebx, %edx
	movdqa	.LC0(%rip), %xmm0
	movq	%rsp, %rax
	shrl	$2, %edx
	subl	$1, %edx
	salq	$4, %rdx
	leaq	16(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L4:
	movaps	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L4
	movl	%ebx, %eax
	andl	$-4, %eax
	testb	$3, %bl
	je	.L5
.L3:
	movslq	%eax, %rdx
	movl	$2097152, (%rsp,%rdx,4)
	leal	1(%rax), %edx
	cmpl	%ebx, %edx
	jge	.L5
	movslq	%edx, %rdx
	addl	$2, %eax
	movl	$2097152, (%rsp,%rdx,4)
	cmpl	%eax, %ebx
	jle	.L5
	cltq
	movl	$2097152, (%rsp,%rax,4)
.L5:
	movl	%ebx, %r12d
	leaq	400(%rsp), %rdi
	movl	$255, %esi
	salq	$2, %r12
	movq	%r12, %rdx
	call	memset@PLT
	leaq	800(%rsp), %rdi
	movq	%r12, %rdx
	xorl	%esi, %esi
	call	memset@PLT
.L2:
	movl	$0, (%rsp)
	movslq	%ebx, %rsi
	movq	%rsp, %r8
	leaq	800(%rsp), %rdi
	leaq	M(%rip), %r10
	testl	%ebx, %ebx
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L30:
	xorl	%eax, %eax
	movl	$2097152, %ecx
	movl	$-1, %r9d
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%r8,%rax,4), %edx
	cmpl	%edx, %ecx
	jle	.L7
	cmpl	$2, (%rdi,%rax,4)
	cmovne	%edx, %ecx
	cmovne	%eax, %r9d
.L7:
	addq	$1, %rax
	cmpq	%rsi, %rax
	jne	.L8
	cmpl	$-1, %r9d
	je	.L17
	movslq	%r9d, %rax
	movl	$2, 800(%rsp,%rax,4)
	leaq	(%rax,%rax,4), %rax
	leaq	(%rax,%rax,4), %rcx
	xorl	%eax, %eax
	salq	$4, %rcx
	addq	%r10, %rcx
	.p2align 4,,10
	.p2align 3
.L11:
	cmpl	$2, (%rdi,%rax,4)
	je	.L10
	movl	(%rcx,%rax,4), %edx
	cmpl	$2097152, %edx
	je	.L10
	cmpl	(%r8,%rax,4), %edx
	jge	.L10
	movl	%edx, (%r8,%rax,4)
	movl	%r9d, 400(%rsp,%rax,4)
	movl	$1, (%rdi,%rax,4)
.L10:
	addq	$1, %rax
	cmpq	%rsi, %rax
	jne	.L11
	testl	%ebx, %ebx
	jg	.L30
.L16:
	xorl	%r8d, %r8d
.L1:
	movq	1208(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	addq	$1224, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	movl	%r8d, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L17:
	.cfi_restore_state
	xorl	%eax, %eax
	xorl	%r8d, %r8d
	leaq	400(%rsp), %rdi
	leaq	M(%rip), %r9
	.p2align 4,,10
	.p2align 3
.L9:
	movslq	(%rdi,%rax,4), %rdx
	cmpl	$-1, %edx
	je	.L13
	movslq	%eax, %rcx
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%rdx,%rcx,4), %rdx
	addl	(%r9,%rdx,4), %r8d
.L13:
	addq	$1, %rax
	cmpq	%rsi, %rax
	jne	.L9
	jmp	.L1
.L15:
	xorl	%eax, %eax
	jmp	.L3
.L31:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	prim, .-prim
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	n(%rip), %rsi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L34
	leaq	M(%rip), %rbp
	xorl	%r14d, %r14d
	leaq	4(%rsp), %r13
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L39:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	cmpl	$-1, %eax
	je	.L35
	movl	%eax, 0(%rbp,%rbx,4)
	movl	n(%rip), %eax
	addq	$1, %rbx
	cmpl	%ebx, %eax
	jg	.L39
	addl	$1, %r14d
	cmpl	%r14d, %eax
	jle	.L34
.L40:
	addq	$400, %rbp
	xorl	%ebx, %ebx
	jmp	.L39
	.p2align 4,,10
	.p2align 3
.L35:
	movl	n(%rip), %eax
	movl	$2097152, 0(%rbp,%rbx,4)
	addq	$1, %rbx
	cmpl	%ebx, %eax
	jg	.L39
	addl	$1, %r14d
	cmpl	%r14d, %eax
	jg	.L40
.L34:
	xorl	%eax, %eax
	call	prim
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L44
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L44:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	M
	.bss
	.align 32
	.type	M, @object
	.size	M, 40000
M:
	.zero	40000
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	2097152
	.long	2097152
	.long	2097152
	.long	2097152
	.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	prim
	.type	prim, @function
prim:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$1224, %rsp
	.cfi_def_cfa_offset 1248
	movl	n(%rip), %ebx
	movq	%fs:40, %rax
	movq	%rax, 1208(%rsp)
	xorl	%eax, %eax
	testl	%ebx, %ebx
	jle	.L2
	leal	-1(%rbx), %eax
	cmpl	$2, %eax
	jbe	.L15
	movl	%ebx, %edx
	movdqa	.LC0(%rip), %xmm0
	movq	%rsp, %rax
	shrl	$2, %edx
	subl	$1, %edx
	salq	$4, %rdx
	leaq	16(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L4:
	movaps	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L4
	movl	%ebx, %eax
	andl	$-4, %eax
	testb	$3, %bl
	je	.L5
.L3:
	movslq	%eax, %rdx
	movl	$2097152, (%rsp,%rdx,4)
	leal	1(%rax), %edx
	cmpl	%ebx, %edx
	jge	.L5
	movslq	%edx, %rdx
	addl	$2, %eax
	movl	$2097152, (%rsp,%rdx,4)
	cmpl	%eax, %ebx
	jle	.L5
	cltq
	movl	$2097152, (%rsp,%rax,4)
.L5:
	movl	%ebx, %r12d
	leaq	400(%rsp), %rdi
	movl	$255, %esi
	salq	$2, %r12
	movq	%r12, %rdx
	call	memset@PLT
	leaq	800(%rsp), %rdi
	movq	%r12, %rdx
	xorl	%esi, %esi
	call	memset@PLT
.L2:
	movl	$0, (%rsp)
	movslq	%ebx, %rsi
	movq	%rsp, %r8
	leaq	800(%rsp), %rdi
	leaq	M(%rip), %r10
	testl	%ebx, %ebx
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L30:
	xorl	%eax, %eax
	movl	$2097152, %ecx
	movl	$-1, %r9d
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%r8,%rax,4), %edx
	cmpl	%edx, %ecx
	jle	.L7
	cmpl	$2, (%rdi,%rax,4)
	cmovne	%edx, %ecx
	cmovne	%eax, %r9d
.L7:
	addq	$1, %rax
	cmpq	%rsi, %rax
	jne	.L8
	cmpl	$-1, %r9d
	je	.L17
	movslq	%r9d, %rax
	movl	$2, 800(%rsp,%rax,4)
	leaq	(%rax,%rax,4), %rax
	leaq	(%rax,%rax,4), %rcx
	xorl	%eax, %eax
	salq	$4, %rcx
	addq	%r10, %rcx
	.p2align 4,,10
	.p2align 3
.L11:
	cmpl	$2, (%rdi,%rax,4)
	je	.L10
	movl	(%rcx,%rax,4), %edx
	cmpl	$2097152, %edx
	je	.L10
	cmpl	(%r8,%rax,4), %edx
	jge	.L10
	movl	%edx, (%r8,%rax,4)
	movl	%r9d, 400(%rsp,%rax,4)
	movl	$1, (%rdi,%rax,4)
.L10:
	addq	$1, %rax
	cmpq	%rsi, %rax
	jne	.L11
	testl	%ebx, %ebx
	jg	.L30
.L16:
	xorl	%r8d, %r8d
.L1:
	movq	1208(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	addq	$1224, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	movl	%r8d, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L17:
	.cfi_restore_state
	xorl	%eax, %eax
	xorl	%r8d, %r8d
	leaq	400(%rsp), %rdi
	leaq	M(%rip), %r9
	.p2align 4,,10
	.p2align 3
.L9:
	movslq	(%rdi,%rax,4), %rdx
	cmpl	$-1, %edx
	je	.L13
	movslq	%eax, %rcx
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%rdx,%rcx,4), %rdx
	addl	(%r9,%rdx,4), %r8d
.L13:
	addq	$1, %rax
	cmpq	%rsi, %rax
	jne	.L9
	jmp	.L1
.L15:
	xorl	%eax, %eax
	jmp	.L3
.L31:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	prim, .-prim
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	n(%rip), %rsi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L34
	leaq	M(%rip), %rbp
	xorl	%r14d, %r14d
	leaq	4(%rsp), %r13
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L39:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	cmpl	$-1, %eax
	je	.L35
	movl	%eax, 0(%rbp,%rbx,4)
	movl	n(%rip), %eax
	addq	$1, %rbx
	cmpl	%ebx, %eax
	jg	.L39
	addl	$1, %r14d
	cmpl	%r14d, %eax
	jle	.L34
.L40:
	addq	$400, %rbp
	xorl	%ebx, %ebx
	jmp	.L39
	.p2align 4,,10
	.p2align 3
.L35:
	movl	n(%rip), %eax
	movl	$2097152, 0(%rbp,%rbx,4)
	addq	$1, %rbx
	cmpl	%ebx, %eax
	jg	.L39
	addl	$1, %r14d
	cmpl	%r14d, %eax
	jg	.L40
.L34:
	xorl	%eax, %eax
	call	prim
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L44
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L44:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	M
	.bss
	.align 32
	.type	M, @object
	.size	M, 40000
M:
	.zero	40000
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	2097152
	.long	2097152
	.long	2097152
	.long	2097152
	.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 100
#define INFTY (1<<21)
#define WHITE 0
#define GRAY 1
#define BLACK 2

int n,M[MAX][MAX];

int prim(){
  int i,v,u,minv;
  int d[MAX],p[MAX],color[MAX];

  for(i = 0;i<n;i++){
    d[i] = INFTY;
    p[i] = -1;
    color[i] = WHITE;
  }

  d[0] = 0;

  while(1){
    minv = INFTY;
    u = -1;
    for(i = 0; i<n; i++){
      if(minv>d[i] && color[i]!=BLACK){
	u = i;
	minv = d[i];
      }
    }
    if(u == -1) break;
    color[u] = BLACK;
    for(v = 0; v < n; v++){
      if(color[v] != BLACK && M[u][v] != INFTY){
	if(d[v] > M[u][v]){
	  d[v] = M[u][v];
	  p[v] = u;
	  color[v] = GRAY;
	}
      }
    }
  }
  int sum = 0;
  for(i = 0; i<n; i++){
    if(p[i]!=-1) sum+=M[i][p[i]];
  }
  return sum;
}

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

  for(i = 0; i<n;i++){
    for(j = 0; j<n; j++){
      int e;
      scanf("%d",&e);
      M[i][j] = (e==-1)?INFTY:e;
    }
  }

  printf("%d\n",prim());

  return 0;
}




5
 -1 2 3 1 -1
 2 -1 -1 4 -1
 3 -1 -1 1 1
 1 4 1 -1 3
 -1 -1 1 3 -1

5

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 100
#define INFTY (1<<21)
#define WHITE 0
#define GRAY 1
#define BLACK 2

int n,M[MAX][MAX];

int prim(){
  int i,v,u,minv;
  int d[MAX],p[MAX],color[MAX];

  for(i = 0;i<n;i++){
    d[i] = INFTY;
    p[i] = -1;
    color[i] = WHITE;
  }

  d[0] = 0;

  while(1){
    minv = INFTY;
    u = -1;
    for(i = 0; i<n; i++){
      if(minv>d[i] && color[i]!=BLACK){
	u = i;
	minv = d[i];
      }
    }
    if(u == -1) break;
    color[u] = BLACK;
    for(v = 0; v < n; v++){
      if(color[v] != BLACK && M[u][v] != INFTY){
	if(d[v] > M[u][v]){
	  d[v] = M[u][v];
	  p[v] = u;
	  color[v] = GRAY;
	}
      }
    }
  }
  int sum = 0;
  for(i = 0; i<n; i++){
    if(p[i]!=-1) sum+=M[i][p[i]];
  }
  return sum;
}

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

  for(i = 0; i<n;i++){
    for(j = 0; j<n; j++){
      int e;
      scanf("%d",&e);
      M[i][j] = (e==-1)?INFTY:e;
    }
  }

  printf("%d\n",prim());

  return 0;
}



```

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, 40000
M:
	.zero	40000
	.text
	.globl	prim
	.type	prim, @function
prim:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$1248, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -1236(%rbp)
	jmp	.L2
.L3:
	movl	-1236(%rbp), %eax
	cltq
	movl	$2097152, -1216(%rbp,%rax,4)
	movl	-1236(%rbp), %eax
	cltq
	movl	$-1, -816(%rbp,%rax,4)
	movl	-1236(%rbp), %eax
	cltq
	movl	$0, -416(%rbp,%rax,4)
	addl	$1, -1236(%rbp)
.L2:
	movl	n(%rip), %eax
	cmpl	%eax, -1236(%rbp)
	jl	.L3
	movl	$0, -1216(%rbp)
.L12:
	movl	$2097152, -1224(%rbp)
	movl	$-1, -1228(%rbp)
	movl	$0, -1236(%rbp)
	jmp	.L4
.L6:
	movl	-1236(%rbp), %eax
	cltq
	movl	-1216(%rbp,%rax,4), %eax
	cmpl	%eax, -1224(%rbp)
	jle	.L5
	movl	-1236(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	$2, %eax
	je	.L5
	movl	-1236(%rbp), %eax
	movl	%eax, -1228(%rbp)
	movl	-1236(%rbp), %eax
	cltq
	movl	-1216(%rbp,%rax,4), %eax
	movl	%eax, -1224(%rbp)
.L5:
	addl	$1, -1236(%rbp)
.L4:
	movl	n(%rip), %eax
	cmpl	%eax, -1236(%rbp)
	jl	.L6
	cmpl	$-1, -1228(%rbp)
	je	.L19
	movl	-1228(%rbp), %eax
	cltq
	movl	$2, -416(%rbp,%rax,4)
	movl	$0, -1232(%rbp)
	jmp	.L9
.L11:
	movl	-1232(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	$2, %eax
	je	.L10
	movl	-1232(%rbp), %eax
	movslq	%eax, %rcx
	movl	-1228(%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	M(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$2097152, %eax
	je	.L10
	movl	-1232(%rbp), %eax
	cltq
	movl	-1216(%rbp,%rax,4), %ecx
	movl	-1232(%rbp), %eax
	movslq	%eax, %rsi
	movl	-1228(%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	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	M(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jle	.L10
	movl	-1232(%rbp), %eax
	movslq	%eax, %rcx
	movl	-1228(%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	M(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-1232(%rbp), %eax
	cltq
	movl	%edx, -1216(%rbp,%rax,4)
	movl	-1232(%rbp), %eax
	cltq
	movl	-1228(%rbp), %edx
	movl	%edx, -816(%rbp,%rax,4)
	movl	-1232(%rbp), %eax
	cltq
	movl	$1, -416(%rbp,%rax,4)
.L10:
	addl	$1, -1232(%rbp)
.L9:
	movl	n(%rip), %eax
	cmpl	%eax, -1232(%rbp)
	jl	.L11
	jmp	.L12
.L19:
	nop
	movl	$0, -1220(%rbp)
	movl	$0, -1236(%rbp)
	jmp	.L13
.L15:
	movl	-1236(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	cmpl	$-1, %eax
	je	.L14
	movl	-1236(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	movslq	%eax, %rcx
	movl	-1236(%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	M(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, -1220(%rbp)
.L14:
	addl	$1, -1236(%rbp)
.L13:
	movl	n(%rip), %eax
	cmpl	%eax, -1236(%rbp)
	jl	.L15
	movl	-1220(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	prim, .-prim
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.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	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L21
.L26:
	movl	$0, -12(%rbp)
	jmp	.L22
.L25:
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %eax
	cmpl	$-1, %eax
	je	.L23
	movl	-20(%rbp), %edx
	jmp	.L24
.L23:
	movl	$2097152, %edx
.L24:
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movl	-16(%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	M(%rip), %rax
	movl	%edx, (%rcx,%rax)
	addl	$1, -12(%rbp)
.L22:
	movl	n(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L25
	addl	$1, -16(%rbp)
.L21:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L26
	movl	$0, %eax
	call	prim
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L28
	call	__stack_chk_fail@PLT
.L28:
	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
	.globl	M
	.align 32
	.type	M, @object
	.size	M, 40000
M:
	.zero	40000
	.text
	.globl	prim
	.type	prim, @function
prim:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$1248, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -1236(%rbp)
	jmp	.L2
.L3:
	movl	-1236(%rbp), %eax
	cltq
	movl	$2097152, -1216(%rbp,%rax,4)
	movl	-1236(%rbp), %eax
	cltq
	movl	$-1, -816(%rbp,%rax,4)
	movl	-1236(%rbp), %eax
	cltq
	movl	$0, -416(%rbp,%rax,4)
	addl	$1, -1236(%rbp)
.L2:
	movl	n(%rip), %eax
	cmpl	%eax, -1236(%rbp)
	jl	.L3
	movl	$0, -1216(%rbp)
.L12:
	movl	$2097152, -1224(%rbp)
	movl	$-1, -1228(%rbp)
	movl	$0, -1236(%rbp)
	jmp	.L4
.L6:
	movl	-1236(%rbp), %eax
	cltq
	movl	-1216(%rbp,%rax,4), %eax
	cmpl	%eax, -1224(%rbp)
	jle	.L5
	movl	-1236(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	$2, %eax
	je	.L5
	movl	-1236(%rbp), %eax
	movl	%eax, -1228(%rbp)
	movl	-1236(%rbp), %eax
	cltq
	movl	-1216(%rbp,%rax,4), %eax
	movl	%eax, -1224(%rbp)
.L5:
	addl	$1, -1236(%rbp)
.L4:
	movl	n(%rip), %eax
	cmpl	%eax, -1236(%rbp)
	jl	.L6
	cmpl	$-1, -1228(%rbp)
	je	.L19
	movl	-1228(%rbp), %eax
	cltq
	movl	$2, -416(%rbp,%rax,4)
	movl	$0, -1232(%rbp)
	jmp	.L9
.L11:
	movl	-1232(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	$2, %eax
	je	.L10
	movl	-1232(%rbp), %eax
	movslq	%eax, %rcx
	movl	-1228(%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	M(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$2097152, %eax
	je	.L10
	movl	-1232(%rbp), %eax
	cltq
	movl	-1216(%rbp,%rax,4), %ecx
	movl	-1232(%rbp), %eax
	movslq	%eax, %rsi
	movl	-1228(%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	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	M(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jle	.L10
	movl	-1232(%rbp), %eax
	movslq	%eax, %rcx
	movl	-1228(%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	M(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-1232(%rbp), %eax
	cltq
	movl	%edx, -1216(%rbp,%rax,4)
	movl	-1232(%rbp), %eax
	cltq
	movl	-1228(%rbp), %edx
	movl	%edx, -816(%rbp,%rax,4)
	movl	-1232(%rbp), %eax
	cltq
	movl	$1, -416(%rbp,%rax,4)
.L10:
	addl	$1, -1232(%rbp)
.L9:
	movl	n(%rip), %eax
	cmpl	%eax, -1232(%rbp)
	jl	.L11
	jmp	.L12
.L19:
	nop
	movl	$0, -1220(%rbp)
	movl	$0, -1236(%rbp)
	jmp	.L13
.L15:
	movl	-1236(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	cmpl	$-1, %eax
	je	.L14
	movl	-1236(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	movslq	%eax, %rcx
	movl	-1236(%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	M(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, -1220(%rbp)
.L14:
	addl	$1, -1236(%rbp)
.L13:
	movl	n(%rip), %eax
	cmpl	%eax, -1236(%rbp)
	jl	.L15
	movl	-1220(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	prim, .-prim
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.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	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L21
.L26:
	movl	$0, -12(%rbp)
	jmp	.L22
.L25:
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %eax
	cmpl	$-1, %eax
	je	.L23
	movl	-20(%rbp), %edx
	jmp	.L24
.L23:
	movl	$2097152, %edx
.L24:
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movl	-16(%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	M(%rip), %rax
	movl	%edx, (%rcx,%rax)
	addl	$1, -12(%rbp)
.L22:
	movl	n(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L25
	addl	$1, -16(%rbp)
.L21:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L26
	movl	$0, %eax
	call	prim
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L28
	call	__stack_chk_fail@PLT
.L28:
	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:
