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

```asm
<crm_faster_3motifs_allt>:
  endbr64
  push   %r15
  mov    %rdx,%rax
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x78,%rsp
  mov    0xd8(%rsp),%edx
  mov    %rcx,0x68(%rsp)
  mov    0xd0(%rsp),%ecx
  mov    %rdi,0x48(%rsp)
  test   %edx,%edx
  mov    0xd8(%rsp),%edx
  cmovs  0xd0(%rsp),%edx
  mov    %r8d,0x10(%rsp)
  mov    0xc0(%rsp),%r12d
  mov    0xe0(%rsp),%r13
  mov    %edx,0xd8(%rsp)
  test   %ecx,%ecx
  jle    L28
  test   %edx,%edx
  js     L28
  movslq 0xb0(%rsp),%rdx
  movslq %r9d,%r9
  xor    %r14d,%r14d
  movl   $0x0,0x4(%rsp)
  lea    0x0(,%r9,8),%rdi
  movl   $0x0,0x14(%rsp)
  lea    0x0(,%rdx,8),%rbx
  lea    0x0(%r13,%rdi,1),%r8
  mov    %rdi,0x50(%rsp)
  movslq 0xb8(%rsp),%rdx
  lea    0x0(%r13,%rbx,1),%r15
  mov    %rbx,0x58(%rsp)
  lea    0x0(,%rdx,8),%rcx
  lea    (%rsi,%rdi,1),%rdx
  add    %rax,%rdi
  mov    %rdx,0x18(%rsp)
  mov    %rbx,%rdx
  add    %rcx,%r13
  lea    (%rsi,%rbx,1),%rbx
  mov    %rdi,0x30(%rsp)
  lea    (%rax,%rdx,1),%rdi
  add    %rcx,%rax
  add    %rcx,%rsi
  mov    %rax,0x40(%rsp)
  mov    %r13,%rax
  mov    %r8,%r13
  mov    %rbx,0x20(%rsp)
  mov    %rax,%r8
  mov    $0x1,%ebx
  mov    %rcx,0x60(%rsp)
  mov    %rsi,0x28(%rsp)
  mov    %rdi,0x38(%rsp)
  jmp    L19
  nopw   0x0(%rax,%rax,1)
L112:
  cmp    %ebx,0xd0(%rsp)
  setg   %dl
  cmp    0xd8(%rsp),%r14d
  setle  %al
  add    $0x1,%rbx
  test   %al,%dl
  je     L69
L19:
  mov    0x0(%r13),%rdx
  mov    (%r15),%rax
  mov    %ebx,(%rsp)
  mov    (%rax,%rbx,4),%eax
  add    (%rdx,%rbx,4),%eax
  mov    (%r8),%rdx
  add    (%rdx,%rbx,4),%eax
  cmp    %r12d,%eax
  jl     L112
  mov    0x28(%rsp),%rax
  mov    %r8,0x8(%rsp)
  mov    (%rax),%rax
  mov    (%rax,%rbx,4),%edx
  mov    0x20(%rsp),%rax
  mov    (%rax),%rax
  mov    (%rax,%rbx,4),%esi
  mov    0x18(%rsp),%rax
  mov    (%rax),%rax
  mov    (%rax,%rbx,4),%edi
  call   <min3@plt>
  mov    %eax,%ebp
  mov    0x40(%rsp),%rax
  mov    (%rax),%rax
  mov    (%rax,%rbx,4),%edx
  mov    0x38(%rsp),%rax
  mov    (%rax),%rax
  mov    (%rax,%rbx,4),%esi
  mov    0x30(%rsp),%rax
  mov    (%rax),%rax
  mov    (%rax,%rbx,4),%edi
  call   <max3@plt>
  cmpl   $0x1,0xe8(%rsp)
  mov    0x8(%rsp),%r8
  mov    %eax,%edx
  je     L65
  cmp    %eax,%ebp
  jg     L112
  mov    0x48(%rsp),%rax
  mov    0x50(%rsp),%rdi
  mov    (%rax,%rdi,1),%r11
  mov    0x58(%rsp),%rdi
  mov    (%rax,%rdi,1),%r10
  mov    0x60(%rsp),%rdi
  mov    (%rax,%rdi,1),%r9
  mov    0x4(%rsp),%eax
  jmp    L30
  nopw   0x0(%rax,%rax,1)
L72:
  add    0xc8(%rsp),%ebp
  add    $0x1,%eax
  cmp    %edx,%ebp
  jg     L172
L30:
  movslq %ebp,%rsi
  mov    (%r11,%rsi,8),%rcx
  movsbl (%rcx,%rbx,1),%edi
  mov    (%r10,%rsi,8),%rcx
  mov    (%r9,%rsi,8),%rsi
  movsbl (%rcx,%rbx,1),%ecx
  movsbl (%rsi,%rbx,1),%esi
  add    %edi,%ecx
  add    %esi,%ecx
  cmp    %ecx,%r12d
  jle    L72
  add    $0x1,%ebp
  cmp    %edx,%ebp
  jle    L30
L172:
  cmp    0x4(%rsp),%eax
  jle    L91
  mov    %eax,0x4(%rsp)
  add    $0x1,%r14d
  jmp    L112
  nopl   0x0(%rax)
L91:
  mov    %eax,0x4(%rsp)
  jmp    L112
L28:
  movl   $0x0,0x4(%rsp)
  xor    %r14d,%r14d
  movl   $0x0,0x14(%rsp)
L69:
  mov    0xf0(%rsp),%rax
  mov    0x4(%rsp),%edi
  mov    0x14(%rsp),%edx
  mov    %edi,(%rax)
  mov    %r14d,0x4(%rax)
  mov    %edx,0x8(%rax)
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L65:
  cmp    %eax,%ebp
  jg     L112
  mov    0x48(%rsp),%rax
  mov    0x50(%rsp),%rdi
  mov    (%rax,%rdi,1),%r11
  mov    0x58(%rsp),%rdi
  mov    (%rax,%rdi,1),%r10
  mov    0x60(%rsp),%rdi
  mov    (%rax,%rdi,1),%r9
  mov    0x4(%rsp),%eax
  jmp    L57
  xchg   %ax,%ax
L95:
  add    $0x1,%eax
  cmp    0x10(%rsp),%eax
  jle    L75
  addl   $0x1,0x14(%rsp)
L125:
  add    0xc8(%rsp),%ebp
L102:
  cmp    %edx,%ebp
  jg     L172
L57:
  movslq %ebp,%rsi
  mov    (%r11,%rsi,8),%rcx
  movsbl (%rcx,%rbx,1),%edi
  mov    (%r10,%rsi,8),%rcx
  mov    (%r9,%rsi,8),%rsi
  movsbl (%rcx,%rbx,1),%ecx
  movsbl (%rsi,%rbx,1),%esi
  add    %edi,%ecx
  add    %esi,%ecx
  cmp    %ecx,%r12d
  jle    L95
  add    $0x1,%ebp
  jmp    L102
  cs nopw 0x0(%rax,%rax,1)
L75:
  mov    0x68(%rsp),%rdi
  movslq %eax,%rsi
  mov    (%rdi,%rsi,8),%rsi
  mov    (%rsp),%edi
  mov    %ebp,0x8(%rsi)
  mov    %edi,0x4(%rsi)
  mov    %ecx,0xc(%rsi)
  jmp    L125
```

