// File: attractivechaos[P]udb2/sparsehash/./sparsehash/internal/densehashtable.h
// Function: google::dense_hashtable<std::pair<unsigned int const, unsigned int>, unsigned int, Hash32, google::dense_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::dense_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 (num_elements >=
        (std::numeric_limits<size_type>::max)() - delta) {
      throw std::length_error("resize overflow");
    }
    if ( bucket_count() >= HT_MIN_BUCKETS &&
         (num_elements + 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.
    size_type needed_size = settings.min_buckets(num_elements + delta, 0);
    if ( needed_size <= bucket_count() )      // we have enough buckets
      return did_resize;

    size_type resize_to =
      settings.min_buckets(num_elements - num_deleted + delta, bucket_count());

    // When num_deleted is large, we may still grow but we do not want to
    // over expand.  So we reduce needed_size by a portion of num_deleted
    // (the exact portion does not matter).  This is especially helpful
    // when min_load_factor is zero (no shrink at all) to avoid doubling
    // the bucket count to infinity.  See also test ResizeWithoutShrink.
    needed_size = settings.min_buckets(num_elements - num_deleted / 4 + delta, 0);
    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 (num_elements - num_deleted + delta >= target) {
        // Good, we won't be below the shrink threshhold even if we double.
        resize_to *= 2;
      }
    }
    dense_hashtable tmp(*this, resize_to);
    swap(tmp);                             // now we are tmp
    return true;
  }

// Assembly:
subq $0xd8, %rsp
movq %rdi, 0xc8(%rsp)
movq %rsi, 0xc0(%rsp)
movq 0xc8(%rsp), %rdi
movq %rdi, 0x38(%rsp)
movb $0x0, 0xbf(%rsp)
callq 0x4130
testb $0x1, %al
jne 0x3967
jmp 0x3981
movq 0x38(%rsp), %rdi
callq 0x4140
testb $0x1, %al
jne 0x3977
jmp 0x397f
movb $0x1, 0xbf(%rsp)
jmp 0x3981
movq 0x38(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x30(%rsp)
callq 0x4400
movq %rax, %rcx
movq 0x30(%rsp), %rax
subq 0xc0(%rsp), %rcx
cmpq %rcx, %rax
jb 0x3a07
movl $0x10, %edi
callq 0x1070
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x28(%rsp)
leaq 0x16de(%rip), %rsi      # 0x50a3
callq 0x10b0
jmp 0x39cc
movq 0x28(%rsp), %rdi
movq 0x8608(%rip), %rsi      # 0xbfe0
movq 0x85f1(%rip), %rdx      # 0xbfd0
callq 0x1150
movq 0x28(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
callq 0x10a0
jmp 0x3c0a
movq 0x38(%rsp), %rdi
callq 0x1ed0
cmpq $0x4, %rax
jb 0x3a54
movq 0x38(%rsp), %rdi
movq 0x30(%rdi), %rax
addq 0xc0(%rsp), %rax
movq %rax, 0x20(%rsp)
callq 0x4410
movq %rax, %rcx
movq 0x20(%rsp), %rax
cmpq %rcx, %rax
ja 0x3a54
movb 0xbf(%rsp), %al
andb $0x1, %al
movb %al, 0xd7(%rsp)
jmp 0x3bf9
movq 0x38(%rsp), %rdi
movq 0x30(%rdi), %rsi
addq 0xc0(%rsp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x1c60
movq 0x38(%rsp), %rdi
movq %rax, 0xa0(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x18(%rsp)
callq 0x1ed0
movq %rax, %rcx
movq 0x18(%rsp), %rax
cmpq %rcx, %rax
ja 0x3aaf
movb 0xbf(%rsp), %al
andb $0x1, %al
movb %al, 0xd7(%rsp)
jmp 0x3bf9
movq 0x38(%rsp), %rdi
movq 0x30(%rdi), %rax
subq 0x28(%rdi), %rax
addq 0xc0(%rsp), %rax
movq %rax, 0x10(%rsp)
callq 0x1ed0
movq 0x10(%rsp), %rsi
movq 0x38(%rsp), %rdi
movq %rax, %rdx
callq 0x1c60
movq 0x38(%rsp), %rdi
movq %rax, 0x98(%rsp)
movq 0x30(%rdi), %rsi
movq 0x28(%rdi), %rax
shrq $0x2, %rax
subq %rax, %rsi
addq 0xc0(%rsp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x1c60
movq %rax, 0xa0(%rsp)
movq 0x98(%rsp), %rax
cmpq 0xa0(%rsp), %rax
jae 0x3b9a
movq 0x98(%rsp), %rax
movq %rax, 0x8(%rsp)
callq 0x4400
movq %rax, %rcx
movq 0x8(%rsp), %rax
shrq %rcx
cmpq %rcx, %rax
jae 0x3b9a
movq 0x38(%rsp), %rdi
movq 0x98(%rsp), %rsi
shlq %rsi
callq 0x20d0
movq 0x38(%rsp), %rcx
movq %rax, 0x90(%rsp)
movq 0x30(%rcx), %rax
subq 0x28(%rcx), %rax
addq 0xc0(%rsp), %rax
cmpq 0x90(%rsp), %rax
jb 0x3b98
movq 0x98(%rsp), %rax
shlq %rax
movq %rax, 0x98(%rsp)
jmp 0x3b9a
movq 0x38(%rsp), %rsi
movq 0x98(%rsp), %rdx
leaq 0x40(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x27f0
movq 0x38(%rsp), %rdi
movq (%rsp), %rsi
callq 0x2980
jmp 0x3bc5
movb $0x1, 0xd7(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x1980
jmp 0x3bf9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x1980
jmp 0x3c0a
movb 0xd7(%rsp), %al
andb $0x1, %al
addq $0xd8, %rsp
retq
movq 0xb0(%rsp), %rdi
callq 0x1160
nopw (%rax,%rax)