// File: /workspace/github_cpp_makefile_star2_O3/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 %rdi, %rbx
movss 0x60(%rdi), %xmm0
leaq 0x10(%rsp), %rdi
leaq 0x88(%rsp), %r8
leaq 0xf(%rsp), %r9
movq %rbx, %rdx
movq %rbx, %rcx
callq 0x18c2
leaq 0x20(%rbx), %r14
cmpq $0x0, 0x48(%rbx)
je 0x2224
leaq 0x30(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x242e
movq 0x18(%r15), %rax
movq 0x28(%r15), %rcx
addq %rcx, 0x38(%r15)
leaq 0x38(%rsp), %r15
cmpq %r15, %rax
je 0x2224
movq 0x10(%rsp), %r12
movq 0x60(%rsp), %r13
movl 0x20(%rax), %ecx
andl %r12d, %ecx
shlq $0x4, %rcx
orq $0x2, (%r13,%rcx)
movq %rax, %rdi
callq 0x10f0
cmpq %r15, %rax
jne 0x2207
movq 0x8(%rbx), %r15
movq 0x10(%rbx), %rax
cmpq %rax, %r15
je 0x2288
addq $0x8, %r15
leaq 0x88(%rsp), %r12
leaq 0x10(%rsp), %r13
testb $0x1, -0x8(%r15)
je 0x2278
movl (%r15), %ebp
movl 0x10(%rsp), %edx
andl %ebp, %edx
movq %r12, %rdi
movq %r13, %rsi
movq %rbp, %rcx
movq %r15, %r8
callq 0x1dca
leaq -0x8(%r15), %rsi
andl (%rbx), %ebp
movq %rbx, %rdi
movq %rbp, %rdx
callq 0x234e
movq 0x10(%rbx), %rax
leaq 0x10(%r15), %rcx
addq $0x8, %r15
cmpq %rax, %r15
movq %rcx, %r15
jne 0x2242
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x238c
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
callq 0x186c
movq -0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x22b0
callq 0x1120
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rdi
callq 0x1080
leaq 0x30(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x242e
movq -0x18(%r15), %r14
movq -0x10(%r15), %rax
cmpq %rax, %r14
je 0x2324
addq $0x8, %r14
leaq 0x88(%rsp), %r15
testb $0x1, -0x8(%r14)
je 0x2314
movl (%r14), %ecx
movl (%rbx), %edx
andl %ecx, %edx
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %r8
callq 0x1dca
movq 0x20(%rsp), %rax
leaq 0x10(%r14), %rcx
addq $0x8, %r14
cmpq %rax, %r14
movq %rcx, %r14
jne 0x22f3
callq 0x1190
jmp 0x232b
movq %rax, %rbx
callq 0x11b0
leaq 0x10(%rsp), %rdi
callq 0x184e
movq %rbx, %rdi
callq 0x11d0
movq %rax, %rdi
callq 0x18b6
nop