user: 请从给定的汇编指令推导出C源代码：

```asm
<lmpar>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x98,%rsp
  mov    %rdi,0x48(%rsp)
  mov    %esi,0x6c(%rsp)
  mov    %edx,%r15d
  mov    %rcx,0x40(%rsp)
  mov    %r8,%r12
  mov    %r9,0x58(%rsp)
  movsd  %xmm0,0x30(%rsp)
  mov    0xe0(%rsp),%r13
  movslq %edx,%r14
  lea    0x0(,%rdx,8),%ebx
  mov    %ebx,%edi
  call   <malloc@plt>
  mov    %rax,0x10(%rsp)
  mov    %ebx,%edi
  call   <malloc@plt>
  mov    %rax,%rbp
  test   %r15d,%r15d
  jle    L529
  lea    0x8(,%r14,8),%rcx
  mov    0x48(%rsp),%rdi
  mov    %r15d,%r11d
  mov    0x10(%rsp),%rdx
  mov    %r15d,%ebx
  mov    $0x0,%eax
  pxor   %xmm1,%xmm1
  mov    $0x0,%r10d
  mov    %r14,0x8(%rsp)
  mov    0x58(%rsp),%r14
  jmp    L248
L355:
  movsd  %xmm0,(%r8)
  add    $0x1,%rax
  add    $0x8,%rdx
  add    %rcx,%rdi
  cmp    %r11,%rax
  je     L528
L248:
  mov    %rdx,%r8
  movsd  (%r14,%rax,8),%xmm0
  movsd  %xmm0,(%rdx)
  ucomisd (%rdi),%xmm1
  setnp  %sil
  cmovne %r10d,%esi
  test   %sil,%sil
  je     L363
  cmp    %ebx,%r15d
  cmove  %eax,%ebx
L363:
  cmp    %r15d,%ebx
  jge    L355
  pxor   %xmm0,%xmm0
  jmp    L355
L528:
  mov    0x8(%rsp),%r14
  test   %ebx,%ebx
  jle    L590
  movslq %ebx,%rdx
  mov    0x10(%rsp),%r11
  lea    -0x8(%r11,%rdx,8),%rdi
  mov    %r15d,%r10d
  not    %r10d
  movslq %r10d,%r10
  shl    $0x3,%r10
  lea    -0x1(%rbx),%eax
  imul   %r15d,%eax
  cltq
  add    %rdx,%rax
  mov    0x48(%rsp),%rsi
  lea    (%rsi,%rax,8),%r9
  mov    %ebx,%esi
  sub    $0x8,%rcx
  add    $0x8,%r11
  jmp    L459
L545:
  sub    $0x8,%rdi
  add    %r10,%r9
  sub    $0x1,%esi
  je     L590
L459:
  movsd  (%rdi),%xmm1
  divsd  -0x8(%r9),%xmm1
  movsd  %xmm1,(%rdi)
  lea    -0x1(%rsi),%eax
  test   %eax,%eax
  jle    L545
  movslq %esi,%rax
  mov    0x48(%rsp),%rdx
  lea    -0x8(%rdx,%rax,8),%rdx
  lea    -0x2(%rsi),%eax
  lea    (%r11,%rax,8),%r8
  mov    0x10(%rsp),%rax
L88:
  movapd %xmm1,%xmm2
  mulsd  (%rdx),%xmm2
  movsd  (%rax),%xmm0
  subsd  %xmm2,%xmm0
  movsd  %xmm0,(%rax)
  add    $0x8,%rax
  add    %rcx,%rdx
  cmp    %r8,%rax
  jne    L88
  jmp    L545
L529:
  mov    %r15d,%ebx
  jmp    L219
L15:
  movsd  (%rcx),%xmm0
  subsd  %xmm1,%xmm0
  divsd  (%r9),%xmm0
  movsd  %xmm0,(%rcx)
  add    $0x8,%rcx
  add    0x18(%rsp),%r9
  cmp    %r10d,%r8d
  je     L60
L571:
  mov    %r8d,%eax
  add    $0x1,%r8d
  pxor   %xmm1,%xmm1
  test   %eax,%eax
  js     L15
  lea    (%rbx,%rcx,1),%rdx
  mov    %eax,%eax
  lea    (%r11,%rax,8),%rsi
  mov    0x10(%rsp),%rax
L298:
  movsd  (%rdx),%xmm0
  mulsd  (%rax),%xmm0
  addsd  %xmm0,%xmm1
  add    %rdi,%rdx
  add    $0x8,%rax
  cmp    %rsi,%rax
  jne    L298
  jmp    L15
L60:
  mov    %r15d,%esi
  mov    0x10(%rsp),%rdi
  call   <enorm@plt>
  movapd %xmm0,%xmm1
  movsd  0x50(%rsp),%xmm0
  divsd  0x30(%rsp),%xmm0
  divsd  %xmm1,%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x28(%rsp)
L203:
  test   %r15d,%r15d
  jle    L81
  mov    0x58(%rsp),%rbx
  lea    0x8(%rbx),%rcx
  mov    %r15d,%r9d
  lea    0x0(,%r14,8),%rsi
  mov    0x10(%rsp),%rax
  mov    %rax,%r8
  mov    $0x0,%edi
  mov    0x48(%rsp),%r10
  sub    %rax,%r10
  mov    0x40(%rsp),%r11
  jmp    L286
L132:
  lea    (%r10,%r8,1),%rdx
  mov    %rbx,%rax
  pxor   %xmm1,%xmm1
L541:
  movsd  (%rdx),%xmm0
  mulsd  (%rax),%xmm0
  addsd  %xmm0,%xmm1
  add    %rsi,%rdx
  add    $0x8,%rax
  cmp    %rcx,%rax
  jne    L541
L52:
  movslq (%r11,%rdi,4),%rax
  divsd  (%r12,%rax,8),%xmm1
  movsd  %xmm1,(%r8)
  add    $0x1,%rdi
  add    $0x8,%r8
  add    $0x8,%rcx
  cmp    %r9,%rdi
  je     L81
L286:
  pxor   %xmm1,%xmm1
  test   %edi,%edi
  jns    L132
  jmp    L52
L81:
  mov    %r15d,%esi
  mov    0x10(%rsp),%rdi
  call   <enorm@plt>
  movq   %xmm0,%rbx
  movapd %xmm0,%xmm6
  divsd  0x30(%rsp),%xmm6
  movsd  %xmm6,0x70(%rsp)
  ucomisd D8(%rip),%xmm6
  jp     L444
  je     L333
L444:
  movsd  0x28(%rsp),%xmm1
  mov    0xd0(%rsp),%rax
  movsd  (%rax),%xmm0
  call   <pmax@plt>
  mov    0xd0(%rsp),%rax
  movsd  %xmm0,(%rax)
  movsd  0x70(%rsp),%xmm1
  call   <pmin@plt>
  ucomisd D8(%rip),%xmm0
  jp     L103
  jne    L103
  movq   %rbx,%xmm0
  divsd  0x8(%rsp),%xmm0
  mov    0xd0(%rsp),%rax
  movsd  %xmm0,(%rax)
  jmp    L158
L333:
  movsd  D12(%rip),%xmm1
  movsd  0x30(%rsp),%xmm0
  call   <pmin@plt>
  movsd  D6(%rip),%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x70(%rsp)
  jmp    L444
L103:
  mov    0xd0(%rsp),%rax
  movsd  %xmm0,(%rax)
L158:
  lea    -0x1(%r15),%eax
  mov    %rax,0x88(%rsp)
  lea    0x8(,%rax,8),%rax
  mov    0x10(%rsp),%rbx
  add    %rax,%rbx
  lea    (%rax,%rbp,1),%rsi
  lea    0x8(,%r14,8),%rax
  mov    %rax,0x38(%rsp)
  lea    0x0(,%r14,8),%rax
  mov    %rax,0x8(%rsp)
  mov    0x48(%rsp),%rdi
  add    %rax,%rdi
  mov    %rdi,0x80(%rsp)
  movl   $0x0,0x68(%rsp)
  mov    %rbp,%rax
  neg    %rax
  mov    %rax,0x78(%rsp)
  mov    %r12,%r14
  sub    %rbp,%r14
  mov    %r15d,0x18(%rsp)
  mov    %rsi,%r15
  jmp    L192
L19:
  movsd  0x70(%rsp),%xmm1
  mulsd  D48(%rip),%xmm1
  movsd  D6(%rip),%xmm0
  call   <pmax@plt>
  mov    0xd0(%rsp),%rax
  movsd  %xmm0,(%rax)
  jmp    L544
L261:
  movapd %xmm1,%xmm0
  call   <sqrt@plt>
  jmp    L98
L338:
  pxor   %xmm0,%xmm0
  comisd 0x50(%rsp),%xmm0
  jbe    L300
L195:
  cmpl   $0x0,0x68(%rsp)
  jne    L67
L388:
  mov    0xd0(%rsp),%rax
  movq   $0x0,(%rax)
L67:
  mov    0x10(%rsp),%rdi
  call   <free@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  add    $0x98,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L490:
  add    $0x8,%rdi
  mov    %r10d,%eax
  sub    %esi,%eax
  add    %rsi,%rax
  lea    (%r9,%rax,8),%rcx
  mov    %r8,%rdx
  mov    %rdi,%rax
L131:
  movapd %xmm1,%xmm2
  mulsd  (%rdx),%xmm2
  movsd  (%rax),%xmm0
  subsd  %xmm2,%xmm0
  movsd  %xmm0,(%rax)
  add    $0x8,%rax
  add    0x8(%rsp),%rdx
  cmp    %rcx,%rax
  jne    L131
  add    $0x1,%rsi
  add    0x38(%rsp),%r8
L116:
  movsd  (%rdi),%xmm1
  divsd  0x0(%r13,%rsi,8),%xmm1
  movsd  %xmm1,(%rdi)
  cmp    %r11,%rsi
  jne    L490
L253:
  mov    0x18(%rsp),%esi
  mov    0x10(%rsp),%rdi
  call   <enorm@plt>
  movapd %xmm0,%xmm1
  movsd  0x20(%rsp),%xmm4
  movapd %xmm4,%xmm0
  divsd  0x30(%rsp),%xmm0
  divsd  %xmm1,%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x50(%rsp)
  comisd D8(%rip),%xmm4
  ja     L294
L6:
  pxor   %xmm0,%xmm0
  comisd 0x20(%rsp),%xmm0
  ja     L106
L427:
  mov    0xd0(%rsp),%rax
  movsd  0x50(%rsp),%xmm1
  addsd  (%rax),%xmm1
  movsd  0x28(%rsp),%xmm0
  call   <pmax@plt>
  mov    0xd0(%rsp),%rax
  movsd  %xmm0,(%rax)
  movsd  0x20(%rsp),%xmm6
  movsd  %xmm6,0x50(%rsp)
L192:
  addl   $0x1,0x68(%rsp)
  mov    0xd0(%rsp),%rax
  pxor   %xmm6,%xmm6
  ucomisd (%rax),%xmm6
  jp     L544
  je     L19
L544:
  mov    0xd0(%rsp),%rax
  movsd  (%rax),%xmm1
  pxor   %xmm0,%xmm0
  ucomisd %xmm1,%xmm0
  ja     L261
  sqrtsd %xmm1,%xmm1
  movapd %xmm1,%xmm0
L98:
  cmpl   $0x0,0x18(%rsp)
  jle    L293
  mov    0x10(%rsp),%rdi
  mov    %rdi,%rax
  mov    %r12,%rdx
  sub    %rdi,%rdx
L517:
  movapd %xmm0,%xmm1
  mulsd  (%rdx,%rax,1),%xmm1
  movsd  %xmm1,(%rax)
  add    $0x8,%rax
  cmp    %rbx,%rax
  jne    L517
  push   %r13
  push   0xe0(%rsp)
  mov    0x68(%rsp),%r9
  mov    0x20(%rsp),%r8
  mov    0x50(%rsp),%rcx
  mov    0x28(%rsp),%edx
  mov    0x7c(%rsp),%esi
  mov    0x58(%rsp),%rdi
  call   <qrsolv@plt>
  add    $0x10,%rsp
  mov    %rbp,%rax
  mov    0x78(%rsp),%rdx
  add    0xd8(%rsp),%rdx
L601:
  movsd  (%r14,%rax,1),%xmm0
  mulsd  (%rdx,%rax,1),%xmm0
  movsd  %xmm0,(%rax)
  add    $0x8,%rax
  cmp    %r15,%rax
  jne    L601
L247:
  mov    0x18(%rsp),%esi
  mov    %rbp,%rdi
  call   <enorm@plt>
  movapd %xmm0,%xmm1
  movapd %xmm0,%xmm3
  subsd  0x30(%rsp),%xmm3
  movsd  %xmm3,0x20(%rsp)
  movapd %xmm3,%xmm0
  andpd  D78(%rip),%xmm0
  movsd  0x60(%rsp),%xmm6
  comisd %xmm0,%xmm6
  jae    L195
  cmpl   $0xa,0x68(%rsp)
  je     L67
  movsd  0x28(%rsp),%xmm5
  ucomisd D8(%rip),%xmm5
  jp     L300
  jne    L300
  movsd  0x50(%rsp),%xmm5
  comisd %xmm3,%xmm5
  jae    L338
L300:
  mov    0x40(%rsp),%rdx
  mov    0x10(%rsp),%rax
  cmpl   $0x0,0x18(%rsp)
  jle    L253
L397:
  movslq (%rdx),%rcx
  movsd  0x0(%rbp,%rcx,8),%xmm0
  divsd  %xmm1,%xmm0
  mulsd  (%r12,%rcx,8),%xmm0
  movsd  %xmm0,(%rax)
  add    $0x4,%rdx
  add    $0x8,%rax
  cmp    %rbx,%rax
  jne    L397
  mov    0x80(%rsp),%r8
  mov    0x10(%rsp),%rax
  mov    %rax,%rdi
  mov    $0x0,%esi
  mov    0x18(%rsp),%ecx
  lea    -0x2(%rcx),%r10d
  lea    0x10(%rax),%r9
  mov    0x88(%rsp),%r11
  jmp    L116
L294:
  mov    0xd0(%rsp),%rax
  movsd  (%rax),%xmm1
  movsd  0x28(%rsp),%xmm0
  call   <pmax@plt>
  movsd  %xmm0,0x28(%rsp)
  jmp    L6
L106:
  mov    0xd0(%rsp),%rax
  movsd  (%rax),%xmm1
  movsd  0x70(%rsp),%xmm0
  call   <pmin@plt>
  movsd  %xmm0,0x70(%rsp)
  jmp    L427
L293:
  push   %r13
  push   0xe0(%rsp)
  mov    0x68(%rsp),%r9
  mov    0x20(%rsp),%r8
  mov    0x50(%rsp),%rcx
  mov    0x28(%rsp),%edx
  mov    0x7c(%rsp),%esi
  mov    0x58(%rsp),%rdi
  call   <qrsolv@plt>
  add    $0x10,%rsp
  jmp    L247
L590:
  mov    0x40(%rsp),%rdx
  mov    0x10(%rsp),%rdi
  mov    %rdi,%rax
  mov    %r15d,%esi
  shl    $0x3,%rsi
  add    %rsi,%rdi
  mov    0xd8(%rsp),%r8
L423:
  movsd  (%rax),%xmm0
  movslq (%rdx),%rcx
  movsd  %xmm0,(%r8,%rcx,8)
  add    $0x4,%rdx
  add    $0x8,%rax
  cmp    %rdi,%rax
  jne    L423
  lea    (%rsi,%rbp,1),%rdx
  mov    %rbp,%rax
  mov    %r12,%rsi
  sub    %rbp,%rsi
  mov    0xd8(%rsp),%rcx
  sub    %rbp,%rcx
L350:
  movsd  (%rsi,%rax,1),%xmm0
  mulsd  (%rcx,%rax,1),%xmm0
  movsd  %xmm0,(%rax)
  add    $0x8,%rax
  cmp    %rdx,%rax
  jne    L350
L219:
  mov    %r15d,%esi
  mov    %rbp,%rdi
  call   <enorm@plt>
  movapd %xmm0,%xmm4
  movsd  %xmm0,0x8(%rsp)
  movsd  0x30(%rsp),%xmm7
  subsd  %xmm7,%xmm4
  movsd  %xmm4,0x50(%rsp)
  mulsd  D12(%rip),%xmm7
  movsd  %xmm7,0x60(%rsp)
  comisd %xmm7,%xmm4
  jbe    L388
  pxor   %xmm5,%xmm5
  movsd  %xmm5,0x28(%rsp)
  cmp    %ebx,%r15d
  jg     L203
  test   %r15d,%r15d
  jle    L60
  mov    0x40(%rsp),%rdx
  lea    -0x1(%r15),%r10d
  mov    %r10d,%eax
  mov    0x10(%rsp),%rbx
  lea    0x8(%rbx,%rax,8),%rsi
  mov    %rbx,%rax
L121:
  movslq (%rdx),%rcx
  movsd  0x0(%rbp,%rcx,8),%xmm0
  divsd  0x8(%rsp),%xmm0
  mulsd  (%r12,%rcx,8),%xmm0
  movsd  %xmm0,(%rax)
  add    $0x4,%rdx
  add    $0x8,%rax
  cmp    %rsi,%rax
  jne    L121
  lea    0x8(,%r14,8),%rax
  mov    %rax,0x18(%rsp)
  lea    0x0(,%r14,8),%rdi
  mov    0x48(%rsp),%rbx
  mov    %rbx,%r9
  mov    0x10(%rsp),%rax
  mov    %rax,%rcx
  mov    $0xffffffff,%r8d
  sub    %rax,%rbx
  lea    0x8(%rax),%r11
  jmp    L571
```

