// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %rax
movq %rdi, %r14
xorl %ebp, %ebp
movq %rsi, (%rsp)
movl (%rsi), %edx
movq (%r14), %rax
imulq %rdx, %rax
movq %rax, %r12
shrq $0x21, %r12
xorq %rax, %r12
movl %r12d, %ebx
andl $0x1f, %ebx
movb 0x34(%r14), %cl
shrq %cl, %rbx
movl 0x30(%r14), %ecx
shrq $0x5, %r12
andq 0x20(%r14), %r12
addl %ecx, %ebx
movq 0x10(%r14), %rax
movzbl (%rax,%r12), %edi
cmpl %edi, %ebx
jae 0x186c
addl %ecx, %ebx
movzbl 0x1(%rax,%r12), %edi
incq %r12
jmp 0x185b
movzbl (%rax,%r12), %edi
cmpl %edi, %ebx
jne 0x188e
movq 0x8(%r14), %r8
cmpl (%r8,%r12,8), %edx
je 0x18ef
addl %ecx, %ebx
movzbl 0x1(%rax,%r12), %edi
incq %r12
cmpl %edi, %ebx
je 0x1879
movq 0x18(%r14), %rdx
cmpq 0x28(%r14), %rdx
jae 0x190e
addl %ebx, %ecx
cmpl $0x100, %ecx            # imm = 0x100
jae 0x192a
movl $0x1, %ecx
decq %rcx
cmpb $0x0, (%rax,%r12)
leaq 0x1(%rax), %rax
jne 0x18ab
testq %rcx, %rcx
je 0x18db
movq %r12, %rsi
subq %rcx, %rsi
movq %r14, %rdi
movq %r12, %rdx
callq 0x1a92
movq (%rsp), %rsi
movl $0x3, %r15d
jmp 0x18e1
movl $0x2, %r15d
movq 0x10(%r14), %rax
movb %bl, (%rax,%r12)
incq 0x18(%r14)
jmp 0x18f5
movl $0x1, %r15d
xorl %ecx, %ecx
movq %r12, %r13
testb %cl, %cl
je 0x193d
incl %ebp
cmpl $0x100, %ebp            # imm = 0x100
jne 0x1824
jmp 0x1937
movq %r14, %rdi
callq 0x199c
movq (%rsp), %rsi
movb $0x1, %cl
testb %al, %al
jne 0x18fa
xorl %ecx, %ecx
xorl %r13d, %r13d
xorl %r15d, %r15d
jmp 0x18fa
movq $0x0, 0x28(%r14)
jmp 0x18a6
xorl %r15d, %r15d
xorl %r13d, %r13d
movq %r13, %rax
movl %r15d, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq