// File: /workspace/github_cpp_makefile_star2_O2/attractivechaos[P]udb2/robin_hood/./robin_hood.h
// Function: std::pair<unsigned long, robin_hood::detail::Table<true, 80ul, unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>>::InsertionState> robin_hood::detail::Table<true, 80ul, unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>>::insertKeyPrepareEmptySpot<unsigned int&>(unsigned int&)
std::pair<size_t, InsertionState> insertKeyPrepareEmptySpot(OtherKey&& key) {
        for (int i = 0; i < 256; ++i) {
            size_t idx{};
            InfoType info{};
            keyToIdx(key, &idx, &info);
            nextWhileLess(&info, &idx);

            // while we potentially have a match
            while (info == mInfo[idx]) {
                if (WKeyEqual::operator()(key, mKeyVals[idx].getFirst())) {
                    // key already exists, do NOT insert.
                    // see http://en.cppreference.com/w/cpp/container/unordered_map/insert
                    return std::make_pair(idx, InsertionState::key_found);
                }
                next(&info, &idx);
            }

            // unlikely that this evaluates to true
            if (ROBIN_HOOD_UNLIKELY(mNumElements >= mMaxNumElementsAllowed)) {
                if (!increase_size()) {
                    return std::make_pair(size_t(0), InsertionState::overflow_error);
                }
                continue;
            }

            // key not found, so we are now exactly where we want to insert it.
            auto const insertion_idx = idx;
            auto const insertion_info = info;
            if (ROBIN_HOOD_UNLIKELY(insertion_info + mInfoInc > 0xFF)) {
                mMaxNumElementsAllowed = 0;
            }

            // find an empty spot
            while (0 != mInfo[idx]) {
                next(&info, &idx);
            }

            if (idx != insertion_idx) {
                shiftUp(idx, insertion_idx);
            }
            // put at empty spot
            mInfo[insertion_idx] = static_cast<uint8_t>(insertion_info);
            ++mNumElements;
            return std::make_pair(insertion_idx, idx == insertion_idx
                                                     ? InsertionState::new_node
                                                     : InsertionState::overwrite_node);
        }

        // enough attempts failed, so finally give up.
        return std::make_pair(size_t(0), InsertionState::overflow_error);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r12
movq %rdi, %rbx
xorl %r15d, %r15d
leaq 0x8(%rsp), %r14
leaq 0x4(%rsp), %rbp
pushq $0x1
popq %r13
xorl %eax, %eax
cmpl $0x100, %eax            # imm = 0x100
je 0x17f7
movl %eax, 0x14(%rsp)
andq $0x0, 0x8(%rsp)
andl $0x0, 0x4(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rbp, %rcx
callq 0x1854
movq %rbx, %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x1888
movq 0x8(%rbx), %rdx
movq 0x10(%rbx), %rax
movl 0x4(%rsp), %ebp
movq 0x8(%rsp), %r14
movl (%r12), %esi
movl 0x30(%rbx), %ecx
movzbl (%rax,%r14), %edi
cmpl %edi, %ebp
jne 0x175b
cmpl (%rdx,%r14,8), %esi
je 0x17df
incq %r14
movq %r14, 0x8(%rsp)
addl %ecx, %ebp
movl %ebp, 0x4(%rsp)
jmp 0x1738
movq 0x18(%rbx), %rdx
cmpq 0x28(%rbx), %rdx
jb 0x178a
movq %rbx, %rdi
callq 0x18aa
testb %al, %al
je 0x1803
movl 0x14(%rsp), %eax
incl %eax
leaq 0x8(%rsp), %r14
leaq 0x4(%rsp), %rbp
jmp 0x16e7
leal (%rcx,%rbp), %edx
cmpl $0x100, %edx            # imm = 0x100
jae 0x17fc
xorl %edi, %edi
movq %r14, %rsi
cmpb $0x0, (%rax,%rsi)
je 0x17b3
incq %rsi
movq %rsi, 0x8(%rsp)
movl %edx, 0x4(%rsp)
addl %ecx, %edx
decq %rdi
jmp 0x179a
testq %rdi, %rdi
je 0x17c7
movq %rbx, %rdi
movq %r14, %rdx
callq 0x196e
movq 0x10(%rbx), %rax
movb %bpl, (%rax,%r14)
incq 0x18(%rbx)
xorl %r13d, %r13d
cmpq %r14, 0x8(%rsp)
sete %r13b
xorl $0x3, %r13d
movl %r13d, %r15d
movq %r14, %rax
movl %r15d, %edx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r14d, %r14d
jmp 0x17e2
andq $0x0, 0x28(%rbx)
jmp 0x1795
xorl %r14d, %r14d
xorl %r13d, %r13d
jmp 0x17df
nop