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

```asm
<base64_decode>:
  endbr64
  push   %r12
  lea    D28(%rip),%rsi
  mov    $0x3d,%ecx
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x200,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x1f8(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rdi
  rep movsq %ds:(%rsi),%es:(%rdi)
  mov    (%rsi),%eax
  mov    %eax,(%rdi)
  mov    %rbp,%rdi
  call   <strlen@plt>
  lea    D21(%rip),%rsi
  mov    %rbp,%rdi
  mov    %rax,%rbx
  call   <strstr@plt>
  test   %rax,%rax
  je     L31
  test   %rbx,%rbx
  lea    0x3(%rbx),%rax
  cmovns %rbx,%rax
  sar    $0x2,%rax
  lea    -0x2(%rax,%rax,2),%r12
L44:
  lea    0x1(%r12),%edi
  call   <malloc@plt>
  movb   $0x0,(%rax,%r12,1)
  mov    %rax,%r8
  cmp    $0x2,%rbx
  jle    L34
  sub    $0x3,%rbx
  mov    %rbp,%rax
  mov    %r8,%rcx
  and    $0xfffffffffffffffc,%rbx
  lea    0x4(%rbp,%rbx,1),%rdi
  nopl   (%rax)
L5:
  movzbl (%rax),%edx
  add    $0x4,%rax
  add    $0x3,%rcx
  mov    (%rsp,%rdx,4),%esi
  movzbl -0x3(%rax),%edx
  mov    (%rsp,%rdx,4),%edx
  shl    $0x2,%esi
  shr    $0x4,%dl
  or     %esi,%edx
  mov    %dl,-0x3(%rcx)
  movzbl -0x3(%rax),%edx
  mov    (%rsp,%rdx,4),%esi
  movzbl -0x2(%rax),%edx
  mov    (%rsp,%rdx,4),%edx
  shl    $0x4,%esi
  shr    $0x2,%dl
  or     %esi,%edx
  mov    %dl,-0x2(%rcx)
  movzbl -0x2(%rax),%edx
  movzbl -0x1(%rax),%esi
  mov    (%rsp,%rdx,4),%edx
  shl    $0x6,%edx
  or     (%rsp,%rsi,4),%dl
  mov    %dl,-0x1(%rcx)
  cmp    %rdi,%rax
  jne    L5
L34:
  mov    0x1f8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L30
  add    $0x200,%rsp
  mov    %r8,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax)
L31:
  lea    D0(%rip),%rsi
  mov    %rbp,%rdi
  lea    0x3(%rbx),%r12
  call   <strstr@plt>
  test   %rbx,%rbx
  cmovns %rbx,%r12
  sar    $0x2,%r12
  test   %rax,%rax
  je     L44
  lea    -0x1(%r12,%r12,2),%r12
  jmp    L44
L30:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_label: D28
type: string
name: read_data
arguments: data_label: D21
type: string
name: read_data
arguments: data_label: D0
type: string

tool: 

tool: D21: ==

tool: D0: =

assistant: ```c
unsigned char *base64_decode(unsigned char *code) {
  int table[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 0, 0, 0, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, 0, 0, 0, 0, 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51};
  long len;
  long str_len;
  unsigned char *res;
  int i, j;
  len = strlen(code);
  if (strstr(code, "=="))
    str_len = len / 4 * 3 - 2;
  else if (strstr(code, "="))
    str_len = len / 4 * 3 - 1;
  else
    str_len = len / 4;
  res = malloc(sizeof(unsigned char) * str_len + 1);
  res[str_len] = '\0';
  for (i = 0, j = 0; i < len - 2; j += 3, i += 4) {
    res[j] = ((unsigned char)table[code[i]]) << 2 | (((unsigned char)table[code[i + 1]]) >> 4);
    res[j + 1] = (((unsigned char)table[code[i + 1]]) << 4) | (((unsigned char)table[code[i + 2]]) >> 2);
    res[j + 2] = (((unsigned char)table[code[i + 2]]) << 6) | ((unsigned char)table[code[i + 3]]);
  }
  return res;
}
```