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

```asm
<innerFH>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xb8,%rsp
  mov    %rdi,0x30(%rsp)
  mov    %esi,0x3c(%rsp)
  mov    %rdx,0x40(%rsp)
  mov    %ecx,0x58(%rsp)
  mov    %r8,0x10(%rsp)
  mov    %r9d,%r15d
  movsd  %xmm0,(%rsp)
  mov    0x108(%rsp),%r14
  mov    0x110(%rsp),%rax
  mov    %rax,0x48(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0xa8(%rsp)
  xor    %eax,%eax
  mov    %r9d,%ebp
  mov    %rbp,0x50(%rsp)
  mov    %rbp,%rdi
  call   <malloc@plt>
  mov    %rax,%r12
  mov    0xf8(%rsp),%ebx
  add    0x100(%rsp),%ebx
  mov    %ebx,0x38(%rsp)
  lea    (%rbx,%rbx,2),%edi
  add    %edi,%edi
  mov    %edi,%edi
  shl    $0x3,%rdi
  call   <malloc@plt>
  mov    %rax,0x8(%rsp)
  lea    0x0(,%rbp,8),%rdi
  call   <malloc@plt>
  mov    %rax,%rbp
  mov    %ebx,%edi
  shl    $0x2,%rdi
  call   <malloc@plt>
  mov    %rax,%r13
  mov    %rax,0x20(%rsp)
  lea    (%rbx,%rbx,8),%edi
  shl    $0x3,%rdi
  call   <malloc@plt>
  mov    %rax,0x28(%rsp)
  test   %ebx,%ebx
  je     L89
  mov    %ebx,%edx
  mov    $0x0,%eax
  mov    %r13,%rcx
L30:
  mov    %eax,(%rcx,%rax,4)
  add    $0x1,%rax
  cmp    %rdx,%rax
  jne    L30
L89:
  mov    %r14,%rax
  lea    0x48(%r14),%rdx
  movsd  D7(%rip),%xmm0
L150:
  movsd  %xmm0,(%rax)
  add    $0x8,%rax
  cmp    %rdx,%rax
  jne    L150
  test   %r15d,%r15d
  je     L60
  mov    0x48(%rsp),%rsi
  mov    %rsi,%rax
  lea    -0x1(%r15),%edx
  lea    0x1(%rsi,%rdx,1),%rdx
L116:
  movb   $0x0,(%rax)
  add    $0x1,%rax
  cmp    %rax,%rdx
  jne    L116
L60:
  cmpl   $0x0,0xf0(%rsp)
  je     L93
  movl   $0x0,0x1c(%rsp)
  movl   $0x0,0x18(%rsp)
  mov    $0x0,%r13d
  jmp    L123
L75:
  movb   $0x0,(%r12,%rax,1)
L112:
  add    $0x1,%rax
  cmp    %rax,%rdx
  je     L135
L39:
  movsd  (%rsp),%xmm2
  comisd 0x0(%rbp,%rax,8),%xmm2
  jbe    L75
  movb   $0x1,(%r12,%rax,1)
  add    $0x1,%ebx
  jmp    L112
L135:
  cmp    0x18(%rsp),%ebx
  ja     L61
L171:
  cmp    0x1c(%rsp),%ebx
  ja     L147
L129:
  add    $0x1,%r13d
  cmp    %r13d,0xf0(%rsp)
  je     L93
L123:
  sub    $0x8,%rsp
  push   0x10(%rsp)
  mov    0x110(%rsp),%r9d
  mov    0x68(%rsp),%r8d
  mov    0x50(%rsp),%rcx
  mov    0x108(%rsp),%edx
  mov    0x4c(%rsp),%esi
  mov    0x40(%rsp),%rdi
  mov    $0x0,%eax
  call   <dual_sample@plt>
  lea    0x70(%rsp),%rbx
  mov    0x38(%rsp),%r8
  mov    %rbx,%rcx
  mov    0x48(%rsp),%edx
  mov    0x30(%rsp),%rsi
  mov    0x18(%rsp),%rdi
  mov    $0x0,%eax
  call   <u2f@plt>
  mov    %r15d,%ecx
  mov    %rbp,%rdx
  mov    %rbx,%rsi
  mov    0x20(%rsp),%rdi
  mov    $0x0,%eax
  call   <FDs@plt>
  add    $0x10,%rsp
  test   %r15d,%r15d
  je     L129
  mov    %r15d,%edx
  mov    $0x0,%eax
  mov    $0x0,%ebx
  jmp    L39
L61:
  mov    0x50(%rsp),%rdx
  mov    %r12,%rsi
  mov    0x48(%rsp),%rdi
  call   <memcpy@plt>
  movdqa 0x60(%rsp),%xmm3
  movups %xmm3,(%r14)
  movdqa 0x70(%rsp),%xmm4
  movups %xmm4,0x10(%r14)
  movdqa 0x80(%rsp),%xmm5
  movups %xmm5,0x20(%r14)
  movdqa 0x90(%rsp),%xmm6
  movups %xmm6,0x30(%r14)
  mov    0xa0(%rsp),%rax
  mov    %rax,0x40(%r14)
  mov    %ebx,0x18(%rsp)
  jmp    L171
L147:
  lea    0x60(%rsp),%rdx
  mov    $0x4,%r8d
  movsd  (%rsp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  D18(%rip),%xmm1
  mov    %r12,%rcx
  mov    %r15d,%esi
  mov    0x10(%rsp),%rdi
  mov    $0x2,%eax
  call   <u2Fit@plt>
  mov    %eax,0x5c(%rsp)
  mov    %ebx,0x1c(%rsp)
  cmp    %eax,0x18(%rsp)
  jae    L129
  mov    0x50(%rsp),%rdx
  mov    %r12,%rsi
  mov    0x48(%rsp),%rdi
  call   <memcpy@plt>
  movdqa 0x60(%rsp),%xmm7
  movups %xmm7,(%r14)
  movdqa 0x70(%rsp),%xmm7
  movups %xmm7,0x10(%r14)
  movdqa 0x80(%rsp),%xmm7
  movups %xmm7,0x20(%r14)
  movdqa 0x90(%rsp),%xmm3
  movups %xmm3,0x30(%r14)
  mov    0xa0(%rsp),%rax
  mov    %rax,0x40(%r14)
  mov    %ebx,0x1c(%rsp)
  mov    0x5c(%rsp),%eax
  mov    %eax,0x18(%rsp)
  jmp    L129
L93:
  mov    0x8(%rsp),%rdi
  call   <free@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  mov    0x20(%rsp),%rdi
  call   <free@plt>
  mov    0x28(%rsp),%rdi
  call   <free@plt>
  mov    %r12,%rdi
  call   <free@plt>
  mov    0xa8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L102
  add    $0xb8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L102:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D7
data_type: byte[8]
name: parse_data
arguments: label: D18
data_type: byte[8]

tool: {"D7": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

tool: {"D18": [0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x40]}

assistant: ```c
void innerFH(double *uH, unsigned lenH, double *uO, unsigned lenO, double *u, unsigned len, double th, unsigned repCount, unsigned sam_sizH, unsigned sam_sizO, double *F, unsigned char *inl) {
  unsigned i, rep, max_i, max_s, no_i;
  double aF[3 * 3];
  unsigned char *v = (unsigned char *)malloc(len * sizeof(unsigned char));
  double *usam = (double *)malloc(6 * (sam_sizH + sam_sizO) * sizeof(double));
  double *Ds = (double *)malloc(len * sizeof(double));
  int *allInl = (int *)malloc((sam_sizH + sam_sizO) * sizeof(int));
  double *buffer = (double *)malloc(9 * (sam_sizH + sam_sizO) * sizeof(double));
  for (i = 0; i < sam_sizH + sam_sizO; ++i) {
    allInl[i] = i;
  }
  for (i = 0; i < 3 * 3; ++i) {
    F[i] = 1;
  }
  for (i = 0; i < len; ++i) {
    inl[i] = 0;
  }
  max_i = 0;
  max_s = 0;
  for (rep = 0; rep < repCount; ++rep) {
    dual_sample(uH, lenH, sam_sizH, uO, lenO, sam_sizO, usam);
    u2f(usam, allInl, sam_sizH + sam_sizO, aF, buffer);
    FDs(u, aF, Ds, len);
    no_i = 0;
    for (i = 0; i < len; ++i) {
      if (Ds[i] < th) {
        v[i] = 1;
        ++no_i;
      } else {
        v[i] = 0;
      }
    }
    if (max_i < no_i) {
      memcpy(inl, v, len * sizeof(unsigned char));
      memcpy(F, aF, 3 * 3 * sizeof(double));
      max_i = no_i;
    }
    if (no_i > max_s) {
      max_s = no_i;
      no_i = u2Fit(u, len, aF, v, th, th * 3, 4);
      if (max_i < no_i) {
        memcpy(inl, v, len * sizeof(unsigned char));
        memcpy(F, aF, 3 * 3 * sizeof(double));
        max_i = no_i;
      }
    }
  }
  free(usam);
  free(Ds);
  free(allInl);
  free(buffer);
  free(v);
}
```