// File: /workspace/github_c_makefile_star2_O0/oridb[P]mc/util/htab.c
// Function: htput
int
htput(Htab *ht, void *k, void *v)
{
	int i;
	ulong h;
	int di;

	di = 0;
	h = hash(ht, k);
	i = h & (ht->sz - 1);
	while (ht->hashes[i] && !ht->dead[i]) {
		/* second insertion overwrites first. nb, we shouldn't touch the
		 * keys for dead values */
		if (ht->hashes[i] == h) {
			if (ht->dead[i])
				break;
			else if (ht->cmp(ht->keys[i], k))
				goto conflicted;
		}
		di++;
		i = (h + di) & (ht->sz - 1);
	}
	ht->nelt++;
conflicted:
	if (ht->dead[i])
		ht->ndead--;
	ht->hashes[i] = h;
	ht->keys[i] = k;
	ht->vals[i] = v;
	ht->dead[i] = 0;

	if (ht->sz < ht->nelt * 2)
		grow(ht, ht->sz * 2);
	if (ht->sz < ht->ndead * 4)
		grow(ht, ht->sz);
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x492e0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rcx
subq $0x1, %rcx
andq %rcx, %rax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rcx
movslq -0x1c(%rbp), %rdx
xorl %eax, %eax
cmpq $0x0, (%rcx,%rdx,8)
movb %al, -0x2d(%rbp)
je 0x49172
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x1c(%rbp), %rcx
cmpb $0x0, (%rax,%rcx)
setne %al
xorb $-0x1, %al
movb %al, -0x2d(%rbp)
movb -0x2d(%rbp), %al
testb $0x1, %al
jne 0x4917b
jmp 0x491f9
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq -0x28(%rbp), %rax
jne 0x491ce
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x1c(%rbp), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x491a5
jmp 0x491f9
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rcx
movslq -0x1c(%rbp), %rdx
movq (%rcx,%rdx,8), %rdi
movq -0x10(%rbp), %rsi
callq *%rax
cmpl $0x0, %eax
je 0x491ca
jmp 0x49207
jmp 0x491cc
jmp 0x491ce
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rax
movslq -0x2c(%rbp), %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rcx
subq $0x1, %rcx
andq %rcx, %rax
movl %eax, -0x1c(%rbp)
jmp 0x49142
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x1c(%rbp), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x49229
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x1c(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
shlq %rcx
cmpq %rcx, %rax
jae 0x492a2
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
shlq %rax
movl %eax, %esi
callq 0x49330
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rcx
shlq $0x2, %rcx
cmpq %rcx, %rax
jae 0x492ce
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl %eax, %esi
callq 0x49330
movl $0x1, %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)