user: Converte this assembly snippet into its equivalent C code:

```asm
<bin2Base64PlusSlashEqualsOneLine>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  movslq %esi,%r13
  push   %r12
  mov    %r13d,%eax
  mov    %r13d,%r14d
  mov    %rdi,%r12
  push   %rbp
  sar    $0x1f,%eax
  mov    %rdx,%rbp
  mov    %r13d,%esi
  push   %rbx
  imul   $0x55555556,%r13,%rbx
  lea    D20(%rip),%rdi
  shr    $0x20,%rbx
  sub    $0x8,%rsp
  sub    %eax,%ebx
  lea    (%rbx,%rbx,2),%eax
  mov    %ebx,%edx
  sub    %eax,%r14d
  mov    %r14d,%ecx
  call   <printf@plt>
  cmp    $0x2,%r13d
  jle    L29
  mov    %r12,%rdi
  mov    %rbp,%r10
  lea    D47(%rip),%r8
  xor    %r9d,%r9d
  nopl   (%rax)
L19:
  mov    (%rdi),%ecx
  mov    0x4(%rdi),%eax
  add    $0x1,%r9d
  add    $0xc,%rdi
  mov    -0x4(%rdi),%edx
  add    $0x10,%r10
  mov    %ecx,%r15d
  mov    %eax,%r11d
  sar    $0x4,%eax
  shl    $0x6,%r15d
  lea    0x0(,%rdx,4),%esi
  shl    $0x4,%r11d
  sar    $0x2,%r15d
  sar    $0x2,%r11d
  sar    $0x6,%edx
  or     %r15d,%eax
  sar    $0x2,%esi
  sar    $0x2,%ecx
  cltq
  or     %r11d,%edx
  movslq %esi,%rsi
  mov    (%r8,%rsi,4),%esi
  mov    (%r8,%rax,4),%eax
  movslq %ecx,%rcx
  movslq %edx,%rdx
  movd   (%r8,%rdx,4),%xmm1
  movd   (%r8,%rcx,4),%xmm0
  movd   %esi,%xmm2
  movd   %eax,%xmm3
  punpckldq %xmm2,%xmm1
  punpckldq %xmm3,%xmm0
  punpcklqdq %xmm1,%xmm0
  movups %xmm0,-0x10(%r10)
  cmp    %r9d,%ebx
  jg     L19
L29:
  cmp    $0x2,%r14d
  je     L8
  cmp    $0x1,%r14d
  jne    L11
  mov    -0x4(%r12,%r13,4),%eax
  lea    D47(%rip),%rcx
  shl    $0x2,%ebx
  movslq %ebx,%rbx
  mov    %eax,%edx
  sar    $0x2,%eax
  shl    $0x6,%edx
  cltq
  sar    $0x2,%edx
  movd   (%rcx,%rax,4),%xmm0
  mov    D17(%rip),%rax
  movslq %edx,%rdx
  mov    (%rcx,%rdx,4),%edx
  mov    %rax,0x8(%rbp,%rbx,4)
  movd   %edx,%xmm5
  punpckldq %xmm5,%xmm0
  movq   %xmm0,0x0(%rbp,%rbx,4)
L11:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L8:
  shl    $0x2,%r13
  lea    D47(%rip),%rsi
  shl    $0x2,%ebx
  mov    -0x8(%r12,%r13,1),%edx
  mov    -0x4(%r12,%r13,1),%eax
  movslq %ebx,%rbx
  mov    %edx,%edi
  mov    %eax,%ecx
  sar    $0x4,%eax
  shl    $0x6,%edi
  shl    $0x4,%ecx
  sar    $0x2,%edi
  sar    $0x2,%edx
  or     %edi,%eax
  sar    $0x2,%ecx
  movslq %edx,%rdx
  cltq
  movd   (%rsi,%rdx,4),%xmm0
  movslq %ecx,%rcx
  mov    (%rsi,%rax,4),%eax
  mov    (%rsi,%rcx,4),%ecx
  movd   %eax,%xmm4
  lea    0x2(%rbx),%rax
  punpckldq %xmm4,%xmm0
  movq   %xmm0,0x0(%rbp,%rbx,4)
  movl   $0x3d,0x4(%rbp,%rax,4)
  mov    %ecx,0x0(%rbp,%rax,4)
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: parse_data
arguments: data_label: D20
data_type: string
name: parse_data
arguments: data_label: D47
data_type: string
name: parse_data
arguments: data_label: D17
data_type: byte[8]

tool: D20: inlen %i  sets %i  leftover %i


tool: D47: A

tool: {"D17": [0x3d,0x00,0x00,0x00,0x3d,0x00,0x00,0x00]}

assistant: ```c
void bin2Base64PlusSlashEqualsOneLine(uint8_t *in, uint64_t inLen, uint8_t *out) {
  static uint8_t sixBitsToHex[64] = {0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x2b, 0x2f};
  static uint8_t padding = 0x3d;
  uint64_t setsOfThree;
  uint64_t charsLeftOver;
  uint8_t outSet[4];
  uint8_t inSet[3];
  uint8_t inUnit;
  setsOfThree = inLen / 3;
  charsLeftOver = inLen % 3;
  printf("inlen %i  sets %i  leftover %i\n", (int)inLen, (int)setsOfThree, (int)charsLeftOver);
  fflush;
  for (int i = 0; i < setsOfThree; i++) {
    inSet[0] = in[i * 3];
    inSet[1] = in[i * 3 + 1];
    inSet[2] = in[i * 3 + 2];
    inUnit = inSet[0] >> 2;
    outSet[0] = sixBitsToHex[inUnit];
    inUnit = inSet[0] << 6;
    inUnit = inUnit >> 2;
    inUnit |= inSet[1] >> 4;
    outSet[1] = sixBitsToHex[inUnit];
    inUnit = inSet[1] << 4;
    inUnit = inUnit >> 2;
    inUnit |= (inSet[2] >> 6);
    outSet[2] = sixBitsToHex[inUnit];
    inUnit = inSet[2] << 2;
    inUnit = inUnit >> 2;
    outSet[3] = sixBitsToHex[inUnit];
    out[i * 4] = outSet[0];
    out[i * 4 + 1] = outSet[1];
    out[i * 4 + 2] = outSet[2];
    out[i * 4 + 3] = outSet[3];
  };
  if (charsLeftOver == 2) {
    inSet[0] = in[inLen - 2];
    inSet[1] = in[inLen - 1];
    inUnit = inSet[0] >> 2;
    outSet[0] = sixBitsToHex[inUnit];
    inUnit = inSet[0] << 6;
    inUnit = inUnit >> 2;
    inUnit |= inSet[1] >> 4;
    outSet[1] = sixBitsToHex[inUnit];
    inUnit = inSet[1] << 4;
    inUnit = inUnit >> 2;
    outSet[2] = sixBitsToHex[inUnit];
    outSet[3] = padding;
    out[setsOfThree * 4] = outSet[0];
    out[setsOfThree * 4 + 1] = outSet[1];
    out[setsOfThree * 4 + 2] = outSet[2];
    out[setsOfThree * 4 + 3] = outSet[3];
  };
  if (charsLeftOver == 1) {
    inSet[0] = in[inLen - 1];
    inUnit = inSet[0] >> 2;
    outSet[0] = sixBitsToHex[inUnit];
    inUnit = inSet[0] << 6;
    inUnit = inUnit >> 2;
    outSet[1] = sixBitsToHex[inUnit];
    outSet[2] = padding;
    outSet[3] = padding;
    out[setsOfThree * 4] = outSet[0];
    out[setsOfThree * 4 + 1] = outSet[1];
    out[setsOfThree * 4 + 2] = outSet[2];
    out[setsOfThree * 4 + 3] = outSet[3];
  };
}
```