LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_list.c
// Function: lsetCommand
void lsetCommand(client *c) {
    robj *o = lookupKeyWriteOrReply(c,c->argv[1],shared.nokeyerr);
    if (o == NULL || checkType(c,o,OBJ_LIST)) return;
    long index;
    robj *value = c->argv[3];

    if ((getLongFromObjectOrReply(c, c->argv[2], &index, NULL) != C_OK))
        return;

    if (o->encoding == OBJ_ENCODING_QUICKLIST) {
        quicklist *ql = o->ptr;
        int replaced = quicklistReplaceAtIndex(ql, index,
                                               value->ptr, sdslen(value->ptr));
        if (!replaced) {
            addReply(c,shared.outofrangeerr);
        } else {
            addReply(c,shared.ok);
            signalModifiedKey(c->db,c->argv[1]);
            notifyKeyspaceEvent(NOTIFY_LIST,"lset",c->argv[1],c->db->id);
            server.dirty++;
        }
    } else {
        serverPanic("Unknown list encoding");
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movq 0x8(%rax), %rsi
leaq 0xb553c(%rip), %r15     # 0x102310
movq 0x78(%r15), %rdx
callq 0x41b2b
testq %rax, %rax
je 0x4cee3
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
movl $0x1, %edx
callq 0x40d47
testl %eax, %eax
jne 0x4cee3
movq 0x40(%rbx), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rax), %r12
movq %rsp, %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x41718
testl %eax, %eax
jne 0x4cee3
movl $0xf0, %eax
andl (%r14), %eax
cmpl $0x90, %eax
jne 0x4ceef
movq 0x8(%r14), %rdi
movq (%rsp), %rsi
movq 0x8(%r12), %rdx
movzbl -0x1(%rdx), %ecx
movl %ecx, %eax
andl $0x7, %eax
cmpl $0x4, %eax
ja 0x4ce7c
leaq 0x764d1(%rip), %r8      # 0xc3328
movslq (%r8,%rax,4), %rax
addq %r8, %rax
jmpq *%rax
shrl $0x3, %ecx
jmp 0x4ce7e
movq -0x11(%rdx), %rcx
jmp 0x4ce7e
movzwl -0x5(%rdx), %ecx
jmp 0x4ce7e
movl -0x9(%rdx), %ecx
jmp 0x4ce7e
movzbl -0x3(%rdx), %ecx
jmp 0x4ce7e
xorl %ecx, %ecx
callq 0x26f3c
testl %eax, %eax
je 0x4ced4
movq 0x8(%r15), %rsi
movq %rbx, %rdi
callq 0x3c854
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
callq 0x41d90
movq 0x10(%rbx), %rax
movq 0x40(%rbx), %rcx
movq 0x8(%rcx), %rdx
movl 0x30(%rax), %ecx
leaq 0x6f744(%rip), %rsi     # 0xbc5fe
movl $0x10, %edi
callq 0x7c665
leaq 0xb49dd(%rip), %rax     # 0x1018a8
incq 0x720(%rax)
jmp 0x4cee3
movq 0x90(%r15), %rsi
movq %rbx, %rdi
callq 0x3c854
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x75b5c(%rip), %rdi     # 0xc2a52
leaq 0x7643f(%rip), %rsi     # 0xc333c
movl $0x162, %edx            # imm = 0x162
callq 0x619b4
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_list.c
// Function: popGenericCommand
void popGenericCommand(client *c, int where) {
    robj *o = lookupKeyWriteOrReply(c,c->argv[1],shared.nullbulk);
    if (o == NULL || checkType(c,o,OBJ_LIST)) return;

    robj *value = listTypePop(o,where);
    if (value == NULL) {
        addReply(c,shared.nullbulk);
    } else {
        char *event = (where == LIST_HEAD) ? "lpop" : "rpop";

        addReplyBulk(c,value);
        decrRefCount(value);
        notifyKeyspaceEvent(NOTIFY_LIST,event,c->argv[1],c->db->id);
        if (listTypeLength(o) == 0) {
            notifyKeyspaceEvent(NOTIFY_GENERIC,"del",
                                c->argv[1],c->db->id);
            dbDelete(c->db,c->argv[1]);
        }
        signalModifiedKey(c->db,c->argv[1]);
        server.dirty++;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movq 0x8(%rax), %rsi
leaq 0xb53e3(%rip), %r12     # 0x102310
movq 0x50(%r12), %rdx
callq 0x41b2b
testq %rax, %rax
je 0x4d011
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
movl $0x1, %edx
callq 0x40d47
testl %eax, %eax
jne 0x4d011
movq %r14, %rdi
movl %ebp, %esi
callq 0x4c426
testq %rax, %rax
je 0x4d01a
movq %rax, %r15
testl %ebp, %ebp
leaq 0x6f673(%rip), %rax     # 0xbc5ed
leaq 0x6f654(%rip), %r12     # 0xbc5d5
cmoveq %rax, %r12
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3d170
movq %r15, %rdi
callq 0x40c8f
movq 0x10(%rbx), %rax
movq 0x40(%rbx), %rcx
movq 0x8(%rcx), %rdx
movl 0x30(%rax), %ecx
movl $0x10, %edi
movq %r12, %rsi
callq 0x7c665
movq %r14, %rdi
callq 0x4c4aa
testq %rax, %rax
jne 0x4cff2
movq 0x10(%rbx), %rax
movq 0x40(%rbx), %rcx
movq 0x8(%rcx), %rdx
movl 0x30(%rax), %ecx
leaq 0x71551(%rip), %rsi     # 0xbe528
movl $0x4, %edi
callq 0x7c665
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
callq 0x41e5f
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
callq 0x41d90
leaq 0xb489e(%rip), %rax     # 0x1018a8
incq 0x720(%rax)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x50(%r12), %rsi
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3c854
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_list.c
// Function: rpoplpushHandlePush
void rpoplpushHandlePush(client *c, robj *dstkey, robj *dstobj, robj *value) {
    /* Create the list if the key does not exist */
    if (!dstobj) {
        dstobj = createQuicklistObject();
        quicklistSetOptions(dstobj->ptr, server.list_max_ziplist_size,
                            server.list_compress_depth);
        dbAdd(c->db,dstkey,dstobj);
    }
    signalModifiedKey(c->db,dstkey);
    listTypePush(dstobj,value,LIST_HEAD);
    notifyKeyspaceEvent(NOTIFY_LIST,"lpush",dstkey,c->db->id);
    /* Always send the pushed value to the client. */
    addReplyBulk(c,value);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r14
testq %rdx, %rdx
jne 0x4d5ac
callq 0x409c1
movq %rax, %r12
movq 0x8(%rax), %rdi
leaq 0xb431c(%rip), %rax     # 0x1018a8
movl 0x970(%rax), %esi
movl 0x974(%rax), %edx
callq 0x2b58c
movq 0x10(%r14), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x41b77
movq 0x10(%r14), %rdi
movq %r15, %rsi
callq 0x41d90
movq %r12, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x4c380
movq 0x10(%r14), %rax
movl 0x30(%rax), %ecx
leaq 0x6f00f(%rip), %rsi     # 0xbc5e2
movl $0x10, %edi
movq %r15, %rdx
callq 0x7c665
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3d170
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_list.c
// Function: rpoplpushCommand
void rpoplpushCommand(client *c) {
    robj *sobj, *value;
    if ((sobj = lookupKeyWriteOrReply(c,c->argv[1],shared.nullbulk)) == NULL ||
        checkType(c,sobj,OBJ_LIST)) return;

    if (listTypeLength(sobj) == 0) {
        /* This may only happen after loading very old RDB files. Recent
         * versions of Redis delete keys of empty lists. */
        addReply(c,shared.nullbulk);
    } else {
        robj *dobj = lookupKeyWrite(c->db,c->argv[2]);
        robj *touchedkey = c->argv[1];

        if (dobj && checkType(c,dobj,OBJ_LIST)) return;
        value = listTypePop(sobj,LIST_TAIL);
        /* We saved touched key, and protect it, since rpoplpushHandlePush
         * may change the client command argument vector (it does not
         * currently). */
        incrRefCount(touchedkey);
        rpoplpushHandlePush(c,c->argv[2],dobj,value);

        /* listTypePop returns an object with its refcount incremented */
        decrRefCount(value);

        /* Delete the source list when it is empty */
        notifyKeyspaceEvent(NOTIFY_LIST,"rpop",touchedkey,c->db->id);
        if (listTypeLength(sobj) == 0) {
            dbDelete(c->db,touchedkey);
            notifyKeyspaceEvent(NOTIFY_GENERIC,"del",
                                touchedkey,c->db->id);
        }
        signalModifiedKey(c->db,touchedkey);
        decrRefCount(touchedkey);
        server.dirty++;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movq 0x8(%rax), %rsi
leaq 0xb4cff(%rip), %r15     # 0x102310
movq 0x50(%r15), %rdx
callq 0x41b2b
testq %rax, %rax
je 0x4d636
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
movl $0x1, %edx
callq 0x40d47
testl %eax, %eax
je 0x4d640
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %r14, %rdi
callq 0x4c4aa
testq %rax, %rax
je 0x4d732
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq 0x10(%rax), %rsi
callq 0x41ad6
movq %rax, %r12
movq 0x40(%rbx), %rax
movq 0x8(%rax), %r15
testq %r12, %r12
je 0x4d686
movq %rbx, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x40d47
testl %eax, %eax
jne 0x4d636
movq %r14, %rdi
movl $0x1, %esi
callq 0x4c426
movq %rax, %r13
movq %r15, %rdi
callq 0x407a8
movq 0x40(%rbx), %rax
movq 0x10(%rax), %rsi
movq %rbx, %rdi
movq %r12, %rdx
movq %r13, %rcx
callq 0x4d560
movq %r13, %rdi
callq 0x40c8f
movq 0x10(%rbx), %rax
movl 0x30(%rax), %ecx
leaq 0x6ef0b(%rip), %rsi     # 0xbc5d5
movl $0x10, %edi
movq %r15, %rdx
callq 0x7c665
movq %r14, %rdi
callq 0x4c4aa
testq %rax, %rax
jne 0x4d70b
movq 0x10(%rbx), %rdi
movq %r15, %rsi
callq 0x41e5f
movq 0x10(%rbx), %rax
movl 0x30(%rax), %ecx
leaq 0x70e2a(%rip), %rsi     # 0xbe528
movl $0x4, %edi
movq %r15, %rdx
callq 0x7c665
movq 0x10(%rbx), %rdi
movq %r15, %rsi
callq 0x41d90
movq %r15, %rdi
callq 0x40c8f
leaq 0xb4182(%rip), %rax     # 0x1018a8
incq 0x720(%rax)
jmp 0x4d636
movq 0x50(%r15), %rsi
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x3c854
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_list.c
// Function: blockForKeys
void blockForKeys(client *c, robj **keys, int numkeys, mstime_t timeout, robj *target) {
    dictEntry *de;
    list *l;
    int j;

    c->bpop.timeout = timeout;
    c->bpop.target = target;

    if (target != NULL) incrRefCount(target);

    for (j = 0; j < numkeys; j++) {
        /* If the key already exists in the dict ignore it. */
        if (dictAdd(c->bpop.keys,keys[j],NULL) != DICT_OK) continue;
        incrRefCount(keys[j]);

        /* And in the other "side", to map keys -> clients */
        de = dictFind(c->db->blocking_keys,keys[j]);
        if (de == NULL) {
            int retval;

            /* For every key we take a list of clients blocked for it */
            l = listCreate();
            retval = dictAdd(c->db->blocking_keys,keys[j],l);
            incrRefCount(keys[j]);
            serverAssertWithInfo(c,keys[j],retval == DICT_OK);
        } else {
            l = dictGetVal(de);
        }
        listAddNodeTail(l,c);
    }
    blockClient(c,BLOCKED_LIST);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq %rcx, 0x170(%rdi)
movq %r8, 0x180(%rdi)
testq %r8, %r8
je 0x4d775
movq %r8, %rdi
callq 0x407a8
testl %ebp, %ebp
jle 0x4d7f8
movl %ebp, %r12d
xorl %r13d, %r13d
movq 0x178(%rbx), %rdi
movq (%r14,%r13,8), %rsi
xorl %edx, %edx
callq 0x2e9b8
testl %eax, %eax
jne 0x4d7f0
movq (%r14,%r13,8), %rdi
callq 0x407a8
movq 0x10(%rbx), %rax
movq 0x10(%rax), %rdi
movq (%r14,%r13,8), %rsi
callq 0x2ebca
testq %rax, %rax
je 0x4d7ba
movq 0x8(%rax), %r15
jmp 0x4d7e5
callq 0x2b17c
movq %rax, %r15
movq 0x10(%rbx), %rax
movq 0x10(%rax), %rdi
movq (%r14,%r13,8), %rsi
movq %r15, %rdx
callq 0x2e9b8
movl %eax, %ebp
movq (%r14,%r13,8), %rdi
callq 0x407a8
testl %ebp, %ebp
jne 0x4d813
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2b24b
incq %r13
cmpq %r13, %r12
jne 0x4d77f
movq %rbx, %rdi
movl $0x1, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7cbc0
movq (%r14,%r13,8), %rsi
leaq 0x73712(%rip), %rdx     # 0xc0f30
leaq 0x75b17(%rip), %rcx     # 0xc333c
movq %rbx, %rdi
movl $0x280, %r8d            # imm = 0x280
callq 0x627c3
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_list.c
// Function: unblockClientWaitingData
void unblockClientWaitingData(client *c) {
    dictEntry *de;
    dictIterator *di;
    list *l;

    serverAssertWithInfo(c,NULL,dictSize(c->bpop.keys) != 0);
    di = dictGetIterator(c->bpop.keys);
    /* The client may wait for multiple keys, so unblock it for every key. */
    while((de = dictNext(di)) != NULL) {
        robj *key = dictGetKey(de);

        /* Remove this client from the list of clients waiting for this key. */
        l = dictFetchValue(c->db->blocking_keys,key);
        serverAssertWithInfo(c,key,l != NULL);
        listDelNode(l,listSearchKey(l,c));
        /* If the list is empty we need to remove it to avoid wasting memory */
        if (listLength(l) == 0)
            dictDelete(c->db->blocking_keys,key);
    }
    dictReleaseIterator(di);

    /* Cleanup the client structure */
    dictEmpty(c->bpop.keys,NULL);
    if (c->bpop.target) {
        decrRefCount(c->bpop.target);
        c->bpop.target = NULL;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x178(%rdi), %rdi
movq 0x28(%rdi), %rax
addq 0x48(%rdi), %rax
je 0x4d927
callq 0x2efbb
movq %rax, %r14
movq %rax, %rdi
callq 0x2f015
testq %rax, %rax
je 0x4d8c0
movq (%rax), %r15
movq 0x10(%rbx), %rax
movq 0x10(%rax), %rdi
movq %r15, %rsi
callq 0x2ef19
testq %rax, %rax
je 0x4d8fe
movq %rax, %r12
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2b470
movq %r12, %rdi
movq %rax, %rsi
callq 0x2b331
cmpq $0x0, 0x28(%r12)
jne 0x4d8bb
movq 0x10(%rbx), %rax
movq 0x10(%rax), %rdi
movq %r15, %rsi
callq 0x2ecb5
movq %r14, %rdi
jmp 0x4d868
movq %r14, %rdi
callq 0x2f0dd
movq 0x178(%rbx), %rdi
xorl %esi, %esi
callq 0x2f51e
movq 0x180(%rbx), %rdi
testq %rdi, %rdi
je 0x4d8f2
callq 0x40c8f
movq $0x0, 0x180(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x75b23(%rip), %rdx     # 0xc3428
leaq 0x75a30(%rip), %rcx     # 0xc333c
movq %rbx, %rdi
movq %r15, %rsi
movl $0x298, %r8d            # imm = 0x298
callq 0x627c3
movl $0x1, %edi
callq 0x263c0
leaq 0x75ade(%rip), %rdx     # 0xc340c
leaq 0x75a07(%rip), %rcx     # 0xc333c
movq %rbx, %rdi
xorl %esi, %esi
movl $0x290, %r8d            # imm = 0x290
jmp 0x4d918
// File: /workspace/github_c_makefile_star2_O3/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 0x2ebca
testq %rax, %rax
je 0x4d9b8
movq 0x18(%r14), %rdi
movq %rbx, %rsi
callq 0x2ebca
testq %rax, %rax
jne 0x4d9b8
movl $0x10, %edi
callq 0x382d1
movq %rax, %r15
movq %rbx, 0x8(%rax)
movq %r14, (%rax)
movq %rbx, %rdi
callq 0x407a8
leaq 0xb3f19(%rip), %rax     # 0x1018a8
movq 0x928(%rax), %rdi
movq %r15, %rsi
callq 0x2b24b
movq %rbx, %rdi
callq 0x407a8
movq 0x18(%r14), %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x2e9b8
testl %eax, %eax
jne 0x4d9be
popq %rbx
popq %r14
popq %r15
retq
leaq 0x75a6d(%rip), %rdi     # 0xc3432
leaq 0x75970(%rip), %rsi     # 0xc333c
movl $0x2c3, %edx            # imm = 0x2C3
callq 0x61908
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/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 0x7cb4c
testl %eax, %eax
jne 0x4e009
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
callq 0x41ad6
testq %rax, %rax
je 0x4dfc1
movq %rax, %r14
movl (%rax), %eax
andl $0xf, %eax
cmpl $0x1, %eax
jne 0x4dfe9
movq %r14, %rdi
callq 0x4c4aa
testq %rax, %rax
je 0x4e011
movq %rbx, %rdi
callq 0x4d5f6
jmp 0x4e009
testb $0x8, 0x98(%rbx)
jne 0x4dff6
movq 0x40(%rbx), %rsi
movq (%rsp), %rcx
movq 0x10(%rsi), %r8
addq $0x8, %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x4d747
jmp 0x4e009
leaq 0xb4320(%rip), %rax     # 0x102310
movq 0x70(%rax), %rsi
jmp 0x4e001
leaq 0xb4313(%rip), %rax     # 0x102310
movq 0x50(%rax), %rsi
movq %rbx, %rdi
callq 0x3c854
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x75454(%rip), %rdx     # 0xc346c
leaq 0x7531d(%rip), %rcx     # 0xc333c
movq %rbx, %rdi
movq %r14, %rsi
movl $0x3be, %r8d            # imm = 0x3BE
callq 0x627c3
movl $0x1, %edi
callq 0x263c0
nop
// File: /workspace/github_c_makefile_star2_O3/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 0x4e08e
cmpl $0x2, %eax
jne 0x4e12b
movq 0x8(%r14), %rdi
xorl %r14d, %r14d
movq %rbx, %rsi
xorl %edx, %edx
callq 0x2e9b8
testl %eax, %eax
jne 0x4e0d0
jmp 0x4e0c2
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x40d6d
testl %eax, %eax
je 0x4e0db
movq %r14, %rdi
movl $0x2, %esi
callq 0x4e16d
movq 0x8(%r14), %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x2e9b8
testl %eax, %eax
jne 0x4e145
movq %rbx, %rdi
callq 0x407a8
movl $0x1, %r14d
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 0x64a18
movq %rax, 0x8(%r14)
cmpb $0x0, (%rbx)
je 0x4e126
movq %rax, %rdi
callq 0x64e5b
movl %eax, %eax
leaq 0xb379a(%rip), %rcx     # 0x1018a8
cmpq %rax, 0x950(%rcx)
jae 0x4e0ca
movq %r14, %rdi
movl $0x2, %esi
callq 0x4e16d
jmp 0x4e0ca
xorl %r14d, %r14d
jmp 0x4e0d0
leaq 0x74938(%rip), %rdi     # 0xc2a6a
leaq 0x75377(%rip), %rsi     # 0xc34b0
movl $0x53, %edx
callq 0x619b4
jmp 0x4e163
leaq 0x75338(%rip), %rdx     # 0xc3484
leaq 0x7535d(%rip), %rcx     # 0xc34b0
xorl %edi, %edi
movq %rbx, %rsi
movl $0x4e, %r8d
callq 0x627c3
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/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 0x4e252
cmpl $0x2, %esi
jne 0x4e26d
leaq 0xb2c19(%rip), %rdi     # 0x100db0
xorl %esi, %esi
callq 0x2e68c
movq %rax, %r14
movq 0x8(%rbx), %rdi
callq 0x64e5b
movl %eax, %esi
movq %r14, %rdi
callq 0x2e6fa
movq %rbx, %rdi
callq 0x4e3b6
movq %rax, %r15
leaq 0x10(%rsp), %r12
leaq 0x8(%rsp), %r13
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x4e442
cmpl $-0x1, %eax
je 0x4e222
movq 0x8(%rsp), %rdi
callq 0x40753
movq %rax, %rbp
movq %r14, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x2e9b8
testl %eax, %eax
je 0x4e1c9
leaq 0x75335(%rip), %rdx     # 0xc3536
leaq 0x752a8(%rip), %rcx     # 0xc34b0
xorl %edi, %edi
movq %rbp, %rsi
movl $0x104, %r8d            # imm = 0x104
callq 0x627c3
movl $0x1, %edi
callq 0x263c0
movq %r15, %rdi
callq 0x4e426
movl $0xffffff0f, %eax       # imm = 0xFFFFFF0F
andl (%rbx), %eax
orl $0x20, %eax
movl %eax, (%rbx)
movq 0x8(%rbx), %rdi
callq 0x38413
movq %r14, 0x8(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7529a(%rip), %rdx     # 0xc34f3
leaq 0x75250(%rip), %rcx     # 0xc34b0
xorl %edi, %edi
movq %rbx, %rsi
movl $0xf5, %r8d
jmp 0x4e213
leaq 0x752e5(%rip), %rdi     # 0xc3559
leaq 0x75235(%rip), %rsi     # 0xc34b0
movl $0x10c, %edx            # imm = 0x10C
callq 0x619b4
jmp 0x4e218
// File: /workspace/github_c_makefile_star2_O3/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 0x4e2ce
cmpl $0x2, %eax
jne 0x4e313
movq 0x8(%rbx), %rdi
callq 0x2ecb5
testl %eax, %eax
jne 0x4e2e0
movq 0x8(%rbx), %rdi
callq 0x30340
movl $0x1, %ebp
testl %eax, %eax
je 0x4e2e2
movq 0x8(%rbx), %rdi
callq 0x2e6d1
jmp 0x4e2e2
movq %rsp, %rax
movq %rsi, %rdi
movq %rax, %rsi
callq 0x40d6d
testl %eax, %eax
je 0x4e2ed
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 0x64ccf
movq %rax, 0x8(%rbx)
cmpl $0x0, (%r14)
movl $0x1, %ebp
jne 0x4e2e2
jmp 0x4e2e0
leaq 0x74750(%rip), %rdi     # 0xc2a6a
leaq 0x7518f(%rip), %rsi     # 0xc34b0
movl $0x66, %edx
callq 0x619b4
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/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 0x4e365
cmpl $0x2, %eax
jne 0x4e394
movq 0x8(%rbx), %rdi
callq 0x2ebca
movq %rax, %rcx
xorl %eax, %eax
testq %rcx, %rcx
setne %al
jmp 0x4e38e
leaq 0x8(%rsp), %rax
movq %rsi, %rdi
movq %rax, %rsi
callq 0x40d6d
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x4e38e
movq 0x8(%rbx), %rdi
movq 0x8(%rsp), %rsi
callq 0x64dc9
movzbl %al, %eax
addq $0x10, %rsp
popq %rbx
retq
leaq 0x746cf(%rip), %rdi     # 0xc2a6a
leaq 0x7510e(%rip), %rsi     # 0xc34b0
movl $0x74, %edx
callq 0x619b4
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x18, %edi
callq 0x382d1
movq %rax, %rbx
movq %r14, (%rax)
movl (%r14), %eax
shrl $0x4, %eax
andl $0xf, %eax
movl %eax, 0x8(%rbx)
cmpl $0x6, %eax
je 0x4e3f2
cmpl $0x2, %eax
jne 0x4e404
movq 0x8(%r14), %rdi
callq 0x2efbb
movq %rax, 0x10(%rbx)
jmp 0x4e3f9
movl $0x0, 0xc(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x7465f(%rip), %rdi     # 0xc2a6a
leaq 0x7509e(%rip), %rsi     # 0xc34b0
movl $0x82, %edx
callq 0x619b4
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/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 0x4e47a
cmpl $0x2, %eax
jne 0x4e4ad
movq 0x10(%rbx), %rdi
callq 0x2f015
testq %rax, %rax
je 0x4e4a2
movq (%rax), %rax
movq %rax, (%r14)
movq $-0x75bcd15, (%r15)     # imm = 0xF8A432EB
jmp 0x4e49d
movq (%rbx), %rax
movq 0x8(%rax), %rdi
movl 0xc(%rbx), %esi
leal 0x1(%rsi), %eax
movl %eax, 0xc(%rbx)
movq %r15, %rdx
callq 0x64e29
testb %al, %al
je 0x4e4a2
movq $0x0, (%r14)
movl 0x8(%rbx), %eax
jmp 0x4e4a7
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %r15
retq
leaq 0x75004(%rip), %rdi     # 0xc34b8
leaq 0x74ff5(%rip), %rsi     # 0xc34b0
movl $0xa7, %edx
callq 0x619b4
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/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 0x4e442
cmpl $-0x1, %eax
je 0x4e50d
cmpl $0x2, %eax
je 0x4e4ff
cmpl $0x6, %eax
jne 0x4e518
movq 0x8(%rsp), %rdi
callq 0x40753
movq %rax, %rbx
jmp 0x4e50f
movq (%rsp), %rbx
movq %rbx, %rdi
callq 0x407a8
jmp 0x4e50f
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
leaq 0x74fbd(%rip), %rdi     # 0xc34dc
leaq 0x74f8a(%rip), %rsi     # 0xc34b0
movl $0xc1, %edx
callq 0x619b4
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/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 0x4e572
cmpl $0x2, %eax
jne 0x4e593
movq 0x8(%rbx), %rdi
callq 0x2f141
movq (%rax), %rax
movq %rax, (%r15)
movq $-0x75bcd15, (%r14)     # imm = 0xF8A432EB
jmp 0x4e585
movq 0x8(%rbx), %rdi
callq 0x64df5
movq %rax, (%r14)
movq $0x0, (%r15)
movl (%rbx), %eax
shrl $0x4, %eax
andl $0xf, %eax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x744d0(%rip), %rdi     # 0xc2a6a
leaq 0x74f0f(%rip), %rsi     # 0xc34b0
movl $0xe0, %edx
callq 0x619b4
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/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 0x4e5d6
cmpl $0x2, %eax
jne 0x4e5e3
movq 0x8(%rdi), %rcx
movq 0x48(%rcx), %rax
addq 0x28(%rcx), %rax
jmp 0x4e5e1
movq 0x8(%rdi), %rdi
callq 0x64e5b
movl %eax, %eax
popq %rcx
retq
leaq 0x74480(%rip), %rdi     # 0xc2a6a
leaq 0x74ebf(%rip), %rsi     # 0xc34b0
movl $0xeb, %edx
callq 0x619b4
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
callq 0x41ad6
testq %rax, %rax
je 0x4e651
movq %rax, %r15
movl (%rax), %eax
andl $0xf, %eax
cmpl $0x2, %eax
je 0x4e675
leaq 0xb3cd6(%rip), %rax     # 0x102310
movq 0x70(%rax), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3c854
movq 0x40(%rbx), %rax
movq 0x10(%rax), %rdi
callq 0x4e03c
movq %rax, %r15
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
movq %r15, %rdx
callq 0x41b77
xorl %r14d, %r14d
cmpl $0x3, 0x38(%rbx)
jl 0x4e6f6
movl $0x2, %r12d
movq 0x40(%rbx), %rax
movq (%rax,%r12,8), %rdi
callq 0x40e09
movq 0x40(%rbx), %rcx
movq %rax, (%rcx,%r12,8)
movq 0x40(%rbx), %rax
movq (%rax,%r12,8), %rsi
movq %r15, %rdi
callq 0x4e054
addl %eax, %r14d
incq %r12
movslq 0x38(%rbx), %rax
cmpq %rax, %r12
jl 0x4e684
testl %r14d, %r14d
je 0x4e6f3
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
callq 0x41d90
movq 0x10(%rbx), %rax
movq 0x40(%rbx), %rcx
movq 0x8(%rcx), %rdx
movl 0x30(%rax), %ecx
leaq 0x6df31(%rip), %rsi     # 0xbc615
movl $0x20, %edi
callq 0x7c665
movl %r14d, %r14d
jmp 0x4e6f6
xorl %r14d, %r14d
leaq 0xb31ab(%rip), %rax     # 0x1018a8
addq %r14, 0x720(%rax)
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3d23f
// File: /workspace/github_c_makefile_star2_O3/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 0xb3bdc(%rip), %rax     # 0x102310
movq 0x20(%rax), %rdx
callq 0x41b2b
testq %rax, %rax
je 0x4e759
movq %rax, %r15
movq %rbx, %rdi
movq %rax, %rsi
movl $0x2, %edx
callq 0x40d47
testl %eax, %eax
je 0x4e762
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %r14d, %r14d
cmpl $0x3, 0x38(%rbx)
jl 0x4e82e
movl $0x2, %r12d
movq 0x40(%rbx), %rax
movq (%rax,%r12,8), %rsi
movq %r15, %rdi
callq 0x4e287
testl %eax, %eax
je 0x4e799
incl %r14d
movq %r15, %rdi
callq 0x4e5b5
testq %rax, %rax
je 0x4e7a9
incq %r12
movslq 0x38(%rbx), %rax
cmpq %rax, %r12
jl 0x4e775
xorl %ebp, %ebp
jmp 0x4e7bd
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
callq 0x41e5f
movb $0x1, %bpl
testl %r14d, %r14d
je 0x4e82b
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
callq 0x41d90
movq 0x10(%rbx), %rax
movq 0x40(%rbx), %rcx
movq 0x8(%rcx), %rdx
movl 0x30(%rax), %ecx
leaq 0x6de31(%rip), %rsi     # 0xbc61a
movl $0x20, %edi
callq 0x7c665
testb %bpl, %bpl
je 0x4e818
movq 0x10(%rbx), %rax
movq 0x40(%rbx), %rcx
movq 0x8(%rcx), %rdx
movl 0x30(%rax), %ecx
leaq 0x6fd1a(%rip), %rsi     # 0xbe528
movl $0x4, %edi
callq 0x7c665
movslq %r14d, %r14
leaq 0xb3086(%rip), %rax     # 0x1018a8
addq %r14, 0x720(%rax)
jmp 0x4e82e
xorl %r14d, %r14d
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3d23f
// File: /workspace/github_c_makefile_star2_O3/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 0xb38da(%rip), %r15     # 0x102310
movq 0x20(%r15), %rdx
callq 0x41af9
testq %rax, %rax
je 0x4ea5b
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
movl $0x2, %edx
callq 0x40d47
testl %eax, %eax
je 0x4ea61
popq %rbx
popq %r14
popq %r15
retq
movq 0x40(%rbx), %rax
movq 0x10(%rax), %rdi
callq 0x40e09
movq 0x40(%rbx), %rcx
movq %rax, 0x10(%rcx)
movq 0x40(%rbx), %rax
movq 0x10(%rax), %rsi
movq %r14, %rdi
callq 0x4e335
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
movq 0x20(%r15,%rcx,8), %rsi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x3c854
// File: /workspace/github_c_makefile_star2_O3/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 0xb385b(%rip), %rax     # 0x102310
movq 0x20(%rax), %rdx
callq 0x41af9
testq %rax, %rax
je 0x4eada
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
movl $0x2, %edx
callq 0x40d47
testl %eax, %eax
je 0x4eae2
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %r14, %rdi
callq 0x4e5b5
movq %rbx, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3d23f
// File: /workspace/github_c_makefile_star2_O3/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 0x4f7c2
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x4f4dc
jle 0x4f7e1
leaq 0xb2b45(%rip), %rax     # 0x102310
movq 0x80(%rax), %rsi
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x3c854
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
leaq 0xb2b20(%rip), %rax     # 0x102310
movq 0x50(%rax), %rdx
movq %rbx, %rdi
callq 0x41af9
testq %rax, %rax
je 0x4f818
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
movl $0x2, %edx
callq 0x40d47
testl %eax, %eax
je 0x4f820
addq $0x18, %rsp
popq %rbx
popq %r14
retq
leaq 0x10(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
callq 0x4e53a
cmpl $0x6, %eax
jne 0x4f84b
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x3d415
movq 0x10(%rsp), %rsi
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x3d170
// File: /workspace/github_c_makefile_star2_O3/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 0x426e3
cmpl $-0x1, %eax
je 0x4fdc9
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
leaq 0xb2581(%rip), %rax     # 0x102310
movq 0x148(%rax), %rdx
movq %rbx, %rdi
callq 0x41af9
testq %rax, %rax
je 0x4fdc9
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
movl $0x2, %edx
callq 0x40d47
testl %eax, %eax
jne 0x4fdc9
movq (%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x42760
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x20, %edi
callq 0x382d1
movq %rax, %rbx
movl $0x1, 0x18(%rax)
movq $0x0, 0x10(%rax)
movl $0x218, %edi            # imm = 0x218
callq 0x382d1
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq %rax, (%rbx)
xorl %ecx, %ecx
movq $0x0, 0x18(%rax,%rcx)
movl $0x0, 0x20(%rax,%rcx)
addq $0x10, %rcx
cmpq $0x200, %rcx            # imm = 0x200
jne 0x4fe38
xorl %ecx, %ecx
movq %rcx, 0x10(%rax)
movq %rcx, 0x8(%rbx)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x38413
testq %r14, %r14
je 0x4feaf
movq (%r14), %rdi
movq 0x18(%r14), %r15
callq 0x40c8f
movq %r14, %rdi
callq 0x38413
movq %r15, %r14
testq %r15, %r15
jne 0x4fe93
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x38413
// File: /workspace/github_c_makefile_star2_O3/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
testq %rax, %rax
jle 0x5018d
leaq (,%rax,8), %rcx
xorl %r8d, %r8d
movq (%rdx,%r8), %r9
cmpq %rsi, 0x18(%r9,%r8,2)
je 0x50165
decl 0x20(%r9,%r8,2)
jmp 0x50184
movl 0x20(%rsi,%r8,2), %r10d
movl 0x20(%r9,%r8,2), %r11d
addl %r11d, %r10d
decl %r10d
movl %r10d, 0x20(%r9,%r8,2)
movq 0x18(%rsi,%r8,2), %r10
movq %r10, 0x18(%r9,%r8,2)
addq $0x8, %r8
cmpq %r8, %rcx
jne 0x50153
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)
cmpl $0x2, %eax
jl 0x501dd
movq (%rdi), %rcx
movq %rax, %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
addq $0x8, %rcx
cmpq $0x0, (%rcx)
jne 0x501dd
leaq -0x1(%rax), %rdx
decl %eax
movl %eax, 0x18(%rdi)
leaq 0x1(%rdx), %rsi
addq $-0x10, %rcx
movq %rdx, %rax
cmpq $0x2, %rsi
ja 0x501bd
decq 0x10(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/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), %r12
movq %rdi, (%rsp)
movslq 0x18(%rdi), %r15
testq %r15, %r15
jle 0x50274
movsd %xmm0, 0x8(%rsp)
movq %r15, %r13
decq %r15
movq %r15, %rbp
shlq $0x4, %rbp
movq 0x18(%r12,%rbp), %rax
testq %rax, %rax
je 0x50269
leaq (%r12,%rbp), %rbx
addq $0x18, %rbx
movsd 0x8(%rax), %xmm1
ucomisd %xmm1, %xmm0
ja 0x50256
ucomisd %xmm0, %xmm1
jne 0x50269
jp 0x50269
movq (%rax), %rdi
movq %r14, %rsi
callq 0x41222
movsd 0x8(%rsp), %xmm0
testl %eax, %eax
jns 0x50269
movq (%rbx), %rax
movq %rax, %r12
leaq (%rax,%rbp), %rbx
addq $0x18, %rbx
movq (%rbx), %rax
testq %rax, %rax
jne 0x5022b
movq %r12, 0x10(%rsp,%r15,8)
cmpq $0x1, %r13
jg 0x5020c
movq 0x18(%r12), %r15
xorl %ebp, %ebp
testq %r15, %r15
je 0x502c3
movsd 0x8(%r15), %xmm1
ucomisd %xmm0, %xmm1
jne 0x502c3
jp 0x502c3
movq (%r15), %rdi
movq %r14, %rsi
callq 0x41236
testl %eax, %eax
je 0x502c3
leaq 0x10(%rsp), %rdx
movq (%rsp), %rdi
movq %r15, %rsi
callq 0x5013f
movq (%r15), %rdi
callq 0x40c8f
movq %r15, %rdi
callq 0x38413
movl $0x1, %ebp
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_O3/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 0x50310
jne 0x50317
jp 0x50317
cmpl $0x0, 0x10(%rsi)
je 0x50311
retq
cmpl $0x0, 0x14(%rsi)
jne 0x50310
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0x50310
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 0x50310
movq (%rdi), %rcx
movq 0x18(%rcx), %rcx
testq %rcx, %rcx
je 0x50310
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_O3/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 0x502f5
testl %eax, %eax
je 0x503fc
movq (%r14), %rax
movslq 0x18(%r14), %rcx
testq %rcx, %rcx
jle 0x503ce
movq %rcx, %rdx
decq %rcx
movq %rcx, %rsi
shlq $0x4, %rsi
movq %rax, %rdi
movq %rdi, %rax
movq 0x18(%rdi,%rsi), %rdi
testq %rdi, %rdi
je 0x503c8
movsd 0x8(%rdi), %xmm0
xorl %r8d, %r8d
xorl %r9d, %r9d
ucomisd (%rbx), %xmm0
setbe %r8b
setb %r9b
cmpl $0x0, 0x10(%rbx)
cmovel %r9d, %r8d
testb %r8b, %r8b
jne 0x50397
cmpq $0x1, %rdx
jg 0x50387
movq 0x18(%rax), %rcx
testq %rcx, %rcx
je 0x50406
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 0x503fe
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x732d2(%rip), %rdi     # 0xc36df
leaq 0x732c2(%rip), %rsi     # 0xc36d6
movl $0x100, %edx            # imm = 0x100
callq 0x61908
movl $0x1, %edi
callq 0x263c0