// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/khashpp/./khash.hpp
// Function: klib::KHash<aux_t, aux_hash, aux_eq, unsigned int>::put(aux_t const&, int*)
khint_t put(const T &key, int *ret) {
		khint_t x;
		if (n_occupied >= upper_bound) { /* update the hash table */
			if (n_buckets > (count<<1)) {
				if (resize(n_buckets - 1) < 0) { /* clear "deleted" elements */
					*ret = -1; return n_buckets;
				}
			} else if (resize(n_buckets + 1) < 0) { /* expand the hash table */
				*ret = -1; return n_buckets;
			}
		} /* TODO: to implement automatically shrinking; resize() already support shrinking */
		{
			khint_t k, i, site, last, mask = n_buckets - 1, step = 0;
			x = site = n_buckets; k = Hash()(key); i = k & mask;
			if (__ac_isempty(flags, i)) x = i; /* for speed up */
			else {
				last = i;
				while (!__ac_isempty(flags, i) && (__ac_isdel(flags, i) || !Eq()(keys[i], key))) {
					if (__ac_isdel(flags, i)) site = i;
					i = (i + (++step)) & mask;
					if (i == last) { x = site; break; }
				}
				if (x == n_buckets) {
					if (__ac_isempty(flags, i) && site != n_buckets) x = site;
					else x = i;
				}
			}
		}
		if (__ac_isempty(flags, x)) { /* not present at all */
			keys[x] = key;
			__ac_set_isboth_false(flags, x);
			++count; ++n_occupied;
			*ret = 1;
		} else if (__ac_isdel(flags, x)) { /* deleted */
			keys[x] = key;
			__ac_set_isboth_false(flags, x);
			++count;
			*ret = 2;
		} else *ret = 0; /* Don't touch keys[x] if present and not deleted */
		return x;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movl 0x8(%rdi), %eax
cmpl 0xc(%rdi), %eax
jb 0x16e9
movl (%r14), %esi
movl 0x4(%r14), %eax
addl %eax, %eax
cmpl %eax, %esi
jbe 0x16d7
decl %esi
jmp 0x16d9
incl %esi
movq %r14, %rdi
callq 0x183a
testl %eax, %eax
js 0x1779
movl (%r14), %esi
leal -0x1(%rsi), %r8d
movl (%r15), %r9d
movl %r9d, %edi
andl %r8d, %edi
movq 0x10(%r14), %rdx
movl %edi, %eax
shrl $0x4, %eax
movl (%rdx,%rax,4), %eax
leal (%rdi,%rdi), %ecx
shrl %cl, %eax
testb $0x2, %al
je 0x1715
movl %edi, %eax
jmp 0x17a4
movq %rbx, (%rsp)
movq 0x18(%r14), %r12
movl $0x1, %ebp
movl %edi, %r11d
movl %esi, %r10d
movl %r11d, %eax
shrl $0x4, %eax
movl (%rdx,%rax,4), %r13d
leal (%r11,%r11), %ecx
andl $0x1e, %ecx
movl $0x2, %ebx
shll %cl, %ebx
testl %ebx, %r13d
jne 0x1787
btl %ecx, %r13d
movl %r11d, %eax
jb 0x175a
movl %r11d, %eax
cmpl %r9d, (%r12,%rax,8)
je 0x1787
movl %r10d, %eax
addl %ebp, %r11d
andl %r8d, %r11d
incl %ebp
movl %eax, %r10d
cmpl %edi, %r11d
jne 0x1728
movb $0x1, %cl
movl %esi, %r10d
cmpl %esi, %eax
movq (%rsp), %rbx
je 0x1794
jmp 0x17a4
movl $0xffffffff, (%rbx)     # imm = 0xFFFFFFFF
movl (%r14), %eax
jmp 0x182a
testl %ebx, %r13d
sete %cl
movl %r11d, %edi
movq (%rsp), %rbx
cmpl %esi, %r10d
cmovel %edi, %r10d
testb %cl, %cl
cmovnel %edi, %r10d
movl %r10d, %eax
movl %eax, %esi
shrl $0x4, %esi
movl (%rdx,%rsi,4), %edx
leal (%rax,%rax), %ecx
andl $0x1e, %ecx
shrl %cl, %edx
testb $0x2, %dl
jne 0x17c6
testb $0x1, %dl
jne 0x1803
movl $0x0, (%rbx)
jmp 0x182a
movq 0x18(%r14), %rdx
movl %eax, %edi
movl $0x3, %r8d
shll %cl, %r8d
movq (%r15), %rcx
movq %rcx, (%rdx,%rdi,8)
notl %r8d
movq 0x10(%r14), %rcx
andl %r8d, (%rcx,%rsi,4)
movq 0x4(%r14), %xmm0
pcmpeqd %xmm1, %xmm1
psubd %xmm1, %xmm0
movq %xmm0, 0x4(%r14)
movl $0x1, (%rbx)
jmp 0x182a
movq 0x18(%r14), %rdx
movl %eax, %edi
movq (%r15), %r8
movq %r8, (%rdx,%rdi,8)
movl $0x3, %edx
shll %cl, %edx
notl %edx
movq 0x10(%r14), %rcx
andl %edx, (%rcx,%rsi,4)
incl 0x4(%r14)
movl $0x2, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop