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

```asm
<base64decode>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
L533:
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movzbl (%rax),%eax
  mov    %al,-0x6(%rbp)
  cmpb   $0x0,-0x6(%rbp)
  jne    L923
  mov    -0x20(%rbp),%rax
  movb   $0x0,(%rax)
  mov    $0x0,%eax
  jmp    L172
L923:
  cmpb   $0x40,-0x6(%rbp)
  jle    L166
  cmpb   $0x5a,-0x6(%rbp)
  jg     L713
  movzbl -0x6(%rbp),%eax
  sub    $0x41,%eax
  jmp    L559
L713:
  cmpb   $0x60,-0x6(%rbp)
  jle    L610
  cmpb   $0x7a,-0x6(%rbp)
  jg     L715
  movzbl -0x6(%rbp),%eax
  sub    $0x47,%eax
  jmp    L559
L715:
  mov    $0x40,%eax
  jmp    L559
L610:
  mov    $0x40,%eax
  jmp    L559
L166:
  cmpb   $0x39,-0x6(%rbp)
  jg     L662
  cmpb   $0x2f,-0x6(%rbp)
  jle    L324
  movzbl -0x6(%rbp),%eax
  add    $0x4,%eax
  jmp    L559
L324:
  cmpb   $0x2b,-0x6(%rbp)
  je     L832
  cmpb   $0x2f,-0x6(%rbp)
  jne    L150
  mov    $0x3f,%eax
  jmp    L559
L150:
  mov    $0x40,%eax
  jmp    L559
L832:
  mov    $0x3e,%eax
  jmp    L559
L662:
  cmpb   $0x3d,-0x6(%rbp)
  jne    L690
  mov    $0x0,%eax
  jmp    L559
L690:
  mov    $0x40,%eax
L559:
  mov    %al,-0x5(%rbp)
  cmpb   $0x40,-0x5(%rbp)
  jne    L866
  mov    $0xffffffff,%eax
  jmp    L172
L866:
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movzbl (%rax),%eax
  mov    %al,-0x6(%rbp)
  cmpb   $0x0,-0x6(%rbp)
  jne    L377
  mov    $0xffffffff,%eax
  jmp    L172
L377:
  cmpb   $0x40,-0x6(%rbp)
  jle    L356
  cmpb   $0x5a,-0x6(%rbp)
  jg     L787
  movzbl -0x6(%rbp),%eax
  sub    $0x41,%eax
  jmp    L645
L787:
  cmpb   $0x60,-0x6(%rbp)
  jle    L148
  cmpb   $0x7a,-0x6(%rbp)
  jg     L59
  movzbl -0x6(%rbp),%eax
  sub    $0x47,%eax
  jmp    L645
L59:
  mov    $0x40,%eax
  jmp    L645
L148:
  mov    $0x40,%eax
  jmp    L645
L356:
  cmpb   $0x39,-0x6(%rbp)
  jg     L296
  cmpb   $0x2f,-0x6(%rbp)
  jle    L779
  movzbl -0x6(%rbp),%eax
  add    $0x4,%eax
  jmp    L645
L779:
  cmpb   $0x2b,-0x6(%rbp)
  je     L461
  cmpb   $0x2f,-0x6(%rbp)
  jne    L905
  mov    $0x3f,%eax
  jmp    L645
L905:
  mov    $0x40,%eax
  jmp    L645
L461:
  mov    $0x3e,%eax
  jmp    L645
L296:
  cmpb   $0x3d,-0x6(%rbp)
  jne    L147
  mov    $0x0,%eax
  jmp    L645
L147:
  mov    $0x40,%eax
L645:
  mov    %al,-0x4(%rbp)
  cmpb   $0x40,-0x4(%rbp)
  jne    L694
  mov    $0xffffffff,%eax
  jmp    L172
L694:
  movsbl -0x5(%rbp),%eax
  shl    $0x2,%eax
  mov    %eax,%edx
  movzbl -0x4(%rbp),%eax
  sar    $0x4,%al
  or     %edx,%eax
  mov    %al,-0x3(%rbp)
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movzbl (%rax),%eax
  mov    %al,-0x6(%rbp)
  cmpb   $0x0,-0x6(%rbp)
  jne    L266
  mov    $0xffffffff,%eax
  jmp    L172
L266:
  cmpb   $0x40,-0x6(%rbp)
  jle    L119
  cmpb   $0x5a,-0x6(%rbp)
  jg     L507
  movzbl -0x6(%rbp),%eax
  sub    $0x41,%eax
  jmp    L754
L507:
  cmpb   $0x60,-0x6(%rbp)
  jle    L230
  cmpb   $0x7a,-0x6(%rbp)
  jg     L125
  movzbl -0x6(%rbp),%eax
  sub    $0x47,%eax
  jmp    L754
L125:
  mov    $0x40,%eax
  jmp    L754
L230:
  mov    $0x40,%eax
  jmp    L754
L119:
  cmpb   $0x39,-0x6(%rbp)
  jg     L875
  cmpb   $0x2f,-0x6(%rbp)
  jle    L808
  movzbl -0x6(%rbp),%eax
  add    $0x4,%eax
  jmp    L754
L808:
  cmpb   $0x2b,-0x6(%rbp)
  je     L918
  cmpb   $0x2f,-0x6(%rbp)
  jne    L537
  mov    $0x3f,%eax
  jmp    L754
L537:
  mov    $0x40,%eax
  jmp    L754
L918:
  mov    $0x3e,%eax
  jmp    L754
L875:
  cmpb   $0x3d,-0x6(%rbp)
  jne    L609
  mov    $0x0,%eax
  jmp    L754
L609:
  mov    $0x40,%eax
L754:
  mov    %al,-0x5(%rbp)
  cmpb   $0x40,-0x5(%rbp)
  jne    L289
  mov    $0xffffffff,%eax
  jmp    L172
L289:
  movsbl -0x4(%rbp),%eax
  shl    $0x4,%eax
  mov    %eax,%edx
  movzbl -0x5(%rbp),%eax
  sar    $0x2,%al
  or     %edx,%eax
  mov    %al,-0x2(%rbp)
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movzbl (%rax),%eax
  mov    %al,-0x6(%rbp)
  cmpb   $0x0,-0x6(%rbp)
  jne    L660
  mov    $0xffffffff,%eax
  jmp    L172
L660:
  cmpb   $0x40,-0x6(%rbp)
  jle    L719
  cmpb   $0x5a,-0x6(%rbp)
  jg     L349
  movzbl -0x6(%rbp),%eax
  sub    $0x41,%eax
  jmp    L379
L349:
  cmpb   $0x60,-0x6(%rbp)
  jle    L750
  cmpb   $0x7a,-0x6(%rbp)
  jg     L259
  movzbl -0x6(%rbp),%eax
  sub    $0x47,%eax
  jmp    L379
L259:
  mov    $0x40,%eax
  jmp    L379
L750:
  mov    $0x40,%eax
  jmp    L379
L719:
  cmpb   $0x39,-0x6(%rbp)
  jg     L91
  cmpb   $0x2f,-0x6(%rbp)
  jle    L232
  movzbl -0x6(%rbp),%eax
  add    $0x4,%eax
  jmp    L379
L232:
  cmpb   $0x2b,-0x6(%rbp)
  je     L710
  cmpb   $0x2f,-0x6(%rbp)
  jne    L495
  mov    $0x3f,%eax
  jmp    L379
L495:
  mov    $0x40,%eax
  jmp    L379
L710:
  mov    $0x3e,%eax
  jmp    L379
L91:
  cmpb   $0x3d,-0x6(%rbp)
  jne    L670
  mov    $0x0,%eax
  jmp    L379
L670:
  mov    $0x40,%eax
L379:
  mov    %al,-0x4(%rbp)
  cmpb   $0x40,-0x4(%rbp)
  jne    L614
  mov    $0xffffffff,%eax
  jmp    L172
L614:
  movsbl -0x5(%rbp),%eax
  shl    $0x6,%eax
  or     -0x4(%rbp),%al
  mov    %al,-0x1(%rbp)
  mov    -0x20(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  movzbl -0x3(%rbp),%edx
  mov    %dl,(%rax)
  cmpb   $0x0,-0x3(%rbp)
  jne    L583
  mov    $0x0,%eax
  jmp    L172
L583:
  mov    -0x20(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  movzbl -0x2(%rbp),%edx
  mov    %dl,(%rax)
  cmpb   $0x0,-0x2(%rbp)
  jne    L884
  mov    $0x0,%eax
  jmp    L172
L884:
  mov    -0x20(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  movzbl -0x1(%rbp),%edx
  mov    %dl,(%rax)
  cmpb   $0x0,-0x1(%rbp)
  jne    L533
  mov    $0x0,%eax
L172:
  pop    %rbp
  ret
```

