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

```asm
<mp_qrsolv>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x88,%rsp
  mov    %rsi,0x38(%rsp)
  mov    %edx,0x7c(%rsp)
  mov    %rcx,0x58(%rsp)
  mov    %r8,0x68(%rsp)
  mov    0xc8(%rsp),%r14
  test   %edi,%edi
  jle    L340
  mov    %edi,%r15d
  mov    %rsi,%rax
  movslq %edx,%rsi
  lea    0x1(%rsi),%rbx
  lea    -0x1(%rdi),%ecx
  mov    %ecx,0x78(%rsp)
  mov    %ecx,%r10d
  add    $0x2,%r10
  shl    $0x3,%rsi
  mov    $0x0,%r8d
  mov    $0x1,%edi
  lea    0x8(%rax),%r11
  mov    %rax,%rbp
  mov    0xc0(%rsp),%r12
  mov    0xd0(%rsp),%r13
  jmp    L32
L173:
  lea    0x0(%rbp,%r8,8),%rdx
  mov    %r15d,%eax
  sub    %edi,%eax
  add    %r8,%rax
  lea    (%r11,%rax,8),%rcx
  mov    %rdx,%rax
L190:
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  add    %rsi,%rdx
  add    $0x8,%rax
  cmp    %rcx,%rax
  jne    L190
L90:
  movsd  0x0(%rbp,%r8,8),%xmm0
  movsd  %xmm0,-0x8(%r12,%rdi,8)
  movsd  -0x8(%r9,%rdi,8),%xmm0
  movsd  %xmm0,-0x8(%r13,%rdi,8)
  add    $0x1,%rdi
  add    %rbx,%r8
  cmp    %r10,%rdi
  je     L338
L32:
  lea    -0x1(%rdi),%eax
  cmp    %eax,%r15d
  jg     L173
  jmp    L90
L338:
  lea    0x8(%rsi),%rax
  mov    %rax,0x70(%rsp)
  mov    0x38(%rsp),%rax
  mov    %rax,0x48(%rsp)
  mov    0x7c(%rsp),%eax
  add    $0x1,%eax
  mov    %eax,0x50(%rsp)
  mov    %r15d,%eax
  mov    %rax,0x60(%rsp)
  mov    %r14,0x30(%rsp)
  movl   $0x0,0x54(%rsp)
  movq   $0x0,0x18(%rsp)
  mov    %r15d,%r13d
  jmp    L337
L341:
  call   <sqrt@plt>
  jmp    L143
L82:
  mov    0x8(%rsp),%rax
  movsd  (%rax),%xmm0
  divsd  0x0(%rbp),%xmm0
  movapd %xmm0,%xmm6
  movsd  %xmm0,0x20(%rsp)
  mulsd  D47(%rip),%xmm0
  mulsd  %xmm6,%xmm0
  addsd  D47(%rip),%xmm0
  pxor   %xmm4,%xmm4
  ucomisd %xmm0,%xmm4
  ja     L48
  sqrtsd %xmm0,%xmm0
L314:
  movsd  D52(%rip),%xmm2
  divsd  %xmm0,%xmm2
  movsd  0x20(%rsp),%xmm4
  mulsd  %xmm2,%xmm4
  jmp    L237
L48:
  call   <sqrt@plt>
  jmp    L314
L249:
  movapd %xmm4,%xmm6
  xorpd  D14(%rip),%xmm6
  movslq %r15d,%rax
  mov    %r14,%rdx
  sub    %rbx,%rdx
  add    0x40(%rsp),%rdx
  add    0x38(%rsp),%rdx
L23:
  movsd  (%rdx,%rax,8),%xmm0
  movsd  (%r14,%rax,8),%xmm1
  movapd %xmm6,%xmm3
  mulsd  %xmm0,%xmm3
  movapd %xmm1,%xmm5
  mulsd  %xmm2,%xmm5
  addsd  %xmm5,%xmm3
  movsd  %xmm3,(%r14,%rax,8)
  mulsd  %xmm2,%xmm0
  mulsd  %xmm4,%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rdx,%rax,8)
  add    $0x1,%rax
  cmp    %eax,%r13d
  jg     L23
  mulsd  0x28(%rsp),%xmm2
  mulsd  %xmm6,%xmm7
  addsd  %xmm2,%xmm7
  movsd  %xmm7,0x28(%rsp)
  jmp    L347
L205:
  cmp    %r15d,%r13d
  jle    L124
L347:
  add    $0x8,%rbx
  add    $0x1,%r15d
  mov    0x50(%rsp),%edi
  add    %edi,0x14(%rsp)
  add    $0x8,%r12
L184:
  mov    %rbx,0x8(%rsp)
  pxor   %xmm6,%xmm6
  ucomisd (%rbx),%xmm6
  jp     L9
  je     L205
L9:
  movslq 0x14(%rsp),%rax
  shl    $0x3,%rax
  mov    %rax,0x40(%rsp)
  mov    0x38(%rsp),%rbp
  add    %rax,%rbp
  movsd  0x0(%rbp),%xmm0
  call   <fabs@plt>
  mov    %rax,0x20(%rsp)
  mov    0x8(%rsp),%rdi
  movsd  (%rdi),%xmm0
  call   <fabs@plt>
  cmp    %rax,0x20(%rsp)
  jge    L82
  movsd  0x0(%rbp),%xmm0
  mov    0x8(%rsp),%rax
  divsd  (%rax),%xmm0
  movapd %xmm0,%xmm7
  movsd  %xmm0,0x20(%rsp)
  movsd  D47(%rip),%xmm1
  mulsd  %xmm1,%xmm0
  mulsd  %xmm7,%xmm0
  addsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm0,%xmm1
  ja     L341
  sqrtsd %xmm0,%xmm0
L143:
  movsd  D52(%rip),%xmm4
  divsd  %xmm0,%xmm4
  movsd  0x20(%rsp),%xmm2
  mulsd  %xmm4,%xmm2
L237:
  movapd %xmm2,%xmm0
  mulsd  0x0(%rbp),%xmm0
  mov    0x8(%rsp),%rax
  movapd %xmm4,%xmm1
  mulsd  (%rax),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,0x0(%rbp)
  movsd  (%r12),%xmm7
  movapd %xmm7,%xmm0
  mulsd  %xmm2,%xmm0
  movsd  0x28(%rsp),%xmm1
  mulsd  %xmm4,%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%r12)
  cmp    %r15d,%r13d
  jg     L249
L124:
  mov    0x48(%rsp),%rax
  movsd  (%rax),%xmm0
  mov    0x30(%rsp),%rbx
  movsd  %xmm0,(%rbx)
  mov    0xc0(%rsp),%rdi
  mov    0x18(%rsp),%rsi
  movsd  (%rdi,%rsi,8),%xmm0
  movsd  %xmm0,(%rax)
  add    $0x1,%rsi
  mov    %rsi,0x18(%rsp)
  mov    0x70(%rsp),%rcx
  add    %rcx,%rax
  mov    %rax,0x48(%rsp)
  add    $0x8,%rbx
  mov    %rbx,0x30(%rsp)
  mov    0x50(%rsp),%edi
  add    %edi,0x54(%rsp)
  cmp    0x60(%rsp),%rsi
  je     L2
L337:
  mov    0x18(%rsp),%rax
  mov    %eax,%esi
  mov    0x58(%rsp),%rdi
  movslq (%rdi,%rax,4),%rax
  mov    0x68(%rsp),%rdi
  lea    (%rdi,%rax,8),%rcx
  movsd  (%rcx),%xmm0
  pxor   %xmm7,%xmm7
  ucomisd %xmm7,%xmm0
  jp     L336
  je     L124
L336:
  mov    0x18(%rsp),%rbx
  cmp    %ebx,%r13d
  jle    L269
  mov    0x78(%rsp),%eax
  sub    %esi,%eax
  add    %rbx,%rax
  lea    0x8(%r14,%rax,8),%rdx
  mov    0x30(%rsp),%rax
L293:
  movq   $0x0,(%rax)
  add    $0x8,%rax
  cmp    %rdx,%rax
  jne    L293
  movsd  (%rcx),%xmm0
  mov    0x30(%rsp),%rbx
  movsd  %xmm0,(%rbx)
  lea    0x1(%rsi),%r15d
  mov    0xd0(%rsp),%rax
  mov    0x18(%rsp),%rcx
  lea    (%rax,%rcx,8),%r12
  mov    0x54(%rsp),%eax
  mov    %eax,0x14(%rsp)
  pxor   %xmm7,%xmm7
  movsd  %xmm7,0x28(%rsp)
  jmp    L184
L2:
  mov    %r13d,%r15d
  mov    %r13d,%edx
  mov    $0x0,%eax
  pxor   %xmm0,%xmm0
  mov    $0x0,%edi
  mov    0x60(%rsp),%r8
  mov    0xd0(%rsp),%r9
  jmp    L95
L236:
  add    $0x1,%rax
  cmp    %r8,%rax
  je     L101
L95:
  ucomisd (%r14,%rax,8),%xmm0
  setnp  %cl
  cmovne %edi,%ecx
  test   %cl,%cl
  je     L115
  cmp    %edx,%r15d
  cmove  %eax,%edx
L115:
  cmp    %r15d,%edx
  jge    L236
  movq   $0x0,(%r9,%rax,8)
  jmp    L236
L98:
  sub    $0x1,%rcx
  add    %r9d,%esi
  add    $0x8,%rdi
L49:
  movsd  (%r10,%rcx,8),%xmm0
  subsd  %xmm1,%xmm0
  divsd  (%r14,%rcx,8),%xmm0
  movsd  %xmm0,(%r10,%rcx,8)
  cmp    %r8,%rcx
  je     L118
  pxor   %xmm1,%xmm1
  cmp    %ecx,%edx
  jle    L98
  movslq %esi,%rax
  lea    (%rdi,%rax,8),%r11
  add    0x38(%rsp),%r11
  mov    %rcx,%rax
L355:
  movsd  (%r11,%rax,8),%xmm0
  mulsd  (%r10,%rax,8),%xmm0
  addsd  %xmm0,%xmm1
  add    $0x1,%rax
  cmp    %eax,%edx
  jg     L355
  jmp    L98
L118:
  mov    $0x0,%eax
  mov    0x58(%rsp),%rcx
  mov    0xc0(%rsp),%rsi
  mov    0xd0(%rsp),%rdi
L79:
  movsd  (%rdi,%rax,8),%xmm0
  movslq (%rcx,%rax,4),%rdx
  movsd  %xmm0,(%rsi,%rdx,8)
  add    $0x1,%rax
  cmp    %eax,%r15d
  jg     L79
L340:
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L101:
  test   %edx,%edx
  jle    L118
  lea    -0x1(%rdx),%eax
  movslq %eax,%rcx
  mov    0x7c(%rsp),%edi
  mov    %edi,%r9d
  not    %r9d
  lea    -0x2(%rdx),%esi
  imul   %edi,%esi
  add    %eax,%esi
  movslq %edx,%r8
  mov    %r8,%rdi
  neg    %rdi
  lea    0x8(,%rdi,8),%rdi
  sub    $0x1,%r8
  mov    %eax,%eax
  sub    %rax,%r8
  pxor   %xmm1,%xmm1
  mov    0xd0(%rsp),%r10
  jmp    L49
L269:
  mov    0x30(%rsp),%rax
  movsd  %xmm0,(%rax)
  jmp    L124
```

