LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: Konano[P]UselessDatabase/./json.hpp
// Function: nlohmann::detail::lexer<nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>>::scan_literal(char const*, unsigned long, nlohmann::detail::lexer<nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>>::token_type)
JSON_HEDLEY_NON_NULL(2)
    token_type scan_literal(const char* literal_text, const std::size_t length,
                            token_type return_type)
    {
        assert(current == literal_text[0]);
        for (std::size_t i = 1; i < length; ++i)
        {
            if (JSON_HEDLEY_UNLIKELY(get() != literal_text[i]))
            {
                error_message = "invalid literal";
                return token_type::parse_error;
            }
        }
        return return_type;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movl 0x10(%rax), %eax
movq -0x18(%rbp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x2140f
jmp 0x2142e
leaq 0x5f262(%rip), %rdi     # 0x80678
leaq 0x5d724(%rip), %rsi     # 0x7eb41
movl $0x2097, %edx           # imm = 0x2097
leaq 0x5f26a(%rip), %rcx     # 0x80693
callq 0x6350
movq $0x1, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x2148c
movq -0x38(%rbp), %rdi
callq 0x21310
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rdx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x21464
jmp 0x2147c
movq -0x38(%rbp), %rax
leaq 0x5f179(%rip), %rcx     # 0x805e8
movq %rcx, 0x68(%rax)
movl $0xe, -0x4(%rbp)
jmp 0x21492
jmp 0x2147e
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x21436
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: Konano[P]UselessDatabase/./json.hpp
// Function: nlohmann::detail::lexer<nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>>::unget()
void unget()
    {
        next_unget = true;

        --position.chars_read_total;

        // in case we "unget" a newline, we have to also decrement the lines_read
        if (position.chars_read_current_line == 0)
        {
            if (position.lines_read > 0)
            {
                --position.lines_read;
            }
        }
        else
        {
            --position.chars_read_current_line;
        }

        if (JSON_HEDLEY_LIKELY(current != std::char_traits<char>::eof()))
        {
            assert(not token_string.empty());
            token_string.pop_back();
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movb $0x1, 0x14(%rax)
movq 0x18(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x18(%rax)
cmpq $0x0, 0x20(%rax)
jne 0x225f8
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jbe 0x225f6
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x28(%rax)
jmp 0x22608
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x14(%rbp)
callq 0x20f80
movl %eax, %ecx
movl -0x14(%rbp), %eax
cmpl %ecx, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x2262b
jmp 0x2266e
movq -0x10(%rbp), %rdi
addq $0x30, %rdi
callq 0x22680
xorb $-0x1, %al
testb $0x1, %al
jne 0x22640
jmp 0x22642
jmp 0x22661
leaq 0x5dfaf(%rip), %rdi     # 0x805f8
leaq 0x5c4f1(%rip), %rsi     # 0x7eb41
movl $0x20f3, %edx           # imm = 0x20F3
leaq 0x5dfb5(%rip), %rcx     # 0x80611
callq 0x6350
movq -0x10(%rbp), %rdi
addq $0x30, %rdi
callq 0x226c0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: Konano[P]UselessDatabase/./json.hpp
// Function: nlohmann::detail::lexer<nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>>::next_byte_in_range(std::initializer_list<int>)
bool next_byte_in_range(std::initializer_list<int> ranges)
    {
        assert(ranges.size() == 2 or ranges.size() == 4 or ranges.size() == 6);
        add(current);

        for (auto range = ranges.begin(); range != ranges.end(); ++range)
        {
            get();
            if (JSON_HEDLEY_LIKELY(*range <= current and current <= *(++range)))
            {
                add(current);
            }
            else
            {
                error_message = "invalid string: ill-formed UTF-8 byte";
                return false;
            }
        }

        return true;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rsi, -0x18(%rbp)
movq %rdx, -0x10(%rbp)
movq %rdi, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x23640
movq %rax, %rcx
movb $0x1, %al
cmpq $0x2, %rcx
movb %al, -0x29(%rbp)
je 0x233bd
leaq -0x18(%rbp), %rdi
callq 0x23640
movq %rax, %rcx
movb $0x1, %al
cmpq $0x4, %rcx
movb %al, -0x29(%rbp)
je 0x233bd
leaq -0x18(%rbp), %rdi
callq 0x23640
cmpq $0x6, %rax
sete %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x233c6
jmp 0x233c8
jmp 0x233e7
leaq 0x5df32(%rip), %rdi     # 0x81301
leaq 0x5b76b(%rip), %rsi     # 0x7eb41
movl $0x1ca2, %edx           # imm = 0x1CA2
leaq 0x5df5e(%rip), %rcx     # 0x81340
callq 0x6350
movq -0x38(%rbp), %rdi
movl 0x10(%rdi), %esi
callq 0x23170
leaq -0x18(%rbp), %rdi
callq 0x23660
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x23680
movq %rax, %rcx
movq -0x40(%rbp), %rax
cmpq %rcx, %rax
je 0x2349c
movq -0x38(%rbp), %rdi
callq 0x21310
movq -0x38(%rbp), %rdx
movq -0x28(%rbp), %rax
movl (%rax), %ecx
xorl %eax, %eax
cmpl 0x10(%rdx), %ecx
movb %al, -0x41(%rbp)
jg 0x23459
movq -0x38(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x28(%rbp), %rcx
movq %rcx, %rdx
addq $0x4, %rdx
movq %rdx, -0x28(%rbp)
cmpl 0x4(%rcx), %eax
setle %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x23466
jmp 0x23474
movq -0x38(%rbp), %rdi
movl 0x10(%rdi), %esi
callq 0x23170
jmp 0x23489
movq -0x38(%rbp), %rax
leaq 0x5ddb3(%rip), %rcx     # 0x81232
movq %rcx, 0x68(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x234a0
jmp 0x2348b
movq -0x28(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x28(%rbp)
jmp 0x23400
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: Konano[P]UselessDatabase/./json.hpp
// Function: nlohmann::detail::lexer<nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>>::get_token_string() const
std::string get_token_string() const
    {
        // escape control characters
        std::string result;
        for (const auto c : token_string)
        {
            if ('\x00' <= c and c <= '\x1F')
            {
                // escape control characters
                std::array<char, 9> cs{{}};
                (std::snprintf)(cs.data(), cs.size(), "<U+%.4X>", static_cast<unsigned char>(c));
                result += cs.data();
            }
            else
            {
                // add character as is
                result.push_back(c);
            }
        }

        return result;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x68(%rbp)
movq %rdi, %rax
movq %rax, -0x60(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movb $0x0, -0x11(%rbp)
callq 0x66b0
movq -0x58(%rbp), %rax
addq $0x30, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x22730
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x22760
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x2f9a0
testb $0x1, %al
jne 0x253ab
jmp 0x2545c
leaq -0x28(%rbp), %rdi
callq 0x2f9e0
movb (%rax), %al
movb %al, -0x31(%rbp)
movsbl -0x31(%rbp), %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jg 0x2543b
movsbl -0x31(%rbp), %eax
cmpl $0x1f, %eax
jg 0x2543b
movb $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
leaq -0x40(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x2fa00
movq -0x70(%rbp), %rdi
movq %rax, -0x78(%rbp)
callq 0x2fa20
movq -0x78(%rbp), %rdi
movq %rax, %rsi
movzbl -0x31(%rbp), %ecx
leaq 0x5ce98(%rip), %rdx     # 0x8229c
xorl %eax, %eax
callq 0x67c0
movq -0x70(%rbp), %rdi
callq 0x2fa00
movq -0x68(%rbp), %rdi
movq %rax, %rsi
callq 0x6470
jmp 0x25422
jmp 0x2544c
movq -0x68(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
callq 0x6340
jmp 0x2547c
movq -0x68(%rbp), %rdi
movsbl -0x31(%rbp), %esi
callq 0x6420
jmp 0x2544a
jmp 0x2544c
jmp 0x2544e
leaq -0x28(%rbp), %rdi
callq 0x2fa30
jmp 0x25395
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x2546f
movq -0x68(%rbp), %rdi
callq 0x6340
movq -0x60(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x6890
nopw %cs:(%rax,%rax)
nop
// File: Konano[P]UselessDatabase/./json.hpp
// Function: nlohmann::detail::json_sax_dom_callback_parser<nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>>::key(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool key(string_t& val)
    {
        BasicJsonType k = BasicJsonType(val);

        // check callback for key
        const bool keep = callback(static_cast<int>(ref_stack.size()), parse_event_t::key, k);
        key_keep_stack.push_back(keep);

        // add discarded value at given key and store the reference for later
        if (keep and ref_stack.back())
        {
            object_element = &(ref_stack.back()->m_value.object->operator[](val) = discarded);
        }

        return true;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x20(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0x2ce10
movq -0x68(%rbp), %rdi
movq %rdi, %rax
subq $-0x80, %rax
movq %rax, -0x60(%rbp)
addq $0x8, %rdi
callq 0x2a720
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rcx
movl %eax, %esi
movl $0x4, %edx
callq 0x2a6d0
movb %al, -0x49(%rbp)
jmp 0x29e0a
movq -0x68(%rbp), %rdi
movb -0x49(%rbp), %al
andb $0x1, %al
movb %al, -0x21(%rbp)
addq $0x48, %rdi
movzbl -0x21(%rbp), %esi
andl $0x1, %esi
callq 0x277d0
jmp 0x29e28
testb $0x1, -0x21(%rbp)
je 0x29eca
movq -0x68(%rbp), %rdi
addq $0x8, %rdi
callq 0x2acd0
cmpq $0x0, (%rax)
je 0x29eca
movq -0x68(%rbp), %rsi
addq $0xa8, %rsi
leaq -0x48(%rbp), %rdi
callq 0xb700
jmp 0x29e5f
movq -0x68(%rbp), %rdi
addq $0x8, %rdi
callq 0x2acd0
movq (%rax), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x2ce60
movq %rax, -0x70(%rbp)
jmp 0x29e82
movq -0x70(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0xb0a0
movq %rax, %rcx
movq -0x68(%rbp), %rax
movq %rcx, 0x70(%rax)
leaq -0x48(%rbp), %rdi
callq 0xb110
jmp 0x29eca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x29edd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x48(%rbp), %rdi
callq 0xb110
jmp 0x29edd
leaq -0x20(%rbp), %rdi
callq 0xb110
movb $0x1, %al
andb $0x1, %al
addq $0x70, %rsp
popq %rbp
retq
leaq -0x20(%rbp), %rdi
callq 0xb110
movq -0x30(%rbp), %rdi
callq 0x6890
nop
// File: Konano[P]UselessDatabase/./json.hpp
// Function: nlohmann::detail::json_sax_dom_callback_parser<nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>>::start_array(unsigned long)
bool start_array(std::size_t len)
    {
        const bool keep = callback(static_cast<int>(ref_stack.size()), parse_event_t::array_start, discarded);
        keep_stack.push_back(keep);

        auto val = handle_value(BasicJsonType::value_t::array, true);
        ref_stack.push_back(val.second);

        // check array limit
        if (ref_stack.back() and JSON_HEDLEY_UNLIKELY(len != std::size_t(-1) and len > ref_stack.back()->max_size()))
        {
            JSON_THROW(out_of_range::create(408, "excessive array size: " + std::to_string(len)));
        }

        return true;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x88(%rbp)
movq %rdi, %rax
addq $0x80, %rax
movq %rax, -0x90(%rbp)
addq $0x8, %rdi
callq 0x2a720
movq -0x90(%rbp), %rdi
movq -0x88(%rbp), %rcx
movl %eax, %esi
addq $0xa8, %rcx
movl $0x2, %edx
callq 0x2a6d0
movq -0x88(%rbp), %rdi
andb $0x1, %al
movb %al, -0x11(%rbp)
addq $0x20, %rdi
movb -0x11(%rbp), %al
andb $0x1, %al
movzbl %al, %esi
callq 0x277d0
movq -0x88(%rbp), %rdi
movb $0x2, -0x29(%rbp)
leaq -0x29(%rbp), %rsi
movl $0x1, %edx
callq 0x2a740
movq -0x88(%rbp), %rdi
movb %al, -0x28(%rbp)
movq %rdx, -0x20(%rbp)
addq $0x8, %rdi
leaq -0x28(%rbp), %rsi
addq $0x8, %rsi
callq 0x2ac60
movq -0x88(%rbp), %rdi
addq $0x8, %rdi
callq 0x2acd0
cmpq $0x0, (%rax)
je 0x2a0f3
xorl %eax, %eax
cmpq $-0x1, -0x10(%rbp)
movb %al, -0x91(%rbp)
je 0x2a01f
movq -0x88(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0xa0(%rbp)
addq $0x8, %rdi
callq 0x2acd0
movq (%rax), %rdi
callq 0x2ad10
movq %rax, %rcx
movq -0xa0(%rbp), %rax
cmpq %rcx, %rax
seta %al
movb %al, -0x91(%rbp)
movb -0x91(%rbp), %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x2a032
jmp 0x2a0f3
movb $0x1, -0x7d(%rbp)
movl $0x20, %edi
callq 0x62a0
movq %rax, -0xa8(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x70(%rbp), %rdi
callq 0x15110
jmp 0x2a056
leaq 0x57c16(%rip), %rsi     # 0x81c73
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0x150c0
jmp 0x2a06c
movq -0xa8(%rbp), %rdi
movl $0x198, %esi            # imm = 0x198
leaq -0x50(%rbp), %rdx
callq 0x2a2c0
jmp 0x2a083
movq -0xa8(%rbp), %rdi
movb $0x0, -0x7d(%rbp)
leaq 0x8694b(%rip), %rsi     # 0xb09e0
leaq 0x374(%rip), %rdx       # 0x2a410
callq 0x6850
jmp 0x2a109
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x2a0dd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x2a0d4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x6340
leaq -0x70(%rbp), %rdi
callq 0x6340
testb $0x1, -0x7d(%rbp)
jne 0x2a0e5
jmp 0x2a0f1
movq -0xa8(%rbp), %rdi
callq 0x63a0
jmp 0x2a100
movb $0x1, %al
andb $0x1, %al
addq $0xb0, %rsp
popq %rbp
retq
movq -0x78(%rbp), %rdi
callq 0x6890
nopl (%rax)
// File: Konano[P]UselessDatabase/./json.hpp
// Function: nlohmann::detail::json_sax_dom_callback_parser<nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>>::end_array()
bool end_array()
    {
        bool keep = true;

        if (ref_stack.back())
        {
            keep = callback(static_cast<int>(ref_stack.size()) - 1, parse_event_t::array_end, *ref_stack.back());
            if (not keep)
            {
                // discard array
                *ref_stack.back() = discarded;
            }
        }

        assert(not ref_stack.empty());
        assert(not keep_stack.empty());
        ref_stack.pop_back();
        keep_stack.pop_back();

        // remove discarded value
        if (not keep and not ref_stack.empty() and ref_stack.back()->is_array())
        {
            ref_stack.back()->m_value.array->pop_back();
        }

        return true;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movb $0x1, -0x9(%rbp)
addq $0x8, %rdi
callq 0x2acd0
cmpq $0x0, (%rax)
je 0x2a1bf
movq -0x28(%rbp), %rdi
movq %rdi, %rax
addq $0x80, %rax
movq %rax, -0x38(%rbp)
addq $0x8, %rdi
callq 0x2a720
movq -0x28(%rbp), %rdi
subl $0x1, %eax
movl %eax, -0x2c(%rbp)
addq $0x8, %rdi
callq 0x2acd0
movq -0x38(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq (%rax), %rcx
movl $0x3, %edx
callq 0x2a6d0
andb $0x1, %al
movb %al, -0x9(%rbp)
testb $0x1, -0x9(%rbp)
jne 0x2a1bd
movq -0x28(%rbp), %rsi
addq $0xa8, %rsi
leaq -0x20(%rbp), %rdi
callq 0xb700
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
callq 0x2acd0
movq (%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0xb0a0
leaq -0x20(%rbp), %rdi
callq 0xb110
jmp 0x2a1bf
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
callq 0x2adb0
xorb $-0x1, %al
testb $0x1, %al
jne 0x2a1d4
jmp 0x2a1d6
jmp 0x2a1f5
leaq 0x575f4(%rip), %rdi     # 0x817d1
leaq 0x5495d(%rip), %rsi     # 0x7eb41
movl $0x12b8, %edx           # imm = 0x12B8
leaq 0x57a9a(%rip), %rcx     # 0x81c8a
callq 0x6350
movq -0x28(%rbp), %rdi
addq $0x20, %rdi
callq 0x2a5c0
xorb $-0x1, %al
testb $0x1, %al
jne 0x2a20a
jmp 0x2a20c
jmp 0x2a22b
leaq 0x57467(%rip), %rdi     # 0x8167a
leaq 0x54927(%rip), %rsi     # 0x7eb41
movl $0x12b9, %edx           # imm = 0x12B9
leaq 0x57a64(%rip), %rcx     # 0x81c8a
callq 0x6350
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
callq 0x2b730
movq -0x28(%rbp), %rdi
addq $0x20, %rdi
callq 0x2a6b0
testb $0x1, -0x9(%rbp)
jne 0x2a290
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
callq 0x2adb0
testb $0x1, %al
jne 0x2a290
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
callq 0x2acd0
movq (%rax), %rdi
callq 0x18420
testb $0x1, %al
jne 0x2a277
jmp 0x2a290
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
callq 0x2acd0
movq (%rax), %rax
movq 0x8(%rax), %rdi
callq 0x183f0
movb $0x1, %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: Konano[P]UselessDatabase/./json.hpp
// Function: nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>::max_size() const
const noexcept
    {
        switch (m_type)
        {
            case value_t::array:
            {
                // delegate call to array_t::max_size()
                return m_value.array->max_size();
            }

            case value_t::object:
            {
                // delegate call to object_t::max_size()
                return m_value.object->max_size();
            }

            default:
            {
                // all other types have max_size() == size()
                return size();
            }
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movb (%rax), %al
movb %al, -0x11(%rbp)
subb $0x1, %al
je 0x2ad4b
jmp 0x2ad2f
movb -0x11(%rbp), %al
subb $0x2, %al
jne 0x2ad5e
jmp 0x2ad38
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x18770
movq %rax, -0x8(%rbp)
jmp 0x2ad6b
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x2b610
movq %rax, -0x8(%rbp)
jmp 0x2ad6b
movq -0x20(%rbp), %rdi
callq 0x2b630
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: Konano[P]UselessDatabase/./json.hpp
// Function: nlohmann::detail::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>>::operator++()
iter_impl& operator++()
    {
        assert(m_object != nullptr);

        switch (m_object->m_type)
        {
            case value_t::object:
            {
                std::advance(m_it.object_iterator, 1);
                break;
            }

            case value_t::array:
            {
                std::advance(m_it.array_iterator, 1);
                break;
            }

            default:
            {
                ++m_it.primitive_iterator;
                break;
            }
        }

        return *this;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, (%rax)
je 0x2bf4c
jmp 0x2bf6b
leaq 0x55917(%rip), %rdi     # 0x8186a
leaq 0x52be7(%rip), %rsi     # 0x7eb41
movl $0x259e, %edx           # imm = 0x259E
leaq 0x55c88(%rip), %rcx     # 0x81bee
callq 0x6350
movq -0x10(%rbp), %rax
movq (%rax), %rax
movb (%rax), %al
movb %al, -0x11(%rbp)
subb $0x1, %al
je 0x2bf86
jmp 0x2bf7d
movb -0x11(%rbp), %al
subb $0x2, %al
je 0x2bf9a
jmp 0x2bfb2
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
movl $0x1, %esi
callq 0x2cc30
jmp 0x2bfc3
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
addq $0x8, %rdi
movl $0x1, %esi
callq 0x2cc80
jmp 0x2bfc3
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
addq $0x10, %rdi
callq 0x2ccd0
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: Konano[P]UselessDatabase/./json.hpp
// Function: nlohmann::detail::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>>::iter_impl(nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>*)
explicit iter_impl(pointer object) noexcept : m_object(object)
    {
        assert(m_object != nullptr);

        switch (m_object->m_type)
        {
            case value_t::object:
            {
                m_it.object_iterator = typename object_t::iterator();
                break;
            }

            case value_t::array:
            {
                m_it.array_iterator = typename array_t::iterator();
                break;
            }

            default:
            {
                m_it.primitive_iterator = primitive_iterator_t();
                break;
            }
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, (%rdi)
addq $0x8, %rdi
movq %rdi, -0x40(%rbp)
callq 0x2c1f0
movq -0x40(%rbp), %rdi
addq $0x8, %rdi
callq 0x2c210
movq -0x40(%rbp), %rdi
addq $0x10, %rdi
movq %rdi, -0x38(%rbp)
xorl %esi, %esi
movl $0x8, %edx
callq 0x62c0
movq -0x38(%rbp), %rdi
callq 0x2c230
movq -0x30(%rbp), %rax
cmpq $0x0, (%rax)
je 0x2c076
jmp 0x2c095
leaq 0x557ed(%rip), %rdi     # 0x8186a
leaq 0x52abd(%rip), %rsi     # 0x7eb41
movl $0x24b2, %edx           # imm = 0x24B2
leaq 0x557ee(%rip), %rcx     # 0x8187e
callq 0x6350
movq -0x30(%rbp), %rax
movq (%rax), %rax
movb (%rax), %al
movb %al, -0x41(%rbp)
subb $0x1, %al
je 0x2c0b0
jmp 0x2c0a7
movb -0x41(%rbp), %al
subb $0x2, %al
je 0x2c0c7
jmp 0x2c0de
leaq -0x18(%rbp), %rdi
callq 0x2c1f0
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, 0x8(%rax)
jmp 0x2c103
leaq -0x20(%rbp), %rdi
callq 0x2c210
movq -0x30(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rcx, 0x10(%rax)
jmp 0x2c103
leaq -0x28(%rbp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x62c0
leaq -0x28(%rbp), %rdi
callq 0x2c230
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rcx, 0x18(%rax)
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: Konano[P]UselessDatabase/./json.hpp
// Function: nlohmann::detail::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>>::set_begin()
void set_begin() noexcept
    {
        assert(m_object != nullptr);

        switch (m_object->m_type)
        {
            case value_t::object:
            {
                m_it.object_iterator = m_object->m_value.object->begin();
                break;
            }

            case value_t::array:
            {
                m_it.array_iterator = m_object->m_value.array->begin();
                break;
            }

            case value_t::null:
            {
                // set to end so begin()==end() is true: null is empty
                m_it.primitive_iterator.set_end();
                break;
            }

            default:
            {
                m_it.primitive_iterator.set_begin();
                break;
            }
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, (%rax)
je 0x2c12c
jmp 0x2c14b
leaq 0x55737(%rip), %rdi     # 0x8186a
leaq 0x52a07(%rip), %rsi     # 0x7eb41
movl $0x2508, %edx           # imm = 0x2508
leaq 0x557a9(%rip), %rcx     # 0x818ef
callq 0x6350
movq -0x20(%rbp), %rax
movq (%rax), %rax
movb (%rax), %al
movb %al, -0x21(%rbp)
testb %al, %al
je 0x2c1b9
jmp 0x2c15d
movb -0x21(%rbp), %al
subb $0x1, %al
je 0x2c16f
jmp 0x2c166
movb -0x21(%rbp), %al
subb $0x2, %al
je 0x2c194
jmp 0x2c1cc
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rdi
callq 0x18260
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
jmp 0x2c1dd
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rdi
callq 0x18200
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movq %rcx, 0x10(%rax)
jmp 0x2c1dd
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
addq $0x10, %rdi
callq 0x2c270
jmp 0x2c1dd
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
addq $0x10, %rdi
callq 0x2c290
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: Konano[P]UselessDatabase/./json.hpp
// Function: nlohmann::detail::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>>::set_end()
void set_end() noexcept
    {
        assert(m_object != nullptr);

        switch (m_object->m_type)
        {
            case value_t::object:
            {
                m_it.object_iterator = m_object->m_value.object->end();
                break;
            }

            case value_t::array:
            {
                m_it.array_iterator = m_object->m_value.array->end();
                break;
            }

            default:
            {
                m_it.primitive_iterator.set_end();
                break;
            }
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, (%rax)
je 0x2c6bc
jmp 0x2c6db
leaq 0x551a7(%rip), %rdi     # 0x8186a
leaq 0x52477(%rip), %rsi     # 0x7eb41
movl $0x252d, %edx           # imm = 0x252D
leaq 0x55360(%rip), %rcx     # 0x81a36
callq 0x6350
movq -0x20(%rbp), %rax
movq (%rax), %rax
movb (%rax), %al
movb %al, -0x21(%rbp)
subb $0x1, %al
je 0x2c6f6
jmp 0x2c6ed
movb -0x21(%rbp), %al
subb $0x2, %al
je 0x2c71b
jmp 0x2c740
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rdi
callq 0x18290
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
jmp 0x2c751
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rdi
callq 0x15e40
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movq %rcx, 0x10(%rax)
jmp 0x2c751
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
addq $0x10, %rdi
callq 0x2c270
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: Konano[P]UselessDatabase/./json.hpp
// Function: nlohmann::detail::json_sax_dom_parser<nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>>::start_object(unsigned long)
bool start_object(std::size_t len)
    {
        ref_stack.push_back(handle_value(BasicJsonType::value_t::object));

        if (JSON_HEDLEY_UNLIKELY(len != std::size_t(-1) and len > ref_stack.back()->max_size()))
        {
            JSON_THROW(out_of_range::create(408,
                                            "excessive object size: " + std::to_string(len)));
        }

        return true;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x80(%rbp)
movq %rdi, %rax
addq $0x8, %rax
movq %rax, -0x78(%rbp)
movb $0x1, -0x19(%rbp)
leaq -0x19(%rbp), %rsi
callq 0x30210
movq -0x78(%rbp), %rdi
movq %rax, -0x18(%rbp)
leaq -0x18(%rbp), %rsi
callq 0x301e0
xorl %eax, %eax
cmpq $-0x1, -0x10(%rbp)
movb %al, -0x6e(%rbp)
je 0x2fdb3
movq -0x80(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x88(%rbp)
addq $0x8, %rdi
callq 0x2acd0
movq (%rax), %rdi
callq 0x2ad10
movq %rax, %rcx
movq -0x88(%rbp), %rax
cmpq %rcx, %rax
seta %al
movb %al, -0x6e(%rbp)
movb -0x6e(%rbp), %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x2fdc3
jmp 0x2fe84
movb $0x1, -0x6d(%rbp)
movl $0x20, %edi
callq 0x62a0
movq %rax, -0x90(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0x15110
jmp 0x2fde7
leaq 0x51874(%rip), %rsi     # 0x81662
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rdx
callq 0x150c0
jmp 0x2fdfd
movq -0x90(%rbp), %rdi
movl $0x198, %esi            # imm = 0x198
leaq -0x40(%rbp), %rdx
callq 0x2a2c0
jmp 0x2fe14
movq -0x90(%rbp), %rdi
movb $0x0, -0x6d(%rbp)
leaq 0x80bba(%rip), %rsi     # 0xb09e0
leaq -0x5a1d(%rip), %rdx     # 0x2a410
callq 0x6850
jmp 0x2fe9a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x2fe6e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x2fe65
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x6340
leaq -0x60(%rbp), %rdi
callq 0x6340
testb $0x1, -0x6d(%rbp)
jne 0x2fe76
jmp 0x2fe82
movq -0x90(%rbp), %rdi
callq 0x63a0
jmp 0x2fe91
movb $0x1, %al
andb $0x1, %al
addq $0x90, %rsp
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x6890
nopw (%rax,%rax)
// File: Konano[P]UselessDatabase/./json.hpp
// Function: nlohmann::detail::json_sax_dom_parser<nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>>::start_array(unsigned long)
bool start_array(std::size_t len)
    {
        ref_stack.push_back(handle_value(BasicJsonType::value_t::array));

        if (JSON_HEDLEY_UNLIKELY(len != std::size_t(-1) and len > ref_stack.back()->max_size()))
        {
            JSON_THROW(out_of_range::create(408,
                                            "excessive array size: " + std::to_string(len)));
        }

        return true;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x80(%rbp)
movq %rdi, %rax
addq $0x8, %rax
movq %rax, -0x78(%rbp)
movb $0x2, -0x19(%rbp)
leaq -0x19(%rbp), %rsi
callq 0x30210
movq -0x78(%rbp), %rdi
movq %rax, -0x18(%rbp)
leaq -0x18(%rbp), %rsi
callq 0x301e0
xorl %eax, %eax
cmpq $-0x1, -0x10(%rbp)
movb %al, -0x6e(%rbp)
je 0x2ffa3
movq -0x80(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x88(%rbp)
addq $0x8, %rdi
callq 0x2acd0
movq (%rax), %rdi
callq 0x2ad10
movq %rax, %rcx
movq -0x88(%rbp), %rax
cmpq %rcx, %rax
seta %al
movb %al, -0x6e(%rbp)
movb -0x6e(%rbp), %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x2ffb3
jmp 0x30074
movb $0x1, -0x6d(%rbp)
movl $0x20, %edi
callq 0x62a0
movq %rax, -0x90(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0x15110
jmp 0x2ffd7
leaq 0x51c95(%rip), %rsi     # 0x81c73
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rdx
callq 0x150c0
jmp 0x2ffed
movq -0x90(%rbp), %rdi
movl $0x198, %esi            # imm = 0x198
leaq -0x40(%rbp), %rdx
callq 0x2a2c0
jmp 0x30004
movq -0x90(%rbp), %rdi
movb $0x0, -0x6d(%rbp)
leaq 0x809ca(%rip), %rsi     # 0xb09e0
leaq -0x5c0d(%rip), %rdx     # 0x2a410
callq 0x6850
jmp 0x3008a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x3005e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x30055
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x6340
leaq -0x60(%rbp), %rdi
callq 0x6340
testb $0x1, -0x6d(%rbp)
jne 0x30066
jmp 0x30072
movq -0x90(%rbp), %rdi
callq 0x63a0
jmp 0x30081
movb $0x1, %al
andb $0x1, %al
addq $0x90, %rsp
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x6890
nopw (%rax,%rax)
// File: Konano[P]UselessDatabase/./json.hpp
// Function: nlohmann::detail::input_buffer_adapter::get_character()
std::char_traits<char>::int_type get_character() noexcept override
    {
        if (JSON_HEDLEY_LIKELY(cursor < limit))
        {
            assert(cursor != nullptr and limit != nullptr);
            return std::char_traits<char>::to_int_type(*(cursor++));
        }

        return std::char_traits<char>::eof();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movq 0x8(%rcx), %rax
cmpq 0x10(%rcx), %rax
setb %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x32c99
jmp 0x32cff
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq $0x0, 0x8(%rcx)
movb %al, -0x19(%rbp)
je 0x32cb8
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
setne %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x32cc1
jmp 0x32cc3
jmp 0x32ce2
leaq 0x4fcfc(%rip), %rdi     # 0x829c6
leaq 0x4be70(%rip), %rsi     # 0x7eb41
movl $0xfac, %edx            # imm = 0xFAC
leaq 0x4fd10(%rip), %rcx     # 0x829ed
callq 0x6350
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
movq %rdi, %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
callq 0x32d80
movl %eax, -0x4(%rbp)
jmp 0x32d07
callq 0x20f80
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: Konano[P]UselessDatabase/FileManager.cpp
// Function: FileManager::closeFile(int)
bool FileManager::closeFile(int fileID) {
    setFlag(fileID, 0);
    bpm->closeFile(fileID);
    close(fd[fileID]);
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movl -0xc(%rbp), %esi
xorl %edx, %edx
callq 0x359c0
movq -0x18(%rbp), %rax
movq 0x210(%rax), %rdi
movl -0xc(%rbp), %esi
callq 0x7390
movq -0x18(%rbp), %rax
movslq -0xc(%rbp), %rcx
movl (%rax,%rcx,4), %edi
callq 0x6990
movb $0x1, %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nop
// File: Konano[P]UselessDatabase/FileManager.cpp
// Function: FileManager::createFile(char const*)
bool FileManager::createFile(const char* name) {
    FILE* f = fopen(name, "a+");
    if (f == NULL) return false;
    fclose(f);
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq 0x4e92c(%rip), %rsi     # 0x83787
callq 0x65c0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x34e71
movb $0x0, -0x1(%rbp)
jmp 0x34e7e
movq -0x20(%rbp), %rdi
callq 0x6490
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: Konano[P]UselessDatabase/FileManager.cpp
// Function: FileManager::openFile(char const*, int&)
bool FileManager::openFile(const char* name, int& fileID) {
    int f = open(name, O_RDWR);
    if (f == -1) return false;
    fileID = alloc();
    setFlag(fileID, 1);
    fd[fileID] = f;
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
movl $0x2, %esi
movb $0x0, %al
callq 0x63b0
movl %eax, -0x24(%rbp)
cmpl $-0x1, -0x24(%rbp)
jne 0x34ecb
movb $0x0, -0x1(%rbp)
jmp 0x34f05
movq -0x30(%rbp), %rdi
callq 0x358a0
movq -0x30(%rbp), %rdi
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
movl (%rax), %esi
movl $0x1, %edx
callq 0x359c0
movq -0x30(%rbp), %rax
movl -0x24(%rbp), %edx
movq -0x20(%rbp), %rcx
movslq (%rcx), %rcx
movl %edx, (%rax,%rcx,4)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
// File: Konano[P]UselessDatabase/FileManager.cpp
// Function: FileManager::readPage(int, int, unsigned char*)
int FileManager::readPage(int fileID, int pageID, BufType buf) {
    int f = fd[fileID];
    off_t offset = pageID << PAGE_SIZE_INDEX;
    off_t error = lseek(f, offset, SEEK_SET);
    if (error != offset) return -1;
    read(f, buf, PAGE_SIZE);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x24(%rbp)
movl -0x18(%rbp), %eax
shll $0xd, %eax
cltq
movq %rax, -0x30(%rbp)
movl -0x24(%rbp), %edi
movq -0x30(%rbp), %rsi
xorl %edx, %edx
callq 0x6910
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x30(%rbp), %rax
je 0x34f85
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x34f9d
movl -0x24(%rbp), %edi
movq -0x20(%rbp), %rsi
movl $0x2000, %edx           # imm = 0x2000
callq 0x6700
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Konano[P]UselessDatabase/FileManager.cpp
// Function: FileManager::writePage(int, int, unsigned char*)
int FileManager::writePage(int fileID, int pageID, BufType buf) {
    int f = fd[fileID];
    off_t offset = pageID << PAGE_SIZE_INDEX;
    off_t error = lseek(f, offset, SEEK_SET);
    if (error != offset) return -1;
    write(f, buf, PAGE_SIZE);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x24(%rbp)
movl -0x18(%rbp), %eax
shll $0xd, %eax
cltq
movq %rax, -0x30(%rbp)
movl -0x24(%rbp), %edi
movq -0x30(%rbp), %rsi
xorl %edx, %edx
callq 0x6910
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x30(%rbp), %rax
je 0x35005
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3501d
movl -0x24(%rbp), %edi
movq -0x20(%rbp), %rsi
movl $0x2000, %edx           # imm = 0x2000
callq 0x61b0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Konano[P]UselessDatabase/FileManager.cpp
// Function: readFile(char const*)
char* readFile(const char* path) {
    int length;
    FILE* file = fopen(path, "rb");
    if (file == nullptr) {
        return nullptr;
    }
    fseek(file, 0, SEEK_END);
    length = ftell(file);
    char* data = new char[length + 1];
    rewind(file);
    length = fread(data, 1, length, file);
    data[length] = '\0';
    fclose(file);
    return data;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x4e723(%rip), %rsi     # 0x8378a
callq 0x65c0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x35081
movq $0x0, -0x8(%rbp)
jmp 0x350f0
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x6570
movq -0x20(%rbp), %rdi
callq 0x6030
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
callq 0x6040
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x60b0
movq -0x28(%rbp), %rdi
movslq -0x14(%rbp), %rdx
movq -0x20(%rbp), %rcx
movl $0x1, %esi
callq 0x6730
movl %eax, -0x14(%rbp)
movq -0x28(%rbp), %rax
movslq -0x14(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x20(%rbp), %rdi
callq 0x6490
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: Konano[P]UselessDatabase/FileManager.cpp
// Function: dirPath(char const*)
char* dirPath(const char* dir) { // get str "db/dir"
    int length = 3 + strlen(dir);
    char* data = new char[length + 1];
    strcpy(data, "db/");
    strcpy(data + 3, dir);
    return data;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6250
addq $0x3, %rax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
callq 0x6040
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq 0x4e607(%rip), %rsi     # 0x83790
callq 0x6460
movq -0x18(%rbp), %rdi
addq $0x3, %rdi
movq -0x8(%rbp), %rsi
callq 0x6460
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: Konano[P]UselessDatabase/FileManager.cpp
// Function: dirPath(char const*, char const*)
char* dirPath(const char* dir, const char* path) { // get str "db/dir/path"
    int length = 3 + strlen(dir) + 1 + strlen(path);
    char* data = new char[length + 1];
    strcpy(data, "db/");
    strcpy(data + 3, dir);
    strcpy(data + 3 + strlen(dir), "/");
    strcpy(data + 3 + strlen(dir) + 1, path);
    return data;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6250
addq $0x3, %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6250
movq %rax, %rcx
movq -0x38(%rbp), %rax
addq %rcx, %rax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
callq 0x6040
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
leaq 0x4e588(%rip), %rsi     # 0x83790
callq 0x6460
movq -0x20(%rbp), %rdi
addq $0x3, %rdi
movq -0x8(%rbp), %rsi
callq 0x6460
movq -0x20(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6250
movq -0x30(%rbp), %rdi
addq %rax, %rdi
leaq 0x4e551(%rip), %rsi     # 0x83792
callq 0x6460
movq -0x20(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6250
movq -0x28(%rbp), %rdi
addq %rax, %rdi
addq $0x1, %rdi
movq -0x10(%rbp), %rsi
callq 0x6460
movq -0x20(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: Konano[P]UselessDatabase/FileManager.cpp
// Function: dirPath(char const*, char const*, char const*)
char* dirPath(const char* dir, const char* filename, const char* filetype) { // get str "db/dir/filename.filetype"
    int length = 3 + strlen(dir) + 1 + strlen(filename) + 1 + strlen(filetype);
    char* data = new char[length + 1];
    strcpy(data, "db/");
    strcpy(data + 3, dir);
    strcpy(data + 3 + strlen(dir), "/");
    strcpy(data + 3 + strlen(dir) + 1, filename);
    strcpy(data + 3 + strlen(dir) + 1 + strlen(filename), ".");
    strcpy(data + 3 + strlen(dir) + 1 + strlen(filename) + 1, filetype);
    return data;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6250
addq $0x3, %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6250
movq %rax, %rcx
movq -0x68(%rbp), %rax
addq %rcx, %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rdi
callq 0x6250
movq %rax, %rcx
movq -0x60(%rbp), %rax
addq %rcx, %rax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
callq 0x6040
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
leaq 0x4e499(%rip), %rsi     # 0x83790
callq 0x6460
movq -0x28(%rbp), %rdi
addq $0x3, %rdi
movq -0x8(%rbp), %rsi
callq 0x6460
movq -0x28(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6250
movq -0x58(%rbp), %rdi
addq %rax, %rdi
leaq 0x4e462(%rip), %rsi     # 0x83792
callq 0x6460
movq -0x28(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6250
movq -0x50(%rbp), %rdi
addq %rax, %rdi
addq $0x1, %rdi
movq -0x10(%rbp), %rsi
callq 0x6460
movq -0x28(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6250
movq %rax, %rcx
movq -0x48(%rbp), %rax
addq %rcx, %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6250
movq -0x40(%rbp), %rdi
addq %rax, %rdi
leaq 0x49732(%rip), %rsi     # 0x7eace
callq 0x6460
movq -0x28(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6250
movq %rax, %rcx
movq -0x38(%rbp), %rax
addq %rcx, %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6250
movq -0x30(%rbp), %rdi
addq %rax, %rdi
addq $0x1, %rdi
movq -0x18(%rbp), %rsi
callq 0x6460
movq -0x28(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nop
// File: Konano[P]UselessDatabase/FileManager.cpp
// Function: cleanFiles(char const*)
int cleanFiles(const char *dir) { // clean file(s)
    char dir_name[512];
    DIR *dirp;
    struct dirent *dp;
    struct stat dir_stat;
    int tmp;

    // if can't access, nothing to do
    if ( 0 != access(dir, F_OK) ) {
        return 0;
    }

    // if can't get direcrtory stat, fail
    if ( 0 > stat(dir, &dir_stat) ) {
        perror("get directory stat error");
        return -1;
    }

    if ( S_ISREG(dir_stat.st_mode) ) { // files
        remove(dir);
    } else if ( S_ISDIR(dir_stat.st_mode) ) { // folder
        dirp = opendir(dir);
        while ( (dp=readdir(dirp)) != NULL ) {
            if ( (0 == strcmp(".", dp->d_name)) || (0 == strcmp("..", dp->d_name)) ) { // Ignore . & ..
                continue;
            }
            sprintf(dir_name, "%s/%s", dir, dp->d_name);
            if ((tmp = cleanFiles(dir_name)) != 0) {
                return tmp;
            }
        }
        closedir(dirp);
        rmdir(dir); // remove empty folder
    } else {
        perror("unknow file type!");
        return -1;    
    }
    
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2c0, %rsp            # imm = 0x2C0
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x6830
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x3568e
movl $0x0, -0x4(%rbp)
jmp 0x357e1
movq -0x10(%rbp), %rdi
leaq -0x2b0(%rbp), %rsi
callq 0x6450
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0x356be
leaq 0x4e0e7(%rip), %rdi     # 0x83794
callq 0x6400
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x357e1
movl -0x298(%rbp), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x8000, %eax           # imm = 0x8000
jne 0x356de
movq -0x10(%rbp), %rdi
callq 0x68d0
jmp 0x357da
movl -0x298(%rbp), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x357c3
movq -0x10(%rbp), %rdi
callq 0x6750
movq %rax, -0x218(%rbp)
movq -0x218(%rbp), %rdi
callq 0x6760
movq %rax, -0x220(%rbp)
cmpq $0x0, %rax
je 0x357ac
movq -0x220(%rbp), %rsi
addq $0x13, %rsi
leaq 0x4939b(%rip), %rdi     # 0x7eace
callq 0x66e0
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x3575f
movq -0x220(%rbp), %rsi
addq $0x13, %rsi
leaq 0x4937b(%rip), %rdi     # 0x7eacd
callq 0x66e0
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x35761
jmp 0x35704
leaq -0x210(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x220(%rbp), %rcx
addq $0x13, %rcx
leaq 0x4e02f(%rip), %rsi     # 0x837ad
movb $0x0, %al
callq 0x6110
leaq -0x210(%rbp), %rdi
callq 0x35660
movl %eax, -0x2b4(%rbp)
cmpl $0x0, %eax
je 0x357a7
movl -0x2b4(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x357e1
jmp 0x35704
movq -0x218(%rbp), %rdi
callq 0x67d0
movq -0x10(%rbp), %rdi
callq 0x6220
jmp 0x357d8
leaq 0x4dfe9(%rip), %rdi     # 0x837b3
callq 0x6400
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x357e1
jmp 0x357da
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x2c0, %rsp            # imm = 0x2C0
popq %rbp
retq
nopl (%rax)
// File: Konano[P]UselessDatabase/FileManager.cpp
// Function: checkFile(char const*)
int checkFile(const char *filename) { // file exists? 1: exist, 0: null, -1: error
    struct stat dir_stat;
    if ( 0 != access(filename, F_OK) ) return 0;
    if ( 0 > stat(filename, &dir_stat) ) return -1;
    if ( S_ISREG(dir_stat.st_mode) ) return 1;
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x6830
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x3584b
movl $0x0, -0x4(%rbp)
jmp 0x3588e
movq -0x10(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x6450
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0x3586c
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3588e
movl -0x88(%rbp), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x8000, %eax           # imm = 0x8000
jne 0x35887
movl $0x1, -0x4(%rbp)
jmp 0x3588e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
nopw (%rax,%rax)