user: 请从给定的汇编指令推导出C源代码:

```asm
<Matinv>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  push   %rbx
  mov    %esi,%ebx
  mov    $0x4,%esi
  mov    %ebx,%edi
  sub    $0x48,%rsp
  call   <mCalloc@plt>
  mov    %rax,0x38(%rsp)
  test   %ebx,%ebx
  jle    L147
  movslq %r12d,%rdi
  mov    %r13,0x18(%rsp)
  mov    %rax,%r14
  xor    %r15d,%r15d
  lea    0x8(,%rdi,8),%rsi
  mov    %rdi,0x28(%rsp)
  xor    %ebp,%ebp
  pxor   %xmm7,%xmm7
  mov    %rsi,0x30(%rsp)
  lea    0x0(,%rdi,8),%r11
  lea    0x8(%r13),%rsi
  movq   D11(%rip),%xmm4
  lea    -0x1(%r12),%edi
  mov    %rsi,0x8(%rsp)
  movsd  D29(%rip),%xmm6
  mov    %rdi,0x10(%rsp)
  movq   D40(%rip),%xmm5
  lea    (%rsi,%rdi,8),%r10
  movsd  D12(%rip),%xmm8
  mov    %r13,0x20(%rsp)
  xchg   %ax,%ax
L76:
  mov    0x18(%rsp),%rdx
  mov    %ebp,%eax
  movapd %xmm7,%xmm1
  nopl   0x0(%rax,%rax,1)
L7:
  movsd  (%rdx),%xmm0
  andpd  %xmm4,%xmm0
  comisd %xmm1,%xmm0
  jbe    L78
  mov    %eax,(%r14)
  movapd %xmm0,%xmm1
L78:
  add    $0x1,%eax
  add    %r11,%rdx
  cmp    %eax,%ebx
  jg     L7
  comisd %xmm1,%xmm6
  ja     L103
  mov    (%r14),%edx
  cmp    %ebp,%edx
  jne    L138
L33:
  mov    0x18(%rsp),%rax
  xor    %edi,%edi
  xor    %esi,%esi
  movapd %xmm8,%xmm3
  divsd  (%rax),%xmm3
  cs nopw 0x0(%rax,%rax,1)
L60:
  cmp    %ebp,%esi
  je     L139
  lea    0x0(%rbp,%rdi,1),%eax
  cltq
  lea    0x0(%r13,%rax,8),%r9
  movsd  (%r9),%xmm2
  mulsd  %xmm3,%xmm2
  test   %r12d,%r12d
  jle    L17
  mov    0x10(%rsp),%rcx
  movslq %edi,%r8
  lea    0x0(%r13,%r8,8),%rax
  lea    (%r8,%rcx,1),%rdx
  mov    0x8(%rsp),%rcx
  lea    (%rcx,%rdx,8),%rcx
  mov    %r15,%rdx
  sub    %r8,%rdx
  nopl   (%rax)
L115:
  movsd  (%rax,%rdx,8),%xmm1
  movsd  (%rax),%xmm0
  add    $0x8,%rax
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rax)
  cmp    %rax,%rcx
  jne    L115
L17:
  xorpd  %xmm5,%xmm2
  movsd  %xmm2,(%r9)
L139:
  lea    0x1(%rsi),%eax
  add    %r12d,%edi
  cmp    %eax,%ebx
  je     L169
  movslq %eax,%rsi
  jmp    L60
  nopw   0x0(%rax,%rax,1)
L169:
  mov    0x20(%rsp),%rax
  test   %r12d,%r12d
  jle    L126
  nopw   0x0(%rax,%rax,1)
L15:
  movsd  (%rax),%xmm0
  add    $0x8,%rax
  mulsd  %xmm3,%xmm0
  movsd  %xmm0,-0x8(%rax)
  cmp    %r10,%rax
  jne    L15
L126:
  mov    0x18(%rsp),%rdi
  mov    0x30(%rsp),%rcx
  lea    0x1(%rbp),%eax
  add    %r11,%r10
  add    %r11,0x20(%rsp)
  add    0x28(%rsp),%r15
  add    $0x4,%r14
  movsd  %xmm3,(%rdi)
  add    %rcx,%rdi
  mov    %rdi,0x18(%rsp)
  cmp    %ebp,%esi
  je     L197
  mov    %eax,%ebp
  jmp    L76
L138:
  test   %r12d,%r12d
  jle    L33
  imul   %r12d,%edx
  mov    0x20(%rsp),%rax
  movslq %edx,%rdx
  sub    %r15,%rdx
  nopl   0x0(%rax,%rax,1)
L166:
  movsd  (%rax),%xmm0
  movsd  (%rax,%rdx,8),%xmm1
  movsd  %xmm1,(%rax)
  movsd  %xmm0,(%rax,%rdx,8)
  add    $0x8,%rax
  cmp    %r10,%rax
  jne    L166
  jmp    L33
L197:
  mov    0x38(%rsp),%rax
  mov    0x28(%rsp),%rdi
  lea    0x0(%r13,%rsi,8),%r9
  lea    (%rax,%rsi,4),%r8
  shl    $0x3,%rdi
  nop
L130:
  movslq (%r8),%rcx
  cmp    %esi,%ecx
  je     L178
  mov    %r9,%rax
  xor    %edx,%edx
  sub    %rsi,%rcx
  nop
L42:
  movsd  (%rax),%xmm0
  movsd  (%rax,%rcx,8),%xmm1
  add    $0x1,%edx
  movsd  %xmm1,(%rax)
  movsd  %xmm0,(%rax,%rcx,8)
  add    %rdi,%rax
  cmp    %edx,%ebx
  jne    L42
L178:
  sub    $0x1,%rsi
  sub    $0x4,%r8
  sub    $0x8,%r9
  test   %esi,%esi
  jns    L130
L147:
  mov    0x38(%rsp),%rdi
  call   <Free@plt>
  add    $0x48,%rsp
  mov    $0x1,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L103:
  mov    0x38(%rsp),%rdi
  call   <Free@plt>
  lea    0x1(%rbp),%esi
  lea    D45(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D25(%rip),%rdi
  call   <puts@plt>
  add    $0x48,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D11
data_type: qword
name: extract_symbolic_data
arguments: tag: D29
data_type: byte[8]
name: extract_symbolic_data
arguments: tag: D40
data_type: f32[2]
name: extract_symbolic_data
arguments: tag: D12
data_type: f64
name: extract_symbolic_data
arguments: tag: D45
data_type: string
name: extract_symbolic_data
arguments: tag: D25
data_type: string

tool: D11: 9223372036854775807

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

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

tool: D12: 1

tool: D45: 
. Determinant becomes zero at %3d!	


tool: D25: 
. Cannot invert the matrix of eigen vectors.

assistant: ```c
int Matinv(double *x, int n, int m, double *space) {
  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);
      printf("\n. Determinant becomes zero at %3d!\t\n", i + 1);
      printf("\n. Cannot invert the matrix of eigen vectors.\n");
      return (0);
    }
    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);
}
```