user: Please show me the C implementation that matches the assembly code listed below:

```asm
<mrqmin>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,0x10(%rsp)
  mov    %rsi,0x18(%rsp)
  mov    %rdx,0x20(%rsp)
  mov    %ecx,0x2c(%rsp)
  mov    %r8,%r14
  mov    %r9,0x8(%rsp)
  mov    0x90(%rsp),%r12
  mov    0xd0(%rsp),%r15
  mov    0xd8(%rsp),%r13
  mov    0xe0(%rsp),%rbp
  mov    0xe8(%rsp),%rbx
  pxor   %xmm0,%xmm0
  comisd (%r12),%xmm0
  ja     L195
L102:
  cmpl   $0x0,0xc0(%rsp)
  jle    L31
  mov    0x80(%rsp),%rsi
  mov    0x78(%rsp),%rcx
  mov    0xc0(%rsp),%edi
  shl    $0x3,%rdi
  mov    $0x0,%r8d
  movsd  D33(%rip),%xmm1
L74:
  mov    $0x0,%eax
  mov    %rsi,%r10
  mov    %rcx,%r9
L173:
  mov    (%rsi),%rdx
  movsd  (%rdx,%rax,1),%xmm0
  mov    (%rcx),%rdx
  movsd  %xmm0,(%rdx,%rax,1)
  add    $0x8,%rax
  cmp    %rdi,%rax
  jne    L173
  mov    (%r9),%rax
  mov    (%r10),%rdx
  movapd %xmm1,%xmm0
  addsd  (%r12),%xmm0
  mulsd  (%rdx,%r8,1),%xmm0
  movsd  %xmm0,(%rax,%r8,1)
  mov    (%rbx,%r8,1),%rax
  movsd  0x0(%r13,%r8,1),%xmm0
  movsd  %xmm0,(%rax)
  add    $0x8,%rsi
  add    $0x8,%r8
  add    $0x8,%rcx
  cmp    %rdi,%r8
  jne    L74
  mov    $0x1,%ecx
  mov    %rbx,%rdx
  mov    0xc0(%rsp),%esi
  mov    0x78(%rsp),%rdi
  call   <gaussj@plt>
  test   %eax,%eax
  jne    L181
L137:
  mov    $0x0,%eax
  mov    0xc0(%rsp),%ecx
L197:
  mov    (%rbx,%rax,8),%rdx
  movsd  (%rdx),%xmm0
  movsd  %xmm0,0x0(%rbp,%rax,8)
  add    $0x1,%rax
  cmp    %eax,%ecx
  jg     L197
L168:
  pxor   %xmm0,%xmm0
  ucomisd (%r12),%xmm0
  jp     L90
  je     L5
L90:
  mov    0x70(%rsp),%ecx
  mov    $0x0,%eax
  mov    $0x0,%edx
  mov    0x8(%rsp),%rsi
  cmpl   $0x0,0x70(%rsp)
  jg     L236
L17:
  push   0xf0(%rsp)
  push   0xc0(%rsp)
  push   0xc0(%rsp)
  push   0xc0(%rsp)
  mov    0xc0(%rsp),%eax
  push   %rax
  push   0xc0(%rsp)
  push   0xb8(%rsp)
  push   %rbp
  push   0xb8(%rsp)
  mov    0xb8(%rsp),%eax
  push   %rax
  mov    0x58(%rsp),%r9
  mov    %r15,%r8
  mov    0x7c(%rsp),%ecx
  mov    0x70(%rsp),%rdx
  mov    0x68(%rsp),%rsi
  mov    0x60(%rsp),%rdi
  call   <mrqcof@plt>
  add    $0x50,%rsp
  mov    0xc8(%rsp),%rax
  movsd  (%rax),%xmm0
  mov    0x88(%rsp),%rax
  comisd (%rax),%xmm0
  jbe    L232
  movsd  D11(%rip),%xmm0
  mulsd  (%r12),%xmm0
  movsd  %xmm0,(%r12)
  movsd  (%rax),%xmm0
  mov    0xc8(%rsp),%rax
  movsd  %xmm0,(%rax)
  cmpl   $0x0,0xc0(%rsp)
  jle    L193
  mov    0x78(%rsp),%rsi
  mov    0x80(%rsp),%rcx
  mov    0xc0(%rsp),%r9d
  lea    0x0(,%r9,8),%rdi
  mov    $0x0,%r8d
L89:
  mov    $0x0,%eax
L209:
  mov    (%rsi),%rdx
  movsd  (%rdx,%rax,1),%xmm0
  mov    (%rcx),%rdx
  movsd  %xmm0,(%rdx,%rax,1)
  add    $0x8,%rax
  cmp    %rdi,%rax
  jne    L209
  movsd  0x0(%rbp,%r8,8),%xmm0
  movsd  %xmm0,0x0(%r13,%r8,8)
  add    $0x1,%r8
  add    $0x8,%rsi
  add    $0x8,%rcx
  cmp    %r8,%r9
  jne    L89
L193:
  cmpl   $0x0,0x70(%rsp)
  jle    L81
  mov    0x70(%rsp),%edx
  mov    $0x0,%eax
L21:
  movsd  (%r15,%rax,8),%xmm0
  movsd  %xmm0,(%r14,%rax,8)
  add    $0x1,%rax
  cmp    %rdx,%rax
  jne    L21
  jmp    L81
L195:
  mov    D39(%rip),%rax
  mov    %rax,(%r12)
  push   0xf0(%rsp)
  push   0xc0(%rsp)
  push   0xc0(%rsp)
  push   0xc0(%rsp)
  mov    0xc0(%rsp),%eax
  push   %rax
  push   0xc0(%rsp)
  push   0xb8(%rsp)
  push   %r13
  push   0xc0(%rsp)
  mov    0xb8(%rsp),%eax
  push   %rax
  mov    0x58(%rsp),%r9
  mov    0x7c(%rsp),%ecx
  mov    0x70(%rsp),%rdx
  mov    0x68(%rsp),%rsi
  mov    0x60(%rsp),%rdi
  call   <mrqcof@plt>
  mov    0xd8(%rsp),%rax
  movsd  (%rax),%xmm0
  mov    0x118(%rsp),%rax
  movsd  %xmm0,(%rax)
  add    $0x50,%rsp
  cmpl   $0x0,0x70(%rsp)
  jle    L102
  mov    0x70(%rsp),%edx
  mov    $0x0,%eax
L62:
  movsd  (%r14,%rax,8),%xmm0
  movsd  %xmm0,(%r15,%rax,8)
  add    $0x1,%rax
  cmp    %rdx,%rax
  jne    L62
  jmp    L102
L126:
  add    $0x1,%rax
  cmp    %rax,%rcx
  je     L17
L236:
  cmpl   $0x0,(%rsi,%rax,4)
  je     L126
  movslq %edx,%rdi
  movsd  0x0(%rbp,%rdi,8),%xmm0
  addsd  (%r14,%rax,8),%xmm0
  movsd  %xmm0,(%r15,%rax,8)
  lea    0x1(%rdx),%edx
  jmp    L126
L232:
  movsd  D34(%rip),%xmm0
  mulsd  (%r12),%xmm0
  movsd  %xmm0,(%r12)
  mov    0xc8(%rsp),%rax
  movsd  (%rax),%xmm0
  mov    0x88(%rsp),%rax
  movsd  %xmm0,(%rax)
L81:
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L31:
  mov    $0x1,%ecx
  mov    %rbx,%rdx
  mov    0xc0(%rsp),%esi
  mov    0x78(%rsp),%rdi
  call   <gaussj@plt>
  test   %eax,%eax
  je     L168
  movq   $0x0,(%r12)
L5:
  mov    0xc0(%rsp),%ecx
  mov    0x8(%rsp),%rbx
  mov    %rbx,%rdx
  mov    0x70(%rsp),%esi
  mov    0x78(%rsp),%rdi
  call   <covsrt@plt>
  mov    0xc0(%rsp),%ecx
  mov    %rbx,%rdx
  mov    0x70(%rsp),%esi
  mov    0x80(%rsp),%rdi
  call   <covsrt@plt>
  jmp    L81
L181:
  movq   $0x0,(%r12)
  jmp    L137
```

