user: 请从给定的汇编指令推导出C源代码:

```asm
<base64Dup>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  add    $0xffffffffffffff80,%rsp
  mov    %rdi,-0x78(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x78(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x64(%rbp)
  mov    -0x64(%rbp),%eax
  add    $0x2,%eax
  movslq %eax,%rdx
  imul   $0x55555556,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  shl    $0x2,%eax
  add    $0x1,%eax
  mov    $0x1,%esi
  mov    %eax,%edi
  call   <calloc@plt>
  mov    %rax,-0x58(%rbp)
  mov    -0x58(%rbp),%rax
  mov    %rax,-0x60(%rbp)
  movabs $0x4847464544434241,%rax
  movabs $0x504f4e4d4c4b4a49,%rdx
  mov    %rax,-0x50(%rbp)
  mov    %rdx,-0x48(%rbp)
  movabs $0x5857565554535251,%rax
  movabs $0x6665646362615a59,%rdx
  mov    %rax,-0x40(%rbp)
  mov    %rdx,-0x38(%rbp)
  movabs $0x6e6d6c6b6a696867,%rax
  movabs $0x767574737271706f,%rdx
  mov    %rax,-0x30(%rbp)
  mov    %rdx,-0x28(%rbp)
  movabs $0x333231307a797877,%rax
  movabs $0x2f2b393837363534,%rdx
  mov    %rax,-0x20(%rbp)
  mov    %rdx,-0x18(%rbp)
  movl   $0x0,-0x68(%rbp)
  jmp    L39
L54:
  mov    -0x78(%rbp),%rax
  movzbl (%rax),%eax
  sar    $0x2,%al
  movsbl %al,%eax
  cltq
  movzbl -0x50(%rbp,%rax,1),%ecx
  mov    -0x60(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x60(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x78(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  shl    $0x4,%eax
  and    $0x30,%eax
  mov    %eax,%edx
  mov    -0x78(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  sar    $0x4,%al
  movsbl %al,%eax
  add    %edx,%eax
  cltq
  movzbl -0x50(%rbp,%rax,1),%ecx
  mov    -0x60(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x60(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x78(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  shl    $0x2,%eax
  and    $0x3c,%eax
  mov    %eax,%edx
  mov    -0x78(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  sar    $0x6,%al
  movsbl %al,%eax
  add    %edx,%eax
  cltq
  movzbl -0x50(%rbp,%rax,1),%ecx
  mov    -0x60(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x60(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x78(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  and    $0x3f,%eax
  cltq
  movzbl -0x50(%rbp,%rax,1),%ecx
  mov    -0x60(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x60(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  addq   $0x3,-0x78(%rbp)
  addl   $0x3,-0x68(%rbp)
L39:
  mov    -0x68(%rbp),%eax
  cmp    -0x64(%rbp),%eax
  jl     L54
  mov    -0x64(%rbp),%eax
  add    $0x1,%eax
  cmp    %eax,-0x68(%rbp)
  jne    L27
  mov    -0x60(%rbp),%rax
  sub    $0x1,%rax
  movb   $0x3d,(%rax)
  jmp    L6
L27:
  mov    -0x64(%rbp),%eax
  add    $0x2,%eax
  cmp    %eax,-0x68(%rbp)
  jne    L6
  mov    -0x60(%rbp),%rax
  sub    $0x2,%rax
  movb   $0x3d,(%rax)
  mov    -0x60(%rbp),%rdx
  sub    $0x1,%rdx
  movzbl (%rax),%eax
  mov    %al,(%rdx)
L6:
  mov    -0x60(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x58(%rbp),%rax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L37
  call   <__stack_chk_fail@plt>
L37:
  leave
  ret
```

assistant: ```c
char *base64Dup(char *s) {
  int i;
  int len = strlen(s);
  char *ret = calloc((4 * (((len) + 2) / 3)) + 1, 1);
  unsigned char *p = (unsigned char *)ret;
  char tbl[64] = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/'};
  for (i = 0; i < len; i += 3) {
    *p++ = tbl[s[0] >> 2];
    *p++ = tbl[((s[0] & 3) << 4) + (s[1] >> 4)];
    *p++ = tbl[((s[1] & 0xf) << 2) + (s[2] >> 6)];
    *p++ = tbl[s[2] & 0x3f];
    s += 3;
  }
  if (i == len + 1)
    *(p - 1) = '=';
  else if (i == len + 2)
    *(p - 1) = *(p - 2) = '=';
  *p = '\0';
  return ret;
}
```