LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/ae.c
// Function: aeDeleteTimeEvent
int aeDeleteTimeEvent(aeEventLoop *eventLoop, long long id)
{
    aeTimeEvent *te, *prev = NULL;

    te = eventLoop->timeEventHead;
    while(te) {
        if (te->id == id) {
            if (prev == NULL)
                eventLoop->timeEventHead = te->next;
            else
                prev->next = te->next;
            if (te->finalizerProc)
                te->finalizerProc(eventLoop, te->clientData);
            zfree(te);
            return AE_OK;
        }
        prev = te;
        te = te->next;
    }
    return AE_ERR; /* NO event with the specified ID found */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x13da1
movq -0x20(%rbp), %rax
movq (%rax), %rax
cmpq -0x18(%rbp), %rax
jne 0x13d88
cmpq $0x0, -0x28(%rbp)
jne 0x13d45
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
jmp 0x13d55
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x13d76
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq 0x28(%rcx), %rsi
callq *%rax
movq -0x20(%rbp), %rdi
callq 0x20ce0
movl $0x0, -0x4(%rbp)
jmp 0x13da8
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x13d14
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/anet.c
// Function: anetSetReuseAddr
static int anetSetReuseAddr(char *err, int fd) {
    int yes = 1;
    /* Make sure connection-intensive things like the discnt benckmark
     * will be able to close/open sockets a zillion of times */
    if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes)) == -1) {
        anetSetError(err, "setsockopt SO_REUSEADDR: %s", strerror(errno));
        return ANET_ERR;
    }
    return ANET_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl $0x1, -0x18(%rbp)
