// File: /workspace/github_cpp_makefile_star2_O2/attractivechaos[P]udb2/tsl_hopscotch_map/./hopscotch_hash.h
// Function: void tsl::detail_hopscotch_hash::hopscotch_hash<std::pair<unsigned int const, unsigned int>, tsl::bhopscotch_map<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, unsigned int>>, 62u, false, tsl::hh::power_of_two_growth_policy<2ul>>::KeySelect, tsl::bhopscotch_map<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, unsigned int>>, 62u, false, tsl::hh::power_of_two_growth_policy<2ul>>::ValueSelect, Hash32, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int const, unsigned int>>, 62u, false, tsl::hh::power_of_two_growth_policy<2ul>, std::map<unsigned int, unsigned int, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, unsigned int>>>>::rehash_impl<std::pair<unsigned int const, unsigned int>, (void*)0>(unsigned long)
void rehash_impl(size_type count_) {
        hopscotch_hash new_map = new_hopscotch_hash(count_);
        
        if(!m_overflow_elements.empty()) {
            new_map.m_overflow_elements.swap(m_overflow_elements);
            new_map.m_nb_elements += new_map.m_overflow_elements.size();
            
            for(const value_type& value : new_map.m_overflow_elements) {
                const std::size_t ibucket_for_hash = new_map.bucket_for_hash(new_map.hash_key(KeySelect()(value)));
                new_map.m_buckets[ibucket_for_hash].set_overflow(true);
            }
        }
        
        try {
            const bool use_stored_hash = USE_STORED_HASH_ON_REHASH(new_map.bucket_count());
            for(auto it_bucket = m_buckets_data.begin(); it_bucket != m_buckets_data.end(); ++it_bucket) {
                if(it_bucket->empty()) {
                    continue;
                }
                
                const std::size_t hash = use_stored_hash?
                                            it_bucket->truncated_bucket_hash():
                                            new_map.hash_key(KeySelect()(it_bucket->value()));
                const std::size_t ibucket_for_hash = new_map.bucket_for_hash(hash);
                
                new_map.insert_value(ibucket_for_hash, hash, std::move(it_bucket->value()));
                
                
                erase_from_bucket(*it_bucket, bucket_for_hash(hash));
            }
        } 
        /*
         * The call to insert_value may throw an exception if an element is added to the overflow
         * list. Rollback the elements in this case.
         */
        catch(...) {
            m_overflow_elements.swap(new_map.m_overflow_elements);
            
            const bool use_stored_hash = USE_STORED_HASH_ON_REHASH(new_map.bucket_count());
            for(auto it_bucket = new_map.m_buckets_data.begin(); it_bucket != new_map.m_buckets_data.end(); ++it_bucket) {
                if(it_bucket->empty()) {
                    continue;
                }
                
                const std::size_t hash = use_stored_hash?
                                            it_bucket->truncated_bucket_hash():
                                            hash_key(KeySelect()(it_bucket->value()));
                const std::size_t ibucket_for_hash = bucket_for_hash(hash);
                
                // The elements we insert were not in the overflow list before the switch.
                // They will not be go in the overflow list if we rollback the switch.
                insert_value(ibucket_for_hash, hash, std::move(it_bucket->value()));
            }
            
            throw;
        }
        
        new_map.swap(*this);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rsi, %rdx
movq %rdi, %rbx
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x225a
leaq 0x20(%rbx), %r13
cmpq $0x0, 0x48(%rbx)
je 0x2156
leaq 0x30(%rsp), %r14
movq %r14, %rdi
movq %r13, %rsi
callq 0x2366
movq 0x28(%r14), %rax
addq %rax, 0x38(%r14)
movq -0x20(%r14), %r15
movq 0x18(%r14), %rax
leaq 0x38(%rsp), %r14
movq 0x28(%r14), %r12
cmpq %r14, %rax
je 0x2156
movl 0x20(%rax), %ecx
andl %r15d, %ecx
shlq $0x4, %rcx
orq $0x2, (%r12,%rcx)
movq %rax, %rdi
callq 0x10f0
jmp 0x2138
movq %r13, 0x8(%rsp)
movq 0x8(%rbx), %r15
addq $0x8, %r15
leaq 0x88(%rsp), %r12
leaq 0x10(%rsp), %r13
leaq -0x8(%r15), %rbp
cmpq 0x10(%rbx), %rbp
je 0x21b2
testb $0x1, (%rbp)
je 0x21ac
movl (%r15), %r14d
movl 0x10(%rsp), %edx
andl %r14d, %edx
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rcx
movq %r15, %r8
callq 0x1c8a
andl (%rbx), %r14d
movq %rbx, %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x229c
addq $0x10, %r15
jmp 0x2170
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x22d8
movq %r14, %rdi
callq 0x16b8
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rdi
callq 0x1080
leaq 0x30(%rsp), %r14
movq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x2366
movq -0x18(%r14), %r14
addq $0x8, %r14
leaq 0x88(%rsp), %r15
leaq -0x8(%r14), %rax
cmpq 0x20(%rsp), %rax
je 0x2231
testb $0x1, (%rax)
je 0x222b
movl (%r14), %ecx
movl (%rbx), %edx
andl %ecx, %edx
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %r8
callq 0x1c8a
addq $0x10, %r14
jmp 0x2206
callq 0x1190
jmp 0x2238
movq %rax, %rbx
callq 0x11b0
leaq 0x10(%rsp), %rdi
callq 0x16b8
movq %rbx, %rdi
callq 0x11d0
movq %rax, %rdi
callq 0x1719