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

```asm
<hbCreateDecodeTables>:
  endbr64
  push   %r13
  mov    %rsi,%r11
  mov    %rdi,%r10
  mov    %rcx,%rsi
  push   %r12
  push   %rbp
  push   %rbx
  movslq %r8d,%rbx
  mov    0x28(%rsp),%r12d
  cmp    %r9d,%ebx
  jg     L111
  test   %r12d,%r12d
  jle    L188
  mov    %rdx,%rbp
  lea    0x1(%r9),%r13d
  mov    %ebx,%ecx
  xor    %edi,%edi
  movslq %r12d,%r8
  nopl   0x0(%rax,%rax,1)
L129:
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L68:
  movzbl (%rsi,%rax,1),%edx
  cmp    %ecx,%edx
  jne    L51
  movslq %edi,%rdx
  add    $0x1,%edi
  mov    %eax,0x0(%rbp,%rdx,4)
L51:
  add    $0x1,%rax
  cmp    %r8,%rax
  jne    L68
  add    $0x1,%ecx
  cmp    %ecx,%r13d
  jne    L129
  lea    0x8(%r11),%rdi
  mov    %r11,%rcx
  xor    %eax,%eax
  movq   $0x0,(%r11)
  and    $0xfffffffffffffff8,%rdi
  movq   $0x0,0x54(%r11)
  sub    %rdi,%rcx
  add    $0x5c,%ecx
  shr    $0x3,%ecx
  rep stos %rax,%es:(%rdi)
L0:
  lea    -0x1(%r12),%eax
  lea    0x1(%rsi,%rax,1),%rdx
  nopl   (%rax)
L175:
  movzbl (%rsi),%eax
  add    $0x1,%rsi
  addl   $0x1,0x4(%r11,%rax,4)
  cmp    %rdx,%rsi
  jne    L175
L170:
  mov    (%r11),%edx
  lea    0x4(%r11),%rax
  lea    0x5c(%r11),%rcx
  nopl   (%rax)
L200:
  add    (%rax),%edx
  add    $0x4,%rax
  mov    %edx,-0x4(%rax)
  cmp    %rcx,%rax
  jne    L200
  lea    0x8(%r10),%rdi
  mov    %r10,%rcx
  xor    %eax,%eax
  movq   $0x0,(%r10)
  and    $0xfffffffffffffff8,%rdi
  movq   $0x0,0x54(%r10)
  sub    %rdi,%rcx
  add    $0x5c,%ecx
  shr    $0x3,%ecx
  rep stos %rax,%es:(%rdi)
  cmp    %r9d,%ebx
  jg     L122
  movslq %ebx,%rdx
  xchg   %ax,%ax
L61:
  add    0x4(%r11,%rdx,4),%eax
  sub    (%r11,%rdx,4),%eax
  lea    -0x1(%rax),%ecx
  add    %eax,%eax
  mov    %ecx,(%r10,%rdx,4)
  add    $0x1,%rdx
  cmp    %edx,%r9d
  jge    L61
L122:
  lea    0x1(%rbx),%edx
  cmp    %edx,%r9d
  jl     L72
  mov    %r11,%rax
  mov    %r9d,%esi
  sub    %r10,%rax
  sub    %ebx,%esi
  cmp    $0x8,%rax
  jbe    L196
  cmp    $0x1,%esi
  je     L196
  lea    -0x1(%rsi),%eax
  cmp    $0x2,%eax
  jbe    L50
  mov    %esi,%edi
  lea    0x0(,%rbx,4),%rax
  movdqa D0(%rip),%xmm1
  shr    $0x2,%edi
  lea    (%r10,%rax,1),%r8
  lea    0x4(%r11,%rax,1),%rcx
  xor    %eax,%eax
  shl    $0x4,%rdi
  nopl   (%rax)
L24:
  movdqu (%r8,%rax,1),%xmm0
  movdqu (%rcx,%rax,1),%xmm2
  paddd  %xmm1,%xmm0
  pslld  $0x1,%xmm0
  psubd  %xmm2,%xmm0
  movups %xmm0,(%rcx,%rax,1)
  add    $0x10,%rax
  cmp    %rax,%rdi
  jne    L24
  mov    %esi,%eax
  and    $0xfffffffc,%eax
  add    %eax,%edx
  cmp    %eax,%esi
  je     L72
  sub    %eax,%esi
  cmp    $0x1,%esi
  je     L29
L123:
  movq   D0(%rip),%xmm1
  add    %rbx,%rax
  movq   (%r10,%rax,4),%xmm0
  lea    0x4(%r11,%rax,4),%rcx
  mov    %esi,%eax
  and    $0xfffffffe,%eax
  paddd  %xmm1,%xmm0
  movq   (%rcx),%xmm1
  add    %eax,%edx
  pslld  $0x1,%xmm0
  psubd  %xmm1,%xmm0
  movq   %xmm0,(%rcx)
  cmp    %esi,%eax
  je     L72
L29:
  movslq %edx,%rax
  shl    $0x2,%rax
  add    %rax,%r11
  mov    -0x4(%r10,%rax,1),%eax
  lea    0x2(%rax,%rax,1),%eax
  sub    (%r11),%eax
  mov    %eax,(%r11)
L72:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L196:
  movslq %edx,%rax
  nopl   0x0(%rax,%rax,1)
L8:
  mov    -0x4(%r10,%rax,4),%edx
  lea    0x2(%rdx,%rdx,1),%edx
  sub    (%r11,%rax,4),%edx
  mov    %edx,(%r11,%rax,4)
  add    $0x1,%rax
  cmp    %eax,%r9d
  jge    L8
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L111:
  lea    0x8(%r11),%rdi
  mov    %r11,%rcx
  xor    %eax,%eax
  movq   $0x0,(%r11)
  and    $0xfffffffffffffff8,%rdi
  movq   $0x0,0x54(%r11)
  sub    %rdi,%rcx
  add    $0x5c,%ecx
  shr    $0x3,%ecx
  rep stos %rax,%es:(%rdi)
  test   %r12d,%r12d
  jg     L0
  jmp    L170
L188:
  lea    0x8(%r11),%rdi
  mov    %r11,%rcx
  xor    %eax,%eax
  movq   $0x0,(%r11)
  and    $0xfffffffffffffff8,%rdi
  movq   $0x0,0x54(%r11)
  sub    %rdi,%rcx
  add    $0x5c,%ecx
  shr    $0x3,%ecx
  rep stos %rax,%es:(%rdi)
  jmp    L170
L50:
  xor    %eax,%eax
  jmp    L123
```

tool_calls: name: unpack_data
arguments: tag: D0
data_type: byte[16]

tool: {"D0": [0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00]}

assistant: ```c
void hbCreateDecodeTables(int *limit, int *base, int *perm, unsigned char *length, int minLen, int maxLen, int alphaSize) {
  int pp, i, j, vec;
  pp = 0;
  for (i = minLen; i <= maxLen; i++)
    for (j = 0; j < alphaSize; j++)
      if (length[j] == i) {
        perm[pp] = j;
        pp++;
      };
  for (i = 0; i < 23; i++)
    base[i] = 0;
  for (i = 0; i < alphaSize; i++)
    base[length[i] + 1]++;
  for (i = 1; i < 23; i++)
    base[i] += base[i - 1];
  for (i = 0; i < 23; i++)
    limit[i] = 0;
  vec = 0;
  for (i = minLen; i <= maxLen; i++) {
    vec += (base[i + 1] - base[i]);
    limit[i] = vec - 1;
    vec <<= 1;
  }
  for (i = minLen + 1; i <= maxLen; i++)
    base[i] = ((limit[i - 1] + 1) << 1) - base[i];
}
```