user: 请将以下的汇编代码转换成C语言代码：

```asm
<u2Fit>:
  endbr64
  push   %r15
  movapd %xmm1,%xmm2
  lea    -0x1(%r8),%eax
  push   %r14
  subsd  %xmm0,%xmm2
  mov    %rdx,%r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  push   %rbp
  mov    %esi,%ebp
  push   %rbx
  lea    0x0(,%rbp,4),%rdi
  mov    %rcx,%rbx
  sub    $0x38,%rsp
  movsd  %xmm0,0x28(%rsp)
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  mov    %r8d,0x1c(%rsp)
  mov    %esi,0x18(%rsp)
  movsd  %xmm1,0x8(%rsp)
  divsd  %xmm0,%xmm2
  movsd  %xmm2,0x20(%rsp)
  call   <malloc@plt>
  lea    0x0(,%rbp,8),%rdi
  mov    %rax,%r12
  call   <malloc@plt>
  mov    0x18(%rsp),%esi
  mov    %rax,%r15
  lea    (%rsi,%rsi,8),%edi
  shl    $0x3,%rdi
  call   <malloc@plt>
  mov    0x1c(%rsp),%edx
  mov    %rax,0x10(%rsp)
  test   %edx,%edx
  je     L29
  movl   $0x0,0x4(%rsp)
  mov    %rbp,%rax
  movsd  0x8(%rsp),%xmm1
  mov    %r15,%rbp
  mov    %r12,%r15
  mov    %r14,%r12
  mov    %r13,%r14
  mov    %rax,%r13
  nopw   0x0(%rax,%rax,1)
L61:
  mov    0x18(%rsp),%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %r14,%rdi
  xor    %eax,%eax
  movsd  %xmm1,0x8(%rsp)
  call   <FDs@plt>
  mov    0x18(%rsp),%eax
  test   %eax,%eax
  je     L118
  movsd  0x8(%rsp),%xmm1
  xor    %eax,%eax
  xor    %ecx,%ecx
  nopl   0x0(%rax,%rax,1)
L37:
  xor    %edx,%edx
  comisd 0x0(%rbp,%rax,8),%xmm1
  jbe    L59
  add    $0x1,%ecx
  mov    $0x1,%edx
L59:
  mov    %dl,(%rbx,%rax,1)
  add    $0x1,%rax
  cmp    %r13,%rax
  jne    L37
  cmp    $0x7,%ecx
  jbe    L101
  xor    %eax,%eax
  xor    %edx,%edx
  nopl   0x0(%rax,%rax,1)
L68:
  cmpb   $0x0,(%rbx,%rax,1)
  je     L77
  mov    %edx,%ecx
  add    $0x1,%edx
  mov    %eax,(%r15,%rcx,4)
L77:
  add    $0x1,%rax
  cmp    %rax,%r13
  jne    L68
  mov    0x10(%rsp),%r8
  mov    %r12,%rcx
  mov    %r15,%rsi
  mov    %r14,%rdi
  xor    %eax,%eax
  movsd  %xmm1,0x8(%rsp)
  call   <u2f@plt>
  addl   $0x1,0x4(%rsp)
  movsd  0x8(%rsp),%xmm1
  mov    0x4(%rsp),%eax
  subsd  0x20(%rsp),%xmm1
  cmp    %eax,0x1c(%rsp)
  jne    L61
  mov    %r14,%r13
  mov    0x18(%rsp),%ecx
  mov    %r12,%r14
  mov    %rbp,%rdx
  mov    %r14,%rsi
  mov    %r13,%rdi
  xor    %eax,%eax
  mov    %r15,%r12
  mov    %rbp,%r15
  call   <FDs@plt>
L63:
  mov    0x18(%rsp),%ecx
  xor    %eax,%eax
  xor    %r13d,%r13d
  nopl   0x0(%rax,%rax,1)
L115:
  movsd  0x28(%rsp),%xmm4
  xor    %edx,%edx
  comisd (%r15,%rax,8),%xmm4
  jbe    L56
  add    $0x1,%r13d
  mov    $0x1,%edx
L56:
  mov    %dl,(%rbx,%rax,1)
  add    $0x1,%rax
  cmp    %eax,%ecx
  ja     L115
L102:
  mov    %r12,%rdi
  call   <free@plt>
  mov    %r15,%rdi
  call   <free@plt>
  mov    0x10(%rsp),%rdi
  call   <free@plt>
L30:
  add    $0x38,%rsp
  mov    %r13d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L118:
  mov    %r15,%r12
  mov    %rbp,%r15
L3:
  mov    %r12,%rdi
  call   <free@plt>
  mov    %r15,%rdi
  call   <free@plt>
  mov    0x10(%rsp),%rdi
  call   <free@plt>
  mov    0x18(%rsp),%r13d
  jmp    L30
L101:
  mov    %r15,%r12
  mov    %ecx,0x18(%rsp)
  mov    %rbp,%r15
  jmp    L3
L29:
  mov    0x18(%rsp),%ebp
  xor    %eax,%eax
  mov    %r15,%rdx
  mov    %r14,%rsi
  mov    %r13,%rdi
  mov    %ebp,%ecx
  call   <FDs@plt>
  test   %ebp,%ebp
  jne    L63
  xor    %r13d,%r13d
  jmp    L102
```

assistant: ```c
unsigned u2Fit(double *u, unsigned len, double *F, unsigned char *inl, double th, double ths, unsigned iters) {
  double dth = (ths - th) / (iters - 1);
  unsigned iter, i, no_i;
  int *inlI = (int *)malloc(len * sizeof(int));
  double *Ds = (double *)malloc(len * sizeof(double));
  double *buffer = (double *)malloc(9 * len * sizeof(double));
  for (iter = 0; iter < iters; ++iter) {
    FDs(u, F, Ds, len);
    no_i = 0;
    for (i = 0; i < len; ++i) {
      if (Ds[i] < ths) {
        inl[i] = 1;
        ++no_i;
      } else {
        inl[i] = 0;
      }
    }
    if (no_i < 8) {
      free(inlI);
      free(Ds);
      free(buffer);
      return no_i;
    }
    no_i = 0;
    for (i = 0; i < len; ++i) {
      if (inl[i]) {
        inlI[no_i++] = i;
      }
    }
    u2f(u, inlI, no_i, F, buffer);
    ths -= dth;
  }
  FDs(u, F, Ds, len);
  no_i = 0;
  for (i = 0; i < len; ++i) {
    if (Ds[i] < th) {
      inl[i] = 1;
      ++no_i;
    } else {
      inl[i] = 0;
    }
  }
  free(inlI);
  free(Ds);
  free(buffer);
  return no_i;
}
```