LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/networking.c
// Function: prepareClientToWrite
int prepareClientToWrite(client *c) {
    /* CLIENT REPLY OFF / SKIP handling: don't send replies. */
    if (c->flags & (CLIENT_REPLY_OFF|CLIENT_REPLY_SKIP)) return C_ERR;

    if (c->fd <= 0) return C_ERR; /* Fake client */
    
    /* Schedule the client to write the output buffers to the socket only
     * if not already done (there were no pending writes already and the client
     * was yet not flagged), and, for slaves, if the slave can actually
     * receive writes at this stage. */
    if (!clientHasPendingReplies(c) &&
        !(c->flags & CLIENT_PENDING_WRITE))
    {
        /* Here instead of installing the write handler, we just flag the
         * client and put it into a list of clients that have something
         * to write to the socket. This way before re-entering the event
         * loop, we can try to directly write to the client sockets avoiding
         * a system call. We'll only really install the write handler if
         * we'll not be able to write the whole reply at once. */
        c->flags |= CLIENT_PENDING_WRITE;
        listAddNodeHead(server.clients_pending_write,c);
    }
    /* Authorize the caller to queue in the output buffer of this client. */
    return C_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x88(%rax), %eax
andl $0xa00000, %eax         # imm = 0xA00000
cmpl $0x0, %eax
je 0x239d9
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x23a42
movq -0x10(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jg 0x239ec
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x23a42
movq -0x10(%rbp), %rdi
callq 0x23a50
cmpl $0x0, %eax
jne 0x23a3b
movq -0x10(%rbp), %rax
movl 0x88(%rax), %eax
andl $0x100000, %eax         # imm = 0x100000
cmpl $0x0, %eax
jne 0x23a3b
movq -0x10(%rbp), %rax
movl 0x88(%rax), %ecx
orl $0x100000, %ecx         # imm = 0x100000
movl %ecx, 0x88(%rax)
leaq 0x9b6bd(%rip), %rax     # 0xbf0e8
movq 0x1f0(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x12c10
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/networking.c
// Function: addReplyObjectToList
void _addReplyObjectToList(client *c, robj *o) {
    if (c->flags & CLIENT_CLOSE_AFTER_REPLY) return;

    if (listLength(c->reply) == 0) {
        sds s = sdsdup(o->ptr);
        listAddNodeTail(c->reply,s);
        c->reply_bytes += sdslen(s);
    } else {
        listNode *ln = listLast(c->reply);
        sds tail = listNodeValue(ln);

        /* Append to this object when possible. If tail == NULL it was
         * set via addDeferredMultiBulkLength(). */
        if (tail && sdslen(tail)+sdslen(o->ptr) <= PROTO_REPLY_CHUNK_BYTES) {
            tail = sdscatsds(tail,o->ptr);
            listNodeValue(ln) = tail;
            c->reply_bytes += sdslen(o->ptr);
        } else {
            sds s = sdsdup(o->ptr);
            listAddNodeTail(c->reply,s);
            c->reply_bytes += sdslen(s);
        }
    }
    asyncCloseClientOnOutputBufferLimitReached(c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x88(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x23b77
jmp 0x23c98
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpq $0x0, 0x28(%rax)
jne 0x23bc5
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x1e300
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x12ce0
movq -0x18(%rbp), %rdi
callq 0x23ca0
movq %rax, %rcx
movq -0x8(%rbp), %rax
addq 0x60(%rax), %rcx
movq %rcx, 0x60(%rax)
jmp 0x23c8f
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x23c53
movq -0x28(%rbp), %rdi
callq 0x23ca0
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x23ca0
movq %rax, %rcx
movq -0x38(%rbp), %rax
addq %rcx, %rax
cmpq $0x4000, %rax           # imm = 0x4000
ja 0x23c53
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x1eeb0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x23ca0
movq %rax, %rcx
movq -0x8(%rbp), %rax
addq 0x60(%rax), %rcx
movq %rcx, 0x60(%rax)
jmp 0x23c8d
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x1e300
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
movq -0x30(%rbp), %rsi
callq 0x12ce0
movq -0x30(%rbp), %rdi
callq 0x23ca0
movq %rax, %rcx
movq -0x8(%rbp), %rax
addq 0x60(%rax), %rcx
movq %rcx, 0x60(%rax)
jmp 0x23c8f
movq -0x8(%rbp), %rdi
callq 0x23d30
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/networking.c
// Function: addReplySdsToList
void _addReplySdsToList(client *c, sds s) {
    if (c->flags & CLIENT_CLOSE_AFTER_REPLY) {
        sdsfree(s);
        return;
    }

    if (listLength(c->reply) == 0) {
        listAddNodeTail(c->reply,s);
        c->reply_bytes += sdslen(s);
    } else {
        listNode *ln = listLast(c->reply);
        sds tail = listNodeValue(ln);

        /* Append to this object when possible. If tail == NULL it was
         * set via addDeferredMultiBulkLength(). */
        if (tail && sdslen(tail)+sdslen(s) <= PROTO_REPLY_CHUNK_BYTES) {
            tail = sdscatsds(tail,s);
            listNodeValue(ln) = tail;
            c->reply_bytes += sdslen(s);
            sdsfree(s);
        } else {
            listAddNodeTail(c->reply,s);
            c->reply_bytes += sdslen(s);
        }
    }
    asyncCloseClientOnOutputBufferLimitReached(c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x88(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x23e20
movq -0x10(%rbp), %rdi
callq 0x1e3c0
jmp 0x23f1c
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpq $0x0, 0x28(%rax)
jne 0x23e5d
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x12ce0
movq -0x10(%rbp), %rdi
callq 0x23ca0
movq %rax, %rcx
movq -0x8(%rbp), %rax
addq 0x60(%rax), %rcx
movq %rcx, 0x60(%rax)
jmp 0x23f13
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x23ee8
movq -0x20(%rbp), %rdi
callq 0x23ca0
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x23ca0
movq %rax, %rcx
movq -0x28(%rbp), %rax
addq %rcx, %rax
cmpq $0x4000, %rax           # imm = 0x4000
ja 0x23ee8
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x1eeb0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rdi
callq 0x23ca0
movq %rax, %rcx
movq -0x8(%rbp), %rax
addq 0x60(%rax), %rcx
movq %rcx, 0x60(%rax)
movq -0x10(%rbp), %rdi
callq 0x1e3c0
jmp 0x23f11
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x12ce0
movq -0x10(%rbp), %rdi
callq 0x23ca0
movq %rax, %rcx
movq -0x8(%rbp), %rax
addq 0x60(%rax), %rcx
movq %rcx, 0x60(%rax)
jmp 0x23f13
movq -0x8(%rbp), %rdi
callq 0x23d30
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/networking.c
// Function: addReplyStringToList
void _addReplyStringToList(client *c, const char *s, size_t len) {
    if (c->flags & CLIENT_CLOSE_AFTER_REPLY) return;

    if (listLength(c->reply) == 0) {
        sds node = sdsnewlen(s,len);
        listAddNodeTail(c->reply,node);
        c->reply_bytes += len;
    } else {
        listNode *ln = listLast(c->reply);
        sds tail = listNodeValue(ln);

        /* Append to this object when possible. If tail == NULL it was
         * set via addDeferredMultiBulkLength(). */
        if (tail && sdslen(tail)+len <= PROTO_REPLY_CHUNK_BYTES) {
            tail = sdscatlen(tail,s,len);
            listNodeValue(ln) = tail;
            c->reply_bytes += len;
        } else {
            sds node = sdsnewlen(s,len);
            listAddNodeTail(c->reply,node);
            c->reply_bytes += len;
        }
    }
    asyncCloseClientOnOutputBufferLimitReached(c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x88(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x23f5b
jmp 0x24049
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpq $0x0, 0x28(%rax)
jne 0x23fa1
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x1dfe0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x12ce0
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
addq 0x60(%rax), %rcx
movq %rcx, 0x60(%rax)
jmp 0x24040
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x2400c
movq -0x30(%rbp), %rdi
callq 0x23ca0
addq -0x18(%rbp), %rax
cmpq $0x4000, %rax           # imm = 0x4000
ja 0x2400c
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x1ede0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
addq 0x60(%rax), %rcx
movq %rcx, 0x60(%rax)
jmp 0x2403e
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x1dfe0
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
movq -0x38(%rbp), %rsi
callq 0x12ce0
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
addq 0x60(%rax), %rcx
movq %rcx, 0x60(%rax)
jmp 0x24040
movq -0x8(%rbp), %rdi
callq 0x23d30
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/networking.c
// Function: addDeferredMultiBulkLength
void *addDeferredMultiBulkLength(client *c) {
    /* Note that we install the write event here even if the object is not
     * ready to be sent, since we are sure that before returning to the
     * event loop setDeferredMultiBulkLength() will be called. */
    if (prepareClientToWrite(c) != C_OK) return NULL;
    listAddNodeTail(c->reply,NULL); /* NULL is our placeholder. */
    return listLast(c->reply);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x239b0
cmpl $0x0, %eax
je 0x24654
movq $0x0, -0x8(%rbp)
jmp 0x24675
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x12ce0
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/networking.c
// Function: setDeferredMultiBulkLength
void setDeferredMultiBulkLength(client *c, void *node, long length) {
    listNode *ln = (listNode*)node;
    sds len, next;

    /* Abort when *node is NULL: when the client should not accept writes
     * we return NULL in addDeferredMultiBulkLength() */
    if (node == NULL) return;

    len = sdscatprintf(sdsnewlen("*",1),"%ld\r\n",length);
    listNodeValue(ln) = len;
    c->reply_bytes += sdslen(len);
    if (ln->next != NULL) {
        next = listNodeValue(ln->next);

        /* Only glue when the next node is non-NULL (an sds in this case) */
        if (next != NULL) {
            len = sdscatsds(len,next);
            listDelNode(c->reply,ln->next);
            listNodeValue(ln) = len;
            /* No need to update c->reply_bytes: we are just moving the same
             * amount of bytes from one node to another. */
        }
    }
    asyncCloseClientOnOutputBufferLimitReached(c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x246a8
jmp 0x24755
leaq 0x7f84e(%rip), %rdi     # 0xa3efd
movl $0x1, %esi
callq 0x1dfe0
movq %rax, %rdi
movq -0x18(%rbp), %rdx
leaq 0x8106a(%rip), %rsi     # 0xa5731
movb $0x0, %al
callq 0x1f350
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rdi
callq 0x23ca0
movq %rax, %rcx
movq -0x8(%rbp), %rax
addq 0x60(%rax), %rcx
movq %rcx, 0x60(%rax)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x2474c
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x2474a
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x1eeb0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x12ec0
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x2474c
movq -0x8(%rbp), %rdi
callq 0x23d30
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/networking.c
// Function: addReplyLongDouble
void addReplyLongDouble(client *c, long double ld) {
    char dbuf[128], sbuf[128];
    int dlen, slen;
    if (isinf(ld)) {
        /* Libc in odd systems (Hi Solaris!) will format infinite in a
         * different way, so better to handle it in an explicit way. */
        addReplyBulkCString(c, ld > 0 ? "inf" : "-inf");
    } else {
        dlen = snprintf(dbuf,sizeof(dbuf),"%.17Lg",ld);
        slen = snprintf(sbuf,sizeof(sbuf),"$%d\r\n%s\r\n",dlen,dbuf);
        addReplyString(c,sbuf,slen);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
fldt 0x10(%rbp)
movq %rdi, -0x8(%rbp)
fstpt -0x20(%rbp)
fldt -0x20(%rbp)
fld %st(0)
fstpt -0x140(%rbp)
movswq -0x138(%rbp), %rax
fabs
shrq $0xf, %rax
movl %eax, %ecx
orl $0x1, %ecx
xorl %eax, %eax
flds 0x80de5(%rip)           # 0xa56e0
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
cmovael %ecx, %eax
cmpl $0x0, %eax
je 0x24931
movq -0x8(%rbp), %rdi
fldt -0x20(%rbp)
fldz
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
leaq 0x80e19(%rip), %rax     # 0xa5738
leaq 0x80e11(%rip), %rsi     # 0xa5737
cmovaq %rax, %rsi
callq 0x24860
jmp 0x2499d
leaq -0xa0(%rbp), %rdi
fldt -0x20(%rbp)
movq %rsp, %rax
fstpt (%rax)
leaq 0x80e05(%rip), %rdx     # 0xa574c
xorl %eax, %eax
movl $0x80, %esi
callq 0x122c0
movl %eax, -0x124(%rbp)
leaq -0x120(%rbp), %rdi
movl -0x124(%rbp), %ecx
leaq -0xa0(%rbp), %r8
movl $0x80, %esi
leaq 0x80dc9(%rip), %rdx     # 0xa5742
movb $0x0, %al
callq 0x122c0
movl %eax, -0x128(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x120(%rbp), %rsi
movslq -0x128(%rbp), %rdx
callq 0x24260
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/networking.c
// Function: acceptCommonHandler
static void acceptCommonHandler(int fd, int flags) {
    client *c;
    if ((c = createClient(fd)) == NULL) {
        serverLog(LL_WARNING,
            "Error registering fd event for the new client: %s (fd=%d)",
            strerror(errno),fd);
        close(fd); /* May be already closed, just ignore errors */
        return;
    }
    /* If maxclient directive is set and this is one client more... close the
     * connection. Note that we create the client instead to check before
     * for this condition, since now the socket is already set in non-blocking
     * mode and we can send an error for free using the Kernel I/O */
    if (listLength(server.clients) > server.maxclients) {
        char *err = "-ERR max number of clients reached\r\n";

        /* That's a best effort error message, don't check write errors */
        if (write(c->fd,err,strlen(err)) == -1) {
            /* Nothing to do, Just to avoid the warning... */
        }
        server.stat_rejected_conn++;
        freeClient(c);
        return;
    }
    server.stat_numconnections++;
    c->flags |= flags;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl -0x4(%rbp), %edi
callq 0x23510
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
jne 0x24f52
callq 0x120b0
movl (%rax), %edi
callq 0x12900
movq %rax, %rdx
movl -0x4(%rbp), %ecx
movl $0x3, %edi
leaq 0x80c89(%rip), %rsi     # 0xa5bc7
movb $0x0, %al
callq 0x18b10
movl -0x4(%rbp), %edi
callq 0x123a0
jmp 0x25011
leaq 0x9a18f(%rip), %rax     # 0xbf0e8
movq 0x1e0(%rax), %rax
movq 0x28(%rax), %rax
leaq 0x9a17d(%rip), %rcx     # 0xbf0e8
movl 0x60c(%rcx), %ecx
cmpq %rcx, %rax
jbe 0x24fde
leaq 0x80c84(%rip), %rax     # 0xa5c01
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x12230
movl -0x24(%rbp), %edi
movq -0x20(%rbp), %rsi
movq %rax, %rdx
callq 0x121c0
cmpq $-0x1, %rax
jne 0x24fb3
jmp 0x24fb3
leaq 0x9a12e(%rip), %rax     # 0xbf0e8
movq 0x3a0(%rax), %rcx
addq $0x1, %rcx
leaq 0x9a11c(%rip), %rax     # 0xbf0e8
movq %rcx, 0x3a0(%rax)
movq -0x10(%rbp), %rdi
callq 0x252e0
jmp 0x25011
leaq 0x9a103(%rip), %rax     # 0xbf0e8
movq 0x380(%rax), %rcx
addq $0x1, %rcx
leaq 0x9a0f1(%rip), %rax     # 0xbf0e8
movq %rcx, 0x380(%rax)
movl -0x8(%rbp), %ecx
movq -0x10(%rbp), %rax
orl 0x88(%rax), %ecx
movl %ecx, 0x88(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/networking.c
// Function: resetClient
void resetClient(client *c) {
    freeClientArgv(c);
    c->reqtype = 0;
    c->multibulklen = 0;
    c->bulklen = -1;

    /* Remove the CLIENT_REPLY_SKIP flag if any so that the reply
     * to the next command will be sent, but set the flag if the command
     * we just processed was "CLIENT REPLY SKIP". */
    c->flags &= ~CLIENT_REPLY_SKIP;
    if (c->flags & CLIENT_REPLY_SKIP_NEXT) {
        c->flags |= CLIENT_REPLY_SKIP;
        c->flags &= ~CLIENT_REPLY_SKIP_NEXT;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x254a0
movq -0x8(%rbp), %rax
movl $0x0, 0x48(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x4c(%rax)
movq -0x8(%rbp), %rax
movq $-0x1, 0x50(%rax)
movq -0x8(%rbp), %rax
movl 0x88(%rax), %ecx
andl $0xff7fffff, %ecx       # imm = 0xFF7FFFFF
movl %ecx, 0x88(%rax)
movq -0x8(%rbp), %rax
movl 0x88(%rax), %eax
andl $0x400000, %eax         # imm = 0x400000
cmpl $0x0, %eax
je 0x25a7d
movq -0x8(%rbp), %rax
movl 0x88(%rax), %ecx
orl $0x800000, %ecx         # imm = 0x800000
movl %ecx, 0x88(%rax)
movq -0x8(%rbp), %rax
movl 0x88(%rax), %ecx
andl $0xffbfffff, %ecx       # imm = 0xFFBFFFFF
movl %ecx, 0x88(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/networking.c
// Function: formatPeerId
void formatPeerId(char *peerid, size_t peerid_len, char *ip, int port) {
    if (strchr(ip,':'))
        snprintf(peerid,peerid_len,"[%s]:%d",ip,port);
    else
        snprintf(peerid,peerid_len,"%s:%d",ip,port);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x18(%rbp), %rdi
movl $0x3a, %esi
callq 0x122a0
cmpq $0x0, %rax
je 0x26a7b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rcx
movl -0x1c(%rbp), %r8d
leaq 0x7c688(%rip), %rdx     # 0xa30fa
movb $0x0, %al
callq 0x122c0
jmp 0x26a99
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rcx
movl -0x1c(%rbp), %r8d
leaq 0x7ecf0(%rip), %rdx     # 0xa5782
movb $0x0, %al
callq 0x122c0
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/networking.c
// Function: getAllClientsInfoString
sds getAllClientsInfoString(void) {
    listNode *ln;
    listIter li;
    client *client;
    sds o = sdsempty();

    o = sdsMakeRoomFor(o,200*listLength(server.clients));
    listRewind(server.clients,&li);
    while ((ln = listNext(&li)) != NULL) {
        client = listNodeValue(ln);
        o = catClientInfoString(o,client);
        o = sdscatlen(o,"\n",1);
    }
    return o;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
callq 0x1e290
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
leaq 0x9843c(%rip), %rax     # 0xbf0e8
movq 0x1e0(%rax), %rax
imulq $0xc8, 0x28(%rax), %rsi
callq 0x1e510
movq %rax, -0x28(%rbp)
leaq 0x9841d(%rip), %rax     # 0xbf0e8
movq 0x1e0(%rax), %rdi
leaq -0x18(%rbp), %rsi
callq 0x13000
leaq -0x18(%rbp), %rdi
callq 0x13060
movq %rax, -0x8(%rbp)
cmpq $0x0, %rax
je 0x26d26
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x26570
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
leaq 0x7e092(%rip), %rsi     # 0xa4da8
movl $0x1, %edx
callq 0x1ede0
movq %rax, -0x28(%rbp)
jmp 0x26cdb
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/networking.c
// Function: rewriteClientCommandArgument
void rewriteClientCommandArgument(client *c, int i, robj *newval) {
    robj *oldval;

    serverAssertWithInfo(c,NULL,i < c->argc);
    oldval = c->argv[i];
    c->argv[i] = newval;
    incrRefCount(newval);
    decrRefCount(oldval);

    /* If this is the command name make sure to fix c->cmd. */
    if (i == 0) {
        c->cmd = lookupCommandOrOriginal(c->argv[0]->ptr);
        serverAssertWithInfo(c,NULL,c->cmd != NULL);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x28(%rcx), %eax
jge 0x27901
jmp 0x2792c
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq 0x7e232(%rip), %rdx     # 0xa5b42
leaq 0x7dde3(%rip), %rcx     # 0xa56fa
movl $0x5eb, %r8d            # imm = 0x5EB
callq 0x30050
movl $0x1, %edi
callq 0x12100
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0xc(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x18(%rbp), %rdi
callq 0x29400
movq -0x20(%rbp), %rdi
callq 0x296f0
cmpl $0x0, -0xc(%rbp)
jne 0x279c5
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq (%rax), %rax
movq 0x8(%rax), %rdi
callq 0x1b680
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x27998
jmp 0x279c3
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq 0x7e18c(%rip), %rdx     # 0xa5b33
leaq 0x7dd4c(%rip), %rcx     # 0xa56fa
movl $0x5f4, %r8d            # imm = 0x5F4
callq 0x30050
movl $0x1, %edi
callq 0x12100
jmp 0x279c5
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/networking.c
// Function: getClientTypeName
char *getClientTypeName(int class) {
    switch(class) {
    case CLIENT_TYPE_NORMAL: return "normal";
    case CLIENT_TYPE_PUBSUB: return "pubsub";
    default:                        return NULL;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
testl %eax, %eax
je 0x279ed
jmp 0x279e3
movl -0x10(%rbp), %eax
subl $0x1, %eax
je 0x279fa
jmp 0x27a07
leaq 0x7e15a(%rip), %rax     # 0xa5b4e
movq %rax, -0x8(%rbp)
jmp 0x27a0f
leaq 0x7c8db(%rip), %rax     # 0xa42dc
movq %rax, -0x8(%rbp)
jmp 0x27a0f
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/object.c
// Function: createObject
robj *createObject(int type, void *ptr) {
    robj *o = zmalloc(sizeof(*o));
    o->type = type;
    o->encoding = OBJ_ENCODING_RAW;
    o->ptr = ptr;
    o->refcount = 1;
    o->notused = 0;
    return o;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x10, %edi
callq 0x20a00
movq %rax, -0x18(%rbp)
movl -0x4(%rbp), %edx
movq -0x18(%rbp), %rax
movl (%rax), %ecx
andl $0xf, %edx
andl $-0x10, %ecx
orl %edx, %ecx
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl (%rax), %ecx
andl $0xffffff0f, %ecx       # imm = 0xFFFFFF0F
orl $0x0, %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movl $0x1, 0x4(%rax)
movq -0x18(%rbp), %rax
movl (%rax), %ecx
andl $0xff, %ecx
orl $0x0, %ecx
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/object.c
// Function: createStringObjectFromLongDouble
robj *createStringObjectFromLongDouble(long double value) {
    char buf[256];
    int len;

    /* We use 17 digits precision since with 128 bit floats that precision
     * after rounding is able to represent most small decimal numbers in a way
     * that is "non surprising" for the user (that is, most small decimal
     * numbers will be represented in a way that when converted back into
     * a string are exactly the same as what the user typed.) */
    len = snprintf(buf,sizeof(buf),"%.17Lf", value);
    /* Now remove trailing zeroes after the '.' */
    if (strchr(buf,'.') != NULL) {
        char *p = buf+len-1;
        while(*p == '0') {
            p--;
            len--;
        }
        if (*p == '.') len--;
    }
    return createStringObject(buf,len);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
fldt 0x10(%rbp)
fstpt -0x10(%rbp)
leaq -0x110(%rbp), %rdi
fldt -0x10(%rbp)
movq %rsp, %rax
fstpt (%rax)
leaq 0x7c961(%rip), %rdx     # 0xa5da8
xorl %eax, %eax
movl $0x100, %esi            # imm = 0x100
callq 0x122c0
movl %eax, -0x114(%rbp)
leaq -0x110(%rbp), %rdi
movl $0x2e, %esi
callq 0x122a0
cmpq $0x0, %rax
je 0x294de
leaq -0x110(%rbp), %rax
movslq -0x114(%rbp), %rcx
addq %rcx, %rax
addq $-0x1, %rax
movq %rax, -0x120(%rbp)
movq -0x120(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x30, %eax
jne 0x294be
movq -0x120(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x120(%rbp)
movl -0x114(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x114(%rbp)
jmp 0x2948c
movq -0x120(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0x294dc
movl -0x114(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x114(%rbp)
jmp 0x294de
leaq -0x110(%rbp), %rdi
movslq -0x114(%rbp), %rsi
callq 0x292f0
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/object.c
// Function: decrRefCount
void decrRefCount(robj *o) {
    if (o->refcount <= 0) serverPanic("decrRefCount against refcount <= 0");
    if (o->refcount == 1) {
        switch(o->type) {
        case OBJ_STRING: freeStringObject(o); break;
        default: serverPanic("Unknown object type"); break;
        }
        zfree(o);
    } else {
        o->refcount--;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x4(%rax)
jg 0x29728
leaq 0x7c6bd(%rip), %rdi     # 0xa5dca
leaq 0x7c69b(%rip), %rsi     # 0xa5daf
movl $0xb0, %edx
callq 0x304a0
movl $0x1, %edi
callq 0x12100
movq -0x8(%rbp), %rax
cmpl $0x1, 0x4(%rax)
jne 0x29776
movq -0x8(%rbp), %rax
movb (%rax), %al
testb $0xf, %al
jne 0x29749
jmp 0x2973e
movq -0x8(%rbp), %rdi
callq 0x296c0
jmp 0x2976b
leaq 0x7c69f(%rip), %rdi     # 0xa5def
leaq 0x7c658(%rip), %rsi     # 0xa5daf
movl $0xb4, %edx
callq 0x304a0
movl $0x1, %edi
callq 0x12100
movq -0x8(%rbp), %rdi
callq 0x20ce0
jmp 0x29783
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x4(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/object.c
// Function: getLongLongFromObject
int getLongLongFromObject(robj *o, long long *target) {
    long long value;
    char *eptr;

    if (o == NULL) {
        value = 0;
    } else {
        serverAssertWithInfo(NULL,o,o->type == OBJ_STRING);
        if (sdsEncodedObject(o)) {
            errno = 0;
            value = strtoll(o->ptr, &eptr, 10);
            if (isspace(((char*)o->ptr)[0]) || eptr[0] != '\0' ||
                errno == ERANGE)
                return C_ERR;
        } else if (o->encoding == OBJ_ENCODING_INT) {
            value = (long)o->ptr;
        } else {
            serverPanic("Unknown string encoding");
        }
    }
    if (target) *target = value;
    return C_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x2a494
movq $0x0, -0x20(%rbp)
jmp 0x2a5a0
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0xf, %eax
cmpl $0x0, %eax
jne 0x2a4a4
jmp 0x2a4cf
movq -0x10(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edi
leaq 0x7b231(%rip), %rdx     # 0xa56e4
leaq 0x7b8f5(%rip), %rcx     # 0xa5daf
movl $0x1e9, %r8d            # imm = 0x1E9
callq 0x30050
movl $0x1, %edi
callq 0x12100
movq -0x10(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x0, %eax
je 0x2a4f1
movq -0x10(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x2, %eax
jne 0x2a55b
callq 0x120b0
movl $0x0, (%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq -0x28(%rbp), %rsi
movl $0xa, %edx
callq 0x124a0
movq %rax, -0x20(%rbp)
callq 0x129b0
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
jne 0x2a550
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x2a550
callq 0x120b0
cmpl $0x22, (%rax)
jne 0x2a559
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2a5b9
jmp 0x2a59e
movq -0x10(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x1, %eax
jne 0x2a57a
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x2a59c
leaq 0x7b8cb(%rip), %rdi     # 0xa5e4c
leaq 0x7b827(%rip), %rsi     # 0xa5daf
movl $0x1f3, %edx            # imm = 0x1F3
callq 0x304a0
movl $0x1, %edi
callq 0x12100
jmp 0x2a59e
jmp 0x2a5a0
cmpq $0x0, -0x18(%rbp)
je 0x2a5b2
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/object.c
// Function: strEncoding
char *strEncoding(int encoding) {
    switch(encoding) {
    case OBJ_ENCODING_RAW: return "raw";
    case OBJ_ENCODING_INT: return "int";
    case OBJ_ENCODING_EMBSTR: return "embstr";
    default: return "unknown";
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
testl %eax, %eax
je 0x2a7d7
jmp 0x2a7c3
movl -0x10(%rbp), %eax
subl $0x1, %eax
je 0x2a7e4
jmp 0x2a7cd
movl -0x10(%rbp), %eax
subl $0x2, %eax
je 0x2a7f1
jmp 0x2a7fe
leaq 0x7b6ff(%rip), %rax     # 0xa5edd
movq %rax, -0x8(%rbp)
jmp 0x2a809
leaq 0x80405(%rip), %rax     # 0xaabf0
movq %rax, -0x8(%rbp)
jmp 0x2a809
leaq 0x7b6e9(%rip), %rax     # 0xa5ee1
movq %rax, -0x8(%rbp)
jmp 0x2a809
leaq 0x7b6e3(%rip), %rax     # 0xa5ee8
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/debug.c
// Function: computeDatasetDigest
void computeDatasetDigest(unsigned char *final) {
    unsigned char digest[20];
    dictIterator *di = NULL;
    dictEntry *de;

    memset(final,0,20); /* Start with a clean result */

    di = dictGetIterator(server.counters);

    /* Iterate this DB writing every entry */
    while((de = dictNext(di)) != NULL) {
        counter* cntr;
        sds key;
        listNode *ln;
        listIter li;
        shard *shrd;

        memset(digest,0,20); /* This key-val digest */

        key = dictGetKey(de);
        mixDigest(digest,key,sdslen(key));

        cntr = dictGetVal(de);

        mixDigest(digest,cntr->name,sdslen(cntr->name));
        mixDigest(digest,&cntr->precision,sizeof(cntr->precision));

        listRewind(cntr->shards,&li);
        while ((ln = listNext(&li)) != NULL) {
            shrd = listNodeValue(ln);
            mixDigest(digest,&shrd->predict_time,sizeof(shrd->predict_time));
            mixDigest(digest,&shrd->predict_value,sizeof(shrd->predict_value));
            mixDigest(digest,&shrd->predict_change,sizeof(shrd->predict_change));
        }

        /* We can finally xor the key-val digest to the final digest */
        xorDigest(final,digest,20);
    }
    dictReleaseIterator(di);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movl $0x14, %edx
callq 0x12370
leaq 0x8ff5a(%rip), %rax     # 0xbf0e8
movq 0x618(%rax), %rdi
callq 0x17300
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x173a0
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0x2f2d5
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
movl $0x14, %edx
callq 0x12370
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
leaq -0x20(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x40(%rbp), %rdi
callq 0x2f2f0
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rsi
movq %rax, %rdx
callq 0x2f0f0
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
leaq -0x20(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rdi
callq 0x2f2f0
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq %rax, %rdx
callq 0x2f0f0
leaq -0x20(%rbp), %rdi
movq -0x38(%rbp), %rsi
addq $0x50, %rsi
movl $0x8, %edx
callq 0x2f0f0
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rdi
leaq -0x58(%rbp), %rsi
callq 0x13000
leaq -0x58(%rbp), %rdi
callq 0x13060
movq %rax, -0x48(%rbp)
cmpq $0x0, %rax
je 0x2f2be
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x60(%rbp)
leaq -0x20(%rbp), %rdi
movq -0x60(%rbp), %rsi
addq $0x40, %rsi
movl $0x8, %edx
callq 0x2f0f0
leaq -0x20(%rbp), %rdi
movq -0x60(%rbp), %rsi
addq $0x50, %rsi
movl $0x10, %edx
callq 0x2f0f0
leaq -0x20(%rbp), %rdi
movq -0x60(%rbp), %rsi
addq $0x60, %rsi
movl $0x10, %edx
callq 0x2f0f0
jmp 0x2f25b
movq -0x8(%rbp), %rdi
leaq -0x20(%rbp), %rsi
movl $0x14, %edx
callq 0x2f040
jmp 0x2f19e
movq -0x28(%rbp), %rdi
callq 0x17510
addq $0x80, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/debug.c
// Function: bugReportStart
void bugReportStart(void) {
    if (server.bug_report_start == 0) {
        serverLog(LL_WARNING,
            "\n\n=== DISCNT BUG REPORT START: Cut & paste starting from here ===");
        server.bug_report_start = 1;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8ef8d(%rip), %rax     # 0xbf0e8
cmpl $0x0, 0x694(%rax)
jne 0x30188
movl $0x3, %edi
leaq 0x76c2e(%rip), %rsi     # 0xa6d9e
movb $0x0, %al
callq 0x18b10
leaq 0x8ef6a(%rip), %rax     # 0xbf0e8
movl $0x1, 0x694(%rax)
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/debug.c
// Function: serverLogObjectDebugInfo
void serverLogObjectDebugInfo(robj *o) {
    serverLog(LL_WARNING,"Object type: %u", o->type);
    serverLog(LL_WARNING,"Object encoding: %u", o->encoding);
    serverLog(LL_WARNING,"Object refcount: %d", o->refcount);
    if (o->type == OBJ_STRING && sdsEncodedObject(o)) {
        serverLog(LL_WARNING,"Object raw string len: %zu", sdslen(o->ptr));
        if (sdslen(o->ptr) < 4096) {
            sds repr = sdscatrepr(sdsempty(),o->ptr,sdslen(o->ptr));
            serverLog(LL_WARNING,"Object raw string content: %s", repr);
            sdsfree(repr);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %edx
andl $0xf, %edx
movl $0x3, %edi
leaq 0x768e2(%rip), %rsi     # 0xa6c73
movb $0x0, %al
callq 0x18b10
movq -0x8(%rbp), %rax
movl (%rax), %edx
shrl $0x4, %edx
andl $0xf, %edx
movl $0x3, %edi
leaq 0x768d3(%rip), %rsi     # 0xa6c83
movb $0x0, %al
callq 0x18b10
movq -0x8(%rbp), %rax
movl 0x4(%rax), %edx
movl $0x3, %edi
leaq 0x768cd(%rip), %rsi     # 0xa6c97
movb $0x0, %al
callq 0x18b10
movq -0x8(%rbp), %rax
movl (%rax), %eax
andl $0xf, %eax
cmpl $0x0, %eax
jne 0x30499
movq -0x8(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x0, %eax
je 0x30409
movq -0x8(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x2, %eax
jne 0x30499
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x2f2f0
movq %rax, %rdx
movl $0x3, %edi
leaq 0x76886(%rip), %rsi     # 0xa6cab
movb $0x0, %al
callq 0x18b10
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x2f2f0
cmpq $0x1000, %rax           # imm = 0x1000
jae 0x30497
callq 0x1e290
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x2f2f0
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq %rax, %rdx
callq 0x20060
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdx
movl $0x3, %edi
leaq 0x7683f(%rip), %rsi     # 0xa6cc6
movb $0x0, %al
callq 0x18b10
movq -0x10(%rbp), %rdi
callq 0x1e3c0
jmp 0x30499
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/debug.c
// Function: logStackTrace
void logStackTrace(ucontext_t *uc) {
    void *trace[100];
    int trace_size = 0, fd;
    int log_to_stdout = server.logfile[0] == '\0';

    /* Open the log file in append mode. */
    fd = log_to_stdout ?
        STDOUT_FILENO :
        open(server.logfile, O_APPEND|O_CREAT|O_WRONLY, 0644);
    if (fd == -1) return;

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

    /* overwrite sigaction with caller's address */
    if (getMcontextEip(uc) != NULL)
        trace[1] = getMcontextEip(uc);

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

    /* Cleanup */
    if (!log_to_stdout) close(fd);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x340, %rsp            # imm = 0x340
movq %rdi, -0x8(%rbp)
movl $0x0, -0x334(%rbp)
leaq 0x8e978(%rip), %rax     # 0xbf0e8
movq 0x5f0(%rax), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x33c(%rbp)
cmpl $0x0, -0x33c(%rbp)
je 0x307a1
movl $0x1, %eax
movl %eax, -0x340(%rbp)
jmp 0x307c6
leaq 0x8e940(%rip), %rax     # 0xbf0e8
movq 0x5f0(%rax), %rdi
movl $0x441, %esi            # imm = 0x441
movl $0x1a4, %edx            # imm = 0x1A4
movb $0x0, %al
callq 0x126d0
movl %eax, -0x340(%rbp)
movl -0x340(%rbp), %eax
movl %eax, -0x338(%rbp)
cmpl $-0x1, -0x338(%rbp)
jne 0x307dd
jmp 0x3083f
leaq -0x330(%rbp), %rdi
movl $0x64, %esi
callq 0x12240
movl %eax, -0x334(%rbp)
movq -0x8(%rbp), %rdi
callq 0x30850
cmpq $0x0, %rax
je 0x30813
movq -0x8(%rbp), %rdi
callq 0x30850
movq %rax, -0x328(%rbp)
leaq -0x330(%rbp), %rdi
movl -0x334(%rbp), %esi
movl -0x338(%rbp), %edx
callq 0x12080
cmpl $0x0, -0x33c(%rbp)
jne 0x3083f
movl -0x338(%rbp), %edi
callq 0x123a0
addq $0x340, %rsp            # imm = 0x340
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/debug.c
// Function: logCurrentClient
void logCurrentClient(void) {
    if (server.current_client == NULL) return;

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

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

        decoded = getDecodedObject(cc->argv[j]);
        serverLog(LL_WARNING,"argv[%d]: '%s'", j, (char*)decoded->ptr);
        decrRefCount(decoded);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x8e869(%rip), %rax     # 0xbf0e8
cmpq $0x0, 0x200(%rax)
jne 0x3088e
jmp 0x30946
leaq 0x8e853(%rip), %rax     # 0xbf0e8
movq 0x200(%rax), %rax
movq %rax, -0x8(%rbp)
movl $0x3, %edi
leaq 0x7662a(%rip), %rsi     # 0xa6ed6
movb $0x0, %al
callq 0x18b10
callq 0x1e290
movq %rax, %rdi
movq -0x8(%rbp), %rsi
callq 0x26570
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdx
movl $0x3, %edi
leaq 0x75069(%rip), %rsi     # 0xa5941
movb $0x0, %al
callq 0x18b10
movq -0x10(%rbp), %rdi
callq 0x1e3c0
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x28(%rcx), %eax
jge 0x30946
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x29bf0
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %edx
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rcx
movl $0x3, %edi
leaq 0x765c3(%rip), %rsi     # 0xa6eee
movb $0x0, %al
callq 0x18b10
movq -0x20(%rbp), %rdi
callq 0x296f0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x308ef
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/cluster.c
// Function: createClusterNode
clusterNode *createClusterNode(char *nodename, int flags) {
    clusterNode *node = zmalloc(sizeof(*node));

    if (nodename)
        memcpy(node->name, nodename, CLUSTER_NAMELEN);
    else
        getRandomHexChars(node->name, CLUSTER_NAMELEN);
    node->ctime = mstime();
    node->flags = flags;
    node->ping_sent = node->pong_received = 0;
    node->fail_time = 0;
    node->link = NULL;
    memset(node->ip,0,sizeof(node->ip));
    node->port = 0;
    node->fail_reports = listCreate();
    listSetFreeMethod(node->fail_reports,zfree);
    return node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x98, %edi
callq 0x20a00
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x31dc8
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
movl $0x28, %edx
callq 0x12500
jmp 0x31dd6
movq -0x18(%rbp), %rdi
movl $0x28, %esi
callq 0x28b10
callq 0x18e20
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x28(%rax)
movl -0xc(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x30(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x88(%rax)
movq -0x18(%rbp), %rdi
addq $0x50, %rdi
xorl %esi, %esi
movl $0x2e, %edx
callq 0x12370
movq -0x18(%rbp), %rax
movl $0x0, 0x80(%rax)
callq 0x12b00
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x90(%rax)
movq -0x18(%rbp), %rax
movq 0x90(%rax), %rax
leaq -0x1118a(%rip), %rcx    # 0x20ce0
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/cluster.c
// Function: clusterAcceptHandler
void clusterAcceptHandler(aeEventLoop *el, int fd, void *privdata, int mask) {
    int cport, cfd;
    int max = MAX_CLUSTER_ACCEPTS_PER_CALL;
    char cip[NET_IP_STR_LEN];
    clusterLink *link;
    UNUSED(el);
    UNUSED(mask);
    UNUSED(privdata);

    while(max--) {
        cfd = anetTcpAccept(server.neterr, fd, cip, sizeof(cip), &cport);
        if (cfd == ANET_ERR) {
            if (errno != EWOULDBLOCK)
                serverLog(LL_VERBOSE,
                    "Accepting cluster node: %s", server.neterr);
            return;
        }
        anetNonBlock(NULL,cfd);
        anetEnableTcpNoDelay(NULL,cfd);

        /* Use non-blocking I/O for cluster messages. */
        serverLog(LL_VERBOSE,"Accepted cluster node %s:%d", cip, cport);
        /* Create a link object we use to handle the connection.
         * It gets passed to the readable handler when data is available.
         * Initiallly the link->node pointer is set to NULL as we don't know
         * which node is, but the right node is references once we know the
         * node identity. */
        link = createClusterLink(NULL);
        link->fd = cfd;
        aeCreateFileEvent(server.el,cfd,AE_READABLE,clusterReadHandler,link);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x3e8, -0x28(%rbp)     # imm = 0x3E8
movl -0x28(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x28(%rbp)
cmpl $0x0, %eax
je 0x3272b
movl -0xc(%rbp), %esi
leaq -0x60(%rbp), %rdx
leaq 0x8ca79(%rip), %rdi     # 0xbf0e8
addq $0x218, %rdi            # imm = 0x218
movl $0x2e, %ecx
leaq -0x20(%rbp), %r8
callq 0x15830
movl %eax, -0x24(%rbp)
cmpl $-0x1, -0x24(%rbp)
jne 0x326ba
callq 0x120b0
cmpl $0xb, (%rax)
je 0x326b8
movl $0x1, %edi
leaq 0x74ef8(%rip), %rsi     # 0xa759b
leaq 0x8ca3e(%rip), %rdx     # 0xbf0e8
addq $0x218, %rdx            # imm = 0x218
movb $0x0, %al
callq 0x18b10
jmp 0x3272b
movl -0x24(%rbp), %esi
xorl %eax, %eax
movl %eax, %edi
callq 0x14750
movl -0x24(%rbp), %esi
xorl %eax, %eax
movl %eax, %edi
callq 0x14950
leaq -0x60(%rbp), %rdx
movl -0x20(%rbp), %ecx
movl $0x1, %edi
leaq 0x74ed1(%rip), %rsi     # 0xa75b6
movb $0x0, %al
callq 0x18b10
xorl %eax, %eax
movl %eax, %edi
callq 0x32ac0
movq %rax, -0x68(%rbp)
movl -0x24(%rbp), %ecx
movq -0x68(%rbp), %rax
movl %ecx, 0x8(%rax)
leaq 0x8c9de(%rip), %rax     # 0xbf0e8
movq 0x38(%rax), %rdi
movl -0x24(%rbp), %esi
movq -0x68(%rbp), %r8
movl $0x1, %edx
leaq 0x4bf(%rip), %rcx       # 0x32be0
callq 0x137d0
jmp 0x3264d
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/cluster.c
// Function: clusterUpdateState
void clusterUpdateState(void) {
    server.cluster->todo_before_sleep &= ~CLUSTER_TODO_UPDATE_STATE;

    /* Compute the cluster size, that is the number of nodes
     * actually partecipating to the cluster (so nodes in handshake
     * state are excluded).
     *
     * Discnt does not use any quorum, so this is only useful in order to
     * mark node from PFAIL to FAIL when we have failure reports from
     * majority. The notion of failure is only used for optimizations,
     * for example if a node appears to be failing we don't try to send
     * it ACKs or replicate messages to it. */
    {
        dictIterator *di;
        dictEntry *de;

        server.cluster->size = 0;
        di = dictGetSafeIterator(server.cluster->nodes);
        while((de = dictNext(di)) != NULL) {
            clusterNode *node = dictGetVal(de);

            if (!(node->flags & CLUSTER_NODE_HANDSHAKE))
                server.cluster->size++;
        }
        dictReleaseIterator(di);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x8c999(%rip), %rax     # 0xbf0e8
movq 0x668(%rax), %rax
movl 0x28(%rax), %ecx
andl $-0x2, %ecx
movl %ecx, 0x28(%rax)
leaq 0x8c982(%rip), %rax     # 0xbf0e8
movq 0x668(%rax), %rax
movl $0x0, 0xc(%rax)
leaq 0x8c96d(%rip), %rax     # 0xbf0e8
movq 0x668(%rax), %rax
movq 0x10(%rax), %rdi
callq 0x17370
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x173a0
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0x327d6
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl 0x30(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x327d4
leaq 0x8c924(%rip), %rax     # 0xbf0e8
movq 0x668(%rax), %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
jmp 0x3278f
movq -0x8(%rbp), %rdi
callq 0x17510
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)