LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: CastellanZhang[P]lambdaFM/src/Frame/pc_frame.cpp
// Function: pc_frame::conThread()
void pc_frame::conThread()
{
    bool finished_flag = false;
    vector<vector<fm_sample> > input_vec;
    while(true)
    {
        input_vec.clear();
        sem_wait(&semCon);
        bufMtx.lock();
        for(int i = 0; i < bufSize;)
        {
            if(buffer.empty())
            {
                finished_flag = true;
                break;
            }
            input_vec.push_back(buffer.front());
            i += buffer.front().size();
            buffer.pop();
        }
        bufMtx.unlock();
        sem_post(&semPro);
        pTask->run_task(input_vec);
        if(finished_flag)
            break;
    }
    sem_post(&semCon);
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x18(%rsp)
movb $0x0, 0x4f(%rsp)
leaq 0x30(%rsp), %rdi
callq 0xcbf0
jmp 0xc044
leaq 0x30(%rsp), %rdi
callq 0xcc00
movq 0x18(%rsp), %rdi
addq $0x58, %rdi
callq 0x31a0
jmp 0xc05e
movq 0x18(%rsp), %rdi
addq $0x10, %rdi
callq 0x53f0
jmp 0xc06e
movl $0x0, 0x20(%rsp)
movq 0x18(%rsp), %rcx
movl 0x20(%rsp), %eax
cmpl 0xe0(%rcx), %eax
jge 0xc135
movq 0x18(%rsp), %rdi
addq $0x78, %rdi
callq 0xcc20
movb %al, 0x17(%rsp)
jmp 0xc09f
movb 0x17(%rsp), %al
testb $0x1, %al
jne 0xc0a9
jmp 0xc0d0
movb $0x1, 0x4f(%rsp)
jmp 0xc135
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
leaq 0x30(%rsp), %rdi
callq 0xccd0
jmp 0xc196
movq 0x18(%rsp), %rdi
addq $0x78, %rdi
callq 0xccb0
movq %rax, 0x8(%rsp)
jmp 0xc0e5
movq 0x8(%rsp), %rsi
leaq 0x30(%rsp), %rdi
callq 0xcc40
jmp 0xc0f6
movq 0x18(%rsp), %rdi
addq $0x78, %rdi
callq 0xccb0
movq %rax, (%rsp)
jmp 0xc10a
movq (%rsp), %rdi
callq 0x5da0
movq 0x18(%rsp), %rdi
movq %rax, %rcx
movl 0x20(%rsp), %eax
addl %ecx, %eax
movl %eax, 0x20(%rsp)
addq $0x78, %rdi
callq 0xccc0
jmp 0xc130
jmp 0xc076
movq 0x18(%rsp), %rdi
addq $0x10, %rdi
callq 0x5650
jmp 0xc145
movq 0x18(%rsp), %rdi
addq $0x38, %rdi
callq 0x34b0
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rdi
movq (%rdi), %rax
movq (%rax), %rax
leaq 0x30(%rsp), %rsi
callq *%rax
jmp 0xc16b
testb $0x1, 0x4f(%rsp)
je 0xc174
jmp 0xc179
jmp 0xc042
movq 0x18(%rsp), %rdi
addq $0x58, %rdi
callq 0x34b0
leaq 0x30(%rsp), %rdi
callq 0xccd0
addq $0x58, %rsp
retq
movq 0x28(%rsp), %rdi
callq 0x34f0
// File: CastellanZhang[P]lambdaFM/src/Utils/utils.cpp
// Function: utils::splitString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, char, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>*)
void utils::splitString(string& line, char delimiter, vector<string>* r)
{
    int begin = 0;
    for(int i = 0; i < line.size(); ++i)
    {
        if(line[i] == delimiter)
        {
            (*r).push_back(line.substr(begin, i - begin));
            begin = i + 1;
        }
    }
    if(begin < line.size())
        (*r).push_back(line.substr(begin, line.size() - begin));
}

// Assembly:
subq $0xb8, %rsp
movb %sil, %al
movq %rdi, 0xb0(%rsp)
movb %al, 0xaf(%rsp)
movq %rdx, 0xa0(%rsp)
movl $0x0, 0x9c(%rsp)
movl $0x0, 0x98(%rsp)
movslq 0x98(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0xb0(%rsp), %rdi
callq 0x3200
movq %rax, %rcx
movq 0x40(%rsp), %rax
cmpq %rcx, %rax
jae 0x11ae7
movq 0xb0(%rsp), %rdi
movslq 0x98(%rsp), %rsi
callq 0x3580
movsbl (%rax), %eax
movsbl 0xaf(%rsp), %ecx
cmpl %ecx, %eax
jne 0x11acf
movq 0xa0(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0xb0(%rsp), %rsi
movslq 0x9c(%rsp), %rdx
movl %edx, %ecx
movl 0x98(%rsp), %eax
subl %ecx, %eax
movslq %eax, %rcx
leaq 0x78(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x3310
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x5de0
jmp 0x11a95
leaq 0x78(%rsp), %rdi
callq 0x3598
movl 0x98(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x9c(%rsp)
jmp 0x11acf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
leaq 0x78(%rsp), %rdi
callq 0x3598
jmp 0x11ba4
jmp 0x11ad1
movl 0x98(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x98(%rsp)
jmp 0x119f7
movslq 0x9c(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0xb0(%rsp), %rdi
callq 0x3200
movq %rax, %rcx
movq 0x28(%rsp), %rax
cmpq %rcx, %rax
jae 0x11b9c
movq 0xa0(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0xb0(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movslq 0x9c(%rsp), %rax
movq %rax, 0x10(%rsp)
callq 0x3200
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rax, %rcx
movslq 0x9c(%rsp), %rax
subq %rax, %rcx
leaq 0x48(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x3310
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x5de0
jmp 0x11b76
leaq 0x48(%rsp), %rdi
callq 0x3598
jmp 0x11b9c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x3598
jmp 0x11ba4
addq $0xb8, %rsp
retq
movq 0x70(%rsp), %rdi
callq 0x34f0
nop
// File: CastellanZhang[P]lambdaFM/src/Utils/utils.cpp
// Function: utils::gaussian()
double utils::gaussian() 
{
    double u,v, x, y, Q;
    do
    {
        do 
        {
            u = uniform();
        } while (u == 0.0); 

        v = 1.7156 * (uniform() - 0.5);
        x = u - 0.449871;
        y = fabs(v) + 0.386595;
        Q = x * x + y * (0.19600 * y - 0.25472 * x);
    } while (Q >= 0.27597 && (Q > 0.27846 || v * v > -4.0 * u * u * log(u)));
    return v / u;
}

// Assembly:
subq $0x48, %rsp
jmp 0x11c16
callq 0x11bf0
movsd %xmm0, 0x40(%rsp)
movsd 0x40(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x11c34
jp 0x11c34
jmp 0x11c16
callq 0x11bf0
movaps %xmm0, %xmm1
movsd 0x3c4(%rip), %xmm0      # 0x12008
subsd %xmm0, %xmm1
movsd 0x770(%rip), %xmm0      # 0x123c0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x38(%rsp)
movsd 0x40(%rsp), %xmm0
movsd 0x750(%rip), %xmm1      # 0x123b8
subsd %xmm1, %xmm0
movsd %xmm0, 0x30(%rsp)
movsd 0x38(%rsp), %xmm0
movaps 0x761(%rip), %xmm1      # 0x123e0
pand %xmm1, %xmm0
movsd 0x725(%rip), %xmm1      # 0x123b0
addsd %xmm1, %xmm0
movsd %xmm0, 0x28(%rsp)
movsd 0x30(%rsp), %xmm0
movsd 0x30(%rsp), %xmm2
movsd 0x28(%rsp), %xmm1
movsd 0x28(%rsp), %xmm3
movsd 0x6f3(%rip), %xmm4      # 0x123a8
mulsd 0x30(%rsp), %xmm4
movq %xmm4, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm4
movsd 0x6c6(%rip), %xmm5      # 0x123a0
mulsd %xmm5, %xmm3
addsd %xmm4, %xmm3
mulsd %xmm3, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x20(%rsp), %xmm0
xorl %eax, %eax
movsd 0x6c4(%rip), %xmm1      # 0x123c8
ucomisd %xmm1, %xmm0
movb %al, 0x1f(%rsp)
jb 0x11d85
movsd 0x20(%rsp), %xmm0
movb $0x1, %al
movsd 0x6b2(%rip), %xmm1      # 0x123d0
ucomisd %xmm1, %xmm0
movb %al, 0x1e(%rsp)
ja 0x11d7d
movsd 0x38(%rsp), %xmm0
mulsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x696(%rip), %xmm0      # 0x123d8
mulsd 0x40(%rsp), %xmm0
mulsd 0x40(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x40(%rsp), %xmm0
callq 0x3260
movsd 0x8(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x10(%rsp), %xmm0
mulsd %xmm2, %xmm1
ucomisd %xmm1, %xmm0
seta %al
movb %al, 0x1e(%rsp)
movb 0x1e(%rsp), %al
movb %al, 0x1f(%rsp)
movb 0x1f(%rsp), %al
testb $0x1, %al
jne 0x11c14
movsd 0x38(%rsp), %xmm0
divsd 0x40(%rsp), %xmm0
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: CastellanZhang[P]lambdaFM/src/Utils/utils.cpp
// Function: utils::gaussian(double, double)
double utils::gaussian(double mean, double stdev) {
    if(0.0 == stdev)
    {
        return mean;
    }
    else
    {
        return mean + stdev * gaussian();
    }
}

// Assembly:
subq $0x28, %rsp
movsd %xmm0, 0x18(%rsp)
movsd %xmm1, 0x10(%rsp)
xorps %xmm0, %xmm0
ucomisd 0x10(%rsp), %xmm0
jne 0x11ddb
jp 0x11ddb
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
jmp 0x11e13
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rsp)
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
callq 0x11c10
movsd (%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x8(%rsp), %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x20(%rsp), %xmm0
addq $0x28, %rsp
retq
// File: rocket323[P]fishdb/examples/ex_iter.cpp
// Function: main
int main(int argc, char **argv)
{
    const char *fname = argv[1];

    auto bt = BTree::Open(fname);
    if (bt == NULL)
    {
        printf("open db[%s] failed", fname);
        return -1;
    }

    /*
    bt->Put("name1", "tom");
    bt->Put("name2", "jack");
    bt->Put("name3", "michael");
    bt->Put("greet", "hello world");
    */

    auto iter = bt->NewIterator();
    for (iter->SeekToFirst(); iter->Valid(); iter->Next())
    {
        // std::cout << iter->Key() << ": " << iter->Value() << std::endl;
        std::cout << iter->Key() << std::endl;
    }
    delete iter;
    bt->Close();
    delete bt;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0xb8(%rbp)
leaq -0x41(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
callq 0x2380
movq -0xb8(%rbp), %rsi
movq -0xb0(%rbp), %rdx
leaq -0x40(%rbp), %rdi
callq 0x22d0
jmp 0x25f9
leaq -0x78(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
leaq -0x79(%rbp), %rsi
callq 0x2800
movq -0xc8(%rbp), %rsi
leaq -0x40(%rbp), %rdi
movl $0x2, %edx
callq 0x51a0
movq %rax, -0xc0(%rbp)
jmp 0x262b
leaq -0x78(%rbp), %rdi
callq 0x2890
leaq -0x40(%rbp), %rdi
callq 0x2140
leaq -0x41(%rbp), %rdi
callq 0x2240
movq -0xc0(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x26b0
movq -0x18(%rbp), %rsi
leaq 0xf9b1(%rip), %rdi      # 0x12014
movb $0x0, %al
callq 0x2050
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x27c2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x26a2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x2890
leaq -0x40(%rbp), %rdi
callq 0x2140
leaq -0x41(%rbp), %rdi
callq 0x2240
jmp 0x27ce
movq -0x20(%rbp), %rdi
callq 0x5320
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rdi
callq 0x35d0
movq -0x88(%rbp), %rdi
callq 0x3f70
testb $0x1, %al
jne 0x26de
jmp 0x275d
movq -0x88(%rbp), %rsi
leaq -0xa8(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
callq 0x3f90
movq -0xd8(%rbp), %rsi
movq 0x188d2(%rip), %rdi     # 0x1afd8
callq 0x21b0
movq %rax, -0xd0(%rbp)
jmp 0x2714
movq -0xd0(%rbp), %rdi
movq 0x1889e(%rip), %rsi     # 0x1afc0
callq 0x2220
jmp 0x2729
leaq -0xa8(%rbp), %rdi
callq 0x2140
movq -0x88(%rbp), %rdi
callq 0x3b50
jmp 0x26cc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x2140
jmp 0x27ce
movq -0x88(%rbp), %rax
movq %rax, -0xe0(%rbp)
cmpq $0x0, %rax
je 0x2789
movq -0xe0(%rbp), %rdi
callq 0x28b0
movq -0xe0(%rbp), %rdi
callq 0x21c0
movq -0x20(%rbp), %rdi
callq 0x5300
movq -0x20(%rbp), %rax
movq %rax, -0xe8(%rbp)
cmpq $0x0, %rax
je 0x27bb
movq -0xe8(%rbp), %rdi
callq 0x28d0
movq -0xe8(%rbp), %rdi
callq 0x21c0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xf0, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x2370
nopw (%rax,%rax)
// File: rocket323[P]fishdb/./btree.h
// Function: fishdb::DefaultCmp::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool operator()(const std::string &a, const std::string &b)
    {
        int min_len = std::min(a.length(), b.length());
        if (min_len == 0) return false;
        int result = memcmp(a.data(), b.data(), min_len);
        if (result != 0) return result < 0;
        return a.length() < b.length();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2330
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
callq 0x2330
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x33b0
movq (%rax), %rax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0x333d
movb $0x0, -0x1(%rbp)
jmp 0x33a2
movq -0x18(%rbp), %rdi
callq 0x22a0
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rdi
callq 0x22a0
movq -0x48(%rbp), %rdi
movq %rax, %rsi
movslq -0x24(%rbp), %rdx
callq 0x20f0
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
je 0x337a
cmpl $0x0, -0x3c(%rbp)
setl %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x33a2
movq -0x18(%rbp), %rdi
callq 0x2330
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rdi
callq 0x2330
movq %rax, %rcx
movq -0x50(%rbp), %rax
cmpq %rcx, %rax
setb %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: rocket323[P]fishdb/./iter.cpp
// Function: fishdb::Iterator::SeekToFirst()
void Iterator::SeekToFirst()
{
    auto now = m_btree->m_root;
    m_stack.push_back(now);

    while (!now->is_leaf)
    {
        now = m_btree->ReadPage(now->children[0]);
        m_stack.push_back(now);
    }
    if (now->kvs.size() > 0)
    {
        m_valid = true;
        m_kv_idx = 0;
    }
    else
    {
        m_valid = false;
        m_stack.clear();
    }
    printf("iter stack_size[%zu]\n", m_stack.size());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq (%rax), %rsi
addq $0x70, %rsi
leaq -0x18(%rbp), %rdi
movq %rdi, -0x40(%rbp)
callq 0x40f0
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
addq $0x8, %rdi
callq 0x4120
jmp 0x360b
jmp 0x360d
leaq -0x18(%rbp), %rdi
callq 0x4190
movb 0x79(%rax), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x3624
jmp 0x36a4
movq -0x48(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x4190
movq %rax, %rdi
addq $0x48, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x41b0
movq -0x50(%rbp), %rsi
movq (%rax), %rdx
leaq -0x38(%rbp), %rdi
callq 0x5390
jmp 0x365a
leaq -0x18(%rbp), %rdi
movq %rdi, -0x58(%rbp)
leaq -0x38(%rbp), %rsi
movq %rsi, -0x60(%rbp)
callq 0x41d0
movq -0x60(%rbp), %rdi
callq 0x27e0
movq -0x48(%rbp), %rdi
movq -0x58(%rbp), %rsi
addq $0x8, %rdi
callq 0x4120
jmp 0x368b
jmp 0x360d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x27e0
jmp 0x3710
leaq -0x18(%rbp), %rdi
callq 0x4190
movq %rax, %rdi
addq $0x60, %rdi
callq 0x4200
cmpq $0x0, %rax
jbe 0x36d0
movq -0x48(%rbp), %rax
movb $0x1, 0x24(%rax)
movl $0x0, 0x20(%rax)
jmp 0x36e1
movq -0x48(%rbp), %rdi
movb $0x0, 0x24(%rdi)
addq $0x8, %rdi
callq 0x4220
movq -0x48(%rbp), %rdi
addq $0x8, %rdi
callq 0x4240
movq %rax, %rsi
leaq 0xe945(%rip), %rdi      # 0x1203d
xorl %eax, %eax
callq 0x2050
jmp 0x3701
leaq -0x18(%rbp), %rdi
callq 0x27e0
addq $0x60, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x2370
nopl (%rax)
// File: rocket323[P]fishdb/./iter.cpp
// Function: fishdb::Iterator::SeekToLast()
void Iterator::SeekToLast()
{
    auto now = m_btree->m_root;
    m_stack.push_back(now);

    while (!now->is_leaf)
    {
        now = m_btree->ReadPage(now->children.back());
        m_stack.push_back(now);
    }
    if (now->kvs.size() > 0)
    {
        m_valid = true;
        m_kv_idx = now->kvs.size() - 1;
    }
    else
    {
        m_valid = false;
        m_stack.clear();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq (%rax), %rsi
addq $0x70, %rsi
leaq -0x18(%rbp), %rdi
movq %rdi, -0x40(%rbp)
callq 0x40f0
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
addq $0x8, %rdi
callq 0x4120
jmp 0x375b
jmp 0x375d
leaq -0x18(%rbp), %rdi
callq 0x4190
movb 0x79(%rax), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x3771
jmp 0x37ed
movq -0x48(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x4190
movq %rax, %rdi
addq $0x48, %rdi
callq 0x4260
movq -0x50(%rbp), %rsi
movq (%rax), %rdx
leaq -0x38(%rbp), %rdi
callq 0x5390
jmp 0x37a3
leaq -0x18(%rbp), %rdi
movq %rdi, -0x58(%rbp)
leaq -0x38(%rbp), %rsi
movq %rsi, -0x60(%rbp)
callq 0x41d0
movq -0x60(%rbp), %rdi
callq 0x27e0
movq -0x48(%rbp), %rdi
movq -0x58(%rbp), %rsi
addq $0x8, %rdi
callq 0x4120
jmp 0x37d4
jmp 0x375d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x27e0
jmp 0x3855
leaq -0x18(%rbp), %rdi
callq 0x4190
movq %rax, %rdi
addq $0x60, %rdi
callq 0x4200
cmpq $0x0, %rax
jbe 0x3835
movq -0x48(%rbp), %rax
movb $0x1, 0x24(%rax)
leaq -0x18(%rbp), %rdi
callq 0x4190
movq %rax, %rdi
addq $0x60, %rdi
callq 0x4200
movq %rax, %rcx
movq -0x48(%rbp), %rax
subq $0x1, %rcx
movl %ecx, 0x20(%rax)
jmp 0x3846
movq -0x48(%rbp), %rdi
movb $0x0, 0x24(%rdi)
addq $0x8, %rdi
callq 0x4220
leaq -0x18(%rbp), %rdi
callq 0x27e0
addq $0x60, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x2370
nop
// File: rocket323[P]fishdb/./btree.cpp
// Function: fishdb::BTree::Open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::function<bool (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)>, int)
BTree * BTree::Open(std::string dbfile,
        CmpFunc cmp_func, int min_key_num)
{
    BTree *bt = new BTree();
    bt->m_cmp_func = cmp_func;
    bt->m_min_key_num = min_key_num;

    int ret = bt->m_pager.Init(dbfile);
    if (ret)
        return NULL;
    bt->m_root = bt->m_pager.GetRoot();
    printf("root_page_no[%" PRId64 "]\n", bt->m_root->header.page_no);
    return bt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x90(%rbp)
movq %rsi, -0x98(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl $0x80, %edi
callq 0x21f0
movq %rax, %rdi
movq %rdi, -0xa0(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0xb0(%rbp)
movaps %xmm0, 0x70(%rdi)
movaps %xmm0, 0x60(%rdi)
movaps %xmm0, 0x50(%rdi)
movaps %xmm0, 0x40(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
callq 0x7d60
movq -0xa0(%rbp), %rax
movq -0x98(%rbp), %rsi
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
addq $0x50, %rdi
callq 0x7da0
movq -0x90(%rbp), %rsi
movl -0x1c(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x48(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x88(%rbp)
leaq -0x50(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x20e0
movq -0x88(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0xddd0
movl %eax, -0x74(%rbp)
jmp 0x5263
leaq -0x50(%rbp), %rdi
callq 0x2140
movl -0x74(%rbp), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x5299
movq $0x0, -0x8(%rbp)
jmp 0x52e6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x2140
jmp 0x52f3
movq -0x28(%rbp), %rsi
leaq -0x70(%rbp), %rdi
callq 0xe1e0
movq -0x28(%rbp), %rdi
addq $0x70, %rdi
leaq -0x70(%rbp), %rsi
callq 0x41d0
leaq -0x70(%rbp), %rdi
callq 0x27e0
movq -0x28(%rbp), %rdi
addq $0x70, %rdi
callq 0x4190
movq (%rax), %rsi
leaq 0xce11(%rip), %rdi      # 0x120e8
movb $0x0, %al
callq 0x2050
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x2370
nopl (%rax)
// File: rocket323[P]fishdb/./btree.cpp
// Function: fishdb::BTree::LowerBound(std::shared_ptr<fishdb::MemPage>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
KVIter BTree::LowerBound(std::shared_ptr<MemPage> mp, const std::string &key)
{
    for (auto iter = mp->kvs.begin(); iter != mp->kvs.end(); ++iter)
    {
        if (!m_cmp_func(iter->key, key))
            return iter;
    }
    return mp->kvs.end();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rsi, -0x40(%rbp)
movq %rdi, %rax
movq -0x40(%rbp), %rdi
movq %rdi, -0x38(%rbp)
movq %rax, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
callq 0x4190
movq %rax, %rdi
addq $0x60, %rdi
callq 0x4310
movq %rax, -0x8(%rbp)
movq -0x38(%rbp), %rdi
callq 0x4190
movq %rax, %rdi
addq $0x60, %rdi
callq 0x4380
movq %rax, -0x28(%rbp)
leaq -0x8(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x4340
testb $0x1, %al
jne 0x552c
jmp 0x5564
movq -0x30(%rbp), %rax
addq $0x50, %rax
movq %rax, -0x48(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x7e80
movq -0x48(%rbp), %rdi
movq %rax, %rsi
movq -0x20(%rbp), %rdx
callq 0x7e30
testb $0x1, %al
jne 0x5557
jmp 0x557d
jmp 0x5559
leaq -0x8(%rbp), %rdi
callq 0x7ea0
jmp 0x5500
movq -0x38(%rbp), %rdi
callq 0x4190
movq %rax, %rdi
addq $0x60, %rdi
callq 0x4380
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: rocket323[P]fishdb/./btree.cpp
// Function: fishdb::BTree::UpperBound(std::shared_ptr<fishdb::MemPage>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
KVIter BTree::UpperBound(std::shared_ptr<MemPage> mp, const std::string &key)
{
    for (auto iter = mp->kvs.begin(); iter != mp->kvs.end(); ++iter)
    {
        if (m_cmp_func(key, iter->key))
            return iter;
    }
    return mp->kvs.end();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rsi, -0x40(%rbp)
movq %rdi, %rax
movq -0x40(%rbp), %rdi
movq %rdi, -0x38(%rbp)
movq %rax, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
callq 0x4190
movq %rax, %rdi
addq $0x60, %rdi
callq 0x4310
movq %rax, -0x8(%rbp)
movq -0x38(%rbp), %rdi
callq 0x4190
movq %rax, %rdi
addq $0x60, %rdi
callq 0x4380
movq %rax, -0x28(%rbp)
leaq -0x8(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x4340
testb $0x1, %al
jne 0x55fc
jmp 0x563e
movq -0x30(%rbp), %rax
addq $0x50, %rax
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x7e80
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq %rax, %rdx
callq 0x7e30
testb $0x1, %al
jne 0x562f
jmp 0x5631
jmp 0x5657
jmp 0x5633
leaq -0x8(%rbp), %rdi
callq 0x7ea0
jmp 0x55d0
movq -0x38(%rbp), %rdi
callq 0x4190
movq %rax, %rdi
addq $0x60, %rdi
callq 0x4380
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rocket323[P]fishdb/./btree.cpp
// Function: fishdb::BTree::Get(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
int BTree::Get(const std::string &key, std::string &data)
{
    auto now = m_root;
    while (now != NULL)
    {
        auto iter = LowerBound(now, key);
        size_t p = iter - now->kvs.begin();
        if (iter != now->kvs.end() && Equal(iter->key, key))
        {
            data = iter->value;
            return BT_OK;
        }
        else if (!now->is_leaf)
            now = ReadPage(now->children[p]);
        else
            return BT_NOT_FOUND;
    }
    return BT_ERROR;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rsi
movq %rsi, -0x90(%rbp)
addq $0x70, %rsi
leaq -0x30(%rbp), %rdi
callq 0x40f0
leaq -0x30(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x42a0
testb $0x1, %al
jne 0x5765
jmp 0x591a
leaq -0x48(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
leaq -0x30(%rbp), %rsi
callq 0x40f0
movq -0x90(%rbp), %rdi
movq -0xa0(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x54c0
movq %rax, -0x98(%rbp)
jmp 0x5799
movq -0x98(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x27e0
leaq -0x30(%rbp), %rdi
callq 0x4190
movq %rax, %rdi
addq $0x60, %rdi
callq 0x4310
movq %rax, -0x68(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x42d0
movq %rax, -0x60(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x4190
movq %rax, %rdi
addq $0x60, %rdi
callq 0x4380
movq %rax, -0x70(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x4340
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0xa1(%rbp)
jne 0x580e
jmp 0x5840
leaq -0x38(%rbp), %rdi
callq 0x7e80
movq -0x90(%rbp), %rdi
movq %rax, %rsi
movq -0x18(%rbp), %rdx
callq 0x5460
movb %al, -0xa2(%rbp)
jmp 0x5832
movb -0xa2(%rbp), %al
movb %al, -0xa1(%rbp)
jmp 0x5840
movb -0xa1(%rbp), %al
testb $0x1, %al
jne 0x584c
jmp 0x58a5
leaq -0x38(%rbp), %rdi
callq 0x7e80
movq %rax, %rsi
addq $0x20, %rsi
movq -0x20(%rbp), %rdi
callq 0x2040
jmp 0x5867
movl $0x0, -0x4(%rbp)
movl $0x1, -0x74(%rbp)
jmp 0x5928
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x27e0
jmp 0x593d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x593d
leaq -0x30(%rbp), %rdi
callq 0x4190
testb $0x1, 0x79(%rax)
jne 0x5903
leaq -0x30(%rbp), %rdi
callq 0x4190
movq %rax, %rdi
addq $0x48, %rdi
movq -0x60(%rbp), %rsi
callq 0x41b0
movq -0x90(%rbp), %rsi
movq (%rax), %rdx
leaq -0x88(%rbp), %rdi
callq 0x5390
jmp 0x58e5
leaq -0x30(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x41d0
leaq -0x88(%rbp), %rdi
callq 0x27e0
jmp 0x5913
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
movl $0x1, -0x74(%rbp)
jmp 0x5928
jmp 0x5915
jmp 0x574f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl $0x1, -0x74(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x27e0
movl -0x4(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
leaq -0x30(%rbp), %rdi
callq 0x27e0
movq -0x50(%rbp), %rdi
callq 0x2370
nop
// File: rocket323[P]fishdb/./btree.cpp
// Function: fishdb::BTree::Keys[abi:cxx11](fishdb::MemPage*)
std::string BTree::Keys(MemPage *mp)
{
    std::ostringstream out;
    out << "[";
    for (size_t i = 0; i < mp->kvs.size(); ++i)
    {
        out << mp->kvs[i].key << ((i == mp->kvs.size() - 1) ? "" : " ");
    }
    out << "]";

    return out.str();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1e0, %rsp            # imm = 0x1E0
movq %rdi, -0x1c0(%rbp)
movq %rdi, %rax
movq %rax, -0x1b8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x190(%rbp), %rdi
movq %rdi, -0x1b0(%rbp)
callq 0x22c0
movq -0x1b0(%rbp), %rdi
leaq 0xaaa3(%rip), %rsi      # 0x122fc
callq 0x21d0
jmp 0x7860
movq $0x0, -0x1a8(%rbp)
movq -0x1a8(%rbp), %rax
movq %rax, -0x1c8(%rbp)
movq -0x18(%rbp), %rdi
addq $0x60, %rdi
callq 0x4200
movq %rax, %rcx
movq -0x1c8(%rbp), %rax
cmpq %rcx, %rax
jae 0x7949
movq -0x18(%rbp), %rdi
addq $0x60, %rdi
movq -0x1a8(%rbp), %rsi
callq 0x43f0
movq %rax, %rsi
leaq -0x190(%rbp), %rdi
callq 0x21b0
movq %rax, -0x1d0(%rbp)
jmp 0x78c5
movq -0x1a8(%rbp), %rax
movq %rax, -0x1d8(%rbp)
movq -0x18(%rbp), %rdi
addq $0x60, %rdi
callq 0x4200
movq -0x1d0(%rbp), %rdi
movq %rax, %rcx
movq -0x1d8(%rbp), %rax
decq %rcx
subq %rcx, %rax
leaq 0xa7fc(%rip), %rax      # 0x120fa
leaq 0xa9f9(%rip), %rsi      # 0x122fe
cmoveq %rax, %rsi
callq 0x21d0
jmp 0x7910
jmp 0x7912
movq -0x1a8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x1a8(%rbp)
jmp 0x786b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x198(%rbp)
movl %eax, -0x19c(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x2080
jmp 0x798f
leaq 0xa9b0(%rip), %rsi      # 0x12300
leaq -0x190(%rbp), %rdi
callq 0x21d0
jmp 0x795e
movq -0x1c0(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x2200
jmp 0x7973
leaq -0x190(%rbp), %rdi
callq 0x2080
movq -0x1b8(%rbp), %rax
addq $0x1e0, %rsp            # imm = 0x1E0
popq %rbp
retq
movq -0x198(%rbp), %rdi
callq 0x2370
nopl (%rax,%rax)
// File: rocket323[P]fishdb/./btree.cpp
// Function: fishdb::BTree::Childen[abi:cxx11](fishdb::MemPage*)
std::string BTree::Childen(MemPage *mp)
{
    std::ostringstream out;
    out << "[";
    for (size_t i = 0; i < mp->children.size(); ++i)
    {
        out << mp->children[i] << ((i == mp->children.size() - 1) ? "" : " ");
    }
    out << "]";

    return out.str();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1e0, %rsp            # imm = 0x1E0
movq %rdi, -0x1c0(%rbp)
movq %rdi, %rax
movq %rax, -0x1b8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x190(%rbp), %rdi
movq %rdi, -0x1b0(%rbp)
callq 0x22c0
movq -0x1b0(%rbp), %rdi
leaq 0xa913(%rip), %rsi      # 0x122fc
callq 0x21d0
jmp 0x79f0
movq $0x0, -0x1a8(%rbp)
movq -0x1a8(%rbp), %rax
movq %rax, -0x1c8(%rbp)
movq -0x18(%rbp), %rdi
addq $0x48, %rdi
callq 0x7ec0
movq %rax, %rcx
movq -0x1c8(%rbp), %rax
cmpq %rcx, %rax
jae 0x7ad9
movq -0x18(%rbp), %rdi
addq $0x48, %rdi
movq -0x1a8(%rbp), %rsi
callq 0x41b0
movq (%rax), %rsi
leaq -0x190(%rbp), %rdi
callq 0x2390
movq %rax, -0x1d0(%rbp)
jmp 0x7a55
movq -0x1a8(%rbp), %rax
movq %rax, -0x1d8(%rbp)
movq -0x18(%rbp), %rdi
addq $0x48, %rdi
callq 0x7ec0
movq -0x1d0(%rbp), %rdi
movq %rax, %rcx
movq -0x1d8(%rbp), %rax
decq %rcx
subq %rcx, %rax
leaq 0xa66c(%rip), %rax      # 0x120fa
leaq 0xa869(%rip), %rsi      # 0x122fe
cmoveq %rax, %rsi
callq 0x21d0
jmp 0x7aa0
jmp 0x7aa2
movq -0x1a8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x1a8(%rbp)
jmp 0x79fb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x198(%rbp)
movl %eax, -0x19c(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x2080
jmp 0x7b1f
leaq 0xa820(%rip), %rsi      # 0x12300
leaq -0x190(%rbp), %rdi
callq 0x21d0
jmp 0x7aee
movq -0x1c0(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x2200
jmp 0x7b03
leaq -0x190(%rbp), %rdi
callq 0x2080
movq -0x1b8(%rbp), %rax
addq $0x1e0, %rsp            # imm = 0x1E0
popq %rbp
retq
movq -0x198(%rbp), %rdi
callq 0x2370
nopl (%rax,%rax)
// File: rocket323[P]fishdb/./btree.cpp
// Function: fishdb::BTree::Print(std::shared_ptr<fishdb::MemPage>)
void BTree::Print(std::shared_ptr<MemPage> mp)
{
    printf("%" PRId64 ", %s -> %s\n", mp->header.page_no, Keys(mp.get()).c_str(), Childen(mp.get()).c_str());
    for (size_t i = 0; i < mp->children.size(); ++i)
    {
        auto child = ReadPage(mp->children[i]);
        Print(ReadPage(mp->children[i]));
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rsi, -0xb8(%rbp)
movq %rdi, %rax
movq -0xb8(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
movq %rax, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x90(%rbp)
callq 0x4190
movq -0xa0(%rbp), %rdi
movq (%rax), %rax
movq %rax, -0xb0(%rbp)
callq 0x4e70
movq -0x90(%rbp), %rsi
movq %rax, %rdx
leaq -0x30(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0x7810
movq -0xa8(%rbp), %rdi
callq 0x20d0
movq -0xa0(%rbp), %rdi
movq %rax, -0x98(%rbp)
callq 0x4e70
movq -0x90(%rbp), %rsi
movq %rax, %rdx
leaq -0x50(%rbp), %rdi
callq 0x79a0
jmp 0x7bcf
leaq -0x50(%rbp), %rdi
callq 0x20d0
movq -0xb0(%rbp), %rsi
movq -0x98(%rbp), %rdx
movq %rax, %rcx
leaq 0xa712(%rip), %rdi      # 0x12302
xorl %eax, %eax
callq 0x2050
jmp 0x7bf9
leaq -0x50(%rbp), %rdi
callq 0x2140
leaq -0x30(%rbp), %rdi
callq 0x2140
movq $0x0, -0x68(%rbp)
movq -0xa0(%rbp), %rdi
movq -0x68(%rbp), %rax
movq %rax, -0xc0(%rbp)
callq 0x4190
movq %rax, %rdi
addq $0x48, %rdi
callq 0x7ec0
movq %rax, %rcx
movq -0xc0(%rbp), %rax
cmpq %rcx, %rax
jae 0x7d46
movq -0xa0(%rbp), %rdi
callq 0x4190
movq %rax, %rdi
addq $0x48, %rdi
movq -0x68(%rbp), %rsi
callq 0x41b0
movq -0x90(%rbp), %rsi
movq (%rax), %rdx
leaq -0x78(%rbp), %rdi
callq 0x5390
movq -0xa0(%rbp), %rdi
callq 0x4190
movq %rax, %rdi
addq $0x48, %rdi
movq -0x68(%rbp), %rsi
callq 0x41b0
movq -0x90(%rbp), %rsi
movq (%rax), %rdx
leaq -0x88(%rbp), %rdi
callq 0x5390
jmp 0x7cac
movq -0x90(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x7b30
jmp 0x7cc1
leaq -0x88(%rbp), %rdi
callq 0x27e0
leaq -0x78(%rbp), %rdi
callq 0x27e0
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x7c13
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x7d0a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x2140
leaq -0x30(%rbp), %rdi
callq 0x2140
jmp 0x7d4f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x7d3b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x27e0
leaq -0x78(%rbp), %rdi
callq 0x27e0
jmp 0x7d4f
addq $0xc0, %rsp
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x2370
nopl (%rax,%rax)
// File: rocket323[P]fishdb/./pager.cpp
// Function: fishdb::Pager::Init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int Pager::Init(std::string file)
{
    m_db_header = new DBHeader();

    m_file = fopen(file.c_str(), "rb+");
    if (m_file == NULL)
        m_file = fopen(file.c_str(), "wb+");
    assert(m_file);
    fseek(m_file, 0L, SEEK_END);
    m_file_size = ftell(m_file);
    fseek(m_file, 0, SEEK_SET);

    if (m_file_size < PG_SIZE)
    {
        memset(m_db_header, 0, sizeof(DBHeader));
        m_db_header->free_list = -1;
        m_db_header->root_page = -1;
        m_db_header->total_pages = 1;
        ftruncate(fileno(m_file), PG_SIZE);
        m_file_size = PG_SIZE;
        fseek(m_file, 0, SEEK_SET);
        fwrite((char *)m_db_header, sizeof(DBHeader), 1, m_file);
    }
    else
    {
        // TODO do some check
        fread((void *)m_db_header, sizeof(DBHeader), 1, m_file);
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rsi, -0x20(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x18, %edi
callq 0x21f0
movq %rax, %rdi
movq %rdi, -0x28(%rbp)
xorl %esi, %esi
movl $0x18, %edx
callq 0x2110
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movq %rcx, 0x30(%rax)
callq 0x20d0
movq %rax, %rdi
leaq 0x454c(%rip), %rsi      # 0x12374
callq 0x2280
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x38(%rax)
cmpq $0x0, 0x38(%rax)
jne 0xde62
movq -0x20(%rbp), %rdi
callq 0x20d0
movq %rax, %rdi
leaq 0x4526(%rip), %rsi      # 0x12378
callq 0x2280
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0xde6f
jmp 0xde8e
leaq 0x4506(%rip), %rdi      # 0x1237c
leaq 0x4506(%rip), %rsi      # 0x12383
movl $0x10, %edx
leaq 0x4506(%rip), %rcx      # 0x1238f
callq 0x2150
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x2250
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x2030
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x40(%rax)
movq 0x38(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x2250
movq -0x18(%rbp), %rax
cmpq $0x200, 0x40(%rax)      # imm = 0x200
jge 0xdf65
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x2110
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rcx
movq $-0x1, (%rcx)
movq 0x30(%rax), %rcx
movq $-0x1, 0x8(%rcx)
movq 0x30(%rax), %rcx
movq $0x1, 0x10(%rcx)
movq 0x38(%rax), %rdi
callq 0x2230
movl %eax, %edi
movl $0x200, %esi            # imm = 0x200
callq 0x22e0
movq -0x18(%rbp), %rax
movq $0x200, 0x40(%rax)      # imm = 0x200
movq 0x38(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x2250
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rdi
movq 0x38(%rax), %rcx
movl $0x18, %esi
movl $0x1, %edx
callq 0x23a0
jmp 0xdf80
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rdi
movq 0x38(%rax), %rcx
movl $0x18, %esi
movl $0x1, %edx
callq 0x2320
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: rocket323[P]fishdb/./pager.cpp
// Function: fishdb::Pager::Close()
void Pager::Close()
{
    fseek(m_file, 0, SEEK_SET);
    fwrite((char *)m_db_header, sizeof(DBHeader), 1, m_file);
    Prune(0, true);
    fclose(m_file);
    delete m_db_header;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq 0x38(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x2250
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rdi
movq 0x38(%rax), %rcx
movl $0x18, %esi
movl $0x1, %edx
callq 0x23a0
movq -0x18(%rbp), %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0xe010
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x21e0
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0xe006
movq -0x10(%rbp), %rdi
callq 0x21c0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: rocket323[P]fishdb/./pager.cpp
// Function: fishdb::Pager::Prune(int, bool)
void Pager::Prune(int size_limit, bool force)
{
    std::vector<int64_t> ps;
    for (auto iter = m_pages.begin(); iter != m_pages.end(); ++iter)
    {
        if ((int)m_pages.size() <= size_limit) break;
        auto mp = iter->second;
        if (mp->stick && !force) continue;
        FlushPage(mp);
        ps.push_back(iter->first);
    }
    for (size_t i = 0; i < ps.size(); ++i)
        m_pages.erase(ps[i]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
andb $0x1, %al
movb %al, -0xd(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xf490
movq -0x80(%rbp), %rdi
callq 0xf4b0
movq %rax, -0x30(%rbp)
movq -0x80(%rbp), %rdi
callq 0xf3b0
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xf3e0
testb $0x1, %al
jne 0xe06a
jmp 0xe153
movq -0x80(%rbp), %rdi
callq 0xf4e0
cmpl -0xc(%rbp), %eax
jg 0xe07d
jmp 0xe153
leaq -0x30(%rbp), %rdi
callq 0xf410
movq %rax, %rsi
addq $0x8, %rsi
leaq -0x48(%rbp), %rdi
callq 0x40f0
leaq -0x48(%rbp), %rdi
callq 0x4190
testb $0x1, 0x78(%rax)
je 0xe0b4
testb $0x1, -0xd(%rbp)
jne 0xe0b4
movl $0x4, -0x4c(%rbp)
jmp 0xe101
leaq -0x60(%rbp), %rdi
movq %rdi, -0x88(%rbp)
leaq -0x48(%rbp), %rsi
callq 0x40f0
movq -0x80(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0xeb70
jmp 0xe0da
leaq -0x60(%rbp), %rdi
callq 0x27e0
leaq -0x30(%rbp), %rdi
callq 0xf410
movq %rax, %rsi
leaq -0x28(%rbp), %rdi
callq 0x8840
jmp 0xe0fa
movl $0x0, -0x4c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x27e0
movl -0x4c(%rbp), %eax
testl %eax, %eax
je 0xe115
jmp 0xe113
jmp 0xe117
jmp 0xe117
leaq -0x30(%rbp), %rdi
callq 0xf500
jmp 0xe047
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x27e0
jmp 0xe148
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x27e0
jmp 0xe1c9
movq $0x0, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x7ec0
movq %rax, %rcx
movq -0x90(%rbp), %rax
cmpq %rcx, %rax
jae 0xe1b7
movq -0x78(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0x41b0
movq -0x80(%rbp), %rdi
movq %rax, %rsi
callq 0xf530
jmp 0xe199
jmp 0xe19b
movq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
jmp 0xe15b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0xe1c9
leaq -0x28(%rbp), %rdi
callq 0xf560
addq $0x90, %rsp
popq %rbp
retq
leaq -0x28(%rbp), %rdi
callq 0xf560
movq -0x68(%rbp), %rdi
callq 0x2370
nopl (%rax,%rax)
// File: rocket323[P]fishdb/./pager.cpp
// Function: fishdb::Pager::GetRoot()
std::shared_ptr<MemPage> Pager::GetRoot()
{
    if (m_db_header->root_page == -1)
    {
        auto mp = NewPage(TREE_PAGE);
        SetRoot(mp->header.page_no);
        mp->is_leaf = true;
        return mp;
    }
    else
    {
        auto mp = GetPage(m_db_header->root_page);
        assert(mp->header.page_no == m_db_header->root_page);
        return mp;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x40(%rbp)
movq %rdi, %rax
movq %rax, -0x38(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq 0x30(%rax), %rax
cmpq $-0x1, 0x8(%rax)
jne 0xe279
movq -0x30(%rbp), %rsi
movq -0x40(%rbp), %rdi
movb $0x0, -0x11(%rbp)
movl $0x2, %edx
callq 0xe300
movq -0x40(%rbp), %rdi
callq 0x4190
movq -0x30(%rbp), %rdi
movq (%rax), %rsi
callq 0xe540
jmp 0xe23b
movq -0x40(%rbp), %rdi
callq 0x4190
movb $0x1, 0x79(%rax)
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0xe277
jmp 0xe26e
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x27e0
jmp 0xe2ee
movq -0x40(%rbp), %rdi
callq 0x27e0
jmp 0xe2e4
movq -0x30(%rbp), %rsi
movq -0x40(%rbp), %rdi
movb $0x0, -0x25(%rbp)
movq 0x30(%rsi), %rax
movq 0x8(%rax), %rdx
xorl %ecx, %ecx
callq 0xe560
movq -0x40(%rbp), %rdi
callq 0x4190
movq -0x30(%rbp), %rcx
movq (%rax), %rax
movq 0x30(%rcx), %rcx
cmpq 0x8(%rcx), %rax
jne 0xe2b0
jmp 0xe2cf
leaq 0x40fd(%rip), %rdi      # 0x123b4
leaq 0x40c5(%rip), %rsi      # 0x12383
movl $0x3d, %edx
leaq 0x4117(%rip), %rcx      # 0x123e1
callq 0x2150
movb $0x1, -0x25(%rbp)
testb $0x1, -0x25(%rbp)
jne 0xe2e2
movq -0x40(%rbp), %rdi
callq 0x27e0
jmp 0xe2e4
movq -0x38(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x2370
nopw (%rax,%rax)
// File: rocket323[P]fishdb/./pager.cpp
// Function: fishdb::Pager::ReadPage(long)
std::shared_ptr<MemPage> Pager::ReadPage(int64_t page_no)
{
    char buf[PG_SIZE * 2];
    // if page_no invalid, return nil
    if (page_no <= 0) return nil;
    int64_t offset = page_no * PG_SIZE;
    if (offset + PG_SIZE > m_file_size) return nil;

    auto mp = std::make_shared<MemPage>();
    auto header = &mp->header;
    fseek(m_file, offset, SEEK_SET);
    fread((void *)header, sizeof(PageHeader), 1, m_file);
    fread((void *)buf, PAGE_CAPA, 1, m_file);
    mp->Feed(buf, PAGE_CAPA);
    if (mp->header.page_no != page_no)
    {
        auto p = std::make_shared<MemPage>();
        p->header.page_no = page_no;
        p->header.page_cnt = 1;
        p->header.of_page_no = -1;
        p->header.next_free = -1;
        return p;
    }
    return mp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x480, %rsp            # imm = 0x480
movq %rdi, -0x470(%rbp)
movq %rdi, %rax
movq %rax, -0x468(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x460(%rbp)
cmpq $0x0, -0x18(%rbp)
jg 0xe8c2
movq -0x470(%rbp), %rdi
leaq 0xc978(%rip), %rsi      # 0x1b230
callq 0x40f0
jmp 0xeaab
movq -0x460(%rbp), %rcx
movq -0x18(%rbp), %rax
shlq $0x9, %rax
movq %rax, -0x428(%rbp)
movq -0x428(%rbp), %rax
addq $0x200, %rax            # imm = 0x200
cmpq 0x40(%rcx), %rax
jle 0xe903
movq -0x470(%rbp), %rdi
leaq 0xc937(%rip), %rsi      # 0x1b230
callq 0x40f0
jmp 0xeaab
leaq -0x438(%rbp), %rdi
movq %rdi, -0x478(%rbp)
callq 0xf2e0
movq -0x478(%rbp), %rdi
callq 0x4190
movq %rax, %rcx
movq -0x460(%rbp), %rax
movq %rcx, -0x440(%rbp)
movq 0x38(%rax), %rdi
movq -0x428(%rbp), %rsi
xorl %edx, %edx
callq 0x2250
jmp 0xe947
movq -0x460(%rbp), %rax
movq -0x440(%rbp), %rdi
movq 0x38(%rax), %rcx
movl $0x28, %esi
movl $0x1, %edx
callq 0x2320
jmp 0xe96a
movq -0x460(%rbp), %rax
movq 0x38(%rax), %rcx
leaq -0x420(%rbp), %rdi
movl $0x1d8, %esi            # imm = 0x1D8
movl $0x1, %edx
callq 0x2320
jmp 0xe98d
leaq -0x438(%rbp), %rdi
callq 0x4190
movq %rax, %rdi
leaq -0x420(%rbp), %rsi
movl $0x1d8, %edx            # imm = 0x1D8
callq 0x11470
jmp 0xe9af
leaq -0x438(%rbp), %rdi
callq 0x4190
movq (%rax), %rax
cmpq -0x18(%rbp), %rax
je 0xea82
movq -0x470(%rbp), %rdi
movb $0x0, -0x44d(%rbp)
callq 0xf2e0
jmp 0xe9dd
movq -0x470(%rbp), %rdi
movq -0x18(%rbp), %rax
movq %rax, -0x480(%rbp)
callq 0x4190
movq -0x480(%rbp), %rcx
movq -0x470(%rbp), %rdi
movq %rcx, (%rax)
callq 0x4190
movq -0x470(%rbp), %rdi
movw $0x1, 0x24(%rax)
callq 0x4190
movq -0x470(%rbp), %rdi
movq $-0x1, 0x18(%rax)
callq 0x4190
movq $-0x1, 0x10(%rax)
movb $0x1, -0x44d(%rbp)
movl $0x1, -0x454(%rbp)
testb $0x1, -0x44d(%rbp)
jne 0xea80
jmp 0xea74
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x448(%rbp)
movl %eax, -0x44c(%rbp)
leaq -0x438(%rbp), %rdi
callq 0x27e0
jmp 0xeabb
movq -0x470(%rbp), %rdi
callq 0x27e0
jmp 0xea9f
movq -0x470(%rbp), %rdi
leaq -0x438(%rbp), %rsi
callq 0x4db0
movl $0x1, -0x454(%rbp)
leaq -0x438(%rbp), %rdi
callq 0x27e0
movq -0x468(%rbp), %rax
addq $0x480, %rsp            # imm = 0x480
popq %rbp
retq
movq -0x448(%rbp), %rdi
callq 0x2370
nopw (%rax,%rax)
// File: rocket323[P]fishdb/./pager.cpp
// Function: fishdb::Pager::WritePage(std::shared_ptr<fishdb::MemPage>)
void Pager::WritePage(std::shared_ptr<MemPage> mp)
{
    int64_t page_no = mp->header.page_no;
    auto header = &mp->header;
    int64_t offset = page_no * PG_SIZE;
    if (offset + PG_SIZE > m_file_size)
    {
        ftruncate(fileno(m_file), offset + PG_SIZE);
        m_file_size = offset + PG_SIZE;
    }

    assert(mp->data.size() <= PAGE_CAPA);
    fseek(m_file, offset, SEEK_SET);
    fwrite((void *)header, sizeof(PageHeader), 1, m_file);
    int len = std::min((int)PAGE_CAPA, (int)mp->data.size());
    fwrite((void *)mp->data.c_str(), len, 1, m_file);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rsi, -0x50(%rbp)
movq %rdi, %rax
movq -0x50(%rbp), %rdi
movq %rdi, -0x48(%rbp)
movq %rax, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
callq 0x4190
movq -0x48(%rbp), %rdi
movq (%rax), %rax
movq %rax, -0x18(%rbp)
callq 0x4190
movq -0x40(%rbp), %rcx
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
shlq $0x9, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0x200, %rax            # imm = 0x200
cmpq 0x40(%rcx), %rax
jle 0xf0d2
movq -0x40(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x2230
movl %eax, %edi
movq -0x28(%rbp), %rsi
addq $0x200, %rsi            # imm = 0x200
callq 0x22e0
movq -0x40(%rbp), %rax
movq -0x28(%rbp), %rcx
addq $0x200, %rcx            # imm = 0x200
movq %rcx, 0x40(%rax)
movq -0x48(%rbp), %rdi
callq 0x4190
movq %rax, %rdi
addq $0x28, %rdi
callq 0x2170
cmpq $0x1d8, %rax            # imm = 0x1D8
ja 0xf0f1
jmp 0xf110
leaq 0x33d9(%rip), %rdi      # 0x124d1
leaq 0x3284(%rip), %rsi      # 0x12383
movl $0xdc, %edx
leaq 0x33e3(%rip), %rcx      # 0x124ee
callq 0x2150
movq -0x40(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x28(%rbp), %rsi
xorl %edx, %edx
callq 0x2250
movq -0x40(%rbp), %rax
movq -0x20(%rbp), %rdi
movq 0x38(%rax), %rcx
movl $0x28, %esi
movl $0x1, %edx
callq 0x23a0
movq -0x48(%rbp), %rdi
movl $0x1d8, -0x30(%rbp)     # imm = 0x1D8
callq 0x4190
movq %rax, %rdi
addq $0x28, %rdi
callq 0x2170
movl %eax, -0x34(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x34(%rbp), %rsi
callq 0xf660
movq -0x48(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
callq 0x4190
movq %rax, %rdi
addq $0x28, %rdi
callq 0x20d0
movq %rax, %rdi
movq -0x40(%rbp), %rax
movslq -0x2c(%rbp), %rsi
movq 0x38(%rax), %rcx
movl $0x1, %edx
callq 0x23a0
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rocket323[P]fishdb/./pager.cpp
// Function: fishdb::Pager::FreePage(std::shared_ptr<fishdb::MemPage>)
void Pager::FreePage(std::shared_ptr<MemPage> mp)
{
    while (mp)
    {
        auto header = mp->header;
        int64_t of_page_no = header.of_page_no;
        header.type = FREE_PAGE;
        header.of_page_no = -1;
        header.data_size = 0;
        header.page_cnt = 1;
        header.next_free = m_db_header->free_list;
        m_db_header->free_list = header.page_no;
        WritePage(mp);
        mp = ReadPage(of_page_no);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rsi, -0x88(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x88(%rbp), %rdi
callq 0x50f0
testb $0x1, %al
jne 0xf1e7
jmp 0xf2c0
movq -0x88(%rbp), %rdi
callq 0x4190
movq -0x88(%rbp), %rsi
movq %rax, %rcx
movq -0x80(%rbp), %rax
movq 0x20(%rcx), %rdx
movq %rdx, -0x20(%rbp)
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movaps %xmm1, -0x30(%rbp)
movaps %xmm0, -0x40(%rbp)
movq -0x28(%rbp), %rcx
movq %rcx, -0x48(%rbp)
movb $0x4, -0x38(%rbp)
movq $-0x1, -0x28(%rbp)
movl $0x0, -0x20(%rbp)
movw $0x1, -0x1c(%rbp)
movq 0x30(%rax), %rcx
movq (%rcx), %rcx
movq %rcx, -0x30(%rbp)
movq -0x40(%rbp), %rcx
movq 0x30(%rax), %rax
movq %rcx, (%rax)
leaq -0x58(%rbp), %rdi
movq %rdi, -0x90(%rbp)
callq 0x40f0
movq -0x80(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq 0xf040
jmp 0xf271
leaq -0x58(%rbp), %rdi
callq 0x27e0
movq -0x80(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0x78(%rbp), %rdi
callq 0xe870
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x41d0
leaq -0x78(%rbp), %rdi
callq 0x27e0
jmp 0xf1d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x27e0
jmp 0xf2c9
addq $0x90, %rsp
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x2370
nopw %cs:(%rax,%rax)
nopl (%rax)