// File: /workspace/github_cpp_makefile_star2_O2/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
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movl 0x8(%rdi), %eax
cmpl 0xc(%rdi), %eax
jb 0x159e
movl (%r14), %esi
movl 0x4(%r14), %eax
addl %eax, %eax
cmpl %eax, %esi
jbe 0x158c
decl %esi
jmp 0x158e
incl %esi
movq %r14, %rdi
callq 0x170e
testl %eax, %eax
js 0x1639
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 0x15ca
movl %edi, %eax
jmp 0x1667
movq %r15, 0x8(%rsp)
movq %rbx, 0x10(%rsp)
movq 0x18(%r14), %r12
pushq $0x1
popq %rbp
pushq $0x2
popq %r15
movl %edi, %r11d
movl %esi, %r10d
movl %r11d, %eax
shrl $0x4, %eax
movl (%rdx,%rax,4), %ebx
leal (%r11,%r11), %ecx
andl $0x1e, %ecx
movl %r15d, %r13d
shll %cl, %r13d
testl %r13d, %ebx
jne 0x1644
btl %ecx, %ebx
movl %r11d, %eax
jb 0x1614
movl %r11d, %eax
cmpl %r9d, (%r12,%rax,8)
je 0x1644
movl %r10d, %eax
addl %ebp, %r11d
andl %r8d, %r11d
incl %ebp
movl %eax, %r10d
cmpl %edi, %r11d
jne 0x15e5
movb $0x1, %cl
movl %esi, %r10d
cmpl %esi, %eax
movq 0x10(%rsp), %rbx
movq 0x8(%rsp), %r15
je 0x1657
jmp 0x1667
orl $-0x1, (%rbx)
movl (%r14), %eax
jmp 0x16e6
testl %r13d, %ebx
sete %cl
movl %r11d, %edi
movq 0x10(%rsp), %rbx
movq 0x8(%rsp), %r15
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 0x1686
testb $0x1, %dl
jne 0x16c1
andl $0x0, (%rbx)
jmp 0x16e6
movq 0x18(%r14), %rdx
movl %eax, %edi
pushq $0x3
popq %r8
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 0x16e6
movq 0x18(%r14), %rdx
movl %eax, %edi
movq (%r15), %r8
movq %r8, (%rdx,%rdi,8)
pushq $0x3
popq %rdx
shll %cl, %edx
notl %edx
movq 0x10(%r14), %rcx
andl %edx, (%rcx,%rsi,4)
incl 0x4(%r14)
movl $0x2, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop