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    L606
  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    L33
L34:
  movsd  %xmm0,(%rbx,%rax,8)
  add    $0x1,%rax
  add    %r9,%rcx
  cmp    %r8,%rax
  je     L490
L33:
  movsd  (%r10,%rax,8),%xmm0
  movsd  %xmm0,(%rbx,%rax,8)
  ucomisd (%rcx),%xmm1
  setnp  %dl
  cmovne %edi,%edx
  test   %dl,%dl
  je     L75
  cmp    %r15d,%ebp
  cmove  %eax,%r15d
L75:
  cmp    %ebp,%r15d
  jge    L34
  pxor   %xmm0,%xmm0
  jmp    L34
L490:
  test   %r15d,%r15d
  jle    L430
  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    L5
L566:
  mov    %ecx,%edi
  mov    $0x0,%eax
L347:
  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    L347
  sub    $0x8,%rsi
  add    %r10,%r8
  sub    $0x1,%ecx
  add    %r9,%rdx
L5:
  movsd  -0x8(%rsi),%xmm1
  divsd  -0x8(%r8),%xmm1
  movsd  %xmm1,-0x8(%rsi)
  test   %ecx,%ecx
  jns    L566
  sub    $0x8,%rsi
  add    %r10,%r8
  sub    $0x1,%ecx
  add    %r9,%rdx
  cmp    $0xfffffffe,%ecx
  jne    L5
L430:
  mov    %ebp,%edx
  mov    $0x0,%eax
  mov    0x20(%rsp),%rsi
  mov    0xa0(%rsp),%rdi
L343:
  movsd  (%rbx,%rax,8),%xmm0
  movslq (%rsi,%rax,4),%rcx
  movsd  %xmm0,(%rdi,%rcx,8)
  add    $0x1,%rax
  cmp    %rdx,%rax
  jne    L343
  mov    $0x0,%eax
  mov    0xa0(%rsp),%rsi
L236:
  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    L236
L391:
  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  D8(%rip),%xmm7
  movsd  %xmm7,0x40(%rsp)
  comisd %xmm6,%xmm7
  jae    L55
  pxor   %xmm4,%xmm4
  movsd  %xmm4,0x8(%rsp)
  cmp    %ebp,%r15d
  jl     L57
  test   %ebp,%ebp
  jle    L601
  lea    -0x1(%rbp),%r10d
  mov    %r10d,%esi
  mov    $0x0,%eax
  mov    0x20(%rsp),%rdi
L570:
  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    L570
  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    L493
L606:
  mov    %edi,%r15d
  jmp    L391
L474:
  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     L601
L493:
  pxor   %xmm1,%xmm1
  test   %esi,%esi
  js     L474
  mov    %esi,%edi
  mov    $0x0,%eax
L406:
  movsd  (%rcx,%rax,8),%xmm0
  mulsd  (%rbx,%rax,8),%xmm0
  addsd  %xmm0,%xmm1
  mov    %rax,%rdx
  add    $0x1,%rax
  cmp    %rdx,%rdi
  jne    L406
  jmp    L474
L601:
  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)
L57:
  test   %ebp,%ebp
  jle    L402
  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    L147
L328:
  movsd  (%rcx,%rax,1),%xmm0
  mulsd  (%r9,%rax,1),%xmm0
  addsd  %xmm0,%xmm1
  add    $0x8,%rax
  cmp    %rdx,%rax
  jne    L328
L368:
  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     L402
L147:
  mov    $0x0,%eax
  pxor   %xmm1,%xmm1
  test   %esi,%esi
  jns    L328
  jmp    L368
L402:
  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 D17(%rip),%xmm5
  jp     L558
  je     L77
L558:
  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 D17(%rip),%xmm0
  jp     L334
  jne    L334
  movq   %r15,%xmm0
  divsd  (%rsp),%xmm0
  mov    0x98(%rsp),%rax
  movsd  %xmm0,(%rax)
  jmp    L72
L77:
  movsd  D8(%rip),%xmm1
  movsd  0x10(%rsp),%xmm0
  call   <mp_dmin1@plt>
  movsd  D98(%rip),%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x48(%rsp)
  jmp    L558
L334:
  mov    0x98(%rsp),%rax
  movsd  %xmm0,(%rax)
