user: Translate the below assembly code into C programming language:

```asm
<Base64Encode>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %r8d,0x8(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  movl   $0x0,0x14(%rsp)
  test   %edx,%edx
  jle    L76
  mov    %rsi,%rbp
  mov    %edx,%ebx
  mov    %ecx,%r12d
  mov    %rdi,%r15
  xor    %r14d,%r14d
  lea    0x14(%rsp),%r13
  jmp    L79
  nopl   0x0(%rax)
L11:
  mov    %r12d,%edx
  mov    %rbp,%rsi
  mov    %r13,%rdi
  add    $0x3,%r15
  call   <encodeblock@plt>
  cmp    %r14d,%ebx
  jle    L73
L79:
  movzbl (%r15),%eax
  lea    0x1(%r14),%edx
  mov    %al,0x14(%rsp)
  xor    %eax,%eax
  cmp    %edx,%ebx
  jle    L42
  movzbl 0x1(%r15),%eax
L42:
  lea    0x2(%r14),%edx
  mov    %al,0x15(%rsp)
  xor    %eax,%eax
  cmp    %ebx,%edx
  jge    L72
  movzbl 0x2(%r15),%eax
L72:
  mov    %al,0x16(%rsp)
  add    $0x3,%r14d
  mov    0x8(%rsp),%eax
  xor    %r8d,%r8d
  mov    %r14d,%ecx
  sub    %ebx,%ecx
  test   %eax,%eax
  je     L11
  mov    %ebx,%esi
  lea    D2(%rip),%rdi
  xor    %eax,%eax
  mov    %ecx,0xc(%rsp)
  call   <printf@plt>
  mov    %r14d,%esi
  lea    D47(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0xc(%rsp),%esi
  lea    D42(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  movzbl 0x14(%rsp),%esi
  lea    D9(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  movzbl 0x15(%rsp),%esi
  lea    D9(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  movzbl 0x16(%rsp),%esi
  lea    D9(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D30(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x8(%rsp),%r8d
  mov    0xc(%rsp),%ecx
  jmp    L11
L76:
  xor    %eax,%eax
  nopl   0x0(%rax,%rax,1)
L73:
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L35
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L35:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D2
type_guessed: string
name: parse_data
arguments: label: D47
type_guessed: string
name: parse_data
arguments: label: D42
type_guessed: string
name: parse_data
arguments: label: D9
type_guessed: string
name: parse_data
arguments: label: D30
type_guessed: string

tool: D2: iplen = %i ,

tool: D47: ipindex = %i ,

tool: D42: delta = %i ,

tool: D9: %02x 

tool: D30:  => 

assistant: ```c
int Base64Encode(unsigned char *input, char *output, int inputlen, int oplen, int debug) {
  int rc = 0, del = 0;
  int index = 0, ipindex = 0, iplen = 0;
  unsigned char encoderinput[3 + 1] = "";
  iplen = inputlen;
  while (ipindex < iplen) {
    for (index = 0; index < 3; index++) {
      if (ipindex < iplen) {
        encoderinput[index] = input[ipindex];
      } else {
        encoderinput[index] = 0;
      }
      ipindex++;
    }
    del = ipindex - iplen;
    if (debug) {
      printf("iplen = %i ,", iplen);
      printf("ipindex = %i ,", ipindex);
      printf("delta = %i ,", del);
      printf("%02x ", encoderinput[0]);
      printf("%02x ", encoderinput[1]);
      printf("%02x ", encoderinput[2]);
      printf(" => ");
    }
    rc = encodeblock(encoderinput, output, oplen, del, debug);
  }
  return rc;
}
```