LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: night-shift[P]Srl/src/lib/PMsgPack.cpp
// Function: std::enable_if<Srl::TpTools::is_fp(Srl::Type)((Srl::Type)9), void>::type (anonymous namespace)::write_scalar<(Srl::Type)9>(Srl::Value const&, Srl::Lib::Out&)
typename enable_if<TpTools::is_fp(TP), void>::type
    write_scalar (const Value& val, Out& out)
    {
        if(TP == Type::FP32) {
            out.write_byte(0xCA);

            auto fp = val.pblock().fp32;
            auto swapped = swap_bytes(fp);

            out.write(swapped);

        } else {
            out.write_byte(0xCB);

            auto fp = val.pblock().fp64;
            auto swapped = swap_bytes(fp);

            out.write(swapped);
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0xca, %esi
callq 0x366f0
movq -0x8(%rbp), %rdi
callq 0x34bd0
movss (%rax), %xmm0
movss %xmm0, -0x14(%rbp)
movss -0x14(%rbp), %xmm0
callq 0x59240
movss %xmm0, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x35420
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: night-shift[P]Srl/src/lib/PMsgPack.cpp
// Function: (anonymous namespace)::write_bin(Srl::Lib::MemBlock const&, Srl::Lib::Out&)
void write_bin(const MemBlock& block, Out& out)
    {
        if(block.size <= 255) {
            out.write_byte(0xC4);
            out.write_byte(block.size);

        } else if (block.size <= 0xFFFE) {
            uint16_t sz = block.size;
            out.write_byte(0xC5);
            out.write(sz);

        } else {
            uint32_t sz = block.size;
            out.write_byte(0xC6);
            out.write(sz);
        }

        out.write(block.ptr, block.size);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0xff, 0x8(%rax)
ja 0x58e52
movq -0x10(%rbp), %rdi
movl $0xc4, %esi
callq 0x366f0
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movzbl %al, %esi
callq 0x366f0
jmp 0x58eb1
movq -0x8(%rbp), %rax
cmpq $0xfffe, 0x8(%rax)      # imm = 0xFFFE
ja 0x58e89
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movw %ax, -0x12(%rbp)
movq -0x10(%rbp), %rdi
movl $0xc5, %esi
callq 0x366f0
movq -0x10(%rbp), %rdi
leaq -0x12(%rbp), %rsi
callq 0x34610
jmp 0x58eaf
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl $0xc6, %esi
callq 0x366f0
movq -0x10(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x332f0
jmp 0x58eb1
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdx
callq 0x364e0
addq $0x20, %rsp
popq %rbp
retq
nop
// File: night-shift[P]Srl/src/lib/PMsgPack.cpp
// Function: (anonymous namespace)::write_pfixnum(unsigned long, Srl::Lib::Out&)
bool write_pfixnum(uint64_t i, Out& out)
    {
        if(i > 0x7F) {
            return false;
        }

        out.write_byte(i);
        return true;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x7f, -0x10(%rbp)
jbe 0x58eed
movb $0x0, -0x1(%rbp)
jmp 0x58f01
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl %al, %esi
callq 0x366f0
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: night-shift[P]Srl/src/lib/PMsgPack.cpp
// Function: (anonymous namespace)::write_nfixnum(long, Srl::Lib::Out&)
bool write_nfixnum(int64_t i, Out& out)
    {
        if(i > -1 || i < -31) {
            return false;
        }

        out.write_byte(0xE0 | (uint8_t)i);
        return true;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $-0x1, -0x10(%rbp)
jg 0x58f2e
cmpq $-0x1f, -0x10(%rbp)
jge 0x58f34
movb $0x0, -0x1(%rbp)
jmp 0x58f50
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl %al, %eax
orl $0xe0, %eax
movzbl %al, %esi
callq 0x366f0
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: night-shift[P]Srl/src/lib/PMsgPack.cpp
// Function: (anonymous namespace)::get_str_size(unsigned char, Srl::Lib::In&)
size_t get_str_size(uint8_t prefix, In& in)
    {
        assert(prefix_is_str(prefix));

        return prefix >= 0xA0 && prefix <= 0xBF ? (prefix & 0x1F)
             : prefix == 0xD9 ? in.read_move<uint8_t>(error)
             : prefix == 0xDA ? in.read_move<uint16_t>(error)
             : in.read_move<uint32_t>(error);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dil, %al
movb %al, -0x1(%rbp)
movq %rsi, -0x10(%rbp)
movzbl -0x1(%rbp), %edi
callq 0x58330
testb $0x1, %al
jne 0x59341
jmp 0x59343
jmp 0x59362
leaq 0x10912(%rip), %rdi     # 0x69c5c
leaq 0x10791(%rip), %rsi     # 0x69ae2
movl $0x11b, %edx            # imm = 0x11B
leaq 0x10915(%rip), %rcx     # 0x69c72
callq 0x349a0
movzbl -0x1(%rbp), %eax
cmpl $0xa0, %eax
jl 0x59384
movzbl -0x1(%rbp), %eax
cmpl $0xbf, %eax
jg 0x59384
movzbl -0x1(%rbp), %eax
andl $0x1f, %eax
movl %eax, -0x14(%rbp)
jmp 0x593e9
movzbl -0x1(%rbp), %eax
cmpl $0xd9, %eax
jne 0x593a7
movq -0x10(%rbp), %rdi
leaq 0x2dc46(%rip), %rsi     # 0x86fe0
callq 0x34dd0
movzbl %al, %eax
movl %eax, -0x18(%rbp)
jmp 0x593e3
movzbl -0x1(%rbp), %eax
cmpl $0xda, %eax
jne 0x593ca
movq -0x10(%rbp), %rdi
leaq 0x2dc23(%rip), %rsi     # 0x86fe0
callq 0x333d0
movzwl %ax, %eax
movl %eax, -0x1c(%rbp)
jmp 0x593dd
movq -0x10(%rbp), %rdi
leaq 0x2dc0b(%rip), %rsi     # 0x86fe0
callq 0x33ba0
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: night-shift[P]Srl/src/lib/PMsgPack.cpp
// Function: (anonymous namespace)::read_num(unsigned char, Srl::Lib::In&)
Value read_num(uint8_t prefix, In& in)
    {
        switch(prefix) {
            case 0xCA : return read_num<Type::FP32>(in);
            case 0xCB : return read_num<Type::FP64>(in);
            case 0xCC : return read_num<Type::UI8>(in);
            case 0xCD : return read_num<Type::UI16>(in);
            case 0xCE : return read_num<Type::UI32>(in);
            case 0xCF : return read_num<Type::UI64>(in);
            case 0xD0 : return read_num<Type::I8>(in);
            case 0xD1 : return read_num<Type::I16>(in);
            case 0xD2 : return read_num<Type::I32>(in);
            case 0xD3 : return read_num<Type::I64>(in);

            default : error(); return Value(Type::Null);
        };
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x28(%rbp)
movb %sil, %al
movq %rdi, -0x20(%rbp)
movb %al, -0x1(%rbp)
movq %rdx, -0x10(%rbp)
movzbl -0x1(%rbp), %eax
addl $0xffffff36, %eax       # imm = 0xFFFFFF36
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0x9, %eax
ja 0x59525
movq -0x18(%rbp), %rax
leaq 0x105eb(%rip), %rcx     # 0x69a68
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x595c0
jmp 0x5953f
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x59610
jmp 0x5953f
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x59660
jmp 0x5953f
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x596b0
jmp 0x5953f
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x59700
jmp 0x5953f
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x59750
jmp 0x5953f
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x597a0
jmp 0x5953f
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x597f0
jmp 0x5953f
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x59840
jmp 0x5953f
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x59890
jmp 0x5953f
leaq 0x2dab4(%rip), %rdi     # 0x86fe0
callq 0x35bb0
movq -0x28(%rbp), %rdi
movl $0xb, %esi
callq 0x33ff0
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: night-shift[P]Srl/src/lib/PMsgPack.cpp
// Function: (anonymous namespace)::read_fixnum(unsigned char)
Value read_fixnum(uint8_t prefix)
    {
        auto is_neg_fixnum = (1 << 7) & prefix;

        int val;
        if(is_neg_fixnum) {

            uint8_t neg_max = 1 + (0xFF >> 3);
            val = (0xFF >> 3) & prefix;
            val = val - (int)neg_max;

        } else {
            val = (0xFF >> 1) & prefix;
        }

        return Value(val);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x20(%rbp)
movb %sil, %al
movq %rdi, -0x18(%rbp)
movb %al, -0x1(%rbp)
movzbl -0x1(%rbp), %eax
andl $0x80, %eax
movl %eax, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
je 0x59594
movb $0x20, -0xd(%rbp)
movzbl -0x1(%rbp), %eax
andl $0x1f, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movzbl -0xd(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0xc(%rbp)
jmp 0x5959e
movzbl -0x1(%rbp), %eax
andl $0x7f, %eax
movl %eax, -0xc(%rbp)
movq -0x20(%rbp), %rdi
leaq -0xc(%rbp), %rsi
callq 0x364b0
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: night-shift[P]Srl/src/lib/PMsgPack.cpp
// Function: (anonymous namespace)::get_bin_size(unsigned char, Srl::Lib::In&)
size_t get_bin_size(uint8_t prefix, In& in)
    {
        assert(prefix_is_bin(prefix));

        return prefix == 0xC4 ? in.read_move<uint8_t>(error)
             : prefix == 0xC5 ? in.read_move<uint16_t>(error)
             : in.read_move<uint32_t>(error);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dil, %al
movb %al, -0x1(%rbp)
movq %rsi, -0x10(%rbp)
movzbl -0x1(%rbp), %edi
callq 0x587b0
testb $0x1, %al
jne 0x59901
jmp 0x59903
jmp 0x59922
leaq 0x103f3(%rip), %rdi     # 0x69cfd
leaq 0x101d1(%rip), %rsi     # 0x69ae2
movl $0x125, %edx            # imm = 0x125
leaq 0x103f6(%rip), %rcx     # 0x69d13
callq 0x349a0
movzbl -0x1(%rbp), %eax
cmpl $0xc4, %eax
jne 0x59945
movq -0x10(%rbp), %rdi
leaq 0x2d6a8(%rip), %rsi     # 0x86fe0
callq 0x34dd0
movzbl %al, %eax
movl %eax, -0x14(%rbp)
jmp 0x59981
movzbl -0x1(%rbp), %eax
cmpl $0xc5, %eax
jne 0x59968
movq -0x10(%rbp), %rdi
leaq 0x2d685(%rip), %rsi     # 0x86fe0
callq 0x333d0
movzwl %ax, %eax
movl %eax, -0x18(%rbp)
jmp 0x5997b
movq -0x10(%rbp), %rdi
leaq 0x2d66d(%rip), %rsi     # 0x86fe0
callq 0x33ba0
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: night-shift[P]Srl/include/Srl/Out.hpp
// Function: Srl::Lib::Out::write(Srl::Lib::Out::Ticket&, unsigned char const*, unsigned long, unsigned long)
inline void Out::write(Out::Ticket& ticket, const uint8_t* bytes, size_t offset, size_t nbytes)
    {
        assert(ticket.size >= offset + nbytes);

        if(!this->streaming || ticket.seg_id == this->state.segs_flushed) {
            memcpy(ticket.mem + offset, bytes, nbytes);

        } else {
            auto crr = this->stream->tellp();

            this->stream->seekp(ticket.pos + offset);
            this->stream->write((const char*)bytes, nbytes);

            this->stream->seekp(crr);
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x20(%rbp), %rcx
addq -0x28(%rbp), %rcx
cmpq %rcx, %rax
jb 0x59d9b
jmp 0x59dba
leaq 0xfd9f(%rip), %rdi      # 0x69b41
leaq 0xfdb7(%rip), %rsi      # 0x69b60
movl $0x2c, %edx
leaq 0xfdbf(%rip), %rcx      # 0x69b74
callq 0x349a0
movq -0x60(%rbp), %rax
testb $0x1, 0x80(%rax)
je 0x59dd9
movq -0x60(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpq 0x68(%rcx), %rax
jne 0x59df6
movq -0x10(%rbp), %rax
movq (%rax), %rdi
addq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x35360
jmp 0x59e86
movq -0x60(%rbp), %rax
movq 0x88(%rax), %rdi
callq 0x35460
movq %rax, %rcx
movq -0x60(%rbp), %rax
movq %rcx, -0x38(%rbp)
movq %rdx, -0x30(%rbp)
movq 0x88(%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
addq -0x20(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x360a0
movq -0x68(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x365c0
movq -0x60(%rbp), %rax
movq 0x88(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x369d0
movq -0x60(%rbp), %rax
movq 0x88(%rax), %rdi
movq -0x38(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
callq 0x365c0
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
// File: night-shift[P]Srl/include/Srl/Out.hpp
// Function: Srl::Lib::Out::reserve(unsigned long)
inline Out::Ticket Out::reserve(size_t nbytes)
    {
        auto pos = this->state.sz_total;
        auto* reserved = this->alloc(nbytes);
        memset(reserved, 0, nbytes);

        return { reserved, nbytes, pos, this->state.segs_flushed };
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x30(%rbp)
movq %rdi, -0x28(%rbp)
movq %rsi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x38(%rbp)
movq 0x50(%rdi), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rsi
callq 0x34fb0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rdx
xorl %esi, %esi
callq 0x343e0
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq 0x68(%rax), %r8
callq 0x34580
movq -0x28(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: night-shift[P]Srl/include/Srl/In.hpp
// Function: unsigned char Srl::Lib::In::read_move<unsigned char>(std::function<void ()> const&)
T In::read_move(const Error& error)
    {
        auto block = this->read_block(sizeof(T), error);

        if(block.size < sizeof(T)) {
            return T();
        }

        return Aux::read<T>(block.ptr);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movl $0x1, %esi
callq 0x386b0
movq %rax, -0x28(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x1, -0x20(%rbp)
jae 0x59ff7
movb $0x0, -0x1(%rbp)
jmp 0x5a003
movq -0x28(%rbp), %rdi
callq 0x34d40
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: night-shift[P]Srl/include/Srl/Aux.h
// Function: unsigned int Srl::Lib::Aux::read<unsigned int>(unsigned char const*)
T read (const uint8_t* address)
    {
        if((size_t)address % sizeof(T) == 0) {
            return *reinterpret_cast<const T*>(address);

        } else {
            T t;
            memcpy(reinterpret_cast<uint8_t*>(&t), address, sizeof(T));
            return t;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x5b721
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x5b730
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: night-shift[P]Srl/include/Srl/Value.hpp
// Function: Srl::Value::Value<double>(double const&)
Value::Value(const T& val)
        : block(sizeof(T), TpTools::SrlType<T>::type, Encoding::Unknown)
    {
        static_assert(Lib::is_numeric<T>::value, "Cannot create Value from non-numeric type.");

        const auto tp = TpTools::SrlType<T>::type;

        if(tp == Type::FP64) {
            if((float)val == val) {
                this->block.fp32 = val;
                this->block.size = 4;
                this->block.type = Type::FP32;

            } else {
                this->block.fp64 = val;
            }

        } else if(tp == Type::FP32) {
            this->block.fp32 = val;

        } else if(TpTools::is_signed(tp)) {
            this->block.i64 = val;

        } else {
            this->block.ui64 = val;
        }

        this->block.stored_local = true;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movq $0x0, (%rdi)
addq $0x8, %rdi
movl $0x8, %esi
movl $0xa, %edx
xorl %ecx, %ecx
callq 0x372b0
movb $0xa, -0x11(%rbp)
movq -0x10(%rbp), %rax
movsd (%rax), %xmm0
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x10(%rbp), %rax
ucomisd (%rax), %xmm0
jne 0x5bd66
jp 0x5bd66
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movsd (%rcx), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x8(%rax)
movl $0x4, 0x10(%rax)
movb $0x9, 0x14(%rax)
jmp 0x5bd77
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movsd (%rcx), %xmm0
movsd %xmm0, 0x8(%rax)
movq -0x20(%rbp), %rax
movb $0x1, 0x16(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: night-shift[P]Srl/src/lib/PSrl.cpp
// Function: Srl::PSrl::write_head(unsigned char, Srl::Lib::MemBlock const&, Srl::Lib::Out&)
void PSrl::write_head(Flag flag, const MemBlock& str, Out& out)
{
    if(str.size < 1 || scope == Type::Null || scope == Type::Array) {
        out.write_byte(flag);
        return;
    }

    flag |= FNamed;

    auto nstrings = this->hashed_strings.num_entries();

    bool exists; size_t* index;
    tie(exists, index) = this->hashed_strings.insert(str, nstrings);

    if(exists) {
        out.write_byte(flag | FIndexed);
        encode_integer(*index, out);

    } else {
        out.write_byte(flag);
        encode_integer(str.size, out);
        out.write(str);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x1, 0x8(%rax)
jb 0x5c831
movq -0x60(%rbp), %rax
cmpb $0xb, 0x8(%rax)
je 0x5c831
movq -0x60(%rbp), %rax
cmpb $0xf, 0x8(%rax)
jne 0x5c843
movq -0x20(%rbp), %rdi
movzbl -0x9(%rbp), %esi
callq 0x366f0
jmp 0x5c8f4
movq -0x60(%rbp), %rdi
movzbl -0x9(%rbp), %eax
orl $0x2, %eax
movb %al, -0x9(%rbp)
addq $0xc8, %rdi
callq 0x374a0
movq -0x60(%rbp), %rdi
movq %rax, -0x28(%rbp)
addq $0xc8, %rdi
movq -0x18(%rbp), %rsi
leaq -0x28(%rbp), %rdx
callq 0x344d0
movb %al, -0x48(%rbp)
movq %rdx, -0x40(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x29(%rbp), %rsi
leaq -0x38(%rbp), %rdx
callq 0x37db0
leaq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x376a0
testb $0x1, -0x29(%rbp)
je 0x5c8c9
movq -0x20(%rbp), %rdi
movzbl -0x9(%rbp), %eax
orl $0x4, %eax
movzbl %al, %esi
callq 0x366f0
movq -0x38(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x5c900
jmp 0x5c8f4
movq -0x20(%rbp), %rdi
movzbl -0x9(%rbp), %esi
callq 0x366f0
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x5c900
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x35550
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: night-shift[P]Srl/src/lib/PSrl.cpp
// Function: (anonymous namespace)::encode_integer(unsigned long, Srl::Lib::Out&)
void encode_integer(uint64_t integer, Out& out)
    {
        uint8_t buffer[10];
        auto sz = 0U;

        while(integer >= mask_msb) {
            auto block = (integer | mask_msb);
            integer >>= 7;
            buffer[sz++] = (uint8_t)block;
        }

        /* just the lowest 7 bits left */
        buffer[sz++] = (uint8_t)integer;
        out.write(buffer, sz);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x20(%rbp)
cmpq $0x80, -0x8(%rbp)
jb 0x5c954
movq -0x8(%rbp), %rax
orq $0x80, %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
shrq $0x7, %rax
movq %rax, -0x8(%rbp)
movq -0x28(%rbp), %rax
movb %al, %cl
movl -0x20(%rbp), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, -0x20(%rbp)
movl %eax, %eax
movb %cl, -0x1a(%rbp,%rax)
jmp 0x5c917
movq -0x8(%rbp), %rax
movb %al, %cl
movl -0x20(%rbp), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, -0x20(%rbp)
movl %eax, %eax
movb %cl, -0x1a(%rbp,%rax)
movq -0x10(%rbp), %rdi
leaq -0x1a(%rbp), %rsi
movl -0x20(%rbp), %eax
movl %eax, %edx
callq 0x364e0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: night-shift[P]Srl/src/lib/PSrl.cpp
// Function: Srl::PSrl::read_head(Srl::Lib::In&)
pair<Flag, MemBlock> PSrl::read_head(In& source)
{
    auto flag = source.read_move<uint8_t>(error);

    if(!(flag & FNamed) || scope == Type::Null || scope == Type::Array) {
        return { flag, MemBlock() };
    }

    if(flag & FIndexed) {
        auto index = decode_integer(source);
        if(index >= this->indexed_strings.size()) {
            error();
        }

        return { flag, this->indexed_strings[index] };

    } else {
        auto size  = decode_integer(source);
        auto block = source.read_block(size, error);

        if(source.is_streaming()) {
            block = Aux::copy(this->string_buffer, block);
        }

        auto& str = *this->indexed_strings.insert(indexed_strings.end(), block);

        return { flag, str };
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x90(%rbp)
movq %rdi, -0x88(%rbp)
movq %rsi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x2a8dc(%rip), %rsi     # 0x872a0
callq 0x34dd0
movb %al, -0x11(%rbp)
movzbl -0x11(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x5c9ec
movq -0x80(%rbp), %rax
cmpb $0xb, 0x8(%rax)
je 0x5c9ec
movq -0x80(%rbp), %rax
cmpb $0xf, 0x8(%rax)
jne 0x5ca0e
leaq -0x28(%rbp), %rdi
callq 0x374c0
movq -0x90(%rbp), %rdi
leaq -0x11(%rbp), %rsi
leaq -0x28(%rbp), %rdx
callq 0x36190
jmp 0x5cb49
movzbl -0x11(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x5ca83
movq -0x10(%rbp), %rdi
callq 0x5cb60
movq -0x80(%rbp), %rdi
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x98(%rbp)
addq $0x10, %rdi
callq 0x385b0
movq %rax, %rcx
movq -0x98(%rbp), %rax
cmpq %rcx, %rax
jb 0x5ca5a
leaq 0x2a84b(%rip), %rdi     # 0x872a0
callq 0x35bb0
movq -0x80(%rbp), %rdi
addq $0x10, %rdi
movq -0x30(%rbp), %rsi
callq 0x363f0
movq -0x90(%rbp), %rdi
movq %rax, %rdx
leaq -0x11(%rbp), %rsi
callq 0x34340
jmp 0x5cb49
movq -0x10(%rbp), %rdi
callq 0x5cb60
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
leaq 0x2a801(%rip), %rdx     # 0x872a0
callq 0x386b0
movq %rax, -0x48(%rbp)
movq %rdx, -0x40(%rbp)
movq -0x10(%rbp), %rdi
callq 0x35130
testb $0x1, %al
jne 0x5cabb
jmp 0x5cae4
movq -0x80(%rbp), %rdi
addq $0x28, %rdi
leaq -0x48(%rbp), %rsi
callq 0x34650
movq %rax, -0x58(%rbp)
movq %rdx, -0x50(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x80(%rbp), %rdi
movq %rdi, %rax
addq $0x10, %rax
movq %rax, -0xa0(%rbp)
addq $0x10, %rdi
callq 0x361b0
movq %rax, -0x78(%rbp)
leaq -0x70(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x350d0
movq -0xa0(%rbp), %rdi
movq -0x70(%rbp), %rsi
leaq -0x48(%rbp), %rdx
callq 0x38c80
movq %rax, -0x68(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x38be0
movq -0x90(%rbp), %rdi
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rdx
leaq -0x11(%rbp), %rsi
callq 0x34340
movq -0x88(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax)
// File: night-shift[P]Srl/src/lib/PSrl.cpp
// Function: (anonymous namespace)::decode_integer(Srl::Lib::In&)
uint64_t decode_integer(In& source)
    {
        uint8_t  block       = *source.pointer();
        uint64_t out_integer = mask_reset_msb & block;

        auto shift = 7U;
        /* first block w/o msb set is the last 8-bit block of the integer to decode */
        while(mask_msb & block) {
            source.move(1, error);
            block = *source.pointer();
            out_integer |= (mask_reset_msb & block) << shift;
            shift += 7;
        }

        /* no support for integers > 64 bit */
        if(shift > 10 * 7) {
            error();
        }

        source.move(1, error);

        return out_integer;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x34240
movb (%rax), %al
movb %al, -0x9(%rbp)
movzbl -0x9(%rbp), %eax
andq $0x7f, %rax
movq %rax, -0x18(%rbp)
movl $0x7, -0x1c(%rbp)
movzbl -0x9(%rbp), %eax
andq $0x80, %rax
cmpq $0x0, %rax
je 0x5cbe1
movq -0x8(%rbp), %rdi
movl $0x1, %esi
leaq 0x2a6f3(%rip), %rdx     # 0x872a0
callq 0x384f0
movq -0x8(%rbp), %rdi
callq 0x34240
movb (%rax), %al
movb %al, -0x9(%rbp)
movzbl -0x9(%rbp), %eax
andq $0x7f, %rax
movl -0x1c(%rbp), %ecx
shlq %cl, %rax
orq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movl -0x1c(%rbp), %eax
addl $0x7, %eax
movl %eax, -0x1c(%rbp)
jmp 0x5cb8d
cmpl $0x46, -0x1c(%rbp)
jbe 0x5cbf3
leaq 0x2a6b2(%rip), %rdi     # 0x872a0
callq 0x35bb0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
leaq 0x2a69d(%rip), %rdx     # 0x872a0
callq 0x384f0
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: night-shift[P]Srl/src/lib/PSrl.cpp
// Function: (anonymous namespace)::build_flag(Srl::Value const&)
Flag build_flag(const Value& val)
    {
        auto tp = val.type();

        if(TpTools::is_num(tp) && TpTools::is_integral(tp)) {
            return FNum | (TpTools::is_signed(tp) && val.pblock().i64 < 0 ? FSigned : 0);
        }

        if(TpTools::is_fp(tp)) {
            return FNum | (tp == Type::FP32 ? FFP32 : FFP64);
        }

        if(tp == Type::String || tp == Type::Binary) {
            return tp == Type::String ? FString : FBinary;
        }

        if(TpTools::is_scope(tp)) {
            return tp == Type::Array ? FArray : FObject;
        }

        if(tp == Type::Bool) {
            return FNum | (val.pblock().i64 ? FTrue : FFalse);
        }

        if(tp == Type::Null) {
            return FNull;
        }

        return 0;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x35b80
movb %al, -0x11(%rbp)
movzbl -0x11(%rbp), %edi
callq 0x350b0
testb $0x1, %al
jne 0x5ce67
jmp 0x5cebb
movzbl -0x11(%rbp), %edi
callq 0x38ca0
testb $0x1, %al
jne 0x5ce76
jmp 0x5cebb
movzbl -0x11(%rbp), %edi
callq 0x34960
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x12(%rbp)
jne 0x5ce8d
jmp 0x5cea0
movq -0x10(%rbp), %rdi
callq 0x34bd0
cmpq $0x0, (%rax)
setl %al
movb %al, -0x12(%rbp)
movb -0x12(%rbp), %dl
xorl %eax, %eax
movl $0x8, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
orl $0x1, %eax
movb %al, -0x1(%rbp)
jmp 0x5cf94
movzbl -0x11(%rbp), %edi
callq 0x35860
testb $0x1, %al
jne 0x5ceca
jmp 0x5cef3
movb -0x11(%rbp), %cl
movb $0x10, %al
movb $0x20, %dl
movb %dl, -0x14(%rbp)
cmpb $0x9, %cl
movb %al, -0x13(%rbp)
je 0x5cee2
movb -0x14(%rbp), %al
movb %al, -0x13(%rbp)
movb -0x13(%rbp), %al
movzbl %al, %eax
orl $0x1, %eax
movb %al, -0x1(%rbp)
jmp 0x5cf94
cmpb $0xc, -0x11(%rbp)
je 0x5ceff
cmpb $0xd, -0x11(%rbp)
jne 0x5cf1f
movb -0x11(%rbp), %cl
movb $0x20, %al
movb $0x10, %dl
movb %dl, -0x16(%rbp)
cmpb $0xc, %cl
movb %al, -0x15(%rbp)
je 0x5cf17
movb -0x16(%rbp), %al
movb %al, -0x15(%rbp)
movb -0x15(%rbp), %al
movb %al, -0x1(%rbp)
jmp 0x5cf94
movzbl -0x11(%rbp), %edi
callq 0x35db0
testb $0x1, %al
jne 0x5cf2e
jmp 0x5cf4e
movb -0x11(%rbp), %cl
movb $-0x80, %al
movb $0x40, %dl
movb %dl, -0x18(%rbp)
cmpb $0xf, %cl
movb %al, -0x17(%rbp)
je 0x5cf46
movb -0x18(%rbp), %al
movb %al, -0x17(%rbp)
movb -0x17(%rbp), %al
movb %al, -0x1(%rbp)
jmp 0x5cf94
cmpb $0x0, -0x11(%rbp)
jne 0x5cf84
movq -0x10(%rbp), %rdi
callq 0x34bd0
movq (%rax), %rcx
movb $0x40, %al
movb $-0x80, %dl
movb %dl, -0x1a(%rbp)
cmpq $0x0, %rcx
movb %al, -0x19(%rbp)
jne 0x5cf76
movb -0x1a(%rbp), %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
movzbl %al, %eax
orl $0x1, %eax
movb %al, -0x1(%rbp)
jmp 0x5cf94
cmpb $0xb, -0x11(%rbp)
jne 0x5cf90
movb $0x8, -0x1(%rbp)
jmp 0x5cf94
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: night-shift[P]Srl/src/lib/PSrl.cpp
// Function: Srl::PSrl::pop_scope()
void PSrl::pop_scope()
{
    this->scope_stack.pop();
    this->scope = this->scope_stack.size() > 0
        ? this->scope_stack.top()
        : Type::Null;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
addq $0x78, %rdi
callq 0x35800
movq -0x10(%rbp), %rdi
addq $0x78, %rdi
callq 0x36180
cmpq $0x0, %rax
jbe 0x5cfe4
movq -0x10(%rbp), %rdi
addq $0x78, %rdi
callq 0x37f90
movb (%rax), %al
movb %al, -0x11(%rbp)
jmp 0x5cfeb
movb $0xb, %al
movb %al, -0x11(%rbp)
jmp 0x5cfeb
movq -0x10(%rbp), %rax
movb -0x11(%rbp), %cl
movb %cl, 0x8(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: night-shift[P]Srl/src/lib/PSrl.cpp
// Function: Srl::PSrl::read_num(unsigned char, Srl::Lib::MemBlock const&, Srl::Lib::In&)
pair<Lib::MemBlock, Value> PSrl::read_num(Flag flag, const MemBlock& name, In& source)
{
    if(flag & (FTrue | FFalse)) {
        bool val = flag & FTrue;
        return { name, val };
    }

    if(flag & FFP32) {
        float val = source.read_move<float>(error);
        return { name, val };
    }

    if(flag & FFP64) {
        double val = source.read_move<double>(error);
        return { name, val };
    }

    uint64_t integer = decode_integer(source);

    return flag & FSigned
        ? make_pair(name, Value(-(int64_t)integer))
        : make_pair(name, Value(integer));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x80(%rbp)
movb %dl, %al
movq %rdi, -0x78(%rbp)
movq %rsi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movzbl -0x9(%rbp), %eax
andl $0xc0, %eax
cmpl $0x0, %eax
je 0x5d34a
movq -0x80(%rbp), %rdi
movzbl -0x9(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, -0x21(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x21(%rbp), %rdx
callq 0x37d70
jmp 0x5d434
movzbl -0x9(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x5d381
movq -0x20(%rbp), %rdi
leaq 0x29f3f(%rip), %rsi     # 0x872a0
callq 0x33610
movq -0x80(%rbp), %rdi
movss %xmm0, -0x28(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x28(%rbp), %rdx
callq 0x38a90
jmp 0x5d434
movzbl -0x9(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x5d3b5
movq -0x20(%rbp), %rdi
leaq 0x29f08(%rip), %rsi     # 0x872a0
callq 0x353a0
movq -0x80(%rbp), %rdi
movsd %xmm0, -0x30(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x35590
jmp 0x5d434
movq -0x20(%rbp), %rdi
callq 0x5cb60
movq %rax, -0x38(%rbp)
movzbl -0x9(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x5d406
movq -0x18(%rbp), %rax
movq %rax, -0x88(%rbp)
xorl %eax, %eax
subq -0x38(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x34be0
movq -0x80(%rbp), %rdi
movq -0x88(%rbp), %rsi
leaq -0x50(%rbp), %rdx
callq 0x375b0
jmp 0x5d432
movq -0x18(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq -0x70(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x33600
movq -0x80(%rbp), %rdi
movq -0x90(%rbp), %rsi
leaq -0x70(%rbp), %rdx
callq 0x375b0
jmp 0x5d434
movq -0x78(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: night-shift[P]Srl/src/lib/PSrl.cpp
// Function: Srl::PSrl::clear()
void PSrl::clear()
{
    this->indexed_strings.clear();
    this->string_buffer.clear();
    this->hashed_strings.clear();
    this->scope = Type::Null;

    Aux::clear_stack(this->scope_stack);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
addq $0x10, %rdi
callq 0x35510
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
callq 0x34800
movq -0x10(%rbp), %rdi
addq $0xc8, %rdi
callq 0x38cc0
movq -0x10(%rbp), %rdi
movb $0xb, 0x8(%rdi)
addq $0x78, %rdi
callq 0x370f0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: night-shift[P]Srl/src/lib/ToolsBtsConv.cpp
// Function: Srl::Tools::get_base64_decoded_size(char const*, unsigned long)
size_t Tools::get_base64_decoded_size(const char* str, size_t str_len)
{
    if(str_len < 4) {
        return 0;
    }

    auto rem  = str[str_len - 1] == '=' ? 1 : 0;
         rem += str[str_len - 2] == '=' ? 1 : 0;

    return (str_len / 4) * 3 - rem;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x4, -0x18(%rbp)
jae 0x61d4d
movq $0x0, -0x8(%rbp)
jmp 0x61da7
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
subq $0x1, %rcx
movsbl (%rax,%rcx), %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x3d, %edx
cmovel %ecx, %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
subq $0x2, %rcx
movsbl (%rax,%rcx), %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x3d, %edx
cmovel %ecx, %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
shrq $0x2, %rax
imulq $0x3, %rax, %rax
movslq -0x1c(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: night-shift[P]Srl/src/lib/ToolsBtsConv.cpp
// Function: Srl::Tools::base64_to_bytes(char const*, unsigned long)
vector<uint8_t> Tools::base64_to_bytes(const char* str, size_t str_len)
{
    auto vsize = get_base64_decoded_size(str, str_len);

    vector<uint8_t> bytesv(vsize);
    base64_to_bytes(bytesv.data(), vsize, str, str_len);

    return bytesv;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x50(%rbp)
movq %rdi, %rax
movq %rax, -0x58(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x37850
movq %rax, -0x20(%rbp)
movb $0x0, -0x21(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq -0x22(%rbp), %rdi
movq %rdi, -0x40(%rbp)
callq 0x35c90
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x37970
jmp 0x61e0c
leaq -0x22(%rbp), %rdi
callq 0x355b0
movq -0x50(%rbp), %rdi
callq 0x36f40
movq %rax, %rdi
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq 0x370b0
jmp 0x61e34
movb $0x1, -0x21(%rbp)
testb $0x1, -0x21(%rbp)
jne 0x61e77
jmp 0x61e6e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x22(%rbp), %rdi
callq 0x355b0
jmp 0x61e81
movq -0x50(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0x33980
jmp 0x61e81
movq -0x50(%rbp), %rdi
callq 0x33980
movq -0x58(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x38210
nopw (%rax,%rax)
// File: night-shift[P]Srl/src/lib/ToolsBtsConv.cpp
// Function: Srl::Tools::bytes_to_hex(unsigned char const*, unsigned long)
vector<uint8_t> Tools::bytes_to_hex(const uint8_t* bytes, size_t nbytes)
{
    const char hex_lk[] {
        '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
    };

    vector<uint8_t> hexv(nbytes * 2);

    for(size_t in_idx = 0, out_idx = 0; in_idx < nbytes;
               in_idx++, out_idx += 2) {

        hexv[out_idx]     = hex_lk[(bytes[in_idx] >> 4) & 0x0F];
        hexv[out_idx + 1] = hex_lk[bytes[in_idx] & 0x0F];
    }

    return hexv;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x70(%rbp)
movq %rdi, %rax
movq %rax, -0x78(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movaps 0x7f27(%rip), %xmm0     # 0x6a1b0
movaps %xmm0, -0x30(%rbp)
movb $0x0, -0x31(%rbp)
movq -0x18(%rbp), %rax
addq %rax, %rax
movq %rax, -0x68(%rbp)
leaq -0x32(%rbp), %rdi
movq %rdi, -0x60(%rbp)
callq 0x35c90
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
callq 0x37970
jmp 0x622bc
leaq -0x32(%rbp), %rdi
callq 0x355b0
movq $0x0, -0x50(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x62372
movq -0x70(%rbp), %rdi
movq -0x10(%rbp), %rax
movq -0x50(%rbp), %rcx
movzbl (%rax,%rcx), %eax
sarl $0x4, %eax
andl $0xf, %eax
cltq
movb -0x30(%rbp,%rax), %al
movb %al, -0x7a(%rbp)
movq -0x58(%rbp), %rsi
callq 0x33120
movb -0x7a(%rbp), %cl
movq -0x70(%rbp), %rdi
movb %cl, (%rax)
movq -0x10(%rbp), %rax
movq -0x50(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0xf, %eax
cltq
movb -0x30(%rbp,%rax), %al
movb %al, -0x79(%rbp)
movq -0x58(%rbp), %rsi
addq $0x1, %rsi
callq 0x33120
movb -0x79(%rbp), %cl
movb %cl, (%rax)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
movq -0x58(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x58(%rbp)
jmp 0x622d5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x32(%rbp), %rdi
callq 0x355b0
jmp 0x62392
movb $0x1, -0x31(%rbp)
testb $0x1, -0x31(%rbp)
jne 0x62385
movq -0x70(%rbp), %rdi
callq 0x33980
movq -0x78(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x38210
nopl (%rax,%rax)
// File: night-shift[P]Srl/src/lib/ToolsBtsConv.cpp
// Function: Base64Table::Base64Table()
Base64Table()
    {
        for(auto i = 0U; i < 256U; i++) {
            decode[i] = val_invalid;
        }
        decode[(size_t)'='] = val_fill;
        for(auto i = 0U; i < 64U; i++) {
            decode[(size_t)encode[i]] = i;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movb $-0x1, (%rdi)
movb $-0x2, 0x1(%rdi)
addq $0x2, %rdi
leaq 0x78ba(%rip), %rsi      # 0x6a1c0
movl $0x40, %edx
callq 0x35360
movl $0x0, -0xc(%rbp)
cmpl $0x100, -0xc(%rbp)      # imm = 0x100
jae 0x62938
movq -0x18(%rbp), %rax
movb (%rax), %dl
movl -0xc(%rbp), %ecx
movb %dl, 0x42(%rax,%rcx)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x62917
movq -0x18(%rbp), %rax
movb 0x1(%rax), %cl
movb %cl, 0x7f(%rax)
movl $0x0, -0x10(%rbp)
cmpl $0x40, -0x10(%rbp)
jae 0x62970
movq -0x18(%rbp), %rax
movl -0x10(%rbp), %ecx
movb %cl, %dl
movl -0x10(%rbp), %ecx
movsbq 0x2(%rax,%rcx), %rcx
movb %dl, 0x42(%rax,%rcx)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x62949
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: night-shift[P]Srl/src/lib/ToolsStrConv.cpp
// Function: Srl::Tools::trim_space(unsigned char const*&, unsigned long&)
void Tools::trim_space(const uint8_t*& str, size_t& str_len)
{
    if(str == nullptr) {
        return;
    }

    while(str_len > 0 && is_space(*str)) {
        str++;
        str_len--;
    }

    while(str_len > 0 && is_space(*(str + str_len - 1))) {
        str_len--;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x62bdf
jmp 0x62c6e
jmp 0x62be1
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq $0x0, (%rcx)
movb %al, -0x11(%rbp)
jbe 0x62c02
movq -0x8(%rbp), %rax
movq (%rax), %rax
movzbl (%rax), %edi
callq 0x35250
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
testb $0x1, %al
jne 0x62c0b
jmp 0x62c29
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $-0x1, %rcx
movq %rcx, (%rax)
jmp 0x62be1
jmp 0x62c2b
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq $0x0, (%rcx)
movb %al, -0x12(%rbp)
jbe 0x62c55
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movzbl -0x1(%rax,%rcx), %edi
callq 0x35250
movb %al, -0x12(%rbp)
movb -0x12(%rbp), %al
testb $0x1, %al
jne 0x62c5e
jmp 0x62c6e
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $-0x1, %rcx
movq %rcx, (%rax)
jmp 0x62c2b
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: night-shift[P]Srl/src/lib/ToolsStrConv.cpp
// Function: (anonymous namespace)::str_to_int(unsigned char const*, unsigned long)
tuple<uint64_t, bool, bool> str_to_int(const uint8_t* str, size_t str_len)
    {
        size_t   idx = 0;
        uint64_t val = 0;
        bool is_signed = false;

        if(str_len > 0 && *str == '-') {
            if(str_len < 2) {
                /* invalid string */
                return make_tuple(val, false, false);
            }
            is_signed = true;
            idx = 1;
        }

        uint64_t tmp = 0;
        for(char c = '\0'; idx < str_len; idx++) {
            c = str[idx];

            if(c < '0' || c > '9') {
                break;
            }

            tmp = val * 10 + c - '0';
            if(tmp < val) {
                /* overflow */
                break;
            }
            val = tmp;
        }

        bool success = idx >= str_len && (!is_signed || val <= numeric_limits<int64_t>::max());

        return make_tuple(val, is_signed, success);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x50(%rbp)
movq %rdi, %rax
movq %rax, -0x48(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movb $0x0, -0x29(%rbp)
cmpq $0x0, -0x18(%rbp)
jbe 0x6312b
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x6312b
cmpq $0x2, -0x18(%rbp)
jae 0x6311f
movq -0x50(%rbp), %rdi
movb $0x0, -0x2a(%rbp)
movb $0x0, -0x2b(%rbp)
leaq -0x28(%rbp), %rsi
leaq -0x2a(%rbp), %rdx
leaq -0x2b(%rbp), %rcx
callq 0x36090
jmp 0x631f4
movb $0x1, -0x29(%rbp)
movq $0x1, -0x20(%rbp)
movq $0x0, -0x38(%rbp)
movb $0x0, -0x39(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x6319a
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x39(%rbp)
movsbl -0x39(%rbp), %eax
cmpl $0x30, %eax
jl 0x63161
movsbl -0x39(%rbp), %eax
cmpl $0x39, %eax
jle 0x63163
jmp 0x6319a
imulq $0xa, -0x28(%rbp), %rax
movsbq -0x39(%rbp), %rcx
addq %rcx, %rax
subq $0x30, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x63184
jmp 0x6319a
movq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x63137
movq -0x20(%rbp), %rcx
xorl %eax, %eax
cmpq -0x18(%rbp), %rcx
movb %al, -0x51(%rbp)
jb 0x631d7
movb $0x1, %al
testb $0x1, -0x29(%rbp)
movb %al, -0x52(%rbp)
je 0x631d1
movq -0x28(%rbp), %rax
movq %rax, -0x60(%rbp)
callq 0x358c0
movq %rax, %rcx
movq -0x60(%rbp), %rax
cmpq %rcx, %rax
setbe %al
movb %al, -0x52(%rbp)
movb -0x52(%rbp), %al
movb %al, -0x51(%rbp)
movq -0x50(%rbp), %rdi
movb -0x51(%rbp), %al
andb $0x1, %al
movb %al, -0x3a(%rbp)
leaq -0x28(%rbp), %rsi
leaq -0x29(%rbp), %rdx
leaq -0x3a(%rbp), %rcx
callq 0x336b0
movq -0x48(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nop
// File: night-shift[P]Srl/src/lib/ToolsStrConv.cpp
// Function: (anonymous namespace)::str_to_double(unsigned char const*, unsigned long)
tuple<double, bool> str_to_double(const uint8_t* str, size_t str_len)
    {
        const size_t buffer_size = 64;
        char buffer[buffer_size];

        double val;

        const auto apply = [&val, str, str_len](char* ptr_mem) -> bool {
            char* end = nullptr;
            memcpy(ptr_mem, str, str_len);
            ptr_mem[str_len] = '\0';
            val = strtod(ptr_mem, &end);

            return end == ptr_mem + str_len;
        };

        if(str_len + 1 < buffer_size) {
            return make_tuple(val, apply(buffer));

        } else {
            vector<char> vec_buffer(str_len + 1);
            return make_tuple(val, apply(vec_buffer.data()));
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0xc8(%rbp)
movq %rdi, %rax
movq %rax, -0xc0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x40, -0x20(%rbp)
leaq -0x68(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
cmpq $0x40, %rax
jae 0x63287
leaq -0x60(%rbp), %rsi
leaq -0x80(%rbp), %rdi
callq 0x64c70
movq -0xc8(%rbp), %rdi
andb $0x1, %al
movb %al, -0x81(%rbp)
leaq -0x68(%rbp), %rsi
leaq -0x81(%rbp), %rdx
callq 0x357d0
jmp 0x63365
movq -0x18(%rbp), %rax
incq %rax
movq %rax, -0xd8(%rbp)
leaq -0xa1(%rbp), %rdi
movq %rdi, -0xd0(%rbp)
callq 0x38240
movq -0xd8(%rbp), %rsi
movq -0xd0(%rbp), %rdx
leaq -0xa0(%rbp), %rdi
callq 0x34cc0
jmp 0x632c4
leaq -0xa1(%rbp), %rdi
callq 0x35f90
leaq -0xa0(%rbp), %rdi
callq 0x332a0
movq %rax, %rsi
leaq -0x80(%rbp), %rdi
callq 0x64c70
movb %al, -0xd9(%rbp)
jmp 0x632f0
movq -0xc8(%rbp), %rdi
movb -0xd9(%rbp), %al
andb $0x1, %al
movb %al, -0xb5(%rbp)
leaq -0x68(%rbp), %rsi
leaq -0xb5(%rbp), %rdx
callq 0x357d0
jmp 0x63317
leaq -0xa0(%rbp), %rdi
callq 0x35050
jmp 0x63365
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0xa1(%rbp), %rdi
callq 0x35f90
jmp 0x63375
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x35050
jmp 0x63375
movq -0xc0(%rbp), %rax
addq $0xe0, %rsp
popq %rbp
retq
movq -0xb0(%rbp), %rdi
callq 0x38210
nopw %cs:(%rax,%rax)
// File: night-shift[P]Srl/src/lib/ToolsStrConv.cpp
// Function: Srl::Tools::str_to_type(Srl::String const&, Srl::Type)
pair<bool, Value> Tools::str_to_type(const String& string_wrap, Type hint)
{
    if(string_wrap.encoding() == Encoding::UTF8) {
        return str_to_type(string_wrap.data(), string_wrap.size(), hint);

    } else {
        auto vec = Tools::conv_charset(Encoding::UTF8, string_wrap, false);
        if(vec.size() < 1) {
            return make_pair(false, Value(Type::Null));
        }

        return str_to_type(vec.data(), vec.size(), hint);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x68(%rbp)
movb %dl, %al
movq %rdi, -0x60(%rbp)
movq %rsi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rdi
callq 0x342c0
cmpb $0x1, %al
jne 0x633e8
movq -0x8(%rbp), %rdi
callq 0x33490
movq %rax, -0x70(%rbp)
movq -0x8(%rbp), %rdi
callq 0x37f50
movq -0x68(%rbp), %rdi
movq -0x70(%rbp), %rsi
movq %rax, %rdx
movzbl -0x9(%rbp), %ecx
callq 0x33af0
jmp 0x63492
movq -0x8(%rbp), %rdx
leaq -0x28(%rbp), %rdi
movl $0x1, %esi
xorl %ecx, %ecx
callq 0x38220
leaq -0x28(%rbp), %rdi
callq 0x37840
cmpq $0x1, %rax
jae 0x63452
movb $0x0, -0x29(%rbp)
leaq -0x48(%rbp), %rdi
movl $0xb, %esi
callq 0x33ff0
jmp 0x6341f
movq -0x68(%rbp), %rdi
leaq -0x29(%rbp), %rsi
leaq -0x48(%rbp), %rdx
callq 0x36f00
jmp 0x63432
movl $0x1, -0x58(%rbp)
jmp 0x63489
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x33980
jmp 0x6349f
leaq -0x28(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x36f40
movq -0x80(%rbp), %rdi
movq %rax, -0x78(%rbp)
callq 0x37840
movq -0x68(%rbp), %rdi
movq -0x78(%rbp), %rsi
movq %rax, %rdx
movzbl -0x9(%rbp), %ecx
callq 0x33af0
jmp 0x63482
movl $0x1, -0x58(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x33980
movq -0x60(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x38210
nopl (%rax,%rax)
// File: night-shift[P]Srl/src/lib/ToolsStrConv.cpp
// Function: Srl::Tools::conv_charset(Srl::Encoding, Srl::String const&, bool)
vector<uint8_t> Tools::conv_charset(Encoding target_encoding, const String& string_wrap, bool throw_error)
{
    vector<uint8_t> buffer;
    auto converted_total = conv_charset(target_encoding, string_wrap, buffer, throw_error);
    buffer.resize(converted_total);

    return buffer;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x48(%rbp)
movb %cl, %al
movb %sil, %cl
movq %rdi, %rsi
movq %rsi, -0x50(%rbp)
movq %rdi, -0x8(%rbp)
movb %cl, -0x9(%rbp)
movq %rdx, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
movb $0x0, -0x1a(%rbp)
callq 0x33cc0
movq -0x48(%rbp), %rdx
movzbl -0x9(%rbp), %edi
movq -0x18(%rbp), %rsi
movzbl -0x19(%rbp), %ecx
andl $0x1, %ecx
xorl %eax, %eax
movl %eax, %r8d
callq 0x37380
movq %rax, -0x40(%rbp)
jmp 0x63504
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rsi
callq 0x35f00
jmp 0x6351b
movb $0x1, -0x1a(%rbp)
testb $0x1, -0x1a(%rbp)
jne 0x63547
jmp 0x6353e
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0x33980
jmp 0x63551
movq -0x48(%rbp), %rdi
callq 0x33980
movq -0x50(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x38210
nopw (%rax,%rax)