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

```asm
<mp_lmpar>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %edi,%ebp
  mov    %rsi,0x28(%rsp)
  mov    %edx,0x34(%rsp)
  mov    %rcx,0x20(%rsp)
  mov    %r8,%r12
  mov    %r9,%r13
  movsd  %xmm0,0x10(%rsp)
  mov    0xb0(%rsp),%rbx
  mov    0xb8(%rsp),%r14
  test   %edi,%edi
  jle    L341
  movslq %edx,%rax
  lea    0x8(,%rax,8),%r9
  mov    %rsi,%rcx
  mov    %edi,%r8d
  mov    %edi,%r15d
  mov    $0x0,%eax
  pxor   %xmm1,%xmm1
  mov    $0x0,%edi
  mov    0x90(%rsp),%r10
  jmp    L140
L397:
  movsd  %xmm0,(%rbx,%rax,8)
  add    $0x1,%rax
  add    %r9,%rcx
  cmp    %r8,%rax
  je     L102
L140:
  movsd  (%r10,%rax,8),%xmm0
  movsd  %xmm0,(%rbx,%rax,8)
  ucomisd (%rcx),%xmm1
  setnp  %dl
  cmovne %edi,%edx
  test   %dl,%dl
  je     L549
  cmp    %r15d,%ebp
  cmove  %eax,%r15d
L549:
  cmp    %ebp,%r15d
  jge    L397
  pxor   %xmm0,%xmm0
  jmp    L397
L102:
  test   %r15d,%r15d
  jle    L587
  movslq %r15d,%rdx
  lea    (%rbx,%rdx,8),%rsi
  mov    0x34(%rsp),%edi
  mov    %edi,%r10d
  not    %r10d
  movslq %r10d,%r10
  shl    $0x3,%r10
  lea    -0x1(%r15),%eax
  imul   %edi,%eax
  cltq
  add    %rax,%rdx
  mov    0x28(%rsp),%r11
  lea    (%r11,%rdx,8),%r8
  lea    -0x2(%r15),%ecx
  neg    %edi
  movslq %edi,%r9
  shl    $0x3,%r9
  lea    (%r11,%rax,8),%rdx
  jmp    L124
L230:
  mov    %ecx,%edi
  mov    $0x0,%eax
L404:
  movapd %xmm1,%xmm2
  mulsd  (%rdx,%rax,8),%xmm2
  movsd  (%rbx,%rax,8),%xmm0
  subsd  %xmm2,%xmm0
  movsd  %xmm0,(%rbx,%rax,8)
  mov    %rax,%r11
  add    $0x1,%rax
  cmp    %rdi,%r11
  jne    L404
  sub    $0x8,%rsi
  add    %r10,%r8
  sub    $0x1,%ecx
  add    %r9,%rdx
L124:
  movsd  -0x8(%rsi),%xmm1
  divsd  -0x8(%r8),%xmm1
  movsd  %xmm1,-0x8(%rsi)
  test   %ecx,%ecx
  jns    L230
  sub    $0x8,%rsi
  add    %r10,%r8
  sub    $0x1,%ecx
  add    %r9,%rdx
  cmp    $0xfffffffe,%ecx
  jne    L124
L587:
  mov    %ebp,%edx
  mov    $0x0,%eax
  mov    0x20(%rsp),%rsi
  mov    0xa0(%rsp),%rdi
L310:
  movsd  (%rbx,%rax,8),%xmm0
  movslq (%rsi,%rax,4),%rcx
  movsd  %xmm0,(%rdi,%rcx,8)
  add    $0x1,%rax
  cmp    %rdx,%rax
  jne    L310
  mov    $0x0,%eax
  mov    0xa0(%rsp),%rsi
L74:
  movslq (%r12,%rax,4),%rcx
  movsd  0x0(%r13,%rcx,8),%xmm0
  mulsd  (%rsi,%rax,8),%xmm0
  movsd  %xmm0,(%r14,%rax,8)
  add    $0x1,%rax
  cmp    %rdx,%rax
  jne    L74
L456:
  mov    %r14,%rsi
  mov    %ebp,%edi
  call   <mp_enorm@plt>
  movapd %xmm0,%xmm6
  movsd  %xmm0,(%rsp)
  movsd  0x10(%rsp),%xmm7
  subsd  %xmm7,%xmm6
  movsd  %xmm6,0x38(%rsp)
  mulsd  D67(%rip),%xmm7
  movsd  %xmm7,0x40(%rsp)
  comisd %xmm6,%xmm7
  jae    L380
  pxor   %xmm4,%xmm4
  movsd  %xmm4,0x8(%rsp)
  cmp    %ebp,%r15d
  jl     L276
  test   %ebp,%ebp
  jle    L536
  lea    -0x1(%rbp),%r10d
  mov    %r10d,%esi
  mov    $0x0,%eax
  mov    0x20(%rsp),%rdi
L378:
  movslq (%rdi,%rax,4),%rdx
  movslq (%r12,%rdx,4),%rcx
  movsd  (%r14,%rdx,8),%xmm0
  divsd  (%rsp),%xmm0
  mulsd  0x0(%r13,%rcx,8),%xmm0
  movsd  %xmm0,(%rbx,%rax,8)
  mov    %rax,%rdx
  add    $0x1,%rax
  cmp    %rsi,%rdx
  jne    L378
  mov    %rbx,%r8
  movslq 0x34(%rsp),%rax
  lea    0x8(,%rax,8),%r11
  mov    0x28(%rsp),%rcx
  mov    %rcx,%r9
  lea    0x0(,%rax,8),%r15
  mov    $0xffffffff,%esi
  jmp    L301
L341:
  mov    %edi,%r15d
  jmp    L456
L541:
  movsd  (%r8),%xmm0
  subsd  %xmm1,%xmm0
  divsd  (%r9),%xmm0
  movsd  %xmm0,(%r8)
  add    $0x1,%esi
  add    $0x8,%r8
  add    %r11,%r9
  add    %r15,%rcx
  cmp    %r10d,%esi
  je     L536
L301:
  pxor   %xmm1,%xmm1
  test   %esi,%esi
  js     L541
  mov    %esi,%edi
  mov    $0x0,%eax
L572:
  movsd  (%rcx,%rax,8),%xmm0
  mulsd  (%rbx,%rax,8),%xmm0
  addsd  %xmm0,%xmm1
  mov    %rax,%rdx
  add    $0x1,%rax
  cmp    %rdx,%rdi
  jne    L572
  jmp    L541
L536:
  mov    %rbx,%rsi
  mov    %ebp,%edi
  call   <mp_enorm@plt>
  movapd %xmm0,%xmm1
  movsd  0x38(%rsp),%xmm0
  divsd  0x10(%rsp),%xmm0
  divsd  %xmm1,%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x8(%rsp)
L276:
  test   %ebp,%ebp
  jle    L211
  movslq 0x34(%rsp),%rdi
  shl    $0x3,%rdi
  mov    0x28(%rsp),%rcx
  mov    %ebp,%r8d
  mov    $0x8,%edx
  mov    $0x0,%esi
  mov    0x20(%rsp),%r10
  mov    0x90(%rsp),%r9
  jmp    L86
L198:
  movsd  (%rcx,%rax,1),%xmm0
  mulsd  (%r9,%rax,1),%xmm0
  addsd  %xmm0,%xmm1
  add    $0x8,%rax
  cmp    %rdx,%rax
  jne    L198
L598:
  movslq (%r10,%rsi,4),%rax
  movslq (%r12,%rax,4),%rax
  divsd  0x0(%r13,%rax,8),%xmm1
  movsd  %xmm1,(%rbx,%rsi,8)
  add    $0x1,%rsi
  add    %rdi,%rcx
  add    $0x8,%rdx
  cmp    %r8,%rsi
  je     L211
L86:
  mov    $0x0,%eax
  pxor   %xmm1,%xmm1
  test   %esi,%esi
  jns    L198
  jmp    L598
L211:
  mov    %rbx,%rsi
  mov    %ebp,%edi
  call   <mp_enorm@plt>
  movq   %xmm0,%r15
  movapd %xmm0,%xmm5
  divsd  0x10(%rsp),%xmm5
  movsd  %xmm5,0x48(%rsp)
  ucomisd D34(%rip),%xmm5
  jp     L81
  je     L149
L81:
  movsd  0x8(%rsp),%xmm1
  mov    0x98(%rsp),%rax
  movsd  (%rax),%xmm0
  call   <mp_dmax1@plt>
  mov    0x98(%rsp),%rax
  movsd  %xmm0,(%rax)
  movsd  0x48(%rsp),%xmm1
  call   <mp_dmin1@plt>
  ucomisd D34(%rip),%xmm0
  jp     L567
  jne    L567
  movq   %r15,%xmm0
  divsd  (%rsp),%xmm0
  mov    0x98(%rsp),%rax
  movsd  %xmm0,(%rax)
  jmp    L237
L149:
  movsd  D67(%rip),%xmm1
  movsd  0x10(%rsp),%xmm0
  call   <mp_dmin1@plt>
  movsd  D81(%rip),%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x48(%rsp)
  jmp    L81
L567:
  mov    0x98(%rsp),%rax
  movsd  %xmm0,(%rax)
L237:
  movslq 0x34(%rsp),%rax
  shl    $0x3,%rax
  mov    %rax,0x18(%rsp)
  movl   $0x0,0x30(%rsp)
  jmp    L29
L133:
  movsd  0x48(%rsp),%xmm1
  mulsd  D82(%rip),%xmm1
  movsd  D81(%rip),%xmm0
  call   <mp_dmax1@plt>
  mov    0x98(%rsp),%rax
  movsd  %xmm0,(%rax)
  jmp    L19
L399:
  movapd %xmm1,%xmm0
  call   <sqrt@plt>
  jmp    L528
L110:
  cmpl   $0x0,0x30(%rsp)
  jne    L559
L380:
  mov    0x98(%rsp),%rax
  movq   $0x0,(%rax)
L559:
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L447:
  mov    %rdx,%rax
L336:
  movapd %xmm1,%xmm2
  mulsd  -0x8(%rsi,%rax,8),%xmm2
  movsd  (%rbx,%rax,8),%xmm0
  subsd  %xmm2,%xmm0
  movsd  %xmm0,(%rbx,%rax,8)
  add    $0x1,%rax
  cmp    %eax,%ebp
  jg     L336
  add    $0x1,%rdx
  add    0x18(%rsp),%rsi
L255:
  movsd  -0x8(%rbx,%rdx,8),%xmm1
  divsd  -0x8(%rdi,%rdx,8),%xmm1
  movsd  %xmm1,-0x8(%rbx,%rdx,8)
  cmp    %rcx,%rdx
  jne    L447
L603:
  mov    %rbx,%rsi
  mov    %ebp,%edi
  call   <mp_enorm@plt>
  movsd  (%rsp),%xmm4
  movapd %xmm4,%xmm1
  divsd  0x10(%rsp),%xmm1
  divsd  %xmm0,%xmm1
  divsd  %xmm0,%xmm1
  movq   %xmm1,%r15
  comisd D34(%rip),%xmm4
  ja     L151
L431:
  pxor   %xmm0,%xmm0
  comisd (%rsp),%xmm0
  ja     L416
L324:
  mov    0x98(%rsp),%rax
  movq   %r15,%xmm1
  addsd  (%rax),%xmm1
  movsd  0x8(%rsp),%xmm0
  call   <mp_dmax1@plt>
  mov    0x98(%rsp),%rax
  movsd  %xmm0,(%rax)
  movsd  (%rsp),%xmm4
  movsd  %xmm4,0x38(%rsp)
L29:
  addl   $0x1,0x30(%rsp)
  mov    0x98(%rsp),%rax
  pxor   %xmm6,%xmm6
  ucomisd (%rax),%xmm6
  jp     L19
  je     L133
L19:
  mov    0x98(%rsp),%rax
  movsd  (%rax),%xmm1
  pxor   %xmm0,%xmm0
  ucomisd %xmm1,%xmm0
  ja     L399
  sqrtsd %xmm1,%xmm1
  movapd %xmm1,%xmm0
L528:
  test   %ebp,%ebp
  jle    L463
  mov    %ebp,%r15d
  mov    $0x0,%eax
L493:
  movslq (%r12,%rax,4),%rdx
  movapd %xmm0,%xmm1
  mulsd  0x0(%r13,%rdx,8),%xmm1
  movsd  %xmm1,(%rbx,%rax,8)
  add    $0x1,%rax
  cmp    %r15,%rax
  jne    L493
  sub    $0x8,%rsp
  push   %r14
  push   0xb8(%rsp)
  push   0xb8(%rsp)
  mov    0xb0(%rsp),%r9
  mov    %rbx,%r8
  mov    0x40(%rsp),%rcx
  mov    0x54(%rsp),%edx
  mov    0x48(%rsp),%rsi
  mov    %ebp,%edi
  call   <mp_qrsolv@plt>
  add    $0x20,%rsp
  mov    $0x0,%eax
  mov    0xa0(%rsp),%rcx
L497:
  movslq (%r12,%rax,4),%rdx
  movsd  0x0(%r13,%rdx,8),%xmm0
  mulsd  (%rcx,%rax,8),%xmm0
  movsd  %xmm0,(%r14,%rax,8)
  add    $0x1,%rax
  cmp    %r15,%rax
  jne    L497
L597:
  mov    %r14,%rsi
  mov    %ebp,%edi
  call   <mp_enorm@plt>
  movapd %xmm0,%xmm1
  movapd %xmm0,%xmm3
  subsd  0x10(%rsp),%xmm3
  movsd  %xmm3,(%rsp)
  movapd %xmm3,%xmm0
  andpd  D68(%rip),%xmm0
  movsd  0x40(%rsp),%xmm7
  comisd %xmm0,%xmm7
  jae    L110
  movsd  0x8(%rsp),%xmm5
  ucomisd D34(%rip),%xmm5
  jp     L228
  jne    L228
  movsd  0x38(%rsp),%xmm4
  comisd %xmm3,%xmm4
  jb     L228
  pxor   %xmm0,%xmm0
  comisd %xmm4,%xmm0
  ja     L110
L228:
  cmpl   $0xa,0x30(%rsp)
  je     L559
  mov    %ebp,%ecx
  mov    $0x0,%eax
  mov    0x20(%rsp),%rdi
  test   %ebp,%ebp
  jle    L603
L318:
  movslq (%rdi,%rax,4),%rdx
  movslq (%r12,%rdx,4),%rsi
  movsd  (%r14,%rdx,8),%xmm0
  divsd  %xmm1,%xmm0
  mulsd  0x0(%r13,%rsi,8),%xmm0
  movsd  %xmm0,(%rbx,%rax,8)
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L318
  mov    0x28(%rsp),%rax
  lea    0x8(%rax),%rsi
  mov    $0x1,%edx
  mov    0xa8(%rsp),%rdi
  jmp    L255
L151:
  mov    0x98(%rsp),%rax
  movsd  (%rax),%xmm1
  movsd  0x8(%rsp),%xmm0
  call   <mp_dmax1@plt>
  movsd  %xmm0,0x8(%rsp)
  jmp    L431
L416:
  mov    0x98(%rsp),%rax
  movsd  (%rax),%xmm1
  movsd  0x48(%rsp),%xmm0
  call   <mp_dmin1@plt>
  movsd  %xmm0,0x48(%rsp)
  jmp    L324
L463:
  sub    $0x8,%rsp
  push   %r14
  push   0xb8(%rsp)
  push   0xb8(%rsp)
  mov    0xb0(%rsp),%r9
  mov    %rbx,%r8
  mov    0x40(%rsp),%rcx
  mov    0x54(%rsp),%edx
  mov    0x48(%rsp),%rsi
  mov    %ebp,%edi
  call   <mp_qrsolv@plt>
  add    $0x20,%rsp
  jmp    L597
```

