LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/quicklist.c
// Function: quicklistPushTail
int quicklistPushTail(quicklist *quicklist, void *value, size_t sz) {
    quicklistNode *orig_tail = quicklist->tail;
    if (likely(
            _quicklistNodeAllowInsert(quicklist->tail, quicklist->fill, sz))) {
        quicklist->tail->zl =
            ziplistPush(quicklist->tail->zl, value, sz, ZIPLIST_TAIL);
        quicklistNodeUpdateSz(quicklist->tail);
    } else {
        quicklistNode *node = quicklistCreateNode();
        node->zl = ziplistPush(ziplistNew(), value, sz, ZIPLIST_TAIL);

        quicklistNodeUpdateSz(node);
        _quicklistInsertNodeAfter(quicklist, quicklist->tail, node);
    }
    quicklist->count++;
    quicklist->tail->count++;
    return (orig_tail != quicklist->tail);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq 0x8(%rdi), %r14
movswl 0x1c(%rdi), %esi
movq %r14, %rdi
callq 0x26d30
testl %eax, %eax
je 0x26eb8
movq 0x10(%r14), %rdi
pushq $0x1
popq %rcx
movq %r12, %rsi
movl %r15d, %edx
callq 0x3ea1e
movq 0x8(%rbx), %rcx
movq %rax, 0x10(%rcx)
movq %rax, %rdi
callq 0x3ef6d
movq 0x8(%rbx), %rcx
movl %eax, 0x18(%rcx)
incq 0x10(%rbx)
movq 0x8(%rbx), %rax
incw 0x1c(%rax)
xorl %eax, %eax
cmpq 0x8(%rbx), %r14
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2e809
movq %rax, %r13
callq 0x3e2e3
pushq $0x1
popq %rbp
movq %rax, %rdi
movq %r12, %rsi
movl %r15d, %edx
movl %ebp, %ecx
callq 0x3ea1e
movq %rax, 0x10(%r13)
movq %rax, %rdi
callq 0x3ef6d
movl %eax, 0x18(%r13)
movq 0x8(%rbx), %rsi
movq %rbx, %rdi
movq %r13, %rdx
movl %ebp, %ecx
callq 0x2eacc
jmp 0x26e94
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/quicklist.c
// Function: quicklistReplaceAtIndex
int quicklistReplaceAtIndex(quicklist *quicklist, long index, void *data,
                            int sz) {
    quicklistEntry entry;
    if (likely(quicklistIndex(quicklist, index, &entry))) {
        /* quicklistIndex provides an uncompressed node */
        entry.node->zl = ziplistDelete(entry.node->zl, &entry.zi);
        entry.node->zl = ziplistInsert(entry.node->zl, entry.zi, data, sz);
        quicklistNodeUpdateSz(entry.node);
        quicklistCompress(quicklist, entry.node);
        return 1;
    } else {
        return 0;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %ecx, %ebp
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %rdx
callq 0x26fac
testl %eax, %eax
je 0x26fa8
leaq 0x18(%rsp), %r15
movq -0x8(%r15), %rax
movq 0x10(%rax), %rdi
movq %r15, %rsi
callq 0x3ebf5
movq -0x8(%r15), %rcx
movq %rax, 0x10(%rcx)
movq (%r15), %rsi
movq %rax, %rdi
movq %r14, %rdx
movl %ebp, %ecx
callq 0x3ebf0
movq -0x8(%r15), %rcx
movq %rax, 0x10(%rcx)
movq %rax, %rdi
callq 0x3ef6d
movq -0x8(%r15), %rsi
movl %eax, 0x18(%rsi)
movl 0x1c(%rsi), %eax
btl $0x14, %eax
jb 0x26f79
movq %rbx, %rdi
callq 0x2e984
pushq $0x1
popq %rbx
jmp 0x26f9b
testq %rsi, %rsi
sete %cl
andl $0x30000, %eax          # imm = 0x30000
cmpl $0x10000, %eax          # imm = 0x10000
setne %al
pushq $0x1
popq %rbx
orb %cl, %al
jne 0x26f9b
movq %rsi, %rdi
callq 0x2e893
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %ebx, %ebx
jmp 0x26f9b
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/quicklist.c
// Function: quicklistIndex
int quicklistIndex(const quicklist *quicklist, const long long idx,
                   quicklistEntry *entry) {
    quicklistNode *n;
    unsigned long long accum = 0;
    unsigned long long index;
    int forward = idx < 0 ? 0 : 1; /* < 0 -> reverse, 0+ -> forward */

    initEntry(entry);
    entry->quicklist = quicklist;

    if (!forward) {
        index = (-idx) - 1;
        n = quicklist->tail;
    } else {
        index = idx;
        n = quicklist->head;
    }

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

    while (likely(n)) {
        if ((accum + n->count) > index) {
            break;
        } else {
            D("Skipping over (%p) %u at accum %lld", (void *)n, n->count,
              accum);
            accum += n->count;
            n = forward ? n->next : n->prev;
        }
    }

    if (!n)
        return 0;

    D("Found node: %p at accum %llu, idx %llu, sub+ %llu, sub- %llu", (void *)n,
      accum, index, index - accum, (-index) - 1 + accum);

    entry->node = n;
    if (forward) {
        /* forward = normal head-to-tail offset. */
        entry->offset = index - accum;
    } else {
        /* reverse = need negative offset for tail-to-head, so undo
         * the result of the original if (index < 0) above. */
        entry->offset = (-index) - 1 + accum;
    }

    quicklistDecompressNodeForUse(entry->node);
    entry->zi = ziplistIndex(entry->node->zl, entry->offset);
    ziplistGet(entry->zi, &entry->value, &entry->sz, &entry->longval);
    /* The caller will use our result, so we don't re-compress here.
     * The caller can recompress or delete the node as needed. */
    return 1;
}

// Assembly:
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdx)
movq $-0x75bcd15, 0x20(%rdx) # imm = 0xF8A432EB
movups %xmm0, (%rdx)
movabsq $0x75bcd1500000000, %rax # imm = 0x75BCD1500000000
movq %rax, 0x28(%rdx)
movq %rdi, (%rdx)
movq %rsi, %rcx
sarq $0x3f, %rcx
xorq %rsi, %rcx
xorl %eax, %eax
cmpq 0x10(%rdi), %rcx
jae 0x270a1
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %rdx
shrq $0x3f, %rdx
movq (%rdi,%rdx,8), %rdi
testq %rdi, %rdi
je 0x27096
leaq 0x18(%rbx), %r15
leaq 0x20(%rbx), %r14
leaq 0x28(%rbx), %r12
xorl %eax, %eax
testq %rsi, %rsi
setns %al
shll $0x3, %eax
xorl %edx, %edx
movzwl 0x1c(%rdi), %r8d
addq %rdx, %r8
cmpq %rcx, %r8
ja 0x2703a
movq (%rdi,%rax), %rdi
movq %r8, %rdx
testq %rdi, %rdi
jne 0x2701d
xorl %eax, %eax
jmp 0x27096
movl %ecx, %eax
notl %eax
addl %edx, %eax
subl %edx, %ecx
testq %rsi, %rsi
movq %rdi, 0x8(%rbx)
cmovsl %eax, %ecx
movl %ecx, 0x2c(%rbx)
movl $0x30000, %eax          # imm = 0x30000
andl 0x1c(%rdi), %eax
cmpl $0x20000, %eax          # imm = 0x20000
jne 0x2706e
callq 0x2e916
movq 0x8(%rbx), %rax
orl $0x100000, 0x1c(%rax)   # imm = 0x100000
movq 0x8(%rbx), %rax
movq 0x10(%rax), %rdi
movl 0x2c(%rbx), %esi
callq 0x3ea40
movq %rax, 0x10(%rbx)
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x3eb60
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x26fac
testl %eax, %eax
je 0x270e5
movq %r14, %rdi
movl %ebx, %esi
callq 0x2f71a
andq $0x0, 0x10(%rax)
movq 0x10(%rsp), %rcx
movq %rcx, 0x8(%rax)
movslq 0x34(%rsp), %rcx
movq %rcx, 0x18(%rax)
jmp 0x270e7
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/quicklist.c
// Function: quicklistCreateNode
REDIS_STATIC quicklistNode *quicklistCreateNode(void) {
    quicklistNode *node;
    node = zmalloc(sizeof(*node));
    node->zl = NULL;
    node->count = 0;
    node->sz = 0;
    node->next = node->prev = NULL;
    node->encoding = QUICKLIST_NODE_ENCODING_RAW;
    node->container = QUICKLIST_NODE_CONTAINER_ZIPLIST;
    node->recompress = 0;
    return node;
}

// Assembly:
pushq %rax
movl $0x20, %edi
callq 0x3b29d
movq $0x0, 0x10(%rax)
movl $0x0, 0x18(%rax)
movl $0xffe00000, %ecx       # imm = 0xFFE00000
andl 0x1c(%rax), %ecx
orl $0x90000, %ecx          # imm = 0x90000
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movl %ecx, 0x1c(%rax)
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/quicklist.c
// Function: quicklistRelease
void quicklistRelease(quicklist *quicklist) {
    unsigned long len;
    quicklistNode *current, *next;

    current = quicklist->head;
    len = quicklist->len;
    while (len--) {
        next = current->next;

        zfree(current->zl);
        quicklist->count -= current->count;

        zfree(current);

        quicklist->len--;
        current = next;
    }
    zfree(quicklist);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x18(%rdi), %r15d
testq %r15, %r15
je 0x2e880
movq (%rbx), %r14
movq 0x8(%r14), %r12
movq 0x10(%r14), %rdi
callq 0x3b3df
movzwl 0x1c(%r14), %eax
subq %rax, 0x10(%rbx)
movq %r14, %rdi
callq 0x3b3df
decl 0x18(%rbx)
movq %r12, %r14
decq %r15
jne 0x2e857
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3b3df
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/quicklist.c
// Function: _quicklistCompressNode
REDIS_STATIC int __quicklistCompressNode(quicklistNode *node) {
#ifdef REDIS_TEST
    node->attempted_compress = 1;
#endif

    /* Don't bother compressing small values */
    if (node->sz < MIN_COMPRESS_BYTES)
        return 0;

    quicklistLZF *lzf = zmalloc(sizeof(*lzf) + node->sz);

    /* Cancel if compression fails or doesn't compress small enough */
    if (((lzf->sz = lzf_compress(node->zl, node->sz, lzf->compressed,
                                 node->sz)) == 0) ||
        lzf->sz + MIN_COMPRESS_IMPROVE >= node->sz) {
        /* lzf_compress aborts/rejects compression if value not compressable. */
        zfree(lzf);
        return 0;
    }
    lzf = zrealloc(lzf, sizeof(*lzf) + lzf->sz);
    zfree(node->zl);
    node->zl = (unsigned char *)lzf;
    node->encoding = QUICKLIST_NODE_ENCODING_LZF;
    node->recompress = 0;
    return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x18(%rdi), %edi
xorl %ebp, %ebp
cmpq $0x30, %rdi
jb 0x2e90f
addq $0x4, %rdi
callq 0x3b29d
movq %rax, %r14
movq 0x10(%rbx), %rdi
movl 0x18(%rbx), %ecx
leaq 0x4(%rax), %rdx
movl %ecx, %esi
callq 0x3b6d0
movl %eax, (%r14)
testl %eax, %eax
je 0x2e907
leal 0x8(%rax), %ecx
cmpl 0x18(%rbx), %ecx
jae 0x2e907
movl %eax, %esi
addq $0x4, %rsi
movq %r14, %rdi
callq 0x3b349
movq %rax, %r14
movq 0x10(%rbx), %rdi
callq 0x3b3df
movq %r14, 0x10(%rbx)
movl $0xffecffff, %eax       # imm = 0xFFECFFFF
andl 0x1c(%rbx), %eax
orl $0x20000, %eax          # imm = 0x20000
movl %eax, 0x1c(%rbx)
movl $0x1, %ebp
jmp 0x2e90f
movq %r14, %rdi
callq 0x3b3df
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/quicklist.c
// Function: _quicklistDecompressNode
REDIS_STATIC int __quicklistDecompressNode(quicklistNode *node) {
#ifdef REDIS_TEST
    node->attempted_compress = 0;
#endif

    void *decompressed = zmalloc(node->sz);
    quicklistLZF *lzf = (quicklistLZF *)node->zl;
    if (lzf_decompress(lzf->compressed, lzf->sz, decompressed, node->sz) == 0) {
        /* Someone requested decompress, but we can't decompress.  Not good. */
        zfree(decompressed);
        return 0;
    }
    zfree(lzf);
    node->zl = decompressed;
    node->encoding = QUICKLIST_NODE_ENCODING_RAW;
    return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x18(%rdi), %edi
callq 0x3b29d
movq %rax, %r14
movq 0x10(%rbx), %r15
leaq 0x4(%r15), %rdi
movl (%r15), %esi
movl 0x18(%rbx), %ecx
movq %rax, %rdx
callq 0x3baec
testl %eax, %eax
je 0x2e966
movq %r15, %rdi
callq 0x3b3df
movq %r14, 0x10(%rbx)
movl $0xfffcffff, %eax       # imm = 0xFFFCFFFF
andl 0x1c(%rbx), %eax
orl $0x10000, %eax          # imm = 0x10000
movl %eax, 0x1c(%rbx)
movl $0x1, %eax
jmp 0x2e970
movq %r14, %rdi
callq 0x3b3df
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x2eb00
movq %rsi, (%rdx)
testq %rsi, %rsi
je 0x2eaf4
movq 0x8(%rsi), %rax
movq %rax, 0x8(%rdx)
movq 0x8(%rsi), %rax
testq %rax, %rax
je 0x2eaf0
movq %rdx, (%rax)
movq %rdx, 0x8(%rsi)
cmpq %rsi, 0x8(%rbx)
jne 0x2eb29
leaq 0x8(%rbx), %rax
jmp 0x2eb26
movq %rsi, 0x8(%rdx)
testq %rsi, %rsi
je 0x2eb1e
movq (%rsi), %rax
movq %rax, (%rdx)
movq (%rsi), %rax
testq %rax, %rax
je 0x2eb1b
movq %rdx, 0x8(%rax)
movq %rdx, (%rsi)
movq %rbx, %rax
cmpq %rsi, (%rbx)
jne 0x2eb29
movq %rdx, (%rax)
cmpl $0x0, 0x18(%rbx)
jne 0x2eb36
movq %rdx, 0x8(%rbx)
movq %rdx, (%rbx)
testq %rsi, %rsi
je 0x2eb62
movl 0x1c(%rsi), %eax
btl $0x14, %eax
jb 0x2eb4e
movq %rbx, %rdi
callq 0x2e984
jmp 0x2eb62
andl $0x30000, %eax          # imm = 0x30000
cmpl $0x10000, %eax          # imm = 0x10000
jne 0x2eb62
movq %rsi, %rdi
callq 0x2e893
incl 0x18(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x2ebd1
movl 0x18(%rdi), %eax
movl 0x18(%rsi), %ecx
addl %eax, %ecx
addl $-0xb, %ecx
cmpl $-0x5, %edx
jb 0x2ebd2
movl %ecx, %r8d
movl %edx, %r9d
notl %r9d
leaq 0x9045a(%rip), %r10     # 0xbf020
movl $0x1, %eax
cmpq %r8, (%r10,%r9,8)
jb 0x2ebd2
retq
movl $0x0, %eax
cmpl $0x2000, %ecx           # imm = 0x2000
ja 0x2ebd1
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_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x3b29d
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 0x3ef20
movw %ax, 0x1c(%r14)
movq %r15, %rdi
callq 0x3ef6d
movl %eax, 0x18(%r14)
movq 0x8(%rbx), %rsi
movq %rbx, %rdi
movq %r14, %rdx
movl $0x1, %ecx
callq 0x2eacc
movzwl 0x1c(%r14), %eax
addq %rax, 0x10(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x3ea40
movq %rax, %r15
leaq 0x8(%rsp), %rsi
leaq 0x4(%rsp), %rdx
leaq 0x10(%rsp), %rcx
movq %rax, %rdi
callq 0x3eb60
testl %eax, %eax
je 0x2ed43
leaq 0x8(%rsp), %r13
leaq 0x4(%rsp), %rbp
leaq 0x10(%rsp), %r12
movq %r14, 0x18(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x2ed0f
movq 0x10(%rsp), %rdx
movl $0x20, %esi
movq %rbx, %r14
movq %r12, %rbx
movq %rbp, %r12
movq %r13, %rbp
leaq 0x20(%rsp), %r13
movq %r13, %rdi
callq 0x433e5
movl %eax, 0x4(%rsp)
movq %r13, 0x8(%rsp)
movq %rbp, %r13
movq %r12, %rbp
movq %rbx, %r12
movq %r14, %rbx
movq 0x18(%rsp), %r14
movq 0x8(%rsp), %rsi
movl 0x4(%rsp), %edx
movq %rbx, %rdi
callq 0x26e43
movq %r14, %rdi
movq %r15, %rsi
callq 0x3ead6
movq %rax, %r15
movq %rax, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq %r12, %rcx
callq 0x3eb60
testl %eax, %eax
jne 0x2ecca
movq %r14, %rdi
callq 0x3b3df
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_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x8(%rsi), %rax
testq %rax, %rax
je 0x2ede1
movq (%r14), %rcx
movq %rcx, (%rax)
movq (%r14), %rcx
testq %rcx, %rcx
je 0x2eded
movq %rax, 0x8(%rcx)
cmpq %r14, 0x8(%rbx)
jne 0x2edf7
movq %rcx, 0x8(%rbx)
cmpq %r14, (%rbx)
jne 0x2ee03
movq 0x8(%r14), %rax
movq %rax, (%rbx)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2e984
movzwl 0x1c(%r14), %eax
subq %rax, 0x10(%rbx)
movq 0x10(%r14), %rdi
callq 0x3b3df
movq %r14, %rdi
callq 0x3b3df
decl 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x3ebf5
movq %rax, 0x10(%r14)
movl 0x1c(%r14), %ebp
decl %ebp
movw %bp, 0x1c(%r14)
andl $0xffff, %ebp           # imm = 0xFFFF
je 0x2ee6d
movq %rax, %rdi
callq 0x3ef6d
movl %eax, 0x18(%r14)
jmp 0x2ee78
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2edc8
xorl %eax, %eax
testl %ebp, %ebp
sete %al
decq 0x10(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x2ee32
movq $0x0, 0x10(%rbx)
testl %eax, %eax
je 0x2eed7
movl 0x20(%rbx), %eax
testq %rax, %rax
je 0x2eecc
cmpl $0x1, %eax
jne 0x2eed7
movq $-0x1, %rax
jmp 0x2eecf
movq %r15, %r14
movq %r14, 0x8(%rbx)
movq %rax, 0x18(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x2ef0b
movl $0x30000, %eax          # imm = 0x30000
andl 0x1c(%r15), %eax
cmpl $0x20000, %eax          # imm = 0x20000
jne 0x2ef0b
movq %r15, %rdi
callq 0x2e916
testq %rbx, %rbx
je 0x2ef27
movl $0x30000, %eax          # imm = 0x30000
andl 0x1c(%rbx), %eax
cmpl $0x20000, %eax          # imm = 0x20000
jne 0x2ef27
movq %rbx, %rdi
callq 0x2e916
leaq 0x10(%r15), %r12
leaq 0x10(%rbx), %rsi
movq %r12, %rdi
callq 0x3e8a4
testq %rax, %rax
je 0x2ef9d
cmpq $0x0, (%r12)
je 0x2ef57
xorl %eax, %eax
cmpq %rax, 0x10(%rbx)
cmovneq %rax, %r15
cmoveq %rbx, %rax
movq %r15, %rbx
movq %rax, %r15
movq 0x10(%rbx), %rdi
callq 0x3ef20
movw %ax, 0x1c(%rbx)
movq 0x10(%rbx), %rdi
callq 0x3ef6d
movl %eax, 0x18(%rbx)
movzwl 0x1e(%r15), %eax
shll $0x10, %eax
movl %eax, 0x1c(%r15)
movq %r14, %rdi
movq %r15, %rsi
callq 0x2edc8
movl 0x1c(%rbx), %eax
btl $0x14, %eax
jb 0x2efa1
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2e984
jmp 0x2efc0
xorl %ebx, %ebx
jmp 0x2efc0
testq %rbx, %rbx
sete %cl
andl $0x30000, %eax          # imm = 0x30000
cmpl $0x10000, %eax          # imm = 0x10000
setne %al
orb %cl, %al
jne 0x2efc0
movq %rbx, %rdi
callq 0x2e893
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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), %r15
testq %r15, %r15
je 0x2efee
movq (%r15), %rbx
jmp 0x2eff3
xorl %r15d, %r15d
xorl %ebx, %ebx
movq (%rsp), %rax
movswl 0x1c(%rax), %ebp
movq 0x8(%r14), %r12
testq %r12, %r12
je 0x2f00b
movq 0x8(%r12), %r13
jmp 0x2f011
xorl %r12d, %r12d
xorl %r13d, %r13d
movq %r15, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x2eb92
testl %eax, %eax
je 0x2f031
movq (%rsp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x2eedd
movq %r12, %rdi
movq %r13, %rsi
movl %ebp, %edx
callq 0x2eb92
testl %eax, %eax
je 0x2f051
movq (%rsp), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x2eedd
movq (%r14), %rbx
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x2eb92
testl %eax, %eax
je 0x2f077
movq (%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2eedd
movq %rax, %r14
movq 0x8(%r14), %rbx
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x2eb92
testl %eax, %eax
je 0x2f0a9
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 0x2eedd
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x3b29d
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 0x3b29d
movq %rax, 0x10(%rbx)
movq 0x10(%r15), %rsi
movq %rax, %rdi
movq %r12, %rdx
callq 0x26c60
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 0x3ec1d
movq %rax, 0x10(%r15)
movq %rax, %rdi
callq 0x3ef20
movw %ax, 0x1c(%r15)
movq 0x10(%r15), %rdi
callq 0x3ef6d
movl %eax, 0x18(%r15)
movq 0x10(%rbx), %rdi
movl %r14d, %esi
movl %r12d, %edx
callq 0x3ec1d
movq %rax, 0x10(%rbx)
movq %rax, %rdi
callq 0x3ef20
movw %ax, 0x1c(%rbx)
movq 0x10(%rbx), %rdi
callq 0x3ef6d
movl %eax, 0x18(%rbx)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x3b29d
testl %ebp, %ebp
je 0x2f742
cmpl $0x1, %ebp
jne 0x2f752
leaq 0x8(%rbx), %rdx
movq $-0x1, %rcx
jmp 0x2f747
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_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x3b29d
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 0x2fa46
movl $0xffe00000, %ebp       # imm = 0xFFE00000
movl $0x30000, %r12d         # imm = 0x30000
movl $0xfffcffff, %r13d      # imm = 0xFFFCFFFF
movl $0x20, %edi
callq 0x3b29d
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 0x3b29d
movq %rax, 0x10(%r14)
movq 0x10(%r15), %rsi
movl 0x18(%r15), %edx
movq %rax, %rdi
callq 0x26c60
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 0x2eacc
movq 0x8(%r15), %r15
testq %r15, %r15
jne 0x2f9ab
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_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x2fa60
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 0x3ea40
movq %rax, 0x10(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
leaq 0x8(%rsp), %r14
leaq 0x4(%rsp), %rdx
leaq 0x18(%rsp), %rcx
movq %rax, %rdi
movq %r14, %rsi
callq 0x3eb60
cmpq $0x0, (%r14)
jne 0x2face
movq 0x18(%rsp), %rdx
leaq 0x20(%rsp), %r14
movl $0x20, %esi
movq %r14, %rdi
callq 0x433e5
movl %eax, 0x4(%rsp)
movq %r14, 0x8(%rsp)
movq 0x8(%rsp), %rsi
movl 0x4(%rsp), %edx
movq %rbx, %rdi
callq 0x26d9c
cmpl $0x1, 0x18(%rbx)
jne 0x2fafc
movq 0x8(%rbx), %rax
movq 0x10(%rax), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x3ea40
movq %rax, 0x10(%rsp)
movq 0x8(%rbx), %rsi
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x2ee32
addq $0x48, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x2fc16
movq %r8, %r12
movq %rdx, %r15
movq %rdi, %rbx
testq %rdx, %rdx
je 0x2fb55
movq $0x0, (%r15)
testq %r14, %r14
je 0x2fb61
movl $0x0, (%r14)
testq %r12, %r12
je 0x2fb6e
movq $-0x75bcd15, (%r12)     # imm = 0xF8A432EB
testl %eax, %eax
je 0x2fb89
cmpl $-0x1, %eax
jne 0x2fc16
movq 0x8(%rbx), %r13
testq %r13, %r13
jne 0x2fb91
jmp 0x2fc16
movq (%rbx), %r13
testq %r13, %r13
je 0x2fb72
movq %r9, 0x8(%rsp)
movq 0x10(%r13), %rdi
callq 0x3ea40
movq %rax, 0x20(%rsp)
leaq 0x18(%rsp), %rsi
leaq 0x4(%rsp), %rdx
leaq 0x10(%rsp), %rcx
movq %rax, %rdi
callq 0x3eb60
testl %eax, %eax
je 0x2fc16
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x2fbe7
testq %r15, %r15
je 0x2fbd9
movl 0x4(%rsp), %esi
callq *0x8(%rsp)
movq %rax, (%r15)
testq %r14, %r14
je 0x2fc01
movl 0x4(%rsp), %eax
movl %eax, (%r14)
jmp 0x2fc01
testq %r15, %r15
je 0x2fbf3
movq $0x0, (%r15)
testq %r12, %r12
je 0x2fc01
movq 0x10(%rsp), %rax
movq %rax, (%r12)
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x2ee32
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_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x2fcb9
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %r8, %r14
movq %rcx, %rbx
movq %rdx, %r15
leaq -0x4f(%rip), %r9        # 0x2fc27
leaq 0x18(%rsp), %rdx
leaq 0xc(%rsp), %rcx
leaq 0x10(%rsp), %r8
callq 0x2fb15
testq %r15, %r15
je 0x2fc97
movq 0x18(%rsp), %rcx
movq %rcx, (%r15)
testq %r14, %r14
je 0x2fca4
movq 0x10(%rsp), %rcx
movq %rcx, (%r14)
testq %rbx, %rbx
je 0x2fcaf
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_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x32a4c
movq 0x40(%rbx), %rcx
movq 0x8(%rcx), %rcx
movq 0x8(%rcx), %rdi
jmp 0x32a53
leaq 0x8df0e(%rip), %rdi     # 0xc0961
cmpl $0x3, %eax
jl 0x32a68
movq 0xd48d1(%rip), %rsi     # 0x107330
movq %rbx, %rdi
popq %rbx
jmp 0x3fc19
callq 0x372d4
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
jmp 0x4074f
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/server.c
// Function: monitorCommand
void monitorCommand(client *c) {
    /* ignore MONITOR if already slave or in monitor mode */
    if (c->flags & CLIENT_SLAVE) return;

    c->flags |= (CLIENT_SLAVE|CLIENT_MONITOR);
    listAddNodeTail(server.monitors,c);
    addReply(c,shared.ok);
}

// Assembly:
movl 0x98(%rdi), %eax
testb $0x1, %al
jne 0x32aaf
pushq %rbx
movq %rdi, %rbx
orl $0x5, %eax
movl %eax, 0x98(%rdi)
movq 0xd3fa9(%rip), %rdi     # 0x106a40
movq %rbx, %rsi
callq 0x2e40f
movq 0xd4812(%rip), %rsi     # 0x1072b8
movq %rbx, %rdi
popq %rbx
jmp 0x3fc19
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/server.c
// Function: getInstantaneousMetric
long long getInstantaneousMetric(int metric) {
    int j;
    long long sum = 0;

    for (j = 0; j < STATS_METRIC_SAMPLES; j++)
        sum += server.inst_metric[metric].samples[j];
    return sum / STATS_METRIC_SAMPLES;
}

// Assembly:
movslq %edi, %rax
imulq $0x98, %rax, %rax
leaq 0xd2e06(%rip), %rcx     # 0x106858
addq %rcx, %rax
addq $0x430, %rax            # imm = 0x430
xorl %edx, %edx
xorl %ecx, %ecx
addq (%rax,%rdx,8), %rcx
incq %rdx
cmpq $0x10, %rdx
jne 0x33a5f
leaq 0xf(%rcx), %rax
testq %rcx, %rcx
cmovnsq %rcx, %rax
sarq $0x4, %rax
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/server.c
// Function: clientsCronHandleTimeout
int clientsCronHandleTimeout(client *c, mstime_t now_ms) {
    time_t now = now_ms/1000;

    if (server.maxidletime &&
        !(c->flags & CLIENT_SLAVE) &&    /* no timeout for slaves */
        !(c->flags & CLIENT_MASTER) &&   /* no timeout for masters */
        !(c->flags & CLIENT_BLOCKED) &&  /* no timeout for BLPOP */
        !(c->flags & CLIENT_PUBSUB) &&   /* no timeout for Pub/Sub clients */
        (now - c->lastinteraction > server.maxidletime))
    {
        serverLog(LL_VERBOSE,"Closing idle client");
        freeClient(c);
        return 1;
    } else if (c->flags & CLIENT_BLOCKED) {
        /* Blocked OPS timeout is handled with milliseconds resolution.
         * However note that the actual resolution is limited by
         * server.hz. */

        if (c->bpop.timeout != 0 && c->bpop.timeout < now_ms) {
            /* Handle blocking operation specific timeout. */
            replyToBlockedClientTimedOut(c);
            unblockClient(c);
        } else if (server.cluster_enabled) {
            /* Cluster: handle unblock & redirect of clients blocked
             * into keys no longer served by this server. */
            if (clusterRedirectBlockedClientIfNeeded(c))
                unblockClient(c);
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
movq %rsi, %rax
imulq %rcx
movq %rdi, %rbx
movslq 0xd33ab(%rip), %rax     # 0x106e44
testq %rax, %rax
je 0x33ae6
testl $0x40013, 0x98(%rbx)    # imm = 0x40013
jne 0x33ae6
movq %rdx, %rcx
shrq $0x3f, %rcx
sarq $0x7, %rdx
addq %rcx, %rdx
subq 0x88(%rbx), %rdx
cmpq %rax, %rdx
jle 0x33ae6
leaq 0x8bf03(%rip), %rsi     # 0xbf9ce
movl $0x1, %ebp
movl $0x1, %edi
xorl %eax, %eax
callq 0x32ea6
movq %rbx, %rdi
callq 0x40b04
jmp 0x33b2f
xorl %ebp, %ebp
testb $0x10, 0x98(%rbx)
je 0x33b2f
movq 0x170(%rbx), %rax
testq %rax, %rax
sete %cl
cmpq %rsi, %rax
setge %al
orb %cl, %al
jne 0x33b12
movq %rbx, %rdi
callq 0x80783
jmp 0x33b27
cmpl $0x0, 0xd36cb(%rip)     # 0x1071e4
je 0x33b2f
movq %rbx, %rdi
callq 0x70aa4
testl %eax, %eax
je 0x33b2f
movq %rbx, %rdi
callq 0x806f2
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/server.c
// Function: clientsCron
void clientsCron(void) {
    /* Make sure to process at least numclients/server.hz of clients
     * per call. Since this function is called server.hz times per second
     * we are sure that in the worst case we process all the clients in 1
     * second. */
    int numclients = listLength(server.clients);
    int iterations = numclients/server.hz;
    mstime_t now = mstime();

    /* Process at least a few clients while we are at it, even if we need
     * to process less than CLIENTS_CRON_MIN_ITERATIONS to meet our contract
     * of processing each client once per second. */
    if (iterations < CLIENTS_CRON_MIN_ITERATIONS)
        iterations = (numclients < CLIENTS_CRON_MIN_ITERATIONS) ?
                     numclients : CLIENTS_CRON_MIN_ITERATIONS;

    while(listLength(server.clients) && iterations--) {
        client *c;
        listNode *head;

        /* Rotate the list, take the current head, process.
         * This way if the client must be removed from the list it's the
         * first element and we don't incur into O(N) computation. */
        listRotate(server.clients);
        head = listFirst(server.clients);
        c = listNodeValue(head);
        /* The following functions do different service checks on the client.
         * The protocol is that they return non-zero if the client was
         * terminated. */
        if (clientsCronHandleTimeout(c,now)) continue;
        if (clientsCronResizeQueryBuffer(c)) continue;
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq 0xd2e25(%rip), %rax     # 0x106a20
movq 0x28(%rax), %r14
movl 0xd2c73(%rip), %ebp     # 0x106878
movq %rsp, %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x26310
imulq $0xf4240, (%rbx), %rax  # imm = 0xF4240
addq 0x8(%rbx), %rax
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
imulq %rcx
movq 0xd2def(%rip), %rdi     # 0x106a20
cmpq $0x0, 0x28(%rdi)
je 0x33ca0
movq %rdx, %rbx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rbx
addq %rax, %rbx
movl %r14d, %eax
cltd
idivl %ebp
cmpl $0x5, %r14d
movl $0x5, %ebp
cmovll %r14d, %ebp
cmpl $0x5, %eax
cmovgel %eax, %ebp
incl %ebp
decl %ebp
je 0x33ca0
callq 0x2e6ed
movq 0xd2dac(%rip), %rax     # 0x106a20
movq (%rax), %rax
movq 0x10(%rax), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x33a7c
testl %eax, %eax
jne 0x33c92
movq %r14, %rdi
callq 0x33b38
movq 0xd2d87(%rip), %rdi     # 0x106a20
cmpq $0x0, 0x28(%rdi)
jne 0x33c64
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq