user: 请从给定的汇编指令推导出C源代码：

```asm
<assign_Mu_by_class>:
  endbr64
  push   %rbp
  movslq %ecx,%rcx
  movslq %edx,%rax
  mov    %rsp,%rbp
  push   %r15
  mov    %rcx,%r15
  push   %r14
  push   %r13
  push   %r12
  mov    %esi,%r12d
  push   %rbx
  sub    $0x68,%rsp
  mov    %edi,-0x5c(%rbp)
  mov    0x18(%rbp),%rdi
  mov    %r9,-0x88(%rbp)
  mov    0x10(%rbp),%r9
  mov    %rdi,-0x68(%rbp)
  lea    0x0(,%rcx,4),%rdi
  mov    %r8d,-0x60(%rbp)
  mov    %fs:0x28,%rdx
  mov    %rdx,-0x38(%rbp)
  xor    %edx,%edx
  movslq %esi,%rdx
  mov    %rsp,%rsi
  mov    %rdi,-0x58(%rbp)
  imul   %rcx,%rdx
  lea    0xf(,%rdx,4),%rcx
  mov    %rcx,%rdx
  and    $0xfffffffffffff000,%rcx
  sub    %rcx,%rsi
  and    $0xfffffffffffffff0,%rdx
  cmp    %rsi,%rsp
  je     L135
L23:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L23
L135:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L199
L179:
  mov    -0x58(%rbp),%rdi
  mov    %rsp,%rsi
  mov    %rsp,%rbx
  lea    0xf(%rdi),%rcx
  mov    %rcx,%rdx
  and    $0xfffffffffffff000,%rcx
  sub    %rcx,%rsi
  and    $0xfffffffffffffff0,%rdx
  cmp    %rsi,%rsp
  je     L0
L156:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L156
L0:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L79
L4:
  mov    %rsp,%rdi
  test   %eax,%eax
  jle    L10
  shl    $0x2,%rax
  lea    -0x1(%r15),%r14d
  mov    -0x68(%rbp),%rsi
  mov    -0x58(%rbp),%r13
  mov    %rax,-0x70(%rbp)
  lea    0x4(,%r14,4),%rax
  xor    %r8d,%r8d
  mov    %rax,-0x80(%rbp)
  lea    -0x1(%r12),%eax
  shr    $0x2,%r13
  lea    0x8(%rsi,%rax,8),%rax
  mov    %rax,-0x78(%rbp)
  movslq -0x5c(%rbp),%rax
  mov    %rax,-0x90(%rbp)
  mov    %r15d,%eax
  mov    %r8,%r15
  mov    %eax,%r8d
  nopl   0x0(%rax)
L56:
  test   %r8d,%r8d
  jle    L123
  mov    -0x80(%rbp),%rdx
  xor    %esi,%esi
  mov    %r9,-0x50(%rbp)
  mov    %r8d,-0x48(%rbp)
  call   <memset@plt>
  mov    -0x48(%rbp),%r8d
  mov    -0x50(%rbp),%r9
  xor    %esi,%esi
  mov    %rax,%rdi
  nopl   (%rax)
L89:
  xor    %edx,%edx
  movslq %esi,%rcx
  test   %r12d,%r12d
  jle    L54
  nopw   0x0(%rax,%rax,1)
L201:
  movslq %edx,%rax
  add    $0x1,%edx
  imul   %r13,%rax
  add    %rcx,%rax
  movl   $0x0,(%rbx,%rax,4)
  cmp    %edx,%r12d
  jne    L201
L54:
  add    $0x1,%esi
  cmp    %esi,%r8d
  jne    L89
L123:
  mov    -0x5c(%rbp),%eax
  xor    %edx,%edx
  test   %eax,%eax
  jle    L208
  mov    -0x60(%rbp),%ecx
  mov    -0x88(%rbp),%r10
  mov    -0x90(%rbp),%rsi
  nopl   0x0(%rax,%rax,1)
L17:
  mov    (%r9,%rdx,8),%rax
  movslq (%rax,%r15,1),%rax
  cmp    %ecx,%eax
  je     L69
  cmp    $0xffffffff,%eax
  je     L69
  movslq (%r10,%rdx,4),%r11
  addl   $0x1,(%rdi,%rax,4)
  imul   %r13,%r11
  add    %r11,%rax
  addl   $0x1,(%rbx,%rax,4)
L69:
  add    $0x1,%rdx
  cmp    %rsi,%rdx
  jne    L17
L208:
  mov    -0x68(%rbp),%rsi
  mov    %rbx,%rcx
  test   %r12d,%r12d
  jle    L3
  mov    %r13,-0x48(%rbp)
  mov    -0x58(%rbp),%r13
  mov    %r9,-0x50(%rbp)
  mov    -0x78(%rbp),%r9
  nopl   0x0(%rax)
L218:
  xor    %eax,%eax
  mov    $0xffffffff,%edx
  test   %r8d,%r8d
  jg     L144
  jmp    L268
  xchg   %ax,%ax
L154:
  mov    (%rsi),%rdx
  mov    %eax,(%rdx,%r15,1)
  mov    %r10d,%edx
L149:
  lea    0x1(%rax),%r10
  cmp    %r14,%rax
  je     L268
L112:
  mov    %r10,%rax
L144:
  mov    (%rcx,%rax,4),%r10d
  cmp    %edx,%r10d
  jg     L154
  jne    L149
  mov    (%rsi),%r10
  add    %r15,%r10
  movslq (%r10),%r11
  mov    (%rdi,%r11,4),%r11d
  cmp    %r11d,(%rdi,%rax,4)
  jle    L149
  mov    %eax,(%r10)
  lea    0x1(%rax),%r10
  cmp    %r14,%rax
  jne    L112
L268:
  add    $0x8,%rsi
  add    %r13,%rcx
  cmp    %r9,%rsi
  jne    L218
  mov    -0x48(%rbp),%r13
  mov    -0x50(%rbp),%r9
L3:
  add    $0x4,%r15
  cmp    -0x70(%rbp),%r15
  jne    L56
L10:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L93
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L199:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L179
L79:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L4
L93:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void assign_Mu_by_class(int N_X_org, int K, int L, int ncode, int gap_index, int *class_id, int **X_org, int **Mu) {
  int i, n_X_org, k, l;
  int count_K_N[K][ncode], count_N[ncode], tmp_count;
  for (l = 0; l < L; l++) {
    for (i = 0; i < ncode; i++) {
      count_N[i] = 0;
      for (k = 0; k < K; k++) {
        count_K_N[k][i] = 0;
      }
    }
    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_N[X_org[n_X_org][l]]++;
      count_K_N[class_id[n_X_org]][X_org[n_X_org][l]]++;
    }
    for (k = 0; k < K; k++) {
      tmp_count = -1;
      for (i = 0; i < ncode; i++) {
        if (count_K_N[k][i] > tmp_count) {
          tmp_count = count_K_N[k][i];
          Mu[k][l] = i;
        } else if (count_K_N[k][i] == tmp_count && count_N[i] > count_N[Mu[k][l]]) {
          Mu[k][l] = i;
        }
      }
    }
  }
}
```