user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<form_flat_clusters_from_monotonic_criterion>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,%r15
  mov    %rsi,%r12
  mov    %rdx,0x28(%rsp)
  movsd  %xmm0,0x18(%rsp)
  mov    %ecx,%ebx
  movslq %ecx,%rdi
  mov    %rdi,%rax
  shr    $0x3,%rax
  pxor   %xmm0,%xmm0
  cvtsi2sd %ecx,%xmm0
  mulsd  D9(%rip),%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sd %rax,%xmm1
  ucomisd %xmm1,%xmm0
  jp     L143
  mov    %eax,%r13d
  jne    L143
L24:
  shl    $0x2,%rdi
  call   <malloc@plt>
  mov    %rax,%rbp
  movslq %r13d,%r13
  mov    %r13,%rdi
  call   <malloc@plt>
  mov    %rax,0x10(%rsp)
  mov    %r13,%rdi
  call   <malloc@plt>
  mov    %rax,%r14
  mov    %rax,0x20(%rsp)
  lea    -0x2(%rbx,%rbx,1),%eax
  mov    %eax,0x0(%rbp)
  mov    %r13,%rdx
  mov    $0x0,%esi
  mov    0x10(%rsp),%rdi
  call   <memset@plt>
  mov    %r13,%rdx
  mov    $0x0,%esi
  mov    %r14,%rdi
  call   <memset@plt>
  movl   $0x0,0xc(%rsp)
  mov    $0xffffffff,%r10d
  mov    $0x0,%esi
  movsd  0x18(%rsp),%xmm1
  jmp    L135
L143:
  lea    0x1(%rax),%r13d
  jmp    L24
L56:
  comisd %xmm0,%xmm1
  jb     L86
  addl   $0x1,0xc(%rsp)
  mov    %esi,%r10d
  jmp    L86
L193:
  mov    $0x1,%eax
  shl    %cl,%eax
  movzbl 0x18(%rsp),%r13d
  or     %eax,%r13d
  mov    %r13b,(%r11)
  mov    %edi,0x4(%rbp,%r14,1)
  add    $0x1,%esi
  jmp    L120
L31:
  mov    $0x1,%eax
  shl    %cl,%eax
  or     %eax,%r11d
  mov    %r11b,(%rdx)
  mov    %r8d,0x4(%rbp,%r14,1)
  add    $0x1,%esi
  jmp    L120
L222:
  addl   $0x1,0xc(%rsp)
  mov    0xc(%rsp),%eax
  movslq %edi,%rdi
  mov    0x28(%rsp),%rcx
  mov    %eax,(%rcx,%rdi,4)
  cmp    %r8d,%ebx
  jle    L74
L73:
  addl   $0x1,0xc(%rsp)
  mov    0xc(%rsp),%eax
  movslq %r8d,%r8
  mov    0x28(%rsp),%rdi
  mov    %eax,(%rdi,%r8,4)
  jmp    L74
L228:
  cmp    %r8d,%ebx
  jle    L74
  cmp    $0xffffffff,%r10d
  je     L73
L187:
  movslq %r8d,%r8
  mov    0x28(%rsp),%rax
  mov    0xc(%rsp),%edi
  mov    %edi,(%rax,%r8,4)
L74:
  cmp    %esi,%r10d
  mov    $0xffffffff,%eax
  cmove  %eax,%r10d
L123:
  sub    $0x1,%esi
L120:
  test   %esi,%esi
  js     L82
L135:
  movslq %esi,%rax
  lea    0x0(,%rax,4),%r14
  mov    0x0(%rbp,%rax,4),%r9d
  mov    %r9d,%eax
  sub    %ebx,%eax
  lea    0x0(,%rax,4),%edx
  movslq %edx,%rdx
  lea    (%r15,%rdx,8),%rdx
  cvttsd2si (%rdx),%edi
  cvttsd2si 0x8(%rdx),%r8d
  movslq %eax,%rdx
  movsd  (%r12,%rdx,8),%xmm0
  cmp    $0xffffffff,%r10d
  je     L56
