LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_list.c
// Function: signalListAsReady
void signalListAsReady(redisDb *db, robj *key) {
    readyList *rl;

    /* No clients blocking for this key? No need to queue it. */
    if (dictFind(db->blocking_keys,key) == NULL) return;

    /* Key was already signaled? No need to queue it again. */
    if (dictFind(db->ready_keys,key) != NULL) return;

    /* Ok, we need to queue this key into server.ready_keys. */
    rl = zmalloc(sizeof(*rl));
    rl->key = key;
    rl->db = db;
    incrRefCount(key);
    listAddNodeTail(server.ready_keys,rl);

    /* We also add the key in the db->ready_keys dictionary in order
     * to avoid adding it multiple times into a list with a simple O(1)
     * check. */
    incrRefCount(key);
    serverAssert(dictAdd(db->ready_keys,key,NULL) == DICT_OK);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rdi), %rdi
callq 0x2a5f9
testq %rax, %rax
je 0x4564f
movq 0x18(%r14), %rdi
movq %rbx, %rsi
callq 0x2a5f9
testq %rax, %rax
jne 0x4564f
pushq $0x10
popq %rdi
callq 0x327b9
movq %rax, %r15
movq %rbx, 0x8(%rax)
movq %r14, (%rax)
movq %rbx, %rdi
callq 0x39e74
leaq 0xb4282(%rip), %rax     # 0xf98a8
movq 0x928(%rax), %rdi
movq %r15, %rsi
callq 0x26ecc
movq %rbx, %rdi
callq 0x39e74
movq 0x18(%r14), %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x2a3ed
testl %eax, %eax
jne 0x45655
popq %rbx
popq %r14
popq %r15
retq
leaq 0x6f36a(%rip), %rdi     # 0xb49c6
leaq 0x6f26d(%rip), %rsi     # 0xb48d0
movl $0x2c3, %edx            # imm = 0x2C3
callq 0x57ac8
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_list.c
// Function: brpoplpushCommand
void brpoplpushCommand(client *c) {
    mstime_t timeout;

    if (getTimeoutFromObjectOrReply(c,c->argv[3],&timeout,UNIT_SECONDS)
        != C_OK) return;

    robj *key = lookupKeyWrite(c->db, c->argv[1]);

    if (key == NULL) {
        if (c->flags & CLIENT_MULTI) {
            /* Blocking against an empty list in a multi state
             * returns immediately. */
            addReply(c, shared.nullbulk);
        } else {
            /* The list is empty and the client blocks. */
            blockForKeys(c, c->argv + 1, 1, timeout, c->argv[2]);
        }
    } else {
        if (key->type != OBJ_LIST) {
            addReply(c, shared.wrongtypeerr);
        } else {
            /* The list exists and has elements, so
             * the regular rpoplpushCommand is executed. */
            serverAssertWithInfo(c,key,listTypeLength(key) > 0);
            rpoplpushCommand(c);
        }
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movq 0x18(%rax), %rsi
movq %rsp, %rdx
xorl %ecx, %ecx
callq 0x7001c
testl %eax, %eax
jne 0x45c37
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
callq 0x3aec2
testq %rax, %rax
je 0x45bf1
movq %rax, %r14
movl (%rax), %eax
andl $0xf, %eax
cmpl $0x1, %eax
jne 0x45c17
movq %r14, %rdi
callq 0x4427e
testq %rax, %rax
je 0x45c3f
movq %rbx, %rdi
callq 0x452a2
jmp 0x45c37
testb $0x8, 0x98(%rbx)
jne 0x45c24
movq 0x40(%rbx), %rsi
movq (%rsp), %rcx
movq 0x10(%rsi), %r8
addq $0x8, %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0x453e9
jmp 0x45c37
leaq 0xb46f2(%rip), %rax     # 0xfa310
movq 0x70(%rax), %rsi
jmp 0x45c2f
leaq 0xb46e5(%rip), %rax     # 0xfa310
movq 0x50(%rax), %rsi
movq %rbx, %rdi
callq 0x36987
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x6edba(%rip), %rdx     # 0xb4a00
leaq 0x6ec83(%rip), %rcx     # 0xb48d0
movq %rbx, %rdi
movq %r14, %rsi
movl $0x3be, %r8d            # imm = 0x3BE
callq 0x588a4
pushq $0x1
popq %rdi
callq 0x263c0
nop
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_set.c
// Function: setTypeAdd
int setTypeAdd(robj *subject, robj *value) {
    long long llval;
    if (subject->encoding == OBJ_ENCODING_HT) {
        if (dictAdd(subject->ptr,value,NULL) == DICT_OK) {
            incrRefCount(value);
            return 1;
        }
    } else if (subject->encoding == OBJ_ENCODING_INTSET) {
        if (isObjectRepresentableAsLongLong(value,&llval) == C_OK) {
            uint8_t success = 0;
            subject->ptr = intsetAdd(subject->ptr,llval,&success);
            if (success) {
                /* Convert to regular set when the intset contains
                 * too many entries. */
                if (intsetLen(subject->ptr) > server.set_max_intset_entries)
                    setTypeConvert(subject,OBJ_ENCODING_HT);
                return 1;
            }
        } else {
            /* Failed to get integer from object, convert to regular set. */
            setTypeConvert(subject,OBJ_ENCODING_HT);

            /* The set *was* an intset and this value is not integer
             * encodable, so dictAdd should always work. */
            serverAssertWithInfo(NULL,value,
                                dictAdd(subject->ptr,value,NULL) == DICT_OK);
            incrRefCount(value);
            return 1;
        }
    } else {
        serverPanic("Unknown set encoding");
    }
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdi), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x6, %eax
je 0x45cba
cmpl $0x2, %eax
jne 0x45d4d
movq 0x8(%r14), %rdi
xorl %r14d, %r14d
movq %rbx, %rsi
xorl %edx, %edx
callq 0x2a3ed
testl %eax, %eax
jne 0x45cf4
jmp 0x45ce8
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x3a335
testl %eax, %eax
je 0x45cff
pushq $0x2
popq %rsi
movq %r14, %rdi
callq 0x45d89
movq 0x8(%r14), %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x2a3ed
testl %eax, %eax
jne 0x45d65
movq %rbx, %rdi
callq 0x39e74
pushq $0x1
popq %r14
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
leaq 0xf(%rsp), %rbx
movb $0x0, (%rbx)
movq 0x8(%r14), %rdi
movq 0x10(%rsp), %rsi
movq %rbx, %rdx
callq 0x5a65e
movq %rax, 0x8(%r14)
cmpb $0x0, (%rbx)
je 0x45d48
movq %rax, %rdi
callq 0x5a9d8
movl %eax, %eax
leaq 0xb3b76(%rip), %rcx     # 0xf98a8
cmpq %rax, 0x950(%rcx)
jae 0x45cf0
pushq $0x2
popq %rsi
movq %r14, %rdi
callq 0x45d89
jmp 0x45cf0
xorl %r14d, %r14d
jmp 0x45cf4
leaq 0x6e3d6(%rip), %rdi     # 0xb412a
leaq 0x6ece9(%rip), %rsi     # 0xb4a44
pushq $0x53
popq %rdx
callq 0x57b45
jmp 0x45d81
leaq 0x6ecac(%rip), %rdx     # 0xb4a18
leaq 0x6ecd1(%rip), %rcx     # 0xb4a44
pushq $0x4e
popq %r8
xorl %edi, %edi
movq %rbx, %rsi
callq 0x588a4
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_set.c
// Function: setTypeConvert
void setTypeConvert(robj *setobj, int enc) {
    setTypeIterator *si;
    serverAssertWithInfo(NULL,setobj,setobj->type == OBJ_SET &&
                             setobj->encoding == OBJ_ENCODING_INTSET);

    if (enc == OBJ_ENCODING_HT) {
        int64_t intele;
        dict *d = dictCreate(&setDictType,NULL);
        robj *element;

        /* Presize the dict to avoid rehashing */
        dictExpand(d,intsetLen(setobj->ptr));

        /* To add the elements we extract integers and create redis objects */
        si = setTypeInitIterator(setobj);
        while (setTypeNext(si,&element,&intele) != -1) {
            element = createStringObjectFromLongLong(intele);
            serverAssertWithInfo(NULL,element,
                                dictAdd(d,element,NULL) == DICT_OK);
        }
        setTypeReleaseIterator(si);

        setobj->encoding = OBJ_ENCODING_HT;
        zfree(setobj->ptr);
        setobj->ptr = d;
    } else {
        serverPanic("Unsupported set conversion");
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
cmpb $0x62, (%rdi)
jne 0x45e6c
cmpl $0x2, %esi
jne 0x45e87
leaq 0xb2ffd(%rip), %rdi     # 0xf8db0
xorl %esi, %esi
callq 0x2a155
movq %rax, %r14
movq 0x8(%rbx), %rdi
callq 0x5a9d8
movl %eax, %esi
movq %r14, %rdi
callq 0x2a1b7
movq %rbx, %rdi
callq 0x45fc4
movq %rax, %r15
leaq 0x10(%rsp), %r12
leaq 0x8(%rsp), %r13
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x46049
cmpl $-0x1, %eax
je 0x45e3c
movq 0x8(%rsp), %rdi
callq 0x39e38
movq %rax, %rbp
movq %r14, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x2a3ed
testl %eax, %eax
je 0x45de5
leaq 0x6ecad(%rip), %rdx     # 0xb4aca
leaq 0x6ec20(%rip), %rcx     # 0xb4a44
xorl %edi, %edi
movq %rbp, %rsi
movl $0x104, %r8d            # imm = 0x104
callq 0x588a4
pushq $0x1
popq %rdi
callq 0x263c0
movq %r15, %rdi
callq 0x4602d
movl $0xffffff0f, %eax       # imm = 0xFFFFFF0F
andl (%rbx), %eax
orl $0x20, %eax
movl %eax, (%rbx)
movq 0x8(%rbx), %rdi
callq 0x328f9
movq %r14, 0x8(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6ec14(%rip), %rdx     # 0xb4a87
leaq 0x6ebca(%rip), %rcx     # 0xb4a44
xorl %edi, %edi
movq %rbx, %rsi
movl $0xf5, %r8d
jmp 0x45e2f
leaq 0x6ec5f(%rip), %rdi     # 0xb4aed
leaq 0x6ebaf(%rip), %rsi     # 0xb4a44
movl $0x10c, %edx            # imm = 0x10C
callq 0x57b45
jmp 0x45e34
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_set.c
// Function: setTypeRemove
int setTypeRemove(robj *setobj, robj *value) {
    long long llval;
    if (setobj->encoding == OBJ_ENCODING_HT) {
        if (dictDelete(setobj->ptr,value) == DICT_OK) {
            if (htNeedsResize(setobj->ptr)) dictResize(setobj->ptr);
            return 1;
        }
    } else if (setobj->encoding == OBJ_ENCODING_INTSET) {
        if (isObjectRepresentableAsLongLong(value,&llval) == C_OK) {
            int success;
            setobj->ptr = intsetRemove(setobj->ptr,llval,&success);
            if (success) return 1;
        }
    } else {
        serverPanic("Unknown set encoding");
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl (%rdi), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x6, %eax
je 0x45ee6
cmpl $0x2, %eax
jne 0x45f29
movq 0x8(%rbx), %rdi
callq 0x2a6dc
testl %eax, %eax
jne 0x45ef8
movq 0x8(%rbx), %rdi
callq 0x2bac1
pushq $0x1
popq %rbp
testl %eax, %eax
je 0x45efa
movq 0x8(%rbx), %rdi
callq 0x2a192
jmp 0x45efa
movq %rsp, %rax
movq %rsi, %rdi
movq %rax, %rsi
callq 0x3a335
testl %eax, %eax
je 0x45f05
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x8(%rbx), %rdi
movq (%rsp), %rsi
leaq 0xc(%rsp), %r14
movq %r14, %rdx
callq 0x5a8c4
movq %rax, 0x8(%rbx)
cmpl $0x0, (%r14)
je 0x45ef8
pushq $0x1
popq %rbp
jmp 0x45efa
leaq 0x6e1fa(%rip), %rdi     # 0xb412a
leaq 0x6eb0d(%rip), %rsi     # 0xb4a44
pushq $0x66
popq %rdx
callq 0x57b45
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_set.c
// Function: setTypeIsMember
int setTypeIsMember(robj *subject, robj *value) {
    long long llval;
    if (subject->encoding == OBJ_ENCODING_HT) {
        return dictFind((dict*)subject->ptr,value) != NULL;
    } else if (subject->encoding == OBJ_ENCODING_INTSET) {
        if (isObjectRepresentableAsLongLong(value,&llval) == C_OK) {
            return intsetFind((intset*)subject->ptr,llval);
        }
    } else {
        serverPanic("Unknown set encoding");
    }
    return 0;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl (%rdi), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x6, %eax
je 0x45f77
cmpl $0x2, %eax
jne 0x45fa6
movq 0x8(%rbx), %rdi
callq 0x2a5f9
movq %rax, %rcx
xorl %eax, %eax
testq %rcx, %rcx
setne %al
jmp 0x45fa0
leaq 0x8(%rsp), %rax
movq %rsi, %rdi
movq %rax, %rsi
callq 0x3a335
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x45fa0
movq 0x8(%rbx), %rdi
movq 0x8(%rsp), %rsi
callq 0x5a95d
movzbl %al, %eax
addq $0x10, %rsp
popq %rbx
retq
leaq 0x6e17d(%rip), %rdi     # 0xb412a
leaq 0x6ea90(%rip), %rsi     # 0xb4a44
pushq $0x74
popq %rdx
callq 0x57b45
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_set.c
// Function: setTypeInitIterator
setTypeIterator *setTypeInitIterator(robj *subject) {
    setTypeIterator *si = zmalloc(sizeof(setTypeIterator));
    si->subject = subject;
    si->encoding = subject->encoding;
    if (si->encoding == OBJ_ENCODING_HT) {
        si->di = dictGetIterator(subject->ptr);
    } else if (si->encoding == OBJ_ENCODING_INTSET) {
        si->ii = 0;
    } else {
        serverPanic("Unknown set encoding");
    }
    return si;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x18
popq %rdi
callq 0x327b9
movq %rax, %rbx
movq %r14, (%rax)
movl (%r14), %eax
shrl $0x4, %eax
andl $0xf, %eax
movl %eax, 0x8(%rbx)
cmpl $0x6, %eax
je 0x45ffe
cmpl $0x2, %eax
jne 0x4600d
movq 0x8(%r14), %rdi
callq 0x2a99f
movq %rax, 0x10(%rbx)
jmp 0x46002
andl $0x0, 0xc(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x6e116(%rip), %rdi     # 0xb412a
leaq 0x6ea29(%rip), %rsi     # 0xb4a44
movl $0x82, %edx
callq 0x57b45
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_set.c
// Function: setTypeNext
int setTypeNext(setTypeIterator *si, robj **objele, int64_t *llele) {
    if (si->encoding == OBJ_ENCODING_HT) {
        dictEntry *de = dictNext(si->di);
        if (de == NULL) return -1;
        *objele = dictGetKey(de);
        *llele = -123456789; /* Not needed. Defensive. */
    } else if (si->encoding == OBJ_ENCODING_INTSET) {
        if (!intsetGet(si->subject->ptr,si->ii++,llele))
            return -1;
        *objele = NULL; /* Not needed. Defensive. */
    } else {
        serverPanic("Wrong set encoding in setTypeNext");
    }
    return si->encoding;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movl 0x8(%rdi), %eax
cmpl $0x6, %eax
je 0x46081
cmpl $0x2, %eax
jne 0x460af
movq 0x10(%rbx), %rdi
callq 0x2a9d3
testq %rax, %rax
je 0x460a6
movq (%rax), %rax
movq %rax, (%r14)
movq $-0x75bcd15, (%r15)     # imm = 0xF8A432EB
jmp 0x460a1
movq (%rbx), %rax
movq 0x8(%rax), %rdi
movl 0xc(%rbx), %esi
leal 0x1(%rsi), %eax
movl %eax, 0xc(%rbx)
movq %r15, %rdx
callq 0x5a9c0
testb %al, %al
je 0x460a6
andq $0x0, (%r14)
movl 0x8(%rbx), %eax
jmp 0x460a9
pushq $-0x1
popq %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x6e996(%rip), %rdi     # 0xb4a4c
leaq 0x6e987(%rip), %rsi     # 0xb4a44
movl $0xa7, %edx
callq 0x57b45
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_set.c
// Function: setTypeNextObject
robj *setTypeNextObject(setTypeIterator *si) {
    int64_t intele;
    robj *objele;
    int encoding;

    encoding = setTypeNext(si,&objele,&intele);
    switch(encoding) {
        case -1:    return NULL;
        case OBJ_ENCODING_INTSET:
            return createStringObjectFromLongLong(intele);
        case OBJ_ENCODING_HT:
            incrRefCount(objele);
            return objele;
        default:
            serverPanic("Unsupported encoding");
    }
    return NULL; /* just to suppress warnings */
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rsp, %rsi
leaq 0x8(%rsp), %rdx
callq 0x46049
cmpl $-0x1, %eax
je 0x4610d
cmpl $0x2, %eax
je 0x460ff
cmpl $0x6, %eax
jne 0x46118
movq 0x8(%rsp), %rdi
callq 0x39e38
movq %rax, %rbx
jmp 0x4610f
movq (%rsp), %rbx
movq %rbx, %rdi
callq 0x39e74
jmp 0x4610f
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
leaq 0x6e951(%rip), %rdi     # 0xb4a70
leaq 0x6e91e(%rip), %rsi     # 0xb4a44
movl $0xc1, %edx
callq 0x57b45
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_set.c
// Function: setTypeRandomElement
int setTypeRandomElement(robj *setobj, robj **objele, int64_t *llele) {
    if (setobj->encoding == OBJ_ENCODING_HT) {
        dictEntry *de = dictGetRandomKey(setobj->ptr);
        *objele = dictGetKey(de);
        *llele = -123456789; /* Not needed. Defensive. */
    } else if (setobj->encoding == OBJ_ENCODING_INTSET) {
        *llele = intsetRandom(setobj->ptr);
        *objele = NULL; /* Not needed. Defensive. */
    } else {
        serverPanic("Unknown set encoding");
    }
    return setobj->encoding;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl (%rdi), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x6, %eax
je 0x46170
cmpl $0x2, %eax
jne 0x4618e
movq 0x8(%rbx), %rdi
callq 0x2aaf6
movq (%rax), %rax
movq %rax, (%r15)
movq $-0x75bcd15, (%r14)     # imm = 0xF8A432EB
jmp 0x46180
movq 0x8(%rbx), %rdi
callq 0x5a987
movq %rax, (%r14)
andq $0x0, (%r15)
movl (%rbx), %eax
shrl $0x4, %eax
andl $0xf, %eax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x6df95(%rip), %rdi     # 0xb412a
leaq 0x6e8a8(%rip), %rsi     # 0xb4a44
movl $0xe0, %edx
callq 0x57b45
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_set.c
// Function: setTypeSize
unsigned long setTypeSize(robj *subject) {
    if (subject->encoding == OBJ_ENCODING_HT) {
        return dictSize((dict*)subject->ptr);
    } else if (subject->encoding == OBJ_ENCODING_INTSET) {
        return intsetLen((intset*)subject->ptr);
    } else {
        serverPanic("Unknown set encoding");
    }
}

// Assembly:
pushq %rax
movl (%rdi), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x6, %eax
je 0x461cf
cmpl $0x2, %eax
jne 0x461dc
movq 0x8(%rdi), %rcx
movq 0x48(%rcx), %rax
addq 0x28(%rcx), %rax
jmp 0x461da
movq 0x8(%rdi), %rdi
callq 0x5a9d8
movl %eax, %eax
popq %rcx
retq
leaq 0x6df47(%rip), %rdi     # 0xb412a
leaq 0x6e85a(%rip), %rsi     # 0xb4a44
movl $0xeb, %edx
callq 0x57b45
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_set.c
// Function: saddCommand
void saddCommand(client *c) {
    robj *set;
    int j, added = 0;

    set = lookupKeyWrite(c->db,c->argv[1]);
    if (set == NULL) {
        set = setTypeCreate(c->argv[2]);
        dbAdd(c->db,c->argv[1],set);
    } else {
        if (set->type != OBJ_SET) {
            addReply(c,shared.wrongtypeerr);
            return;
        }
    }

    for (j = 2; j < c->argc; j++) {
        c->argv[j] = tryObjectEncoding(c->argv[j]);
        if (setTypeAdd(set,c->argv[j])) added++;
    }
    if (added) {
        signalModifiedKey(c->db,c->argv[1]);
        notifyKeyspaceEvent(NOTIFY_SET,"sadd",c->argv[1],c->db->id);
    }
    server.dirty += added;
    addReplyLongLong(c,added);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
callq 0x3aec2
testq %rax, %rax
je 0x46246
movq %rax, %r14
movl (%rax), %eax
andl $0xf, %eax
cmpl $0x2, %eax
je 0x4626a
leaq 0xb40e0(%rip), %rax     # 0xfa310
movq 0x70(%rax), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x36987
movq 0x40(%rbx), %rax
movq 0x10(%rax), %rdi
callq 0x45c68
movq %rax, %r14
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
movq %r14, %rdx
callq 0x3af45
xorl %ebp, %ebp
pushq $0x2
popq %r15
movslq 0x38(%rbx), %rax
cmpq %rax, %r15
jge 0x462a5
movq 0x40(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x3a3ad
movq 0x40(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
movq 0x40(%rbx), %rax
movq (%rax,%r15,8), %rsi
movq %r14, %rdi
callq 0x45c80
addl %eax, %ebp
incq %r15
jmp 0x46270
testl %ebp, %ebp
je 0x462d8
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
callq 0x3b125
movq 0x10(%rbx), %rax
movq 0x40(%rbx), %rcx
movq 0x8(%rcx), %rdx
movl 0x30(%rax), %ecx
leaq 0x68235(%rip), %rsi     # 0xae505
pushq $0x20
popq %rdi
callq 0x6fb58
movl %ebp, %esi
leaq 0xb35c7(%rip), %rax     # 0xf98a8
addq %rsi, 0x720(%rax)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x370a6
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_set.c
// Function: sremCommand
void sremCommand(client *c) {
    robj *set;
    int j, deleted = 0, keyremoved = 0;

    if ((set = lookupKeyWriteOrReply(c,c->argv[1],shared.czero)) == NULL ||
        checkType(c,set,OBJ_SET)) return;

    for (j = 2; j < c->argc; j++) {
        if (setTypeRemove(set,c->argv[j])) {
            deleted++;
            if (setTypeSize(set) == 0) {
                dbDelete(c->db,c->argv[1]);
                keyremoved = 1;
                break;
            }
        }
    }
    if (deleted) {
        signalModifiedKey(c->db,c->argv[1]);
        notifyKeyspaceEvent(NOTIFY_SET,"srem",c->argv[1],c->db->id);
        if (keyremoved)
            notifyKeyspaceEvent(NOTIFY_GENERIC,"del",c->argv[1],
                                c->db->id);
        server.dirty += deleted;
    }
    addReplyLongLong(c,deleted);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movq 0x8(%rax), %rsi
leaq 0xb3ffc(%rip), %rax     # 0xfa310
movq 0x20(%rax), %rdx
callq 0x3af15
testq %rax, %rax
je 0x46337
movq %rax, %r14
pushq $0x2
popq %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3a311
testl %eax, %eax
je 0x46340
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %ebp, %ebp
pushq $0x2
popq %r15
movslq 0x38(%rbx), %r12
cmpq %r12, %r15
jge 0x46388
movq 0x40(%rbx), %rax
movq (%rax,%r15,8), %rsi
movq %r14, %rdi
callq 0x45ea1
testl %eax, %eax
je 0x46372
incl %ebp
movq %r14, %rdi
callq 0x461ae
testq %rax, %rax
je 0x46377
incq %r15
jmp 0x46346
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
callq 0x3b1df
testl %ebp, %ebp
je 0x463f1
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
callq 0x3b125
movq 0x10(%rbx), %rax
movq 0x40(%rbx), %rcx
movq 0x8(%rcx), %rdx
movl 0x30(%rax), %ecx
leaq 0x68157(%rip), %rsi     # 0xae50a
pushq $0x20
popq %rdi
callq 0x6fb58
cmpq %r12, %r15
jge 0x463de
movq 0x10(%rbx), %rax
movq 0x40(%rbx), %rcx
movq 0x8(%rcx), %rdx
movl 0x30(%rax), %ecx
leaq 0x6a042(%rip), %rsi     # 0xb0418
pushq $0x4
popq %rdi
callq 0x6fb58
movslq %ebp, %rsi
leaq 0xb34c0(%rip), %rax     # 0xf98a8
addq %rsi, 0x720(%rax)
jmp 0x463f3
xorl %esi, %esi
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x370a6
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_set.c
// Function: sismemberCommand
void sismemberCommand(client *c) {
    robj *set;

    if ((set = lookupKeyReadOrReply(c,c->argv[1],shared.czero)) == NULL ||
        checkType(c,set,OBJ_SET)) return;

    c->argv[2] = tryObjectEncoding(c->argv[2]);
    if (setTypeIsMember(set,c->argv[2]))
        addReply(c,shared.cone);
    else
        addReply(c,shared.czero);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movq 0x8(%rax), %rsi
leaq 0xb3d22(%rip), %r15     # 0xfa310
movq 0x20(%r15), %rdx
callq 0x3aee5
testq %rax, %rax
je 0x46611
movq %rax, %r14
pushq $0x2
popq %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3a311
testl %eax, %eax
je 0x46617
popq %rbx
popq %r14
popq %r15
retq
movq 0x40(%rbx), %rax
movq 0x10(%rax), %rdi
callq 0x3a3ad
movq 0x40(%rbx), %rcx
movq %rax, 0x10(%rcx)
movq 0x40(%rbx), %rax
movq 0x10(%rax), %rsi
movq %r14, %rdi
callq 0x45f47
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
movq 0x20(%r15,%rcx,8), %rsi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x36987
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_set.c
// Function: scardCommand
void scardCommand(client *c) {
    robj *o;

    if ((o = lookupKeyReadOrReply(c,c->argv[1],shared.czero)) == NULL ||
        checkType(c,o,OBJ_SET)) return;

    addReplyLongLong(c,setTypeSize(o));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movq 0x8(%rax), %rsi
leaq 0xb3ca5(%rip), %rax     # 0xfa310
movq 0x20(%rax), %rdx
callq 0x3aee5
testq %rax, %rax
je 0x4668e
movq %rax, %r14
pushq $0x2
popq %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3a311
testl %eax, %eax
je 0x46696
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %r14, %rdi
callq 0x461ae
movq %rbx, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x370a6
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_set.c
// Function: srandmemberCommand
void srandmemberCommand(client *c) {
    robj *set, *ele;
    int64_t llele;
    int encoding;

    if (c->argc == 3) {
        srandmemberWithCountCommand(c);
        return;
    } else if (c->argc > 3) {
        addReply(c,shared.syntaxerr);
        return;
    }

    if ((set = lookupKeyReadOrReply(c,c->argv[1],shared.nullbulk)) == NULL ||
        checkType(c,set,OBJ_SET)) return;

    encoding = setTypeRandomElement(set,&ele,&llele);
    if (encoding == OBJ_ENCODING_INTSET) {
        addReplyBulkLongLong(c,llele);
    } else {
        addReplyBulk(c,ele);
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl 0x38(%rdi), %eax
cmpl $0x3, %eax
jne 0x472e5
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x46ffe
jle 0x47304
leaq 0xb3022(%rip), %rax     # 0xfa310
movq 0x80(%rax), %rsi
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x36987
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
leaq 0xb2ffd(%rip), %rax     # 0xfa310
movq 0x50(%rax), %rdx
movq %rbx, %rdi
callq 0x3aee5
testq %rax, %rax
je 0x47339
movq %rax, %r14
pushq $0x2
popq %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3a311
testl %eax, %eax
je 0x47341
addq $0x18, %rsp
popq %rbx
popq %r14
retq
leaq 0x10(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
callq 0x46138
cmpl $0x6, %eax
jne 0x4736c
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x37206
movq 0x10(%rsp), %rsi
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x36fd9
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_set.c
// Function: sscanCommand
void sscanCommand(client *c) {
    robj *set;
    unsigned long cursor;

    if (parseScanCursorOrReply(c,c->argv[2],&cursor) == C_ERR) return;
    if ((set = lookupKeyReadOrReply(c,c->argv[1],shared.emptyscan)) == NULL ||
        checkType(c,set,OBJ_SET)) return;
    scanGenericCommand(c,set,cursor);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movq 0x10(%rax), %rsi
movq %rsp, %rdx
callq 0x3b897
cmpl $-0x1, %eax
je 0x478b3
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
leaq 0xb2a95(%rip), %rax     # 0xfa310
movq 0x148(%rax), %rdx
movq %rbx, %rdi
callq 0x3aee5
testq %rax, %rax
je 0x478b3
movq %rax, %r14
pushq $0x2
popq %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3a311
testl %eax, %eax
jne 0x478b3
movq (%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3b90d
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zslCreateNode
zskiplistNode *zslCreateNode(int level, double score, robj *obj) {
    zskiplistNode *zn = zmalloc(sizeof(*zn)+level*sizeof(struct zskiplistLevel));
    zn->score = score;
    zn->obj = obj;
    return zn;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movsd %xmm0, 0x8(%rsp)
movslq %edi, %rdi
shlq $0x4, %rdi
addq $0x18, %rdi
callq 0x327b9
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rax)
movq %rbx, (%rax)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zslCreate
zskiplist *zslCreate(void) {
    int j;
    zskiplist *zsl;

    zsl = zmalloc(sizeof(*zsl));
    zsl->level = 1;
    zsl->length = 0;
    zsl->header = zslCreateNode(ZSKIPLIST_MAXLEVEL,0,NULL);
    for (j = 0; j < ZSKIPLIST_MAXLEVEL; j++) {
        zsl->header->level[j].forward = NULL;
        zsl->header->level[j].span = 0;
    }
    zsl->header->backward = NULL;
    zsl->tail = NULL;
    return zsl;
}

// Assembly:
pushq %rbx
pushq $0x20
popq %rdi
callq 0x327b9
movq %rax, %rbx
movl $0x1, 0x18(%rax)
andq $0x0, 0x10(%rax)
movl $0x218, %edi            # imm = 0x218
callq 0x327b9
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq %rax, (%rbx)
xorl %ecx, %ecx
cmpq $0x200, %rcx            # imm = 0x200
je 0x47935
andq $0x0, 0x18(%rax,%rcx)
andl $0x0, 0x20(%rax,%rcx)
addq $0x10, %rcx
jmp 0x4791b
andq $0x0, 0x10(%rax)
andq $0x0, 0x8(%rbx)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zslFree
void zslFree(zskiplist *zsl) {
    zskiplistNode *node = zsl->header->level[0].forward, *next;

    zfree(zsl->header);
    while(node) {
        next = node->level[0].forward;
        zslFreeNode(node);
        node = next;
    }
    zfree(zsl);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
movq 0x18(%rdi), %r14
callq 0x328f9
testq %r14, %r14
je 0x47983
movq 0x18(%r14), %r15
movq %r14, %rdi
callq 0x47944
movq %r15, %r14
jmp 0x4796d
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x328f9
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zslDeleteNode
void zslDeleteNode(zskiplist *zsl, zskiplistNode *x, zskiplistNode **update) {
    int i;
    for (i = 0; i < zsl->level; i++) {
        if (update[i]->level[i].forward == x) {
            update[i]->level[i].span += x->level[i].span - 1;
            update[i]->level[i].forward = x->level[i].forward;
        } else {
            update[i]->level[i].span -= 1;
        }
    }
    if (x->level[0].forward) {
        x->level[0].forward->backward = x->backward;
    } else {
        zsl->tail = x->backward;
    }
    while(zsl->level > 1 && zsl->header->level[zsl->level-1].forward == NULL)
        zsl->level--;
    zsl->length--;
}

// Assembly:
movslq 0x18(%rdi), %rax
pushq $0x20
popq %rcx
xorl %r8d, %r8d
cmpq %rax, %r8
jge 0x47bd7
movq (%rdx,%r8,8), %r9
cmpq %rsi, -0x8(%r9,%rcx)
je 0x47bb2
decl (%r9,%rcx)
jmp 0x47bce
movl (%rsi,%rcx), %r10d
movl (%r9,%rcx), %r11d
addl %r11d, %r10d
decl %r10d
movl %r10d, (%r9,%rcx)
movq -0x8(%rsi,%rcx), %r10
movq %r10, -0x8(%r9,%rcx)
incq %r8
addq $0x10, %rcx
jmp 0x47b9c
movq 0x10(%rsi), %rcx
movq 0x18(%rsi), %rdx
leaq 0x8(%rdi), %rsi
leaq 0x10(%rdx), %r8
testq %rdx, %rdx
cmoveq %rsi, %r8
movq %rcx, (%r8)
movl %eax, %eax
cmpl $0x2, %eax
jl 0x47c12
movq (%rdi), %rcx
leal -0x1(%rax), %edx
shlq $0x4, %rdx
cmpq $0x0, 0x18(%rcx,%rdx)
jne 0x47c12
decq %rax
movl %eax, 0x18(%rdi)
jmp 0x47bf3
decq 0x10(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zslDelete
int zslDelete(zskiplist *zsl, double score, robj *obj) {
    zskiplistNode *update[ZSKIPLIST_MAXLEVEL], *x;
    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,obj) < 0)))
            x = x->level[i].forward;
        update[i] = x;
    }
    /* We may have multiple elements with the same score, what we need
     * is to find the element with both the right score and object. */
    x = x->level[0].forward;
    if (x && score == x->score && equalStringObjects(x->obj,obj)) {
        zslDeleteNode(zsl, x, update);
        zslFreeNode(x);
        return 1;
    }
    return 0; /* not found */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %r12
movslq 0x18(%rdi), %r15
movsd %xmm0, 0x8(%rsp)
testq %r15, %r15
jle 0x47c96
decq %r15
movq %r15, %r13
shlq $0x4, %r13
movq %r12, %rax
movq %rax, %r12
movq 0x18(%rax,%r13), %rax
testq %rax, %rax
je 0x47c8f
movsd 0x8(%rax), %xmm1
ucomisd %xmm1, %xmm0
ja 0x47c4d
ucomisd %xmm0, %xmm1
jne 0x47c8f
jp 0x47c8f
movq (%rax), %rdi
movq %r14, %rsi
callq 0x3a702
movsd 0x8(%rsp), %xmm0
testl %eax, %eax
jns 0x47c8f
leaq (%r12,%r13), %rax
addq $0x18, %rax
movq (%rax), %rax
jmp 0x47c4d
movq %r12, 0x10(%rsp,%r15,8)
jmp 0x47c3b
movq 0x18(%r12), %r15
xorl %ebp, %ebp
testq %r15, %r15
je 0x47cda
movsd 0x8(%r15), %xmm1
ucomisd %xmm0, %xmm1
jne 0x47cda
jp 0x47cda
movq (%r15), %rdi
movq %r14, %rsi
callq 0x3a712
testl %eax, %eax
je 0x47cda
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x47b92
movq %r15, %rdi
callq 0x47944
pushq $0x1
popq %rbp
movl %ebp, %eax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zslIsInRange
int zslIsInRange(zskiplist *zsl, zrangespec *range) {
    zskiplistNode *x;

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

// Assembly:
movsd (%rsi), %xmm1
movsd 0x8(%rsi), %xmm0
xorl %eax, %eax
ucomisd %xmm0, %xmm1
ja 0x47d27
jne 0x47d2e
jp 0x47d2e
cmpl $0x0, 0x10(%rsi)
je 0x47d28
retq
cmpl $0x0, 0x14(%rsi)
jne 0x47d27
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0x47d27
movsd 0x8(%rcx), %xmm2
xorl %ecx, %ecx
xorl %edx, %edx
ucomisd %xmm1, %xmm2
setbe %cl
setb %dl
cmpl $0x0, 0x10(%rsi)
cmovel %edx, %ecx
testb %cl, %cl
jne 0x47d27
movq (%rdi), %rcx
movq 0x18(%rcx), %rcx
testq %rcx, %rcx
je 0x47d27
xorl %eax, %eax
xorl %edx, %edx
ucomisd 0x8(%rcx), %xmm0
seta %al
setae %dl
cmpl $0x0, 0x14(%rsi)
cmovel %edx, %eax
movzbl %al, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zslFirstInRange
zskiplistNode *zslFirstInRange(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 *OUT* of range. */
        while (x->level[i].forward &&
            !zslValueGteMin(x->level[i].forward->score,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 (!zslValueLteMax(x->score,range)) return NULL;
    return x;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x47d0c
testl %eax, %eax
je 0x47e07
movq (%r14), %rcx
movslq 0x18(%r14), %rax
testq %rax, %rax
jle 0x47dd9
decq %rax
movq %rax, %rsi
shlq $0x4, %rsi
movq %rcx, %rdx
movq 0x18(%rcx,%rsi), %rcx
testq %rcx, %rcx
je 0x47dd4
movsd 0x8(%rcx), %xmm0
xorl %edi, %edi
xorl %r8d, %r8d
ucomisd (%rbx), %xmm0
setbe %dil
setb %r8b
cmpl $0x0, 0x10(%rbx)
cmovel %r8d, %edi
testb %dil, %dil
jne 0x47da4
movq %rdx, %rcx
jmp 0x47d95
movq 0x18(%rcx), %rcx
testq %rcx, %rcx
je 0x47e11
movsd 0x8(%rbx), %xmm0
xorl %edx, %edx
xorl %eax, %eax
ucomisd 0x8(%rcx), %xmm0
setbe %dl
setb %al
cmpl $0x0, 0x14(%rbx)
cmovel %eax, %edx
xorl %eax, %eax
testb %dl, %dl
cmoveq %rcx, %rax
jmp 0x47e09
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x6cd43(%rip), %rdi     # 0xb4b5b
leaq 0x6cd33(%rip), %rsi     # 0xb4b52
movl $0x100, %edx            # imm = 0x100
callq 0x57ac8
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/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 0x47d0c
testl %eax, %eax
je 0x47eb9
movq (%r14), %rcx
movslq 0x18(%r14), %rax
testq %rax, %rax
jle 0x47e90
decq %rax
movq %rax, %rsi
shlq $0x4, %rsi
movq %rcx, %rdx
movq 0x18(%rcx,%rsi), %rcx
testq %rcx, %rcx
je 0x47e8b
movsd 0x8(%rbx), %xmm0
xorl %edi, %edi
xorl %r8d, %r8d
ucomisd 0x8(%rcx), %xmm0
setbe %dil
setb %r8b
cmpl $0x0, 0x14(%rbx)
cmovel %r8d, %edi
testb %dil, %dil
je 0x47e5a
movq %rdx, %rcx
jmp 0x47e4b
testq %rcx, %rcx
je 0x47ec3
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
jmp 0x47ebb
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x6cc91(%rip), %rdi     # 0xb4b5b
leaq 0x6cc81(%rip), %rsi     # 0xb4b52
movl $0x119, %edx            # imm = 0x119
callq 0x57ac8
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/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 0x47f48
decq %rcx
movq %rcx, %rdx
shlq $0x4, %rdx
movq %rax, %rsi
movq %rsi, %rax
movq 0x18(%rsi,%rdx), %rsi
testq %rsi, %rsi
je 0x47f42
cmpl $0x0, 0x10(%r14)
movsd 0x8(%rsi), %xmm0
movsd (%r14), %xmm1
je 0x47f3c
ucomisd %xmm0, %xmm1
jae 0x47f16
jmp 0x47f42
ucomisd %xmm0, %xmm1
ja 0x47f16
movq %rax, (%rsp,%rcx,8)
jmp 0x47f04
movq 0x18(%rax), %rbp
xorl %r12d, %r12d
testq %rbp, %rbp
je 0x47fa2
cmpl $0x0, 0x14(%r14)
movsd 0x8(%rbp), %xmm0
movsd 0x8(%r14), %xmm1
je 0x47f6e
ucomisd %xmm0, %xmm1
ja 0x47f74
jmp 0x47fa2
ucomisd %xmm0, %xmm1
jb 0x47fa2
movq 0x18(%rbp), %r13
movq %r15, %rdi
movq %rbp, %rsi
movq %rsp, %rdx
callq 0x47b92
movq (%rbp), %rsi
movq %rbx, %rdi
callq 0x2a6dc
movq %rbp, %rdi
callq 0x47944
incq %r12
movq %r13, %rbp
jmp 0x47f4f
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_O2/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 $0x108, %rsp            # imm = 0x108
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %r12
movslq 0x18(%rdi), %r13
testq %r13, %r13
jle 0x48013
decq %r13
movq %r13, %rbp
shlq $0x4, %rbp
movq 0x18(%r12,%rbp), %rax
testq %rax, %rax
je 0x4800d
movq (%rax), %rdi
movq %r14, %rsi
callq 0x48073
testl %eax, %eax
jne 0x4800d
leaq (%r12,%rbp), %rax
addq $0x18, %rax
movq (%rax), %r12
jmp 0x47fe7
movq %r12, (%rsp,%r13,8)
jmp 0x47fd8
movq 0x18(%r12), %rbp
xorl %r12d, %r12d
testq %rbp, %rbp
je 0x4805e
movq (%rbp), %rdi
movq %r14, %rsi
callq 0x48091
testl %eax, %eax
je 0x4805e
movq 0x18(%rbp), %r13
movq %r15, %rdi
movq %rbp, %rsi
movq %rsp, %rdx
callq 0x47b92
movq (%rbp), %rsi
movq %rbx, %rdi
callq 0x2a6dc
movq %rbp, %rdi
callq 0x47944
incq %r12
movq %r13, %rbp
jmp 0x4801b
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_O2/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
movl %esi, %esi
xorl %ebp, %ebp
testq %rcx, %rcx
jle 0x48117
decq %rcx
movq %rcx, %rdi
shlq $0x4, %rdi
movq %rbp, %r9
movq %rax, %r8
movq %r8, %rax
movq %r9, %rbp
movq 0x18(%r8,%rdi), %r8
testq %r8, %r8
je 0x48110
leaq (%rax,%rdi), %r9
addq $0x18, %r9
movl 0x8(%r9), %r9d
addq %rbp, %r9
cmpq %rsi, %r9
jb 0x480ec
movq %rax, 0x10(%rsp,%rcx,8)
jmp 0x480d7
movq 0x18(%rax), %r13
movl %edx, %r12d
xorl %r15d, %r15d
testq %r13, %r13
je 0x48161
leaq (%r15,%rbp), %rax
cmpq %r12, %rax
jae 0x48161
movq 0x18(%r13), %rbx
movq %r14, %rdi
movq %r13, %rsi
leaq 0x10(%rsp), %rdx
callq 0x47b92
movq (%r13), %rsi
movq 0x8(%rsp), %rdi
callq 0x2a6dc
movq %r13, %rdi
callq 0x47944
incq %r15
movq %rbx, %r13
jmp 0x48121
movq %r15, %rax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %rax
movq %rsi, %rbx
movq (%rdi), %r12
movslq 0x18(%rdi), %r15
xorl %r14d, %r14d
movsd %xmm0, (%rsp)
testq %r15, %r15
jle 0x48206
decq %r15
movq %r15, %r13
shlq $0x4, %r13
movq 0x18(%r12,%r13), %rax
testq %rax, %rax
je 0x481ea
leaq (%r12,%r13), %rbp
addq $0x18, %rbp
movsd 0x8(%rax), %xmm1
ucomisd %xmm1, %xmm0
ja 0x481df
ucomisd %xmm0, %xmm1
jne 0x481ea
jp 0x481ea
movq (%rax), %rdi
movq %rbx, %rsi
callq 0x3a702
movsd (%rsp), %xmm0
testl %eax, %eax
jg 0x481ea
movq (%rbp), %rax
movl 0x8(%rbp), %ecx
addq %rcx, %r14
movq %rax, %r12
jmp 0x481a2
movq (%r12), %rdi
testq %rdi, %rdi
je 0x48193
movq %rbx, %rsi
callq 0x3a712
movsd (%rsp), %xmm0
testl %eax, %eax
je 0x48193
jmp 0x48209
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x48263
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 0x4825d
leaq (%rax,%rdi), %r9
addq $0x18, %r9
movl 0x8(%r9), %r9d
addq %rdx, %r9
cmpq %rsi, %r9
jbe 0x48239
cmpq %rsi, %rdx
jne 0x48224
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/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), %rdi
movzbl (%rdi), %ecx
cmpl $0x28, %ecx
je 0x482ca
cmpl $0x5b, %ecx
je 0x482a4
pushq $-0x1
popq %rax
cmpl $0x2d, %ecx
je 0x482a9
cmpl $0x2b, %ecx
jne 0x482ea
cmpb $0x0, 0x1(%rdi)
jne 0x482ea
andl $0x0, (%rdx)
leaq 0xb2075(%rip), %rax     # 0xfa310
movq 0x158(%rax), %rdi
jmp 0x482c0
andl $0x0, (%rdx)
jmp 0x482d0
cmpb $0x0, 0x1(%rdi)
jne 0x482ea
andl $0x0, (%rdx)
leaq 0xb2057(%rip), %rax     # 0xfa310
movq 0x150(%rax), %rdi
movq %rdi, (%rbx)
callq 0x39e74
jmp 0x482e8
movl $0x1, (%rdx)
leaq 0x1(%rdi), %r14
callq 0x482f2
leaq -0x1(%rax), %rsi
movq %r14, %rdi
callq 0x39e29
movq %rax, (%rbx)
xorl %eax, %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: 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 %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rdi
movq 0x8(%rsi), %rsi
callq 0x48340
cmpl $0x1, %eax
jg 0x483ef
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
callq 0x3a702
testl %eax, %eax
je 0x483e3
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x483ef
movq (%rax), %rdi
movq %rbx, %rsi
callq 0x48073
testl %eax, %eax
je 0x483ef
movq (%r14), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x483ef
movq (%rax), %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x48091
cmpl $0x0, 0x10(%rbx)
jne 0x483ef
cmpl $0x0, 0x14(%rbx)
je 0x483ad
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq