user: 请将以下的汇编代码转换成C语言代码:

```asm
<MatrixSolve>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x28,%rsp
  mov    %edi,-0x34(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    -0x34(%rbp),%eax
  mov    $0x4,%esi
  mov    %eax,%edi
  call   <calloc@plt>
  mov    %rax,-0x28(%rbp)
  movl   $0x0,-0x2c(%rbp)
  mov    $0x0,%ebx
  jmp    L199
L198:
  movslq %ebx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    %ebx,(%rax)
  add    $0x1,%ebx
L199:
  cmp    -0x34(%rbp),%ebx
  jl     L198
  mov    $0x0,%ebx
  jmp    L24
L87:
  mov    %ebx,%eax
  imul   -0x34(%rbp),%eax
  add    %ebx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  pxor   %xmm0,%xmm0
  comisd %xmm1,%xmm0
  jbe    L231
  mov    %ebx,%eax
  imul   -0x34(%rbp),%eax
  add    %ebx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movq   D14(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  jmp    L23
L231:
  mov    %ebx,%eax
  imul   -0x34(%rbp),%eax
  add    %ebx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
L23:
  movapd %xmm0,%xmm4
  mov    %ebx,%r13d
  mov    %ebx,%r12d
  jmp    L145
L139:
  mov    %r12d,%eax
  imul   -0x34(%rbp),%eax
  add    %ebx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  pxor   %xmm0,%xmm0
  comisd %xmm1,%xmm0
  jbe    L225
  mov    %r12d,%eax
  imul   -0x34(%rbp),%eax
  add    %ebx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movq   D14(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  jmp    L25
L225:
  mov    %r12d,%eax
  imul   -0x34(%rbp),%eax
  add    %ebx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
L25:
  movapd %xmm4,%xmm2
  comisd %xmm2,%xmm0
  jbe    L177
  mov    %r12d,%eax
  imul   -0x34(%rbp),%eax
  add    %ebx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  pxor   %xmm0,%xmm0
  comisd %xmm1,%xmm0
  jbe    L214
  mov    %r12d,%eax
  imul   -0x34(%rbp),%eax
  add    %ebx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movq   D14(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  jmp    L229
L214:
  mov    %r12d,%eax
  imul   -0x34(%rbp),%eax
  add    %ebx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
L229:
  movapd %xmm0,%xmm4
  mov    %r12d,%r13d
L177:
  add    $0x1,%r12d
L145:
  cmp    -0x34(%rbp),%r12d
  jl     L139
  cmp    %r13d,%ebx
  je     L152
  mov    $0x0,%r12d
  jmp    L49
L164:
  mov    %ebx,%eax
  imul   -0x34(%rbp),%eax
  add    %r12d,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm3
  mov    %r13d,%eax
  imul   -0x34(%rbp),%eax
  add    %r12d,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rax,%rdx
  mov    %ebx,%eax
  imul   -0x34(%rbp),%eax
  add    %r12d,%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x40(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    %r13d,%eax
  imul   -0x34(%rbp),%eax
  add    %r12d,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  %xmm3,(%rax)
  add    $0x1,%r12d
L49:
  cmp    -0x34(%rbp),%r12d
  jl     L164
L152:
  movslq %ebx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%r12d
  movslq %r13d,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movslq %ebx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  movslq %r13d,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    %r12d,(%rax)
  mov    %ebx,%eax
  imul   -0x34(%rbp),%eax
  add    %ebx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jp     L237
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jne    L237
  mov    %ebx,%eax
  imul   -0x34(%rbp),%eax
  add    %ebx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  D34(%rip),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x34(%rbp),%eax
  imul   %eax,%eax
  add    %ebx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x2c(%rbp)
L237:
  mov    %ebx,%eax
  imul   -0x34(%rbp),%eax
  add    %ebx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm4
  mov    %ebx,%r12d
  jmp    L141
L266:
  mov    %r12d,%eax
  imul   -0x34(%rbp),%eax
  add    %ebx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    %r12d,%eax
  imul   -0x34(%rbp),%eax
  add    %ebx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movapd %xmm4,%xmm5
  divsd  %xmm5,%xmm0
  movsd  %xmm0,(%rax)
  add    $0x1,%r12d
L141:
  cmp    %r12d,-0x34(%rbp)
  jge    L266
  mov    $0x0,%r12d
  jmp    L85
L86:
  cmp    %r12d,%ebx
  je     L0
  mov    %ebx,%eax
  imul   -0x34(%rbp),%eax
  add    %r12d,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm6
  movapd %xmm6,%xmm4
  mov    %ebx,%r13d
  jmp    L283
L209:
  mov    %r13d,%eax
  imul   -0x34(%rbp),%eax
  add    %r12d,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    %r13d,%eax
  imul   -0x34(%rbp),%eax
  add    %ebx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movapd %xmm4,%xmm7
  mulsd  %xmm7,%xmm1
  mov    %r13d,%eax
  imul   -0x34(%rbp),%eax
  add    %r12d,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  add    $0x1,%r13d
L283:
  cmp    %r13d,-0x34(%rbp)
  jge    L209
L0:
  add    $0x1,%r12d
L85:
  cmp    -0x34(%rbp),%r12d
  jl     L86
  add    $0x1,%ebx
L24:
  cmp    -0x34(%rbp),%ebx
  jl     L87
  mov    $0x0,%ebx
  jmp    L13
L174:
  mov    %ebx,%r12d
  jmp    L246
L233:
  movslq %r12d,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,%ebx
  je     L97
  add    $0x1,%r12d
L246:
  cmp    -0x34(%rbp),%r12d
  jl     L233
  jmp    L98
L97:
  nop
L98:
  mov    -0x34(%rbp),%eax
  imul   %eax,%eax
  add    %ebx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  mov    -0x34(%rbp),%eax
  imul   %eax,%eax
  add    %r12d,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rax,%rdx
  mov    -0x34(%rbp),%eax
  imul   %eax,%eax
  add    %ebx,%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x40(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x34(%rbp),%eax
  imul   %eax,%eax
  add    %r12d,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  %xmm2,(%rax)
  movslq %ebx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%r13d
  movslq %r12d,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movslq %ebx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  movslq %r12d,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    %r13d,(%rax)
  add    $0x1,%ebx
L13:
  cmp    -0x34(%rbp),%ebx
  jl     L174
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x2c(%rbp),%eax
  add    $0x28,%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %rbp
  ret
```

