user: What is the c source code of the assembly code below?

```asm
<llsfit>:
  endbr64
  push   %r15
  lea    0x1(%rdi),%eax
  mov    %edx,%r15d
  lea    -0x1(%rdi),%r11d
  push   %r14
  mov    %r15d,%r14d
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xf8,%rsp
  mov    %eax,0xe4(%rsp)
  imul   %edx,%eax
  mov    0x140(%rsp),%rbp
  mov    %rcx,0xd0(%rsp)
  mov    0x130(%rsp),%rbx
  mov    %rsi,0x28(%rsp)
  mov    0x138(%rsp),%rsi
  mov    %rbp,%r12
  movslq %eax,%rdx
  lea    (%r15,%rax,1),%r10d
  mov    %rbx,0x60(%rsp)
  lea    0x0(%rbp,%rdx,8),%rcx
  mov    %eax,%edx
  mov    %rsi,0x18(%rsp)
  sub    %r15d,%edx
  mov    %rcx,0xa0(%rsp)
  movslq %edx,%rdx
  mov    %r8,0xb8(%rsp)
  lea    0x0(%rbp,%rdx,8),%rdx
  mov    %r11d,0xb0(%rsp)
  mov    %rdx,0x98(%rsp)
  mov    %edi,%edx
  shr    $0x2,%edx
  mov    %r10d,0x6c(%rsp)
  sub    $0x1,%edx
  movl   $0x0,0x68(%rsp)
  shl    $0x4,%rdx
  lea    0x10(%rsi,%rdx,1),%rsi
  lea    0x8(%r8),%rdx
  mov    %rsi,0xc0(%rsp)
  mov    %edi,%esi
  and    $0xfffffffc,%esi
  cmp    %rdx,%rcx
  mov    %esi,0xcc(%rsp)
  lea    -0x1(%r15),%esi
  setne  %cl
  mov    %esi,0xb4(%rsp)
  cmp    $0x2,%esi
  mov    %r15d,%esi
  seta   %dl
  and    $0xfffffffe,%esi
  add    %esi,%eax
  and    %edx,%ecx
  mov    %r15d,%edx
  mov    %esi,0xe0(%rsp)
  cltq
  shr    %edx
  mov    %cl,0xcb(%rsp)
  lea    0x0(%rbp,%rax,8),%rax
  sub    $0x1,%edx
  mov    %rax,0x70(%rsp)
  movslq %edi,%rax
  add    $0x1,%rdx
  shl    $0x3,%rax
  shl    $0x4,%rdx
  mov    %rax,0x90(%rsp)
  movslq %r10d,%rax
  lea    0x0(%rbp,%rax,8),%rax
  mov    %rdx,0xd8(%rsp)
  movslq %esi,%rdx
  mov    %rax,0xe8(%rsp)
  mov    %r11d,%eax
  lea    (%r8,%rdx,8),%rcx
  lea    0x8(%rbx,%rax,8),%rax
  mov    %edi,%ebx
  mov    %rcx,0x78(%rsp)
  mov    %rax,0x88(%rsp)
  mov    %r9,0xa8(%rsp)
  test   %ebx,%ebx
  jle    L305
L341:
  cmpl   $0x2,0xb0(%rsp)
  jbe    L25
  mov    0x18(%rsp),%rax
  movdqa D0(%rip),%xmm0
  mov    0xc0(%rsp),%rdx
L31:
  movdqa %xmm0,%xmm1
  add    $0x10,%rax
  paddd  D14(%rip),%xmm0
  movups %xmm1,-0x10(%rax)
  cmp    %rax,%rdx
  jne    L31
  mov    0xcc(%rsp),%eax
  cmp    %eax,%ebx
  je     L313
L217:
  mov    0x18(%rsp),%rsi
  movslq %eax,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    %eax,(%rsi,%rdx,4)
  lea    0x1(%rax),%edx
  cmp    %ebx,%edx
  jge    L313
  add    $0x2,%eax
  mov    %edx,0x4(%rsi,%rcx,1)
  cmp    %eax,%ebx
  jle    L313
  mov    %eax,0x8(%rsi,%rcx,1)
L313:
  mov    0xb4(%rsp),%eax
  mov    0x18(%rsp),%rdi
  xor    %r13d,%r13d
  mov    %rax,0x10(%rsp)
  test   %r14d,%r14d
  jle    L442
  mov    %r12,0x8(%rsp)
  mov    0xd0(%rsp),%r15
  mov    %ebx,0x20(%rsp)
  mov    %rdi,%rbx
  xchg   %ax,%ax
L312:
  xor    %ebp,%ebp
  mov    %r15,%rax
  mov    %rbp,%r15
  mov    %rax,%rbp
  nopl   0x0(%rax,%rax,1)
L159:
  mov    (%rbx),%eax
  mov    0x8(%rsp),%rdi
  movsd  0x0(%rbp,%r15,8),%xmm0
  imul   %r14d,%eax
  add    %r15d,%eax
  cltq
  lea    (%rdi,%rax,8),%r12
  mov    0x28(%rsp),%rax
  mov    %r13d,%edi
  call   *%rax
  mov    %r15,%rax
  add    $0x1,%r15
  movsd  %xmm0,(%r12)
  cmp    %rax,0x10(%rsp)
  jne    L159
  mov    %rbp,%r15
  add    $0x1,%r13d
  add    $0x4,%rbx
  cmp    %r13d,0x20(%rsp)
  jne    L312
  mov    0x20(%rsp),%ebx
  mov    0x8(%rsp),%r12
L18:
  cmpb   $0x0,0xcb(%rsp)
  je     L83
  mov    0xa0(%rsp),%rdx
  mov    0xd8(%rsp),%rcx
  xor    %eax,%eax
  mov    0xb8(%rsp),%rsi
  nopl   0x0(%rax)
L223:
  movupd (%rsi,%rax,1),%xmm7
  movups %xmm7,(%rdx,%rax,1)
  add    $0x10,%rax
  cmp    %rax,%rcx
  jne    L223
  cmp    0xe0(%rsp),%r14d
  je     L231
  mov    0x78(%rsp),%rax
  movsd  (%rax),%xmm0
  mov    0x70(%rsp),%rax
  movsd  %xmm0,(%rax)
L231:
  mov    0x68(%rsp),%r8d
  test   %r8d,%r8d
  jne    L264
L259:
  test   %ebx,%ebx
  jle    L309
L114:
  mov    0x18(%rsp),%rax
  mov    %ebx,0x10(%rsp)
  mov    %r14d,%ebp
  mov    0xa0(%rsp),%r15
  mov    0xa8(%rsp),%rbx
  movq   $0x0,0x48(%rsp)
  lea    0x4(%rax),%r13
  mov    0xb0(%rsp),%eax
  mov    %eax,0x5c(%rsp)
  nopl   0x0(%rax,%rax,1)
L40:
  mov    0x48(%rsp),%eax
  mov    0x68(%rsp),%edi
  mov    %eax,0x58(%rsp)
  mov    -0x4(%r13),%eax
  test   %edi,%edi
  je     L452
  imul   %ebp,%eax
  mov    %r15,%rcx
  mov    %rbx,%rsi
  mov    %ebp,%edi
  cltq
  lea    (%r12,%rax,8),%rdx
  xor    %eax,%eax
  call   <fdot@plt>
  pxor   %xmm7,%xmm7
  mov    %rbx,%rsi
  mov    %ebp,%edi
  cvtsi2sd %eax,%xmm7
  mov    -0x4(%r13),%eax
  imul   %ebp,%eax
  movsd  %xmm7,0x40(%rsp)
  cltq
  lea    (%r12,%rax,8),%rdx
  xor    %eax,%eax
  mov    %rdx,%rcx
  call   <fdot@plt>
  pxor   %xmm7,%xmm7
  cvtsi2sd %eax,%xmm7
  movsd  %xmm7,0x8(%rsp)
L316:
  movslq -0x4(%r13),%rdx
  mov    0x60(%rsp),%rdi
  mov    %r15,%rsi
  movsd  0x40(%rsp),%xmm0
  divsd  0x8(%rsp),%xmm0
  mov    %rdx,%rax
  movsd  %xmm0,(%rdi,%rdx,8)
  mov    %ebp,%edi
  mov    %r15,%rdx
  imul   %ebp,%eax
  cltq
  lea    (%r12,%rax,8),%rcx
  mov    $0x1,%eax
  call   <fortho@plt>
  mov    0x10(%rsp),%edi
  mov    0x5c(%rsp),%esi
  mov    %edi,%eax
  sub    %esi,%eax
  cmp    %edi,%eax
  jge    L144
  lea    -0x1(%rsi),%eax
  mov    0x18(%rsp),%rdi
  mov    0x6c(%rsp),%r14d
  mov    %r15,0x30(%rsp)
  mov    %eax,0x5c(%rsp)
  add    0x48(%rsp),%rax
  mov    %r13,%r15
  lea    0x8(%rdi,%rax,4),%rax
  mov    %rax,0x20(%rsp)
  mov    %r12,%rax
  mov    %rbx,%r12
  mov    %rax,%rbx
  nopl   (%rax)
L479:
  mov    (%r15),%eax
  mov    %r12,%rsi
  mov    %ebp,%edi
  add    $0x4,%r15
  imul   %ebp,%eax
  cltq
  lea    (%rbx,%rax,8),%rcx
  mov    -0x4(%r13),%eax
  imul   %ebp,%eax
  cltq
  lea    (%rbx,%rax,8),%rdx
  xor    %eax,%eax
  call   <fdot@plt>
  pxor   %xmm0,%xmm0
  mov    -0x4(%r15),%ecx
  mov    %ebp,%edi
  cvtsi2sd %eax,%xmm0
  mov    0x10(%rsp),%eax
  mov    -0x4(%r13),%edx
  divsd  0x8(%rsp),%xmm0
  imul   %ecx,%eax
  imul   %ebp,%ecx
  add    %r14d,%eax
  add    %edx,%eax
  imul   %ebp,%edx
  movslq %ecx,%rcx
  lea    (%rbx,%rcx,8),%rsi
  cltq
  movsd  %xmm0,(%rbx,%rax,8)
  mov    $0x1,%eax
  movslq %edx,%rdx
  lea    (%rbx,%rdx,8),%rcx
  mov    %rsi,%rdx
  call   <fortho@plt>
  cmp    0x20(%rsp),%r15
  jne    L479
  mov    %rbx,%rax
  mov    0x30(%rsp),%r15
  mov    %r12,%rbx
  add    $0x4,%r13
  addq   $0x1,0x48(%rsp)
  mov    %rax,%r12
  jmp    L40
  nopl   0x0(%rax)
L452:
  mov    0x48(%rsp),%r14
  cmp    %r14d,0x10(%rsp)
  jle    L281
  mov    0x5c(%rsp),%eax
  pxor   %xmm2,%xmm2
  mov    %r13,0x80(%rsp)
  movq   $0x0,0x8(%rsp)
  mov    0x98(%rsp),%r13
  movq   $0x0,0x40(%rsp)
  lea    0x1(%r14,%rax,1),%rax
  mov    %rax,0x50(%rsp)
  mov    %ebp,%eax
  mov    %r14,%rbp
  mov    %eax,%r14d
  jmp    L58
  cs nopw 0x0(%rax,%rax,1)
L337:
  comisd %xmm0,%xmm2
  jbe    L104
  movsd  0x20(%rsp),%xmm6
  mov    %ebp,0x58(%rsp)
  movapd %xmm0,%xmm2
  movsd  %xmm1,0x8(%rsp)
  movsd  %xmm6,0x40(%rsp)
L104:
  add    $0x1,%rbp
  cmp    %rbp,0x50(%rsp)
  je     L164
L58:
  mov    0x18(%rsp),%rsi
  mov    %r15,%rcx
  mov    %r14d,%edi
  mov    %ebp,0x20(%rsp)
  movsd  %xmm2,0x38(%rsp)
  mov    (%rsi,%rbp,4),%eax
  mov    %rbx,%rsi
  imul   %r14d,%eax
  cltq
  lea    (%r12,%rax,8),%rdx
  xor    %eax,%eax
  call   <fdot@plt>
  mov    0x18(%rsp),%rsi
  pxor   %xmm0,%xmm0
  mov    %r14d,%edi
  cvtsi2sd %eax,%xmm0
  mov    (%rsi,%rbp,4),%eax
  mov    %rbx,%rsi
  imul   %r14d,%eax
  movsd  %xmm0,0x20(%rsp)
  cltq
  lea    (%r12,%rax,8),%rdx
  xor    %eax,%eax
  mov    %rdx,%rcx
  call   <fdot@plt>
  pxor   %xmm1,%xmm1
  mov    %r15,%rdx
  mov    %r14d,%edi
  cvtsi2sd %eax,%xmm1
  movsd  0x20(%rsp),%xmm0
  mov    0x18(%rsp),%rsi
  mov    (%rsi,%rbp,4),%eax
  mov    %r13,%rsi
  divsd  %xmm1,%xmm0
  imul   %r14d,%eax
  movsd  %xmm1,0x30(%rsp)
  cltq
  lea    (%r12,%rax,8),%rcx
  mov    $0x1,%eax
  call   <fortho@plt>
  xor    %eax,%eax
  mov    %r13,%rcx
  mov    %r13,%rdx
  mov    %rbx,%rsi
  mov    %r14d,%edi
  call   <fdot@plt>
  movsd  0x38(%rsp),%xmm2
  pxor   %xmm4,%xmm4
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  0x30(%rsp),%xmm1
  ucomisd %xmm4,%xmm2
  jp     L337
  jne    L337
  movsd  0x20(%rsp),%xmm5
  mov    %ebp,0x58(%rsp)
  movapd %xmm0,%xmm2
  add    $0x1,%rbp
  movsd  %xmm1,0x8(%rsp)
  movsd  %xmm5,0x40(%rsp)
  cmp    %rbp,0x50(%rsp)
  jne    L58
L164:
  mov    0x80(%rsp),%r13
  mov    %r14d,%ebp
  mov    -0x4(%r13),%eax
L406:
  movslq 0x58(%rsp),%rdx
  mov    0x18(%rsp),%rsi
  lea    (%rsi,%rdx,4),%rdx
  mov    (%rdx),%ecx
  mov    %ecx,-0x4(%r13)
  mov    %eax,(%rdx)
  jmp    L316
  cs nopw 0x0(%rax,%rax,1)
L144:
  mov    %edi,%ebx
  mov    %ebp,%r14d
L346:
  movslq 0xb0(%rsp),%r11
  mov    0x6c(%rsp),%ebp
  mov    0x60(%rsp),%r8
  mov    0x18(%rsp),%r9
  lea    0x1(%r11),%r10d
  nop
L227:
  cmp    %r10d,%ebx
  jle    L403
  movslq (%r9,%r11,4),%rax
  movslq %r10d,%rcx
  lea    (%r8,%rax,8),%rsi
  mov    %rax,%rdi
  movsd  (%rsi),%xmm1
  nopw   0x0(%rax,%rax,1)
L263:
  movslq (%r9,%rcx,4),%rdx
  add    $0x1,%rcx
  mov    %edx,%eax
  imul   %ebx,%eax
  add    %ebp,%eax
  add    %edi,%eax
  cltq
  movsd  (%r12,%rax,8),%xmm0
  mulsd  (%r8,%rdx,8),%xmm0
  subsd  %xmm0,%xmm1
  movsd  %xmm1,(%rsi)
  cmp    %ecx,%ebx
  jg     L263
L403:
  sub    $0x1,%r11
  sub    $0x1,%r10d
  test   %r11d,%r11d
  jns    L227
L26:
  cmpl   $0x1,0x68(%rsp)
  jne    L185
  mov    0xe4(%rsp),%eax
  mov    %r12,%rbp
  mov    %r14d,%edi
  mov    0xa8(%rsp),%r12
  imul   %r14d,%eax
  mov    %r12,%rsi
  cltq
  lea    0x0(%rbp,%rax,8),%rdx
  xor    %eax,%eax
  mov    %rdx,%rcx
  call   <fdot@plt>
  pxor   %xmm0,%xmm0
  pxor   %xmm5,%xmm5
  cltd
  idiv   %r14d
  cvtsi2sd %eax,%xmm0
  ucomisd %xmm0,%xmm5
  ja     L336
  add    $0xf8,%rsp
  sqrtsd %xmm0,%xmm0
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L309:
  mov    0xb0(%rsp),%ecx
  test   %ecx,%ecx
  jns    L346
L185:
  movl   $0x1,0x68(%rsp)
  test   %ebx,%ebx
  jg     L341
L305:
  test   %r14d,%r14d
  jg     L18
  mov    0x68(%rsp),%eax
  test   %eax,%eax
  je     L259
L358:
  mov    0xb0(%rsp),%esi
  test   %esi,%esi
  js     L26
  jmp    L346
  nopl   0x0(%rax)
L442:
  mov    0x68(%rsp),%edx
  test   %edx,%edx
  je     L114
L264:
  test   %ebx,%ebx
  jle    L358
  mov    0xe8(%rsp),%r15
  mov    %r14d,%eax
  mov    %ebx,0x10(%rsp)
  mov    0x18(%rsp),%r13
  mov    0x60(%rsp),%rbp
  mov    0xa8(%rsp),%rbx
  mov    %r15,%r14
  mov    %eax,%r15d
  nop
L169:
  mov    0x0(%r13),%eax
  movsd  0x0(%rbp),%xmm0
  mov    %rbx,%rsi
  mov    %r15d,%edi
  add    $0x8,%rbp
  add    $0x4,%r13
  imul   %r15d,%eax
  mulsd  %xmm0,%xmm0
  cltq
  lea    (%r12,%rax,8),%rdx
  xor    %eax,%eax
  mov    %rdx,%rcx
  movsd  %xmm0,0x8(%rsp)
  call   <fdot@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  0x8(%rsp),%xmm0
  movsd  %xmm0,(%r14)
  add    0x90(%rsp),%r14
  cmp    %rbp,0x88(%rsp)
  jne    L169
  mov    0x18(%rsp),%r8
  mov    0x10(%rsp),%ebx
  mov    %r15d,%r14d
  mov    0x6c(%rsp),%r9d
  mov    (%r8),%edi
  mov    %ebx,%eax
  imul   %edi,%eax
  add    %r9d,%eax
  cltq
  movsd  (%r12,%rax,8),%xmm0
  cmp    $0x1,%ebx
  je     L114
  lea    -0x2(%rbx),%r10d
  mov    $0x1,%esi
  add    $0x2,%r10
  nopl   0x0(%rax)
L302:
  lea    -0x1(%rsi),%ecx
  mov    %rsi,%rdx
  xchg   %ax,%ax
L363:
  mov    (%r8,%rdx,4),%eax
  imul   %ebx,%eax
  add    %r9d,%eax
  cltq
  movsd  (%r12,%rax,8),%xmm1
  comisd %xmm0,%xmm1
  maxsd  %xmm0,%xmm1
  cmova  %edx,%ecx
  add    $0x1,%rdx
  movapd %xmm1,%xmm0
  cmp    %edx,%ebx
  jg     L363
  movslq %ecx,%rcx
  lea    (%r8,%rcx,4),%rax
  mov    (%rax),%edx
  mov    %edx,-0x4(%r8,%rsi,4)
  mov    %edi,(%rax)
  mov    (%r8,%rsi,4),%edi
  mov    %ebx,%eax
  add    $0x1,%rsi
  imul   %edi,%eax
  add    %r9d,%eax
  cltq
  movsd  (%r12,%rax,8),%xmm0
  cmp    %rsi,%r10
  jne    L302
  jmp    L114
L281:
  movq   $0x0,0x8(%rsp)
  movq   $0x0,0x40(%rsp)
  jmp    L406
L83:
  mov    0xb4(%rsp),%edi
  mov    0xa0(%rsp),%rcx
  xor    %eax,%eax
  mov    0xb8(%rsp),%rsi
  nopl   0x0(%rax,%rax,1)
L65:
  movsd  (%rsi,%rax,8),%xmm0
  mov    %rax,%rdx
  movsd  %xmm0,(%rcx,%rax,8)
  add    $0x1,%rax
  cmp    %rdx,%rdi
  jne    L65
  jmp    L231
L25:
  xor    %eax,%eax
  jmp    L217
L336:
  add    $0xf8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1070 <sqrt@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D0
type_infered: f32[4]
name: retrieve_data
arguments: data_tag: D14
type_infered: byte[16]

tool: {"D0": [0.0,1.401298464324817e-45,2.802596928649634e-45,4.203895392974451e-45]}

tool: {"D14": [0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00]}

assistant: ```c
double llsfit(int N, double (*f)(double, int), int D, double x[], double y[], double w[], double A[], int order[], double WORK[]) {
  int d, n, m, mmax, RUN;
  double chi, nchi, inner, norm, isave, nsave;
  for (RUN = 0; RUN <= 1; RUN++) {
    for (n = 0; n < N; n++)
      order[n] = n;
    for (n = 0; n < N; n++) {
      for (d = 0; d < D; d++)
        WORK[D * order[n] + (d)] = (*f)(x[d], n);
    }
    for (d = 0; d < D; d++)
      WORK[D * (N + 1) + (d)] = y[d];
    if (RUN) {
      for (n = 0; n < N; n++)
        WORK[D * (N + 2) + N * (n) + (0)] = A[n] * A[n] * fdot(D, w, &WORK[D * order[n] + (0)], &WORK[D * order[n] + (0)]);
      for (n = 0; n < N; n++) {
        chi = WORK[D * (N + 2) + N * (order[n]) + (0)];
        mmax = n;
        for (m = n + 1; m < N; m++) {
          if (WORK[D * (N + 2) + N * (order[m]) + (0)] > chi) {
            mmax = m;
            chi = WORK[D * (N + 2) + N * (order[m]) + (0)];
          }
        }
        m = order[n];
        order[n] = order[mmax];
        order[mmax] = m;
      }
    }
    for (n = 0; n < N; n++) {
      if (!RUN) {
        mmax = n;
        chi = isave = nsave = 0.0;
        for (m = n; m < N; m++) {
          inner = fdot(D, w, &WORK[D * order[m] + (0)], &WORK[D * (N + 1) + (0)]);
          norm = fdot(D, w, &WORK[D * order[m] + (0)], &WORK[D * order[m] + (0)]);
          fortho(D, &WORK[D * (N) + (0)], &WORK[D * (N + 1) + (0)], &WORK[D * order[m] + (0)], inner / norm);
          nchi = fdot(D, w, &WORK[D * (N) + (0)], &WORK[D * (N) + (0)]);
          if (!chi || (nchi < chi)) {
            chi = nchi;
            mmax = m;
            isave = inner;
            nsave = norm;
          }
        }
        m = order[n];
        order[n] = order[mmax];
        order[mmax] = m;
        inner = isave;
        norm = nsave;
      } else {
        inner = fdot(D, w, &WORK[D * order[n] + (0)], &WORK[D * (N + 1) + (0)]);
        norm = fdot(D, w, &WORK[D * order[n] + (0)], &WORK[D * order[n] + (0)]);
      }
      A[order[n]] = inner / norm;
      fortho(D, &WORK[D * (N + 1) + (0)], &WORK[D * (N + 1) + (0)], &WORK[D * order[n] + (0)], inner / norm);
      for (m = n + 1; m < N; m++) {
        inner = fdot(D, w, &WORK[D * order[n] + (0)], &WORK[D * order[m] + (0)]);
        WORK[D * (N + 2) + N * (order[m]) + (order[n])] = inner / norm;
        fortho(D, &WORK[D * order[m] + (0)], &WORK[D * order[m] + (0)], &WORK[D * order[n] + (0)], inner / norm);
      }
    }
    for (n = N - 1; n >= 0; n--)
      for (m = n + 1; m < N; m++)
        A[order[n]] -= WORK[D * (N + 2) + N * (order[m]) + (order[n])] * A[order[m]];
  }
  return sqrt(fdot(D, w, &WORK[D * (N + 1) + (0)], &WORK[D * (N + 1) + (0)]) / D);
}
```