// File: /workspace/github_cpp_makefile_star2_O3/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 %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
xorl %ebp, %ebp
movl (%r15), %edx
movq (%rbx), %rax
imulq %rdx, %rax
movq %rax, %r14
shrq $0x21, %r14
xorq %rax, %r14
movl %r14d, %r12d
andl $0x1f, %r12d
movb 0x34(%rbx), %cl
shrq %cl, %r12
movl 0x30(%rbx), %ecx
shrq $0x5, %r14
andq 0x20(%rbx), %r14
addl %ecx, %r12d
movq 0x10(%rbx), %rax
movzbl (%rax,%r14), %esi
cmpl %esi, %r12d
jae 0x186f
addl %ecx, %r12d
movzbl 0x1(%rax,%r14), %esi
incq %r14
jmp 0x185c
cmpl %esi, %r12d
jne 0x1893
movq 0x8(%rbx), %rsi
cmpl (%rsi,%r14,8), %edx
je 0x1916
addl %ecx, %r12d
movzbl 0x1(%rax,%r14), %edi
incq %r14
cmpl %edi, %r12d
je 0x1878
movq 0x18(%rbx), %rdx
cmpq 0x28(%rbx), %rdx
jb 0x18c5
movq %rbx, %rdi
callq 0x1980
xorl %r14d, %r14d
testb %al, %al
je 0x1931
incl %ebp
movl $0x0, %edx
cmpl $0x100, %ebp            # imm = 0x100
jne 0x1824
jmp 0x191b
addl %r12d, %ecx
cmpl $0x100, %ecx            # imm = 0x100
jae 0x1927
movl $0x1, %ecx
movq %rax, %rdx
decq %rcx
cmpb $0x0, (%rdx,%r14)
leaq 0x1(%rdx), %rdx
jne 0x18d8
testq %rcx, %rcx
je 0x1907
movq %r14, %rsi
subq %rcx, %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x1a7e
movq 0x10(%rbx), %rax
movl $0x3, %edx
jmp 0x190c
movl $0x2, %edx
movb %r12b, (%rax,%r14)
incq 0x18(%rbx)
jmp 0x191b
movl $0x1, %edx
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq $0x0, 0x28(%rbx)
jmp 0x18d0
xorl %edx, %edx
jmp 0x191b
nop