user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<Matinv>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  push   %rbp
  mov    %edx,%ebp
  push   %rbx
  mov    %esi,%ebx
  mov    $0x4,%esi
  mov    %ebx,%edi
  sub    $0x68,%rsp
  call   <mCalloc@plt>
  mov    %rax,0x28(%rsp)
  lea    -0x1(%rbx),%eax
  mov    %eax,0x5c(%rsp)
  test   %ebx,%ebx
  jle    L5
  movslq %ebp,%rax
  mov    %r13,0x18(%rsp)
  movq   D44(%rip),%xmm4
  xor    %r15d,%r15d
  lea    0x8(,%rax,8),%rdi
  mov    %rax,0x30(%rsp)
  lea    0x0(,%rax,8),%r14
  movsd  D52(%rip),%xmm7
  lea    -0x1(%rbp),%eax
  mov    %rdi,0x38(%rsp)
  lea    0x8(%r13),%rdi
  movsd  D10(%rip),%xmm6
  mov    %rax,0x10(%rsp)
  lea    (%rdi,%rax,8),%r12
  movslq %ebx,%rax
  movq   D11(%rip),%xmm5
  mov    %rdi,0x8(%rsp)
  pxor   %xmm8,%xmm8
  mov    %rax,0x40(%rsp)
  mov    %r13,0x20(%rsp)
  movq   $0x0,(%rsp)
  nopl   (%rax)
L93:
  mov    0x28(%rsp),%rdi
  mov    0x18(%rsp),%rcx
  mov    %r15d,%r8d
  mov    %r15d,%eax
  movapd %xmm8,%xmm1
  lea    (%rdi,%r15,4),%rdx
  nopl   0x0(%rax)
L189:
  movsd  (%rcx),%xmm0
  andpd  %xmm4,%xmm0
  comisd %xmm1,%xmm0
  jbe    L155
  mov    %eax,(%rdx)
  movapd %xmm0,%xmm1
L155:
  add    $0x1,%eax
  add    %r14,%rcx
  cmp    %eax,%ebx
  jg     L189
  comisd %xmm1,%xmm7
  lea    0x1(%r8),%esi
  ja     L208
L6:
  mov    (%rdx),%eax
  mov    %r15d,%r11d
  cmp    %r15d,%eax
  jne    L101
L47:
  mov    0x18(%rsp),%rax
  xor    %edi,%edi
  xor    %esi,%esi
  movapd %xmm6,%xmm3
  divsd  (%rax),%xmm3
  nopl   0x0(%rax,%rax,1)
L187:
  cmp    %r11d,%esi
  je     L198
  lea    (%rdi,%r8,1),%eax
  cltq
  lea    0x0(%r13,%rax,8),%r10
  movsd  (%r10),%xmm2
  mulsd  %xmm3,%xmm2
  test   %ebp,%ebp
  jle    L167
  mov    0x10(%rsp),%rcx
  movslq %edi,%r9
  lea    0x0(%r13,%r9,8),%rax
  lea    (%r9,%rcx,1),%rdx
  mov    0x8(%rsp),%rcx
  lea    (%rcx,%rdx,8),%rcx
  mov    (%rsp),%rdx
  sub    %r9,%rdx
  xchg   %ax,%ax
L20:
  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    L20
L167:
  xorpd  %xmm5,%xmm2
  movsd  %xmm2,(%r10)
L198:
  add    $0x1,%esi
  add    %ebp,%edi
  cmp    %esi,%ebx
  jne    L187
  mov    0x20(%rsp),%rax
  test   %ebp,%ebp
  jle    L99
  nopw   0x0(%rax,%rax,1)
L138:
  movsd  (%rax),%xmm0
  add    $0x8,%rax
  mulsd  %xmm3,%xmm0
  movsd  %xmm0,-0x8(%rax)
  cmp    %r12,%rax
  jne    L138
L99:
  mov    0x18(%rsp),%rax
  mov    0x38(%rsp),%rdi
  add    $0x1,%r15
  add    %r14,%r12
  add    %r14,0x20(%rsp)
  movsd  %xmm3,(%rax)
  add    %rdi,%rax
  mov    0x30(%rsp),%rdi
  mov    %rax,0x18(%rsp)
  add    %rdi,(%rsp)
  cmp    0x40(%rsp),%r15
  jne    L93
L200:
  movslq 0x5c(%rsp),%rsi
  mov    0x28(%rsp),%rax
  mov    0x30(%rsp),%rdi
  lea    (%rax,%rsi,4),%r8
  shl    $0x3,%rdi
  nopl   0x0(%rax,%rax,1)
L21:
  movslq (%r8),%rcx
  cmp    %esi,%ecx
  je     L157
  test   %ebx,%ebx
  jle    L157
  lea    0x0(%r13,%rsi,8),%rax
  xor    %edx,%edx
  sub    %rsi,%rcx
  nopl   (%rax)
L175:
  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    L175
L157:
  sub    $0x1,%rsi
  sub    $0x4,%r8
  test   %esi,%esi
  jns    L21
L168:
  mov    0x28(%rsp),%rdi
  call   <free@plt>
  add    $0x68,%rsp
  mov    $0x1,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L101:
  test   %ebp,%ebp
  jle    L47
  imul   %ebp,%eax
  movslq %eax,%rdx
  mov    0x20(%rsp),%rax
  sub    (%rsp),%rdx
  nopl   (%rax)
L96:
  movsd  (%rax),%xmm0
  movsd  (%rax,%rdx,8),%xmm1
  movsd  %xmm1,(%rax)
  movsd  %xmm0,(%rax,%rdx,8)
  add    $0x8,%rax
  cmp    %r12,%rax
  jne    L96
  jmp    L47
L208:
  mov    0x28(%rsp),%rdi
  mov    %r8d,0x58(%rsp)
  mov    %rdx,0x48(%rsp)
  mov    %esi,0x54(%rsp)
  call   <free@plt>
  mov    0x54(%rsp),%esi
  lea    D54(%rip),%rdi
  call   <Exit@plt>
  mov    0x58(%rsp),%r8d
  mov    0x48(%rsp),%rdx
  pxor   %xmm8,%xmm8
  mov    D10(%rip),%rax
  movq   D11(%rip),%xmm5
  movq   D44(%rip),%xmm4
  movq   %rax,%xmm6
  mov    D52(%rip),%rax
  movq   %rax,%xmm7
  jmp    L6
L5:
  mov    0x5c(%rsp),%eax
  test   %eax,%eax
  js     L168
  movslq %ebp,%rax
  mov    %rax,0x30(%rsp)
  jmp    L200
```

tool_calls: name: retrieve_data
arguments: data_tag: D44
type: qword
name: retrieve_data
arguments: data_tag: D52
type: byte[8]
name: retrieve_data
arguments: data_tag: D10
type: f64
name: retrieve_data
arguments: data_tag: D11
type: f32[2]
name: retrieve_data
arguments: data_tag: D54
type: string

tool: D44: 9223372036854775807

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

tool: D10: 1

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

tool: D54: 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);
}
```