// File: TTLIUJJ[P]acker_redis/dict.cpp
// Function: dictGenericDelete(dict*, void const*, int)
static int dictGenericDelete(dict *d, const void *key, int nofree)
{
	unsigned int h, idx;
	dictEntry *de, *prev;
	int table;

	if (d->ht[0].size == 0)
		return DICT_ERR;
	if (dictIsRehashing(d))
		_dictRehashStep(d);
	h = dictHashKey(d, key);

	for (table = 0; table < 2; ++table) {
		idx = h & d->ht[table].size_mask;
		de = d->ht[table].table[idx];
		prev = NULL;
		while (de) {
			if (dictCompareKeys(d, key, de->key)) {
				if (prev) {
					prev->next = de->next;
				}
				else {
					d->ht[table].table[idx] = de->next;
				}
				if (!nofree) {
					dictFreeKey(d, de);
					dictFreeVal(d, de);
				}
				zfree(de);
				--d->ht[table].used;
				return DICT_OK;
			}
			prev = de;
			de = de->next;
		}
		if (!dictIsRehashing(d))
			break;
	}
	return DICT_ERR;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x417a
movl $0x1, -0x4(%rbp)
jmp 0x435f
movq -0x10(%rbp), %rax
cmpl $-0x1, 0x50(%rax)
je 0x418d
movq -0x10(%rbp), %rdi
callq 0x3760
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rdi
callq *%rax
movl %eax, -0x20(%rbp)
movl $0x0, -0x3c(%rbp)
cmpl $0x2, -0x3c(%rbp)
jge 0x4358
movl -0x20(%rbp), %eax
movq -0x10(%rbp), %rcx
addq $0x10, %rcx
movslq -0x3c(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rcx
andq 0x18(%rcx), %rax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
addq $0x10, %rax
movslq -0x3c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rax
movl -0x24(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x433c
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x18(%rax)
je 0x4235
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rcx
movq (%rcx), %rdx
callq *%rax
movl %eax, -0x40(%rbp)
jmp 0x424b
movq -0x18(%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 0x4323
cmpq $0x0, -0x38(%rbp)
je 0x4270
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x4295
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x10(%rbp), %rax
addq $0x10, %rax
movslq -0x3c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rax
movl -0x24(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
cmpl $0x0, -0x1c(%rbp)
jne 0x42f2
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x20(%rax)
je 0x42c5
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rdi
movq -0x30(%rbp), %rcx
movq (%rcx), %rsi
callq *%rax
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0x42f0
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rdi
movq -0x30(%rbp), %rcx
movq 0x8(%rcx), %rsi
callq *%rax
jmp 0x42f2
movq -0x30(%rbp), %rdi
callq 0x5a10
movq -0x10(%rbp), %rax
addq $0x10, %rax
movslq -0x3c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x8(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x435f
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x41f7
movq -0x10(%rbp), %rax
cmpl $-0x1, 0x50(%rax)
jne 0x4348
jmp 0x4358
jmp 0x434a
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x41a7
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)