LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/pubsub.c
// Function: pubsubSubscribePattern
int pubsubSubscribePattern(client *c, robj *pattern) {
    int retval = 0;

    if (listSearchKey(c->pubsub_patterns,pattern) == NULL) {
        retval = 1;
        pubsubPattern *pat;
        listAddNodeTail(c->pubsub_patterns,pattern);
        incrRefCount(pattern);
        pat = zmalloc(sizeof(*pat));
        pat->pattern = getDecodedObject(pattern);
        pat->client = c;
        listAddNodeTail(server.pubsub_patterns,pat);
    }
    /* Notify the client */
    addReply(c,shared.mbulkhdr[3]);
    addReply(c,shared.psubscribebulk);
    addReplyBulk(c,pattern);
    addReplyLongLong(c,clientSubscriptionsCount(c));
    return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x1b0(%rdi), %rdi
callq 0x2b470
xorl %ebp, %ebp
testq %rax, %rax
jne 0x600bc
movq 0x1b0(%rbx), %rdi
movq %r14, %rsi
callq 0x2b24b
movq %r14, %rdi
callq 0x407a8
movl $0x10, %edi
callq 0x382d1
movq %rax, %r15
movq %r14, %rdi
callq 0x41026
movq %rax, 0x8(%r15)
movq %rbx, (%r15)
leaq 0xa1800(%rip), %rax     # 0x1018a8
movq 0x990(%rax), %rdi
movq %r15, %rsi
callq 0x2b24b
movl $0x1, %ebp
leaq 0xa224d(%rip), %r15     # 0x102310
movq 0x13a48(%r15), %rsi
movq %rbx, %rdi
callq 0x3c854
movq 0x118(%r15), %rsi
movq %rbx, %rdi
callq 0x3c854
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3d170
movq 0x1a8(%rbx), %rax
movl 0x48(%rax), %ecx
addl 0x28(%rax), %ecx
movq 0x1b0(%rbx), %rax
addl 0x28(%rax), %ecx
movslq %ecx, %rsi
movq %rbx, %rdi
callq 0x3d23f
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/pubsub.c
// Function: pubsubUnsubscribePattern
int pubsubUnsubscribePattern(client *c, robj *pattern, int notify) {
    listNode *ln;
    pubsubPattern pat;
    int retval = 0;

    incrRefCount(pattern); /* Protect the object. May be the same we remove */
    if ((ln = listSearchKey(c->pubsub_patterns,pattern)) != NULL) {
        retval = 1;
        listDelNode(c->pubsub_patterns,ln);
        pat.client = c;
        pat.pattern = pattern;
        ln = listSearchKey(server.pubsub_patterns,&pat);
        listDelNode(server.pubsub_patterns,ln);
    }
    /* Notify the client */
    if (notify) {
        addReply(c,shared.mbulkhdr[3]);
        addReply(c,shared.punsubscribebulk);
        addReplyBulk(c,pattern);
        addReplyLongLong(c,dictSize(c->pubsub_channels)+
                       listLength(c->pubsub_patterns));
    }
    decrRefCount(pattern);
    return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x407a8
movq 0x1b0(%r14), %rdi
movq %rbx, %rsi
callq 0x2b470
testq %rax, %rax
je 0x6018e
movq 0x1b0(%r14), %rdi
movq %rax, %rsi
callq 0x2b331
movq %rsp, %rsi
movq %r14, (%rsi)
movq %rbx, 0x8(%rsi)
leaq 0xa173d(%rip), %r15     # 0x1018a8
movq 0x990(%r15), %rdi
callq 0x2b470
movq 0x990(%r15), %rdi
movq %rax, %rsi
callq 0x2b331
movl $0x1, %r15d
jmp 0x60191
xorl %r15d, %r15d
testl %ebp, %ebp
je 0x601e9
leaq 0xa2174(%rip), %r12     # 0x102310
movq 0x13a48(%r12), %rsi
movq %r14, %rdi
callq 0x3c854
movq 0x120(%r12), %rsi
movq %r14, %rdi
callq 0x3c854
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3d170
movq 0x1a8(%r14), %rax
movq 0x1b0(%r14), %rcx
movq 0x48(%rax), %rsi
addq 0x28(%rax), %rsi
addq 0x28(%rcx), %rsi
movq %r14, %rdi
callq 0x3d23f
movq %rbx, %rdi
callq 0x40c8f
movl %r15d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/pubsub.c
// Function: pubsubUnsubscribeAllChannels
int pubsubUnsubscribeAllChannels(client *c, int notify) {
    dictIterator *di = dictGetSafeIterator(c->pubsub_channels);
    dictEntry *de;
    int count = 0;

    while((de = dictNext(di)) != NULL) {
        robj *channel = dictGetKey(de);

        count += pubsubUnsubscribeChannel(c,channel,notify);
    }
    /* We were subscribed to nothing? Still reply to the client. */
    if (notify && count == 0) {
        addReply(c,shared.mbulkhdr[3]);
        addReply(c,shared.unsubscribebulk);
        addReply(c,shared.nullbulk);
        addReplyLongLong(c,dictSize(c->pubsub_channels)+
                       listLength(c->pubsub_patterns));
    }
    dictReleaseIterator(di);
    return count;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %r14
movq 0x1a8(%rdi), %rdi
callq 0x2efe5
movq %rax, %rbx
movq %rax, %rdi
callq 0x2f015
xorl %ebp, %ebp
testq %rax, %rax
je 0x60246
movq (%rax), %rsi
movq %r14, %rdi
movl %r15d, %edx
callq 0x5ff09
addl %eax, %ebp
movq %rbx, %rdi
callq 0x2f015
jmp 0x60227
testl %r15d, %r15d
je 0x602a2
testl %ebp, %ebp
jne 0x602a2
leaq 0xa20ba(%rip), %r15     # 0x102310
movq 0x13a48(%r15), %rsi
movq %r14, %rdi
callq 0x3c854
movq 0x110(%r15), %rsi
movq %r14, %rdi
callq 0x3c854
movq 0x50(%r15), %rsi
movq %r14, %rdi
callq 0x3c854
movq 0x1a8(%r14), %rax
movq 0x1b0(%r14), %rcx
movq 0x48(%rax), %rsi
addq 0x28(%rax), %rsi
addq 0x28(%rcx), %rsi
movq %r14, %rdi
callq 0x3d23f
movq %rbx, %rdi
callq 0x2f0dd
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/pubsub.c
// Function: pubsubUnsubscribeAllPatterns
int pubsubUnsubscribeAllPatterns(client *c, int notify) {
    listNode *ln;
    listIter li;
    int count = 0;

    listRewind(c->pubsub_patterns,&li);
    while ((ln = listNext(&li)) != NULL) {
        robj *pattern = ln->value;

        count += pubsubUnsubscribePattern(c,pattern,notify);
    }
    if (notify && count == 0) {
        /* We were subscribed to nothing? Still reply to the client. */
        addReply(c,shared.mbulkhdr[3]);
        addReply(c,shared.punsubscribebulk);
        addReply(c,shared.nullbulk);
        addReplyLongLong(c,dictSize(c->pubsub_channels)+
                       listLength(c->pubsub_patterns));
    }
    return count;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %esi, %r14d
movq %rdi, %rbx
movq 0x1b0(%rdi), %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rsi
callq 0x2b3b7
movq %r15, %rdi
callq 0x2b3d4
xorl %ebp, %ebp
testq %rax, %rax
je 0x6030d
leaq 0x8(%rsp), %r15
movq 0x10(%rax), %rsi
movq %rbx, %rdi
movl %r14d, %edx
callq 0x6011b
addl %eax, %ebp
movq %r15, %rdi
callq 0x2b3d4
testq %rax, %rax
jne 0x602ef
testl %r14d, %r14d
je 0x60369
testl %ebp, %ebp
jne 0x60369
leaq 0xa1ff3(%rip), %r14     # 0x102310
movq 0x13a48(%r14), %rsi
movq %rbx, %rdi
callq 0x3c854
movq 0x120(%r14), %rsi
movq %rbx, %rdi
callq 0x3c854
movq 0x50(%r14), %rsi
movq %rbx, %rdi
callq 0x3c854
movq 0x1a8(%rbx), %rax
movq 0x1b0(%rbx), %rcx
movq 0x48(%rax), %rsi
addq 0x28(%rax), %rsi
addq 0x28(%rcx), %rsi
movq %rbx, %rdi
callq 0x3d23f
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/pubsub.c
// Function: subscribeCommand
void subscribeCommand(client *c) {
    int j;

    for (j = 1; j < c->argc; j++)
        pubsubSubscribeChannel(c,c->argv[j]);
    c->flags |= CLIENT_PUBSUB;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x2, 0x38(%rdi)
jl 0x6059d
movl $0x1, %r14d
movq 0x40(%rbx), %rax
movq (%rax,%r14,8), %rsi
movq %rbx, %rdi
callq 0x5fe25
incq %r14
movslq 0x38(%rbx), %rax
cmpq %rax, %r14
jl 0x60581
orb $0x4, 0x9a(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/pubsub.c
// Function: unsubscribeCommand
void unsubscribeCommand(client *c) {
    if (c->argc == 1) {
        pubsubUnsubscribeAllChannels(c,1);
    } else {
        int j;

        for (j = 1; j < c->argc; j++)
            pubsubUnsubscribeChannel(c,c->argv[j],1);
    }
    if (clientSubscriptionsCount(c) == 0) c->flags &= ~CLIENT_PUBSUB;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x38(%rdi), %eax
cmpl $0x1, %eax
jne 0x605ca
movq %rbx, %rdi
movl $0x1, %esi
callq 0x60201
jmp 0x605f3
jle 0x605f3
movl $0x1, %r14d
movq 0x40(%rbx), %rax
movq (%rax,%r14,8), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x5ff09
incq %r14
movslq 0x38(%rbx), %rax
cmpq %rax, %r14
jl 0x605d2
movq 0x1a8(%rbx), %rax
movq 0x1b0(%rbx), %rcx
movl 0x48(%rax), %edx
addl 0x28(%rax), %edx
addl 0x28(%rcx), %edx
jne 0x60613
andb $-0x5, 0x9a(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/pubsub.c
// Function: psubscribeCommand
void psubscribeCommand(client *c) {
    int j;

    for (j = 1; j < c->argc; j++)
        pubsubSubscribePattern(c,c->argv[j]);
    c->flags |= CLIENT_PUBSUB;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x2, 0x38(%rdi)
jl 0x6064a
movl $0x1, %r14d
movq 0x40(%rbx), %rax
movq (%rax,%r14,8), %rsi
movq %rbx, %rdi
callq 0x6004e
incq %r14
movslq 0x38(%rbx), %rax
cmpq %rax, %r14
jl 0x6062e
orb $0x4, 0x9a(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/pubsub.c
// Function: punsubscribeCommand
void punsubscribeCommand(client *c) {
    if (c->argc == 1) {
        pubsubUnsubscribeAllPatterns(c,1);
    } else {
        int j;

        for (j = 1; j < c->argc; j++)
            pubsubUnsubscribePattern(c,c->argv[j],1);
    }
    if (clientSubscriptionsCount(c) == 0) c->flags &= ~CLIENT_PUBSUB;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x38(%rdi), %eax
cmpl $0x1, %eax
jne 0x60677
movq %rbx, %rdi
movl $0x1, %esi
callq 0x602b7
jmp 0x606a0
jle 0x606a0
movl $0x1, %r14d
movq 0x40(%rbx), %rax
movq (%rax,%r14,8), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x6011b
incq %r14
movslq 0x38(%rbx), %rax
cmpq %rax, %r14
jl 0x6067f
movq 0x1a8(%rbx), %rax
movq 0x1b0(%rbx), %rcx
movl 0x48(%rax), %edx
addl 0x28(%rax), %edx
addl 0x28(%rcx), %edx
jne 0x606c0
andb $-0x5, 0x9a(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/pubsub.c
// Function: publishCommand
void publishCommand(client *c) {
    int receivers = pubsubPublishMessage(c->argv[1],c->argv[2]);
    if (server.cluster_enabled)
        clusterPropagatePublish(c->argv[1],c->argv[2]);
    else
        forceCommandPropagation(c,PROPAGATE_REPL);
    addReplyLongLong(c,receivers);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movq 0x8(%rax), %rdi
movq 0x10(%rax), %rsi
callq 0x60376
movl %eax, %ebp
leaq 0xa11c0(%rip), %rax     # 0x1018a8
cmpl $0x0, 0x99c(%rax)
je 0x60704
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rdi
movq 0x10(%rax), %rsi
callq 0x68fab
jmp 0x60711
movq %rbx, %rdi
movl $0x2, %esi
callq 0x32e87
movslq %ebp, %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3d23f
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/multi.c
// Function: freeClientMultiState
void freeClientMultiState(client *c) {
    int j;

    for (j = 0; j < c->mstate.count; j++) {
        int i;
        multiCmd *mc = c->mstate.commands+j;

        for (i = 0; i < mc->argc; i++)
            decrRefCount(mc->argv[i]);
        zfree(mc->argv);
    }
    zfree(c->mstate.commands);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x158(%rdi)
jle 0x609fd
xorl %r14d, %r14d
movq 0x150(%rbx), %rax
leaq (%r14,%r14,2), %rcx
leaq (%rax,%rcx,8), %r15
cmpl $0x0, 0x8(%r15)
jle 0x609e6
xorl %r12d, %r12d
movq (%r15), %rax
movq (%rax,%r12,8), %rdi
callq 0x40c8f
incq %r12
movslq 0x8(%r15), %rax
cmpq %rax, %r12
jl 0x609ce
movq (%r15), %rdi
callq 0x38413
incq %r14
movslq 0x158(%rbx), %rax
cmpq %rax, %r14
jl 0x609b5
movq 0x150(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x38413
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/multi.c
// Function: queueMultiCommand
void queueMultiCommand(client *c) {
    multiCmd *mc;
    int j;

    c->mstate.commands = zrealloc(c->mstate.commands,
            sizeof(multiCmd)*(c->mstate.count+1));
    mc = c->mstate.commands+c->mstate.count;
    mc->cmd = c->cmd;
    mc->argc = c->argc;
    mc->argv = zmalloc(sizeof(robj*)*c->argc);
    memcpy(mc->argv,c->argv,sizeof(robj*)*c->argc);
    for (j = 0; j < c->argc; j++)
        incrRefCount(mc->argv[j]);
    c->mstate.count++;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x150(%rdi), %rdi
movslq 0x158(%rbx), %rax
leaq (%rax,%rax,2), %rax
leaq 0x18(,%rax,8), %rsi
callq 0x3837d
movq %rax, %r14
movq %rax, 0x150(%rbx)
movslq 0x158(%rbx), %rax
leaq (%rax,%rax,2), %r15
movq 0x48(%rbx), %rax
movq %rax, 0x10(%r14,%r15,8)
movslq 0x38(%rbx), %rdi
movl %edi, 0x8(%r14,%r15,8)
shlq $0x3, %rdi
callq 0x382d1
movq %rax, (%r14,%r15,8)
movq 0x40(%rbx), %rsi
movslq 0x38(%rbx), %rdx
shlq $0x3, %rdx
movq %rax, %rdi
callq 0x26c50
cmpl $0x0, 0x38(%rbx)
jle 0x60aa8
leaq (%r14,%r15,8), %r14
xorl %r15d, %r15d
movq (%r14), %rax
movq (%rax,%r15,8), %rdi
callq 0x407a8
incq %r15
movslq 0x38(%rbx), %rax
cmpq %rax, %r15
jl 0x60a90
incl 0x158(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/multi.c
// Function: discardTransaction
void discardTransaction(client *c) {
    freeClientMultiState(c);
    initClientMultiState(c);
    c->flags &= ~(CLIENT_MULTI|CLIENT_DIRTY_CAS|CLIENT_DIRTY_EXEC);
    unwatchAllKeys(c);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x6099e
movq $0x0, 0x150(%rbx)
movl $0x0, 0x158(%rbx)
andl $0xffffefd7, 0x98(%rbx) # imm = 0xFFFFEFD7
movq %rbx, %rdi
popq %rbx
jmp 0x60ae5
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/multi.c
// Function: unwatchAllKeys
void unwatchAllKeys(client *c) {
    listIter li;
    listNode *ln;

    if (listLength(c->watched_keys) == 0) return;
    listRewind(c->watched_keys,&li);
    while((ln = listNext(&li))) {
        list *clients;
        watchedKey *wk;

        /* Lookup the watched key -> clients list and remove the client
         * from the list */
        wk = listNodeValue(ln);
        clients = dictFetchValue(wk->db->watched_keys, wk->key);
        serverAssertWithInfo(c,NULL,clients != NULL);
        listDelNode(clients,listSearchKey(clients,c));
        /* Kill the entry at all if this was the only client */
        if (listLength(clients) == 0)
            dictDelete(wk->db->watched_keys, wk->key);
        /* Remove this watched key from the client->watched list */
        listDelNode(c->watched_keys,ln);
        decrRefCount(wk->key);
        zfree(wk);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x1a0(%rdi), %rdi
cmpq $0x0, 0x28(%rdi)
je 0x60ba6
movq %rsp, %r14
movq %r14, %rsi
callq 0x2b3b7
movq %r14, %rdi
callq 0x2b3d4
testq %rax, %rax
je 0x60ba6
movq %rax, %r15
movq %rsp, %r14
movq 0x10(%r15), %r12
movq (%r12), %rsi
movq 0x8(%r12), %rax
movq 0x20(%rax), %rdi
callq 0x2ef19
testq %rax, %rax
je 0x60bb4
movq %rax, %r13
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2b470
movq %r13, %rdi
movq %rax, %rsi
callq 0x2b331
cmpq $0x0, 0x28(%r13)
jne 0x60b76
movq (%r12), %rsi
movq 0x8(%r12), %rax
movq 0x20(%rax), %rdi
callq 0x2ecb5
movq 0x1a0(%rbx), %rdi
movq %r15, %rsi
callq 0x2b331
movq (%r12), %rdi
callq 0x40c8f
movq %r12, %rdi
callq 0x38413
movq %r14, %rdi
callq 0x2b3d4
movq %rax, %r15
testq %rax, %rax
jne 0x60b29
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x652c0(%rip), %rdx     # 0xc5e7b
leaq 0x652c9(%rip), %rcx     # 0xc5e8b
movq %rbx, %rdi
xorl %esi, %esi
movl $0xf7, %r8d
callq 0x627c3
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/multi.c
// Function: multiCommand
void multiCommand(client *c) {
    if (c->flags & CLIENT_MULTI) {
        addReplyError(c,"MULTI calls can not be nested");
        return;
    }
    c->flags |= CLIENT_MULTI;
    addReply(c,shared.ok);
}

// Assembly:
movl 0x98(%rdi), %eax
testb $0x8, %al
jne 0x60c15
orl $0x8, %eax
movl %eax, 0x98(%rdi)
leaq 0xa1704(%rip), %rax     # 0x102310
movq 0x8(%rax), %rsi
jmp 0x3c854
leaq 0x65218(%rip), %rsi     # 0xc5e34
jmp 0x3cc06
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/multi.c
// Function: discardCommand
void discardCommand(client *c) {
    if (!(c->flags & CLIENT_MULTI)) {
        addReplyError(c,"DISCARD without MULTI");
        return;
    }
    discardTransaction(c);
    addReply(c,shared.ok);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testb $0x8, 0x98(%rdi)
jne 0x60c3e
leaq 0x6521d(%rip), %rsi     # 0xc5e52
movq %rbx, %rdi
popq %rbx
jmp 0x3cc06
movq %rbx, %rdi
callq 0x6099e
movq $0x0, 0x150(%rbx)
movl $0x0, 0x158(%rbx)
andl $0xffffefd7, 0x98(%rbx) # imm = 0xFFFFEFD7
movq %rbx, %rdi
callq 0x60ae5
leaq 0xa169c(%rip), %rax     # 0x102310
movq 0x8(%rax), %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x3c854
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/multi.c
// Function: execCommandPropagateMulti
void execCommandPropagateMulti(client *c) {
    robj *multistring = createStringObject("MULTI",5);

    propagate(server.multiCommand,c->db->id,&multistring,1,
              PROPAGATE_AOF|PROPAGATE_REPL);
    decrRefCount(multistring);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x651e6(%rip), %rdi     # 0xc5e75
movl $0x5, %esi
callq 0x40744
movq %rsp, %r14
movq %rax, (%r14)
leaq 0xa0c02(%rip), %rax     # 0x1018a8
movq 0x348(%rax), %rdi
movq 0x10(%rbx), %rax
movl 0x30(%rax), %esi
movq %r14, %rdx
movl $0x1, %ecx
movl $0x3, %r8d
callq 0x32d75
movq (%r14), %rdi
callq 0x40c8f
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/multi.c
// Function: watchForKey
void watchForKey(client *c, robj *key) {
    list *clients = NULL;
    listIter li;
    listNode *ln;
    watchedKey *wk;

    /* Check if we are already watching for this key */
    listRewind(c->watched_keys,&li);
    while((ln = listNext(&li))) {
        wk = listNodeValue(ln);
        if (wk->db == c->db && equalStringObjects(key,wk->key))
            return; /* Key already watched */
    }
    /* This key is not already watched in this DB. Let's add it */
    clients = dictFetchValue(c->db->watched_keys,key);
    if (!clients) {
        clients = listCreate();
        dictAdd(c->db->watched_keys,key,clients);
        incrRefCount(key);
    }
    listAddNodeTail(clients,c);
    /* Add the new key to the list of keys watched by this client */
    wk = zmalloc(sizeof(*wk));
    wk->key = key;
    wk->db = c->db;
    incrRefCount(key);
    listAddNodeTail(c->watched_keys,wk);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x1a0(%rdi), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0x2b3b7
movq %r15, %rdi
callq 0x2b3d4
testq %rax, %rax
je 0x60f52
movq %rsp, %r15
movq 0x10(%rax), %rax
movq 0x8(%rax), %rcx
cmpq 0x10(%rbx), %rcx
jne 0x60f45
movq (%rax), %rsi
movq %r14, %rdi
callq 0x41236
testl %eax, %eax
jne 0x60fc7
movq %r15, %rdi
callq 0x2b3d4
testq %rax, %rax
jne 0x60f24
movq 0x10(%rbx), %rax
movq 0x20(%rax), %rdi
movq %r14, %rsi
callq 0x2ef19
movq %rax, %r15
testq %rax, %rax
jne 0x60f8d
callq 0x2b17c
movq %rax, %r15
movq 0x10(%rbx), %rax
movq 0x20(%rax), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2e9b8
movq %r14, %rdi
callq 0x407a8
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2b24b
movl $0x10, %edi
callq 0x382d1
movq %rax, %r15
movq %r14, (%rax)
movq 0x10(%rbx), %rax
movq %rax, 0x8(%r15)
movq %r14, %rdi
callq 0x407a8
movq 0x1a0(%rbx), %rdi
movq %r15, %rsi
callq 0x2b24b
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/multi.c
// Function: touchWatchedKey
void touchWatchedKey(redisDb *db, robj *key) {
    list *clients;
    listIter li;
    listNode *ln;

    if (dictSize(db->watched_keys) == 0) return;
    clients = dictFetchValue(db->watched_keys, key);
    if (!clients) return;

    /* Mark all the clients watching this key as CLIENT_DIRTY_CAS */
    /* Check if we are already watching for this key */
    listRewind(clients,&li);
    while((ln = listNext(&li))) {
        client *c = listNodeValue(ln);

        c->flags |= CLIENT_DIRTY_CAS;
    }
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq 0x20(%rdi), %rdi
movq 0x28(%rdi), %rax
addq 0x48(%rdi), %rax
je 0x61024
callq 0x2ef19
testq %rax, %rax
je 0x61024
movq %rsp, %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2b3b7
movq %rbx, %rdi
callq 0x2b3d4
testq %rax, %rax
je 0x61024
movq %rsp, %rbx
movq 0x10(%rax), %rax
orl $0x20, 0x98(%rax)
movq %rbx, %rdi
callq 0x2b3d4
testq %rax, %rax
jne 0x6100c
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/multi.c
// Function: touchWatchedKeysOnFlush
void touchWatchedKeysOnFlush(int dbid) {
    listIter li1, li2;
    listNode *ln;

    /* For every client, check all the waited keys */
    listRewind(server.clients,&li1);
    while((ln = listNext(&li1))) {
        client *c = listNodeValue(ln);
        listRewind(c->watched_keys,&li2);
        while((ln = listNext(&li2))) {
            watchedKey *wk = listNodeValue(ln);

            /* For every watched key matching the specified DB, if the
             * key exists, mark the client as dirty, as the key will be
             * removed. */
            if (dbid == -1 || wk->db->id == dbid) {
                if (dictFind(wk->db->dict, wk->key->ptr) != NULL)
                    c->flags |= CLIENT_DIRTY_CAS;
            }
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edi, %ebx
leaq 0xa086a(%rip), %rax     # 0x1018a8
movq 0x1c8(%rax), %rdi
leaq 0x8(%rsp), %r14
movq %r14, %rsi
callq 0x2b3b7
movq %r14, %rdi
callq 0x2b3d4
testq %rax, %rax
je 0x610c8
leaq 0x18(%rsp), %r14
leaq 0x8(%rsp), %r15
movq 0x10(%rax), %r12
movq 0x1a0(%r12), %rdi
movq %r14, %rsi
callq 0x2b3b7
movq %r14, %rdi
callq 0x2b3d4
testq %rax, %rax
je 0x610bb
movq 0x10(%rax), %rax
movq 0x8(%rax), %rcx
cmpl $-0x1, %ebx
je 0x6109c
cmpl %ebx, 0x30(%rcx)
jne 0x6107d
movq (%rcx), %rdi
movq (%rax), %rax
movq 0x8(%rax), %rsi
callq 0x2ebca
testq %rax, %rax
je 0x6107d
orb $0x20, 0x98(%r12)
jmp 0x6107d
movq %r15, %rdi
callq 0x2b3d4
testq %rax, %rax
jne 0x61069
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/multi.c
// Function: watchCommand
void watchCommand(client *c) {
    int j;

    if (c->flags & CLIENT_MULTI) {
        addReplyError(c,"WATCH inside MULTI is not allowed");
        return;
    }
    for (j = 1; j < c->argc; j++)
        watchForKey(c,c->argv[j]);
    addReply(c,shared.ok);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testb $0x8, 0x98(%rdi)
jne 0x61126
cmpl $0x2, 0x38(%rbx)
jl 0x6110c
movl $0x1, %r14d
movq 0x40(%rbx), %rax
movq (%rax,%r14,8), %rsi
movq %rbx, %rdi
callq 0x60ef3
incq %r14
movslq 0x38(%rbx), %rax
cmpq %rax, %r14
jl 0x610f0
leaq 0xa11fd(%rip), %rax     # 0x102310
movq 0x8(%rax), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3c854
leaq 0x64d66(%rip), %rsi     # 0xc5e93
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3cc06
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/debug.c
// Function: xorDigest
void xorDigest(unsigned char *digest, void *ptr, size_t len) {
    SHA1_CTX ctx;
    unsigned char hash[20], *s = ptr;
    int j;

    SHA1Init(&ctx);
    SHA1Update(&ctx,s,len);
    SHA1Final(hash,&ctx);

    for (j = 0; j < 20; j++)
        digest[j] ^= hash[j];
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x1c(%rsp), %r12
movq %r12, %rdi
callq 0x3a7ed
movq %r12, %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x3a808
movq %rsp, %rdi
movq %r12, %rsi
callq 0x3a8c4
xorl %eax, %eax
movb (%rsp,%rax), %cl
xorb %cl, (%rbx,%rax)
incq %rax
cmpq $0x14, %rax
jne 0x6119c
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/debug.c
// Function: mixDigest
void mixDigest(unsigned char *digest, void *ptr, size_t len) {
    SHA1_CTX ctx;
    char *s = ptr;

    xorDigest(digest,s,len);
    SHA1Init(&ctx);
    SHA1Update(&ctx,digest,20);
    SHA1Final(digest,&ctx);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
callq 0x61160
leaq 0xc(%rsp), %r14
movq %r14, %rdi
callq 0x3a7ed
movq %r14, %rdi
movq %rbx, %rsi
movl $0x14, %edx
callq 0x3a808
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3a8c4
addq $0x68, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/debug.c
// Function: serverAssert
void _serverAssert(char *estr, char *file, int line) {
    bugReportStart();
    serverLog(LL_WARNING,"=== ASSERTION FAILED ===");
    serverLog(LL_WARNING,"==> %s:%d '%s' is not true",file,line,estr);
#ifdef HAVE_BACKTRACE
    server.assert_failed = estr;
    server.assert_file = file;
    server.assert_line = line;
    serverLog(LL_WARNING,"(forcing SIGSEGV to print the bug report.)");
#endif
    *((char*)-1) = 'x';
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x9ff89(%rip), %r12     # 0x1018a8
cmpl $0x0, 0xa3c(%r12)
jne 0x61947
leaq 0x65317(%rip), %rsi     # 0xc6c48
movl $0x403, %edi            # imm = 0x403
callq 0x2fc13
movl $0x1, 0xa3c(%r12)
leaq 0x65054(%rip), %rsi     # 0xc69a2
movl $0x3, %edi
xorl %eax, %eax
callq 0x2fdad
leaq 0x6505a(%rip), %rsi     # 0xc69bb
movl $0x3, %edi
movq %r14, %rdx
movl %ebx, %ecx
movq %r15, %r8
xorl %eax, %eax
callq 0x2fdad
movq %r15, 0xa28(%r12)
movq %r14, 0xa30(%r12)
movl %ebx, 0xa38(%r12)
leaq 0x65042(%rip), %rsi     # 0xc69d6
movl $0x3, %edi
xorl %eax, %eax
callq 0x2fdad
movb $0x78, -0x1
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/debug.c
// Function: serverPanic
void _serverPanic(char *msg, char *file, int line) {
    bugReportStart();
    serverLog(LL_WARNING,"------------------------------------------------");
    serverLog(LL_WARNING,"!!! Software Failure. Press left mouse button to continue");
    serverLog(LL_WARNING,"Guru Meditation: %s #%s:%d",msg,file,line);
#ifdef HAVE_BACKTRACE
    serverLog(LL_WARNING,"(forcing SIGSEGV in order to print the stack trace)");
#endif
    serverLog(LL_WARNING,"------------------------------------------------");
    *((char*)-1) = 'x';
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x9fedd(%rip), %r12     # 0x1018a8
cmpl $0x0, 0xa3c(%r12)
jne 0x619f3
leaq 0x6526b(%rip), %rsi     # 0xc6c48
movl $0x403, %edi            # imm = 0x403
callq 0x2fc13
movl $0x1, 0xa3c(%r12)
leaq 0x65194(%rip), %r12     # 0xc6b8e
movl $0x3, %edi
movq %r12, %rsi
xorl %eax, %eax
callq 0x2fdad
leaq 0x651af(%rip), %rsi     # 0xc6bbf
movl $0x3, %edi
xorl %eax, %eax
callq 0x2fdad
leaq 0x651d6(%rip), %rsi     # 0xc6bf9
movl $0x3, %edi
movq %r15, %rdx
movq %r14, %rcx
movl %ebx, %r8d
xorl %eax, %eax
callq 0x2fdad
leaq 0x651d5(%rip), %rsi     # 0xc6c14
movl $0x3, %edi
xorl %eax, %eax
callq 0x2fdad
movl $0x3, %edi
movq %r12, %rsi
xorl %eax, %eax
callq 0x2fdad
movb $0x78, -0x1
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/./sds.h
// Function: sdsavail
static inline size_t sdsavail(const sds s) {
    unsigned char flags = s[-1];
    switch(flags&SDS_TYPE_MASK) {
        case SDS_TYPE_5: {
            return 0;
        }
        case SDS_TYPE_8: {
            SDS_HDR_VAR(8,s);
            return sh->alloc - sh->len;
        }
        case SDS_TYPE_16: {
            SDS_HDR_VAR(16,s);
            return sh->alloc - sh->len;
        }
        case SDS_TYPE_32: {
            SDS_HDR_VAR(32,s);
            return sh->alloc - sh->len;
        }
        case SDS_TYPE_64: {
            SDS_HDR_VAR(64,s);
            return sh->alloc - sh->len;
        }
    }
    return 0;
}

// Assembly:
movzbl -0x1(%rdi), %eax
andl $0x7, %eax
decl %eax
cmpl $0x3, %eax
ja 0x6284a
leaq 0x63715(%rip), %rcx     # 0xc5f30
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movzbl -0x2(%rdi), %eax
movzbl -0x3(%rdi), %ecx
jmp 0x62846
movl -0x5(%rdi), %eax
subl -0x9(%rdi), %eax
retq
movq -0x9(%rdi), %rax
subq -0x11(%rdi), %rax
retq
movzwl -0x3(%rdi), %eax
movzwl -0x5(%rdi), %ecx
subq %rcx, %rax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/debug.c
// Function: bugReportStart
void bugReportStart(void) {
    if (server.bug_report_start == 0) {
        serverLogRaw(LL_WARNING|LL_RAW,
        "\n\n=== REDIS BUG REPORT START: Cut & paste starting from here ===\n");
        server.bug_report_start = 1;
    }
}

// Assembly:
pushq %rbx
leaq 0x9f053(%rip), %rbx     # 0x1018a8
cmpl $0x0, 0xa3c(%rbx)
jne 0x62879
leaq 0x643e3(%rip), %rsi     # 0xc6c48
movl $0x403, %edi            # imm = 0x403
callq 0x2fc13
movl $0x1, 0xa3c(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/debug.c
// Function: serverAssertPrintClientInfo
void _serverAssertPrintClientInfo(client *c) {
    int j;

    bugReportStart();
    serverLog(LL_WARNING,"=== ASSERTION FAILED CLIENT CONTEXT ===");
    serverLog(LL_WARNING,"client->flags = %d", c->flags);
    serverLog(LL_WARNING,"client->fd = %d", c->fd);
    serverLog(LL_WARNING,"client->argc = %d", c->argc);
    for (j=0; j < c->argc; j++) {
        char buf[128];
        char *arg;

        if (c->argv[j]->type == OBJ_STRING && sdsEncodedObject(c->argv[j])) {
            arg = (char*) c->argv[j]->ptr;
        } else {
            snprintf(buf,sizeof(buf),"Object type: %u, encoding: %u",
                c->argv[j]->type, c->argv[j]->encoding);
            arg = buf;
        }
        serverLog(LL_WARNING,"client->argv[%d] = \"%s\" (refcount: %d)",
            j, arg, c->argv[j]->refcount);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rdi, %rbx
leaq 0x9f013(%rip), %r14     # 0x1018a8
cmpl $0x0, 0xa3c(%r14)
jne 0x628bb
leaq 0x643a2(%rip), %rsi     # 0xc6c48
movl $0x403, %edi            # imm = 0x403
callq 0x2fc13
movl $0x1, 0xa3c(%r14)
leaq 0x6413f(%rip), %rsi     # 0xc6a01
movl $0x3, %edi
xorl %eax, %eax
callq 0x2fdad
movl 0x98(%rbx), %edx
leaq 0x6414e(%rip), %rsi     # 0xc6a29
movl $0x3, %edi
xorl %eax, %eax
callq 0x2fdad
movl 0x8(%rbx), %edx
leaq 0x6414b(%rip), %rsi     # 0xc6a3c
movl $0x3, %edi
xorl %eax, %eax
callq 0x2fdad
movl 0x38(%rbx), %edx
leaq 0x64145(%rip), %rsi     # 0xc6a4c
movl $0x3, %edi
xorl %eax, %eax
callq 0x2fdad
cmpl $0x0, 0x38(%rbx)
jle 0x62992
leaq 0x6415c(%rip), %r14     # 0xc6a7c
leaq 0x64137(%rip), %r15     # 0xc6a5e
movq %rsp, %r12
xorl %r13d, %r13d
movq 0x40(%rbx), %rax
movq (%rax,%r13,8), %rax
movl (%rax), %ecx
movl %ecx, %r8d
shrl $0x4, %r8d
andl $0xf, %r8d
andl $0xf, %ecx
je 0x62966
movl $0x80, %esi
movq %r12, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x26120
movq 0x40(%rbx), %rax
movq (%rax,%r13,8), %rax
movq %r12, %rcx
jmp 0x62970
testb $0x7, %r8b
jne 0x62947
movq 0x8(%rax), %rcx
movl 0x4(%rax), %r8d
movl $0x3, %edi
movq %r14, %rsi
movl %r13d, %edx
xorl %eax, %eax
callq 0x2fdad
incq %r13
movslq 0x38(%rbx), %rax
cmpq %rax, %r13
jl 0x6292d
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/debug.c
// Function: logStackContent
void logStackContent(void **sp) {
    int i;
    for (i = 15; i >= 0; i--) {
        unsigned long addr = (unsigned long) sp+i;
        unsigned long val = (unsigned long) sp[i];

        if (sizeof(long) == 4)
            serverLog(LL_WARNING, "(%08lx) -> %08lx", addr, val);
        else
            serverLog(LL_WARNING, "(%016lx) -> %016lx", addr, val);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0xf, %r15d
leaq 0x64082(%rip), %r14     # 0xc6c8a
leaq (%rbx,%r15), %rdx
movq (%rbx,%r15,8), %rcx
movl $0x3, %edi
movq %r14, %rsi
xorl %eax, %eax
callq 0x2fdad
addq $-0x1, %r15
jb 0x62c08
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/debug.c
// Function: openDirectLogFiledes
int openDirectLogFiledes(void) {
    int log_to_stdout = server.logfile[0] == '\0';
    int fd = log_to_stdout ?
        STDOUT_FILENO :
        open(server.logfile, O_APPEND|O_CREAT|O_WRONLY, 0644);
    return fd;
}

// Assembly:
leaq 0x9eb24(%rip), %rax     # 0x1018a8
movq 0x7a0(%rax), %rdi
cmpb $0x0, (%rdi)
je 0x62da1
movl $0x441, %esi            # imm = 0x441
movl $0x1a4, %edx            # imm = 0x1A4
xorl %eax, %eax
jmp 0x26690
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/debug.c
// Function: logStackTrace
void logStackTrace(ucontext_t *uc) {
    void *trace[101];
    int trace_size = 0, fd = openDirectLogFiledes();

    if (fd == -1) return; /* If we can't log there is anything to do. */

    /* Generate the stack trace */
    trace_size = backtrace(trace+1, 100);

    if (getMcontextEip(uc) != NULL) {
        char *msg1 = "EIP:\n";
        char *msg2 = "\nBacktrace:\n";
        if (write(fd,msg1,strlen(msg1)) == -1) {/* Avoid warning. */};
        trace[0] = getMcontextEip(uc);
        backtrace_symbols_fd(trace, 1, fd);
        if (write(fd,msg2,strlen(msg2)) == -1) {/* Avoid warning. */};
    }

    /* Write symbols to log file */
    backtrace_symbols_fd(trace+1, trace_size, fd);

    /* Cleanup */
    closeDirectLogFiledes(fd);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x330, %rsp            # imm = 0x330
movq %rdi, %r14
leaq 0x9ead0(%rip), %r12     # 0x1018a8
movq 0x7a0(%r12), %rdi
cmpb $0x0, (%rdi)
je 0x62e02
movl $0x441, %esi            # imm = 0x441
movl $0x1a4, %edx            # imm = 0x1A4
xorl %eax, %eax
callq 0x26690
movl %eax, %ebx
cmpl $-0x1, %eax
jne 0x62e07
jmp 0x62e84
movl $0x1, %ebx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movl $0x64, %esi
callq 0x26140
movl %eax, %ebp
cmpq $0x0, 0xa8(%r14)
je 0x62e64
leaq 0x63f60(%rip), %rsi     # 0xc6d8c
movl $0x5, %edx
movl %ebx, %edi
callq 0x26bb0
movq 0xa8(%r14), %rax
movq %rsp, %rdi
movq %rax, (%rdi)
movl $0x1, %esi
movl %ebx, %edx
callq 0x26a00
leaq 0x63f3a(%rip), %rsi     # 0xc6d92
movl $0xc, %edx
movl %ebx, %edi
callq 0x26bb0
movq %r15, %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x26a00
movq 0x7a0(%r12), %rax
cmpb $0x0, (%rax)
je 0x62e84
movl %ebx, %edi
callq 0x26180
addq $0x330, %rsp            # imm = 0x330
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/debug.c
// Function: logCurrentClient
void logCurrentClient(void) {
    if (server.current_client == NULL) return;

    client *cc = server.current_client;
    sds client;
    int j;

    serverLogRaw(LL_WARNING|LL_RAW, "\n------ CURRENT CLIENT INFO ------\n");
    client = catClientInfoString(sdsempty(),cc);
    serverLog(LL_WARNING|LL_RAW,"%s\n", client);
    sdsfree(client);
    for (j = 0; j < cc->argc; j++) {
        robj *decoded;

        decoded = getDecodedObject(cc->argv[j]);
        serverLog(LL_WARNING|LL_RAW,"argv[%d]: '%s'\n", j,
            (char*)decoded->ptr);
        decrRefCount(decoded);
    }
    /* Check if the first argument, usually a key, is found inside the
     * selected DB, and if so print info about the associated object. */
    if (cc->argc >= 1) {
        robj *val, *key;
        dictEntry *de;

        key = getDecodedObject(cc->argv[1]);
        de = dictFind(cc->db->dict, key->ptr);
        if (de) {
            val = dictGetVal(de);
            serverLog(LL_WARNING,"key '%s' found in DB containing the following object:", (char*)key->ptr);
            serverLogObjectDebugInfo(val);
        }
        decrRefCount(key);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0x9ea05(%rip), %rax     # 0x1018a8
movq 0x1f0(%rax), %rbx
testq %rbx, %rbx
je 0x62fa2
leaq 0x63ee5(%rip), %rsi     # 0xc6d9f
movl $0x403, %edi            # imm = 0x403
callq 0x2fc13
callq 0x3628d
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3e908
movq %rax, %r14
leaq 0x70824(%rip), %rsi     # 0xd3702
movl $0x403, %edi            # imm = 0x403
movq %rax, %rdx
xorl %eax, %eax
callq 0x2fdad
movq %r14, %rdi
callq 0x36330
cmpl $0x0, 0x38(%rbx)
jle 0x62fa2
leaq 0x63ebd(%rip), %r14     # 0xc6dc3
xorl %r15d, %r15d
movq 0x40(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x41026
movq %rax, %r12
movq 0x8(%rax), %rcx
movl $0x403, %edi            # imm = 0x403
movq %r14, %rsi
movl %r15d, %edx
xorl %eax, %eax
callq 0x2fdad
movq %r12, %rdi
callq 0x40c8f
incq %r15
movslq 0x38(%rbx), %rax
cmpq %rax, %r15
jl 0x62f09
testl %eax, %eax
jle 0x62fa2
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rdi
callq 0x41026
movq %rax, %r14
movq 0x10(%rbx), %rax
movq (%rax), %rdi
movq 0x8(%r14), %rsi
callq 0x2ebca
testq %rax, %rax
je 0x62f8f
movq 0x8(%rax), %rbx
movq 0x8(%r14), %rdx
leaq 0x63e58(%rip), %rsi     # 0xc6dd3
movl $0x3, %edi
xorl %eax, %eax
callq 0x2fdad
movq %rbx, %rdi
callq 0x629a3
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x40c8f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/debug.c
// Function: dumpX86Calls
void dumpX86Calls(void *addr, size_t len) {
    size_t j;
    unsigned char *p = addr;
    Dl_info info;
    /* Hash table to best-effort avoid printing the same symbol
     * multiple times. */
    unsigned long ht[256] = {0};

    if (len < 5) return;
    for (j = 0; j < len-4; j++) {
        if (p[j] != 0xE8) continue; /* Not an E8 CALL opcode. */
        unsigned long target = (unsigned long)addr+j+5;
        target += *((int32_t*)(p+j+1));
        if (dladdr((void*)target, &info) != 0 && info.dli_sname != NULL) {
            if (ht[target&0xff] != target) {
                printf("Function at 0x%lx is %s\n",target,info.dli_sname);
                ht[target&0xff] = target;
            }
            j += 4; /* Skip the 32 bit immediate. */
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x838, %rsp            # imm = 0x838
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x30(%rsp), %rdi
movl $0x800, %edx            # imm = 0x800
xorl %esi, %esi
callq 0x26110
cmpq $0x5, %rbx
jb 0x632f6
addq $-0x4, %rbx
leaq 0x5(%r14), %rbp
leaq 0x10(%rsp), %r15
xorl %r12d, %r12d
movq %rbp, 0x8(%rsp)
cmpb $-0x18, (%r14,%r12)
jne 0x632ee
movslq 0x1(%r14,%r12), %r13
leaq (%r12,%rbp), %rax
addq %rax, %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x26860
testl %eax, %eax
setne %al
movq 0x20(%rsp), %rdx
testq %rdx, %rdx
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x632ee
movq %r15, %rbp
movzbl %r13b, %r15d
movl %r15d, %eax
cmpq %r13, 0x30(%rsp,%rax,8)
je 0x632e2
leaq 0x63b98(%rip), %rdi     # 0xc6e6b
movq %r13, %rsi
xorl %eax, %eax
callq 0x260a0
movq %r13, 0x30(%rsp,%r15,8)
addq $0x4, %r12
movq %rbp, %r15
movq 0x8(%rsp), %rbp
incq %r12
cmpq %rbx, %r12
jb 0x63286
addq $0x838, %rsp            # imm = 0x838
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/debug.c
// Function: serverLogHexDump
void serverLogHexDump(int level, char *descr, void *value, size_t len) {
    char buf[65], *b;
    unsigned char *v = value;
    char charset[] = "0123456789abcdef";

    serverLog(level,"%s (hexdump of %zu bytes):", descr, len);
    b = buf;
    while(len) {
        b[0] = charset[(*v)>>4];
        b[1] = charset[(*v)&0xf];
        b[2] = '\0';
        b += 2;
        len--;
        v++;
        if (b-buf == 64 || len == 0) {
            serverLogRaw(level|LL_RAW,buf);
            b = buf;
        }
    }
    serverLogRaw(level|LL_RAW,"\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %rdx
movl %edi, %ebx
leaq 0x63c27(%rip), %rsi     # 0xc7214
xorl %eax, %eax
callq 0x2fdad
orl $0x400, %ebx            # imm = 0x400
testq %r14, %r14
je 0x63683
movl %ebx, 0x4(%rsp)
leaq -0x1(%r14), %r13
leaq 0x10(%rsp), %r12
xorl %ebp, %ebp
leaq 0x63c47(%rip), %rbx     # 0xc7260
movq %r12, %rcx
negq %rcx
movq %rcx, 0x8(%rsp)
movzbl (%r15,%rbp), %ecx
shrl $0x4, %ecx
movb (%rcx,%rbx), %cl
movb %cl, (%r12)
movzbl (%r15,%rbp), %ecx
andl $0xf, %ecx
movb (%rcx,%rbx), %cl
movb %cl, 0x1(%r12)
movb $0x0, 0x2(%r12)
cmpq %rbp, %r13
je 0x63666
movq 0x8(%rsp), %rcx
addq %r12, %rcx
addq $0x2, %rcx
cmpq $0x40, %rcx
je 0x63666
addq $0x2, %r12
jmp 0x63677
movl 0x4(%rsp), %edi
leaq 0x10(%rsp), %r12
movq %r12, %rsi
callq 0x2fc13
incq %rbp
cmpq %rbp, %r14
jne 0x63624
movl 0x4(%rsp), %ebx
leaq 0x5b83f(%rip), %rsi     # 0xbeec9
movl %ebx, %edi
callq 0x2fc13
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/debug.c
// Function: enableWatchdog
void enableWatchdog(int period) {
    int min_period;

    if (server.watchdog_period == 0) {
        struct sigaction act;

        /* Watchdog was actually disabled, so we have to setup the signal
         * handler. */
        sigemptyset(&act.sa_mask);
        act.sa_flags = SA_ONSTACK | SA_SIGINFO;
        act.sa_sigaction = watchdogSignalHandler;
        sigaction(SIGALRM, &act, NULL);
    }
    /* If the configured period is smaller than twice the timer period, it is
     * too short for the software watchdog to work reliably. Fix it now
     * if needed. */
    min_period = (1000/server.hz)*2;
    if (period < min_period) period = min_period;
    watchdogScheduleSignal(period); /* Adjust the current timer. */
    server.watchdog_period = period;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movl %edi, %ebx
leaq 0x9e177(%rip), %r15     # 0x1018a8
cmpl $0x0, 0xa40(%r15)
jne 0x6376d
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x26ac0
movl $0x8000004, 0x80(%r14) # imm = 0x8000004
leaq -0xba(%rip), %rax       # 0x636a0
movq %rax, -0x8(%r14)
movq %rsp, %rsi
movl $0xe, %edi
xorl %edx, %edx
callq 0x266c0
movl $0x3e8, %eax            # imm = 0x3E8
xorl %edx, %edx
idivl 0x20(%r15)
addl %eax, %eax
cmpl %ebx, %eax
cmovlel %ebx, %eax
movslq %eax, %rbx
imulq $0x10624dd3, %rbx, %rax # imm = 0x10624DD3
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x26, %rax
addl %ecx, %eax
cltq
movq %rsp, %rsi
movq %rax, 0x10(%rsi)
imull $0x3e8, %eax, %eax      # imm = 0x3E8
movl %ebx, %ecx
subl %eax, %ecx
imull $0x3e8, %ecx, %eax      # imm = 0x3E8
cltq
movq %rax, 0x18(%rsi)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsi)
xorl %edi, %edi
xorl %edx, %edx
callq 0x26380
movl %ebx, 0xa40(%r15)
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/debug.c
// Function: disableWatchdog
void disableWatchdog(void) {
    struct sigaction act;
    if (server.watchdog_period == 0) return; /* Already disabled. */
    watchdogScheduleSignal(0); /* Stop the current timer. */

    /* Set the signal handler to SIG_IGN, this will also remove pending
     * signals from the queue. */
    sigemptyset(&act.sa_mask);
    act.sa_flags = 0;
    act.sa_handler = SIG_IGN;
    sigaction(SIGALRM, &act, NULL);
    server.watchdog_period = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xa0, %rsp
leaq 0x9e0bd(%rip), %r14     # 0x1018a8
cmpl $0x0, 0xa40(%r14)
je 0x63840
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
xorl %r15d, %r15d
xorl %edi, %edi
xorl %edx, %edx
callq 0x26380
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x26ac0
movl %r15d, 0x80(%rbx)
movq $0x1, -0x8(%rbx)
movq %rsp, %rsi
movl $0xe, %edi
xorl %edx, %edx
callq 0x266c0
movl %r15d, 0xa40(%r14)
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/sort.c
// Function: createSortOperation
redisSortOperation *createSortOperation(int type, robj *pattern) {
    redisSortOperation *so = zmalloc(sizeof(*so));
    so->type = type;
    so->pattern = pattern;
    return so;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
movl $0x10, %edi
callq 0x382d1
movl %ebp, (%rax)
movq %rbx, 0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/sort.c
// Function: sortCompare
int sortCompare(const void *s1, const void *s2) {
    const redisSortObject *so1 = s1, *so2 = s2;
    int cmp;

    if (!server.sort_alpha) {
        /* Numeric sorting. Here it's trivial as we precomputed scores */
        if (so1->u.score > so2->u.score) {
            cmp = 1;
        } else if (so1->u.score < so2->u.score) {
            cmp = -1;
        } else {
            /* Objects have the same score, but we don't want the comparison
             * to be undefined, so we compare objects lexicographically.
             * This way the result of SORT is deterministic. */
            cmp = compareStringObjects(so1->obj,so2->obj);
        }
    } else {
        /* Alphanumeric sorting */
        if (server.sort_bypattern) {
            if (!so1->u.cmpobj || !so2->u.cmpobj) {
                /* At least one compare object is NULL */
                if (so1->u.cmpobj == so2->u.cmpobj)
                    cmp = 0;
                else if (so1->u.cmpobj == NULL)
                    cmp = -1;
                else
                    cmp = 1;
            } else {
                /* We have both the objects, compare them. */
                if (server.sort_store) {
                    cmp = compareStringObjects(so1->u.cmpobj,so2->u.cmpobj);
                } else {
                    /* Here we can use strcoll() directly as we are sure that
                     * the objects are decoded string objects. */
                    cmp = strcoll(so1->u.cmpobj->ptr,so2->u.cmpobj->ptr);
                }
            }
        } else {
            /* Compare elements directly. */
            if (server.sort_store) {
                cmp = compareStringObjects(so1->obj,so2->obj);
            } else {
                cmp = collateStringObjects(so1->obj,so2->obj);
            }
        }
    }
    return server.sort_desc ? -cmp : cmp;
}

// Assembly:
pushq %rbx
leaq 0x9ddaf(%rip), %rbx     # 0x1018a8
cmpl $0x0, 0x934(%rbx)
je 0x63b35
cmpl $0x0, 0x938(%rbx)
je 0x63b5d
movq 0x8(%rdi), %rdi
movq 0x8(%rsi), %rsi
testq %rdi, %rdi
je 0x63b73
testq %rsi, %rsi
je 0x63b7a
cmpl $0x0, 0x93c(%rbx)
jne 0x63b6c
movq 0x8(%rdi), %rdi
movq 0x8(%rsi), %rsi
callq 0x260e0
jmp 0x63b90
movsd 0x8(%rdi), %xmm0
movsd 0x8(%rsi), %xmm1
movl $0x1, %eax
ucomisd %xmm1, %xmm0
ja 0x63b90
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
ucomisd %xmm0, %xmm1
ja 0x63b90
movq (%rdi), %rdi
movq (%rsi), %rsi
jmp 0x63b6c
cmpl $0x0, 0x93c(%rbx)
movq (%rdi), %rdi
movq (%rsi), %rsi
je 0x63b8b
callq 0x41222
jmp 0x63b90
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
jmp 0x63b81
movl $0x1, %ecx
xorl %esi, %esi
xorl %eax, %eax
cmpq %rsi, %rdi
cmovnel %ecx, %eax
jmp 0x63b90
callq 0x4122c
movl %eax, %ecx
negl %ecx
cmpl $0x0, 0x930(%rbx)
cmovel %eax, %ecx
movl %ecx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/intset.c
// Function: intsetNew
intset *intsetNew(void) {
    intset *is = zmalloc(sizeof(intset));
    is->encoding = intrev32ifbe(INTSET_ENC_INT16);
    is->length = 0;
    return is;
}

// Assembly:
pushq %rax
movl $0x8, %edi
callq 0x382d1
movq $0x2, (%rax)
popq %rcx
retq