LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: yangwanyuan[P]HLKVDS/src/DS_MultiTier_Impl.cc
// Function: hlkvds::DS_MultiTier_Impl::GetAllSSTs(char*, unsigned long)
bool DS_MultiTier_Impl::GetAllSSTs(char* buf, uint64_t length) {
    uint64_t sst_total_length = GetSSTsLengthOnDisk();
    if (length != sst_total_length) {
        return false;
    }
    char *buf_ptr = buf;

    //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-buf));

    //Copy First Tier SST
    uint64_t fast_tier_sst_length = ft_->GetSSTLength();
    if ( !ft_->GetSST(buf_ptr, fast_tier_sst_length) ) {
        return false;
    }
    buf_ptr += fast_tier_sst_length;

    //Copy Second Tier SST
    uint64_t med_tier_sst_length = mt_->GetSSTLength();
    if ( !mt_->GetSST(buf_ptr, med_tier_sst_length) ) {
        return false;
    }

    return true;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x48(%rsp), %rdi
movq %rdi, (%rsp)
movq (%rdi), %rax
callq *0x98(%rax)
movq %rax, 0x30(%rsp)
movq 0x38(%rsp), %rax
cmpq 0x30(%rsp), %rax
je 0x10ee0
movb $0x0, 0x57(%rsp)
jmp 0x10fbb
movq 0x40(%rsp), %rax
movq %rax, 0x28(%rsp)
callq 0x116e0
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x20(%rsp)
movq 0x40(%rax), %rdi
callq 0x50710
movq (%rsp), %rax
movq 0x40(%rax), %rdi
callq 0x506e0
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rdx
leaq 0x18(%rsp), %rsi
callq 0x8410
movq (%rsp), %rax
movq 0x20(%rsp), %rcx
addq 0x28(%rsp), %rcx
movq %rcx, 0x28(%rsp)
movq 0x30(%rax), %rdi
callq 0x4bcb0
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x10(%rsp)
movq 0x30(%rax), %rdi
movq 0x28(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x4b4e0
testb $0x1, %al
jne 0x10f70
movb $0x0, 0x57(%rsp)
jmp 0x10fbb
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
addq 0x28(%rsp), %rcx
movq %rcx, 0x28(%rsp)
movq 0x38(%rax), %rdi
callq 0x4e0f0
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x8(%rsp)
movq 0x38(%rax), %rdi
movq 0x28(%rsp), %rsi
movq 0x8(%rsp), %rdx
callq 0x4d480
testb $0x1, %al
jne 0x10fb6
movb $0x0, 0x57(%rsp)
jmp 0x10fbb
movb $0x1, 0x57(%rsp)
movb 0x57(%rsp), %al
andb $0x1, %al
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
// File: yangwanyuan[P]HLKVDS/src/DS_MultiTier_Impl.cc
// Function: hlkvds::DS_MultiTier_Impl::SetAllSSTs(char*, unsigned long)
bool DS_MultiTier_Impl::SetAllSSTs(char* buf, uint64_t length) {
    uint64_t sst_total_length = GetSSTsLengthOnDisk();
    if (length != sst_total_length) {
        return false;
    }
    char *buf_ptr = buf;

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

    //Set First Tier SST
    uint64_t fast_tier_sst_length = ft_->GetSSTLength();
    if (!ft_->SetSST(buf_ptr, fast_tier_sst_length) ) {
        return false;
    }
    buf_ptr += fast_tier_sst_length;

    //Set Second Tier SST
    uint64_t med_tier_sst_length = mt_->GetSSTLength();
    if ( !mt_->SetSST(buf_ptr, med_tier_sst_length) ) {
        return false;
    }

    return true;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x48(%rsp), %rdi
movq %rdi, (%rsp)
movq (%rdi), %rax
callq *0x98(%rax)
movq %rax, 0x30(%rsp)
movq 0x38(%rsp), %rax
cmpq 0x30(%rsp), %rax
je 0x11010
movb $0x0, 0x57(%rsp)
jmp 0x110db
movq 0x40(%rsp), %rax
movq %rax, 0x28(%rsp)
callq 0x116e0
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rsi
movq 0x20(%rsp), %rdx
leaq 0x18(%rsp), %rdi
callq 0x8410
movq (%rsp), %rax
movq 0x40(%rax), %rdi
movq 0x18(%rsp), %rsi
callq 0x506c0
movq (%rsp), %rax
movq 0x20(%rsp), %rcx
addq 0x28(%rsp), %rcx
movq %rcx, 0x28(%rsp)
movq 0x30(%rax), %rdi
callq 0x4bcb0
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x10(%rsp)
movq 0x30(%rax), %rdi
movq 0x28(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x4b520
testb $0x1, %al
jne 0x11090
movb $0x0, 0x57(%rsp)
jmp 0x110db
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
addq 0x28(%rsp), %rcx
movq %rcx, 0x28(%rsp)
movq 0x38(%rax), %rdi
callq 0x4e0f0
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x8(%rsp)
movq 0x38(%rax), %rdi
movq 0x28(%rsp), %rsi
movq 0x8(%rsp), %rdx
callq 0x4d550
testb $0x1, %al
jne 0x110d6
movb $0x0, 0x57(%rsp)
jmp 0x110db
movb $0x1, 0x57(%rsp)
movb 0x57(%rsp), %al
andb $0x1, %al
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
// File: yangwanyuan[P]HLKVDS/src/DS_MultiTier_Impl.cc
// Function: hlkvds::DS_MultiTier_Impl::CreateAllComponents(unsigned long)
bool DS_MultiTier_Impl::CreateAllComponents(uint64_t sst_offset) {
    bool ret;
    ret = mt_->CreateVolume(bdVec_);
    if (!ret) {
        return false;
    }

    uint32_t mt_seg_num = mt_->GetTotalSegNum();
    ret = ft_->CreateVolume(bdVec_, sst_offset, mt_seg_num);
    if (!ret) {
        return false;
    }

    // init SB Reserved Header For Create
    sbResHeader_.sb_reserved_fast_tier_size = ft_->GetSbReservedSize();
    sbResHeader_.sb_reserved_medium_tier_size = mt_->GetSbReservedSize();

    return true;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
movq 0x38(%rax), %rdi
movq 0x10(%rax), %rsi
callq 0x4d620
andb $0x1, %al
movb %al, 0xf(%rsp)
testb $0x1, 0xf(%rsp)
jne 0x11128
movb $0x0, 0x27(%rsp)
jmp 0x11196
movq (%rsp), %rax
movq 0x38(%rax), %rdi
callq 0x116f0
movl %eax, %ecx
movq (%rsp), %rax
movl %ecx, 0x8(%rsp)
movq 0x30(%rax), %rdi
movq 0x10(%rax), %rsi
movq 0x10(%rsp), %rdx
movl 0x8(%rsp), %ecx
callq 0x4b560
andb $0x1, %al
movb %al, 0xf(%rsp)
testb $0x1, 0xf(%rsp)
jne 0x11169
movb $0x0, 0x27(%rsp)
jmp 0x11196
movq (%rsp), %rax
movq 0x30(%rax), %rdi
callq 0x11700
movl %eax, %ecx
movq (%rsp), %rax
movl %ecx, 0x28(%rax)
movq 0x38(%rax), %rdi
callq 0x11710
movl %eax, %ecx
movq (%rsp), %rax
movl %ecx, 0x2c(%rax)
movb $0x1, 0x27(%rsp)
movb 0x27(%rsp), %al
andb $0x1, %al
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: yangwanyuan[P]HLKVDS/src/DS_MultiTier_Impl.cc
// Function: hlkvds::DS_MultiTier_Impl::OpenAllComponents()
bool DS_MultiTier_Impl::OpenAllComponents() {
    bool ret;

    ret = ft_->OpenVolume(bdVec_);

    if (!ret) {
        __ERROR("Fast Tier Open Volume Failed!");
        return false;
    }

    ret = mt_->OpenVolume(bdVec_);
    if (!ret) {
        __ERROR("Medium Tier Open Volume Failed!");
        return false;
    }

    return true;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x30(%rax), %rdi
movq 0x10(%rax), %rsi
callq 0x4b8a0
andb $0x1, %al
movb %al, 0x27(%rsp)
testb $0x1, 0x27(%rsp)
jne 0x11257
jmp 0x111df
movq 0x5fdf2(%rip), %rax     # 0x70fd8
movq (%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x8480
movq 0x10(%rsp), %rdi
movq %rax, %rdx
leaq 0x412af(%rip), %rsi     # 0x524b1
leaq 0x412c8(%rip), %rcx     # 0x524d1
leaq 0x411e4(%rip), %r8      # 0x523f4
movl $0xe1, %r9d
movb $0x0, %al
callq 0x86f0
movq 0x5fdb4(%rip), %rax     # 0x70fd8
movq (%rax), %rdi
leaq 0x412b5(%rip), %rsi     # 0x524e3
movb $0x0, %al
callq 0x86f0
movq 0x5fd9c(%rip), %rax     # 0x70fd8
movq (%rax), %rdi
leaq 0x41b7f(%rip), %rsi     # 0x52dc5
movb $0x0, %al
callq 0x86f0
movb $0x0, 0x37(%rsp)
jmp 0x112f2
movq 0x18(%rsp), %rax
movq 0x38(%rax), %rdi
movq 0x10(%rax), %rsi
callq 0x4da60
andb $0x1, %al
movb %al, 0x27(%rsp)
testb $0x1, 0x27(%rsp)
jne 0x112ed
jmp 0x11278
movq 0x5fd59(%rip), %rax     # 0x70fd8
movq (%rax), %rax
movq %rax, 0x8(%rsp)
callq 0x8480
movq 0x8(%rsp), %rdi
movq %rax, %rdx
leaq 0x41216(%rip), %rsi     # 0x524b1
leaq 0x4122f(%rip), %rcx     # 0x524d1
leaq 0x4114b(%rip), %r8      # 0x523f4
movl $0xe7, %r9d
movb $0x0, %al
callq 0x86f0
movq 0x5fd1b(%rip), %rax     # 0x70fd8
movq (%rax), %rdi
leaq 0x4123a(%rip), %rsi     # 0x52501
movb $0x0, %al
callq 0x86f0
movq 0x5fd03(%rip), %rax     # 0x70fd8
movq (%rax), %rdi
leaq 0x41ae6(%rip), %rsi     # 0x52dc5
movb $0x0, %al
callq 0x86f0
movb $0x0, 0x37(%rsp)
jmp 0x112f2
movb $0x1, 0x37(%rsp)
movb 0x37(%rsp), %al
andb $0x1, %al
addq $0x38, %rsp
retq
nopl (%rax)
// File: yangwanyuan[P]HLKVDS/src/DS_MultiTier_Impl.cc
// Function: hlkvds::DS_MultiTier_Impl::ModifyDeathEntry(hlkvds::HashEntry&)
void DS_MultiTier_Impl::ModifyDeathEntry(HashEntry &entry) {
    TierType tier_type = locateTierFromEntry(&entry);
    if (tier_type == TierType::FastTierType) {
        return ft_->ModifyDeathEntry(entry);
    }
    return mt_->ModifyDeathEntry(entry);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movq 0x18(%rsp), %rsi
callq 0x10c30
movl %eax, 0x14(%rsp)
cmpl $0x0, 0x14(%rsp)
jne 0x113a2
movq 0x8(%rsp), %rax
movq 0x30(%rax), %rdi
movq 0x18(%rsp), %rsi
callq 0x4bdc0
jmp 0x113b5
movq 0x8(%rsp), %rax
movq 0x38(%rax), %rdi
movq 0x18(%rsp), %rsi
callq 0x4e170
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: yangwanyuan[P]HLKVDS/src/DS_MultiTier_Impl.cc
// Function: hlkvds::DS_MultiTier_Impl::GetKeyByHashEntry[abi:cxx11](hlkvds::HashEntry*)
std::string DS_MultiTier_Impl::GetKeyByHashEntry(HashEntry *entry) {
    TierType tier_type = locateTierFromEntry(entry);
    if (tier_type == TierType::FastTierType) {
        return ft_->GetKeyByHashEntry(entry);
    }
    return mt_->GetKeyByHashEntry(entry);
}

// Assembly:
subq $0x38, %rsp
movq %rdi, (%rsp)
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x28(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movq 0x20(%rsp), %rsi
callq 0x10c30
movl %eax, 0x1c(%rsp)
cmpl $0x0, 0x1c(%rsp)
jne 0x11417
movq (%rsp), %rdi
movq 0x10(%rsp), %rax
movq 0x30(%rax), %rsi
movq 0x20(%rsp), %rdx
callq 0x4bdf0
jmp 0x1142e
movq (%rsp), %rdi
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rsi
movq 0x20(%rsp), %rdx
callq 0x4e1c0
movq 0x8(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: yangwanyuan[P]HLKVDS/src/DS_MultiTier_Impl.cc
// Function: hlkvds::DS_MultiTier_Impl::GetValueByHashEntry[abi:cxx11](hlkvds::HashEntry*)
std::string DS_MultiTier_Impl::GetValueByHashEntry(HashEntry *entry) {
    //TODO: find location
    TierType tier_type = locateTierFromEntry(entry);
    if (tier_type == TierType::FastTierType) {
        return ft_->GetValueByHashEntry(entry);
    }
    return mt_->GetValueByHashEntry(entry);
}

// Assembly:
subq $0x38, %rsp
movq %rdi, (%rsp)
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x28(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movq 0x20(%rsp), %rsi
callq 0x10c30
movl %eax, 0x1c(%rsp)
cmpl $0x0, 0x1c(%rsp)
jne 0x11497
movq (%rsp), %rdi
movq 0x10(%rsp), %rax
movq 0x30(%rax), %rsi
movq 0x20(%rsp), %rdx
callq 0x4c0c0
jmp 0x114ae
movq (%rsp), %rdi
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rsi
movq 0x20(%rsp), %rdx
callq 0x4e4c0
movq 0x8(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: yangwanyuan[P]HLKVDS/src/DS_MultiTier_Impl.cc
// Function: hlkvds::DS_MultiTier_Impl::CalcSSTsLengthOnDiskBySegNum(unsigned int)
uint64_t DS_MultiTier_Impl::CalcSSTsLengthOnDiskBySegNum(uint32_t seg_num) {
    uint64_t sst_pure_length = sizeof(SegmentStat) * seg_num;
    uint64_t sst_length = sst_pure_length + sizeof(time_t);
    uint64_t sst_pages = sst_length / getpagesize();
    sst_length = (sst_pages + 1) * getpagesize();
    return sst_length;
}

// Assembly:
subq $0x38, %rsp
movl %edi, 0x34(%rsp)
movl 0x34(%rsp), %eax
imulq $0xc, %rax, %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
callq 0x8860
movl %eax, %ecx
movq 0x8(%rsp), %rax
movslq %ecx, %rcx
xorl %edx, %edx
divq %rcx
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
callq 0x8860
movl %eax, %ecx
movq 0x10(%rsp), %rax
movslq %ecx, %rcx
imulq %rcx, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: yangwanyuan[P]HLKVDS/src/DS_MultiTier_Impl.cc
// Function: hlkvds::DS_MultiTier_Impl::CalcSegNumForFastTierVolume(unsigned long, unsigned long, unsigned int, unsigned int)
uint32_t DS_MultiTier_Impl::CalcSegNumForFastTierVolume(uint64_t capacity, uint64_t sst_offset, uint32_t fast_tier_seg_size, uint32_t med_tier_seg_num) {
    uint64_t valid_capacity = capacity - sst_offset;
    uint32_t seg_num_candidate = valid_capacity / fast_tier_seg_size;

    uint32_t seg_num_total = seg_num_candidate + med_tier_seg_num;
    uint64_t sst_length = DS_MultiTier_Impl::CalcSSTsLengthOnDiskBySegNum( seg_num_total );

    uint32_t seg_size_bit = log2(fast_tier_seg_size);

    while( sst_length + ((uint64_t) seg_num_candidate << seg_size_bit) > valid_capacity) {
         seg_num_candidate--;
         seg_num_total = seg_num_candidate + med_tier_seg_num;
         sst_length = DS_MultiTier_Impl::CalcSSTsLengthOnDiskBySegNum( seg_num_total );
    }
    return seg_num_candidate;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movl %edx, 0x24(%rsp)
movl %ecx, 0x20(%rsp)
movq 0x30(%rsp), %rax
movq 0x28(%rsp), %rcx
subq %rcx, %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movl 0x24(%rsp), %ecx
xorl %edx, %edx
divq %rcx
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %eax
movl 0x20(%rsp), %ecx
addl %ecx, %eax
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %edi
callq 0x114c0
movq %rax, 0x8(%rsp)
movl 0x24(%rsp), %edi
callq 0x11770
cvttsd2si %xmm0, %rax
movl %eax, 0x4(%rsp)
movq 0x8(%rsp), %rax
movl 0x14(%rsp), %ecx
movl %ecx, %edx
movl 0x4(%rsp), %ecx
shlq %cl, %rdx
movq %rdx, %rcx
addq %rcx, %rax
cmpq 0x18(%rsp), %rax
jbe 0x115ee
movl 0x14(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %eax
addl 0x20(%rsp), %eax
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %edi
callq 0x114c0
movq %rax, 0x8(%rsp)
jmp 0x115a8
movl 0x14(%rsp), %eax
addq $0x38, %rsp
retq
nopw (%rax,%rax)
// File: yangwanyuan[P]HLKVDS/src/DS_MultiVolume_Impl.cc
// Function: hlkvds::DS_MultiVolume_Impl::deleteAllSegments()
void DS_MultiVolume_Impl::deleteAllSegments() {
    std::unique_lock<std::mutex> lck_seg_map(segMapMtx_);
    for (int i = 0; i< shardsNum_; i++) {
        SegForReq* seg = segMap_[i];
        delete seg;
        std::mutex *seg_mtx = segMtxVec_[i];
        delete seg_mtx;
    }
    segMap_.clear();
    segMtxVec_.clear();
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq 0x60(%rsp), %rsi
movq %rsi, 0x20(%rsp)
addq $0x60, %rsi
leaq 0x50(%rsp), %rdi
callq 0x15a10
movl $0x0, 0x4c(%rsp)
movq 0x20(%rsp), %rcx
movl 0x4c(%rsp), %eax
cmpl 0x58(%rcx), %eax
jge 0x11c3d
movq 0x20(%rsp), %rdi
addq $0x88, %rdi
leaq 0x4c(%rsp), %rsi
callq 0x16c10
movq %rax, 0x18(%rsp)
jmp 0x11ba8
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
je 0x11bd9
movq 0x10(%rsp), %rdi
callq 0x427e0
movq 0x10(%rsp), %rdi
callq 0x84b0
movq 0x20(%rsp), %rdi
addq $0xb8, %rdi
movslq 0x4c(%rsp), %rsi
callq 0x16d00
movq (%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x11c11
movq 0x8(%rsp), %rdi
callq 0x84b0
jmp 0x11c13
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
jmp 0x11b79
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x15c30
jmp 0x11c6e
movq 0x20(%rsp), %rdi
addq $0x88, %rdi
callq 0x16d20
movq 0x20(%rsp), %rdi
addq $0xb8, %rdi
callq 0x16d30
leaq 0x50(%rsp), %rdi
callq 0x15c30
addq $0x68, %rsp
retq
movq 0x38(%rsp), %rdi
callq 0x8820
nopl (%rax,%rax)
// File: yangwanyuan[P]HLKVDS/src/DS_MultiVolume_Impl.cc
// Function: hlkvds::DS_MultiVolume_Impl::deleteAllVolumes()
void DS_MultiVolume_Impl::deleteAllVolumes() {
    map<int, Volume *>::iterator iter;
    for (iter = volMap_.begin(); iter != volMap_.end(); ) {
        Volume *vol = iter->second;
        delete vol;
        volMap_.erase(iter++);
    }
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x16ad0
movq 0x18(%rsp), %rdi
addq $0x28, %rdi
callq 0x16af0
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x18(%rsp), %rdi
addq $0x28, %rdi
callq 0x16b40
movq %rax, 0x38(%rsp)
leaq 0x48(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x16b20
testb $0x1, %al
jne 0x11ce2
jmp 0x11d51
leaq 0x48(%rsp), %rdi
callq 0x16b70
movq 0x8(%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
je 0x11d19
movq 0x10(%rsp), %rdi
callq 0x50cb0
movq 0x10(%rsp), %rdi
callq 0x84b0
movq 0x18(%rsp), %rax
addq $0x28, %rax
movq %rax, 0x8(%rsp)
leaq 0x48(%rsp), %rdi
xorl %esi, %esi
callq 0x16bd0
movq 0x8(%rsp), %rdi
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rsi
callq 0x16b90
movq %rax, 0x20(%rsp)
jmp 0x11cba
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
// File: yangwanyuan[P]HLKVDS/src/DS_MultiVolume_Impl.cc
// Function: hlkvds::DS_MultiVolume_Impl::InitSegmentBuffer()
void DS_MultiVolume_Impl::InitSegmentBuffer() {
    std::unique_lock<std::mutex> lck_seg_map(segMapMtx_);
    for (int i = 0; i < shardsNum_; i++) {
        int vol_id = pickVol();
        SegForReq * seg = new SegForReq(volMap_[vol_id], idxMgr_, options_.expired_time);
        segMap_.insert(make_pair(i, seg));

        std::mutex *seg_mtx = new mutex();
        segMtxVec_.push_back(seg_mtx);
    }
}

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0xb0(%rsp)
movq 0xb0(%rsp), %rsi
movq %rsi, 0x50(%rsp)
addq $0x60, %rsi
leaq 0xa0(%rsp), %rdi
callq 0x15a10
movl $0x0, 0x9c(%rsp)
movq 0x50(%rsp), %rcx
movl 0x9c(%rsp), %eax
cmpl 0x58(%rcx), %eax
jge 0x11f62
movq 0x50(%rsp), %rdi
callq 0x11fa0
movl %eax, 0x4c(%rsp)
jmp 0x11ded
movl 0x4c(%rsp), %eax
movl %eax, 0x98(%rsp)
movl $0xd8, %edi
callq 0x84f0
movq %rax, 0x40(%rsp)
jmp 0x11e09
movq 0x50(%rsp), %rdi
addq $0x28, %rdi
leaq 0x98(%rsp), %rsi
callq 0x15a50
movq %rax, 0x38(%rsp)
jmp 0x11e26
movq 0x40(%rsp), %rdi
movq 0x50(%rsp), %rcx
movq 0x38(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rcx), %rax
movq 0x20(%rcx), %rdx
movl 0x10(%rax), %ecx
callq 0x42b00
jmp 0x11e4a
movq 0x50(%rsp), %rax
movq 0x40(%rsp), %rcx
movq %rcx, 0x80(%rsp)
addq $0x88, %rax
movq %rax, 0x20(%rsp)
leaq 0x9c(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x15b90
movq %rdx, 0x28(%rsp)
movl %eax, 0x34(%rsp)
jmp 0x11e87
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rax
movl 0x34(%rsp), %ecx
movl %ecx, 0x70(%rsp)
movq %rax, 0x78(%rsp)
leaq 0x70(%rsp), %rsi
callq 0x15b40
movb %dl, 0x17(%rsp)
movq %rax, 0x18(%rsp)
jmp 0x11eb3
movb 0x17(%rsp), %al
movq 0x18(%rsp), %rcx
movq %rcx, 0x60(%rsp)
movb %al, 0x68(%rsp)
movl $0x28, %edi
callq 0x84f0
movq %rax, 0x8(%rsp)
jmp 0x11ed6
movq 0x8(%rsp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
movq $0x0, 0x20(%rdi)
callq 0x15800
movq 0x8(%rsp), %rax
movq 0x50(%rsp), %rdi
movq %rax, 0x58(%rsp)
addq $0xb8, %rdi
leaq 0x58(%rsp), %rsi
callq 0x15bc0
jmp 0x11f14
jmp 0x11f16
movl 0x9c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x9c(%rsp)
jmp 0x11dc8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
jmp 0x11f77
movq 0x40(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
callq 0x84b0
jmp 0x11f77
leaq 0xa0(%rsp), %rdi
callq 0x15c30
addq $0xb8, %rsp
retq
leaq 0xa0(%rsp), %rdi
callq 0x15c30
movq 0x90(%rsp), %rdi
callq 0x8820
nopw %cs:(%rax,%rax)
// File: yangwanyuan[P]HLKVDS/src/DS_MultiVolume_Impl.cc
// Function: hlkvds::DS_MultiVolume_Impl::pickVol()
int DS_MultiVolume_Impl::pickVol() {
    std::lock_guard <std::mutex> l(volIdMtx_);
    if ( pickVolId_ == (int)(volNum_ - 1) ){
        pickVolId_ = 0;
    }
    else {
        pickVolId_++;
    }
    return pickVolId_;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rsi
movq %rsi, 0x10(%rsp)
addq $0xf8, %rsi
leaq 0x18(%rsp), %rdi
callq 0xb5f0
movq 0x10(%rsp), %rcx
movl 0xf0(%rcx), %eax
movl 0xe0(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x11fed
movq 0x10(%rsp), %rax
movl $0x0, 0xf0(%rax)
jmp 0x12001
movq 0x10(%rsp), %rax
movl 0xf0(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xf0(%rax)
movq 0x10(%rsp), %rax
movl 0xf0(%rax), %eax
movl %eax, 0xc(%rsp)
leaq 0x18(%rsp), %rdi
callq 0xb830
movl 0xc(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: yangwanyuan[P]HLKVDS/src/DS_MultiVolume_Impl.cc
// Function: hlkvds::DS_MultiVolume_Impl::StartThds()
void DS_MultiVolume_Impl::StartThds() {
    for (int i = 0; i < shardsNum_; i++) {
        ReqsMergeWQ *req_wq = new ReqsMergeWQ(this, 1);
        req_wq->Start();
        reqWQVec_.push_back(req_wq);
    }

    segWteWQ_ = new SegmentWriteWQ(this, options_.seg_write_thread);
    segWteWQ_->Start();

    segTimeoutT_stop_.store(false);
    segTimeoutT_ = std::thread(&DS_MultiVolume_Impl::SegTimeoutThdEntry, this);

    for (uint32_t i = 0; i < volNum_; i++) {
        volMap_[i]->StartThds();
    }
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x0, 0x5c(%rsp)
movq 0x10(%rsp), %rcx
movl 0x5c(%rsp), %eax
cmpl 0x58(%rcx), %eax
jge 0x120d3
movl $0xd8, %edi
callq 0x84f0
movq 0x10(%rsp), %rsi
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movl $0x1, %edx
callq 0x15c70
jmp 0x1207f
movq 0x8(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rdi
callq 0x15cc0
movq 0x10(%rsp), %rdi
addq $0x140, %rdi            # imm = 0x140
leaq 0x50(%rsp), %rsi
callq 0x15d90
movl 0x5c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x5c(%rsp)
jmp 0x1204b
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
callq 0x84b0
jmp 0x121e8
movl $0xd8, %edi
callq 0x84f0
movq 0x10(%rsp), %rsi
movq %rax, %rdi
movq %rdi, %rax
movq %rax, (%rsp)
movq 0x8(%rsi), %rax
movl 0x14(%rax), %edx
callq 0x15e00
jmp 0x120fa
movq 0x10(%rsp), %rax
movq (%rsp), %rcx
movq %rcx, 0x158(%rax)
movq 0x158(%rax), %rdi
callq 0x15e50
movq 0x10(%rsp), %rdi
addq $0x168, %rdi            # imm = 0x168
xorl %esi, %esi
movl $0x5, %edx
callq 0x15f20
movq 0x10(%rsp), %rax
leaq 0xc6(%rip), %rcx        # 0x12200
movq %rcx, 0x28(%rsp)
movq $0x0, 0x30(%rsp)
movq %rax, 0x20(%rsp)
leaq 0x38(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x20(%rsp), %rdx
callq 0x15fe0
movq 0x10(%rsp), %rdi
addq $0x160, %rdi            # imm = 0x160
leaq 0x38(%rsp), %rsi
callq 0x160b0
leaq 0x38(%rsp), %rdi
callq 0x158b0
movl $0x0, 0x1c(%rsp)
movq 0x10(%rsp), %rcx
movl 0x1c(%rsp), %eax
cmpl 0xe0(%rcx), %eax
jae 0x121e3
movq 0x10(%rsp), %rdi
addq $0x28, %rdi
movl 0x1c(%rsp), %eax
movl %eax, 0x18(%rsp)
leaq 0x18(%rsp), %rsi
callq 0x160f0
movq (%rax), %rdi
callq 0x50d30
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x12189
movq (%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
callq 0x84b0
jmp 0x121e8
addq $0x68, %rsp
retq
movq 0x48(%rsp), %rdi
callq 0x8820
nopw %cs:(%rax,%rax)
// File: yangwanyuan[P]HLKVDS/src/DS_MultiVolume_Impl.cc
// Function: hlkvds::DS_MultiVolume_Impl::StopThds()
void DS_MultiVolume_Impl::StopThds() {
    for (uint32_t i = 0; i < volNum_; i++) {
        volMap_[i]->StopThds();
    }

    segTimeoutT_stop_.store(true);
    segTimeoutT_.join();

    for (int i = 0; i < shardsNum_; i++) {
        ReqsMergeWQ *req_wq = reqWQVec_[i];
        req_wq->Stop();
        delete req_wq;
    }
    reqWQVec_.clear();

    if (segWteWQ_) {
        segWteWQ_->Stop();
        delete segWteWQ_;
    }
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x0, 0x2c(%rsp)
movq 0x10(%rsp), %rcx
movl 0x2c(%rsp), %eax
cmpl 0xe0(%rcx), %eax
jae 0x125dc
movq 0x10(%rsp), %rdi
addq $0x28, %rdi
movl 0x2c(%rsp), %eax
movl %eax, 0x28(%rsp)
leaq 0x28(%rsp), %rsi
callq 0x160f0
movq (%rax), %rdi
callq 0x50e00
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x1259b
movq 0x10(%rsp), %rdi
addq $0x168, %rdi            # imm = 0x168
movl $0x1, %esi
movl $0x5, %edx
callq 0x15f20
movq 0x10(%rsp), %rdi
addq $0x160, %rdi            # imm = 0x160
callq 0x87f0
movl $0x0, 0x24(%rsp)
movq 0x10(%rsp), %rcx
movl 0x24(%rsp), %eax
cmpl 0x58(%rcx), %eax
jge 0x12670
movq 0x10(%rsp), %rdi
addq $0x140, %rdi            # imm = 0x140
movslq 0x24(%rsp), %rsi
callq 0x161e0
movq (%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0x16200
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x12661
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x12663
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x12610
movq 0x10(%rsp), %rdi
addq $0x140, %rdi            # imm = 0x140
callq 0x162b0
movq 0x10(%rsp), %rax
cmpq $0x0, 0x158(%rax)
je 0x126c3
movq 0x10(%rsp), %rax
movq 0x158(%rax), %rdi
callq 0x162d0
movq 0x10(%rsp), %rax
movq 0x158(%rax), %rax
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0x126c1
movq (%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x126c3
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: yangwanyuan[P]HLKVDS/src/DS_MultiVolume_Impl.cc
// Function: hlkvds::DS_MultiVolume_Impl::printDeviceTopologyInfo()
void DS_MultiVolume_Impl::printDeviceTopologyInfo() {
    __INFO("\nDB Device Topology information:\n"
            "\t Segment size                : %d\n"
            "\t Volumes number              : %d",
            sbResHeader_.segment_size, sbResHeader_.volume_num);
    for (uint32_t i = 0 ; i < sbResHeader_.volume_num; i++) {
        __INFO("\nVolume[%d] : dev_path = %s, segment_num = %d, cur_seg_id = %d",
                i, sbResVolVec_[i].dev_path,
                sbResVolVec_[i].segment_num,
                sbResVolVec_[i].cur_seg_id);
    }
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x5e8ee(%rip), %rax     # 0x70fd8
movq (%rax), %rax
movq %rax, 0x28(%rsp)
callq 0x8480
movq 0x28(%rsp), %rdi
movq %rax, %rdx
leaq 0x3fcb6(%rip), %rsi     # 0x523bc
leaq 0x3fccf(%rip), %rcx     # 0x523dc
leaq 0x3fe3d(%rip), %r8      # 0x52551
movl $0x54, %r9d
movb $0x0, %al
callq 0x86f0
movq 0x30(%rsp), %rax
movq 0x5e8ab(%rip), %rcx     # 0x70fd8
movq (%rcx), %rdi
movl 0x120(%rax), %edx
movl 0x124(%rax), %ecx
leaq 0x3fe29(%rip), %rsi     # 0x5256c
movb $0x0, %al
callq 0x86f0
movq 0x5e887(%rip), %rax     # 0x70fd8
movq (%rax), %rdi
leaq 0x4066a(%rip), %rsi     # 0x52dc5
movb $0x0, %al
callq 0x86f0
movl $0x0, 0x3c(%rsp)
movq 0x30(%rsp), %rcx
movl 0x3c(%rsp), %eax
cmpl 0x124(%rcx), %eax
jae 0x1287a
jmp 0x12781
movq 0x5e850(%rip), %rax     # 0x70fd8
movq (%rax), %rax
movq %rax, (%rsp)
callq 0x8480
movq (%rsp), %rdi
movq %rax, %rdx
leaq 0x3fc1a(%rip), %rsi     # 0x523bc
leaq 0x3fc33(%rip), %rcx     # 0x523dc
leaq 0x3fda1(%rip), %r8      # 0x52551
movl $0x59, %r9d
movb $0x0, %al
callq 0x86f0
movq 0x30(%rsp), %rdi
movq 0x5e80f(%rip), %rax     # 0x70fd8
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movl 0x3c(%rsp), %eax
movl %eax, 0x14(%rsp)
addq $0x128, %rdi            # imm = 0x128
movl 0x3c(%rsp), %eax
movl %eax, %esi
callq 0x16380
movq 0x30(%rsp), %rdi
movq %rax, 0x18(%rsp)
addq $0x128, %rdi            # imm = 0x128
movl 0x3c(%rsp), %eax
movl %eax, %esi
callq 0x16380
movq 0x30(%rsp), %rdi
movl 0x100(%rax), %eax
movl %eax, 0x24(%rsp)
addq $0x128, %rdi            # imm = 0x128
movl 0x3c(%rsp), %eax
movl %eax, %esi
callq 0x16380
movq 0x8(%rsp), %rdi
movl 0x14(%rsp), %edx
movq 0x18(%rsp), %rcx
movl 0x24(%rsp), %r8d
movl 0x104(%rax), %r9d
leaq 0x3fd8a(%rip), %rsi     # 0x525d3
movb $0x0, %al
callq 0x86f0
movq 0x5e781(%rip), %rax     # 0x70fd8
movq (%rax), %rdi
leaq 0x40564(%rip), %rsi     # 0x52dc5
movb $0x0, %al
callq 0x86f0
jmp 0x1286a
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x1276a
addq $0x48, %rsp
retq
nop
// File: yangwanyuan[P]HLKVDS/src/DS_MultiVolume_Impl.cc
// Function: hlkvds::DS_MultiVolume_Impl::getReqQueSize()
uint32_t DS_MultiVolume_Impl::getReqQueSize() {
    if (reqWQVec_.empty()) {
        return 0;
    }
    int reqs_num = 0;
    for (int i = 0; i< shardsNum_; i++) {
        ReqsMergeWQ *req_wq = reqWQVec_[i];
        reqs_num += req_wq->Size();
    }
    return reqs_num;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movq %rdi, (%rsp)
addq $0x140, %rdi            # imm = 0x140
callq 0x16920
testb $0x1, %al
jne 0x12954
jmp 0x1295e
movl $0x0, 0x24(%rsp)
jmp 0x129bf
movl $0x0, 0x14(%rsp)
movl $0x0, 0x10(%rsp)
movq (%rsp), %rcx
movl 0x10(%rsp), %eax
cmpl 0x58(%rcx), %eax
jge 0x129b7
movq (%rsp), %rdi
addq $0x140, %rdi            # imm = 0x140
movslq 0x10(%rsp), %rsi
callq 0x161e0
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
callq 0x16970
addl 0x14(%rsp), %eax
movl %eax, 0x14(%rsp)
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x1296e
movl 0x14(%rsp), %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: yangwanyuan[P]HLKVDS/src/DS_MultiVolume_Impl.cc
// Function: hlkvds::DS_MultiVolume_Impl::WriteData(hlkvds::KVSlice&, bool)
Status DS_MultiVolume_Impl::WriteData(KVSlice& slice, bool immediately) {
    if (slice.GetDataLen() > maxValueLen_) {
        return Status::NotSupported("Data length cann't be longer than max segment size");
    }

    if (options_.aggregate_request == 1 && !immediately) {
        return writeDataAggregate(slice);
    }
    else {
        return writeDataImmediately(slice);
    }
}

// Assembly:
subq $0x38, %rsp
movq %rdi, (%rsp)
movb %cl, %al
movq %rdi, %rcx
movq %rcx, 0x8(%rsp)
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
andb $0x1, %al
movb %al, 0x1f(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rdi
callq 0x163a0
movq 0x10(%rsp), %rcx
movzwl %ax, %eax
cmpl 0xdc(%rcx), %eax
jbe 0x12a7d
movq (%rsp), %rdi
leaq 0x3fc0f(%rip), %rsi     # 0x52685
callq 0x163b0
jmp 0x12ac2
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movb 0x38(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x12aaf
testb $0x1, 0x1f(%rsp)
jne 0x12aaf
movq 0x10(%rsp), %rsi
movq (%rsp), %rdi
movq 0x20(%rsp), %rdx
callq 0x12ad0
jmp 0x12ac2
movq 0x10(%rsp), %rsi
movq (%rsp), %rdi
movq 0x20(%rsp), %rdx
callq 0x12c00
movq 0x8(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax)
// File: yangwanyuan[P]HLKVDS/src/DS_MultiVolume_Impl.cc
// Function: hlkvds::DS_MultiVolume_Impl::writeDataAggregate(hlkvds::KVSlice&)
Status DS_MultiVolume_Impl::writeDataAggregate(KVSlice& slice) {

    Request *req = new Request(slice);

    int shards_id = calcShardId(slice);
    req->SetShardsWQId(shards_id);
    ReqsMergeWQ *req_wq = reqWQVec_[shards_id];
    req_wq->Add_task(req);

    req->Wait();
    Status s = updateMeta(req);
    delete req;
    return s;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x8(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq %rdx, 0x50(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x18(%rsp)
movl $0x78, %edi
callq 0x84f0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x20(%rsp)
movq 0x50(%rsp), %rsi
callq 0x41540
jmp 0x12b1b
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x50(%rsp), %rsi
callq 0x15110
movl %eax, 0x38(%rsp)
movq 0x48(%rsp), %rdi
movl 0x38(%rsp), %esi
callq 0x16820
movq 0x18(%rsp), %rdi
addq $0x140, %rdi            # imm = 0x140
movslq 0x38(%rsp), %rsi
callq 0x161e0
movq (%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x16840
movq 0x48(%rsp), %rdi
callq 0x41600
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
movb $0x0, 0x2f(%rsp)
movq 0x48(%rsp), %rdx
callq 0x15150
movq 0x48(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0x12bb7
movq (%rsp), %rdi
callq 0x41470
movq (%rsp), %rdi
callq 0x84b0
movb $0x1, 0x2f(%rsp)
testb $0x1, 0x2f(%rsp)
jne 0x12be9
jmp 0x12bdf
movq 0x20(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
callq 0x84b0
jmp 0x12bf3
movq 0x8(%rsp), %rdi
callq 0xa8b0
movq 0x10(%rsp), %rax
addq $0x68, %rsp
retq
movq 0x40(%rsp), %rdi
callq 0x8820
nopl (%rax)
// File: yangwanyuan[P]HLKVDS/src/DS_MultiVolume_Impl.cc
// Function: hlkvds::DS_MultiVolume_Impl::GetSBReservedContent(char*, unsigned long)
bool DS_MultiVolume_Impl::GetSBReservedContent(char* buf, uint64_t length) {
    if (length != SuperBlockManager::ReservedRegionLength()) {
        return false;
    }
    memset((void*)buf, 0, length);

    //Get sbResHeader_
    uint64_t header_size = sizeof(MultiVolumeDS_SB_Reserved_Header);
    memcpy((void*)buf, (const void*)&sbResHeader_, header_size);
    __DEBUG("SB_RESERVED_HEADER: volume_num= %d, segment_size = %d", sbResHeader_.volume_num, sbResHeader_.segment_size);

    //Get sbResVolVec_
    uint64_t sb_res_vol_size = sizeof(MultiVolumeDS_SB_Reserved_Volume);
    uint32_t vol_num = sbResHeader_.volume_num;
    char * sb_res_vol_ptr = buf + header_size;

    updateAllVolSBRes();

    for (uint32_t i = 0; i < vol_num; i++) {
        memcpy((void*)(sb_res_vol_ptr), (const void*)&sbResVolVec_[i], sb_res_vol_size);
        sb_res_vol_ptr += sb_res_vol_size;
        __DEBUG("Volume [%d], device_path= %s, segment_num = %d, current_seg_id = %d", i, sbResVolVec_[i].dev_path, sbResVolVec_[i].segment_num, sbResVolVec_[i].cur_seg_id);
    }

    return true;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movq %rsi, 0x50(%rsp)
movq %rdx, 0x48(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x18(%rsp)
callq 0x116c0
movq %rax, %rcx
movq 0x18(%rsp), %rax
cmpq %rcx, %rax
je 0x13673
movb $0x0, 0x67(%rsp)
jmp 0x1373a
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rdx
xorl %esi, %esi
callq 0x8280
movq 0x10(%rsp), %rsi
movq $0x8, 0x40(%rsp)
movq 0x50(%rsp), %rdi
addq $0x120, %rsi            # imm = 0x120
movq 0x40(%rsp), %rdx
callq 0x8410
movq 0x10(%rsp), %rdi
movq $0x108, 0x38(%rsp)      # imm = 0x108
movl 0x124(%rdi), %eax
movl %eax, 0x34(%rsp)
movq 0x50(%rsp), %rax
addq 0x40(%rsp), %rax
movq %rax, 0x28(%rsp)
callq 0x13750
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
cmpl 0x34(%rsp), %eax
jae 0x13735
movq 0x10(%rsp), %rdi
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
addq $0x128, %rdi            # imm = 0x128
movl 0x24(%rsp), %eax
movl %eax, %esi
callq 0x16380
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq 0x38(%rsp), %rdx
callq 0x8410
movq 0x38(%rsp), %rax
addq 0x28(%rsp), %rax
movq %rax, 0x28(%rsp)
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x136dc
movb $0x1, 0x67(%rsp)
movb 0x67(%rsp), %al
andb $0x1, %al
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
// File: yangwanyuan[P]HLKVDS/src/DS_MultiVolume_Impl.cc
// Function: hlkvds::DS_MultiVolume_Impl::SetSBReservedContent(char*, unsigned long)
bool DS_MultiVolume_Impl::SetSBReservedContent(char* buf, uint64_t length) {
    if (length != SuperBlockManager::ReservedRegionLength()) {
        return false;
    }

    //Set sbResHeader_
    uint64_t header_size = sizeof(MultiVolumeDS_SB_Reserved_Header);
    memcpy((void*)&sbResHeader_, (const void*)buf, header_size);
    __DEBUG("SB_RESERVED_HEADER: volume_num= %d, segment_size = %d", sbResHeader_.volume_num, sbResHeader_.segment_size);

    //Set sbResVolVec_
    uint64_t sb_res_vol_size = sizeof(MultiVolumeDS_SB_Reserved_Volume);
    uint32_t vol_num = sbResHeader_.volume_num;
    char * sb_res_vol_ptr = buf + header_size;

    for (uint32_t i = 0; i < vol_num; i++) {
        MultiVolumeDS_SB_Reserved_Volume sb_res_vol;
        memcpy((void*)&sb_res_vol, (const void*)sb_res_vol_ptr, sb_res_vol_size);
        sbResVolVec_.push_back(sb_res_vol);
        sb_res_vol_ptr += sb_res_vol_size;
        __DEBUG("Volume [%d], device_path= %s, segment_num = %d, current_seg_id = %d", i, sbResVolVec_[i].dev_path, sbResVolVec_[i].segment_num, sbResVolVec_[i].cur_seg_id);
    }

    return true;
}

// Assembly:
subq $0x168, %rsp            # imm = 0x168
movq %rdi, 0x158(%rsp)
movq %rsi, 0x150(%rsp)
movq %rdx, 0x148(%rsp)
movq 0x158(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x148(%rsp), %rax
movq %rax, 0x10(%rsp)
callq 0x116c0
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
je 0x13838
movb $0x0, 0x167(%rsp)
jmp 0x13923
movq 0x8(%rsp), %rdi
movq $0x8, 0x140(%rsp)
addq $0x120, %rdi            # imm = 0x120
movq 0x150(%rsp), %rsi
movq 0x140(%rsp), %rdx
callq 0x8410
movq 0x8(%rsp), %rax
movq $0x108, 0x138(%rsp) # imm = 0x108
movl 0x124(%rax), %eax
movl %eax, 0x134(%rsp)
movq 0x150(%rsp), %rax
addq 0x140(%rsp), %rax
movq %rax, 0x128(%rsp)
movl $0x0, 0x124(%rsp)
movl 0x124(%rsp), %eax
cmpl 0x134(%rsp), %eax
jae 0x1391b
leaq 0x1c(%rsp), %rdi
callq 0x165d0
movq 0x128(%rsp), %rsi
movq 0x138(%rsp), %rdx
leaq 0x1c(%rsp), %rdi
callq 0x8410
movq 0x8(%rsp), %rdi
addq $0x128, %rdi            # imm = 0x128
leaq 0x1c(%rsp), %rsi
callq 0x16600
movq 0x138(%rsp), %rax
addq 0x128(%rsp), %rax
movq %rax, 0x128(%rsp)
movl 0x124(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x124(%rsp)
jmp 0x138a6
movb $0x1, 0x167(%rsp)
movb 0x167(%rsp), %al
andb $0x1, %al
addq $0x168, %rsp            # imm = 0x168
retq
nopw %cs:(%rax,%rax)
// File: yangwanyuan[P]HLKVDS/src/DS_MultiVolume_Impl.cc
// Function: hlkvds::DS_MultiVolume_Impl::GetAllSSTs(char*, unsigned long)
bool DS_MultiVolume_Impl::GetAllSSTs(char* buf, uint64_t length) {
    uint64_t sst_total_length = GetSSTsLengthOnDisk();
    if (length != sst_total_length) {
        return false;
    }
    char *buf_ptr = buf;

    //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-buf));

    //Copy SST
    for (uint32_t i = 0; i < volNum_; i++) {
        uint64_t vol_sst_length = volMap_[i]->GetSSTLength();
        if ( !volMap_[i]->GetSST(buf_ptr, vol_sst_length) ) {
            return false;
        }
        buf_ptr += vol_sst_length;
    }
    return true;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movq %rsi, 0x50(%rsp)
movq %rdx, 0x48(%rsp)
movq 0x58(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movq (%rdi), %rax
callq *0x98(%rax)
movq %rax, 0x40(%rsp)
movq 0x48(%rsp), %rax
cmpq 0x40(%rsp), %rax
je 0x13981
movb $0x0, 0x67(%rsp)
jmp 0x13a87
movq 0x50(%rsp), %rax
movq %rax, 0x38(%rsp)
callq 0x116e0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x30(%rsp)
movq 0xd0(%rax), %rdi
callq 0x50710
movq 0x8(%rsp), %rax
movq 0xd0(%rax), %rdi
callq 0x506e0
movq %rax, 0x28(%rsp)
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rdx
leaq 0x28(%rsp), %rsi
callq 0x8410
movq 0x30(%rsp), %rax
addq 0x38(%rsp), %rax
movq %rax, 0x38(%rsp)
movl $0x0, 0x24(%rsp)
movq 0x8(%rsp), %rcx
movl 0x24(%rsp), %eax
cmpl 0xe0(%rcx), %eax
jae 0x13a82
movq 0x8(%rsp), %rdi
addq $0x28, %rdi
movl 0x24(%rsp), %eax
movl %eax, 0x14(%rsp)
leaq 0x14(%rsp), %rsi
callq 0x160f0
movq (%rax), %rdi
callq 0x510c0
movq 0x8(%rsp), %rdi
movq %rax, 0x18(%rsp)
addq $0x28, %rdi
movl 0x24(%rsp), %eax
movl %eax, 0x10(%rsp)
leaq 0x10(%rsp), %rsi
callq 0x160f0
movq (%rax), %rdi
movq 0x38(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x50e70
xorb $-0x1, %al
testb $0x1, %al
jne 0x13a5c
jmp 0x13a63
movb $0x0, 0x67(%rsp)
jmp 0x13a87
movq 0x18(%rsp), %rax
addq 0x38(%rsp), %rax
movq %rax, 0x38(%rsp)
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x139ea
movb $0x1, 0x67(%rsp)
movb 0x67(%rsp), %al
andb $0x1, %al
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
// File: yangwanyuan[P]HLKVDS/src/DS_MultiVolume_Impl.cc
// Function: hlkvds::DS_MultiVolume_Impl::SetAllSSTs(char*, unsigned long)
bool DS_MultiVolume_Impl::SetAllSSTs(char* buf, uint64_t length) {
    uint64_t sst_total_length = GetSSTsLengthOnDisk();
    if (length != sst_total_length) {
        return false;
    }
    char *buf_ptr = buf;

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

    //Set SST
    for (uint32_t i = 0; i < volNum_; i++) {
        uint64_t vol_sst_length = volMap_[i]->GetSSTLength();
        if ( !volMap_[i]->SetSST(buf_ptr, vol_sst_length) ) {
            return false;
        }
        buf_ptr += vol_sst_length;
    }
    return true;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movq %rsi, 0x50(%rsp)
movq %rdx, 0x48(%rsp)
movq 0x58(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movq (%rdi), %rax
callq *0x98(%rax)
movq %rax, 0x40(%rsp)
movq 0x48(%rsp), %rax
cmpq 0x40(%rsp), %rax
je 0x13ae1
movb $0x0, 0x67(%rsp)
jmp 0x13bd3
movq 0x50(%rsp), %rax
movq %rax, 0x38(%rsp)
callq 0x116e0
movq %rax, 0x30(%rsp)
movq 0x38(%rsp), %rsi
movq 0x30(%rsp), %rdx
leaq 0x28(%rsp), %rdi
callq 0x8410
movq 0x8(%rsp), %rax
movq 0xd0(%rax), %rdi
movq 0x28(%rsp), %rsi
callq 0x506c0
movq 0x30(%rsp), %rax
addq 0x38(%rsp), %rax
movq %rax, 0x38(%rsp)
movl $0x0, 0x24(%rsp)
movq 0x8(%rsp), %rcx
movl 0x24(%rsp), %eax
cmpl 0xe0(%rcx), %eax
jae 0x13bce
movq 0x8(%rsp), %rdi
addq $0x28, %rdi
movl 0x24(%rsp), %eax
movl %eax, 0x14(%rsp)
leaq 0x14(%rsp), %rsi
callq 0x160f0
movq (%rax), %rdi
callq 0x510c0
movq 0x8(%rsp), %rdi
movq %rax, 0x18(%rsp)
addq $0x28, %rdi
movl 0x24(%rsp), %eax
movl %eax, 0x10(%rsp)
leaq 0x10(%rsp), %rsi
callq 0x160f0
movq (%rax), %rdi
movq 0x38(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x50ea0
xorb $-0x1, %al
testb $0x1, %al
jne 0x13ba8
jmp 0x13baf
movb $0x0, 0x67(%rsp)
jmp 0x13bd3
movq 0x18(%rsp), %rax
addq 0x38(%rsp), %rax
movq %rax, 0x38(%rsp)
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x13b36
movb $0x1, 0x67(%rsp)
movb 0x67(%rsp), %al
andb $0x1, %al
addq $0x68, %rsp
retq
nop
// File: yangwanyuan[P]HLKVDS/src/DS_MultiVolume_Impl.cc
// Function: hlkvds::DS_MultiVolume_Impl::calcSegNumForMetaVolume(unsigned long, unsigned long, unsigned int, unsigned int)
uint32_t DS_MultiVolume_Impl::calcSegNumForMetaVolume(uint64_t capacity, uint64_t sst_offset, uint32_t total_buddy_seg_num, uint32_t seg_size) {
    uint64_t valid_capacity = capacity - sst_offset;
    uint32_t seg_num_candidate = valid_capacity / seg_size;

    uint32_t seg_num_total = seg_num_candidate + total_buddy_seg_num;
    uint64_t sst_length = calcSSTsLengthOnDiskBySegNum( seg_num_total );

    uint32_t seg_size_bit = log2(seg_size);

    while( sst_length + ((uint64_t) seg_num_candidate << seg_size_bit) > valid_capacity) {
         seg_num_candidate--;
         seg_num_total = seg_num_candidate + total_buddy_seg_num;
         sst_length = calcSSTsLengthOnDiskBySegNum( seg_num_total );
    }
    return seg_num_candidate;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movl %ecx, 0x2c(%rsp)
movl %r8d, 0x28(%rsp)
movq 0x40(%rsp), %rdi
movq %rdi, (%rsp)
movq 0x38(%rsp), %rax
movq 0x30(%rsp), %rcx
subq %rcx, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movl 0x28(%rsp), %ecx
xorl %edx, %edx
divq %rcx
movl %eax, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
movl 0x2c(%rsp), %ecx
addl %ecx, %eax
movl %eax, 0x18(%rsp)
movl 0x18(%rsp), %esi
callq 0x14170
movq %rax, 0x10(%rsp)
movl 0x28(%rsp), %edi
callq 0x11770
cvttsd2si %xmm0, %rax
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rax
movl 0x1c(%rsp), %ecx
movl %ecx, %edx
movl 0xc(%rsp), %ecx
shlq %cl, %rdx
movq %rdx, %rcx
addq %rcx, %rax
cmpq 0x20(%rsp), %rax
jbe 0x14161
movq (%rsp), %rdi
movl 0x1c(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
addl 0x2c(%rsp), %eax
movl %eax, 0x18(%rsp)
movl 0x18(%rsp), %esi
callq 0x14170
movq %rax, 0x10(%rsp)
jmp 0x14117
movl 0x1c(%rsp), %eax
addq $0x48, %rsp
retq
nopw (%rax,%rax)
// File: yangwanyuan[P]HLKVDS/src/DS_MultiVolume_Impl.cc
// Function: hlkvds::DS_MultiVolume_Impl::initSBReservedContentForCreate()
void DS_MultiVolume_Impl::initSBReservedContentForCreate() {
    sbResHeader_.segment_size = segSize_;
    sbResHeader_.volume_num = volNum_;

    for(uint32_t i = 0; i < volNum_; i++)
    {
        MultiVolumeDS_SB_Reserved_Volume sb_res_vol;

        string dev_path = volMap_[i]->GetDevicePath();
        memcpy((void*)&sb_res_vol.dev_path, (const void*)dev_path.c_str(), dev_path.size());

        sb_res_vol.segment_num = volMap_[i]->GetNumberOfSeg();
        sb_res_vol.cur_seg_id = volMap_[i]->GetCurSegId();

        sbResVolVec_.push_back(sb_res_vol);
    }
}

// Assembly:
subq $0x198, %rsp            # imm = 0x198
movq %rdi, 0x190(%rsp)
movq 0x190(%rsp), %rax
movq %rax, 0x40(%rsp)
movl 0xd8(%rax), %ecx
movl %ecx, 0x120(%rax)
movl 0xe0(%rax), %ecx
movl %ecx, 0x124(%rax)
movl $0x0, 0x18c(%rsp)
movq 0x40(%rsp), %rcx
movl 0x18c(%rsp), %eax
cmpl 0xe0(%rcx), %eax
jae 0x14390
leaq 0x84(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x165d0
movq 0x40(%rsp), %rdi
addq $0x28, %rdi
movq %rdi, 0x30(%rsp)
movl 0x18c(%rsp), %eax
movl %eax, 0x5c(%rsp)
leaq 0x5c(%rsp), %rsi
callq 0x160f0
movq (%rax), %rsi
leaq 0x60(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x51090
movq 0x18(%rsp), %rdi
callq 0x8180
movq 0x18(%rsp), %rdi
movq %rax, 0x28(%rsp)
callq 0x8350
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq %rax, %rdx
callq 0x8410
movq 0x30(%rsp), %rdi
movl 0x18c(%rsp), %eax
movl %eax, 0x58(%rsp)
leaq 0x58(%rsp), %rsi
callq 0x160f0
movq %rax, 0x38(%rsp)
jmp 0x142da
movq 0x38(%rsp), %rax
movq (%rax), %rdi
callq 0x16d50
movl %eax, 0x14(%rsp)
jmp 0x142ed
movq 0x40(%rsp), %rdi
movl 0x14(%rsp), %eax
movl %eax, 0x184(%rsp)
addq $0x28, %rdi
movl 0x18c(%rsp), %eax
movl %eax, 0x48(%rsp)
leaq 0x48(%rsp), %rsi
callq 0x160f0
movq %rax, 0x8(%rsp)
jmp 0x1431d
movq 0x8(%rsp), %rax
movq (%rax), %rdi
callq 0x51070
movl %eax, 0x4(%rsp)
jmp 0x14330
movq 0x40(%rsp), %rdi
movl 0x4(%rsp), %eax
movl %eax, 0x188(%rsp)
addq $0x128, %rdi            # imm = 0x128
leaq 0x84(%rsp), %rsi
callq 0x16600
jmp 0x14356
leaq 0x60(%rsp), %rdi
callq 0x8928
movl 0x18c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18c(%rsp)
jmp 0x1422f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x8928
jmp 0x14398
addq $0x198, %rsp            # imm = 0x198
retq
movq 0x50(%rsp), %rdi
callq 0x8820
nopw %cs:(%rax,%rax)
// File: yangwanyuan[P]HLKVDS/src/DS_MultiVolume_Impl.cc
// Function: hlkvds::DS_MultiVolume_Impl::verifyTopology()
bool DS_MultiVolume_Impl::verifyTopology() {
    if (volNum_ != bdVec_.size()) {
        return false;
    }
    for (uint32_t i = 0; i < volNum_; i++) {
        string record_path = string(sbResVolVec_[i].dev_path);
        string device_path = bdVec_[i]->GetDevicePath();
        if (record_path != device_path) {
            __ERROR("record_path: %s, device_path:%s ", record_path.c_str(), device_path.c_str());
            return false;
        }
    }
    return true;
}

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0xa8(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x30(%rsp)
movl 0xe0(%rax), %ecx
movq %rcx, 0x38(%rsp)
movq 0x10(%rax), %rdi
callq 0x166c0
movq %rax, %rcx
movq 0x38(%rsp), %rax
cmpq %rcx, %rax
je 0x1485a
movb $0x0, 0xb7(%rsp)
jmp 0x14a47
movl $0x0, 0xa4(%rsp)
movq 0x30(%rsp), %rcx
movl 0xa4(%rsp), %eax
cmpl 0xe0(%rcx), %eax
jae 0x14a3f
movq 0x30(%rsp), %rdi
addq $0x128, %rdi            # imm = 0x128
movl 0xa4(%rsp), %eax
movl %eax, %esi
callq 0x16380
movq %rax, 0x20(%rsp)
leaq 0x7f(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x8830
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
leaq 0x80(%rsp), %rdi
callq 0x8680
jmp 0x148c4
leaq 0x7f(%rsp), %rdi
callq 0x8540
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rdi
movl 0xa4(%rsp), %eax
movl %eax, %esi
callq 0x166e0
movq (%rax), %rsi
movq (%rsi), %rax
movq 0x28(%rax), %rax
leaq 0x48(%rsp), %rdi
callq *%rax
jmp 0x148f8
leaq 0x80(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x16d60
testb $0x1, %al
jne 0x14913
jmp 0x149fc
jmp 0x14915
movq 0x5c6bc(%rip), %rax     # 0x70fd8
movq (%rax), %rax
movq %rax, 0x8(%rsp)
callq 0x8480
movq 0x8(%rsp), %rdi
movq %rax, %rdx
leaq 0x3db79(%rip), %rsi     # 0x524b1
leaq 0x3df79(%rip), %rcx     # 0x528b8
leaq 0x3dc0b(%rip), %r8      # 0x52551
movl $0x263, %r9d            # imm = 0x263
movb $0x0, %al
callq 0x86f0
movq 0x5c67e(%rip), %rax     # 0x70fd8
movq (%rax), %rax
movq %rax, 0x10(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x8180
movq %rax, 0x18(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x8180
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rdx
movq %rax, %rcx
leaq 0x3df35(%rip), %rsi     # 0x528c7
movb $0x0, %al
callq 0x86f0
movq 0x5c638(%rip), %rax     # 0x70fd8
movq (%rax), %rdi
leaq 0x3e41b(%rip), %rsi     # 0x52dc5
movb $0x0, %al
callq 0x86f0
jmp 0x149b3
movb $0x0, 0xb7(%rsp)
movl $0x1, 0x44(%rsp)
jmp 0x14a04
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
leaq 0x7f(%rsp), %rdi
callq 0x8540
jmp 0x14a58
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x8928
jmp 0x14a58
movl $0x0, 0x44(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x8928
leaq 0x80(%rsp), %rdi
callq 0x8928
movl 0x44(%rsp), %eax
testl %eax, %eax
je 0x14a27
jmp 0x14a25
jmp 0x14a47
jmp 0x14a29
movl 0xa4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xa4(%rsp)
jmp 0x14865
movb $0x1, 0xb7(%rsp)
movb 0xb7(%rsp), %al
andb $0x1, %al
addq $0xb8, %rsp
retq
movq 0x70(%rsp), %rdi
callq 0x8820
nopw %cs:(%rax,%rax)