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

```asm
<find_consensus_Mu>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x38,%rsp
  mov    %edi,%r10d
  mov    %edx,%r15d
  mov    %ecx,%r13d
  mov    %r9,-0x50(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rax
  mov    %rax,-0x48(%rbp)
  movslq %esi,%rax
  imul   %rdx,%rax
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rcx
  and    $0xfffffffffffffff0,%rcx
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rdx
  sub    %rax,%rdx
L134:
  cmp    %rdx,%rsp
  je     L345
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L134
L345:
  mov    %rcx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L108
  orq    $0x0,-0x8(%rsp,%rax,1)
L108:
  mov    %rsp,%r11
  mov    -0x48(%rbp),%rax
  add    $0xf,%rax
  mov    %rax,%rdx
  and    $0xfffffffffffffff0,%rdx
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rcx
  sub    %rax,%rcx
L305:
  cmp    %rcx,%rsp
  je     L28
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L305
L28:
  mov    %rdx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L15
  orq    $0x0,-0x8(%rsp,%rax,1)
L15:
  lea    0x3(%rsp),%rax
  mov    %rax,%rbx
  shr    $0x2,%rbx
  mov    %rbx,-0x60(%rbp)
  and    $0xfffffffffffffffc,%rax
  test   %r15d,%r15d
  jle    L81
  mov    -0x48(%rbp),%r9
  shr    $0x2,%r9
  mov    %r15d,%r12d
  mov    $0x0,%ebx
L323:
  movl   $0x0,(%rax,%rbx,4)
  test   %esi,%esi
  jle    L75
  mov    $0x0,%ecx
  movslq %ebx,%rdi
L286:
  movslq %ecx,%rdx
  imul   %r9,%rdx
  add    %rdi,%rdx
  movl   $0x0,(%r11,%rdx,4)
  add    $0x1,%ecx
  cmp    %ecx,%esi
  jne    L286
L75:
  add    $0x1,%rbx
  cmp    %r12,%rbx
  jne    L323
L81:
  test   %esi,%esi
  jle    L160
  mov    -0x48(%rbp),%rdi
  shr    $0x2,%rdi
  mov    %esi,%ebx
  lea    -0x1(%r10),%edx
  lea    0x8(%r8,%rdx,8),%r12
  mov    $0x0,%r14d
  mov    %esi,-0x54(%rbp)
  mov    %r15d,-0x58(%rbp)
  mov    %rdi,%r15
  jmp    L23
L179:
  movslq %edx,%rdx
  lea    (%rdx,%rdi,1),%rsi
  addl   $0x1,(%r11,%rsi,4)
  addl   $0x1,(%rax,%rdx,4)
L383:
  add    $0x8,%rcx
  cmp    %r12,%rcx
  je     L84
L3:
  mov    (%rcx),%rdx
  mov    (%rdx,%r9,1),%edx
  cmp    $0xffffffff,%edx
  je     L383
  cmp    %r13d,%edx
  jne    L179
  jmp    L383
L84:
  add    $0x1,%r14
  cmp    %rbx,%r14
  je     L251
L23:
  lea    0x0(,%r14,4),%r9
  mov    %r8,%rcx
  test   %r10d,%r10d
  jle    L84
  movslq %r14d,%rdi
  imul   %r15,%rdi
  jmp    L3
L251:
  mov    -0x54(%rbp),%esi
  mov    -0x58(%rbp),%r15d
  mov    -0x60(%rbp),%rbx
  mov    0x0(,%rbx,4),%edi
  cmp    $0x1,%r15d
  jle    L409
L151:
  mov    $0x1,%edx
  mov    $0x0,%ebx
  jmp    L408
L17:
  add    $0x1,%rdx
  cmp    %edx,%r15d
  jle    L337
L408:
  mov    (%rax,%rdx,4),%ecx
  cmp    %edi,%ecx
  jle    L17
  mov    %ecx,%edi
  mov    %edx,%ebx
  jmp    L17
L337:
  test   %esi,%esi
  jle    L377
L94:
  mov    -0x50(%rbp),%r14
  mov    %r14,%rdi
  lea    -0x1(%r15),%r10d
  mov    %r11,%r9
  lea    0x4(%r11,%r10,4),%rcx
  lea    -0x1(%rsi),%edx
  lea    0x4(%r14,%rdx,4),%r13
  mov    %r10,%r12
  not    %r12
  shl    $0x2,%r12
  mov    $0xffffffff,%r14d
  jmp    L6
L409:
  mov    $0x0,%ebx
  jmp    L94
L106:
  mov    $0x0,%edx
  mov    %r14d,%r8d
  jmp    L243
L168:
  je     L231
L237:
  lea    0x1(%rdx),%rsi
  cmp    %r10,%rdx
  je     L331
  mov    %rsi,%rdx
L243:
  mov    (%r9,%rdx,4),%esi
  cmp    %r8d,%esi
  jle    L168
  mov    %edx,(%rdi)
  mov    %esi,%r8d
  jmp    L237
L231:
  movslq (%rdi),%rsi
  mov    (%rax,%rsi,4),%esi
  cmp    %esi,(%rax,%rdx,4)
  jle    L237
  mov    %edx,(%rdi)
  jmp    L237
L308:
  mov    %ebx,(%rdi)
L331:
  add    $0x4,%rdi
  mov    -0x48(%rbp),%rsi
  add    %rsi,%rcx
  add    %rsi,%r9
  cmp    %r13,%rdi
  je     L377
L6:
  lea    (%r12,%rcx,1),%rdx
  test   %r15d,%r15d
  jle    L308
L239:
  cmpl   $0x0,(%rdx)
  jg     L106
  add    $0x4,%rdx
  cmp    %rcx,%rdx
  jne    L239
  jmp    L308
L160:
  mov    -0x60(%rbp),%rbx
  mov    0x0(,%rbx,4),%edi
  cmp    $0x1,%r15d
  jg     L151
L377:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L176
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L176:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void find_consensus_Mu(int N_X_org, int L, int ncode, int gap_index, int **X_org, int *consensus_Mu) {
  int i, n_X_org, l, flag, max_i;
  int count_L_N[L][ncode], count_N[ncode], tmp_count;
  for (i = 0; i < ncode; i++) {
    count_N[i] = 0;
    for (l = 0; l < L; l++) {
      count_L_N[l][i] = 0;
    }
  }
  for (l = 0; l < L; l++) {
    for (n_X_org = 0; n_X_org < N_X_org; n_X_org++) {
      if (X_org[n_X_org][l] == gap_index || X_org[n_X_org][l] == -1) {
        continue;
      }
      count_L_N[l][X_org[n_X_org][l]]++;
      count_N[X_org[n_X_org][l]]++;
    }
  }
  max_i = 0;
  tmp_count = count_N[0];
  for (i = 1; i < ncode; i++) {
    if (count_N[i] > tmp_count) {
      max_i = i;
      tmp_count = count_N[i];
    }
  }
  for (l = 0; l < L; l++) {
    flag = 0;
    for (i = 0; i < ncode; i++) {
      if (count_L_N[l][i] > 0) {
        flag = 1;
        break;
      }
    }
    if (flag) {
      tmp_count = -1;
      for (i = 0; i < ncode; i++) {
        if (count_L_N[l][i] > tmp_count) {
          tmp_count = count_L_N[l][i];
          consensus_Mu[l] = i;
        } else if (count_L_N[l][i] == tmp_count && count_N[i] > count_N[consensus_Mu[l]]) {
          consensus_Mu[l] = i;
        }
      }
    } else {
      consensus_Mu[l] = max_i;
    }
  }
}
```