// File: attractivechaos[P]udb2/tsl_robin_map/./robin_hash.h
// Function: tsl::detail_robin_hash::robin_hash<std::pair<unsigned int, unsigned int>, tsl::robin_map<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>, false, tsl::rh::power_of_two_growth_policy<2ul>>::KeySelect, tsl::robin_map<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>, false, tsl::rh::power_of_two_growth_policy<2ul>>::ValueSelect, Hash32, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>, false, tsl::rh::power_of_two_growth_policy<2ul>>::erase_from_bucket(tsl::detail_robin_hash::robin_hash<std::pair<unsigned int, unsigned int>, tsl::robin_map<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>, false, tsl::rh::power_of_two_growth_policy<2ul>>::KeySelect, tsl::robin_map<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>, false, tsl::rh::power_of_two_growth_policy<2ul>>::ValueSelect, Hash32, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>, false, tsl::rh::power_of_two_growth_policy<2ul>>::robin_iterator<false>)
void erase_from_bucket(iterator pos) {
        pos.m_bucket->clear();
        m_nb_elements--;
        
        /**
         * Backward shift, swap the empty bucket, previous_ibucket, with the values on its right, ibucket,
         * until we cross another empty bucket or if the other bucket has a distance_from_ideal_bucket == 0.
         * 
         * We try to move the values closer to their ideal bucket.
         */
        std::size_t previous_ibucket = static_cast<std::size_t>(pos.m_bucket - m_buckets);
        std::size_t ibucket = next_bucket(previous_ibucket);
        
        while(m_buckets[ibucket].dist_from_ideal_bucket() > 0) {
            tsl_rh_assert(m_buckets[previous_ibucket].empty());
            
            const distance_type new_distance = distance_type(m_buckets[ibucket].dist_from_ideal_bucket() - 1);
            m_buckets[previous_ibucket].set_value_of_empty_bucket(new_distance, m_buckets[ibucket].truncated_hash(), 
                                                                  std::move(m_buckets[ibucket].value()));
            m_buckets[ibucket].clear();

            previous_ibucket = ibucket;
            ibucket = next_bucket(ibucket);
        }
    }

// Assembly:
subq $0x48, %rsp
movq %rsi, 0x40(%rsp)
movq %rdi, 0x38(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x40(%rsp), %rdi
callq 0x1b70
movq 0x18(%rsp), %rdi
movq 0x30(%rdi), %rax
addq $-0x1, %rax
movq %rax, 0x30(%rdi)
movq 0x40(%rsp), %rax
movq 0x20(%rdi), %rcx
subq %rcx, %rax
movl $0xc, %ecx
cqto
idivq %rcx
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rsi
callq 0x3580
movq %rax, 0x28(%rsp)
movq 0x18(%rsp), %rax
movq 0x20(%rax), %rdi
imulq $0xc, 0x28(%rsp), %rax
addq %rax, %rdi
callq 0x34f0
cwtl
cmpl $0x0, %eax
jle 0x48a6
movq 0x18(%rsp), %rax
movq 0x20(%rax), %rdi
imulq $0xc, 0x28(%rsp), %rax
addq %rax, %rdi
callq 0x34f0
movw %ax, %cx
movq 0x18(%rsp), %rax
movswl %cx, %ecx
subl $0x1, %ecx
movw %cx, 0x26(%rsp)
movq 0x20(%rax), %rcx
imulq $0xc, 0x30(%rsp), %rdx
addq %rdx, %rcx
movq %rcx, 0x8(%rsp)
movw 0x26(%rsp), %cx
movw %cx, 0x16(%rsp)
movq 0x20(%rax), %rdi
imulq $0xc, 0x28(%rsp), %rax
addq %rax, %rdi
callq 0x3d40
movl %eax, %ecx
movq 0x18(%rsp), %rax
movl %ecx, 0x10(%rsp)
movq 0x20(%rax), %rdi
imulq $0xc, 0x28(%rsp), %rax
addq %rax, %rdi
callq 0x1be0
movq 0x8(%rsp), %rdi
movl 0x10(%rsp), %edx
movq %rax, %rcx
movw 0x16(%rsp), %ax
movswl %ax, %esi
callq 0x3660
movq 0x18(%rsp), %rax
movq 0x20(%rax), %rdi
imulq $0xc, 0x28(%rsp), %rax
addq %rax, %rdi
callq 0x1b70
movq 0x18(%rsp), %rdi
movq 0x28(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x28(%rsp), %rsi
callq 0x3580
movq %rax, 0x28(%rsp)
jmp 0x47bd
addq $0x48, %rsp
retq
nopl (%rax,%rax)