// File: 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:
subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x18(%rax), %rdi
callq 0x1cb0
testb $0x1, %al
jne 0x391b
jmp 0x391d
jmp 0x393c
leaq 0x35f2(%rip), %rdi      # 0x6f16
leaq 0x2786(%rip), %rsi      # 0x60b1
movl $0x749, %edx            # imm = 0x749
leaq 0x35fa(%rip), %rcx      # 0x6f31
callq 0x10a0
movq 0x28(%rsp), %rdi
callq 0x44c0
xorb $-0x1, %al
testb $0x1, %al
jne 0x394e
jmp 0x3950
jmp 0x396f
leaq 0x379e(%rip), %rdi      # 0x70f5
leaq 0x2753(%rip), %rsi      # 0x60b1
movl $0x74a, %edx            # imm = 0x74A
leaq 0x35c7(%rip), %rcx      # 0x6f31
callq 0x10a0
movq 0x28(%rsp), %rax
movq (%rax), %rdi
movq 0x18(%rax), %rsi
callq 0x44e0
leaq 0x78(%rsp), %rax
movq %rax, 0x70(%rsp)
movq $0x0, 0x68(%rsp)
movq 0x28(%rsp), %rcx
movq 0x68(%rsp), %rax
cmpq 0x18(%rcx), %rax
je 0x3c4b
movq 0x28(%rsp), %rax
movq (%rax), %rax
movq 0x68(%rsp), %rcx
movsbl (%rax,%rcx), %edi
callq 0x3340
testb $0x1, %al
jne 0x39c6
jmp 0x3c38
movq 0x28(%rsp), %rdi
callq 0x27b0
movq %rax, %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x58(%rsp)
movq 0x8(%rax), %rdi
movq 0x68(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rdi
callq 0x2b30
movq %rax, %rsi
leaq 0x58(%rsp), %rdi
callq 0x3d50
movq 0x28(%rsp), %rdi
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rsi
callq 0x3230
movq %rax, %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x48(%rsp)
movq %rdx, 0x50(%rsp)
movq 0x48(%rsp), %rcx
movq %rcx, 0x40(%rsp)
movq %rax, 0x30(%rsp)
leaq 0x60(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x40(%rsp), %rsi
leaq 0x30(%rsp), %rdi
callq 0x45e0
movq %rax, 0x20(%rsp)
movq 0x68(%rsp), %rsi
leaq 0x30(%rsp), %rdi
callq 0x45e0
movq %rax, %rcx
movq 0x20(%rsp), %rax
cmpq %rcx, %rax
sete %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x3a79
jmp 0x3aa4
movq 0x68(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x60(%rsp), %rdi
callq 0x2a60
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rsi
movsbl %al, %edx
callq 0x3410
jmp 0x3c38
movq 0x28(%rsp), %rax
movq (%rax), %rax
movq 0x40(%rsp), %rcx
movsbl (%rax,%rcx), %edi
callq 0x33f0
testb $0x1, %al
jne 0x3ac0
jmp 0x3b36
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x60(%rsp), %rdi
callq 0x2a60
movq 0x10(%rsp), %rsi
movq 0x28(%rsp), %rdi
movsbl %al, %edx
callq 0x3410
movq 0x28(%rsp), %rdi
callq 0x19c0
movq %rax, %rdi
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x40(%rsp), %rcx
shlq $0x3, %rcx
addq %rcx, %rsi
movq 0x8(%rax), %rdx
movq 0x68(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rdx
callq 0x3d80
movq 0x28(%rsp), %rdi
movq 0x68(%rsp), %rsi
movl $0xffffff80, %edx       # imm = 0xFFFFFF80
callq 0x3410
jmp 0x3c36
movq 0x28(%rsp), %rax
movq (%rax), %rax
movq 0x40(%rsp), %rcx
movsbl (%rax,%rcx), %edi
callq 0x3340
testb $0x1, %al
jne 0x3b52
jmp 0x3b54
jmp 0x3b73
leaq 0x35a6(%rip), %rdi      # 0x7101
leaq 0x254f(%rip), %rsi      # 0x60b1
movl $0x77a, %edx            # imm = 0x77A
leaq 0x33c3(%rip), %rcx      # 0x6f31
callq 0x10a0
movq 0x40(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x60(%rsp), %rdi
callq 0x2a60
movq 0x8(%rsp), %rsi
movq 0x28(%rsp), %rdi
movsbl %al, %edx
callq 0x3410
movq 0x28(%rsp), %rdi
callq 0x19c0
movq %rax, %rdi
movq 0x28(%rsp), %rax
movq 0x70(%rsp), %rsi
movq 0x8(%rax), %rdx
movq 0x68(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rdx
callq 0x3d80
movq 0x28(%rsp), %rdi
callq 0x19c0
movq %rax, %rdi
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x68(%rsp), %rcx
shlq $0x3, %rcx
addq %rcx, %rsi
movq 0x8(%rax), %rdx
movq 0x40(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rdx
callq 0x3d80
movq 0x28(%rsp), %rdi
callq 0x19c0
movq %rax, %rdi
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x40(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rsi
movq 0x70(%rsp), %rdx
callq 0x3d80
movq 0x68(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x68(%rsp)
jmp 0x3c38
movq 0x68(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x68(%rsp)
jmp 0x3993
movq 0x28(%rsp), %rdi
callq 0x4020
addq $0x88, %rsp
retq
nopl (%rax)