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

```asm
<decode_base64>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x2c(%rbp),%eax
  shr    $0x2,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %eax,%edx
  mov    -0x40(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x28(%rbp),%rax
  cmp    -0x38(%rbp),%rax
  je     L40
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,-0x38(%rbp)
  jmp    L18
L40:
  mov    -0x10(%rbp),%rax
  mov    %rax,-0x8(%rbp)
L18:
  movl   $0x0,-0x14(%rbp)
  jmp    L32
L46:
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <decode_base64_char@plt>
  shl    $0x2,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  mov    %dl,(%rax)
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <decode_base64_char@plt>
  sar    $0x4,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  movzbl (%rax),%edx
  or     %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <decode_base64_char@plt>
  shl    $0x4,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  mov    %dl,(%rax)
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <decode_base64_char@plt>
  sar    $0x2,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  movzbl (%rax),%edx
  or     %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <decode_base64_char@plt>
  shl    $0x6,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  mov    %dl,(%rax)
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <decode_base64_char@plt>
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  movzbl (%rax),%edx
  or     %ecx,%edx
  mov    %dl,(%rax)
  addl   $0x1,-0x14(%rbp)
L32:
  mov    -0x2c(%rbp),%eax
  shr    $0x2,%eax
  cmp    %eax,-0x14(%rbp)
  jb     L46
  mov    -0x10(%rbp),%rax
  sub    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x3d,%al
  jne    L13
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  lea    -0x1(%rax),%edx
  mov    -0x40(%rbp),%rax
  mov    %edx,(%rax)
L13:
  mov    -0x10(%rbp),%rax
  sub    $0x2,%rax
  movzbl (%rax),%eax
  cmp    $0x3d,%al
  jne    L10
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  lea    -0x1(%rax),%edx
  mov    -0x40(%rbp),%rax
  mov    %edx,(%rax)
L10:
  nop
  leave
  ret
```

assistant: ```c
void decode_base64(const char *inp, unsigned int isize, char *out, unsigned int *osize) {
  char *tinp = (char *)inp;
  char *tout;
  unsigned int i;
  *osize = isize / 4 * 3;
  if (inp != out) {
    tout = (char *)malloc(*osize);
    out = tout;
  } else {
    tout = tinp;
  }
  for (i = 0; i < (isize >> 2); i++) {
    *tout = decode_base64_char(*tinp++) << 2;
    *tout++ |= decode_base64_char(*tinp) >> 4;
    *tout = decode_base64_char(*tinp++) << 4;
    *tout++ |= decode_base64_char(*tinp) >> 2;
    *tout = decode_base64_char(*tinp++) << 6;
    *tout++ |= decode_base64_char(*tinp++);
  }
  if (*(tinp - 1) == '=')
    (*osize)--;
  if (*(tinp - 2) == '=')
    (*osize)--;
}
```