L86:
  cmp    %edi,%ebx
  jg     L75
  mov    %rdx,%r11
  shr    $0x3,%r11
  add    0x10(%rsp),%r11
  movzbl (%r11),%r13d
  mov    %r13b,0x18(%rsp)
  mov    %eax,%ecx
  not    %ecx
  and    $0x7,%ecx
  movzbl %r13b,%r13d
  bt     %ecx,%r13d
  jae    L193
L75:
  cmp    %r8d,%ebx
  jg     L60
  shr    $0x3,%rdx
  add    0x20(%rsp),%rdx
  movzbl (%rdx),%r11d
  not    %eax
  mov    %eax,%ecx
  and    $0x7,%ecx
  movzbl %r11b,%eax
  bt     %ecx,%eax
  jae    L31
L60:
  cmp    %r9d,%ebx
  jg     L123
  cmp    %edi,%ebx
  jle    L228
  cmp    $0xffffffff,%r10d
  je     L222
  movslq %edi,%rdi
  mov    0x28(%rsp),%rax
  mov    0xc(%rsp),%ecx
  mov    %ecx,(%rax,%rdi,4)
  cmp    %r8d,%ebx
  jg     L187
  jmp    L74
L82:
  mov    %rbp,%rdi
  call   <free@plt>
  mov    0x10(%rsp),%rdi
  call   <free@plt>
  mov    0x20(%rsp),%rdi
  call   <free@plt>
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D9
data_type: byte[8]

tool: {"D9": [0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x3f]}

assistant: ```c
void form_flat_clusters_from_monotonic_criterion(const double *Z, const double *mono_crit, int *T, double cutoff, int n) {
  int *curNode;
  int ndid, lid, rid, k, ms, nc;
  unsigned char *lvisited, *rvisited;
  double max_crit;
  const double *Zrow;
  const int bff = (((((double)(n)) / (double)(sizeof(unsigned char) * 8)) == ((double)(((n)) / ((sizeof(unsigned char) * 8)))) ? (((n)) / ((sizeof(unsigned char) * 8))) : (((n)) / ((sizeof(unsigned char) * 8)) + 1)));
  curNode = (int *)malloc(n * sizeof(int));
  lvisited = (unsigned char *)malloc(bff);
  rvisited = (unsigned char *)malloc(bff);
  nc = 0;
  ms = -1;
  k = 0;
  curNode[k] = (n * 2) - 2;
  bzero(lvisited, bff);
  bzero(rvisited, bff);
  ms = -1;
  while (k >= 0) {
    ndid = curNode[k];
    Zrow = Z + ((ndid - n) * 4);
    lid = (int)Zrow[0];
    rid = (int)Zrow[1];
    max_crit = mono_crit[ndid - n];
    ;
    if (ms == -1 && max_crit <= cutoff) {
      ;
      ms = k;
      nc++;
    }
    if (lid >= n && !(((lvisited)[(ndid - n) / (sizeof(unsigned char) * 8)] >> (((sizeof(unsigned char) * 8) - 1) - ((ndid - n) % (sizeof(unsigned char) * 8)))) & 0x1)) {
      ((lvisited)[(ndid - n) / (sizeof(unsigned char) * 8)] |= ((0x1) << (((sizeof(unsigned char) * 8) - 1) - ((ndid - n) % (sizeof(unsigned char) * 8)))));
      curNode[k + 1] = lid;
      k++;
      continue;
    }
    if (rid >= n && !(((rvisited)[(ndid - n) / (sizeof(unsigned char) * 8)] >> (((sizeof(unsigned char) * 8) - 1) - ((ndid - n) % (sizeof(unsigned char) * 8)))) & 0x1)) {
      ((rvisited)[(ndid - n) / (sizeof(unsigned char) * 8)] |= ((0x1) << (((sizeof(unsigned char) * 8) - 1) - ((ndid - n) % (sizeof(unsigned char) * 8)))));
      curNode[k + 1] = rid;
      k++;
      continue;
    }
    if (ndid >= n) {
      if (lid < n) {
        if (ms == -1) {
          nc++;
          T[lid] = nc;
        } else {
          T[lid] = nc;
        }
      }
      if (rid < n) {
        if (ms == -1) {
          nc++;
          T[rid] = nc;
        } else {
          T[rid] = nc;
        }
      }
      if (ms == k) {
        ms = -1;
      }
    }
    k--;
  }
  free(curNode);
  free(lvisited);
  free(rvisited);
}
```