// File: /workspace/github_cpp_makefile_star2_O1/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 0x98c0
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 0x963d
movq 0x30(%rbx), %rsi
movq 0x8(%rsi), %rdi
subq (%rsi), %rdi
shrq $0x3, %rdi
cmpl %edi, %eax
jae 0x9654
cmpq %rcx, 0x70(%rsp)
sete %cl
cmpl %eax, %edx
sete %al
andb %cl, %al
cmpb $0x1, %al
jne 0x970b
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 0x965b
movq (%rbx), %rcx
movq 0x8(%rbx), %rsi
subq %rcx, %rsi
shrq $0x3, %rsi
xorl %edx, %edx
divl %esi
movl %edx, %r15d
cmpq $0x0, (%rcx,%r15,8)
jne 0x96cb
movl $0x10, %edi
callq 0x21f0
movq %rax, %r12
movl $0x0, 0x8(%rax)
movl $0x18, %edi
callq 0x21f0
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
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), %r15
movl $0x18, %edi
callq 0x21f0
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq (%r14), %rcx
movq %rcx, 0x10(%rax)
movq (%r15), %rcx
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq %rcx, (%rax)
movq 0x8(%rcx), %rdx
movq %rax, (%rdx)
movq %rax, 0x8(%rcx)
incl 0x8(%r15)
incl 0x18(%rbx)
jmp 0x9717
movl 0x4(%r14), %eax
movq 0x70(%rsp), %rcx
movl %eax, 0x14(%rcx)
movl 0x18(%rbx), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movq 0x8(%rbx), %rax
subq (%rbx), %rax
shrq $0x3, %rax
movl %eax, %ecx
cvtsi2sd %rcx, %xmm1
divsd %xmm1, %xmm0
ucomisd 0x68d0(%rip), %xmm0     # 0x10010
jbe 0x988a
xorl %ecx, %ecx
leaq 0x7361(%rip), %rdx      # 0x10ab0
movl (%rcx,%rdx), %ebp
cmpl %eax, %ebp
ja 0x9765
addq $0x4, %rcx
cmpq $0x70, %rcx
jne 0x974f
movl $0xfffffffb, %ebp       # imm = 0xFFFFFFFB
cmpl %eax, %ebp
je 0x988a
leaq 0x30(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x99b8
movq %rbx, %rdi
callq 0x9b8e
movq %rbx, %rdi
movl %ebp, %esi
callq 0xb1b0
movl %ebp, 0x38(%rbx)
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rdi
subq %rax, %rdi
shrq $0x3, %rdi
testl %edi, %edi
setne %sil
je 0x97f4
movq (%rax), %rdx
xorl %ecx, %ecx
testq %rdx, %rdx
jne 0x97d6
movl %edi, %esi
leaq -0x1(%rsi), %rdi
xorl %ecx, %ecx
cmpq %rcx, %rdi
je 0x97f4
movq 0x8(%rax,%rcx,8), %rdx
incq %rcx
testq %rdx, %rdx
je 0x97bd
cmpq %rsi, %rcx
setb %sil
movq (%rdx), %rax
movq 0x8(%rax), %rax
movq %rax, (%rsp)
movq %rdx, 0x8(%rsp)
movq %r14, 0x10(%rsp)
movl %ecx, 0x18(%rsp)
testb %sil, %sil
jne 0x9811
movupd 0x50(%rsp), %xmm0
movapd %xmm0, (%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
movl 0x68(%rsp), %eax
movl %eax, 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 0x984e
movq 0x60(%rsp), %rsi
movq 0x8(%rsi), %rdi
subq (%rsi), %rdi
shrq $0x3, %rdi
cmpl %edi, %eax
jae 0x9880
cmpq %rcx, (%rsp)
setne %cl
cmpl %eax, %edx
setne %al
orb %cl, %al
je 0x9880
movq (%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x95e4
movq %r15, %rdi
callq 0xb138
jmp 0x9819
leaq 0x30(%rsp), %rdi
callq 0x9bf4
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r12, %rdi
callq 0x21c0
jmp 0x98b8
jmp 0x98ab
jmp 0x98ab
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x9bf4
movq %rbx, %rdi
callq 0x22e0