// File: attractivechaos[P]udb2/khashlmpp/./khashlm.hpp
// Function: klib::KHashSet1<klib::KHashMapBucket<unsigned int, int>, klib::KHashMapHash<klib::KHashMapBucket<unsigned int, int>, aux_hash, unsigned int>, klib::KHashMapEq<klib::KHashMapBucket<unsigned int, int>, std::equal_to<unsigned int>>, unsigned int>::put(klib::KHashMapBucket<unsigned int, int> const&, unsigned long, int*, int)
khint_t put(const T &key, uint64_t hash, int *absent_, int pre_len) {
		khint_t nb, i, last, mask;
		int absent = -1;
		nb = n_buckets();
		if (count >= (nb>>1) + (nb>>2)) { /* rehashing */
			if (resize(nb + khint_t(1), pre_len) < 0) {
				if (absent_) *absent_ = -1;
				return nb;
			}
			nb = n_buckets();
		} /* TODO: to implement automatically shrinking; resize() already support shrinking */
		mask = nb - 1;
		i = last = get_bucket(hash, pre_len, bits);
		while (__kh_used(used, i) && !Eq()(keys[i], key)) {
			i = (i + 1U) & mask;
			if (i == last) break;
		}
		if (!__kh_used(used, i)) { /* not present at all */
			keys[i] = key;
			__kh_set_used(used, i);
			++count, absent = 1;
		} else absent = 0; /* Don't touch keys[i] if present */
		if (absent_) *absent_ = absent;
		return i;
	}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movq %rcx, 0x30(%rsp)
movl %r8d, 0x2c(%rsp)
movq 0x48(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movl $0xffffffff, 0x18(%rsp) # imm = 0xFFFFFFFF
callq 0x1cc0
movl %eax, %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x28(%rsp)
movl 0x4(%rax), %eax
movl 0x28(%rsp), %ecx
shrl %ecx
movl 0x28(%rsp), %edx
shrl $0x2, %edx
addl %edx, %ecx
cmpl %ecx, %eax
jb 0x1b7d
movq 0x8(%rsp), %rdi
movl 0x28(%rsp), %esi
addl $0x1, %esi
movl 0x2c(%rsp), %edx
callq 0x1d00
cmpl $0x0, %eax
jge 0x1b6f
cmpq $0x0, 0x30(%rsp)
je 0x1b62
movq 0x30(%rsp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movl 0x28(%rsp), %eax
movl %eax, 0x54(%rsp)
jmp 0x1c8c
movq 0x8(%rsp), %rdi
callq 0x1cc0
movl %eax, 0x28(%rsp)
movq 0x8(%rsp), %rax
movl 0x28(%rsp), %ecx
subl $0x1, %ecx
movl %ecx, 0x1c(%rsp)
movq 0x38(%rsp), %rdi
movl 0x2c(%rsp), %esi
movl (%rax), %edx
callq 0x2040
movl %eax, 0x20(%rsp)
movl %eax, 0x24(%rsp)
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
movl 0x24(%rsp), %esi
callq 0x2070
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0x7(%rsp)
je 0x1bed
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rsi
movl 0x24(%rsp), %eax
shlq $0x3, %rax
addq %rax, %rsi
movq 0x40(%rsp), %rdx
leaq 0x17(%rsp), %rdi
callq 0x20a0
xorb $-0x1, %al
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0x1bf7
jmp 0x1c14
movl 0x24(%rsp), %eax
addl $0x1, %eax
andl 0x1c(%rsp), %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
cmpl 0x20(%rsp), %eax
jne 0x1c12
jmp 0x1c14
jmp 0x1ba5
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
movl 0x24(%rsp), %esi
callq 0x2070
cmpl $0x0, %eax
jne 0x1c69
movq 0x8(%rsp), %rax
movq 0x40(%rsp), %rsi
movq 0x10(%rax), %rcx
movl 0x24(%rsp), %edx
movq (%rsi), %rsi
movq %rsi, (%rcx,%rdx,8)
movq 0x8(%rax), %rdi
movl 0x24(%rsp), %esi
callq 0x20d0
movq 0x8(%rsp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
movl $0x1, 0x18(%rsp)
jmp 0x1c71
movl $0x0, 0x18(%rsp)
cmpq $0x0, 0x30(%rsp)
je 0x1c84
movl 0x18(%rsp), %ecx
movq 0x30(%rsp), %rax
movl %ecx, (%rax)
movl 0x24(%rsp), %eax
movl %eax, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
nop