// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/tsl_hopscotch_map/./hopscotch_hash.h
// Function: 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>>>>::swap_empty_bucket_closer(unsigned long&)
bool swap_empty_bucket_closer(std::size_t& ibucket_empty_in_out) {
        tsl_hh_assert(ibucket_empty_in_out >= NeighborhoodSize);
        const std::size_t neighborhood_start = ibucket_empty_in_out - NeighborhoodSize + 1;
        
        for(std::size_t to_check = neighborhood_start; to_check < ibucket_empty_in_out; to_check++) {
            neighborhood_bitmap neighborhood_infos = m_buckets[to_check].neighborhood_infos();
            std::size_t to_swap = to_check;
            
            while(neighborhood_infos != 0 && to_swap < ibucket_empty_in_out) {
                if((neighborhood_infos & 1) == 1) {
                    tsl_hh_assert(m_buckets[ibucket_empty_in_out].empty());
                    tsl_hh_assert(!m_buckets[to_swap].empty());
                    
                    m_buckets[to_swap].swap_value_into_empty_bucket(m_buckets[ibucket_empty_in_out]);
                    
                    tsl_hh_assert(!m_buckets[to_check].check_neighbor_presence(ibucket_empty_in_out - to_check));
                    tsl_hh_assert(m_buckets[to_check].check_neighbor_presence(to_swap - to_check));
                    
                    m_buckets[to_check].toggle_neighbor_presence(ibucket_empty_in_out - to_check);
                    m_buckets[to_check].toggle_neighbor_presence(to_swap - to_check);
                    
                    
                    ibucket_empty_in_out = to_swap;
                    
                    return true;
                }
                
                to_swap++;
                neighborhood_infos = neighborhood_bitmap(neighborhood_infos >> 1);
            }
        }
        
        return false;
    }

// Assembly:
movq (%rsi), %rcx
cmpq $0x3d, %rcx
jb 0x20c5
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq -0x3d(%rcx), %rdx
movq 0x50(%rdi), %rax
movq %rcx, %r9
shlq $0x4, %r9
leaq (%r9,%rax), %rbx
addq $-0x3d0, %rbx           # imm = 0xFC30
leaq -0x3c(%rcx), %r14
movq %rdx, %r8
shlq $0x4, %r8
movq (%rax,%r8), %r10
cmpq $0x4, %r10
jae 0x2098
incq %rdx
addq $0x10, %rbx
incq %r14
cmpq %rcx, %rdx
jb 0x2076
jmp 0x2113
movq %r10, %r12
shrq $0x2, %r12
movq %rbx, %r15
xorl %r11d, %r11d
testb $0x1, %r12b
jne 0x20c8
testq %r12, %r12
je 0x2087
leaq (%r14,%r11), %r13
shrq %r12
incq %r11
addq $0x10, %r15
cmpq %rcx, %r13
jb 0x20a5
jmp 0x2087
xorl %eax, %eax
retq
leaq (%rdx,%r11), %rbx
testb $0x1, (%r15)
je 0x20ef
movq 0x8(%r15), %rcx
movq %rcx, 0x8(%rax,%r9)
orb $0x1, (%rax,%r9)
andb $-0x2, (%r15)
movq 0x50(%rdi), %rax
movq (%rsi), %rcx
movq (%rax,%r8), %r10
subl %edx, %ecx
addb $0x2, %cl
addb $0x2, %r11b
btcq %r11, %r10
btcq %rcx, %r10
movq %r10, (%rax,%r8)
movq %rbx, (%rsi)
movb $0x1, %al
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
xorl %eax, %eax
jmp 0x2109
nop