tool_calls: name: disassemble_data
arguments: data_label: D47
data_type: f64
name: disassemble_data
arguments: data_label: D52
data_type: f64
name: disassemble_data
arguments: data_label: D14
data_type: f32[4]

tool: D47: 0.25

tool: D52: 0.5

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

assistant: ```c
void mp_qrsolv(int n, double *r, int ldr, int *ipvt, double *diag, double *qtb, double *x, double *sdiag, double *wa) {
  int i, ij, ik, kk, j, jp1, k, kp1, l, nsing;
  double cosx, cotan, qtbpj, sinx, sum, tanx, temp;
  static double zero = 0.0;
  static double p25 = 0.25;
  static double p5 = 0.5;
  kk = 0;
  for (j = 0; j < n; j++) {
    ij = kk;
    ik = kk;
    for (i = j; i < n; i++) {
      r[ij] = r[ik];
      ij += 1;
      ik += ldr;
    }
    x[j] = r[kk];
    wa[j] = qtb[j];
    kk += ldr + 1;
  }
  for (j = 0; j < n; j++) {
    l = ipvt[j];
    if (diag[l] == zero)
      goto L90;
    for (k = j; k < n; k++)
      sdiag[k] = zero;
    sdiag[j] = diag[l];
    qtbpj = zero;
    for (k = j; k < n; k++) {
      if (sdiag[k] == zero)
        continue;
      kk = k + ldr * k;
      if (fabs(r[kk]) < fabs(sdiag[k])) {
        cotan = r[kk] / sdiag[k];
        sinx = p5 / sqrt(p25 + p25 * cotan * cotan);
        cosx = sinx * cotan;
      } else {
        tanx = sdiag[k] / r[kk];
        cosx = p5 / sqrt(p25 + p25 * tanx * tanx);
        sinx = cosx * tanx;
      }
      r[kk] = cosx * r[kk] + sinx * sdiag[k];
      temp = cosx * wa[k] + sinx * qtbpj;
      qtbpj = -sinx * wa[k] + cosx * qtbpj;
      wa[k] = temp;
      kp1 = k + 1;
      if (n > kp1) {
        ik = kk + 1;
        for (i = kp1; i < n; i++) {
          temp = cosx * r[ik] + sinx * sdiag[i];
          sdiag[i] = -sinx * r[ik] + cosx * sdiag[i];
          r[ik] = temp;
          ik += 1;
        }
      }
    }
  L90:
    kk = j + ldr * j;
    sdiag[j] = r[kk];
    r[kk] = x[j];
  }
  nsing = n;
  for (j = 0; j < n; j++) {
    if ((sdiag[j] == zero) && (nsing == n))
      nsing = j;
    if (nsing < n)
      wa[j] = zero;
  }
  if (nsing < 1)
    goto L150;
  for (k = 0; k < nsing; k++) {
    j = nsing - k - 1;
    sum = zero;
    jp1 = j + 1;
    if (nsing > jp1) {
      ij = jp1 + ldr * j;
      for (i = jp1; i < nsing; i++) {
        sum += r[ij] * wa[i];
        ij += 1;
      }
    }
    wa[j] = (wa[j] - sum) / sdiag[j];
  }
L150:
  for (j = 0; j < n; j++) {
    l = ipvt[j];
    x[l] = wa[j];
  }
}
```