// 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>>::insert_value_impl(unsigned long, short, unsigned int, std::pair<unsigned int, unsigned int>&)
void insert_value_impl(std::size_t ibucket, distance_type dist_from_ideal_bucket,
                           truncated_hash_type hash, value_type& value)
    {
        m_buckets[ibucket].swap_with_value_in_bucket(dist_from_ideal_bucket, hash, value);
        ibucket = next_bucket(ibucket);
        dist_from_ideal_bucket++;
        
        while(!m_buckets[ibucket].empty()) {
            if(dist_from_ideal_bucket > m_buckets[ibucket].dist_from_ideal_bucket()) {
                if(dist_from_ideal_bucket >= bucket_entry::DIST_FROM_IDEAL_BUCKET_LIMIT) {
                    /**
                     * The number of probes is really high, rehash the map on the next insert.
                     * Difficult to do now as rehash may throw an exception.
                     */
                    m_grow_on_next_insert = true;
                }
            
                m_buckets[ibucket].swap_with_value_in_bucket(dist_from_ideal_bucket, hash, value);
            }
            
            ibucket = next_bucket(ibucket);
            dist_from_ideal_bucket++;
        }
        
        m_buckets[ibucket].set_value_of_empty_bucket(dist_from_ideal_bucket, hash, std::move(value));
    }

// Assembly:
subq $0x38, %rsp
movw %dx, %ax
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movw %ax, 0x26(%rsp)
movl %ecx, 0x20(%rsp)
movq %r8, 0x18(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rax), %rdi
imulq $0xc, 0x28(%rsp), %rax
addq %rax, %rdi
movq 0x18(%rsp), %rcx
leaq 0x26(%rsp), %rsi
leaq 0x20(%rsp), %rdx
callq 0x4010
movq 0x10(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x3580
movq %rax, 0x28(%rsp)
movw 0x26(%rsp), %ax
addw $0x1, %ax
movw %ax, 0x26(%rsp)
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rdi
imulq $0xc, 0x28(%rsp), %rax
addq %rax, %rdi
callq 0x1bb0
xorb $-0x1, %al
testb $0x1, %al
jne 0x462e
jmp 0x46be
movq 0x10(%rsp), %rax
movswl 0x26(%rsp), %ecx
movl %ecx, 0xc(%rsp)
movq 0x20(%rax), %rdi
imulq $0xc, 0x28(%rsp), %rax
addq %rax, %rdi
callq 0x34f0
movw %ax, %cx
movl 0xc(%rsp), %eax
movswl %cx, %ecx
cmpl %ecx, %eax
jle 0x4697
movswl 0x26(%rsp), %eax
cmpl $0x1000, %eax           # imm = 0x1000
jl 0x4671
movq 0x10(%rsp), %rax
movb $0x1, 0x44(%rax)
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rdi
imulq $0xc, 0x28(%rsp), %rax
addq %rax, %rdi
movq 0x18(%rsp), %rcx
leaq 0x26(%rsp), %rsi
leaq 0x20(%rsp), %rdx
callq 0x4010
movq 0x10(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x3580
movq %rax, 0x28(%rsp)
movw 0x26(%rsp), %ax
addw $0x1, %ax
movw %ax, 0x26(%rsp)
jmp 0x460c
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rdi
imulq $0xc, 0x28(%rsp), %rax
addq %rax, %rdi
movw 0x26(%rsp), %ax
movl 0x20(%rsp), %edx
movq 0x18(%rsp), %rcx
movswl %ax, %esi
callq 0x3660
addq $0x38, %rsp
retq
nopl (%rax,%rax)