// File: /workspace/github_cpp_makefile_star2_O2/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 $0xa0, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x80(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x7bf2
movupd 0x20(%rbx), %xmm0
leaq 0x20(%rsp), %rsi
movapd %xmm0, (%rsi)
movq 0x30(%rbx), %rax
movq %rax, 0x10(%rsi)
movl 0x38(%rbx), %eax
movl %eax, 0x18(%rsi)
movq %r15, %rdi
callq 0x96ae
testb %al, %al
je 0x7acf
pushq $0x4
popq %rsi
movq %r14, %rdi
callq 0x97ed
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), %rdi
testq %rdi, %rdi
jne 0x7abd
pushq $0x10
popq %rdi
callq 0x21e0
movq %rax, %r12
movq %rax, %rdi
callq 0x96f2
movq (%rbx), %rax
movq %r12, (%rax,%r15,8)
movq (%rbx), %rax
movq (%rax,%r15,8), %rdi
movq %r14, %rsi
callq 0x9714
movl 0x18(%rbx), %eax
incl %eax
movl %eax, 0x18(%rbx)
jmp 0x7ae1
movl 0x4(%r14), %eax
movq 0x80(%rsp), %rcx
movl %eax, 0x14(%rcx)
movl 0x18(%rbx), %eax
movl %eax, %eax
cvtsi2sd %rax, %xmm0
movq 0x8(%rbx), %rdi
subq (%rbx), %rdi
shrq $0x3, %rdi
movl %edi, %eax
cvtsi2sd %rax, %xmm1
divsd %xmm1, %xmm0
ucomisd 0x650a(%rip), %xmm0     # 0xe010
jbe 0x7bb7
callq 0x974e
movl %eax, %ebp
movq 0x8(%rbx), %rax
subq (%rbx), %rax
shrq $0x3, %rax
cmpl %eax, %ebp
je 0x7bb7
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq 0x7d18
movq %rbx, %rdi
callq 0x7f04
movq %rbx, %rdi
movl %ebp, %esi
callq 0x9770
movl %ebp, 0x38(%rbx)
leaq 0x60(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x954e
leaq 0x60(%rsp), %r14
movq %rsp, %r15
movupd 0x40(%rsp), %xmm0
movapd %xmm0, (%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movl 0x58(%rsp), %eax
movl %eax, 0x18(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x7c9c
testb %al, %al
je 0x7bad
movq 0x60(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, (%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7a20
movq %r14, %rdi
callq 0x95d4
jmp 0x7b5f
leaq 0x20(%rsp), %rdi
callq 0x7f54
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r12, %rdi
callq 0x21b0
jmp 0x7be9
jmp 0x7bdc
jmp 0x7bdc
jmp 0x7bdc
jmp 0x7bdc
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x7f54
movq %rbx, %rdi
callq 0x22d0
nop