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

```asm
<lm_qrsolv>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  add    $0xffffffffffffff80,%rsp
  mov    %edi,-0x54(%rbp)
  mov    %rsi,-0x60(%rbp)
  mov    %edx,-0x58(%rbp)
  mov    %rcx,-0x68(%rbp)
  mov    %r8,-0x70(%rbp)
  mov    %r9,-0x78(%rbp)
  movl   $0x0,-0x48(%rbp)
  jmp    L202
L15:
  mov    -0x48(%rbp),%eax
  mov    %eax,-0x4c(%rbp)
  jmp    L288
L277:
  mov    -0x4c(%rbp),%eax
  imul   -0x58(%rbp),%eax
  mov    %eax,%edx
  mov    -0x48(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rax,%rdx
  mov    -0x48(%rbp),%eax
  imul   -0x58(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x4c(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x60(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x4c(%rbp)
L288:
  mov    -0x4c(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jl     L277
  mov    -0x48(%rbp),%eax
  imul   -0x58(%rbp),%eax
  mov    %eax,%edx
  mov    -0x48(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rax,%rdx
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    0x10(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rax,%rdx
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    0x20(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x48(%rbp)
L202:
  mov    -0x48(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jl     L15
  movl   $0x0,-0x48(%rbp)
  jmp    L266
L219:
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jp     L94
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  je     L311
L94:
  mov    -0x48(%rbp),%eax
  mov    %eax,-0x44(%rbp)
  jmp    L316
L267:
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x18(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x44(%rbp)
L316:
  mov    -0x44(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jl     L267
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rax,%rdx
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    0x18(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  mov    -0x48(%rbp),%eax
  mov    %eax,-0x44(%rbp)
  jmp    L7
L151:
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jp     L109
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  je     L2
L109:
  mov    -0x58(%rbp),%eax
  imul   -0x44(%rbp),%eax
  mov    %eax,%edx
  mov    -0x44(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x3c(%rbp)
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movq   D71(%rip),%xmm1
  andpd  %xmm0,%xmm1
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movq   D71(%rip),%xmm2
  andpd  %xmm2,%xmm0
  comisd %xmm1,%xmm0
  jbe    L303
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x10(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  %xmm0,%xmm1
  movsd  D31(%rip),%xmm0
  addsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movapd %xmm0,%xmm1
  movsd  D31(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0x28(%rbp),%xmm0
  mulsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  jmp    L204
L303:
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x18(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  %xmm0,%xmm1
  movsd  D31(%rip),%xmm0
  addsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movapd %xmm0,%xmm1
  movsd  D31(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x20(%rbp),%xmm0
  mulsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,-0x28(%rbp)
L204:
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x20(%rbp),%xmm1
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  -0x28(%rbp),%xmm0
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x20(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x20(%rbp),%xmm1
  movsd  -0x28(%rbp),%xmm0
  mulsd  -0x38(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x28(%rbp),%xmm0
  movq   D63(%rip),%xmm1
  xorpd  %xmm0,%xmm1
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x20(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x20(%rbp),%xmm0
  mulsd  -0x38(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x20(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x44(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x4c(%rbp)
  jmp    L314
L128:
  mov    -0x44(%rbp),%eax
  imul   -0x58(%rbp),%eax
  mov    %eax,%edx
  mov    -0x4c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x20(%rbp),%xmm1
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  -0x28(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x28(%rbp),%xmm0
  movq   D63(%rip),%xmm1
  xorpd  %xmm0,%xmm1
  mov    -0x44(%rbp),%eax
  imul   -0x58(%rbp),%eax
  mov    %eax,%edx
  mov    -0x4c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  -0x20(%rbp),%xmm0
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x18(%rbp),%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x44(%rbp),%eax
  imul   -0x58(%rbp),%eax
  mov    %eax,%edx
  mov    -0x4c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x4c(%rbp)
L314:
  mov    -0x4c(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jl     L128
  jmp    L116
L2:
  nop
L116:
  addl   $0x1,-0x44(%rbp)
L7:
  mov    -0x44(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jl     L151
  jmp    L216
L311:
  nop
L216:
  mov    -0x48(%rbp),%eax
  imul   -0x58(%rbp),%eax
  mov    %eax,%edx
  mov    -0x48(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rax,%rdx
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    0x18(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x10(%rbp),%rax
  add    %rax,%rdx
  mov    -0x48(%rbp),%eax
  imul   -0x58(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x48(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x60(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x48(%rbp)
L266:
  mov    -0x48(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jl     L219
  mov    -0x54(%rbp),%eax
  mov    %eax,-0x40(%rbp)
  movl   $0x0,-0x48(%rbp)
  jmp    L173
L246:
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jp     L283
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jne    L283
  mov    -0x40(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jne    L283
  mov    -0x48(%rbp),%eax
  mov    %eax,-0x40(%rbp)
L283:
  mov    -0x40(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jge    L168
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x20(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
L168:
  addl   $0x1,-0x48(%rbp)
L173:
  mov    -0x48(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jl     L246
  mov    -0x40(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x48(%rbp)
  jmp    L215
L144:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  mov    -0x48(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x4c(%rbp)
  jmp    L150
L224:
  mov    -0x48(%rbp),%eax
  imul   -0x58(%rbp),%eax
  mov    %eax,%edx
  mov    -0x4c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x20(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x30(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  addl   $0x1,-0x4c(%rbp)
L150:
  mov    -0x4c(%rbp),%eax
  cmp    -0x40(%rbp),%eax
  jl     L224
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x20(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  subsd  -0x30(%rbp),%xmm0
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x20(%rbp),%rax
  add    %rdx,%rax
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  subl   $0x1,-0x48(%rbp)
L215:
  cmpl   $0x0,-0x48(%rbp)
  jns    L144
  movl   $0x0,-0x48(%rbp)
  jmp    L3
L247:
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x68(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    0x10(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x48(%rbp)
L3:
  mov    -0x48(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jl     L247
  nop
  nop
  leave
  ret
```

