// File: yangwanyuan[P]HLKVDS/src/Tier.cc
// Function: hlkvds::FastTier::OpenVolume(std::vector<hlkvds::BlockDevice*, std::allocator<hlkvds::BlockDevice*>>&)
bool FastTier::OpenVolume(std::vector<BlockDevice*> &bd_vec) {
    segSize_ = sbResFastTier_.segment_size;
    segNum_ = sbResFastTier_.segment_num;
    maxValueLen_ = segSize_ - SegBase::SizeOfSegOnDisk() - IndexManager::SizeOfHashEntryOnDisk();
    sstLengthOnDisk_ = sbMgr_->GetSSTRegionLength();

    if (!verifyTopology(bd_vec)) {
        __ERROR("TheDevice Topology is inconsistent");
        return false;
    }

    BlockDevice *bdev = bd_vec[0];
    uint32_t cur_id = sbResFastTier_.cur_seg_id;
    uint64_t start_off = sbMgr_->GetSSTRegionOffset() + sbMgr_->GetSSTRegionLength();
    vol_ = new Volume(bdev, idxMgr_, options_, hlkvds::FastTierVolId, start_off, segSize_, segNum_, cur_id);
    return true;
}

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x78(%rsp)
movq %rsi, 0x70(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x40(%rsp)
movl 0x18(%rax), %ecx
movl %ecx, 0x1d0(%rax)
movl 0x11c(%rax), %ecx
movl %ecx, 0x1d4(%rax)
movl 0x1d0(%rax), %eax
movq %rax, 0x30(%rsp)
callq 0x166a0
movq %rax, %rcx
movq 0x30(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x38(%rsp)
callq 0x166b0
movq 0x38(%rsp), %rcx
movq %rax, %rdx
movq 0x40(%rsp), %rax
subq %rdx, %rcx
movl %ecx, 0x1c0(%rax)
movq 0x8(%rax), %rdi
callq 0x167b0
movq 0x40(%rsp), %rdi
movq %rax, 0x1c8(%rdi)
movq 0x70(%rsp), %rsi
callq 0x4bab0
testb $0x1, %al
jne 0x4b9ab
jmp 0x4b930
movq 0x256a1(%rip), %rax     # 0x70fd8
movq (%rax), %rax
movq %rax, 0x28(%rsp)
callq 0x8480
movq 0x28(%rsp), %rdi
movq %rax, %rdx
leaq 0x6b5e(%rip), %rsi      # 0x524b1
leaq 0x8c71(%rip), %rcx      # 0x545cb
leaq 0x8b81(%rip), %r8       # 0x544e2
movl $0x103, %r9d            # imm = 0x103
movb $0x0, %al
callq 0x86f0
movq 0x25663(%rip), %rax     # 0x70fd8
movq (%rax), %rdi
leaq 0x8c57(%rip), %rsi      # 0x545d6
movb $0x0, %al
callq 0x86f0
movq 0x2564b(%rip), %rax     # 0x70fd8
movq (%rax), %rdi
leaq 0x742e(%rip), %rsi      # 0x52dc5
movb $0x0, %al
callq 0x86f0
movb $0x0, 0x87(%rsp)
jmp 0x4ba90
movq 0x70(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x166e0
movq %rax, %rcx
movq 0x40(%rsp), %rax
movq (%rcx), %rcx
movq %rcx, 0x68(%rsp)
movl 0x120(%rax), %ecx
movl %ecx, 0x64(%rsp)
movq 0x8(%rax), %rdi
callq 0x167c0
movq %rax, %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x18(%rsp)
movq 0x8(%rax), %rdi
callq 0x167b0
movq %rax, %rcx
movq 0x18(%rsp), %rax
addq %rcx, %rax
movq %rax, 0x58(%rsp)
movl $0x58, %edi
callq 0x84f0
movq %rax, %rdi
movq 0x40(%rsp), %rax
movq %rdi, %rcx
movq %rcx, 0x20(%rsp)
movq 0x68(%rsp), %rsi
movq (%rax), %rcx
movq 0x10(%rax), %rdx
movq 0x58(%rsp), %r9
movl 0x1d0(%rax), %r8d
movl 0x1d4(%rax), %r10d
movl 0x64(%rsp), %r11d
movq %rsp, %rax
movl %r11d, 0x10(%rax)
movl %r10d, 0x8(%rax)
movl %r8d, (%rax)
movl $0x64, %r8d
callq 0x50b10
jmp 0x4ba5b
movq 0x40(%rsp), %rax
movq 0x20(%rsp), %rcx
movq %rcx, 0x1d8(%rax)
movb $0x1, 0x87(%rsp)
jmp 0x4ba90
movq 0x20(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
callq 0x84b0
jmp 0x4baa1
movb 0x87(%rsp), %al
andb $0x1, %al
addq $0x88, %rsp
retq
movq 0x50(%rsp), %rdi
callq 0x8820
nopl (%rax,%rax)