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

```asm
<make_decode_table>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  mov    %edi,-0x3c(%rbp)
  mov    %esi,-0x40(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %rcx,-0x50(%rbp)
  movl   $0x0,-0x34(%rbp)
  mov    -0x40(%rbp),%eax
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x2c(%rbp),%eax
  shr    %eax
  mov    %eax,-0x30(%rbp)
  mov    $0x1,%r15d
  jmp    L38
L235:
  mov    $0x0,%r12d
  jmp    L11
L240:
  movzwl %r12w,%edx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    %al,%r15b
  jne    L230
  movzwl %r12w,%edx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%ebx
  mov    -0x40(%rbp),%eax
  sub    %ebx,%eax
  mov    -0x34(%rbp),%edx
  mov    %eax,%ecx
  shr    %cl,%edx
  mov    %edx,%r14d
  mov    $0x0,%r13d
L31:
  add    %r13d,%r13d
  mov    %r14d,%eax
  and    $0x1,%eax
  or     %eax,%r13d
  shr    %r14d
  sub    $0x1,%ebx
  test   %ebx,%ebx
  jne    L31
  mov    -0x30(%rbp),%eax
  add    %eax,-0x34(%rbp)
  mov    -0x34(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jbe    L182
  mov    $0x1,%eax
  jmp    L188
L182:
  mov    -0x30(%rbp),%ebx
  movzbl %r15b,%eax
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  mov    %eax,%edi
L34:
  mov    %r13d,%eax
  lea    (%rax,%rax,1),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    %r12w,(%rax)
  mov    %edi,%eax
  movzwl %ax,%eax
  add    %eax,%r13d
  sub    $0x1,%ebx
  test   %ebx,%ebx
  jne    L34
  jmp    L22
L230:
  nop
L22:
  mov    %r12d,%eax
  lea    0x1(%rax),%r12d
L11:
  movzwl %r12w,%eax
  cmp    %eax,-0x3c(%rbp)
  ja     L240
  shrl   -0x30(%rbp)
  mov    %r15d,%eax
  lea    0x1(%rax),%r15d
L38:
  movzbl %r15b,%eax
  cmp    %eax,-0x40(%rbp)
  jae    L235
  mov    -0x34(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jne    L206
  mov    $0x0,%eax
  jmp    L188
L206:
  mov    -0x34(%rbp),%eax
  mov    %eax,%r12d
  jmp    L196
L160:
  movzwl %r12w,%r14d
  mov    $0x0,%r13d
  mov    -0x40(%rbp),%ebx
L59:
  add    %r13d,%r13d
  mov    %r14d,%eax
  and    $0x1,%eax
  or     %eax,%r13d
  shr    %r14d
  sub    $0x1,%ebx
  test   %ebx,%ebx
  jne    L59
  mov    %r13d,%eax
  lea    (%rax,%rax,1),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movw   $0xffff,(%rax)
  mov    %r12d,%eax
  lea    0x1(%rax),%r12d
L196:
  movzwl %r12w,%eax
  cmp    %eax,-0x2c(%rbp)
  ja     L160
  mov    -0x2c(%rbp),%eax
  shr    %eax
  mov    %eax,%edx
  mov    -0x3c(%rbp),%eax
  cmp    %eax,%edx
  cmovae %edx,%eax
  mov    %eax,%edi
  shll   $0x10,-0x34(%rbp)
  shll   $0x10,-0x2c(%rbp)
  movl   $0x8000,-0x30(%rbp)
  mov    -0x40(%rbp),%eax
  lea    0x1(%rax),%r15d
  jmp    L191
L60:
  mov    $0x0,%r12d
  jmp    L93
L246:
  movzwl %r12w,%edx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    %al,%r15b
  jne    L25
  mov    -0x34(%rbp),%eax
  shr    $0x10,%eax
  mov    %eax,%r14d
  mov    $0x0,%r13d
  mov    -0x40(%rbp),%ebx
L10:
  add    %r13d,%r13d
  mov    %r14d,%eax
  and    $0x1,%eax
  or     %eax,%r13d
  shr    %r14d
  sub    $0x1,%ebx
  test   %ebx,%ebx
  jne    L10
  mov    $0x0,%ebx
  jmp    L258
L150:
  mov    %r13d,%eax
  lea    (%rax,%rax,1),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movzwl (%rax),%eax
  cmp    $0xffff,%ax
  jne    L3
  movzwl %di,%eax
  add    %eax,%eax
  cltq
  lea    (%rax,%rax,1),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movw   $0xffff,(%rax)
  movzwl %di,%eax
  add    %eax,%eax
  cltq
  add    $0x1,%rax
  lea    (%rax,%rax,1),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movw   $0xffff,(%rax)
  mov    %edi,%eax
  lea    0x1(%rax),%esi
  mov    %esi,%edi
  mov    %r13d,%edx
  lea    (%rdx,%rdx,1),%rcx
  mov    -0x50(%rbp),%rdx
  add    %rcx,%rdx
  mov    %ax,(%rdx)
L3:
  mov    %r13d,%eax
  lea    (%rax,%rax,1),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movzwl (%rax),%eax
  movzwl %ax,%eax
  add    %eax,%eax
  mov    %eax,%esi
  mov    $0xf,%eax
  sub    %ebx,%eax
  mov    -0x34(%rbp),%edx
  mov    %eax,%ecx
  shr    %cl,%edx
  mov    %edx,%eax
  and    $0x1,%eax
  or     %eax,%esi
  mov    %esi,%r13d
  add    $0x1,%ebx
L258:
  movzbl %r15b,%eax
  sub    -0x40(%rbp),%eax
  cmp    %eax,%ebx
  jb     L150
  mov    %r13d,%eax
  lea    (%rax,%rax,1),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    %r12w,(%rax)
  mov    -0x30(%rbp),%eax
  add    %eax,-0x34(%rbp)
  mov    -0x34(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jbe    L114
  mov    $0x1,%eax
  jmp    L188
L25:
  nop
L114:
  mov    %r12d,%eax
  lea    0x1(%rax),%r12d
L93:
  movzwl %r12w,%eax
  cmp    %eax,-0x3c(%rbp)
  ja     L246
  shrl   -0x30(%rbp)
  mov    %r15d,%eax
  lea    0x1(%rax),%r15d
L191:
  cmp    $0x10,%r15b
  jbe    L60
  mov    -0x34(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  setne  %al
  movzbl %al,%eax
L188:
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

assistant: ```c
int make_decode_table(unsigned int nsyms, unsigned int nbits, unsigned char *length, unsigned short *table) {
  register unsigned int leaf, reverse, fill;
  register unsigned short sym, next_sym;
  register unsigned char bit_num;
  unsigned int pos = 0;
  unsigned int table_mask = 1 << nbits;
  unsigned int bit_mask = table_mask >> 1;
  for (bit_num = 1; bit_num <= nbits; bit_num++) {
    for (sym = 0; sym < nsyms; sym++) {
      if (length[sym] != bit_num)
        continue;
      fill = length[sym];
      reverse = pos >> (nbits - fill);
      leaf = 0;
      do {
        leaf <<= 1;
        leaf |= reverse & 1;
        reverse >>= 1;
      } while (--fill);
      if ((pos += bit_mask) > table_mask)
        return 1;
      fill = bit_mask;
      next_sym = 1 << bit_num;
      do {
        table[leaf] = sym;
        leaf += next_sym;
      } while (--fill);
    }
    bit_mask >>= 1;
  }
  if (pos == table_mask)
    return 0;
  for (sym = pos; sym < table_mask; sym++) {
    reverse = sym;
    leaf = 0;
    fill = nbits;
    do {
      leaf <<= 1;
      leaf |= reverse & 1;
      reverse >>= 1;
    } while (--fill);
    table[leaf] = 0xFFFF;
  }
  next_sym = ((table_mask >> 1) < nsyms) ? nsyms : (table_mask >> 1);
  pos <<= 16;
  table_mask <<= 16;
  bit_mask = 1 << 15;
  for (bit_num = nbits + 1; bit_num <= (16); bit_num++) {
    for (sym = 0; sym < nsyms; sym++) {
      if (length[sym] != bit_num)
        continue;
      reverse = pos >> 16;
      leaf = 0;
      fill = nbits;
      do {
        leaf <<= 1;
        leaf |= reverse & 1;
        reverse >>= 1;
      } while (--fill);
      for (fill = 0; fill < (bit_num - nbits); fill++) {
        if (table[leaf] == 0xFFFF) {
          table[(next_sym << 1)] = 0xFFFF;
          table[(next_sym << 1) + 1] = 0xFFFF;
          table[leaf] = next_sym++;
        }
        leaf = (table[leaf] << 1) | ((pos >> (15 - fill)) & 1);
      }
      table[leaf] = sym;
      if ((pos += bit_mask) > table_mask)
        return 1;
    }
    bit_mask >>= 1;
  }
  return (pos != table_mask) ? 1 : 0;
}
```