// File: TTLIUJJ[P]acker_redis/db.cpp
// Function: removeHashEntry(dict*, void*, void*)
void removeHashEntry(dict *d, void *key, void *val)
{
	unsigned int h, idx, table;
	dictEntry *cur, *prev;
	int decr = 0;
	h = (d->type->hashFunction)(key);
	for (table = 0; table < 2; ++table) {
		idx = h & d->ht[table].size_mask;
		cur = d->ht[table].table[idx];
		prev = NULL;
		if (cur != NULL) {
			if (dictCompareKeys(d, key, cur->key)) {
				d->ht[table].table[idx] = cur->next;
				decr = 1;
				break;
			}
			prev = cur;
			cur = cur->next;
		}
		while (cur != NULL) {
			if (dictCompareKeys(d, key, cur->key)) {
				prev->next = cur->next;
				decr = 1;
				break;
			}
			prev = cur;
			cur = cur->next;
		}
		if (dictIsRehashing(d))
			break;
	}
	if (decr) {
		--d->ht[table].used;
		decrRefCountVoid(key);
		decrRefCountVoid(val);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x3c(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rdi
callq *%rax
movl %eax, -0x1c(%rbp)
movl $0x0, -0x24(%rbp)
cmpl $0x2, -0x24(%rbp)
jae 0x61ff
movl -0x1c(%rbp), %eax
movq -0x8(%rbp), %rcx
addq $0x10, %rcx
movl -0x24(%rbp), %edx
shlq $0x5, %rdx
addq %rdx, %rcx
andq 0x18(%rcx), %rax
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rax
movl -0x24(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rax
movl -0x20(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x6153
movq -0x8(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x18(%rax)
je 0x60f1
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rdi
movq -0x10(%rbp), %rsi
movq -0x30(%rbp), %rcx
movq (%rcx), %rdx
callq *%rax
movl %eax, -0x40(%rbp)
jmp 0x6107
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
cmpq (%rcx), %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl $0x0, %eax
je 0x613f
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x8(%rbp), %rax
addq $0x10, %rax
movl -0x24(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rax
movl -0x20(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movl $0x1, -0x3c(%rbp)
jmp 0x61ff
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x6155
cmpq $0x0, -0x30(%rbp)
je 0x61e3
movq -0x8(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x18(%rax)
je 0x6193
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rdi
movq -0x10(%rbp), %rsi
movq -0x30(%rbp), %rcx
movq (%rcx), %rdx
callq *%rax
movl %eax, -0x44(%rbp)
jmp 0x61a9
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
cmpq (%rcx), %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
cmpl $0x0, %eax
je 0x61ca
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x10(%rax)
movl $0x1, -0x3c(%rbp)
jmp 0x61e3
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x6155
movq -0x8(%rbp), %rax
cmpl $-0x1, 0x50(%rax)
je 0x61ef
jmp 0x61ff
jmp 0x61f1
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x6065
cmpl $0x0, -0x3c(%rbp)
je 0x6235
movq -0x8(%rbp), %rax
addq $0x10, %rax
movl -0x24(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rdi
callq 0x6490
movq -0x18(%rbp), %rdi
callq 0x6490
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)