// File: /workspace/github_cpp_makefile_star2_O3/cjc12[P]ezSTL/src/../include/unordered_map.h
// Function: ezSTL::unordered_map<int, int, ezSTL::hash<int>, ezSTL::equal_to<int>>::insert(ezSTL::pair<int, int> const&)
void unordered_map<Key, Value, Hash, KeyEqual>::insert(const pair<Key, Value>& p) {
		auto ite = find(p.first);
		// if key does not exists
		if (ite == end()) {
			size_type index = Hash()(p.first) % buckets.size();
			if (!buckets[index])
				buckets[index] = new list<pair<Key, Value>>();
			buckets[index]->push_front(p);
			++__size;
		}
		// else replace the value
		else *ite = p.second;
		// if load_factor > max_load_factor, then rehash
		if (static_cast<double>(size()) / bucket_size() > max_load_factor) {
			// get next bucket size by predetermined primes
			size_type new_size = next_prime(bucket_size());
			// if not changed, return directly
			if (new_size == bucket_size()) return;
			else {
				unordered_map<Key, Value, Hash, KeyEqual> temp = *this;
				clear();
				// resize buckets
				buckets.resize(new_size);
				end_iterator.bucket = new_size;
				// insert each pair from old unordered_map to new one
				for (auto ite = temp.begin(); ite != temp.end(); ++ite)
					insert(make_pair(ite.get_key(), *ite));
			}
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x90, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x70(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x97c0
movq 0x20(%rbx), %rcx
movl 0x38(%rbx), %eax
movl 0x18(%r15), %edx
movq 0x10(%r15), %rsi
movq 0x8(%rsi), %rdi
subq (%rsi), %rdi
shrq $0x3, %rdi
cmpl %edi, %edx
jb 0x9565
movq 0x30(%rbx), %rsi
movq 0x8(%rsi), %rdi
subq (%rsi), %rdi
shrq $0x3, %rdi
cmpl %edi, %eax
jae 0x957f
movq 0x70(%rsp), %rsi
cmpq %rcx, %rsi
sete %cl
cmpl %eax, %edx
sete %al
andb %cl, %al
cmpb $0x1, %al
jne 0x962f
movl $0x811c9dc5, %eax       # imm = 0x811C9DC5
xorl %ecx, %ecx
movzbl (%r14,%rcx), %edx
xorl %eax, %edx
imull $0x1000193, %edx, %eax  # imm = 0x1000193
incq %rcx
cmpq $0x4, %rcx
jne 0x9586
movq (%rbx), %rcx
movq 0x8(%rbx), %rsi
subq %rcx, %rsi
shrq $0x3, %rsi
xorl %edx, %edx
divl %esi
movl %edx, %r15d
movq (%rcx,%r15,8), %r12
testq %r12, %r12
jne 0x95f9
movl $0x10, %edi
callq 0x21f0
movq %rax, %r12
movl $0x0, 0x8(%rax)
movl $0x18, %edi
callq 0x21f0
movq $0x0, 0x10(%rax)
movq %rax, (%r12)
movq %rax, (%rax)
movq %rax, 0x8(%rax)
movq (%rbx), %rax
movq %r12, (%rax,%r15,8)
movq (%rbx), %rax
movq (%rax,%r15,8), %r12
movl $0x18, %edi
callq 0x21f0
movq (%r14), %rcx
movq %rcx, 0x10(%rax)
movq (%r12), %rcx
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq %rcx, (%rax)
movq %rax, (%rdx)
movq %rax, 0x8(%rcx)
incl 0x8(%r12)
movl 0x18(%rbx), %eax
incl %eax
movl %eax, 0x18(%rbx)
jmp 0x9639
movl 0x4(%r14), %eax
movl %eax, 0x14(%rsi)
movl 0x18(%rbx), %eax
movl %eax, %eax
cvtsi2sd %rax, %xmm0
movq 0x8(%rbx), %rax
subq (%rbx), %rax
shrq $0x3, %rax
movl %eax, %ecx
cvtsi2sd %rcx, %xmm1
divsd %xmm1, %xmm0
ucomisd 0x69b2(%rip), %xmm0     # 0x10010
jbe 0x978a
xorl %ecx, %ecx
leaq 0x7443(%rip), %rdx      # 0x10ab0
movl (%rcx,%rdx), %ebp
cmpl %eax, %ebp
ja 0x9683
addq $0x4, %rcx
cmpq $0x70, %rcx
jne 0x966d
movl $0xfffffffb, %ebp       # imm = 0xFFFFFFFB
cmpl %eax, %ebp
je 0x978a
leaq 0x30(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x98b4
movq %rbx, %rdi
callq 0x9afe
movq %rbx, %rdi
movl %ebp, %esi
callq 0xb120
movl %ebp, 0x38(%rbx)
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
testl %ecx, %ecx
je 0x96da
movl %ecx, %edx
xorl %ecx, %ecx
movq (%rax,%rcx,8), %rsi
testq %rsi, %rsi
jne 0x96f9
incq %rcx
cmpq %rcx, %rdx
jne 0x96c9
movupd 0x50(%rsp), %xmm0
movapd %xmm0, (%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
movl 0x68(%rsp), %eax
movl %eax, 0x18(%rsp)
jmp 0x9712
movq (%rsi), %rax
movq 0x8(%rax), %rax
movq %rax, (%rsp)
movq %rsi, 0x8(%rsp)
movq %r14, 0x10(%rsp)
movl %ecx, 0x18(%rsp)
leaq 0x28(%rsp), %r14
movq %rsp, %r15
movq 0x50(%rsp), %rcx
movl 0x68(%rsp), %eax
movl 0x18(%rsp), %edx
movq 0x10(%rsp), %rsi
movq 0x8(%rsi), %rdi
subq (%rsi), %rdi
shrq $0x3, %rdi
cmpl %edi, %edx
jb 0x974f
movq 0x60(%rsp), %rsi
movq 0x8(%rsi), %rdi
subq (%rsi), %rdi
shrq $0x3, %rdi
cmpl %edi, %eax
jae 0x9780
movq (%rsp), %rsi
cmpq %rcx, %rsi
setne %cl
cmpl %eax, %edx
setne %al
orb %cl, %al
je 0x9780
movq 0x10(%rsi), %rax
movq %rax, 0x28(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x950c
movq %r15, %rdi
callq 0xb0a8
jmp 0x971a
leaq 0x30(%rsp), %rdi
callq 0x9b6a
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r12, %rdi
callq 0x21c0
jmp 0x97b8
jmp 0x97ab
jmp 0x97ab
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x9b6a
movq %rbx, %rdi
callq 0x22e0