// File: /workspace/github_cpp_makefile_star2_O2/attractivechaos[P]udb2/sparsepp/./sparsepp/spp.h
// Function: std::pair<unsigned int const, unsigned int>& spp::sparse_hashtable<std::pair<unsigned int const, unsigned int>, unsigned int, Hash32, spp::sparse_hash_map<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, spp::libc_allocator<std::pair<unsigned int const, unsigned int>>>::SelectKey, spp::sparse_hash_map<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, spp::libc_allocator<std::pair<unsigned int const, unsigned int>>>::SetKey, std::equal_to<unsigned int>, spp::libc_allocator<std::pair<unsigned int const, unsigned int>>>::find_or_insert<spp::sparse_hash_map<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, spp::libc_allocator<std::pair<unsigned int const, unsigned int>>>::DefaultValue>(unsigned int const&)
value_type& find_or_insert(const key_type& key)
    {
        size_type num_probes = 0;              // how many times we've probed
        const size_type bucket_count_minus_one = bucket_count() - 1;
        size_type bucknum = hash(key) & bucket_count_minus_one;
        DefaultValue default_value;
        size_type erased_pos = 0;
        bool erased = false;

        while (1)                        // probe until something happens
        {
            typename Table::GrpPos grp_pos(table, bucknum);

            if (!grp_pos.test_strict())
            {
                // not found
                if (_resize_delta(1))
                {
                    // needed to rehash to make room
                    // Since we resized, we can't use pos, so recalculate where to insert.
                    value_type def(default_value(key));
                    return *(_insert_noresize(def).first);
                }
                else
                {
                    // no need to rehash, insert right here
                    value_type def(default_value(key));
                    return _insert_at(def, erased ? erased_pos : bucknum, erased);
                }
            }
            if (grp_pos.test())
            {
                reference ref(grp_pos.unsafe_get());

                if (equals(key, get_key(ref)))
                    return ref;
            }
            else if (!erased)
            {
                // first erased position
                erased_pos = bucknum;
                erased = true;
            }

            ++num_probes;                        // we're doing another probe
            bucknum = (bucknum + JUMP_(key, num_probes)) & bucket_count_minus_one;
            assert(num_probes < bucket_count()
                   && "Hashtable is full: an error in key_equal<> or hash<>");
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq 0x30(%rdi), %rax
movq %rdi, 0x10(%rsp)
movq 0x40(%rdi), %rdx
leaq -0x1(%rdx), %r11
movq %rsi, 0x8(%rsp)
movl (%rsi), %edi
movl %r11d, %r14d
andl %edi, %r14d
pushq $0x1
popq %r8
xorl %r12d, %r12d
pushq $0x1
popq %r10
movl $0x33333333, %esi       # imm = 0x33333333
xorl %r13d, %r13d
movq %r14, %rcx
shrq $0x5, %rcx
imulq $0x18, %rcx, %rbx
movl %r14d, %ecx
andl $0x1f, %ecx
movl 0x8(%rax,%rbx), %r15d
movl %r10d, %r9d
shll %cl, %r9d
movl 0xc(%rax,%rbx), %ebp
orl %r15d, %ebp
btl %ecx, %ebp
movzbl %r13b, %ebp
jae 0x1aaf
testl %r9d, %r15d
je 0x1a89
addq %rax, %rbx
pushq $-0x1
popq %r9
shll %cl, %r9d
movq (%rbx), %rcx
notl %r9d
andl %r9d, %r15d
movl %r15d, %r9d
shrl %r9d
andl $0x15555555, %r9d       # imm = 0x15555555
subl %r9d, %r15d
movl %r15d, %r9d
andl %esi, %r9d
shrl $0x2, %r15d
andl %esi, %r15d
addl %r9d, %r15d
movl %r15d, %r9d
shrl $0x4, %r9d
addl %r15d, %r9d
andl $0xf0f0f0f, %r9d        # imm = 0xF0F0F0F
imull $0x1010101, %r9d, %r9d  # imm = 0x1010101
shrl $0x18, %r9d
cmpl (%rcx,%r9,8), %edi
jne 0x1a98
jmp 0x1ae8
testb $0x1, %bpl
cmoveq %r14, %r12
cmovel %r10d, %ebp
movl %ebp, %r13d
cmpq %rdx, %r8
jae 0x1b24
addq %r8, %r14
andq %r11, %r14
incq %r8
jmp 0x19fd
pushq $0x1
popq %rsi
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x1b44
testb %al, %al
je 0x1aee
movq 0x8(%rsp), %rax
movl (%rax), %eax
leaq 0x18(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1cac
movq 0x8(%r14), %rax
jmp 0x1b15
leaq (%rcx,%r9,8), %rax
jmp 0x1b15
movq 0x8(%rsp), %rax
movl (%rax), %eax
leaq 0x20(%rsp), %rsi
movq %rax, (%rsi)
testb $0x1, %bpl
cmovneq %r12, %r14
andl $0x1, %ebp
movq %rbx, %rdi
movq %r14, %rdx
movl %ebp, %ecx
callq 0x1d26
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x16b9(%rip), %rdi      # 0x31e4
leaq 0x1595(%rip), %rsi      # 0x30c7
leaq 0x1701(%rip), %rcx      # 0x323a
movl $0xceb, %edx            # imm = 0xCEB
callq 0x10a0
nop