// File: attractivechaos[P]udb2/sparsepp/./sparsepp/spp.h
// Function: 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_position(unsigned int const&) const
Position _find_position(const key_type &key) const
    {
        size_type num_probes = 0;                    // how many times we've probed
        const size_type bucket_count_minus_one = (const size_type)(bucket_count() - 1);
        size_type bucknum = hash(key) & bucket_count_minus_one;
        Position pos;

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

            if (!grp_pos.test_strict())
            {
                // bucket is empty => key not present
                return pos._t ? pos : Position(pt_empty, bucknum);
            }
            else if (grp_pos.test())
            {
                reference ref(grp_pos.unsafe_get());

                if (equals(key, get_key(ref)))
                    return Position(pt_full, bucknum);
            }
            else if (pos._t == pt_empty)
            {
                // first erased position
                pos._t   = pt_erased;
                pos._idx = bucknum;
            }

            ++num_probes;                        // we're doing another probe
            bucknum = (size_type)((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 $0x88, %rsp
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movq 0x70(%rsp), %rdi
movq %rdi, 0x20(%rsp)
movq $0x0, 0x60(%rsp)
callq 0x1fa0
movq 0x20(%rsp), %rdi
subq $0x1, %rax
movq %rax, 0x58(%rsp)
movq 0x68(%rsp), %rsi
callq 0x37e0
andq 0x58(%rsp), %rax
movq %rax, 0x50(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x4c10
movq 0x20(%rsp), %rsi
addq $0x30, %rsi
movq 0x50(%rsp), %rdx
leaq 0x30(%rsp), %rdi
callq 0x4c30
leaq 0x30(%rsp), %rdi
callq 0x4c90
testb $0x1, %al
jne 0x4871
cmpl $0x0, 0x40(%rsp)
je 0x485b
movq 0x40(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x80(%rsp)
jmp 0x486c
movq 0x50(%rsp), %rdx
leaq 0x78(%rsp), %rdi
xorl %esi, %esi
callq 0x4cb0
jmp 0x497a
leaq 0x30(%rsp), %rdi
callq 0x4ce0
testb $0x1, %al
jne 0x4881
jmp 0x48dc
leaq 0x30(%rsp), %rdi
callq 0x4d00
movq 0x20(%rsp), %rdi
movq %rax, 0x28(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %rsi
callq 0x3810
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq %rax, %rdx
callq 0x4d20
testb $0x1, %al
jne 0x48c1
jmp 0x48da
movq 0x50(%rsp), %rdx
leaq 0x78(%rsp), %rdi
movl $0x2, %esi
callq 0x4cb0
jmp 0x497a
jmp 0x48f7
cmpl $0x0, 0x40(%rsp)
jne 0x48f5
movl $0x1, 0x40(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x48(%rsp)
jmp 0x48f7
jmp 0x48f9
movq 0x20(%rsp), %rdi
movq 0x60(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x60(%rsp)
movq 0x50(%rsp), %rax
addq 0x60(%rsp), %rax
andq 0x58(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x8(%rsp)
callq 0x1fa0
movq 0x8(%rsp), %rcx
movq %rax, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, 0x17(%rsp)
jae 0x494a
movb $0x1, %al
movb %al, 0x17(%rsp)
jmp 0x494a
movb 0x17(%rsp), %al
testb $0x1, %al
jne 0x4954
jmp 0x4956
jmp 0x4975
leaq 0x200b(%rip), %rdi      # 0x6968
leaq 0x175b(%rip), %rsi      # 0x60bf
movl $0xbf1, %edx            # imm = 0xBF1
leaq 0x217b(%rip), %rcx      # 0x6aeb
callq 0x10c0
jmp 0x4815
movl 0x78(%rsp), %eax
movq 0x80(%rsp), %rdx
addq $0x88, %rsp
retq
nop