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

```asm
<lmdif0>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    %rdi,0x8(%rsp)
  mov    %rcx,0x10(%rsp)
  mov    %r8,0x18(%rsp)
  movsd  %xmm0,0x20(%rsp)
  test   %edx,%edx
  jle    L15
  mov    %esi,%r12d
  mov    %edx,%ebx
  cmp    %esi,%edx
  jg     L15
  movapd %xmm0,%xmm5
  pxor   %xmm0,%xmm0
  comisd %xmm5,%xmm0
  ja     L15
  movslq %edx,%rbp
  mov    $0x4,%esi
  mov    %r9,%r15
  movslq %r12d,%r13
  mov    %rbp,%rdi
  xor    %r14d,%r14d
  call   <calloc@plt>
  mov    %rbp,%rdi
  mov    $0x8,%esi
  mov    %rax,0x28(%rsp)
  call   <calloc@plt>
  mov    %rbp,%rdi
  mov    $0x8,%esi
  mov    %rax,0x30(%rsp)
  call   <calloc@plt>
  mov    %rbp,%rdi
  mov    $0x8,%esi
  mov    %rax,0x38(%rsp)
  call   <calloc@plt>
  mov    %rbp,%rdi
  mov    $0x8,%esi
  mov    %rax,0x40(%rsp)
  call   <calloc@plt>
  mov    %rbp,%rdi
  mov    $0x8,%esi
  mov    %rax,0x48(%rsp)
  call   <calloc@plt>
  mov    $0x8,%esi
  mov    %r13,%rdi
  mov    %rax,0x50(%rsp)
  call   <calloc@plt>
  mov    %rbp,%rdi
  mov    $0x8,%esi
  mov    %rax,0x58(%rsp)
  call   <calloc@plt>
  mov    %rax,%rbp
  nopl   0x0(%rax,%rax,1)
L29:
  mov    $0x8,%esi
  mov    %r13,%rdi
  call   <calloc@plt>
  mov    %rax,0x0(%rbp,%r14,8)
  add    $0x1,%r14
  cmp    %r14d,%ebx
  jg     L29
  mov    0xa8(%rsp),%rax
  mov    %r15,%r9
  mov    %ebx,%edx
  mov    %r12d,%esi
  pxor   %xmm3,%xmm3
  movsd  D4(%rip),%xmm4
  movl   $0x0,(%rax)
  movapd %xmm3,%xmm2
  mov    $0x5,%eax
  push   0x58(%rsp)
  push   0x58(%rsp)
  push   0x58(%rsp)
  push   0x58(%rsp)
  push   0x58(%rsp)
  push   0x50(%rsp)
  push   %rbp
  push   0xe0(%rsp)
  push   0xe0(%rsp)
  push   $0x1
  push   0x80(%rsp)
  push   $0x320
  movsd  0x80(%rsp),%xmm1
  mov    0x78(%rsp),%r8
  mov    0x70(%rsp),%rcx
  mov    0x68(%rsp),%rdi
  movapd %xmm1,%xmm0
  call   <lmdif@plt>
  mov    0x100(%rsp),%rax
  add    $0x60,%rsp
  cmpl   $0x8,(%rax)
  jne    L14
  movl   $0x4,(%rax)
L14:
  xor    %r12d,%r12d
  cs nopw 0x0(%rax,%rax,1)
L56:
  mov    0x0(%rbp,%r12,8),%rdi
  add    $0x1,%r12
  call   <free@plt>
  cmp    %r12d,%ebx
  jg     L56
  mov    %rbp,%rdi
  call   <free@plt>
  mov    0x58(%rsp),%rdi
  call   <free@plt>
  mov    0x50(%rsp),%rdi
  call   <free@plt>
  mov    0x48(%rsp),%rdi
  call   <free@plt>
  mov    0x40(%rsp),%rdi
  call   <free@plt>
  mov    0x38(%rsp),%rdi
  call   <free@plt>
  mov    0x30(%rsp),%rdi
  call   <free@plt>
  mov    0x28(%rsp),%rdi
  call   <free@plt>
  add    $0x68,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L15:
  mov    0xa0(%rsp),%rax
  movl   $0x0,(%rax)
  add    $0x68,%rsp
  mov    $0x1,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: parse_data
arguments: label: D4
type: f32[2]

tool: {"D4": [0.0,2.5625]}

assistant: ```c
int lmdif0(void fcn(int, int, double[], double[], int *), int m, int n, double x[], int msk[], double fvec[], double tol, int *info, int *nfev) {
  int j, maxfev, mode;
  int *ipvt;
  double ftol, xtol, gtol, epsfcn, factor;
  double *diag, **fjac, *qtf, *wa1, *wa2, *wa3, *wa4;
  if (n <= 0 || m < n || tol < 0.0) {
    *info = 0;
    return (1);
  }
  ipvt = (int *)calloc(n, sizeof(int));
  diag = (double *)calloc(n, sizeof(double));
  qtf = (double *)calloc(n, sizeof(double));
  wa1 = (double *)calloc(n, sizeof(double));
  wa2 = (double *)calloc(n, sizeof(double));
  wa3 = (double *)calloc(n, sizeof(double));
  wa4 = (double *)calloc(m, sizeof(double));
  fjac = (double **)calloc(n, sizeof(double *));
  for (j = 0; j < n; j++)
    fjac[j] = (double *)calloc(m, sizeof(double));
  ftol = tol;
  xtol = tol;
  gtol = 0.0;
  maxfev = 800;
  epsfcn = 0.0;
  mode = 1;
  factor = 10;
  *nfev = 0;
  lmdif(fcn, m, n, x, msk, fvec, ftol, xtol, gtol, maxfev, epsfcn, diag, mode, factor, info, nfev, fjac, ipvt, qtf, wa1, wa2, wa3, wa4);
  if (*info == 8)
    *info = 4;
  for (j = 0; j < n; j++)
    free(fjac[j]);
  free(fjac);
  free(wa4);
  free(wa3);
  free(wa2);
  free(wa1);
  free(qtf);
  free(diag);
  free(ipvt);
  return (0);
}
```