// File: /workspace/github_cpp_makefile_star2_O2/BU-DiSC[P]BF-Shared-Hashing/BF_bit.cpp
// Function: BFHash::getLevelwiseHashDigest(int)
vector<uint64_t>* BFHash::getLevelwiseHashDigest(int level){
        if((!share_hash_across_levels_ && level != -1)|| hash_digests_->size() == 0 || reset){
	    if(hash_digests_ == nullptr){
		hash_digests_ = new vector<uint64_t>(num_filter_units_, 0);
	    }
	    if(share_hash_across_filter_units_ == 0){
                for(int i = 0; i < num_filter_units_; i++){
                    hash_digests_->at(i) = getFilterUnitwiseHashDigest(i);
                }
            }else if(share_hash_across_filter_units_ == 1){
                uint64_t last_hash_digest = getFilterUnitwiseHashDigest(0);
                hash_digests_->at(0) = last_hash_digest;
		uint64_t delta = last_hash_digest << 17 | last_hash_digest >> 15;
                for(int i = 1; i < num_filter_units_; i++){
                   last_hash_digest = last_hash_digest + delta; 
                   hash_digests_->at(i) = last_hash_digest;
                }
            }else{
                uint64_t hash_digest1 = getFilterUnitwiseHashDigest(0);
                if(num_filter_units_ == 1){
                   hash_digests_->at(0) = hash_digest1;
                }else{
		   HashType ht = filter_unit_hash_funcs_[0];
		   HashType ht2 = MD5;
                   for(auto t_ht: { MD5, MurMurhash, CRC, XXhash, MurMur64, SHA2}){
                      if(t_ht != ht){
                          ht2 = t_ht;
			  break;
                      }
                   }
                   uint32_t seed = filter_unit_seeds_[0];
	           uint64_t hash_digest2 = get_hash_digest(key_, ht2, seed + (seed << 17 | seed >> 15));
                   for(int i = 0; i < num_filter_units_; i++){
                       hash_digests_->at(i) = hash_digest1 + i*hash_digest2;
                   }
                }
                
            }
	    reset = false;
	}
	return hash_digests_;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x267d1(%rip), %rax     # 0x354a8
cmpl $-0x1, %esi
je 0xed1b
cmpb $0x0, 0x266f5(%rip)     # 0x353d8
jne 0xed1b
testq %rax, %rax
jne 0xed31
pushq $0x18
popq %rdi
callq 0x6420
movq %rax, %r14
movslq 0x266e4(%rip), %rsi     # 0x353e0
leaq 0x8(%rsp), %rdx
andq $0x0, (%rdx)
leaq 0x7(%rsp), %rcx
movq %rax, %rdi
callq 0xb326
movq %r14, 0x2678f(%rip)     # 0x354a8
jmp 0xed31
movq 0x8(%rax), %rcx
cmpq (%rax), %rcx
je 0xed31
cmpb $0x0, 0x266bd(%rip)     # 0x353e8
je 0xee0d
movl 0x266a5(%rip), %eax     # 0x353dc
cmpl $0x1, %eax
je 0xed7c
testl %eax, %eax
jne 0xedd8
xorl %r14d, %r14d
movslq 0x26692(%rip), %rax     # 0x353e0
cmpq %rax, %r14
jge 0xedff
movq %rbx, %rdi
movl %r14d, %esi
callq 0xeb76
movq %rax, %r15
movq 0x2673c(%rip), %rdi     # 0x354a8
movq %r14, %rsi
callq 0xb6d8
movq %r15, (%rax)
incq %r14
jmp 0xed47
movq %rbx, %rdi
xorl %esi, %esi
callq 0xeb76
movq %rax, %rbx
movq 0x26718(%rip), %rdi     # 0x354a8
xorl %esi, %esi
callq 0xb6d8
movq %rbx, (%rax)
movq %rbx, %rax
shlq $0x11, %rax
movq %rbx, %r15
shrq $0xf, %r15
orq %rax, %r15
addq %r15, %rbx
pushq $0x1
popq %r14
movslq 0x26627(%rip), %rax     # 0x353e0
cmpq %rax, %r14
jge 0xedff
movq 0x266e3(%rip), %rdi     # 0x354a8
movq %r14, %rsi
callq 0xb6d8
movq %rbx, (%rax)
incq %r14
addq %r15, %rbx
jmp 0xedb2
movq %rbx, %rdi
xorl %esi, %esi
callq 0xeb76
movq %rax, %r14
cmpl $0x1, 0x265f4(%rip)     # 0x353e0
jne 0xee17
movq 0x266b3(%rip), %rdi     # 0x354a8
xorl %esi, %esi
callq 0xb6d8
movq %r14, (%rax)
movb $0x0, 0x265e2(%rip)     # 0x353e8
movq 0x2669b(%rip), %rax     # 0x354a8
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0x2665a(%rip), %rax     # 0x35478
movl (%rax), %eax
xorl %ecx, %ecx
leaq 0x138af(%rip), %rdx     # 0x226d8
cmpq $0x18, %rcx
je 0xee3c
movl (%rcx,%rdx), %esi
addq $0x4, %rcx
cmpl %eax, %esi
je 0xee29
jmp 0xee3e
xorl %esi, %esi
movq 0x2664b(%rip), %rax     # 0x35490
movl (%rax), %eax
movl %eax, %edx
roll $0x11, %edx
addl %eax, %edx
movq %rbx, %rdi
callq 0xeb92
movq %rax, %rbx
xorl %r15d, %r15d
movslq 0x2657d(%rip), %rax     # 0x353e0
cmpq %rax, %r15
jge 0xedff
movq 0x26639(%rip), %rdi     # 0x354a8
movq %r15, %rsi
callq 0xb6d8
movq %r14, (%rax)
incq %r15
addq %rbx, %r14
jmp 0xee5c
movq %rax, %rbx
movq %r14, %rdi
callq 0x63f0
movq %rbx, %rdi
callq 0x66b0