tool_calls: name: unpack_data
arguments: label: D33
type_infered: f64
name: unpack_data
arguments: label: D11
type_infered: f64
name: unpack_data
arguments: label: D39
type_infered: f64
name: unpack_data
arguments: label: D34
type_infered: f64

tool: D33: 1

tool: D11: 0.1

tool: D39: 0.001

tool: D34: 10

assistant: ```c
void mrqmin(double *x, double *y, double *sig, int ndata, double *a, int *ia, int ma, double **covar, double **alpha, double *chisq, double *alamda, void (*funcs)(double *, double *, double *, double **, int, int, int, double *, double **, double *, double *, int *, void *), int Nlin_coeff, double **Design_Matrix, double *lin_coeffs, int *varylin_coeffs, int mfit, double *ochisq, double *atry, double *beta, double *da, double **oneda, void *userparams) {
  void covsrt(double **covar, int ma, int *ia, int mfit);
  int gaussj(double **a, int n, double **b, int m);
  void mrqcof(double *x, double *y, double *sig, int ndata, double *a, int *ia, int ma, double **alpha, double *beta, double *chisq, void (*funcs)(double *, double *, double *, double **, int, int, int, double *, double **, double *, double *, int *, void *), int, double **, double *, int *, void *);
  int j, k, l;
  if (*alamda < 0.0) {
    *alamda = 0.001;
    mrqcof(x, y, sig, ndata, a, ia, ma, alpha, beta, chisq, funcs, Nlin_coeff, Design_Matrix, lin_coeffs, varylin_coeffs, userparams);
    ochisq[0] = (*chisq);
    for (j = 0; j < ma; j++)
      atry[j] = a[j];
  }
  for (j = 0; j < mfit; j++) {
    for (k = 0; k < mfit; k++)
      covar[j][k] = alpha[j][k];
    covar[j][j] = alpha[j][j] * (1.0 + (*alamda));
    oneda[j][0] = beta[j];
  }
  if (gaussj(covar, mfit, oneda, 1)) {
    *alamda = 0;
  }
  for (j = 0; j < mfit; j++)
    da[j] = oneda[j][0];
  if (*alamda == 0.0) {
    covsrt(covar, ma, ia, mfit);
    covsrt(alpha, ma, ia, mfit);
    return;
  }
  for (j = 0, l = 0; l < ma; l++)
    if (ia[l])
      atry[l] = a[l] + da[j++];
  mrqcof(x, y, sig, ndata, atry, ia, ma, covar, da, chisq, funcs, Nlin_coeff, Design_Matrix, lin_coeffs, varylin_coeffs, userparams);
  if (*chisq < ochisq[0]) {
    *alamda *= 0.1;
    ochisq[0] = (*chisq);
    for (j = 0; j < mfit; j++) {
      for (k = 0; k < mfit; k++)
        alpha[j][k] = covar[j][k];
      beta[j] = da[j];
    }
    for (l = 0; l < ma; l++)
      a[l] = atry[l];
  } else {
    *alamda *= 10.0;
    *chisq = ochisq[0];
  }
}
```