// File: /workspace/github_cpp_makefile_star2_O1/yangwanyuan[P]HLKVDS/src/Kvdb_Impl.cc
// Function: hlkvds::KVDS::Get(char const*, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
Status KVDS::Get(const char* key, uint32_t key_len, string &data) {
    bool res = false;
    if (key == NULL) {
        return Status::InvalidArgument("Key is null.");
    }

    KVSlice slice(key, key_len, NULL, 0);

    if(!options_.disable_cache) {
        if(rdCache_->Get(slice.GetKeyStr(), data)) {
            rdCache_->Put(slice.GetKeyStr(), data);
            return Status::OK();
        }
    }

    res = idxMgr_->GetHashEntry(&slice);
    if (!res) {
        //The key is not exist
        return Status::NotFound("Key is not found.");
    }

    Status s = dataStor_->ReadData(slice, data);

    if (s.ok()) {
        if(!options_.disable_cache) {
            rdCache_->Put(slice.GetKeyStr(), data);
        }
    }

    return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xe0, %rsp
movq %rdi, %rbx
testq %rdx, %rdx
je 0x1411a
movq %r8, %r14
movq %rsi, %r15
leaq 0xa0(%rsp), %rdi
movq %rdx, %rsi
movl %ecx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x1b89e
cmpb $0x0, 0x50(%r15)
jne 0x14070
movq 0x38(%r15), %r12
leaq 0x80(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x1ba6c
leaq 0x80(%rsp), %rsi
movq %r12, %rdi
movq %r14, %rdx
callq 0x17af0
movl %eax, %ebp
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x13ff0
callq 0x6400
testb %bpl, %bpl
je 0x14070
movq 0x38(%r15), %r15
leaq 0x60(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x1ba6c
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x20(%rsp), %rdi
callq 0xa64c
leaq 0x60(%rsp), %rsi
leaq 0x20(%rsp), %rdx
movq %r15, %rdi
callq 0x17424
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x1404a
callq 0x6400
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1405d
callq 0x6400
movl $0x0, (%rbx)
movq $0x0, 0x8(%rbx)
jmp 0x14144
movq 0x30(%r15), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x11c2c
testb %al, %al
je 0x14130
movq 0x48(%r15), %rsi
movq (%rsi), %rax
leaq 0xa0(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rcx
callq *0x50(%rax)
cmpl $0x0, (%rbx)
jne 0x14144
cmpb $0x0, 0x50(%r15)
jne 0x14144
movq 0x38(%r15), %r15
leaq 0x40(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x1ba6c
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %rsp, %rdi
callq 0xa64c
leaq 0x40(%rsp), %rsi
movq %rsp, %rdx
movq %r15, %rdi
callq 0x17424
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x14105
callq 0x6400
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14144
callq 0x6400
jmp 0x14144
leaq 0xee0b(%rip), %rdx      # 0x22f2c
movq %rbx, %rdi
movl $0x4, %esi
callq 0x1de18
jmp 0x14151
leaq 0xe4b1(%rip), %rdx      # 0x225e8
movq %rbx, %rdi
movl $0x1, %esi
callq 0x1de18
leaq 0xa0(%rsp), %rdi
callq 0x1b780
movq %rbx, %rax
addq $0xe0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x1417a
callq 0x6400
jmp 0x1417a
movq %rax, %rbx
leaq 0x50(%rsp), %rax
jmp 0x141ac
jmp 0x141bc
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x1419a
callq 0x6400
jmp 0x1419a
movq %rax, %rbx
leaq 0x70(%rsp), %rax
jmp 0x141ac
movq %rax, %rbx
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x141bf
callq 0x6400
jmp 0x141bf
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x1b780
movq %rbx, %rdi
callq 0x6680