assistant: ```c
void crm_faster_3motifs_allt(char ***motif_counts, int **init_bin_boundary, int **finit_bin_boundary, int **crm_positions, int max_crm_positions, int m1, int m2, int m3, int N, int window_bins, int n_transcripts, int max_n_transcripts, int **occurrences_per_transcript, int report_all, int *crm_output) {
  int errorcode = 0;
  int transcript;
  int n_tr = 0;
  int n_crm_init;
  int bin_init1, bin_init2, bin_init3, bin_init;
  int bin_finit1, bin_finit2, bin_finit3, bin_finit;
  int bin;
  int n_crm = 0;
  int n1, n2, n3;
  int n_cooc;
  int total_n1, total_n2, total_n3;
  int function_verbose = 0;
  struct timeb ti, tf;
  long tdif;
  if (function_verbose == 1)
    ftime(&ti);
  if (max_n_transcripts < 0)
    max_n_transcripts = n_transcripts;
  transcript = 0;
  while ((transcript < n_transcripts) & (n_tr <= max_n_transcripts)) {
    transcript++;
    total_n1 = occurrences_per_transcript[m1][transcript];
    total_n2 = occurrences_per_transcript[m2][transcript];
    total_n3 = occurrences_per_transcript[m3][transcript];
    if ((total_n1 + total_n2 + total_n3) >= N) {
      bin_init1 = init_bin_boundary[m1][transcript];
      bin_init2 = init_bin_boundary[m2][transcript];
      bin_init3 = init_bin_boundary[m3][transcript];
      bin_init = min3(bin_init1, bin_init2, bin_init3);
      bin_finit1 = finit_bin_boundary[m1][transcript];
      bin_finit2 = finit_bin_boundary[m2][transcript];
      bin_finit3 = finit_bin_boundary[m3][transcript];
      bin_finit = max3(bin_finit1, bin_finit2, bin_finit3);
      bin = bin_init;
      n_crm_init = n_crm;
      if (report_all == 1) {
        while (bin <= bin_finit) {
          n_cooc = motif_counts[m1][bin][transcript] + motif_counts[m2][bin][transcript] + motif_counts[m3][bin][transcript];
          if (n_cooc >= N) {
            n_crm++;
            if (n_crm > max_crm_positions) {
              errorcode++;
            } else {
              crm_positions[n_crm][1] = transcript;
              crm_positions[n_crm][2] = bin;
              crm_positions[n_crm][3] = n_cooc;
            }
            bin += window_bins;
          } else {
            bin++;
          }
        }
      } else {
        while (bin <= bin_finit) {
          n_cooc = motif_counts[m1][bin][transcript] + motif_counts[m2][bin][transcript] + motif_counts[m3][bin][transcript];
          if (n_cooc >= N) {
            n_crm++;
            bin += window_bins;
          } else {
            bin++;
          }
        }
      }
      if (n_crm > n_crm_init)
        n_tr++;
    }
  }
  crm_output[0] = n_crm;
  crm_output[1] = n_tr;
  crm_output[2] = errorcode;
  if (function_verbose == 1) {
    ftime(&tf);
    tdif = time_difference(ti, tf);
    printf("crm_faster_3motifs_allt\t%ld msec cpu time\n", tdif);
  }
}
```