LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/yangwanyuan[P]HLKVDS/src/DS_MultiVolume_Impl.cc
// Function: hlkvds::DS_MultiVolume_Impl::ReqMerge(hlkvds::Request*)
void DS_MultiVolume_Impl::ReqMerge(Request* req) {
    int shard_id = req->GetShardsWQId();

    std::unique_lock<std::mutex> lck_seg_map(segMapMtx_, std::defer_lock);

    std::mutex *seg_mtx = segMtxVec_[shard_id];
    std::unique_lock<std::mutex> lck_seg(*seg_mtx);

    lck_seg_map.lock();
    SegForReq *seg = segMap_[shard_id];
    lck_seg_map.unlock();

    if (seg->TryPut(req)) {
        seg->Put(req);
    } else {
        seg->Completion();
        segWteWQ_->Add_task(seg);

        int vol_id = pickVol();
        seg = new SegForReq(volMap_[vol_id], idxMgr_, options_.expired_time);

        lck_seg_map.lock();
        std::map<int, SegForReq*>::iterator iter = segMap_.find(shard_id);
        segMap_.erase(iter);
        segMap_.insert( make_pair(shard_id, seg) );
        lck_seg_map.unlock();

        seg->Put(req);
    }

}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r15
movslq 0x70(%rsi), %rax
movl %eax, 0xc(%rsp)
leaq 0x60(%rdi), %rcx
movq %rcx, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
movq 0xb8(%rdi), %rcx
movq (%rcx,%rax,8), %rsi
leaq 0x28(%rsp), %rdi
callq 0xaf4e
leaq 0x10(%rsp), %rdi
callq 0xb49c
leaq 0x88(%r15), %r14
leaq 0xc(%rsp), %rsi
movq %r14, %rdi
callq 0xb444
movq (%rax), %r12
leaq 0x10(%rsp), %rdi
callq 0xb4c6
movq %r12, %rdi
movq %rbx, %rsi
callq 0x19152
testb %al, %al
je 0xad42
movq %r12, %rdi
movq %rbx, %rsi
callq 0x19164
jmp 0xade4
movq %r12, %rdi
callq 0x191b2
movq 0x158(%r15), %rdi
movq %r12, %rsi
callq 0xb4ec
movq %r15, %rdi
callq 0x9292
movl %eax, 0x24(%rsp)
movl $0xd8, %edi
callq 0x6410
movq %rax, %r12
leaq 0x28(%r15), %rdi
leaq 0x24(%rsp), %rsi
callq 0xaf64
movq (%rax), %rsi
movq 0x8(%r15), %rax
movq 0x20(%r15), %rdx
movl 0x10(%rax), %ecx
movq %r12, %rdi
callq 0x190a0
leaq 0x10(%rsp), %rdi
callq 0xb49c
leaq 0xc(%rsp), %rsi
movq %r14, %rdi
callq 0xd420
movq %r14, %rdi
movq %rax, %rsi
callq 0xd454
movl 0xc(%rsp), %eax
leaq 0x38(%rsp), %rsi
movl %eax, (%rsi)
movq %r12, 0x8(%rsi)
movq %r14, %rdi
callq 0xbf28
leaq 0x10(%rsp), %rdi
callq 0xb4c6
movq %r12, %rdi
movq %rbx, %rsi
callq 0x19164
leaq 0x28(%rsp), %rdi
callq 0xafd0
leaq 0x10(%rsp), %rdi
callq 0xafd0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0xae1e
movq %rax, %rbx
movq %r12, %rdi
callq 0x63f0
jmp 0xae21
jmp 0xae1e
movq %rax, %rbx
jmp 0xae2b
jmp 0xae1e
jmp 0xae1e
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xafd0
leaq 0x10(%rsp), %rdi
callq 0xafd0
movq %rbx, %rdi
callq 0x6680
nop
// File: /workspace/github_cpp_makefile_star2_O2/yangwanyuan[P]HLKVDS/src/DS_MultiVolume_Impl.cc
// Function: hlkvds::DS_MultiVolume_Impl::SegWrite(hlkvds::SegForReq*)
void DS_MultiVolume_Impl::SegWrite(SegForReq *seg) {
    Volume *vol =  seg->GetSelfVolume();

    uint32_t seg_id = 0;
    bool res;
    while (!vol->Alloc(seg_id)) {
        res = vol->ForeGC();
        if (!res) {
            __ERROR("Cann't get a new Empty Segment.\n");
            seg->Notify(res);
        }
    }
    uint32_t free_size = seg->GetFreeSize();
    seg->SetSegId(seg_id);
    res = seg->WriteSegToDevice();
    if (res) {
        vol->Use(seg_id, free_size);
    } else {
        vol->FreeForFailed(seg_id);
    }
    seg->Notify(res);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x8(%rsi), %r14
leaq 0x4(%rsp), %r15
andl $0x0, (%r15)
movq 0x27178(%rip), %rbp     # 0x31fd8
pushq $0xa
popq %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0x1dde4
testb %al, %al
jne 0xaede
movq %r14, %rdi
callq 0x1df8c
testb %al, %al
jne 0xae64
movq (%rbp), %r13
callq 0x63c0
movq %r13, %rdi
leaq 0x14413(%rip), %rsi     # 0x1f2a5
movq %rax, %rdx
leaq 0x1485b(%rip), %rcx     # 0x1f6f7
leaq 0x144bd(%rip), %r8      # 0x1f360
movl $0x2a7, %r9d            # imm = 0x2A7
xorl %eax, %eax
callq 0x6580
movq (%rbp), %rcx
leaq 0x1461b(%rip), %rdi     # 0x1f4d6
pushq $0x20
popq %rsi
pushq $0x1
popq %rdx
callq 0x6750
movq (%rbp), %rsi
movl %r12d, %edi
callq 0x64b0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x191be
jmp 0xae64
movl 0x14(%rbx), %r12d
movl 0x18(%rbx), %r15d
movl 0x4(%rsp), %eax
movl %eax, (%rbx)
movq %rbx, %rdi
callq 0x18a22
movl %eax, %ebp
testb %al, %al
je 0xaf0e
subl %r12d, %r15d
movl 0x4(%rsp), %esi
movq %r14, %rdi
movl %r15d, %edx
callq 0x1df82
jmp 0xaf1a
movl 0x4(%rsp), %esi
movq %r14, %rdi
callq 0x1df6e
movzbl %bpl, %esi
movq %rbx, %rdi
callq 0x191be
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/yangwanyuan[P]HLKVDS/./src/include/WorkQueue.h
// Function: dslab::WorkQueue<hlkvds::Request>::Stop()
void Stop() {
        stop_.store(true);
        cv_.notify_all();
        for (auto &t : threads_) {
            t.join();
        }
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movb $0x1, %al
xchgb %al, 0xcc(%rdi)
addq $0x80, %rdi
callq 0x6650
movq 0xb0(%r14), %rbx
movq 0xb8(%r14), %r14
cmpq %r14, %rbx
je 0xb2aa
movq %rbx, %rdi
callq 0x6660
addq $0x8, %rbx
jmp 0xb297
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/yangwanyuan[P]HLKVDS/./src/include/WorkQueue.h
// Function: dslab::WorkQueue<hlkvds::Request>::worker()
void worker()
    {
        while(1) {
            std::unique_lock<std::mutex> lck(mtx_, std::defer_lock);
            lck.lock();
            cv_.wait_for(lck, std::chrono::milliseconds(1000), [this] {return !dataQueue_.empty();});

            if (this->stop_.load() && this->dataQueue_.empty()) {
                lck.unlock();
                return;
            }
                
            if  (!this->dataQueue_.empty()) {
                T* data = dataQueue_.front();
                dataQueue_.pop();
                lck.unlock();
                _void_process(data);
            }
            else {
                lck.unlock();
            }
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x58(%rdi), %r13
leaq 0x80(%rdi), %r14
leaq 0x8(%rdi), %r15
movq %rsp, %r12
movq %r13, (%rsp)
movb $0x0, 0x8(%rsp)
movq %r12, %rdi
callq 0xb49c
movq $0x3e8, 0x10(%rsp)      # imm = 0x3E8
movq %r14, %rdi
movq %r12, %rsi
leaq 0x10(%rsp), %rdx
movq %rbx, %rcx
callq 0xc504
movb 0xcc(%rbx), %dl
movq 0x18(%rbx), %rax
movq 0x38(%rbx), %rcx
cmpq %rax, %rcx
sete %sil
andb %dl, %sil
cmpb $0x1, %sil
je 0xc291
cmpq %rax, %rcx
je 0xc27c
movq (%rax), %rbp
movq %r15, %rdi
callq 0xc5f2
movq %r12, %rdi
callq 0xb4c6
movq (%rbx), %rax
movq %rbx, %rdi
movq %rbp, %rsi
callq *0x10(%rax)
jmp 0xc284
movq %r12, %rdi
callq 0xb4c6
movq %r12, %rdi
callq 0xafd0
jmp 0xc20b
movq %rsp, %rdi
callq 0xb4c6
movq %rsp, %rdi
callq 0xafd0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xc2b6
jmp 0xc2b6
jmp 0xc2b6
movq %rax, %rbx
movq %rsp, %rdi
callq 0xafd0
movq %rbx, %rdi
callq 0x6680
nop
// File: /workspace/github_cpp_makefile_star2_O2/yangwanyuan[P]HLKVDS/src/DataStor.cc
// Function: hlkvds::DataStor::Create(hlkvds::Options&, std::vector<hlkvds::BlockDevice*, std::allocator<hlkvds::BlockDevice*>>&, hlkvds::SuperBlockManager*, hlkvds::IndexManager*, int)
DataStor* DataStor::Create(Options &opts, std::vector<BlockDevice*> &dev_vec, SuperBlockManager* sb, IndexManager* idx, int datastor_type) {

    switch (datastor_type) {
        case 0:
            return new DS_MultiVolume_Impl(opts, dev_vec, sb, idx);
        case 1:
            return new DS_MultiTier_Impl(opts, dev_vec, sb, idx);
        default:
            __ERROR("UnKnow DataStor Type!");
            return NULL;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
cmpl $0x1, %r8d
je 0xd4e3
testl %r8d, %r8d
jne 0xd50f
movl $0x170, %edi            # imm = 0x170
callq 0x6410
movq %rax, %rbx
movq %rax, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %r14, %r8
callq 0x8e50
jmp 0xd502
pushq $0x48
popq %rdi
callq 0x6410
movq %rax, %rbx
movq %rax, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %r14, %r8
callq 0x870c
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x24ac2(%rip), %r15     # 0x31fd8
movq (%r15), %r14
callq 0x63c0
leaq 0x11d80(%rip), %rsi     # 0x1f2a5
leaq 0x12438(%rip), %rcx     # 0x1f964
leaq 0x12438(%rip), %r8      # 0x1f96b
xorl %ebx, %ebx
pushq $0xf
popq %r9
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x6580
movq (%r15), %rcx
leaq 0x1242b(%rip), %rdi     # 0x1f97b
pushq $0x15
popq %rsi
pushq $0x1
popq %rdx
callq 0x6750
movq (%r15), %rsi
pushq $0xa
popq %rdi
callq 0x64b0
jmp 0xd502
jmp 0xd56a
movq %rax, %r14
movq %rbx, %rdi
callq 0x63f0
movq %r14, %rdi
callq 0x6680
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/yangwanyuan[P]HLKVDS/src/GcManager.cc
// Function: hlkvds::GcManager::ForeGC()
bool GcManager::ForeGC() {
    std::lock_guard < std::mutex > lck_gc(gcMtx_);
    //check free segment;
    uint32_t free_seg_num = vol_->GetTotalFreeSegs();
    if (free_seg_num > SEG_RESERVED_FOR_GC) {
        __DEBUG("some thread already called doForeGC, ignore this call!");
        return true;
    }

    free_seg_num = 0;
    __DEBUG("Begin Fore GC !");
    while (!free_seg_num) {
        std::multimap < uint32_t, uint32_t > cands_map;
        vol_->SortSegsByUtils(cands_map, options_.seg_full_rate);
        if (cands_map.empty()) {
            break;
        }
        free_seg_num = doMerge(cands_map);
        cands_map.clear();
        __DEBUG("Once merge total free %d segments!", free_seg_num);
    }
    return free_seg_num ? true : false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %r14
leaq 0x18(%rdi), %rbx
movq %rbx, %rdi
callq 0xbc3a
movq (%r14), %rdi
callq 0x1df3c
movb $0x1, %bpl
cmpl $0x2, %eax
ja 0xd664
xorl %ebp, %ebp
leaq 0x10(%rsp), %r12
leaq 0x8(%rsp), %r15
testl %ebp, %ebp
jne 0xd65e
andl $0x0, 0x10(%rsp)
andq $0x0, 0x18(%rsp)
movq %r12, 0x20(%rsp)
movq %r12, 0x28(%rsp)
andq $0x0, 0x30(%rsp)
movq (%r14), %rdi
movq 0x10(%r14), %rax
movsd 0x20(%rax), %xmm0
movq %r15, %rsi
callq 0x1df50
movq 0x30(%rsp), %r13
testq %r13, %r13
je 0xd64f
movq %r14, %rdi
movq %r15, %rsi
callq 0xd6a0
movl %eax, %ebp
movq %r15, %rdi
callq 0xe0ec
jmp 0xd651
xorl %ebp, %ebp
movq %r15, %rdi
callq 0xe080
testq %r13, %r13
jne 0xd5fb
testl %ebp, %ebp
setne %bpl
movq %rbx, %rdi
callq 0x6340
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0xd68f
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0xe080
movq %rbx, %rdi
callq 0x6340
movq %r14, %rdi
callq 0x6680
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0xdd5f
movl %esi, %r15d
movb 0x40(%rdi), %cl
shlq %cl, %r15
movl 0x38(%rdi), %edx
movq 0x40(%r14), %rsi
movq %r15, %rcx
callq 0x1de02
movl %eax, %ebp
testb %al, %al
je 0xddb0
movq %rsp, %r12
movq %r12, %rdi
callq 0x182ec
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 0xde22
movq %rsp, %rdi
callq 0x182f8
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x182f8
movq %rbx, %rdi
callq 0x6680
// File: /workspace/github_cpp_makefile_star2_O2/yangwanyuan[P]HLKVDS/src/GcManager.cc
// Function: hlkvds::GcManager::cleanKvList(std::__cxx11::list<hlkvds::KVSlice*, std::allocator<hlkvds::KVSlice*>>&)
void GcManager::cleanKvList(std::list<KVSlice*> &slice_list) {
    while (!slice_list.empty()) {
        KVSlice *slice = slice_list.front();
        slice_list.pop_front();
        const char* key = slice->GetKey();
        delete[] key;
        const char* data = slice->GetData();
        delete[] data;
        delete slice;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rbx), %rax
cmpq %rbx, %rax
je 0xde1a
movq 0x10(%rax), %r14
movq %rbx, %rdi
callq 0xe078
movq (%r14), %rdi
testq %rdi, %rdi
je 0xddfa
callq 0x64c0
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0xde08
callq 0x64c0
movq %r14, %rdi
callq 0x1835a
movq %r14, %rdi
callq 0x63f0
jmp 0xddd9
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
andq $0x0, 0x10(%rdi)
movq (%rdi), %r14
testq %r14, %r14
je 0xe65a
movq %r14, %rdi
callq 0xe434
movq %r14, %rdi
callq 0x63f0
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
je 0xe67a
movq %rbx, %rdi
callq 0x1db90
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x63f0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rsi
movq (%rdi), %rdi
callq 0xe44a
movq 0x8(%rbx), %rsi
movq 0x8(%r14), %rdi
callq 0xf61e
movq 0x10(%rbx), %rax
movq %rax, 0x10(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 $0x18, %rsp
movq %rdx, %rbx
movq 0x10(%rdi), %r13
cmpq %rdx, %r13
jne 0xe9b0
movq %rsi, %r14
movq %rdi, %r15
movq 0x40(%rdi), %rdi
callq 0x1db02
movq 0x40(%r15), %rdi
callq 0x1daf6
movq %rax, (%r14)
addq $0x8, %r14
xorl %ecx, %ecx
xorl %edx, %edx
movl 0x8(%r15), %eax
cmpq %rax, %rdx
jae 0xe946
movq (%r15), %rax
movq (%rax,%rcx), %rax
movl 0x8(%rax), %eax
movl %eax, (%r14)
addq $0x4, %r14
incq %rdx
addq $0x30, %rcx
jmp 0xe923
xorl %ebp, %ebp
movq %rsp, %r12
movl %eax, %ecx
cmpq %rcx, %rbp
jae 0xe9b0
movq (%r15), %rcx
imulq $0x30, %rbp, %rdx
movq (%rcx,%rdx), %rsi
cmpl $0x0, 0x8(%rsi)
jle 0xe9ab
movq %r12, %rdi
callq 0xf654
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
cmpq %rcx, %rax
je 0xe99f
movq (%rax), %rdx
movups (%rdx), %xmm0
movups 0x10(%rdx), %xmm1
movups 0x1a(%rdx), %xmm2
movups %xmm2, 0x1a(%r14)
movups %xmm1, 0x10(%r14)
movups %xmm0, (%r14)
addq $0x2a, %r14
addq $0x18, %rax
jmp 0xe974
movq %r12, %rdi
callq 0xf6a2
movl 0x8(%r15), %eax
incq %rbp
jmp 0xe94b
cmpq %rbx, %r13
sete %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
leaq 0x1c(%rsp), %rbx
movq %rbx, %rdi
callq 0xf60c
movq %rbx, %rdi
callq 0x103a8
xorl %edx, %edx
divl 0x8(%r15)
movq (%r15), %rax
imulq $0x30, %rdx, %r12
leaq (%rax,%r12), %rbx
addq $0x8, %rbx
movq %rbx, %rdi
callq 0xbc3a
movq (%r15), %rax
movq (%rax,%r12), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xf786
testb %al, %al
je 0xef85
movq %rsp, %rdi
movq %r14, %rsi
callq 0xe5d4
movq %rsp, %rsi
movq %r15, %rdi
callq 0xf7b6
movq %rax, %r15
movq %rsp, %rdi
callq 0xe636
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 0xef87
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x6340
leaq 0x1c(%rsp), %rdi
callq 0x10252
movl %ebp, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rsp, %rdi
callq 0xe636
jmp 0xefba
jmp 0xefb7
movq %rax, %r14
movq %rbx, %rdi
callq 0x6340
jmp 0xefc9
jmp 0xefc6
movq %rax, %r14
leaq 0x1c(%rsp), %rdi
callq 0x10252
movq %r14, %rdi
callq 0x6680
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0xbc3a
movq %r14, %r12
movq (%r12), %r12
cmpq %r14, %r12
je 0xf013
movq 0x10(%r12), %rsi
movq %r15, %rdi
xorl %edx, %edx
callq 0xebc6
jmp 0xeff9
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x6340
movq %rax, %r14
movq %rbx, %rdi
callq 0x6340
movq %r14, %rdi
callq 0x6680
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r15
movq %rdi, %r14
leaq 0x2c(%rsp), %rbx
movq %rbx, %rdi
callq 0xf60c
movq %rbx, %rdi
callq 0x103a8
xorl %edx, %edx
divl 0x8(%r14)
leaq 0x48(%r14), %rax
movq %rax, (%rsp)
movb $0x0, 0x8(%rsp)
movq (%r14), %rax
imulq $0x30, %rdx, %r12
leaq (%rax,%r12), %rbx
addq $0x8, %rbx
movq %rbx, %rdi
callq 0xbc3a
movq (%r14), %rax
movq (%rax,%r12), %r12
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0xe5d4
leaq 0x10(%rsp), %rsi
movq %r12, %rdi
callq 0xf7b6
movq %rax, %r13
leaq 0x10(%rsp), %rdi
callq 0xe636
testq %r13, %r13
je 0xf10a
movq 0x8(%r15), %rsi
movq 0x8(%r13), %rdi
callq 0x1db60
testb %al, %al
je 0xf10a
movq (%r13), %rax
cmpw $0x0, 0x16(%rax)
jne 0xf10a
movq %r12, %rdi
movq %r15, %rsi
callq 0xf822
movq 0x30(%r14), %rdi
movq (%rdi), %rax
movq %r15, %rsi
callq *0xa0(%rax)
movq %rsp, %rdi
callq 0xb49c
decl 0x18(%r14)
movq %rsp, %rdi
callq 0xb4c6
movq %rbx, %rdi
callq 0x6340
movq %rsp, %rdi
callq 0xafd0
leaq 0x2c(%rsp), %rdi
callq 0x10252
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0xe636
jmp 0xf150
jmp 0xf14d
movq %rax, %r14
jmp 0xf158
movq %rax, %r14
jmp 0xf160
movq %rax, %r14
movq %rbx, %rdi
callq 0x6340
movq %rsp, %rdi
callq 0xafd0
leaq 0x2c(%rsp), %rdi
callq 0x10252
movq %r14, %rdi
callq 0x6680
// File: /workspace/github_cpp_makefile_star2_O2/yangwanyuan[P]HLKVDS/src/IndexManager.cc
// Function: hlkvds::IndexManager::GetHashEntry(hlkvds::KVSlice*)
bool IndexManager::GetHashEntry(KVSlice *slice) {
    const Kvdb_Digest *digest = &slice->GetDigest();
    uint32_t hash_index = KeyDigestHandle::Hash(digest) % htSize_;
    HashEntry entry;
    entry.SetKeyDigest(*digest);

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

    if (entry_list->search(entry)) {
        vector<HashEntry> tmp_vec = entry_list->get();
        for (vector<HashEntry>::iterator iter = tmp_vec.begin(); iter!=tmp_vec.end(); iter++) {
            if (iter->GetKeyDigest() == *digest) {
                entry = *iter;
                slice->SetHashEntry(&entry);
                __DEBUG("IndexManger: entry : header_offset = %lu, data_offset = %u, next_header=%u",
                        entry.GetHeaderOffset(), entry.GetDataOffsetInSeg(),
                        entry.GetNextHeadOffsetInSeg());
                return true;
            }
        }
    }
    return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %r12
movq 0x20(%rsi), %r15
movq %r15, %rdi
callq 0x103a8
movl %eax, %ebx
movl 0x8(%r12), %ebp
leaq 0x18(%rsp), %r13
movq %r13, %rdi
callq 0xe47c
movq (%r13), %rdi
movq %r15, %rsi
callq 0x10254
movl %ebx, %eax
xorl %edx, %edx
divl %ebp
movq (%r12), %rax
imulq $0x30, %rdx, %r13
leaq (%rax,%r13), %rbx
addq $0x8, %rbx
movq %rbx, %rdi
callq 0xbc3a
movq (%r12), %rax
movq (%rax,%r13), %r12
leaq 0x18(%rsp), %rsi
movq %r12, %rdi
callq 0xf786
testb %al, %al
je 0xf237
movq %rsp, %rdi
movq %r12, %rsi
callq 0xf654
movq (%rsp), %r12
leaq 0x34(%rsp), %r13
cmpq 0x8(%rsp), %r12
je 0xf22f
movq %r13, %rdi
movq %r12, %rsi
callq 0xf60c
movq %r13, %rdi
movq %r15, %rsi
callq 0x10264
movl %eax, %ebp
movq %r13, %rdi
callq 0x10252
testb %bpl, %bpl
jne 0xf23b
addq $0x18, %r12
jmp 0xf1fd
movq %rsp, %rdi
callq 0xf6a2
xorl %ebp, %ebp
jmp 0xf260
leaq 0x18(%rsp), %rdi
movq %r12, %rsi
callq 0xe6f6
leaq 0x18(%rsp), %rsi
movq %r14, %rdi
callq 0x1867e
movq %rsp, %rdi
callq 0xf6a2
movb $0x1, %bpl
movq %rbx, %rdi
callq 0x6340
leaq 0x18(%rsp), %rdi
callq 0xe636
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xf2a2
jmp 0xf287
movq %rax, %r14
jmp 0xf2ad
jmp 0xf28e
movq %rax, %r14
jmp 0xf2b5
movq %rax, %r14
leaq 0x34(%rsp), %rdi
callq 0x10252
jmp 0xf2a5
movq %rax, %r14
movq %rsp, %rdi
callq 0xf6a2
movq %rbx, %rdi
callq 0x6340
leaq 0x18(%rsp), %rdi
callq 0xe636
movq %r14, %rdi
callq 0x6680
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x70(%rdi), %rbx
movq %rbx, %rdi
callq 0xbc3a
pushq $0x1
popq %rbp
movq %r14, %r12
movq (%r12), %r12
cmpq %r14, %r12
je 0xf302
movq 0x10(%r12), %rsi
movq %r15, %rdi
movl %ebp, %edx
callq 0xebc6
jmp 0xf2e8
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x6340
movq %rax, %r14
movq %rbx, %rdi
callq 0x6340
movq %r14, %rdi
callq 0x6680
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0xf43a
movq %r14, %rdi
callq 0x1db90
movq %r14, %rdi
callq 0x63f0
cmpq $0x0, (%rbx)
je 0xf44f
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xf458
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
andq $0x0, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq (%rsi), %r14
testq %r14, %r14
je 0xf684
testq %r14, %r14
je 0xf684
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf960
movq 0x18(%r14), %r14
jmp 0xf66e
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0xf6a2
movq %r14, %rdi
callq 0x6680
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $0x20
popq %rdi
callq 0x6410
movq %rax, %rbx
movq %rsp, %rdi
movq %r15, %rsi
callq 0xe5d4
movq %rsp, %rsi
movq %rbx, %rdi
callq 0xe5d4
andq $0x0, 0x18(%rbx)
movq %rsp, %rdi
callq 0xe636
movq (%r14), %rax
testq %rax, %rax
je 0xf72c
testq %rax, %rax
je 0xf731
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
callq 0xe682
testb %al, %al
jne 0xf73d
movq 0x18(%r12), %rax
movq %r12, %rcx
jmp 0xf70b
movq %rbx, (%r14)
jmp 0xf735
movq %rbx, 0x18(%rcx)
incl 0x8(%r14)
movb $0x1, %al
jmp 0xf75a
movq %r12, %rdi
movq %r15, %rsi
callq 0xe6f6
movq %rbx, %rdi
callq 0xe636
movq %rbx, %rdi
callq 0x63f0
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rsp, %rdi
callq 0xe636
jmp 0xf776
movq %rax, %r14
movq %rbx, %rdi
callq 0x63f0
movq %r14, %rdi
callq 0x6680
// File: /workspace/github_cpp_makefile_star2_O2/yangwanyuan[P]HLKVDS/./src/include/LinkedList.h
// Function: hlkvds::LinkedList<hlkvds::HashEntry>::search(hlkvds::HashEntry&)
bool LinkedList<T>::search(T& toBeSearched) {
    Node<T>* curNode = head_;

    while (curNode != NULL) {
        if (curNode->data == toBeSearched) {
            return true;
        }
        curNode = curNode->next;
    }
    return false;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rdi), %r14
testq %r14, %r14
je 0xf7a8
movq %r14, %rdi
movq %rbx, %rsi
callq 0xe682
leaq 0x18(%r14), %rdi
testb %al, %al
je 0xf78d
testq %r14, %r14
setne %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/yangwanyuan[P]HLKVDS/./src/include/LinkedList.h
// Function: hlkvds::LinkedList<hlkvds::HashEntry>::getRef(hlkvds::HashEntry)
T* LinkedList<T>::getRef(T toBeGeted) {

    Node<T>* tempNode = head_;

    while (tempNode != NULL) {
        if (tempNode->data == toBeGeted) {
            return &tempNode->data;
        }
        tempNode = tempNode->next;

    }
    return NULL;

}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rbx), %rbx
testq %rbx, %rbx
je 0xf7dd
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe682
testb %al, %al
jne 0xf7dd
addq $0x18, %rbx
jmp 0xf7c0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x1db42
movb $0x1, %bl
testb %al, %al
jne 0xf819
movq %r15, %rdi
movq %r14, %rsi
callq 0x1db60
testb %al, %al
je 0xf817
movl 0x10(%r15), %eax
cmpl 0x10(%r14), %eax
jl 0xf819
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %r15
testq %r15, %r15
je 0xf88f
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%r15), %r13
movq %r15, %rdi
callq 0xe682
testb %al, %al
je 0xf850
movq %r13, (%rbx)
jmp 0xf878
testq %r13, %r13
je 0xf88f
movq %r13, %r12
movq %r15, %rbp
movq %r13, %rdi
movq %r14, %rsi
callq 0xe682
movq 0x18(%r13), %r13
movq %r12, %r15
testb %al, %al
je 0xf850
movq %r13, 0x18(%rbp)
movq %r12, %r15
movq %r15, %rdi
callq 0xe636
movq %r15, %rdi
callq 0x63f0
decl 0x8(%rbx)
movb $0x1, %al
jmp 0xf891
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
movq (%rdi), %r14
testq %r14, %r14
je 0xf93e
movq 0x18(%r14), %r15
movq %r14, %rdi
callq 0xe636
movq %r14, %rdi
callq 0x63f0
movq %r15, (%rbx)
movq %r15, %r14
jmp 0xf91d
andl $0x0, 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0xfcf2
testl %eax, %eax
js 0xfc97
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x2233a(%rip), %r14     # 0x31fd8
movq (%r14), %rbx
callq 0x63c0
leaq 0xf5f8(%rip), %rsi      # 0x1f2a5
leaq 0xff08(%rip), %rcx      # 0x1fbbc
leaq 0xff11(%rip), %r8       # 0x1fbcc
pushq $0x28
popq %r9
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x6580
movq (%r14), %rcx
leaq 0xff0a(%rip), %rdi      # 0x1fbe0
pushq $0x1c
popq %rsi
pushq $0x1
popq %rdx
callq 0x6750
movq (%r14), %rsi
pushq $0xa
popq %rdi
callq 0x64b0
pushq $-0x1
popq %rbx
jmp 0xfc8d
nop
// File: /workspace/github_cpp_makefile_star2_O2/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), %r13
movq %rsp, %r15
xorl %ebx, %ebx
movl $0x2000, %ebp           # imm = 0x2000
movl $0x2000, %edx           # imm = 0x2000
movq %r15, %rdi
xorl %esi, %esi
callq 0x6250
testq %r13, %r13
je 0xfdb6
cmpq %rbp, %r13
movl $0x2000, %r12d          # imm = 0x2000
cmovbq %r13, %r12
movl 0xc(%r14), %edi
movq %r15, %rsi
movq %r12, %rdx
callq 0x6130
subq %r12, %r13
testq %rax, %rax
jns 0xfd23
movq 0x22281(%rip), %r14     # 0x31fd8
movq (%r14), %rbx
callq 0x63c0
leaq 0xf53f(%rip), %rsi      # 0x1f2a5
leaq 0xfe90(%rip), %rcx      # 0x1fbfd
leaq 0xfe58(%rip), %r8       # 0x1fbcc
pushq $0x39
popq %r9
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x6580
movq (%r14), %rbx
callq 0x6060
movl (%rax), %edi
callq 0x6110
leaq 0xfe77(%rip), %rsi      # 0x1fc12
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x6580
movq (%r14), %rsi
pushq $0xa
popq %rdi
callq 0x64b0
pushq $-0x1
popq %rbx
movl %ebx, %eax
addq $0x2008, %rsp           # imm = 0x2008
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movl 0xc(%rdi), %edi
movq %rsp, %rdx
movl $0x80081272, %esi       # imm = 0x80081272
xorl %eax, %eax
callq 0x6560
testl %eax, %eax
js 0xfdf0
movq (%rsp), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x221e1(%rip), %r14     # 0x31fd8
movq (%r14), %rbx
callq 0x63c0
leaq 0xf49f(%rip), %rsi      # 0x1f2a5
leaq 0xfe2e(%rip), %rcx      # 0x1fc3b
leaq 0xfdb8(%rip), %r8       # 0x1fbcc
pushq $0x44
popq %r9
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x6580
movq (%r14), %rbx
callq 0x6060
movl (%rax), %edi
callq 0x6110
leaq 0xfe1a(%rip), %rsi      # 0x1fc55
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x6580
movq (%r14), %rsi
pushq $0xa
popq %rdi
callq 0x64b0
pushq $-0x1
popq %rax
jmp 0xfde8
// File: /workspace/github_cpp_makefile_star2_O2/yangwanyuan[P]HLKVDS/src/KernelDevice.cc
// Function: hlkvds::KernelDevice::lock_device()
int KernelDevice::lock_device()
{
    struct flock l;
    memset(&l, 0, sizeof(l));
    l.l_type = F_WRLCK;
    l.l_whence = SEEK_SET;
    int r = ::fcntl(directFd_, F_SETLK, &l);
    if (r < 0) {
        return KD_ERR;
    }
    return KD_OK;
}

// Assembly:
subq $0x28, %rsp
xorps %xmm0, %xmm0
movq %rsp, %rdx
movaps %xmm0, (%rdx)
movaps %xmm0, 0x10(%rdx)
movw $0x1, (%rdx)
movl 0x8(%rdi), %edi
pushq $0x6
popq %rsi
xorl %eax, %eax
callq 0x6260
sarl $0x1f, %eax
addq $0x28, %rsp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x100a1
callq 0x6770
movl 0xc(%rbx), %edi
cmpl $-0x1, %edi
je 0x100af
popq %rbx
jmp 0x6770
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x10130
movq (%r14), %rax
movq %r14, %rdi
callq *0x40(%rax)
movslq %eax, %rcx
movq %r15, %rax
xorl %edx, %edx
divq %rcx
testq %rdx, %rdx
jne 0x10130
movq (%r14), %rax
movq %r14, %rdi
callq *0x40(%rax)
movslq %eax, %rcx
movq %rbx, %rax
xorl %edx, %edx
divq %rcx
testq %rdx, %rdx
jne 0x10130
movq %r14, %rdi
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 0x101c8
movq 0x21ea1(%rip), %rbp     # 0x31fd8
movq (%rbp), %r13
callq 0x63c0
leaq 0xf069(%rip), %rsi      # 0x1f1b0
leaq 0xfbc5(%rip), %rcx      # 0x1fd13
leaq 0xfa77(%rip), %r8       # 0x1fbcc
movq %r13, %rdi
movq %rax, %rdx
movl $0xaf, %r9d
xorl %eax, %eax
callq 0x6580
movq (%rbp), %r13
movq (%r14), %rax
movq %r14, %rdi
callq *0x40(%rax)
leaq 0xfb9e(%rip), %rsi      # 0x1fd1a
movq %r13, %rdi
movq %r15, %rdx
movl %eax, %ecx
xorl %eax, %eax
callq 0x6580
movq (%rbp), %rsi
pushq $0xa
popq %rdi
callq 0x64b0
movl 0xc(%r14), %edi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x60f0
movq %rax, %rbx
movl 0xc(%r14), %edi
callq 0x6390
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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, 0x8(%rsp)
movq %rdi, %r14
leaq 0x30(%rsp), %r15
movq %r15, %rdi
callq 0x7310
movl 0x8(%r14), %ebp
movq (%r14), %r14
leaq 0x50(%rsp), %r12
movl %ebp, %r13d
cmpl $0x40, %r13d
jb 0x1030d
xorl %ebx, %ebx
cmpq $0x40, %rbx
je 0x102f9
movzbl 0x3(%r14,%rbx), %eax
shll $0x18, %eax
movsbl 0x2(%r14,%rbx), %ecx
shll $0x10, %ecx
orl %eax, %ecx
movsbl 0x1(%r14,%rbx), %eax
shll $0x8, %eax
movsbl (%r14,%rbx), %edx
orl %eax, %edx
orl %ecx, %edx
movl %edx, 0x50(%rsp,%rbx)
addq $0x4, %rbx
jmp 0x102c3
movq %r15, %rdi
movq %r12, %rsi
callq 0x7322
addl $-0x40, %r13d
addq %rbx, %r14
jmp 0x102bb
leaq 0x30(%rsp), %rdi
xorl %ebx, %ebx
movq %r14, %rsi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x8613
cmpq $0x13, %rbx
ja 0x10334
movl 0x30(%rsp,%rbx), %eax
movl %eax, 0x10(%rsp,%rbx)
addq $0x4, %rbx
jmp 0x10320
movl 0x20(%rsp), %eax
movq 0x8(%rsp), %rcx
movl %eax, 0x10(%rcx)
movaps 0x10(%rsp), %xmm0
movups %xmm0, (%rcx)
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x10238
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10286
leaq 0x4(%rsp), %rdi
movl 0x10(%rdi), %ebx
callq 0x10252
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x4(%rsp), %rdi
callq 0x10252
movq %rbx, %rdi
callq 0x6680
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $0x29
popq %rdi
callq 0x6040
movq %rax, %r14
leaq 0xf9b0(%rip), %r12      # 0x1fd7f
movq %rax, %r13
xorl %ebp, %ebp
cmpq $0x14, %rbp
je 0x103f5
movzbl (%r15,%rbp), %edx
movq %r13, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x60b0
incq %rbp
addq $0x2, %r13
jmp 0x103d4
leaq 0x7(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6150
movq %r14, %rdi
callq 0x64c0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x60, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x21faa(%rip), %r15     # 0x32438
movq (%r15), %rsi
addq $0x10, %rsi
leaq 0x50(%rsp), %rdi
callq 0xaf4e
movq (%r15), %rcx
cmpq $0x0, 0x8(%rcx)
jne 0x104d1
leaq 0x80(%rsp), %rsi
movq (%r14), %rax
pushq $0xa
popq %rcx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
movq %rax, %rdi
callq 0x10de8
movq (%r15), %rcx
movq %rax, 0x8(%rcx)
testq %rax, %rax
je 0x104ec
movq %rcx, (%rbx)
movb $0x1, %bl
leaq 0x50(%rsp), %rdi
callq 0xafd0
movl %ebx, %eax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0x21add(%rip), %rdi     # 0x31fd0
leaq 0xf89a(%rip), %rsi      # 0x1fd94
callq 0x6400
movq %rax, %rdi
callq 0x61c0
xorl %ebx, %ebx
jmp 0x104d6
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0xafd0
movq %rbx, %rdi
callq 0x6680
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x8(%rsi), %rsi
movzbl 0x20(%rsp), %eax
movl %eax, (%rsp)
callq 0x112fe
cmpl $0x0, (%rbx)
je 0x105ef
movq 0x219f5(%rip), %rdi     # 0x31fd0
leaq 0xf7c0(%rip), %rsi      # 0x1fda2
callq 0x6400
movq %rax, %rdi
callq 0x61c0
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq