// File: /workspace/github_cpp_makefile_star2_O1/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 0x16d9
movl (%r14), %esi
movl 0x4(%r14), %eax
addl %eax, %eax
cmpl %eax, %esi
jbe 0x16cb
decl %esi
jmp 0x16cd
incl %esi
movq %r14, %rdi
callq 0x1820
testl %eax, %eax
js 0x1754
movl (%r14), %esi
leal -0x1(%rsi), %r8d
movl (%r15), %r9d
movl %r9d, %eax
andl %r8d, %eax
movq 0x10(%r14), %rdx
movl %eax, %ecx
shrl $0x4, %ecx
movl (%rdx,%rcx,4), %edi
leal (%rax,%rax), %ecx
shrl %cl, %edi
testb $0x2, %dil
jne 0x178a
movq 0x18(%r14), %r11
movl $0x1, %ebp
movl %eax, %edi
movl %esi, %r12d
movl %edi, %ecx
shrl $0x4, %ecx
movl (%rdx,%rcx,4), %r10d
leal (%rdi,%rdi), %ecx
andl $0x1e, %ecx
movl %r10d, %r13d
shrl %cl, %r13d
testb $0x2, %r13b
jne 0x1762
btl %ecx, %r10d
movl %edi, %r10d
jb 0x1741
movl %edi, %ecx
movl %r12d, %r10d
cmpl %r9d, (%r11,%rcx,8)
je 0x1762
addl %ebp, %edi
andl %r8d, %edi
incl %ebp
movl %r10d, %r12d
movl %r10d, %ecx
cmpl %eax, %edi
jne 0x1712
jmp 0x1767
movl $0xffffffff, (%rbx)     # imm = 0xFFFFFFFF
movl (%r14), %eax
jmp 0x1810
movl %r12d, %r10d
movl %esi, %ecx
movl %ecx, %eax
cmpl %esi, %ecx
jne 0x178a
movl %edi, %eax
shrl $0x4, %eax
movl (%rdx,%rax,4), %eax
leal (%rdi,%rdi), %ecx
shrl %cl, %eax
cmpl %esi, %r10d
cmovel %edi, %r10d
testb $0x2, %al
cmovel %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 0x17ac
testb $0x1, %dl
jne 0x17e9
movl $0x0, (%rbx)
jmp 0x1810
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 0x1810
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