user: Demonstrate the C code that generates the assembly output below:

```asm
<encodeBase64>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  add    $0xffffffffffffff80,%rsp
  mov    %rdi,-0x78(%rbp)
  mov    %rsi,-0x80(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x64(%rbp)
  mov    -0x64(%rbp),%eax
  mov    %eax,-0x68(%rbp)
  mov    -0x80(%rbp),%rax
  lea    0x2(%rax),%rcx
  movabs $0xaaaaaaaaaaaaaaab,%rdx
  mov    %rcx,%rax
  mul    %rdx
  shr    %rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  sub    %rax,%rcx
  mov    %rcx,%rdx
  mov    -0x80(%rbp),%rax
  sub    %rdx,%rax
  add    $0x2,%rax
  movabs $0xaaaaaaaaaaaaaaab,%rdx
  mul    %rdx
  mov    %rdx,%rax
  shr    %rax
  shl    $0x2,%rax
  mov    %rax,-0x60(%rbp)
  mov    -0x60(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,%rsi
  mov    $0x1,%edi
  call   <calloc@plt>
  mov    %rax,-0x58(%rbp)
  mov    -0x60(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    -0x58(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  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)
  jmp    L11
L66:
  mov    -0x68(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <encode64Char1@plt>
  mov    -0x64(%rbp),%edx
  movslq %edx,%rcx
  mov    -0x58(%rbp),%rdx
  add    %rcx,%rdx
  movzbl -0x50(%rbp,%rax,1),%eax
  mov    %al,(%rdx)
  mov    -0x68(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%edx
  mov    -0x68(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x78(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <encode64Char2@plt>
  mov    -0x64(%rbp),%edx
  movslq %edx,%rdx
  lea    0x1(%rdx),%rcx
  mov    -0x58(%rbp),%rdx
  add    %rcx,%rdx
  movzbl -0x50(%rbp,%rax,1),%eax
  mov    %al,(%rdx)
  mov    -0x68(%rbp),%eax
  cltq
  lea    0x2(%rax),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%edx
  mov    -0x68(%rbp),%eax
  cltq
  lea    0x1(%rax),%rcx
  mov    -0x78(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <encode64Char3@plt>
  mov    -0x64(%rbp),%edx
  movslq %edx,%rdx
  lea    0x2(%rdx),%rcx
  mov    -0x58(%rbp),%rdx
  add    %rcx,%rdx
  movzbl -0x50(%rbp,%rax,1),%eax
  mov    %al,(%rdx)
  mov    -0x68(%rbp),%eax
  cltq
  lea    0x2(%rax),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <encode64Char4@plt>
  mov    -0x64(%rbp),%edx
  movslq %edx,%rdx
  lea    0x3(%rdx),%rcx
  mov    -0x58(%rbp),%rdx
  add    %rcx,%rdx
  movzbl -0x50(%rbp,%rax,1),%eax
  mov    %al,(%rdx)
  addl   $0x3,-0x68(%rbp)
  addl   $0x4,-0x64(%rbp)
L11:
  mov    -0x68(%rbp),%eax
  cltq
  mov    -0x80(%rbp),%rdx
  sub    $0x3,%rdx
  cmp    %rdx,%rax
  jb     L66
  mov    -0x68(%rbp),%eax
  cltq
  cmp    %rax,-0x80(%rbp)
  jbe    L98
  mov    -0x68(%rbp),%eax
  add    $0x1,%eax
  cltq
  cmp    %rax,-0x80(%rbp)
  jbe    L64
  mov    -0x68(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x6a(%rbp)
  mov    -0x68(%rbp),%eax
  add    $0x2,%eax
  cltq
  cmp    %rax,-0x80(%rbp)
  jbe    L44
  mov    -0x68(%rbp),%eax
  cltq
  lea    0x2(%rax),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x69(%rbp)
  jmp    L94
L44:
  movb   $0x0,-0x69(%rbp)
L94:
  movsbl -0x69(%rbp),%edx
  movsbl -0x6a(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <encode64Char3@plt>
  mov    -0x64(%rbp),%edx
  movslq %edx,%rdx
  lea    0x2(%rdx),%rcx
  mov    -0x58(%rbp),%rdx
  add    %rcx,%rdx
  movzbl -0x50(%rbp,%rax,1),%eax
  mov    %al,(%rdx)
  jmp    L78
L64:
  movb   $0x0,-0x6a(%rbp)
  mov    -0x64(%rbp),%eax
  cltq
  lea    0x2(%rax),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movb   $0x3d,(%rax)
L78:
  mov    -0x68(%rbp),%eax
  add    $0x2,%eax
  cltq
  cmp    %rax,-0x80(%rbp)
  jbe    L31
  mov    -0x68(%rbp),%eax
  cltq
  lea    0x2(%rax),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <encode64Char4@plt>
  mov    -0x64(%rbp),%edx
  movslq %edx,%rdx
  lea    0x3(%rdx),%rcx
  mov    -0x58(%rbp),%rdx
  add    %rcx,%rdx
  movzbl -0x50(%rbp,%rax,1),%eax
  mov    %al,(%rdx)
  jmp    L92
L31:
  mov    -0x64(%rbp),%eax
  cltq
  lea    0x3(%rax),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movb   $0x3d,(%rax)
L92:
  mov    -0x68(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <encode64Char1@plt>
  mov    -0x64(%rbp),%edx
  movslq %edx,%rcx
  mov    -0x58(%rbp),%rdx
  add    %rcx,%rdx
  movzbl -0x50(%rbp,%rax,1),%eax
  mov    %al,(%rdx)
  movsbl -0x6a(%rbp),%edx
  mov    -0x68(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x78(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <encode64Char2@plt>
  mov    -0x64(%rbp),%edx
  movslq %edx,%rdx
  lea    0x1(%rdx),%rcx
  mov    -0x58(%rbp),%rdx
  add    %rcx,%rdx
  movzbl -0x50(%rbp,%rax,1),%eax
  mov    %al,(%rdx)
L98:
  mov    -0x58(%rbp),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x58(%rbp),%rax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L49
  call   <__stack_chk_fail@plt>
L49:
  leave
  ret
```

