user: Converte this assembly snippet into its equivalent C code:

```asm
<Matinv>:
  endbr64
  push   %r15
  mov    %esi,%r15d
  mov    $0x4,%esi
  push   %r14
  push   %r13
  mov    %edx,%r13d
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  mov    %r15d,%edi
  sub    $0x88,%rsp
  call   <mCalloc@plt>
  mov    %rax,0x30(%rsp)
  lea    -0x1(%r15),%eax
  mov    %eax,0x74(%rsp)
  test   %r15d,%r15d
  jle    L252
  movslq %r13d,%rax
  mov    %rbx,0x18(%rsp)
  mov    %r13d,%ebp
  mov    %rbx,%r12
  lea    0x8(,%rax,8),%rdi
  and    $0xfffffffe,%ebp
  mov    %rax,0x38(%rsp)
  lea    0x0(,%rax,8),%r11
  movslq %r15d,%rax
  mov    %rdi,0x40(%rsp)
  movq   D54(%rip),%xmm3
  pxor   %xmm7,%xmm7
  mov    %rax,0x48(%rsp)
  mov    %r13d,%eax
  movsd  D20(%rip),%xmm6
  shr    %eax
  movl   $0x0,0x4(%rsp)
  movsd  D9(%rip),%xmm5
  lea    -0x1(%rax),%r14d
  lea    -0x1(%r13),%eax
  movq   $0x8,0x8(%rsp)
  movq   D74(%rip),%xmm4
  mov    %eax,0x70(%rsp)
  add    $0x1,%r14
  mov    %rax,0x50(%rsp)
  lea    (%rbx,%rax,8),%rax
  shl    $0x4,%r14
  mov    %rax,0x78(%rsp)
  lea    0x8(%rbx),%rax
  movq   $0x0,0x20(%rsp)
  movq   $0x0,0x10(%rsp)
  mov    %rax,0x58(%rsp)
  nopl   0x0(%rax,%rax,1)
L130:
  mov    0x10(%rsp),%rdi
  mov    0x30(%rsp),%rsi
  movapd %xmm7,%xmm1
  mov    0x18(%rsp),%rcx
  mov    %edi,0x60(%rsp)
  mov    %edi,%eax
  lea    (%rsi,%rdi,4),%rdx
  nopl   (%rax)
L152:
  movsd  (%rcx),%xmm0
  andpd  %xmm3,%xmm0
  comisd %xmm1,%xmm0
  jbe    L298
  mov    %eax,(%rdx)
  movapd %xmm0,%xmm1
L298:
  add    $0x1,%eax
  add    %r11,%rcx
  cmp    %eax,%r15d
  jg     L152
  comisd %xmm1,%xmm6
  mov    0x60(%rsp),%eax
  lea    0x1(%rax),%esi
  ja     L455
L308:
  mov    0x10(%rsp),%rdi
  mov    (%rdx),%eax
  mov    %edi,%r9d
  cmp    %edi,%eax
  jne    L68
L311:
  mov    0x4(%rsp),%eax
  lea    0x0(%rbp,%rax,1),%edx
L284:
  mov    %r11,0x28(%rsp)
  movslq %edx,%rdx
  mov    0x18(%rsp),%rax
  xor    %ecx,%ecx
  lea    (%rbx,%rdx,8),%rsi
  xor    %edx,%edx
  movapd %xmm5,%xmm9
  divsd  (%rax),%xmm9
  nopl   0x0(%rax)
L262:
  cmp    %r9d,%ecx
  je     L56
  mov    0x60(%rsp),%eax
  add    %edx,%eax
  cltq
  lea    (%rbx,%rax,8),%rdi
  movsd  (%rdi),%xmm2
  mulsd  %xmm9,%xmm2
  test   %r13d,%r13d
  jle    L253
  movslq %edx,%r8
  lea    0x0(,%r8,8),%rax
  cmp    $0x1,%r13d
  je     L317
  cmp    0x8(%rsp),%rax
  je     L317
  movapd %xmm2,%xmm8
  add    %rbx,%rax
  xor    %r8d,%r8d
  unpcklpd %xmm8,%xmm8
  nopl   0x0(%rax,%rax,1)
L150:
  movupd (%r12,%r8,1),%xmm1
  movupd (%rax,%r8,1),%xmm0
  mulpd  %xmm8,%xmm1
  subpd  %xmm1,%xmm0
  movups %xmm0,(%rax,%r8,1)
  add    $0x10,%r8
  cmp    %r14,%r8
  jne    L150
  cmp    %r13d,%ebp
  je     L253
  movsd  (%rsi),%xmm1
  lea    (%rdx,%rbp,1),%eax
  cltq
  mulsd  %xmm2,%xmm1
  lea    (%rbx,%rax,8),%rax
  movsd  (%rax),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
L253:
  xorpd  %xmm4,%xmm2
  movsd  %xmm2,(%rdi)
L56:
  add    $0x1,%ecx
  add    %r13d,%edx
  cmp    %ecx,%r15d
  jne    L262
  mov    0x28(%rsp),%r11
  test   %r13d,%r13d
  jle    L424
  cmp    $0x1,%r13d
  je     L86
  movapd %xmm9,%xmm1
  lea    (%r14,%r12,1),%rdx
  mov    %r12,%rax
  unpcklpd %xmm1,%xmm1
  nopl   0x0(%rax,%rax,1)
L372:
  movupd (%rax),%xmm0
  add    $0x10,%rax
  mulpd  %xmm1,%xmm0
  movups %xmm0,-0x10(%rax)
  cmp    %rax,%rdx
  jne    L372
  mov    %ebp,%eax
  cmp    %r13d,%ebp
  je     L424
L14:
  add    0x4(%rsp),%eax
  cltq
  lea    (%rbx,%rax,8),%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm9,%xmm0
  movsd  %xmm0,(%rax)
L424:
  mov    0x18(%rsp),%rax
  mov    0x40(%rsp),%rsi
  add    %r11,%r12
  addq   $0x1,0x10(%rsp)
  mov    0x10(%rsp),%rdi
  movsd  %xmm9,(%rax)
  add    %rsi,%rax
  mov    0x38(%rsp),%rsi
  add    %r13d,0x4(%rsp)
  add    %rsi,0x20(%rsp)
  add    %r11,0x8(%rsp)
  mov    %rax,0x18(%rsp)
  cmp    0x48(%rsp),%rdi
  jne    L130
L59:
  cmp    $0x1,%r13d
  jne    L246
  movslq 0x74(%rsp),%rdi
  mov    0x30(%rsp),%rax
  mov    %r15d,%esi
  and    $0xfffffffe,%esi
  lea    (%rax,%rdi,4),%r10
  mov    %r15d,%eax
  mov    %rdi,%rcx
  shr    %eax
  lea    0x0(,%rdi,8),%r8
  lea    -0x1(%rax),%r9d
  mov    %edi,%eax
  add    $0x1,%r9
  lea    0x8(%rbx,%rax,8),%r13
  shl    $0x4,%r9
  nopl   0x0(%rax,%rax,1)
L119:
  mov    (%r10),%edx
  mov    %edi,%r11d
  cmp    %edi,%edx
  je     L7
  test   %r15d,%r15d
  jle    L7
  movslq %edx,%r12
  lea    0x0(,%r12,8),%rbp
  lea    0x10(%rbp),%rax
  cmp    %rax,%r8
  lea    0x10(%r8),%rax
  setge  %r14b
  cmp    %rbp,%rax
  setle  %al
  or     %r14b,%al
  je     L402
  cmp    $0x1,%ecx
  jbe    L402
  lea    (%rbx,%r8,1),%r12
  add    %rbx,%rbp
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L365:
  movupd (%r12,%rax,1),%xmm0
  movupd 0x0(%rbp,%rax,1),%xmm5
  movups %xmm5,(%r12,%rax,1)
  movups %xmm0,0x0(%rbp,%rax,1)
  add    $0x10,%rax
  cmp    %rax,%r9
  jne    L365
  cmp    %r15d,%esi
  je     L7
  lea    (%r11,%rsi,1),%eax
  cltq
  lea    (%rbx,%rax,8),%r11
  lea    (%rsi,%rdx,1),%eax
  cltq
  movsd  (%r11),%xmm0
  lea    (%rbx,%rax,8),%rax
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%r11)
  movsd  %xmm0,(%rax)
L7:
  sub    $0x1,%rdi
  sub    $0x4,%r10
  sub    $0x8,%r8
  test   %edi,%edi
  jns    L119
L142:
  mov    0x30(%rsp),%rdi
  call   <free@plt>
  add    $0x88,%rsp
  mov    $0x1,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L317:
  mov    0x50(%rsp),%r10
  mov    0x58(%rsp),%r11
  add    %rbx,%rax
  add    %r8,%r10
  lea    (%r11,%r10,8),%r11
  mov    0x20(%rsp),%r10
  sub    %r8,%r10
  nopl   0x0(%rax)
L171:
  movsd  (%rax,%r10,8),%xmm1
  movsd  (%rax),%xmm0
  add    $0x8,%rax
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rax)
  cmp    %r11,%rax
  jne    L171
  jmp    L253
L68:
  test   %r13d,%r13d
  jle    L311
  imul   %r13d,%eax
  mov    0x20(%rsp),%rsi
  shl    $0x3,%rsi
  movslq %eax,%rcx
  lea    0x10(,%rcx,8),%rdi
  lea    0x0(,%rcx,8),%rdx
  cmp    %rsi,%rdi
  mov    0x8(%rsp),%rsi
  setle  %dil
  add    $0x8,%rsi
  cmp    %rsi,%rdx
  setge  %sil
  or     %dil,%sil
  je     L321
  cmpl   $0x1,0x70(%rsp)
  jbe    L321
  add    %rbx,%rdx
  xor    %ecx,%ecx
  xchg   %ax,%ax
L400:
  movupd (%r12,%rcx,1),%xmm0
  movupd (%rdx,%rcx,1),%xmm2
  movups %xmm2,(%r12,%rcx,1)
  movups %xmm0,(%rdx,%rcx,1)
  add    $0x10,%rcx
  cmp    %r14,%rcx
  jne    L400
  mov    0x4(%rsp),%edi
  lea    0x0(%rbp,%rdi,1),%edx
  cmp    %r13d,%ebp
  je     L284
  add    %ebp,%eax
  movslq %edx,%rcx
  cltq
  lea    (%rbx,%rcx,8),%rcx
  lea    (%rbx,%rax,8),%rax
  movsd  (%rcx),%xmm0
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%rcx)
  movsd  %xmm0,(%rax)
  jmp    L284
L455:
  mov    0x30(%rsp),%rdi
  mov    %r11,0x68(%rsp)
  mov    %rdx,0x28(%rsp)
  mov    %esi,0x64(%rsp)
  call   <free@plt>
  mov    0x64(%rsp),%esi
  lea    D88(%rip),%rdi
  call   <Exit@plt>
  mov    D9(%rip),%rax
  mov    0x68(%rsp),%r11
  pxor   %xmm7,%xmm7
  movq   D74(%rip),%xmm4
  movq   D54(%rip),%xmm3
  movq   %rax,%xmm5
  mov    D20(%rip),%rax
  mov    0x28(%rsp),%rdx
  movq   %rax,%xmm6
  jmp    L308
L86:
  xor    %eax,%eax
  jmp    L14
L402:
  mov    %r12,%rdx
  lea    (%rbx,%r8,1),%rax
  lea    0x0(%r13,%r8,1),%r11
  sub    %rdi,%rdx
  nopl   0x0(%rax,%rax,1)
L51:
  movsd  (%rax),%xmm0
  movsd  (%rax,%rdx,8),%xmm1
  movsd  %xmm1,(%rax)
  movsd  %xmm0,(%rax,%rdx,8)
  add    $0x8,%rax
  cmp    %rax,%r11
  jne    L51
  jmp    L7
L321:
  mov    0x8(%rsp),%rdx
  mov    %r12,%rax
  add    0x78(%rsp),%rdx
  sub    0x20(%rsp),%rcx
  nopw   0x0(%rax,%rax,1)
L73:
  movsd  (%rax),%xmm0
  movsd  (%rax,%rcx,8),%xmm1
  movsd  %xmm1,(%rax)
  movsd  %xmm0,(%rax,%rcx,8)
  add    $0x8,%rax
  cmp    %rdx,%rax
  jne    L73
  jmp    L311
L246:
  mov    0x30(%rsp),%rax
  movslq 0x74(%rsp),%rdi
  lea    (%rax,%rdi,4),%r8
  movslq %r13d,%rax
  shl    $0x3,%rax
L373:
  movslq (%r8),%rsi
  cmp    %edi,%esi
  je     L242
  test   %r15d,%r15d
  jle    L242
  lea    (%rbx,%rdi,8),%rdx
  xor    %ecx,%ecx
  sub    %rdi,%rsi
  nopw   0x0(%rax,%rax,1)
L357:
  movsd  (%rdx),%xmm0
  movsd  (%rdx,%rsi,8),%xmm1
  add    $0x1,%ecx
  movsd  %xmm1,(%rdx)
  movsd  %xmm0,(%rdx,%rsi,8)
  add    %rax,%rdx
  cmp    %ecx,%r15d
  jne    L357
L242:
  sub    $0x1,%rdi
  sub    $0x4,%r8
  test   %edi,%edi
  jns    L373
  jmp    L142
L252:
  mov    0x74(%rsp),%eax
  test   %eax,%eax
  js     L142
  jmp    L59
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D54
data_type: qword
name: extract_symbolic_data
arguments: data_label: D20
data_type: byte[8]
name: extract_symbolic_data
arguments: data_label: D9
data_type: f64
name: extract_symbolic_data
arguments: data_label: D74
data_type: f32[2]
name: extract_symbolic_data
arguments: data_label: D88
data_type: string

tool: D54: 9223372036854775807

tool: {"D20": [0xbb,0xbd,0xd7,0xd9,0xdf,0x7c,0xdb,0x3d]}

tool: D9: 1

tool: {"D74": [0.0,-0.0]}

tool: D88: Cannot invert the matrix of eigen vectors : determinant becomes zero at %3d.

assistant: ```c
int Matinv(double *x, int n, int m) {
  int i, j, k;
  int *irow;
  double ee, t, t1, xmax;
  double det;
  ee = 1.0E-10;
  det = 1.0;
  irow = (int *)mCalloc(n, sizeof(int));
  for (i = 0; i < n; i++) {
    xmax = 0.;
    for (j = i; j < n; j++)
      if (xmax < fabs(x[j * m + i])) {
        xmax = fabs(x[j * m + i]);
        irow[i] = j;
      }
    det *= xmax;
    if (xmax < ee) {
      free(irow);
      Exit((char *)"Cannot invert the matrix of eigen vectors : determinant becomes zero at %3d.", i + 1);
    }
    if (irow[i] != i) {
      for (j = 0; j < m; j++) {
        t = x[i * m + j];
        x[i * m + j] = x[irow[i] * m + j];
        x[irow[i] * m + j] = t;
      }
    }
    t = 1. / x[i * m + i];
    for (j = 0; j < n; j++) {
      if (j == i)
        continue;
      t1 = t * x[j * m + i];
      for (k = 0; k < m; k++)
        x[j * m + k] -= t1 * x[i * m + k];
      x[j * m + i] = -t1;
    }
    for (j = 0; j < m; j++)
      x[i * m + j] *= t;
    x[i * m + i] = t;
  }
  for (i = n - 1; i >= 0; i--) {
    if (irow[i] == i)
      continue;
    for (j = 0; j < n; j++) {
      t = x[j * m + i];
      x[j * m + i] = x[j * m + irow[i]];
      x[j * m + irow[i]] = t;
    }
  }
  free(irow);
  return (1);
}
```