user: Translate the below assembly code into C programming language:

```asm
<mp_qrsolv>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x98,%rsp
  mov    %rsi,0x30(%rsp)
  mov    0xd8(%rsp),%r13
  mov    %edx,0x7c(%rsp)
  mov    0xe0(%rsp),%r15
  mov    %rcx,0x50(%rsp)
  mov    %r8,0x58(%rsp)
  test   %edi,%edi
  jle    L217
  lea    0x1(%rdx),%eax
  mov    %edi,%r8d
  mov    0xd0(%rsp),%r12
  mov    %edi,%ebx
  mov    %eax,0xc(%rsp)
  cltq
  mov    %rsi,%rbp
  mov    %rsi,%r10
  shl    $0x3,%rax
  mov    %r8,0x70(%rsp)
  xor    %r11d,%r11d
  mov    %rax,0x60(%rsp)
  mov    %rax,%rsi
  lea    -0x8(%rax),%rdi
  nopl   0x0(%rax)
L201:
  mov    %r11d,%ecx
  mov    %rbp,%rdx
  mov    %rbp,%rax
  nopl   0x0(%rax)
L279:
  movsd  (%rax),%xmm0
  add    $0x1,%ecx
  add    %rdi,%rax
  add    $0x8,%rdx
  movsd  %xmm0,-0x8(%rdx)
  cmp    %ecx,%ebx
  jg     L279
  movsd  0x0(%rbp),%xmm0
  add    %rsi,%rbp
  movsd  %xmm0,(%r12,%r11,8)
  movsd  (%r9,%r11,8),%xmm0
  movsd  %xmm0,(%r15,%r11,8)
  add    $0x1,%r11
  cmp    %r8,%r11
  jne    L201
  lea    0x1(%rbx),%eax
  mov    $0x1,%r14d
  mov    %ebx,%ecx
  mov    %r15,%r9
  mov    %r14,%rbx
  mov    %rax,0x68(%rsp)
  pxor   %xmm7,%xmm7
  mov    %r10,%r14
  movl   $0x0,0x78(%rsp)
  mov    %r13,%r15
  jmp    L5
  nopl   0x0(%rax)
L2:
  movsd  (%r14),%xmm0
  mov    0xd0(%rsp),%rax
  add    $0x8,%r15
  mov    0xc(%rsp),%edi
  add    %edi,0x78(%rsp)
  movsd  %xmm0,-0x8(%r15)
  movsd  -0x8(%rax,%rbx,8),%xmm0
  add    $0x1,%rbx
  movsd  %xmm0,(%r14)
  add    0x60(%rsp),%r14
  cmp    %rbx,0x68(%rsp)
  je     L69
L5:
  mov    0x50(%rsp),%rax
  mov    0x58(%rsp),%rdi
  mov    %ebx,%edx
  lea    -0x1(%rbx),%esi
  movslq -0x4(%rax,%rbx,4),%rax
  lea    (%rdi,%rax,8),%rbp
  ucomisd 0x0(%rbp),%xmm7
  jp     L52
  je     L2
L52:
  mov    %ecx,%eax
  mov    %r15,%rdi
  mov    %r9,0xe0(%rsp)
  mov    %r13,%r12
  sub    %edx,%eax
  cmp    %ecx,%esi
  mov    %ecx,0x10(%rsp)
  lea    0x8(,%rax,8),%rdx
  mov    $0x8,%eax
  cmovge %rax,%rdx
  xor    %esi,%esi
  call   <memset@plt>
  mov    %r13,%rsi
  mov    0x78(%rsp),%edx
  pxor   %xmm7,%xmm7
  movsd  0x0(%rbp),%xmm0
  sub    %r15,%rsi
  mov    %rbx,%rbp
  mov    %r15,0x38(%rsp)
  mov    0xe0(%rsp),%r13
  mov    %r14,0x40(%rsp)
  movapd %xmm7,%xmm6
  mov    %rbp,%r14
  movsd  %xmm0,(%r15)
  mov    0x10(%rsp),%r15d
  mov    %rsi,%rbp
  mov    %rbx,0x48(%rsp)
  mov    %edx,%ebx
  nopw   0x0(%rax,%rax,1)
L295:
  ucomisd %xmm7,%xmm0
  jp     L107
  je     L85
L107:
  mov    0x30(%rsp),%rax
  movslq %ebx,%r10
  movsd  %xmm6,0x28(%rsp)
  shl    $0x3,%r10
  lea    (%rax,%r10,1),%r11
  mov    %r10,0x20(%rsp)
  movsd  (%r11),%xmm0
  mov    %r11,0x18(%rsp)
  call   <fabs@plt>
  movsd  -0x8(%r12,%r14,8),%xmm0
  mov    %rax,0x10(%rsp)
  call   <fabs@plt>
  cmp    %rax,0x10(%rsp)
  mov    0x18(%rsp),%r11
  pxor   %xmm7,%xmm7
  mov    0x20(%rsp),%r10
  movsd  0x28(%rsp),%xmm6
  jge    L65
  movsd  (%r11),%xmm1
  movsd  -0x8(%r12,%r14,8),%xmm3
  movsd  D47(%rip),%xmm0
  movapd %xmm1,%xmm2
  divsd  %xmm3,%xmm2
  mulsd  %xmm2,%xmm0
  mulsd  %xmm2,%xmm0
  addsd  D47(%rip),%xmm0
  ucomisd %xmm0,%xmm7
  ja     L145
  sqrtsd %xmm0,%xmm0
L59:
  movsd  D7(%rip),%xmm4
  divsd  %xmm0,%xmm4
  mulsd  %xmm4,%xmm2
L51:
  mulsd  %xmm4,%xmm3
  movapd %xmm4,%xmm8
  xorpd  D27(%rip),%xmm8
  mulsd  %xmm2,%xmm1
  addsd  %xmm3,%xmm1
  movapd %xmm4,%xmm3
  mulsd  %xmm6,%xmm3
  mulsd  %xmm2,%xmm6
  movsd  %xmm1,(%r11)
  movsd  -0x8(%r13,%r14,8),%xmm0
  movapd %xmm0,%xmm1
  mulsd  %xmm2,%xmm1
  mulsd  %xmm8,%xmm0
  addsd  %xmm3,%xmm1
  addsd  %xmm0,%xmm6
  movsd  %xmm1,-0x8(%r13,%r14,8)
  cmp    %r14d,%r15d
  jg     L104
L161:
  mov    %r15d,%ecx
  mov    %r13,%r9
  mov    0x40(%rsp),%r14
  mov    0x48(%rsp),%rbx
  mov    0x38(%rsp),%r15
  mov    %r12,%r13
  jmp    L2
  nopl   0x0(%rax)
L85:
  cmp    %r14d,%r15d
  jle    L161
L250:
  movsd  (%r12,%r14,8),%xmm0
  add    0xc(%rsp),%ebx
  add    $0x1,%r14
  sub    $0x8,%rbp
  jmp    L295
  nopl   0x0(%rax)
L65:
  movsd  -0x8(%r12,%r14,8),%xmm3
  movsd  (%r11),%xmm1
  movsd  D47(%rip),%xmm0
  movapd %xmm3,%xmm4
  divsd  %xmm1,%xmm4
  mulsd  %xmm4,%xmm0
  mulsd  %xmm4,%xmm0
  addsd  D47(%rip),%xmm0
  ucomisd %xmm0,%xmm7
  ja     L139
  sqrtsd %xmm0,%xmm0
L46:
  movsd  D7(%rip),%xmm2
  divsd  %xmm0,%xmm2
  mulsd  %xmm2,%xmm4
  jmp    L51
  nop
L104:
  add    %rbp,%r10
  movslq %r14d,%rax
  add    0x30(%rsp),%r10
  nopl   0x0(%rax,%rax,1)
L259:
  movsd  (%r12,%rax,8),%xmm1
  movsd  (%r10,%rax,8),%xmm0
  movapd %xmm8,%xmm3
  mulsd  %xmm0,%xmm3
  movapd %xmm1,%xmm5
  mulsd  %xmm2,%xmm5
  mulsd  %xmm2,%xmm0
  mulsd  %xmm4,%xmm1
  addsd  %xmm5,%xmm3
  addsd  %xmm1,%xmm0
  movsd  %xmm3,(%r12,%rax,8)
  movsd  %xmm0,(%r10,%rax,8)
  add    $0x1,%rax
  cmp    %eax,%r15d
  jg     L259
  jmp    L250
  nopw   0x0(%rax,%rax,1)
L287:
  mov    0x50(%rsp),%rcx
  mov    0xd0(%rsp),%rsi
  xor    %eax,%eax
  nop
L144:
  movsd  (%r15,%rax,8),%xmm0
  movslq (%rcx,%rax,4),%rdx
  add    $0x1,%rax
  movsd  %xmm0,(%rsi,%rdx,8)
  cmp    %eax,%ebx
  jg     L144
L217:
  add    $0x98,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L69:
  mov    0x70(%rsp),%rsi
  mov    %ecx,%ebx
  mov    %r9,%r15
  mov    %ecx,%edx
  xor    %eax,%eax
  xor    %edi,%edi
L233:
  ucomisd 0x0(%r13,%rax,8),%xmm7
  setnp  %cl
  cmovne %edi,%ecx
  test   %cl,%cl
  je     L19
  cmp    %edx,%ebx
  cmove  %eax,%edx
L19:
  cmp    %ebx,%edx
  jge    L210
  movq   $0x0,(%r15,%rax,8)
L210:
  add    $0x1,%rax
  cmp    %rsi,%rax
  jne    L233
  test   %edx,%edx
  je     L287
  mov    0x7c(%rsp),%ecx
  lea    -0x2(%rdx),%edi
  movslq %edx,%r11
  lea    -0x1(%rdx),%eax
  mov    %r11,%r9
  movslq %eax,%rsi
  sub    $0x1,%r11
  mov    0x30(%rsp),%r8
  imul   %ecx,%edi
  mov    %ecx,%r10d
  movapd %xmm7,%xmm1
  neg    %r9
  not    %r10d
  lea    0x8(,%r9,8),%r9
  add    %eax,%edi
  mov    %eax,%eax
  sub    %rax,%r11
  jmp    L128
  nopl   0x0(%rax)
L290:
  sub    $0x1,%rsi
  add    %r10d,%edi
  add    $0x8,%r9
L128:
  movsd  (%r15,%rsi,8),%xmm0
  subsd  %xmm1,%xmm0
  divsd  0x0(%r13,%rsi,8),%xmm0
  movsd  %xmm0,(%r15,%rsi,8)
  cmp    %rsi,%r11
  je     L287
  movapd %xmm7,%xmm1
  cmp    %esi,%edx
  jle    L290
  movslq %edi,%rax
  lea    (%r9,%rax,8),%rcx
  mov    %rsi,%rax
  add    %r8,%rcx
L212:
  movsd  (%rcx,%rax,8),%xmm0
  mulsd  (%r15,%rax,8),%xmm0
  add    $0x1,%rax
  addsd  %xmm0,%xmm1
  cmp    %eax,%edx
  jg     L212
  jmp    L290
L145:
  mov    %r11,0x18(%rsp)
  mov    %r10,0x10(%rsp)
  movsd  %xmm6,0x88(%rsp)
  movsd  %xmm2,0x80(%rsp)
  movsd  %xmm3,0x28(%rsp)
  movsd  %xmm1,0x20(%rsp)
  call   <sqrt@plt>
  movsd  0x28(%rsp),%xmm3
  movsd  0x20(%rsp),%xmm1
  pxor   %xmm7,%xmm7
  movsd  0x88(%rsp),%xmm6
  mov    0x18(%rsp),%r11
  movsd  0x80(%rsp),%xmm2
  mov    0x10(%rsp),%r10
  jmp    L59
L139:
  mov    %r11,0x18(%rsp)
  mov    %r10,0x10(%rsp)
  movsd  %xmm6,0x88(%rsp)
  movsd  %xmm4,0x80(%rsp)
  movsd  %xmm3,0x28(%rsp)
  movsd  %xmm1,0x20(%rsp)
  call   <sqrt@plt>
  movsd  0x28(%rsp),%xmm3
  movsd  0x20(%rsp),%xmm1
  pxor   %xmm7,%xmm7
  movsd  0x88(%rsp),%xmm6
  mov    0x18(%rsp),%r11
  movsd  0x80(%rsp),%xmm4
  mov    0x10(%rsp),%r10
  jmp    L46
```

tool_calls: name: parse_data
arguments: data_tag: D47
type_infered: f64
name: parse_data
arguments: data_tag: D7
type_infered: f64
name: parse_data
arguments: data_tag: D27
type_infered: f32[4]

tool: D47: 0.25

tool: D7: 0.5

tool: {"D27": [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];
  }
}
```