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

```asm
<bytes_to_base32hex>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbp
  mov    %rsi,%r12
  mov    %rdx,%rbx
  mov    %rcx,%r13
  mov    %rcx,%rdi
  call   <base32hex_len@plt>
  add    $0x1,%eax
  cltq
  mov    $0x0,%edx
  cmp    %r12,%rax
  jne    L132
  test   %r13,%r13
  je     L143
  lea    -0x1(%r13),%rdi
  lea    0x4(%rbx),%rdx
  mov    %rbp,%rsi
  mov    $0x0,%eax
  lea    D8(%rip),%r8
  jmp    L102
  mov    -0x4(%rdx),%ecx
  sar    $0x3,%ecx
  mov    %ecx,(%rsi)
  mov    -0x4(%rdx),%ebx
  lea    0x0(,%rbx,4),%ecx
  and    $0x1c,%ecx
  mov    %ecx,0x4(%rsi)
L71:
  add    $0x1,%eax
L99:
  lea    -0x1(%rdi),%rcx
  add    $0x4,%rdx
  test   %rdi,%rdi
  je     L143
  mov    %rcx,%rdi
L102:
  cmp    $0x4,%eax
  ja     L144
  mov    %eax,%ecx
  movslq (%r8,%rcx,4),%rcx
  add    %r8,%rcx
  notrack jmp *%rcx
  mov    -0x4(%rdx),%ecx
  sar    $0x6,%ecx
  and    $0x3,%ecx
  or     %ecx,0x4(%rsi)
  mov    -0x4(%rdx),%ecx
  sar    %ecx
  and    $0x1f,%ecx
  mov    %ecx,0x8(%rsi)
  mov    -0x4(%rdx),%ecx
  shl    $0x4,%ecx
  and    $0x10,%ecx
  mov    %ecx,0xc(%rsi)
  jmp    L71
  mov    -0x4(%rdx),%ecx
  sar    $0x4,%ecx
  and    $0xf,%ecx
  or     %ecx,0xc(%rsi)
  mov    -0x4(%rdx),%ebx
  lea    (%rbx,%rbx,1),%ecx
  and    $0x1e,%ecx
  mov    %ecx,0x10(%rsi)
  jmp    L71
  mov    -0x4(%rdx),%ecx
  sar    $0x7,%ecx
  and    $0x1,%ecx
  or     %ecx,0x10(%rsi)
  mov    -0x4(%rdx),%ecx
  sar    $0x2,%ecx
  and    $0x1f,%ecx
  mov    %ecx,0x14(%rsi)
  mov    -0x4(%rdx),%ebx
  lea    0x0(,%rbx,8),%ecx
  and    $0x18,%ecx
  mov    %ecx,0x18(%rsi)
  jmp    L71
  mov    -0x4(%rdx),%eax
  sar    $0x5,%eax
  and    $0x7,%eax
  or     %eax,0x18(%rsi)
  mov    -0x4(%rdx),%eax
  and    $0x1f,%eax
  mov    %eax,0x1c(%rsi)
  jmp    L141
L144:
  add    $0x1,%eax
  cmp    $0x5,%eax
  jne    L99
L141:
  add    $0x20,%rsi
  mov    $0x0,%eax
  jmp    L99
L143:
  cmp    $0x1,%r12
  je     L34
  lea    -0x4(%rbp,%r12,4),%rsi
  mov    %rbp,%rax
  mov    $0x3f,%edi
  jmp    L109
L39:
  lea    0x57(%rdx),%ecx
  cmp    $0x20,%edx
  mov    %ecx,%edx
  cmovge %edi,%edx
L22:
  mov    %edx,(%rax)
  add    $0x4,%rax
  cmp    %rax,%rsi
  je     L34
L109:
  mov    (%rax),%edx
  cmp    $0x9,%edx
  jg     L39
  add    $0x30,%edx
  jmp    L22
L34:
  movb   $0x0,-0x1(%rbp,%r12,1)
  mov    %rbp,%rdx
L132:
  mov    %rdx,%rax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

assistant: ```c
char *bytes_to_base32hex(char dst[], size_t dstsize, const uint8_t *src, size_t srcsize) {
  const uint8_t *s = src;
  int byte = 0;
  uint8_t *d = (uint8_t *)dst;
  int i;
  if (dstsize != (base32hex_len(srcsize) + 1)) {
    return NULL;
  }
  while (srcsize) {
    switch (byte) {
    case 0:
      d[0] = *s >> 3;
      d[1] = (*s & 0x07) << 2;
      break;
    case 1:
      d[1] |= (*s >> 6) & 0x03;
      d[2] = (*s >> 1) & 0x1f;
      d[3] = (*s & 0x01) << 4;
      break;
    case 2:
      d[3] |= (*s >> 4) & 0x0f;
      d[4] = (*s & 0x0f) << 1;
      break;
    case 3:
      d[4] |= (*s >> 7) & 0x01;
      d[5] = (*s >> 2) & 0x1f;
      d[6] = (*s & 0x03) << 3;
      break;
    case 4:
      d[6] |= (*s >> 5) & 0x07;
      d[7] = *s & 0x1f;
      break;
    }
    srcsize--;
    s++;
    byte++;
    if (byte == 5) {
      d += 8;
      byte = 0;
    }
  }
  d = (uint8_t *)dst;
  dstsize--;
  for (i = 0; i < dstsize; i++) {
    if (*d < 10) {
      *d = *d + '0';
    } else if (*d < 32) {
      *d = *d - 10 + 'a';
    } else {
      *d = '?';
    }
    d++;
  }
  dst[dstsize] = '\0';
  return dst;
}
```