// File: yangwanyuan[P]HLKVDS/src/Tier.cc
// Function: hlkvds::MediumTier::verifyTopology(std::vector<hlkvds::BlockDevice*, std::allocator<hlkvds::BlockDevice*>>&)
bool MediumTier::verifyTopology(std::vector<BlockDevice*> &bd_vec) {
    int fast_tier_device_num = hlkvds::FastTierVolNum;

    // Verify MediumTier Volume Number
    if (volNum_ != bd_vec.size() - fast_tier_device_num) {
        __ERROR("record MediumTierVolNum_ = %d, total block device number: %d", volNum_, (int)bd_vec.size() );
        return false;
    }

    // Verify MediumTier every Volume
    for (uint32_t i = 0; i < volNum_; i++) {
        string record_path = string(sbResMediumTierVolVec_[i].dev_path);
        string device_path = bd_vec[i + fast_tier_device_num]->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 $0xd8, %rsp
movq %rdi, 0xc8(%rsp)
movq %rsi, 0xc0(%rsp)
movq 0xc8(%rsp), %rax
movq %rax, 0x48(%rsp)
movl $0x1, 0xbc(%rsp)
movl 0x40(%rax), %eax
movq %rax, 0x50(%rsp)
movq 0xc0(%rsp), %rdi
callq 0x166c0
movq %rax, %rcx
movq 0x50(%rsp), %rax
movslq 0xbc(%rsp), %rdx
subq %rdx, %rcx
cmpq %rcx, %rax
je 0x4ddc6
jmp 0x4dd22
movq 0x232af(%rip), %rax     # 0x70fd8
movq (%rax), %rax
movq %rax, 0x30(%rsp)
callq 0x8480
movq 0x30(%rsp), %rdi
movq %rax, %rdx
leaq 0x476c(%rip), %rsi      # 0x524b1
leaq 0x4b6c(%rip), %rcx      # 0x528b8
leaq 0x678f(%rip), %r8       # 0x544e2
movl $0x39f, %r9d            # imm = 0x39F
movb $0x0, %al
callq 0x86f0
movq 0x48(%rsp), %rax
movq 0x2326c(%rip), %rcx     # 0x70fd8
movq (%rcx), %rcx
movq %rcx, 0x38(%rsp)
movl 0x40(%rax), %eax
movl %eax, 0x44(%rsp)
movq 0xc0(%rsp), %rdi
callq 0x166c0
movq 0x38(%rsp), %rdi
movl 0x44(%rsp), %edx
movl %eax, %ecx
leaq 0x6989(%rip), %rsi      # 0x54723
movb $0x0, %al
callq 0x86f0
movq 0x23230(%rip), %rax     # 0x70fd8
movq (%rax), %rdi
leaq 0x5013(%rip), %rsi      # 0x52dc5
movb $0x0, %al
callq 0x86f0
movb $0x0, 0xd7(%rsp)
jmp 0x4dfca
movl $0x0, 0xb8(%rsp)
movq 0x48(%rsp), %rcx
movl 0xb8(%rsp), %eax
cmpl 0x40(%rcx), %eax
jae 0x4dfc2
movq 0x48(%rsp), %rdi
addq $0x20, %rdi
movl 0xb8(%rsp), %eax
movl %eax, %esi
callq 0x4eca0
movq %rax, 0x20(%rsp)
leaq 0x97(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x8830
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
leaq 0x98(%rsp), %rdi
callq 0x8680
jmp 0x4de2d
leaq 0x97(%rsp), %rdi
callq 0x8540
movq 0xc0(%rsp), %rdi
movl 0xb8(%rsp), %eax
movl 0xbc(%rsp), %ecx
addl %ecx, %eax
movl %eax, %esi
callq 0x166e0
movq (%rax), %rsi
movq (%rsi), %rax
movq 0x28(%rax), %rax
leaq 0x60(%rsp), %rdi
callq *%rax
jmp 0x4de6c
leaq 0x98(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x16d60
testb $0x1, %al
jne 0x4de87
jmp 0x4df7f
jmp 0x4de89
movq 0x23148(%rip), %rax     # 0x70fd8
movq (%rax), %rax
movq %rax, 0x8(%rsp)
callq 0x8480
movq 0x8(%rsp), %rdi
movq %rax, %rdx
leaq 0x4605(%rip), %rsi      # 0x524b1
leaq 0x4a05(%rip), %rcx      # 0x528b8
leaq 0x6628(%rip), %r8       # 0x544e2
movl $0x3a8, %r9d            # imm = 0x3A8
movb $0x0, %al
callq 0x86f0
movq 0x2310a(%rip), %rax     # 0x70fd8
movq (%rax), %rax
movq %rax, 0x10(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x8180
movq %rax, 0x18(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x8180
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rdx
movq %rax, %rcx
leaq 0x49c1(%rip), %rsi      # 0x528c7
movb $0x0, %al
callq 0x86f0
movq 0x230c4(%rip), %rax     # 0x70fd8
movq (%rax), %rdi
leaq 0x4ea7(%rip), %rsi      # 0x52dc5
movb $0x0, %al
callq 0x86f0
jmp 0x4df27
movb $0x0, 0xd7(%rsp)
movl $0x1, 0x5c(%rsp)
jmp 0x4df87
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
leaq 0x97(%rsp), %rdi
callq 0x8540
jmp 0x4dfdb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x8928
jmp 0x4dfdb
movl $0x0, 0x5c(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x8928
leaq 0x98(%rsp), %rdi
callq 0x8928
movl 0x5c(%rsp), %eax
testl %eax, %eax
je 0x4dfaa
jmp 0x4dfa8
jmp 0x4dfca
jmp 0x4dfac
movl 0xb8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xb8(%rsp)
jmp 0x4ddd1
movb $0x1, 0xd7(%rsp)
movb 0xd7(%rsp), %al
andb $0x1, %al
addq $0xd8, %rsp
retq
movq 0x88(%rsp), %rdi
callq 0x8820
nopl (%rax,%rax)