user: What would the C source look like for the assembly code provided here?

```asm
<lm_qrsolv>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x88,%rsp
  mov    %rsi,0x28(%rsp)
  mov    %edx,0x10(%rsp)
  mov    %rcx,0x48(%rsp)
  mov    %r8,0x50(%rsp)
  mov    0xd0(%rsp),%rbx
  test   %edi,%edi
  jle    L46
  mov    %edi,%r13d
  mov    %rsi,%r14
  movslq %edx,%rdi
  lea    0x8(,%rdi,8),%rax
  mov    %rax,0x40(%rsp)
  mov    %rsi,0x38(%rsp)
  lea    -0x1(%r13),%r12d
  mov    %r12d,0x7c(%rsp)
  mov    %r13d,%ecx
  mov    %rcx,0x68(%rsp)
  shl    $0x3,%rdi
  mov    %rsi,%r8
  mov    $0x0,%r10d
  mov    $0x0,%esi
  lea    0x8(%r14),%r11
  mov    0xc0(%rsp),%rbp
  mov    %rcx,%r15
  jmp    L258
L175:
  movslq %r10d,%rax
  add    %rsi,%rax
  lea    (%r14,%rax,8),%rdx
  mov    %r12d,%ecx
  sub    %esi,%ecx
  add    %rcx,%rax
  lea    (%r11,%rax,8),%rcx
  mov    %rdx,%rax
L105:
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  add    %rdi,%rdx
  add    $0x8,%rax
  cmp    %rcx,%rax
  jne    L105
L252:
  movsd  (%r8),%xmm0
  movsd  %xmm0,0x0(%rbp,%rsi,8)
  movsd  (%r9,%rsi,8),%xmm0
  movsd  %xmm0,(%rbx,%rsi,8)
  add    $0x1,%rsi
  add    0x40(%rsp),%r8
  add    0x10(%rsp),%r10d
  cmp    %r15,%rsi
  je     L36
L258:
  cmp    %esi,%r13d
  jg     L175
  jmp    L252
L36:
  mov    0xc8(%rsp),%r15
  mov    0x10(%rsp),%eax
  add    $0x1,%eax
  mov    %eax,0x14(%rsp)
  movl   $0x0,0x78(%rsp)
  movl   $0x0,0x5c(%rsp)
  mov    $0x0,%r14d
  mov    %r14,%r12
  mov    %rbx,0xd0(%rsp)
  jmp    L281
L106:
  mov    %ebx,0x58(%rsp)
  movslq %r14d,%rax
  mov    0x28(%rsp),%rdi
  lea    (%rdi,%rax,8),%rax
  mov    %rax,0x30(%rsp)
  movsd  (%rax),%xmm6
  movsd  %xmm6,0x18(%rsp)
  movapd %xmm6,%xmm0
  andpd  D68(%rip),%xmm0
  movsd  0x8(%rsp),%xmm5
  movapd %xmm5,%xmm1
  andpd  D68(%rip),%xmm1
  comisd %xmm0,%xmm1
  jbe    L287
  divsd  %xmm5,%xmm6
  movsd  %xmm6,0x60(%rsp)
  movsd  D2(%rip),%xmm1
  movapd %xmm6,%xmm0
  mulsd  %xmm1,%xmm0
  mulsd  %xmm6,%xmm0
  addsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm0,%xmm1
  ja     L41
  sqrtsd %xmm0,%xmm0
L300:
  movsd  D50(%rip),%xmm5
  divsd  %xmm0,%xmm5
  movsd  0x60(%rsp),%xmm3
  mulsd  %xmm5,%xmm3
L146:
  movsd  0x18(%rsp),%xmm1
  mulsd  %xmm3,%xmm1
  movsd  0x8(%rsp),%xmm0
  mulsd  %xmm5,%xmm0
  addsd  %xmm1,%xmm0
  mov    0x30(%rsp),%rax
  movsd  %xmm0,(%rax)
  mov    0xd0(%rsp),%rax
  movsd  (%rax,%rbp,1),%xmm0
  movapd %xmm0,%xmm1
  mulsd  %xmm3,%xmm1
  movsd  0x20(%rsp),%xmm7
  movapd %xmm7,%xmm2
  mulsd  %xmm5,%xmm2
  addsd  %xmm2,%xmm1
  movapd %xmm5,%xmm6
  xorpd  D0(%rip),%xmm6
  mulsd  %xmm3,%xmm7
  mulsd  %xmm6,%xmm0
  addsd  %xmm7,%xmm0
  movsd  %xmm0,0x20(%rsp)
  movsd  %xmm1,(%rax,%rbp,1)
  cmp    %r12d,%r13d
  jle    L141
  movslq %r12d,%rax
  movslq 0x58(%rsp),%rdx
  mov    0x28(%rsp),%rsi
  lea    (%rsi,%rdx,8),%rdx
L26:
  movsd  (%rdx,%rax,8),%xmm0
  movsd  (%r15,%rax,8),%xmm1
  movapd %xmm6,%xmm2
  mulsd  %xmm0,%xmm2
  movapd %xmm1,%xmm4
  mulsd  %xmm3,%xmm4
  addsd  %xmm4,%xmm2
  movsd  %xmm2,(%r15,%rax,8)
  mulsd  %xmm3,%xmm0
  mulsd  %xmm5,%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rdx,%rax,8)
  add    $0x1,%rax
  cmp    %eax,%r13d
  jg     L26
L244:
  add    $0x1,%r12d
  add    0x10(%rsp),%ebx
  add    0x14(%rsp),%r14d
  add    $0x8,%rbp
L6:
  movsd  (%r15,%rbp,1),%xmm7
  movsd  %xmm7,0x8(%rsp)
  pxor   %xmm5,%xmm5
  ucomisd %xmm5,%xmm7
  jp     L106
  jne    L106
  cmp    %r12d,%r13d
  jg     L244
  mov    0x70(%rsp),%r12
L33:
  mov    0x38(%rsp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,(%r15,%r12,8)
  mov    0xc0(%rsp),%rsi
  movsd  (%rsi,%r12,8),%xmm0
  movsd  %xmm0,(%rax)
  add    $0x1,%r12
  mov    0x40(%rsp),%rdi
  add    %rdi,%rax
  mov    %rax,0x38(%rsp)
  mov    0x10(%rsp),%esi
  add    %esi,0x5c(%rsp)
  mov    0x14(%rsp),%edi
  add    %edi,0x78(%rsp)
  cmp    0x68(%rsp),%r12
  je     L161
L281:
  mov    %r12d,%ecx
  mov    0x48(%rsp),%rax
  movslq (%rax,%r12,4),%rax
  mov    0x50(%rsp),%rdi
  movsd  (%rdi,%rax,8),%xmm0
  pxor   %xmm5,%xmm5
  ucomisd %xmm5,%xmm0
  jp     L81
  je     L33
L81:
  cmp    %r12d,%r13d
  jle    L317
  lea    0x0(,%r12,8),%rbp
  lea    (%r15,%rbp,1),%rax
  mov    0x7c(%rsp),%edx
  sub    %ecx,%edx
  add    %r12,%rdx
  lea    0x8(%r15,%rdx,8),%rdx
L21:
  movq   $0x0,(%rax)
  add    $0x8,%rax
  cmp    %rdx,%rax
  jne    L21
  mov    0x48(%rsp),%rax
  movslq (%rax,%r12,4),%rax
  mov    0x50(%rsp),%rsi
  movsd  (%rsi,%rax,8),%xmm0
  movsd  %xmm0,(%r15,%r12,8)
  lea    0x1(%rcx),%ebx
  mov    0x78(%rsp),%eax
  mov    0x5c(%rsp),%r14d
  pxor   %xmm5,%xmm5
  movsd  %xmm5,0x20(%rsp)
  mov    %r12,0x70(%rsp)
  mov    %ebx,%r12d
  mov    %r14d,%ebx
  mov    %eax,%r14d
  jmp    L6
L41:
  call   <sqrt@plt>
  jmp    L300
L287:
  movsd  0x8(%rsp),%xmm3
  divsd  0x18(%rsp),%xmm3
  movsd  %xmm3,0x60(%rsp)
  movapd %xmm3,%xmm0
  mulsd  D2(%rip),%xmm0
  mulsd  %xmm3,%xmm0
  addsd  D2(%rip),%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm0,%xmm1
  ja     L61
  sqrtsd %xmm0,%xmm0
L54:
  movsd  D50(%rip),%xmm3
  divsd  %xmm0,%xmm3
  movsd  0x60(%rsp),%xmm5
  mulsd  %xmm3,%xmm5
  jmp    L146
L61:
  call   <sqrt@plt>
  jmp    L54
L141:
  mov    0x70(%rsp),%r12
  jmp    L33
L161:
  mov    0xd0(%rsp),%rbx
  mov    %r13d,%edx
  mov    $0x0,%eax
  pxor   %xmm0,%xmm0
  mov    $0x0,%edi
  mov    0x68(%rsp),%r8
  jmp    L253
L242:
  add    $0x1,%rax
  cmp    %r8,%rax
  je     L354
L253:
  ucomisd (%r15,%rax,8),%xmm0
  setnp  %cl
  cmovne %edi,%ecx
  test   %cl,%cl
  je     L77
  cmp    %edx,%r13d
  cmove  %eax,%edx
L77:
  cmp    %r13d,%edx
  jge    L242
  movq   $0x0,(%rbx,%rax,8)
  jmp    L242
L369:
  pxor   %xmm1,%xmm1
  jmp    L367
L354:
  mov    %edx,%r8d
  sub    $0x1,%r8d
  js     L164
  movslq %r8d,%rsi
  mov    %edx,%edi
  mov    0x10(%rsp),%r9d
  imul   %r9d,%r8d
  mov    0x28(%rsp),%r10
L255:
  cmp    %edi,%edx
  jle    L369
  movslq %edi,%rax
  movslq %r8d,%rcx
  lea    (%r10,%rcx,8),%rcx
  pxor   %xmm1,%xmm1
L251:
  movsd  (%rcx,%rax,8),%xmm0
  mulsd  (%rbx,%rax,8),%xmm0
  addsd  %xmm0,%xmm1
  add    $0x1,%rax
  cmp    %eax,%edx
  jg     L251
L367:
  movsd  (%rbx,%rsi,8),%xmm0
  subsd  %xmm1,%xmm0
  divsd  (%r15,%rsi,8),%xmm0
  movsd  %xmm0,(%rbx,%rsi,8)
  sub    $0x1,%rsi
  sub    $0x1,%edi
  sub    %r9d,%r8d
  test   %esi,%esi
  jns    L255
  test   %r13d,%r13d
  jle    L46
L164:
  mov    $0x0,%eax
  mov    0x48(%rsp),%rcx
  mov    0xc0(%rsp),%rsi
L71:
  movsd  (%rbx,%rax,8),%xmm0
  movslq (%rcx,%rax,4),%rdx
  movsd  %xmm0,(%rsi,%rdx,8)
  add    $0x1,%rax
  cmp    %eax,%r13d
  jg     L71
L46:
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L317:
  movsd  %xmm0,(%r15,%r12,8)
  jmp    L33
```

tool_calls: name: extract_symbolic_data
arguments: label: D68
data_type: qword[2]
name: extract_symbolic_data
arguments: label: D2
data_type: f64
name: extract_symbolic_data
arguments: label: D50
data_type: f64
name: extract_symbolic_data
arguments: label: D0
data_type: f32[4]

tool: {"D68": [0x7fffffffffffffff,0x0000000000000000]}

tool: D2: 0.25

tool: D50: 0.5

tool: {"D0": [0.0,-0.0,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, cotan;
  static double p25 = 0.25;
  static double p5 = 0.5;
  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])) {
        cotan = r[kk] / sdiag[k];
        sin = p5 / sqrt(p25 + p25 * (cotan) * (cotan));
        cos = sin * cotan;
      } else {
        tan = sdiag[k] / r[kk];
        cos = p5 / sqrt(p25 + p25 * (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];
}
```