user: 这段汇编代码用C语言表示是什么样的：

```asm
<base32_encode>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %rcx,-0x30(%rbp)
  jmp    L73
L134:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <to_uchar@plt>
  sar    $0x3,%eax
  and    $0x1f,%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  movslq %ecx,%rdx
  lea    D16(%rip),%rcx
  movzbl (%rdx,%rcx,1),%edx
  mov    %dl,(%rax)
  subq   $0x1,-0x30(%rbp)
  cmpq   $0x0,-0x30(%rbp)
  je     L209
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <to_uchar@plt>
  lea    0x0(,%rax,4),%ebx
  subq   $0x1,-0x20(%rbp)
  cmpq   $0x0,-0x20(%rbp)
  je     L20
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <to_uchar@plt>
  sar    $0x6,%eax
  jmp    L326
L20:
  mov    $0x0,%eax
L326:
  add    %ebx,%eax
  and    $0x1f,%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  movslq %ecx,%rdx
  lea    D16(%rip),%rcx
  movzbl (%rdx,%rcx,1),%edx
  mov    %dl,(%rax)
  subq   $0x1,-0x30(%rbp)
  cmpq   $0x0,-0x30(%rbp)
  je     L139
  cmpq   $0x0,-0x20(%rbp)
  je     L96
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <to_uchar@plt>
  sar    %eax
  and    $0x1f,%eax
  cltq
  lea    D16(%rip),%rdx
  movzbl (%rax,%rdx,1),%edx
  jmp    L46
L96:
  mov    $0x3d,%edx
L46:
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rcx
  mov    %rcx,-0x28(%rbp)
  mov    %dl,(%rax)
  subq   $0x1,-0x30(%rbp)
  cmpq   $0x0,-0x30(%rbp)
  je     L195
  cmpq   $0x0,-0x20(%rbp)
  je     L358
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <to_uchar@plt>
  shl    $0x4,%eax
  mov    %eax,%ebx
  subq   $0x1,-0x20(%rbp)
  cmpq   $0x0,-0x20(%rbp)
  je     L344
  mov    -0x18(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <to_uchar@plt>
  sar    $0x4,%eax
  jmp    L123
L344:
  mov    $0x0,%eax
L123:
  add    %ebx,%eax
  and    $0x1f,%eax
  cltq
  lea    D16(%rip),%rdx
  movzbl (%rax,%rdx,1),%edx
  jmp    L266
L358:
  mov    $0x3d,%edx
L266:
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rcx
  mov    %rcx,-0x28(%rbp)
  mov    %dl,(%rax)
  subq   $0x1,-0x30(%rbp)
  cmpq   $0x0,-0x30(%rbp)
  je     L143
  cmpq   $0x0,-0x20(%rbp)
  je     L388
  mov    -0x18(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <to_uchar@plt>
  lea    (%rax,%rax,1),%ebx
  subq   $0x1,-0x20(%rbp)
  cmpq   $0x0,-0x20(%rbp)
  je     L275
  mov    -0x18(%rbp),%rax
  add    $0x3,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <to_uchar@plt>
  sar    $0x7,%eax
  jmp    L161
L275:
  mov    $0x0,%eax
L161:
  add    %ebx,%eax
  and    $0x1f,%eax
  cltq
  lea    D16(%rip),%rdx
  movzbl (%rax,%rdx,1),%edx
  jmp    L4
L388:
  mov    $0x3d,%edx
L4:
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rcx
  mov    %rcx,-0x28(%rbp)
  mov    %dl,(%rax)
  subq   $0x1,-0x30(%rbp)
  cmpq   $0x0,-0x30(%rbp)
  je     L238
  cmpq   $0x0,-0x20(%rbp)
  je     L367
  mov    -0x18(%rbp),%rax
  add    $0x3,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <to_uchar@plt>
  sar    $0x2,%eax
  and    $0x1f,%eax
  cltq
  lea    D16(%rip),%rdx
  movzbl (%rax,%rdx,1),%edx
  jmp    L391
L367:
  mov    $0x3d,%edx
L391:
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rcx
  mov    %rcx,-0x28(%rbp)
  mov    %dl,(%rax)
  subq   $0x1,-0x30(%rbp)
  cmpq   $0x0,-0x30(%rbp)
  je     L279
  cmpq   $0x0,-0x20(%rbp)
  je     L60
  mov    -0x18(%rbp),%rax
  add    $0x3,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <to_uchar@plt>
  lea    0x0(,%rax,8),%ebx
  subq   $0x1,-0x20(%rbp)
  cmpq   $0x0,-0x20(%rbp)
  je     L0
  mov    -0x18(%rbp),%rax
  add    $0x4,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <to_uchar@plt>
  sar    $0x5,%eax
  jmp    L98
L0:
  mov    $0x0,%eax
L98:
  add    %ebx,%eax
  and    $0x1f,%eax
  cltq
  lea    D16(%rip),%rdx
  movzbl (%rax,%rdx,1),%edx
  jmp    L95
L60:
  mov    $0x3d,%edx
L95:
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rcx
  mov    %rcx,-0x28(%rbp)
  mov    %dl,(%rax)
  subq   $0x1,-0x30(%rbp)
  cmpq   $0x0,-0x30(%rbp)
  je     L255
  cmpq   $0x0,-0x20(%rbp)
  je     L75
  mov    -0x18(%rbp),%rax
  add    $0x4,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <to_uchar@plt>
  and    $0x1f,%eax
  cltq
  lea    D16(%rip),%rdx
  movzbl (%rax,%rdx,1),%edx
  jmp    L54
L75:
  mov    $0x3d,%edx
L54:
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rcx
  mov    %rcx,-0x28(%rbp)
  mov    %dl,(%rax)
  subq   $0x1,-0x30(%rbp)
  cmpq   $0x0,-0x30(%rbp)
  je     L396
  cmpq   $0x0,-0x20(%rbp)
  je     L12
  subq   $0x1,-0x20(%rbp)
L12:
  cmpq   $0x0,-0x20(%rbp)
  je     L73
  addq   $0x5,-0x18(%rbp)
L73:
  cmpq   $0x0,-0x20(%rbp)
  je     L418
  cmpq   $0x0,-0x30(%rbp)
  jne    L134
  jmp    L418
L209:
  nop
  jmp    L418
L139:
  nop
  jmp    L418
L195:
  nop
  jmp    L418
L143:
  nop
  jmp    L418
L238:
  nop
  jmp    L418
L279:
  nop
  jmp    L418
L255:
  nop
  jmp    L418
L396:
  nop
L418:
  cmpq   $0x0,-0x30(%rbp)
  je     L169
  mov    -0x28(%rbp),%rax
  movb   $0x0,(%rax)
L169:
  nop
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
void base32_encode(const char *restrict in, size_t inlen, char *restrict out, size_t outlen) {
  static const char b32str[32] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";
  while (inlen && outlen) {
    *out++ = b32str[(to_uchar(in[0]) >> 3) & 0x1f];
    if (!--outlen)
      break;
    *out++ = b32str[((to_uchar(in[0]) << 2) + (--inlen ? to_uchar(in[1]) >> 6 : 0)) & 0x1f];
    if (!--outlen)
      break;
    *out++ = (inlen ? b32str[(to_uchar(in[1]) >> 1) & 0x1f] : '=');
    if (!--outlen)
      break;
    *out++ = (inlen ? b32str[((to_uchar(in[1]) << 4) + (--inlen ? to_uchar(in[2]) >> 4 : 0)) & 0x1f] : '=');
    if (!--outlen)
      break;
    *out++ = (inlen ? b32str[((to_uchar(in[2]) << 1) + (--inlen ? to_uchar(in[3]) >> 7 : 0)) & 0x1f] : '=');
    if (!--outlen)
      break;
    *out++ = (inlen ? b32str[(to_uchar(in[3]) >> 2) & 0x1f] : '=');
    if (!--outlen)
      break;
    *out++ = (inlen ? b32str[((to_uchar(in[3]) << 3) + (--inlen ? to_uchar(in[4]) >> 5 : 0)) & 0x1f] : '=');
    if (!--outlen)
      break;
    *out++ = inlen ? b32str[to_uchar(in[4]) & 0x1f] : '=';
    if (!--outlen)
      break;
    if (inlen)
      inlen--;
    if (inlen)
      in += 5;
  }
  if (outlen)
    *out = '\0';
}
```