// File: attractivechaos[P]udb2/sparsepp/./sparsepp/spp.h
// Function: spp::sparse_hashtable<std::pair<unsigned int const, unsigned int>, unsigned int, Hash32, spp::sparse_hash_map<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, spp::libc_allocator<std::pair<unsigned int const, unsigned int>>>::SelectKey, spp::sparse_hash_map<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, spp::libc_allocator<std::pair<unsigned int const, unsigned int>>>::SetKey, std::equal_to<unsigned int>, spp::libc_allocator<std::pair<unsigned int const, unsigned int>>>::_resize_delta(unsigned long)
bool _resize_delta(size_type delta)
    {
        bool did_resize = false;
        if (settings.consider_shrink())
        {
            // see if lots of deletes happened
            if (_maybe_shrink())
                did_resize = true;
        }
        if (table.num_nonempty() >=
            (std::numeric_limits<size_type>::max)() - delta)
        {
            throw_exception(std::length_error("resize overflow"));
        }

        size_type num_occupied = (size_type)(table.num_nonempty() + num_deleted);

        if (bucket_count() >= HT_MIN_BUCKETS &&
             (num_occupied + delta) <= settings.enlarge_threshold())
            return did_resize;                       // we're ok as we are

        // Sometimes, we need to resize just to get rid of all the
        // "deleted" buckets that are clogging up the hashtable.  So when
        // deciding whether to resize, count the deleted buckets (which
        // are currently taking up room).
        // -------------------------------------------------------------
        const size_type needed_size =
                  settings.min_buckets((size_type)(num_occupied + delta), (size_type)0);

        if (needed_size <= bucket_count())      // we have enough buckets
            return did_resize;

        size_type resize_to = settings.min_buckets((size_type)(num_occupied + delta), bucket_count());

        if (resize_to < needed_size &&    // may double resize_to
            resize_to < (std::numeric_limits<size_type>::max)() / 2)
        {
            // This situation means that we have enough deleted elements,
            // that once we purge them, we won't actually have needed to
            // grow.  But we may want to grow anyway: if we just purge one
            // element, say, we'll have to grow anyway next time we
            // insert.  Might as well grow now, since we're already going
            // through the trouble of copying (in order to purge the
            // deleted elements).
            const size_type target =
                static_cast<size_type>(settings.shrink_size((size_type)(resize_to*2)));
            if (table.num_nonempty() + delta >= target)
            {
                // Good, we won't be below the shrink threshhold even if we double.
                resize_to *= 2;
            }
        }

        sparse_hashtable tmp(MoveDontCopy, *this, resize_to);
        swap(tmp);                             // now we are tmp
        return true;
    }

// Assembly:
subq $0xf8, %rsp
movq %rdi, 0xe8(%rsp)
movq %rsi, 0xe0(%rsp)
movq 0xe8(%rsp), %rdi
movq %rdi, 0x38(%rsp)
movb $0x0, 0xdf(%rsp)
callq 0x2c60
testb $0x1, %al
jne 0x2827
jmp 0x2841
movq 0x38(%rsp), %rdi
callq 0x2c70
testb $0x1, %al
jne 0x2837
jmp 0x283f
movb $0x1, 0xdf(%rsp)
jmp 0x2841
movq 0x38(%rsp), %rdi
addq $0x30, %rdi
callq 0x2ef0
movq %rax, 0x30(%rsp)
callq 0x2f00
movq %rax, %rcx
movq 0x30(%rsp), %rax
subq 0xe0(%rsp), %rcx
cmpq %rcx, %rax
jb 0x28c8
leaq 0x382e(%rip), %rsi      # 0x60a3
leaq 0xc8(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x10e0
movq 0x28(%rsp), %rdi
callq 0x2070
jmp 0x2893
leaq 0xc8(%rsp), %rdi
callq 0x11c8
jmp 0x28c8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc0(%rsp)
movl %eax, 0xbc(%rsp)
leaq 0xc8(%rsp), %rdi
callq 0x11c8
jmp 0x2ac3
movq 0x38(%rsp), %rdi
addq $0x30, %rdi
callq 0x2ef0
movq 0x38(%rsp), %rdi
addq 0x28(%rdi), %rax
movq %rax, 0xb0(%rsp)
callq 0x1fa0
cmpq $0x4, %rax
jb 0x2933
movq 0x38(%rsp), %rdi
movq 0xb0(%rsp), %rax
addq 0xe0(%rsp), %rax
movq %rax, 0x20(%rsp)
callq 0x2f10
movq %rax, %rcx
movq 0x20(%rsp), %rax
cmpq %rcx, %rax
ja 0x2933
movb 0xdf(%rsp), %al
andb $0x1, %al
movb %al, 0xf7(%rsp)
jmp 0x2ab2
movq 0x38(%rsp), %rdi
movq 0xb0(%rsp), %rsi
addq 0xe0(%rsp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x1d60
movq 0x38(%rsp), %rdi
movq %rax, 0xa8(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x18(%rsp)
callq 0x1fa0
movq %rax, %rcx
movq 0x18(%rsp), %rax
cmpq %rcx, %rax
ja 0x2992
movb 0xdf(%rsp), %al
andb $0x1, %al
movb %al, 0xf7(%rsp)
jmp 0x2ab2
movq 0x38(%rsp), %rdi
movq 0xb0(%rsp), %rax
addq 0xe0(%rsp), %rax
movq %rax, 0x10(%rsp)
callq 0x1fa0
movq 0x38(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rax, %rdx
callq 0x1d60
movq %rax, 0xa0(%rsp)
movq 0xa0(%rsp), %rax
cmpq 0xa8(%rsp), %rax
jae 0x2a51
movq 0xa0(%rsp), %rax
movq %rax, 0x8(%rsp)
callq 0x2f00
movq %rax, %rcx
movq 0x8(%rsp), %rax
shrq %rcx
cmpq %rcx, %rax
jae 0x2a51
movq 0x38(%rsp), %rdi
movq 0xa0(%rsp), %rsi
shlq %rsi
callq 0x26c0
movq 0x38(%rsp), %rdi
movq %rax, 0x98(%rsp)
addq $0x30, %rdi
callq 0x2ef0
addq 0xe0(%rsp), %rax
cmpq 0x98(%rsp), %rax
jb 0x2a4f
movq 0xa0(%rsp), %rax
shlq %rax
movq %rax, 0xa0(%rsp)
jmp 0x2a51
movq 0x38(%rsp), %rdx
movq 0xa0(%rsp), %rcx
leaq 0x40(%rsp), %rdi
movq %rdi, (%rsp)
xorl %esi, %esi
callq 0x2f20
movq 0x38(%rsp), %rdi
movq (%rsp), %rsi
callq 0x3010
jmp 0x2a7e
movb $0x1, 0xf7(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x1960
jmp 0x2ab2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc0(%rsp)
movl %eax, 0xbc(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x1960
jmp 0x2ac3
movb 0xf7(%rsp), %al
andb $0x1, %al
addq $0xf8, %rsp
retq
movq 0xc0(%rsp), %rdi
callq 0x11a0