tool_calls: name: unpack_data
arguments: label: D71
datatype: qword
name: unpack_data
arguments: label: D31
datatype: f32[2]
name: unpack_data
arguments: label: D63
datatype: f32[2]

tool: D71: 9223372036854775807

tool: {"D31": [0.0,1.875]}

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

assistant: ```c
void lm_qrsolv(int n, double *r, int ldr, int *ipvt, double *diag, double *qtb, double *x, double *sdiag, double *wa) {
  int i, kk, j, k, nsing;
  double qtbpj, sum, temp;
  double _sin, _cos, _tan, _cot;
  for (j = 0; j < n; j++) {
    for (i = j; i < n; i++)
      r[j * ldr + i] = r[i * ldr + j];
    x[j] = r[j * ldr + j];
    wa[j] = qtb[j];
  }
  for (j = 0; j < n; j++) {
    if (diag[ipvt[j]] == 0.)
      goto L90;
    for (k = j; k < n; k++)
      sdiag[k] = 0.;
    sdiag[j] = diag[ipvt[j]];
    qtbpj = 0.;
    for (k = j; k < n; k++) {
      if (sdiag[k] == 0.)
        continue;
      kk = k + ldr * k;
      if (fabs(r[kk]) < fabs(sdiag[k])) {
        _cot = r[kk] / sdiag[k];
        _sin = 1 / sqrt(1 + (_cot) * (_cot));
        _cos = _sin * _cot;
      } else {
        _tan = sdiag[k] / r[kk];
        _cos = 1 / sqrt(1 + (_tan) * (_tan));
        _sin = _cos * _tan;
      }
      r[kk] = _cos * r[kk] + _sin * sdiag[k];
      temp = _cos * wa[k] + _sin * qtbpj;
      qtbpj = -_sin * wa[k] + _cos * qtbpj;
      wa[k] = temp;
      for (i = k + 1; i < n; i++) {
        temp = _cos * r[k * ldr + i] + _sin * sdiag[i];
        sdiag[i] = -_sin * r[k * ldr + i] + _cos * sdiag[i];
        r[k * ldr + i] = temp;
      }
    }
  L90:
    sdiag[j] = r[j * ldr + j];
    r[j * ldr + j] = x[j];
  }
  nsing = n;
  for (j = 0; j < n; j++) {
    if (sdiag[j] == 0. && nsing == n)
      nsing = j;
    if (nsing < n)
      wa[j] = 0;
  }
  for (j = nsing - 1; j >= 0; j--) {
    sum = 0;
    for (i = j + 1; i < nsing; i++)
      sum += r[j * ldr + i] * wa[i];
    wa[j] = (wa[j] - sum) / sdiag[j];
  }
  for (j = 0; j < n; j++)
    x[ipvt[j]] = wa[j];
}
```