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

```asm
<mp_covar>:
  endbr64
  push   %r15
  movapd %xmm0,%xmm1
  movq   D14(%rip),%xmm4
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  movsd  (%rsi),%xmm0
  movapd %xmm0,%xmm3
  andpd  %xmm4,%xmm3
  mov    %edi,-0x8(%rsp)
  mulsd  %xmm1,%xmm3
  mov    %rcx,-0x10(%rsp)
  mov    %r8,-0x28(%rsp)
  test   %edi,%edi
  jle    L206
  mov    %edi,%ebp
  mov    %rsi,-0x20(%rsp)
  movslq %edx,%rdi
  mov    %edx,%r15d
  mov    %rsi,%r8
  xor    %r13d,%r13d
  xor    %r12d,%r12d
  xor    %r10d,%r10d
  lea    0x0(,%rdi,8),%r9
  movsd  D0(%rip),%xmm5
  movq   D6(%rip),%xmm2
  lea    0x10(%rsi),%r14
  lea    0x8(%r9),%rbx
  nopl   0x0(%rax)
L189:
  movapd %xmm0,%xmm1
  lea    -0x1(%r10),%eax
  andpd  %xmm4,%xmm1
  comisd %xmm1,%xmm3
  jae    L124
  movapd %xmm5,%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,(%r8)
  test   %r10d,%r10d
  je     L119
  add    %r13,%rax
  lea    0x8(%rsi),%rdx
  mov    %r12,%rcx
  lea    (%r14,%rax,8),%r11
  cs nopw 0x0(%rax,%rax,1)
L205:
  mulsd  -0x8(%rdx),%xmm1
  movq   $0x0,-0x8(%rdx)
  mov    %rsi,%rax
  xorpd  %xmm2,%xmm1
  nopl   0x0(%rax)
L108:
  movsd  (%rax,%rcx,8),%xmm0
  add    $0x8,%rax
  mulsd  %xmm1,%xmm0
  addsd  -0x8(%rax),%xmm0
  movsd  %xmm0,-0x8(%rax)
  cmp    %rdx,%rax
  jne    L108
  add    $0x8,%rdx
  add    %rdi,%rcx
  cmp    %r11,%rdx
  je     L119
  movsd  (%r8),%xmm1
  jmp    L205
  nopw   0x0(%rax,%rax,1)
L119:
  lea    0x1(%r10),%eax
  add    %r9,%rsi
  sub    %rdi,%r12
  add    %rdi,%r13
  add    %rbx,%r8
  cmp    %eax,%ebp
  je     L23
  movsd  (%r8),%xmm0
  mov    %eax,%r10d
  jmp    L189
  nopl   (%rax)
L120:
  movsd  -0x8(%rbp),%xmm0
  mov    -0x28(%rsp),%rax
  add    $0x1,%r8
  add    %rbx,%rbp
  add    %r9,%r13
  movsd  %xmm0,(%rax,%rsi,8)
  cmp    %r8,%r14
  jne    L118
  mov    -0x20(%rsp),%rdi
  mov    -0x18(%rsp),%r13
  mov    %r11,%rbp
  mov    %r11,%r10
  xor    %r8d,%r8d
  xor    %esi,%esi
  mov    %rax,%r12
  nopw   0x0(%rax,%rax,1)
L167:
  test   %rsi,%rsi
  je     L102
  lea    -0x1(%rsi),%edx
  lea    (%r11,%r8,8),%rax
  add    %r8,%rdx
  lea    0x0(%r13,%rdx,8),%rcx
  mov    %rbp,%rdx
  nop
L82:
  movsd  (%rdx),%xmm0
  add    $0x8,%rax
  add    %r9,%rdx
  movsd  %xmm0,-0x8(%rax)
  cmp    %rax,%rcx
  jne    L82
L102:
  movsd  (%r12,%rsi,8),%xmm0
  add    $0x1,%rsi
  add    $0x8,%rbp
  add    %rdi,%r8
  movsd  %xmm0,(%r10)
  add    %rbx,%r10
  cmp    %rsi,%r14
  jne    L167
L206:
  pop    %rbx
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L124:
  mov    -0x20(%rsp),%r11
  mov    $0xffffffff,%r10d
  lea    0x8(%r11),%rsi
  mov    %rsi,-0x18(%rsp)
  cmp    $0xffffffff,%eax
  jne    L72
L246:
  mov    %rdi,-0x20(%rsp)
  movslq -0x8(%rsp),%r14
  mov    %r11,%r13
  xor    %r8d,%r8d
  mov    -0x18(%rsp),%rbp
  mov    -0x10(%rsp),%r12
  nopw   0x0(%rax,%rax,1)
L118:
  movslq (%r12,%r8,4),%rsi
  mov    %r15d,%edi
  mov    %r12,%rcx
  mov    %r13,%rdx
  imul   %esi,%edi
  jmp    L139
  nopw   0x0(%rax,%rax,1)
L159:
  movsd  (%rdx),%xmm0
  add    %edi,%eax
  cltq
  movsd  %xmm0,(%r11,%rax,8)
L197:
  add    $0x8,%rdx
  add    $0x4,%rcx
  cmp    %rdx,%rbp
  je     L120
L139:
  cmp    %r8d,%r10d
  jge    L142
  movq   $0x0,(%rdx)
L142:
  mov    (%rcx),%eax
  cmp    %eax,%esi
  jl     L159
  jle    L197
  imul   %r15d,%eax
  movsd  (%rdx),%xmm0
  add    %esi,%eax
  cltq
  movsd  %xmm0,(%r11,%rax,8)
  jmp    L197
L23:
  mov    -0x20(%rsp),%r11
L126:
  lea    0x8(%r11),%rax
  mov    %r11,-0x20(%rsp)
  xor    %r14d,%r14d
  xor    %r13d,%r13d
  mov    %rax,-0x18(%rsp)
  mov    %rax,%rbp
  mov    %r15d,-0x4(%rsp)
  mov    %r11,%r15
  mov    %rax,%r11
L175:
  test   %r13d,%r13d
  je     L181
  lea    -0x1(%r13),%eax
  mov    -0x20(%rsp),%r8
  mov    %r11,%rcx
  mov    %r14,%rdx
  add    %r14,%rax
  mov    %r15,%rsi
  lea    (%r11,%rax,8),%r12
  nopl   0x0(%rax)
L111:
  movsd  (%rsi),%xmm1
  mov    %r8,%rax
  nop
L50:
  movsd  (%rax,%rdx,8),%xmm0
  add    $0x8,%rax
  mulsd  %xmm1,%xmm0
  addsd  -0x8(%rax),%xmm0
  movsd  %xmm0,-0x8(%rax)
  cmp    %rcx,%rax
  jne    L50
  add    $0x8,%rsi
  add    %r9,%r8
  sub    %rdi,%rdx
  add    %rbx,%rcx
  cmp    %r12,%rsi
  jne    L111
L181:
  movsd  -0x8(%rbp),%xmm1
  mov    %r15,%rax
  cs nopw 0x0(%rax,%rax,1)
L67:
  movsd  (%rax),%xmm0
  add    $0x8,%rax
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rax)
  cmp    %rbp,%rax
  jne    L67
  add    $0x1,%r13d
  add    %r9,%r15
  add    %rbx,%rbp
  add    %rdi,%r14
  cmp    %r13d,%r10d
  jge    L175
  mov    -0x20(%rsp),%r11
  mov    -0x4(%rsp),%r15d
  jmp    L246
L72:
  mov    %eax,%r10d
  jmp    L126
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D14
data_type: qword
name: extract_symbolic_data
arguments: data_label: D0
data_type: f64
name: extract_symbolic_data
arguments: data_label: D6
data_type: f32[2]

tool: D14: 9223372036854775807

tool: D0: 1

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

assistant: ```c
int mp_covar(int n, double *r, int ldr, int *ipvt, double tol, double *wa) {
  int i, ii, j, jj, k, l;
  int kk, kj, ji, j0, k0, jj0;
  int sing;
  double one = 1.0, temp, tolr, zero = 0.0;
  tolr = tol * fabs(r[0]);
  l = -1;
  for (k = 0; k < n; k++) {
    kk = k * ldr + k;
    if (fabs(r[kk]) <= tolr)
      break;
    r[kk] = one / r[kk];
    for (j = 0; j < k; j++) {
      kj = k * ldr + j;
      temp = r[kk] * r[kj];
      r[kj] = zero;
      k0 = k * ldr;
      j0 = j * ldr;
      for (i = 0; i <= j; i++) {
        r[k0 + i] += (-temp * r[j0 + i]);
      }
    }
    l = k;
  }
  if (l >= 0) {
    for (k = 0; k <= l; k++) {
      k0 = k * ldr;
      for (j = 0; j < k; j++) {
        temp = r[k * ldr + j];
        j0 = j * ldr;
        for (i = 0; i <= j; i++) {
          r[j0 + i] += temp * r[k0 + i];
        }
      }
      temp = r[k0 + k];
      for (i = 0; i <= k; i++) {
        r[k0 + i] *= temp;
      }
    }
  }
  for (j = 0; j < n; j++) {
    jj = ipvt[j];
    sing = (j > l);
    j0 = j * ldr;
    jj0 = jj * ldr;
    for (i = 0; i <= j; i++) {
      ji = j0 + i;
      if (sing)
        r[ji] = zero;
      ii = ipvt[i];
      if (ii > jj)
        r[jj0 + ii] = r[ji];
      if (ii < jj)
        r[ii * ldr + jj] = r[ji];
    }
    wa[jj] = r[j0 + j];
  }
  for (j = 0; j < n; j++) {
    j0 = j * ldr;
    for (i = 0; i < j; i++) {
      r[j0 + i] = r[i * ldr + j];
    }
    r[j0 + j] = wa[j];
  }
  return 0;
}
```