LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/server.c
// Function: infoCommand
void infoCommand(client *c) {
    char *section = c->argc == 2 ? c->argv[1]->ptr : "default";

    if (c->argc > 2) {
        addReply(c,shared.syntaxerr);
        return;
    }
    addReplyBulkSds(c, genDiscntInfoString(section));
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x28(%rdi), %eax
cmpl $0x2, %eax
jne 0x19827
movq 0x30(%rbx), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
jmp 0x19840
jle 0x19839
movq 0x55fe8(%rip), %rsi     # 0x6f818
movq %rbx, %rdi
popq %rbx
jmp 0x21c5a
leaq 0x39b48(%rip), %rdi     # 0x53388
callq 0x1c6d3
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
jmp 0x227bb
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/server.c
// Function: shutdownCommand
void shutdownCommand(client *c) {
    int flags = 0;

    if (c->argc > 2) {
        addReply(c,shared.syntaxerr);
        return;
    } else if (c->argc == 2) {
        if (!strcasecmp(c->argv[1]->ptr,"nosave")) {
            flags |= SHUTDOWN_NOSAVE;
        } else if (!strcasecmp(c->argv[1]->ptr,"save")) {
            flags |= SHUTDOWN_SAVE;
        } else {
            addReply(c,shared.syntaxerr);
            return;
        }
    }
    /* When SHUTDOWN is called while the server is loading a dataset in
     * memory we need to make sure no attempt is performed to save
     * the dataset on shutdown (otherwise it could overwrite the current DB
     * with half-read data).
     */
    if (server.loading)
        flags = (flags & ~SHUTDOWN_SAVE) | SHUTDOWN_NOSAVE;
    if (prepareForShutdown(flags) == C_OK) exit(0);
    addReplyError(c,"Errors trying to SHUTDOWN. Check logs.");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x28(%rdi), %ecx
cmpl $0x3, %ecx
jl 0x19876
movq 0x55fb1(%rip), %rsi     # 0x6f818
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x21c5a
xorl %eax, %eax
cmpl $0x2, %ecx
jne 0x198bb
movq 0x30(%rbx), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %r14
leaq 0x39a37(%rip), %rsi     # 0x532c7
movq %r14, %rdi
callq 0x12090
testl %eax, %eax
je 0x198b6
leaq 0x3f2da(%rip), %rsi     # 0x58b7d
movq %r14, %rdi
callq 0x12090
testl %eax, %eax
jne 0x19860
movl $0x1, %eax
jmp 0x198bb
movl $0x2, %eax
cmpl $0x0, 0x55ae6(%rip)     # 0x6f3a8
movl $0x2, %edi
cmovel %eax, %edi
callq 0x1c232
testl %eax, %eax
je 0x198e9
leaq 0x399f4(%rip), %rsi     # 0x532ce
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2200c
xorl %edi, %edi
callq 0x12860
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/server.c
// Function: monitorCommand
void monitorCommand(client *c) {
    /* ignore MONITOR if already in monitor mode */
    if (c->flags & CLIENT_MONITOR) return;

    c->flags |= CLIENT_MONITOR;
    listAddNodeTail(server.monitors,c);
    addReply(c,shared.ok);
}

// Assembly:
movl 0x88(%rdi), %eax
testb $0x4, %al
jne 0x19932
pushq %rbx
movq %rdi, %rbx
orl $0x4, %eax
movl %eax, 0x88(%rdi)
movq 0x55966(%rip), %rdi     # 0x6f280
movq %rbx, %rsi
callq 0x165ab
movq 0x55e77(%rip), %rsi     # 0x6f7a0
movq %rbx, %rdi
popq %rbx
jmp 0x21c5a
retq
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/server.c
// Function: commandCommand
void commandCommand(client *c) {
    dictIterator *di;
    dictEntry *de;

    if (c->argc == 1) {
        addReplyMultiBulkLen(c, dictSize(server.commands));
        di = dictGetIterator(server.commands);
        while ((de = dictNext(di)) != NULL) {
            addReplyCommand(c, dictGetVal(de));
        }
        dictReleaseIterator(di);
    } else if (!strcasecmp(c->argv[1]->ptr, "info")) {
        int i;
        addReplyMultiBulkLen(c, c->argc-2);
        for (i = 2; i < c->argc; i++) {
            addReplyCommand(c, dictFetchValue(server.commands, c->argv[i]->ptr));
        }
    } else if (!strcasecmp(c->argv[1]->ptr, "count") && c->argc == 2) {
        addReplyLongLong(c, dictSize(server.commands));
    } else {
        addReplyError(c, "Unknown subcommand or wrong number of arguments.");
        return;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movslq 0x28(%rdi), %r14
cmpq $0x1, %r14
jne 0x199cd
movq 0x55720(%rip), %rax     # 0x6f0b0
movq 0x48(%rax), %rsi
addq 0x28(%rax), %rsi
movq %rbx, %rdi
callq 0x22676
movq 0x55709(%rip), %rdi     # 0x6f0b0
callq 0x18e9d
movq %rax, %r14
movq %rax, %rdi
callq 0x18ef7
testq %rax, %rax
je 0x19a21
movq 0x8(%rax), %rsi
movq %rbx, %rdi
callq 0x1c43d
movq %r14, %rdi
jmp 0x199b2
movq 0x30(%rbx), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %r15
leaq 0x38b09(%rip), %rsi     # 0x524e9
movq %r15, %rdi
callq 0x12090
testl %eax, %eax
je 0x19a2e
leaq 0x3993a(%rip), %rsi     # 0x5332d
movq %r15, %rdi
callq 0x12090
cmpl $0x2, %r14d
jne 0x19a7e
testl %eax, %eax
jne 0x19a7e
movq 0x556a4(%rip), %rax     # 0x6f0b0
movq 0x48(%rax), %rsi
addq 0x28(%rax), %rsi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x22641
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x18fbf
addq $-0x2, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x22676
cmpl $0x3, 0x28(%rbx)
jl 0x19a78
movl $0x2, %r14d
movq 0x55660(%rip), %rdi     # 0x6f0b0
movq 0x30(%rbx), %rax
movq (%rax,%r14,8), %rax
movq 0x8(%rax), %rsi
callq 0x18dfb
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1c43d
incq %r14
movslq 0x28(%rbx), %rax
cmpq %rax, %r14
jl 0x19a49
popq %rbx
popq %r14
popq %r15
retq
leaq 0x398ae(%rip), %rsi     # 0x53333
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2200c
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/server.c
// Function: serverLogRaw
void serverLogRaw(int level, const char *msg) {
    const int syslogLevelMap[] = { LOG_DEBUG, LOG_INFO, LOG_NOTICE, LOG_WARNING };
    const char *c = ".-*#";
    FILE *fp;
    char buf[64];
    int rawmode = (level & LL_RAW);
    int log_to_stdout = server.logfile[0] == '\0';

    level &= 0xff; /* clear flags */
    if (level < server.verbosity) return;

    fp = log_to_stdout ? stdout : fopen(server.logfile,"a");
    if (!fp) return;

    if (rawmode) {
        fprintf(fp,"%s",msg);
    } else {
        int off;
        struct timeval tv;
        int role_char;
        pid_t pid = getpid();

        gettimeofday(&tv,NULL);
        off = strftime(buf,sizeof(buf),"%d %b %H:%M:%S.",localtime(&tv.tv_sec));
        snprintf(buf+off,sizeof(buf)-off,"%03d",(int)tv.tv_usec/1000);
        if (pid != server.pid) {
            role_char = 'C'; /* DDB writing child. */
        } else {
            role_char = 'P'; /* Parent child. */
        }
        fprintf(fp,"%d:%c %s %c %s\n",
            (int)getpid(),role_char, buf,c[level],msg);
    }
    fflush(fp);

    if (!log_to_stdout) fclose(fp);
    if (server.syslog_enabled) syslog(syslogLevelMap[level], "%s", msg);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %edi, %ebp
movzbl %bpl, %r15d
cmpl 0x55b73(%rip), %r15d    # 0x6f620
jl 0x19bf7
movq %rsi, %rbx
movq 0x55bbb(%rip), %rdi     # 0x6f678
movb (%rdi), %r12b
testb %r12b, %r12b
je 0x19ad6
leaq 0x3ad77(%rip), %rsi     # 0x54843
callq 0x124f0
movq %rax, %r14
jmp 0x19ae0
movq 0x544a3(%rip), %rax     # 0x6df80
movq (%rax), %r14
testq %r14, %r14
je 0x19bf7
btl $0xa, %ebp
jb 0x19bb0
callq 0x121f0
movl %eax, 0xc(%rsp)
leaq 0x10(%rsp), %rbp
movq %rbp, %rdi
xorl %esi, %esi
callq 0x12340
movq %rbp, %rdi
callq 0x120b0
leaq 0x38a5e(%rip), %rdx     # 0x52578
leaq 0x20(%rsp), %rdi
movl $0x40, %r13d
movl $0x40, %esi
movq %rax, %rcx
callq 0x126f0
cltq
leaq (%rsp,%rax), %rdi
addq $0x20, %rdi
subq %rax, %r13
movslq 0x8(%rbp), %rax
imulq $0x10624dd3, %rax, %rcx # imm = 0x10624DD3
movq %rcx, %rax
shrq $0x3f, %rax
sarq $0x26, %rcx
addl %eax, %ecx
leaq 0x3ef74(%rip), %rdx     # 0x58ad2
movq %r13, %rsi
xorl %eax, %eax
callq 0x122d0
movl 0xc(%rsp), %eax
cmpl 0x55516(%rip), %eax     # 0x6f088
movl $0x50, %eax
movl $0x43, %ebp
cmovel %eax, %ebp
callq 0x121f0
leaq 0x389e8(%rip), %rcx     # 0x52573
movsbl (%r15,%rcx), %r9d
movq %rbx, (%rsp)
leaq 0x389ed(%rip), %rsi     # 0x52588
movq %r14, %rdi
movl %eax, %edx
movl %ebp, %ecx
leaq 0x20(%rsp), %r8
xorl %eax, %eax
callq 0x124c0
jmp 0x19bbb
movq %rbx, %rdi
movq %r14, %rsi
callq 0x12360
movq %r14, %rdi
callq 0x125d0
testb %r12b, %r12b
je 0x19bd0
movq %r14, %rdi
callq 0x12220
cmpl $0x0, 0x55aa9(%rip)     # 0x6f680
je 0x19bf7
movl %r15d, %eax
leaq 0x388ad(%rip), %rcx     # 0x52490
movl (%rcx,%rax,4), %edi
leaq 0x3badb(%rip), %rsi     # 0x556c8
movq %rbx, %rdx
xorl %eax, %eax
callq 0x125f0
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/server.c
// Function: getInstantaneousMetric
long long getInstantaneousMetric(int metric) {
    int j;
    long long sum = 0;

    for (j = 0; j < STAT_METRIC_SAMPLES; j++)
        sum += server.inst_metric[metric].samples[j];
    return sum / STAT_METRIC_SAMPLES;
}

// Assembly:
movslq %edi, %rax
imulq $0x98, %rax, %rax
leaq 0x54ce4(%rip), %rcx     # 0x6f088
addq %rcx, %rax
addq $0x3e0, %rax            # imm = 0x3E0
pxor %xmm0, %xmm0
xorl %ecx, %ecx
movdqu (%rax,%rcx,8), %xmm1
paddq %xmm1, %xmm0
addq $0x2, %rcx
cmpq $0x10, %rcx
jne 0x1a3b3
pshufd $0xee, %xmm0, %xmm1     # xmm1 = xmm0[2,3,2,3]
paddq %xmm0, %xmm1
movq %xmm1, %rcx
leaq 0xf(%rcx), %rax
testq %rcx, %rcx
cmovnsq %rcx, %rax
sarq $0x4, %rax
retq
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/server.c
// Function: clientsCronHandleTimeout
int clientsCronHandleTimeout(client *c) {
    time_t now = server.unixtime;

    if (server.maxidletime &&
        !(c->flags & CLIENT_BLOCKED) &&  /* no timeout for blocked clients. */
        !(c->flags & CLIENT_PUBSUB) &&   /* no timeout for Pub/Sub clients */
        !(c->flags & CLIENT_MONITOR) &&  /* no timeout for MONITOR clients. */
        (now - c->lastinteraction > server.maxidletime))
    {
        serverLog(LL_VERBOSE,"Closing idle client");
        freeClient(c);
        return 1;
    } else if (c->flags & CLIENT_BLOCKED) {
        /* Blocked OPS timeout is handled with milliseconds resolution.
         * However note that the actual resolution is limited by
         * server.hz. */
        mstime_t now_ms = mstime();

        if (c->bpop.timeout != 0 && c->bpop.timeout < now_ms) {
            replyToBlockedClientTimedOut(c);
            unblockClient(c);
        }
    }
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movslq 0x5522d(%rip), %rcx     # 0x6f624
testq %rcx, %rcx
setne %dl
movl 0x88(%rdi), %eax
testl $0x40014, %eax          # imm = 0x40014
sete %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x1a448
movq 0x552b4(%rip), %rdx     # 0x6f6d0
subq 0x78(%rbx), %rdx
cmpq %rcx, %rdx
jle 0x1a448
leaq 0x38181(%rip), %rsi     # 0x525ad
movl $0x1, %r14d
movl $0x1, %edi
xorl %eax, %eax
callq 0x19c06
movq %rbx, %rdi
callq 0x22c06
jmp 0x1a4a6
xorl %r14d, %r14d
testb $0x10, %al
je 0x1a4a6
xorl %r14d, %r14d
movq %rsp, %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x12340
imulq $0xf4240, (%r15), %rax  # imm = 0xF4240
addq 0x8(%r15), %rax
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
imulq %rcx
movq 0x98(%rbx), %rax
testq %rax, %rax
je 0x1a4a6
movq %rdx, %rcx
shrq $0x3f, %rcx
sarq $0x7, %rdx
addq %rcx, %rdx
cmpq %rdx, %rax
jge 0x1a4a6
movq %rbx, %rdi
callq 0x2fd4b
movq %rbx, %rdi
callq 0x2fd04
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/server.c
// Function: clientsCron
void clientsCron(void) {
    /* Make sure to process at least 1/(server.hz*10) of clients per call.
     * Since this function is called server.hz times per second we are sure that
     * in the worst case we process all the clients in 10 seconds.
     * In normal conditions (a reasonable number of clients) we process
     * all the clients in a shorter time. */
    int numclients = listLength(server.clients);
    int iterations = numclients/(server.hz*10);

    if (iterations < 50)
        iterations = (numclients < 50) ? numclients : 50;
    while(listLength(server.clients) && iterations--) {
        client *c;
        listNode *head;

        /* Rotate the list, take the current head, process.
         * This way if the client must be removed from the list it's the
         * first element and we don't incur into O(N) computation. */
        listRotate(server.clients);
        head = listFirst(server.clients);
        c = listNodeValue(head);
        /* The following functions do different service checks on the client.
         * The protocol is that they return non-zero if the client was
         * terminated. */
        if (clientsCronHandleTimeout(c)) continue;
        if (clientsCronResizeQueryBuffer(c)) continue;
    }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq 0x54cfe(%rip), %rdi     # 0x6f268
movq 0x28(%rdi), %rcx
testq %rcx, %rcx
je 0x1a5cf
movl 0x54b2f(%rip), %eax     # 0x6f0a8
addl %eax, %eax
leal (%rax,%rax,4), %esi
movl %ecx, %eax
cltd
idivl %esi
cmpl $0x32, %ecx
movl $0x32, %ebp
cmovll %ecx, %ebp
cmpl $0x32, %eax
cmovgel %eax, %ebp
incl %ebp
decl %ebp
je 0x1a5cf
callq 0x168d7
movq 0x54cc2(%rip), %rax     # 0x6f268
movq (%rax), %rax
movq 0x10(%rax), %rbx
movq %rbx, %rdi
callq 0x1a3e4
testl %eax, %eax
jne 0x1a5c1
movq %rbx, %rdi
callq 0x1a4b3
movq 0x54ca0(%rip), %rdi     # 0x6f268
cmpq $0x0, 0x28(%rdi)
jne 0x1a596
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/server.c
// Function: populateCommandTable
void populateCommandTable(void) {
    int j;
    int numcommands = sizeof(serverCommandTable)/sizeof(struct serverCommand);

    for (j = 0; j < numcommands; j++) {
        struct serverCommand *c = serverCommandTable+j;
        char *f = c->sflags;
        int retval1, retval2;

        while(*f != '\0') {
            switch(*f) {
            case 'w': c->flags |= CMD_WRITE; break;
            case 'r': c->flags |= CMD_READONLY; break;
            case 'm': c->flags |= CMD_DENYOOM; break;
            case 'a': c->flags |= CMD_ADMIN; break;
            case 'p': c->flags |= CMD_PUBSUB; break;
            case 'l': c->flags |= CMD_LOADING; break;
            case 'M': c->flags |= CMD_SKIP_MONITOR; break;
            case 'F': c->flags |= CMD_FAST; break;
            default: serverPanic("Unsupported command flag"); break;
            }
            f++;
        }

        retval1 = dictAdd(server.commands, sdsnew(c->name), c);
        /* Populate an additional dictionary that will be unaffected
         * by rename-command statements in discnt.conf. */
        retval2 = dictAdd(server.orig_commands, sdsnew(c->name), c);
        serverAssert(retval1 == DICT_OK && retval2 == DICT_OK);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %r15d, %r15d
leaq 0x5332e(%rip), %r12     # 0x6e520
leaq 0x37223(%rip), %r13     # 0x5241c
movq %r15, %rax
shlq $0x6, %rax
leaq (%r12,%rax), %rbx
movq 0x18(%rax,%r12), %rax
movzbl (%rax), %ecx
cmpl $0x60, %ecx
jle 0x1b22a
leal -0x6c(%rcx), %edx
cmpl $0xb, %edx
ja 0x1b242
movslq (%r13,%rdx,4), %rcx
addq %r13, %rcx
jmpq *%rcx
movl $0x200, %ecx            # imm = 0x200
jmp 0x1b26c
cmpl $0x46, %ecx
je 0x1b23b
cmpl $0x4d, %ecx
jne 0x1b274
movl $0x800, %ecx            # imm = 0x800
jmp 0x1b26c
movl $0x2000, %ecx           # imm = 0x2000
jmp 0x1b26c
cmpl $0x61, %ecx
jne 0x1b2d4
movl $0x10, %ecx
jmp 0x1b26c
movl $0x20, %ecx
jmp 0x1b26c
movl $0x1, %ecx
jmp 0x1b26c
movl $0x4, %ecx
jmp 0x1b26c
movl $0x2, %ecx
orl %ecx, 0x20(%rbx)
incq %rax
jmp 0x1b209
testl %ecx, %ecx
jne 0x1b2d4
movq 0x53e31(%rip), %r14     # 0x6f0b0
movq (%rbx), %rdi
callq 0x1dba5
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x18802
movl %eax, %ebp
movq 0x53e1a(%rip), %r14     # 0x6f0b8
movq (%rbx), %rdi
callq 0x1dba5
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x18802
orl %ebp, %eax
jne 0x1b2f6
incq %r15
cmpq $0x1f, %r15
jne 0x1b1f9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x37daf(%rip), %rdi     # 0x5308a
leaq 0x37cbb(%rip), %rsi     # 0x52f9d
movl $0x527, %edx            # imm = 0x527
callq 0x2a81d
movl $0x1, %edi
callq 0x12120
leaq 0x37da8(%rip), %rdi     # 0x530a5
leaq 0x37c99(%rip), %rsi     # 0x52f9d
movl $0x530, %edx            # imm = 0x530
callq 0x2a46a
jmp 0x1b2ec
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/server.c
// Function: lookupCommandByCString
struct serverCommand *lookupCommandByCString(char *s) {
    struct serverCommand *cmd;
    sds name = sdsnew(s);

    cmd = dictFetchValue(server.commands, name);
    sdsfree(name);
    return cmd;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
callq 0x1dba5
movq %rax, %rbx
movq 0x53d8d(%rip), %rdi     # 0x6f0b0
movq %rax, %rsi
callq 0x18dfb
movq %rax, %r14
movq %rbx, %rdi
callq 0x1dc25
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/server.c
// Function: resetServerStats
void resetServerStats(void) {
    int j;

    server.stat_numcommands = 0;
    server.stat_numconnections = 0;
    server.stat_fork_time = 0;
    server.stat_fork_rate = 0;
    server.stat_rejected_conn = 0;
    for (j = 0; j < STAT_METRIC_COUNT; j++) {
        server.inst_metric[j].idx = 0;
        server.inst_metric[j].last_sample_time = mstime();
        server.inst_metric[j].last_sample_count = 0;
        memset(server.inst_metric[j].samples,0,
            sizeof(server.inst_metric[j].samples));
    }
    server.stat_net_input_bytes = 0;
    server.stat_net_output_bytes = 0;
    server.stat_hits = 0;
    server.stat_misses = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
xorps %xmm0, %xmm0
movups %xmm0, 0x53c73(%rip)    # 0x6f400
movups %xmm0, 0x53c84(%rip)    # 0x6f418
movq $0x0, 0x53c89(%rip) # 0x6f428
xorl %r15d, %r15d
leaq 0x538df(%rip), %r12     # 0x6f088
movq %rsp, %rbx
movabsq $0x20c49ba5e353f7cf, %r13 # imm = 0x20C49BA5E353F7CF
leaq (%r15,%r12), %r14
addq $0x3d8, %r14            # imm = 0x3D8
movl $0x0, 0x88(%r14)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x12340
imulq $0xf4240, (%rsp), %rax  # imm = 0xF4240
addq 0x8(%rsp), %rax
imulq %r13
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rdx
addq %rax, %rdx
movq %rdx, -0x8(%r14)
movl $0x88, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x12380
addq $0x98, %r15
cmpq $0x1c8, %r15            # imm = 0x1C8
jne 0x1b7b6
xorps %xmm0, %xmm0
movups %xmm0, 0x53c27(%rip)    # 0x6f448
movups %xmm0, 0x53c10(%rip)    # 0x6f438
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/server.c
// Function: call
void call(client *c, int flags) {
    long long start, duration;

    /* Sent the command to clients in MONITOR mode, only if the commands are
     * not generated from reading an AOF. */
    if (listLength(server.monitors) &&
        !server.loading &&
        !(c->cmd->flags & CMD_SKIP_MONITOR))
    {
        replicationFeedMonitors(c,server.monitors,c->argv,c->argc);
    }

    c->flags &= ~(CLIENT_PREVENT_PROP);

    /* Call the command. */
    start = ustime();
    c->cmd->proc(c);
    duration = ustime()-start;

    /* Log the command into the Slow log if needed, and populate the
     * per-command statistics that we show in INFO commandstats. */
    if (flags & CMD_CALL_SLOWLOG) {
        char *latency_event = (c->cmd->flags & CMD_FAST) ?
                              "fast-command" : "command";
        latencyAddSampleIfNeeded(latency_event,duration/1000);
    }

    /* Populate the per-command statistics that we show in INFO commandstats. */
    if (flags & CMD_CALL_STATS) {
        c->cmd->microseconds += duration;
        c->cmd->calls++;
    }
    server.stat_numcommands++;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movq 0x5343b(%rip), %rsi     # 0x6f280
cmpq $0x0, 0x28(%rsi)
je 0x1be6e
cmpl $0x0, 0x53555(%rip)     # 0x6f3a8
jne 0x1be6e
movq 0x38(%rbx), %rax
testb $0x8, 0x21(%rax)
jne 0x1be6e
movq 0x30(%rbx), %rdx
movl 0x28(%rbx), %ecx
movq %rbx, %rdi
callq 0x1bc7f
andb $-0x9, 0x8a(%rbx)
movq %rsp, %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x12340
movq (%r14), %r15
movq 0x8(%r14), %r12
movq 0x38(%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
movq %rsp, %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x12340
movq (%r14), %rax
subq %r15, %rax
movq 0x8(%r14), %rcx
subq %r12, %rcx
imulq $0xf4240, %rax, %r14    # imm = 0xF4240
addq %rcx, %r14
testb $0x1, %bpl
je 0x1bf0e
movq 0x38(%rbx), %rax
testb $0x20, 0x21(%rax)
leaq 0x3726e(%rip), %rax     # 0x5313a
leaq 0x3721d(%rip), %rdi     # 0x530f0
cmoveq %rax, %rdi
movq 0x5381a(%rip), %rcx     # 0x6f6f8
testq %rcx, %rcx
je 0x1bf0e
movabsq $0x20c49ba5e353f7cf, %rdx # imm = 0x20C49BA5E353F7CF
movq %r14, %rax
imulq %rdx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rdx
addq %rax, %rdx
cmpq %rcx, %rdx
jl 0x1bf0e
movq %rdx, %rsi
callq 0x2fd96
testb $0x2, %bpl
je 0x1bf34
movq 0x38(%rbx), %rax
movdqu 0x30(%rax), %xmm0
movq %r14, %xmm1
shufpd $0x2, 0x360f5(%rip), %xmm1 # xmm1 = xmm1[0],mem[1]
paddq %xmm0, %xmm1
movdqu %xmm1, 0x30(%rax)
incq 0x534c5(%rip)           # 0x6f400
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/server.c
// Function: prepareForShutdown
int prepareForShutdown(int flags) {
    int save = flags & SHUTDOWN_SAVE;
    int nosave = flags & SHUTDOWN_NOSAVE;

    serverLog(LL_WARNING,"User requested shutdown...");

    /* Kill the saving child if there is a background saving in progress.
       We want to avoid race conditions, for instance our saving child may
       overwrite the synchronous saving did by SHUTDOWN. */
    if (server.ddb_child_pid != -1) {
        serverLog(LL_WARNING,"There is a child saving an .ddb. Killing it!");
        kill(server.ddb_child_pid,SIGUSR1);
        ddbRemoveTempFile(server.ddb_child_pid);
    }
    if ((server.saveparamslen > 0 && !nosave) || save) {
        serverLog(LL_NOTICE,"Saving the final DDB snapshot before exiting.");
        /* Snapshotting. Perform a SYNC SAVE and exit */
        if (ddbSave(server.ddb_filename) != C_OK) {
            /* Ooops.. error saving! The best we can do is to continue
             * operating. Note that if there was a background saving process,
             * in the next cron() Discnt will be notified that the background
             * saving aborted, handling special stuff like slaves pending for
             * synchronization... */
            serverLog(LL_WARNING,"Error trying to save the DB, can't exit.");
            return C_ERR;
        }
    }
    if (server.daemonize) {
        serverLog(LL_NOTICE,"Removing the pid file.");
        unlink(server.pidfile);
    }

    /* Close the listening sockets. Apparently this allows faster restarts. */
    closeListeningSockets(1);
    serverLog(LL_WARNING,"Discnt is now ready to exit, bye bye...");
    return C_OK;
}

// Assembly:
pushq %rbx
movl %edi, %ebx
leaq 0x36f6e(%rip), %rsi     # 0x531aa
movl $0x3, %edi
xorl %eax, %eax
callq 0x19c06
cmpl $-0x1, 0x534e9(%rip)    # 0x6f738
je 0x1c27f
leaq 0x36f6d(%rip), %rsi     # 0x531c5
movl $0x3, %edi
xorl %eax, %eax
callq 0x19c06
movl 0x534ce(%rip), %edi     # 0x6f738
movl $0xa, %esi
callq 0x12530
movl 0x534be(%rip), %edi     # 0x6f738
callq 0x32d1e
cmpl $0x0, 0x534c2(%rip)     # 0x6f748
setg %al
testb $0x2, %bl
sete %cl
testb $0x1, %bl
jne 0x1c298
andb %al, %cl
je 0x1c2c9
leaq 0x36f53(%rip), %rsi     # 0x531f2
movl $0x2, %edi
xorl %eax, %eax
callq 0x19c06
movq 0x5349e(%rip), %rdi     # 0x6f750
callq 0x32996
testl %eax, %eax
je 0x1c2c9
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
leaq 0x36f59(%rip), %rsi     # 0x53220
jmp 0x1c304
cmpl $0x0, 0x53370(%rip)     # 0x6f640
je 0x1c2f1
leaq 0x36f70(%rip), %rsi     # 0x53249
movl $0x2, %edi
xorl %eax, %eax
callq 0x19c06
movq 0x52dec(%rip), %rdi     # 0x6f0d8
callq 0x120f0
movl $0x1, %edi
callq 0x1c18c
xorl %ebx, %ebx
leaq 0x36f5c(%rip), %rsi     # 0x53260
movl $0x3, %edi
xorl %eax, %eax
callq 0x19c06
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/server.c
// Function: createPidFile
void createPidFile(void) {
    /* Try to write the pid file in a best-effort way. */
    FILE *fp = fopen(server.pidfile,"w");
    if (fp) {
        fprintf(fp,"%d\n",(int)getpid());
        fclose(fp);
    }
}

// Assembly:
pushq %rbx
movq 0x52154(%rip), %rdi     # 0x6f0d8
leaq 0x3853e(%rip), %rsi     # 0x554c9
callq 0x124f0
testq %rax, %rax
je 0x1cfb9
movq %rax, %rbx
callq 0x121f0
leaq 0x38b9f(%rip), %rsi     # 0x55b43
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0x124c0
movq %rbx, %rdi
popq %rbx
jmp 0x12220
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/server.c
// Function: version
void version(void) {
    printf("Discnt server v=%s sha=%s:%d malloc=%s bits=%d build=%llx\n",
        DISCNT_VERSION,
        discntGitSHA1(),
        atoi(discntGitDirty()) > 0,
        ZMALLOC_LIB,
        sizeof(long) == 4 ? 32 : 64,
        (unsigned long long) discntBuildId());
    exit(0);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
callq 0x212a8
movq %rax, %rbx
callq 0x212b0
movq %rax, %rdi
callq 0x12820
xorl %ebp, %ebp
testl %eax, %eax
setg %bpl
callq 0x212b8
movq %rax, (%rsp)
leaq 0x36a26(%rip), %rdi     # 0x53a73
leaq 0x370c0(%rip), %rsi     # 0x54114
leaq 0x36575(%rip), %r8      # 0x535d0
movq %rbx, %rdx
movl %ebp, %ecx
movl $0x40, %r9d
xorl %eax, %eax
callq 0x122c0
xorl %edi, %edi
callq 0x12860
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/server.c
// Function: usage
void usage(void) {
    fprintf(stderr,"Usage: ./discnt-server [/path/to/discnt.conf] [options]\n");
    fprintf(stderr,"       ./discnt-server - (read config from stdin)\n");
    fprintf(stderr,"       ./discnt-server -v or --version\n");
    fprintf(stderr,"       ./discnt-server -h or --help\n");
    fprintf(stderr,"       ./discnt-server --test-memory <megabytes>\n\n");
    fprintf(stderr,"Examples:\n");
    fprintf(stderr,"       ./discnt-server (run the server with default conf)\n");
    fprintf(stderr,"       ./discnt-server /etc/discnt/5262.conf\n");
    fprintf(stderr,"       ./discnt-server --port 5555\n");
    fprintf(stderr,"       ./discnt-server --port 5555 --slaveof 127.0.0.1 6666\n");
    fprintf(stderr,"       ./discnt-server /etc/mydiscnt.conf --loglevel verbose\n\n");
    exit(1);
}

// Assembly:
pushq %rbx
movq 0x50f74(%rip), %rbx     # 0x6dff0
movq (%rbx), %rcx
leaq 0x36a28(%rip), %rdi     # 0x53aae
movl $0x38, %esi
movl $0x1, %edx
callq 0x12880
movq (%rbx), %rcx
leaq 0x36a48(%rip), %rdi     # 0x53ae7
movl $0x32, %esi
movl $0x1, %edx
callq 0x12880
movq (%rbx), %rcx
leaq 0x36a62(%rip), %rdi     # 0x53b1a
movl $0x27, %esi
movl $0x1, %edx
callq 0x12880
movq (%rbx), %rcx
leaq 0x36a71(%rip), %rdi     # 0x53b42
movl $0x24, %esi
movl $0x1, %edx
callq 0x12880
movq (%rbx), %rcx
leaq 0x36a7d(%rip), %rdi     # 0x53b67
movl $0x32, %esi
movl $0x1, %edx
callq 0x12880
movq (%rbx), %rcx
leaq 0x36a97(%rip), %rdi     # 0x53b9a
movl $0xa, %esi
movl $0x1, %edx
callq 0x12880
movq (%rbx), %rcx
leaq 0x36a89(%rip), %rdi     # 0x53ba5
movl $0x3a, %esi
movl $0x1, %edx
callq 0x12880
movq (%rbx), %rcx
leaq 0x36aab(%rip), %rdi     # 0x53be0
movl $0x2d, %esi
movl $0x1, %edx
callq 0x12880
movq (%rbx), %rcx
leaq 0x36ac0(%rip), %rdi     # 0x53c0e
movl $0x23, %esi
movl $0x1, %edx
callq 0x12880
movq (%rbx), %rcx
leaq 0x36acb(%rip), %rdi     # 0x53c32
movl $0x3c, %esi
movl $0x1, %edx
callq 0x12880
movq (%rbx), %rcx
leaq 0x36aef(%rip), %rdi     # 0x53c6f
movl $0x3e, %esi
movl $0x1, %edx
callq 0x12880
movl $0x1, %edi
callq 0x12860
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/server.c
// Function: discntAsciiArt
void discntAsciiArt(void) {
#include "asciilogo.h"
    char *buf = zmalloc(1024*16);

    if (server.syslog_enabled) {
        serverLog(LL_NOTICE,
            "Discnt %s (%s/%d) %s bit, port %d, pid %ld ready to start.",
            DISCNT_VERSION,
            discntGitSHA1(),
            strtol(discntGitDirty(),NULL,10) > 0,
            (sizeof(long) == 8) ? "64" : "32",
            server.port,
            (long) getpid()
        );
    } else {
        snprintf(buf,1024*16,ascii_logo,
            DISCNT_VERSION,
            discntGitSHA1(),
            strtol(discntGitDirty(),NULL,10) > 0,
            (sizeof(long) == 8) ? "64" : "32",
            server.port,
            (long) getpid()
        );
        serverLogRaw(LL_NOTICE|LL_RAW,buf);
    }
    zfree(buf);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl $0x4000, %edi           # imm = 0x4000
callq 0x1fbbd
movq %rax, %rbx
movl 0x524cb(%rip), %r12d    # 0x6f680
callq 0x212a8
movq %rax, %r14
callq 0x212b0
movq %rax, %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x12500
xorl %ebp, %ebp
testq %rax, %rax
setg %bpl
movl 0x51f5b(%rip), %r15d    # 0x6f13c
callq 0x121f0
movslq %eax, %r10
testl %r12d, %r12d
je 0x1d21f
leaq 0x36be5(%rip), %rsi     # 0x53dda
leaq 0x36f18(%rip), %rdx     # 0x54114
leaq 0x36c12(%rip), %r9      # 0x53e15
movl $0x2, %edi
movq %r14, %rcx
movl %ebp, %r8d
xorl %eax, %eax
pushq %r10
pushq %r15
callq 0x19c06
addq $0x10, %rsp
jmp 0x1d264
subq $0x8, %rsp
leaq 0x36beb(%rip), %r11     # 0x53e15
leaq 0x36a7d(%rip), %rdx     # 0x53cae
leaq 0x36edc(%rip), %rcx     # 0x54114
movl $0x4000, %esi           # imm = 0x4000
movq %rbx, %rdi
movq %r14, %r8
movl %ebp, %r9d
xorl %eax, %eax
pushq %r10
pushq %r15
pushq %r11
callq 0x122d0
addq $0x20, %rsp
movl $0x402, %edi            # imm = 0x402
movq %rbx, %rsi
callq 0x19a92
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1fd17
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/server.c
// Function: loadDataFromDisk
void loadDataFromDisk(void) {
  long long start = ustime();
  if (ddbLoad(server.ddb_filename) == C_OK) {
    serverLog(LL_NOTICE,"DB loaded from disk: %.3f seconds",
        (float)(ustime()-start)/1000000);
  } else if (errno != ENOENT) {
    serverLog(LL_WARNING,"Fatal error loading the DB: %s. Exiting.",strerror(errno));
    exit(1);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsp, %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x12340
movq (%rbx), %r15
movq 0x8(%rbx), %r14
movq 0x52439(%rip), %rdi     # 0x6f750
callq 0x33093
testl %eax, %eax
je 0x1d336
callq 0x120d0
movl (%rax), %edi
cmpl $0x2, %edi
jne 0x1d387
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rsp, %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x12340
movq (%rbx), %rax
subq %r15, %rax
movq 0x8(%rbx), %rcx
subq %r14, %rcx
imulq $0xf4240, %rax, %rax    # imm = 0xF4240
addq %rcx, %rax
cvtsi2ss %rax, %xmm0
divss 0x3516d(%rip), %xmm0    # 0x524d4
cvtss2sd %xmm0, %xmm0
leaq 0x36aa6(%rip), %rsi     # 0x53e18
movl $0x2, %edi
movb $0x1, %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x19c06
callq 0x128e0
leaq 0x36aa7(%rip), %rsi     # 0x53e3a
movl $0x3, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x19c06
movl $0x1, %edi
callq 0x12860
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/server.c
// Function: serverSetProcTitle
void serverSetProcTitle(char *title) {
#ifdef USE_SETPROCTITLE
    setproctitle("%s %s:%d",
        title,
        server.bindaddr_count ? server.bindaddr[0] : "*",
        server.port);
#else
    UNUSED(title);
#endif
}

// Assembly:
movq %rdi, %rsi
cmpl $0x0, 0x51dd9(%rip)     # 0x6f1c8
je 0x1d3fa
movq 0x51d50(%rip), %rdx     # 0x6f148
jmp 0x1d401
leaq 0x35b2c(%rip), %rdx     # 0x52f2d
movl 0x51d35(%rip), %ecx     # 0x6f13c
leaq 0x36a9d(%rip), %rdi     # 0x53eab
xorl %eax, %eax
jmp 0x2fa07
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/server.c
// Function: serverSupervisedUpstart
int serverSupervisedUpstart(void) {
    const char *upstart_job = getenv("UPSTART_JOB");

    if (!upstart_job) {
        serverLog(LL_WARNING,
                "upstart supervision requested, but UPSTART_JOB not found");
        return 0;
    }

    serverLog(LL_NOTICE, "supervised by upstart, will stop to signal readyness");
    raise(SIGSTOP);
    unsetenv("UPSTART_JOB");
    return 1;
}

// Assembly:
pushq %rbx
leaq 0x36a97(%rip), %rdi     # 0x53eb4
callq 0x12050
testq %rax, %rax
je 0x1d457
leaq 0x36acb(%rip), %rsi     # 0x53ef9
movl $0x2, %edi
xorl %eax, %eax
callq 0x19c06
movl $0x13, %edi
callq 0x12060
leaq 0x36a69(%rip), %rdi     # 0x53eb4
callq 0x127b0
movl $0x1, %ebx
jmp 0x1d46c
leaq 0x36a62(%rip), %rsi     # 0x53ec0
xorl %ebx, %ebx
movl $0x3, %edi
xorl %eax, %eax
callq 0x19c06
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/server.c
// Function: serverIsSupervised
int serverIsSupervised(int mode) {
    if (mode == SUPERVISED_AUTODETECT) {
        const char *upstart_job = getenv("UPSTART_JOB");
        const char *notify_socket = getenv("NOTIFY_SOCKET");

        if (upstart_job) {
            serverSupervisedUpstart();
        } else if (notify_socket) {
            serverSupervisedSystemd();
        }
    } else if (mode == SUPERVISED_UPSTART) {
        return serverSupervisedUpstart();
    } else if (mode == SUPERVISED_SYSTEMD) {
        return serverSupervisedSystemd();
    }

    return 0;
}

// Assembly:
cmpl $0x3, %edi
je 0x1d415
cmpl $0x2, %edi
je 0x1d470
cmpl $0x1, %edi
jne 0x1d63b
pushq %rbx
leaq 0x368a4(%rip), %rdi     # 0x53eb4
callq 0x12050
movq %rax, %rbx
leaq 0x3690f(%rip), %rdi     # 0x53f2e
callq 0x12050
testq %rbx, %rbx
je 0x1d630
callq 0x1d415
jmp 0x1d63a
testq %rax, %rax
je 0x1d63a
callq 0x1d470
popq %rbx
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/networking.c
// Function: createClient
client *createClient(int fd) {
    client *c = zmalloc(sizeof(client));

    /* passing -1 as fd it is possible to create a non connected client.
     * This is useful since all the commands needs to be executed
     * in the context of a client. When commands are executed in other
     * contexts (for instance a Lua script) we need a non connected client. */
    if (fd != -1) {
        anetNonBlock(NULL,fd);
        anetEnableTcpNoDelay(NULL,fd);
        if (server.tcpkeepalive)
            anetKeepAlive(NULL,fd,server.tcpkeepalive);
        if (aeCreateFileEvent(server.el,fd,AE_READABLE,
            readQueryFromClient, c) == AE_ERR)
        {
            close(fd);
            zfree(c);
            return NULL;
        }
    }

    c->id = server.next_client_id++;
    c->fd = fd;
    c->name = NULL;
    c->bufpos = 0;
    c->querybuf = sdsempty();
    c->querybuf_peak = 0;
    c->reqtype = 0;
    c->argc = 0;
    c->argv = NULL;
    c->cmd = c->lastcmd = NULL;
    c->multibulklen = 0;
    c->bulklen = -1;
    c->sentlen = 0;
    c->flags = 0;
    c->ctime = c->lastinteraction = server.unixtime;
    c->authenticated = 0;
    c->reply = listCreate();
    c->reply_bytes = 0;
    c->obuf_soft_limit_reached_time = 0;
    listSetFreeMethod(c->reply,freeClientReplyValue);
    listSetDupMethod(c->reply,dupClientReplyValue);
    c->btype = BLOCKED_NONE;
    c->sub_counters = NULL;
    c->peerid = NULL;
    if (fd != -1) listAddNodeTail(server.clients,c);
    return c;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebp
movl $0x40c0, %edi           # imm = 0x40C0
callq 0x1fbbd
movq %rax, %rbx
cmpl $-0x1, %ebp
je 0x213b7
xorl %edi, %edi
movl %ebp, %esi
callq 0x17589
xorl %edi, %edi
movl %ebp, %esi
callq 0x176bb
leaq 0x4dd08(%rip), %r14     # 0x6f088
movl 0x5a0(%r14), %edx
testl %edx, %edx
je 0x21394
xorl %edi, %edi
movl %ebp, %esi
callq 0x1759a
movq 0x38(%r14), %rdi
leaq 0xfa(%rip), %rcx        # 0x21499
movl %ebp, %esi
movl $0x1, %edx
movq %rbx, %r8
callq 0x16d02
cmpl $-0x1, %eax
je 0x2147a
leaq 0x4dcca(%rip), %r14     # 0x6f088
movq 0x318(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x318(%r14)
movq %rax, (%rbx)
movl %ebp, 0x8(%rbx)
xorl %r15d, %r15d
movq %r15, 0x10(%rbx)
movl %r15d, 0xb8(%rbx)
callq 0x1db82
movq %rax, 0x18(%rbx)
movq %r15, 0x20(%rbx)
movl %r15d, 0x28(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x40(%rbx)
movq $-0x1, 0x50(%rbx)
movq %r15, 0x68(%rbx)
movl %r15d, 0x88(%rbx)
movq 0x648(%r14), %rax
movq %rax, 0x78(%rbx)
movq %rax, 0x70(%rbx)
movl %r15d, 0x8c(%rbx)
callq 0x164dc
movq %rax, 0x58(%rbx)
movq %r15, 0x60(%rbx)
movq %r15, 0x80(%rbx)
leaq -0x102(%rip), %rcx      # 0x21342
movq %rcx, 0x18(%rax)
leaq -0x112(%rip), %rcx      # 0x2133d
movq %rcx, 0x10(%rax)
movl %r15d, 0x90(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0xa8(%rbx)
cmpl $-0x1, %ebp
je 0x2148b
movq 0x1e0(%r14), %rdi
movq %rbx, %rsi
callq 0x165ab
jmp 0x2148b
movl %ebp, %edi
callq 0x123b0
movq %rbx, %rdi
callq 0x1fd17
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
movl 0x88(%rdi), %eax
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testl $0xa00000, %eax         # imm = 0xA00000
je 0x216dd
movl %ebx, %eax
popq %rbx
retq
movq %rdi, %rsi
cmpl $0x0, 0x8(%rdi)
jle 0x216d9
xorl %ebx, %ebx
cmpl $0x0, 0xb8(%rsi)
jne 0x216d9
btl $0x14, %eax
jb 0x216d9
movq 0x58(%rsi), %rcx
cmpq $0x0, 0x28(%rcx)
jne 0x216d9
orl $0x100000, %eax         # imm = 0x100000
movl %eax, 0x88(%rsi)
leaq 0x4d974(%rip), %rax     # 0x6f088
movq 0x1f0(%rax), %rdi
callq 0x1654c
jmp 0x216d9
// File: /workspace/github_c_makefile_star2_O3/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 0x21bff
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
movq 0x58(%rdi), %rax
cmpq $0x0, 0x28(%rax)
je 0x21c32
movq 0x8(%rax), %r15
movq 0x10(%r15), %rdi
testq %rdi, %rdi
je 0x21c32
movzbl -0x1(%rdi), %eax
movl %eax, %ecx
andl $0x7, %ecx
cmpl $0x4, %ecx
ja 0x21c17
leaq 0x32e43(%rip), %rdx     # 0x54a34
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
shrl $0x3, %eax
jmp 0x21c19
retq
movq -0x11(%rdi), %rax
jmp 0x21c19
movzwl -0x5(%rdi), %eax
jmp 0x21c19
movl -0x9(%rdi), %eax
jmp 0x21c19
movzbl -0x3(%rdi), %eax
jmp 0x21c19
xorl %eax, %eax
addq %rbx, %rax
cmpq $0x4000, %rax           # imm = 0x4000
ja 0x21c32
movq %rbx, %rdx
callq 0x1e3ca
movq %rax, 0x10(%r15)
jmp 0x21c49
movq %rsi, %rdi
movq %rbx, %rsi
callq 0x1da70
movq 0x58(%r14), %rdi
movq %rax, %rsi
callq 0x165ab
addq %rbx, 0x60(%r14)
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x21946
// File: /workspace/github_c_makefile_star2_O3/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 0x216c6
testl %eax, %eax
je 0x22300
xorl %eax, %eax
jmp 0x22313
movq 0x58(%rbx), %rdi
xorl %esi, %esi
callq 0x165ab
movq 0x58(%rbx), %rax
movq 0x8(%rax), %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x2237d
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x30bfb(%rip), %rdi     # 0x52f2d
movl $0x1, %esi
callq 0x1da70
leaq 0x3291a(%rip), %rsi     # 0x54c5d
xorl %r12d, %r12d
movq %rax, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x1e826
movq %rax, 0x10(%r14)
movzbl -0x1(%rax), %ecx
movl %ecx, %edx
andl $0x7, %edx
cmpl $0x4, %edx
ja 0x22396
leaq 0x32754(%rip), %rsi     # 0x54ac0
movslq (%rsi,%rdx,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
shrl $0x3, %ecx
movq %rcx, %r12
jmp 0x22396
retq
movq -0x11(%rax), %r12
jmp 0x22396
movzwl -0x5(%rax), %r12d
jmp 0x22396
movl -0x9(%rax), %r12d
jmp 0x22396
movzbl -0x3(%rax), %r12d
addq %r12, 0x60(%rbx)
movq 0x8(%r14), %rcx
testq %rcx, %rcx
je 0x223c8
movq 0x10(%rcx), %rsi
testq %rsi, %rsi
je 0x223c8
movq %rax, %rdi
callq 0x1e4bc
movq %rax, %r15
movq 0x58(%rbx), %rdi
movq 0x8(%r14), %rsi
callq 0x16691
movq %r15, 0x10(%r14)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x21946
// File: /workspace/github_c_makefile_star2_O3/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 0x22549
fldz
xorl %edx, %edx
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
leaq 0x32741(%rip), %rax     # 0x54c64
leaq 0x32739(%rip), %rsi     # 0x54c63
cmovaq %rax, %rsi
setbe %dl
addq $0x3, %rdx
movq %rbx, %rdi
addq $0x120, %rsp            # imm = 0x120
popq %rbx
popq %r14
popq %r15
jmp 0x2277b
fstpt (%rsp)
leaq 0x32725(%rip), %rdx     # 0x54c78
leaq 0xa0(%rsp), %r14
movl $0x80, %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x122d0
leaq 0x326fd(%rip), %rdx     # 0x54c6e
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 0x21f4a
addq $0x120, %rsp            # imm = 0x120
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x2134c
testq %rax, %rax
je 0x229d4
movq %rax, %r14
leaq 0x4c6ef(%rip), %rbx     # 0x6f088
movq 0x1e0(%rbx), %rax
movl 0x60c(%rbx), %ecx
cmpq %rcx, 0x28(%rax)
jbe 0x22a03
movl 0x8(%r14), %edi
leaq 0x32776(%rip), %rsi     # 0x5512d
movl $0x24, %edx
callq 0x121e0
incq 0x3a0(%rbx)
movq %r14, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x22c06
callq 0x120d0
movl (%rax), %edi
callq 0x128e0
leaq 0x3270c(%rip), %rsi     # 0x550f3
movl $0x3, %edi
movq %rax, %rdx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x19c06
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