LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/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:
testb $0x40, 0x88(%rdi)
jne 0x1c8ba
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x58(%rdi), %rax
cmpq $0x0, 0x28(%rax)
je 0x1c8bb
movq 0x8(%rax), %r13
movq 0x10(%r13), %r12
testq %r12, %r12
je 0x1c8bb
movq %r12, %rdi
callq 0x1c6dd
addq %rbx, %rax
cmpq $0x4000, %rax           # imm = 0x4000
ja 0x1c8bb
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x19ad8
movq %rax, 0x10(%r13)
jmp 0x1c8d2
retq
movq %r15, %rdi
movq %rbx, %rsi
callq 0x19398
movq 0x58(%r14), %rdi
movq %rax, %rsi
callq 0x12bac
addq %rbx, 0x60(%r14)
movq %r14, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x1c715
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
movq %rdi, %rbx
callq 0x1c558
testl %eax, %eax
je 0x1cd1e
xorl %eax, %eax
jmp 0x1cd31
movq 0x58(%rbx), %rdi
xorl %esi, %esi
callq 0x12bac
movq 0x58(%rbx), %rax
movq 0x8(%rax), %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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:
testq %rsi, %rsi
je 0x1cdb7
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x30100(%rip), %rdi     # 0x4ce4d
pushq $0x1
popq %rsi
callq 0x19398
leaq 0x31885(%rip), %rsi     # 0x4e5e1
movq %rax, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x19db8
movq %rax, %r15
movq %rax, 0x10(%r14)
movq %rax, %rdi
callq 0x1c6dd
addq %rax, 0x60(%rbx)
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x1cdaa
movq 0x10(%rax), %rsi
testq %rsi, %rsi
je 0x1cdaa
movq %r15, %rdi
callq 0x19b5e
movq %rax, %r15
movq 0x58(%rbx), %rdi
movq 0x8(%r14), %rsi
callq 0x12c88
movq %r15, 0x10(%r14)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1c715
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
subq $0x120, %rsp            # imm = 0x120
movq %rdi, %rbx
fldt 0x140(%rsp)
fld %st(0)
fstpt 0x10(%rsp)
movl 0x18(%rsp), %eax
notl %eax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq 0x10(%rsp), %rcx
andl $0x7fff, %eax           # imm = 0x7FFF
orq %rcx, %rax
jne 0x1cf14
fldz
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
leaq 0x316f3(%rip), %rax     # 0x4e5e8
leaq 0x316eb(%rip), %rsi     # 0x4e5e7
cmovaq %rax, %rsi
movq %rbx, %rdi
addq $0x120, %rsp            # imm = 0x120
popq %rbx
popq %r14
popq %r15
jmp 0x1ce65
fstpt (%rsp)
leaq 0x316de(%rip), %rdx     # 0x4e5fc
leaq 0xa0(%rsp), %r14
movl $0x80, %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x122d0
leaq 0x316b6(%rip), %rdx     # 0x4e5f2
leaq 0x20(%rsp), %r15
movl $0x80, %esi
movq %r15, %rdi
movl %eax, %ecx
movq %r14, %r8
xorl %eax, %eax
callq 0x122d0
movslq %eax, %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1ca4b
addq $0x120, %rsp            # imm = 0x120
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r14
pushq %rbx
movl %esi, %ebp
movl %edi, %ebx
callq 0x1c28c
testq %rax, %rax
je 0x1d321
movq %rax, %r14
leaq 0x4cda0(%rip), %rbx     # 0x6a088
movq 0x1e0(%rbx), %rax
movl 0x60c(%rbx), %ecx
cmpq %rcx, 0x28(%rax)
jbe 0x1d34e
movl 0x8(%r14), %edi
leaq 0x317ab(%rip), %rsi     # 0x4eab1
pushq $0x24
popq %rdx
callq 0x121e0
incq 0x3a0(%rbx)
movq %r14, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x1d548
callq 0x120d0
movl (%rax), %edi
callq 0x128e0
leaq 0x31743(%rip), %rsi     # 0x4ea77
pushq $0x3
popq %rdi
movq %rax, %rdx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x15b9e
movl %ebx, %edi
popq %rbx
popq %r14
popq %rbp
jmp 0x123b0
incq 0x380(%rbx)
orl %ebp, 0x88(%r14)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/networking.c
// Function: freeClient
void freeClient(client *c) {
    listNode *ln;

    /* Free the query buffer */
    sdsfree(c->querybuf);
    c->querybuf = NULL;

    /* Deallocate structures used to block on blocking ops. */
    if (c->flags & CLIENT_BLOCKED) unblockClient(c);

    if (c->sub_counters != NULL) {
      pubsubUnsubscribeAllCounters(c,0);
      dictRelease(c->sub_counters);
      c->sub_counters = NULL;
    }

    /* Free data structures. */
    listRelease(c->reply);
    freeClientArgv(c);

    /* Unlink the client: this will close the socket, remove the I/O
     * handlers, and remove references of the client from different
     * places where active clients may be referenced. */
    unlinkClient(c);

    if (c->flags & CLIENT_MONITOR) {
        ln = listSearchKey(server.monitors,c);
        serverAssert(ln != NULL);
        listDelNode(server.monitors,ln);
    }

    /* If this client was scheduled for async freeing we need to remove it
     * from the queue. */
    if (c->flags & CLIENT_CLOSE_ASAP) {
        ln = listSearchKey(server.clients_to_close,c);
        serverAssert(ln != NULL);
        listDelNode(server.clients_to_close,ln);
    }

    /* Release other dynamically allocated client structure fields,
     * and finally release the client structure itself. */
    if (c->name) decrRefCount(c->name);
    zfree(c->argv);
    sdsfree(c->peerid);
    zfree(c);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0x19548
andq $0x0, 0x18(%rbx)
testb $0x10, 0x88(%rbx)
je 0x1d56e
movq %rbx, %rdi
callq 0x28e92
cmpq $0x0, 0xa8(%rbx)
je 0x1d596
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2c79d
movq 0xa8(%rbx), %rdi
callq 0x14dad
andq $0x0, 0xa8(%rbx)
movq 0x58(%rbx), %rdi
callq 0x12b0a
movq %rbx, %rdi
callq 0x1d680
movq %rbx, %rdi
callq 0x1d412
movl 0x88(%rbx), %eax
testb $0x4, %al
je 0x1d5e9
leaq 0x4cac8(%rip), %r14     # 0x6a088
movq 0x1f8(%r14), %rdi
movq %rbx, %rsi
callq 0x12dc6
testq %rax, %rax
je 0x1d64b
movq 0x1f8(%r14), %rdi
movq %rax, %rsi
callq 0x12c88
movl 0x88(%rbx), %eax
btl $0xa, %eax
jae 0x1d619
leaq 0x4ca92(%rip), %r14     # 0x6a088
movq 0x1e8(%r14), %rdi
movq %rbx, %rsi
callq 0x12dc6
testq %rax, %rax
je 0x1d660
movq 0x1e8(%r14), %rdi
movq %rax, %rsi
callq 0x12c88
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x1d627
callq 0x1fb84
movq 0x30(%rbx), %rdi
callq 0x1ac81
movq 0xb0(%rbx), %rdi
callq 0x19548
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1ac81
leaq 0x31000(%rip), %rdi     # 0x4e652
leaq 0x30f51(%rip), %rsi     # 0x4e5aa
movl $0x2c8, %edx            # imm = 0x2C8
jmp 0x1d673
leaq 0x30feb(%rip), %rdi     # 0x4e652
leaq 0x30f3c(%rip), %rsi     # 0x4e5aa
movl $0x2d0, %edx            # imm = 0x2D0
callq 0x240ca
pushq $0x1
popq %rdi
callq 0x12120
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
movq %rdi, %rbx
callq 0x1d680
andq $0x0, 0x48(%rbx)
orq $-0x1, 0x50(%rbx)
movl 0x88(%rbx), %eax
movl %eax, %ecx
andl $0xff7fffff, %ecx       # imm = 0xFF7FFFFF
movl %eax, %edx
andl $0xff3fffff, %edx       # imm = 0xFF3FFFFF
orl $0x800000, %edx         # imm = 0x800000
btl $0x16, %eax
cmovael %ecx, %edx
movl %edx, 0x88(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/networking.c
// Function: processInputBuffer
void processInputBuffer(client *c) {
    server.current_client = c;
    /* Keep processing while there is something in the input buffer */
    while(sdslen(c->querybuf)) {
        /* Return if clients are paused. */
        if (!(c->flags & CLIENT_MONITOR) && clientsArePaused()) break;

        /* Immediately abort if the client is in the middle of something. */
        if (c->flags & CLIENT_BLOCKED) break;

        /* CLIENT_CLOSE_AFTER_REPLY closes the connection once the reply is
         * written to the client. Make sure to not let the reply grow after
         * this flag has been set (i.e. don't process more commands). */
        if (c->flags & CLIENT_CLOSE_AFTER_REPLY) break;

        /* Determine request type when unknown. */
        if (!c->reqtype) {
            if (c->querybuf[0] == '*') {
                c->reqtype = PROTO_REQ_MULTIBULK;
            } else {
                c->reqtype = PROTO_REQ_INLINE;
            }
        }

        if (c->reqtype == PROTO_REQ_INLINE) {
            if (processInlineBuffer(c) != C_OK) break;
        } else if (c->reqtype == PROTO_REQ_MULTIBULK) {
            if (processMultibulkBuffer(c) != C_OK) break;
        } else {
            serverPanic("Unknown request type");
        }

        /* Multibulk processing could see a <= 0 length. */
        if (c->argc == 0) {
            resetClient(c);
        } else {
            /* Only reset the client when the command was executed. */
            if (processCommand(c) == C_OK)
                resetClient(c);
        }
    }
    server.current_client = NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x4c0c2(%rip), %r14     # 0x6a088
movq %rdi, 0x200(%r14)
movq 0x18(%rbx), %rdi
callq 0x1c6dd
testq %rax, %rax
je 0x1e055
movl 0x88(%rbx), %eax
testb $0x4, %al
jne 0x1dff4
callq 0x1e085
testl %eax, %eax
jne 0x1e055
movl 0x88(%rbx), %eax
testb $0x50, %al
jne 0x1e055
movl 0x48(%rbx), %eax
cmpl $0x2, %eax
je 0x1e019
cmpl $0x1, %eax
je 0x1e02a
testl %eax, %eax
jne 0x1e065
movq 0x18(%rbx), %rax
cmpb $0x2a, (%rax)
jne 0x1e023
movl $0x2, 0x48(%rbx)
movq %rbx, %rdi
callq 0x1dc02
jmp 0x1e032
movl $0x1, 0x48(%rbx)
movq %rbx, %rdi
callq 0x1da42
testl %eax, %eax
jne 0x1e055
cmpl $0x0, 0x28(%rbx)
je 0x1e048
movq %rbx, %rdi
callq 0x17add
testl %eax, %eax
jne 0x1dfcd
movq %rbx, %rdi
callq 0x1da04
jmp 0x1dfcd
andq $0x0, 0x200(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x30761(%rip), %rdi     # 0x4e7cd
leaq 0x30537(%rip), %rsi     # 0x4e5aa
movl $0x462, %edx            # imm = 0x462
callq 0x24359
pushq $0x1
popq %rdi
callq 0x12120
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
callq 0x194cc
leaq 0x4bbdf(%rip), %rbx     # 0x6a088
movq 0x1e0(%rbx), %rcx
imulq $0xc8, 0x28(%rcx), %rsi
movq %rax, %rdi
callq 0x195c3
movq %rax, %r15
movq 0x1e0(%rbx), %rdi
leaq 0x8(%rsp), %rbx
movq %rbx, %rsi
callq 0x12d0c
leaq 0x2f81a(%rip), %r14     # 0x4dcf8
pushq $0x1
popq %r12
movq %rbx, %rdi
callq 0x12d26
testq %rax, %rax
je 0x1e50e
movq 0x10(%rax), %rsi
movq %r15, %rdi
callq 0x1e111
movq %rax, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x19ad8
movq %rax, %r15
jmp 0x1e4e2
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl %esi, 0x28(%rdi)
jle 0x1ed48
movq 0x30(%rbx), %rax
movslq %esi, %r15
movq (%rax,%r15,8), %r14
movq %rdx, (%rax,%r15,8)
movq %rdx, %rdi
callq 0x1fa20
movq %r14, %rdi
callq 0x1fb84
testl %r15d, %r15d
jne 0x1ed42
movq 0x30(%rbx), %rax
movq (%rax), %rax
movq 0x8(%rax), %rdi
callq 0x1786b
movq %rax, 0x38(%rbx)
testq %rax, %rax
je 0x1ed63
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2fca3(%rip), %rdx     # 0x4e9f2
leaq 0x2f854(%rip), %rcx     # 0x4e5aa
movq %rbx, %rdi
xorl %esi, %esi
movl $0x5eb, %r8d            # imm = 0x5EB
jmp 0x1ed7c
leaq 0x2fc79(%rip), %rdx     # 0x4e9e3
leaq 0x2f839(%rip), %rcx     # 0x4e5aa
movq %rbx, %rdi
xorl %esi, %esi
movl $0x5f4, %r8d            # imm = 0x5F4
callq 0x24087
pushq $0x1
popq %rdi
callq 0x12120
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/networking.c
// Function: checkClientOutputBufferLimits
int checkClientOutputBufferLimits(client *c) {
    int soft = 0, hard = 0, class;
    unsigned long used_mem = getClientOutputBufferMemoryUsage(c);

    class = getClientType(c);
    if (server.client_obuf_limits[class].hard_limit_bytes &&
        used_mem >= server.client_obuf_limits[class].hard_limit_bytes)
        hard = 1;
    if (server.client_obuf_limits[class].soft_limit_bytes &&
        used_mem >= server.client_obuf_limits[class].soft_limit_bytes)
        soft = 1;

    /* We need to check if the soft limit is reached continuously for the
     * specified amount of seconds. */
    if (soft) {
        if (c->obuf_soft_limit_reached_time == 0) {
            c->obuf_soft_limit_reached_time = server.unixtime;
            soft = 0; /* First time we see the soft limit reached */
        } else {
            time_t elapsed = server.unixtime - c->obuf_soft_limit_reached_time;

            if (elapsed <=
                server.client_obuf_limits[class].soft_limit_seconds) {
                soft = 0; /* The client still did not reached the max number of
                             seconds for the soft limit to be considered
                             reached. */
            }
        }
    } else {
        c->obuf_soft_limit_reached_time = 0;
    }
    return soft || hard;
}

// Assembly:
movq 0x58(%rdi), %rax
imulq $0x1d, 0x28(%rax), %rax
addq 0x60(%rdi), %rax
movl 0x88(%rdi), %ecx
shrl $0x12, %ecx
andl $0x1, %ecx
imulq $0x18, %rcx, %rdx
leaq 0x4b2bd(%rip), %rsi     # 0x6a088
movq 0x5c0(%rsi,%rdx), %rcx
movq 0x5c8(%rsi,%rdx), %r8
decq %r8
cmpq %rax, %r8
jae 0x1ee0c
movq 0x80(%rdi), %r9
movq 0x648(%rsi), %r8
testq %r9, %r9
je 0x1ee16
addq %rsi, %rdx
addq $0x5c0, %rdx            # imm = 0x5C0
subq %r9, %r8
cmpq 0x10(%rdx), %r8
setg %dl
jmp 0x1ee1f
andq $0x0, 0x80(%rdi)
jmp 0x1ee1d
movq %r8, 0x80(%rdi)
xorl %edx, %edx
decq %rcx
cmpq %rax, %rcx
setb %al
orb %dl, %al
movzbl %al, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/util.c
// Function: memtoll
long long memtoll(const char *p, int *err) {
    const char *u;
    char buf[128];
    long mul; /* unit multiplier */
    long long val;
    unsigned int digits;

    if (err) *err = 0;
    /* Search the first non digit character. */
    u = p;
    if (*u == '-') u++;
    while(*u && isdigit(*u)) u++;
    if (*u == '\0' || !strcasecmp(u,"b")) {
        mul = 1;
    } else if (!strcasecmp(u,"k")) {
        mul = 1000;
    } else if (!strcasecmp(u,"kb")) {
        mul = 1024;
    } else if (!strcasecmp(u,"m")) {
        mul = 1000*1000;
    } else if (!strcasecmp(u,"mb")) {
        mul = 1024*1024;
    } else if (!strcasecmp(u,"g")) {
        mul = 1000L*1000*1000;
    } else if (!strcasecmp(u,"gb")) {
        mul = 1024L*1024*1024;
    } else {
        if (err) *err = 1;
        mul = 1;
    }
    digits = u-p;
    if (digits >= sizeof(buf)) {
        if (err) *err = 1;
        return LLONG_MAX;
    }
    memcpy(buf,p,digits);
    buf[digits] = '\0';
    val = strtoll(buf,NULL,10);
    return val*mul;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rsi, %rbx
movq %rdi, %r14
testq %rsi, %rsi
je 0x1f13a
andl $0x0, (%rbx)
xorl %r12d, %r12d
cmpb $0x2d, (%r14)
sete %r12b
pushq $0x1
popq %r13
movsbq (%r14,%r12), %r15
testq %r15, %r15
je 0x1f23e
callq 0x129a0
movq (%rax), %rax
testb $0x8, 0x1(%rax,%r15,2)
je 0x1f16c
incq %r12
jmp 0x1f149
leaq (%r14,%r12), %r15
leaq 0x2f333(%rip), %rsi     # 0x4e4aa
movq %r15, %rdi
callq 0x12090
testl %eax, %eax
je 0x1f23e
leaq 0x3488b(%rip), %rsi     # 0x53a19
movq %r15, %rdi
callq 0x12090
testl %eax, %eax
je 0x1f218
leaq 0x304be(%rip), %rsi     # 0x4f65f
movq %r15, %rdi
callq 0x12090
testl %eax, %eax
je 0x1f220
leaq 0x32d40(%rip), %rsi     # 0x51ef4
movq %r15, %rdi
callq 0x12090
testl %eax, %eax
je 0x1f228
leaq 0x30491(%rip), %rsi     # 0x4f658
movq %r15, %rdi
callq 0x12090
testl %eax, %eax
je 0x1f230
leaq 0x2f416(%rip), %rsi     # 0x4e5f0
movq %r15, %rdi
callq 0x12090
testl %eax, %eax
je 0x1f238
leaq 0x30464(%rip), %rsi     # 0x4f651
movq %r15, %rdi
callq 0x12090
testl %eax, %eax
movl $0x40000000, %r13d      # imm = 0x40000000
pushq $0x1
popq %rcx
cmovneq %rcx, %r13
testq %rbx, %rbx
je 0x1f23e
testl %eax, %eax
je 0x1f23e
movl $0x1, (%rbx)
movq %rcx, %r13
jmp 0x1f23e
movl $0x3e8, %r13d           # imm = 0x3E8
jmp 0x1f23e
movl $0x400, %r13d           # imm = 0x400
jmp 0x1f23e
movl $0xf4240, %r13d         # imm = 0xF4240
jmp 0x1f23e
movl $0x100000, %r13d        # imm = 0x100000
jmp 0x1f23e
movl $0x3b9aca00, %r13d      # imm = 0x3B9ACA00
movl %r12d, %r15d
cmpq $0x80, %r15
jb 0x1f261
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
testq %rbx, %rbx
je 0x1f288
movl $0x1, (%rbx)
jmp 0x1f288
movq %rsp, %rbx
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x12510
movb $0x0, (%rsp,%r15)
pushq $0xa
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x124b0
imulq %r13, %rax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
pushq $0x10
popq %rdi
callq 0x1ab29
andl $0xf, %ebp
movq %rbx, 0x8(%rax)
movl $0x1, 0x4(%rax)
movl %ebp, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
fldt 0x130(%rsp)
fstpt (%rsp)
leaq 0x2f20d(%rip), %rdx     # 0x4ec4c
leaq 0x10(%rsp), %r14
movl $0x100, %esi            # imm = 0x100
movq %r14, %rdi
xorl %eax, %eax
callq 0x122d0
movl %eax, %ebx
pushq $0x2e
popq %rsi
movq %r14, %rdi
callq 0x122b0
testq %rax, %rax
je 0x1fa7e
movslq %ebx, %rbx
movzbl 0xf(%rsp,%rbx), %eax
cmpl $0x30, %eax
jne 0x1fa77
decq %rbx
jmp 0x1fa68
cmpl $0x2e, %eax
jne 0x1fa7e
decl %ebx
movslq %ebx, %rsi
leaq 0x10(%rsp), %rdi
callq 0x1f9d5
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
movl 0x4(%rdi), %eax
testl %eax, %eax
jle 0x1fbb1
movq %rdi, %rbx
cmpl $0x1, %eax
jne 0x1fbaa
testb $0xf, (%rbx)
jne 0x1fbc6
movq %rbx, %rdi
callq 0x1fb75
movq %rbx, %rdi
popq %rbx
jmp 0x1ac81
decl %eax
movl %eax, 0x4(%rbx)
popq %rbx
retq
leaq 0x2f0b6(%rip), %rdi     # 0x4ec6e
leaq 0x2f094(%rip), %rsi     # 0x4ec53
movl $0xb0, %edx
jmp 0x1fbd9
leaq 0x2f0c6(%rip), %rdi     # 0x4ec93
leaq 0x2f07f(%rip), %rsi     # 0x4ec53
movl $0xb4, %edx
callq 0x24359
pushq $0x1
popq %rdi
callq 0x12120
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
xorl %r15d, %r15d
testq %rdi, %rdi
je 0x20370
movq %rdi, %r14
movl (%rdi), %eax
testb $0xf, %al
jne 0x20386
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x2, %eax
je 0x20323
cmpl $0x1, %eax
je 0x2036c
testl %eax, %eax
jne 0x203a6
callq 0x120d0
movq %rax, %r12
andl $0x0, (%rax)
movq 0x8(%r14), %rdi
movq %rsp, %rsi
pushq $0xa
popq %rdx
callq 0x124b0
movq %rax, %r15
callq 0x129a0
movq (%rax), %rcx
movq 0x8(%r14), %rax
movsbq (%rax), %rdx
pushq $-0x1
popq %rax
testb $0x20, 0x1(%rcx,%rdx,2)
jne 0x2037a
movq (%rsp), %rcx
cmpb $0x0, (%rcx)
jne 0x2037a
cmpl $0x22, (%r12)
jne 0x20370
jmp 0x2037a
movq 0x8(%r14), %r15
testq %rbx, %rbx
je 0x20378
movq %r15, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x2e207(%rip), %rdx     # 0x4e594
leaq 0x2e8bf(%rip), %rcx     # 0x4ec53
xorl %edi, %edi
movq %r14, %rsi
movl $0x1e9, %r8d            # imm = 0x1E9
callq 0x24087
jmp 0x203be
leaq 0x2e943(%rip), %rdi     # 0x4ecf0
leaq 0x2e89f(%rip), %rsi     # 0x4ec53
movl $0x1f3, %edx            # imm = 0x1F3
callq 0x24359
pushq $0x1
popq %rdi
callq 0x12120
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/config.c
// Function: configCommand
void configCommand(client *c) {
    if (!strcasecmp(c->argv[1]->ptr,"set")) {
        if (c->argc != 4) goto badarity;
        configSetCommand(c);
    } else if (!strcasecmp(c->argv[1]->ptr,"get")) {
        if (c->argc != 3) goto badarity;
        configGetCommand(c);
    } else if (!strcasecmp(c->argv[1]->ptr,"resetstat")) {
        if (c->argc != 2) goto badarity;
        resetServerStats();
        resetCommandTableStats();
        addReply(c,shared.ok);
    } else if (!strcasecmp(c->argv[1]->ptr,"rewrite")) {
        if (c->argc != 2) goto badarity;
        if (server.configfile == NULL) {
            addReplyError(c,"The server is running without a config file");
            return;
        }
        if (rewriteConfig(server.configfile) == -1) {
            serverLog(LL_WARNING,"CONFIG REWRITE failed: %s", strerror(errno));
            addReplyErrorFormat(c,"Rewriting config file: %s", strerror(errno));
        } else {
            serverLog(LL_WARNING,"CONFIG REWRITE executed with success.");
            addReply(c,shared.ok);
        }
    } else {
        addReplyError(c,
            "CONFIG subcommand must be one of GET, SET, RESETSTAT, REWRITE");
    }
    return;

badarity:
    addReplyErrorFormat(c,"Wrong number of arguments for CONFIG %s",
        (char*) c->argv[1]->ptr);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x30(%rdi), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %r14
leaq 0x29cff(%rip), %rsi     # 0x4d1cd
movq %r14, %rdi
callq 0x12090
testl %eax, %eax
je 0x23529
leaq 0x28f83(%rip), %rsi     # 0x4c464
movq %r14, %rdi
callq 0x12090
testl %eax, %eax
je 0x23542
leaq 0x2c1bd(%rip), %rsi     # 0x4f6b1
movq %r14, %rdi
callq 0x12090
testl %eax, %eax
je 0x23557
leaq 0x2c1b4(%rip), %rsi     # 0x4f6bb
movq %r14, %rdi
callq 0x12090
testl %eax, %eax
je 0x23581
leaq 0x2c22f(%rip), %rsi     # 0x4f749
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1cacf
cmpl $0x4, 0x28(%rbx)
jne 0x235b4
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x212aa
cmpl $0x3, 0x28(%rbx)
jne 0x235b4
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x21b51
cmpl $0x2, 0x28(%rbx)
jne 0x235b4
callq 0x173fa
callq 0x1783c
leaq 0x4722a(%rip), %rax     # 0x6a798
movq 0x8(%rax), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1c8e7
cmpl $0x2, 0x28(%rbx)
jne 0x235b4
leaq 0x46afa(%rip), %rax     # 0x6a088
movq 0x8(%rax), %rdi
testq %rdi, %rdi
je 0x235cf
callq 0x2317c
cmpl $-0x1, %eax
je 0x235db
leaq 0x2c17b(%rip), %rsi     # 0x4f723
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x15b9e
jmp 0x23567
leaq 0x2c1cc(%rip), %rsi     # 0x4f787
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1caf6
leaq 0x2c0ed(%rip), %rsi     # 0x4f6c3
jmp 0x2351a
callq 0x120d0
movq %rax, %r14
movl (%rax), %edi
callq 0x128e0
leaq 0x2c0fe(%rip), %rsi     # 0x4f6ef
pushq $0x3
popq %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x15b9e
movl (%r14), %edi
callq 0x128e0
leaq 0x2c0fc(%rip), %rsi     # 0x4f709
movq %rbx, %rdi
movq %rax, %rdx
jmp 0x235c1
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
andl $0x0, 0x10(%rdi)
xorps %xmm0, %xmm0
movq %rdi, 0x8(%rsp)
movups %xmm0, (%rdi)
leaq 0x469b6(%rip), %rax     # 0x6a088
movq 0x618(%rax), %rdi
callq 0x14f27
movq %rax, (%rsp)
leaq 0x10(%rsp), %r15
pushq $0x8
popq %r12
leaq 0x28(%rsp), %r13
pushq $0x10
popq %rbp
movq (%rsp), %rdi
callq 0x14f5b
testq %rax, %rax
je 0x237be
movq %rax, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
andl $0x0, 0x20(%rsp)
movq (%rax), %r14
movq %r14, %rdi
callq 0x237d6
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x23671
movq 0x8(%rbx), %r14
movq (%r14), %rbx
movq %rbx, %rdi
callq 0x237d6
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x23671
leaq 0x50(%r14), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x23671
movq 0x8(%r14), %rdi
movq %r13, %rsi
callq 0x12d0c
movq %r13, %rdi
callq 0x12d26
testq %rax, %rax
je 0x237a9
movq 0x10(%rax), %rbx
leaq 0x40(%rbx), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x23671
leaq 0x50(%rbx), %rsi
movq %r15, %rdi
movq %rbp, %rdx
callq 0x23671
addq $0x60, %rbx
movq %r15, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x23671
jmp 0x23766
movq 0x8(%rsp), %rdi
movq %r15, %rsi
pushq $0x14
popq %rdx
callq 0x23618
jmp 0x236f3
movq (%rsp), %rdi
callq 0x1501c
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
leaq 0x45f39(%rip), %rbx     # 0x6a088
cmpl $0x0, 0x694(%rbx)
jne 0x24173
leaq 0x2bad7(%rip), %rsi     # 0x4fc36
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x15b9e
movl $0x1, 0x694(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %edx
andl $0xf, %edx
leaq 0x2b86e(%rip), %rsi     # 0x4fb0b
pushq $0x3
popq %rbp
movl %ebp, %edi
xorl %eax, %eax
callq 0x15b9e
movl (%rbx), %edx
shrl $0x4, %edx
andl $0xf, %edx
leaq 0x2b863(%rip), %rsi     # 0x4fb1b
movl %ebp, %edi
xorl %eax, %eax
callq 0x15b9e
movl 0x4(%rbx), %edx
leaq 0x2b864(%rip), %rsi     # 0x4fb2f
movl %ebp, %edi
xorl %eax, %eax
callq 0x15b9e
movl (%rbx), %eax
testb $0xf, %al
je 0x242df
popq %rbx
popq %r14
popq %rbp
retq
shrl $0x4, %eax
testb $0xd, %al
jne 0x242da
movq 0x8(%rbx), %rdi
callq 0x237d6
leaq 0x2b84d(%rip), %rsi     # 0x4fb43
pushq $0x3
popq %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x15b9e
movq 0x8(%rbx), %rdi
callq 0x237d6
cmpq $0xfff, %rax            # imm = 0xFFF
ja 0x242da
callq 0x194cc
movq %rax, %r14
movq 0x8(%rbx), %rbx
movq %rbx, %rdi
callq 0x237d6
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x1a571
movq %rax, %rbx
leaq 0x2b81e(%rip), %rsi     # 0x4fb5e
pushq $0x3
popq %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x15b9e
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x19548
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r14
pushq %rbx
subq $0x320, %rsp            # imm = 0x320
movq %rdi, %r14
leaq 0x45b2a(%rip), %rax     # 0x6a088
movq 0x5f0(%rax), %rdi
movb (%rdi), %bpl
testb %bpl, %bpl
je 0x24587
movl $0x441, %esi            # imm = 0x441
movl $0x1a4, %edx            # imm = 0x1A4
xorl %eax, %eax
callq 0x126e0
movl %eax, %ebx
cmpl $-0x1, %eax
jne 0x2458a
jmp 0x245be
pushq $0x1
popq %rbx
movq %rsp, %rdi
pushq $0x64
popq %rsi
callq 0x12260
movq 0xa8(%r14), %rcx
testq %rcx, %rcx
je 0x245a6
movq %rcx, 0x8(%rsp)
movq %rsp, %rdi
movl %eax, %esi
movl %ebx, %edx
callq 0x120a0
testb %bpl, %bpl
je 0x245be
movl %ebx, %edi
callq 0x123b0
addq $0x320, %rsp            # imm = 0x320
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0x45aaf(%rip), %rax     # 0x6a088
movq 0x200(%rax), %rbx
testq %rbx, %rbx
je 0x2466d
leaq 0x2b77e(%rip), %rsi     # 0x4fd6e
pushq $0x3
popq %rbp
movl %ebp, %edi
xorl %eax, %eax
callq 0x15b9e
callq 0x194cc
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1e111
movq %rax, %r14
leaq 0x2a1db(%rip), %rsi     # 0x4e7f1
movl %ebp, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x15b9e
movq %r14, %rdi
callq 0x19548
leaq 0x2b755(%rip), %r14     # 0x4fd86
xorl %r15d, %r15d
movslq 0x28(%rbx), %rax
cmpq %rax, %r15
jge 0x2466d
movq 0x30(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x1fe17
movq %rax, %r12
movq 0x8(%rax), %rcx
movl %ebp, %edi
movq %r14, %rsi
movl %r15d, %edx
xorl %eax, %eax
callq 0x15b9e
movq %r12, %rdi
callq 0x1fb84
incq %r15
jmp 0x24634
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %r14
movl $0x98, %edi
callq 0x1ab29
movq %rax, %rbx
testq %r14, %r14
je 0x252ef
movq 0x20(%r14), %rax
movq %rax, 0x20(%rbx)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
jmp 0x252fa
pushq $0x28
popq %rsi
movq %rbx, %rdi
callq 0x1f624
callq 0x15db3
movq %rax, 0x28(%rbx)
movl %ebp, 0x30(%rbx)
andq $0x0, 0x88(%rbx)
andl $0x0, 0x80(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rbx)
movups %xmm0, 0x48(%rbx)
movups %xmm0, 0x58(%rbx)
movups %xmm0, 0x68(%rbx)
andq $0x0, 0x76(%rbx)
callq 0x12aec
movq %rax, 0x90(%rbx)
leaq -0xa6bf(%rip), %rcx     # 0x1ac81
movq %rcx, 0x18(%rax)
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/cluster.c
// Function: clusterSaveConfig
int clusterSaveConfig(int do_fsync) {
    sds ci;
    size_t content_size;
    struct stat sb;
    int fd;

    server.cluster->todo_before_sleep &= ~CLUSTER_TODO_SAVE_CONFIG;

    /* Get the nodes description and concatenate our "vars" directive to
     * save other persistent state. */
    ci = clusterGenNodesDescription(CLUSTER_NODE_HANDSHAKE);
#if 0 /* TODO: check if we are going to use persistent vars. */
    ci = sdscatprintf(ci,"vars currentEpoch %llu lastVoteEpoch %llu\n",
        (unsigned long long) server.cluster->currentEpoch,
        (unsigned long long) server.cluster->lastVoteEpoch);
#endif
    content_size = sdslen(ci);

    if ((fd = open(server.cluster_configfile,O_WRONLY|O_CREAT,0644))
        == -1) goto err;

    /* Pad the new payload if the existing file length is greater. */
    if (fstat(fd,&sb) != -1) {
        if (sb.st_size > (off_t)content_size) {
            ci = sdsgrowzero(ci,sb.st_size);
            memset(ci+content_size,'\n',sb.st_size-content_size);
        }
    }
    if (write(fd,ci,sdslen(ci)) != (ssize_t)sdslen(ci)) goto err;
    if (do_fsync) {
        server.cluster->todo_before_sleep &= ~CLUSTER_TODO_FSYNC_CONFIG;
        fsync(fd);
    }

    /* Truncate the file if needed to remove the final \n padding that
     * is just garbage. */
    if (content_size != sdslen(ci) && ftruncate(fd,content_size) == -1) {
        /* ftruncate() failing is not a critical error. */
    }
    close(fd);
    sdsfree(ci);
    return 0;

err:
    if (fd != -1) close(fd);
    sdsfree(ci);
    return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %edi, %r15d
leaq 0x44cf9(%rip), %r13     # 0x6a088
movq 0x668(%r13), %rax
andl $-0x3, 0x28(%rax)
pushq $0x8
popq %rdi
callq 0x2548f
movq %rax, %rbx
movq %rax, %rdi
callq 0x2552a
movq %rax, %r14
movq 0x660(%r13), %rdi
pushq $0x41
popq %rsi
movl $0x1a4, %edx            # imm = 0x1A4
xorl %eax, %eax
callq 0x126e0
cmpl $-0x1, %eax
je 0x25461
movl %eax, %ebp
leaq 0x8(%rsp), %rsi
movl %eax, %edi
callq 0x12890
cmpl $-0x1, %eax
je 0x25409
movq 0x38(%rsp), %rsi
movq %rsi, %r12
subq %r14, %r12
jle 0x25409
movq %rbx, %rdi
callq 0x19a76
movq %rax, %rbx
leaq (%rax,%r14), %rdi
pushq $0xa
popq %rsi
movq %r12, %rdx
callq 0x12380
movq %rbx, %rdi
callq 0x2552a
movl %ebp, %edi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x121e0
movq %rax, %r12
movq %rbx, %rdi
callq 0x2552a
cmpq %rax, %r12
jne 0x25467
testl %r15d, %r15d
je 0x25445
movq 0x668(%r13), %rax
andl $-0x5, 0x28(%rax)
movl %ebp, %edi
callq 0x12730
movq %rbx, %rdi
callq 0x2552a
xorl %r15d, %r15d
cmpq %rax, %r14
je 0x2546b
movl %ebp, %edi
movq %r14, %rsi
callq 0x12670
jmp 0x2546b
pushq $-0x1
popq %r15
jmp 0x25472
pushq $-0x1
popq %r15
movl %ebp, %edi
callq 0x123b0
movq %rbx, %rdi
callq 0x19548
movl %r15d, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %esi, %ebx
movl $0x218, %r14d           # imm = 0x218
addq 0x437a0(%rip), %r14     # 0x68fb8
movl $0xfffffc18, %ebp       # imm = 0xFFFFFC18
leaq 0x10(%rsp), %r15
pushq $0x1
popq %r12
testl %ebp, %ebp
je 0x258cc
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
pushq $0x2e
popq %rcx
leaq 0xc(%rsp), %r8
callq 0x141e4
cmpl $-0x1, %eax
je 0x258a5
movl %eax, %r13d
xorl %edi, %edi
movl %eax, %esi
callq 0x1382c
xorl %edi, %edi
movl %r13d, %esi
callq 0x1392b
movl 0xc(%rsp), %ecx
movl %r12d, %edi
leaq 0x2ac06(%rip), %rsi     # 0x50472
movq %r15, %rdx
xorl %eax, %eax
callq 0x15b9e
xorl %edi, %edi
callq 0x25ae7
movl %r13d, 0x8(%rax)
leaq 0x44800(%rip), %rcx     # 0x6a088
movq 0x38(%rcx), %rdi
movl %r13d, %esi
movl %r12d, %edx
leaq 0x2f9(%rip), %rcx       # 0x25b92
movq %rax, %r8
callq 0x1306c
incl %ebp
jmp 0x25826
callq 0x120d0
cmpl $0xb, (%rax)
je 0x258cc
movl $0x218, %edx            # imm = 0x218
addq 0x436fd(%rip), %rdx     # 0x68fb8
leaq 0x2ab95(%rip), %rsi     # 0x50457
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x15b9e
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/cluster.c
// Function: clusterUpdateReachableNodes
void clusterUpdateReachableNodes(void) {
    dictIterator *di;
    dictEntry *de;
    int maxsize = dictSize(server.cluster->nodes) * sizeof(clusterNode*);

    server.cluster->reachable_nodes =
        zrealloc(server.cluster->reachable_nodes,maxsize);
    server.cluster->reachable_nodes_count = 0;
    server.cluster->failing_nodes_count = 0;

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

        if (node->flags & (CLUSTER_NODE_PFAIL|
                           CLUSTER_NODE_FAIL)) server.cluster->failing_nodes_count++;

        if (node->flags & (CLUSTER_NODE_MYSELF|
                           CLUSTER_NODE_HANDSHAKE|
                           CLUSTER_NODE_PFAIL|
                           CLUSTER_NODE_FAIL)) continue;
        server.cluster->reachable_nodes[server.cluster->reachable_nodes_count++]
            = node;
    }
    dictReleaseIterator(di);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x4474a(%rip), %r14     # 0x6a088
movq 0x668(%r14), %rax
movq 0x10(%rax), %rcx
movq 0x30(%rax), %rdi
movl 0x48(%rcx), %eax
addl 0x28(%rcx), %eax
shll $0x3, %eax
movslq %eax, %rsi
callq 0x1abe3
movq 0x668(%r14), %rcx
movq %rax, 0x30(%rcx)
andq $0x0, 0x38(%rcx)
movq 0x10(%rcx), %rdi
callq 0x14f27
movq %rax, %rbx
movq %rbx, %rdi
callq 0x14f5b
testq %rax, %rax
je 0x259bd
movq 0x8(%rax), %rax
movl 0x30(%rax), %ecx
testb $0x3, %cl
je 0x2599d
movq 0x668(%r14), %rdx
incl 0x3c(%rdx)
testb $0xf, %cl
jne 0x2597a
movq 0x668(%r14), %rcx
movq 0x30(%rcx), %rdx
movslq 0x38(%rcx), %rsi
leal 0x1(%rsi), %edi
movl %edi, 0x38(%rcx)
movq %rax, (%rdx,%rsi,8)
jmp 0x2597a
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1501c