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

```asm
<Base64Encode>:
  endbr64
  push   %r15
  push   %r14
  mov    %rdx,%r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  test   %esi,%esi
  jle    L93
  mov    %rdi,%r13
  mov    %esi,%ebp
  xor    %ebx,%ebx
  xor    %r12d,%r12d
  lea    -0x1(%rcx),%r15d
  nopl   0x0(%rax,%rax,1)
L14:
  lea    -0x1(%rbp),%edx
  mov    $0x2,%esi
  mov    %edx,%edi
  mov    %edx,0xc(%rsp)
  call   <min@plt>
  mov    0xc(%rsp),%edx
  mov    %ebx,%ecx
  lea    0x1(%rbx),%edi
  lea    0x4(%r13),%rsi
  test   %edx,%edx
  jle    L176
  lea    -0x2(%rbp),%edx
  lea    0x8(%r13),%rsi
  test   %edx,%edx
  jle    L176
  mov    0x8(%r13),%edx
  sub    $0x3,%ebp
  add    $0xc,%r13
L13:
  add    %edi,%eax
  cmp    %r12d,%r15d
  jle    L51
  mov    %edx,%r8d
  lea    0x3(%rcx),%r9d
  mov    $0x3d,%esi
  sar    $0x6,%r8d
  cmp    %r9d,%eax
  jl     L71
  mov    %edx,%r9d
  and    $0x3f,%r9d
  lea    0x41(%r9),%esi
  cmp    $0x19,%r9b
  jle    L71
  lea    0x47(%r9),%esi
  cmp    $0x33,%r9b
  jle    L71
  lea    -0x4(%r9),%esi
  cmp    $0x3d,%r9b
  jg     L299
  nopl   0x0(%rax,%rax,1)
L71:
  mov    %sil,0x3(%r14,%rbx,1)
  lea    0x1(%r12),%esi
  add    $0x2,%ecx
  cmp    %esi,%r15d
  jle    L319
  mov    %ecx,%esi
  mov    $0x3d,%r9d
  add    %r14,%rsi
  cmp    %ecx,%eax
  jl     L318
  mov    %r8d,%ecx
  and    $0x3f,%ecx
  lea    0x41(%rcx),%r9d
  cmp    $0x19,%cl
  jle    L318
  lea    0x47(%rcx),%r9d
  cmp    $0x33,%cl
  jle    L318
  lea    -0x4(%rcx),%r9d
  cmp    $0x3d,%cl
  jg     L61
  nopw   0x0(%rax,%rax,1)
L318:
  mov    %r9b,(%rsi)
  mov    %edx,%ecx
  lea    0x2(%r12),%esi
  sar    $0xc,%ecx
  cmp    %esi,%r15d
  jle    L319
  mov    $0x3d,%esi
  cmp    %eax,%edi
  jg     L128
  and    $0x3f,%ecx
  lea    0x41(%rcx),%esi
  cmp    $0x19,%cl
  jle    L128
  lea    0x47(%rcx),%esi
  cmp    $0x33,%cl
  jle    L128
  lea    -0x4(%rcx),%esi
  cmp    $0x3d,%cl
  jg     L99
  xchg   %ax,%ax
L128:
  lea    0x3(%r12),%ecx
  mov    %sil,0x1(%r14,%rbx,1)
  sar    $0x12,%edx
  cmp    %ecx,%r15d
  jle    L177
  mov    $0x3d,%ecx
  cmp    %ebx,%eax
  jl     L3
  mov    %edx,%eax
  and    $0x3f,%eax
  lea    0x41(%rax),%ecx
  cmp    $0x19,%al
  jle    L3
  lea    0x47(%rax),%ecx
  cmp    $0x33,%al
  jle    L3
  lea    -0x4(%rax),%ecx
  cmp    $0x3d,%al
  jg     L284
  nopl   (%rax)
L3:
  mov    %cl,(%r14,%rbx,1)
  add    $0x4,%r12d
L51:
  test   %ebp,%ebp
  je     L258
L194:
  add    $0x4,%rbx
  jmp    L14
  nopl   (%rax)
L176:
  mov    %rsi,%r13
  xor    %edx,%edx
  xor    %ebp,%ebp
  jmp    L13
  nopl   0x0(%rax)
L319:
  mov    %esi,%r12d
  test   %ebp,%ebp
  jne    L194
  nop
L258:
  movslq %r12d,%rax
  add    %rax,%r14
L98:
  movb   $0x0,(%r14)
  add    $0x18,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L299:
  cmp    $0x3f,%r9b
  sete   %sil
  lea    0x2b(,%rsi,4),%esi
  jmp    L71
  nopl   0x0(%rax)
L61:
  cmp    $0x3f,%cl
  sete   %r9b
  lea    0x2b(,%r9,4),%r9d
  jmp    L318
  nopl   0x0(%rax)
L99:
  cmp    $0x3f,%cl
  sete   %sil
  lea    0x2b(,%rsi,4),%esi
  jmp    L128
  nopl   0x0(%rax,%rax,1)
L284:
  cmp    $0x3f,%al
  sete   %cl
  lea    0x2b(,%rcx,4),%ecx
  jmp    L3
  nopl   0x0(%rax)
L177:
  mov    %ecx,%r12d
  jmp    L51
L93:
  xor    %r12d,%r12d
  jmp    L98
```

assistant: ```c
int Base64Encode(uint8_t *pSrc, int SrcLen, char *pDest, int DstLen) {
  int idx = 0;
  uint32_t d = 0;
  uint8_t *p = (uint8_t *)&d;
  int len;
  int cnt = 0;
  while (SrcLen > 0) {
    d = 0;
    len = min(SrcLen - 1, 2);
    for (int i = 2; i >= 0 && SrcLen > 0; i--) {
      p[i] = *pSrc;
      pSrc++;
      SrcLen--;
    }
    len += 1 + idx;
    for (int i = idx + 3; i >= idx && cnt < DstLen - 1; i--) {
      if (i > len)
        pDest[i] = '=';
      else {
        pDest[i] = d & 0x3f;
        if (pDest[i] < 26)
          pDest[i] += 'A';
        else if (pDest[i] < 52)
          pDest[i] += 'a' - 26;
        else if (pDest[i] < 62)
          pDest[i] += '0' - 52;
        else if (pDest[i] == 63)
          pDest[i] = '/';
        else
          pDest[i] = '+';
      }
      d >>= 6;
      cnt++;
    }
    idx += 4;
  }
  pDest[cnt] = '\0';
  return cnt;
}
```