LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/quicklist.c
// Function: _quicklistInsertNode
REDIS_STATIC void __quicklistInsertNode(quicklist *quicklist,
                                        quicklistNode *old_node,
                                        quicklistNode *new_node, int after) {
    if (after) {
        new_node->prev = old_node;
        if (old_node) {
            new_node->next = old_node->next;
            if (old_node->next)
                old_node->next->prev = new_node;
            old_node->next = new_node;
        }
        if (quicklist->tail == old_node)
            quicklist->tail = new_node;
    } else {
        new_node->next = old_node;
        if (old_node) {
            new_node->prev = old_node->prev;
            if (old_node->prev)
                old_node->prev->next = new_node;
            old_node->prev = new_node;
        }
        if (quicklist->head == old_node)
            quicklist->head = new_node;
    }
    /* If this insert creates the only element so far, initialize head/tail. */
    if (quicklist->len == 0) {
        quicklist->head = quicklist->tail = new_node;
    }

    if (old_node)
        quicklistCompress(quicklist, old_node);

    quicklist->len++;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testl %ecx, %ecx
je 0x2b8f6
movq %rsi, (%rdx)
testq %rsi, %rsi
je 0x2b8ea
movq 0x8(%rsi), %rax
movq %rax, 0x8(%rdx)
testq %rax, %rax
je 0x2b8e6
movq %rdx, (%rax)
movq %rdx, 0x8(%rsi)
cmpq %rsi, 0x8(%rbx)
jne 0x2b91c
leaq 0x8(%rbx), %rax
jmp 0x2b919
movq %rsi, 0x8(%rdx)
testq %rsi, %rsi
je 0x2b911
movq (%rsi), %rax
movq %rax, (%rdx)
testq %rax, %rax
je 0x2b90e
movq %rdx, 0x8(%rax)
movq %rdx, (%rsi)
movq %rbx, %rax
cmpq %rsi, (%rbx)
jne 0x2b91c
movq %rdx, (%rax)
cmpl $0x0, 0x18(%rbx)
jne 0x2b929
movq %rdx, 0x8(%rbx)
movq %rdx, (%rbx)
testq %rsi, %rsi
je 0x2b955
movl 0x1c(%rsi), %eax
btl $0x14, %eax
jb 0x2b941
movq %rbx, %rdi
callq 0x2b79c
jmp 0x2b955
andl $0x30000, %eax          # imm = 0x30000
cmpl $0x10000, %eax          # imm = 0x10000
jne 0x2b955
movq %rsi, %rdi
callq 0x2b6ab
incl 0x18(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/quicklist.c
// Function: quicklistNodeAllowMerge
REDIS_STATIC int _quicklistNodeAllowMerge(const quicklistNode *a,
                                          const quicklistNode *b,
                                          const int fill) {
    if (!a || !b)
        return 0;

    /* approximate merged ziplist size (- 11 to remove one ziplist
     * header/trailer) */
    unsigned int merge_sz = a->sz + b->sz - 11;
    if (likely(_quicklistNodeSizeMeetsOptimizationRequirement(merge_sz, fill)))
        return 1;
    else if (!sizeMeetsSafetyLimit(merge_sz))
        return 0;
    else if ((int)(a->count + b->count) <= fill)
        return 1;
    else
        return 0;
}

// Assembly:
testq %rdi, %rdi
sete %cl
testq %rsi, %rsi
sete %r8b
xorl %eax, %eax
orb %cl, %r8b
jne 0x2b9c4
movl 0x18(%rdi), %eax
movl 0x18(%rsi), %ecx
addl %eax, %ecx
addl $-0xb, %ecx
cmpl $-0x5, %edx
jb 0x2b9c5
movl %ecx, %r8d
movl %edx, %r9d
notl %r9d
leaq 0x90667(%rip), %r10     # 0xbc020
movl $0x1, %eax
cmpq %r8, (%r10,%r9,8)
jb 0x2b9c5
retq
movl $0x0, %eax
cmpl $0x2000, %ecx           # imm = 0x2000
ja 0x2b9c4
movzwl 0x1c(%rdi), %eax
movzwl 0x1c(%rsi), %ecx
addl %eax, %ecx
xorl %eax, %eax
cmpl %edx, %ecx
setle %al
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/quicklist.c
// Function: quicklistAppendZiplist
void quicklistAppendZiplist(quicklist *quicklist, unsigned char *zl) {
    quicklistNode *node = quicklistCreateNode();

    node->zl = zl;
    node->count = ziplistLen(node->zl);
    node->sz = ziplistBlobLen(zl);

    _quicklistInsertNodeAfter(quicklist, quicklist->tail, node);
    quicklist->count += node->count;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movl $0x20, %edi
callq 0x382d1
movq %rax, %r14
movl $0x0, 0x18(%rax)
movl $0xffe00000, %eax       # imm = 0xFFE00000
andl 0x1c(%r14), %eax
orl $0x90000, %eax          # imm = 0x90000
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movl %eax, 0x1c(%r14)
movq %r15, 0x10(%r14)
movq %r15, %rdi
callq 0x3bb78
movw %ax, 0x1c(%r14)
movq %r15, %rdi
callq 0x3bbc5
movl %eax, 0x18(%r14)
movq 0x8(%rbx), %rsi
movq %rbx, %rdi
movq %r14, %rdx
movl $0x1, %ecx
callq 0x2b8c6
movzwl 0x1c(%r14), %eax
addq %rax, 0x10(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/quicklist.c
// Function: quicklistAppendValuesFromZiplist
quicklist *quicklistAppendValuesFromZiplist(quicklist *quicklist,
                                            unsigned char *zl) {
    unsigned char *value;
    unsigned int sz;
    long long longval;
    char longstr[32] = {0};

    unsigned char *p = ziplistIndex(zl, 0);
    while (ziplistGet(p, &value, &sz, &longval)) {
        if (!value) {
            /* Write the longval as a string so we can re-add it */
            sz = ll2string(longstr, sizeof(longstr), longval);
            value = (unsigned char *)longstr;
        }
        quicklistPushTail(quicklist, value, sz);
        p = ziplistNext(zl, p);
    }
    zfree(zl);
    return quicklist;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movq %rsi, %rdi
xorl %esi, %esi
callq 0x3b680
movq %rax, %r15
leaq 0x10(%rsp), %rsi
leaq 0xc(%rsp), %rdx
leaq 0x18(%rsp), %rcx
movq %rax, %rdi
callq 0x3b7cf
testl %eax, %eax
je 0x2bb11
leaq 0x20(%rsp), %r12
leaq 0xc(%rsp), %rbp
leaq 0x18(%rsp), %r13
movq 0x10(%rsp), %rsi
testq %rsi, %rsi
jne 0x2bade
movq 0x18(%rsp), %rdx
movl $0x20, %esi
movq %r12, %rdi
callq 0x3ff83
movl %eax, 0xc(%rsp)
movq %r12, 0x10(%rsp)
movq %r12, %rsi
jmp 0x2bae2
movl 0xc(%rsp), %eax
movl %eax, %edx
movq %rbx, %rdi
callq 0x26e5b
movq %r14, %rdi
movq %r15, %rsi
callq 0x3b745
movq %rax, %r15
movq %rax, %rdi
leaq 0x10(%rsp), %rsi
movq %rbp, %rdx
movq %r13, %rcx
callq 0x3b7cf
testl %eax, %eax
jne 0x2bab4
movq %r14, %rdi
callq 0x38413
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/quicklist.c
// Function: _quicklistDelNode
REDIS_STATIC void __quicklistDelNode(quicklist *quicklist,
                                     quicklistNode *node) {
    if (node->next)
        node->next->prev = node->prev;
    if (node->prev)
        node->prev->next = node->next;

    if (node == quicklist->tail) {
        quicklist->tail = node->prev;
    }

    if (node == quicklist->head) {
        quicklist->head = node->next;
    }

    /* If we deleted a node within our compress depth, we
     * now have compressed nodes needing to be decompressed. */
    __quicklistCompress(quicklist, NULL);

    quicklist->count -= node->count;

    zfree(node->zl);
    zfree(node);
    quicklist->len--;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
testq %rcx, %rcx
je 0x2bbaf
movq %rax, (%rcx)
testq %rax, %rax
je 0x2bbb8
movq %rcx, 0x8(%rax)
cmpq %r14, 0x8(%rbx)
jne 0x2bbc2
movq %rax, 0x8(%rbx)
cmpq %r14, (%rbx)
jne 0x2bbce
movq 0x8(%r14), %rax
movq %rax, (%rbx)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2b79c
movzwl 0x1c(%r14), %eax
subq %rax, 0x10(%rbx)
movq 0x10(%r14), %rdi
callq 0x38413
movq %r14, %rdi
callq 0x38413
decl 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/quicklist.c
// Function: quicklistDelIndex
REDIS_STATIC int quicklistDelIndex(quicklist *quicklist, quicklistNode *node,
                                   unsigned char **p) {
    int gone = 0;

    node->zl = ziplistDelete(node->zl, p);
    node->count--;
    if (node->count == 0) {
        gone = 1;
        __quicklistDelNode(quicklist, node);
    } else {
        quicklistNodeUpdateSz(node);
    }
    quicklist->count--;
    /* If we deleted the node, the original node is no longer valid */
    return gone ? 1 : 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rsi), %rdi
movq %rdx, %rsi
callq 0x3b88c
movq %rax, 0x10(%r14)
movl 0x1c(%r14), %ebp
decl %ebp
movw %bp, 0x1c(%r14)
andl $0xffff, %ebp           # imm = 0xFFFF
je 0x2bc38
movq %rax, %rdi
callq 0x3bbc5
movl %eax, 0x18(%r14)
jmp 0x2bc43
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2bb96
xorl %eax, %eax
testl %ebp, %ebp
sete %al
decq 0x10(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/quicklist.c
// Function: quicklistDelEntry
void quicklistDelEntry(quicklistIter *iter, quicklistEntry *entry) {
    quicklistNode *prev = entry->node->prev;
    quicklistNode *next = entry->node->next;
    int deleted_node = quicklistDelIndex((quicklist *)entry->quicklist,
                                         entry->node, &entry->zi);

    /* after delete, the zi is now invalid for any future usage. */
    iter->zi = NULL;

    /* If current node is deleted, we must update iterator node and offset. */
    if (deleted_node) {
        if (iter->direction == AL_START_HEAD) {
            iter->current = next;
            iter->offset = 0;
        } else if (iter->direction == AL_START_TAIL) {
            iter->current = prev;
            iter->offset = -1;
        }
    }
    /* else if (!deleted_node), no changes needed.
     * we already reset iter->zi above, and the existing iter->offset
     * doesn't move again because:
     *   - [1, 2, 3] => delete offset 1 => [1, 3]: next element still offset 1
     *   - [1, 2, 3] => delete offset 0 => [2, 3]: next element still offset 0
     *  if we deleted the last element at offet N and now
     *  length of this ziplist is N-1, the next call into
     *  quicklistNext() will jump to the next node. */
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rsi), %rdi
movq 0x8(%rsi), %rax
movq (%rax), %r14
movq 0x8(%rax), %r15
leaq 0x10(%rsi), %rdx
movq %rax, %rsi
callq 0x2bbfd
movq $0x0, 0x10(%rbx)
testl %eax, %eax
je 0x2bca2
movl 0x20(%rbx), %eax
testq %rax, %rax
je 0x2bc97
cmpl $0x1, %eax
jne 0x2bca2
movq $-0x1, %rax
jmp 0x2bc9a
movq %r15, %r14
movq %r14, 0x8(%rbx)
movq %rax, 0x18(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x2bcd6
movl $0x30000, %eax          # imm = 0x30000
andl 0x1c(%r15), %eax
cmpl $0x20000, %eax          # imm = 0x20000
jne 0x2bcd6
movq %r15, %rdi
callq 0x2b72e
testq %rbx, %rbx
je 0x2bcf2
movl $0x30000, %eax          # imm = 0x30000
andl 0x1c(%rbx), %eax
cmpl $0x20000, %eax          # imm = 0x20000
jne 0x2bcf2
movq %rbx, %rdi
callq 0x2b72e
leaq 0x10(%r15), %r12
leaq 0x10(%rbx), %rsi
movq %r12, %rdi
callq 0x3b509
testq %rax, %rax
je 0x2bd68
cmpq $0x0, (%r12)
je 0x2bd22
xorl %eax, %eax
cmpq %rax, 0x10(%rbx)
cmovneq %rax, %r15
cmoveq %rbx, %rax
movq %r15, %rbx
movq %rax, %r15
movq 0x10(%rbx), %rdi
callq 0x3bb78
movw %ax, 0x1c(%rbx)
movq 0x10(%rbx), %rdi
callq 0x3bbc5
movl %eax, 0x18(%rbx)
movzwl 0x1e(%r15), %eax
shll $0x10, %eax
movl %eax, 0x1c(%r15)
movq %r14, %rdi
movq %r15, %rsi
callq 0x2bb96
movl 0x1c(%rbx), %eax
btl $0x14, %eax
jb 0x2bd6c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2b79c
jmp 0x2bd80
xorl %ebx, %ebx
jmp 0x2bd80
andl $0x30000, %eax          # imm = 0x30000
cmpl $0x10000, %eax          # imm = 0x10000
jne 0x2bd80
movq %rbx, %rdi
callq 0x2b6ab
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x2bdaf
movq (%r12), %rbx
jmp 0x2bdb1
xorl %ebx, %ebx
movq (%rsp), %rax
movswl 0x1c(%rax), %ebp
movq 0x8(%r14), %r15
testq %r15, %r15
je 0x2bdc8
movq 0x8(%r15), %r13
jmp 0x2bdcb
xorl %r13d, %r13d
movq %r12, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x2b985
testl %eax, %eax
je 0x2bdeb
movq (%rsp), %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x2bca8
movq %r15, %rdi
movq %r13, %rsi
movl %ebp, %edx
callq 0x2b985
testl %eax, %eax
je 0x2be0b
movq (%rsp), %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x2bca8
movq (%r14), %rbx
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x2b985
testl %eax, %eax
je 0x2be31
movq (%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2bca8
movq %rax, %r14
movq 0x8(%r14), %rbx
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x2b985
testl %eax, %eax
je 0x2be63
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 0x2bca8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r12
pushq %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
movl 0x18(%rdi), %r12d
movl $0x20, %edi
callq 0x382d1
movq %rax, %rbx
movq $0x0, 0x10(%rax)
movl $0x0, 0x18(%rax)
movl $0xffe00000, %eax       # imm = 0xFFE00000
andl 0x1c(%rbx), %eax
orl $0x90000, %eax          # imm = 0x90000
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movl %eax, 0x1c(%rbx)
movq %r12, %rdi
callq 0x382d1
movq %rax, 0x10(%rbx)
movq 0x10(%r15), %rsi
movq %rax, %rdi
movq %r12, %rdx
callq 0x26c50
leal 0x1(%r14), %eax
xorl %r12d, %r12d
movl %ebp, %ecx
negl %ecx
movl $0x0, %edx
sbbl %edx, %edx
orl %r14d, %edx
testl %ebp, %ebp
movl %eax, %esi
cmovel %ebp, %esi
cmovnel %r12d, %r14d
cmpl $0x1, %ebp
sbbl %r12d, %r12d
orl %eax, %r12d
movq 0x10(%r15), %rdi
callq 0x3b8b4
movq %rax, 0x10(%r15)
movq %rax, %rdi
callq 0x3bb78
movw %ax, 0x1c(%r15)
movq 0x10(%r15), %rdi
callq 0x3bbc5
movl %eax, 0x18(%r15)
movq 0x10(%rbx), %rdi
movl %r14d, %esi
movl %r12d, %edx
callq 0x3b8b4
movq %rax, 0x10(%rbx)
movq %rax, %rdi
callq 0x3bb78
movw %ax, 0x1c(%rbx)
movq 0x10(%rbx), %rdi
callq 0x3bbc5
movl %eax, 0x18(%rbx)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x28, %edi
callq 0x382d1
testl %ebp, %ebp
je 0x2c499
cmpl $0x1, %ebp
jne 0x2c4a9
leaq 0x8(%rbx), %rdx
movq $-0x1, %rcx
jmp 0x2c49e
movl %ebp, %ecx
movq %rbx, %rdx
movq (%rdx), %rdx
movq %rdx, 0x8(%rax)
movq %rcx, 0x18(%rax)
movl %ebp, 0x20(%rax)
movq %rbx, (%rax)
movq $0x0, 0x10(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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, %r14
movl 0x1c(%rdi), %ebp
movswl %bp, %r15d
andl $0xffff0000, %ebp       # imm = 0xFFFF0000
movl $0x20, %edi
callq 0x382d1
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0xc(%rax)
cmpl $-0x4, %r15d
movl $0xfffffffb, %eax       # imm = 0xFFFFFFFB
cmovgel %r15d, %eax
movzwl %ax, %eax
orl %ebp, %eax
movl %eax, 0x1c(%rbx)
movq (%r14), %r15
testq %r15, %r15
je 0x2c7ba
movl $0xffe00000, %ebp       # imm = 0xFFE00000
movl $0x30000, %r12d         # imm = 0x30000
movl $0xfffcffff, %r13d      # imm = 0xFFFCFFFF
movl $0x20, %edi
callq 0x382d1
movq %rax, %r14
movq $0x0, 0x10(%rax)
movl $0x0, 0x18(%rax)
movl 0x1c(%rax), %eax
andl %ebp, %eax
orl $0x90000, %eax          # imm = 0x90000
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movl %eax, 0x1c(%r14)
movl 0x18(%r15), %edi
callq 0x382d1
movq %rax, 0x10(%r14)
movq 0x10(%r15), %rsi
movl 0x18(%r15), %edx
movq %rax, %rdi
callq 0x26c50
movl 0x1c(%r15), %eax
movzwl %ax, %eax
movw %ax, 0x1c(%r14)
addq %rax, 0x10(%rbx)
movl 0x18(%r15), %eax
movl %eax, 0x18(%r14)
movl 0x1c(%r15), %eax
andl %r12d, %eax
movl 0x1c(%r14), %ecx
andl %r13d, %ecx
orl %eax, %ecx
movl %ecx, 0x1c(%r14)
movq 0x8(%rbx), %rsi
movq %rbx, %rdi
movq %r14, %rdx
movl $0x1, %ecx
callq 0x2b8c6
movq 0x8(%r15), %r15
testq %r15, %r15
jne 0x2c71f
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_O3/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)
jae 0x2c7d4
retq
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq 0x10(%rax), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x3b680
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 0x3b7cf
movq (%r14), %r14
testq %r14, %r14
jne 0x2c846
movq 0x10(%rsp), %rdx
leaq 0x20(%rsp), %r14
movl $0x20, %esi
movq %r14, %rdi
callq 0x3ff83
movl %eax, 0x4(%rsp)
movq %r14, 0x18(%rsp)
jmp 0x2c84a
movl 0x4(%rsp), %eax
movl %eax, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x26d8b
cmpl $0x1, 0x18(%rbx)
jne 0x2c874
movq 0x8(%rbx), %rax
movq 0x10(%rax), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x3b680
movq %rax, 0x8(%rsp)
movq 0x8(%rbx), %rsi
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x2bbfd
addq $0x48, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x2c98a
movq %r8, %r12
movq %rdx, %r15
movq %rdi, %rbx
testq %rdx, %rdx
je 0x2c8cd
movq $0x0, (%r15)
testq %r14, %r14
je 0x2c8d9
movl $0x0, (%r14)
testq %r12, %r12
je 0x2c8e6
movq $-0x75bcd15, (%r12)     # imm = 0xF8A432EB
testl %eax, %eax
je 0x2c8f9
cmpl $-0x1, %eax
jne 0x2c98a
movq 0x8(%rbx), %r13
jmp 0x2c8fc
movq (%rbx), %r13
testq %r13, %r13
je 0x2c98a
movq %r9, 0x8(%rsp)
movq 0x10(%r13), %rdi
callq 0x3b680
movq %rax, 0x20(%rsp)
leaq 0x18(%rsp), %rsi
leaq 0x4(%rsp), %rdx
leaq 0x10(%rsp), %rcx
movq %rax, %rdi
callq 0x3b7cf
testl %eax, %eax
je 0x2c98a
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x2c95b
testq %r15, %r15
je 0x2c94d
movl 0x4(%rsp), %esi
callq *0x8(%rsp)
movq %rax, (%r15)
testq %r14, %r14
je 0x2c975
movl 0x4(%rsp), %eax
movl %eax, (%r14)
jmp 0x2c975
testq %r15, %r15
je 0x2c967
movq $0x0, (%r15)
testq %r12, %r12
je 0x2c975
movq 0x10(%rsp), %rax
movq %rax, (%r12)
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x2bbfd
movl $0x1, %ebp
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_O3/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 0x2ca2d
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %r8, %r14
movq %rcx, %rbx
movq %rdx, %r15
leaq -0x4f(%rip), %r9        # 0x2c99b
leaq 0x18(%rsp), %rdx
leaq 0xc(%rsp), %rcx
leaq 0x10(%rsp), %r8
callq 0x2c88d
testq %r15, %r15
je 0x2ca0b
movq 0x18(%rsp), %rcx
movq %rcx, (%r15)
testq %r14, %r14
je 0x2ca18
movq 0x10(%rsp), %rcx
movq %rcx, (%r14)
testq %rbx, %rbx
je 0x2ca23
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_O3/gplessis[P]dotdeb-redis/src/dict.c
// Function: dictGenHashFunction
unsigned int dictGenHashFunction(const void *key, int len) {
    /* 'm' and 'r' are mixing constants generated offline.
     They're not really 'magic', they just happen to work well.  */
    uint32_t seed = dict_hash_function_seed;
    const uint32_t m = 0x5bd1e995;
    const int r = 24;

    /* Initialize the hash to a 'random' value */
    uint32_t h = seed ^ len;

    /* Mix 4 bytes at a time into the hash */
    const unsigned char *data = (const unsigned char *)key;

    while(len >= 4) {
        uint32_t k = *(uint32_t*)data;

        k *= m;
        k ^= k >> r;
        k *= m;

        h *= m;
        h ^= k;

        data += 4;
        len -= 4;
    }

    /* Handle the last few bytes of the input array  */
    switch(len) {
    case 3: h ^= data[2] << 16;
    case 2: h ^= data[1] << 8;
    case 1: h ^= data[0]; h *= m;
    };

    /* Do a few final mixes of the hash to ensure the last few
     * bytes are well-incorporated. */
    h ^= h >> 13;
    h *= m;
    h ^= h >> 15;

    return (unsigned int)h;
}

// Assembly:
movl 0xcf0cd(%rip), %eax     # 0xfd6a0
xorl %esi, %eax
cmpl $0x4, %esi
jl 0x2e605
imull $0x5bd1e995, (%rdi), %ecx # imm = 0x5BD1E995
movl %ecx, %edx
shrl $0x18, %edx
xorl %ecx, %edx
imull $0x5bd1e995, %edx, %ecx # imm = 0x5BD1E995
imull $0x5bd1e995, %eax, %eax # imm = 0x5BD1E995
xorl %ecx, %eax
addq $0x4, %rdi
leal -0x4(%rsi), %ecx
cmpl $0x7, %esi
movl %ecx, %esi
ja 0x2e5da
jmp 0x2e607
movl %esi, %ecx
cmpl $0x1, %ecx
je 0x2e628
cmpl $0x2, %ecx
je 0x2e61f
cmpl $0x3, %ecx
jne 0x2e633
movzbl 0x2(%rdi), %ecx
shll $0x10, %ecx
xorl %ecx, %eax
movzbl 0x1(%rdi), %ecx
shll $0x8, %ecx
xorl %ecx, %eax
movzbl (%rdi), %ecx
xorl %eax, %ecx
imull $0x5bd1e995, %ecx, %eax # imm = 0x5BD1E995
movl %eax, %ecx
shrl $0xd, %ecx
xorl %eax, %ecx
imull $0x5bd1e995, %ecx, %ecx # imm = 0x5BD1E995
movl %ecx, %eax
shrl $0xf, %eax
xorl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbp
pushq %r14
pushq %rbx
movl 0xcf04d(%rip), %r14d    # 0xfd6a0
testl %esi, %esi
je 0x2e684
movl %esi, %ebp
movq %rdi, %rbx
callq 0x269a0
movq (%rax), %rcx
movl %ebp, %edx
xorl %esi, %esi
movl %r14d, %eax
shll $0x5, %eax
addl %r14d, %eax
movzbl (%rbx,%rsi), %edi
addl (%rcx,%rdi,4), %eax
incq %rsi
movl %eax, %r14d
cmpl %esi, %edx
jne 0x2e66b
jmp 0x2e687
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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, 0xd31cc(%rip)     # 0x1018a4
jne 0x2e6e1
cmpq $-0x1, 0x50(%rdi)
je 0x2e6e7
movl $0x1, %eax
retq
movl 0x28(%rdi), %eax
cmpl $0x5, %eax
movl $0x4, %esi
cmovgel %eax, %esi
jmp 0x2e6fa
// File: /workspace/github_c_makefile_star2_O3/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 0x2e716
incq %r14
jmp 0x2e726
movl $0x4, %eax
movq %rax, %r14
addq %rax, %rax
cmpq %rsi, %r14
jb 0x2e71b
movl $0x1, %eax
cmpq $-0x1, 0x50(%rbx)
jne 0x2e781
cmpq %rsi, 0x28(%rbx)
ja 0x2e781
cmpq 0x18(%rbx), %r14
je 0x2e781
leaq -0x1(%r14), %r15
leaq (,%r14,8), %rdi
callq 0x38323
cmpq $0x0, 0x10(%rbx)
je 0x2e76b
movq %rax, 0x30(%rbx)
movq %r14, 0x38(%rbx)
movq %r15, 0x40(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x48(%rbx)
jmp 0x2e77f
movq %rax, 0x10(%rbx)
movq %r14, 0x18(%rbx)
movq %r15, 0x20(%rbx)
movq $0x0, 0x28(%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %rax
movq 0x50(%rdi), %rcx
xorl %eax, %eax
cmpq $-0x1, %rcx
je 0x2e894
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq 0x28(%rdi), %rdx
testl %esi, %esi
je 0x2e84e
leal (%r14,%r14), %eax
leal (%rax,%rax,4), %ebp
testq %rdx, %rdx
je 0x2e858
cmpq %rcx, 0x18(%rbx)
jbe 0x2e8a3
decl %r14d
movq (%r15), %rax
incq %rcx
movq -0x8(%rax,%rcx,8), %r12
testq %r12, %r12
jne 0x2e7f5
movq %rcx, 0x50(%rbx)
incq %rcx
decl %ebp
jne 0x2e7db
jmp 0x2e88f
movq (%r12), %rdi
movq 0x10(%r12), %r13
movq (%rbx), %rax
callq *(%rax)
andl 0x40(%rbx), %eax
movq 0x30(%rbx), %rcx
movq (%rcx,%rax,8), %rdx
movq %rdx, 0x10(%r12)
movq %r12, (%rcx,%rax,8)
movq 0x28(%rbx), %rdx
decq %rdx
movq %rdx, 0x28(%rbx)
incq 0x48(%rbx)
movq %r13, %r12
testq %r13, %r13
jne 0x2e7f5
movq 0x10(%rbx), %rax
movq 0x50(%rbx), %rcx
movq $0x0, (%rax,%rcx,8)
incq %rcx
movq %rcx, 0x50(%rbx)
testl %r14d, %r14d
jne 0x2e7bf
movl $0x1, %eax
testq %rdx, %rdx
jne 0x2e894
leaq 0x30(%rbx), %r14
movq 0x10(%rbx), %rdi
callq 0x38413
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups %xmm1, 0x10(%r15)
movups %xmm0, (%r15)
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movups %xmm0, 0x10(%r14)
movq $-0x1, 0x50(%rbx)
xorl %eax, %eax
jmp 0x2e894
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8d982(%rip), %rdi     # 0xbc22c
leaq 0xa11e2(%rip), %rsi     # 0xcfa93
movl $0xfe, %edx
callq 0x61908
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %r13d
movq %rdi, %r14
xorl %ebx, %ebx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x26300
movabsq $-0x20c49ba5e353f7cf, %rax # imm = 0xDF3B645A1CAC0831
imulq 0x8(%r15)
movq %rdx, %r12
movq (%r15), %rbp
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %r12
addq %rax, %r12
movslq %r13d, %r15
movabsq $0x20c49ba5e353f7cf, %r13 # imm = 0x20C49BA5E353F7CF
movq %r14, %rdi
movl $0x64, %esi
callq 0x2e787
testl %eax, %eax
je 0x2e9a7
addl $0x64, %ebx
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x26300
movq 0x8(%rsp), %rcx
subq %rbp, %rcx
movq %r13, %rax
imulq 0x10(%rsp)
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rdx
addq %rax, %rdx
addq %r12, %rdx
imulq $0x3e8, %rcx, %rax      # imm = 0x3E8
addq %rdx, %rax
cmpq %r15, %rax
jle 0x2e957
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x2ea2e
cmpl $0x0, 0x58(%r14)
jne 0x2ea82
movq %r14, %rdi
movl $0x1, %esi
callq 0x2e787
cmpq $-0x1, 0x50(%r14)
jne 0x2ea82
movq 0x18(%r14), %rcx
testq %rcx, %rcx
je 0x2ea5c
movq 0x28(%r14), %rsi
cmpq %rcx, %rsi
jb 0x2ea82
cmpb $0x1, 0xd2e5d(%rip)     # 0x1018a4
jne 0x2ea57
movq %rsi, %rax
xorl %edx, %edx
divq %rcx
cmpq $0x6, %rax
jb 0x2ea82
addq %rsi, %rsi
jmp 0x2ea61
movl $0x4, %esi
movq %r14, %rdi
callq 0x2e6fa
testl %eax, %eax
je 0x2ea82
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
movb $0x1, %r15b
xorl %esi, %esi
movl %eax, 0x4(%rsp)
shlq $0x5, %rsi
movl 0x10(%r13,%rsi), %r12d
andl %eax, %r12d
movq (%r13,%rsi), %rax
movq (%rax,%r12,8), %rbp
testq %rbp, %rbp
je 0x2ead9
movq (%rbp), %rdx
cmpq %rbx, %rdx
je 0x2ea6d
movq (%r14), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x2ead3
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq *%rax
testl %eax, %eax
jne 0x2ea6d
movq 0x10(%rbp), %rbp
jmp 0x2eaac
movq 0x50(%r14), %rcx
cmpq $-0x1, %rcx
setne %dl
movl $0x1, %esi
testb %dl, %r15b
movl $0x0, %r15d
movl 0x4(%rsp), %eax
jne 0x2ea97
cmpl $-0x1, %r12d
je 0x2ea6d
xorl %r15d, %r15d
cmpq $-0x1, %rcx
setne %r15b
shll $0x5, %r15d
movl $0x18, %edi
callq 0x382d1
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 0x2eb4f
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq *%rax
movq %rax, %rbx
movq %rbx, (%r13)
jmp 0x2ea70
// File: /workspace/github_c_makefile_star2_O3/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 0x2e9b8
testl %eax, %eax
je 0x2ebba
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2ebca
movq %rax, %r12
movq 0x8(%rax), %r15
movq (%rbx), %rax
movq 0x10(%rax), %rax
testq %rax, %rax
je 0x2eb9c
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 0x2ebbf
movq 0x8(%rbx), %rdi
movq %r15, %rsi
callq *%rax
jmp 0x2ebbf
movl $0x1, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x2ebf4
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %rbx
movq %rdi, %r14
cmpq $-0x1, 0x50(%rdi)
je 0x2ec15
cmpl $0x0, 0x58(%r14)
jne 0x2ec15
movq %r14, %rdi
movl $0x1, %esi
callq 0x2e787
leaq 0x10(%r14), %r12
movq (%r14), %rax
movq %rbx, %rdi
callq *(%rax)
movl %eax, %ebp
movb $0x1, %r13b
xorl %eax, %eax
shlq $0x5, %rax
movl 0x10(%r12,%rax), %ecx
andl %ebp, %ecx
movq (%r12,%rax), %rax
movq (%rax,%rcx,8), %r15
testq %r15, %r15
je 0x2ec67
movq (%r15), %rdx
cmpq %rbx, %rdx
je 0x2ebe2
movq (%r14), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x2ec61
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq *%rax
testl %eax, %eax
jne 0x2ebe2
movq 0x10(%r15), %r15
jmp 0x2ec3b
cmpq $-0x1, 0x50(%r14)
setne %cl
movl $0x1, %eax
xorl %r15d, %r15d
testb %r13b, %cl
movl $0x0, %r13d
jne 0x2ec28
jmp 0x2ebe2
// File: /workspace/github_c_makefile_star2_O3/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:
movl $0x1, %eax
cmpq $0x0, 0x18(%rdi)
je 0x2ee25
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movl %edx, 0xc(%rsp)
cmpq $-0x1, 0x50(%rdi)
je 0x2ecfb
cmpl $0x0, 0x58(%rbx)
jne 0x2ecfb
movq %rbx, %rdi
movl $0x1, %esi
callq 0x2e787
leaq 0x10(%rbx), %r12
movq (%rbx), %rax
movq %r15, %rdi
callq *(%rax)
movb $0x1, %cl
xorl %r14d, %r14d
movq %r12, 0x18(%rsp)
movl %eax, 0x10(%rsp)
movl %ecx, 0x14(%rsp)
shlq $0x5, %r14
movl 0x10(%r12,%r14), %ecx
andl %eax, %ecx
movq (%r12,%r14), %rax
movq %rcx, 0x20(%rsp)
movq (%rax,%rcx,8), %r12
testq %r12, %r12
je 0x2ed79
movq (%r12), %rdx
cmpq %r15, %rdx
je 0x2ee26
xorl %r13d, %r13d
movq %r12, %rbp
movq (%rbx), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x2ed62
movq 0x8(%rbx), %rdi
movq %r15, %rsi
callq *%rax
testl %eax, %eax
jne 0x2eda6
movq 0x10(%rbp), %r12
testq %r12, %r12
je 0x2ed79
movq (%r12), %rdx
movq %rbp, %r13
cmpq %r15, %rdx
jne 0x2ed46
jmp 0x2edac
cmpq $-0x1, 0x50(%rbx)
setne %al
movl $0x1, %r14d
testb %al, 0x14(%rsp)
movl $0x0, %ecx
movq 0x18(%rsp), %r12
movl 0x10(%rsp), %eax
jne 0x2ed15
movl $0x1, %eax
jmp 0x2ee17
movq %rbp, %r12
movq %r13, %rbp
movq 0x18(%rsp), %r15
addq %r14, %r15
movq 0x10(%r12), %rax
testq %rbp, %rbp
je 0x2edc4
addq $0x10, %rbp
jmp 0x2edd0
movq 0x20(%rsp), %rbp
shlq $0x3, %rbp
addq (%r15), %rbp
movl 0xc(%rsp), %ecx
movq %rax, (%rbp)
testl %ecx, %ecx
jne 0x2ee09
movq (%rbx), %rcx
movq 0x20(%rcx), %rax
testq %rax, %rax
je 0x2edf5
movq 0x8(%rbx), %rdi
movq (%r12), %rsi
callq *%rax
movq (%rbx), %rcx
movq 0x28(%rcx), %rax
testq %rax, %rax
je 0x2ee09
movq 0x8(%rbx), %rdi
movq 0x8(%r12), %rsi
callq *%rax
movq %r12, %rdi
callq 0x38413
decq 0x18(%r15)
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebp, %ebp
jmp 0x2edac
// File: /workspace/github_c_makefile_star2_O3/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 %rsi, %rbx
cmpq $0x0, 0x8(%rsi)
je 0x2eed0
movq %rdx, %r14
movq %rdi, %r15
xorl %r13d, %r13d
cmpq $0x0, 0x18(%rbx)
je 0x2eed0
testq %r14, %r14
sete %al
testw %r13w, %r13w
setne %cl
orb %al, %cl
jne 0x2ee75
movq 0x8(%r15), %rdi
callq *%r14
movq (%rbx), %rax
movq (%rax,%r13,8), %r12
testq %r12, %r12
je 0x2eec7
movq 0x10(%r12), %rbp
movq (%r15), %rcx
movq 0x20(%rcx), %rax
testq %rax, %rax
je 0x2ee9f
movq 0x8(%r15), %rdi
movq (%r12), %rsi
callq *%rax
movq (%r15), %rcx
movq 0x28(%rcx), %rax
testq %rax, %rax
je 0x2eeb3
movq 0x8(%r15), %rdi
movq 0x8(%r12), %rsi
callq *%rax
movq %r12, %rdi
callq 0x38413
decq 0x18(%rbx)
movq %rbp, %r12
testq %rbp, %rbp
jne 0x2ee81
incq %r13
cmpq 0x8(%rbx), %r13
jb 0x2ee56
movq (%rbx), %rdi
callq 0x38413
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_O3/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
movl $0x30, %edi
callq 0x382d1
movq %rbx, (%rax)
xorl %ecx, %ecx
movl %ecx, 0x10(%rax)
movq $-0x1, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x14(%rax)
movl %ecx, 0x24(%rax)
popq %rbx
retq