LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/GcManager.cc
// Function: hlkvds::GcManager::FullGC()
void GcManager::FullGC() {
    std::unique_lock < std::mutex > lck_gc(gcMtx_, std::defer_lock);

    __DEBUG("Begin do Full GC!");
    uint32_t free_before = vol_->GetTotalFreeSegs();
    uint32_t free_after = 0;
    uint32_t used_total = 0;

    uint32_t seg_num = vol_->GetNumberOfSeg();
    uint32_t total_free = 0;
    uint64_t theory_size = 0;
    uint32_t free_seg_num = 0;
    uint32_t used_seg_num = 0;
    uint64_t used_size = 0;

    while (true) {
        lck_gc.lock();
        std::multimap < uint32_t, uint32_t > cands_map;
        vol_->SortSegsByUtils(cands_map, options_.seg_full_rate);
        if (cands_map.size() < SEG_RESERVED_FOR_GC) {
            free_after = vol_->GetTotalFreeSegs();
            used_total = vol_->GetNumberOfSeg() - free_after;
            __DEBUG("End do Full GC! befor have %u segment free, after do full GC now have %u segments free, now used %u segments!", free_before, free_after, used_total);
            break;
        }

        total_free = doMerge(cands_map);
        theory_size = idxMgr_->GetDataTheorySize();
        free_seg_num = vol_->GetTotalFreeSegs();
        used_seg_num = seg_num - free_seg_num;
        used_size = (uint64_t) vol_->GetSegmentSize()
                * (uint64_t) used_seg_num;

        __DEBUG("complete once merge, and this merge free %u segments, theory_size is %lu Byte, used Segments total is %u, occur space is %lu, total seg is %u, free seg is %u", total_free, theory_size, used_seg_num, used_size, seg_num, free_seg_num);
        cands_map.clear();
        lck_gc.unlock();
    } __DEBUG("End do Full GC! total free %u segments", free_after - free_before);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movq (%rdi), %rdi
callq 0x20d8a
leaq 0x20(%rsp), %r12
leaq 0x8(%rsp), %r14
xorl %r13d, %r13d
leaq 0x18(%rsp), %r15
movq %r14, %rdi
callq 0xe40a
movl $0x0, 0x20(%rsp)
movq %r13, 0x28(%rsp)
movq %r12, 0x30(%rsp)
movq %r12, 0x38(%rsp)
movq %r13, 0x40(%rsp)
movq (%rbx), %rdi
movq 0x10(%rbx), %rax
movsd 0x20(%rax), %xmm0
movq %r15, %rsi
callq 0x20d9e
movq 0x40(%rsp), %rbp
cmpq $0x1, %rbp
jbe 0x107ec
movq %rbx, %rdi
movq %r15, %rsi
callq 0x100a8
movq 0x8(%rbx), %rdi
callq 0x11ea0
movq (%rbx), %rdi
callq 0x20d8a
movq %r15, %rdi
callq 0x10ba8
movq %r14, %rdi
callq 0xe446
jmp 0x107f4
movq (%rbx), %rdi
callq 0x20d8a
movq %r15, %rdi
callq 0x10b5e
cmpq $0x1, %rbp
ja 0x1077b
leaq 0x8(%rsp), %rdi
callq 0xdf86
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x10821
movq %rax, %rbx
jmp 0x10833
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x10b5e
leaq 0x8(%rsp), %rdi
callq 0xdf86
movq %rbx, %rdi
callq 0x6680
nop
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/GcManager.cc
// Function: hlkvds::GcManager::loadKvList(unsigned int, std::__cxx11::list<hlkvds::KVSlice*, std::allocator<hlkvds::KVSlice*>>&)
bool GcManager::loadKvList(uint32_t seg_id, std::list<KVSlice*> &slice_list) {
    uint64_t seg_phy_off;
    vol_->CalcSegOffsetFromId(seg_id, seg_phy_off);

    uint32_t seg_size = vol_->GetSegmentSize();
    if (!vol_->Read(dataBuf_, seg_size, seg_phy_off)) {
        return false;
    }

    SegHeaderOnDisk seg_header;
    memcpy(&seg_header, dataBuf_, SegBase::SizeOfSegOnDisk());

    uint32_t num_keys = seg_header.number_keys;

    loadSegKV(slice_list, num_keys, seg_phy_off);
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movq (%rdi), %rdi
cmpl %esi, 0x3c(%rdi)
jbe 0x10869
movl %esi, %r15d
movb 0x40(%rdi), %cl
shlq %cl, %r15
movl 0x38(%rdi), %edx
movq 0x40(%r14), %rsi
movq %r15, %rcx
callq 0x20d00
movl %eax, %ebp
testb %al, %al
je 0x108ba
movq %rsp, %r12
movq %r12, %rdi
callq 0x1b714
movq 0x40(%r14), %rax
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movaps %xmm1, 0x10(%r12)
movaps %xmm0, (%r12)
movl 0x1c(%r12), %edx
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
callq 0x1093e
movq %rsp, %rdi
callq 0x1b720
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1b720
movq %rbx, %rdi
callq 0x6680
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/IndexManager.cc
// Function: hlkvds::HashEntry::~HashEntry()
HashEntry::~HashEntry() {
    cachePtr_ = NULL;
    if (entryPtr_) {
        delete entryPtr_;
    }
    if (stampPtr_) {
        delete stampPtr_;
    }
    return;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq $0x0, 0x10(%rdi)
movq (%rdi), %r14
testq %r14, %r14
je 0x1108d
movq %r14, %rdi
callq 0x10e32
movq %r14, %rdi
callq 0x6400
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
je 0x110ad
movq %rbx, %rdi
callq 0x20a7a
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6400
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/IndexManager.cc
// Function: hlkvds::HashEntry::operator=(hlkvds::HashEntry const&)
HashEntry& HashEntry::operator=(const HashEntry& toBeCopied) {
    *entryPtr_ = *toBeCopied.entryPtr_;
    *stampPtr_ = *toBeCopied.stampPtr_;
    cachePtr_ = toBeCopied.cachePtr_;
    return *this;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %r15
movq (%rdi), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x12bde
movl 0x1c(%r15), %eax
movl %eax, 0x1c(%r12)
movq 0x14(%r15), %rax
movq %rax, 0x14(%r12)
movq 0x20(%r15), %rax
movq %rax, 0x20(%r12)
movzwl 0x28(%r15), %eax
movw %ax, 0x28(%r12)
movq 0x8(%rbx), %r15
movq 0x8(%r14), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x20a04
movl 0x10(%r15), %eax
movl %eax, 0x10(%r12)
movq 0x10(%rbx), %rax
movq %rax, 0x10(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/IndexManager.cc
// Function: hlkvds::IndexManager::InitMeta(unsigned int, unsigned long, unsigned long, unsigned int)
void IndexManager::InitMeta(uint32_t ht_size, uint64_t ondisk_size, uint64_t data_theory_size, uint32_t element_num) {
    htSize_ = ht_size;
    sizeOndisk_ = ondisk_size;
    initHashTable();

    //Set dataTheorySize
    dataTheorySize_ = data_theory_size;
    keyCounter_ = element_num;

}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %r8d, %ebx
movq %rcx, %r14
movq %rdi, %r15
movl %esi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
callq 0x11226
movq %r14, 0x20(%r15)
movl %ebx, 0x18(%r15)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/IndexManager.cc
// Function: hlkvds::IndexManager::Get(char*, unsigned long)
bool IndexManager::Get(char* buff, uint64_t length) {
    if (length != sizeOndisk_) {
        return false;
    }
    char* buf_ptr = buff;

    //Copy TS
    int64_t time_len = KVTime::SizeOf();
    lastTime_->Update();
    time_t t = lastTime_->GetTime();
    memcpy((void *)buf_ptr, (const void*)&t, time_len);
    buf_ptr += time_len;
    __DEBUG("memcpy timestamp: %s at %p, at %ld", KVTime::ToChar(*lastTime_), (void *)buf_ptr, (int64_t)(buf_ptr-buff));

    //Copy Counter Table
    __DEBUG("memcpy Counter at %p, at %ld", (void *)buf_ptr, (int64_t)(buf_ptr-buff));
    for (uint32_t i = 0; i < htSize_; i++) {
        int counter = hashtable_[i].entryList_->get_size();
        memcpy((void *)buf_ptr, (const void*)&counter, sizeof(int));
        buf_ptr += sizeof(int);
    }

    //Copy Index
    __DEBUG("memcpy Index at %p, at %ld", (void *)buf_ptr, (int64_t)(buf_ptr-buff));
    uint64_t entry_len = IndexManager::SizeOfHashEntryOnDisk();
    for (uint32_t i = 0; i < htSize_; i++) {
        int slot_num = hashtable_[i].entryList_->get_size();
        if (slot_num > 0) {
            vector<HashEntry> tmp_vec = hashtable_[i].entryList_->get();
            for (vector<HashEntry>::iterator iter = tmp_vec.begin(); iter != tmp_vec.end(); iter++) {
                memcpy((void *)buf_ptr, (const void*)&(iter->GetEntryOnDisk()), entry_len);
                buf_ptr += entry_len;
            }
        }
    }

    __DEBUG("memcpy complete at %p, at %ld", (void *)buf_ptr, (int64_t)(buf_ptr-buff));

    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x10(%rdi), %rax
movq %rdx, 0x8(%rsp)
movq %rax, (%rsp)
cmpq %rdx, %rax
jne 0x11413
movq %rsi, %r14
movq %rdi, %r15
movq 0x40(%rdi), %rdi
callq 0x209ec
movq 0x40(%r15), %rdi
callq 0x209e0
movq %rax, (%r14)
addq $0x8, %r14
cmpl $0x0, 0x8(%r15)
je 0x11371
xorl %eax, %eax
xorl %ecx, %ecx
xorl %edx, %edx
movq (%r15), %rsi
movq (%rsi,%rcx), %rsi
movl 0x8(%rsi), %esi
movl %esi, (%r14,%rdx,4)
incq %rdx
movl 0x8(%r15), %esi
addq $0x30, %rcx
addq $0x4, %rax
cmpq %rsi, %rdx
jb 0x1134c
addq %rax, %r14
cmpl $0x0, 0x8(%r15)
je 0x11413
xorl %ebx, %ebx
leaq 0x10(%rsp), %r12
movq (%r15), %rax
leaq (%rbx,%rbx,2), %rcx
shlq $0x4, %rcx
movq (%rax,%rcx), %rdx
cmpl $0x0, 0x8(%rdx)
jle 0x11403
addq %rcx, %rax
movq (%rax), %rsi
movq %r12, %rdi
callq 0x121b6
movq 0x10(%rsp), %r13
movq 0x18(%rsp), %rbp
movq %r13, %rax
cmpq %rbp, %r13
je 0x113ef
movq (%rax), %rcx
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups 0x1a(%rcx), %xmm2
movups %xmm2, 0x1a(%r14)
movups %xmm1, 0x10(%r14)
movups %xmm0, (%r14)
addq $0x2a, %r14
addq $0x18, %rax
cmpq %rbp, %rax
jne 0x113b8
jmp 0x113ef
movq %r13, %rdi
callq 0x11066
addq $0x18, %r13
cmpq %rbp, %r13
jne 0x113e3
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x11403
callq 0x6400
incq %rbx
movl 0x8(%r15), %eax
cmpq %rax, %rbx
jb 0x11383
movq (%rsp), %rax
cmpq 0x8(%rsp), %rax
sete %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/IndexManager.cc
// Function: hlkvds::IndexManager::IsSameInMem(hlkvds::HashEntry&)
bool IndexManager::IsSameInMem(HashEntry &entry)
{
    Kvdb_Digest digest = entry.GetKeyDigest();
    uint32_t hash_index = KeyDigestHandle::Hash(&digest) % htSize_;

    std::lock_guard<std::mutex> l(hashtable_[hash_index].slotMtx_);
    LinkedList<HashEntry> *entry_list = hashtable_[hash_index].entryList_;

    bool is_exist = entry_list->search(entry);
    if (!is_exist) {
        __DEBUG("Not Same, because entry is not exist!");
        return false;
    } else {
        HashEntry *entry_inMem = entry_list->getRef(entry);
        if (entry_inMem->GetHeaderAddress() == entry.GetHeaderAddress()) {
            __DEBUG("Same, because entry is same with in memory!");
            return true;
        }
    }

    __DEBUG("Not Same, because entry is not same with in memory!");
    return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %r15
movq (%rsi), %rsi
leaq 0x1c(%rsp), %rbx
movq %rbx, %rdi
callq 0x12bce
movq %rbx, %rdi
callq 0x12d5e
xorl %edx, %edx
divl 0x8(%r15)
movq (%r15), %rax
leaq (%rdx,%rdx,2), %r12
shlq $0x4, %r12
leaq (%rax,%r12), %rbx
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x6590
testl %eax, %eax
jne 0x11a17
movq (%r15), %rax
movq (%rax,%r12), %r12
movq (%r12), %r15
testq %r15, %r15
setne %bpl
je 0x11992
movq %r15, %rdi
movq %r14, %rsi
callq 0x110b6
testb %al, %al
jne 0x11992
movq 0x18(%r15), %r15
jmp 0x11974
testb $0x1, %bpl
je 0x119f4
movq %rsp, %rdi
movq %r14, %rsi
callq 0x11000
movq (%r12), %r15
testq %r15, %r15
je 0x119c7
movq %rsp, %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x110b6
testb %al, %al
jne 0x119ca
movq 0x18(%r15), %r15
testq %r15, %r15
jne 0x119af
xorl %r15d, %r15d
movq %rsp, %rdi
callq 0x11066
movq (%r15), %rax
movq (%r14), %rcx
movzwl 0x20(%rax), %edx
cmpw 0x20(%rcx), %dx
sete %dl
movq 0x22(%rcx), %rcx
cmpq %rcx, 0x22(%rax)
sete %bpl
andb %dl, %bpl
jmp 0x119f6
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x6360
leaq 0x1c(%rsp), %rdi
callq 0x12bdc
movl %ebp, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x62c0
jmp 0x11a34
jmp 0x11a22
movq %rax, %r14
jmp 0x11a3f
movq %rax, %r14
movq %rsp, %rdi
callq 0x11066
jmp 0x11a37
movq %rax, %r14
movq %rbx, %rdi
callq 0x6360
leaq 0x1c(%rsp), %rdi
callq 0x12bdc
movq %r14, %rdi
callq 0x6680
nop
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/IndexManager.cc
// Function: hlkvds::IndexManager::UpdateIndexes(std::__cxx11::list<hlkvds::KVSlice*, std::allocator<hlkvds::KVSlice*>>&)
void IndexManager::UpdateIndexes(list<KVSlice*> &slice_list) {
    std::lock_guard<std::mutex> l(batch_mtx_);
    for (list<KVSlice *>::iterator iter = slice_list.begin(); iter
            != slice_list.end(); iter++) {
        KVSlice *slice = *iter;
        UpdateIndex(slice);
    } __DEBUG("UpdateToIndex Success!");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
leaq 0x70(%rdi), %rbx
movq %rbx, %rdi
callq 0x6590
testl %eax, %eax
jne 0x11aa0
movq %r14, %r12
movq (%r12), %r12
cmpq %r14, %r12
je 0x11a8d
movq 0x10(%r12), %rsi
movq %r15, %rdi
xorl %edx, %edx
callq 0x115cc
jmp 0x11a73
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x6360
movl %eax, %edi
callq 0x62c0
movq %rax, %r14
movq %rbx, %rdi
callq 0x6360
movq %r14, %rdi
callq 0x6680
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/IndexManager.cc
// Function: hlkvds::IndexManager::RemoveEntry(hlkvds::HashEntry)
void IndexManager::RemoveEntry(HashEntry entry) {
    Kvdb_Digest digest = entry.GetKeyDigest();

    uint32_t hash_index = KeyDigestHandle::Hash(&digest) % htSize_;

    std::unique_lock<std::mutex> meta_lck(mtx_, std::defer_lock);
    std::lock_guard<std::mutex> l(hashtable_[hash_index].slotMtx_);
    LinkedList<HashEntry> *entry_list = hashtable_[hash_index].entryList_;

    HashEntry *entry_inMem = entry_list->getRef(entry);
    if (!entry_inMem) {
        __DEBUG("Already remove the index entry");
        return;
    }
    HashEntry::LogicStamp *lts = entry.GetLogicStamp();
    HashEntry::LogicStamp *lts_inMem = entry_inMem->GetLogicStamp();
    KVTime &t = lts->GetSegTime();
    KVTime &t_inMem = lts_inMem->GetSegTime();
    if (t_inMem == t && entry_inMem->GetDataSize() == 0) {
        entry_list->remove(entry);
        dataStor_->ModifyDeathEntry(entry);

        meta_lck.lock();
        keyCounter_--;
        meta_lck.unlock();

        __DEBUG("Remove the index entry!");
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r15
movq %rdi, %r14
movq (%rsi), %rsi
leaq 0x34(%rsp), %rbx
movq %rbx, %rdi
callq 0x12bce
movq %rbx, %rdi
callq 0x12d5e
xorl %edx, %edx
divl 0x8(%r14)
leaq 0x48(%r14), %rax
movq %rax, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movq (%r14), %rax
leaq (%rdx,%rdx,2), %r12
shlq $0x4, %r12
leaq (%rax,%r12), %rbx
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x6590
testl %eax, %eax
jne 0x11be3
movq (%r14), %rax
movq (%rax,%r12), %r12
leaq 0x18(%rsp), %rdi
movq %r15, %rsi
callq 0x11000
movq (%r12), %r13
testq %r13, %r13
je 0x11b57
leaq 0x18(%rsp), %rbp
movq %r13, %rdi
movq %rbp, %rsi
callq 0x110b6
testb %al, %al
jne 0x11b5a
movq 0x18(%r13), %r13
testq %r13, %r13
jne 0x11b3f
xorl %r13d, %r13d
leaq 0x18(%rsp), %rdi
callq 0x11066
testq %r13, %r13
je 0x11bb8
movq 0x8(%r15), %rsi
movq 0x8(%r13), %rdi
callq 0x20a4a
testb %al, %al
je 0x11bb8
movq (%r13), %rax
cmpw $0x0, 0x16(%rax)
jne 0x11bb8
movq %r12, %rdi
movq %r15, %rsi
callq 0x12340
movq 0x30(%r14), %rdi
movq (%rdi), %rax
movq %r15, %rsi
callq *0xa0(%rax)
leaq 0x8(%rsp), %rdi
callq 0xe40a
decl 0x18(%r14)
leaq 0x8(%rsp), %rdi
callq 0xe446
movq %rbx, %rdi
callq 0x6360
leaq 0x8(%rsp), %rdi
callq 0xdf86
leaq 0x34(%rsp), %rdi
callq 0x12bdc
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x62c0
jmp 0x11bf6
movq %rax, %r14
jmp 0x11c10
movq %rax, %r14
jmp 0x11c1a
movq %rax, %r14
jmp 0x11c08
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x11066
movq %rbx, %rdi
callq 0x6360
leaq 0x8(%rsp), %rdi
callq 0xdf86
leaq 0x34(%rsp), %rdi
callq 0x12bdc
movq %r14, %rdi
callq 0x6680
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/IndexManager.cc
// Function: hlkvds::IndexManager::UpdateIndexesForGC(std::__cxx11::list<hlkvds::KVSlice*, std::allocator<hlkvds::KVSlice*>>&)
void IndexManager::UpdateIndexesForGC(std::list<KVSlice*> &slice_list) {
    std::lock_guard<std::mutex> l(batch_mtx_);
    for (list<KVSlice *>::iterator iter = slice_list.begin(); iter
            != slice_list.end(); iter++) {
        KVSlice *slice = *iter;
        UpdateIndex(slice, true);
    } __DEBUG("UpdateToIndexForGC Success!");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
leaq 0x70(%rdi), %rbx
movq %rbx, %rdi
callq 0x6590
testl %eax, %eax
jne 0x11e85
movq %r14, %r12
movq (%r12), %r12
cmpq %r14, %r12
je 0x11e72
movq 0x10(%r12), %rsi
movq %r15, %rdi
movl $0x1, %edx
callq 0x115cc
jmp 0x11e55
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x6360
movl %eax, %edi
callq 0x62c0
movq %rax, %r14
movq %rbx, %rdi
callq 0x6360
movq %r14, %rdi
callq 0x6680
nop
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/IndexManager.cc
// Function: hlkvds::IndexManager::CalcIndexSizeOnDevice(unsigned int)
uint64_t IndexManager::CalcIndexSizeOnDevice(uint32_t ht_size) {
    uint64_t index_size = sizeof(time_t)
            + sizeof(int) * ht_size
            + IndexManager::SizeOfHashEntryOnDisk() * ht_size;
    uint64_t index_size_pages = index_size / getpagesize();
    return (index_size_pages + 1) * getpagesize();
}

// Assembly:
pushq %rbx
movl %edi, %eax
imulq $0x2e, %rax, %rbx
addq $0x8, %rbx
callq 0x66b0
movslq %eax, %rcx
movq %rbx, %rax
xorl %edx, %edx
divq %rcx
incq %rax
imulq %rcx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/IndexManager.cc
// Function: hlkvds::IndexManager::~IndexManager()
IndexManager::~IndexManager() {
    if (lastTime_) {
        delete lastTime_;
    }
    if (hashtable_) {
        destroyHashTable();
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x40(%rdi), %r14
testq %r14, %r14
je 0x11fc8
movq %r14, %rdi
callq 0x20a7a
movq %r14, %rdi
callq 0x6400
cmpq $0x0, (%rbx)
je 0x11fdd
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x11fe6
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/IndexManager.cc
// Function: hlkvds::IndexManager::CalcHashSizeForPower2(unsigned int)
uint32_t IndexManager::CalcHashSizeForPower2(uint32_t number) {
    // Gets the next highest power of 2 larger than number
    number--;
    number = (number >> 1) | number;
    number = (number >> 2) | number;
    number = (number >> 4) | number;
    number = (number >> 8) | number;
    number = (number >> 16) | number;
    number++;
    return number;
}

// Assembly:
leal -0x1(%rdi), %eax
movl %eax, %ecx
shrl %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x2, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x4, %ecx
orl %eax, %ecx
movl %ecx, %edx
shrl $0x8, %edx
orl %ecx, %edx
movl %edx, %eax
shrl $0x10, %eax
orl %edx, %eax
incl %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/./src/include/LinkedList.h
// Function: hlkvds::LinkedList<hlkvds::HashEntry>::get()
std::vector<T> LinkedList<T>::get() {
    std::vector<T> tempVector;
    if (head_ != NULL) {
        Node<T>* tempNode = head_;
        while (tempNode != NULL) {
            tempVector.push_back(tempNode->data);
            tempNode = tempNode->next;
        }
    }
    return tempVector;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rsi), %r14
testq %r14, %r14
je 0x121e4
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1245e
movq 0x18(%r14), %r14
jmp 0x121ce
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x12202
movq %r14, %rdi
callq 0x6680
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/./src/include/LinkedList.h
// Function: hlkvds::LinkedList<hlkvds::HashEntry>::put(hlkvds::HashEntry&)
bool LinkedList<T>::put(T& toBePuted) {
    bool is_new = true;

    Node<T>* newNode = new Node<T> (toBePuted, NULL);
    if (head_ == NULL) {
        head_ = newNode;
        size_++;
    } else {
        Node<T>* curNode = head_;
        Node<T>* preNode;
        while (curNode != NULL) {
            if (curNode->data == toBePuted) {
                curNode->data = toBePuted;
                is_new = false;
                delete newNode;
                break;
            }
            preNode = curNode;
            curNode = curNode->next;
        }
        if (is_new) {
            curNode = newNode;
            preNode->next = curNode;
            size_++;
        }
    }
    return is_new;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movq %rdi, %r14
movl $0x20, %edi
callq 0x6420
movq %rax, %rbx
movq %rsp, %rdi
movq %r15, %rsi
callq 0x11000
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x11000
movq $0x0, 0x18(%rbx)
movq %rsp, %rdi
callq 0x11066
movq (%r14), %rcx
testq %rcx, %rcx
je 0x122b2
movq %rcx, %r12
movq %rcx, %rdi
movq %r15, %rsi
callq 0x110b6
testb %al, %al
jne 0x122bd
movq 0x18(%r12), %rcx
testq %rcx, %rcx
sete %al
jne 0x12288
movq %rbx, 0x18(%r12)
incl 0x8(%r14)
jmp 0x122da
movq %rbx, (%r14)
incl 0x8(%r14)
movb $0x1, %al
jmp 0x122da
movq %r12, %rdi
movq %r15, %rsi
callq 0x1112a
movq %rbx, %rdi
callq 0x11066
movq %rbx, %rdi
callq 0x6400
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rsp, %rdi
callq 0x11066
jmp 0x122f6
movq %rax, %r14
movq %rbx, %rdi
callq 0x6400
movq %r14, %rdi
callq 0x6680
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/./src/include/IndexManager.h
// Function: hlkvds::HashEntry::LogicStamp::operator<(hlkvds::HashEntry::LogicStamp const&)
bool operator<(const LogicStamp& toBeCopied) {
            if ((segTime_ < toBeCopied.segTime_) || (segTime_
                    == toBeCopied.segTime_ && (keyNo_ < toBeCopied.keyNo_))) {
                return true;
            }
            return false;
        }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x20a2c
movb $0x1, %bl
testb %al, %al
jne 0x12337
movq %r15, %rdi
movq %r14, %rsi
callq 0x20a4a
testb %al, %al
je 0x12335
movl 0x10(%r15), %eax
cmpl 0x10(%r14), %eax
jl 0x12337
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/./src/include/LinkedList.h
// Function: hlkvds::LinkedList<hlkvds::HashEntry>::remove(hlkvds::HashEntry&)
bool LinkedList<T>::remove(T& toBeRemoved) {
    bool flag = false;
    if (head_ == NULL) {
        return flag;
    }

    Node<T>* preNode = head_;
    Node<T>* curNode = preNode->next;

    if (head_->data == toBeRemoved) {
        head_ = curNode;
        delete preNode;
        size_--;
        flag = true;
    } else {
        while (curNode != NULL) {
            if (curNode->data == toBeRemoved) {
                preNode->next = curNode->next;
                delete curNode;
                size_--;
                flag = true;
                break;
            }
            preNode = curNode;
            curNode = curNode->next;
        }
    }
    return flag;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq (%rdi), %r14
testq %r14, %r14
je 0x123c6
movq %rsi, %r15
movq %rdi, %rbx
movq 0x18(%r14), %r12
movq %r14, %rdi
callq 0x110b6
testb %al, %al
je 0x1236c
movq %r12, (%rbx)
jmp 0x123af
testq %r12, %r12
je 0x123c6
movq %r12, %rdi
movq %r15, %rsi
callq 0x110b6
testb %al, %al
je 0x12385
movq %r12, %r13
jmp 0x123a4
movq 0x18(%r12), %r13
testq %r13, %r13
je 0x123c6
movq %r13, %rdi
movq %r15, %rsi
callq 0x110b6
movq %r12, %r14
movq %r13, %r12
testb %al, %al
je 0x12385
movq 0x18(%r13), %rax
movq %rax, 0x18(%r14)
movq %r13, %r14
movq %r14, %rdi
callq 0x11066
movq %r14, %rdi
callq 0x6400
decl 0x8(%rbx)
movb $0x1, %al
jmp 0x123c8
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/./src/include/LinkedList.h
// Function: hlkvds::LinkedList<hlkvds::HashEntry>::removeAll()
void LinkedList<T>::removeAll() {
    Node<T>* tempNode = head_;
    while (tempNode != NULL) {
        tempNode = head_->next;
        delete head_;
        head_ = tempNode;
    }
    size_ = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, (%rdi)
je 0x12420
movq (%rbx), %r14
movq 0x18(%r14), %r15
testq %r14, %r14
je 0x12418
movq %r14, %rdi
callq 0x11066
movq %r14, %rdi
callq 0x6400
movq %r15, (%rbx)
testq %r15, %r15
jne 0x123fc
movl $0x0, 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/KernelDevice.cc
// Function: hlkvds::KernelDevice::set_device_zero()
int KernelDevice::set_device_zero() {
    int r = 0;

    lseek(bufFd_, 0, SEEK_SET);
    r = fill_file_with_zeros();
    if (r < 0) {
        __ERROR("Could not zero out DB file.\n");
        return KD_ERR;
    }

    return KD_OK;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl 0xc(%rdi), %edi
xorl %ebx, %ebx
xorl %esi, %esi
xorl %edx, %edx
callq 0x6700
movq %r14, %rdi
callq 0x127ba
testl %eax, %eax
js 0x127ad
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x7471
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x127a3
nop
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/KernelDevice.cc
// Function: hlkvds::KernelDevice::fill_file_with_zeros()
int KernelDevice::fill_file_with_zeros() {
    size_t nbytes = capacity_;

    static const size_t BLOCKSIZE = 8192;
    char zeros[BLOCKSIZE];
    memset(zeros, 0, BLOCKSIZE);
    while (nbytes > 0) {
        size_t bytes_to_write = min(nbytes, BLOCKSIZE);
        ssize_t ret = write(bufFd_, zeros, bytes_to_write);
        if (ret < 0) {
            __ERROR("error in fill_file_with_zeros write: %s\n", strerror(errno));
            return KD_ERR;
        }
        nbytes -= bytes_to_write;
    }
    return KD_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2008, %rsp           # imm = 0x2008
movq %rdi, %r14
movq 0x10(%rdi), %rbp
movq %rsp, %r15
movl $0x2000, %ebx           # imm = 0x2000
movl $0x2000, %edx           # imm = 0x2000
movq %r15, %rdi
xorl %esi, %esi
callq 0x6260
testq %rbp, %rbp
je 0x12823
cmpq %rbx, %rbp
movl $0x2000, %r13d          # imm = 0x2000
cmovbq %rbp, %r13
movl 0xc(%r14), %edi
movq %r15, %rsi
movq %r13, %rdx
callq 0x6150
movq %rax, %r12
testq %rax, %rax
js 0x1281c
subq %r13, %rbp
testq %r12, %r12
jns 0x127e9
jmp 0x12827
callq 0x74d1
jmp 0x12815
xorl %eax, %eax
jmp 0x1282c
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x2008, %rsp           # imm = 0x2008
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/KernelDevice.cc
// Function: hlkvds::KernelDevice::get_block_device_capacity()
uint64_t KernelDevice::get_block_device_capacity() {
    uint64_t blocksize;
    if (ioctl(bufFd_, BLKGETSIZE64, &blocksize) < 0) {
        __ERROR("Could not get block size: %s\n", strerror(errno));
        return KD_ERR;
    }

    return blocksize;
}

// Assembly:
pushq %rax
movl 0xc(%rdi), %edi
movq %rsp, %rdx
movl $0x80081272, %esi       # imm = 0x80081272
xorl %eax, %eax
callq 0x6550
testl %eax, %eax
js 0x1285b
movq (%rsp), %rax
popq %rcx
retq
callq 0x753f
movq $-0x1, %rax
jmp 0x12859
nop
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/KernelDevice.cc
// Function: hlkvds::KernelDevice::Close()
void KernelDevice::Close() {
    isOpen_ = false;

    if (directFd_ != -1) {
        close(directFd_);
    }
    if (bufFd_ != -1) {
        close(bufFd_);
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movb $0x0, 0x40(%rdi)
movl 0x8(%rdi), %edi
cmpl $-0x1, %edi
je 0x12a15
callq 0x6750
movl 0xc(%rbx), %edi
cmpl $-0x1, %edi
je 0x12a23
popq %rbx
jmp 0x6750
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/KernelDevice.cc
// Function: hlkvds::KernelDevice::pWrite(void const*, unsigned long, long)
ssize_t KernelDevice::pWrite(const void* buf, size_t count, off_t offset) {
    if (IsPageAligned(buf) &&
        IsSectorAligned(count) &&
        IsSectorAligned(offset)) {
        return DirectWriteAligned(buf, count, offset);
    }
    __INFO("Buffered FD Pwrite, write size = %ld, block_size = %d",
            count, GetBlockSize());
    //return pwrite(bufFd_, buf, count, offset);
    ssize_t ret = pwrite(bufFd_, buf, count, offset);
    fsync(bufFd_);
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movq (%rdi), %rax
callq *0x38(%rax)
movslq %eax, %rcx
movq %r12, %rax
xorl %edx, %edx
divq %rcx
testq %rdx, %rdx
jne 0x12aa5
movq (%r14), %rax
movq %r14, %rdi
callq *0x40(%rax)
movslq %eax, %rcx
movq %r15, %rax
xorl %edx, %edx
divq %rcx
testq %rdx, %rdx
jne 0x12aa5
movq (%r14), %rax
movq %r14, %rdi
callq *0x40(%rax)
movslq %eax, %rcx
movq %rbx, %rax
xorl %edx, %edx
divq %rcx
testq %rdx, %rdx
jne 0x12aa5
movl 0x8(%r14), %edi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6100
movq 0x2152c(%rip), %rbp     # 0x33fd8
movq (%rbp), %r13
callq 0x63d0
leaq 0xf714(%rip), %rsi      # 0x221d0
leaq 0x10240(%rip), %rcx     # 0x22d03
leaq 0x100f2(%rip), %r8      # 0x22bbc
movq %r13, %rdi
movq %rax, %rdx
movl $0xaf, %r9d
xorl %eax, %eax
callq 0x6570
movq (%rbp), %r13
movq (%r14), %rax
movq %r14, %rdi
callq *0x40(%rax)
leaq 0x10219(%rip), %rsi     # 0x22d0a
movq %r13, %rdi
movq %r15, %rdx
movl %eax, %ecx
xorl %eax, %eax
callq 0x6570
movq (%rbp), %rsi
movl $0xa, %edi
callq 0x64d0
movl 0xc(%r14), %edi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x6100
movq %rax, %rbx
movl 0xc(%r14), %edi
callq 0x63b0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/KeyDigestHandle.cc
// Function: hlkvds::KeyDigestHandle::CalcDigest(hlkvds::Kvdb_Key const*, hlkvds::Kvdb_Digest&)
void KeyDigestHandle::CalcDigest(const Kvdb_Key *key, Kvdb_Digest &digest)
/*
 * returns RMD(message)
 * message should be a string terminated by '\0'
 */
{
    dword MDbuf[RMDsize / 32]; /* contains (A, B, C, D(, E))   */
    //static byte   hashcode[RMDsize/8]; /* for final hash-value         */
    byte hashcode[RMDsize / 8]; /* for final hash-value         */
    dword X[16]; /* current 16-word chunk        */
    unsigned int i; /* counter                      */
    dword length; /* length in bytes of message   */
    dword nbytes; /* # of bytes not yet processed */

    /* initialize */
    MDinit(MDbuf);

    length = key->GetLen();
    const char* value = key->GetValue();

    /* process message in 16-word chunks */
    for (nbytes = length; nbytes > 63; nbytes -= 64) {
        for (i = 0; i < 16; i++) {
            X[i] = BYTES_TO_DWORD(value);
            value += 4;
        }
        compress_(MDbuf, X);
    } /* length mod 64 bytes left */

    /* finish: */
    MDfinish(MDbuf, (byte *) value, length, 0);

    for (i = 0; i < RMDsize / 8; i += 4) {
        hashcode[i] = MDbuf[i >> 2]; /* implicit cast to byte  */
        hashcode[i + 1] = (MDbuf[i >> 2] >> 8); /*  extracts the 8 least  */
        hashcode[i + 2] = (MDbuf[i >> 2] >> 16); /*  significant bits.     */
        hashcode[i + 3] = (MDbuf[i >> 2] >> 24);
    }

    digest.SetDigest((unsigned char*) hashcode, RMDsize / 8);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x10(%rsp), %rdi
callq 0xa76c
movl 0x8(%r14), %ebp
movq (%r14), %rsi
cmpl $0x40, %ebp
jb 0x12cc8
movq %rbx, 0x8(%rsp)
leaq 0x10(%rsp), %r14
leaq 0x50(%rsp), %r15
movl %ebp, %r13d
movq %rsi, %r12
xorl %ebx, %ebx
movzbl 0x3(%r12,%rbx), %eax
shll $0x18, %eax
movsbl 0x2(%r12,%rbx), %ecx
shll $0x10, %ecx
orl %eax, %ecx
movsbl 0x1(%r12,%rbx), %eax
shll $0x8, %eax
movsbl (%r12,%rbx), %edx
orl %eax, %edx
orl %ecx, %edx
movl %edx, 0x50(%rsp,%rbx)
addq $0x4, %rbx
cmpq $0x40, %rbx
jne 0x12c70
movq %r14, %rdi
movq %r15, %rsi
callq 0xa77e
addl $-0x40, %r13d
leaq (%r12,%rbx), %rsi
cmpl $0x3f, %r13d
ja 0x12c6b
addq %rbx, %r12
movq %r12, %rsi
movq 0x8(%rsp), %rbx
leaq 0x10(%rsp), %rdi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0xba6f
movq $-0x4, %rax
movl 0x14(%rsp,%rax), %ecx
movl %ecx, 0x34(%rsp,%rax)
addq $0x4, %rax
cmpq $0x10, %rax
jb 0x12cdd
movl 0x40(%rsp), %eax
movl %eax, 0x10(%rbx)
movaps 0x30(%rsp), %xmm0
movups %xmm0, (%rbx)
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/KeyDigestHandle.cc
// Function: hlkvds::KeyDigestHandle::Hash(hlkvds::Kvdb_Key const*)
uint32_t KeyDigestHandle::Hash(const Kvdb_Key *key) {
    Kvdb_Digest result;
    CalcDigest(key, result);

    uint32_t hash_value = Hash(&result);

    return hash_value;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x4(%rsp), %r14
movq %r14, %rdi
callq 0x12bc0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x12c2c
leaq 0x4(%rsp), %rdi
movl 0x10(%rdi), %ebx
callq 0x12bdc
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x4(%rsp), %rdi
callq 0x12bdc
movq %rbx, %rdi
callq 0x6680
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/KeyDigestHandle.cc
// Function: hlkvds::KeyDigestHandle::Tostring[abi:cxx11](hlkvds::Kvdb_Digest*)
string KeyDigestHandle::Tostring(Kvdb_Digest *digest) {
    int digest_size = KeyDigestHandle::SizeOfDigest();
    unsigned char *temp = digest->GetDigest();

    int str_len = 2 * digest_size + 1;
    char *res = new char[str_len];
    for (int i = 0; i < digest_size; i++) {
        sprintf(&res[2 * i], "%02x", temp[i]);
    }
    string result = string((const char*) res);
    delete[] res;
    //delete[] temp;
    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movl $0x29, %edi
callq 0x6040
movq %rax, %r14
leaq 0xffe8(%rip), %r12      # 0x22d6f
movq %rax, %r13
xorl %ebp, %ebp
movzbl (%r15,%rbp), %edx
movq %r13, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x60c0
incq %rbp
addq $0x2, %r13
cmpq $0x14, %rbp
jne 0x12d8c
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq %r14, %rdi
callq 0x61a0
movq %r14, %rdx
addq %rax, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa6dc
movq %r14, %rdi
callq 0x64e0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/Kvdb.cc
// Function: hlkvds::DB::OpenDB(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, hlkvds::DB**, hlkvds::Options)
bool DB::OpenDB(string filename, DB** db, Options opts) {
    std::unique_lock<std::mutex> l(db_->mtx_);
    if ( db_->kvds_ == NULL ) {
        db_->kvds_ = KVDS::Open_KVDS(filename.c_str(), opts);
        if (!db_->kvds_) {
            std::cout << "OpenDB failed" << std::endl;
            return false;
        }
    }

    *db = db_;
    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x215a2(%rip), %r12     # 0x34428
movq (%r12), %rax
addq $0x10, %rax
leaq 0x58(%rsp), %r15
movq %rax, (%r15)
movb $0x0, 0x8(%r15)
movq %r15, %rdi
callq 0xe40a
movb $0x1, 0x8(%r15)
movq (%r12), %rax
cmpq $0x0, 0x8(%rax)
jne 0x12ede
leaq 0x90(%rsp), %rsi
movq (%r14), %rax
movl $0xa, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
movq %rax, %rdi
callq 0x13944
movq (%r12), %rcx
movq %rax, 0x8(%rcx)
testq %rax, %rax
je 0x12eff
movq (%r12), %rax
movq %rax, (%rbx)
movb $0x1, %bl
leaq 0x58(%rsp), %rdi
callq 0xdf86
movl %ebx, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x210ca(%rip), %rbx     # 0x33fd0
leaq 0xfe77(%rip), %rsi      # 0x22d84
movl $0xd, %edx
movq %rbx, %rdi
callq 0x6460
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x6410
movsbl %al, %esi
movq 0x21098(%rip), %rdi     # 0x33fd0
callq 0x6050
movq %rax, %rdi
callq 0x62d0
xorl %ebx, %ebx
jmp 0x12ee7
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0xdf86
movq %rbx, %rdi
callq 0x6680
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/Kvdb.cc
// Function: hlkvds::DB::Insert(char const*, unsigned int, char const*, unsigned short, bool)
Status DB::Insert(const char* key, uint32_t key_len, const char* data,
                uint16_t length, bool immediately) {
    Status s = kvds_->Insert(key, key_len, data, length, immediately);
    if (!s.ok()) {
        std::cout << "DB Insert failed" << std::endl;
    }
    return s;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rsi), %rsi
movzbl 0x20(%rsp), %eax
movl %eax, (%rsp)
callq 0x13dfa
cmpl $0x0, (%rbx)
je 0x13059
movq 0x20fb2(%rip), %r14     # 0x33fd0
leaq 0xfd6d(%rip), %rsi      # 0x22d92
movl $0x10, %edx
movq %r14, %rdi
callq 0x6460
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x6410
movsbl %al, %esi
movq %r14, %rdi
callq 0x6050
movq %rax, %rdi
callq 0x62d0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/Kvdb.cc
// Function: hlkvds::DB::Delete(char const*, unsigned int)
Status DB::Delete(const char* key, uint32_t key_len) {
    Status s = kvds_->Delete(key, key_len);
    if (!s.ok()) {
        std::cout << "DB Delete failed" << std::endl;
    }
    return s;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rsi), %rsi
callq 0x13f42
cmpl $0x0, (%rbx)
je 0x130bb
movq 0x20f50(%rip), %r14     # 0x33fd0
leaq 0xfd1c(%rip), %rsi      # 0x22da3
movl $0x10, %edx
movq %r14, %rdi
callq 0x6460
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x6410
movsbl %al, %esi
movq %r14, %rdi
callq 0x6050
movq %rax, %rdi
callq 0x62d0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/Kvdb.cc
// Function: hlkvds::DB::Get(char const*, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
Status DB::Get(const char* key, uint32_t key_len, string &data) {
    Status s = kvds_->Get(key, key_len, data);
    if (!s.ok()) {
        std::cout << "DB Get failed" << std::endl;
    }
    return s;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rsi), %rsi
callq 0x13f66
cmpl $0x0, (%rbx)
je 0x1311d
movq 0x20eee(%rip), %r14     # 0x33fd0
leaq 0xfccb(%rip), %rsi      # 0x22db4
movl $0xd, %edx
movq %r14, %rdi
callq 0x6460
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x6410
movsbl %al, %esi
movq %r14, %rdi
callq 0x6050
movq %rax, %rdi
callq 0x62d0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/KvdbIter.cc
// Function: hlkvds::KvdbIter::SeekToFirst()
void KvdbIter::SeekToFirst() {
    LinkedList<HashEntry> *entry_list;
    hashEntry_ = NULL;
    htSize_ = idxMgr_->GetHashTableSize();
    for (int i = 0; i < htSize_; i++) {
        entry_list = idxMgr_->GetEntryListByNo(i);
        int entry_list_size = entry_list->get_size();
        if (entry_list_size > 0) {
            hashTableCur_ = i;
            entryListCur_ = 0;
            hashEntry_ = entry_list->getByNo(entryListCur_);
            break;
        }
    }

    if (NULL != hashEntry_) {
        valid_ = true;
    } else {
        valid_ = false;
    }

    //status_ = Stats::OK()
}

// Assembly:
movq $0x0, 0x20(%rdi)
movq 0x8(%rdi), %rcx
movslq 0x8(%rcx), %rax
movl %eax, 0x38(%rdi)
testq %rax, %rax
jle 0x131f5
movq (%rcx), %rdx
xorl %ecx, %ecx
movq (%rdx), %rsi
cmpl $0x0, 0x8(%rsi)
jg 0x131e4
incq %rcx
addq $0x30, %rdx
cmpq %rcx, %rax
jne 0x131cd
jmp 0x131f5
movl %ecx, 0x3c(%rdi)
movl $0x0, 0x40(%rdi)
movq (%rsi), %rax
movq %rax, 0x20(%rdi)
cmpq $0x0, 0x20(%rdi)
setne 0x18(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/KvdbIter.cc
// Function: hlkvds::KvdbIter::SeekToLast()
void KvdbIter::SeekToLast() {
    LinkedList<HashEntry> *entry_list;
    hashEntry_ = NULL;
    htSize_ = idxMgr_->GetHashTableSize();
    for (int i = htSize_ - 1; i >= 0; i--) {
        entry_list = idxMgr_->GetEntryListByNo(i);
        int entry_list_size = entry_list->get_size();
        //__INFO("entry_list_size=%d",entry_list_size);
        if (entry_list_size > 0) {
            hashTableCur_ = i;
            entryListCur_ = entry_list_size - 1;
            hashEntry_ = entry_list->getByNo(entryListCur_);
            break;
        }
    }

    if (NULL != hashEntry_) {
        valid_ = true;
    } else {
        valid_ = false;
    }
    //__INFO("hastTableCur_ = %d, entryListCur_ = %d", hashTableCur_, entryListCur_);

}

// Assembly:
movq $0x0, 0x20(%rdi)
movq 0x8(%rdi), %rdx
movl 0x8(%rdx), %ecx
movl %ecx, 0x38(%rdi)
leaq (%rcx,%rcx,2), %rsi
shlq $0x4, %rsi
addq $-0x30, %rsi
testl %ecx, %ecx
jle 0x13250
movq (%rdx), %rax
movq (%rax,%rsi), %r8
movl 0x8(%r8), %eax
decl %ecx
addq $-0x30, %rsi
testl %eax, %eax
jle 0x1321e
movl %ecx, 0x3c(%rdi)
decl %eax
movl %eax, 0x40(%rdi)
movq (%r8), %rcx
je 0x1324c
movq 0x18(%rcx), %rcx
decl %eax
jne 0x13244
movq %rcx, 0x20(%rdi)
cmpq $0x0, 0x20(%rdi)
setne 0x18(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/KvdbIter.cc
// Function: hlkvds::KvdbIter::Seek(char const*)
void KvdbIter::Seek(const char* key) {
    //need hashEntry;
    int key_len = strlen(key);
    KVSlice slice(key, key_len, NULL, 0);
    DataHeader data_header;
    data_header.SetDigest(slice.GetDigest());
    DataHeaderAddress addrs;
    HashEntry entry(data_header, addrs, NULL);
    
    LinkedList<HashEntry> *entry_list;
    hashEntry_ = NULL;
    for (int i = 0; i < htSize_; i++) {
        entry_list = idxMgr_->GetEntryListByNo(i);
        hashEntry_ = entry_list->getRef(entry);
        if (NULL != hashEntry_) {
            hashTableCur_ = i;
            entryListCur_ = entry_list->searchNo(entry);
            break;
        }
    }

    if (NULL != hashEntry_) {
        valid_ = true;
    } else {
        valid_ = false;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x61a0
leaq 0x68(%rsp), %rdi
movq %r14, %rsi
movl %eax, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x1b89e
leaq 0x30(%rsp), %rdi
callq 0x10d0c
movq 0x88(%rsp), %rsi
leaq 0x30(%rsp), %rdi
callq 0x10d68
leaq 0xe(%rsp), %rdx
movw $0x0, (%rdx)
movq $0x0, 0x2(%rdx)
leaq 0x18(%rsp), %rdi
leaq 0x30(%rsp), %rsi
xorl %ecx, %ecx
callq 0x10f8c
movq $0x0, 0x20(%rbx)
cmpl $0x0, 0x38(%rbx)
jle 0x13393
xorl %r13d, %r13d
leaq 0x50(%rsp), %r14
leaq 0x18(%rsp), %r15
movq 0x8(%rbx), %rax
movq (%rax), %rax
leaq (,%r13,2), %rcx
addq %r13, %rcx
shlq $0x4, %rcx
movq (%rax,%rcx), %rbp
movq %r14, %rdi
movq %r15, %rsi
callq 0x11000
movq (%rbp), %r12
testq %r12, %r12
je 0x13332
movq %r12, %rdi
movq %r14, %rsi
callq 0x110b6
testb %al, %al
jne 0x13335
movq 0x18(%r12), %r12
jmp 0x13317
xorl %r12d, %r12d
movq %r12, 0x20(%rbx)
movq %r14, %rdi
callq 0x11066
cmpq $0x0, 0x20(%rbx)
jne 0x13356
incq %r13
movslq 0x38(%rbx), %rax
cmpq %rax, %r13
jl 0x132ee
jmp 0x13393
movl %r13d, 0x3c(%rbx)
movq (%rbp), %r14
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %r14, %r14
je 0x13390
xorl %r12d, %r12d
leaq 0x18(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x110b6
testb %al, %al
jne 0x1338d
incl %r12d
movq 0x18(%r14), %r14
testq %r14, %r14
jne 0x13370
jmp 0x13390
movl %r12d, %ebp
movl %ebp, 0x40(%rbx)
cmpq $0x0, 0x20(%rbx)
setne 0x18(%rbx)
leaq 0x18(%rsp), %rdi
callq 0x11066
leaq 0xe(%rsp), %rdi
callq 0x10d6e
leaq 0x30(%rsp), %rdi
callq 0x10d62
leaq 0x68(%rsp), %rdi
callq 0x1b780
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x13403
movq %rax, %rbx
jmp 0x1340d
movq %rax, %rbx
jmp 0x13417
jmp 0x133e7
movq %rax, %rbx
jmp 0x133f9
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x11066
leaq 0x18(%rsp), %rdi
callq 0x11066
leaq 0xe(%rsp), %rdi
callq 0x10d6e
leaq 0x30(%rsp), %rdi
callq 0x10d62
leaq 0x68(%rsp), %rdi
callq 0x1b780
movq %rbx, %rdi
callq 0x6680
nop
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/KvdbIter.cc
// Function: hlkvds::KvdbIter::Next()
void KvdbIter::Next() {
    LinkedList<HashEntry> *entry_list;
    entry_list = idxMgr_->GetEntryListByNo(hashTableCur_);
    hashEntry_ = NULL;
    int entry_list_size = entry_list->get_size();
    if ( entryListCur_ < entry_list_size - 1) {
        entryListCur_++;
        hashEntry_ = entry_list->getByNo(entryListCur_);
    } else {
        hashTableCur_++;
        while (hashTableCur_ < htSize_) {
            entry_list = idxMgr_->GetEntryListByNo(hashTableCur_);
            entry_list_size = entry_list->get_size();
            if (entry_list_size  > 0) {
                entryListCur_ = 0;
                hashEntry_ = entry_list->getByNo(entryListCur_);
                break;
            }
            hashTableCur_++;
        }
    }

    if (NULL != hashEntry_) {
        valid_ = true;
    } else {
        valid_ = false;
    }
    //__INFO("hastTableCur_ = %d, entryListCur_ = %d", hashTableCur_, entryListCur_);
}

// Assembly:
movq 0x8(%rdi), %rax
movl 0x3c(%rdi), %ecx
movq (%rax), %rax
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movq (%rax,%rcx), %rdx
movq $0x0, 0x20(%rdi)
movl 0x8(%rdx), %esi
movl 0x40(%rdi), %r8d
leal -0x1(%rsi), %ecx
cmpl %ecx, %r8d
jge 0x13474
leal 0x1(%r8), %ecx
movl %ecx, 0x40(%rdi)
cmpl %r8d, %esi
jle 0x134b2
movq (%rdx), %rax
testl %ecx, %ecx
je 0x134b4
movq 0x18(%rax), %rax
decl %ecx
jne 0x1346a
jmp 0x134b4
movl 0x38(%rdi), %edx
movl 0x3c(%rdi), %ecx
leal 0x1(%rcx), %esi
cmpl %esi, %edx
cmovgl %edx, %esi
incl %ecx
cmpl %edx, %ecx
jge 0x134ad
movl %ecx, %r8d
leaq (%r8,%r8,2), %r8
shlq $0x4, %r8
movq (%rax,%r8), %r8
cmpl $0x0, 0x8(%r8)
jle 0x13482
movl %ecx, 0x3c(%rdi)
movl $0x0, 0x40(%rdi)
movq (%r8), %rax
jmp 0x134b4
movl %esi, 0x3c(%rdi)
jmp 0x134b8
xorl %eax, %eax
movq %rax, 0x20(%rdi)
cmpq $0x0, 0x20(%rdi)
setne 0x18(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/KvdbIter.cc
// Function: hlkvds::KvdbIter::Prev()
void KvdbIter::Prev() {
    LinkedList<HashEntry> *entry_list;
    entry_list = idxMgr_->GetEntryListByNo(hashTableCur_);
    hashEntry_ = NULL;
    int entry_list_size = entry_list->get_size();
    if (entryListCur_ > 0) {
        entryListCur_--;
        hashEntry_ = entry_list->getByNo(entryListCur_);
    } else {
        hashTableCur_--;
        while (hashTableCur_ >= 0) {
            entry_list = idxMgr_->GetEntryListByNo(hashTableCur_);
            entry_list_size = entry_list->get_size();
            if ( entry_list_size > 0) {
                entryListCur_ = entry_list_size - 1;
                hashEntry_ = entry_list->getByNo(entryListCur_);
                break;
            }
            hashTableCur_--;
        }
    }

    if (NULL != hashEntry_) {
        valid_ = true;
    } else {
        valid_ = false;
    }
    //__INFO("hastTableCur_ = %d, entryListCur_ = %d", hashTableCur_, entryListCur_);
}

// Assembly:
movq 0x8(%rdi), %rax
movl 0x3c(%rdi), %edx
movq (%rax), %rcx
leaq (%rdx,%rdx,2), %rax
shlq $0x4, %rax
movq (%rcx,%rax), %rdx
movq $0x0, 0x20(%rdi)
movl 0x40(%rdi), %eax
testl %eax, %eax
jle 0x134f5
decl %eax
movl %eax, 0x40(%rdi)
cmpl %eax, 0x8(%rdx)
jge 0x13536
xorl %ecx, %ecx
jmp 0x13545
movl 0x3c(%rdi), %eax
leaq (%rax,%rax,2), %rdx
shlq $0x4, %rdx
addq %rcx, %rdx
addq $-0x30, %rdx
testl %eax, %eax
jle 0x1354b
movq (%rdx), %rsi
movl 0x8(%rsi), %ecx
decl %eax
addq $-0x30, %rdx
testl %ecx, %ecx
jle 0x13507
movl %eax, 0x3c(%rdi)
decl %ecx
movl %ecx, 0x40(%rdi)
movq (%rsi), %rax
je 0x13530
movq 0x18(%rax), %rax
decl %ecx
jne 0x13528
movq %rax, 0x20(%rdi)
jmp 0x13550
movq (%rdx), %rcx
testl %eax, %eax
je 0x13545
movq 0x18(%rcx), %rcx
decl %eax
jne 0x1353d
movq %rcx, 0x20(%rdi)
jmp 0x13550
decl %eax
movl %eax, 0x3c(%rdi)
cmpq $0x0, 0x20(%rdi)
setne 0x18(%rdi)
retq