// File: /workspace/github_cpp_makefile_star2_O2/occivink[P]pyct/pyct.cpp
// Function: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> to_base_64<std::vector<unsigned char, std::allocator<unsigned char>>>(std::vector<unsigned char, std::allocator<unsigned char>> const&)
string to_base_64(const T& bytes)
{
    static const array<char, 64> table = {
        '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','+','-',
    };
    string ret;
    auto s = bytes.size();
    ret.reserve(4 * (s / 3 + (s % 3 > 0 ? 1 : 0)));
    size_t i = 0;
    if (bytes.size() >= 3) {
        for (; i <= bytes.size() - 3; i += 3) {
            ret += table[(bytes[i]   & 0b11111100) >> 2];
            ret += table[(bytes[i]   & 0b00000011) << 4 |
                         (bytes[i+1] & 0b11110000) >> 4];
            ret += table[(bytes[i+1] & 0b00001111) << 2 |
                         (bytes[i+2] & 0b11000000) >> 6];
            ret += table[(bytes[i+2] & 0b00111111)];
        }
    }
    if (i + 1 == bytes.size()) {
        ret += table[(bytes[i] & 0b11111100) >> 2];
        ret += table[(bytes[i] & 0b00000011) << 4];
        ret += '=';
        ret += '=';
    } else if ((i + 2) == bytes.size()) {
        ret += table[(bytes[i]   & 0b11111100) >> 2];
        ret += table[(bytes[i]   & 0b00000011) << 4 |
                     (bytes[i+1] & 0b11110000) >> 4];
        ret += table[(bytes[i+1] & 0b00001111) << 2];
        ret += '=';
    }
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movq %rsi, %r14
movb $0x0, 0x10(%rdi)
movq 0x8(%rsi), %rax
subq (%rsi), %rax
pushq $0x3
popq %rcx
xorl %edx, %edx
divq %rcx
cmpq $0x1, %rdx
sbbq $-0x1, %rax
leaq (,%rax,4), %rsi
callq 0x2320
movq (%r14), %rax
movq 0x8(%r14), %rcx
movq %rcx, %rdx
subq %rax, %rdx
leaq 0x27a6(%rip), %r15      # 0xd9a0
xorl %r12d, %r12d
cmpq $0x3, %rdx
jb 0xb2a3
subq %rax, %rcx
leaq -0x3(%rcx), %rdx
cmpq %rdx, %r12
ja 0xb2a0
movzbl (%rax,%r12), %eax
shrl $0x2, %eax
movsbl (%rax,%r15), %esi
movq %rbx, %rdi
callq 0x2180
movq (%r14), %rax
movzbl (%rax,%r12), %ecx
shll $0x4, %ecx
andl $0x30, %ecx
movzbl 0x1(%rax,%r12), %eax
shrl $0x4, %eax
orl %ecx, %eax
movsbl (%rax,%r15), %esi
movq %rbx, %rdi
callq 0x2180
movq (%r14), %rax
movzbl 0x1(%rax,%r12), %ecx
andl $0xf, %ecx
movzbl 0x2(%rax,%r12), %eax
shrl $0x6, %eax
leal (%rax,%rcx,4), %eax
movsbl (%rax,%r15), %esi
movq %rbx, %rdi
callq 0x2180
movq (%r14), %rax
movzbl 0x2(%rax,%r12), %eax
andl $0x3f, %eax
movsbl (%rax,%r15), %esi
movq %rbx, %rdi
callq 0x2180
addq $0x3, %r12
movq (%r14), %rax
movq 0x8(%r14), %rcx
jmp 0xb207
movq %rcx, %rdx
leaq 0x1(%r12), %r13
cmpq %rdx, %r13
jne 0xb2e2
movzbl (%rax,%r12), %eax
shrl $0x2, %eax
movsbl (%rax,%r15), %esi
movq %rbx, %rdi
callq 0x2180
movq (%r14), %rax
movzbl (%rax,%r12), %eax
shll $0x4, %eax
andl $0x30, %eax
movsbl (%rax,%r15), %esi
movb $0x3d, %bpl
movq %rbx, %rdi
callq 0x2180
jmp 0xb336
leaq 0x2(%r12), %rcx
cmpq %rdx, %rcx
jne 0xb34d
movzbl (%rax,%r12), %eax
shrl $0x2, %eax
movsbl (%rax,%r15), %esi
movq %rbx, %rdi
callq 0x2180
movq (%r14), %rax
movzbl (%rax,%r12), %ecx
shll $0x4, %ecx
andl $0x30, %ecx
movzbl 0x1(%rax,%r12), %eax
shrl $0x4, %eax
orl %ecx, %eax
movsbl (%rax,%r15), %esi
movq %rbx, %rdi
callq 0x2180
movq (%r14), %rax
movzbl (%rax,%r13), %eax
andl $0xf, %eax
movb (%r15,%rax,4), %bpl
movsbl %bpl, %esi
movq %rbx, %rdi
callq 0x2180
pushq $0x3d
popq %rsi
movq %rbx, %rdi
callq 0x2180
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xb363
jmp 0xb363
movq %rax, %r14
movq %rbx, %rdi
callq 0x20e0
movq %r14, %rdi
callq 0x2380