user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<base64_decode>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  xor    %esi,%esi
  push   %rbx
  mov    %rdi,%rbx
  mov    %rbp,%rdi
  sub    $0x28,%rsp
  mov    %edx,0xc(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  call   <memset@plt>
  mov    %rbx,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  je     L41
  sub    $0x1,%eax
  xor    %r15d,%r15d
  lea    0x14(%rsp),%r14
  lea    0x1(%rbx,%rax,1),%r13
  jmp    L126
  nopl   0x0(%rax,%rax,1)
L94:
  add    $0x1,%rbx
  cmp    %r13,%rbx
  je     L207
L126:
  movzbl (%rbx),%edi
  cmp    $0x3d,%dil
  je     L207
  call   <is_base64@plt>
  test   %rax,%rax
  je     L207
  movzbl (%rbx),%edx
  movslq %r15d,%rax
  add    $0x1,%r15d
  mov    %dl,0x14(%rsp,%rax,1)
  cmp    $0x4,%r15d
  jne    L94
  mov    %r14,%r12
  lea    0x18(%rsp),%r15
L137:
  movzbl (%r12),%edi
  add    $0x1,%r12
  call   <base64_chars_find@plt>
  mov    %al,-0x1(%r12)
  cmp    %r15,%r12
  jne    L137
  movzbl 0x15(%rsp),%ecx
  movzbl 0x14(%rsp),%eax
  lea    0x11(%rsp),%r12
  mov    0xc(%rsp),%r15d
  mov    %ecx,%edx
  shl    $0x4,%ecx
  sar    $0x4,%edx
  and    $0x3,%edx
  lea    (%rdx,%rax,4),%eax
  mov    %al,0x11(%rsp)
  movzbl 0x16(%rsp),%eax
  mov    %eax,%edx
  shl    $0x6,%eax
  add    0x17(%rsp),%al
  sar    $0x2,%edx
  mov    %al,0x13(%rsp)
  and    $0xf,%edx
  add    %ecx,%edx
  mov    %dl,0x12(%rsp)
L154:
  mov    %rbp,%rdi
  call   <strlen@plt>
  cmp    %r15,%rax
  jae    L63
  mov    %rbp,%rdi
  add    $0x1,%r12
  call   <strlen@plt>
  movzbl -0x1(%r12),%ecx
  mov    %cl,0x0(%rbp,%rax,1)
  cmp    %r14,%r12
  jne    L154
L63:
  add    $0x1,%rbx
  xor    %r15d,%r15d
  cmp    %r13,%rbx
  jne    L126
  nopl   0x0(%rax,%rax,1)
L207:
  test   %r15d,%r15d
  je     L41
  cmp    $0x3,%r15d
  jg     L101
  lea    0x14(%rsp),%rbx
  movslq %r15d,%rcx
  mov    $0x4,%edx
  add    %rbx,%rcx
  sub    %r15d,%edx
  je     L88
  xor    %eax,%eax
L37:
  mov    %eax,%esi
  add    $0x1,%eax
  movb   $0x0,(%rcx,%rsi,1)
  cmp    %edx,%eax
  jb     L37
L88:
  lea    0x18(%rsp),%r13
L39:
  movzbl (%rbx),%edi
  add    $0x1,%rbx
  call   <base64_chars_find@plt>
  mov    %al,-0x1(%rbx)
  cmp    %r13,%rbx
  jne    L39
  movzbl 0x15(%rsp),%ecx
  movzbl 0x14(%rsp),%eax
  mov    %ecx,%edx
  shl    $0x4,%ecx
  sar    $0x4,%edx
  and    $0x3,%edx
  lea    (%rdx,%rax,4),%eax
  mov    %al,0x11(%rsp)
  movzbl 0x16(%rsp),%eax
  mov    %eax,%edx
  shl    $0x6,%eax
  add    0x17(%rsp),%al
  sar    $0x2,%edx
  mov    %al,0x13(%rsp)
  and    $0xf,%edx
  add    %ecx,%edx
  mov    %dl,0x12(%rsp)
  cmp    $0x1,%r15d
  je     L41
  lea    -0x2(%r15),%eax
  mov    0xc(%rsp),%r12d
  lea    0x11(%rsp),%rbx
  lea    0x12(%rsp,%rax,1),%r13
  jmp    L146
  nopl   (%rax)
L4:
  mov    %rbp,%rdi
  add    $0x1,%rbx
  call   <strlen@plt>
  movzbl -0x1(%rbx),%edx
  mov    %dl,0x0(%rbp,%rax,1)
  cmp    %rbx,%r13
  je     L41
L146:
  mov    %rbp,%rdi
  call   <strlen@plt>
  cmp    %r12,%rax
  jb     L4
L41:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L12
  add    $0x28,%rsp
  mov    %rbp,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1090 <strlen@plt>
  nopl   0x0(%rax)
L101:
  lea    0x14(%rsp),%rbx
  jmp    L88
L12:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
size_t base64_decode(unsigned char const *encoded_string, unsigned char *ret, unsigned int retsize) {
  int in_len, i = 0, j = 0, in_ = 0;
  unsigned char char_array_4[4], char_array_3[3];
  memset(ret, 0, retsize);
  in_len = strlen(encoded_string);
  while (in_len-- && (encoded_string[in_] != '=') && is_base64(encoded_string[in_])) {
    char_array_4[i++] = encoded_string[in_];
    in_++;
    if (i == 4) {
      for (i = 0; i < 4; i++)
        char_array_4[i] = base64_chars_find(char_array_4[i]);
      char_array_3[0] = (char_array_4[0] << 2) + ((char_array_4[1] & 0x30) >> 4);
      char_array_3[1] = ((char_array_4[1] & 0xf) << 4) + ((char_array_4[2] & 0x3c) >> 2);
      char_array_3[2] = ((char_array_4[2] & 0x3) << 6) + char_array_4[3];
      for (i = 0; (i < 3) && strlen(ret) < retsize; i++)
        ret[strlen(ret)] = char_array_3[i];
      i = 0;
    }
  }
  if (i) {
    for (j = i; j < 4; j++)
      char_array_4[j] = 0;
    for (j = 0; j < 4; j++)
      char_array_4[j] = base64_chars_find(char_array_4[j]);
    char_array_3[0] = (char_array_4[0] << 2) + ((char_array_4[1] & 0x30) >> 4);
    char_array_3[1] = ((char_array_4[1] & 0xf) << 4) + ((char_array_4[2] & 0x3c) >> 2);
    char_array_3[2] = ((char_array_4[2] & 0x3) << 6) + char_array_4[3];
    for (j = 0; (j < i - 1) && strlen(ret) < retsize; j++) {
      ret[strlen(ret)] = char_array_3[j];
    }
  }
  return strlen(ret);
}
```