// File: attractivechaos[P]udb2/sparsehash/./sparsehash/internal/sparsehashtable.h
// Function: google::sparse_hashtable<std::pair<unsigned int const, unsigned int>, unsigned int, Hash32, google::sparse_hash_map<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, google::libc_allocator_with_realloc<std::pair<unsigned int const, unsigned int>>>::SelectKey, google::sparse_hash_map<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, google::libc_allocator_with_realloc<std::pair<unsigned int const, unsigned int>>>::SetKey, std::equal_to<unsigned int>, google::libc_allocator_with_realloc<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 std::length_error("resize overflow");
    }
    if ( bucket_count() >= HT_MIN_BUCKETS &&
         (table.num_nonempty() + 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).  But later, when we decide what
    // size to resize to, *don't* count deleted buckets, since they
    // get discarded during the resize.
    const size_type needed_size =
        settings.min_buckets(table.num_nonempty() + delta, 0);
    if ( needed_size <= bucket_count() )      // we have enough buckets
      return did_resize;

    size_type resize_to =
        settings.min_buckets(table.num_nonempty() - num_deleted + 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(resize_to*2));
      if (table.num_nonempty() - num_deleted + 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 $0xe8, %rsp
movq %rdi, 0xd8(%rsp)
movq %rsi, 0xd0(%rsp)
movq 0xd8(%rsp), %rdi
movq %rdi, 0x40(%rsp)
movb $0x0, 0xcf(%rsp)
callq 0x73a0
testb $0x1, %al
jne 0x68d7
jmp 0x68f1
movq 0x40(%rsp), %rdi
callq 0x73b0
testb $0x1, %al
jne 0x68e7
jmp 0x68ef
movb $0x1, 0xcf(%rsp)
jmp 0x68f1
movq 0x40(%rsp), %rdi
addq $0x30, %rdi
callq 0x4e70
movq %rax, 0x38(%rsp)
callq 0x7670
movq %rax, %rcx
movq 0x38(%rsp), %rax
subq 0xd0(%rsp), %rcx
cmpq %rcx, %rax
jb 0x697c
movl $0x10, %edi
callq 0x1070
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x30(%rsp)
leaq 0x1769(%rip), %rsi      # 0x80a3
callq 0x10e0
jmp 0x6941
movq 0x30(%rsp), %rdi
movq 0x8693(%rip), %rsi      # 0xefe0
movq 0x867c(%rip), %rdx      # 0xefd0
callq 0x1180
movq 0x30(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc0(%rsp)
movl %eax, 0xbc(%rsp)
callq 0x10c0
jmp 0x6b81
movq 0x40(%rsp), %rdi
callq 0x21e0
cmpq $0x4, %rax
jb 0x69d3
movq 0x40(%rsp), %rdi
addq $0x30, %rdi
callq 0x4e70
movq 0x40(%rsp), %rdi
addq 0xd0(%rsp), %rax
movq %rax, 0x28(%rsp)
callq 0x7680
movq %rax, %rcx
movq 0x28(%rsp), %rax
cmpq %rcx, %rax
ja 0x69d3
movb 0xcf(%rsp), %al
andb $0x1, %al
movb %al, 0xe7(%rsp)
jmp 0x6b70
movq 0x40(%rsp), %rdi
addq $0x30, %rdi
callq 0x4e70
movq 0x40(%rsp), %rdi
movq %rax, %rsi
addq 0xd0(%rsp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x1ec0
movq 0x40(%rsp), %rdi
movq %rax, 0xb0(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x20(%rsp)
callq 0x21e0
movq %rax, %rcx
movq 0x20(%rsp), %rax
cmpq %rcx, %rax
ja 0x6a3b
movb 0xcf(%rsp), %al
andb $0x1, %al
movb %al, 0xe7(%rsp)
jmp 0x6b70
movq 0x40(%rsp), %rdi
addq $0x30, %rdi
callq 0x4e70
movq 0x40(%rsp), %rdi
subq 0x28(%rdi), %rax
addq 0xd0(%rsp), %rax
movq %rax, 0x18(%rsp)
callq 0x21e0
movq 0x40(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq %rax, %rdx
callq 0x1ec0
movq %rax, 0xa8(%rsp)
movq 0xa8(%rsp), %rax
cmpq 0xb0(%rsp), %rax
jae 0x6b0d
movq 0xa8(%rsp), %rax
movq %rax, 0x10(%rsp)
callq 0x7670
movq %rax, %rcx
movq 0x10(%rsp), %rax
shrq %rcx
cmpq %rcx, %rax
jae 0x6b0d
movq 0x40(%rsp), %rdi
movq 0xa8(%rsp), %rsi
shlq %rsi
callq 0x3ee0
movq 0x40(%rsp), %rdi
movq %rax, 0xa0(%rsp)
addq $0x30, %rdi
callq 0x4e70
movq 0x40(%rsp), %rcx
subq 0x28(%rcx), %rax
addq 0xd0(%rsp), %rax
cmpq 0xa0(%rsp), %rax
jb 0x6b0b
movq 0xa8(%rsp), %rax
shlq %rax
movq %rax, 0xa8(%rsp)
jmp 0x6b0d
movq 0x40(%rsp), %rdx
movq 0xa8(%rsp), %rcx
leaq 0x48(%rsp), %rdi
movq %rdi, 0x8(%rsp)
xorl %esi, %esi
callq 0x40c0
movq 0x40(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x41d0
jmp 0x6b3c
movb $0x1, 0xe7(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x1950
jmp 0x6b70
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc0(%rsp)
movl %eax, 0xbc(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x1950
jmp 0x6b81
movb 0xe7(%rsp), %al
andb $0x1, %al
addq $0xe8, %rsp
retq
movq 0xc0(%rsp), %rdi
callq 0x1190
nop