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

```asm
<qrsolv>:
  endbr64
  push   %r15
  mov    %r9,%r11
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x88,%rsp
  mov    %r9,0x38(%rsp)
  mov    0xc0(%rsp),%r10
  mov    %rdx,0x30(%rsp)
  mov    0xc8(%rsp),%r9
  mov    %rcx,0x40(%rsp)
  test   %edi,%edi
  jle    L162
  lea    -0x1(%rdi),%eax
  mov    %edi,%ebp
  mov    %edi,%ebx
  mov    %rsi,%r12
  mov    %eax,0x24(%rsp)
  xor    %edi,%edi
  mov    %rbp,0x28(%rsp)
  nopl   0x0(%rax)
L42:
  mov    (%r12,%rdi,8),%rsi
  lea    0x0(,%rdi,8),%rcx
  mov    %rdi,%rax
  nopw   0x0(%rax,%rax,1)
L95:
  mov    (%r12,%rax,8),%rdx
  movsd  (%rdx,%rcx,1),%xmm0
  movsd  %xmm0,(%rsi,%rax,8)
  add    $0x1,%rax
  cmp    %eax,%ebx
  jg     L95
  movsd  (%rsi,%rcx,1),%xmm0
  movsd  %xmm0,(%r11,%rdi,8)
  movsd  (%r8,%rdi,8),%xmm0
  movsd  %xmm0,(%r9,%rdi,8)
  add    $0x1,%rdi
  cmp    %rbp,%rdi
  jne    L42
  xor    %ecx,%ecx
  mov    %r12,%rax
  mov    %r10,%rdi
  mov    %ebx,%r12d
  pxor   %xmm5,%xmm5
  mov    %rcx,%rbx
  mov    %rax,%rcx
  jmp    L161
  nopl   (%rax)
L245:
  mov    0x8(%rsp),%rax
  add    (%rcx,%rbx,8),%rax
  movsd  (%rax),%xmm0
  subl   $0x1,0x24(%rsp)
  movsd  %xmm0,(%rdi)
  mov    0x38(%rsp),%rdi
  movsd  (%rdi,%rbx,8),%xmm0
  add    $0x1,%rbx
  mov    %rsi,%rdi
  movsd  %xmm0,(%rax)
  cmp    0x28(%rsp),%rbx
  je     L252
L161:
  mov    0x30(%rsp),%rax
  mov    0x40(%rsp),%rsi
  mov    %ebx,%r15d
  movslq (%rax,%rbx,4),%rax
  lea    (%rsi,%rax,8),%rbp
  lea    0x0(,%rbx,8),%rax
  ucomisd 0x0(%rbp),%xmm5
  mov    %rax,0x8(%rsp)
  jp     L176
  lea    0x8(%rdi),%rsi
  je     L245
L176:
  mov    0x24(%rsp),%eax
  cmp    %r15d,%r12d
  mov    %rcx,0x10(%rsp)
  mov    %r12d,%r13d
  mov    %r9,0xc8(%rsp)
  mov    %rax,%r14
  lea    0x8(,%rax,8),%rdx
  mov    $0x8,%eax
  mov    %r10,0xc0(%rsp)
  cmovle %rax,%rdx
  xor    %esi,%esi
  call   <memset@plt>
  movsd  0x0(%rbp),%xmm0
  mov    %r14d,%edx
  mov    0x8(%rsp),%r14
  lea    0x8(%rax),%rsi
  mov    %rax,0x50(%rsp)
  pxor   %xmm5,%xmm5
  mov    %edx,%ebp
  mov    %rsi,0x58(%rsp)
  mov    0x10(%rsp),%rcx
  movapd %xmm5,%xmm6
  mov    0xc0(%rsp),%r10
  mov    0xc8(%rsp),%r9
  mov    %rbx,0x48(%rsp)
  mov    %r14,%rbx
  movsd  %xmm0,(%rax)
  mov    %rsi,%r14
  nopl   0x0(%rax,%rax,1)
L71:
  add    $0x1,%r15d
  ucomisd -0x8(%r14),%xmm5
  jp     L122
  je     L9
L122:
  mov    (%rcx,%rbx,1),%rax
  mov    %r9,0xc8(%rsp)
  mov    %r10,0xc0(%rsp)
  movsd  (%rax,%rbx,1),%xmm0
  mov    %rcx,0x10(%rsp)
  movsd  %xmm6,0x18(%rsp)
  call   <fabs@plt>
  movsd  -0x8(%r14),%xmm0
  mov    %rax,%r12
  call   <fabs@plt>
  mov    0x10(%rsp),%rcx
  movsd  0x18(%rsp),%xmm6
  pxor   %xmm5,%xmm5
  cmp    %rax,%r12
  mov    0xc0(%rsp),%r10
  mov    0xc8(%rsp),%r9
  jge    L92
  mov    (%rcx,%rbx,1),%r12
  movsd  -0x8(%r14),%xmm4
  lea    (%r12,%rbx,1),%rax
  movsd  (%rax),%xmm2
  movapd %xmm2,%xmm1
  divsd  %xmm4,%xmm1
  movapd %xmm1,%xmm0
  mulsd  %xmm1,%xmm0
  addsd  D2(%rip),%xmm0
  ucomisd %xmm0,%xmm5
  ja     L64
  sqrtsd %xmm0,%xmm0
L20:
  movsd  D2(%rip),%xmm3
  divsd  %xmm0,%xmm3
  mulsd  %xmm3,%xmm1
L388:
  mulsd  %xmm3,%xmm4
  mulsd  %xmm1,%xmm2
  addsd  %xmm4,%xmm2
  movapd %xmm3,%xmm4
  mulsd  %xmm6,%xmm4
  mulsd  %xmm1,%xmm6
  movsd  %xmm2,(%rax)
  movsd  (%r9,%rbx,1),%xmm0
  movapd %xmm0,%xmm2
  mulsd  %xmm1,%xmm2
  addsd  %xmm4,%xmm2
  movapd %xmm3,%xmm4
  xorpd  D43(%rip),%xmm4
  mulsd  %xmm4,%xmm0
  movsd  %xmm2,(%r9,%rbx,1)
  addsd  %xmm0,%xmm6
  cmp    %r15d,%r13d
  jg     L361
L254:
  mov    0x48(%rsp),%rbx
  mov    0x50(%rsp),%rdi
  mov    %r13d,%r12d
  mov    0x58(%rsp),%rsi
  jmp    L245
  nopl   0x0(%rax)
L9:
  cmp    %r15d,%r13d
  jle    L254
  lea    0x8(%rbx),%rdi
L105:
  mov    %rdi,%rbx
  add    $0x8,%r14
  sub    $0x1,%ebp
  jmp    L71
L92:
  mov    (%rcx,%rbx,1),%r12
  movsd  -0x8(%r14),%xmm4
  lea    (%r12,%rbx,1),%rax
  movapd %xmm4,%xmm3
  movsd  (%rax),%xmm2
  divsd  %xmm2,%xmm3
  movapd %xmm3,%xmm0
  mulsd  %xmm3,%xmm0
  addsd  D2(%rip),%xmm0
  ucomisd %xmm0,%xmm5
  ja     L298
  sqrtsd %xmm0,%xmm0
L186:
  movsd  D2(%rip),%xmm1
  divsd  %xmm0,%xmm1
  mulsd  %xmm1,%xmm3
  jmp    L388
  nopl   (%rax)
L361:
  lea    0x18(%r12,%rbx,1),%rax
  lea    0x8(%rbx),%rdi
  cmp    %rax,%r14
  lea    (%r12,%rdi,1),%r11
  lea    0x10(%r14),%rax
  setae  %r8b
  cmp    %rax,%r11
  setae  %al
  or     %r8b,%al
  je     L387
  cmp    $0x1,%ebp
  je     L387
  mov    %ebp,%r8d
  movapd %xmm1,%xmm8
  movapd %xmm3,%xmm11
  xor    %eax,%eax
  movapd %xmm4,%xmm10
  shr    %r8d
  unpcklpd %xmm8,%xmm8
  unpcklpd %xmm11,%xmm11
  unpcklpd %xmm10,%xmm10
  shl    $0x4,%r8
  nopw   0x0(%rax,%rax,1)
L191:
  movupd (%r14,%rax,1),%xmm0
  movupd (%r11,%rax,1),%xmm2
  movapd %xmm10,%xmm9
  mulpd  %xmm2,%xmm9
  movapd %xmm0,%xmm7
  mulpd  %xmm8,%xmm7
  mulpd  %xmm11,%xmm0
  mulpd  %xmm8,%xmm2
  addpd  %xmm9,%xmm7
  addpd  %xmm2,%xmm0
  movups %xmm7,(%r14,%rax,1)
  movups %xmm0,(%r11,%rax,1)
  add    $0x10,%rax
  cmp    %r8,%rax
  jne    L191
  mov    %ebp,%r8d
  and    $0xfffffffe,%r8d
  lea    (%r8,%r15,1),%eax
  cmp    %r8d,%ebp
  je     L105
  cltq
  movapd %xmm1,%xmm7
  shl    $0x3,%rax
  add    %rax,%r12
  add    %r10,%rax
  movsd  (%r12),%xmm2
  movsd  (%rax),%xmm0
  mulsd  %xmm2,%xmm4
  mulsd  %xmm0,%xmm7
  mulsd  %xmm1,%xmm2
  mulsd  %xmm3,%xmm0
  addsd  %xmm7,%xmm4
  addsd  %xmm2,%xmm0
  movsd  %xmm4,(%rax)
  movsd  %xmm0,(%r12)
  jmp    L105
  nopw   0x0(%rax,%rax,1)
L11:
  mov    0x30(%rsp),%rcx
  mov    0x38(%rsp),%rsi
  xor    %eax,%eax
  mov    0x28(%rsp),%rdi
  nopl   0x0(%rax)
L24:
  movsd  (%r9,%rax,8),%xmm0
  movslq (%rcx,%rax,4),%rdx
  add    $0x1,%rax
  movsd  %xmm0,(%rsi,%rdx,8)
  cmp    %rax,%rdi
  jne    L24
L162:
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L252:
  mov    %r12d,%ebx
  mov    0x28(%rsp),%rdi
  mov    %rcx,%r12
  xor    %eax,%eax
  mov    %ebx,%edx
  xor    %esi,%esi
  nopl   0x0(%rax)
L296:
  ucomisd (%r10,%rax,8),%xmm5
  setnp  %cl
  cmovne %esi,%ecx
  test   %cl,%cl
  je     L73
  cmp    %edx,%ebx
  cmove  %eax,%edx
L73:
  cmp    %ebx,%edx
  jge    L134
  movq   $0x0,(%r9,%rax,8)
L134:
  add    $0x1,%rax
  cmp    %rdi,%rax
  jne    L296
  test   %edx,%edx
  jle    L11
  lea    -0x1(%rdx),%esi
  movslq %esi,%rcx
  lea    (%r9,%rcx,8),%rax
  movsd  (%rax),%xmm0
  divsd  (%r10,%rcx,8),%xmm0
  movsd  %xmm0,(%rax)
  cmp    $0x1,%edx
  je     L11
  movslq %edx,%rax
  mov    $0x1,%edi
  lea    -0x8(,%rax,8),%rcx
  jmp    L145
  nopl   (%rax)
L220:
  movsd  -0x8(%r9,%rcx,1),%xmm1
  add    $0x1,%edi
  sub    $0x1,%esi
  subsd  %xmm0,%xmm1
  divsd  -0x8(%r10,%rcx,1),%xmm1
  movsd  %xmm1,-0x8(%r9,%rcx,1)
  sub    $0x8,%rcx
  cmp    %edi,%edx
  je     L11
L145:
  mov    %esi,%eax
  movapd %xmm5,%xmm0
  cmp    %edx,%esi
  jge    L220
  mov    -0x8(%r12,%rcx,1),%r11
  cmp    $0x1,%edi
  je     L104
  mov    %edi,%r8d
  lea    (%r11,%rcx,1),%rbp
  lea    (%r9,%rcx,1),%rbx
  xor    %eax,%eax
  shr    %r8d
  shl    $0x4,%r8
  nopl   0x0(%rax,%rax,1)
L81:
  movupd (%rbx,%rax,1),%xmm1
  movupd 0x0(%rbp,%rax,1),%xmm6
  add    $0x10,%rax
  mulpd  %xmm6,%xmm1
  addsd  %xmm1,%xmm0
  unpckhpd %xmm1,%xmm1
  addsd  %xmm1,%xmm0
  cmp    %rax,%r8
  jne    L81
  mov    %edi,%r8d
  and    $0xfffffffe,%r8d
  lea    (%rsi,%r8,1),%eax
  cmp    %r8d,%edi
  je     L220
L104:
  cltq
  movsd  (%r9,%rax,8),%xmm1
  mulsd  (%r11,%rax,8),%xmm1
  addsd  %xmm1,%xmm0
  jmp    L220
  nop
L387:
  movslq %r15d,%rax
  nopl   0x0(%rax,%rax,1)
L241:
  movsd  (%r12,%rax,8),%xmm2
  movsd  (%r10,%rax,8),%xmm0
  movapd %xmm1,%xmm7
  movapd %xmm4,%xmm8
  mulsd  %xmm0,%xmm7
  mulsd  %xmm2,%xmm8
  mulsd  %xmm3,%xmm0
  mulsd  %xmm1,%xmm2
  addsd  %xmm8,%xmm7
  addsd  %xmm2,%xmm0
  movsd  %xmm7,(%r10,%rax,8)
  movsd  %xmm0,(%r12,%rax,8)
  add    $0x1,%rax
  cmp    %eax,%r13d
  jg     L241
  jmp    L105
L64:
  mov    %r9,0xc8(%rsp)
  mov    %r10,0xc0(%rsp)
  mov    %rcx,0x78(%rsp)
  mov    %rax,0x10(%rsp)
  movsd  %xmm1,0x70(%rsp)
  movsd  %xmm6,0x68(%rsp)
  movsd  %xmm4,0x60(%rsp)
  movsd  %xmm2,0x18(%rsp)
  call   <sqrt@plt>
  mov    0x78(%rsp),%rcx
  mov    0x10(%rsp),%rax
  pxor   %xmm5,%xmm5
  mov    0xc8(%rsp),%r9
  mov    0xc0(%rsp),%r10
  movsd  0x70(%rsp),%xmm1
  movsd  0x68(%rsp),%xmm6
  movsd  0x60(%rsp),%xmm4
  movsd  0x18(%rsp),%xmm2
  jmp    L20
L298:
  mov    %r9,0xc8(%rsp)
  mov    %r10,0xc0(%rsp)
  mov    %rcx,0x78(%rsp)
  mov    %rax,0x10(%rsp)
  movsd  %xmm3,0x70(%rsp)
  movsd  %xmm6,0x68(%rsp)
  movsd  %xmm4,0x60(%rsp)
  movsd  %xmm2,0x18(%rsp)
  call   <sqrt@plt>
  mov    0x78(%rsp),%rcx
  mov    0x10(%rsp),%rax
  pxor   %xmm5,%xmm5
  mov    0xc8(%rsp),%r9
  mov    0xc0(%rsp),%r10
  movsd  0x70(%rsp),%xmm3
  movsd  0x68(%rsp),%xmm6
  movsd  0x60(%rsp),%xmm4
  movsd  0x18(%rsp),%xmm2
  jmp    L186
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D2
datatype: f64
name: extract_symbolic_data
arguments: data_tag: D43
datatype: f32[4]

tool: D2: 1

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

assistant: ```c
void qrsolv(int n, double **r, int ipvt[], double diag[], double qtb[], double x[], double sdiag[], double wa[]) {
  int i, j, jp1, k, kp1, l, nsing;
  double qtbpj, sum, temp, dsin, dcos, dtan, dcotan;
  for (j = 0; j < n; j++) {
    for (i = j; i < n; i++)
      r[j][i] = r[i][j];
    x[j] = r[j][j];
    wa[j] = qtb[j];
  }
  for (j = 0; j < n; j++) {
    l = ipvt[j];
    if (diag[l] != 0.0) {
      for (k = j; k < n; k++)
        sdiag[k] = 0.0;
      sdiag[j] = diag[l];
      qtbpj = 0.0;
      for (k = j; k < n; k++) {
        if (sdiag[k] == 0.0)
          continue;
        if (fabs(r[k][k]) < fabs(sdiag[k])) {
          dcotan = r[k][k] / sdiag[k];
          dsin = 1.0 / sqrt(1.0 + dcotan * dcotan);
          dcos = dsin * dcotan;
        } else {
          dtan = sdiag[k] / r[k][k];
          dcos = 1.0 / sqrt(1.0 + dtan * dtan);
          dsin = dcos * dtan;
        }
        r[k][k] = dcos * r[k][k] + dsin * sdiag[k];
        temp = dcos * wa[k] + dsin * qtbpj;
        qtbpj = -dsin * wa[k] + dcos * qtbpj;
        wa[k] = temp;
        kp1 = k + 1;
        if (n <= kp1)
          continue;
        for (i = kp1; i < n; i++) {
          temp = dcos * r[k][i] + dsin * sdiag[i];
          sdiag[i] = -dsin * r[k][i] + dcos * sdiag[i];
          r[k][i] = temp;
        }
      }
    }
    sdiag[j] = r[j][j];
    r[j][j] = x[j];
  }
  nsing = n;
  for (j = 0; j < n; j++) {
    if ((sdiag[j] == 0.0) && (nsing == n))
      nsing = j;
    if (nsing < n)
      wa[j] = 0.0;
  }
  if (nsing >= 1) {
    for (k = 0; k < nsing; k++) {
      j = nsing - k - 1;
      sum = 0.0;
      jp1 = j + 1;
      if (nsing > jp1) {
        for (i = jp1; i < nsing; i++)
          sum += r[j][i] * wa[i];
      }
      wa[j] = (wa[j] - sum) / sdiag[j];
    }
  }
  for (j = 0; j < n; j++) {
    l = ipvt[j];
    x[l] = wa[j];
  }
}
```