// File: sgalkina[P]data_structures/src/hash_map.h
// Function: gtl::hash_map<int, memcheck, gtl::default_hash<int>>::reallocate()
void hash_map<K, V, H>::reallocate() {
  vector<Entry> new_vector;
  size_t capacity = vector_.capacity() == 0 ? 5 : vector_.capacity()*2;
  new_vector.reserve(capacity);
  for (size_t i = 0; i < new_vector.capacity(); ++i) {
    new_vector.push_back({K(), V(), true, false});
  }
  size_ = 0;
  for (size_t i = 0; i < vector_.capacity(); ++i) {
    if (!vector_[i].is_empty) {
      add_to_vector(vector_[i].key, vector_[i].value, new_vector);
    }
  }
  vector_ = std::move(new_vector);
}

// Assembly:
subq $0xd8, %rsp
movq %rdi, 0xd0(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x40(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x9200
movq 0x40(%rsp), %rdi
addq $0x8, %rdi
callq 0x9740
cmpq $0x0, %rax
jne 0x9369
movl $0x5, %eax
movq %rax, 0x38(%rsp)
jmp 0x937f
movq 0x40(%rsp), %rdi
addq $0x8, %rdi
callq 0x9740
shlq %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0xb0(%rsp), %rsi
leaq 0x98(%rsp), %rdi
callq 0x9750
jmp 0x93a3
leaq 0x98(%rsp), %rdi
callq 0x97a0
movq $0x0, 0x80(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x30(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x9740
movq %rax, %rcx
movq 0x30(%rsp), %rax
cmpq %rcx, %rax
jae 0x9475
movl $0x0, 0x74(%rsp)
leaq 0x78(%rsp), %rdi
callq 0xd180
jmp 0x93fb
movb $0x1, 0x7c(%rsp)
movb $0x0, 0x7d(%rsp)
leaq 0xb8(%rsp), %rdi
leaq 0x74(%rsp), %rsi
callq 0x9820
jmp 0x9419
leaq 0x74(%rsp), %rdi
callq 0x9880
movq 0x80(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x80(%rsp)
jmp 0x93bc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
jmp 0x95f5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
leaq 0x74(%rsp), %rdi
callq 0x9880
jmp 0x95f5
movq 0x40(%rsp), %rax
movq $0x0, 0x20(%rax)
movq $0x0, 0x68(%rsp)
movq 0x40(%rsp), %rdi
movq 0x68(%rsp), %rax
movq %rax, 0x28(%rsp)
addq $0x8, %rdi
callq 0x9740
movq %rax, %rcx
movq 0x28(%rsp), %rax
cmpq %rcx, %rax
jae 0x958f
movq 0x40(%rsp), %rdi
addq $0x8, %rdi
movq 0x68(%rsp), %rsi
callq 0x98a0
movq %rax, 0x20(%rsp)
jmp 0x94ce
movq 0x20(%rsp), %rax
testb $0x1, 0x8(%rax)
jne 0x957a
movq 0x40(%rsp), %rdi
addq $0x8, %rdi
movq 0x68(%rsp), %rsi
callq 0x98a0
movq %rax, 0x18(%rsp)
jmp 0x94f7
movq 0x40(%rsp), %rdi
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
addq $0x8, %rdi
movq 0x68(%rsp), %rsi
callq 0x98a0
movq %rax, 0x10(%rsp)
jmp 0x951b
movq 0x10(%rsp), %rsi
addq $0x4, %rsi
leaq 0x64(%rsp), %rdi
callq 0xd2e0
jmp 0x9530
movq 0x8(%rsp), %rsi
movq 0x40(%rsp), %rdi
leaq 0x64(%rsp), %rdx
leaq 0xb8(%rsp), %rcx
callq 0x9610
jmp 0x954e
leaq 0x64(%rsp), %rdi
callq 0xd1b0
jmp 0x957a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
leaq 0x64(%rsp), %rdi
callq 0xd1b0
jmp 0x95f5
jmp 0x957c
movq 0x68(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x68(%rsp)
jmp 0x948b
leaq 0x48(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x9920
jmp 0x95a3
movq 0x40(%rsp), %rdi
addq $0x8, %rdi
leaq 0x48(%rsp), %rsi
callq 0x9960
jmp 0x95b8
leaq 0x48(%rsp), %rdi
callq 0x97a0
leaq 0xb8(%rsp), %rdi
callq 0x97a0
addq $0xd8, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x97a0
leaq 0xb8(%rsp), %rdi
callq 0x97a0
movq 0x90(%rsp), %rdi
callq 0x21a0
nop