user: What is the c source code of the assembly code below:

```asm
<base64decode>:
  endbr64
  mov    %rsi,%r8
  jmp    L125
  nopl   0x0(%rax)
L18:
  lea    -0x41(%rax),%edx
  cmp    $0x5a,%al
  jle    L396
  lea    -0x61(%rax),%edx
  cmp    $0x19,%dl
  ja     L122
  lea    -0x47(%rax),%edx
L396:
  movzbl 0x1(%rdi),%eax
  test   %al,%al
  je     L122
L73:
  cmp    $0x40,%al
  jle    L180
  cmp    $0x5a,%al
  jg     L482
  sub    $0x41,%eax
  mov    %eax,%ecx
  sar    $0x4,%cl
L210:
  shl    $0x2,%edx
  or     %ecx,%edx
  movzbl 0x2(%rdi),%ecx
  test   %cl,%cl
  je     L122
  cmp    $0x40,%cl
  jle    L227
  cmp    $0x5a,%cl
  jg     L133
  sub    $0x41,%ecx
  mov    %ecx,%esi
  sar    $0x2,%sil
L539:
  shl    $0x4,%eax
  add    $0x4,%rdi
  or     %esi,%eax
  movzbl -0x1(%rdi),%esi
  test   %sil,%sil
  je     L122
  cmp    $0x40,%sil
  jle    L469
  cmp    $0x5a,%sil
  jg     L274
  sub    $0x41,%esi
L518:
  shl    $0x6,%ecx
  mov    %dl,(%r8)
  or     %esi,%ecx
  test   %dl,%dl
  je     L321
  mov    %al,0x1(%r8)
  test   %al,%al
  je     L321
  add    $0x3,%r8
  mov    %cl,-0x1(%r8)
  test   %cl,%cl
  je     L321
L125:
  movzbl (%rdi),%eax
  test   %al,%al
  je     L7
  cmp    $0x40,%al
  jg     L18
  cmp    $0x39,%al
  jg     L25
  lea    0x4(%rax),%edx
  cmp    $0x2f,%al
  jg     L396
  cmp    $0x2b,%al
  je     L296
  cmp    $0x2f,%al
  jne    L122
  movzbl 0x1(%rdi),%eax
  mov    $0x3f,%edx
  test   %al,%al
  jne    L73
L122:
  mov    $0xffffffff,%eax
  ret
  nopl   0x0(%rax,%rax,1)
L180:
  cmp    $0x39,%al
  jg     L54
  cmp    $0x2f,%al
  jle    L105
  add    $0x4,%eax
  mov    $0x3,%ecx
  jmp    L210
  nopl   (%rax)
L227:
  cmp    $0x39,%cl
  jg     L309
  cmp    $0x2f,%cl
  jle    L74
  add    $0x4,%ecx
  mov    %ecx,%esi
  sar    $0x2,%sil
  jmp    L539
L469:
  cmp    $0x39,%sil
  jg     L292
  cmp    $0x2f,%sil
  jle    L187
  add    $0x4,%esi
  jmp    L518
  nopl   0x0(%rax)
L25:
  cmp    $0x3d,%al
  jne    L122
  xor    %edx,%edx
  jmp    L396
  nopl   0x0(%rax,%rax,1)
L482:
  lea    -0x61(%rax),%ecx
  cmp    $0x19,%cl
  ja     L122
  sub    $0x47,%eax
  mov    %eax,%ecx
  sar    $0x4,%cl
  jmp    L210
  nopl   0x0(%rax)
L54:
  cmp    $0x3d,%al
  jne    L122
  xor    %ecx,%ecx
  xor    %eax,%eax
  jmp    L210
  nopl   0x0(%rax)
L133:
  lea    -0x61(%rcx),%esi
  cmp    $0x19,%sil
  ja     L122
  sub    $0x47,%ecx
  mov    %ecx,%esi
  sar    $0x2,%sil
  jmp    L539
  nopl   0x0(%rax,%rax,1)
L309:
  cmp    $0x3d,%cl
  jne    L122
  xor    %esi,%esi
  xor    %ecx,%ecx
  jmp    L539
  nopw   0x0(%rax,%rax,1)
L274:
  lea    -0x61(%rsi),%r9d
  cmp    $0x19,%r9b
  ja     L122
  sub    $0x47,%esi
  jmp    L518
  cs nopw 0x0(%rax,%rax,1)
L292:
  cmp    $0x3d,%sil
  jne    L122
  xor    %esi,%esi
  jmp    L518
  nopl   0x0(%rax)
L105:
  cmp    $0x2b,%al
  je     L238
  cmp    $0x2f,%al
  jne    L122
  mov    $0x3,%ecx
  mov    $0x3f,%eax
  jmp    L210
  nopl   0x0(%rax,%rax,1)
L74:
  cmp    $0x2b,%cl
  je     L412
  cmp    $0x2f,%cl
  jne    L122
  mov    $0xf,%esi
  mov    $0x3f,%ecx
  jmp    L539
  nopl   (%rax)
L187:
  cmp    $0x2b,%sil
  je     L393
  cmp    $0x2f,%sil
  jne    L122
  mov    $0x3f,%esi
  jmp    L518
  nopw   0x0(%rax,%rax,1)
L296:
  mov    $0x3e,%edx
  jmp    L396
  nopw   0x0(%rax,%rax,1)
L238:
  mov    $0x3,%ecx
  mov    $0x3e,%eax
  jmp    L210
  nopw   0x0(%rax,%rax,1)
L412:
  mov    $0xf,%esi
  mov    $0x3e,%ecx
  jmp    L539
  nop
L321:
  xor    %eax,%eax
  ret
  nopl   0x0(%rax,%rax,1)
L393:
  mov    $0x3e,%esi
  jmp    L518
  nopw   0x0(%rax,%rax,1)
L7:
  movb   $0x0,(%r8)
  xor    %eax,%eax
  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;
  }
}
```