assistant: ```c
char *encodeBase64(const char *cstr, size_t len) {
  int i, o;
  i = o = 0;
  size_t outputLength = (len + 2 - ((len + 2) % 3)) / 3 * 4;
  char *output = (char *)calloc(sizeof(char), outputLength + 1);
  memset(output, 0, outputLength + 1);
  char base64Table[] = {'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', '+', '/'};
  while (i < (len - 3)) {
    output[o] = base64Table[encode64Char1(cstr[i])];
    output[o + 1] = base64Table[encode64Char2(cstr[i], cstr[i + 1])];
    output[o + 2] = base64Table[encode64Char3(cstr[i + 1], cstr[i + 2])];
    output[o + 3] = base64Table[encode64Char4(cstr[i + 2])];
    i += 3;
    o += 4;
  }
  if (i < len) {
    char ci2, ci3;
    if ((i + 1) < len) {
      ci2 = cstr[i + 1];
      if ((i + 2) < len) {
        ci3 = cstr[i + 2];
      } else {
        ci3 = 0;
      }
      output[o + 2] = base64Table[encode64Char3(ci2, ci3)];
    } else {
      ci2 = 0;
      output[o + 2] = '=';
    }
    if ((i + 2) < len) {
      output[o + 3] = base64Table[encode64Char4(cstr[i + 2])];
    } else {
      output[o + 3] = '=';
    }
    output[o] = base64Table[encode64Char1(cstr[i])];
    output[o + 1] = base64Table[encode64Char2(cstr[i], ci2)];
  }
  output[outputLength] = '\0';
  return output;
}
```