LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x48382
testl %eax, %eax
je 0x4846d
movq (%r14), %r15
movslq 0x18(%r14), %r14
testq %r14, %r14
jle 0x4844d
decq %r14
movq %r14, %r12
shlq $0x4, %r12
leaq (%r15,%r12), %r13
addq $0x18, %r13
movq (%r13), %rax
testq %rax, %rax
je 0x48418
movq (%rax), %rdi
movq %rbx, %rsi
callq 0x48073
testl %eax, %eax
jne 0x48418
movq (%r13), %r15
jmp 0x48427
movq 0x18(%r15), %r14
testq %r14, %r14
je 0x48479
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x48091
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
cmovneq %r14, %rax
jmp 0x4846f
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x6c6db(%rip), %rdi     # 0xb4b5b
leaq 0x6c6cb(%rip), %rsi     # 0xb4b52
movl $0x257, %edx            # imm = 0x257
callq 0x57ac8
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x48382
testl %eax, %eax
je 0x48509
movq (%r14), %r15
movslq 0x18(%r14), %r14
testq %r14, %r14
jle 0x484ed
decq %r14
movq %r14, %r12
shlq $0x4, %r12
leaq (%r15,%r12), %r13
addq $0x18, %r13
movq (%r13), %rax
testq %rax, %rax
je 0x484b8
movq (%rax), %rdi
movq %rbx, %rsi
callq 0x48091
testl %eax, %eax
je 0x484b8
movq (%r13), %r15
jmp 0x484c7
testq %r15, %r15
je 0x48515
movq (%r15), %rdi
movq %rbx, %rsi
callq 0x48073
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
cmovneq %r15, %rax
jmp 0x4850b
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x6c63f(%rip), %rdi     # 0xb4b5b
leaq 0x6c62f(%rip), %rsi     # 0xb4b52
movl $0x270, %edx            # imm = 0x270
callq 0x57ac8
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/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 0x4859d
leaq 0x18(%rsp), %rsi
leaq 0xc(%rsp), %rdx
leaq 0x10(%rsp), %rcx
callq 0x35be8
testl %eax, %eax
je 0x485b2
movq 0x18(%rsp), %rsi
testq %rsi, %rsi
je 0x4858b
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 0x48592
cvtsi2sdq 0x10(%rsp), %xmm0
addq $0xa8, %rsp
popq %rbx
popq %r14
retq
leaq 0x6c95e(%rip), %rdi     # 0xb4f02
leaq 0x6c5a7(%rip), %rsi     # 0xb4b52
movl $0x282, %edx            # imm = 0x282
jmp 0x485c5
leaq 0x6c5ac(%rip), %rdi     # 0xb4b65
leaq 0x6c592(%rip), %rsi     # 0xb4b52
movl $0x283, %edx            # imm = 0x283
callq 0x57ac8
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/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 0x48617
leaq 0x10(%rsp), %rsi
leaq 0x4(%rsp), %rdx
leaq 0x8(%rsp), %rcx
callq 0x35be8
testl %eax, %eax
je 0x4862c
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x48608
movl 0x4(%rsp), %esi
callq 0x39e29
jmp 0x48612
movq 0x8(%rsp), %rdi
callq 0x39e38
addq $0x18, %rsp
retq
leaq 0x6c8e4(%rip), %rdi     # 0xb4f02
leaq 0x6c52d(%rip), %rsi     # 0xb4b52
movl $0x298, %edx            # imm = 0x298
jmp 0x4863f
leaq 0x6c532(%rip), %rdi     # 0xb4b65
leaq 0x6c518(%rip), %rsi     # 0xb4b52
movl $0x299, %edx            # imm = 0x299
callq 0x57ac8
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/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 0x35be8
testl %eax, %eax
je 0x486c9
movq 0x10(%rsp), %r14
testq %r14, %r14
je 0x48683
movl 0xc(%rsp), %eax
jmp 0x486a1
movq 0x18(%rsp), %rdx
leaq 0x20(%rsp), %r14
pushq $0x20
popq %rsi
movq %r14, %rdi
callq 0x39796
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 0x6c4b9(%rip), %rdi     # 0xb4b89
leaq 0x6c47b(%rip), %rsi     # 0xb4b52
movl $0x2aa, %edx            # imm = 0x2AA
callq 0x57ac8
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/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 0x48758
movq %rdx, %rbx
movq %rsi, %r14
movq (%rdx), %rsi
testq %rsi, %rsi
je 0x48758
movq %rdi, %r12
callq 0x35b60
movq %rax, %r15
testq %rax, %rax
je 0x48744
movq %r12, %rdi
movq %r15, %rsi
callq 0x35b60
testq %rax, %rax
jne 0x48746
leaq 0x6c496(%rip), %rdi     # 0xb4bcc
leaq 0x6c415(%rip), %rsi     # 0xb4b52
movl $0x2c4, %edx            # imm = 0x2C4
jmp 0x4876b
xorl %eax, %eax
movq %r15, (%r14)
movq %rax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x6c44e(%rip), %rdi     # 0xb4bad
leaq 0x6c3ec(%rip), %rsi     # 0xb4b52
movl $0x2bf, %edx            # imm = 0x2BF
callq 0x57ac8
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/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 0x487dd
movq %rdx, %rbx
cmpq $0x0, (%rdx)
je 0x487dd
movq %rdi, %r12
callq 0x35b86
movq %rax, %r15
testq %rax, %rax
je 0x487c9
movq %r12, %rdi
movq %r15, %rsi
callq 0x35b86
testq %rax, %rax
jne 0x487cb
leaq 0x6c41f(%rip), %rdi     # 0xb4bda
leaq 0x6c390(%rip), %rsi     # 0xb4b52
movl $0x2d7, %edx            # imm = 0x2D7
jmp 0x487f0
xorl %eax, %eax
movq %rax, (%r14)
movq %r15, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x6c3c9(%rip), %rdi     # 0xb4bad
leaq 0x6c367(%rip), %rsi     # 0xb4b52
movl $0x2d2, %edx            # imm = 0x2D2
callq 0x57ac8
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/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 0x4888a
movq %rsi, %rbx
movq %rdi, %r14
jne 0x48824
jp 0x48824
cmpl $0x0, 0x10(%rbx)
jne 0x4888a
cmpl $0x0, 0x14(%rbx)
jne 0x4888a
pushq $-0x1
popq %rsi
movq %r14, %rdi
callq 0x35aca
testq %rax, %rax
je 0x4888a
movq %rax, %rdi
callq 0x48535
xorl %eax, %eax
xorl %ecx, %ecx
ucomisd (%rbx), %xmm0
setbe %al
setb %cl
cmpl $0x0, 0x10(%rbx)
cmovel %ecx, %eax
testb %al, %al
jne 0x4888a
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x35aca
testq %rax, %rax
je 0x48891
movq %rax, %rdi
callq 0x48535
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 0x6c350(%rip), %rdi     # 0xb4be8
leaq 0x6c2b3(%rip), %rsi     # 0xb4b52
movl $0x2f3, %edx            # imm = 0x2F3
callq 0x57ac8
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/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 %r14d, %r14d
xorl %esi, %esi
callq 0x35aca
movq %rax, %r15
movq %r12, %rdi
movq %rbx, %rsi
callq 0x487fd
testl %eax, %eax
je 0x4894d
xorl %r14d, %r14d
testq %r15, %r15
je 0x4894d
movq %r12, %rdi
movq %r15, %rsi
callq 0x35b60
testq %rax, %rax
je 0x4895a
movq %rax, %r13
movq %rax, %rdi
callq 0x48535
xorl %eax, %eax
xorl %ecx, %ecx
ucomisd (%rbx), %xmm0
setbe %al
setb %cl
cmpl $0x0, 0x10(%rbx)
cmovel %ecx, %eax
testb %al, %al
je 0x48928
movq %r12, %rdi
movq %r13, %rsi
callq 0x35b60
movq %rax, %r15
jmp 0x488df
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, %r15
movq %r15, %r14
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x6c5a1(%rip), %rdi     # 0xb4f02
leaq 0x6c1ea(%rip), %rsi     # 0xb4b52
movl $0x306, %edx            # imm = 0x306
callq 0x57ac8
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/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 %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
pushq $-0x2
popq %rsi
callq 0x35aca
movq %rax, %r14
movq %r15, %rdi
movq %rbx, %rsi
callq 0x487fd
xorl %r12d, %r12d
testl %eax, %eax
je 0x48a4a
testq %r14, %r14
je 0x48a4a
movq %r15, %rdi
movq %r14, %rsi
callq 0x35b60
testq %rax, %rax
je 0x48a59
movq %rax, %rdi
callq 0x48535
movsd 0x8(%rbx), %xmm1
xorl %eax, %eax
xorl %ecx, %ecx
ucomisd %xmm0, %xmm1
setbe %al
setb %cl
cmpl $0x0, 0x14(%rbx)
cmovel %ecx, %eax
testb %al, %al
je 0x48a2a
movq %r15, %rdi
movq %r14, %rsi
callq 0x35b86
movl $0x0, %r14d
testq %rax, %rax
je 0x489a9
movq %r15, %rdi
movq %rax, %rsi
callq 0x35b86
movq %rax, %r14
testq %rax, %rax
jne 0x489a9
leaq 0x6c1d6(%rip), %rdi     # 0xb4bf2
leaq 0x6c12f(%rip), %rsi     # 0xb4b52
movl $0x330, %edx            # imm = 0x330
jmp 0x48a6c
xorl %eax, %eax
xorl %ecx, %ecx
ucomisd (%rbx), %xmm0
setbe %al
setb %cl
cmpl $0x0, 0x10(%rbx)
cmovel %ecx, %eax
xorl %ecx, %ecx
testb %al, %al
cmovneq %rcx, %r14
movq %r14, %r12
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x6c4a2(%rip), %rdi     # 0xb4f02
leaq 0x6c0eb(%rip), %rsi     # 0xb4b52
movl $0x322, %edx            # imm = 0x322
callq 0x57ac8
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/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 0x48340
cmpl $0x1, %eax
jg 0x48aed
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
callq 0x3a702
testl %eax, %eax
je 0x48ae1
pushq $-0x2
popq %rsi
movq %r14, %rdi
callq 0x35aca
testq %rax, %rax
je 0x48aed
movq %rax, %rdi
movq %rbx, %rsi
callq 0x48b17
testl %eax, %eax
je 0x48aed
movq %r14, %rdi
xorl %esi, %esi
callq 0x35aca
testq %rax, %rax
je 0x48af7
movq %rax, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x48b45
cmpl $0x0, 0x10(%rbx)
jne 0x48aed
cmpl $0x0, 0x14(%rbx)
je 0x48aa4
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x6c0ea(%rip), %rdi     # 0xb4be8
leaq 0x6c04d(%rip), %rsi     # 0xb4b52
movl $0x357, %edx            # imm = 0x357
callq 0x57ac8
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
callq 0x485d2
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x48073
movl %eax, %ebx
movq %r14, %rdi
callq 0x3a265
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
callq 0x485d2
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x48091
movl %eax, %ebx
movq %r14, %rdi
callq 0x3a265
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x35aca
movq %rax, %r12
movq %r15, %rdi
movq %r14, %rsi
callq 0x48a79
testl %eax, %eax
je 0x48be5
xorl %ebx, %ebx
testq %r12, %r12
je 0x48be5
movq %r12, %rdi
movq %r14, %rsi
callq 0x48b17
testl %eax, %eax
jne 0x48bd2
movq %r15, %rdi
movq %r12, %rsi
callq 0x35b60
testq %rax, %rax
je 0x48bf4
movq %r15, %rdi
movq %rax, %rsi
callq 0x35b60
movq %rax, %r12
jmp 0x48b9e
movq %r12, %rdi
movq %r14, %rsi
callq 0x48b45
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 0x6c307(%rip), %rdi     # 0xb4f02
leaq 0x6bf50(%rip), %rsi     # 0xb4b52
movl $0x370, %edx            # imm = 0x370
callq 0x57ac8
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/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
pushq $-0x2
popq %rsi
callq 0x35aca
movq %rax, %r12
movq %r14, %rdi
movq %rbx, %rsi
callq 0x48a79
xorl %r15d, %r15d
testl %eax, %eax
je 0x48cb0
testq %r12, %r12
je 0x48cb0
movq %r12, %rdi
movq %rbx, %rsi
callq 0x48b45
testl %eax, %eax
jne 0x48c9c
movq %r14, %rdi
movq %r12, %rsi
callq 0x35b86
movl $0x0, %r12d
testq %rax, %rax
je 0x48c3f
movq %r14, %rdi
movq %rax, %rsi
callq 0x35b86
movq %rax, %r12
testq %rax, %rax
jne 0x48c3f
leaq 0x6bf6f(%rip), %rdi     # 0xb4bf2
leaq 0x6bec8(%rip), %rsi     # 0xb4b52
movl $0x38b, %edx            # imm = 0x38B
callq 0x57ac8
pushq $0x1
popq %rdi
callq 0x263c0
movq %r12, %rdi
movq %rbx, %rsi
callq 0x48b17
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_O2/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, %r15
movq %rdi, %r12
xorl %esi, %esi
callq 0x35aca
movq %rax, %r14
movq %r15, %rdi
callq 0x3a57d
movq %rax, %r15
testq %r14, %r14
je 0x48d3e
movq %r12, %rdi
movq %r14, %rsi
callq 0x35b60
testq %rax, %rax
je 0x48d58
movq %rax, %r13
movq 0x8(%r15), %rbp
movq %rbp, %rdi
callq 0x482f2
movq %r14, %rdi
movq %rbp, %rsi
movl %eax, %edx
callq 0x35cd0
testl %eax, %eax
jne 0x48d2d
movq %r12, %rdi
movq %r13, %rsi
callq 0x35b60
movq %rax, %r14
jmp 0x48ce8
testq %rbx, %rbx
je 0x48d3e
movq %r13, %rdi
callq 0x48535
movsd %xmm0, (%rbx)
movq %r15, %rdi
callq 0x3a265
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6c1a3(%rip), %rdx     # 0xb4f02
leaq 0x6bdec(%rip), %rcx     # 0xb4b52
xorl %edi, %edi
movq %r15, %rsi
movl $0x399, %r8d            # imm = 0x399
callq 0x588a4
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/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 0x35c78
movq %rax, %rdi
movq %rbx, %rsi
callq 0x35c78
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %rbx
movl (%rdx), %eax
shrl $0x4, %eax
testb $0x7, %al
jne 0x48e86
movq %rsi, %r15
movq %rdi, %r14
movq %rsp, %rdi
movl $0x80, %esi
callq 0x399a1
movl %eax, %ebp
testq %r15, %r15
je 0x48e29
movq %r15, %r12
subq %r14, %r12
movq 0x8(%rbx), %r13
movq %r13, %rdi
callq 0x482f2
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
movl %eax, %ecx
callq 0x35c73
movq %rax, %r14
addq %rax, %r12
movq %rax, %rdi
movq %r12, %rsi
callq 0x35b60
testq %rax, %rax
je 0x48e6b
movq %rsp, %rdx
movq %r14, %rdi
movq %rax, %rsi
movl %ebp, %ecx
callq 0x35c73
jmp 0x48e59
movq 0x8(%rbx), %rbx
movq %rbx, %rdi
callq 0x482f2
pushq $0x1
popq %r15
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %edx
movl %r15d, %ecx
callq 0x35aa8
movq %rsp, %rsi
movq %rax, %rdi
movl %ebp, %edx
movl %r15d, %ecx
callq 0x35aa8
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6bdbc(%rip), %rdx     # 0xb4c2e
leaq 0x6bcd9(%rip), %rcx     # 0xb4b52
xorl %edi, %edi
movq %rbx, %rsi
movl $0x3c7, %r8d            # imm = 0x3C7
jmp 0x48e9f
leaq 0x6bd8b(%rip), %rdx     # 0xb4c18
leaq 0x6bcbe(%rip), %rcx     # 0xb4b52
xorl %edi, %edi
movq %rbx, %rsi
movl $0x3bb, %r8d            # imm = 0x3BB
callq 0x588a4
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/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 0x35aca
movq %rax, %r15
movq %rbx, %rdi
callq 0x3a57d
movq %rax, %rbx
testq %r15, %r15
je 0x48f3b
movq %r14, %rdi
movq %r15, %rsi
callq 0x35b60
testq %rax, %rax
je 0x48f6a
movq %rax, %r12
movq %rax, %rdi
callq 0x48535
ucomisd 0x8(%rsp), %xmm0
ja 0x48f33
jne 0x48f23
jp 0x48f23
movq 0x8(%rbx), %r13
movq %r13, %rdi
callq 0x482f2
movq %r15, %rdi
movq %r13, %rsi
movl %eax, %edx
callq 0x4864c
testl %eax, %eax
jg 0x48f33
movq %r14, %rdi
movq %r12, %rsi
callq 0x35b60
movq %rax, %r15
jmp 0x48eda
movq %r14, %rdi
movq %r15, %rsi
jmp 0x48f40
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
movsd 0x8(%rsp), %xmm0
callq 0x48da4
movq %rax, %r14
movq %rbx, %rdi
callq 0x3a265
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x6bf91(%rip), %rdx     # 0xb4f02
leaq 0x6bbda(%rip), %rcx     # 0xb4b52
xorl %edi, %edi
movq %rbx, %rsi
movl $0x3d7, %r8d            # imm = 0x3D7
callq 0x588a4
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/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 0x48faf
andq $0x0, (%rbx)
movq %r14, %rdi
movq %r15, %rsi
callq 0x488b1
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x4902f
movq %rax, %rsi
xorl %r13d, %r13d
leaq 0x8(%rsp), %r12
movq %r14, %rdi
callq 0x35b60
testq %rax, %rax
je 0x49027
movq %rax, %rdi
callq 0x48535
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 0x49027
movq %r14, %rdi
movq %r12, %rsi
callq 0x35c78
movq %rax, %rdi
movq %r12, %rsi
callq 0x35c78
movq %rax, %r14
incq %r13
movq 0x8(%rsp), %rsi
jmp 0x48fcf
testq %rbx, %rbx
je 0x4902f
movq %r13, (%rbx)
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zzlDeleteRangeByLex
unsigned char *zzlDeleteRangeByLex(unsigned char *zl, zlexrangespec *range, unsigned long *deleted) {
    unsigned char *eptr, *sptr;
    unsigned long num = 0;

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

    eptr = zzlFirstInLexRange(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) {
        if (zzlLexValueLteMax(eptr,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 0x4905f
andq $0x0, (%rbx)
movq %r14, %rdi
movq %r15, %rsi
callq 0x48b73
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x490c8
movq %rax, %rsi
xorl %r13d, %r13d
leaq 0x8(%rsp), %r12
movq %r14, %rdi
callq 0x35b60
testq %rax, %rax
je 0x490c0
movq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x48b45
testl %eax, %eax
je 0x490c0
movq %r14, %rdi
movq %r12, %rsi
callq 0x35c78
movq %rax, %rdi
movq %r12, %rsi
callq 0x35c78
movq %rax, %r14
incq %r13
movq 0x8(%rsp), %rsi
jmp 0x4907f
testq %rbx, %rbx
je 0x490c8
movq %r13, (%rbx)
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zsetLength
unsigned int zsetLength(robj *zobj) {
    int length = -1;
    if (zobj->encoding == OBJ_ENCODING_ZIPLIST) {
        length = zzlLength(zobj->ptr);
    } else if (zobj->encoding == OBJ_ENCODING_SKIPLIST) {
        length = ((zset*)zobj->ptr)->zsl->length;
    } else {
        serverPanic("Unknown sorted set encoding");
    }
    return length;
}

// Assembly:
movl (%rdi), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x7, %eax
je 0x49110
cmpl $0x5, %eax
jne 0x4911c
movq 0x8(%rdi), %rdi
jmp 0x486e9
movq 0x8(%rdi), %rax
movq 0x8(%rax), %rax
movl 0x10(%rax), %eax
retq
pushq %rax
leaq 0x6947a(%rip), %rdi     # 0xb259e
leaq 0x6ba27(%rip), %rsi     # 0xb4b52
movl $0x440, %edx            # imm = 0x440
callq 0x57b45
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zsetConvertToZiplistIfNeeded
void zsetConvertToZiplistIfNeeded(robj *zobj, size_t maxelelen) {
    if (zobj->encoding == OBJ_ENCODING_ZIPLIST) return;
    zset *zset = zobj->ptr;

    if (zset->zsl->length <= server.zset_max_ziplist_entries &&
        maxelelen <= server.zset_max_ziplist_value)
            zsetConvert(zobj,OBJ_ENCODING_ZIPLIST);
}

// Assembly:
movl $0xf0, %eax
andl (%rdi), %eax
cmpl $0x50, %eax
jne 0x4941a
retq
movq 0x8(%rdi), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rcx
leaq 0xb047b(%rip), %rax     # 0xf98a8
cmpq 0x958(%rax), %rcx
ja 0x49419
cmpq %rsi, 0x960(%rax)
jb 0x49419
pushq $0x5
popq %rsi
jmp 0x4913d
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zsetScore
int zsetScore(robj *zobj, robj *member, double *score) {
    if (!zobj || !member) return C_ERR;

    if (zobj->encoding == OBJ_ENCODING_ZIPLIST) {
        if (zzlFind(zobj->ptr, member, score) == NULL) return C_ERR;
    } else if (zobj->encoding == OBJ_ENCODING_SKIPLIST) {
        zset *zs = zobj->ptr;
        dictEntry *de = dictFind(zs->dict, member);
        if (de == NULL) return C_ERR;
        *score = *(double*)dictGetVal(de);
    } else {
        serverPanic("Unknown sorted set encoding");
    }
    return C_OK;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
pushq $-0x1
popq %rbx
orb %al, %cl
jne 0x494a6
movq %rdx, %r14
movl (%rdi), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x7, %eax
je 0x49486
cmpl $0x5, %eax
jne 0x494b0
movq 0x8(%rdi), %rdi
movq %r14, %rdx
callq 0x48cbf
testq %rax, %rax
jne 0x494a4
jmp 0x494a6
movq 0x8(%rdi), %rax
movq (%rax), %rdi
callq 0x2a5f9
testq %rax, %rax
je 0x494a6
movq 0x8(%rax), %rax
movsd (%rax), %xmm0
movsd %xmm0, (%r14)
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x690e7(%rip), %rdi     # 0xb259e
leaq 0x6b694(%rip), %rsi     # 0xb4b52
movl $0x4ac, %edx            # imm = 0x4AC
callq 0x57b45
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zslParseRange
static int zslParseRange(robj *min, robj *max, zrangespec *spec) {
    char *eptr;
    spec->minex = spec->maxex = 0;

    /* Parse the min-max interval. If one of the values is prefixed
     * by the "(" character, it's considered "open". For instance
     * ZRANGEBYSCORE zset (1.5 (2.5 will match min < x < max
     * ZRANGEBYSCORE zset 1.5 2.5 will instead match min <= x <= max */
    if (min->encoding == OBJ_ENCODING_INT) {
        spec->min = (long)min->ptr;
    } else {
        if (((char*)min->ptr)[0] == '(') {
            spec->min = strtod((char*)min->ptr+1,&eptr);
            if (eptr[0] != '\0' || isnan(spec->min)) return C_ERR;
            spec->minex = 1;
        } else {
            spec->min = strtod((char*)min->ptr,&eptr);
            if (eptr[0] != '\0' || isnan(spec->min)) return C_ERR;
        }
    }
    if (max->encoding == OBJ_ENCODING_INT) {
        spec->max = (long)max->ptr;
    } else {
        if (((char*)max->ptr)[0] == '(') {
            spec->max = strtod((char*)max->ptr+1,&eptr);
            if (eptr[0] != '\0' || isnan(spec->max)) return C_ERR;
            spec->maxex = 1;
        } else {
            spec->max = strtod((char*)max->ptr,&eptr);
            if (eptr[0] != '\0' || isnan(spec->max)) return C_ERR;
        }
    }

    return C_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
andq $0x0, 0x10(%rdx)
movl $0xf0, %eax
andl (%rdi), %eax
movq %rsi, %r15
movq 0x8(%rdi), %rdi
pushq $-0x1
popq %rbx
cmpl $0x10, %eax
jne 0x4a0e4
cvtsi2sd %rdi, %xmm0
movsd %xmm0, (%r14)
movl $0xf0, %eax
andl (%r15), %eax
movq 0x8(%r15), %rdi
cmpl $0x10, %eax
jne 0x4a115
cvtsi2sd %rdi, %xmm0
movsd %xmm0, 0x8(%r14)
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
cmpb $0x28, (%rdi)
jne 0x4a146
incq %rdi
movq %rsp, %r12
movq %r12, %rsi
callq 0x26cc0
movsd %xmm0, (%r14)
movq (%r12), %rax
cmpb $0x0, (%rax)
jne 0x4a0d6
ucomisd %xmm0, %xmm0
jp 0x4a0d6
movl $0x1, 0x10(%r14)
jmp 0x4a0b8
cmpb $0x28, (%rdi)
jne 0x4a172
incq %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0x26cc0
movsd %xmm0, 0x8(%r14)
movq (%r15), %rax
cmpb $0x0, (%rax)
jne 0x4a0d6
ucomisd %xmm0, %xmm0
jp 0x4a0d6
movl $0x1, 0x14(%r14)
jmp 0x4a0d4
movq %rsp, %r12
movq %r12, %rsi
callq 0x26cc0
movsd %xmm0, (%r14)
movq (%r12), %rax
cmpb $0x0, (%rax)
jne 0x4a0d6
ucomisd %xmm0, %xmm0
jnp 0x4a0b8
jmp 0x4a0d6
movq %rsp, %r15
movq %r15, %rsi
callq 0x26cc0
movsd %xmm0, 0x8(%r14)
movq (%r15), %rax
cmpb $0x0, (%rax)
jne 0x4a0d6
ucomisd %xmm0, %xmm0
jnp 0x4a0d4
jmp 0x4a0d6
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zslParseLexRange
static int zslParseLexRange(robj *min, robj *max, zlexrangespec *spec) {
    /* The range can't be valid if objects are integer encoded.
     * Every item must start with ( or [. */
    if (min->encoding == OBJ_ENCODING_INT ||
        max->encoding == OBJ_ENCODING_INT) return C_ERR;

    spec->min = spec->max = NULL;
    if (zslParseLexRangeItem(min, &spec->min, &spec->minex) == C_ERR ||
        zslParseLexRangeItem(max, &spec->max, &spec->maxex) == C_ERR) {
        if (spec->min) decrRefCount(spec->min);
        if (spec->max) decrRefCount(spec->max);
        return C_ERR;
    } else {
        return C_OK;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl $0xf0, %eax
movl (%rdi), %ecx
andl %eax, %ecx
pushq $-0x1
popq %rbp
cmpl $0x10, %ecx
je 0x4a210
movq %rsi, %r15
andl (%rsi), %eax
cmpl $0x10, %eax
je 0x4a210
movq %rdx, %rbx
leaq 0x8(%rdx), %r14
addq $0x10, %rdx
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq %rbx, %rsi
callq 0x48266
cmpl $-0x1, %eax
je 0x4a1f6
leaq 0x14(%rbx), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x48266
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
jne 0x4a212
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x4a203
callq 0x3a265
movq (%r14), %rdi
testq %rdi, %rdi
je 0x4a210
callq 0x3a265
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zuiInitIterator
void zuiInitIterator(zsetopsrc *op) {
    if (op->subject == NULL)
        return;

    if (op->type == OBJ_SET) {
        iterset *it = &op->iter.set;
        if (op->encoding == OBJ_ENCODING_INTSET) {
            it->is.is = op->subject->ptr;
            it->is.ii = 0;
        } else if (op->encoding == OBJ_ENCODING_HT) {
            it->ht.dict = op->subject->ptr;
            it->ht.di = dictGetIterator(op->subject->ptr);
            it->ht.de = dictNext(it->ht.di);
        } else {
            serverPanic("Unknown set encoding");
        }
    } else if (op->type == OBJ_ZSET) {
        iterzset *it = &op->iter.zset;
        if (op->encoding == OBJ_ENCODING_ZIPLIST) {
            it->zl.zl = op->subject->ptr;
            it->zl.eptr = ziplistIndex(it->zl.zl,0);
            if (it->zl.eptr != NULL) {
                it->zl.sptr = ziplistNext(it->zl.zl,it->zl.eptr);
                serverAssert(it->zl.sptr != NULL);
            }
        } else if (op->encoding == OBJ_ENCODING_SKIPLIST) {
            it->sl.zs = op->subject->ptr;
            it->sl.node = it->sl.zs->zsl->header->level[0].forward;
        } else {
            serverPanic("Unknown sorted set encoding");
        }
    } else {
        serverPanic("Unsupported type");
    }
}

// Assembly:
pushq %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x4a309
movq %rdi, %rbx
movl 0x8(%rdi), %ecx
cmpl $0x3, %ecx
je 0x4a27b
cmpl $0x2, %ecx
jne 0x4a30b
movl 0xc(%rbx), %ecx
cmpl $0x2, %ecx
je 0x4a2ec
cmpl $0x6, %ecx
jne 0x4a335
movq 0x8(%rax), %rax
movq %rax, 0x18(%rbx)
andl $0x0, 0x20(%rbx)
jmp 0x4a309
movl 0xc(%rbx), %ecx
cmpl $0x7, %ecx
je 0x4a2d3
cmpl $0x5, %ecx
jne 0x4a320
movq 0x8(%rax), %rdi
movq %rdi, 0x18(%rbx)
xorl %esi, %esi
callq 0x35aca
movq %rax, 0x20(%rbx)
testq %rax, %rax
je 0x4a309
movq 0x18(%rbx), %rdi
movq %rax, %rsi
callq 0x35b60
movq %rax, 0x28(%rbx)
testq %rax, %rax
jne 0x4a309
leaq 0x6ab2d(%rip), %rdi     # 0xb4ded
leaq 0x6a88b(%rip), %rsi     # 0xb4b52
movl $0x685, %edx            # imm = 0x685
callq 0x57ac8
jmp 0x4a34d
movq 0x8(%rax), %rax
movq %rax, 0x18(%rbx)
movq 0x8(%rax), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq %rax, 0x20(%rbx)
jmp 0x4a309
movq 0x8(%rax), %rdi
movq %rdi, 0x18(%rbx)
callq 0x2a99f
movq %rax, 0x20(%rbx)
movq %rax, %rdi
callq 0x2a9d3
movq %rax, 0x28(%rbx)
popq %rbx
retq
leaq 0x6aaef(%rip), %rdi     # 0xb4e01
leaq 0x6a839(%rip), %rsi     # 0xb4b52
movl $0x68e, %edx            # imm = 0x68E
jmp 0x4a348
leaq 0x68277(%rip), %rdi     # 0xb259e
leaq 0x6a824(%rip), %rsi     # 0xb4b52
movl $0x68b, %edx            # imm = 0x68B
jmp 0x4a348
leaq 0x69dee(%rip), %rdi     # 0xb412a
leaq 0x6a80f(%rip), %rsi     # 0xb4b52
movl $0x67c, %edx            # imm = 0x67C
callq 0x57b45
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zuiClearIterator
void zuiClearIterator(zsetopsrc *op) {
    if (op->subject == NULL)
        return;

    if (op->type == OBJ_SET) {
        iterset *it = &op->iter.set;
        if (op->encoding == OBJ_ENCODING_INTSET) {
            UNUSED(it); /* skip */
        } else if (op->encoding == OBJ_ENCODING_HT) {
            dictReleaseIterator(it->ht.di);
        } else {
            serverPanic("Unknown set encoding");
        }
    } else if (op->type == OBJ_ZSET) {
        iterzset *it = &op->iter.zset;
        if (op->encoding == OBJ_ENCODING_ZIPLIST) {
            UNUSED(it); /* skip */
        } else if (op->encoding == OBJ_ENCODING_SKIPLIST) {
            UNUSED(it); /* skip */
        } else {
            serverPanic("Unknown sorted set encoding");
        }
    } else {
        serverPanic("Unsupported type");
    }
}

// Assembly:
pushq %rax
cmpq $0x0, (%rdi)
je 0x4a38b
movl 0x8(%rdi), %eax
cmpl $0x3, %eax
je 0x4a380
cmpl $0x2, %eax
jne 0x4a38d
movl 0xc(%rdi), %eax
cmpl $0x6, %eax
je 0x4a38b
cmpl $0x2, %eax
jne 0x4a3a2
movq 0x20(%rdi), %rdi
popq %rax
jmp 0x2aa94
movl 0xc(%rdi), %eax
orl $0x2, %eax
cmpl $0x7, %eax
jne 0x4a3b7
popq %rax
retq
leaq 0x6aa6d(%rip), %rdi     # 0xb4e01
leaq 0x6a7b7(%rip), %rsi     # 0xb4b52
movl $0x6a9, %edx            # imm = 0x6A9
jmp 0x4a3ca
leaq 0x69d81(%rip), %rdi     # 0xb412a
leaq 0x6a7a2(%rip), %rsi     # 0xb4b52
movl $0x69d, %edx            # imm = 0x69D
jmp 0x4a3ca
leaq 0x681e0(%rip), %rdi     # 0xb259e
leaq 0x6a78d(%rip), %rsi     # 0xb4b52
movl $0x6a6, %edx            # imm = 0x6A6
callq 0x57b45
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zuiLength
int zuiLength(zsetopsrc *op) {
    if (op->subject == NULL)
        return 0;

    if (op->type == OBJ_SET) {
        if (op->encoding == OBJ_ENCODING_INTSET) {
            return intsetLen(op->subject->ptr);
        } else if (op->encoding == OBJ_ENCODING_HT) {
            dict *ht = op->subject->ptr;
            return dictSize(ht);
        } else {
            serverPanic("Unknown set encoding");
        }
    } else if (op->type == OBJ_ZSET) {
        if (op->encoding == OBJ_ENCODING_ZIPLIST) {
            return zzlLength(op->subject->ptr);
        } else if (op->encoding == OBJ_ENCODING_SKIPLIST) {
            zset *zs = op->subject->ptr;
            return zs->zsl->length;
        } else {
            serverPanic("Unknown sorted set encoding");
        }
    } else {
        serverPanic("Unsupported type");
    }
}

// Assembly:
pushq %rax
movq (%rdi), %rax
testq %rax, %rax
je 0x4a404
movl 0x8(%rdi), %ecx
cmpl $0x3, %ecx
je 0x4a408
cmpl $0x2, %ecx
jne 0x4a438
movl 0xc(%rdi), %ecx
cmpl $0x2, %ecx
je 0x4a42c
cmpl $0x6, %ecx
jne 0x4a462
movq 0x8(%rax), %rdi
popq %rax
jmp 0x5a9d8
xorl %eax, %eax
jmp 0x4a436
movl 0xc(%rdi), %ecx
cmpl $0x7, %ecx
je 0x4a41f
cmpl $0x5, %ecx
jne 0x4a44d
movq 0x8(%rax), %rdi
popq %rax
jmp 0x486e9
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movl 0x10(%rax), %eax
jmp 0x4a436
movq 0x8(%rax), %rcx
movl 0x48(%rcx), %eax
addl 0x28(%rcx), %eax
popq %rcx
retq
leaq 0x6a9c2(%rip), %rdi     # 0xb4e01
leaq 0x6a70c(%rip), %rsi     # 0xb4b52
movl $0x6c4, %edx            # imm = 0x6C4
jmp 0x4a475
leaq 0x6814a(%rip), %rdi     # 0xb259e
leaq 0x6a6f7(%rip), %rsi     # 0xb4b52
movl $0x6c1, %edx            # imm = 0x6C1
jmp 0x4a475
leaq 0x69cc1(%rip), %rdi     # 0xb412a
leaq 0x6a6e2(%rip), %rsi     # 0xb4b52
movl $0x6b8, %edx            # imm = 0x6B8
callq 0x57b45
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zuiLongLongFromValue
int zuiLongLongFromValue(zsetopval *val) {
    if (!(val->flags & OPVAL_DIRTY_LL)) {
        val->flags |= OPVAL_DIRTY_LL;

        if (val->ele != NULL) {
            if (val->ele->encoding == OBJ_ENCODING_INT) {
                val->ell = (long)val->ele->ptr;
                val->flags |= OPVAL_VALID_LL;
            } else if (sdsEncodedObject(val->ele)) {
                if (string2ll(val->ele->ptr,sdslen(val->ele->ptr),&val->ell))
                    val->flags |= OPVAL_VALID_LL;
            } else {
                serverPanic("Unsupported element encoding");
            }
        } else if (val->estr != NULL) {
            if (string2ll((char*)val->estr,val->elen,&val->ell))
                val->flags |= OPVAL_VALID_LL;
        } else {
            /* The long long was already set, flag as valid. */
            val->flags |= OPVAL_VALID_LL;
        }
    }
    return val->flags & OPVAL_VALID_LL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl (%rdi), %eax
testb $0x2, %al
jne 0x4a6d9
movq %rdi, %rbx
movl %eax, %ecx
orl $0x2, %ecx
movl %ecx, (%rdi)
movq 0x28(%rdi), %rcx
testq %rcx, %rcx
je 0x4a6b2
movl (%rcx), %edx
shrl $0x4, %edx
andl $0xf, %edx
je 0x4a69a
cmpl $0x8, %edx
je 0x4a69a
cmpl $0x1, %edx
jne 0x4a6e4
movq 0x8(%rcx), %rcx
movq %rcx, 0x40(%rbx)
jmp 0x4a6d4
movq 0x8(%rcx), %r14
movq %r14, %rdi
callq 0x482f2
leaq 0x40(%rbx), %rdx
movq %r14, %rdi
movq %rax, %rsi
jmp 0x4a6c2
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x4a6d4
movl 0x38(%rbx), %esi
leaq 0x40(%rbx), %rdx
callq 0x39865
movl %eax, %ecx
movl (%rbx), %eax
testl %ecx, %ecx
je 0x4a6d9
orl $0x4, %eax
jmp 0x4a6d7
orl $0x6, %eax
movl %eax, (%rbx)
andl $0x4, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x6a761(%rip), %rdi     # 0xb4e4c
leaq 0x6a460(%rip), %rsi     # 0xb4b52
movl $0x713, %edx            # imm = 0x713
callq 0x57b45
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zuiObjectFromValue
robj *zuiObjectFromValue(zsetopval *val) {
    if (val->ele == NULL) {
        if (val->estr != NULL) {
            val->ele = createStringObject((char*)val->estr,val->elen);
        } else {
            val->ele = createStringObjectFromLongLong(val->ell);
        }
        val->flags |= OPVAL_DIRTY_ROBJ;
    }
    return val->ele;
}

// Assembly:
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x4a70e
retq
pushq %rbx
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
testq %rdi, %rdi
je 0x4a725
movl 0x38(%rbx), %esi
callq 0x39e29
jmp 0x4a72e
movq 0x40(%rbx), %rdi
callq 0x39e38
movq %rax, 0x28(%rbx)
orb $0x1, (%rbx)
popq %rbx
retq