// File: 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:
subq $0xb8, %rsp
movq %rdi, 0xa8(%rsp)
movq %rsi, 0xa0(%rsp)
movq 0xa8(%rsp), %rdi
movq %rdi, 0x28(%rsp)
movq $0x0, 0x98(%rsp)
callq 0x1f60
movq 0x28(%rsp), %rdi
subq $0x1, %rax
movq %rax, 0x90(%rsp)
movq 0xa0(%rsp), %rsi
callq 0x29d0
andq 0x90(%rsp), %rax
movq %rax, 0x88(%rsp)
movq $0x0, 0x78(%rsp)
movb $0x0, 0x77(%rsp)
movq 0x28(%rsp), %rsi
addq $0x30, %rsi
movq 0x88(%rsp), %rdx
leaq 0x60(%rsp), %rdi
callq 0x2a00
leaq 0x60(%rsp), %rdi
callq 0x2a60
testb $0x1, %al
jne 0x289c
movq 0x28(%rsp), %rdi
movl $0x1, %esi
callq 0x2a80
testb $0x1, %al
jne 0x27f3
jmp 0x2838
movq 0xa0(%rsp), %rsi
leaq 0x87(%rsp), %rdi
callq 0x2d60
movq 0x28(%rsp), %rsi
movq %rax, 0x58(%rsp)
leaq 0x40(%rsp), %rdi
leaq 0x58(%rsp), %rdx
callq 0x2db0
leaq 0x40(%rsp), %rdi
callq 0x2f10
movq %rax, 0xb0(%rsp)
jmp 0x29b4
movq 0xa0(%rsp), %rsi
leaq 0x87(%rsp), %rdi
callq 0x2d60
movq %rax, 0x38(%rsp)
testb $0x1, 0x77(%rsp)
je 0x2865
movq 0x78(%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x2872
movq 0x88(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rdx
movb 0x77(%rsp), %al
leaq 0x38(%rsp), %rsi
andb $0x1, %al
movzbl %al, %ecx
callq 0x2f20
movq %rax, 0xb0(%rsp)
jmp 0x29b4
leaq 0x60(%rsp), %rdi
callq 0x3020
testb $0x1, %al
jne 0x28ac
jmp 0x2903
leaq 0x60(%rsp), %rdi
callq 0x3040
movq 0x28(%rsp), %rdi
movq %rax, 0x30(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x30(%rsp), %rsi
callq 0x3090
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq %rax, %rdx
callq 0x3060
testb $0x1, %al
jne 0x28ef
jmp 0x2901
movq 0x30(%rsp), %rax
movq %rax, 0xb0(%rsp)
jmp 0x29b4
jmp 0x291e
testb $0x1, 0x77(%rsp)
jne 0x291c
movq 0x88(%rsp), %rax
movq %rax, 0x78(%rsp)
movb $0x1, 0x77(%rsp)
jmp 0x291e
movq 0x28(%rsp), %rdi
movq 0x98(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x98(%rsp)
movq 0x88(%rsp), %rax
addq 0x98(%rsp), %rax
andq 0x90(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x8(%rsp)
callq 0x1f60
movq 0x8(%rsp), %rcx
movq %rax, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, 0x17(%rsp)
jae 0x2984
movb $0x1, %al
movb %al, 0x17(%rsp)
jmp 0x2984
movb 0x17(%rsp), %al
testb $0x1, %al
jne 0x298e
jmp 0x2990
jmp 0x29af
leaq 0x39a2(%rip), %rdi      # 0x6339
leaq 0x3721(%rip), %rsi      # 0x60bf
movl $0xceb, %edx            # imm = 0xCEB
leaq 0x39e5(%rip), %rcx      # 0x638f
callq 0x10c0
jmp 0x27b1
movq 0xb0(%rsp), %rax
addq $0xb8, %rsp
retq
nopw %cs:(%rax,%rax)
nop