LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/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 $0x38, %rsp
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r13
movabsq $0x400000200, %rax      # imm = 0x400000200
movq %rax, (%rdi)
leaq 0x8(%rdi), %rax
movq %rax, 0x10(%rsp)
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rsp)
movq %rax, 0x8(%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
movb %al, 0x18(%rdi)
leaq 0x28(%rdi), %r14
leaq 0x38(%rdi), %rcx
movq %rcx, (%rsp)
movq %rcx, 0x28(%rdi)
movq %rax, 0x30(%rdi)
movb %al, 0x38(%rdi)
leaq 0x50(%rdi), %r15
movq %r15, %rdi
movl $0x3e, %esi
callq 0x8454
leaq 0x68(%r13), %rdi
movq %rdi, 0x18(%rsp)
movl %ebp, %esi
callq 0x73e4
movq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x2110
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2110
movl %ebp, 0x48(%r13)
leaq 0x5268(%rip), %rsi      # 0xb344
movq %r14, %rdi
callq 0x20b0
movl $0xe, %ebx
testl %eax, %eax
je 0x611e
leaq 0x5257(%rip), %rsi      # 0xb34b
movq %r14, %rdi
callq 0x20b0
testl %eax, %eax
je 0x611e
leaq 0x524b(%rip), %rsi      # 0xb352
movq %r14, %rdi
callq 0x20b0
testl %eax, %eax
movl $0xe, %eax
movl $0x8, %ebx
cmovel %eax, %ebx
movl (%r13), %eax
addl $-0xc, %eax
cltd
idivl %ebx
leaq 0x20(%rsp), %rdi
movl %eax, %esi
callq 0x8454
movl 0x30(%rsp), %eax
movl %eax, 0x10(%r15)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%r15)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6156
movq %rax, %rbx
movq 0x18(%rsp), %rdi
callq 0x61a8
jmp 0x6168
movq %rax, %rbx
movq (%r14), %rdi
cmpq (%rsp), %rdi
je 0x6180
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x21e0
movq 0x10(%rsp), %rax
movq (%rax), %rdi
cmpq 0x8(%rsp), %rdi
je 0x619f
movq 0x8(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x21e0
movq %rbx, %rdi
callq 0x22e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x9580(%rip), %r12      # 0xffd0
leaq 0x49b0(%rip), %rsi      # 0xb407
movl $0x15, %edx
movq %r12, %rdi
callq 0x2220
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
movq %r12, %rdi
callq 0x2220
movq %rax, %r12
leaq 0x499f(%rip), %rsi      # 0xb41d
movl $0xa, %edx
movq %rax, %rdi
callq 0x2220
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r12, %rdi
callq 0x2220
movq %rax, %r12
leaq 0x4984(%rip), %rsi      # 0xb428
movl $0xc, %edx
movq %rax, %rdi
callq 0x2220
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %r12, %rdi
callq 0x2220
leaq 0x483f(%rip), %rsi      # 0xb306
movl $0x2, %edx
movq %rax, %rdi
callq 0x2220
leaq 0x68(%rbx), %r12
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0x42a0
movq %r12, %rdi
movq %r15, %rsi
callq 0x7432
movl %eax, %ebp
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x6b1c
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21e0
addq $0x50, %rbx
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x42a0
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x93f2
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x6b64
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0x9465(%rip), %rdi      # 0xffd0
leaq 0x48c3(%rip), %rsi      # 0xb435
movl $0x15, %edx
callq 0x2220
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
jmp 0x6b9d
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x6bae
movq (%r13), %rsi
incq %rsi
callq 0x21e0
movq %rbx, %rdi
callq 0x22e0
// File: /workspace/github_cpp_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x93ff(%rip), %r15      # 0xffd0
leaq 0x4873(%rip), %rsi      # 0xb44b
movl $0x1a, %edx
movq %r15, %rdi
callq 0x2220
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rdx
movq %r15, %rdi
callq 0x2220
movq %rax, %r15
leaq 0x4867(%rip), %rsi      # 0xb466
movl $0x8, %edx
movq %rax, %rdi
callq 0x2220
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r15, %rdi
callq 0x2220
leaq 0x46e4(%rip), %rsi      # 0xb306
movl $0x2, %edx
movq %rax, %rdi
callq 0x2220
leaq 0x50(%r14), %r15
leaq 0x58(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %r12
movq %r12, %rdi
callq 0x42a0
movq %r15, %rdi
movq %r12, %rsi
callq 0x92a0
movl %eax, %ebp
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x6c77
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x21e0
testb %bpl, %bpl
je 0x6d29
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %r12
movq %r12, %rdi
callq 0x42a0
movq %r15, %rdi
movq %r12, %rsi
callq 0x98c8
movl %eax, %ebp
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x6cc4
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21e0
addq $0x68, %r14
movq %r14, %rdi
movl %ebp, %esi
callq 0x75c4
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x42a0
movq %r15, %rdi
movq %rbx, %rsi
callq 0x9680
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x6d14
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0x92b5(%rip), %rdi      # 0xffd0
leaq 0x4765(%rip), %rsi      # 0xb487
movl $0x14, %edx
jmp 0x6d3c
movq 0x92a0(%rip), %rdi      # 0xffd0
leaq 0x4738(%rip), %rsi      # 0xb46f
movl $0x17, %edx
callq 0x2220
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
jmp 0x6d6c
movq %rax, %rbx
movq 0x28(%rsp), %rdi
jmp 0x6d6c
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x6d7d
movq (%r13), %rsi
incq %rsi
callq 0x21e0
movq %rbx, %rdi
callq 0x22e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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, %r14
movq 0x9bd3(%rip), %rbx      # 0xffd0
leaq 0x5098(%rip), %rsi      # 0xb49c
movl $0x1d, %edx
movq %rbx, %rdi
callq 0x2220
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rdx
movq %rbx, %rdi
callq 0x2220
leaq 0x4ede(%rip), %rsi      # 0xb306
movl $0x2, %edx
movq %rax, %rdi
callq 0x2220
leaq 0x507e(%rip), %rsi      # 0xb4ba
movl $0x15, %edx
movq %rbx, %rdi
callq 0x2220
addq $0x50, %r14
movq %r14, %rdi
callq 0x8c94
movq %rbx, %rdi
movl %eax, %esi
callq 0x22c0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2140
leaq 0x5040(%rip), %rsi      # 0xb4d0
movl $0x1c, %edx
movq %rbx, %rdi
callq 0x2220
movq %r14, %rdi
callq 0x8c90
movq %rbx, %rdi
movl %eax, %esi
callq 0x22c0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2140
// File: /workspace/github_cpp_makefile_star2_O3/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 0x9141(%rip), %r15      # 0xffd0
leaq 0x4657(%rip), %rsi      # 0xb4ed
movl $0xf, %edx
movq %r15, %rdi
callq 0x2220
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
movq %r15, %rdi
callq 0x2220
movq %rax, %r15
leaq 0x4560(%rip), %rsi      # 0xb41d
movl $0xa, %edx
movq %rax, %rdi
callq 0x2220
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r15, %rdi
callq 0x2220
movq %rax, %r15
leaq 0x4671(%rip), %rsi      # 0xb554
movl $0x1, %edx
movq %rax, %rdi
callq 0x2220
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2140
addq $0x50, %rbx
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0x42a0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x92a0
movl %eax, %ebp
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x6f60
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0x9069(%rip), %rdi      # 0xffd0
testb %bpl, %bpl
je 0x6ffb
leaq 0x4586(%rip), %rsi      # 0xb4fd
movl $0x9, %edx
callq 0x2220
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %rsp, %r14
movq %r14, %rdi
callq 0x42a0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x98c8
movq 0x901e(%rip), %rdi      # 0xffd0
movl %eax, %esi
callq 0x22c0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2140
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x700c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21e0
jmp 0x700c
leaq 0x446d(%rip), %rsi      # 0xb46f
movl $0x17, %edx
callq 0x2220
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
jmp 0x702a
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x703b
movq (%r12), %rsi
incq %rsi
callq 0x21e0
movq %rbx, %rdi
callq 0x22e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x41f8
leaq 0x38(%rbx), %rdi
movl $0x1, %esi
callq 0x7c0e
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_O3/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 %rax
movl %esi, %eax
movb 0x4(%rdi), %cl
shlb $0x3, %cl
sarl %cl, %esi
imull 0x1c(%rdi), %esi
movl $0x1, %r8d
shll %cl, %r8d
cltd
idivl %r8d
addl %esi, %edx
movl %edx, 0x4(%rsp)
movslq %edx, %rcx
movq 0x28(%rdi), %rax
subq 0x20(%rdi), %rax
sarq $0x5, %rax
cmpq %rcx, %rax
jbe 0x7665
leal 0x3f(%rcx), %eax
testl %ecx, %ecx
cmovnsl %edx, %eax
sarl $0x6, %eax
cltq
shlq $0x3, %rax
addq 0x38(%rdi), %rax
movabsq $-0x8000000000000000, %r8 # imm = 0x8000000000000000
leaq 0x3f(%r8), %r9
andq %rcx, %r9
xorl %esi, %esi
cmpq %r8, %r9
setbe %sil
movl $0x1, %r8d
shlq %cl, %r8
movq -0x8(%rax,%rsi,8), %r9
btq %rcx, %r9
jae 0x767a
leaq -0x8(,%rsi,8), %rcx
notq %r8
andq %r8, %r9
movq %r9, (%rax,%rcx)
movq 0x68(%rdi), %rsi
cmpq 0x70(%rdi), %rsi
je 0x7693
movl %edx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x68(%rdi)
jmp 0x76a1
movq 0x8984(%rip), %rdi      # 0xfff0
leaq 0x3f4d(%rip), %rsi      # 0xb5c0
movl $0x2d, %edx
jmp 0x768d
movq 0x896f(%rip), %rdi      # 0xfff0
leaq 0x3f66(%rip), %rsi      # 0xb5ee
movl $0x30, %edx
popq %rax
jmp 0x2220
addq $0x60, %rdi
leaq 0x4(%rsp), %rdx
callq 0x7c5c
popq %rax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %r14
pushq %rbx
pushq %rax
movl %edx, %eax
movb 0x4(%rsi), %cl
shlb $0x3, %cl
movl %edx, %r8d
sarl %cl, %r8d
imull 0x1c(%rsi), %r8d
movl $0x1, %r9d
shll %cl, %r9d
movq %rdi, %rbx
cltd
idivl %r9d
addl %r8d, %edx
movslq %edx, %rax
movq 0x28(%rsi), %rdx
movq 0x20(%rsi), %rcx
subq %rcx, %rdx
sarq $0x5, %rdx
cmpq %rax, %rdx
jbe 0x7762
leal 0x3f(%rax), %edx
testl %eax, %eax
cmovnsl %eax, %edx
sarl $0x6, %edx
movslq %edx, %rdx
shlq $0x3, %rdx
addq 0x38(%rsi), %rdx
movabsq $-0x8000000000000000, %rsi # imm = 0x8000000000000000
leaq 0x3f(%rsi), %rdi
andq %rax, %rdi
xorl %r8d, %r8d
cmpq %rsi, %rdi
setbe %r8b
movq -0x8(%rdx,%r8,8), %rdx
leaq 0x10(%rbx), %r14
btq %rax, %rdx
jae 0x7783
shlq $0x5, %rax
movq %r14, (%rbx)
movq (%rcx,%rax), %rsi
movq 0x8(%rcx,%rax), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x42a0
jmp 0x77b0
movq 0x8887(%rip), %rdi      # 0xfff0
leaq 0x3eaf(%rip), %rsi      # 0xb61f
movl $0x2c, %edx
callq 0x2220
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
jmp 0x779e
movq 0x8866(%rip), %rdi      # 0xfff0
leaq 0x3ebb(%rip), %rsi      # 0xb64c
movl $0x2f, %edx
callq 0x2220
movq %r14, (%rbx)
leaq 0x3a47(%rip), %rdx      # 0xb1ec
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x2692
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x87ff(%rip), %r14      # 0xffd0
leaq 0x3ea4(%rip), %rsi      # 0xb67c
movl $0x13, %edx
movq %r14, %rdi
callq 0x2220
movl 0x1c(%rbx), %esi
movq %r14, %rdi
callq 0x22c0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2140
leaq 0x3e6f(%rip), %rsi      # 0xb690
movl $0x11, %edx
movq %r14, %rdi
callq 0x2220
movq 0x28(%rbx), %rsi
movq 0x68(%rbx), %rax
subq 0x20(%rbx), %rsi
sarq $0x5, %rsi
subq 0x60(%rbx), %rax
sarq $0x2, %rax
subq %rax, %rsi
movq %r14, %rdi
callq 0x2130
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2140
movq 0x20(%rbx), %rax
movq 0x28(%rbx), %rcx
cmpq %rax, %rcx
je 0x798a
movl $0x8, %ebp
xorl %r14d, %r14d
movq 0x8735(%rip), %r15      # 0xffd0
leaq 0x3e1e(%rip), %r12      # 0xb6c0
movq 0x38(%rbx), %rdx
movl %r14d, %esi
shrl $0x6, %esi
movq (%rdx,%rsi,8), %rdx
btq %r14, %rdx
jae 0x7970
movl $0x8, %edx
movq %r15, %rdi
leaq 0x3dd9(%rip), %rsi      # 0xb6a2
callq 0x2220
movl %r14d, %eax
cltd
idivl 0x1c(%rbx)
movq %r15, %rdi
movl %eax, %esi
callq 0x22c0
movl $0xa, %edx
movq %r15, %rdi
leaq 0x3dbd(%rip), %rsi      # 0xb6ab
callq 0x2220
movl %r14d, %eax
cltd
idivl 0x1c(%rbx)
movq %r15, %rdi
movl %edx, %esi
callq 0x22c0
movl $0xb, %edx
movq %r15, %rdi
leaq 0x3da3(%rip), %rsi      # 0xb6b6
callq 0x2220
movq 0x20(%rbx), %rax
movq -0x8(%rax,%rbp), %rsi
movq (%rax,%rbp), %rdx
movq %r15, %rdi
callq 0x2220
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x2220
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r13, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2140
movq 0x20(%rbx), %rax
movq 0x28(%rbx), %rcx
incq %r14
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x5, %rdx
addq $0x20, %rbp
cmpq %r14, %rdx
ja 0x78a2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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, %ebp
movq %rdi, %rbx
movq 0x860d(%rip), %r14      # 0xffd0
leaq 0x3cf8(%rip), %rsi      # 0xb6c2
movl $0x10, %edx
movq %r14, %rdi
callq 0x2220
movq %r14, %rdi
movl %ebp, %esi
callq 0x22c0
movq %rax, %r15
leaq 0x3b69(%rip), %rsi      # 0xb554
movl $0x1, %edx
movq %rax, %rdi
callq 0x2220
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2140
movq 0x28(%rbx), %rax
subq 0x20(%rbx), %rax
sarq $0x5, %rax
decq %rax
movslq 0x1c(%rbx), %rcx
xorl %edx, %edx
divq %rcx
incl %eax
cmpl %ebp, %eax
jle 0x7b4c
movl %ecx, %eax
imull %ebp, %eax
movslq %ebp, %rbp
incq %rbp
movl %ebp, %edx
imull %ecx, %edx
cmpl %edx, %eax
jge 0x7b3d
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
movslq %eax, %r15
movq %r15, %r12
shlq $0x5, %r12
orq $0x8, %r12
leaq 0x3f(%rcx), %r13
movl $0x9, %edx
movq %r14, %rdi
leaq 0x3c70(%rip), %rsi      # 0xb6f4
callq 0x2220
movl %r15d, %eax
cltd
idivl 0x1c(%rbx)
movq %r14, %rdi
movl %edx, %esi
callq 0x22c0
movl $0x2, %edx
movq %rax, %rdi
leaq 0x3a5b(%rip), %rsi      # 0xb504
callq 0x2220
leal 0x3f(%r15), %eax
testl %r15d, %r15d
cmovnsl %r15d, %eax
sarl $0x6, %eax
cltq
shlq $0x3, %rax
addq 0x38(%rbx), %rax
movq %r15, %rcx
andq %r13, %rcx
xorl %edx, %edx
movabsq $-0x8000000000000000, %rsi # imm = 0x8000000000000000
cmpq %rsi, %rcx
setbe %dl
movq -0x8(%rax,%rdx,8), %rax
btq %r15, %rax
jae 0x7afe
movq 0x20(%rbx), %rax
movq -0x8(%rax,%r12), %rsi
movq (%rax,%r12), %rdx
movq %r14, %rdi
callq 0x2220
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2140
incq %r15
movslq 0x1c(%rbx), %rax
imulq %rbp, %rax
addq $0x20, %r12
cmpq %rax, %r15
jl 0x7a75
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x847d(%rip), %rbx      # 0xffd0
leaq 0x3b79(%rip), %rsi      # 0xb6d3
movl $0x10, %edx
movq %rbx, %rdi
callq 0x2220
movq %rbx, %rdi
movl %ebp, %esi
callq 0x22c0
movq %rax, %rbx
leaq 0x3b69(%rip), %rsi      # 0xb6e4
movl $0xf, %edx
movq %rax, %rdi
callq 0x2220
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2140
nop
// File: /workspace/github_cpp_makefile_star2_O3/ChaohuiYu[P]BPlusTree/BPlusTree.cpp
// Function: BPlusTree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::checkKeyExist(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rax
movq %rdi, %r14
leaq 0x18(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rsi), %rsi
movq %rax, (%rsp)
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x42a0
movq %r14, %rdi
movq %r15, %rsi
callq 0x937a
movq %rax, %r14
movq (%r15), %rdi
cmpq %rbx, %rdi
je 0x92fb
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21e0
movslq 0x4(%r14), %r15
testq %r15, %r15
jle 0x9362
movq 0x10(%r14), %r12
movq (%rsp), %rax
movq 0x8(%rax), %r14
addq $0x8, %r12
movq %r15, %r13
negq %r13
movb $0x1, %bpl
movl $0x1, %ebx
cmpq (%r12), %r14
jne 0x9345
testq %r14, %r14
je 0x9364
movq -0x8(%r12), %rsi
movq (%rsp), %rax
movq (%rax), %rdi
movq %r14, %rdx
callq 0x21f0
testl %eax, %eax
je 0x9364
cmpq %r15, %rbx
setb %bpl
addq $0x20, %r12
leaq (%rbx,%r13), %rax
incq %rax
incq %rbx
cmpq $0x1, %rax
jne 0x9322
jmp 0x9364
xorl %ebp, %ebp
andb $0x1, %bpl
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %r12
pushq %rbx
pushq %rax
movq (%rdi), %rbx
cmpb $0x0, 0x8(%rbx)
jne 0x93da
movq %rsi, %r14
movl 0x4(%rbx), %eax
testl %eax, %eax
js 0x93d4
xorl %r15d, %r15d
xorl %r12d, %r12d
movl %eax, %eax
cmpq %rax, %r12
je 0x93cc
movq 0x10(%rbx), %rsi
addq %r15, %rsi
movq %r14, %rdi
callq 0x2050
testl %eax, %eax
js 0x93cc
leaq 0x1(%r12), %rcx
movslq 0x4(%rbx), %rax
addq $0x20, %r15
cmpq %rax, %r12
movq %rcx, %r12
jl 0x939b
jmp 0x93d4
movq 0x18(%rbx), %rax
movq (%rax,%r12,8), %rbx
cmpb $0x1, 0x8(%rbx)
jne 0x938e
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rdi
callq 0x4294
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 $0x68, %rsp
movl %edx, 0x14(%rsp)
movq %rsi, %rax
movq %rdi, %r14
leaq 0x58(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rsi), %rsi
movq %rax, 0x8(%rsp)
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %r12
movq %r12, %rdi
callq 0x42a0
movq %r14, 0x20(%rsp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x937a
movq %rax, %r14
movq (%r12), %rdi
cmpq %rbx, %rdi
je 0x9458
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x21e0
movq %r14, 0x18(%rsp)
movslq 0x4(%r14), %r15
movq 0x8(%rsp), %rax
movq 0x8(%rax), %r13
testq %r15, %r15
jle 0x94cc
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rbx
addq $0x8, %rbx
movq %r15, %rbp
negq %rbp
movl $0x1, %r14d
xorl %r12d, %r12d
cmpq (%rbx), %r13
jne 0x94b1
testq %r13, %r13
je 0x9521
movq -0x8(%rbx), %rsi
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq %r13, %rdx
callq 0x21f0
testl %eax, %eax
je 0x9521
cmpq %r15, %r14
setae %r12b
addq $0x20, %rbx
leaq (%r14,%rbp), %rax
incq %rax
incq %r14
cmpq $0x1, %rax
jne 0x948b
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x8(%rsp), %rax
movq (%rax), %rsi
addq %rsi, %r13
leaq 0x28(%rsp), %r14
movq %r14, %rdi
movq %r13, %rdx
callq 0x42a0
movslq 0x14(%rsp), %rcx
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq %r14, %rdx
callq 0x955a
movq 0x28(%rsp), %rdi
movb $0x1, %r12b
cmpq %r15, %rdi
je 0x9521
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21e0
andb $0x1, %r12b
movl %r12d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x9551
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21e0
movq %rbx, %rdi
callq 0x22e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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, %r15
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0x0, 0x4(%rsi)
jle 0x9617
movq %r15, 0x10(%rsp)
movq %r14, 0x8(%rsp)
xorl %r14d, %r14d
xorl %r13d, %r13d
movq 0x10(%rbx), %rdi
addq %r14, %rdi
movq %r12, %rsi
callq 0x2050
movl 0x4(%rbx), %ecx
movslq %ecx, %r15
testl %eax, %eax
jns 0x95b3
incq %r13
addq $0x20, %r14
cmpq %r15, %r13
jl 0x958e
cmpl %r13d, %ecx
jle 0x95e5
movslq %r13d, %r14
movq %r15, %rbp
shlq $0x5, %rbp
movq 0x10(%rbx), %rdi
leaq (%rdi,%rbp), %rsi
addq $-0x20, %rsi
addq %rbp, %rdi
callq 0x2110
decq %r15
addq $-0x20, %rbp
cmpq %r14, %r15
jg 0x95c2
movl 0x4(%rbx), %ecx
leal 0x1(%r13), %ebp
cmpl %r13d, %ecx
movq 0x10(%rsp), %r15
jle 0x9621
incl %ecx
movslq %ecx, %rax
movslq %ebp, %rcx
movq 0x8(%rsp), %r14
movq 0x18(%rbx), %rdx
movq -0x8(%rdx,%rax,8), %rsi
movq %rsi, (%rdx,%rax,8)
decq %rax
cmpq %rcx, %rax
jg 0x9600
jmp 0x9626
movl $0x1, %ebp
xorl %r13d, %r13d
jmp 0x9626
movq 0x8(%rsp), %r14
movl %r13d, %edi
shlq $0x5, %rdi
addq 0x10(%rbx), %rdi
movq %r12, %rsi
callq 0x2110
movq 0x18(%rbx), %rax
movl %ebp, %ecx
movq %r15, (%rax,%rcx,8)
movl 0x4(%rbx), %eax
incl %eax
movl %eax, 0x4(%rbx)
cmpl (%rbx), %eax
jne 0x9668
movq %r14, %rdi
movq %rbx, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9fd4
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rdi
callq 0x4294
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 $0x68, %rsp
movq %rsi, %rax
movq %rdi, %r14
leaq 0x58(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rsi), %rsi
movq %rax, 0x10(%rsp)
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %r12
movq %r12, %rdi
callq 0x42a0
movq %r14, %rdi
movq %r12, %rsi
callq 0x937a
movq %rax, %r15
movq (%r12), %rdi
cmpq %rbx, %rdi
je 0x96dd
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x21e0
movslq 0x4(%r15), %rcx
testq %rcx, %rcx
jle 0x975c
movq %r14, 0x20(%rsp)
movq %r15, 0x18(%rsp)
movq 0x10(%r15), %r15
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rbp
addq $0x8, %r15
movq %rcx, %r12
negq %r12
movb $0x1, %bl
movl $0x1, %r14d
cmpq (%r15), %rbp
jne 0x9742
movq 0x10(%rsp), %rax
movq (%rax), %r13
testq %rbp, %rbp
je 0x9760
movq -0x8(%r15), %rsi
movq %r13, %rdi
movq %rbp, %rdx
movl %ebx, 0xc(%rsp)
movq %rcx, %rbx
callq 0x21f0
movq %rbx, %rcx
movl 0xc(%rsp), %ebx
testl %eax, %eax
je 0x9760
cmpq %rcx, %r14
setb %bl
addq $0x20, %r15
leaq (%r12,%r14), %rax
incq %rax
incq %r14
cmpq $0x1, %rax
jne 0x970f
xorl %ebx, %ebx
jmp 0x97a8
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
addq %r13, %rbp
leaq 0x28(%rsp), %r14
movq %r14, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x42a0
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq %r14, %rdx
callq 0x97de
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x97a8
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21e0
andb $0x1, %bl
movl %ebx, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x97d6
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21e0
movq %rbx, %rdi
callq 0x22e0
// File: /workspace/github_cpp_makefile_star2_O3/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, 0x8(%rsp)
movq 0x10(%rsi), %r15
movq %rdx, 0x10(%rsp)
movq 0x8(%rdx), %r12
movl $0x1, %r13d
xorl %ebp, %ebp
xorl %r14d, %r14d
cmpq 0x8(%r15,%r14), %r12
jne 0x9830
testq %r12, %r12
je 0x983b
movq (%r15,%r14), %rsi
movq 0x10(%rsp), %rax
movq (%rax), %rdi
movq %r12, %rdx
callq 0x21f0
testl %eax, %eax
je 0x983b
incq %r13
addq $0x20, %r14
incl %ebp
jmp 0x980c
movl 0x4(%rbx), %eax
leal -0x1(%rax), %ecx
cmpl %ebp, %ecx
jle 0x9867
movq 0x10(%rbx), %rdi
leaq (%rdi,%r14), %rsi
addq $0x20, %rsi
addq %r14, %rdi
callq 0x2110
movl 0x4(%rbx), %eax
leal -0x1(%rax), %ecx
addq $0x20, %r14
incl %ebp
jmp 0x9841
cmpl %eax, %r13d
jge 0x9887
movl %eax, %edx
movq 0x18(%rbx), %rsi
movq 0x8(%rsi,%r13,8), %rdi
movq %rdi, (%rsi,%r13,8)
leaq 0x1(%r13), %rsi
movq %rsi, %r13
cmpq %rsi, %rdx
jne 0x986e
movl %ecx, 0x4(%rbx)
movq 0x8(%rsp), %rdi
movl 0x8(%rdi), %ecx
movl %ecx, %edx
incl %edx
shrl $0x1f, %edx
addl %edx, %ecx
incl %ecx
sarl %ecx
cmpl %ecx, %eax
jle 0x98b2
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa22a
// File: /workspace/github_cpp_makefile_star2_O3/ChaohuiYu[P]BPlusTree/BPlusTree.cpp
// Function: BPlusTree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::queryValue(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rsi), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x42a0
movq %r14, %rdi
movq %r15, %rsi
callq 0x937a
movq %rax, %r14
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x9920
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21e0
movslq 0x4(%r14), %r12
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %r12, %r12
jle 0x9974
movq 0x10(%r14), %r13
movq 0x8(%rbx), %r15
shlq $0x3, %r12
xorl %ebp, %ebp
cmpq 0x8(%r13,%rbp,4), %r15
jne 0x995c
testq %r15, %r15
je 0x996c
movq (%r13,%rbp,4), %rsi
movq (%rbx), %rdi
movq %r15, %rdx
callq 0x21f0
testl %eax, %eax
je 0x996c
addq $0x8, %rbp
cmpq %rbp, %r12
jne 0x993c
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x9974
movq 0x18(%r14), %rax
movl 0x8(%rax,%rbp), %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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
leaq 0x10(%rsp), %rbx
movl $0x1, %edx
movq %rbx, %rcx
callq 0x88d6
movl $0x0, (%rbx)
leaq 0x18(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0xf(%rsp), %rcx
movl $0x1, %edx
callq 0x891c
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x8852
movq 0x7847(%rip), %rbx      # 0xffd0
leaq 0x2dc8(%rip), %r14      # 0xb558
leaq 0x10(%rsp), %r12
movq -0x8(%rax), %rbp
addq $-0x8, %rax
movq %rax, 0x38(%rsp)
movq 0x20(%rsp), %rax
movl -0x4(%rax), %r13d
addq $-0x4, %rax
movq %rax, 0x20(%rsp)
movl %r13d, %r15d
testl %r13d, %r13d
jle 0x87d1
movl $0x2, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2220
decl %r15d
jne 0x87bc
movq %rbp, %rdi
callq 0x8962
cmpb $0x0, 0x8(%rbp)
jne 0x883f
movslq 0x4(%rbp), %r15
testq %r15, %r15
js 0x883f
incl %r13d
incq %r15
movq 0x18(%rbp), %rax
movq -0x8(%rax,%r15,8), %rax
testq %rax, %rax
je 0x883a
movq %rax, 0x10(%rsp)
leaq 0x30(%rsp), %rdi
movq %r12, %rsi
callq 0xa796
movl %r13d, 0x10(%rsp)
movq 0x20(%rsp), %rsi
cmpq 0x28(%rsp), %rsi
je 0x882d
movl %r13d, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x20(%rsp)
jmp 0x883a
leaq 0x18(%rsp), %rdi
movq %r12, %rdx
callq 0xa8ee
decq %r15
jg 0x87ee
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rax
cmpq %rax, %rdi
jne 0x8795
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x8871
movq 0x28(%rsp), %rsi
subq %rax, %rsi
movq %rax, %rdi
callq 0x21e0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x8883
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x21e0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x88b7
jmp 0x889d
jmp 0x889d
jmp 0x889d
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x88b7
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x21e0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x88ce
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x21e0
movq %rbx, %rdi
callq 0x22e0
// File: /workspace/github_cpp_makefile_star2_O3/ChaohuiYu[P]BPlusTree/BPlusTree.cpp
// Function: BPlusTree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq 0x4(%rdi), %rax
cmpb $0x0, 0x8(%rdi)
je 0x9c1c
testl %eax, %eax
jle 0x9cab
movl $0x8, %ebp
xorl %r15d, %r15d
movq 0x641d(%rip), %r14      # 0xffd0
leaq 0x1b97(%rip), %r12      # 0xb751
movq 0x10(%rbx), %rax
movq -0x8(%rax,%rbp), %rsi
movq (%rax,%rbp), %rdx
movq %r14, %rdi
callq 0x2220
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
leaq 0x1973(%rip), %rsi      # 0xb554
callq 0x2220
movq 0x18(%rbx), %rax
movl 0x8(%rax,%r15,8), %esi
incq %r15
movq %r13, %rdi
callq 0x22c0
movl $0x3, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x2220
movslq 0x4(%rbx), %rax
addq $0x20, %rbp
cmpq %rax, %r15
jl 0x9bba
jmp 0x9cb2
testl %eax, %eax
jle 0x9c92
movl $0x8, %r13d
xorl %ebp, %ebp
movq 0x63a1(%rip), %r14      # 0xffd0
leaq 0x1b1b(%rip), %r15      # 0xb751
leaq 0x1917(%rip), %r12      # 0xb554
movq 0x18(%rbx), %rax
movq (%rax,%rbp,8), %rsi
movq %r14, %rdi
callq 0x2180
movl $0x3, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2220
movq 0x10(%rbx), %rax
movq -0x8(%rax,%r13), %rsi
movq (%rax,%r13), %rdx
movq %r14, %rdi
callq 0x2220
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x2220
incq %rbp
movslq 0x4(%rbx), %rax
addq $0x20, %r13
cmpq %rax, %rbp
jl 0x9c3d
movq 0x18(%rbx), %rcx
movq (%rcx,%rax,8), %rsi
movq 0x632f(%rip), %rdi      # 0xffd0
callq 0x2180
movq %rax, %r14
jmp 0x9cb2
movq 0x631e(%rip), %r14      # 0xffd0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2140
nop
// File: /workspace/github_cpp_makefile_star2_O3/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)
movl $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
movq $-0x1, %r15
cmovsq %r15, %rdi
callq 0x2030
leaq 0x8(%rax), %rcx
movq %r13, (%rax)
testl %r13d, %r13d
je 0x9f9c
addq $0x18, %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
addq $0x20, %rax
addq $-0x20, %r12
jne 0x9f83
movq %rcx, 0x10(%rbx)
leal 0x1(%r14), %edi
shlq $0x3, %rdi
cmpl $-0x1, %r14d
cmovlq %r15, %rdi
callq 0x2030
movq %rax, 0x18(%rbx)
xorl %ecx, %ecx
movq %rcx, (%rax)
movq %rcx, 0x30(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 $0x28, %rsp
movq %r8, %rbx
movq %rdx, %r12
movl %esi, %r13d
movq %rdi, %r15
movb %cl, (%rdi)
movb $0x0, 0x1(%rdi)
addq $0x8, %rdi
leaq 0x18(%r15), %rax
movq %rax, -0x40(%rbp)
movq %rax, 0x8(%r15)
movq (%r9), %rsi
movq 0x8(%r9), %rdx
addq %rsi, %rdx
movq %rdi, -0x48(%rbp)
callq 0x6e30
leaq 0x28(%r15), %rdi
leaq 0x38(%r15), %rax
movq %rax, -0x30(%rbp)
movq %rax, 0x28(%r15)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
movq %rdi, -0x38(%rbp)
callq 0x6e30
leaq 0x48(%r15), %r12
leaq 0x58(%r15), %r14
movq %r14, 0x48(%r15)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x6e30
movl %r13d, 0x68(%r15)
cmpb $0x0, (%r15)
jne 0x605b
movq $0x0, 0x70(%r15)
cmpl $0x1, %r13d
je 0x607f
cmpl $0x5, %r13d
je 0x60b0
movq $0x0, 0x70(%r15)
cmpl $0x4, %r13d
jne 0x60cc
movl $0x0, 0x70(%r15)
jmp 0x60cc
movl $0x20, %edi
callq 0x4270
movq %rax, %rbx
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x5054(%rip), %rdx      # 0xb0ee
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x7568
movq %rbx, 0x70(%r15)
cmpl $0x5, 0x68(%r15)
jne 0x60cc
movl $0x18, %edi
callq 0x4270
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x70(%r15)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq %rbx, %rdi
callq 0x4240
jmp 0x60eb
movq %rax, %r15
movq (%r12), %rdi
cmpq %r14, %rdi
je 0x60fe
callq 0x4240
jmp 0x60fe
movq %rax, %r15
movq -0x38(%rbp), %rax
movq (%rax), %rdi
cmpq -0x30(%rbp), %rdi
je 0x6115
callq 0x4240
jmp 0x6115
movq %rax, %r15
movq -0x48(%rbp), %rax
movq (%rax), %rdi
cmpq -0x40(%rbp), %rdi
je 0x6127
callq 0x4240
movq %r15, %rdi
callq 0x4450
nop
// File: /workspace/github_cpp_makefile_star2_O3/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
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
cmpl $0x5, %esi
ja 0x6233
movl %esi, %eax
leaq 0x4e4a(%rip), %rcx      # 0xb004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x50c5(%rip), %rsi      # 0xb28f
leaq 0x50c8(%rip), %rdx      # 0xb299
jmp 0x6221
leaq 0x50d9(%rip), %rsi      # 0xb2b3
leaq 0x50df(%rip), %rdx      # 0xb2c0
jmp 0x6221
leaq 0x50b0(%rip), %rsi      # 0xb29a
leaq 0x50b4(%rip), %rdx      # 0xb2a5
jmp 0x6221
leaq 0x50ac(%rip), %rsi      # 0xb2a6
leaq 0x50b1(%rip), %rdx      # 0xb2b2
jmp 0x6221
leaq 0x50b7(%rip), %rsi      # 0xb2c1
leaq 0x50be(%rip), %rdx      # 0xb2cf
jmp 0x6221
leaq 0x50b6(%rip), %rsi      # 0xb2d0
leaq 0x50c5(%rip), %rdx      # 0xb2e6
movq %rbx, %rdi
callq 0x7568
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x4eb4(%rip), %rdx      # 0xb0ee
movq %rbx, %rdi
movq %rdx, %rsi
jmp 0x6224
// File: /workspace/github_cpp_makefile_star2_O3/BGI-Qingdao[P]ExtractNGSReads/./utils/argsparser.h
// Function: BGIQD::ARGS::args_union::~args_union()
~args_union()
            {
                if( t == is_string && d.s )
                    delete d.s ;
                if ( t== is_vector_string && d.vs )
                    delete d.vs ;
            }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x68(%rdi), %eax
cmpl $0x1, %eax
jne 0x6c01
movq 0x70(%rbx), %r14
testq %r14, %r14
je 0x6c1f
movq (%r14), %rdi
leaq 0x10(%r14), %rax
cmpq %rax, %rdi
je 0x6bf6
callq 0x4240
movq %r14, %rdi
callq 0x4240
movl 0x68(%rbx), %eax
cmpl $0x5, %eax
jne 0x6c1f
movq 0x70(%rbx), %r14
testq %r14, %r14
je 0x6c1f
movq %r14, %rdi
callq 0x717e
movq %r14, %rdi
callq 0x4240
movq 0x48(%rbx), %rdi
leaq 0x58(%rbx), %rax
cmpq %rax, %rdi
je 0x6c31
callq 0x4240
movq 0x28(%rbx), %rdi
leaq 0x38(%rbx), %rax
cmpq %rax, %rdi
je 0x6c43
callq 0x4240
movq 0x8(%rbx), %rdi
addq $0x18, %rbx
cmpq %rbx, %rdi
je 0x6c59
popq %rbx
popq %r14
popq %rbp
jmp 0x4240
popq %rbx
popq %r14
popq %rbp
retq