// File: attractivechaos[P]udb2/unordered_dense/./unordered_dense.h
// Function: ankerl::unordered_dense::v4_1_2::detail::table<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>, ankerl::unordered_dense::v4_1_2::bucket_type::standard, false>::do_erase(unsigned int)
void do_erase(value_idx_type bucket_idx) {
        auto const value_idx_to_remove = at(m_buckets, bucket_idx).m_value_idx;

        // shift down until either empty or an element with correct spot is found
        auto next_bucket_idx = next(bucket_idx);
        while (at(m_buckets, next_bucket_idx).m_dist_and_fingerprint >= Bucket::dist_inc * 2) {
            at(m_buckets, bucket_idx) = {dist_dec(at(m_buckets, next_bucket_idx).m_dist_and_fingerprint),
                                         at(m_buckets, next_bucket_idx).m_value_idx};
            bucket_idx = std::exchange(next_bucket_idx, next(next_bucket_idx));
        }
        at(m_buckets, bucket_idx) = {};

        // update m_values
        if (value_idx_to_remove != m_values.size() - 1) {
            // no luck, we'll have to replace the value with the last one and update the index accordingly
            auto& val = m_values[value_idx_to_remove];
            val = std::move(m_values.back());

            // update the values_idx of the moved entry. No need to play the info game, just look until we find the values_idx
            auto mh = mixed_hash(get_key(val));
            bucket_idx = bucket_idx_from_hash(mh);

            auto const values_idx_back = static_cast<value_idx_type>(m_values.size() - 1);
            while (values_idx_back != at(m_buckets, bucket_idx).m_value_idx) {
                bucket_idx = next(bucket_idx);
            }
            at(m_buckets, bucket_idx).m_value_idx = value_idx_to_remove;
        }
        m_values.pop_back();
    }

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movl %esi, 0x4c(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rax), %rdi
movl 0x4c(%rsp), %eax
movl %eax, %esi
callq 0x2bf0
movq 0x10(%rsp), %rdi
movl 0x4(%rax), %eax
movl %eax, 0x48(%rsp)
movl 0x4c(%rsp), %esi
callq 0x2c20
movl %eax, 0x44(%rsp)
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rdi
movl 0x44(%rsp), %eax
movl %eax, %esi
callq 0x2bf0
cmpl $0x200, (%rax)          # imm = 0x200
jb 0x3d94
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rdi
movl 0x44(%rsp), %eax
movl %eax, %esi
callq 0x2bf0
movl (%rax), %edi
callq 0x3f30
movl %eax, %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0x3c(%rsp)
movq 0x18(%rax), %rdi
movl 0x44(%rsp), %eax
movl %eax, %esi
callq 0x2bf0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movl 0x4(%rcx), %ecx
movl %ecx, 0x40(%rsp)
movq 0x18(%rax), %rdi
movl 0x4c(%rsp), %eax
movl %eax, %esi
callq 0x2bf0
movq 0x10(%rsp), %rdi
movq 0x3c(%rsp), %rcx
movq %rcx, (%rax)
movl 0x44(%rsp), %esi
callq 0x2c20
movl %eax, 0x38(%rsp)
leaq 0x44(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x3f40
movl %eax, 0x4c(%rsp)
jmp 0x3cef
movq 0x10(%rsp), %rax
movl $0x0, 0x30(%rsp)
movl $0x0, 0x34(%rsp)
movq 0x18(%rax), %rdi
movl 0x4c(%rsp), %eax
movl %eax, %esi
callq 0x2bf0
movq 0x10(%rsp), %rdi
movq 0x30(%rsp), %rcx
movq %rcx, (%rax)
movl 0x48(%rsp), %eax
movq %rax, 0x8(%rsp)
callq 0x22e0
movq %rax, %rcx
movq 0x8(%rsp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
je 0x3eb2
movq 0x10(%rsp), %rdi
movl 0x48(%rsp), %eax
movl %eax, %esi
callq 0x2a00
movq 0x10(%rsp), %rdi
movq %rax, 0x28(%rsp)
callq 0x3760
movq %rax, %rsi
movq 0x28(%rsp), %rdi
callq 0x3f70
movq 0x28(%rsp), %rdi
callq 0x29f0
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x2b80
movq 0x10(%rsp), %rdi
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rsi
callq 0x2bd0
movq 0x10(%rsp), %rdi
movl %eax, 0x4c(%rsp)
callq 0x22e0
subq $0x1, %rax
movl %eax, 0x1c(%rsp)
movq 0x10(%rsp), %rax
movl 0x1c(%rsp), %ecx
movl %ecx, 0x4(%rsp)
movq 0x18(%rax), %rdi
movl 0x4c(%rsp), %eax
movl %eax, %esi
callq 0x2bf0
movq %rax, %rcx
movl 0x4(%rsp), %eax
cmpl 0x4(%rcx), %eax
je 0x3e91
movq 0x10(%rsp), %rdi
movl 0x4c(%rsp), %esi
callq 0x2c20
movl %eax, 0x4c(%rsp)
jmp 0x3e55
movq 0x10(%rsp), %rax
movl 0x48(%rsp), %ecx
movl %ecx, (%rsp)
movq 0x18(%rax), %rdi
movl 0x4c(%rsp), %eax
movl %eax, %esi
callq 0x2bf0
movl (%rsp), %ecx
movl %ecx, 0x4(%rax)
movq 0x10(%rsp), %rdi
callq 0x3fa0
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)