tool_calls: name: parse_data
arguments: label: D67
type: f64
name: parse_data
arguments: label: D34
type: f64
name: parse_data
arguments: label: D81
type: byte[8]
name: parse_data
arguments: label: D82
type: f64
name: parse_data
arguments: label: D68
type: qword[2]

tool: D67: 0.1

tool: D34: 0

tool: {"D81": [0x17,0x78,0x01,0x05,0x00,0x00,0x10,0x00]}

tool: D82: 0.001

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

assistant: ```c
void mp_lmpar(int n, double *r, int ldr, int *ipvt, int *ifree, double *diag, double *qtb, double delta, double *par, double *x, double *sdiag, double *wa1, double *wa2) {
  int i, iter, ij, jj, j, jm1, jp1, k, l, nsing;
  double dxnorm, fp, gnorm, parc, parl, paru;
  double sum, temp;
  static double zero = 0.0;
  static double p1 = 0.1;
  static double p001 = 0.001;
  nsing = n;
  jj = 0;
  for (j = 0; j < n; j++) {
    wa1[j] = qtb[j];
    if ((r[jj] == zero) && (nsing == n))
      nsing = j;
    if (nsing < n)
      wa1[j] = zero;
    jj += ldr + 1;
  }
  if (nsing >= 1) {
    for (k = 0; k < nsing; k++) {
      j = nsing - k - 1;
      wa1[j] = wa1[j] / r[j + ldr * j];
      temp = wa1[j];
      jm1 = j - 1;
      if (jm1 >= 0) {
        ij = ldr * j;
        for (i = 0; i <= jm1; i++) {
          wa1[i] -= r[ij] * temp;
          ij += 1;
        }
      }
    }
  }
  for (j = 0; j < n; j++) {
    l = ipvt[j];
    x[l] = wa1[j];
  }
  iter = 0;
  for (j = 0; j < n; j++)
    wa2[j] = diag[ifree[j]] * x[j];
  dxnorm = mp_enorm(n, wa2);
  fp = dxnorm - delta;
  if (fp <= p1 * delta) {
    goto L220;
  }
  parl = zero;
  if (nsing >= n) {
    for (j = 0; j < n; j++) {
      l = ipvt[j];
      wa1[j] = diag[ifree[l]] * (wa2[l] / dxnorm);
    }
    jj = 0;
    for (j = 0; j < n; j++) {
      sum = zero;
      jm1 = j - 1;
      if (jm1 >= 0) {
        ij = jj;
        for (i = 0; i <= jm1; i++) {
          sum += r[ij] * wa1[i];
          ij += 1;
        }
      }
      wa1[j] = (wa1[j] - sum) / r[j + ldr * j];
      jj += ldr;
    }
    temp = mp_enorm(n, wa1);
    parl = ((fp / delta) / temp) / temp;
  }
  jj = 0;
  for (j = 0; j < n; j++) {
    sum = zero;
    ij = jj;
    for (i = 0; i <= j; i++) {
      sum += r[ij] * qtb[i];
      ij += 1;
    }
    l = ipvt[j];
    wa1[j] = sum / diag[ifree[l]];
    jj += ldr;
  }
  gnorm = mp_enorm(n, wa1);
  paru = gnorm / delta;
  if (paru == zero)
    paru = 2.2250739e-308 / mp_dmin1(delta, p1);
  *par = mp_dmax1(*par, parl);
  *par = mp_dmin1(*par, paru);
  if (*par == zero)
    *par = gnorm / dxnorm;
L150:
  iter += 1;
  if (*par == zero)
    *par = mp_dmax1(2.2250739e-308, p001 * paru);
  temp = sqrt(*par);
  for (j = 0; j < n; j++)
    wa1[j] = temp * diag[ifree[j]];
  mp_qrsolv(n, r, ldr, ipvt, wa1, qtb, x, sdiag, wa2);
  for (j = 0; j < n; j++)
    wa2[j] = diag[ifree[j]] * x[j];
  dxnorm = mp_enorm(n, wa2);
  temp = fp;
  fp = dxnorm - delta;
  if ((fabs(fp) <= p1 * delta) || ((parl == zero) && (fp <= temp) && (temp < zero)) || (iter == 10))
    goto L220;
  for (j = 0; j < n; j++) {
    l = ipvt[j];
    wa1[j] = diag[ifree[l]] * (wa2[l] / dxnorm);
  }
  jj = 0;
  for (j = 0; j < n; j++) {
    wa1[j] = wa1[j] / sdiag[j];
    temp = wa1[j];
    jp1 = j + 1;
    if (jp1 < n) {
      ij = jp1 + jj;
      for (i = jp1; i < n; i++) {
        wa1[i] -= r[ij] * temp;
        ij += 1;
      }
    }
    jj += ldr;
  }
  temp = mp_enorm(n, wa1);
  parc = ((fp / delta) / temp) / temp;
  if (fp > zero)
    parl = mp_dmax1(parl, *par);
  if (fp < zero)
    paru = mp_dmin1(paru, *par);
  *par = mp_dmax1(parl, *par + parc);
  goto L150;
L220:
  if (iter == 0)
    *par = zero;
}
```