tool_calls: name: parse_data
arguments: data_label: D14
type_guessed: f32[2]
name: parse_data
arguments: data_label: D34
type_guessed: f64

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

tool: D34: 1

assistant: ```c
int MatrixSolve(int dim, double *matrix) {
  register int i, j, k;
  register double temp;
  int *order;
  int singular;
  order = (int *)calloc((unsigned)dim, sizeof(int));
  singular = 0;
  for (i = 0; i < dim; i++)
    order[i] = i;
  for (i = 0; i < dim; i++) {
    temp = ((matrix[dim * (i) + (i)]) < 0.0 ? -(matrix[dim * (i) + (i)]) : (matrix[dim * (i) + (i)]));
    k = i;
    for (j = i; j < dim; j++) {
      if (((matrix[dim * (j) + (i)]) < 0.0 ? -(matrix[dim * (j) + (i)]) : (matrix[dim * (j) + (i)])) > temp) {
        temp = ((matrix[dim * (j) + (i)]) < 0.0 ? -(matrix[dim * (j) + (i)]) : (matrix[dim * (j) + (i)]));
        k = j;
      }
    }
    if (i != k)
      for (j = 0; j < dim; j++) {
        temp = matrix[dim * (i) + (j)];
        matrix[dim * (i) + (j)] = matrix[dim * (k) + (j)];
        matrix[dim * (k) + (j)] = temp;
      }
    j = order[i];
    order[i] = order[k];
    order[k] = j;
    if (matrix[dim * (i) + (i)] == 0.0) {
      matrix[dim * (i) + (i)] = 1.0;
      matrix[dim * (dim) + (i)] = 0.0;
      singular++;
    }
    temp = matrix[dim * (i) + (i)];
    for (j = i; j < dim + 1; j++)
      matrix[dim * (j) + (i)] /= temp;
    for (j = 0; j < dim; j++) {
      if (i != j) {
        temp = matrix[dim * (i) + (j)];
        for (k = i; k < dim + 1; k++)
          matrix[dim * (k) + (j)] -= temp * matrix[dim * (k) + (i)];
      }
    }
  }
  for (i = 0; i < dim; i++) {
    for (j = i; j < dim; j++) {
      if (order[j] == i)
        break;
    }
    temp = matrix[dim * (dim) + (i)];
    matrix[dim * (dim) + (i)] = matrix[dim * (dim) + (j)];
    matrix[dim * (dim) + (j)] = temp;
    k = order[i];
    order[i] = order[j];
    order[j] = k;
  }
  (void)free(order);
  return singular;
}
```