LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zslLastInRange
zskiplistNode *zslLastInRange(zskiplist *zsl, zrangespec *range) {
    zskiplistNode *x;
    int i;

    /* If everything is out of range, return early. */
    if (!zslIsInRange(zsl,range)) return NULL;

    x = zsl->header;
    for (i = zsl->level-1; i >= 0; i--) {
        /* Go forward while *IN* range. */
        while (x->level[i].forward &&
            zslValueLteMax(x->level[i].forward->score,range))
                x = x->level[i].forward;
    }

    /* This is an inner range, so this node cannot be NULL. */
    serverAssert(x != NULL);

    /* Check if score >= min. */
    if (!zslValueGteMin(x->score,range)) return NULL;
    return x;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x502f5
testl %eax, %eax
je 0x50492
movq (%r14), %rcx
movslq 0x18(%r14), %rax
testq %rax, %rax
jle 0x50496
movq %rax, %rdx
decq %rax
movq %rax, %rsi
shlq $0x4, %rsi
movq %rcx, %rdi
movq %rdi, %rcx
movq 0x18(%rdi,%rsi), %rdi
testq %rdi, %rdi
je 0x5048a
movsd 0x8(%rbx), %xmm0
xorl %r8d, %r8d
xorl %r9d, %r9d
ucomisd 0x8(%rdi), %xmm0
setbe %r8b
setb %r9b
cmpl $0x0, 0x14(%rbx)
cmovel %r9d, %r8d
cmpb $0x1, %r8b
jne 0x50457
cmpq $0x1, %rdx
jg 0x50447
jmp 0x5049b
xorl %eax, %eax
jmp 0x504bd
testq %rcx, %rcx
je 0x504c5
movsd 0x8(%rcx), %xmm0
xorl %edx, %edx
xorl %eax, %eax
ucomisd (%rbx), %xmm0
setbe %dl
setb %al
cmpl $0x0, 0x10(%rbx)
cmovel %eax, %edx
xorl %eax, %eax
testb %dl, %dl
cmoveq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x73213(%rip), %rdi     # 0xc36df
leaq 0x73203(%rip), %rsi     # 0xc36d6
movl $0x119, %edx            # imm = 0x119
callq 0x61908
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zslDeleteRangeByScore
unsigned long zslDeleteRangeByScore(zskiplist *zsl, zrangespec *range, dict *dict) {
    zskiplistNode *update[ZSKIPLIST_MAXLEVEL], *x;
    unsigned long removed = 0;
    int i;

    x = zsl->header;
    for (i = zsl->level-1; i >= 0; i--) {
        while (x->level[i].forward && (range->minex ?
            x->level[i].forward->score <= range->min :
            x->level[i].forward->score < range->min))
                x = x->level[i].forward;
        update[i] = x;
    }

    /* Current node is the last with score < or <= min. */
    x = x->level[0].forward;

    /* Delete nodes while in range. */
    while (x &&
           (range->maxex ? x->score < range->max : x->score <= range->max))
    {
        zskiplistNode *next = x->level[0].forward;
        zslDeleteNode(zsl,x,update);
        dictDelete(dict,x->obj);
        zslFreeNode(x);
        removed++;
        x = next;
    }
    return removed;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %rax
movslq 0x18(%rdi), %rcx
testq %rcx, %rcx
jle 0x5055f
movq %rcx, %rdx
decq %rcx
movq %rcx, %rsi
shlq $0x4, %rsi
movq 0x18(%rax,%rsi), %r9
testq %r9, %r9
je 0x50555
movl 0x10(%r14), %edi
movsd (%r14), %xmm0
movq %r9, %r8
movsd 0x8(%r9), %xmm1
testl %edi, %edi
je 0x50542
ucomisd %xmm1, %xmm0
jae 0x50548
jmp 0x50555
ucomisd %xmm1, %xmm0
jbe 0x50555
movq 0x18(%r8,%rsi), %r9
movq %r8, %rax
testq %r9, %r9
jne 0x5052d
movq %rax, (%rsp,%rcx,8)
cmpq $0x1, %rdx
jg 0x5050d
movq 0x18(%rax), %r13
xorl %r12d, %r12d
testq %r13, %r13
je 0x505c6
cmpl $0x0, 0x14(%r14)
movsd 0x8(%r13), %xmm0
movsd 0x8(%r14), %xmm1
je 0x50586
ucomisd %xmm0, %xmm1
ja 0x5058c
jmp 0x505c6
ucomisd %xmm0, %xmm1
jb 0x505c6
movq 0x18(%r13), %rbp
movq %r15, %rdi
movq %r13, %rsi
movq %rsp, %rdx
callq 0x5013f
movq (%r13), %rsi
movq %rbx, %rdi
callq 0x2ecb5
movq (%r13), %rdi
callq 0x40c8f
movq %r13, %rdi
callq 0x38413
incq %r12
movq %rbp, %r13
testq %rbp, %rbp
jne 0x5056b
movq %r12, %rax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zslDeleteRangeByLex
unsigned long zslDeleteRangeByLex(zskiplist *zsl, zlexrangespec *range, dict *dict) {
    zskiplistNode *update[ZSKIPLIST_MAXLEVEL], *x;
    unsigned long removed = 0;
    int i;


    x = zsl->header;
    for (i = zsl->level-1; i >= 0; i--) {
        while (x->level[i].forward &&
            !zslLexValueGteMin(x->level[i].forward->obj,range))
                x = x->level[i].forward;
        update[i] = x;
    }

    /* Current node is the last with score < or <= min. */
    x = x->level[0].forward;

    /* Delete nodes while in range. */
    while (x && zslLexValueLteMax(x->obj,range)) {
        zskiplistNode *next = x->level[0].forward;
        zslDeleteNode(zsl,x,update);
        dictDelete(dict,x->obj);
        zslFreeNode(x);
        removed++;
        x = next;
    }
    return removed;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rdx, 0x8(%rsp)
movq %rsi, %r14
movq (%rdi), %r12
movq %rdi, 0x10(%rsp)
movslq 0x18(%rdi), %rbp
testq %rbp, %rbp
jle 0x50683
movq %rbp, 0x18(%rsp)
decq %rbp
movq %rbp, %r13
shlq $0x4, %r13
movq 0x18(%r12,%r13), %rax
testq %rax, %rax
je 0x50676
movq (%rax), %rdi
movl 0x10(%r14), %r15d
movq (%r14), %rsi
callq 0x50a6f
cmpl $0x1, %r15d
movl $0x0, %ecx
sbbl %ecx, %ecx
cmpl %ecx, %eax
jg 0x50676
leaq (%r12,%r13), %r15
addq $0x18, %r15
movq (%r15), %r12
movq 0x18(%r12,%r13), %rax
testq %rax, %rax
je 0x50676
leaq (%r12,%r13), %r15
addq $0x18, %r15
movq (%rax), %rdi
movl 0x10(%r14), %ebx
movq (%r14), %rsi
callq 0x50a6f
cmpl $0x1, %ebx
movl $0x0, %ecx
sbbl %ecx, %ecx
cmpl %ecx, %eax
jle 0x50644
movq %r12, 0x20(%rsp,%rbp,8)
cmpq $0x1, 0x18(%rsp)
jg 0x50605
movq 0x18(%r12), %rbp
xorl %r12d, %r12d
testq %rbp, %rbp
je 0x506fc
leaq 0x20(%rsp), %r13
movq 0x8(%rsp), %r15
movq (%rbp), %rdi
movl 0x14(%r14), %ebx
movq 0x8(%r14), %rsi
callq 0x50a6f
movl %eax, %ecx
shrl $0x1f, %ecx
xorl %edx, %edx
testl %eax, %eax
setle %dl
testl %ebx, %ebx
cmovnel %ecx, %edx
testl %edx, %edx
je 0x506fc
movq 0x18(%rbp), %rbx
movq 0x10(%rsp), %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x5013f
movq (%rbp), %rsi
movq %r15, %rdi
callq 0x2ecb5
movq (%rbp), %rdi
callq 0x40c8f
movq %rbp, %rdi
callq 0x38413
incq %r12
movq %rbx, %rbp
testq %rbx, %rbx
jne 0x5069a
movq %r12, %rax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zslDeleteRangeByRank
unsigned long zslDeleteRangeByRank(zskiplist *zsl, unsigned int start, unsigned int end, dict *dict) {
    zskiplistNode *update[ZSKIPLIST_MAXLEVEL], *x;
    unsigned long traversed = 0, removed = 0;
    int i;

    x = zsl->header;
    for (i = zsl->level-1; i >= 0; i--) {
        while (x->level[i].forward && (traversed + x->level[i].span) < start) {
            traversed += x->level[i].span;
            x = x->level[i].forward;
        }
        update[i] = x;
    }

    traversed++;
    x = x->level[0].forward;
    while (x && traversed <= end) {
        zskiplistNode *next = x->level[0].forward;
        zslDeleteNode(zsl,x,update);
        dictDelete(dict,x->obj);
        zslFreeNode(x);
        removed++;
        traversed++;
        x = next;
    }
    return removed;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rcx, 0x8(%rsp)
movq %rdi, %r14
movq (%rdi), %rax
movslq 0x18(%rdi), %rcx
testq %rcx, %rcx
jle 0x5077f
movl %esi, %esi
xorl %r13d, %r13d
movq %rcx, %rdi
decq %rcx
movq %rcx, %r8
shlq $0x4, %r8
movq %r13, %r10
movq %rax, %r9
movq %r9, %rax
movq %r10, %r13
movq 0x18(%r9,%r8), %r9
testq %r9, %r9
je 0x50772
leaq (%rax,%r8), %r10
addq $0x18, %r10
movl 0x8(%r10), %r10d
addq %r13, %r10
cmpq %rsi, %r10
jb 0x5074e
movq %rax, 0x10(%rsp,%rcx,8)
cmpq $0x1, %rdi
jg 0x5073b
jmp 0x50782
xorl %r13d, %r13d
movq 0x18(%rax), %rbp
xorl %eax, %eax
testq %rbp, %rbp
je 0x507e4
movl %edx, %ebx
cmpq %rbx, %r13
jae 0x507e4
incq %r13
xorl %r15d, %r15d
movq %rbp, %r12
movq 0x18(%rbp), %rbp
movq %r14, %rdi
movq %r12, %rsi
leaq 0x10(%rsp), %rdx
callq 0x5013f
movq (%r12), %rsi
movq 0x8(%rsp), %rdi
callq 0x2ecb5
movq (%r12), %rdi
callq 0x40c8f
movq %r12, %rdi
callq 0x38413
leaq 0x1(%r15), %rax
testq %rbp, %rbp
je 0x507e4
addq %r13, %r15
cmpq %rbx, %r15
movq %rax, %r15
jb 0x5079a
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zslGetRank
unsigned long zslGetRank(zskiplist *zsl, double score, robj *o) {
    zskiplistNode *x;
    unsigned long rank = 0;
    int i;

    x = zsl->header;
    for (i = zsl->level-1; i >= 0; i--) {
        while (x->level[i].forward &&
            (x->level[i].forward->score < score ||
                (x->level[i].forward->score == score &&
                compareStringObjects(x->level[i].forward->obj,o) <= 0))) {
            rank += x->level[i].span;
            x = x->level[i].forward;
        }

        /* x might be equal to zsl->header, so test if obj is non-NULL */
        if (x->obj && equalStringObjects(x->obj,o)) {
            return rank;
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movslq 0x18(%rdi), %r15
testq %r15, %r15
jle 0x508b8
movq %rsi, %rbx
movq (%rdi), %r12
xorl %r14d, %r14d
movsd %xmm0, 0x8(%rsp)
leaq -0x1(%r15), %rbp
movq %rbp, 0x10(%rsp)
shlq $0x4, %rbp
movq 0x18(%r12,%rbp), %rax
testq %rax, %rax
je 0x5088e
leaq (%r12,%rbp), %r13
addq $0x18, %r13
movsd 0x8(%rax), %xmm1
ucomisd %xmm1, %xmm0
ja 0x5086b
ucomisd %xmm0, %xmm1
jne 0x5088e
jp 0x5088e
movq (%rax), %rdi
movq %rbx, %rsi
callq 0x41222
testl %eax, %eax
jg 0x50888
movq (%r13), %rax
movsd 0x8(%rsp), %xmm0
movq %rax, %r12
movl 0x8(%r13), %eax
addq %rax, %r14
leaq (%r12,%rbp), %r13
addq $0x18, %r13
movq (%r13), %rax
testq %rax, %rax
jne 0x5083f
jmp 0x5088e
movsd 0x8(%rsp), %xmm0
movq (%r12), %rdi
testq %rdi, %rdi
je 0x508a9
movq %rbx, %rsi
callq 0x41236
movsd 0x8(%rsp), %xmm0
testl %eax, %eax
jne 0x508bb
cmpq $0x1, %r15
movq 0x10(%rsp), %r15
jg 0x50820
xorl %r14d, %r14d
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zslGetElementByRank
zskiplistNode* zslGetElementByRank(zskiplist *zsl, unsigned long rank) {
    zskiplistNode *x;
    unsigned long traversed = 0;
    int i;

    x = zsl->header;
    for (i = zsl->level-1; i >= 0; i--) {
        while (x->level[i].forward && (traversed + x->level[i].span) <= rank)
        {
            traversed += x->level[i].span;
            x = x->level[i].forward;
        }
        if (traversed == rank) {
            return x;
        }
    }
    return NULL;
}

// Assembly:
movq (%rdi), %rax
movslq 0x18(%rdi), %rcx
xorl %edx, %edx
testq %rcx, %rcx
jle 0x50915
decq %rcx
movq %rcx, %rdi
shlq $0x4, %rdi
movq %rax, %r8
movq %rdx, %r9
movq %r9, %rdx
movq %r8, %rax
movq 0x18(%r8,%rdi), %r8
testq %r8, %r8
je 0x5090f
leaq (%rax,%rdi), %r9
addq $0x18, %r9
movl 0x8(%r9), %r9d
addq %rdx, %r9
cmpq %rsi, %r9
jbe 0x508eb
cmpq %rsi, %rdx
jne 0x508d6
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zslParseLexRangeItem
int zslParseLexRangeItem(robj *item, robj **dest, int *ex) {
    char *c = item->ptr;

    switch(c[0]) {
    case '+':
        if (c[1] != '\0') return C_ERR;
        *ex = 0;
        *dest = shared.maxstring;
        incrRefCount(shared.maxstring);
        return C_OK;
    case '-':
        if (c[1] != '\0') return C_ERR;
        *ex = 0;
        *dest = shared.minstring;
        incrRefCount(shared.minstring);
        return C_OK;
    case '(':
        *ex = 1;
        *dest = createStringObject(c+1,sdslen(c)-1);
        return C_OK;
    case '[':
        *ex = 0;
        *dest = createStringObject(c+1,sdslen(c)-1);
        return C_OK;
    default:
        return C_ERR;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x8(%rdi), %rax
movzbl (%rax), %ecx
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
cmpl $0x2c, %ecx
jg 0x50962
cmpl $0x28, %ecx
je 0x5099b
cmpl $0x2b, %ecx
jne 0x50a16
cmpb $0x0, 0x1(%rax)
jne 0x50a16
movl $0x0, (%rdx)
leaq 0xb19ba(%rip), %rax     # 0x102310
movq 0x158(%rax), %rdi
jmp 0x509e5
cmpl $0x2d, %ecx
je 0x509cb
cmpl $0x5b, %ecx
jne 0x50a16
movl $0x0, (%rdx)
leaq 0x1(%rax), %rdi
movzbl -0x1(%rax), %esi
movl %esi, %ecx
andl $0x7, %ecx
xorl %r14d, %r14d
cmpl $0x4, %ecx
ja 0x50a09
leaq 0x72bfe(%rip), %rdx     # 0xc3590
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl $0x1, (%rdx)
leaq 0x1(%rax), %rdi
movzbl -0x1(%rax), %esi
movl %esi, %ecx
andl $0x7, %ecx
xorl %r14d, %r14d
cmpl $0x4, %ecx
ja 0x50a09
leaq 0x72be7(%rip), %rdx     # 0xc35a4
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
shrl $0x3, %esi
jmp 0x50a0b
cmpb $0x0, 0x1(%rax)
jne 0x50a16
movl $0x0, (%rdx)
leaq 0xb1932(%rip), %rax     # 0x102310
movq 0x150(%rax), %rdi
movq %rdi, (%rbx)
callq 0x407a8
xorl %r14d, %r14d
jmp 0x50a16
movq -0x11(%rax), %rsi
jmp 0x50a0b
movzwl -0x5(%rax), %esi
jmp 0x50a0b
movl -0x9(%rax), %esi
jmp 0x50a0b
movzbl -0x3(%rax), %esi
jmp 0x50a0b
xorl %esi, %esi
decq %rsi
callq 0x40744
movq %rax, (%rbx)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zslIsInLexRange
int zslIsInLexRange(zskiplist *zsl, zlexrangespec *range) {
    zskiplistNode *x;

    /* Test for ranges that will always be empty. */
    if (compareStringObjectsForLexRange(range->min,range->max) > 1 ||
            (compareStringObjects(range->min,range->max) == 0 &&
            (range->minex || range->maxex)))
        return 0;
    x = zsl->tail;
    if (x == NULL || !zslLexValueGteMin(x->obj,range))
        return 0;
    x = zsl->header->level[0].forward;
    if (x == NULL || !zslLexValueLteMax(x->obj,range))
        return 0;
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rdi
movq 0x8(%rsi), %rsi
callq 0x50a6f
xorl %ebp, %ebp
cmpl $0x1, %eax
jg 0x50b48
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
callq 0x41222
testl %eax, %eax
je 0x50b3c
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x50b48
movq (%rax), %rdi
movl 0x10(%rbx), %r15d
movq (%rbx), %rsi
callq 0x50a6f
xorl %ebp, %ebp
cmpl $0x1, %r15d
movl $0x0, %ecx
sbbl %ecx, %ecx
cmpl %ecx, %eax
jle 0x50b48
movq (%r14), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x50b48
movq (%rax), %rdi
xorl %r14d, %r14d
cmpl $0x0, 0x14(%rbx)
sete %r14b
movq 0x8(%rbx), %rsi
callq 0x50a6f
xorl %ebp, %ebp
cmpl %r14d, %eax
setl %bpl
jmp 0x50b48
cmpl $0x0, 0x10(%rbx)
jne 0x50b48
cmpl $0x0, 0x14(%rbx)
je 0x50ae5
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zslFirstInLexRange
zskiplistNode *zslFirstInLexRange(zskiplist *zsl, zlexrangespec *range) {
    zskiplistNode *x;
    int i;

    /* If everything is out of range, return early. */
    if (!zslIsInLexRange(zsl,range)) return NULL;

    x = zsl->header;
    for (i = zsl->level-1; i >= 0; i--) {
        /* Go forward while *OUT* of range. */
        while (x->level[i].forward &&
            !zslLexValueGteMin(x->level[i].forward->obj,range))
                x = x->level[i].forward;
    }

    /* This is an inner range, so the next node cannot be NULL. */
    x = x->level[0].forward;
    serverAssert(x != NULL);

    /* Check if score <= max. */
    if (!zslLexValueLteMax(x->obj,range)) return NULL;
    return x;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x50ab5
testl %eax, %eax
je 0x50c2b
movq (%r14), %r15
movslq 0x18(%r14), %r12
testq %r12, %r12
jle 0x50bf8
leaq -0x1(%r12), %r13
movq %r13, (%rsp)
shlq $0x4, %r13
movq 0x18(%r15,%r13), %rax
testq %rax, %rax
je 0x50bee
movq (%rax), %rdi
movl 0x10(%rbx), %ebp
movq (%rbx), %rsi
callq 0x50a6f
cmpl $0x1, %ebp
movl $0x0, %ecx
sbbl %ecx, %ecx
cmpl %ecx, %eax
jg 0x50bee
leaq (%r15,%r13), %rbp
addq $0x18, %rbp
movq (%rbp), %r15
movq 0x18(%r15,%r13), %rax
testq %rax, %rax
je 0x50bee
leaq (%r15,%r13), %rbp
addq $0x18, %rbp
movq (%rax), %rdi
movl 0x10(%rbx), %r14d
movq (%rbx), %rsi
callq 0x50a6f
cmpl $0x1, %r14d
movl $0x0, %ecx
sbbl %ecx, %ecx
cmpl %ecx, %eax
jle 0x50bba
cmpq $0x1, %r12
movq (%rsp), %r12
jg 0x50b7f
movq 0x18(%r15), %r14
testq %r14, %r14
je 0x50c3c
movq (%r14), %rdi
movl 0x14(%rbx), %ebp
movq 0x8(%rbx), %rsi
callq 0x50a6f
movl %eax, %ecx
shrl $0x1f, %ecx
xorl %edx, %edx
testl %eax, %eax
setle %dl
testl %ebp, %ebp
cmovnel %ecx, %edx
xorl %eax, %eax
testl %edx, %edx
cmovneq %r14, %rax
jmp 0x50c2d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x72a9c(%rip), %rdi     # 0xc36df
leaq 0x72a8c(%rip), %rsi     # 0xc36d6
movl $0x257, %edx            # imm = 0x257
callq 0x61908
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zslLastInLexRange
zskiplistNode *zslLastInLexRange(zskiplist *zsl, zlexrangespec *range) {
    zskiplistNode *x;
    int i;

    /* If everything is out of range, return early. */
    if (!zslIsInLexRange(zsl,range)) return NULL;

    x = zsl->header;
    for (i = zsl->level-1; i >= 0; i--) {
        /* Go forward while *IN* range. */
        while (x->level[i].forward &&
            zslLexValueLteMax(x->level[i].forward->obj,range))
                x = x->level[i].forward;
    }

    /* This is an inner range, so this node cannot be NULL. */
    serverAssert(x != NULL);

    /* Check if score >= min. */
    if (!zslLexValueGteMin(x->obj,range)) return NULL;
    return x;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x50ab5
testl %eax, %eax
je 0x50d1e
movq (%r14), %r15
movslq 0x18(%r14), %r12
testq %r12, %r12
jle 0x50d22
leaq -0x1(%r12), %rcx
movq %rcx, %r13
shlq $0x4, %r13
movq 0x18(%r15,%r13), %rax
testq %rax, %rax
movq %rcx, (%rsp)
je 0x50d0e
movq (%rax), %rdi
movl 0x14(%rbx), %ebp
movq 0x8(%rbx), %rsi
callq 0x50a6f
movl %eax, %ecx
shrl $0x1f, %ecx
xorl %edx, %edx
testl %eax, %eax
setle %dl
testl %ebp, %ebp
cmovnel %ecx, %edx
testl %edx, %edx
je 0x50d0e
leaq (%r15,%r13), %rbp
addq $0x18, %rbp
movq (%rbp), %r15
movq 0x18(%r15,%r13), %rax
testq %rax, %rax
je 0x50d0e
leaq (%r15,%r13), %rbp
addq $0x18, %rbp
movq (%rax), %rdi
movl 0x14(%rbx), %r14d
movq 0x8(%rbx), %rsi
callq 0x50a6f
movl %eax, %ecx
shrl $0x1f, %ecx
xorl %edx, %edx
testl %eax, %eax
setle %dl
testl %r14d, %r14d
cmovnel %ecx, %edx
testl %edx, %edx
jne 0x50cd2
cmpq $0x1, %r12
movq (%rsp), %r12
jg 0x50c8c
jmp 0x50d27
xorl %ecx, %ecx
jmp 0x50d47
testq %r15, %r15
je 0x50d59
movq (%r15), %rdi
movl 0x10(%rbx), %ebp
movq (%rbx), %rsi
callq 0x50a6f
xorl %ecx, %ecx
cmpl $0x1, %ebp
movl $0x0, %edx
sbbl %edx, %edx
cmpl %edx, %eax
cmovgq %r15, %rcx
movq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7297f(%rip), %rdi     # 0xc36df
leaq 0x7296f(%rip), %rsi     # 0xc36d6
movl $0x270, %edx            # imm = 0x270
callq 0x61908
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zzlGetScore
double zzlGetScore(unsigned char *sptr) {
    unsigned char *vstr;
    unsigned int vlen;
    long long vlong;
    char buf[128];
    double score;

    serverAssert(sptr != NULL);
    serverAssert(ziplistGet(sptr,&vstr,&vlen,&vlong));

    if (vstr) {
        memcpy(buf,vstr,vlen);
        buf[vlen] = '\0';
        score = strtod(buf,NULL);
    } else {
        score = vlong;
    }

    return score;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xa8, %rsp
testq %rdi, %rdi
je 0x50de3
leaq 0x18(%rsp), %rsi
leaq 0xc(%rsp), %rdx
leaq 0x10(%rsp), %rcx
callq 0x3b7cf
testl %eax, %eax
je 0x50df8
movq 0x18(%rsp), %rsi
testq %rsi, %rsi
je 0x50dd1
movl 0xc(%rsp), %ebx
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rdx
callq 0x26c50
movb $0x0, 0x20(%rsp,%rbx)
movq %r14, %rdi
xorl %esi, %esi
callq 0x26cc0
jmp 0x50dd8
cvtsi2sdq 0x10(%rsp), %xmm0
addq $0xa8, %rsp
popq %rbx
popq %r14
retq
leaq 0x72c9c(%rip), %rdi     # 0xc3a86
leaq 0x728e5(%rip), %rsi     # 0xc36d6
movl $0x282, %edx            # imm = 0x282
jmp 0x50e0b
leaq 0x728ea(%rip), %rdi     # 0xc36e9
leaq 0x728d0(%rip), %rsi     # 0xc36d6
movl $0x283, %edx            # imm = 0x283
callq 0x61908
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: ziplistGetObject
robj *ziplistGetObject(unsigned char *sptr) {
    unsigned char *vstr;
    unsigned int vlen;
    long long vlong;

    serverAssert(sptr != NULL);
    serverAssert(ziplistGet(sptr,&vstr,&vlen,&vlong));

    if (vstr) {
        return createStringObject((char*)vstr,vlen);
    } else {
        return createStringObjectFromLongLong(vlong);
    }
}

// Assembly:
subq $0x18, %rsp
testq %rdi, %rdi
je 0x50e5f
leaq 0x10(%rsp), %rsi
leaq 0x4(%rsp), %rdx
leaq 0x8(%rsp), %rcx
callq 0x3b7cf
testl %eax, %eax
je 0x50e74
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x50e50
movl 0x4(%rsp), %esi
callq 0x40744
jmp 0x50e5a
movq 0x8(%rsp), %rdi
callq 0x40753
addq $0x18, %rsp
retq
leaq 0x72c20(%rip), %rdi     # 0xc3a86
leaq 0x72869(%rip), %rsi     # 0xc36d6
movl $0x298, %edx            # imm = 0x298
jmp 0x50e87
leaq 0x7286e(%rip), %rdi     # 0xc36e9
leaq 0x72854(%rip), %rsi     # 0xc36d6
movl $0x299, %edx            # imm = 0x299
callq 0x61908
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zzlCompareElements
int zzlCompareElements(unsigned char *eptr, unsigned char *cstr, unsigned int clen) {
    unsigned char *vstr;
    unsigned int vlen;
    long long vlong;
    unsigned char vbuf[32];
    int minlen, cmp;

    serverAssert(ziplistGet(eptr,&vstr,&vlen,&vlong));
    if (vstr == NULL) {
        /* Store string representation of long long in buf. */
        vlen = ll2string((char*)vbuf,sizeof(vbuf),vlong);
        vstr = vbuf;
    }

    minlen = (vlen < clen) ? vlen : clen;
    cmp = memcmp(vstr,cstr,minlen);
    if (cmp == 0) return vlen-clen;
    return cmp;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movl %edx, %ebp
movq %rsi, %rbx
leaq 0x10(%rsp), %rsi
leaq 0xc(%rsp), %rdx
leaq 0x18(%rsp), %rcx
callq 0x3b7cf
testl %eax, %eax
je 0x50f15
movq 0x10(%rsp), %r14
testq %r14, %r14
je 0x50ecd
movl 0xc(%rsp), %eax
jmp 0x50eed
movq 0x18(%rsp), %rdx
leaq 0x20(%rsp), %r14
movl $0x20, %esi
movq %r14, %rdi
callq 0x3ff83
movl %eax, 0xc(%rsp)
movq %r14, 0x10(%rsp)
movl %eax, %r15d
subl %ebp, %r15d
cmovbl %eax, %ebp
movslq %ebp, %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x269b0
testl %eax, %eax
cmovel %r15d, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x727f1(%rip), %rdi     # 0xc370d
leaq 0x727b3(%rip), %rsi     # 0xc36d6
movl $0x2aa, %edx            # imm = 0x2AA
callq 0x61908
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zzlNext
void zzlNext(unsigned char *zl, unsigned char **eptr, unsigned char **sptr) {
    unsigned char *_eptr, *_sptr;
    serverAssert(*eptr != NULL && *sptr != NULL);

    _eptr = ziplistNext(zl,*sptr);
    if (_eptr != NULL) {
        _sptr = ziplistNext(zl,_eptr);
        serverAssert(_sptr != NULL);
    } else {
        /* No next entry. */
        _sptr = NULL;
    }

    *eptr = _eptr;
    *sptr = _sptr;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpq $0x0, (%rsi)
je 0x50fa6
movq %rdx, %rbx
movq %rsi, %r14
movq (%rdx), %rsi
testq %rsi, %rsi
je 0x50fa6
movq %rdi, %r12
callq 0x3b745
movq %rax, %r15
testq %rax, %rax
je 0x50f92
movq %r12, %rdi
movq %r15, %rsi
callq 0x3b745
testq %rax, %rax
jne 0x50f94
leaq 0x727cc(%rip), %rdi     # 0xc3750
leaq 0x7274b(%rip), %rsi     # 0xc36d6
movl $0x2c4, %edx            # imm = 0x2C4
jmp 0x50fb9
xorl %eax, %eax
movq %r15, (%r14)
movq %rax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x72784(%rip), %rdi     # 0xc3731
leaq 0x72722(%rip), %rsi     # 0xc36d6
movl $0x2bf, %edx            # imm = 0x2BF
callq 0x61908
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zzlPrev
void zzlPrev(unsigned char *zl, unsigned char **eptr, unsigned char **sptr) {
    unsigned char *_eptr, *_sptr;
    serverAssert(*eptr != NULL && *sptr != NULL);

    _sptr = ziplistPrev(zl,*eptr);
    if (_sptr != NULL) {
        _eptr = ziplistPrev(zl,_sptr);
        serverAssert(_eptr != NULL);
    } else {
        /* No previous entry. */
        _eptr = NULL;
    }

    *eptr = _eptr;
    *sptr = _sptr;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq (%rsi), %rsi
testq %rsi, %rsi
je 0x5102d
movq %rdx, %rbx
cmpq $0x0, (%rdx)
je 0x5102d
movq %rdi, %r12
callq 0x3b76b
movq %rax, %r15
testq %rax, %rax
je 0x51019
movq %r12, %rdi
movq %r15, %rsi
callq 0x3b76b
testq %rax, %rax
jne 0x5101b
leaq 0x72753(%rip), %rdi     # 0xc375e
leaq 0x726c4(%rip), %rsi     # 0xc36d6
movl $0x2d7, %edx            # imm = 0x2D7
jmp 0x51040
xorl %eax, %eax
movq %rax, (%r14)
movq %r15, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x726fd(%rip), %rdi     # 0xc3731
leaq 0x7269b(%rip), %rsi     # 0xc36d6
movl $0x2d2, %edx            # imm = 0x2D2
callq 0x61908
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zzlIsInRange
int zzlIsInRange(unsigned char *zl, zrangespec *range) {
    unsigned char *p;
    double score;

    /* Test for ranges that will always be empty. */
    if (range->min > range->max ||
            (range->min == range->max && (range->minex || range->maxex)))
        return 0;

    p = ziplistIndex(zl,-1); /* Last score. */
    if (p == NULL) return 0; /* Empty sorted set */
    score = zzlGetScore(p);
    if (!zslValueGteMin(score,range))
        return 0;

    p = ziplistIndex(zl,1); /* First score. */
    serverAssert(p != NULL);
    score = zzlGetScore(p);
    if (!zslValueLteMax(score,range))
        return 0;

    return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movsd (%rsi), %xmm0
xorl %ebp, %ebp
ucomisd 0x8(%rsi), %xmm0
ja 0x510e4
movq %rsi, %rbx
movq %rdi, %r14
jne 0x5107a
jp 0x5107a
cmpl $0x0, 0x10(%rbx)
jne 0x510e4
cmpl $0x0, 0x14(%rbx)
jne 0x510e4
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x3b680
testq %rax, %rax
je 0x510e4
movq %rax, %rdi
callq 0x50d7b
xorl %eax, %eax
xorl %ecx, %ecx
ucomisd (%rbx), %xmm0
setbe %al
setb %cl
cmpl $0x0, 0x10(%rbx)
cmovel %ecx, %eax
testb %al, %al
jne 0x510e4
movq %r14, %rdi
movl $0x1, %esi
callq 0x3b680
testq %rax, %rax
je 0x510eb
movq %rax, %rdi
callq 0x50d7b
movsd 0x8(%rbx), %xmm1
xorl %eax, %eax
xorl %ecx, %ecx
ucomisd %xmm0, %xmm1
seta %al
setae %cl
cmpl $0x0, 0x14(%rbx)
cmovel %ecx, %eax
movzbl %al, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x7267a(%rip), %rdi     # 0xc376c
leaq 0x725dd(%rip), %rsi     # 0xc36d6
movl $0x2f3, %edx            # imm = 0x2F3
callq 0x61908
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zzlFirstInRange
unsigned char *zzlFirstInRange(unsigned char *zl, zrangespec *range) {
    unsigned char *eptr = ziplistIndex(zl,0), *sptr;
    double score;

    /* If everything is out of range, return early. */
    if (!zzlIsInRange(zl,range)) return NULL;

    while (eptr != NULL) {
        sptr = ziplistNext(zl,eptr);
        serverAssert(sptr != NULL);

        score = zzlGetScore(sptr);
        if (zslValueGteMin(score,range)) {
            /* Check if score <= max. */
            if (zslValueLteMax(score,range))
                return eptr;
            return NULL;
        }

        /* Move to next element. */
        eptr = ziplistNext(zl,sptr);
    }

    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r12
xorl %r15d, %r15d
xorl %esi, %esi
callq 0x3b680
movq %rax, %r14
movq %r12, %rdi
movq %rbx, %rsi
callq 0x5104f
testl %eax, %eax
sete %al
testq %r14, %r14
sete %cl
orb %al, %cl
jne 0x511b4
xorl %r15d, %r15d
movq %r12, %rdi
movq %r14, %rsi
callq 0x3b745
testq %rax, %rax
je 0x511c1
movq %rax, %r13
movq %rax, %rdi
callq 0x50d7b
xorl %eax, %eax
xorl %ecx, %ecx
ucomisd (%rbx), %xmm0
setbe %al
setb %cl
cmpl $0x0, 0x10(%rbx)
cmovel %ecx, %eax
testb %al, %al
je 0x5118f
movq %r12, %rdi
movq %r13, %rsi
callq 0x3b745
movq %rax, %r14
testq %rax, %rax
jne 0x51146
jmp 0x511b4
movsd 0x8(%rbx), %xmm1
xorl %eax, %eax
xorl %ecx, %ecx
ucomisd %xmm0, %xmm1
setbe %al
setb %cl
cmpl $0x0, 0x14(%rbx)
cmovel %ecx, %eax
xorl %ecx, %ecx
testb %al, %al
cmovneq %rcx, %r14
movq %r14, %r15
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x728be(%rip), %rdi     # 0xc3a86
leaq 0x72507(%rip), %rsi     # 0xc36d6
movl $0x306, %edx            # imm = 0x306
callq 0x61908
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zzlLastInRange
unsigned char *zzlLastInRange(unsigned char *zl, zrangespec *range) {
    unsigned char *eptr = ziplistIndex(zl,-2), *sptr;
    double score;

    /* If everything is out of range, return early. */
    if (!zzlIsInRange(zl,range)) return NULL;

    while (eptr != NULL) {
        sptr = ziplistNext(zl,eptr);
        serverAssert(sptr != NULL);

        score = zzlGetScore(sptr);
        if (zslValueLteMax(score,range)) {
            /* Check if score >= min. */
            if (zslValueGteMin(score,range))
                return eptr;
            return NULL;
        }

        /* Move to previous element by moving to the score of previous element.
         * When this returns NULL, we know there also is no element. */
        sptr = ziplistPrev(zl,eptr);
        if (sptr != NULL)
            serverAssert((eptr = ziplistPrev(zl,sptr)) != NULL);
        else
            eptr = NULL;
    }

    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x3b680
movq %rax, %rbx
movq %r15, %rdi
movq %r14, %rsi
callq 0x5104f
testl %eax, %eax
sete %al
testq %rbx, %rbx
sete %cl
orb %al, %cl
je 0x5121c
xorl %ebx, %ebx
jmp 0x512af
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3b745
testq %rax, %rax
je 0x512b8
movq %rax, %rdi
callq 0x50d7b
movsd 0x8(%r14), %xmm1
xorl %eax, %eax
xorl %ecx, %ecx
ucomisd %xmm0, %xmm1
setbe %al
setb %cl
cmpl $0x0, 0x14(%r14)
cmovel %ecx, %eax
testb %al, %al
je 0x51290
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3b76b
testq %rax, %rax
je 0x51215
movq %r15, %rdi
movq %rax, %rsi
callq 0x3b76b
movq %rax, %rbx
testq %rax, %rax
jne 0x5121c
leaq 0x724f4(%rip), %rdi     # 0xc3776
leaq 0x7244d(%rip), %rsi     # 0xc36d6
movl $0x330, %edx            # imm = 0x330
jmp 0x512cb
xorl %eax, %eax
xorl %ecx, %ecx
ucomisd (%r14), %xmm0
setbe %al
setb %cl
cmpl $0x0, 0x10(%r14)
cmovel %ecx, %eax
xorl %ecx, %ecx
testb %al, %al
cmovneq %rcx, %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x727c7(%rip), %rdi     # 0xc3a86
leaq 0x72410(%rip), %rsi     # 0xc36d6
movl $0x322, %edx            # imm = 0x322
callq 0x61908
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zzlIsInLexRange
int zzlIsInLexRange(unsigned char *zl, zlexrangespec *range) {
    unsigned char *p;

    /* Test for ranges that will always be empty. */
    if (compareStringObjectsForLexRange(range->min,range->max) > 1 ||
            (compareStringObjects(range->min,range->max) == 0 &&
            (range->minex || range->maxex)))
        return 0;

    p = ziplistIndex(zl,-2); /* Last element. */
    if (p == NULL) return 0;
    if (!zzlLexValueGteMin(p,range))
        return 0;

    p = ziplistIndex(zl,0); /* First element. */
    serverAssert(p != NULL);
    if (!zzlLexValueLteMax(p,range))
        return 0;

    return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rdi
movq 0x8(%rsi), %rsi
callq 0x50a6f
cmpl $0x1, %eax
jg 0x51350
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
callq 0x41222
testl %eax, %eax
je 0x51344
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x3b680
testq %rax, %rax
je 0x51350
movq %rax, %rdi
movq %rbx, %rsi
callq 0x5137c
testl %eax, %eax
je 0x51350
movq %r14, %rdi
xorl %esi, %esi
callq 0x3b680
testq %rax, %rax
je 0x5135a
movq %rax, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x513b6
cmpl $0x0, 0x10(%rbx)
jne 0x51350
cmpl $0x0, 0x14(%rbx)
je 0x51305
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x7240b(%rip), %rdi     # 0xc376c
leaq 0x7236e(%rip), %rsi     # 0xc36d6
movl $0x357, %edx            # imm = 0x357
callq 0x61908
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zzlLexValueGteMin
static int zzlLexValueGteMin(unsigned char *p, zlexrangespec *spec) {
    robj *value = ziplistGetObject(p);
    int res = zslLexValueGteMin(value,spec);
    decrRefCount(value);
    return res;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
callq 0x50e1a
movq %rax, %r14
movl 0x10(%rbx), %ebp
movq (%rbx), %rsi
movq %rax, %rdi
callq 0x50a6f
xorl %ecx, %ecx
cmpl $0x1, %ebp
sbbl %ecx, %ecx
xorl %ebx, %ebx
cmpl %ecx, %eax
setg %bl
movq %r14, %rdi
callq 0x40c8f
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zzlLexValueLteMax
static int zzlLexValueLteMax(unsigned char *p, zlexrangespec *spec) {
    robj *value = ziplistGetObject(p);
    int res = zslLexValueLteMax(value,spec);
    decrRefCount(value);
    return res;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
callq 0x50e1a
movq %rax, %r14
movl 0x14(%rbx), %ebp
movq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x50a6f
movl %eax, %ecx
shrl $0x1f, %ecx
xorl %ebx, %ebx
testl %eax, %eax
setle %bl
testl %ebp, %ebp
cmovnel %ecx, %ebx
movq %r14, %rdi
callq 0x40c8f
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zzlFirstInLexRange
unsigned char *zzlFirstInLexRange(unsigned char *zl, zlexrangespec *range) {
    unsigned char *eptr = ziplistIndex(zl,0), *sptr;

    /* If everything is out of range, return early. */
    if (!zzlIsInLexRange(zl,range)) return NULL;

    while (eptr != NULL) {
        if (zzlLexValueGteMin(eptr,range)) {
            /* Check if score <= max. */
            if (zzlLexValueLteMax(eptr,range))
                return eptr;
            return NULL;
        }

        /* Move to next element. */
        sptr = ziplistNext(zl,eptr); /* This element score. Skip it. */
        serverAssert(sptr != NULL);
        eptr = ziplistNext(zl,sptr); /* Next element. */
    }

    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
xorl %ebx, %ebx
xorl %esi, %esi
callq 0x3b680
movq %rax, %r12
movq %r15, %rdi
movq %r14, %rsi
callq 0x512da
testl %eax, %eax
sete %al
testq %r12, %r12
sete %cl
orb %al, %cl
jne 0x51471
xorl %ebx, %ebx
movq %r12, %rdi
movq %r14, %rsi
callq 0x5137c
testl %eax, %eax
jne 0x5145e
movq %r15, %rdi
movq %r12, %rsi
callq 0x3b745
testq %rax, %rax
je 0x51480
movq %r15, %rdi
movq %rax, %rsi
callq 0x3b745
movq %rax, %r12
testq %rax, %rax
jne 0x5142a
jmp 0x51471
movq %r12, %rdi
movq %r14, %rsi
callq 0x513b6
xorl %ebx, %ebx
testl %eax, %eax
cmovneq %r12, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x725ff(%rip), %rdi     # 0xc3a86
leaq 0x72248(%rip), %rsi     # 0xc36d6
movl $0x370, %edx            # imm = 0x370
callq 0x61908
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zzlLastInLexRange
unsigned char *zzlLastInLexRange(unsigned char *zl, zlexrangespec *range) {
    unsigned char *eptr = ziplistIndex(zl,-2), *sptr;

    /* If everything is out of range, return early. */
    if (!zzlIsInLexRange(zl,range)) return NULL;

    while (eptr != NULL) {
        if (zzlLexValueLteMax(eptr,range)) {
            /* Check if score >= min. */
            if (zzlLexValueGteMin(eptr,range))
                return eptr;
            return NULL;
        }

        /* Move to previous element by moving to the score of previous element.
         * When this returns NULL, we know there also is no element. */
        sptr = ziplistPrev(zl,eptr);
        if (sptr != NULL)
            serverAssert((eptr = ziplistPrev(zl,sptr)) != NULL);
        else
            eptr = NULL;
    }

    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x3b680
movq %rax, %r12
movq %r14, %rdi
movq %rbx, %rsi
callq 0x512da
testl %eax, %eax
sete %al
testq %r12, %r12
sete %cl
xorl %r15d, %r15d
orb %al, %cl
jne 0x51542
movq %r12, %rdi
movq %rbx, %rsi
callq 0x513b6
testl %eax, %eax
jne 0x5152e
movq %r14, %rdi
movq %r12, %rsi
callq 0x3b76b
testq %rax, %rax
je 0x51542
movq %r14, %rdi
movq %rax, %rsi
callq 0x3b76b
movq %rax, %r12
testq %rax, %rax
jne 0x514da
leaq 0x72263(%rip), %rdi     # 0xc3776
leaq 0x721bc(%rip), %rsi     # 0xc36d6
movl $0x38b, %edx            # imm = 0x38B
callq 0x61908
movl $0x1, %edi
callq 0x263c0
movq %r12, %rdi
movq %rbx, %rsi
callq 0x5137c
xorl %r15d, %r15d
testl %eax, %eax
cmovneq %r12, %r15
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zzlFind
unsigned char *zzlFind(unsigned char *zl, robj *ele, double *score) {
    unsigned char *eptr = ziplistIndex(zl,0), *sptr;

    ele = getDecodedObject(ele);
    while (eptr != NULL) {
        sptr = ziplistNext(zl,eptr);
        serverAssertWithInfo(NULL,ele,sptr != NULL);

        if (ziplistCompare(eptr,ele->ptr,sdslen(ele->ptr))) {
            /* Matching element, pull out score. */
            if (score != NULL) *score = zzlGetScore(sptr);
            decrRefCount(ele);
            return eptr;
        }

        /* Move to next element. */
        eptr = ziplistNext(zl,sptr);
    }

    decrRefCount(ele);
    return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
xorl %esi, %esi
callq 0x3b680
movq %rax, %r15
movq %r14, %rdi
callq 0x41026
movq %rax, %r14
testq %r15, %r15
je 0x515f6
leaq 0x72046(%rip), %rbp     # 0xc35cc
movq %r12, %rdi
movq %r15, %rsi
callq 0x3b745
testq %rax, %rax
je 0x5162e
movq %rax, %r13
movq 0x8(%r14), %rsi
movzbl -0x1(%rsi), %edx
movl %edx, %eax
andl $0x7, %eax
cmpl $0x4, %eax
ja 0x515d5
movslq (%rbp,%rax,4), %rax
addq %rbp, %rax
jmpq *%rax
shrl $0x3, %edx
jmp 0x515d7
movq -0x11(%rsi), %rdx
jmp 0x515d7
movzwl -0x5(%rsi), %edx
jmp 0x515d7
movl -0x9(%rsi), %edx
jmp 0x515d7
movzbl -0x3(%rsi), %edx
jmp 0x515d7
xorl %edx, %edx
movq %r15, %rdi
callq 0x3b8e6
testl %eax, %eax
jne 0x51603
movq %r12, %rdi
movq %r13, %rsi
callq 0x3b745
movq %rax, %r15
testq %rax, %rax
jne 0x51586
movq %r14, %rdi
callq 0x40c8f
xorl %r15d, %r15d
jmp 0x5161c
testq %rbx, %rbx
je 0x51614
movq %r13, %rdi
callq 0x50d7b
movsd %xmm0, (%rbx)
movq %r14, %rdi
callq 0x40c8f
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x72451(%rip), %rdx     # 0xc3a86
leaq 0x7209a(%rip), %rcx     # 0xc36d6
xorl %edi, %edi
movq %r14, %rsi
movl $0x399, %r8d            # imm = 0x399
callq 0x627c3
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zzlDelete
unsigned char *zzlDelete(unsigned char *zl, unsigned char *eptr) {
    unsigned char *p = eptr;

    /* TODO: add function to ziplist API to delete N elements from offset. */
    zl = ziplistDelete(zl,&p);
    zl = ziplistDelete(zl,&p);
    return zl;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0x8(%rsp), %rbx
movq %rsi, (%rbx)
movq %rbx, %rsi
callq 0x3b88c
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3b88c
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zzlInsertAt
unsigned char *zzlInsertAt(unsigned char *zl, unsigned char *eptr, robj *ele, double score) {
    unsigned char *sptr;
    char scorebuf[128];
    int scorelen;
    size_t offset;

    serverAssertWithInfo(NULL,ele,sdsEncodedObject(ele));
    scorelen = d2string(scorebuf,sizeof(scorebuf),score);
    if (eptr == NULL) {
        zl = ziplistPush(zl,ele->ptr,sdslen(ele->ptr),ZIPLIST_TAIL);
        zl = ziplistPush(zl,(unsigned char*)scorebuf,scorelen,ZIPLIST_TAIL);
    } else {
        /* Keep offset relative to zl, as it might be re-allocated. */
        offset = eptr-zl;
        zl = ziplistInsert(zl,eptr,ele->ptr,sdslen(ele->ptr));
        eptr = zl+offset;

        /* Insert score after the element. */
        serverAssertWithInfo(NULL,ele,(sptr = ziplistNext(zl,eptr)) != NULL);
        zl = ziplistInsert(zl,sptr,(unsigned char*)scorebuf,scorelen);
    }

    return zl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rdx, %r15
movl (%rdx), %eax
shrl $0x4, %eax
testb $0x7, %al
jne 0x517ba
movq %rsi, %r12
movq %rdi, %r14
movq %rsp, %rdi
movl $0x80, %esi
callq 0x4019d
movl %eax, %ebx
testq %r12, %r12
je 0x516e3
movq %r12, %r13
subq %r14, %r13
movq 0x8(%r15), %rdx
movzbl -0x1(%rdx), %ecx
movl %ecx, %eax
andl $0x7, %eax
cmpl $0x4, %eax
ja 0x51721
leaq 0x71f0b(%rip), %rsi     # 0xc35e0
movslq (%rsi,%rax,4), %rax
addq %rsi, %rax
jmpq *%rax
shrl $0x3, %ecx
jmp 0x51723
movq 0x8(%r15), %rsi
movzbl -0x1(%rsi), %edx
movl %edx, %eax
andl $0x7, %eax
cmpl $0x4, %eax
ja 0x5176d
leaq 0x71ef8(%rip), %rcx     # 0xc35f4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
shrl $0x3, %edx
jmp 0x5176f
movq -0x11(%rdx), %rcx
jmp 0x51723
movzwl -0x5(%rdx), %ecx
jmp 0x51723
movl -0x9(%rdx), %ecx
jmp 0x51723
movzbl -0x3(%rdx), %ecx
jmp 0x51723
xorl %ecx, %ecx
movq %r14, %rdi
movq %r12, %rsi
callq 0x3b887
movq %rax, %r14
addq %rax, %r13
movq %rax, %rdi
movq %r13, %rsi
callq 0x3b745
testq %rax, %rax
je 0x5179f
movq %rsp, %rdx
movq %r14, %rdi
movq %rax, %rsi
movl %ebx, %ecx
callq 0x3b887
jmp 0x5178e
movq -0x11(%rsi), %rdx
jmp 0x5176f
movzwl -0x5(%rsi), %edx
jmp 0x5176f
movl -0x9(%rsi), %edx
jmp 0x5176f
movzbl -0x3(%rsi), %edx
jmp 0x5176f
xorl %edx, %edx
movq %r14, %rdi
movl $0x1, %ecx
callq 0x3b65e
movq %rsp, %rsi
movq %rax, %rdi
movl %ebx, %edx
movl $0x1, %ecx
callq 0x3b65e
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x7200c(%rip), %rdx     # 0xc37b2
leaq 0x71f29(%rip), %rcx     # 0xc36d6
xorl %edi, %edi
movq %r15, %rsi
movl $0x3c7, %r8d            # imm = 0x3C7
jmp 0x517d3
leaq 0x71fdb(%rip), %rdx     # 0xc379c
leaq 0x71f0e(%rip), %rcx     # 0xc36d6
xorl %edi, %edi
movq %r15, %rsi
movl $0x3bb, %r8d            # imm = 0x3BB
callq 0x627c3
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zzlInsert
unsigned char *zzlInsert(unsigned char *zl, robj *ele, double score) {
    unsigned char *eptr = ziplistIndex(zl,0), *sptr;
    double s;

    ele = getDecodedObject(ele);
    while (eptr != NULL) {
        sptr = ziplistNext(zl,eptr);
        serverAssertWithInfo(NULL,ele,sptr != NULL);
        s = zzlGetScore(sptr);

        if (s > score) {
            /* First element with score larger than score for element to be
             * inserted. This means we should take its spot in the list to
             * maintain ordering. */
            zl = zzlInsertAt(zl,eptr,ele,score);
            break;
        } else if (s == score) {
            /* Ensure lexicographical ordering for elements. */
            if (zzlCompareElements(eptr,ele->ptr,sdslen(ele->ptr)) > 0) {
                zl = zzlInsertAt(zl,eptr,ele,score);
                break;
            }
        }

        /* Move to next element. */
        eptr = ziplistNext(zl,sptr);
    }

    /* Push on tail of list when it was not yet inserted. */
    if (eptr == NULL)
        zl = zzlInsertAt(zl,NULL,ele,score);

    decrRefCount(ele);
    return zl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movsd %xmm0, 0x8(%rsp)
movq %rsi, %rbx
movq %rdi, %r14
xorl %esi, %esi
callq 0x3b680
movq %rax, %r15
movq %rbx, %rdi
callq 0x41026
movq %rax, %rbx
testq %r15, %r15
je 0x518a8
leaq 0x71de8(%rip), %r13     # 0xc3608
movq %r14, %rdi
movq %r15, %rsi
callq 0x3b745
testq %rax, %rax
je 0x518df
movq %rax, %r12
movq %rax, %rdi
callq 0x50d7b
ucomisd 0x8(%rsp), %xmm0
ja 0x518af
jne 0x51891
jp 0x51891
movq 0x8(%rbx), %rsi
movzbl -0x1(%rsi), %edx
movl %edx, %eax
andl $0x7, %eax
cmpl $0x4, %eax
ja 0x51883
movslq (%r13,%rax,4), %rax
addq %r13, %rax
jmpq *%rax
shrl $0x3, %edx
jmp 0x51885
movq -0x11(%rsi), %rdx
jmp 0x51885
movzwl -0x5(%rsi), %edx
jmp 0x51885
movl -0x9(%rsi), %edx
jmp 0x51885
movzbl -0x3(%rsi), %edx
jmp 0x51885
xorl %edx, %edx
movq %r15, %rdi
callq 0x50e96
testl %eax, %eax
jg 0x518af
movq %r14, %rdi
movq %r12, %rsi
callq 0x3b745
movq %rax, %r15
testq %rax, %rax
jne 0x51820
movq %r14, %rdi
xorl %esi, %esi
jmp 0x518b5
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movsd 0x8(%rsp), %xmm0
callq 0x5167c
movq %rax, %r14
movq %rbx, %rdi
callq 0x40c8f
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x721a0(%rip), %rdx     # 0xc3a86
leaq 0x71de9(%rip), %rcx     # 0xc36d6
xorl %edi, %edi
movq %rbx, %rsi
movl $0x3d7, %r8d            # imm = 0x3D7
callq 0x627c3
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zzlDeleteRangeByScore
unsigned char *zzlDeleteRangeByScore(unsigned char *zl, zrangespec *range, unsigned long *deleted) {
    unsigned char *eptr, *sptr;
    double score;
    unsigned long num = 0;

    if (deleted != NULL) *deleted = 0;

    eptr = zzlFirstInRange(zl,range);
    if (eptr == NULL) return zl;

    /* When the tail of the ziplist is deleted, eptr will point to the sentinel
     * byte and ziplistNext will return NULL. */
    while ((sptr = ziplistNext(zl,eptr)) != NULL) {
        score = zzlGetScore(sptr);
        if (zslValueLteMax(score,range)) {
            /* Delete both the element and the score. */
            zl = ziplistDelete(zl,&eptr);
            zl = ziplistDelete(zl,&eptr);
            num++;
        } else {
            /* No longer in range. */
            break;
        }
    }

    if (deleted != NULL) *deleted = num;
    return zl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
testq %rdx, %rdx
je 0x51929
movq $0x0, (%rbx)
movq %r14, %rdi
movq %r15, %rsi
callq 0x5110d
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x519b4
movq %r14, %rdi
movq %rax, %rsi
callq 0x3b745
xorl %r13d, %r13d
testq %rax, %rax
je 0x519ac
leaq 0x8(%rsp), %r12
movq %rax, %rdi
callq 0x50d7b
movsd 0x8(%r15), %xmm1
xorl %eax, %eax
xorl %ecx, %ecx
ucomisd %xmm0, %xmm1
setbe %al
setb %cl
cmpl $0x0, 0x14(%r15)
cmovel %ecx, %eax
testb %al, %al
jne 0x519ac
movq %r14, %rdi
movq %r12, %rsi
callq 0x3b88c
movq %rax, %rdi
movq %r12, %rsi
callq 0x3b88c
movq %rax, %r14
incq %r13
movq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x3b745
testq %rax, %rax
jne 0x51956
testq %rbx, %rbx
je 0x519b4
movq %r13, (%rbx)
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq