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

```asm
<mp_qrsolv>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xa8,%rsp
  mov    %r8,0x78(%rsp)
  mov    0xe8(%rsp),%r15
  mov    %edx,0x10(%rsp)
  mov    0xf0(%rsp),%r8
  mov    %rcx,0x70(%rsp)
  test   %edi,%edi
  jle    L18
  lea    0x1(%rdx),%eax
  mov    %edi,%r14d
  mov    %rsi,%r13
  mov    %eax,0x14(%rsp)
  cmp    $0x1,%edx
  jne    L371
  mov    %rsi,%rdx
  mov    0xe0(%rsp),%rsi
  lea    0x1(%rdi),%ecx
  mov    $0x1,%eax
  nopl   0x0(%rax)
L313:
  movsd  (%rdx),%xmm0
  add    $0x10,%rdx
  movsd  %xmm0,-0x8(%rsi,%rax,8)
  movsd  -0x8(%r9,%rax,8),%xmm0
  movsd  %xmm0,-0x8(%r8,%rax,8)
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L313
L327:
  movslq 0x10(%rsp),%rax
  mov    %r13,0x50(%rsp)
  mov    $0x1,%r10d
  pxor   %xmm6,%xmm6
  mov    %r15,0x18(%rsp)
  mov    %r13,%rcx
  lea    0x8(,%rax,8),%rax
  movl   $0x0,0x64(%rsp)
  mov    %rax,0x80(%rsp)
  lea    -0x1(%r14),%eax
  add    $0x2,%rax
  mov    %r14d,0xc(%rsp)
  mov    %rax,0x88(%rsp)
  movl   $0x0,0x90(%rsp)
  mov    %r15,0xe8(%rsp)
  mov    %r8,0xf0(%rsp)
  jmp    L217
  nopl   0x0(%rax,%rax,1)
L392:
  mov    0x50(%rsp),%rax
  mov    0x18(%rsp),%rsi
  mov    0x80(%rsp),%rdi
  movsd  (%rax),%xmm0
  movsd  %xmm0,(%rsi)
  mov    0xe0(%rsp),%rsi
  movsd  -0x8(%rsi,%r10,8),%xmm0
  mov    0x14(%rsp),%esi
  add    $0x1,%r10
  add    %esi,0x64(%rsp)
  movsd  %xmm0,(%rax)
  add    %rdi,%rax
  mov    0x10(%rsp),%edi
  mov    %rax,0x50(%rsp)
  mov    0x48(%rsp),%rax
  add    %edi,0x90(%rsp)
  mov    %rax,0x18(%rsp)
  cmp    0x88(%rsp),%r10
  je     L126
L217:
  mov    0x70(%rsp),%rax
  mov    0x78(%rsp),%rdi
  mov    %r10d,%edx
  lea    -0x1(%r10),%esi
  movslq -0x4(%rax,%r10,4),%rax
  lea    (%rdi,%rax,8),%rbx
  ucomisd (%rbx),%xmm6
  jp     L379
  mov    0x18(%rsp),%rax
  lea    0x8(%rax),%rax
  mov    %rax,0x48(%rsp)
  je     L392
L379:
  mov    0xc(%rsp),%edi
  mov    0x18(%rsp),%r15
  mov    %rcx,0x28(%rsp)
  mov    %r10,0x20(%rsp)
  mov    %edi,%r13d
  sub    %edx,%r13d
  cmp    %esi,%edi
  mov    %r15,%rdi
  mov    %r13d,%eax
  lea    0x8(,%rax,8),%rdx
  mov    $0x8,%eax
  cmovle %rax,%rdx
  xor    %esi,%esi
  call   <memset@plt>
  movsd  (%rbx),%xmm0
  mov    0x64(%rsp),%esi
  mov    %r13d,%edi
  mov    0x20(%rsp),%r10
  add    $0x8,%rax
  pxor   %xmm6,%xmm6
  mov    0xe8(%rsp),%r8
  mov    %rax,0x48(%rsp)
  mov    0x90(%rsp),%r9d
  mov    %rax,%rbp
  movapd %xmm6,%xmm5
  mov    %r10,0x68(%rsp)
  sub    %r15,%r8
  mov    0x28(%rsp),%rcx
  mov    %r10,%rbx
  movsd  %xmm0,(%r15)
  mov    %esi,%r15d
  mov    0xf0(%rsp),%rsi
  nopl   (%rax)
L152:
  ucomisd -0x8(%rbp),%xmm6
  lea    -0x1(%rbx),%r13
  mov    %ebx,%r12d
  jp     L16
  je     L396
L16:
  movslq %r15d,%r14
  mov    %rsi,0xf0(%rsp)
  lea    0x0(,%r14,8),%rax
  mov    %edi,0x60(%rsp)
  lea    (%rcx,%rax,1),%r14
  mov    %r9d,0x40(%rsp)
  movsd  (%r14),%xmm0
  mov    %r8,0x38(%rsp)
  mov    %rcx,0x28(%rsp)
  movsd  %xmm5,0x30(%rsp)
  mov    %rax,0x58(%rsp)
  call   <fabs@plt>
  movsd  -0x8(%rbp),%xmm0
  mov    %rax,0x20(%rsp)
  call   <fabs@plt>
  cmp    %rax,0x20(%rsp)
  mov    0x28(%rsp),%rcx
  pxor   %xmm6,%xmm6
  movsd  0x30(%rsp),%xmm5
  mov    0x38(%rsp),%r8
  mov    0x40(%rsp),%r9d
  mov    0x60(%rsp),%edi
  mov    0xf0(%rsp),%rsi
  jge    L215
  movsd  (%r14),%xmm3
  movsd  -0x8(%rbp),%xmm4
  movsd  D58(%rip),%xmm0
  movapd %xmm3,%xmm1
  divsd  %xmm4,%xmm1
  mulsd  %xmm1,%xmm0
  mulsd  %xmm1,%xmm0
  addsd  D58(%rip),%xmm0
  ucomisd %xmm0,%xmm6
  ja     L133
  sqrtsd %xmm0,%xmm0
L144:
  movsd  D8(%rip),%xmm2
  divsd  %xmm0,%xmm2
  mulsd  %xmm2,%xmm1
L276:
  mulsd  %xmm2,%xmm4
  movslq %ebx,%rdx
  mulsd  %xmm1,%xmm3
  addsd  %xmm4,%xmm3
  movapd %xmm2,%xmm4
  mulsd  %xmm5,%xmm4
  mulsd  %xmm1,%xmm5
  movsd  %xmm3,(%r14)
  movsd  -0x8(%rsi,%rbx,8),%xmm0
  movapd %xmm0,%xmm3
  mulsd  %xmm1,%xmm3
  addsd  %xmm4,%xmm3
  movapd %xmm2,%xmm4
  xorpd  D16(%rip),%xmm4
  mulsd  %xmm4,%xmm0
  movsd  %xmm3,-0x8(%rsi,%rbx,8)
  addsd  %xmm0,%xmm5
  cmp    %ebx,0xc(%rsp)
  jg     L338
L417:
  mov    0x68(%rsp),%r10
  jmp    L392
  nopw   0x0(%rax,%rax,1)
L396:
  cmp    %ebx,0xc(%rsp)
  jle    L417
L366:
  add    $0x1,%rbx
  add    0x14(%rsp),%r15d
  sub    $0x8,%r8
  sub    $0x1,%edi
  add    0x10(%rsp),%r9d
  add    $0x8,%rbp
  jmp    L152
  nopl   0x0(%rax)
L215:
  movsd  -0x8(%rbp),%xmm4
  movsd  (%r14),%xmm3
  movsd  D58(%rip),%xmm0
  movapd %xmm4,%xmm2
  divsd  %xmm3,%xmm2
  mulsd  %xmm2,%xmm0
  mulsd  %xmm2,%xmm0
  addsd  D58(%rip),%xmm0
  ucomisd %xmm0,%xmm6
  ja     L214
  sqrtsd %xmm0,%xmm0
L330:
  movsd  D8(%rip),%xmm1
  divsd  %xmm0,%xmm1
  mulsd  %xmm1,%xmm2
  jmp    L276
  nopl   (%rax)
L338:
  movslq %r9d,%r11
  lea    0x1(%r15),%eax
  lea    0x3(%r13,%r11,1),%r11
  lea    0x10(%rbp),%r13
  shl    $0x3,%r11
  lea    -0x10(%rcx,%r11,1),%r10
  cmp    %r13,%r10
  setae  %r13b
  add    %rcx,%r11
  cmp    %r11,%rbp
  setae  %r11b
  or     %r13b,%r11b
  je     L194
  cmp    $0x1,%edi
  je     L194
  mov    %edi,%r11d
  movapd %xmm1,%xmm8
  movapd %xmm2,%xmm11
  xor    %edx,%edx
  movapd %xmm4,%xmm10
  shr    %r11d
  unpcklpd %xmm8,%xmm8
  unpcklpd %xmm11,%xmm11
  unpcklpd %xmm10,%xmm10
  shl    $0x4,%r11
  xchg   %ax,%ax
L307:
  movupd (%r10,%rdx,1),%xmm0
  movupd 0x0(%rbp,%rdx,1),%xmm3
  movapd %xmm8,%xmm9
  mulpd  %xmm3,%xmm9
  movapd %xmm0,%xmm7
  mulpd  %xmm10,%xmm7
  mulpd  %xmm8,%xmm0
  mulpd  %xmm11,%xmm3
  addpd  %xmm9,%xmm7
  addpd  %xmm3,%xmm0
  movups %xmm7,0x0(%rbp,%rdx,1)
  movups %xmm0,(%r10,%rdx,1)
  add    $0x10,%rdx
  cmp    %r11,%rdx
  jne    L307
  mov    %edi,%edx
  and    $0xfffffffe,%edx
  add    %edx,%r12d
  add    %edx,%eax
  cmp    %edi,%edx
  je     L366
  mov    0xe8(%rsp),%rdx
  movslq %r12d,%r12
  cltq
  lea    (%rcx,%rax,8),%rax
  lea    (%rdx,%r12,8),%rdx
  movsd  (%rax),%xmm3
  movsd  (%rdx),%xmm0
  mulsd  %xmm3,%xmm4
  mulsd  %xmm1,%xmm3
  movapd %xmm0,%xmm7
  mulsd  %xmm1,%xmm7
  mulsd  %xmm2,%xmm0
  addsd  %xmm7,%xmm4
  addsd  %xmm3,%xmm0
  movsd  %xmm4,(%rdx)
  movsd  %xmm0,(%rax)
  jmp    L366
  nopl   (%rax)
L194:
  mov    0x58(%rsp),%rax
  mov    0xc(%rsp),%r11d
  mov    0xe8(%rsp),%r10
  add    %r8,%rax
  add    %rcx,%rax
  nopl   0x0(%rax,%rax,1)
L343:
  movsd  (%rax,%rdx,8),%xmm3
  movsd  (%r10,%rdx,8),%xmm0
  movapd %xmm1,%xmm7
  movapd %xmm4,%xmm8
  mulsd  %xmm0,%xmm7
  mulsd  %xmm3,%xmm8
  mulsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm3
  addsd  %xmm8,%xmm7
  addsd  %xmm3,%xmm0
  movsd  %xmm7,(%r10,%rdx,8)
  movsd  %xmm0,(%rax,%rdx,8)
  add    $0x1,%rdx
  cmp    %edx,%r11d
  jg     L343
  jmp    L366
L31:
  mov    0xc(%rsp),%r14d
L27:
  mov    0x70(%rsp),%rcx
  mov    0xe0(%rsp),%rsi
  xor    %eax,%eax
  nopl   0x0(%rax,%rax,1)
L124:
  movsd  (%r8,%rax,8),%xmm0
  movslq (%rcx,%rax,4),%rdx
  add    $0x1,%rax
  movsd  %xmm0,(%rsi,%rdx,8)
  cmp    %eax,%r14d
  jg     L124
L18:
  add    $0xa8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L126:
  mov    0xc(%rsp),%edi
  mov    0xe8(%rsp),%r15
  xor    %edx,%edx
  xor    %esi,%esi
  mov    0xf0(%rsp),%r8
  mov    %rcx,%r13
  mov    %rdi,%r14
  mov    %edi,%eax
L169:
  ucomisd (%r15,%rdx,8),%xmm6
  setnp  %cl
  cmovne %esi,%ecx
  test   %cl,%cl
  je     L199
  cmp    %eax,%r14d
  cmove  %edx,%eax
L199:
  cmp    %r14d,%eax
  jge    L317
  movq   $0x0,(%r8,%rdx,8)
L317:
  add    $0x1,%rdx
  cmp    %rdi,%rdx
  jne    L169
  test   %eax,%eax
  je     L27
  lea    -0x1(%rax),%r10d
  movslq %r10d,%rcx
  lea    (%r8,%rcx,8),%rdx
  movsd  (%rdx),%xmm0
  divsd  (%r15,%rcx,8),%xmm0
  movsd  %xmm0,(%rdx)
  cmp    $0x1,%eax
  je     L27
  mov    0x10(%rsp),%ecx
  lea    -0x2(%rax),%ebx
  movslq %eax,%r9
  mov    %r14d,0xc(%rsp)
  sub    $0x1,%r9
  mov    $0x1,%edi
  imul   %ecx,%ebx
  mov    %ecx,%r12d
  lea    (%r8,%r9,8),%rsi
  mov    %ecx,%r14d
  not    %r12d
  add    %ebx,%r10d
  jmp    L383
  nopl   0x0(%rax,%rax,1)
L161:
  movsd  -0x8(%rsi),%xmm1
  add    $0x1,%edi
  add    %r12d,%r10d
  sub    $0x8,%rsi
  sub    %r14d,%ebx
  subsd  %xmm0,%xmm1
  divsd  -0x8(%r15,%r9,8),%xmm1
  sub    $0x1,%r9
  movsd  %xmm1,(%rsi)
  cmp    %edi,%eax
  je     L31
L383:
  mov    %eax,%ecx
  movapd %xmm6,%xmm0
  sub    %edi,%ecx
  cmp    %eax,%ecx
  jge    L161
  mov    %r10d,%edx
  cmp    $0x1,%edi
  je     L363
  movslq %ebx,%rdx
  mov    %edi,%r11d
  add    %r9,%rdx
  shr    %r11d
  lea    0x0(%r13,%rdx,8),%rbp
  shl    $0x4,%r11
  xor    %edx,%edx
L294:
  movupd (%rsi,%rdx,1),%xmm2
  movupd 0x0(%rbp,%rdx,1),%xmm5
  add    $0x10,%rdx
  mulpd  %xmm5,%xmm2
  addsd  %xmm2,%xmm0
  unpckhpd %xmm2,%xmm2
  addsd  %xmm2,%xmm0
  cmp    %rdx,%r11
  jne    L294
  mov    %edi,%r11d
  and    $0xfffffffe,%r11d
  add    %r11d,%ecx
  lea    (%r10,%r11,1),%edx
  cmp    %r11d,%edi
  je     L161
L363:
  movslq %edx,%rdx
  movslq %ecx,%rcx
  movsd  0x0(%r13,%rdx,8),%xmm1
  mulsd  (%r8,%rcx,8),%xmm1
  addsd  %xmm1,%xmm0
  jmp    L161
L371:
  movslq %eax,%r11
  mov    0xe0(%rsp),%rbp
  mov    %rsi,%r10
  movslq %edi,%rbx
  shl    $0x3,%r11
  xor    %edi,%edi
  lea    -0x8(%r11),%rsi
  nopw   0x0(%rax,%rax,1)
L94:
  mov    %edi,%ecx
  mov    %r10,%rdx
  mov    %r10,%rax
L125:
  movsd  (%rax),%xmm0
  add    $0x1,%ecx
  add    %rsi,%rax
  add    $0x8,%rdx
  movsd  %xmm0,-0x8(%rdx)
  cmp    %ecx,%r14d
  jg     L125
  movsd  (%r10),%xmm0
  add    %r11,%r10
  movsd  %xmm0,0x0(%rbp,%rdi,8)
  movsd  (%r9,%rdi,8),%xmm0
  movsd  %xmm0,(%r8,%rdi,8)
  add    $0x1,%rdi
  cmp    %rbx,%rdi
  jne    L94
  jmp    L327
L133:
  mov    %rsi,0xf0(%rsp)
  mov    %rcx,0x98(%rsp)
  mov    %edi,0x94(%rsp)
  mov    %r9d,0x60(%rsp)
  mov    %r8,0x40(%rsp)
  movsd  %xmm5,0x38(%rsp)
  movsd  %xmm1,0x30(%rsp)
  movsd  %xmm4,0x28(%rsp)
  movsd  %xmm3,0x20(%rsp)
  call   <sqrt@plt>
  mov    0x94(%rsp),%edi
  mov    0x60(%rsp),%r9d
  pxor   %xmm6,%xmm6
  mov    0xf0(%rsp),%rsi
  mov    0x98(%rsp),%rcx
  mov    0x40(%rsp),%r8
  movsd  0x38(%rsp),%xmm5
  movsd  0x30(%rsp),%xmm1
  movsd  0x28(%rsp),%xmm4
  movsd  0x20(%rsp),%xmm3
  jmp    L144
L214:
  mov    %rsi,0xf0(%rsp)
  mov    %rcx,0x98(%rsp)
  mov    %edi,0x94(%rsp)
  mov    %r9d,0x60(%rsp)
  mov    %r8,0x40(%rsp)
  movsd  %xmm5,0x38(%rsp)
  movsd  %xmm2,0x30(%rsp)
  movsd  %xmm4,0x28(%rsp)
  movsd  %xmm3,0x20(%rsp)
  call   <sqrt@plt>
  mov    0x94(%rsp),%edi
  mov    0x60(%rsp),%r9d
  pxor   %xmm6,%xmm6
  mov    0xf0(%rsp),%rsi
  mov    0x98(%rsp),%rcx
  mov    0x40(%rsp),%r8
  movsd  0x38(%rsp),%xmm5
  movsd  0x30(%rsp),%xmm2
  movsd  0x28(%rsp),%xmm4
  movsd  0x20(%rsp),%xmm3
  jmp    L330
```

tool_calls: name: read_data
arguments: tag: D58
type_guessed: f64
name: read_data
arguments: tag: D8
type_guessed: f64
name: read_data
arguments: tag: D16
type_guessed: f32[4]

tool: D58: 0.25

tool: D8: 0.5

tool: {"D16": [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 cs, cotan, qtbpj, sn, sum, tn, 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];
        sn = p5 / sqrt(p25 + p25 * cotan * cotan);
        cs = sn * cotan;
      } else {
        tn = sdiag[k] / r[kk];
        cs = p5 / sqrt(p25 + p25 * tn * tn);
        sn = cs * tn;
      }
      r[kk] = cs * r[kk] + sn * sdiag[k];
      temp = cs * wa[k] + sn * qtbpj;
      qtbpj = -sn * wa[k] + cs * qtbpj;
      wa[k] = temp;
      kp1 = k + 1;
      if (n > kp1) {
        ik = kk + 1;
        for (i = kp1; i < n; i++) {
          temp = cs * r[ik] + sn * sdiag[i];
          sdiag[i] = -sn * r[ik] + cs * 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];
  }
}
```