// File: 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:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rax
movq (%rax), %rax
subq $0x3e, %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x30(%rsp), %rcx
cmpq (%rcx), %rax
jae 0x5986
movq 0x8(%rsp), %rax
movq 0x50(%rax), %rdi
movq 0x20(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rdi
callq 0x4fc0
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
xorl %eax, %eax
cmpq $0x0, 0x18(%rsp)
movb %al, 0x7(%rsp)
je 0x58a5
movq 0x10(%rsp), %rax
movq 0x30(%rsp), %rcx
cmpq (%rcx), %rax
setb %al
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0x58b2
jmp 0x5971
movq 0x18(%rsp), %rax
andq $0x1, %rax
cmpq $0x1, %rax
jne 0x5951
movq 0x8(%rsp), %rax
movq 0x50(%rax), %rdi
movq 0x10(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rdi
movq 0x50(%rax), %rsi
movq 0x30(%rsp), %rax
movq (%rax), %rax
shlq $0x4, %rax
addq %rax, %rsi
callq 0x6e50
movq 0x8(%rsp), %rax
movq 0x50(%rax), %rdi
movq 0x20(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rdi
movq 0x30(%rsp), %rax
movq (%rax), %rsi
subq 0x20(%rsp), %rsi
callq 0x6a40
movq 0x8(%rsp), %rax
movq 0x50(%rax), %rdi
movq 0x20(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rdi
movq 0x10(%rsp), %rsi
subq 0x20(%rsp), %rsi
callq 0x6a40
movq 0x10(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movb $0x1, 0x47(%rsp)
jmp 0x598b
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rax
shrq %rax
movq %rax, 0x18(%rsp)
jmp 0x5883
jmp 0x5973
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0x5847
movb $0x0, 0x47(%rsp)
movb 0x47(%rsp), %al
andb $0x1, %al
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)