L72:
  movslq 0x34(%rsp),%rax
  shl    $0x3,%rax
  mov    %rax,0x18(%rsp)
  movl   $0x0,0x30(%rsp)
  jmp    L65
L259:
  movsd  0x48(%rsp),%xmm1
  mulsd  D12(%rip),%xmm1
  movsd  D98(%rip),%xmm0
  call   <mp_dmax1@plt>
  mov    0x98(%rsp),%rax
  movsd  %xmm0,(%rax)
  jmp    L590
L408:
  movapd %xmm1,%xmm0
  call   <sqrt@plt>
  jmp    L94
L146:
  cmpl   $0x0,0x30(%rsp)
  jne    L35
L55:
  mov    0x98(%rsp),%rax
  movq   $0x0,(%rax)
L35:
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L422:
  mov    %rdx,%rax
L588:
  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     L588
  add    $0x1,%rdx
  add    0x18(%rsp),%rsi
L288:
  movsd  -0x8(%rbx,%rdx,8),%xmm1
  divsd  -0x8(%rdi,%rdx,8),%xmm1
  movsd  %xmm1,-0x8(%rbx,%rdx,8)
  cmp    %rcx,%rdx
  jne    L422
L418:
  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 D17(%rip),%xmm4
  ja     L289
L100:
  pxor   %xmm0,%xmm0
  comisd (%rsp),%xmm0
  ja     L239
L49:
  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)
L65:
  addl   $0x1,0x30(%rsp)
  mov    0x98(%rsp),%rax
  pxor   %xmm6,%xmm6
  ucomisd (%rax),%xmm6
  jp     L590
  je     L259
L590:
  mov    0x98(%rsp),%rax
  movsd  (%rax),%xmm1
  pxor   %xmm0,%xmm0
  ucomisd %xmm1,%xmm0
  ja     L408
  sqrtsd %xmm1,%xmm1
  movapd %xmm1,%xmm0
L94:
  test   %ebp,%ebp
  jle    L8
  mov    %ebp,%r15d
  mov    $0x0,%eax
L150:
  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    L150
  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
L220:
  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    L220
L187:
  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  D7(%rip),%xmm0
  movsd  0x40(%rsp),%xmm7
  comisd %xmm0,%xmm7
  jae    L146
  movsd  0x8(%rsp),%xmm5
  ucomisd D17(%rip),%xmm5
  jp     L543
  jne    L543
  movsd  0x38(%rsp),%xmm4
  comisd %xmm3,%xmm4
  jb     L543
  pxor   %xmm0,%xmm0
  comisd %xmm4,%xmm0
  ja     L146
L543:
  cmpl   $0xa,0x30(%rsp)
  je     L35
  mov    %ebp,%ecx
  mov    $0x0,%eax
  mov    0x20(%rsp),%rdi
  test   %ebp,%ebp
  jle    L418
L234:
  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    L234
  mov    0x28(%rsp),%rax
  lea    0x8(%rax),%rsi
  mov    $0x1,%edx
  mov    0xa8(%rsp),%rdi
  jmp    L288
L289:
  mov    0x98(%rsp),%rax
  movsd  (%rax),%xmm1
  movsd  0x8(%rsp),%xmm0
  call   <mp_dmax1@plt>
  movsd  %xmm0,0x8(%rsp)
  jmp    L100
L239:
  mov    0x98(%rsp),%rax
  movsd  (%rax),%xmm1
  movsd  0x48(%rsp),%xmm0
  call   <mp_dmin1@plt>
  movsd  %xmm0,0x48(%rsp)
  jmp    L49
L8:
  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    L187
```

tool_calls: name: unpack_data
arguments: data_tag: D8
type_guessed: f64
name: unpack_data
arguments: data_tag: D17
type_guessed: f64
name: unpack_data
arguments: data_tag: D98
type_guessed: byte[8]
name: unpack_data
arguments: data_tag: D12
type_guessed: f64
name: unpack_data
arguments: data_tag: D7
type_guessed: qword[2]

tool: D8: 0.1

tool: D17: 0

tool: {"D98": [0xca,0x49,0xe5,0x3c,0xf8,0xff,0x0f,0x38]}

tool: D12: 0.001

tool: {"D7": [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 = 1.17549e-38 / 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(1.17549e-38, 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;
}
```