LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/quicklist.c
// Function: quicklistZiplistMerge
REDIS_STATIC quicklistNode *_quicklistZiplistMerge(quicklist *quicklist,
                                                   quicklistNode *a,
                                                   quicklistNode *b) {
    D("Requested merge (a,b) (%u, %u)", a->count, b->count);

    quicklistDecompressNode(a);
    quicklistDecompressNode(b);
    if ((ziplistMerge(&a->zl, &b->zl))) {
        /* We merged ziplists! Now remove the unused quicklistNode. */
        quicklistNode *keep = NULL, *nokeep = NULL;
        if (!a->zl) {
            nokeep = a;
            keep = b;
        } else if (!b->zl) {
            nokeep = b;
            keep = a;
        }
        keep->count = ziplistLen(keep->zl);
        quicklistNodeUpdateSz(keep);

        nokeep->count = 0;
        __quicklistDelNode(quicklist, nokeep);
        quicklistCompress(quicklist, keep);
        return keep;
    } else {
        /* else, the merge returned NULL and nothing changed. */
        return NULL;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
testq %rsi, %rsi
je 0x27b87
movl $0x30000, %eax          # imm = 0x30000
andl 0x1c(%r15), %eax
cmpl $0x20000, %eax          # imm = 0x20000
jne 0x27b87
movq %r15, %rdi
callq 0x2732d
testq %rbx, %rbx
je 0x27ba3
movl $0x30000, %eax          # imm = 0x30000
andl 0x1c(%rbx), %eax
cmpl $0x20000, %eax          # imm = 0x20000
jne 0x27ba3
movq %rbx, %rdi
callq 0x2732d
leaq 0x10(%r15), %r12
leaq 0x10(%rbx), %rsi
movq %r12, %rdi
callq 0x35956
testq %rax, %rax
je 0x27c19
cmpq $0x0, (%r12)
je 0x27bd3
xorl %eax, %eax
cmpq %rax, 0x10(%rbx)
cmovneq %rax, %r15
cmoveq %rbx, %rax
movq %r15, %rbx
movq %rax, %r15
movq 0x10(%rbx), %rdi
callq 0x35f0c
movw %ax, 0x1c(%rbx)
movq 0x10(%rbx), %rdi
callq 0x35f52
movl %eax, 0x18(%rbx)
movzwl 0x1e(%r15), %eax
shll $0x10, %eax
movl %eax, 0x1c(%r15)
movq %r14, %rdi
movq %r15, %rsi
callq 0x278b3
movl 0x1c(%rbx), %eax
btl $0x14, %eax
jb 0x27c1d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x27399
jmp 0x27c31
xorl %ebx, %ebx
jmp 0x27c31
andl $0x30000, %eax          # imm = 0x30000
cmpl $0x10000, %eax          # imm = 0x10000
jne 0x27c31
movq %rbx, %rdi
callq 0x272ac
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/quicklist.c
// Function: quicklistMergeNodes
REDIS_STATIC void _quicklistMergeNodes(quicklist *quicklist,
                                       quicklistNode *center) {
    int fill = quicklist->fill;
    quicklistNode *prev, *prev_prev, *next, *next_next, *target;
    prev = prev_prev = next = next_next = target = NULL;

    if (center->prev) {
        prev = center->prev;
        if (center->prev->prev)
            prev_prev = center->prev->prev;
    }

    if (center->next) {
        next = center->next;
        if (center->next->next)
            next_next = center->next->next;
    }

    /* Try to merge prev_prev and prev */
    if (_quicklistNodeAllowMerge(prev, prev_prev, fill)) {
        _quicklistZiplistMerge(quicklist, prev_prev, prev);
        prev_prev = prev = NULL; /* they could have moved, invalidate them. */
    }

    /* Try to merge next and next_next */
    if (_quicklistNodeAllowMerge(next, next_next, fill)) {
        _quicklistZiplistMerge(quicklist, next, next_next);
        next = next_next = NULL; /* they could have moved, invalidate them. */
    }

    /* Try to merge center node and previous node */
    if (_quicklistNodeAllowMerge(center, center->prev, fill)) {
        target = _quicklistZiplistMerge(quicklist, center->prev, center);
        center = NULL; /* center could have been deleted, invalidate it. */
    } else {
        /* else, we didn't merge here, but target needs to be valid below. */
        target = center;
    }

    /* Use result of center merge (or original) to merge with next node. */
    if (_quicklistNodeAllowMerge(target, target->next, fill)) {
        _quicklistZiplistMerge(quicklist, target, target->next);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, (%rsp)
movq (%rsi), %r12
testq %r12, %r12
je 0x27c60
movq (%r12), %rbx
jmp 0x27c62
xorl %ebx, %ebx
movq (%rsp), %rax
movswl 0x1c(%rax), %ebp
movq 0x8(%r14), %r15
testq %r15, %r15
je 0x27c79
movq 0x8(%r15), %r13
jmp 0x27c7c
xorl %r13d, %r13d
movq %r12, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x275f1
testl %eax, %eax
je 0x27c9c
movq (%rsp), %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x27b59
movq %r15, %rdi
movq %r13, %rsi
movl %ebp, %edx
callq 0x275f1
testl %eax, %eax
je 0x27cbc
movq (%rsp), %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x27b59
movq (%r14), %rbx
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x275f1
testl %eax, %eax
je 0x27ce2
movq (%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x27b59
movq %rax, %r14
movq 0x8(%r14), %rbx
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x275f1
testl %eax, %eax
je 0x27d14
movq (%rsp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x27b59
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/quicklist.c
// Function: quicklistSplitNode
REDIS_STATIC quicklistNode *_quicklistSplitNode(quicklistNode *node, int offset,
                                                int after) {
    size_t zl_sz = node->sz;

    quicklistNode *new_node = quicklistCreateNode();
    new_node->zl = zmalloc(zl_sz);

    /* Copy original ziplist so we can split it */
    memcpy(new_node->zl, node->zl, zl_sz);

    /* -1 here means "continue deleting until the list ends" */
    int orig_start = after ? offset + 1 : 0;
    int orig_extent = after ? -1 : offset;
    int new_start = after ? 0 : offset;
    int new_extent = after ? offset + 1 : -1;

    D("After %d (%d); ranges: [%d, %d], [%d, %d]", after, offset, orig_start,
      orig_extent, new_start, new_extent);

    node->zl = ziplistDeleteRange(node->zl, orig_start, orig_extent);
    node->count = ziplistLen(node->zl);
    quicklistNodeUpdateSz(node);

    new_node->zl = ziplistDeleteRange(new_node->zl, new_start, new_extent);
    new_node->count = ziplistLen(new_node->zl);
    quicklistNodeUpdateSz(new_node);

    D("After split lengths: orig (%d), new (%d)", node->count, new_node->count);
    return new_node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r12d
movl %esi, %r14d
movq %rdi, %r15
movl 0x18(%rdi), %r13d
callq 0x2722c
movq %rax, %rbx
movq %r13, %rdi
callq 0x327b9
movq %rax, 0x10(%rbx)
movq 0x10(%r15), %rsi
movq %rax, %rdi
movq %r13, %rdx
callq 0x26c50
leal 0x1(%r14), %eax
xorl %ebp, %ebp
movl %r12d, %ecx
negl %ecx
movl $0x0, %edx
sbbl %edx, %edx
orl %r14d, %edx
testl %r12d, %r12d
movl %eax, %esi
cmovel %r12d, %esi
cmovnel %ebp, %r14d
cmpl $0x1, %r12d
sbbl %ebp, %ebp
orl %eax, %ebp
movq 0x10(%r15), %rdi
callq 0x35c9e
movq %rax, 0x10(%r15)
movq %rax, %rdi
callq 0x35f0c
movw %ax, 0x1c(%r15)
movq 0x10(%r15), %rdi
callq 0x35f52
movl %eax, 0x18(%r15)
movq 0x10(%rbx), %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x35c9e
movq %rax, 0x10(%rbx)
movq %rax, %rdi
callq 0x35f0c
movw %ax, 0x1c(%rbx)
movq 0x10(%rbx), %rdi
callq 0x35f52
movl %eax, 0x18(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/quicklist.c
// Function: quicklistGetIterator
quicklistIter *quicklistGetIterator(const quicklist *quicklist, int direction) {
    quicklistIter *iter;

    iter = zmalloc(sizeof(*iter));

    if (direction == AL_START_HEAD) {
        iter->current = quicklist->head;
        iter->offset = 0;
    } else if (direction == AL_START_TAIL) {
        iter->current = quicklist->tail;
        iter->offset = -1;
    }

    iter->direction = direction;
    iter->quicklist = quicklist;

    iter->zi = NULL;

    return iter;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
pushq $0x28
popq %rdi
callq 0x327b9
testl %ebp, %ebp
je 0x28376
cmpl $0x1, %ebp
jne 0x28386
leaq 0x8(%rbx), %rdx
pushq $-0x1
popq %rcx
jmp 0x2837b
movl %ebp, %ecx
movq %rbx, %rdx
movq (%rdx), %rdx
movq %rdx, 0x8(%rax)
movq %rcx, 0x18(%rax)
movl %ebp, 0x20(%rax)
movq %rbx, (%rax)
andq $0x0, 0x10(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/quicklist.c
// Function: quicklistGetIteratorAtIdx
quicklistIter *quicklistGetIteratorAtIdx(const quicklist *quicklist,
                                         const int direction,
                                         const long long idx) {
    quicklistEntry entry;

    if (quicklistIndex(quicklist, idx, &entry)) {
        quicklistIter *base = quicklistGetIterator(quicklist, direction);
        base->zi = NULL;
        base->current = entry.node;
        base->offset = entry.offset;
        return base;
    } else {
        return NULL;
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %esi, %ebx
movq %rdi, %r14
leaq 0x8(%rsp), %rax
movq %rdx, %rsi
movq %rax, %rdx
callq 0x27a60
testl %eax, %eax
je 0x283db
movq %r14, %rdi
movl %ebx, %esi
callq 0x28354
andq $0x0, 0x10(%rax)
movq 0x10(%rsp), %rcx
movq %rcx, 0x8(%rax)
movslq 0x34(%rsp), %rcx
movq %rcx, 0x18(%rax)
jmp 0x283dd
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/quicklist.c
// Function: quicklistDup
quicklist *quicklistDup(quicklist *orig) {
    quicklist *copy;

    copy = quicklistNew(orig->fill, orig->compress);

    for (quicklistNode *current = orig->head; current;
         current = current->next) {
        quicklistNode *node = quicklistCreateNode();

        if (node->encoding == QUICKLIST_NODE_ENCODING_LZF) {
            quicklistLZF *lzf = (quicklistLZF *)node->zl;
            size_t lzf_sz = sizeof(*lzf) + lzf->sz;
            node->zl = zmalloc(lzf_sz);
            memcpy(node->zl, current->zl, lzf_sz);
        } else if (node->encoding == QUICKLIST_NODE_ENCODING_RAW) {
            node->zl = zmalloc(current->sz);
            memcpy(node->zl, current->zl, current->sz);
        }

        node->count = current->count;
        copy->count += node->count;
        node->sz = current->sz;
        node->encoding = current->encoding;

        _quicklistInsertNodeAfter(copy, copy->tail, node);
    }

    /* copy->count must equal orig->count here */
    return copy;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x1c(%rdi), %esi
movswl %si, %edi
shrl $0x10, %esi
callq 0x27208
movq %rax, %r14
movl $0x30000, %ebp          # imm = 0x30000
movl $0xfffcffff, %r13d      # imm = 0xFFFCFFFF
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x2867f
callq 0x2722c
movq %rax, %r15
movzwl 0x1e(%rax), %eax
andl $0x3, %eax
cmpl $0x1, %eax
je 0x28624
cmpl $0x2, %eax
jne 0x2863f
movq 0x10(%r15), %rax
movl (%rax), %r12d
addq $0x4, %r12
movq %r12, %rdi
callq 0x327b9
movq %rax, 0x10(%r15)
movq 0x10(%rbx), %rsi
movq %rax, %rdi
movq %r12, %rdx
jmp 0x2863a
movl 0x18(%rbx), %edi
callq 0x327b9
movq %rax, 0x10(%r15)
movq 0x10(%rbx), %rsi
movl 0x18(%rbx), %edx
movq %rax, %rdi
callq 0x26c50
movl 0x1c(%rbx), %eax
movzwl %ax, %eax
movw %ax, 0x1c(%r15)
addq %rax, 0x10(%r14)
movl 0x18(%rbx), %eax
movl %eax, 0x18(%r15)
movl 0x1c(%rbx), %eax
andl %ebp, %eax
movl 0x1c(%r15), %ecx
andl %r13d, %ecx
orl %eax, %ecx
movl %ecx, 0x1c(%r15)
movq 0x8(%r14), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x27564
addq $0x8, %rbx
jmp 0x285dc
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/quicklist.c
// Function: quicklistRotate
void quicklistRotate(quicklist *quicklist) {
    if (quicklist->count <= 1)
        return;

    /* First, get the tail entry */
    unsigned char *p = ziplistIndex(quicklist->tail->zl, -1);
    unsigned char *value;
    long long longval;
    unsigned int sz;
    char longstr[32] = {0};
    ziplistGet(p, &value, &sz, &longval);

    /* If value found is NULL, then ziplistGet populated longval instead */
    if (!value) {
        /* Write the longval as a string so we can re-add it */
        sz = ll2string(longstr, sizeof(longstr), longval);
        value = (unsigned char *)longstr;
    }

    /* Add tail entry to head (must happen before tail is deleted). */
    quicklistPushHead(quicklist, value, sz);

    /* If quicklist has only one node, the head ziplist is also the
     * tail ziplist and PushHead() could have reallocated our single ziplist,
     * which would make our pre-existing 'p' unusable. */
    if (quicklist->len == 1) {
        p = ziplistIndex(quicklist->tail->zl, -1);
    }

    /* Remove tail entry. */
    quicklistDelIndex(quicklist, quicklist->tail, &p);
}

// Assembly:
cmpq $0x2, 0x10(%rdi)
jb 0x2874e
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq 0x10(%rax), %rdi
pushq $-0x1
popq %rsi
callq 0x35aca
movq %rax, 0x8(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
leaq 0x18(%rsp), %r14
leaq 0x4(%rsp), %rdx
leaq 0x10(%rsp), %rcx
movq %rax, %rdi
movq %r14, %rsi
callq 0x35be8
movq (%r14), %r14
testq %r14, %r14
je 0x286f0
movl 0x4(%rsp), %eax
jmp 0x2870e
movq 0x10(%rsp), %rdx
leaq 0x20(%rsp), %r14
pushq $0x20
popq %rsi
movq %r14, %rdi
callq 0x39796
movl %eax, 0x4(%rsp)
movq %r14, 0x18(%rsp)
movl %eax, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2764b
cmpl $0x1, 0x18(%rbx)
jne 0x28736
movq 0x8(%rbx), %rax
movq 0x10(%rax), %rdi
pushq $-0x1
popq %rsi
callq 0x35aca
movq %rax, 0x8(%rsp)
movq 0x8(%rbx), %rsi
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x2791a
addq $0x48, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/quicklist.c
// Function: quicklistPopCustom
int quicklistPopCustom(quicklist *quicklist, int where, unsigned char **data,
                       unsigned int *sz, long long *sval,
                       void *(*saver)(unsigned char *data, unsigned int sz)) {
    unsigned char *p;
    unsigned char *vstr;
    unsigned int vlen;
    long long vlong;
    int pos = (where == QUICKLIST_HEAD) ? 0 : -1;

    if (quicklist->count == 0)
        return 0;

    if (data)
        *data = NULL;
    if (sz)
        *sz = 0;
    if (sval)
        *sval = -123456789;

    quicklistNode *node;
    if (where == QUICKLIST_HEAD && quicklist->head) {
        node = quicklist->head;
    } else if (where == QUICKLIST_TAIL && quicklist->tail) {
        node = quicklist->tail;
    } else {
        return 0;
    }

    p = ziplistIndex(node->zl, pos);
    if (ziplistGet(p, &vstr, &vlen, &vlong)) {
        if (vstr) {
            if (data)
                *data = saver(vstr, vlen);
            if (sz)
                *sz = vlen;
        } else {
            if (data)
                *data = NULL;
            if (sval)
                *sval = vlong;
        }
        quicklistDelIndex(quicklist, node, &p);
        return 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r14
movl %esi, %eax
xorl %ebp, %ebp
movl %esi, %ecx
negl %ecx
movl $0x0, %esi
sbbl %esi, %esi
cmpq $0x0, 0x10(%rdi)
je 0x28841
movq %r8, %r12
movq %rdx, %r15
movq %rdi, %rbx
testq %rdx, %rdx
je 0x2878c
andq $0x0, (%r15)
testq %r14, %r14
je 0x28795
andl $0x0, (%r14)
testq %r12, %r12
je 0x287a2
movq $-0x75bcd15, (%r12)     # imm = 0xF8A432EB
testl %eax, %eax
je 0x287b5
cmpl $-0x1, %eax
jne 0x28841
movq 0x8(%rbx), %r13
jmp 0x287b8
movq (%rbx), %r13
testq %r13, %r13
je 0x28841
movq %r9, 0x8(%rsp)
movq 0x10(%r13), %rdi
callq 0x35aca
movq %rax, 0x20(%rsp)
leaq 0x18(%rsp), %rsi
leaq 0x4(%rsp), %rdx
leaq 0x10(%rsp), %rcx
movq %rax, %rdi
callq 0x35be8
testl %eax, %eax
je 0x28841
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x28817
testq %r15, %r15
je 0x28809
movl 0x4(%rsp), %esi
callq *0x8(%rsp)
movq %rax, (%r15)
testq %r14, %r14
je 0x2882e
movl 0x4(%rsp), %eax
movl %eax, (%r14)
jmp 0x2882e
testq %r15, %r15
je 0x28820
andq $0x0, (%r15)
testq %r12, %r12
je 0x2882e
movq 0x10(%rsp), %rax
movq %rax, (%r12)
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x2791a
pushq $0x1
popq %rbp
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/quicklist.c
// Function: quicklistPop
int quicklistPop(quicklist *quicklist, int where, unsigned char **data,
                 unsigned int *sz, long long *slong) {
    unsigned char *vstr;
    unsigned int vlen;
    long long vlong;
    if (quicklist->count == 0)
        return 0;
    int ret = quicklistPopCustom(quicklist, where, &vstr, &vlen, &vlong,
                                 _quicklistSaver);
    if (data)
        *data = vstr;
    if (slong)
        *slong = vlong;
    if (sz)
        *sz = vlen;
    return ret;
}

// Assembly:
cmpq $0x0, 0x10(%rdi)
je 0x288e4
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %r8, %r14
movq %rcx, %rbx
movq %rdx, %r15
leaq -0x4f(%rip), %r9        # 0x28852
leaq 0x18(%rsp), %rdx
leaq 0xc(%rsp), %rcx
leaq 0x10(%rsp), %r8
callq 0x2874f
testq %r15, %r15
je 0x288c2
movq 0x18(%rsp), %rcx
movq %rcx, (%r15)
testq %r14, %r14
je 0x288cf
movq 0x10(%rsp), %rcx
movq %rcx, (%r14)
testq %rbx, %rbx
je 0x288da
movl 0xc(%rsp), %ecx
movl %ecx, (%rbx)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/dict.c
// Function: dictGenCaseHashFunction
unsigned int dictGenCaseHashFunction(const unsigned char *buf, int len) {
    unsigned int hash = (unsigned int)dict_hash_function_seed;

    while (len--)
        hash = ((hash << 5) + hash) + (tolower(*buf++)); /* hash * 33 + c */
    return hash;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movl 0xcb57c(%rip), %ebx     # 0xf56a0
movl %esi, %r15d
xorl %r12d, %r12d
cmpl %r12d, %r15d
je 0x2a147
imull $0x21, %ebx, %ebx
callq 0x269a0
movq (%rax), %rax
movzbl (%r14,%r12), %ecx
addl (%rax,%rcx,4), %ebx
incq %r12
jmp 0x2a12a
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/dict.c
// Function: dictResize
int dictResize(dict *d)
{
    int minimal;

    if (!dict_can_resize || dictIsRehashing(d)) return DICT_ERR;
    minimal = d->ht[0].used;
    if (minimal < DICT_HT_INITIAL_SIZE)
        minimal = DICT_HT_INITIAL_SIZE;
    return dictExpand(d, minimal);
}

// Assembly:
cmpb $0x0, 0xcf70b(%rip)     # 0xf98a4
jne 0x2a1a2
cmpq $-0x1, 0x50(%rdi)
je 0x2a1a6
pushq $0x1
popq %rax
retq
movl 0x28(%rdi), %eax
cmpl $0x5, %eax
pushq $0x4
popq %rsi
cmovgel %eax, %esi
jmp 0x2a1b7
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/dict.c
// Function: dictExpand
int dictExpand(dict *d, unsigned long size)
{
    dictht n; /* the new hash table */
    unsigned long realsize = _dictNextPower(size);

    /* the size is invalid if it is smaller than the number of
     * elements already inside the hash table */
    if (dictIsRehashing(d) || d->ht[0].used > size)
        return DICT_ERR;

    /* Rehashing to the same table size is not useful. */
    if (realsize == d->ht[0].size) return DICT_ERR;

    /* Allocate the new hash table and initialize all pointers to NULL */
    n.size = realsize;
    n.sizemask = realsize-1;
    n.table = zcalloc(realsize*sizeof(dictEntry*));
    n.used = 0;

    /* Is this the first initialization? If so it's not really a rehashing
     * we just set the first hash table so that it can accept keys. */
    if (d->ht[0].table == NULL) {
        d->ht[0] = n;
        return DICT_OK;
    }

    /* Prepare a second hash table for incremental rehashing */
    d->ht[1] = n;
    d->rehashidx = 0;
    return DICT_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movabsq $0x7ffffffffffffffe, %r14 # imm = 0x7FFFFFFFFFFFFFFE
cmpq %r14, %rsi
jbe 0x2a1d3
incq %r14
jmp 0x2a1e1
pushq $0x4
popq %rax
movq %rax, %r14
addq %rax, %rax
cmpq %rsi, %r14
jb 0x2a1d6
pushq $0x1
popq %rax
cmpq $-0x1, 0x50(%rbx)
jne 0x2a237
cmpq %rsi, 0x28(%rbx)
ja 0x2a237
cmpq 0x18(%rbx), %r14
je 0x2a237
leaq -0x1(%r14), %r15
leaq (,%r14,8), %rdi
callq 0x3280b
cmpq $0x0, 0x10(%rbx)
je 0x2a224
movq %rax, 0x30(%rbx)
movq %r14, 0x38(%rbx)
movq %r15, 0x40(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x48(%rbx)
jmp 0x2a235
movq %rax, 0x10(%rbx)
movq %r14, 0x18(%rbx)
movq %r15, 0x20(%rbx)
andq $0x0, 0x28(%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/dict.c
// Function: dictRehash
int dictRehash(dict *d, int n) {
    int empty_visits = n*10; /* Max number of empty buckets to visit. */
    if (!dictIsRehashing(d)) return 0;

    while(n-- && d->ht[0].used != 0) {
        dictEntry *de, *nextde;

        /* Note that rehashidx can't overflow as we are sure there are more
         * elements because ht[0].used != 0 */
        assert(d->ht[0].size > (unsigned long)d->rehashidx);
        while(d->ht[0].table[d->rehashidx] == NULL) {
            d->rehashidx++;
            if (--empty_visits == 0) return 1;
        }
        de = d->ht[0].table[d->rehashidx];
        /* Move all the keys in this bucket from the old to the new hash HT */
        while(de) {
            unsigned int h;

            nextde = de->next;
            /* Get the index in the new hash table */
            h = dictHashKey(d, de->key) & d->ht[1].sizemask;
            de->next = d->ht[1].table[h];
            d->ht[1].table[h] = de;
            d->ht[0].used--;
            d->ht[1].used++;
            de = nextde;
        }
        d->ht[0].table[d->rehashidx] = NULL;
        d->rehashidx++;
    }

    /* Check if we already rehashed the whole table... */
    if (d->ht[0].used == 0) {
        zfree(d->ht[0].table);
        d->ht[0] = d->ht[1];
        _dictReset(&d->ht[1]);
        d->rehashidx = -1;
        return 0;
    }

    /* More to rehash... */
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x50(%rdi), %rcx
xorl %ebp, %ebp
cmpq $-0x1, %rcx
je 0x2a344
movl %esi, %r14d
movq %rdi, %rbx
imull $0xa, %esi, %r13d
leaq 0x10(%rdi), %r15
leaq 0x30(%rdi), %rax
movq %rax, 0x8(%rsp)
movq 0x28(%rdi), %rax
pushq $0x1
popq %rbp
movq %r15, 0x10(%rsp)
subl $0x1, %r14d
jb 0x2a310
testq %rax, %rax
je 0x2a315
cmpq %rcx, 0x18(%rbx)
jbe 0x2a355
movq (%r15), %rdx
incq %rcx
movq -0x8(%rdx,%rcx,8), %r15
testq %r15, %r15
jne 0x2a2ed
movq %rcx, 0x50(%rbx)
incq %rcx
decl %r13d
jne 0x2a2a1
jmp 0x2a344
movq (%r15), %rdi
movq 0x10(%r15), %r12
movq (%rbx), %rax
callq *(%rax)
andl 0x40(%rbx), %eax
movq 0x30(%rbx), %rcx
movq (%rcx,%rax,8), %rdx
movq %rdx, 0x10(%r15)
movq %r15, (%rcx,%rax,8)
movq 0x28(%rbx), %rax
decq %rax
movq %rax, 0x28(%rbx)
incq 0x48(%rbx)
movq %r12, %r15
testq %r15, %r15
jne 0x2a2bc
movq 0x10(%rbx), %rdx
movq 0x50(%rbx), %rcx
andq $0x0, (%rdx,%rcx,8)
incq %rcx
movq %rcx, 0x50(%rbx)
movq 0x10(%rsp), %r15
jmp 0x2a27e
testq %rax, %rax
jne 0x2a344
movq 0x10(%rbx), %rdi
callq 0x328f9
movq 0x8(%rsp), %rax
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups %xmm1, 0x10(%r15)
movups %xmm0, (%r15)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
orq $-0x1, 0x50(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x83e78(%rip), %rdi     # 0xae1d4
leaq 0x962b4(%rip), %rsi     # 0xc0617
movl $0xfe, %edx
callq 0x57ac8
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/dict.c
// Function: dictRehashMilliseconds
int dictRehashMilliseconds(dict *d, int ms) {
    long long start = timeInMilliseconds();
    int rehashes = 0;

    while(dictRehash(d,100)) {
        rehashes += 100;
        if (timeInMilliseconds()-start > ms) break;
    }
    return rehashes;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
callq 0x2a375
movq %rax, %r14
movslq %ebp, %r12
xorl %ebp, %ebp
pushq $0x64
popq %r15
movq %rbx, %rdi
movl %r15d, %esi
callq 0x2a23d
testl %eax, %eax
je 0x2a3e2
addl $0x64, %ebp
callq 0x2a375
subq %r14, %rax
cmpq %r12, %rax
jle 0x2a3c3
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/dict.c
// Function: dictAddRaw
dictEntry *dictAddRaw(dict *d, void *key)
{
    int index;
    dictEntry *entry;
    dictht *ht;

    if (dictIsRehashing(d)) _dictRehashStep(d);

    /* Get the index of the new element, or -1 if
     * the element already exists. */
    if ((index = _dictKeyIndex(d, key)) == -1)
        return NULL;

    /* Allocate the memory and store the new entry.
     * Insert the element in top, with the assumption that in a database
     * system it is more likely that recently added entries are accessed
     * more frequently. */
    ht = dictIsRehashing(d) ? &d->ht[1] : &d->ht[0];
    entry = zmalloc(sizeof(*entry));
    entry->next = ht->table[index];
    ht->table[index] = entry;
    ht->used++;

    /* Set the hash entry fields. */
    dictSetKey(d, entry, key);
    return entry;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpq $-0x1, 0x50(%rdi)
je 0x2a455
movq %r14, %rdi
callq 0x2a57a
cmpq $-0x1, 0x50(%r14)
jne 0x2a4a7
movq 0x18(%r14), %rcx
testq %rcx, %rcx
je 0x2a483
movq 0x28(%r14), %rsi
cmpq %rcx, %rsi
jb 0x2a4a7
cmpb $0x1, 0xcf436(%rip)     # 0xf98a4
jne 0x2a47e
movq %rsi, %rax
xorl %edx, %edx
divq %rcx
cmpq $0x6, %rax
jb 0x2a4a7
addq %rsi, %rsi
jmp 0x2a486
pushq $0x4
popq %rsi
movq %r14, %rdi
callq 0x2a1b7
testl %eax, %eax
je 0x2a4a7
xorl %r13d, %r13d
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r14), %rax
movq %rbx, %rdi
callq *(%rax)
leaq 0x10(%r14), %r13
xorl %r15d, %r15d
movl %eax, 0x4(%rsp)
cmpq $0x2, %r15
je 0x2a51b
movq %r15, %rcx
shlq $0x5, %rcx
movl 0x10(%r13,%rcx), %r12d
andl %eax, %r12d
leaq (,%r12,8), %rbp
addq (%r13,%rcx), %rbp
movq (%rbp), %rbp
testq %rbp, %rbp
je 0x2a50d
movq (%rbp), %rdx
cmpq %rbx, %rdx
je 0x2a492
movq (%r14), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x2a507
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq *%rax
testl %eax, %eax
jne 0x2a492
addq $0x10, %rbp
jmp 0x2a4dc
incq %r15
cmpq $-0x1, 0x50(%r14)
movl 0x4(%rsp), %eax
jne 0x2a4ba
cmpl $-0x1, %r12d
je 0x2a492
xorl %r15d, %r15d
cmpq $-0x1, 0x50(%r14)
setne %r15b
shll $0x5, %r15d
pushq $0x18
popq %rdi
callq 0x327b9
movq %rax, %r13
movq 0x10(%r14,%r15), %rax
movslq %r12d, %rcx
movq (%rax,%rcx,8), %rdx
movq %rdx, 0x10(%r13)
movq %r13, (%rax,%rcx,8)
incq 0x28(%r14,%r15)
movq (%r14), %rax
movq 0x8(%rax), %rax
testq %rax, %rax
je 0x2a571
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq *%rax
movq %rax, %rbx
movq %rbx, (%r13)
jmp 0x2a495
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/dict.c
// Function: dictReplace
int dictReplace(dict *d, void *key, void *val)
{
    dictEntry *entry, auxentry;

    /* Try to add the element. If the key
     * does not exists dictAdd will suceed. */
    if (dictAdd(d, key, val) == DICT_OK)
        return 1;
    /* It already exists, get the entry */
    entry = dictFind(d, key);
    /* Set the new value and free the old one. Note that it is important
     * to do that in this order, as the value may just be exactly the same
     * as the previous one. In this context, think to reference counting,
     * you want to increment (set), and then decrement (free), and not the
     * reverse. */
    auxentry = *entry;
    dictSetVal(d, entry, val);
    dictFreeVal(d, &auxentry);
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x2a3ed
testl %eax, %eax
je 0x2a5eb
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2a5f9
movq %rax, %r12
movq 0x8(%rax), %r15
movq (%rbx), %rax
movq 0x10(%rax), %rax
testq %rax, %rax
je 0x2a5cd
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq *%rax
movq %rax, %r14
movq %r14, 0x8(%r12)
movq (%rbx), %rax
movq 0x28(%rax), %rax
xorl %ebp, %ebp
testq %rax, %rax
je 0x2a5ee
movq 0x8(%rbx), %rdi
movq %r15, %rsi
callq *%rax
jmp 0x2a5ee
pushq $0x1
popq %rbp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/dict.c
// Function: dictFind
dictEntry *dictFind(dict *d, const void *key)
{
    dictEntry *he;
    unsigned int h, idx, table;

    if (d->ht[0].used + d->ht[1].used == 0) return NULL; /* dict is empty */
    if (dictIsRehashing(d)) _dictRehashStep(d);
    h = dictHashKey(d, key);
    for (table = 0; table <= 1; table++) {
        idx = h & d->ht[table].sizemask;
        he = d->ht[table].table[idx];
        while(he) {
            if (key==he->key || dictCompareKeys(d, key, he->key))
                return he;
            he = he->next;
        }
        if (!dictIsRehashing(d)) return NULL;
    }
    return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x28(%rdi), %rax
addq 0x48(%rdi), %rax
jne 0x2a615
xorl %ebp, %ebp
jmp 0x2a69c
movq %rsi, %rbx
movq %rdi, %r14
cmpq $-0x1, 0x50(%rdi)
je 0x2a62a
movq %r14, %rdi
callq 0x2a57a
leaq 0x10(%r14), %r12
movq (%r14), %rax
movq %rbx, %rdi
callq *(%rax)
movl %eax, 0x4(%rsp)
xorl %ebp, %ebp
xorl %r13d, %r13d
cmpq $0x2, %r13
je 0x2a69c
movq %r13, %rax
shlq $0x5, %rax
movl 0x10(%r12,%rax), %r15d
andl 0x4(%rsp), %r15d
shlq $0x3, %r15
addq (%r12,%rax), %r15
movq (%r15), %r15
testq %r15, %r15
je 0x2a68d
movq (%r15), %rdx
cmpq %rbx, %rdx
je 0x2a699
movq (%r14), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x2a687
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq *%rax
testl %eax, %eax
jne 0x2a699
addq $0x10, %r15
jmp 0x2a65e
incq %r13
cmpq $-0x1, 0x50(%r14)
jne 0x2a63f
jmp 0x2a69c
movq %r15, %rbp
movq %rbp, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/dict.c
// Function: dictGenericDelete
static int dictGenericDelete(dict *d, const void *key, int nofree)
{
    unsigned int h, idx;
    dictEntry *he, *prevHe;
    int table;

    if (d->ht[0].size == 0) return DICT_ERR; /* d->ht[0].table is NULL */
    if (dictIsRehashing(d)) _dictRehashStep(d);
    h = dictHashKey(d, key);

    for (table = 0; table <= 1; table++) {
        idx = h & d->ht[table].sizemask;
        he = d->ht[table].table[idx];
        prevHe = NULL;
        while(he) {
            if (key==he->key || dictCompareKeys(d, key, he->key)) {
                /* Unlink the element from the list */
                if (prevHe)
                    prevHe->next = he->next;
                else
                    d->ht[table].table[idx] = he->next;
                if (!nofree) {
                    dictFreeKey(d, he);
                    dictFreeVal(d, he);
                }
                zfree(he);
                d->ht[table].used--;
                return DICT_OK;
            }
            prevHe = he;
            he = he->next;
        }
        if (!dictIsRehashing(d)) break;
    }
    return DICT_ERR; /* not found */
}

// Assembly:
pushq $0x1
popq %rax
cmpq $0x0, 0x18(%rdi)
je 0x2a819
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movl %edx, (%rsp)
cmpq $-0x1, 0x50(%rdi)
je 0x2a714
movq %rbx, %rdi
callq 0x2a57a
leaq 0x10(%rbx), %r14
movq (%rbx), %rax
movq %r15, %rdi
callq *(%rax)
xorl %r13d, %r13d
movq %r14, 0x10(%rsp)
movl %eax, 0x4(%rsp)
cmpq $0x2, %r13
je 0x2a79e
movq %r13, %rdx
shlq $0x5, %rdx
leaq (%r14,%rdx), %rcx
movq %rcx, 0x8(%rsp)
movl 0x10(%r14,%rdx), %ebp
andl %eax, %ebp
shlq $0x3, %rbp
movq (%r14,%rdx), %rax
addq %rbp, %rax
xorl %r14d, %r14d
movq (%rax), %r12
testq %r12, %r12
je 0x2a78b
movq (%r12), %rdx
cmpq %r15, %rdx
je 0x2a7a3
movq (%rbx), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x2a781
movq 0x8(%rbx), %rdi
movq %r15, %rsi
callq *%rax
testl %eax, %eax
jne 0x2a7a3
leaq 0x10(%r12), %rax
movq %r12, %r14
jmp 0x2a757
incq %r13
cmpq $-0x1, 0x50(%rbx)
movq 0x10(%rsp), %r14
movl 0x4(%rsp), %eax
jne 0x2a72c
pushq $0x1
popq %rax
jmp 0x2a80b
movq 0x10(%r12), %rax
testq %r14, %r14
je 0x2a7bb
addq $0x10, %r14
movl (%rsp), %ecx
movq 0x8(%rsp), %r15
jmp 0x2a7c9
movq 0x8(%rsp), %r15
addq (%r15), %rbp
movq %rbp, %r14
movl (%rsp), %ecx
movq %rax, (%r14)
testl %ecx, %ecx
jne 0x2a7fd
movq (%rbx), %rcx
movq 0x20(%rcx), %rax
testq %rax, %rax
je 0x2a7e9
movq 0x8(%rbx), %rdi
movq (%r12), %rsi
callq *%rax
movq (%rbx), %rcx
movq 0x28(%rcx), %rax
testq %rax, %rax
je 0x2a7fd
movq 0x8(%rbx), %rdi
movq 0x8(%r12), %rsi
callq *%rax
movq %r12, %rdi
callq 0x328f9
decq 0x18(%r15)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/dict.c
// Function: dictClear
int _dictClear(dict *d, dictht *ht, void(callback)(void *)) {
    unsigned long i;

    /* Free all the elements */
    for (i = 0; i < ht->size && ht->used > 0; i++) {
        dictEntry *he, *nextHe;

        if (callback && (i & 65535) == 0) callback(d->privdata);

        if ((he = ht->table[i]) == NULL) continue;
        while(he) {
            nextHe = he->next;
            dictFreeKey(d, he);
            dictFreeVal(d, he);
            zfree(he);
            ht->used--;
            he = nextHe;
        }
    }
    /* Free the table and the allocated cache structure */
    zfree(ht->table);
    /* Re-initialize the table */
    _dictReset(ht);
    return DICT_OK; /* never fails */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
xorl %r13d, %r13d
cmpq 0x8(%rbx), %r13
jae 0x2a8b7
cmpq $0x0, 0x18(%rbx)
je 0x2a8b7
testq %r14, %r14
sete %al
testw %r13w, %r13w
setne %cl
orb %al, %cl
jne 0x2a85e
movq 0x8(%r15), %rdi
callq *%r14
movq (%rbx), %rax
movq (%rax,%r13,8), %r12
testq %r12, %r12
jne 0x2a8ad
jmp 0x2a8b2
movq 0x10(%r12), %rbp
movq (%r15), %rcx
movq 0x20(%rcx), %rax
testq %rax, %rax
je 0x2a88a
movq 0x8(%r15), %rdi
movq (%r12), %rsi
callq *%rax
movq (%r15), %rcx
movq 0x28(%rcx), %rax
testq %rax, %rax
je 0x2a89e
movq 0x8(%r15), %rdi
movq 0x8(%r12), %rsi
callq *%rax
movq %r12, %rdi
callq 0x328f9
decq 0x18(%rbx)
movq %rbp, %r12
testq %r12, %r12
jne 0x2a86c
incq %r13
jmp 0x2a839
movq (%rbx), %rdi
callq 0x328f9
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/dict.c
// Function: dictFingerprint
long long dictFingerprint(dict *d) {
    long long integers[6], hash = 0;
    int j;

    integers[0] = (long) d->ht[0].table;
    integers[1] = d->ht[0].size;
    integers[2] = d->ht[0].used;
    integers[3] = (long) d->ht[1].table;
    integers[4] = d->ht[1].size;
    integers[5] = d->ht[1].used;

    /* We hash N integers by summing every successive integer with the integer
     * hashing of the previous sum. Basically:
     *
     * Result = hash(hash(hash(int1)+int2)+int3) ...
     *
     * This way the same set of integers in a different order will (likely) hash
     * to a different number. */
    for (j = 0; j < 6; j++) {
        hash += integers[j];
        /* For the hashing step we use Tomas Wang's 64 bit integer hash. */
        hash = (~hash) + (hash << 21); // hash = (hash << 21) - hash - 1;
        hash = hash ^ (hash >> 24);
        hash = (hash + (hash << 3)) + (hash << 8); // hash * 265
        hash = hash ^ (hash >> 14);
        hash = (hash + (hash << 2)) + (hash << 4); // hash * 21
        hash = hash ^ (hash >> 28);
        hash = hash + (hash << 31);
    }
    return hash;
}

// Assembly:
movq 0x10(%rdi), %rax
movq %rax, -0x38(%rsp)
movq 0x18(%rdi), %rax
movq %rax, -0x30(%rsp)
movq 0x28(%rdi), %rax
movq %rax, -0x28(%rsp)
movq 0x30(%rdi), %rax
movq %rax, -0x20(%rsp)
movq 0x38(%rdi), %rax
movq %rax, -0x18(%rsp)
movq 0x48(%rdi), %rax
movq %rax, -0x10(%rsp)
xorl %ecx, %ecx
movl $0x80000001, %edx       # imm = 0x80000001
xorl %eax, %eax
cmpq $0x6, %rcx
je 0x2a99e
addq -0x38(%rsp,%rcx,8), %rax
movq %rax, %rsi
notq %rsi
shlq $0x15, %rax
addq %rsi, %rax
movq %rax, %rsi
sarq $0x18, %rsi
xorq %rax, %rsi
imulq $0x109, %rsi, %rax      # imm = 0x109
movq %rax, %rsi
sarq $0xe, %rsi
xorq %rax, %rsi
imulq $0x15, %rsi, %rsi
movq %rsi, %rax
sarq $0x1c, %rax
xorq %rsi, %rax
imulq %rdx, %rax
incq %rcx
jmp 0x2a954
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/dict.c
// Function: dictGetIterator
dictIterator *dictGetIterator(dict *d)
{
    dictIterator *iter = zmalloc(sizeof(*iter));

    iter->d = d;
    iter->table = 0;
    iter->index = -1;
    iter->safe = 0;
    iter->entry = NULL;
    iter->nextEntry = NULL;
    return iter;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
pushq $0x30
popq %rdi
callq 0x327b9
movq %rbx, (%rax)
andl $0x0, 0x10(%rax)
orq $-0x1, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x14(%rax)
andl $0x0, 0x24(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/dict.c
// Function: dictNext
dictEntry *dictNext(dictIterator *iter)
{
    while (1) {
        if (iter->entry == NULL) {
            dictht *ht = &iter->d->ht[iter->table];
            if (iter->index == -1 && iter->table == 0) {
                if (iter->safe)
                    iter->d->iterators++;
                else
                    iter->fingerprint = dictFingerprint(iter->d);
            }
            iter->index++;
            if (iter->index >= (long) ht->size) {
                if (dictIsRehashing(iter->d) && iter->table == 0) {
                    iter->table++;
                    iter->index = 0;
                    ht = &iter->d->ht[1];
                } else {
                    break;
                }
            }
            iter->entry = ht->table[iter->index];
        } else {
            iter->entry = iter->nextEntry;
        }
        if (iter->entry) {
            /* We need to save the 'next' here, the iterator user
             * may delete the entry we are returning. */
            iter->nextEntry = iter->entry->next;
            return iter->entry;
        }
    }
    return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x20(%rdi), %r15
cmpq $0x0, 0x18(%rdi)
movq %r15, %r12
jne 0x2aa6d
movq (%rbx), %r14
movq 0x8(%rbx), %r12
movl 0x10(%rbx), %ebp
movslq %ebp, %rax
movq %rax, %rcx
shlq $0x5, %rcx
leaq (%r14,%rcx), %r13
addq $0x10, %r13
cmpq $-0x1, %r12
sete %cl
testl %eax, %eax
sete %al
andb %cl, %al
cmpb $0x1, %al
jne 0x2aa35
cmpl $0x0, 0x14(%rbx)
je 0x2aa29
incl 0x58(%r14)
jmp 0x2aa35
movq %r14, %rdi
callq 0x2a915
movq %rax, 0x28(%rbx)
incq %r12
movq %r12, 0x8(%rbx)
cmpq 0x8(%r13), %r12
jl 0x2aa65
xorl %eax, %eax
cmpq $-0x1, 0x50(%r14)
je 0x2aa85
testl %ebp, %ebp
jne 0x2aa85
movl $0x1, 0x10(%rbx)
andq $0x0, 0x8(%rbx)
addq $0x30, %r14
xorl %r12d, %r12d
movq %r14, %r13
shlq $0x3, %r12
addq (%r13), %r12
movq (%r12), %rax
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0x2a9ef
movq 0x10(%rax), %rcx
movq %rcx, (%r15)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/dict.c
// Function: dictReleaseIterator
void dictReleaseIterator(dictIterator *iter)
{
    if (!(iter->index == -1 && iter->table == 0)) {
        if (iter->safe)
            iter->d->iterators--;
        else
            assert(iter->fingerprint == dictFingerprint(iter->d));
    }
    zfree(iter);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $-0x1, 0x8(%rdi)
jne 0x2aaa8
cmpl $0x0, 0x10(%rbx)
je 0x2aac7
cmpl $0x0, 0x14(%rbx)
je 0x2aab6
movq (%rbx), %rax
decl 0x58(%rax)
jmp 0x2aac7
movq (%rbx), %rdi
movq 0x28(%rbx), %r14
callq 0x2a915
cmpq %rax, %r14
jne 0x2aad6
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x328f9
leaq 0x83723(%rip), %rdi     # 0xae200
leaq 0x95b33(%rip), %rsi     # 0xc0617
movl $0x26b, %edx            # imm = 0x26B
callq 0x57ac8
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/dict.c
// Function: dictGetRandomKey
dictEntry *dictGetRandomKey(dict *d)
{
    dictEntry *he, *orighe;
    unsigned int h;
    int listlen, listele;

    if (dictSize(d) == 0) return NULL;
    if (dictIsRehashing(d)) _dictRehashStep(d);
    if (dictIsRehashing(d)) {
        do {
            /* We are sure there are no elements in indexes from 0
             * to rehashidx-1 */
            h = d->rehashidx + (random() % (d->ht[0].size +
                                            d->ht[1].size -
                                            d->rehashidx));
            he = (h >= d->ht[0].size) ? d->ht[1].table[h - d->ht[0].size] :
                                      d->ht[0].table[h];
        } while(he == NULL);
    } else {
        do {
            h = random() & d->ht[0].sizemask;
            he = d->ht[0].table[h];
        } while(he == NULL);
    }

    /* Now we found a non empty bucket, but it is a linked
     * list and we need to get a random element from the list.
     * The only sane way to do so is counting the elements and
     * select a random index. */
    listlen = 0;
    orighe = he;
    while(he) {
        he = he->next;
        listlen++;
    }
    listele = random() % listlen;
    he = orighe;
    while(listele--) he = he->next;
    return he;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x28(%rdi), %rax
addq 0x48(%rdi), %rax
jne 0x2ab12
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rdi, %rbx
cmpq $-0x1, 0x50(%rdi)
je 0x2ab77
movq %rbx, %rdi
callq 0x2a57a
movq 0x50(%rbx), %rcx
cmpq $-0x1, %rcx
je 0x2ab77
movq %rcx, %r14
callq 0x26a30
movq 0x18(%rbx), %rsi
movq 0x50(%rbx), %rcx
movq 0x38(%rbx), %rdi
addq %rsi, %rdi
subq %rcx, %rdi
xorl %edx, %edx
divq %rdi
addl %edx, %r14d
movq %r14, %rax
subq %rsi, %rax
jae 0x2ab65
shlq $0x3, %r14
addq 0x10(%rbx), %r14
movq %r14, %rax
jmp 0x2ab6d
shlq $0x3, %rax
addq 0x30(%rbx), %rax
movq (%rax), %r14
testq %r14, %r14
je 0x2ab2e
jmp 0x2ab8c
callq 0x26a30
movq 0x10(%rbx), %rcx
andl 0x20(%rbx), %eax
movq (%rcx,%rax,8), %r14
testq %r14, %r14
je 0x2ab77
xorl %ebx, %ebx
movq %r14, %rax
testq %rax, %rax
je 0x2ab9f
movq 0x10(%rax), %rax
incq %rbx
jmp 0x2ab91
callq 0x26a30
cqto
idivq %rbx
subl $0x1, %edx
jb 0x2ab07
movq 0x10(%r14), %r14
jmp 0x2aba9
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/dict.c
// Function: rev
static unsigned long rev(unsigned long v) {
    unsigned long s = 8 * sizeof(v); // bit size; must be power of 2
    unsigned long mask = ~0;
    while ((s >>= 1) > 0) {
        mask ^= (mask << s);
        v = ((v >> s) & mask) | ((v << s) & ~mask);
    }
    return v;
}

// Assembly:
movq %rdi, %rax
pushq $-0x1
popq %rdx
pushq $0x40
popq %rcx
cmpq $0x2, %rcx
jb 0x2ae98
shrq %rcx
movq %rdx, %rsi
shlq %cl, %rsi
movq %rax, %rdi
shrq %cl, %rdi
shlq %cl, %rax
xorq %rsi, %rdx
xorq %rax, %rdi
andq %rdx, %rdi
xorq %rdi, %rax
jmp 0x2ae72
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/dict.c
// Function: dictEmpty
void dictEmpty(dict *d, void(callback)(void*)) {
    _dictClear(d,&d->ht[0],callback);
    _dictClear(d,&d->ht[1],callback);
    d->rehashidx = -1;
    d->iterators = 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x10(%rdi), %rsi
movq %rbx, %rdx
callq 0x2a822
leaq 0x30(%r14), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x2a822
orq $-0x1, 0x50(%r14)
andl $0x0, 0x58(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/dict.c
// Function: dictGetStats
void dictGetStats(char *buf, size_t bufsize, dict *d) {
    size_t l;
    char *orig_buf = buf;
    size_t orig_bufsize = bufsize;

    l = _dictGetStatsHt(buf,bufsize,&d->ht[0],0);
    buf += l;
    bufsize -= l;
    if (dictIsRehashing(d) && bufsize > 0) {
        _dictGetStatsHt(buf,bufsize,&d->ht[1],1);
    }
    /* Make sure there is a NULL term at the end. */
    if (orig_bufsize) orig_buf[orig_bufsize-1] = '\0';
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
addq $0x10, %rdx
xorl %ecx, %ecx
callq 0x2aee0
cmpq $-0x1, 0x50(%r15)
setne %cl
movq %rbx, %rsi
subq %rax, %rsi
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x2b151
addq %r14, %rax
addq $0x30, %r15
pushq $0x1
popq %rcx
movq %rax, %rdi
movq %r15, %rdx
callq 0x2aee0
testq %rbx, %rbx
je 0x2b15c
movb $0x0, -0x1(%r14,%rbx)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/server.c
// Function: authCommand
void authCommand(client *c) {
    if (!server.requirepass) {
        addReplyError(c,"Client sent AUTH, but no password is set");
    } else if (!time_independent_strcmp(c->argv[1]->ptr, server.requirepass)) {
      c->authenticated = 1;
      addReply(c,shared.ok);
    } else {
      c->authenticated = 0;
      addReplyError(c,"invalid password");
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0xce791(%rip), %rsi     # 0xf9900
testq %rsi, %rsi
je 0x2b199
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
callq 0x2f005
testl %eax, %eax
je 0x2b1a9
andl $0x0, 0x9c(%rbx)
leaq 0x84622(%rip), %rsi     # 0xaf7b9
jmp 0x2b1a0
leaq 0x845f0(%rip), %rsi     # 0xaf790
movq %rbx, %rdi
popq %rbx
jmp 0x36b6f
movl $0x1, 0x9c(%rbx)
movq 0xcf15e(%rip), %rsi     # 0xfa318
movq %rbx, %rdi
popq %rbx
jmp 0x36987
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/server.c
// Function: pingCommand
void pingCommand(client *c) {
    /* The command takes zero or one arguments. */
    if (c->argc > 2) {
        addReplyErrorFormat(c,"wrong number of arguments for '%s' command",
            c->cmd->name);
        return;
    }

    if (c->flags & CLIENT_PUBSUB) {
        addReply(c,shared.mbulkhdr[2]);
        addReplyBulkCBuffer(c,"pong",4);
        if (c->argc == 1)
            addReplyBulkCBuffer(c,"",0);
        else
            addReplyBulk(c,c->argv[1]);
    } else {
        if (c->argc == 1)
            addReply(c,shared.pong);
        else
            addReplyBulk(c,c->argv[1]);
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x38(%rdi), %eax
cmpl $0x3, %eax
jl 0x2b1e8
movq 0x48(%rbx), %rax
movq (%rax), %rdx
leaq 0x84397(%rip), %rsi     # 0xaf574
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x36b96
testb $0x4, 0x9a(%rbx)
jne 0x2b206
cmpl $0x1, %eax
jne 0x2b23f
movq 0xcf14b(%rip), %rsi     # 0xfa348
movq %rbx, %rdi
popq %rbx
jmp 0x36987
movq 0xe2b43(%rip), %rsi     # 0x10dd50
movq %rbx, %rdi
callq 0x36987
leaq 0x845ae(%rip), %rsi     # 0xaf7ca
pushq $0x4
popq %rdx
movq %rbx, %rdi
callq 0x3716c
cmpl $0x1, 0x38(%rbx)
jne 0x2b23f
leaq 0x871d1(%rip), %rsi     # 0xb2405
movq %rbx, %rdi
xorl %edx, %edx
popq %rbx
jmp 0x3716c
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x36fd9
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/server.c
// Function: infoCommand
void infoCommand(client *c) {
    char *section = c->argc == 2 ? c->argv[1]->ptr : "default";

    if (c->argc > 2) {
        addReply(c,shared.syntaxerr);
        return;
    }
    addReplyBulkSds(c, genRedisInfoString(section));
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x38(%rdi), %eax
cmpl $0x2, %eax
jne 0x2b277
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
jmp 0x2b290
jle 0x2b289
movq 0xcf110(%rip), %rsi     # 0xfa390
movq %rbx, %rdi
popq %rbx
jmp 0x36987
leaq 0x84633(%rip), %rdi     # 0xaf8c3
callq 0x2f3cf
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
jmp 0x371aa