LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/ChaohuiYu[P]BPlusTree/commands.cpp
// Function: statisticsRelation(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void statisticsRelation(const string& relationName) {
    if (!isRelationExist(relationName)) {
        cout << "Error: Relation " << relationName << " doesn't exist.\n";
        return;
    }

    if (isRelationInRelationInt(relationName)) {
        relationNameToRelationInt[relationName]->printStatistics();
    }
    else if (isRelationInRelationStr(relationName)) {
        relationNameToRelationStr[relationName]->printStatistics();
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x3bff
testb %al, %al
je 0x4422
movq %rbx, %rdi
callq 0x3d95
testb %al, %al
je 0x4450
leaq 0x9daf(%rip), %rdi      # 0xe1c0
movq %rbx, %rsi
callq 0x4482
movq (%rax), %rdi
popq %rbx
jmp 0x5368
movq 0x9b9f(%rip), %rdi      # 0xdfc8
leaq 0x4ebf(%rip), %rsi      # 0x92ef
callq 0x21e0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x21d0
leaq 0x5011(%rip), %rsi      # 0x9458
movq %rax, %rdi
popq %rbx
jmp 0x21e0
movq %rbx, %rdi
callq 0x3e73
testb %al, %al
je 0x4474
leaq 0x9d8d(%rip), %rdi      # 0xe1f0
movq %rbx, %rsi
callq 0x44e8
movq (%rax), %rdi
popq %rbx
jmp 0x5a98
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/ChaohuiYu[P]BPlusTree/Relation.cpp
// Function: Relation<int>::Relation(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)
Relation<T>::Relation(const string& relationName, const string& keyType, int recordLength)
    : _bpt(62), _sp(recordLength)
{
    _relationName = relationName;
    _keyType = keyType;
    _recordLength = recordLength;

    // initialize BPlusTree
    // calculate the key num per node in B+ tree
    int bptKeySize;
    if (_keyType == "string" || _keyType == "String" || _keyType == "str") {
        bptKeySize = 10;
    }
    else {
        bptKeySize = 4;
    }
    int bptMaxKeyNum = (_pageSize - 12) / (bptKeySize + 4);
    _bpt = BPlusTree<T>(bptMaxKeyNum);

    // initialize SlottedPageStructure
    // _sp = SlottedPageStructure(recordLength);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %ebp
movq %rdx, %rbx
movq %rdi, %r13
movabsq $0x400000200, %rax      # imm = 0x400000200
movq %rax, (%rdi)
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rdi)
andq $0x0, 0x10(%rdi)
movq %rsi, %r12
xorl %eax, %eax
movb %al, 0x18(%rdi)
leaq 0x38(%rdi), %rcx
movq %rcx, 0x28(%rdi)
andq $0x0, 0x30(%rdi)
leaq 0x8(%rdi), %rcx
movq %rcx, (%rsp)
leaq 0x28(%rdi), %r14
movb %al, 0x38(%rdi)
leaq 0x50(%rdi), %r15
pushq $0x3e
popq %rsi
movq %r15, %rdi
callq 0x6bcc
leaq 0x68(%r13), %rdi
movq %rdi, 0x8(%rsp)
movl %ebp, %esi
callq 0x5ba8
movq (%rsp), %rdi
movq %r12, %rsi
callq 0x2130
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2130
movl %ebp, 0x48(%r13)
leaq 0x449d(%rip), %rsi      # 0x9326
movq %r14, %rdi
callq 0x35fd
pushq $0xe
popq %rbx
testb %al, %al
jne 0x4ec5
leaq 0x448e(%rip), %rsi      # 0x932d
movq %r14, %rdi
callq 0x35fd
testb %al, %al
jne 0x4ec5
leaq 0x4482(%rip), %rsi      # 0x9334
movq %r14, %rdi
callq 0x35fd
testb %al, %al
pushq $0xe
popq %rax
pushq $0x8
popq %rbx
cmovnel %eax, %ebx
movl (%r13), %eax
addl $-0xc, %eax
cltd
idivl %ebx
leaq 0x10(%rsp), %rdi
movl %eax, %esi
callq 0x6bcc
movl 0x20(%rsp), %eax
movl %eax, 0x10(%r15)
movups 0x10(%rsp), %xmm0
movups %xmm0, (%r15)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4efd
movq %rax, %rbx
movq 0x8(%rsp), %rdi
callq 0x4f28
jmp 0x4f0f
movq %rax, %rbx
movq %r14, %rdi
callq 0x2100
movq (%rsp), %rdi
callq 0x2100
movq %rbx, %rdi
callq 0x22e0
// File: /workspace/github_cpp_makefile_star2_O2/ChaohuiYu[P]BPlusTree/Relation.cpp
// Function: Relation<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::insertRecord(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Relation<T>::insertRecord(T key, string record) {
    cout << "Insert into relation " << _relationName << " with key " << key << " and record " << record << ":\n";
    int rid = _sp.insertRecord(record);
    _bpt.insertValue(key, rid);
    cout << "    Record inserted.\n";
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8a72(%rip), %rdi      # 0xdfc8
leaq 0x3e8c(%rip), %rsi      # 0x93e9
callq 0x21e0
leaq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x21d0
leaq 0x3e8a(%rip), %rsi      # 0x93ff
movq %rax, %rdi
callq 0x21e0
movq %rax, %rdi
movq %r14, %rsi
callq 0x21d0
leaq 0x3e7b(%rip), %rsi      # 0x940a
movq %rax, %rdi
callq 0x21e0
movq %rax, %rdi
movq %r15, %rsi
callq 0x21d0
leaq 0x3d3f(%rip), %rsi      # 0x92e8
movq %rax, %rdi
callq 0x21e0
leaq 0x68(%rbx), %r13
leaq 0x28(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x2250
movq %r13, %rdi
movq %r12, %rsi
callq 0x5bf4
movl %eax, %ebp
leaq 0x28(%rsp), %rdi
callq 0x2100
addq $0x50, %rbx
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x2250
movq %rbx, %rdi
movq %r12, %rsi
movl %ebp, %edx
callq 0x786c
leaq 0x8(%rsp), %rdi
callq 0x2100
movq 0x89ba(%rip), %rdi      # 0xdfc8
leaq 0x3e02(%rip), %rsi      # 0x9417
callq 0x21e0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x562b
movq %rax, %rbx
movq %r12, %rdi
callq 0x2100
movq %rbx, %rdi
callq 0x22e0
// File: /workspace/github_cpp_makefile_star2_O2/ChaohuiYu[P]BPlusTree/Relation.cpp
// Function: Relation<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::deleteRecord(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Relation<T>::deleteRecord(T key) {
    cout << "Delete record in relation " << _relationName << " by key " << key << ":\n";
    if (!_bpt.checkKeyExist(key)) {
        cout << "    Key doesn't exist.\n";
    }
    else {
        int rid = _bpt.queryValue(key);
        _sp.deleteRecord(rid);
        _bpt.deleteValue(key);
        cout << "    Record deleted.\n";
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8971(%rip), %rdi      # 0xdfc8
leaq 0x3dcf(%rip), %rsi      # 0x942d
callq 0x21e0
leaq 0x8(%r14), %rsi
movq %rax, %rdi
callq 0x21d0
leaq 0x3dd2(%rip), %rsi      # 0x9448
movq %rax, %rdi
callq 0x21e0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x21d0
leaq 0x3c58(%rip), %rsi      # 0x92e8
movq %rax, %rdi
callq 0x21e0
leaq 0x50(%r14), %r12
leaq 0x40(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2250
movq %r12, %rdi
movq %r15, %rsi
callq 0x776c
movl %eax, %ebp
leaq 0x40(%rsp), %rdi
callq 0x2100
testb %bpl, %bpl
je 0x5727
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2250
movq %r12, %rdi
movq %r15, %rsi
callq 0x7b80
movl %eax, %ebp
leaq 0x20(%rsp), %rdi
callq 0x2100
addq $0x68, %r14
movq %r14, %rdi
movl %ebp, %esi
callq 0x5d20
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2250
movq %r12, %rdi
movq %r15, %rsi
callq 0x7a1c
movq %rsp, %rdi
callq 0x2100
leaq 0x3d44(%rip), %rsi      # 0x9469
jmp 0x572e
leaq 0x3d23(%rip), %rsi      # 0x9451
movq 0x8893(%rip), %rdi      # 0xdfc8
callq 0x21e0
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x574b
jmp 0x574b
movq %rax, %rbx
movq %r15, %rdi
callq 0x2100
movq %rbx, %rdi
callq 0x22e0
// File: /workspace/github_cpp_makefile_star2_O2/ChaohuiYu[P]BPlusTree/Relation.cpp
// Function: Relation<int>::scanIndex()
void Relation<T>::scanIndex() {
    // Output (# of leaf pages, # of total index pages)
    cout << "Scan index pages of relation " << _relationName << ":\n";
    cout << "    # of leaf pages: " << _bpt.getLeafPageNum() << endl;
    cout << "    # of total index pages: " << _bpt.getPageNum() << endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8edd(%rip), %r14      # 0xdfc8
leaq 0x438c(%rip), %rsi      # 0x947e
movq %r14, %rdi
callq 0x21e0
leaq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x21d0
leaq 0x41db(%rip), %rsi      # 0x92e8
movq %rax, %rdi
callq 0x21e0
leaq 0x4380(%rip), %rsi      # 0x949c
movq %r14, %rdi
callq 0x21e0
movq %rax, %r15
addq $0x50, %rbx
movq %rbx, %rdi
callq 0x72a2
movq %r15, %rdi
movl %eax, %esi
callq 0x22d0
movq %rax, %rdi
callq 0x2110
leaq 0x4366(%rip), %rsi      # 0x94b2
movq %r14, %rdi
callq 0x21e0
movq %rax, %r14
movq %rbx, %rdi
callq 0x729e
movq %r14, %rdi
movl %eax, %esi
callq 0x22d0
movq %rax, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2110
// File: /workspace/github_cpp_makefile_star2_O2/ChaohuiYu[P]BPlusTree/Relation.cpp
// Function: Relation<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::queryRid(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Relation<T>::queryRid(T key) {
    // Output (Key, size of rest of the record, RID)
    cout << "Query relation " << _relationName << " with key " << key << ":" << endl;
    if (!_bpt.checkKeyExist(key)) {
        cout << "    Key doesn't exist.\n";
    }
    else {
        cout << "    RID: " << _bpt.queryValue(key) << endl;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x87b7(%rip), %rdi      # 0xdfc8
leaq 0x3cb7(%rip), %rsi      # 0x94cf
callq 0x21e0
leaq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x21d0
leaq 0x3bcf(%rip), %rsi      # 0x93ff
movq %rax, %rdi
callq 0x21e0
movq %rax, %rdi
movq %r14, %rsi
callq 0x21d0
leaq 0x3cec(%rip), %rsi      # 0x9536
movq %rax, %rdi
callq 0x21e0
movq %rax, %rdi
callq 0x2110
addq $0x50, %rbx
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x2250
movq %rbx, %rdi
movq %r15, %rsi
callq 0x776c
movl %eax, %ebp
leaq 0x20(%rsp), %rdi
callq 0x2100
movq 0x873c(%rip), %rdi      # 0xdfc8
testb %bpl, %bpl
je 0x58d5
leaq 0x3c47(%rip), %rsi      # 0x94df
callq 0x21e0
movq %rax, %r12
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x2250
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7b80
movq %r12, %rdi
movl %eax, %esi
callq 0x22d0
movq %rax, %rdi
callq 0x2110
movq %rsp, %rdi
callq 0x2100
jmp 0x58e1
leaq 0x3b75(%rip), %rsi      # 0x9451
callq 0x21e0
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x58f0
movq %rax, %rbx
movq %r15, %rdi
callq 0x2100
movq %rbx, %rdi
callq 0x22e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/ChaohuiYu[P]BPlusTree/Relation.cpp
// Function: Relation<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::rangeQueryRid(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Relation<T>::rangeQueryRid(T key1, T key2) {
    cout << "Range query relation " << _relationName << " between " << key1 << " and " << key2 << ":\n";
    vector<int> ridList = _bpt.rangeQueryValue(key1, key2);
    if (ridList.empty()) {
        cout << "    No key in this range.\n";
    }
    cout << "    RID list:" << endl;
    for (auto rid : ridList) {
        cout << "    " << rid << endl;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x86a8(%rip), %rdi      # 0xdfc8
leaq 0x3bc2(%rip), %rsi      # 0x94e9
callq 0x21e0
leaq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x21d0
leaq 0x3bc0(%rip), %rsi      # 0x94ff
movq %rax, %rdi
callq 0x21e0
movq %rax, %rdi
movq %r15, %rsi
callq 0x21d0
leaq 0x3bb0(%rip), %rsi      # 0x9509
movq %rax, %rdi
callq 0x21e0
movq %rax, %rdi
movq %r14, %rsi
callq 0x21d0
leaq 0x3975(%rip), %rsi      # 0x92e8
movq %rax, %rdi
callq 0x21e0
leaq 0x40(%rsp), %rdi
movq %r15, %rsi
callq 0x2250
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq 0x2250
addq $0x50, %rbx
leaq 0x8(%rsp), %rdi
leaq 0x40(%rsp), %rdx
leaq 0x20(%rsp), %rcx
movq %rbx, %rsi
callq 0x7e7a
leaq 0x20(%rsp), %rdi
callq 0x2100
leaq 0x40(%rsp), %rdi
callq 0x2100
movq 0x8(%rsp), %rax
cmpq 0x10(%rsp), %rax
jne 0x59e3
movq 0x85f1(%rip), %rdi      # 0xdfc8
leaq 0x3b31(%rip), %rsi      # 0x950f
callq 0x21e0
movq 0x85de(%rip), %rdi      # 0xdfc8
leaq 0x3b39(%rip), %rsi      # 0x952a
callq 0x21e0
movq %rax, %rdi
callq 0x2110
movq 0x8(%rsp), %r15
movq 0x10(%rsp), %r12
movq 0x85b9(%rip), %rbx      # 0xdfc8
leaq 0x3b22(%rip), %r14      # 0x9538
cmpq %r12, %r15
je 0x5a41
movl (%r15), %ebp
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21e0
movq %rax, %rdi
movl %ebp, %esi
callq 0x22d0
movq %rax, %rdi
callq 0x2110
addq $0x4, %r15
jmp 0x5a16
leaq 0x8(%rsp), %rdi
callq 0x5b74
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x2100
jmp 0x5a6a
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x2100
jmp 0x5a85
jmp 0x5a78
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5b74
movq %rbx, %rdi
callq 0x22e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/ChaohuiYu[P]BPlusTree/SlottedPageStructure.cpp
// Function: SlottedPageStructure::insertRecord(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int SlottedPageStructure::insertRecord(string record) {
    // return rid after the record is inserted
    int rid;

    // if the current page is not full
    // or there is no free space in the middle (no record deleted),
    // directly insert record in it
    if (!isCurrentPageFull() || !hasFreeSpaceInMiddle()) {
        rid = insertRecordAtEnd(record);
    }
    // if the current page is full
    // and there is any free space in the middle
    // insert record to the free space
    else {
        rid = insertRecordAtMiddle(record);
    }
    return rid;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x5c36
testb %al, %al
je 0x5c23
movq 0x60(%r14), %rax
cmpq 0x68(%r14), %rax
je 0x5c23
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x5ca4
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x5c62
nop
// File: /workspace/github_cpp_makefile_star2_O2/ChaohuiYu[P]BPlusTree/SlottedPageStructure.cpp
// Function: SlottedPageStructure::insertRecordAtEnd(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
int SlottedPageStructure::insertRecordAtEnd(const string& record) {
    int spaceId = _records.size();
    _records.push_back(record);
    _recordsExist.push_back(true);
    return spaceId2rid(spaceId);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x20, %rdi
movq 0x28(%rbx), %r14
subq 0x20(%rbx), %r14
shrq $0x5, %r14
callq 0x35b0
leaq 0x38(%rbx), %rdi
pushq $0x1
popq %rsi
callq 0x61c0
movb 0x4(%rbx), %cl
movl %r14d, %eax
cltd
idivl 0x1c(%rbx)
shlb $0x3, %cl
shll %cl, %eax
addl %edx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ChaohuiYu[P]BPlusTree/SlottedPageStructure.cpp
// Function: SlottedPageStructure::insertRecordAtMiddle(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
int SlottedPageStructure::insertRecordAtMiddle(const string& record) {
    if (_freeSpaces.empty()) {
        cerr << "error: try to insertRecordAtMiddle but no free spaces\n";
        return -1;
    }
    std::sort(_freeSpaces.begin(), _freeSpaces.end(), std::greater<int>());
    int freeSpaceId = _freeSpaces.back();
    _records[freeSpaceId] = record;
    _recordsExist[freeSpaceId] = true;
    _freeSpaces.pop_back();
    return spaceId2rid(freeSpaceId);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x60(%rdi), %rdi
movq 0x68(%rbx), %rsi
cmpq %rsi, %rdi
je 0x5d03
callq 0x67ca
movq 0x68(%rbx), %rax
movslq -0x4(%rax), %r15
movq %r15, %rdi
shlq $0x5, %rdi
addq 0x20(%rbx), %rdi
movq %r14, %rsi
callq 0x2130
leaq 0x38(%rbx), %rdi
movq %r15, %rsi
callq 0x6168
orq %rdx, (%rax)
addq $-0x4, 0x68(%rbx)
movb 0x4(%rbx), %cl
movl %r15d, %eax
cltd
idivl 0x1c(%rbx)
shlb $0x3, %cl
shll %cl, %eax
addl %edx, %eax
jmp 0x5d19
movq 0x82e6(%rip), %rdi      # 0xdff0
leaq 0x39cd(%rip), %rsi      # 0x96de
callq 0x21e0
pushq $-0x1
popq %rax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ChaohuiYu[P]BPlusTree/SlottedPageStructure.cpp
// Function: SlottedPageStructure::deleteRecord(int)
void SlottedPageStructure::deleteRecord(int rid) {
    int spaceId = rid2spaceId(rid);
    if (spaceId >= _records.size()) {
        cerr << "error: in deleteRecord, spaceId out of range\n";
        return;
    }
    if (_recordsExist[spaceId] == false) {
        cerr << "error: in deleteRecord, record has been deleted\n";
        return;
    }
    _recordsExist[spaceId] = false;
    _freeSpaces.push_back(spaceId);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %eax
movq %rdi, %rbx
movb 0x4(%rdi), %cl
shlb $0x3, %cl
sarl %cl, %esi
imull 0x1c(%rdi), %esi
pushq $0x1
popq %rdi
shll %cl, %edi
cltd
idivl %edi
addl %esi, %edx
movl %edx, 0xc(%rsp)
movslq %edx, %r14
movq 0x28(%rbx), %rax
subq 0x20(%rbx), %rax
sarq $0x5, %rax
cmpq %r14, %rax
jbe 0x5d9c
leaq 0x38(%rbx), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x6168
testq %rdx, (%rax)
je 0x5dac
movq %r15, %rdi
movq %r14, %rsi
callq 0x6168
notq %rdx
andq %rdx, (%rax)
addq $0x60, %rbx
leaq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0x61a2
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0x824d(%rip), %rdi      # 0xdff0
leaq 0x37f6(%rip), %rsi      # 0x95a0
jmp 0x5dba
movq 0x823d(%rip), %rdi      # 0xdff0
leaq 0x3814(%rip), %rsi      # 0x95ce
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x21e0
// File: /workspace/github_cpp_makefile_star2_O2/ChaohuiYu[P]BPlusTree/SlottedPageStructure.cpp
// Function: SlottedPageStructure::queryRecord[abi:cxx11](int)
string SlottedPageStructure::queryRecord(int rid) {
    int spaceId = rid2spaceId(rid);
    if (spaceId >= _records.size()) {
        cerr << "error: in queryRecord, spaceId out of range\n";
        return "";
    }
    if (_recordsExist[spaceId] == false) {
        cerr << "error: in queryRecord, record has been deleted\n";
        return "";
    }
    return _records[spaceId];
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %eax
movq %rsi, %r14
movb 0x4(%rsi), %cl
shlb $0x3, %cl
movl %edx, %esi
sarl %cl, %esi
imull 0x1c(%r14), %esi
pushq $0x1
popq %r8
shll %cl, %r8d
movq %rdi, %rbx
cltd
idivl %r8d
addl %esi, %edx
movslq %edx, %r15
movq 0x28(%r14), %rax
subq 0x20(%r14), %rax
sarq $0x5, %rax
cmpq %r15, %rax
jbe 0x5e4d
leaq 0x38(%r14), %rdi
movq %r15, %rsi
callq 0x6168
testq %rdx, (%rax)
je 0x5e6e
shlq $0x5, %r15
addq 0x20(%r14), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2250
jmp 0x5e95
movq 0x819c(%rip), %rdi      # 0xdff0
leaq 0x37a4(%rip), %rsi      # 0x95ff
callq 0x21e0
leaq 0x3367(%rip), %rsi      # 0x91ce
leaq 0xf(%rsp), %rdx
jmp 0x5e8d
movq 0x817b(%rip), %rdi      # 0xdff0
leaq 0x37b0(%rip), %rsi      # 0x962c
callq 0x21e0
leaq 0x3346(%rip), %rsi      # 0x91ce
leaq 0xe(%rsp), %rdx
movq %rbx, %rdi
callq 0x25ea
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/ChaohuiYu[P]BPlusTree/SlottedPageStructure.cpp
// Function: SlottedPageStructure::print()
void SlottedPageStructure::print() {
    cout << "slot num per page: " << _slotNum << endl;
    cout << "filled slot num: " << _records.size() - _freeSpaces.size() << endl;
    for (int spaceId = 0; spaceId < _records.size(); ++spaceId) {
        if (_recordsExist[spaceId]) {
            cout << "pageId: " << spaceId2pageId(spaceId);
            cout << ", slotId: " << spaceId2slotId(spaceId);
            // cout << ", rid: " << spaceId2rid(spaceId);
            cout << ", record: \"" << _records[spaceId] << "\"" << endl;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8111(%rip), %r14      # 0xdfc8
leaq 0x379e(%rip), %rsi      # 0x965c
movq %r14, %rdi
callq 0x21e0
movl 0x1c(%rbx), %esi
movq %rax, %rdi
callq 0x22d0
movq %rax, %rdi
callq 0x2110
leaq 0x3790(%rip), %rsi      # 0x9670
movq %r14, %rdi
callq 0x21e0
movq 0x28(%rbx), %rsi
movq 0x68(%rbx), %rcx
subq 0x20(%rbx), %rsi
sarq $0x5, %rsi
subq 0x60(%rbx), %rcx
sarq $0x2, %rcx
subq %rcx, %rsi
movq %rax, %rdi
callq 0x2150
movq %rax, %rdi
callq 0x2110
leaq 0x38(%rbx), %r15
xorl %ebp, %ebp
leaq 0x3780(%rip), %r12      # 0x96a0
xorl %r13d, %r13d
movq 0x28(%rbx), %rax
subq 0x20(%rbx), %rax
sarq $0x5, %rax
cmpq %r13, %rax
jbe 0x5fc5
movq %r15, %rdi
movq %r13, %rsi
callq 0x6168
testq %rdx, (%rax)
je 0x5fb9
movq %r14, %rdi
leaq 0x3730(%rip), %rsi      # 0x9682
callq 0x21e0
movq %rax, %rdi
movl %r13d, %eax
cltd
idivl 0x1c(%rbx)
movl %eax, %esi
callq 0x22d0
movq %r14, %rdi
leaq 0x3719(%rip), %rsi      # 0x968b
callq 0x21e0
movq %rax, %rdi
movl %r13d, %eax
cltd
idivl 0x1c(%rbx)
movl %edx, %esi
callq 0x22d0
movq %r14, %rdi
leaq 0x3704(%rip), %rsi      # 0x9696
callq 0x21e0
movq 0x20(%rbx), %rsi
addq %rbp, %rsi
movq %rax, %rdi
callq 0x21d0
movq %rax, %rdi
movq %r12, %rsi
callq 0x21e0
movq %rax, %rdi
callq 0x2110
incq %r13
addq $0x20, %rbp
jmp 0x5f23
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ChaohuiYu[P]BPlusTree/SlottedPageStructure.cpp
// Function: SlottedPageStructure::printPage(int)
void SlottedPageStructure::printPage(int pageId) {
    cout << "Records in page " << pageId << ":" << endl;
    int pageNum = getPageNum();
    if (pageId >= pageNum) {
        cout << "    error: page " << pageId << " doesn't exist." << endl;
        return;
    }
    for (int spaceId = pageId * _slotNum; spaceId < (pageId+1) * _slotNum; ++spaceId) {
        cout << "    slot " << spaceId2slotId(spaceId) << ": ";
        if (_recordsExist[spaceId]) {
            cout << _records[spaceId];
        }
        cout << endl;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movq 0x7fcb(%rip), %rdi      # 0xdfc8
leaq 0x369e(%rip), %rsi      # 0x96a2
callq 0x21e0
movq %rax, %rdi
movl %ebx, %esi
callq 0x22d0
leaq 0x351c(%rip), %rsi      # 0x9536
movq %rax, %rdi
callq 0x21e0
movq %rax, %rdi
callq 0x2110
movq %r14, %rdi
callq 0x611a
cmpl %ebx, %eax
jle 0x60d7
movl 0x1c(%r14), %eax
movl %eax, %ecx
imull %ebx, %ecx
incl %ebx
leaq 0x38(%r14), %r15
movslq %ecx, %r12
movq %r12, %rbp
shlq $0x5, %rbp
movq 0x7f6e(%rip), %r13      # 0xdfc8
imull %ebx, %eax
cltq
cmpq %rax, %r12
jge 0x60c8
movq %r13, %rdi
leaq 0x3666(%rip), %rsi      # 0x96d4
callq 0x21e0
movq %rax, %rdi
movl %r12d, %eax
cltd
idivl 0x1c(%r14)
movl %edx, %esi
callq 0x22d0
movq %rax, %rdi
leaq 0x3457(%rip), %rsi      # 0x94e6
callq 0x21e0
movq %r15, %rdi
movq %r12, %rsi
callq 0x6168
testq %rdx, (%rax)
je 0x60b3
movq 0x20(%r14), %rsi
addq %rbp, %rsi
movq %r13, %rdi
callq 0x21d0
movq %r13, %rdi
callq 0x2110
incq %r12
movl 0x1c(%r14), %eax
addq $0x20, %rbp
jmp 0x605a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x7eea(%rip), %rdi      # 0xdfc8
leaq 0x35ce(%rip), %rsi      # 0x96b3
callq 0x21e0
movq %rax, %rdi
movl %ebx, %esi
callq 0x22d0
leaq 0x35c9(%rip), %rsi      # 0x96c4
movq %rax, %rdi
callq 0x21e0
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2110
nop
// File: /workspace/github_cpp_makefile_star2_O2/ChaohuiYu[P]BPlusTree/BPlusTree.cpp
// Function: BPlusTree<int>::BPlusTree(int)
BPT<T>::BPT(int maxKeyCount) {
    _maxKeyCount = maxKeyCount;
    _root = new BPT_NODE(true, true, _maxKeyCount);
    _nodeCount = 1;
    _leafCount = 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movl %esi, 0x8(%rdi)
pushq $0x38
popq %rdi
callq 0x21f0
movq %rax, %r14
pushq $0x1
popq %rdx
movq %rax, %rdi
movl %edx, %esi
movl %ebp, %ecx
callq 0x72ae
movq %r14, (%rbx)
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0xc(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
pushq $0x38
popq %rsi
movq %r14, %rdi
callq 0x2200
movq %rbx, %rdi
callq 0x22e0
// File: /workspace/github_cpp_makefile_star2_O2/ChaohuiYu[P]BPlusTree/BPlusTree.cpp
// Function: BPlusTree<int>::checkKeyExist(int)
bool BPT<T>::checkKeyExist(T key) {
    BPT_NODE* leaf = findLeaf(key);

    // if key in leaf->_keys, don't insert
    FOR(i, 0, leaf->_keyCount)
        if (key == leaf->_keys[i])
            return true;

    return false;
}

// Assembly:
pushq %rbx
movl %esi, %ebx
callq 0x6c54
movslq 0x4(%rax), %rcx
xorl %esi, %esi
testl %ecx, %ecx
movl $0x0, %edx
cmovgl %ecx, %edx
movq %rsi, %rdi
cmpq %rsi, %rdx
je 0x6c4c
movq 0x10(%rax), %r8
leaq 0x1(%rdi), %rsi
cmpl %ebx, (%r8,%rdi,4)
jne 0x6c36
cmpq %rcx, %rdi
setl %al
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/ChaohuiYu[P]BPlusTree/BPlusTree.cpp
// Function: BPlusTree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::findLeaf(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
typename BPT_NODE* BPT<T>::findLeaf(T key) {
    BPT_NODE* node = _root;
    while (!node->_isLeaf) {
        FOR(i, 0, node->_keyCount + 1) {
            if (i == node->_keyCount || key < node->_keys[i]) {
                node = (BPT_NODE*)node->_pointers[i];
                break;
            }
        }
    }
    return node;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq (%rdi), %r14
cmpb $0x0, 0x8(%r14)
jne 0x7836
xorl %r12d, %r12d
xorl %r15d, %r15d
xorl %r13d, %r13d
movslq 0x4(%r14), %rcx
movl %ecx, %eax
cmpq %rcx, %r13
jg 0x77ed
cmpq %rax, %r13
je 0x782d
movq 0x10(%r14), %rsi
addq %r12, %rsi
movq %rbx, %rdi
callq 0x46e8
testb %al, %al
jne 0x782d
incq %r13
addq $-0x8, %r15
addq $0x20, %r12
jmp 0x77fd
movq 0x18(%r14), %rdi
subq %r15, %rdi
jmp 0x77ea
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/ChaohuiYu[P]BPlusTree/BPlusTree.cpp
// Function: BPlusTree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::insertValue(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
bool BPT<T>::insertValue(T key, int value) {
    // find the leaf page that the key may be in.
    BPT_NODE* leaf = findLeaf(key);

    // if key in leaf->_keys, don't insert
    FOR(i, 0, leaf->_keyCount)
        if (key == leaf->_keys[i])
            return false;

    insertInNode(leaf, key, (void *)value);
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %edx, 0x4(%rsp)
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x28(%rsp), %r12
movq %r12, %rdi
callq 0x2250
movq %rbx, %rdi
movq %r12, %rsi
callq 0x77de
movq %rax, %r15
movq %r12, %rdi
callq 0x2100
pushq $-0x1
popq %r13
xorl %esi, %esi
movslq 0x4(%r15), %rbp
incq %r13
cmpq %rbp, %r13
jge 0x78d2
leaq 0x20(%rsi), %r12
addq 0x10(%r15), %rsi
movq %r14, %rdi
callq 0x7843
movq %r12, %rsi
testb %al, %al
je 0x78ad
jmp 0x78ff
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x2250
movslq 0x4(%rsp), %rcx
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x792a
leaq 0x8(%rsp), %rdi
callq 0x2100
cmpq %rbp, %r13
setge %al
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2100
movq %rbx, %rdi
callq 0x22e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/ChaohuiYu[P]BPlusTree/BPlusTree.cpp
// Function: BPlusTree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::insertInNode(BPlusTree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::BPlusTreeNode*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, void*)
void BPT<T>::insertInNode(BPT_NODE* node, T key, void* value) {
    // cout << "node: " << node << ", key: " << key << ", value: " << value << endl;
    // find position to insert
    int insertIdx = 0;
    while (insertIdx < node->_keyCount && node->_keys[insertIdx] < key) insertIdx++;

    // move the key and values after the position right
    for (int i = node->_keyCount; i > insertIdx; i--)
        node->_keys[i] = node->_keys[i-1];
    for (int i = node->_keyCount + 1; i > insertIdx + 1; i--)
        node->_pointers[i] = node->_pointers[i-1];

    // insert key and value
    node->_keys[insertIdx] = key;
    node->_pointers[insertIdx + 1] = value;
    node->_keyCount++;

    // check if this node need to split
    if (node->_keyCount == node->_maxKeyCount) {
        splitNode(node);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, 0x10(%rsp)
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, (%rsp)
pushq $0x1
popq %rbp
xorl %r13d, %r13d
leaq -0x1(%rbp), %r14
movslq 0x4(%rbx), %r15
cmpq %r15, %r14
jge 0x797a
movq 0x10(%rbx), %rdi
addq %r13, %rdi
movq %r12, %rsi
callq 0x46e8
testb %al, %al
je 0x7976
incq %rbp
addq $0x20, %r13
jmp 0x794d
movslq 0x4(%rbx), %r15
movq %r12, 0x8(%rsp)
movq %r15, %r12
shlq $0x5, %r12
cmpq %r14, %r15
jle 0x79a8
movq 0x10(%rbx), %rdi
leaq (%rdi,%r12), %rsi
addq $-0x20, %rsi
addq %r12, %rdi
callq 0x2130
decq %r15
addq $-0x20, %r12
jmp 0x7986
movl 0x4(%rbx), %eax
incl %eax
cltq
movslq %ebp, %rcx
movq 0x8(%rsp), %rsi
cmpq %rcx, %rax
jle 0x79ce
movq 0x18(%rbx), %rdx
movq -0x8(%rdx,%rax,8), %rdi
movq %rdi, (%rdx,%rax,8)
decq %rax
jmp 0x79b7
addq 0x10(%rbx), %r13
movq %r13, %rdi
callq 0x2130
movq 0x18(%rbx), %rax
movq 0x10(%rsp), %rcx
movq %rcx, (%rax,%rbp,8)
movl 0x4(%rbx), %eax
incl %eax
movl %eax, 0x4(%rbx)
cmpl (%rbx), %eax
jne 0x7a0d
movq (%rsp), %rdi
movq %rbx, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8124
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ChaohuiYu[P]BPlusTree/BPlusTree.cpp
// Function: BPlusTree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::deleteValue(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool BPT<T>::deleteValue(T key) {
    // find the leaf page that the key may be in.
    BPT_NODE* leaf = findLeaf(key);

    // if key in leaf->_keys, delete it
    FOR(i, 0, leaf->_keyCount) {
        if (key == leaf->_keys[i]) {
            deleteInNode(leaf, key);
            return true;
        }
    }

    // if key doesn't exist
    // cout << "error: key " << key << " doesn't exist.\n";
    return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x28(%rsp), %r12
movq %r12, %rdi
callq 0x2250
movq %rbx, %rdi
movq %r12, %rsi
callq 0x77de
movq %rax, %r15
movq %r12, %rdi
callq 0x2100
pushq $-0x1
popq %r13
xorl %esi, %esi
movslq 0x4(%r15), %rbp
incq %r13
cmpq %rbp, %r13
jge 0x7aa4
leaq 0x20(%rsi), %r12
addq 0x10(%r15), %rsi
movq %r14, %rdi
callq 0x7843
movq %r12, %rsi
testb %al, %al
je 0x7a59
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x2250
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x7ace
leaq 0x8(%rsp), %rdi
callq 0x2100
cmpq %rbp, %r13
setl %al
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2100
movq %rbx, %rdi
callq 0x22e0
// File: /workspace/github_cpp_makefile_star2_O2/ChaohuiYu[P]BPlusTree/BPlusTree.cpp
// Function: BPlusTree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::deleteInNode(BPlusTree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::BPlusTreeNode*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void BPT<T>::deleteInNode(BPT_NODE* node, T key) {
    int deleteIdx = 0 ;
    while (key != node->_keys[deleteIdx]) deleteIdx++ ;
    for (int i = deleteIdx; i < node->_keyCount - 1; i++)
        node->_keys[i] = node->_keys[i+1];
    for (int i = deleteIdx + 1; i < node->_keyCount; i++)
        node->_pointers[i] = node->_pointers[i+1];
    node->_keyCount--;

    // if the number of elements in a node < _maxKeyCount/2
    // redistribute the keys and values in siblings
    if (node->_keyCount < (_maxKeyCount+1)/2) {
        redistributeNode(node);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x1
popq %r12
pushq $-0x20
popq %r13
addq $0x20, %r13
movq 0x10(%rbx), %rsi
addq %r13, %rsi
movq %r15, %rdi
callq 0x831a
incq %r12
testb %al, %al
jne 0x7ae8
leaq -0x2(%r12), %r15
movslq 0x4(%rbx), %rcx
leaq -0x1(%rcx), %rax
cmpq %rax, %r15
jge 0x7b31
movq 0x10(%rbx), %rdi
incq %r15
leaq (%rdi,%r13), %rsi
addq $0x20, %rsi
addq %r13, %rdi
callq 0x2130
addq $0x20, %r13
jmp 0x7b07
leal -0x1(%r12), %edx
cmpl %edx, %ecx
jle 0x7b4e
movq 0x18(%rbx), %rsi
movq (%rsi,%r12,8), %rdi
movq %rdi, -0x8(%rsi,%r12,8)
incq %r12
incl %edx
jmp 0x7b36
movl %eax, 0x4(%rbx)
movl 0x8(%r14), %eax
incl %eax
pushq $0x2
popq %rsi
cltd
idivl %esi
cmpl %eax, %ecx
jle 0x7b6b
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x8324
nop
// File: /workspace/github_cpp_makefile_star2_O2/ChaohuiYu[P]BPlusTree/BPlusTree.cpp
// Function: BPlusTree<int>::queryValue(int)
int BPT<T>::queryValue(T key) {
    // find the leaf page that the key may be in.
    BPT_NODE* leaf = findLeaf(key);

    // if key in leaf->_keys, return it
    FOR(i, 0, leaf->_keyCount)
        if (key == leaf->_keys[i])
            return (int)(long long)(leaf->_pointers[i+1]);

    // if key doesn't exist
    // cout << "    error: key " << key << " doesn't exist.\n";
    return -1;
}

// Assembly:
pushq %rbx
movl %esi, %ebx
callq 0x6c54
movl 0x4(%rax), %edx
xorl %esi, %esi
testl %edx, %edx
cmovlel %esi, %edx
pushq $-0x1
popq %rcx
cmpq %rsi, %rdx
je 0x6e76
movq 0x10(%rax), %r8
leaq 0x1(%rsi), %rdi
cmpl %ebx, (%r8,%rsi,4)
movq %rdi, %rsi
jne 0x6e59
movq 0x18(%rax), %rax
movl (%rax,%rdi,8), %ecx
movl %ecx, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/ChaohuiYu[P]BPlusTree/BPlusTree.cpp
// Function: BPlusTree<int>::printTree()
void BPT<T>::printTree() {
    int level = 0;
    BPT_NODE* node;
    vector<BPT_NODE*> nodeStack {_root};
    vector<int> levelStack {0};

    while(!nodeStack.empty()) {
        node = nodeStack.back();
        nodeStack.pop_back();
        level = levelStack.back();
        levelStack.pop_back();

        FOR(i, 0, level) {
            cout << "  ";
        }
        node->printNode();

        if (!node->_isLeaf) {
            for (int i = node->_keyCount; i >= 0; i--) {
                if (node->_pointers[i] != NULL) {
                    nodeStack.push_back((BPT_NODE*)node->_pointers[i]);
                    levelStack.push_back(level+1);
                }
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq (%rdi), %rax
leaq 0x18(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x30(%rsp), %rdi
pushq $0x1
popq %rbx
leaq 0x10(%rsp), %r14
movq %rbx, %rdx
movq %r14, %rcx
callq 0x6fc4
andl $0x0, (%r14)
leaq 0x18(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0xf(%rsp), %rcx
movq %rbx, %rdx
callq 0x6ffa
leaq 0x10(%rsp), %r14
movq 0x70f6(%rip), %r12      # 0xdfc8
leaq 0x2661(%rip), %r13      # 0x953a
movq 0x38(%rsp), %rax
cmpq %rax, 0x30(%rsp)
je 0x6f77
movq -0x8(%rax), %rbp
addq $-0x8, %rax
movq %rax, 0x38(%rsp)
movq 0x20(%rsp), %rax
movl -0x4(%rax), %ebx
addq $-0x4, %rax
movq %rax, 0x20(%rsp)
testl %ebx, %ebx
movl $0x0, %r15d
cmovgl %ebx, %r15d
subl $0x1, %r15d
jb 0x6f26
movq %r12, %rdi
movq %r13, %rsi
callq 0x21e0
jmp 0x6f13
movq %rbp, %rdi
callq 0x7030
cmpb $0x0, 0x8(%rbp)
jne 0x6ed9
movl 0x4(%rbp), %r15d
incl %ebx
testl %r15d, %r15d
js 0x6ed9
movq 0x18(%rbp), %rax
movl %r15d, %ecx
movq (%rax,%rcx,8), %rax
testq %rax, %rax
je 0x6f72
movq %rax, 0x10(%rsp)
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
callq 0x8792
movl %ebx, 0x10(%rsp)
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x88d2
decl %r15d
jmp 0x6f3a
leaq 0x18(%rsp), %rdi
callq 0x5b74
leaq 0x30(%rsp), %rdi
callq 0x8692
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x6fb2
jmp 0x6fa5
jmp 0x6fa5
jmp 0x6fa5
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x5b74
leaq 0x30(%rsp), %rdi
callq 0x8692
movq %rbx, %rdi
callq 0x22e0
// File: /workspace/github_cpp_makefile_star2_O2/ChaohuiYu[P]BPlusTree/BPlusTree.cpp
// Function: BPlusTree<int>::BPlusTreeNode::printNode()
void BPT_NODE::printNode() {
    if (_isLeaf) {
        FOR(i, 0, _keyCount) {
            cout << _keys[i] << ":" << (int)(long long)_pointers[i+1] << " | ";
        }
        cout << endl;
    }
    else {
        FOR(i, 0, _keyCount) {
            cout << _pointers[i] << " | ";
            cout << _keys[i] << ":";
        }
        cout << _pointers[_keyCount] << endl;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
cmpb $0x0, 0x8(%rdi)
je 0x70a3
xorl %r13d, %r13d
movq 0x6f7c(%rip), %r14      # 0xdfc8
leaq 0x24e3(%rip), %r15      # 0x9536
leaq 0x26d7(%rip), %r12      # 0x9731
movslq 0x4(%rbx), %rax
cmpq %rax, %r13
jge 0x7112
movq 0x10(%rbx), %rax
movl (%rax,%r13,4), %esi
movq %r14, %rdi
callq 0x22d0
movq %rax, %rdi
movq %r15, %rsi
callq 0x21e0
movq 0x18(%rbx), %rcx
movl 0x8(%rcx,%r13,8), %esi
incq %r13
movq %rax, %rdi
callq 0x22d0
movq %rax, %rdi
movq %r12, %rsi
callq 0x21e0
jmp 0x705a
xorl %r13d, %r13d
movq 0x6f1b(%rip), %r14      # 0xdfc8
leaq 0x267d(%rip), %r15      # 0x9731
leaq 0x247b(%rip), %r12      # 0x9536
movslq 0x4(%rbx), %rax
movq 0x18(%rbx), %rcx
cmpq %rax, %r13
jge 0x70ff
movq (%rcx,%r13,8), %rsi
movq %r14, %rdi
callq 0x2190
movq %rax, %rdi
movq %r15, %rsi
callq 0x21e0
movq 0x10(%rbx), %rax
movl (%rax,%r13,4), %esi
movq %r14, %rdi
callq 0x22d0
movq %rax, %rdi
movq %r12, %rsi
callq 0x21e0
incq %r13
jmp 0x70bb
movq (%rcx,%rax,8), %rsi
movq 0x6ebe(%rip), %rdi      # 0xdfc8
callq 0x2190
movq %rax, %r14
movq %r14, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2110
nop
// File: /workspace/github_cpp_makefile_star2_O2/ChaohuiYu[P]BPlusTree/BPlusTree.cpp
// Function: BPlusTree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::BPlusTreeNode::BPlusTreeNode(bool, bool, int)
BPT_NODE::BPlusTreeNode(bool isLeaf, bool isRoot, int maxKeyCount) {
    _maxKeyCount = maxKeyCount;
    _keyCount = 0;
    _isLeaf = isLeaf;
    _isRoot = isRoot;
    // _keys = vector<T>();
    // _pointers = vector<void*>();
    _keys = new T[_maxKeyCount];
    _pointers = new void*[_maxKeyCount+1];
    _pointers[0] = NULL;
    _father = NULL;
    _prev = NULL;
    _next = NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %ecx, %r14d
movq %rdi, %rbx
movl %ecx, (%rdi)
andl $0x0, 0x4(%rdi)
movb %sil, 0x8(%rdi)
movb %dl, 0x9(%rdi)
movslq %ecx, %r13
movq %r13, %r12
shlq $0x5, %r12
leaq 0x8(%r12), %rdi
testl %r13d, %r13d
pushq $-0x1
popq %r15
cmovsq %r15, %rdi
callq 0x2030
leaq 0x8(%rax), %rcx
movq %r13, (%rax)
testl %r13d, %r13d
je 0x80ed
addq $0x18, %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
addq $0x20, %rax
addq $-0x20, %r12
jne 0x80d7
movq %rcx, 0x10(%rbx)
leal 0x1(%r14), %edi
shlq $0x3, %rdi
cmpl $-0x1, %r14d
cmovlq %r15, %rdi
callq 0x2030
movq %rax, 0x18(%rbx)
andq $0x0, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
andq $0x0, 0x30(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/BGI-Qingdao[P]ExtractNGSReads/./utils/argsparser.h
// Function: BGIQD::ARGS::args_union::args_union(BGIQD::ARGS::args_union::type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 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&)
args_union(type ty
                    ,const  std::string & n
                    ,bool o
                    ,const std::string & df
                    ,const std::string & exp) 
                : optional(o)
                , setted(false)
                , explain(exp)
                , name(n)
                , default_value(df)
                , t(ty) 

            {
                if(! optional )
                {
                    d.s = NULL;
                }
                if ( t != is_string && t != is_vector_string )
                    d.l = 0 ;
                if ( t == is_float )
                    d.f = 0.0f ;
                if ( t == is_string )
                    d.s = new std::string("");
                if ( t == is_vector_string )
                    d.vs = new std::vector<std::string>();
            }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbx
movq %rdx, %r12
movl %esi, %r13d
movq %rdi, %r15
movb %cl, (%rdi)
movb $0x0, 0x1(%rdi)
addq $0x8, %rdi
movq %rdi, -0x38(%rbp)
movq %r9, %rsi
callq 0x4340
leaq 0x28(%r15), %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x4340
leaq 0x48(%r15), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4340
movl %r13d, 0x68(%r15)
cmpb $0x0, (%r15)
jne 0x5974
andq $0x0, 0x70(%r15)
cmpl $0x1, %r13d
je 0x5992
cmpl $0x5, %r13d
je 0x59bb
andq $0x0, 0x70(%r15)
cmpl $0x4, %r13d
jne 0x59d2
andl $0x0, 0x70(%r15)
jmp 0x59d2
pushq $0x20
popq %rdi
callq 0x4270
movq %rax, %rbx
leaq 0x474a(%rip), %rsi      # 0xa0ee
leaq -0x29(%rbp), %rdx
movq %rax, %rdi
callq 0x4120
movq %rbx, 0x70(%r15)
cmpl $0x5, 0x68(%r15)
jne 0x59d2
pushq $0x18
popq %rdi
callq 0x4270
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
andq $0x0, 0x10(%rax)
movq %rax, 0x70(%r15)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq %rbx, %rdi
callq 0x4250
jmp 0x59f1
movq %rax, %r15
movq %r12, %rdi
callq 0x4140
jmp 0x59fe
movq %rax, %r15
movq %r14, %rdi
callq 0x4140
jmp 0x5a0b
movq %rax, %r15
movq -0x38(%rbp), %rdi
callq 0x4140
movq %r15, %rdi
callq 0x4430
// File: /workspace/github_cpp_makefile_star2_O2/BGI-Qingdao[P]ExtractNGSReads/./utils/argsparser.h
// Function: BGIQD::ARGS::args_union::get_type[abi:cxx11](BGIQD::ARGS::args_union::type)
static std::string get_type( type t)
            {
                if( t == is_bool )
                    return "[ no arg ]";
                if( t == is_int)
                    return "[ int arg ]";
                if( t == is_long)
                    return "[ long arg ]";
                if( t == is_float)
                    return "[ float arg ]";
                if( t == is_string)
                    return "[ string arg ]";
                if( t == is_vector_string)
                    return "[ vector_string arg ] ";
                return "";
            }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x5, %esi
ja 0x5aec
movl %esi, %eax
leaq 0x456f(%rip), %rcx      # 0xa004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x47ea(%rip), %rsi      # 0xa28f
leaq -0xf(%rbp), %rdx
jmp 0x5af7
leaq 0x4801(%rip), %rsi      # 0xa2b3
leaq -0xc(%rbp), %rdx
jmp 0x5af7
leaq 0x47db(%rip), %rsi      # 0xa29a
leaq -0xe(%rbp), %rdx
jmp 0x5af7
leaq 0x47da(%rip), %rsi      # 0xa2a6
leaq -0xd(%rbp), %rdx
jmp 0x5af7
leaq 0x47e8(%rip), %rsi      # 0xa2c1
leaq -0xb(%rbp), %rdx
jmp 0x5af7
leaq 0x47ea(%rip), %rsi      # 0xa2d0
leaq -0xa(%rbp), %rdx
jmp 0x5af7
leaq 0x45fb(%rip), %rsi      # 0xa0ee
leaq -0x9(%rbp), %rdx
movq %rbx, %rdi
callq 0x4120
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/BGI-Qingdao[P]ExtractNGSReads/./utils/argsparser.h
// Function: BGIQD::ARGS::args_union::set_value(char const*, bool)
void set_value( const  char * value , bool df )
            {
                if( t == BGIQD::ARGS::args_union::is_bool  )
                {
                    d.b = ! df ;
                }
                if( t == BGIQD::ARGS::args_union::is_string)
                {
                    d.s = new std::string(value);
                }
                if( t == BGIQD::ARGS::args_union::is_int)
                {
                    d.i = std::stoi(std::string(value));
                }
                if( t == BGIQD::ARGS::args_union::is_long)
                {
                    d.l = std::stol(std::string(value));
                }
                if( t == BGIQD::ARGS::args_union::is_float)
                {
                    d.f = std::stod(std::string(value));
                }
                if( t == BGIQD::ARGS::args_union::is_vector_string)
                {
                    if( d.vs == NULL )
                    {
                        d.vs = new std::vector<std::string>() ;
                    }
                    (*(d.vs)).push_back(std::string(value));
                }
            }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl 0x68(%rdi), %eax
cmpl $0x1, %eax
je 0x5b35
testl %eax, %eax
jne 0x5b57
xorb $0x1, %dl
movb %dl, 0x70(%r14)
jmp 0x5c43
pushq $0x20
popq %rdi
callq 0x4270
movq %rax, %r15
leaq -0x40(%rbp), %rdx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4120
movq %r15, 0x70(%r14)
movl 0x68(%r14), %eax
cmpl $0x2, %eax
jne 0x5b8b
leaq -0x40(%rbp), %rdi
leaq -0x19(%rbp), %rdx
movq %rbx, %rsi
callq 0x4120
leaq -0x40(%rbp), %rdi
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x62f8
movl %eax, 0x70(%r14)
leaq -0x40(%rbp), %rdi
callq 0x4140
movl 0x68(%r14), %eax
cmpl $0x3, %eax
jne 0x5bbf
leaq -0x40(%rbp), %rdi
leaq -0x19(%rbp), %rdx
movq %rbx, %rsi
callq 0x4120
leaq -0x40(%rbp), %rdi
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x6319
movq %rax, 0x70(%r14)
leaq -0x40(%rbp), %rdi
callq 0x4140
movl 0x68(%r14), %eax
cmpl $0x4, %eax
jne 0x5bf6
leaq -0x40(%rbp), %rdi
leaq -0x19(%rbp), %rdx
movq %rbx, %rsi
callq 0x4120
leaq -0x40(%rbp), %rdi
xorl %esi, %esi
callq 0x633a
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x70(%r14)
leaq -0x40(%rbp), %rdi
callq 0x4140
movl 0x68(%r14), %eax
cmpl $0x5, %eax
jne 0x5c43
movq 0x70(%r14), %r15
testq %r15, %r15
jne 0x5c1e
pushq $0x18
popq %rdi
callq 0x4270
movq %rax, %r15
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
andq $0x0, 0x10(%rax)
movq %rax, 0x70(%r14)
leaq -0x40(%rbp), %rdi
leaq -0x19(%rbp), %rdx
movq %rbx, %rsi
callq 0x4120
leaq -0x40(%rbp), %rsi
movq %r15, %rdi
callq 0x65c4
leaq -0x40(%rbp), %rdi
callq 0x4140
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5c5a
jmp 0x5c68
jmp 0x5c5a
jmp 0x5c68
jmp 0x5c5a
jmp 0x5c68
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x4140
jmp 0x5c78
movq %rax, %rbx
jmp 0x5c78
movq %rax, %rbx
movq %r15, %rdi
callq 0x4250
movq %rbx, %rdi
callq 0x4430