// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0x1da9
leaq 0x1(%rax), %rcx
movq %rcx, %rdx
andq %rax, %rdx
jne 0x1da9
cmpq $0xe, %rax
jbe 0x1dc8
movq %rdi, %rbx
movq (%rdi), %rdx
cmpb $-0x1, (%rdx,%rax)
jne 0x1de7
addq %rdx, %rax
leaq 0x1(%rax), %rsi
cmpq %rdx, %rsi
je 0x1c6b
xorl %edi, %edi
movdqa 0x13f0(%rip), %xmm0     # 0x3030
movdqa 0x13f8(%rip), %xmm1     # 0x3040
movdqu (%rdx,%rdi), %xmm2
pxor %xmm3, %xmm3
pcmpgtb %xmm2, %xmm3
pand %xmm0, %xmm3
pxor %xmm1, %xmm3
movdqu %xmm3, (%rdx,%rdi)
addq $0x10, %rdi
cmpq %rdi, %rcx
jne 0x1c48
movups (%rdx), %xmm0
movups %xmm0, (%rsi)
movb $-0x1, (%rax)
cmpq $0x0, 0x18(%rbx)
je 0x1d79
xorl %r14d, %r14d
movabsq $-0x21a0462d9cfba717, %r13 # imm = 0xDE5FB9D2630458E9
movq (%rbx), %rax
cmpb $-0x2, (%rax,%r14)
jne 0x1cfa
movq 0x8(%rbx), %rax
movl (%rax,%r14,8), %eax
mulq %r13
movq %rdx, %r15
addq %rax, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x19a8
movq %rax, %r12
movq 0x18(%rbx), %rax
leaq 0x1(%rax), %rcx
testq %rax, %rcx
jne 0x1d8a
movq %r15, %rcx
shrq $0x7, %rcx
andq %rax, %rcx
movq %r12, %rdx
subq %rcx, %rdx
movq %r14, %rsi
subq %rcx, %rsi
xorq %rdx, %rsi
andq %rax, %rsi
cmpq $0xf, %rsi
ja 0x1d05
andl $0x7f, %r15d
movq %rbx, %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0x1aaa
incq %r14
cmpq 0x18(%rbx), %r14
jne 0x1c8c
jmp 0x1d79
movq (%rbx), %rax
movzbl (%rax,%r12), %eax
cmpl $0xfe, %eax
je 0x1d4a
cmpl $0x80, %eax
jne 0x1e06
andl $0x7f, %r15d
movq %rbx, %rdi
movq %r12, %rsi
movl %r15d, %edx
callq 0x1aaa
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rcx
movq %rcx, (%rax,%r12,8)
movq %rbx, %rdi
movq %r14, %rsi
movl $0xffffff80, %edx       # imm = 0xFFFFFF80
jmp 0x1cf5
andl $0x7f, %r15d
movq %rbx, %rdi
movq %r12, %rsi
movl %r15d, %edx
callq 0x1aaa
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 0x1cfa
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x1f2c
leaq 0x15d1(%rip), %rdi      # 0x3362
leaq 0x1349(%rip), %rsi      # 0x30e1
leaq 0x15ec(%rip), %rcx      # 0x338b
movl $0x44, %edx
callq 0x10a0
leaq 0x1f2a(%rip), %rdi      # 0x3cda
leaq 0x132a(%rip), %rsi      # 0x30e1
leaq 0x1f37(%rip), %rcx      # 0x3cf5
movl $0x749, %edx            # imm = 0x749
callq 0x10a0
leaq 0x20ea(%rip), %rdi      # 0x3eb9
leaq 0x130b(%rip), %rsi      # 0x30e1
leaq 0x1f18(%rip), %rcx      # 0x3cf5
movl $0x74a, %edx            # imm = 0x74A
callq 0x10a0
leaq 0x20ef(%rip), %rdi      # 0x3edd
leaq 0x12ec(%rip), %rsi      # 0x30e1
leaq 0x20fd(%rip), %rcx      # 0x3ef9
movl $0x1be, %edx            # imm = 0x1BE
callq 0x10a0
leaq 0x20b8(%rip), %rdi      # 0x3ec5
leaq 0x12cd(%rip), %rsi      # 0x30e1
leaq 0x1eda(%rip), %rcx      # 0x3cf5
movl $0x77a, %edx            # imm = 0x77A
callq 0x10a0
nop