LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/dict.c
// Function: dictGenericDelete
static dictEntry *dictGenericDelete(dict *d, const void *key, int nofree) {
    unsigned int h, idx;
    dictEntry *he, *prevHe;
    int table;

    if (d->ht[0].used == 0 && d->ht[1].used == 0) return NULL;

    if (dictIsRehashing(d)) _dictRehashStep(d);
    h = dictHashKey(d, key);

    for (table = 0; table <= 1; table++) {
        idx = h & d->ht[table].sizemask;
        he = d->ht[table].table[idx];
        prevHe = NULL;
        while(he) {
            if (key==he->key || dictCompareKeys(d, key, he->key)) {
                /* Unlink the element from the list */
                if (prevHe)
                    prevHe->next = he->next;
                else
                    d->ht[table].table[idx] = he->next;
                if (!nofree) {
                    dictFreeKey(d, he);
                    dictFreeVal(d, he);
                    zfree(he);
                }
                d->ht[table].used--;
                return he;
            }
            prevHe = he;
            he = he->next;
        }
        if (!dictIsRehashing(d)) break;
    }
    return NULL; /* not found */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movq %rdi, %rbx
cmpq $0x0, 0x28(%rdi)
jne 0x14b8e
cmpq $0x0, 0x48(%rbx)
je 0x14c28
movl %edx, (%rsp)
cmpq $-0x1, 0x50(%rbx)
je 0x14ba0
movq %rbx, %rdi
callq 0x14aa0
leaq 0x10(%rbx), %r14
movq (%rbx), %rax
movq %r15, %rdi
callq *(%rax)
xorl %r13d, %r13d
movq %r14, 0x10(%rsp)
movl %eax, 0x4(%rsp)
cmpq $0x2, %r13
je 0x14c28
movq %r13, %rdx
shlq $0x5, %rdx
leaq (%r14,%rdx), %rcx
movq %rcx, 0x8(%rsp)
movl 0x10(%r14,%rdx), %ebp
andl %eax, %ebp
shlq $0x3, %rbp
movq (%r14,%rdx), %rax
addq %rbp, %rax
xorl %r12d, %r12d
movq (%rax), %r14
testq %r14, %r14
je 0x14c15
movq (%r14), %rdx
cmpq %r15, %rdx
je 0x14c2d
movq (%rbx), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x14c0c
movq 0x8(%rbx), %rdi
movq %r15, %rsi
callq *%rax
testl %eax, %eax
jne 0x14c2d
leaq 0x10(%r14), %rax
movq %r14, %r12
jmp 0x14be3
incq %r13
cmpq $-0x1, 0x50(%rbx)
movq 0x10(%rsp), %r14
movl 0x4(%rsp), %eax
jne 0x14bb8
xorl %r14d, %r14d
jmp 0x14c91
movq 0x10(%r14), %rax
testq %r12, %r12
je 0x14c44
addq $0x10, %r12
movl (%rsp), %ecx
movq 0x8(%rsp), %r15
jmp 0x14c52
movq 0x8(%rsp), %r15
addq (%r15), %rbp
movq %rbp, %r12
movl (%rsp), %ecx
movq %rax, (%r12)
testl %ecx, %ecx
jne 0x14c8d
movq (%rbx), %rcx
movq 0x20(%rcx), %rax
testq %rax, %rax
je 0x14c72
movq 0x8(%rbx), %rdi
movq (%r14), %rsi
callq *%rax
movq (%rbx), %rcx
movq 0x28(%rcx), %rax
testq %rax, %rax
je 0x14c85
movq 0x8(%rbx), %rdi
movq 0x8(%r14), %rsi
callq *%rax
movq %r14, %rdi
callq 0x1ac81
decq 0x18(%r15)
movq %r14, %rax
addq $0x18, %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/dict.c
// Function: dictFreeUnlinkedEntry
void dictFreeUnlinkedEntry(dict *d, dictEntry *he) {
    if (he == NULL) return;
    dictFreeKey(d, he);
    dictFreeVal(d, he);
    zfree(he);
}

// Assembly:
testq %rsi, %rsi
je 0x14cf4
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rcx
movq 0x20(%rcx), %rax
testq %rax, %rax
je 0x14cd2
movq 0x8(%r14), %rdi
movq (%rbx), %rsi
callq *%rax
movq (%r14), %rcx
movq 0x28(%rcx), %rax
testq %rax, %rax
je 0x14ce5
movq 0x8(%r14), %rdi
movq 0x8(%rbx), %rsi
callq *%rax
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1ac81
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x157ea
movq 0x30(%rbx), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
jmp 0x15803
jle 0x157fc
movq 0x55025(%rip), %rsi     # 0x6a818
movq %rbx, %rdi
popq %rbx
jmp 0x1c8e7
leaq 0x37aa5(%rip), %rdi     # 0x4d2a8
callq 0x18187
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
jmp 0x1d141
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x28(%rdi), %eax
cmpl $0x3, %eax
jl 0x15836
movq 0x54fee(%rip), %rsi     # 0x6a818
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x1c8e7
xorl %ecx, %ecx
pushq $0x2
popq %rbp
cmpl $0x2, %eax
jne 0x15877
movq 0x30(%rbx), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %r14
leaq 0x37994(%rip), %rsi     # 0x4d1e7
movq %r14, %rdi
callq 0x12090
movl %ebp, %ecx
testl %eax, %eax
je 0x15877
leaq 0x3c9c5(%rip), %rsi     # 0x5222d
movq %r14, %rdi
callq 0x12090
testl %eax, %eax
jne 0x15823
pushq $0x1
popq %rcx
cmpl $0x0, 0x54b2a(%rip)     # 0x6a3a8
cmovel %ecx, %ebp
movl %ebp, %edi
callq 0x17d73
testl %eax, %eax
je 0x1589f
leaq 0x3795b(%rip), %rsi     # 0x4d1ee
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x1cacf
xorl %edi, %edi
callq 0x12860
// File: /workspace/github_c_makefile_star2_O2/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 0x158e8
pushq %rbx
movq %rdi, %rbx
orl $0x4, %eax
movl %eax, 0x88(%rdi)
movq 0x549b0(%rip), %rdi     # 0x6a280
movq %rbx, %rsi
callq 0x12bac
movq 0x54ec1(%rip), %rsi     # 0x6a7a0
movq %rbx, %rdi
popq %rbx
jmp 0x1c8e7
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x1597e
movq 0x5476c(%rip), %rax     # 0x6a0b0
movq 0x48(%rax), %rsi
addq 0x28(%rax), %rsi
movq %rbx, %rdi
callq 0x1d03d
movq 0x54755(%rip), %rdi     # 0x6a0b0
callq 0x14f27
movq %rax, %r14
movq %r14, %rdi
callq 0x14f5b
testq %rax, %rax
je 0x159d2
movq 0x8(%rax), %rsi
movq %rbx, %rdi
callq 0x17f3e
jmp 0x15963
movq 0x30(%rbx), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %r15
leaq 0x36a78(%rip), %rsi     # 0x4c409
movq %r15, %rdi
callq 0x12090
testl %eax, %eax
je 0x159df
leaq 0x378a9(%rip), %rsi     # 0x4d24d
movq %r15, %rdi
callq 0x12090
cmpl $0x2, %r14d
jne 0x15a29
testl %eax, %eax
jne 0x15a29
movq 0x546f3(%rip), %rax     # 0x6a0b0
movq 0x48(%rax), %rsi
addq 0x28(%rax), %rsi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1d00a
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1501c
addq $-0x2, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1d03d
pushq $0x2
popq %r14
movslq 0x28(%rbx), %rax
cmpq %rax, %r14
jge 0x15a23
movq 0x546ae(%rip), %rdi     # 0x6a0b0
movq 0x30(%rbx), %rax
movq (%rax,%r14,8), %rax
movq 0x8(%rax), %rsi
callq 0x14e88
movq %rbx, %rdi
movq %rax, %rsi
callq 0x17f3e
incq %r14
jmp 0x159f2
popq %rbx
popq %r14
popq %r15
retq
leaq 0x37823(%rip), %rsi     # 0x4d253
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1cacf
// File: /workspace/github_c_makefile_star2_O2/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 0x54bc8(%rip), %r15d    # 0x6a620
jl 0x15b8f
movq %rsi, %rbx
movq 0x54c10(%rip), %rdi     # 0x6a678
movb (%rdi), %r12b
testb %r12b, %r12b
je 0x15a81
leaq 0x38a30(%rip), %rsi     # 0x4e4a7
callq 0x124f0
movq %rax, %r14
jmp 0x15a8b
movq 0x534f8(%rip), %rax     # 0x68f80
movq (%rax), %r14
testq %r14, %r14
je 0x15b8f
btl $0xa, %ebp
jb 0x15b48
callq 0x121f0
movl %eax, 0xc(%rsp)
leaq 0x10(%rsp), %rbp
movq %rbp, %rdi
xorl %esi, %esi
callq 0x12340
movq %rbp, %rdi
callq 0x120b0
leaq 0x369d3(%rip), %rdx     # 0x4c498
leaq 0x20(%rsp), %rdi
pushq $0x40
popq %r13
movq %r13, %rsi
movq %rax, %rcx
callq 0x126f0
cltq
leaq (%rsp,%rax), %rdi
addq $0x20, %rdi
subq %rax, %r13
movl 0x8(%rbp), %eax
movl $0x3e8, %ecx            # imm = 0x3E8
cltd
idivl %ecx
leaq 0x3c68a(%rip), %rdx     # 0x52182
movq %r13, %rsi
movl %eax, %ecx
xorl %eax, %eax
callq 0x122d0
movl 0xc(%rsp), %eax
cmpl 0x5457a(%rip), %eax     # 0x6a088
pushq $0x50
popq %rax
pushq $0x43
popq %rbp
cmovel %eax, %ebp
callq 0x121f0
leaq 0x36970(%rip), %rcx     # 0x4c493
movsbl (%r15,%rcx), %r9d
movq %rbx, (%rsp)
leaq 0x36975(%rip), %rsi     # 0x4c4a8
movq %r14, %rdi
movl %eax, %edx
movl %ebp, %ecx
leaq 0x20(%rsp), %r8
xorl %eax, %eax
callq 0x124c0
jmp 0x15b53
movq %rbx, %rdi
movq %r14, %rsi
callq 0x12360
movq %r14, %rdi
callq 0x125d0
testb %r12b, %r12b
je 0x15b68
movq %r14, %rdi
callq 0x12220
cmpl $0x0, 0x54b11(%rip)     # 0x6a680
je 0x15b8f
movl %r15d, %eax
leaq 0x36835(%rip), %rcx     # 0x4c3b0
movl (%rcx,%rax,4), %edi
leaq 0x39393(%rip), %rsi     # 0x4ef18
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_O2/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 0x53f57(%rip), %rcx     # 0x6a088
addq %rax, %rcx
addq $0x3e0, %rcx            # imm = 0x3E0
xorl %edx, %edx
xorl %eax, %eax
cmpq $0x10, %rdx
je 0x1614e
addq (%rcx,%rdx,8), %rax
incq %rdx
jmp 0x1613f
pushq $0x10
popq %rcx
cqto
idivq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq 0x544c0(%rip), %rcx     # 0x6a624
testq %rcx, %rcx
setne %dl
movl 0x88(%rdi), %eax
testl $0x40014, %eax          # imm = 0x40014
sete %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x161af
movq 0x54547(%rip), %rdx     # 0x6a6d0
subq 0x78(%rbx), %rdx
cmpq %rcx, %rdx
jle 0x161af
leaq 0x36334(%rip), %rsi     # 0x4c4cd
pushq $0x1
popq %rbp
movl %ebp, %edi
xorl %eax, %eax
callq 0x15b9e
movq %rbx, %rdi
callq 0x1d548
jmp 0x161e3
xorl %ebp, %ebp
testb $0x10, %al
je 0x161e3
callq 0x15db3
movq 0x98(%rbx), %rcx
testq %rcx, %rcx
setne %dl
cmpq %rax, %rcx
setl %al
andb %dl, %al
cmpb $0x1, %al
jne 0x161e3
movq %rbx, %rdi
callq 0x28ed6
movq %rbx, %rdi
callq 0x28e92
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x53fc8(%rip), %rdi     # 0x6a268
imull $0xa, 0x53e01(%rip), %esi # 0x6a0a8
movq 0x28(%rdi), %rcx
movl %ecx, %eax
cltd
idivl %esi
cmpl $0x32, %ecx
pushq $0x32
popq %rbp
cmovll %ecx, %ebp
cmpl $0x32, %eax
cmovgel %eax, %ebp
testq %rcx, %rcx
je 0x162fd
subl $0x1, %ebp
jb 0x162fd
callq 0x12e57
movq 0x53f93(%rip), %rax     # 0x6a268
movq (%rax), %rax
movq 0x10(%rax), %rbx
movq %rbx, %rdi
callq 0x16157
testl %eax, %eax
jne 0x162f0
movq %rbx, %rdi
callq 0x161ec
movq 0x53f71(%rip), %rdi     # 0x6a268
movq 0x28(%rdi), %rcx
jmp 0x162bf
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
subq $0x18, %rsp
xorl %esi, %esi
pushq $0x1
popq %r13
pushq $0x10
popq %rdi
leaq 0x354a2(%rip), %rbp     # 0x4c358
pushq $0x4
popq %r15
pushq $0x20
popq %r14
pushq $0x2
popq %r12
cmpq $0x1f, %rsi
je 0x16fbc
movq %rsi, %rax
shlq $0x6, %rax
leaq 0x52646(%rip), %rcx     # 0x69520
leaq (%rcx,%rax), %rbx
movq 0x18(%rax,%rcx), %rax
movzbl (%rax), %ecx
leal -0x6c(%rcx), %edx
cmpl $0xb, %edx
ja 0x16f02
movslq (%rbp,%rdx,4), %rdx
addq %rbp, %rdx
movl %r13d, %ecx
jmpq *%rdx
movl $0x200, %ecx            # imm = 0x200
jmp 0x16f30
cmpl $0x46, %ecx
je 0x16f2b
cmpl $0x4d, %ecx
je 0x16f24
cmpl $0x61, %ecx
jne 0x16f38
movl %edi, %ecx
jmp 0x16f30
movl %r15d, %ecx
jmp 0x16f30
movl %r12d, %ecx
jmp 0x16f30
movl %r14d, %ecx
jmp 0x16f30
movl $0x800, %ecx            # imm = 0x800
jmp 0x16f30
movl $0x2000, %ecx           # imm = 0x2000
orl %ecx, 0x20(%rbx)
incq %rax
jmp 0x16ee3
testl %ecx, %ecx
jne 0x16fcb
movq 0x53169(%rip), %rax     # 0x6a0b0
movq %rax, (%rsp)
movq (%rbx), %rdi
movq %rsi, 0x10(%rsp)
callq 0x194da
movq (%rsp), %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x148e3
movl %eax, (%rsp)
movq 0x53147(%rip), %rax     # 0x6a0b8
movq %rax, 0x8(%rsp)
movq (%rbx), %rdi
callq 0x194da
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x148e3
pushq $0x10
popq %rdi
movq 0x10(%rsp), %rsi
incq %rsi
orl (%rsp), %eax
je 0x16ec2
leaq 0x3601c(%rip), %rdi     # 0x4cfc5
leaq 0x35f0d(%rip), %rsi     # 0x4cebd
movl $0x530, %edx            # imm = 0x530
callq 0x240ca
jmp 0x16fe3
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x35fd8(%rip), %rdi     # 0x4cfaa
leaq 0x35ee4(%rip), %rsi     # 0x4cebd
movl $0x527, %edx            # imm = 0x527
callq 0x24359
pushq $0x1
popq %rdi
callq 0x12120
// File: /workspace/github_c_makefile_star2_O2/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 0x194da
movq %rax, %rbx
movq 0x530b2(%rip), %rdi     # 0x6a0b0
movq %rax, %rsi
callq 0x14e88
movq %rax, %r14
movq %rbx, %rdi
callq 0x19548
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x52ff7(%rip)    # 0x6a400
andq $0x0, 0x53017(%rip)     # 0x6a428
movups %xmm0, 0x53000(%rip)    # 0x6a418
xorl %r14d, %r14d
leaq 0x52c66(%rip), %r15     # 0x6a088
cmpq $0x1c8, %r14            # imm = 0x1C8
je 0x1745e
leaq (%r14,%r15), %rbx
addq $0x3d8, %rbx            # imm = 0x3D8
andl $0x0, 0x88(%rbx)
callq 0x15db3
movq %rax, -0x8(%rbx)
movl $0x88, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x12380
addq $0x98, %r14
jmp 0x17422
xorps %xmm0, %xmm0
movups %xmm0, 0x52fe0(%rip)    # 0x6a448
movups %xmm0, 0x52fc9(%rip)    # 0x6a438
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/server.c
// Function: resetCommandTableStats
void resetCommandTableStats(void) {
    int numcommands = sizeof(serverCommandTable)/sizeof(struct serverCommand);
    int j;

    for (j = 0; j < numcommands; j++) {
        struct serverCommand *c = serverCommandTable+j;

        c->microseconds = 0;
        c->calls = 0;
    }
}

// Assembly:
pushq $0x30
popq %rax
leaq 0x51cda(%rip), %rcx     # 0x69520
xorps %xmm0, %xmm0
cmpq $0x7f0, %rax            # imm = 0x7F0
je 0x1785b
movaps %xmm0, (%rax,%rcx)
addq $0x40, %rax
jmp 0x17849
retq
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/server.c
// Function: replicationFeedMonitors
void replicationFeedMonitors(client *c, list *monitors, robj **argv, int argc) {
    listNode *ln;
    listIter li;
    int j;
    sds cmdrepr = sdsnew("+");
    robj *cmdobj;
    struct timeval tv;

    gettimeofday(&tv,NULL);
    cmdrepr = sdscatprintf(cmdrepr,"%ld.%06ld ",(long)tv.tv_sec,(long)tv.tv_usec);
    if (c->flags & CLIENT_UNIX_SOCKET) {
        cmdrepr = sdscatprintf(cmdrepr,"[unix:%s] ",server.unixsocket);
    } else {
        cmdrepr = sdscatprintf(cmdrepr,"[%s] ",getClientPeerId(c));
    }

    for (j = 0; j < argc; j++) {
        if (argv[j]->encoding == OBJ_ENCODING_INT) {
            cmdrepr = sdscatprintf(cmdrepr, "\"%ld\"", (long)argv[j]->ptr);
        } else {
            cmdrepr = sdscatrepr(cmdrepr,(char*)argv[j]->ptr,
                        sdslen(argv[j]->ptr));
        }
        if (j != argc-1)
            cmdrepr = sdscatlen(cmdrepr," ",1);
    }
    cmdrepr = sdscatlen(cmdrepr,"\r\n",2);
    cmdobj = createObject(OBJ_STRING,cmdrepr);

    listRewind(monitors,&li);
    while((ln = listNext(&li))) {
        client *monitor = ln->value;
        addReply(monitor,cmdobj);
    }
    decrRefCount(cmdobj);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %r14d
movq %rdx, %r15
movq %rsi, (%rsp)
movq %rdi, %rbx
leaq 0x35166(%rip), %rdi     # 0x4ca1d
callq 0x194da
movq %rax, %r12
leaq 0x8(%rsp), %r13
movq %r13, %rdi
xorl %esi, %esi
callq 0x12340
movq (%r13), %rdx
movq 0x8(%r13), %rcx
leaq 0x35711(%rip), %rsi     # 0x4cfee
movq %r12, %rdi
xorl %eax, %eax
callq 0x19db8
movq %rax, %r12
testb $0x8, 0x89(%rbx)
jne 0x1790a
movq %rbx, %rdi
callq 0x1e448
leaq 0x35702(%rip), %rsi     # 0x4d004
movq %r12, %rdi
movq %rax, %rdx
jmp 0x1791b
movq 0x528bf(%rip), %rdx     # 0x6a1d0
leaq 0x356e1(%rip), %rsi     # 0x4cff9
movq %r12, %rdi
xorl %eax, %eax
callq 0x19db8
movq %rax, %r12
leal -0x1(%r14), %ebp
xorl %eax, %eax
testl %r14d, %r14d
cmovlel %eax, %r14d
xorl %ebx, %ebx
cmpq %rbx, %r14
je 0x1799d
movq (%r15,%rbx,8), %rax
movl (%rax), %ecx
movl $0xf0, %edx
andl %edx, %ecx
movq 0x8(%rax), %r13
cmpl $0x10, %ecx
jne 0x17965
movq %r12, %rdi
leaq 0x356b1(%rip), %rsi     # 0x4d00a
movq %r13, %rdx
xorl %eax, %eax
callq 0x19db8
jmp 0x1797b
movq %r13, %rdi
callq 0x15e43
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x1a571
movq %rax, %r12
cmpq %rbx, %rbp
je 0x17998
movq %r12, %rdi
leaq 0x37c99(%rip), %rsi     # 0x4f626
pushq $0x1
popq %rdx
callq 0x19ad8
movq %rax, %r12
incq %rbx
jmp 0x17934
leaq 0x37453(%rip), %rsi     # 0x4edf7
pushq $0x2
popq %rdx
movq %r12, %rdi
callq 0x19ad8
xorl %edi, %edi
movq %rax, %rsi
callq 0x1f928
movq %rax, %rbx
leaq 0x18(%rsp), %r14
movq (%rsp), %rdi
movq %r14, %rsi
callq 0x12d0c
movq %r14, %rdi
callq 0x12d26
testq %rax, %rax
je 0x179e8
movq 0x10(%rax), %rdi
movq %rbx, %rsi
callq 0x1c8e7
jmp 0x179cd
movq %rbx, %rdi
callq 0x1fb84
addq $0x28, %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/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 %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq 0x5286e(%rip), %rsi     # 0x6a280
cmpq $0x0, 0x28(%rsi)
je 0x17a3b
cmpl $0x0, 0x52988(%rip)     # 0x6a3a8
jne 0x17a3b
movq 0x38(%rbx), %rax
testb $0x8, 0x21(%rax)
jne 0x17a3b
movq 0x30(%rbx), %rdx
movl 0x28(%rbx), %ecx
movq %rbx, %rdi
callq 0x17895
andb $-0x9, 0x8a(%rbx)
callq 0x15d90
movq %rax, %r15
movq 0x38(%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
callq 0x15d90
movq %rax, %r14
subq %r15, %r14
testb $0x1, %bpl
je 0x17aa5
movq 0x38(%rbx), %rax
testb $0x20, 0x21(%rax)
leaq 0x355e6(%rip), %rax     # 0x4d05a
leaq 0x35595(%rip), %rdi     # 0x4d010
cmoveq %rax, %rdi
movq 0x52c72(%rip), %rcx     # 0x6a6f8
testq %rcx, %rcx
je 0x17aa5
movl $0x3e8, %esi            # imm = 0x3E8
movq %r14, %rax
cqto
idivq %rsi
cmpq %rcx, %rax
jl 0x17aa5
movq %rax, %rsi
callq 0x28f22
testb $0x2, %bpl
je 0x17acb
movq 0x38(%rbx), %rax
movdqu 0x30(%rax), %xmm0
movq %r14, %xmm1
shufpd $0x2, 0x348de(%rip), %xmm1 # xmm1 = xmm1[0],mem[1]
paddq %xmm0, %xmm1
movdqu %xmm1, 0x30(%rax)
incq 0x5292e(%rip)           # 0x6a400
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x3534d(%rip), %rsi     # 0x4d0ca
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x15b9e
cmpl $-0x1, 0x529aa(%rip)    # 0x6a738
je 0x17dba
leaq 0x3534e(%rip), %rsi     # 0x4d0e5
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x15b9e
movl 0x52991(%rip), %edi     # 0x6a738
pushq $0xa
popq %rsi
callq 0x12530
movl 0x52983(%rip), %edi     # 0x6a738
callq 0x2b90e
cmpl $0x0, 0x52987(%rip)     # 0x6a748
setg %al
testb $0x2, %bl
sete %cl
testb $0x1, %bl
jne 0x17dd3
andb %al, %cl
je 0x17e00
leaq 0x35338(%rip), %rsi     # 0x4d112
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0x15b9e
movq 0x52965(%rip), %rdi     # 0x6a750
callq 0x2b5bc
testl %eax, %eax
je 0x17e00
pushq $-0x1
popq %rbx
leaq 0x35342(%rip), %rsi     # 0x4d140
jmp 0x17e37
cmpl $0x0, 0x52839(%rip)     # 0x6a640
je 0x17e26
leaq 0x35359(%rip), %rsi     # 0x4d169
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0x15b9e
movq 0x522b7(%rip), %rdi     # 0x6a0d8
callq 0x120f0
pushq $0x1
popq %rdi
callq 0x17cdd
xorl %ebx, %ebx
leaq 0x35349(%rip), %rsi     # 0x4d180
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x15b9e
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x51766(%rip), %rdi     # 0x6a0d8
leaq 0x363f4(%rip), %rsi     # 0x4ed6d
callq 0x124f0
testq %rax, %rax
je 0x189a7
movq %rax, %rbx
callq 0x121f0
leaq 0x36a01(%rip), %rsi     # 0x4f393
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_O2/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 0x1c1f4
movq %rax, %rbx
callq 0x1c1fc
movq %rax, %rdi
callq 0x12820
xorl %ebp, %ebp
testl %eax, %eax
setg %bpl
callq 0x1c204
movq %rax, (%rsp)
leaq 0x34f5e(%rip), %rdi     # 0x4d993
leaq 0x355f8(%rip), %rsi     # 0x4e034
leaq 0x34aad(%rip), %r8      # 0x4d4f0
pushq $0x40
popq %r9
movq %rbx, %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x122c0
xorl %edi, %edi
callq 0x12860
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
movq 0x5058a(%rip), %r15     # 0x68ff0
movq (%r15), %rcx
leaq 0x34f5e(%rip), %rdi     # 0x4d9ce
pushq $0x38
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x12880
movq (%r15), %rcx
leaq 0x34f7f(%rip), %rdi     # 0x4da07
pushq $0x32
popq %r14
movq %r14, %rsi
movq %rbx, %rdx
callq 0x12880
movq (%r15), %rcx
leaq 0x34f99(%rip), %rdi     # 0x4da3a
pushq $0x27
popq %rsi
movq %rbx, %rdx
callq 0x12880
movq (%r15), %rcx
leaq 0x34fac(%rip), %rdi     # 0x4da62
pushq $0x24
popq %rsi
movq %rbx, %rdx
callq 0x12880
movq (%r15), %rcx
leaq 0x34fbc(%rip), %rdi     # 0x4da87
movq %r14, %rsi
movq %rbx, %rdx
callq 0x12880
movq (%r15), %rcx
leaq 0x34fda(%rip), %rdi     # 0x4daba
pushq $0xa
popq %rsi
movq %rbx, %rdx
callq 0x12880
movq (%r15), %rcx
leaq 0x34fd0(%rip), %rdi     # 0x4dac5
pushq $0x3a
popq %rsi
movq %rbx, %rdx
callq 0x12880
movq (%r15), %rcx
leaq 0x34ff6(%rip), %rdi     # 0x4db00
pushq $0x2d
popq %rsi
movq %rbx, %rdx
callq 0x12880
movq (%r15), %rcx
leaq 0x3500f(%rip), %rdi     # 0x4db2e
pushq $0x23
popq %rsi
movq %rbx, %rdx
callq 0x12880
movq (%r15), %rcx
leaq 0x3501e(%rip), %rdi     # 0x4db52
pushq $0x3c
popq %rsi
movq %rbx, %rdx
callq 0x12880
movq (%r15), %rcx
leaq 0x35046(%rip), %rdi     # 0x4db8f
pushq $0x3e
popq %rsi
movq %rbx, %rdx
callq 0x12880
pushq $0x1
popq %rdi
callq 0x12860
// File: /workspace/github_c_makefile_star2_O2/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 0x1ab29
movq %rax, %rbx
movl 0x51b08(%rip), %r12d    # 0x6a680
callq 0x1c1f4
movq %rax, %r14
callq 0x1c1fc
pushq $0xa
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x12500
xorl %ebp, %ebp
testq %rax, %rax
setg %bpl
movl 0x5159a(%rip), %r15d    # 0x6a13c
callq 0x121f0
movslq %eax, %r10
testl %r12d, %r12d
je 0x18bdc
leaq 0x35144(%rip), %rsi     # 0x4dcfa
leaq 0x35477(%rip), %rdx     # 0x4e034
leaq 0x35171(%rip), %r9      # 0x4dd35
pushq $0x2
popq %rdi
movq %r14, %rcx
movl %ebp, %r8d
xorl %eax, %eax
pushq %r10
pushq %r15
callq 0x15b9e
popq %rax
popq %rcx
jmp 0x18c21
subq $0x8, %rsp
leaq 0x3514e(%rip), %r11     # 0x4dd35
leaq 0x34fe0(%rip), %rdx     # 0x4dbce
leaq 0x3543f(%rip), %rcx     # 0x4e034
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 0x15a3d
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1ac81
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
callq 0x15d90
movq %rax, %rbx
movq 0x51a96(%rip), %rdi     # 0x6a750
callq 0x2bc2e
testl %eax, %eax
je 0x18cd1
callq 0x120d0
movl (%rax), %edi
cmpl $0x2, %edi
jne 0x18cfc
popq %rbx
retq
callq 0x15d90
subq %rbx, %rax
cvtsi2ss %rax, %xmm0
divss 0x3370e(%rip), %xmm0    # 0x4c3f4
cvtss2sd %xmm0, %xmm0
leaq 0x35047(%rip), %rsi     # 0x4dd38
pushq $0x2
popq %rdi
movb $0x1, %al
popq %rbx
jmp 0x15b9e
callq 0x128e0
leaq 0x35052(%rip), %rsi     # 0x4dd5a
pushq $0x3
popq %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x15b9e
pushq $0x1
popq %rdi
callq 0x12860
// File: /workspace/github_c_makefile_star2_O2/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, 0x5146c(%rip)     # 0x6a1c8
je 0x18d67
movq 0x513e3(%rip), %rdx     # 0x6a148
jmp 0x18d6e
leaq 0x340df(%rip), %rdx     # 0x4ce4d
movl 0x513c8(%rip), %ecx     # 0x6a13c
leaq 0x35050(%rip), %rdi     # 0x4ddcb
xorl %eax, %eax
jmp 0x28bb3
// File: /workspace/github_c_makefile_star2_O2/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 0x3504a(%rip), %rdi     # 0x4ddd4
callq 0x12050
testq %rax, %rax
je 0x18dbe
leaq 0x3507e(%rip), %rsi     # 0x4de19
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0x15b9e
pushq $0x13
popq %rdi
callq 0x12060
leaq 0x35020(%rip), %rdi     # 0x4ddd4
callq 0x127b0
pushq $0x1
popq %rbx
jmp 0x18dd1
leaq 0x3501b(%rip), %rsi     # 0x4dde0
xorl %ebx, %ebx
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x15b9e
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x18d82
cmpl $0x2, %edi
je 0x18dd5
cmpl $0x1, %edi
jne 0x18fa2
pushq %rbx
leaq 0x34e5d(%rip), %rdi     # 0x4ddd4
callq 0x12050
movq %rax, %rbx
leaq 0x34ec8(%rip), %rdi     # 0x4de4e
callq 0x12050
testq %rbx, %rbx
je 0x18f97
callq 0x18d82
jmp 0x18fa1
testq %rax, %rax
je 0x18fa1
callq 0x18dd5
popq %rbx
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
movl %edi, %ebp
movl $0x40c0, %edi           # imm = 0x40C0
callq 0x1ab29
movq %rax, %rbx
cmpl $-0x1, %ebp
je 0x1c2f2
xorl %edi, %edi
movl %ebp, %esi
callq 0x1382c
xorl %edi, %edi
movl %ebp, %esi
callq 0x1392b
leaq 0x4ddcb(%rip), %r14     # 0x6a088
movl 0x5a0(%r14), %edx
testl %edx, %edx
je 0x1c2d1
xorl %edi, %edi
movl %ebp, %esi
callq 0x1383b
movq 0x38(%r14), %rdi
leaq 0xf1(%rip), %rcx        # 0x1c3cd
pushq $0x1
popq %rdx
movl %ebp, %esi
movq %rbx, %r8
callq 0x1306c
cmpl $-0x1, %eax
je 0x1c3b4
leaq 0x4dd8f(%rip), %r14     # 0x6a088
movq 0x318(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x318(%r14)
movq %rax, (%rbx)
movl %ebp, 0x8(%rbx)
andq $0x0, 0x10(%rbx)
andl $0x0, 0xb8(%rbx)
callq 0x194cc
movq %rax, 0x18(%rbx)
andq $0x0, 0x20(%rbx)
andl $0x0, 0x28(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x40(%rbx)
orq $-0x1, 0x50(%rbx)
andq $0x0, 0x68(%rbx)
andl $0x0, 0x88(%rbx)
movq 0x648(%r14), %rax
movq %rax, 0x78(%rbx)
movq %rax, 0x70(%rbx)
andl $0x0, 0x8c(%rbx)
callq 0x12aec
movq %rax, 0x58(%rbx)
andq $0x0, 0x60(%rbx)
andq $0x0, 0x80(%rbx)
leaq -0xfc(%rip), %rcx       # 0x1c282
movq %rcx, 0x18(%rax)
leaq -0x10c(%rip), %rcx      # 0x1c27d
movq %rcx, 0x10(%rax)
andl $0x0, 0x90(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0xa8(%rbx)
cmpl $-0x1, %ebp
je 0x1c3c5
movq 0x1e0(%r14), %rdi
movq %rbx, %rsi
callq 0x12bac
jmp 0x1c3c5
movl %ebp, %edi
callq 0x123b0
movq %rbx, %rdi
callq 0x1ac81
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $-0x1
popq %rbx
testl $0xa00000, %eax         # imm = 0xA00000
je 0x1c56d
movl %ebx, %eax
popq %rbx
retq
movq %rdi, %rsi
cmpl $0x0, 0x8(%rdi)
jle 0x1c569
xorl %ebx, %ebx
cmpl $0x0, 0xb8(%rsi)
jne 0x1c569
btl $0x14, %eax
jb 0x1c569
movq 0x58(%rsi), %rcx
cmpq $0x0, 0x28(%rcx)
jne 0x1c569
orl $0x100000, %eax         # imm = 0x100000
movl %eax, 0x88(%rsi)
leaq 0x4dae4(%rip), %rax     # 0x6a088
movq 0x1f0(%rax), %rdi
callq 0x12b55
jmp 0x1c569
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/networking.c
// Function: addReplyObjectToList
void _addReplyObjectToList(client *c, robj *o) {
    if (c->flags & CLIENT_CLOSE_AFTER_REPLY) return;

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

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

// Assembly:
testb $0x40, 0x88(%rdi)
jne 0x1c699
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x58(%rdi), %rax
cmpq $0x0, 0x28(%rax)
je 0x1c69a
movq 0x8(%rax), %rbp
movq 0x10(%rbp), %r15
testq %r15, %r15
je 0x1c6a0
movq %r15, %rdi
callq 0x1c6dd
movq %rax, %r13
movq 0x8(%r14), %r12
movq %r12, %rdi
callq 0x1c6dd
addq %r13, %rax
cmpq $0x4000, %rax           # imm = 0x4000
ja 0x1c6a4
movq %r15, %rdi
movq %r12, %rsi
callq 0x19b5e
movq %rax, 0x10(%rbp)
movq 0x8(%r14), %r14
jmp 0x1c6bb
retq
movq 0x8(%r14), %rdi
jmp 0x1c6a7
movq 0x8(%r14), %r12
movq %r12, %rdi
callq 0x194fb
movq %rax, %r14
movq 0x58(%rbx), %rdi
movq %rax, %rsi
callq 0x12bac
movq %r14, %rdi
callq 0x1c6dd
addq %rax, 0x60(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1c715
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/networking.c
// Function: addReplySdsToList
void _addReplySdsToList(client *c, sds s) {
    if (c->flags & CLIENT_CLOSE_AFTER_REPLY) {
        sdsfree(s);
        return;
    }

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

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
testb $0x40, 0x88(%rdi)
jne 0x1c81d
movq %rdi, %rbx
movq 0x58(%rdi), %r15
cmpq $0x0, 0x28(%r15)
je 0x1c833
movq 0x8(%r15), %rbp
movq 0x10(%rbp), %r12
testq %r12, %r12
je 0x1c833
movq %r12, %rdi
callq 0x1c6dd
movq %rax, %r13
movq %r14, %rdi
callq 0x1c6dd
addq %r13, %rax
cmpq $0x4000, %rax           # imm = 0x4000
ja 0x1c833
movq %r12, %rdi
movq %r14, %rsi
callq 0x19b5e
movq %rax, 0x10(%rbp)
movq %r14, %rdi
callq 0x1c6dd
addq %rax, 0x60(%rbx)
movq %r14, %rdi
callq 0x19548
jmp 0x1c84a
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x19548
movq %r15, %rdi
movq %r14, %rsi
callq 0x12bac
movq %r14, %rdi
callq 0x1c6dd
addq %rax, 0x60(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1c715