LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/liball/../libcperciva/alg/sha256_sse2.c
// Function: s1_128_high
static inline __m128i
s1_128_high(__m128i a)
{
	__m128i b;
	__m128i c;

	/* ROTR, loading data as {B, B, A, A}; lanes 1 & 3 will be junk. */
	b = _mm_shuffle_epi32(a, _MM_SHUFFLE(1, 1, 0, 0));
	c = _mm_xor_si128(_mm_srli_epi64(b, 17), _mm_srli_epi64(b, 19));

	/* Shift and XOR with rotated data; lanes 1 & 3 will be junk. */
	c = _mm_xor_si128(c, _mm_srli_epi32(b, 10));

	/* Shuffle good data back and zero unwanted lanes. */
	c = _mm_shuffle_epi32(c, _MM_SHUFFLE(2, 0, 2, 0));
	c = _mm_slli_si128(c, 8);

	return (c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movaps %xmm0, -0xb0(%rbp)
movaps -0xb0(%rbp), %xmm0
pshufd $0x50, %xmm0, %xmm0     # xmm0 = xmm0[0,0,1,1]
movaps %xmm0, -0xc0(%rbp)
movaps -0xc0(%rbp), %xmm0
movaps %xmm0, -0x10(%rbp)
movl $0x11, -0x14(%rbp)
movaps -0x10(%rbp), %xmm1
movd -0x14(%rbp), %xmm0
psrlq %xmm0, %xmm1
movaps -0xc0(%rbp), %xmm0
movaps %xmm0, -0x30(%rbp)
movl $0x13, -0x34(%rbp)
movaps -0x30(%rbp), %xmm0
movd -0x34(%rbp), %xmm2
psrlq %xmm2, %xmm0
movaps %xmm1, -0x70(%rbp)
movaps %xmm0, -0x80(%rbp)
movaps -0x70(%rbp), %xmm0
movaps -0x80(%rbp), %xmm1
pxor %xmm1, %xmm0
movaps %xmm0, -0xd0(%rbp)
movaps -0xd0(%rbp), %xmm1
movaps -0xc0(%rbp), %xmm0
movaps %xmm0, -0x50(%rbp)
movl $0xa, -0x54(%rbp)
movaps -0x50(%rbp), %xmm0
movd -0x54(%rbp), %xmm2
psrld %xmm2, %xmm0
movaps %xmm1, -0x90(%rbp)
movaps %xmm0, -0xa0(%rbp)
movaps -0x90(%rbp), %xmm0
movaps -0xa0(%rbp), %xmm1
pxor %xmm1, %xmm0
movaps %xmm0, -0xd0(%rbp)
movaps -0xd0(%rbp), %xmm0
pshufd $0x88, %xmm0, %xmm0     # xmm0 = xmm0[0,2,0,2]
movaps %xmm0, -0xd0(%rbp)
movaps -0xd0(%rbp), %xmm0
pslldq $0x8, %xmm0             # xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6,7]
movdqa %xmm0, -0xd0(%rbp)
movdqa -0xd0(%rbp), %xmm0
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/quicklist.c
// Function: quicklistCreate
quicklist *quicklistCreate(void) {
    struct quicklist *quicklist;

    quicklist = zmalloc(sizeof(*quicklist));
    quicklist->head = quicklist->tail = NULL;
    quicklist->len = 0;
    quicklist->count = 0;
    quicklist->compress = 0;
    quicklist->fill = -2;
    return quicklist;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x20, %edi
callq 0x3acd0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %ecx
andl $0xffff, %ecx           # imm = 0xFFFF
orl $0x0, %ecx
movl %ecx, 0x1c(%rax)
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %ecx
andl $0xffff0000, %ecx       # imm = 0xFFFF0000
orl $0xfffe, %ecx           # imm = 0xFFFE
movl %ecx, 0x1c(%rax)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/quicklist.c
// Function: quicklistSetCompressDepth
void quicklistSetCompressDepth(quicklist *quicklist, int compress) {
    if (compress > COMPRESS_MAX) {
        compress = COMPRESS_MAX;
    } else if (compress < 0) {
        compress = 0;
    }
    quicklist->compress = compress;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x10000, -0xc(%rbp)    # imm = 0x10000
jle 0x2773d
movl $0x10000, -0xc(%rbp)    # imm = 0x10000
jmp 0x2774c
cmpl $0x0, -0xc(%rbp)
jge 0x2774a
movl $0x0, -0xc(%rbp)
jmp 0x2774c
movl -0xc(%rbp), %edx
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %ecx
andl $0xffff, %edx           # imm = 0xFFFF
shll $0x10, %edx
andl $0xffff, %ecx           # imm = 0xFFFF
orl %edx, %ecx
movl %ecx, 0x1c(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/quicklist.c
// Function: quicklistSetFill
void quicklistSetFill(quicklist *quicklist, int fill) {
    if (fill > FILL_MAX) {
        fill = FILL_MAX;
    } else if (fill < -5) {
        fill = -5;
    }
    quicklist->fill = fill;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x8000, -0xc(%rbp)     # imm = 0x8000
jle 0x2778d
movl $0x8000, -0xc(%rbp)     # imm = 0x8000
jmp 0x2779c
cmpl $-0x5, -0xc(%rbp)
jge 0x2779a
movl $0xfffffffb, -0xc(%rbp) # imm = 0xFFFFFFFB
jmp 0x2779c
movl -0xc(%rbp), %edx
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %ecx
andl $0xffff, %edx           # imm = 0xFFFF
andl $0xffff0000, %ecx       # imm = 0xFFFF0000
orl %edx, %ecx
movl %ecx, 0x1c(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x20, %edi
callq 0x3acd0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %ecx
andl $0xffff0000, %ecx       # imm = 0xFFFF0000
orl $0x0, %ecx
movl %ecx, 0x1c(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %ecx
andl $0xfffcffff, %ecx       # imm = 0xFFFCFFFF
orl $0x10000, %ecx          # imm = 0x10000
movl %ecx, 0x1c(%rax)
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %ecx
andl $0xfff3ffff, %ecx       # imm = 0xFFF3FFFF
orl $0x80000, %ecx          # imm = 0x80000
movl %ecx, 0x1c(%rax)
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %ecx
andl $0xffefffff, %ecx       # imm = 0xFFEFFFFF
orl $0x0, %ecx
movl %ecx, 0x1c(%rax)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x10(%rbp)
cmpq $0x0, %rax
je 0x2796f
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x3afa0
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %eax
andl $0xffff, %eax           # imm = 0xFFFF
movl %eax, %eax
movl %eax, %edx
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rdi
callq 0x3afa0
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x18(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x27902
movq -0x8(%rbp), %rdi
callq 0x3afa0
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x30, 0x18(%rax)
jae 0x279a2
movl $0x0, -0x4(%rbp)
jmp 0x27a6c
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, %edi
addq $0x4, %rdi
callq 0x3acd0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x18(%rax), %esi
movq -0x18(%rbp), %rdx
addq $0x4, %rdx
movq -0x10(%rbp), %rax
movl 0x18(%rax), %ecx
callq 0x3b540
movq -0x18(%rbp), %rcx
movl %eax, (%rcx)
cmpl $0x0, %eax
je 0x279f8
movq -0x18(%rbp), %rax
movl (%rax), %eax
addl $0x8, %eax
movq -0x10(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jb 0x27a0a
movq -0x18(%rbp), %rdi
callq 0x3afa0
movl $0x0, -0x4(%rbp)
jmp 0x27a6c
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, %esi
addq $0x4, %rsi
callq 0x3ae40
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x3afa0
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %ecx
andl $0xfffcffff, %ecx       # imm = 0xFFFCFFFF
orl $0x20000, %ecx          # imm = 0x20000
movl %ecx, 0x1c(%rax)
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %ecx
andl $0xffefffff, %ecx       # imm = 0xFFEFFFFF
orl $0x0, %ecx
movl %ecx, 0x1c(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, %edi
callq 0x3acd0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
addq $0x4, %rdi
movq -0x20(%rbp), %rax
movl (%rax), %esi
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rax
movl 0x18(%rax), %ecx
callq 0x3c0a0
cmpl $0x0, %eax
jne 0x27adf
movq -0x18(%rbp), %rdi
callq 0x3afa0
movl $0x0, -0x4(%rbp)
jmp 0x27b11
movq -0x20(%rbp), %rdi
callq 0x3afa0
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %ecx
andl $0xfffcffff, %ecx       # imm = 0xFFFCFFFF
orl $0x10000, %ecx          # imm = 0x10000
movl %ecx, 0x1c(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/quicklist.c
// Function: quicklistNodeSizeMeetsOptimizationRequirement
REDIS_STATIC int
_quicklistNodeSizeMeetsOptimizationRequirement(const size_t sz,
                                               const int fill) {
    if (fill >= 0)
        return 0;

    size_t offset = (-fill) - 1;
    if (offset < (sizeof(optimization_level) / sizeof(*optimization_level))) {
        if (sz <= optimization_level[offset]) {
            return 1;
        } else {
            return 0;
        }
    } else {
        return 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0x27eda
movl $0x0, -0x4(%rbp)
jmp 0x27f1d
xorl %eax, %eax
subl -0x14(%rbp), %eax
subl $0x1, %eax
cltq
movq %rax, -0x20(%rbp)
cmpq $0x5, -0x20(%rbp)
jae 0x27f16
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rdx
leaq 0x10f112(%rip), %rcx    # 0x137010
cmpq (%rcx,%rdx,8), %rax
ja 0x27f0d
movl $0x1, -0x4(%rbp)
jmp 0x27f1d
movl $0x0, -0x4(%rbp)
jmp 0x27f1d
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/quicklist.c
// Function: quicklistNodeAllowInsert
REDIS_STATIC int _quicklistNodeAllowInsert(const quicklistNode *node,
                                           const int fill, const size_t sz) {
    if (unlikely(!node))
        return 0;

    int ziplist_overhead;
    /* size of previous offset */
    if (sz < 254)
        ziplist_overhead = 1;
    else
        ziplist_overhead = 5;

    /* size of forward offset */
    if (sz < 64)
        ziplist_overhead += 1;
    else if (likely(sz < 16384))
        ziplist_overhead += 2;
    else
        ziplist_overhead += 5;

    /* new_sz overestimates if 'sz' encodes to an integer type */
    unsigned int new_sz = node->sz + sz + ziplist_overhead;
    if (likely(_quicklistNodeSizeMeetsOptimizationRequirement(new_sz, fill)))
        return 1;
    else if (!sizeMeetsSafetyLimit(new_sz))
        return 0;
    else if ((int)node->count < fill)
        return 1;
    else
        return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x27f6a
movl $0x0, -0x4(%rbp)
jmp 0x2803d
cmpq $0xfe, -0x20(%rbp)
jae 0x27f7d
movl $0x1, -0x24(%rbp)
jmp 0x27f84
movl $0x5, -0x24(%rbp)
cmpq $0x40, -0x20(%rbp)
jae 0x27f96
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x27fc8
cmpq $0x4000, -0x20(%rbp)    # imm = 0x4000
setb %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x27fbd
movl -0x24(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x24(%rbp)
jmp 0x27fc6
movl -0x24(%rbp), %eax
addl $0x5, %eax
movl %eax, -0x24(%rbp)
jmp 0x27fc8
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
addq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq %rcx, %rax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl %eax, %edi
movl -0x14(%rbp), %esi
callq 0x27ec0
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x2800a
movl $0x1, -0x4(%rbp)
jmp 0x2803d
cmpl $0x2000, -0x28(%rbp)    # imm = 0x2000
jbe 0x2801c
movl $0x0, -0x4(%rbp)
jmp 0x2803d
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %eax
andl $0xffff, %eax           # imm = 0xFFFF
cmpl -0x14(%rbp), %eax
jge 0x28036
movl $0x1, -0x4(%rbp)
jmp 0x2803d
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x28071
cmpq $0x0, -0x18(%rbp)
jne 0x2807d
movl $0x0, -0x4(%rbp)
jmp 0x28100
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
movq -0x18(%rbp), %rcx
addl 0x18(%rcx), %eax
subl $0xb, %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl %eax, %edi
movl -0x1c(%rbp), %esi
callq 0x27ec0
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x280be
movl $0x1, -0x4(%rbp)
jmp 0x28100
cmpl $0x2000, -0x20(%rbp)    # imm = 0x2000
jbe 0x280d0
movl $0x0, -0x4(%rbp)
jmp 0x28100
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %eax
andl $0xffff, %eax           # imm = 0xFFFF
movq -0x18(%rbp), %rcx
movl 0x1c(%rcx), %ecx
andl $0xffff, %ecx           # imm = 0xFFFF
addl %ecx, %eax
cmpl -0x1c(%rbp), %eax
jg 0x280f9
movl $0x1, -0x4(%rbp)
jmp 0x28100
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/quicklist.c
// Function: quicklistPushHead
int quicklistPushHead(quicklist *quicklist, void *value, size_t sz) {
    quicklistNode *orig_head = quicklist->head;
    if (likely(
            _quicklistNodeAllowInsert(quicklist->head, quicklist->fill, sz))) {
        quicklist->head->zl =
            ziplistPush(quicklist->head->zl, value, sz, ZIPLIST_HEAD);
        quicklistNodeUpdateSz(quicklist->head);
    } else {
        quicklistNode *node = quicklistCreateNode();
        node->zl = ziplistPush(ziplistNew(), value, sz, ZIPLIST_HEAD);

        quicklistNodeUpdateSz(node);
        _quicklistInsertNodeBefore(quicklist, quicklist->head, node);
    }
    quicklist->count++;
    quicklist->head->count++;
    return (orig_head != quicklist->head);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %esi
shll $0x10, %esi
sarl $0x10, %esi
movq -0x18(%rbp), %rdx
callq 0x27f30
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x281ab
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
movl %eax, %edx
xorl %ecx, %ecx
callq 0x410b0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rdi
callq 0x41a50
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl %ecx, 0x18(%rax)
jmp 0x28202
callq 0x27820
movq %rax, -0x28(%rbp)
callq 0x40630
movq %rax, %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
movl %eax, %edx
xorl %ecx, %ecx
callq 0x410b0
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x41a50
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movq -0x28(%rbp), %rdx
callq 0x27e60
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0x1c(%rax), %edx
andl $0xffff, %edx           # imm = 0xFFFF
addl $0x1, %edx
movl 0x1c(%rax), %ecx
andl $0xffff, %edx           # imm = 0xFFFF
andl $0xffff0000, %ecx       # imm = 0xFFFF0000
orl %edx, %ecx
movl %ecx, 0x1c(%rax)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
setne %al
andb $0x1, %al
movzbl %al, %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %esi
shll $0x10, %esi
sarl $0x10, %esi
movq -0x18(%rbp), %rdx
callq 0x27f30
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x28304
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
movl %eax, %edx
movl $0x1, %ecx
callq 0x410b0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rdi
callq 0x41a50
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl %ecx, 0x18(%rax)
jmp 0x2835f
callq 0x27820
movq %rax, -0x28(%rbp)
callq 0x40630
movq %rax, %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
movl %eax, %edx
movl $0x1, %ecx
callq 0x410b0
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x41a50
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x28(%rbp), %rdx
callq 0x27e90
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x1c(%rax), %edx
andl $0xffff, %edx           # imm = 0xFFFF
addl $0x1, %edx
movl 0x1c(%rax), %ecx
andl $0xffff, %edx           # imm = 0xFFFF
andl $0xffff0000, %ecx       # imm = 0xFFFF0000
orl %edx, %ecx
movl %ecx, 0x1c(%rax)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x8(%rcx), %rax
setne %al
andb $0x1, %al
movzbl %al, %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
callq 0x27820
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x419c0
movl %eax, %edx
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %ecx
andl $0xffff, %edx           # imm = 0xFFFF
andl $0xffff0000, %ecx       # imm = 0xFFFF0000
orl %edx, %ecx
movl %ecx, 0x1c(%rax)
movq -0x10(%rbp), %rdi
callq 0x41a50
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x18(%rbp), %rdx
callq 0x27e90
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %eax
andl $0xffff, %eax           # imm = 0xFFFF
movl %eax, %eax
movl %eax, %ecx
movq -0x8(%rbp), %rax
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x26110
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x41120
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
leaq -0x18(%rbp), %rsi
leaq -0x1c(%rbp), %rdx
leaq -0x28(%rbp), %rcx
callq 0x41470
cmpl $0x0, %eax
je 0x284f2
cmpq $0x0, -0x18(%rbp)
jne 0x284cd
leaq -0x50(%rbp), %rdi
movq -0x28(%rbp), %rdx
movl $0x20, %esi
callq 0x477e0
movl %eax, -0x1c(%rbp)
leaq -0x50(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %eax
movl %eax, %edx
callq 0x28260
movq -0x10(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x412e0
movq %rax, -0x58(%rbp)
jmp 0x2848f
movq -0x10(%rbp), %rdi
callq 0x3afa0
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x2856d
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x2858a
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x285a7
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
jne 0x285c3
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x27b50
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %eax
andl $0xffff, %eax           # imm = 0xFFFF
movl %eax, %eax
movl %eax, %edx
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x3afa0
movq -0x10(%rbp), %rdi
callq 0x3afa0
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x18(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x41570
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %edx
andl $0xffff, %edx           # imm = 0xFFFF
addl $-0x1, %edx
movl 0x1c(%rax), %ecx
andl $0xffff, %edx           # imm = 0xFFFF
andl $0xffff0000, %ecx       # imm = 0xFFFF0000
orl %edx, %ecx
movl %ecx, 0x1c(%rax)
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %eax
andl $0xffff, %eax           # imm = 0xFFFF
cmpl $0x0, %eax
jne 0x286a2
movl $0x1, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x28540
jmp 0x286bc
jmp 0x286a4
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x41a50
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x18(%rax)
jmp 0x286bc
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x10(%rax)
movl -0x1c(%rbp), %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rdx
addq $0x10, %rdx
callq 0x28620
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
cmpl $0x0, -0x24(%rbp)
je 0x2879a
movq -0x8(%rbp), %rax
cmpl $0x0, 0x20(%rax)
jne 0x28774
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x18(%rax)
jmp 0x28798
movq -0x8(%rbp), %rax
cmpl $0x1, 0x20(%rax)
jne 0x28796
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq $-0x1, 0x18(%rax)
jmp 0x28798
jmp 0x2879a
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x58(%rbp), %rdx
callq 0x288a0
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x28890
movq -0x50(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x58(%rbp), %rsi
addq $0x10, %rsi
callq 0x41570
movq %rax, %rcx
movq -0x50(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x50(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x48(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x24(%rbp), %ecx
callq 0x41530
movq %rax, %rcx
movq -0x50(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x50(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x41a50
movl %eax, %ecx
movq -0x50(%rbp), %rax
movl %ecx, 0x18(%rax)
jmp 0x2883e
movq -0x50(%rbp), %rax
movl 0x1c(%rax), %eax
shrl $0x14, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x28878
jmp 0x28852
cmpq $0x0, -0x50(%rbp)
je 0x28874
movq -0x50(%rbp), %rax
movl 0x1c(%rax), %eax
shrl $0x10, %eax
andl $0x3, %eax
cmpl $0x1, %eax
jne 0x28874
movq -0x50(%rbp), %rdi
callq 0x27980
jmp 0x28876
jmp 0x28885
movq -0x10(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x27b50
jmp 0x28887
movl $0x1, -0x4(%rbp)
jmp 0x28897
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x28, %edi
callq 0x3acd0
movq %rax, -0x18(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x29b50
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x18(%rax)
jmp 0x29b74
cmpl $0x1, -0xc(%rbp)
jne 0x29b72
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq $-0x1, 0x18(%rax)
jmp 0x29b74
movl -0xc(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/quicklist.c
// Function: quicklistGetIteratorAtIdx
quicklistIter *quicklistGetIteratorAtIdx(const quicklist *quicklist,
                                         const int direction,
                                         const long long idx) {
    quicklistEntry entry;

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
leaq -0x50(%rbp), %rdx
callq 0x288a0
cmpl $0x0, %eax
je 0x29c07
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x29b10
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x48(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rcx, 0x8(%rax)
movslq -0x24(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x58(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x29c0f
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x1, 0x10(%rax)
ja 0x2a15c
jmp 0x2a20a
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x41120
movq %rax, -0x10(%rbp)
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x26110
movq -0x10(%rbp), %rdi
leaq -0x18(%rbp), %rsi
leaq -0x24(%rbp), %rdx
leaq -0x20(%rbp), %rcx
callq 0x41470
cmpq $0x0, -0x18(%rbp)
jne 0x2a1bf
leaq -0x50(%rbp), %rdi
movq -0x20(%rbp), %rdx
movl $0x20, %esi
callq 0x477e0
movl %eax, -0x24(%rbp)
leaq -0x50(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x24(%rbp), %eax
movl %eax, %edx
callq 0x28110
movq -0x8(%rbp), %rax
cmpl $0x1, 0x18(%rax)
jne 0x2a1f5
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x41120
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0x10(%rbp), %rdx
callq 0x28620
addq $0x50, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/quicklist.c
// Function: quicklistSaver
REDIS_STATIC void *_quicklistSaver(unsigned char *data, unsigned int sz) {
    unsigned char *vstr;
    if (data) {
        vstr = zmalloc(sz);
        memcpy(vstr, data, sz);
        return vstr;
    }
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x2a3d0
movl -0x14(%rbp), %eax
movl %eax, %edi
callq 0x3acd0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %eax
movl %eax, %edx
callq 0x26c60
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x2a3d8
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x2a41f
movl $0x0, -0x4(%rbp)
jmp 0x2a47b
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
leaq -0x38(%rbp), %rdx
leaq -0x3c(%rbp), %rcx
leaq -0x48(%rbp), %r8
leaq -0xa9(%rip), %r9        # 0x2a390
callq 0x2a210
movl %eax, -0x4c(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x2a453
movq -0x38(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, -0x30(%rbp)
je 0x2a465
movq -0x48(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, -0x28(%rbp)
je 0x2a475
movl -0x3c(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movl -0x4c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/quicklist.c
// Function: quicklistPush
void quicklistPush(quicklist *quicklist, void *value, const size_t sz,
                   int where) {
    if (where == QUICKLIST_HEAD) {
        quicklistPushHead(quicklist, value, sz);
    } else if (where == QUICKLIST_TAIL) {
        quicklistPushTail(quicklist, value, sz);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x2a4c0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x28110
jmp 0x2a4d9
cmpl $-0x1, -0x1c(%rbp)
jne 0x2a4d7
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x28260
jmp 0x2a4d9
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl 0x1464cf(%rip), %eax    # 0x1736a0
movl %eax, -0x10(%rbp)
movl $0x5bd1e995, -0x14(%rbp) # imm = 0x5BD1E995
movl $0x18, -0x18(%rbp)
movl -0x10(%rbp), %eax
xorl -0xc(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpl $0x4, -0xc(%rbp)
jl 0x2d24c
movq -0x28(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
imull $0x5bd1e995, -0x2c(%rbp), %eax # imm = 0x5BD1E995
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
shrl $0x18, %eax
xorl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
imull $0x5bd1e995, -0x2c(%rbp), %eax # imm = 0x5BD1E995
movl %eax, -0x2c(%rbp)
imull $0x5bd1e995, -0x1c(%rbp), %eax # imm = 0x5BD1E995
movl %eax, -0x1c(%rbp)
movl -0x2c(%rbp), %eax
xorl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x28(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x28(%rbp)
movl -0xc(%rbp), %eax
subl $0x4, %eax
movl %eax, -0xc(%rbp)
jmp 0x2d1f3
movl -0xc(%rbp), %eax
movl %eax, -0x30(%rbp)
subl $0x1, %eax
je 0x2d28f
jmp 0x2d259
movl -0x30(%rbp), %eax
subl $0x2, %eax
je 0x2d27e
jmp 0x2d263
movl -0x30(%rbp), %eax
subl $0x3, %eax
jne 0x2d2a6
jmp 0x2d26d
movq -0x28(%rbp), %rax
movzbl 0x2(%rax), %eax
shll $0x10, %eax
xorl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x28(%rbp), %rax
movzbl 0x1(%rax), %eax
shll $0x8, %eax
xorl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
xorl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
imull $0x5bd1e995, -0x1c(%rbp), %eax # imm = 0x5BD1E995
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
shrl $0xd, %eax
xorl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
imull $0x5bd1e995, -0x1c(%rbp), %eax # imm = 0x5BD1E995
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
shrl $0xf, %eax
xorl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl 0x1463bb(%rip), %eax    # 0x1736a0
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0xc(%rbp)
cmpl $0x0, %eax
je 0x2d327
movl -0x10(%rbp), %eax
shll $0x5, %eax
addl -0x10(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movzbl (%rax), %edi
callq 0x26900
movl %eax, %ecx
movl -0x14(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x10(%rbp)
jmp 0x2d2e8
movl -0x10(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/dict.c
// Function: dictInit
int _dictInit(dict *d, dictType *type,
        void *privDataPtr)
{
    _dictReset(&d->ht[0]);
    _dictReset(&d->ht[1]);
    d->type = type;
    d->privdata = privDataPtr;
    d->rehashidx = -1;
    d->iterators = 0;
    return DICT_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
addq $0x10, %rdi
callq 0x2d7e0
movq -0x8(%rbp), %rdi
addq $0x10, %rdi
addq $0x20, %rdi
callq 0x2d7e0
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq $-0x1, 0x50(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x58(%rax)
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpl $0x0, 0x1462b1(%rip)    # 0x1736a4
je 0x2d400
movq -0x10(%rbp), %rax
cmpq $-0x1, 0x50(%rax)
je 0x2d409
movl $0x1, -0x4(%rbp)
jmp 0x2d431
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movl %eax, -0x14(%rbp)
cmpl $0x4, -0x14(%rbp)
jge 0x2d421
movl $0x4, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movslq -0x14(%rbp), %rsi
callq 0x2d440
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)