assistant: ```c
int base64decode(const char *encoded, char *decoded) {
  char c, t1, t2, u1, u2, u3;
  while (1) {
    c = *encoded++;
    if (c == 0) {
      *decoded = 0;
      return 0;
    }
    t1 = ((c) >= 'A' ? ((c) <= 'Z' ? (c) - 'A' : (c) >= 'a' ? (c <= 'z' ? (c) - 'a' + 26 : 64) : 64) : (c) <= '9' ? ((c) >= '0' ? (c) - '0' + 52 : (c) == '+' ? 62 : (c) == '/' ? 63 : 64) : (c) == '=' ? 0 : 64);
    if (t1 == 64)
      return -1;
    c = *encoded++;
    if (c == 0)
      return -1;
    t2 = ((c) >= 'A' ? ((c) <= 'Z' ? (c) - 'A' : (c) >= 'a' ? (c <= 'z' ? (c) - 'a' + 26 : 64) : 64) : (c) <= '9' ? ((c) >= '0' ? (c) - '0' + 52 : (c) == '+' ? 62 : (c) == '/' ? 63 : 64) : (c) == '=' ? 0 : 64);
    if (t2 == 64)
      return -1;
    u1 = t1 << 2 | t2 >> 4;
    c = *encoded++;
    if (c == 0)
      return -1;
    t1 = ((c) >= 'A' ? ((c) <= 'Z' ? (c) - 'A' : (c) >= 'a' ? (c <= 'z' ? (c) - 'a' + 26 : 64) : 64) : (c) <= '9' ? ((c) >= '0' ? (c) - '0' + 52 : (c) == '+' ? 62 : (c) == '/' ? 63 : 64) : (c) == '=' ? 0 : 64);
    if (t1 == 64)
      return -1;
    u2 = (t2 & 0xf) << 4 | t1 >> 2;
    c = *encoded++;
    if (c == 0)
      return -1;
    t2 = ((c) >= 'A' ? ((c) <= 'Z' ? (c) - 'A' : (c) >= 'a' ? (c <= 'z' ? (c) - 'a' + 26 : 64) : 64) : (c) <= '9' ? ((c) >= '0' ? (c) - '0' + 52 : (c) == '+' ? 62 : (c) == '/' ? 63 : 64) : (c) == '=' ? 0 : 64);
    if (t2 == 64)
      return -1;
    u3 = (t1 & 0x3) << 6 | t2;
    *decoded++ = u1;
    if (u1 == 0)
      return 0;
    *decoded++ = u2;
    if (u2 == 0)
      return 0;
    *decoded++ = u3;
    if (u3 == 0)
      return 0;
  }
}
```