tool_calls: name: retrieve_data
arguments: data_tag: D8
datatype: f64
name: retrieve_data
arguments: data_tag: D12
datatype: byte[8]
name: retrieve_data
arguments: data_tag: D6
datatype: byte[8]
name: retrieve_data
arguments: data_tag: D48
datatype: byte[8]
name: retrieve_data
arguments: data_tag: D78
datatype: qword[2]

tool: D8: 0

tool: {"D12": [0x9a,0x99,0x99,0x99,0x99,0x99,0xb9,0x3f]}

tool: {"D6": [0x31,0x65,0x00,0x00,0x00,0x00,0x10,0x00]}

tool: {"D48": [0xfc,0xa9,0xf1,0xd2,0x4d,0x62,0x50,0x3f]}

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

assistant: ```c
void lmpar(double *r, int ldr, int N, int *ipvt, double *diag, double *qtb, double delta, double *par, double *x, double *sdiag) {
  int i, iter, j, jm1, jp1, k, l, nsing;
  double dxnorm, dwarf, fp, gnorm, parc, parl, paru, p1, p001, sum, temp, zero;
  double *wa1, *wa2;
  wa1 = (double *)malloc(sizeof(double) * N);
  wa2 = (double *)malloc(sizeof(double) * N);
  p1 = 1.0e-01;
  p001 = 1.0e-03;
  zero = 0.0;
  dwarf = 2.22507385852e-308;
  nsing = N;
  for (j = 1; j <= N; ++j) {
    wa1[j - 1] = qtb[j - 1];
    if (r[(j - 1) * N + j - 1] == zero && nsing == N) {
      nsing = j - 1;
    }
    if (nsing < N) {
      wa1[j - 1] = zero;
    }
  }
  if (nsing >= 1) {
    for (k = 1; k <= nsing; ++k) {
      j = nsing - k + 1;
      wa1[j - 1] = wa1[j - 1] / r[(j - 1) * N + j - 1];
      temp = wa1[j - 1];
      jm1 = j - 1;
      if (jm1 >= 1) {
        for (i = 1; i <= jm1; ++i) {
          wa1[i - 1] = wa1[i - 1] - r[(i - 1) * N + j - 1] * temp;
        }
      }
    }
  }
  for (j = 0; j < N; ++j) {
    l = ipvt[j];
    x[l] = wa1[j];
  }
  iter = 0;
  for (j = 0; j < N; ++j) {
    wa2[j] = diag[j] * x[j];
  }
  dxnorm = enorm(wa2, N);
  fp = dxnorm - delta;
  if (fp > p1 * delta) {
    parl = zero;
    if (nsing >= N) {
      for (j = 0; j < N; ++j) {
        l = ipvt[j];
        wa1[j] = diag[l] * (wa2[l] / dxnorm);
      }
      for (j = 0; j < N; ++j) {
        sum = zero;
        jm1 = j - 1;
        if (jm1 >= 0) {
          for (i = 0; i <= jm1; ++i) {
            sum = sum + r[i * N + j] * wa1[i];
          }
        }
        wa1[j] = (wa1[j] - sum) / r[j * N + j];
      }
      temp = enorm(wa1, N);
      parl = ((fp / delta) / temp) / temp;
    }
    for (j = 0; j < N; ++j) {
      sum = zero;
      for (i = 0; i <= j; ++i) {
        sum = sum + r[i * N + j] * qtb[i];
      }
      l = ipvt[j];
      wa1[j] = sum / diag[l];
    }
    gnorm = enorm(wa1, N);
    paru = gnorm / delta;
    if (paru == zero) {
      paru = dwarf / pmin(delta, p1);
    }
    *par = pmax(*par, parl);
    *par = pmin(*par, paru);
    if (*par == zero) {
      *par = gnorm / dxnorm;
    }
    while (1) {
      iter++;
      if (*par == zero) {
        *par = pmax(dwarf, p001 * paru);
      }
      temp = sqrt(*par);
      for (j = 0; j < N; ++j) {
        wa1[j] = temp * diag[j];
      }
      qrsolv(r, ldr, N, ipvt, wa1, qtb, x, sdiag);
      for (j = 0; j < N; ++j) {
        wa2[j] = diag[j] * x[j];
      }
      dxnorm = enorm(wa2, N);
      temp = fp;
      fp = dxnorm - delta;
      if (fabs(fp) <= p1 * delta) {
        break;
      }
      if (iter == 10) {
        break;
      }
      if (parl == zero && fp <= temp && temp < zero) {
        break;
      }
      for (j = 0; j < N; ++j) {
        l = ipvt[j];
        wa1[j] = diag[l] * (wa2[l] / dxnorm);
      }
      for (j = 0; j < N; ++j) {
        wa1[j] = wa1[j] / sdiag[j];
        temp = wa1[j];
        jp1 = j + 1;
        if (N >= jp1 + 1) {
          for (i = jp1; i < N; ++i) {
            wa1[i] = wa1[i] - r[i * N + j] * temp;
          }
        }
      }
      temp = enorm(wa1, N);
      parc = ((fp / delta) / temp) / temp;
      if (fp > zero) {
        parl = pmax(parl, *par);
      }
      if (fp < zero) {
        paru = pmin(paru, *par);
      }
      *par = pmax(parl, *par + parc);
    }
  }
  if (iter == 0) {
    *par = zero;
  }
  free(wa1);
  free(wa2);
}
```