// File: /workspace/github_cpp_makefile_star2_O2/attractivechaos[P]udb2/phmap/./phmap.h
// Function: phmap::container_internal::raw_hash_set<phmap::container_internal::FlatHashMapPolicy<unsigned int, unsigned int>, Hash32, phmap::EqualTo<unsigned int>, std::allocator<std::pair<unsigned int const, unsigned int>>>::drop_deletes_without_resize()
void drop_deletes_without_resize() PHMAP_ATTRIBUTE_NOINLINE {
        assert(IsValidCapacity(capacity_));
        assert(!is_small());
        // Algorithm:
        // - mark all DELETED slots as EMPTY
        // - mark all FULL slots as DELETED
        // - for each slot marked as DELETED
        //     hash = Hash(element)
        //     target = find_first_non_full(hash)
        //     if target is in the same group
        //       mark slot as FULL
        //     else if target is EMPTY
        //       transfer element to target
        //       mark slot as EMPTY
        //       mark target as FULL
        //     else if target is DELETED
        //       swap current element with target element
        //       mark target as FULL
        //       repeat procedure for current slot with moved from element (target)
        ConvertDeletedToEmptyAndFullToDeleted(ctrl_, capacity_);
        typename std::aligned_storage<sizeof(slot_type), alignof(slot_type)>::type
            raw;
        slot_type* slot = reinterpret_cast<slot_type*>(&raw);
        for (size_t i = 0; i != capacity_; ++i) {
            if (!IsDeleted(ctrl_[i])) continue;
            size_t hash = PolicyTraits::apply(HashElement{hash_ref()},
                                              PolicyTraits::element(slots_ + i));
            auto target = find_first_non_full(hash);
            size_t new_i = target.offset;

            // Verify if the old and new i fall within the same group wrt the hash.
            // If they do, we don't need to move the object as it falls already in the
            // best probe we can.
            const auto probe_index = [&](size_t pos) {
                return ((pos - probe(hash).offset()) & capacity_) / Group::kWidth;
            };

            // Element doesn't move.
            if (PHMAP_PREDICT_TRUE(probe_index(new_i) == probe_index(i))) {
                set_ctrl(i, H2(hash));
                continue;
            }
            if (IsEmpty(ctrl_[new_i])) {
                // Transfer element to the empty spot.
                // set_ctrl poisons/unpoisons the slots so we have to call it at the
                // right time.
                set_ctrl(new_i, H2(hash));
                PolicyTraits::transfer(&alloc_ref(), slots_ + new_i, slots_ + i);
                set_ctrl(i, kEmpty);
            } else {
                assert(IsDeleted(ctrl_[new_i]));
                set_ctrl(new_i, H2(hash));
                // Until we are done rehashing, DELETED marks previously FULL slots.
                // Swap i and new_i elements.
                PolicyTraits::transfer(&alloc_ref(), slot, slots_ + i);
                PolicyTraits::transfer(&alloc_ref(), slots_ + i, slots_ + new_i);
                PolicyTraits::transfer(&alloc_ref(), slots_ + new_i, slot);
                --i;  // repeat
            }
        }
        reset_growth_left();
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x18(%rdi), %rsi
testq %rsi, %rsi
je 0x1ca5
leaq 0x1(%rsi), %rax
andq %rsi, %rax
jne 0x1ca5
cmpq $0xe, %rsi
jbe 0x1cc4
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x1eb1
xorl %r14d, %r14d
movq %rsp, %rbp
leaq 0x8(%rsp), %r15
cmpq 0x18(%rbx), %r14
je 0x1c8e
movq (%rbx), %rax
cmpb $-0x2, (%rax,%r14)
jne 0x1c19
movq 0x8(%rbx), %rax
movl (%rax,%r14,8), %eax
movabsq $-0x21a0462d9cfba717, %rcx # imm = 0xDE5FB9D2630458E9
mulq %rcx
leaq (%rdx,%rax), %rsi
movq %rsi, (%rsp)
movq %rbx, %rdi
callq 0x18fe
movq %rax, %r12
movq %rbx, 0x8(%rsp)
movq %rbp, 0x10(%rsp)
movq %r15, %rdi
movq %rax, %rsi
callq 0x1f50
movq %rax, %r13
movq %r15, %rdi
movq %r14, %rsi
callq 0x1f50
cmpq %rax, %r13
jne 0x1c1e
movl (%rsp), %edx
andl $0x7f, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x19e2
incq %r14
jmp 0x1ba4
movq (%rbx), %rax
movzbl (%rax,%r12), %eax
cmpl $0xfe, %eax
je 0x1c60
cmpl $0x80, %eax
jne 0x1ce3
movl (%rsp), %edx
andl $0x7f, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x19e2
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rcx
movq %rcx, (%rax,%r12,8)
movq %rbx, %rdi
movq %r14, %rsi
pushq $-0x80
popq %rdx
jmp 0x1c14
movl (%rsp), %edx
andl $0x7f, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x19e2
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rcx
movq (%rax,%r12,8), %rdx
movq %rdx, (%rax,%r14,8)
movq 0x8(%rbx), %rax
movq %rcx, (%rax,%r12,8)
decq %r14
jmp 0x1c19
movq %rbx, %rdi
callq 0x1e6a
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x224b(%rip), %rdi      # 0x3ef7
leaq 0x142e(%rip), %rsi      # 0x30e1
leaq 0x2258(%rip), %rcx      # 0x3f12
movl $0x749, %edx            # imm = 0x749
callq 0x10a0
leaq 0x240b(%rip), %rdi      # 0x40d6
leaq 0x140f(%rip), %rsi      # 0x30e1
leaq 0x2239(%rip), %rcx      # 0x3f12
movl $0x74a, %edx            # imm = 0x74A
callq 0x10a0
leaq 0x23f8(%rip), %rdi      # 0x40e2
leaq 0x13f0(%rip), %rsi      # 0x30e1
leaq 0x221a(%rip), %rcx      # 0x3f12
movl $0x77a, %edx            # imm = 0x77A
callq 0x10a0