// File: 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:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x48(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movl 0x8(%rcx), %eax
cmpl 0xc(%rcx), %eax
jb 0x1809
movq 0x10(%rsp), %rcx
movl (%rcx), %eax
movl 0x4(%rcx), %ecx
shll %ecx
cmpl %ecx, %eax
jbe 0x17d6
movq 0x10(%rsp), %rdi
movl (%rdi), %esi
subl $0x1, %esi
callq 0x1b70
cmpl $0x0, %eax
jge 0x17d4
movq 0x10(%rsp), %rax
movq 0x38(%rsp), %rcx
movl $0xffffffff, (%rcx)     # imm = 0xFFFFFFFF
movl (%rax), %eax
movl %eax, 0x54(%rsp)
jmp 0x1b05
jmp 0x1807
movq 0x10(%rsp), %rdi
movl (%rdi), %esi
addl $0x1, %esi
callq 0x1b70
cmpl $0x0, %eax
jge 0x1805
movq 0x10(%rsp), %rax
movq 0x38(%rsp), %rcx
movl $0xffffffff, (%rcx)     # imm = 0xFFFFFFFF
movl (%rax), %eax
movl %eax, 0x54(%rsp)
jmp 0x1b05
jmp 0x1807
jmp 0x1809
movq 0x10(%rsp), %rax
movl (%rax), %ecx
subl $0x1, %ecx
movl %ecx, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
movl (%rax), %eax
movl %eax, 0x28(%rsp)
movl %eax, 0x34(%rsp)
movq 0x40(%rsp), %rsi
leaq 0x1b(%rsp), %rdi
callq 0x1f90
movl %eax, %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0x30(%rsp)
movl 0x30(%rsp), %ecx
andl 0x20(%rsp), %ecx
movl %ecx, 0x2c(%rsp)
movq 0x10(%rax), %rax
movl 0x2c(%rsp), %ecx
shrl $0x4, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl 0x2c(%rsp), %ecx
andl $0xf, %ecx
shll %ecx
shrl %cl, %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x187f
movl 0x2c(%rsp), %eax
movl %eax, 0x34(%rsp)
jmp 0x19dc
movl 0x2c(%rsp), %eax
movl %eax, 0x24(%rsp)
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rax
movl 0x2c(%rsp), %ecx
shrl $0x4, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl 0x2c(%rsp), %ecx
andl $0xf, %ecx
shll %ecx
shrl %cl, %eax
movl %eax, %ecx
andl $0x2, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0xf(%rsp)
jne 0x1918
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rax
movl 0x2c(%rsp), %ecx
shrl $0x4, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl 0x2c(%rsp), %ecx
andl $0xf, %ecx
shll %ecx
shrl %cl, %eax
movl %eax, %ecx
andl $0x1, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, 0xe(%rsp)
jne 0x1910
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rsi
movl 0x2c(%rsp), %eax
shlq $0x3, %rax
addq %rax, %rsi
movq 0x40(%rsp), %rdx
leaq 0x1a(%rsp), %rdi
callq 0x1fb0
xorb $-0x1, %al
movb %al, 0xe(%rsp)
movb 0xe(%rsp), %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x1922
jmp 0x1984
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rax
movl 0x2c(%rsp), %ecx
shrl $0x4, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl 0x2c(%rsp), %ecx
andl $0xf, %ecx
shll %ecx
shrl %cl, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x1952
movl 0x2c(%rsp), %eax
movl %eax, 0x28(%rsp)
movl 0x2c(%rsp), %eax
movl 0x1c(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, 0x1c(%rsp)
addl %ecx, %eax
andl 0x20(%rsp), %eax
movl %eax, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
cmpl 0x24(%rsp), %eax
jne 0x197f
movl 0x28(%rsp), %eax
movl %eax, 0x34(%rsp)
jmp 0x1984
jmp 0x1887
movq 0x10(%rsp), %rcx
movl 0x34(%rsp), %eax
cmpl (%rcx), %eax
jne 0x19da
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rax
movl 0x2c(%rsp), %ecx
shrl $0x4, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl 0x2c(%rsp), %ecx
andl $0xf, %ecx
shll %ecx
shrl %cl, %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x19d0
movq 0x10(%rsp), %rcx
movl 0x28(%rsp), %eax
cmpl (%rcx), %eax
je 0x19d0
movl 0x28(%rsp), %eax
movl %eax, 0x34(%rsp)
jmp 0x19d8
movl 0x2c(%rsp), %eax
movl %eax, 0x34(%rsp)
jmp 0x19da
jmp 0x19dc
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rax
movl 0x34(%rsp), %ecx
shrl $0x4, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl 0x34(%rsp), %ecx
andl $0xf, %ecx
shll %ecx
shrl %cl, %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x1a6c
movq 0x10(%rsp), %rax
movq 0x40(%rsp), %rsi
movq 0x18(%rax), %rcx
movl 0x34(%rsp), %edx
movq (%rsi), %rsi
movq %rsi, (%rcx,%rdx,8)
movl 0x34(%rsp), %ecx
andl $0xf, %ecx
shll %ecx
movl %ecx, %ecx
movl $0x3, %edi
shlq %cl, %rdi
xorq $-0x1, %rdi
movq 0x10(%rax), %rcx
movl 0x34(%rsp), %edx
shrl $0x4, %edx
movl %edx, %edx
movl (%rcx,%rdx,4), %esi
andq %rdi, %rsi
movl %esi, (%rcx,%rdx,4)
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
movq 0x38(%rsp), %rax
movl $0x1, (%rax)
jmp 0x1afd
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rax
movl 0x34(%rsp), %ecx
shrl $0x4, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl 0x34(%rsp), %ecx
andl $0xf, %ecx
shll %ecx
shrl %cl, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x1af0
movq 0x10(%rsp), %rax
movq 0x40(%rsp), %rsi
movq 0x18(%rax), %rcx
movl 0x34(%rsp), %edx
movq (%rsi), %rsi
movq %rsi, (%rcx,%rdx,8)
movl 0x34(%rsp), %ecx
andl $0xf, %ecx
shll %ecx
movl %ecx, %ecx
movl $0x3, %edi
shlq %cl, %rdi
xorq $-0x1, %rdi
movq 0x10(%rax), %rcx
movl 0x34(%rsp), %edx
shrl $0x4, %edx
movl %edx, %edx
movl (%rcx,%rdx,4), %esi
andq %rdi, %rsi
movl %esi, (%rcx,%rdx,4)
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
movq 0x38(%rsp), %rax
movl $0x2, (%rax)
jmp 0x1afb
movq 0x38(%rsp), %rax
movl $0x0, (%rax)
jmp 0x1afd
movl 0x34(%rsp), %eax
movl %eax, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nop