movl -0x14(%rbp), %edi
movl $0x1, %esi
movl $0x2, %edx
leaq -0x18(%rbp), %rcx
movl $0x4, %r8d
callq 0x12190
cmpl $-0x1, %eax
jne 0x15ed9
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
callq 0x120b0
movl (%rax), %edi
callq 0x12900
movq -0x20(%rbp), %rdi
movq %rax, %rdx
leaq 0x8d271(%rip), %rsi     # 0xa313a
movb $0x0, %al
callq 0x146a0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x15ee0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/dict.c
// Function: dictAdd
int dictAdd(dict *d, void *key, void *val)
{
    dictEntry *entry = dictAddRaw(d,key,NULL);

    if (!entry) return DICT_ERR;
    dictSetVal(d, entry, val);
    return DICT_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x16740
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x166e9
movl $0x1, -0x4(%rbp)
jmp 0x16734
jmp 0x166eb
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x10(%rax)
je 0x1671f
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rdi
movq -0x20(%rbp), %rsi
callq *%rax
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x1672b
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x1672d
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/dict.c
// Function: dictKeyIndex
static int _dictKeyIndex(dict *d, const void *key, unsigned int hash, dictEntry **existing)
{
    unsigned int idx, table;
    dictEntry *he;
    if (existing) *existing = NULL;

    /* Expand the hash table if needed */
    if (_dictExpandIfNeeded(d) == DICT_ERR)
        return -1;
    for (table = 0; table <= 1; table++) {
        idx = hash & d->ht[table].sizemask;
        /* Search if this slot does not already contain the given key */
        he = d->ht[table].table[idx];
        while(he) {
            if (key==he->key || dictCompareKeys(d, key, he->key)) {
                if (existing) *existing = he;
                return -1;
            }
            he = he->next;
        }
        if (!dictIsRehashing(d)) break;
    }
    return idx;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x168d9
movq -0x28(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rdi
callq 0x18320
cmpl $0x1, %eax
jne 0x168f3
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x169e2
movl $0x0, -0x30(%rbp)
cmpl $0x1, -0x30(%rbp)
ja 0x169dc
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
addq $0x10, %rcx
movl -0x30(%rbp), %edx
shlq $0x5, %rdx
addq %rdx, %rcx
andq 0x10(%rcx), %rax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
addq $0x10, %rax
movl -0x30(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rax
movl -0x2c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x169bf
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
cmpq (%rcx), %rax
je 0x16996
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x18(%rax)
je 0x16989
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rdi
movq -0x18(%rbp), %rsi
movq -0x38(%rbp), %rcx
movq (%rcx), %rdx
callq *%rax
cmpl $0x0, %eax
jne 0x16996
jmp 0x169b1
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
cmpq (%rcx), %rax
jne 0x169b1
cmpq $0x0, -0x28(%rbp)
je 0x169a8
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x169e2
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x16940
movq -0x10(%rbp), %rax
cmpq $-0x1, 0x50(%rax)
jne 0x169cc
jmp 0x169dc
jmp 0x169ce
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x168fa
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/dict.c
// Function: dictReplace
int dictReplace(dict *d, void *key, void *val)
{
    dictEntry *entry, *existing, auxentry;

    /* Try to add the element. If the key
     * does not exists dictAdd will suceed. */
    entry = dictAddRaw(d,key,&existing);
    if (entry) {
        dictSetVal(d, entry, val);
        return 1;
    }

    /* Set the new value and free the old one. Note that it is important
     * to do that in this order, as the value may just be exactly the same
     * as the previous one. In this context, think to reference counting,
     * you want to increment (set), and then decrement (free), and not the
     * reverse. */
    auxentry = *existing;
    dictSetVal(d, existing, val);
    dictFreeVal(d, &auxentry);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x16740
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x16a70
jmp 0x16a22
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x10(%rax)
je 0x16a56
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rdi
movq -0x20(%rbp), %rsi
callq *%rax
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x16a62
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x16a64
movl $0x1, -0x4(%rbp)
jmp 0x16afb
movq -0x30(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x48(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x40(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x10(%rax)
je 0x16abf
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rdi
movq -0x20(%rbp), %rsi
callq *%rax
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x16acb
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x16acd
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0x16af4
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rdi
movq -0x40(%rbp), %rsi
callq *%rax
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x16e19
jmp 0x16e77
movq -0x8(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x20(%rax)
je 0x16e43
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rdi
movq -0x10(%rbp), %rcx
movq (%rcx), %rsi
callq *%rax
movq -0x8(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0x16e6e
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x28(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rdi
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rsi
callq *%rax
movq -0x10(%rbp), %rdi
callq 0x20ce0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x2, 0x28(%rax)
jne 0x1856c
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x18579
leaq 0x8bde5(%rip), %rax     # 0xa4358
movq %rax, -0x18(%rbp)
jmp 0x18579
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x2, 0x28(%rax)
jle 0x1859d
movq -0x8(%rbp), %rdi
movq 0xa72e2(%rip), %rsi     # 0xbf878
callq 0x24050
jmp 0x185ba
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1c5a0
movq -0x20(%rbp), %rdi
movq %rax, %rsi
callq 0x24cf0
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x2, 0x28(%rax)
jle 0x185f2
movq -0x8(%rbp), %rdi
movq 0xa7290(%rip), %rsi     # 0xbf878
callq 0x24050
jmp 0x186a5
movq -0x8(%rbp), %rax
cmpl $0x2, 0x28(%rax)
jne 0x1866a
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x8bc84(%rip), %rsi     # 0xa4297
callq 0x12070
cmpl $0x0, %eax
jne 0x18628
movl -0xc(%rbp), %eax
orl $0x2, %eax
movl %eax, -0xc(%rbp)
jmp 0x18668
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x90ed6(%rip), %rsi     # 0xa9515
callq 0x12070
cmpl $0x0, %eax
jne 0x18654
movl -0xc(%rbp), %eax
orl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x18666
movq -0x8(%rbp), %rdi
movq 0xa7219(%rip), %rsi     # 0xbf878
callq 0x24050
jmp 0x186a5
jmp 0x18668
jmp 0x1866a
jmp 0x1866c
cmpl $0x0, 0xa6d95(%rip)     # 0xbf408
je 0x18681
movl -0xc(%rbp), %eax
andl $-0x2, %eax
orl $0x2, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %edi
callq 0x1beb0
cmpl $0x0, %eax
jne 0x18695
xorl %edi, %edi
callq 0x12870
movq -0x8(%rbp), %rdi
leaq 0x8bbfe(%rip), %rsi     # 0xa429e
callq 0x24320
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x88(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x18700
jmp 0x18733
movq -0x8(%rbp), %rax
movl 0x88(%rax), %ecx
orl $0x4, %ecx
movl %ecx, 0x88(%rax)
movq 0xa6bc6(%rip), %rdi     # 0xbf2e0
movq -0x8(%rbp), %rsi
callq 0x12ce0
movq -0x8(%rbp), %rdi
movq 0xa70d2(%rip), %rsi     # 0xbf800
callq 0x24050
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x1, 0x28(%rax)
jne 0x18809
movq -0x8(%rbp), %rdi
movq 0xa695f(%rip), %rax     # 0xbf110
movq 0x28(%rax), %rsi
movq 0xa6954(%rip), %rax     # 0xbf110
addq 0x48(%rax), %rsi
callq 0x24b20
movq 0xa6944(%rip), %rdi     # 0xbf110
callq 0x17300
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x173a0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x187fb
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x1c190
jmp 0x187d5
movq -0x10(%rbp), %rdi
callq 0x17510
jmp 0x188f6
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x8ac99(%rip), %rsi     # 0xa34b9
callq 0x12070
cmpl $0x0, %eax
jne 0x18894
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x28(%rax), %eax
subl $0x2, %eax
movslq %eax, %rsi
callq 0x24b20
movl $0x2, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x28(%rcx), %eax
jge 0x18892
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq 0xa68ae(%rip), %rdi     # 0xbf110
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %rsi
callq 0x17180
movq -0x28(%rbp), %rdi
movq %rax, %rsi
callq 0x1c190
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x18847
jmp 0x188f4
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x8ba52(%rip), %rsi     # 0xa42fd
callq 0x12070
cmpl $0x0, %eax
jne 0x188e0
movq -0x8(%rbp), %rax
cmpl $0x2, 0x28(%rax)
jne 0x188e0
movq -0x8(%rbp), %rdi
movq 0xa6846(%rip), %rax     # 0xbf110
movq 0x28(%rax), %rsi
movq 0xa683b(%rip), %rax     # 0xbf110
addq 0x48(%rax), %rsi
callq 0x24ab0
jmp 0x188f2
movq -0x8(%rbp), %rdi
leaq 0x8ba18(%rip), %rsi     # 0xa4303
callq 0x24320
jmp 0x188f6
jmp 0x188f4
jmp 0x188f6
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/server.c
// Function: incrementallyRehash
int incrementallyRehash(void) {
    if (dictIsRehashing(server.counters)) {
        dictRehashMilliseconds(server.counters,1);
        return 1;
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq 0xa62d1(%rip), %rax     # 0xbf700
cmpq $-0x1, 0x50(%rax)
je 0x19450
movq 0xa62c3(%rip), %rdi     # 0xbf700
movl $0x1, %esi
callq 0x16650
movl $0x1, -0x4(%rbp)
jmp 0x19457
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/server.c
// Function: updateDictResizePolicy
void updateDictResizePolicy(void) {
    if (server.ddb_child_pid == -1)
        dictEnableResize();
    else
        dictDisableResize();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $-0x1, 0xa632d(%rip)    # 0xbf798
jne 0x19474
callq 0x17cd0
jmp 0x19479
callq 0x17ce0
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movq $0x0, -0x10(%rbp)
movl $0x0, -0x8(%rbp)
cmpl $0x10, -0x8(%rbp)
jge 0x19683
movslq -0x4(%rbp), %rcx
leaq 0xa5a91(%rip), %rax     # 0xbf0e8
addq $0x3d0, %rax            # imm = 0x3D0
imulq $0x98, %rcx, %rcx
addq %rcx, %rax
movslq -0x8(%rbp), %rcx
movq 0x10(%rax,%rcx,8), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x19646
movq -0x10(%rbp), %rax
movl $0x10, %ecx
cqto
idivq %rcx
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq 0xa607d(%rip), %rax     # 0xbf730
movq %rax, -0x18(%rbp)
cmpl $0x0, 0xa5fc6(%rip)     # 0xbf684
je 0x19735
movq -0x10(%rbp), %rax
movl 0x88(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0x19735
movq -0x10(%rbp), %rax
movl 0x88(%rax), %eax
andl $0x40000, %eax          # imm = 0x40000
cmpl $0x0, %eax
jne 0x19735
movq -0x10(%rbp), %rax
movl 0x88(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0x19735
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
subq 0x78(%rcx), %rax
movslq 0xa5f79(%rip), %rcx     # 0xbf684
cmpq %rcx, %rax
jle 0x19735
movl $0x1, %edi
leaq 0x89e61(%rip), %rsi     # 0xa357d
movb $0x0, %al
callq 0x18b10
movq -0x10(%rbp), %rdi
callq 0x252e0
movl $0x1, -0x4(%rbp)
jmp 0x1978c
movq -0x10(%rbp), %rax
movl 0x88(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x19783
callq 0x18e20
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x98(%rax)
je 0x19781
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rax
cmpq -0x20(%rbp), %rax
jge 0x19781
movq -0x10(%rbp), %rdi
callq 0x37ec0
movq -0x10(%rbp), %rdi
callq 0x37e20
jmp 0x19783
jmp 0x19785
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq 0xa5979(%rip), %rax     # 0xbf2c8
movq 0x28(%rax), %rax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
imull $0xa, 0xa57a8(%rip), %ecx # 0xbf108
cltd
idivl %ecx
movl %eax, -0x8(%rbp)
cmpl $0x32, -0x8(%rbp)
jge 0x1998a
cmpl $0x32, -0x4(%rbp)
jge 0x1997a
movl -0x4(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0x19984
movl $0x32, %eax
movl %eax, -0x1c(%rbp)
jmp 0x19984
movl -0x1c(%rbp), %eax
movl %eax, -0x8(%rbp)
jmp 0x1998c
movq 0xa5935(%rip), %rcx     # 0xbf2c8
xorl %eax, %eax
cmpq $0x0, 0x28(%rcx)
movb %al, -0x1d(%rbp)
je 0x199b3
movl -0x8(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x8(%rbp)
cmpl $0x0, %eax
setne %al
movb %al, -0x1d(%rbp)
movb -0x1d(%rbp), %al
testb $0x1, %al
jne 0x199bc
jmp 0x19a04
movq 0xa5905(%rip), %rdi     # 0xbf2c8
callq 0x13340
movq 0xa58f9(%rip), %rax     # 0xbf2c8
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x196a0
cmpl $0x0, %eax
je 0x199f2
jmp 0x1998c
movq -0x10(%rbp), %rdi
callq 0x197a0
cmpl $0x0, %eax
je 0x19a02
jmp 0x1998c
jmp 0x1998c
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/server.c
// Function: beforeSleep
void beforeSleep(struct aeEventLoop *eventLoop) {
    UNUSED(eventLoop);

    /* Call the Cluster before sleep function. Note that this function
     * may change the state of Cluster, so it's a good idea to call it
     * before serving the unblocked clients later in this function. */
    clusterBeforeSleep();

    /* Try to process pending commands for clients that were just unblocked. */
    if (listLength(server.unblocked_clients))
        processUnblockedClients();

    /* Handle writes with pending output buffers. */
    handleClientsWithPendingWrites();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
callq 0x350c0
movq 0xa5868(%rip), %rax     # 0xbf720
cmpq $0x0, 0x28(%rax)
je 0x19ec4
callq 0x37ca0
callq 0x25900
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1e2b0
movq %rax, -0x18(%rbp)
movq 0xa4740(%rip), %rdi     # 0xbf110
movq -0x18(%rbp), %rsi
callq 0x17180
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rdi
callq 0x1e3c0
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq $0x0, 0xa442d(%rip) # 0xbf460
movq $0x0, 0xa442a(%rip) # 0xbf468
movq $0x0, 0xa442f(%rip) # 0xbf478
xorps %xmm0, %xmm0
movsd %xmm0, 0xa442c(%rip)    # 0xbf480
movq $0x0, 0xa4429(%rip) # 0xbf488
movl $0x0, -0x4(%rbp)
cmpl $0x3, -0x4(%rbp)
jge 0x1b118
movslq -0x4(%rbp), %rcx
leaq 0xa406d(%rip), %rax     # 0xbf0e8
addq $0x3d0, %rax            # imm = 0x3D0
imulq $0x98, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x90(%rax)
callq 0x18e20
movq %rax, %rcx
movslq -0x4(%rbp), %rdx
leaq 0xa4040(%rip), %rax     # 0xbf0e8
addq $0x3d0, %rax            # imm = 0x3D0
imulq $0x98, %rdx, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movslq -0x4(%rbp), %rcx
leaq 0xa4022(%rip), %rax     # 0xbf0e8
addq $0x3d0, %rax            # imm = 0x3D0
imulq $0x98, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x8(%rax)
movslq -0x4(%rbp), %rax
leaq 0xa3fff(%rip), %rdi     # 0xbf0e8
addq $0x3d0, %rdi            # imm = 0x3D0
imulq $0x98, %rax, %rax
addq %rax, %rdi
addq $0x10, %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0x12370
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x1b066
movq $0x0, 0xa4375(%rip) # 0xbf498
movq $0x0, 0xa4372(%rip) # 0xbf4a0
movq $0x0, 0xa436f(%rip) # 0xbf4a8
movq $0x0, 0xa436c(%rip) # 0xbf4b0
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
movl $0x1f, -0x4(%rbp)
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x1b643
movslq -0x8(%rbp), %rcx
leaq 0xa2f0b(%rip), %rax     # 0xbe520
shlq $0x6, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x38(%rax)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x1b602
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq 0xa39fa(%rip), %rax     # 0xbf2e0
cmpq $0x0, 0x28(%rax)
je 0x1b92a
cmpl $0x0, 0xa3b14(%rip)     # 0xbf408
jne 0x1b92a
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x20(%rax), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
jne 0x1b92a
movq -0x8(%rbp), %rdi
movq 0xa39ca(%rip), %rsi     # 0xbf2e0
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdx
movq -0x8(%rbp), %rax
movl 0x28(%rax), %ecx
callq 0x1b6d0
movq -0x8(%rbp), %rax
movl 0x88(%rax), %ecx
andl $0xfff7ffff, %ecx       # imm = 0xFFF7FFFF
movl %ecx, 0x88(%rax)
callq 0x18de0
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rdi
callq *%rax
callq 0x18de0
subq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0xc(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x1b9da
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x20(%rax), %edx
andl $0x2000, %edx           # imm = 0x2000
leaq 0x8877f(%rip), %rax     # 0xa410a
leaq 0x8872e(%rip), %rcx     # 0xa40c0
cmpl $0x0, %edx
cmovneq %rcx, %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, 0xa3db3(%rip)     # 0xbf758
je 0x1b9d8
movq -0x20(%rbp), %rax
movl $0x3e8, %ecx            # imm = 0x3E8
cqto
idivq %rcx
cmpq 0xa3d9c(%rip), %rax     # 0xbf758
jl 0x1b9d8
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rax
movl $0x3e8, %ecx            # imm = 0x3E8
cqto
idivq %rcx
movq %rax, %rsi
callq 0x37f70
jmp 0x1b9da
movl -0xc(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x1ba0d
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
addq 0x30(%rax), %rcx
movq %rcx, 0x30(%rax)
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x38(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x38(%rax)
movq 0xa3a4c(%rip), %rax     # 0xbf460
addq $0x1, %rax
movq %rax, 0xa3a41(%rip)     # 0xbf460
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/server.c
// Function: getMemoryWarningLevel
int getMemoryWarningLevel(void) {
    size_t mem_used = zmalloc_used_memory();

    if (mem_used > server.maxmemory / 100 * 95 &&
        mem_used > server.resident_set_size) return 3;
    if (mem_used > server.maxmemory / 100 * 95) return 2;
    if (mem_used > server.maxmemory / 100 * 75) return 1;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
callq 0x20de0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq 0xa39b8(%rip), %rax     # 0xbf6f8
movl $0x64, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movq -0x18(%rbp), %rax
imulq $0x5f, %rcx, %rcx
cmpq %rcx, %rax
jbe 0x1bd70
movq -0x10(%rbp), %rax
cmpq 0xa372b(%rip), %rax     # 0xbf490
jbe 0x1bd70
movl $0x3, -0x4(%rbp)
jmp 0x1bddb
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq 0xa3979(%rip), %rax     # 0xbf6f8
movl $0x64, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movq -0x20(%rbp), %rax
imulq $0x5f, %rcx, %rcx
cmpq %rcx, %rax
jbe 0x1bda2
movl $0x2, -0x4(%rbp)
jmp 0x1bddb
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq 0xa3947(%rip), %rax     # 0xbf6f8
movl $0x64, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movq -0x28(%rbp), %rax
imulq $0x4b, %rcx, %rcx
cmpq %rcx, %rax
jbe 0x1bdd4
movl $0x1, -0x4(%rbp)
jmp 0x1bddb
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
movl -0x8(%rbp), %eax
andl $0x1, %eax
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
andl $0x2, %eax
movl %eax, -0x10(%rbp)
movl $0x3, %edi
leaq 0x882a1(%rip), %rsi     # 0xa417a
movb $0x0, %al
callq 0x18b10
cmpl $-0x1, 0xa38b1(%rip)    # 0xbf798
je 0x1bf17
movl $0x3, %edi
leaq 0x882a0(%rip), %rsi     # 0xa4195
movb $0x0, %al
callq 0x18b10
movl 0xa3896(%rip), %edi     # 0xbf798
movl $0xa, %esi
callq 0x12520
movl 0xa3886(%rip), %edi     # 0xbf798
callq 0x3c180
cmpl $0x0, 0xa388a(%rip)     # 0xbf7a8
jle 0x1bf26
cmpl $0x0, -0x10(%rbp)
je 0x1bf2c
cmpl $0x0, -0xc(%rbp)
je 0x1bf6e
movl $0x2, %edi
leaq 0x8828a(%rip), %rsi     # 0xa41c2
movb $0x0, %al
callq 0x18b10
movq 0xa386a(%rip), %rdi     # 0xbf7b0
callq 0x3bcd0
cmpl $0x0, %eax
je 0x1bf6c
movl $0x3, %edi
leaq 0x88294(%rip), %rsi     # 0xa41f0
movb $0x0, %al
callq 0x18b10
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1bfba
jmp 0x1bf6e
cmpl $0x0, 0xa372b(%rip)     # 0xbf6a0
je 0x1bf96
movl $0x2, %edi
leaq 0x88296(%rip), %rsi     # 0xa4219
movb $0x0, %al
callq 0x18b10
movq 0xa31a7(%rip), %rdi     # 0xbf138
callq 0x120d0
movl $0x1, %edi
callq 0x1bdf0
movl $0x3, %edi
leaq 0x88284(%rip), %rsi     # 0xa4230
movb $0x0, %al
callq 0x18b10
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/server.c
// Function: addReplyCommandFlag
int addReplyCommandFlag(client *c, struct serverCommand *cmd, int f, char *reply) {
    if (cmd->flags & f) {
        addReplyStatus(c, reply);
        return 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
movl 0x20(%rax), %eax
andl -0x1c(%rbp), %eax
cmpl $0x0, %eax
je 0x1c17c
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x24510
movl $0x1, -0x4(%rbp)
jmp 0x1c183
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq 0xa1f29(%rip), %rdi     # 0xbf138
leaq 0x88cc9(%rip), %rsi     # 0xa5edf
callq 0x124e0
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x1d250
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
callq 0x121d0
movq -0x10(%rbp), %rdi
movl %eax, %edx
leaq 0x892bb(%rip), %rsi     # 0xa64fb
movb $0x0, %al
callq 0x124b0
movq -0x8(%rbp), %rdi
callq 0x12200
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
callq 0x23370
movq %rax, -0x10(%rbp)
callq 0x23380
movq %rax, %rdi
callq 0x12820
cmpl $0x0, %eax
setg %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
callq 0x23390
movq -0x10(%rbp), %rdx
movl -0x4(%rbp), %ecx
leaq 0x87724(%rip), %rdi     # 0xa4a43
leaq 0x87dc7(%rip), %rsi     # 0xa50ed
leaq 0x87273(%rip), %r8      # 0xa45a0
movl $0x40, %r9d
movq %rax, (%rsp)
movb $0x0, %al
callq 0x122b0
xorl %edi, %edi
callq 0x12870
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
movq 0xa0c9d(%rip), %rax     # 0xbdff8
movq (%rax), %rdi
leaq 0x87719(%rip), %rsi     # 0xa4a7e
movb $0x0, %al
callq 0x124b0
movq 0xa0c85(%rip), %rax     # 0xbdff8
movq (%rax), %rdi
leaq 0x8773a(%rip), %rsi     # 0xa4ab7
movb $0x0, %al
callq 0x124b0
movq 0xa0c6d(%rip), %rax     # 0xbdff8
movq (%rax), %rdi
leaq 0x87755(%rip), %rsi     # 0xa4aea
movb $0x0, %al
callq 0x124b0
movq 0xa0c55(%rip), %rax     # 0xbdff8
movq (%rax), %rdi
leaq 0x87765(%rip), %rsi     # 0xa4b12
movb $0x0, %al
callq 0x124b0
movq 0xa0c3d(%rip), %rax     # 0xbdff8
movq (%rax), %rdi
leaq 0x87772(%rip), %rsi     # 0xa4b37
movb $0x0, %al
callq 0x124b0
movq 0xa0c25(%rip), %rax     # 0xbdff8
movq (%rax), %rdi
leaq 0x8778d(%rip), %rsi     # 0xa4b6a
movb $0x0, %al
callq 0x124b0
movq 0xa0c0d(%rip), %rax     # 0xbdff8
movq (%rax), %rdi
leaq 0x87780(%rip), %rsi     # 0xa4b75
movb $0x0, %al
callq 0x124b0
movq 0xa0bf5(%rip), %rax     # 0xbdff8
movq (%rax), %rdi
leaq 0x877a3(%rip), %rsi     # 0xa4bb0
movb $0x0, %al
callq 0x124b0
movq 0xa0bdd(%rip), %rax     # 0xbdff8
movq (%rax), %rdi
leaq 0x877b9(%rip), %rsi     # 0xa4bde
movb $0x0, %al
callq 0x124b0
movq 0xa0bc5(%rip), %rax     # 0xbdff8
movq (%rax), %rdi
leaq 0x877c5(%rip), %rsi     # 0xa4c02
movb $0x0, %al
callq 0x124b0
movq 0xa0bad(%rip), %rax     # 0xbdff8
movq (%rax), %rdi
leaq 0x877ea(%rip), %rsi     # 0xa4c3f
movb $0x0, %al
callq 0x124b0
movl $0x1, %edi
callq 0x12870
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x60, %rsp
leaq 0x877ff(%rip), %rax     # 0xa4c7e
movq %rax, -0x8(%rbp)
movl $0x4000, %edi           # imm = 0x4000
callq 0x20a00
movq %rax, -0x10(%rbp)
cmpl $0x0, 0xa2248(%rip)     # 0xbf6e0
je 0x1d513
callq 0x23370
movq %rax, -0x20(%rbp)
callq 0x23380
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x124f0
cmpq $0x0, %rax
setg %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x18(%rbp)
movl 0xa1cce(%rip), %eax     # 0xbf19c
movl %eax, -0x14(%rbp)
callq 0x121d0
movq -0x20(%rbp), %rcx
movl -0x18(%rbp), %r8d
movl -0x14(%rbp), %r10d
cltq
movl $0x2, %edi
leaq 0x878ba(%rip), %rsi     # 0xa4daa
leaq 0x87bf6(%rip), %rdx     # 0xa50ed
leaq 0x878e7(%rip), %r9      # 0xa4de5
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x18b10
jmp 0x1d5ab
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
callq 0x23370
movq %rax, -0x30(%rbp)
callq 0x23380
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x124f0
cmpq $0x0, %rax
setg %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x28(%rbp)
movl 0xa1c45(%rip), %eax     # 0xbf19c
movl %eax, -0x24(%rbp)
callq 0x121d0
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rdx
movq -0x30(%rbp), %r8
movl -0x28(%rbp), %r9d
movl -0x24(%rbp), %r10d
cltq
movl $0x4000, %esi           # imm = 0x4000
leaq 0x87b6c(%rip), %rcx     # 0xa50ed
leaq 0x8785d(%rip), %r11     # 0xa4de5
movq %r11, (%rsp)
movl %r10d, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movb $0x0, %al
callq 0x122c0
movq -0x10(%rbp), %rsi
movl $0x402, %edi            # imm = 0x402
callq 0x18900
movq -0x10(%rbp), %rdi
callq 0x20ce0
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x18de0
movq %rax, -0x8(%rbp)
movq 0xa2128(%rip), %rdi     # 0xbf7b0
callq 0x3c5f0
cmpl $0x0, %eax
jne 0x1d6c5
callq 0x18de0
subq -0x8(%rbp), %rax
cvtsi2ss %rax, %xmm0
movss 0x85dfc(%rip), %xmm1    # 0xa34a4
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movl $0x2, %edi
leaq 0x8772c(%rip), %rsi     # 0xa4de8
movb $0x1, %al
callq 0x18b10
jmp 0x1d6fd
callq 0x120b0
cmpl $0x2, (%rax)
je 0x1d6fb
callq 0x120b0
movl (%rax), %edi
callq 0x12900
movq %rax, %rdx
movl $0x3, %edi
leaq 0x87720(%rip), %rsi     # 0xa4e0a
movb $0x0, %al
callq 0x18b10
movl $0x1, %edi
callq 0x12870
jmp 0x1d6fd
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpl $0x0, 0xa1aad(%rip)     # 0xbf228
je 0x1d78a
movq 0xa1a24(%rip), %rax     # 0xbf1a8
movq %rax, -0x18(%rbp)
jmp 0x1d797
leaq 0x8676c(%rip), %rax     # 0xa3efd
movq %rax, -0x18(%rbp)
jmp 0x1d797
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl 0xa19f7(%rip), %ecx     # 0xbf19c
leaq 0x876cf(%rip), %rdi     # 0xa4e7b
movb $0x0, %al
callq 0x378f0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x876b5(%rip), %rdi     # 0xa4e84
callq 0x12040
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1d7fb
movl $0x3, %edi
leaq 0x876a5(%rip), %rsi     # 0xa4e90
movb $0x0, %al
callq 0x18b10
movl $0x0, -0x4(%rbp)
jmp 0x1d82b
movl $0x2, %edi
leaq 0x876c2(%rip), %rsi     # 0xa4ec9
movb $0x0, %al
callq 0x18b10
movl $0x13, %edi
callq 0x12050
leaq 0x87665(%rip), %rdi     # 0xa4e84
callq 0x127a0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
cmpl $0x1, -0x8(%rbp)
jne 0x1da8f
leaq 0x8742c(%rip), %rdi     # 0xa4e84
callq 0x12040
movq %rax, -0x10(%rbp)
leaq 0x87496(%rip), %rdi     # 0xa4efe
callq 0x12040
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x1da7f
callq 0x1d7c0
jmp 0x1da8d
cmpq $0x0, -0x18(%rbp)
je 0x1da8b
callq 0x1d840
jmp 0x1da8d
jmp 0x1dab3
cmpl $0x3, -0x8(%rbp)
jne 0x1da9f
callq 0x1d7c0
movl %eax, -0x4(%rbp)
jmp 0x1daba
cmpl $0x2, -0x8(%rbp)
jne 0x1daaf
callq 0x1d840
movl %eax, -0x4(%rbp)
jmp 0x1daba
jmp 0x1dab1
jmp 0x1dab3
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/zmalloc.c
// Function: zmalloc_used_memory
size_t zmalloc_used_memory(void) {
    size_t um;

    if (zmalloc_thread_safe) {
        atomicGet(used_memory,um,&used_memory_mutex);
    } else {
        um = used_memory;
    }
    return um;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x0, 0xb27a5(%rip)     # 0xd3590
je 0x20e04
jmp 0x20def
movq 0xb27a2(%rip), %rax     # 0xd3598
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x20e0f
movq 0xb278d(%rip), %rax     # 0xd3598
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)