LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/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 0x12cf2
movq %rbx, %rdi
callq 0x12e82
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 0x6580
testl %eax, %eax
jne 0x11d0e
movq (%r14), %rax
movq (%rax,%r12), %r12
leaq 0x18(%rsp), %rdi
movq %r15, %rsi
callq 0x11134
movq (%r12), %r13
testq %r13, %r13
je 0x11c7b
leaq 0x18(%rsp), %rbp
movq %r13, %rdi
movq %rbp, %rsi
callq 0x111ea
testb %al, %al
jne 0x11cb0
movq 0x18(%r13), %r13
testq %r13, %r13
jne 0x11c63
leaq 0x18(%rsp), %rdi
callq 0x1119a
movq %rbx, %rdi
callq 0x6350
leaq 0x8(%rsp), %rdi
callq 0xe10e
leaq 0x34(%rsp), %rdi
callq 0x12d00
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x18(%rsp), %rdi
callq 0x1119a
movq 0x8(%r15), %rsi
movq 0x8(%r13), %rdi
callq 0x20a02
testb %al, %al
je 0x11c85
movq (%r13), %rax
cmpw $0x0, 0x16(%rax)
jne 0x11c85
movq %r12, %rdi
movq %r15, %rsi
callq 0x12474
movq 0x30(%r14), %rdi
movq (%rdi), %rax
movq %r15, %rsi
callq *0xa0(%rax)
leaq 0x8(%rsp), %rdi
callq 0xe58e
decl 0x18(%r14)
leaq 0x8(%rsp), %rdi
callq 0xe5ca
jmp 0x11c85
movl %eax, %edi
callq 0x62b0
jmp 0x11d17
movq %rax, %r14
jmp 0x11d33
movq %rax, %r14
jmp 0x11d3b
movq %rax, %r14
jmp 0x11d45
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x1119a
movq %rbx, %rdi
callq 0x6350
leaq 0x8(%rsp), %rdi
callq 0xe10e
leaq 0x34(%rsp), %rdi
callq 0x12d00
movq %r14, %rdi
callq 0x6670
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x6580
testl %eax, %eax
jne 0x11fb9
movq %r14, %r12
movq (%r12), %r12
cmpq %r14, %r12
je 0x11fa6
movq 0x10(%r12), %rsi
movq %r15, %rdi
movl $0x1, %edx
callq 0x116fe
jmp 0x11f89
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x6350
movl %eax, %edi
callq 0x62b0
movq %rax, %r14
movq %rbx, %rdi
callq 0x6350
movq %r14, %rdi
callq 0x6670
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x66a0
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_O3/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 0x120fc
movq %r14, %rdi
callq 0x20a32
movq %r14, %rdi
callq 0x63f0
cmpq $0x0, (%rbx)
je 0x12111
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1211a
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x12318
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1258c
movq 0x18(%r14), %r14
jmp 0x12302
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x12336
movq %r14, %rdi
callq 0x6670
// File: /workspace/github_cpp_makefile_star2_O3/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 0x6410
movq %rax, %rbx
movq %rsp, %rdi
movq %r15, %rsi
callq 0x11134
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x11134
movq $0x0, 0x18(%rbx)
movq %rsp, %rdi
callq 0x1119a
movq (%r14), %rax
testq %rax, %rax
je 0x123e5
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
callq 0x111ea
testb %al, %al
jne 0x123f0
movq 0x18(%r12), %rax
testq %rax, %rax
jne 0x123c2
movq %rbx, 0x18(%r12)
jmp 0x123e8
movq %rbx, (%r14)
incl 0x8(%r14)
movb $0x1, %al
jmp 0x1240d
movq %r12, %rdi
movq %r15, %rsi
callq 0x1125e
movq %rbx, %rdi
callq 0x1119a
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 0x1119a
jmp 0x12429
movq %rax, %r14
movq %rbx, %rdi
callq 0x63f0
movq %r14, %rdi
callq 0x6670
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x209e4
movb $0x1, %bl
testb %al, %al
jne 0x1246b
movq %r15, %rdi
movq %r14, %rsi
callq 0x20a02
testb %al, %al
je 0x12469
movl 0x10(%r15), %eax
cmpl 0x10(%r14), %eax
jl 0x1246b
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x124fa
movq %rsi, %r15
movq %rdi, %rbx
movq 0x18(%r14), %r12
movq %r14, %rdi
callq 0x111ea
testb %al, %al
je 0x124a0
movq %r12, (%rbx)
jmp 0x124e3
testq %r12, %r12
je 0x124fa
movq %r12, %rdi
movq %r15, %rsi
callq 0x111ea
testb %al, %al
je 0x124b9
movq %r12, %r13
jmp 0x124d8
movq 0x18(%r12), %r13
testq %r13, %r13
je 0x124fa
movq %r13, %rdi
movq %r15, %rsi
callq 0x111ea
movq %r12, %r14
movq %r13, %r12
testb %al, %al
je 0x124b9
movq 0x18(%r13), %rax
movq %rax, 0x18(%r14)
movq %r13, %r14
movq %r14, %rdi
callq 0x1119a
movq %r14, %rdi
callq 0x63f0
decl 0x8(%rbx)
movb $0x1, %al
jmp 0x124fc
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1254f
movq 0x18(%r14), %r15
movq %r14, %rdi
callq 0x1119a
movq %r14, %rdi
callq 0x63f0
movq %r15, (%rbx)
movq %r15, %r14
testq %r15, %r15
jne 0x12530
movl $0x0, 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x66f0
movq %r14, %rdi
callq 0x128fa
testl %eax, %eax
js 0x128ed
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x742d
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x128e3
nop
// File: /workspace/github_cpp_makefile_star2_O3/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, %rdi
xorl %ebx, %ebx
movl $0x2000, %ebp           # imm = 0x2000
movl $0x2000, %edx           # imm = 0x2000
xorl %esi, %esi
callq 0x6250
testq %r13, %r13
je 0x12956
movq %rsp, %r15
cmpq %rbp, %r13
movl $0x2000, %r12d          # imm = 0x2000
cmovbq %r13, %r12
movl 0xc(%r14), %edi
movq %r15, %rsi
movq %r12, %rdx
callq 0x6150
testq %rax, %rax
js 0x1296a
subq %r12, %r13
jne 0x12930
movl %ebx, %eax
addq $0x2008, %rsp           # imm = 0x2008
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x748d
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x12956
// File: /workspace/github_cpp_makefile_star2_O3/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 0x6540
testl %eax, %eax
js 0x12993
movq (%rsp), %rax
popq %rcx
retq
callq 0x74fb
movq $-0x1, %rax
jmp 0x12991
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x12b39
callq 0x6740
movl 0xc(%rbx), %edi
cmpl $-0x1, %edi
je 0x12b47
popq %rbx
jmp 0x6740
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x12bc9
movq (%r14), %rax
movq %r14, %rdi
callq *0x40(%rax)
movslq %eax, %rcx
movq %r15, %rax
xorl %edx, %edx
divq %rcx
testq %rdx, %rdx
jne 0x12bc9
movq (%r14), %rax
movq %r14, %rdi
callq *0x40(%rax)
movslq %eax, %rcx
movq %rbx, %rax
xorl %edx, %edx
divq %rcx
testq %rdx, %rdx
jne 0x12bc9
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 0x21408(%rip), %rbp     # 0x33fd8
movq (%rbp), %r13
callq 0x63c0
leaq 0xf5f0(%rip), %rsi      # 0x221d0
leaq 0x1011c(%rip), %rcx     # 0x22d03
leaq 0xffce(%rip), %r8       # 0x22bbc
movq %r13, %rdi
movq %rax, %rdx
movl $0xaf, %r9d
xorl %eax, %eax
callq 0x6560
movq (%rbp), %r13
movq (%r14), %rax
movq %r14, %rdi
callq *0x40(%rax)
leaq 0x100f5(%rip), %rsi     # 0x22d0a
movq %r13, %rdi
movq %r15, %rdx
movl %eax, %ecx
xorl %eax, %eax
callq 0x6560
movq (%rbp), %rsi
movl $0xa, %edi
callq 0x64c0
movl 0xc(%r14), %edi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x6100
movq %rax, %rbx
movl 0xc(%r14), %edi
callq 0x63a0
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_O3/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 0xa8f8
movl 0x8(%r14), %ebp
movq (%r14), %rsi
cmpl $0x40, %ebp
jb 0x12dec
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 0x12d94
movq %r14, %rdi
movq %r15, %rsi
callq 0xa90a
addl $-0x40, %r13d
leaq (%r12,%rbx), %rsi
cmpl $0x3f, %r13d
ja 0x12d8f
addq %rbx, %r12
movq %r12, %rsi
movq 0x8(%rsp), %rbx
leaq 0x10(%rsp), %rdi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0xbbfb
movq $-0x4, %rax
movl 0x14(%rsp,%rax), %ecx
movl %ecx, 0x34(%rsp,%rax)
addq $0x4, %rax
cmpq $0x10, %rax
jb 0x12e01
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_O3/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 0x12ce4
movq %rbx, %rdi
movq %r14, %rsi
callq 0x12d50
leaq 0x4(%rsp), %rdi
movl 0x10(%rdi), %ebx
callq 0x12d00
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x4(%rsp), %rdi
callq 0x12d00
movq %rbx, %rdi
callq 0x6670
// File: /workspace/github_cpp_makefile_star2_O3/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 0xfec4(%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 0x12eb0
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 0xa862
movq %r14, %rdi
callq 0x64d0
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_O3/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 0x21476(%rip), %r12     # 0x34420
movq (%r12), %rax
addq $0x10, %rax
leaq 0x58(%rsp), %r15
movq %rax, (%r15)
movb $0x0, 0x8(%r15)
movq %r15, %rdi
callq 0xe58e
movb $0x1, 0x8(%r15)
movq (%r12), %rcx
cmpq $0x0, 0x8(%rcx)
jne 0x13002
leaq 0x90(%rsp), %rsi
movq (%r14), %rax
movl $0xa, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
movq %rax, %rdi
callq 0x13a56
movq (%r12), %rcx
movq %rax, 0x8(%rcx)
testq %rax, %rax
je 0x1301f
movq %rcx, (%rbx)
movb $0x1, %bl
leaq 0x58(%rsp), %rdi
callq 0xe10e
movl %ebx, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x20faa(%rip), %rbx     # 0x33fd0
leaq 0xfd57(%rip), %rsi      # 0x22d84
movl $0xd, %edx
movq %rbx, %rdi
callq 0x6450
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x6400
movsbl %al, %esi
movq 0x20f78(%rip), %rdi     # 0x33fd0
callq 0x6050
movq %rax, %rdi
callq 0x62c0
xorl %ebx, %ebx
jmp 0x13007
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0xe10e
movq %rbx, %rdi
callq 0x6670
// File: /workspace/github_cpp_makefile_star2_O3/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 0x13f0e
cmpl $0x0, (%rbx)
je 0x13179
movq 0x20e92(%rip), %r14     # 0x33fd0
leaq 0xfc4d(%rip), %rsi      # 0x22d92
movl $0x10, %edx
movq %r14, %rdi
callq 0x6450
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x6400
movsbl %al, %esi
movq %r14, %rdi
callq 0x6050
movq %rax, %rdi
callq 0x62c0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x14056
cmpl $0x0, (%rbx)
je 0x131db
movq 0x20e30(%rip), %r14     # 0x33fd0
leaq 0xfbfc(%rip), %rsi      # 0x22da3
movl $0x10, %edx
movq %r14, %rdi
callq 0x6450
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x6400
movsbl %al, %esi
movq %r14, %rdi
callq 0x6050
movq %rax, %rdi
callq 0x62c0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1407a
cmpl $0x0, (%rbx)
je 0x1323d
movq 0x20dce(%rip), %r14     # 0x33fd0
leaq 0xfbab(%rip), %rsi      # 0x22db4
movl $0xd, %edx
movq %r14, %rdi
callq 0x6450
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x6400
movsbl %al, %esi
movq %r14, %rdi
callq 0x6050
movq %rax, %rdi
callq 0x62c0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1331c
movq (%rcx), %rdx
xorl %ecx, %ecx
movq (%rdx), %rsi
cmpl $0x0, 0x8(%rsi)
jg 0x13304
incq %rcx
addq $0x30, %rdx
cmpq %rcx, %rax
jne 0x132ed
jmp 0x1331c
movl %ecx, 0x3c(%rdi)
movl $0x0, 0x40(%rdi)
movq (%rsi), %rcx
movq %rcx, 0x20(%rdi)
movb $0x1, %al
testq %rcx, %rcx
jne 0x1331e
xorl %eax, %eax
movb %al, 0x18(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x13379
movq (%rdx), %rax
movq (%rax,%rsi), %r8
movl 0x8(%r8), %eax
decl %ecx
addq $-0x30, %rsi
testl %eax, %eax
jle 0x13340
movl %ecx, 0x3c(%rdi)
decl %eax
movl %eax, 0x40(%rdi)
movq (%r8), %rcx
je 0x1336e
movq 0x18(%rcx), %rcx
decl %eax
jne 0x13366
movq %rcx, 0x20(%rdi)
movb $0x1, %al
testq %rcx, %rcx
jne 0x1337b
xorl %eax, %eax
movb %al, 0x18(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1b8ca
leaq 0x30(%rsp), %rdi
callq 0x10e40
movq 0x88(%rsp), %rsi
leaq 0x30(%rsp), %rdi
callq 0x10e9c
leaq 0xe(%rsp), %rdx
movw $0x0, (%rdx)
movq $0x0, 0x2(%rdx)
leaq 0x18(%rsp), %rdi
leaq 0x30(%rsp), %rsi
xorl %ecx, %ecx
callq 0x110c0
movq $0x0, 0x20(%rbx)
cmpl $0x0, 0x38(%rbx)
jle 0x13476
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 0x11134
movq (%rbp), %r12
testq %r12, %r12
je 0x13454
movq %r12, %rdi
movq %r14, %rsi
callq 0x111ea
testb %al, %al
jne 0x13457
movq 0x18(%r12), %r12
jmp 0x13439
xorl %r12d, %r12d
movq %r12, 0x20(%rbx)
movq %r14, %rdi
callq 0x1119a
cmpq $0x0, 0x20(%rbx)
jne 0x134b5
incq %r13
movslq 0x38(%rbx), %rax
cmpq %rax, %r13
jl 0x13410
xorl %eax, %eax
movb %al, 0x18(%rbx)
leaq 0x18(%rsp), %rdi
callq 0x1119a
leaq 0xe(%rsp), %rdi
callq 0x10ea2
leaq 0x30(%rsp), %rdi
callq 0x10e96
leaq 0x68(%rsp), %rdi
callq 0x1b7ac
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r13d, 0x3c(%rbx)
movq (%rbp), %r14
testq %r14, %r14
je 0x134f6
xorl %ebp, %ebp
leaq 0x18(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x111ea
testb %al, %al
jne 0x134e8
incl %ebp
movq 0x18(%r14), %r14
testq %r14, %r14
jne 0x134c9
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpq $0x0, 0x20(%rbx)
movl %ebp, 0x40(%rbx)
movb $0x1, %al
jne 0x13478
jmp 0x13476
movl $0xffffffff, 0x40(%rbx) # imm = 0xFFFFFFFF
movb $0x1, %al
jmp 0x13478
movq %rax, %rbx
jmp 0x13531
movq %rax, %rbx
jmp 0x1353b
movq %rax, %rbx
jmp 0x13545
jmp 0x13515
movq %rax, %rbx
jmp 0x13527
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x1119a
leaq 0x18(%rsp), %rdi
callq 0x1119a
leaq 0xe(%rsp), %rdi
callq 0x10ea2
leaq 0x30(%rsp), %rdi
callq 0x10e96
leaq 0x68(%rsp), %rdi
callq 0x1b7ac
movq %rbx, %rdi
callq 0x6670
nop
// File: /workspace/github_cpp_makefile_star2_O3/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), %rcx
movl 0x3c(%rdi), %eax
movq (%rcx), %rcx
leaq (%rax,%rax,2), %rdx
shlq $0x4, %rdx
movq (%rcx,%rdx), %rsi
movq $0x0, 0x20(%rdi)
movl 0x8(%rsi), %r8d
movl 0x40(%rdi), %edx
decl %r8d
cmpl %r8d, %edx
jge 0x13599
incl %edx
movl %edx, 0x40(%rdi)
movq (%rsi), %rax
je 0x135cd
movq 0x18(%rax), %rax
decl %edx
jne 0x1358f
jmp 0x135cd
movl 0x38(%rdi), %edx
leal 0x1(%rax), %esi
cmpl %esi, %edx
cmovgl %edx, %esi
incl %eax
cmpl %edx, %eax
jge 0x135da
movl %eax, %r8d
leaq (%r8,%r8,2), %r8
shlq $0x4, %r8
movq (%rcx,%r8), %r8
cmpl $0x0, 0x8(%r8)
jle 0x135a4
movl %eax, 0x3c(%rdi)
movl $0x0, 0x40(%rdi)
movq (%r8), %rax
movq %rax, 0x20(%rdi)
movb $0x1, %cl
testq %rax, %rax
jne 0x135df
jmp 0x135dd
movl %esi, 0x3c(%rdi)
xorl %ecx, %ecx
movb %cl, 0x18(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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), %rcx
movl 0x3c(%rdi), %eax
movq (%rcx), %rsi
leaq (%rax,%rax,2), %r8
shlq $0x4, %r8
movq (%rsi,%r8), %rdx
movq $0x0, 0x20(%rdi)
movl 0x40(%rdi), %ecx
testl %ecx, %ecx
jle 0x13617
decl %ecx
movl %ecx, 0x40(%rdi)
cmpl %ecx, 0x8(%rdx)
jge 0x1364a
xorl %eax, %eax
jmp 0x13659
leaq (%r8,%rsi), %rdx
addq $-0x30, %rdx
testl %eax, %eax
jle 0x13666
movq (%rdx), %rsi
movl 0x8(%rsi), %ecx
decl %eax
addq $-0x30, %rdx
testl %ecx, %ecx
jle 0x1361f
movl %eax, 0x3c(%rdi)
decl %ecx
movl %ecx, 0x40(%rdi)
movq (%rsi), %rax
je 0x13659
movq 0x18(%rax), %rax
decl %ecx
jne 0x13640
jmp 0x13659
movq (%rdx), %rax
testl %ecx, %ecx
je 0x13659
movq 0x18(%rax), %rax
decl %ecx
jne 0x13651
movq %rax, 0x20(%rdi)
movb $0x1, %cl
testq %rax, %rax
jne 0x1366d
jmp 0x1366b
decl %eax
movl %eax, 0x3c(%rdi)
xorl %ecx, %ecx
movb %cl, 0x18(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/yangwanyuan[P]HLKVDS/src/Kvdb_Impl.cc
// Function: hlkvds::KVDS::Create_KVDS(char const*, hlkvds::Options)
KVDS* KVDS::Create_KVDS(const char* filename, Options opts) {
    if (filename == NULL) {
        return NULL;
    }

    KVDS* kvds = new KVDS(filename, opts);

    if (!kvds->openAllDevices(kvds->paths_)) {
        delete kvds;
        return NULL;
    }

    int datastor_type = opts.datastor_type;
    kvds->dataStor_ = DataStor::Create(kvds->options_, kvds->bdVec_, kvds->sbMgr_, kvds->idxMgr_, datastor_type);

    if (kvds->dataStor_ == NULL) {
        delete kvds;
        return NULL;
    }

    kvds->idxMgr_->InitDataStor(kvds->dataStor_);
    kvds->metaStor_->InitDataStor(kvds->dataStor_);

    if (!kvds->metaStor_->CreateMetaData()) {
        delete kvds;
        return NULL;
    }

    __INFO("\nCreate KVDS Success!!!");
    kvds->printDbStates();

    kvds->dataStor_->InitSegmentBuffer();
    kvds->startThds();

    kvds->isOpen_ = true;

    return kvds;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
testq %rdi, %rdi
je 0x137e5
movq %rdi, %r15
leaq 0xa0(%rsp), %r14
movl $0xc0, %edi
callq 0x6410
movq %rax, %rbx
movl $0xa, %ecx
movq %rsp, %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %rax, %rdi
movq %r15, %rsi
callq 0x13dc2
leaq 0x60(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
addq %rsi, %rdx
leaq 0x50(%rsp), %r15
movq %r15, %rdi
callq 0xa7cc
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1382e
movl %eax, %ebp
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
je 0x1378c
callq 0x63f0
testb %bpl, %bpl
je 0x137dc
movl 0x3c(%r14), %r8d
leaq 0x50(%rbx), %rdi
leaq 0xa0(%rbx), %rsi
movq 0x28(%rbx), %rdx
movq 0x30(%rbx), %rcx
callq 0x1005c
movq %rax, 0x48(%rbx)
testq %rax, %rax
je 0x137dc
movq 0x30(%rbx), %rdi
movq %rax, %rsi
callq 0x1132c
movq 0x40(%rbx), %rdi
movq 0x48(%rbx), %rsi
callq 0x162c4
movq 0x40(%rbx), %rdi
callq 0x163b0
testb %al, %al
jne 0x137f7
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x30(%rbx), %rdx
movq %rbx, %rsi
addq $0x48, %rsi
movq %rbx, %rdi
callq 0x781e
jmp 0x137e7
movq %rax, %r14
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
jne 0x13821
jmp 0x13826
movq %rax, %r14
movq %rbx, %rdi
callq 0x63f0
movq %r14, %rdi
callq 0x6670
// File: /workspace/github_cpp_makefile_star2_O3/yangwanyuan[P]HLKVDS/src/Kvdb_Impl.cc
// Function: hlkvds::KVDS::openAllDevices(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool KVDS::openAllDevices(string paths) {

    vector<string> fields;
    boost::split(fields, paths, boost::is_any_of(FileDelim));
    vector<string>::iterator iter;
    for(iter = fields.begin(); iter != fields.end(); iter++){
        BlockDevice *bdev = new KernelDevice();

        if (bdev->Open(*iter) < 0) {
            return false;
        }__DEBUG("Open Device %s Success!", (*iter).c_str());

        bdVec_.push_back(bdev);
    }
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movq 0x20bdf(%rip), %rax     # 0x34438
movq 0x20be0(%rip), %rcx     # 0x34440
addq %rax, %rcx
leaq 0x38(%rsp), %rsi
movq %rax, (%rsi)
movq %rcx, 0x8(%rsi)
leaq 0x20(%rsp), %rdi
callq 0x14624
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
movq %r14, %rsi
movl $0x1, %ecx
callq 0x14445
cmpq $0x11, 0x30(%rsp)
jb 0x138a5
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x138a5
callq 0x64d0
movq (%rsp), %r12
movb $0x1, %bpl
cmpq 0x8(%rsp), %r12
je 0x13969
leaq 0x58(%rsp), %rbp
leaq 0xa0(%rbx), %r14
leaq 0x48(%rsp), %r15
movl $0x48, %edi
callq 0x6410
movq %rax, %r13
movq %rax, %rdi
callq 0x1281c
movq %r13, 0x38(%rsp)
movq %rbp, 0x48(%rsp)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0xa7cc
movq (%r13), %rax
movq %r13, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq *0x18(%rax)
movl %eax, %r13d
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1391f
callq 0x63f0
testl %r13d, %r13d
js 0x13967
movq 0xa8(%rbx), %rsi
cmpq 0xb0(%rbx), %rsi
je 0x13946
movq 0x38(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0xa8(%rbx)
jmp 0x13953
movq %r14, %rdi
leaq 0x38(%rsp), %rdx
callq 0x1615e
addq $0x20, %r12
cmpq 0x8(%rsp), %r12
jne 0x138c8
movb $0x1, %bpl
jmp 0x13969
xorl %ebp, %ebp
movq %rsp, %rdi
callq 0x145da
movl %ebp, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
cmpq $0x11, 0x30(%rsp)
jb 0x139bf
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x139bf
callq 0x64d0
jmp 0x139bf
jmp 0x139bc
movq %rax, %rbx
movq %r13, %rdi
jmp 0x139b5
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x139bf
callq 0x63f0
jmp 0x139bf
movq %rax, %rbx
movq %rsp, %rdi
callq 0x145da
movq %rbx, %rdi
callq 0x6670
nop
// File: /workspace/github_cpp_makefile_star2_O3/yangwanyuan[P]HLKVDS/src/Kvdb_Impl.cc
// Function: hlkvds::KVDS::printDbStates()
void KVDS::printDbStates() {
    sbMgr_->printSBInfo();
    dataStor_->printDeviceTopologyInfo();

    idxMgr_->printDynamicInfo();
    dataStor_->printDynamicInfo();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
callq 0x89a0
movq 0x48(%rbx), %rdi
movq (%rdi), %rax
callq *0x30(%rax)
movq 0x30(%rbx), %rdi
callq 0x728e
movq 0x48(%rbx), %rdi
movq (%rdi), %rax
popq %rbx
jmpq *0x38(%rax)
nop
// File: /workspace/github_cpp_makefile_star2_O3/yangwanyuan[P]HLKVDS/src/Kvdb_Impl.cc
// Function: hlkvds::KVDS::Open_KVDS(char const*, hlkvds::Options)
KVDS* KVDS::Open_KVDS(const char* filename, Options opts) {
    KVDS *kvds = new KVDS(filename, opts);

    Status s = kvds->openDB();
    if (!s.ok()) {
        delete kvds;
        return NULL;
    }

    kvds->isOpen_ = true;
    return kvds;

}

// Assembly:
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdi, %r14
movl $0xc0, %edi
callq 0x6410
movq %rax, %rbx
leaq 0x80(%rsp), %rsi
movl $0xa, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
movq %rax, %rdi
movq %r14, %rsi
callq 0x13dc2
leaq 0x58(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x13ad4
cmpl $0x0, (%r14)
je 0x13aae
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
xorl %ebx, %ebx
jmp 0x13ab5
movb $0x1, 0xb8(%rbx)
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x63f0
movq %r14, %rdi
callq 0x6670
nop
// File: /workspace/github_cpp_makefile_star2_O3/yangwanyuan[P]HLKVDS/src/Kvdb_Impl.cc
// Function: hlkvds::KVDS::openDB()
Status KVDS::openDB() {
    if (!openAllDevices(paths_)) {
        return Status::IOError("Could not open all device");
    }

    int datastor_type = -1;
    if ( !metaStor_->TryLoadSB(datastor_type)) {
        return  Status::IOError("Could not load SB");
    }
    dataStor_ = DataStor::Create(options_, bdVec_, sbMgr_, idxMgr_, datastor_type);

    if (dataStor_ == NULL) {
        return Status::NotSupported("Could not support this data store");
    }

    idxMgr_->InitDataStor(dataStor_);
    metaStor_->InitDataStor(dataStor_);

    if (!metaStor_->LoadMetaData()) {
        return Status::IOError("Could not read meta data");
    }

    __INFO("\nOpen KVDS Success!!!");
    printDbStates();

    dataStor_->InitSegmentBuffer();
    startThds();
    return Status::OK();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x20(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x8(%rsi), %rsi
movq 0x10(%r14), %rdx
addq %rsi, %rdx
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0xa7cc
movq %r14, %rdi
movq %r15, %rsi
callq 0x1382e
movl %eax, %ebp
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x13b24
callq 0x63f0
testb %bpl, %bpl
je 0x13b96
leaq 0xc(%rsp), %rsi
movl $0xffffffff, (%rsi)     # imm = 0xFFFFFFFF
movq 0x40(%r14), %rdi
callq 0x162da
testb %al, %al
je 0x13b9f
leaq 0x50(%r14), %rdi
leaq 0xa0(%r14), %rsi
movq 0x28(%r14), %rdx
movq 0x30(%r14), %rcx
movl 0xc(%rsp), %r8d
callq 0x1005c
movq %rax, 0x48(%r14)
testq %rax, %rax
je 0x13bc3
movq 0x30(%r14), %rdi
movq %rax, %rsi
callq 0x1132c
movq 0x40(%r14), %rdi
movq 0x48(%r14), %rsi
callq 0x162c4
movq 0x40(%r14), %rdi
callq 0x1673c
testb %al, %al
jne 0x13bd4
leaq 0xf2f7(%rip), %rdx      # 0x22e8b
jmp 0x13ba6
leaq 0xf2a0(%rip), %rdx      # 0x22e3d
jmp 0x13ba6
leaq 0xf2b1(%rip), %rdx      # 0x22e57
movq %rbx, %rdi
movl $0x5, %esi
callq 0x1de28
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0xf29f(%rip), %rdx      # 0x22e69
movq %rbx, %rdi
movl $0x3, %esi
jmp 0x13bae
leaq 0x30(%r14), %rdx
leaq 0x48(%r14), %rsi
movq %r14, %rdi
movq %rbx, %rcx
callq 0x78bb
jmp 0x13bb3
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x13bfb
callq 0x63f0
movq %rbx, %rdi
callq 0x6670
nop
// File: /workspace/github_cpp_makefile_star2_O3/yangwanyuan[P]HLKVDS/src/Kvdb_Impl.cc
// Function: hlkvds::KVDS::closeDB()
Status KVDS::closeDB() {
    if (!metaStor_->PersistMetaData()) {
        __ERROR("Could not to write metadata to device\n");
        return Status::IOError("Could not to write metadata to device");
    }
    stopThds();
    return Status::OK();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x40(%rsi), %rdi
callq 0x1694a
testb %al, %al
je 0x13c47
movq 0x48(%r14), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movq 0x30(%r14), %rdi
callq 0x1225a
movl $0x0, (%rbx)
movq $0x0, 0x8(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
callq 0x7963
jmp 0x13c3c
nop
// File: /workspace/github_cpp_makefile_star2_O3/yangwanyuan[P]HLKVDS/src/Kvdb_Impl.cc
// Function: hlkvds::KVDS::~KVDS()
KVDS::~KVDS() {
    if (isOpen_) {
        closeDB();
    }
    delete idxMgr_;
    delete sbMgr_;
    if(!options_.disable_cache){
        delete rdCache_;
    }
    delete metaStor_;
    if (dataStor_) {
        delete dataStor_;
    }
    closeAllDevices();
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x1f95d(%rip), %rax     # 0x335d8
addq $0x10, %rax
movq %rax, (%rdi)
cmpb $0x1, 0xb8(%rdi)
jne 0x13c98
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x13c04
movq 0x30(%rbx), %r14
testq %r14, %r14
je 0x13ca9
movq %r14, %rdi
callq 0x120dc
movq %r14, %rdi
callq 0x63f0
movq 0x28(%rbx), %r14
testq %r14, %r14
je 0x13cc2
movq %r14, %rdi
callq 0x1e0ce
movq %r14, %rdi
callq 0x63f0
cmpb $0x0, 0x50(%rbx)
jne 0x13ce9
movq 0x38(%rbx), %r14
testq %r14, %r14
je 0x13ce1
movq %r14, %rdi
callq 0x174e2
movq %r14, %rdi
callq 0x63f0
movq 0x40(%rbx), %r14
testq %r14, %r14
je 0x13cfa
movq %r14, %rdi
callq 0x162c2
movq %r14, %rdi
callq 0x63f0
movq 0x48(%rbx), %rdi
testq %rdi, %rdi
je 0x13d11
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, %rdi
callq 0x13d4c
movq 0xa0(%rbx), %rdi
testq %rdi, %rdi
je 0x13d2a
callq 0x63f0
movq 0x8(%rbx), %rdi
addq $0x18, %rbx
cmpq %rbx, %rdi
je 0x13d3c
callq 0x63f0
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rdi
callq 0xe09d
// File: /workspace/github_cpp_makefile_star2_O3/yangwanyuan[P]HLKVDS/src/Kvdb_Impl.cc
// Function: hlkvds::KVDS::KVDS(char const*, hlkvds::Options)
KVDS::KVDS(const char* filename, Options opts) :
    paths_(string(filename)), sbMgr_(NULL), idxMgr_(NULL), rdCache_(NULL), metaStor_(NULL), dataStor_(NULL), options_(opts), isOpen_(false) {

    sbMgr_ = new SuperBlockManager(options_);
    idxMgr_ = new IndexManager(sbMgr_, options_);

    if(!options_.disable_cache){
        rdCache_ = new ReadCache(CachePolicy(options_.cache_policy), (size_t) options_.cache_size, options_.slru_partition);
    }

    metaStor_ = new MetaStor(filename, bdVec_, sbMgr_, idxMgr_, options_);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x1f7fe(%rip), %rax     # 0x335d8
addq $0x10, %rax
movq %rax, (%rdi)
addq $0x8, %rdi
leaq 0x7(%rsp), %rdx
callq 0x6170
leaq 0x50(%rbx), %r12
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rbx)
movups %xmm0, 0x28(%rbx)
movq $0x0, 0x48(%rbx)
leaq 0x40(%rsp), %rsi
movl $0xa, %ecx
movq %r12, %rdi
rep  movsq (%rsi), %es:(%rdi)
leaq 0xa0(%rbx), %r14
movups %xmm0, 0xa9(%rbx)
movups %xmm0, 0xa0(%rbx)
movl $0x78, %edi
callq 0x6410
movq %rax, %r13
movq %rax, %rdi
movq %r12, %rsi
callq 0x1e084
leaq 0x28(%rbx), %rax
movq %r13, (%rax)
movl $0xa0, %edi
callq 0x6410
movq %rax, %rbp
movq %rax, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x12060
movq %rbp, 0x30(%rbx)
cmpb $0x0, 0x50(%rbx)
jne 0x13e92
movl $0x1a8, %edi            # imm = 0x1A8
callq 0x6410
movq %rax, %r13
movslq 0x54(%rbx), %rdx
movl 0x58(%rbx), %esi
movl 0x5c(%rbx), %ecx
movq %rax, %rdi
callq 0x17424
movq %r13, 0x38(%rbx)
movl $0x50, %edi
callq 0x6410
movq %rax, %r13
movq 0x28(%rbx), %rcx
movq 0x30(%rbx), %r8
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %r9
callq 0x16294
movq %r13, 0x40(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x13ed7
jmp 0x13ed7
movq %rax, %r15
movq %rbp, %rdi
jmp 0x13edd
movq %rax, %r15
movq %r13, %rdi
callq 0x63f0
jmp 0x13ee7
movq %rax, %r15
movq (%r14), %rdi
testq %rdi, %rdi
je 0x13ef4
callq 0x63f0
movq 0x8(%rbx), %rdi
addq $0x18, %rbx
cmpq %rbx, %rdi
je 0x13f06
callq 0x63f0
movq %r15, %rdi
callq 0x6670