LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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 0x557c8(%rip), %r15d    # 0x6f620
jl 0x19fa2
movq %rsi, %rbx
movq 0x55810(%rip), %rdi     # 0x6f678
movb (%rdi), %r12b
testb %r12b, %r12b
je 0x19e81
leaq 0x3a984(%rip), %rsi     # 0x547fb
callq 0x12500
movq %rax, %r14
jmp 0x19e8b
movq 0x540f8(%rip), %rax     # 0x6df80
movq (%rax), %r14
testq %r14, %r14
je 0x19fa2
btl $0xa, %ebp
jb 0x19f5b
callq 0x121f0
movl %eax, 0xc(%rsp)
leaq 0x10(%rsp), %rbp
movq %rbp, %rdi
xorl %esi, %esi
callq 0x12340
movq %rbp, %rdi
callq 0x120b0
leaq 0x38663(%rip), %rdx     # 0x52528
leaq 0x20(%rsp), %rdi
movl $0x40, %r13d
movl $0x40, %esi
movq %rax, %rcx
callq 0x12700
cltq
leaq (%rsp,%rax), %rdi
addq $0x20, %rdi
subq %rax, %r13
movslq 0x8(%rbp), %rax
imulq $0x10624dd3, %rax, %rcx # imm = 0x10624DD3
movq %rcx, %rax
shrq $0x3f, %rax
sarq $0x26, %rcx
addl %eax, %ecx
leaq 0x3ebe9(%rip), %rdx     # 0x58af2
movq %r13, %rsi
xorl %eax, %eax
callq 0x122d0
movl 0xc(%rsp), %eax
cmpl 0x5516b(%rip), %eax     # 0x6f088
movl $0x50, %eax
movl $0x43, %ebp
cmovel %eax, %ebp
callq 0x121f0
leaq 0x385ed(%rip), %rcx     # 0x52523
movsbl (%r15,%rcx), %r9d
movq %rbx, (%rsp)
leaq 0x385f2(%rip), %rsi     # 0x52538
movq %r14, %rdi
movl %eax, %edx
movl %ebp, %ecx
leaq 0x20(%rsp), %r8
xorl %eax, %eax
callq 0x124d0
jmp 0x19f66
movq %rbx, %rdi
movq %r14, %rsi
callq 0x12360
movq %r14, %rdi
callq 0x125e0
testb %r12b, %r12b
je 0x19f7b
movq %r14, %rdi
callq 0x12220
cmpl $0x0, 0x556fe(%rip)     # 0x6f680
je 0x19fa2
movl %r15d, %eax
leaq 0x384b2(%rip), %rcx     # 0x52440
movl (%rcx,%rax,4), %edi
leaq 0x3b734(%rip), %rsi     # 0x556cc
movq %rbx, %rdx
xorl %eax, %eax
callq 0x12600
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/server.c
// Function: serverLog
void serverLog(int level, const char *fmt, ...) {
    va_list ap;
    char msg[LOG_MAX_LEN];

    if ((level&0xff) < server.verbosity) return;

    va_start(ap, fmt);
    vsnprintf(msg, sizeof(msg), fmt, ap);
    va_end(ap);

    serverLogRaw(level,msg);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x4d8, %rsp            # imm = 0x4D8
movl %edi, %ebx
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x1a00c
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movzbl %bl, %eax
cmpl 0x5560b(%rip), %eax     # 0x6f620
jl 0x1a061
movq %rsi, %r10
leaq 0x20(%rsp), %rax
movq %rsp, %rcx
movq %rax, 0x10(%rcx)
leaq 0x4f0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rcx)
leaq 0xd0(%rsp), %r14
movl $0x400, %esi            # imm = 0x400
movq %r14, %rdi
movq %r10, %rdx
callq 0x121a0
movl %ebx, %edi
movq %r14, %rsi
callq 0x19e3d
addq $0x4d8, %rsp            # imm = 0x4D8
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/server.c
// Function: serverLogFromHandler
void serverLogFromHandler(int level, const char *msg) {
    int fd;
    int log_to_stdout = server.logfile[0] == '\0';
    char buf[64];

    if ((level&0xff) < server.verbosity || (log_to_stdout && server.daemonize))
        return;
    fd = log_to_stdout ? STDOUT_FILENO :
                         open(server.logfile, O_APPEND|O_CREAT|O_WRONLY, 0644);
    if (fd == -1) return;
    ll2string(buf,sizeof(buf),getpid());
    if (write(fd,buf,strlen(buf)) == -1) goto err;
    if (write(fd,":signal-handler (",17) == -1) goto err;
    ll2string(buf,sizeof(buf),time(NULL));
    if (write(fd,buf,strlen(buf)) == -1) goto err;
    if (write(fd,") ",2) == -1) goto err;
    if (write(fd,msg,strlen(msg)) == -1) goto err;
    if (write(fd,"\n",1) == -1) goto err;
err:
    if (!log_to_stdout) close(fd);
}

// Assembly:
movzbl %dil, %eax
cmpl 0x555aa(%rip), %eax     # 0x6f620
jl 0x1a1af
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq 0x555e8(%rip), %rdi     # 0x6f678
movb (%rdi), %r15b
testb %r15b, %r15b
jne 0x1a0a5
cmpl $0x0, 0x555a1(%rip)     # 0x6f640
jne 0x1a1a5
testb %r15b, %r15b
je 0x1a0bf
movl $0x441, %esi            # imm = 0x441
movl $0x1a4, %edx            # imm = 0x1A4
xorl %eax, %eax
callq 0x126f0
movl %eax, %ebp
jmp 0x1a0c4
movl $0x1, %ebp
cmpl $-0x1, %ebp
je 0x1a1a5
callq 0x121f0
movslq %eax, %rdx
movq %rsp, %r14
movl $0x40, %esi
movq %r14, %rdi
callq 0x2535e
movq %r14, %rdi
callq 0x12250
movl %ebp, %edi
movq %r14, %rsi
movq %rax, %rdx
callq 0x121e0
cmpq $-0x1, %rax
je 0x1a199
leaq 0x3843d(%rip), %rsi     # 0x52548
movl $0x11, %edx
movl %ebp, %edi
callq 0x121e0
cmpq $-0x1, %rax
je 0x1a199
xorl %edi, %edi
callq 0x12550
movq %rsp, %r14
movl $0x40, %esi
movq %r14, %rdi
movq %rax, %rdx
callq 0x2535e
movq %r14, %rdi
callq 0x12250
movl %ebp, %edi
movq %r14, %rsi
movq %rax, %rdx
callq 0x121e0
cmpq $-0x1, %rax
je 0x1a199
leaq 0x38401(%rip), %rsi     # 0x5255a
movl $0x2, %edx
movl %ebp, %edi
callq 0x121e0
cmpq $-0x1, %rax
je 0x1a199
movq %rbx, %rdi
callq 0x12250
movl %ebp, %edi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x121e0
cmpq $-0x1, %rax
je 0x1a199
leaq 0x39bfb(%rip), %rsi     # 0x53d88
movl $0x1, %edx
movl %ebp, %edi
callq 0x121e0
testb %r15b, %r15b
je 0x1a1a5
movl %ebp, %edi
callq 0x123b0
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/server.c
// Function: ustime
long long ustime(void) {
    struct timeval tv;
    long long ust;

    gettimeofday(&tv, NULL);
    ust = ((long long)tv.tv_sec)*1000000;
    ust += tv.tv_usec;
    return ust;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rsp, %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x12340
imulq $0xf4240, (%rbx), %rax  # imm = 0xF4240
addq 0x8(%rbx), %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/server.c
// Function: dictEncObjKeyCompare
int dictEncObjKeyCompare(void *privdata, const void *key1,
        const void *key2)
{
    robj *o1 = (robj*) key1, *o2 = (robj*) key2;
    int cmp;

    if (o1->encoding == OBJ_ENCODING_INT &&
        o2->encoding == OBJ_ENCODING_INT)
            return o1->ptr == o2->ptr;

    o1 = getDecodedObject(o1);
    o2 = getDecodedObject(o2);
    cmp = dictSdsKeyCompare(privdata,o1->ptr,o2->ptr);
    decrRefCount(o1);
    decrRefCount(o2);
    return cmp;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl $0xf0, %eax
movl (%rsi), %ecx
andl %eax, %ecx
cmpl $0x10, %ecx
jne 0x1a447
andl (%rbx), %eax
cmpl $0x10, %eax
jne 0x1a447
movq 0x8(%rsi), %rcx
xorl %eax, %eax
cmpq 0x8(%rbx), %rcx
sete %al
jmp 0x1a47e
movq %rsi, %rdi
callq 0x26071
movq %rax, %r14
movq %rbx, %rdi
callq 0x26071
movq %rax, %rbx
movq 0x8(%r14), %rsi
movq 0x8(%rax), %rdx
callq 0x1a24c
movl %eax, %ebp
movq %r14, %rdi
callq 0x25d25
movq %rbx, %rdi
callq 0x25d25
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/server.c
// Function: dictEncObjHash
unsigned int dictEncObjHash(const void *key) {
    robj *o = (robj*) key;

    if (sdsEncodedObject(o)) {
        return dictGenHashFunction(o->ptr, sdslen((sds)o->ptr));
    } else {
        if (o->encoding == OBJ_ENCODING_INT) {
            char buf[32];
            int len;

            len = ll2string(buf,32,(long)o->ptr);
            return dictGenHashFunction((unsigned char*)buf, len);
        } else {
            unsigned int hash;

            o = getDecodedObject(o);
            hash = dictGenHashFunction(o->ptr, sdslen((sds)o->ptr));
            decrRefCount(o);
            return hash;
        }
    }
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x28, %rsp
movl (%rdi), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x2, %eax
je 0x1a49f
cmpl $0x1, %eax
je 0x1a4c6
testl %eax, %eax
jne 0x1a4e6
movq 0x8(%rdi), %rdi
movzbl -0x1(%rdi), %esi
movl %esi, %eax
andl $0x7, %eax
cmpl $0x4, %eax
ja 0x1a52c
leaq 0x37ee0(%rip), %rcx     # 0x52398
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
shrl $0x3, %esi
jmp 0x1a52e
movq 0x8(%rdi), %rdx
movq %rsp, %rbx
movl $0x20, %esi
movq %rbx, %rdi
callq 0x2535e
movq %rbx, %rdi
movl %eax, %esi
callq 0x187b6
jmp 0x1a563
callq 0x26071
movq %rax, %rbx
movq 0x8(%rax), %rdi
movzbl -0x1(%rdi), %esi
movl %esi, %eax
andl $0x7, %eax
cmpl $0x4, %eax
ja 0x1a550
leaq 0x37ea5(%rip), %rcx     # 0x523ac
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
shrl $0x3, %esi
jmp 0x1a552
movq -0x11(%rdi), %rsi
jmp 0x1a52e
movzwl -0x5(%rdi), %esi
jmp 0x1a52e
movl -0x9(%rdi), %esi
jmp 0x1a52e
movzbl -0x3(%rdi), %esi
jmp 0x1a52e
xorl %esi, %esi
addq $0x28, %rsp
popq %rbx
popq %rbp
jmp 0x187b6
movq -0x11(%rdi), %rsi
jmp 0x1a552
movzwl -0x5(%rdi), %esi
jmp 0x1a552
movl -0x9(%rdi), %esi
jmp 0x1a552
movzbl -0x3(%rdi), %esi
jmp 0x1a552
xorl %esi, %esi
callq 0x187b6
movl %eax, %ebp
movq %rbx, %rdi
callq 0x25d25
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/server.c
// Function: htNeedsResize
int htNeedsResize(dict *dict) {
    long long size, used;

    size = dictSlots(dict);
    used = dictSize(dict);
    return (size && used && size > DICT_HT_INITIAL_SIZE &&
            (used*100/size < HASHTABLE_MIN_FILL));
}

// Assembly:
movq 0x38(%rdi), %rcx
movq 0x48(%rdi), %rdx
addq 0x18(%rdi), %rcx
addq 0x28(%rdi), %rdx
setne %al
cmpq $0x5, %rcx
setge %sil
andb %al, %sil
xorl %eax, %eax
cmpb $0x1, %sil
jne 0x1a5ce
imulq $0x64, %rdx, %rax
cqto
idivq %rcx
movq %rax, %rcx
xorl %eax, %eax
cmpq $0xa, %rcx
setl %al
retq
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/server.c
// Function: trackInstantaneousMetric
void trackInstantaneousMetric(int metric, long long current_reading) {
    long long t = mstime() - server.inst_metric[metric].last_sample_time;
    long long ops = current_reading -
                    server.inst_metric[metric].last_sample_count;
    long long ops_sec;

    ops_sec = t > 0 ? (ops*1000/t) : 0;

    server.inst_metric[metric].samples[server.inst_metric[metric].idx] =
        ops_sec;
    server.inst_metric[metric].idx++;
    server.inst_metric[metric].idx %= STAT_METRIC_SAMPLES;
    server.inst_metric[metric].last_sample_time = mstime();
    server.inst_metric[metric].last_sample_count = current_reading;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movl %edi, %ebp
xorl %r14d, %r14d
movq %rsp, %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x12340
imulq $0xf4240, (%r15), %rax  # imm = 0xF4240
addq 0x8(%r15), %rax
movabsq $0x20c49ba5e353f7cf, %r15 # imm = 0x20C49BA5E353F7CF
imulq %r15
movq %rdx, %rcx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rcx
addq %rax, %rcx
movslq %ebp, %rax
imulq $0x98, %rax, %rax
leaq 0x549d9(%rip), %rdx     # 0x6f088
leaq (%rax,%rdx), %r12
addq $0x3d0, %r12            # imm = 0x3D0
subq (%r12), %rcx
jle 0x1a6d7
movq %rbx, %rax
subq 0x8(%r12), %rax
imulq $0x3e8, %rax, %rax      # imm = 0x3E8
cqto
idivq %rcx
movq %rax, %r14
movslq 0x90(%r12), %rax
movq %r14, 0x10(%r12,%rax,8)
leal 0x1(%rax), %ecx
leal 0x10(%rax), %edx
testl %ecx, %ecx
cmovnsl %ecx, %edx
andl $-0x10, %edx
negl %edx
addl %edx, %eax
incl %eax
movl %eax, 0x90(%r12)
movq %rsp, %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x12340
imulq $0xf4240, (%r14), %rax  # imm = 0xF4240
addq 0x8(%r14), %rax
imulq %r15
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rdx
addq %rax, %rdx
movq %rdx, (%r12)
movq %rbx, 0x8(%r12)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x54938(%rip), %rcx     # 0x6f088
addq %rcx, %rax
addq $0x3e0, %rax            # imm = 0x3E0
xorl %edx, %edx
xorl %ecx, %ecx
addq (%rax,%rdx,8), %rcx
incq %rdx
cmpq $0x10, %rdx
jne 0x1a75d
leaq 0xf(%rcx), %rax
testq %rcx, %rcx
cmovnsq %rcx, %rax
sarq $0x4, %rax
retq
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/server.c
// Function: clientsCronHandleTimeout
int clientsCronHandleTimeout(client *c) {
    time_t now = server.unixtime;

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

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

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movslq 0x54e97(%rip), %rax     # 0x6f624
testq %rax, %rax
je 0x1a7d1
testl $0x40014, 0x88(%rbx)    # imm = 0x40014
jne 0x1a7d1
movq 0x54f2b(%rip), %rcx     # 0x6f6d0
subq 0x78(%rbx), %rcx
cmpq %rax, %rcx
jle 0x1a7d1
leaq 0x37da8(%rip), %rsi     # 0x5255d
movl $0x1, %r14d
movl $0x1, %edi
xorl %eax, %eax
callq 0x19fb1
movq %rbx, %rdi
callq 0x22f00
jmp 0x1a834
xorl %r14d, %r14d
testb $0x10, 0x88(%rbx)
je 0x1a834
xorl %r14d, %r14d
movq %rsp, %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x12340
imulq $0xf4240, (%r15), %rax  # imm = 0xF4240
addq 0x8(%r15), %rax
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
imulq %rcx
movq 0x98(%rbx), %rax
testq %rax, %rax
je 0x1a834
movq %rdx, %rcx
shrq $0x3f, %rcx
sarq $0x7, %rdx
addq %rcx, %rdx
cmpq %rdx, %rax
jge 0x1a834
movq %rbx, %rdi
callq 0x302fb
movq %rbx, %rdi
callq 0x302b4
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/server.c
// Function: clientsCronResizeQueryBuffer
int clientsCronResizeQueryBuffer(client *c) {
    size_t querybuf_size = sdsAllocSize(c->querybuf);
    time_t idletime = server.unixtime - c->lastinteraction;

    /* There are two conditions to resize the query buffer:
     * 1) Query buffer is > BIG_ARG and too big for latest peak.
     * 2) Client is inactive and the buffer is bigger than 1k. */
    if (((querybuf_size > PROTO_MBULK_BIG_ARG) &&
         (querybuf_size/(c->querybuf_peak+1)) > 2) ||
         (querybuf_size > 1024 && idletime > 2))
    {
        /* Only resize the query buffer if it is actually wasting space. */
        if (sdsavail(c->querybuf) > 1024) {
            c->querybuf = sdsRemoveFreeSpace(c->querybuf);
        }
    }
    /* Reset the peak again to capture the peak memory usage in the next
     * cycle. */
    c->querybuf_peak = 0;
    return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0x1e34b
movq %rax, %rcx
movq 0x54e78(%rip), %rsi     # 0x6f6d0
subq 0x78(%rbx), %rsi
cmpq $0x8001, %rax           # imm = 0x8001
jb 0x1a879
movq 0x20(%rbx), %rdi
incq %rdi
movq %rcx, %rax
xorl %edx, %edx
divq %rdi
cmpq $0x2, %rax
ja 0x1a888
cmpq $0x401, %rcx            # imm = 0x401
jb 0x1a8e6
cmpq $0x3, %rsi
jl 0x1a8e6
movq 0x18(%rbx), %rdi
movzbl -0x1(%rdi), %eax
andl $0x7, %eax
decl %eax
cmpl $0x3, %eax
ja 0x1a8d3
leaq 0x37b1f(%rip), %rcx     # 0x523c0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movzbl -0x2(%rdi), %eax
movzbl -0x3(%rdi), %ecx
jmp 0x1a8ce
movl -0x5(%rdi), %eax
subl -0x9(%rdi), %eax
jmp 0x1a8d5
movq -0x9(%rdi), %rax
subq -0x11(%rdi), %rax
jmp 0x1a8d5
movzwl -0x3(%rdi), %eax
movzwl -0x5(%rdi), %ecx
subq %rcx, %rax
jmp 0x1a8d5
xorl %eax, %eax
cmpq $0x401, %rax            # imm = 0x401
jb 0x1a8e6
callq 0x1e1b3
movq %rax, 0x18(%rbx)
movq $0x0, 0x20(%rbx)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5496c(%rip), %rdi     # 0x6f268
cmpq $0x0, 0x28(%rdi)
je 0x1a969
movq 0x5495e(%rip), %rax     # 0x6f268
movl 0x28(%rax), %ecx
movl 0x54795(%rip), %eax     # 0x6f0a8
addl %eax, %eax
leal (%rax,%rax,4), %esi
movl %ecx, %eax
cltd
idivl %esi
cmpl $0x32, %ecx
movl $0x32, %ebp
cmovll %ecx, %ebp
cmpl $0x32, %eax
cmovgel %eax, %ebp
incl %ebp
decl %ebp
je 0x1a969
callq 0x16e37
movq 0x54928(%rip), %rax     # 0x6f268
movq (%rax), %rax
movq 0x10(%rax), %rbx
movq %rbx, %rdi
callq 0x1a77a
testl %eax, %eax
jne 0x1a95b
movq %rbx, %rdi
callq 0x1a841
movq 0x54906(%rip), %rdi     # 0x6f268
cmpq $0x0, 0x28(%rdi)
jne 0x1a930
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/server.c
// Function: populateCommandTable
void populateCommandTable(void) {
    int j;
    int numcommands = sizeof(serverCommandTable)/sizeof(struct serverCommand);

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

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

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %r15d, %r15d
leaq 0x52fa5(%rip), %r12     # 0x6e520
leaq 0x36e4e(%rip), %r13     # 0x523d0
movq %r15, %rax
shlq $0x6, %rax
leaq (%r12,%rax), %rbx
movq 0x18(%rax,%r12), %rax
movzbl (%rax), %ecx
cmpl $0x60, %ecx
jle 0x1b5b3
leal -0x6c(%rcx), %edx
cmpl $0xb, %edx
ja 0x1b5cb
movslq (%r13,%rdx,4), %rcx
addq %r13, %rcx
jmpq *%rcx
movl $0x200, %ecx            # imm = 0x200
jmp 0x1b5f5
cmpl $0x46, %ecx
je 0x1b5c4
cmpl $0x4d, %ecx
jne 0x1b5fd
movl $0x800, %ecx            # imm = 0x800
jmp 0x1b5f5
movl $0x2000, %ecx           # imm = 0x2000
jmp 0x1b5f5
cmpl $0x61, %ecx
jne 0x1b65d
movl $0x10, %ecx
jmp 0x1b5f5
movl $0x20, %ecx
jmp 0x1b5f5
movl $0x1, %ecx
jmp 0x1b5f5
movl $0x4, %ecx
jmp 0x1b5f5
movl $0x2, %ecx
orl %ecx, 0x20(%rbx)
incq %rax
jmp 0x1b592
testl %ecx, %ecx
jne 0x1b65d
movq 0x53aa8(%rip), %r14     # 0x6f0b0
movq (%rbx), %rdi
callq 0x1de62
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x18b97
movl %eax, %ebp
movq 0x53a91(%rip), %r14     # 0x6f0b8
movq (%rbx), %rdi
callq 0x1de62
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x18b97
orl %ebp, %eax
jne 0x1b67f
incq %r15
cmpq $0x1f, %r15
jne 0x1b582
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x379d6(%rip), %rdi     # 0x5303a
leaq 0x378e2(%rip), %rsi     # 0x52f4d
movl $0x527, %edx            # imm = 0x527
callq 0x2ade4
movl $0x1, %edi
callq 0x12120
leaq 0x379cf(%rip), %rdi     # 0x53055
leaq 0x378c0(%rip), %rsi     # 0x52f4d
movl $0x530, %edx            # imm = 0x530
callq 0x2a9ff
jmp 0x1b675
// File: /workspace/github_c_makefile_star2_O1/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 0x1de62
movq %rax, %rbx
movq 0x53a04(%rip), %rdi     # 0x6f0b0
movq %rax, %rsi
callq 0x191a0
movq %rax, %r14
movq %rbx, %rdi
callq 0x1ded3
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/server.c
// Function: restartServer
int restartServer(int flags, mstime_t delay) {
    int j;

    /* Check if we still have accesses to the executable that started this
     * server instance. */
    if (access(server.executable,X_OK) == -1) return C_ERR;

    /* Config rewriting. */
    if (flags & RESTART_SERVER_CONFIG_REWRITE &&
        server.configfile &&
        rewriteConfig(server.configfile) == -1) return C_ERR;

    /* Perform a proper shutdown. */
    if (flags & RESTART_SERVER_GRACEFULLY &&
        prepareForShutdown(SHUTDOWN_NOFLAGS) != C_OK) return C_ERR;

    /* Close all file descriptors, with the exception of stdin, stdout, strerr
     * which are useful if we restart a Discnt server which is not daemonized. */
    for (j = 3; j < (int)server.maxclients + 1024; j++) close(j);

    /* Execute the server with the original command line. */
    if (delay) usleep(delay*1000);
    execve(server.executable,server.exec_argv,environ);

    /* If an error occurred here, there is nothing we can do, but exit. */
    _exit(1);

    return C_ERR; /* Never reached. */
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movl %edi, %ebp
movq 0x539be(%rip), %rdi     # 0x6f098
movl $0x1, %esi
callq 0x12770
cmpl $-0x1, %eax
je 0x1b71c
movl %ebp, %eax
shrb %al
movq 0x5399c(%rip), %rdi     # 0x6f090
testq %rdi, %rdi
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x1b70b
callq 0x29a0e
cmpl $-0x1, %eax
je 0x1b71c
testb $0x1, %bpl
je 0x1b726
xorl %edi, %edi
callq 0x1c570
testl %eax, %eax
je 0x1b726
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %rbp
retq
cmpl $0xfffffc04, 0x53f64(%rip) # imm = 0xFFFFFC04
jl 0x1b753
movl $0x2, %ebp
movl $0x3ff, %r14d           # imm = 0x3FF
incl %ebp
movl %ebp, %edi
callq 0x123b0
movl 0x53f48(%rip), %eax     # 0x6f694
addl %r14d, %eax
cmpl %eax, %ebp
jl 0x1b73d
testq %rbx, %rbx
je 0x1b763
imull $0x3e8, %ebx, %edi      # imm = 0x3E8
callq 0x129c0
movq 0x5392e(%rip), %rdi     # 0x6f098
movq 0x5392f(%rip), %rsi     # 0x6f0a0
movq 0x52830(%rip), %rax     # 0x6dfa8
movq (%rax), %rdx
callq 0x12490
movl $0x1, %edi
callq 0x12120
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/server.c
// Function: checkTcpBacklogSettings
void checkTcpBacklogSettings(void) {
#ifdef HAVE_PROC_SOMAXCONN
    FILE *fp = fopen("/proc/sys/net/core/somaxconn","r");
    char buf[1024];
    if (!fp) return;
    if (fgets(buf,sizeof(buf),fp) != NULL) {
        int somaxconn = atoi(buf);
        if (somaxconn > 0 && somaxconn < server.tcp_backlog) {
            serverLog(LL_WARNING,"WARNING: The TCP backlog setting of %d cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of %d.", server.tcp_backlog, somaxconn);
        }
    }
    fclose(fp);
#endif
}

// Assembly:
pushq %rbx
subq $0x400, %rsp            # imm = 0x400
leaq 0x3750c(%rip), %rdi     # 0x52e11
leaq 0x38ee9(%rip), %rsi     # 0x547f5
callq 0x12500
testq %rax, %rax
je 0x1b961
movq %rax, %rbx
movq %rsp, %rdi
movl $0x400, %esi            # imm = 0x400
movq %rax, %rdx
callq 0x12470
testq %rax, %rax
je 0x1b959
movq %rsp, %rdi
callq 0x12830
testl %eax, %eax
jle 0x1b959
movl 0x53800(%rip), %edx     # 0x6f140
cmpl %edx, %eax
jge 0x1b959
leaq 0x374e3(%rip), %rsi     # 0x52e2e
movl $0x3, %edi
movl %eax, %ecx
xorl %eax, %eax
callq 0x19fb1
movq %rbx, %rdi
callq 0x12220
addq $0x400, %rsp            # imm = 0x400
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/server.c
// Function: resetServerStats
void resetServerStats(void) {
    int j;

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

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
xorps %xmm0, %xmm0
movups %xmm0, 0x5391e(%rip)    # 0x6f400
movups %xmm0, 0x5392f(%rip)    # 0x6f418
movq $0x0, 0x53934(%rip) # 0x6f428
xorl %r15d, %r15d
leaq 0x5358a(%rip), %r12     # 0x6f088
movq %rsp, %rbx
movabsq $0x20c49ba5e353f7cf, %r13 # imm = 0x20C49BA5E353F7CF
leaq (%r15,%r12), %r14
addq $0x3d8, %r14            # imm = 0x3D8
movl $0x0, 0x88(%r14)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x12340
imulq $0xf4240, (%rsp), %rax  # imm = 0xF4240
addq 0x8(%rsp), %rax
imulq %r13
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rdx
addq %rax, %rdx
movq %rdx, -0x8(%r14)
movl $0x88, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x12380
addq $0x98, %r15
cmpq $0x1c8, %r15            # imm = 0x1C8
jne 0x1bb0b
xorps %xmm0, %xmm0
movups %xmm0, 0x538d2(%rip)    # 0x6f448
movups %xmm0, 0x538bb(%rip)    # 0x6f438
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/server.c
// Function: setupSignalHandlers
void setupSignalHandlers(void) {
    struct sigaction act;

    /* When the SA_SIGINFO flag is set in sa_flags then sa_sigaction is used.
     * Otherwise, sa_handler is used. */
    sigemptyset(&act.sa_mask);
    act.sa_flags = 0;
    act.sa_handler = sigShutdownHandler;
    sigaction(SIGTERM, &act, NULL);
    sigaction(SIGINT, &act, NULL);

#ifdef HAVE_BACKTRACE
    sigemptyset(&act.sa_mask);
    act.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
    act.sa_sigaction = sigsegvHandler;
    sigaction(SIGSEGV, &act, NULL);
    sigaction(SIGBUS, &act, NULL);
    sigaction(SIGFPE, &act, NULL);
    sigaction(SIGILL, &act, NULL);
#endif
    return;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x98, %rsp
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x124f0
movl $0x0, 0x80(%r14)
leaq 0x1600(%rip), %rax      # 0x1d4f3
movq %rax, -0x8(%r14)
movq %rsp, %rbx
movl $0xf, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x12170
movl $0x2, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x12170
movq %r14, %rdi
callq 0x124f0
movl $0xc0000004, 0x88(%rbx) # imm = 0xC0000004
leaq 0xf50b(%rip), %rax      # 0x2b43c
movq %rax, (%rbx)
movl $0xb, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x12170
movl $0x7, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x12170
movl $0x8, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x12170
movl $0x4, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x12170
addq $0x98, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/server.c
// Function: call
void call(client *c, int flags) {
    long long start, duration;

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

    c->flags &= ~(CLIENT_PREVENT_PROP);

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

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

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movq 0x530e6(%rip), %rsi     # 0x6f280
cmpq $0x0, 0x28(%rsi)
je 0x1c1c3
cmpl $0x0, 0x53200(%rip)     # 0x6f3a8
jne 0x1c1c3
movq 0x38(%rbx), %rax
testb $0x8, 0x21(%rax)
jne 0x1c1c3
movq 0x30(%rbx), %rdx
movl 0x28(%rbx), %ecx
movq %rbx, %rdi
callq 0x1bfd4
andb $-0x9, 0x8a(%rbx)
movq %rsp, %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x12340
movq (%r14), %r15
movq 0x8(%r14), %r12
movq 0x38(%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
movq %rsp, %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x12340
movq (%r14), %rax
subq %r15, %rax
movq 0x8(%r14), %rcx
subq %r12, %rcx
imulq $0xf4240, %rax, %r14    # imm = 0xF4240
addq %rcx, %r14
testb $0x1, %bpl
je 0x1c263
movq 0x38(%rbx), %rax
testb $0x20, 0x21(%rax)
leaq 0x36ec9(%rip), %rax     # 0x530ea
leaq 0x36e78(%rip), %rdi     # 0x530a0
cmoveq %rax, %rdi
movq 0x534c5(%rip), %rcx     # 0x6f6f8
testq %rcx, %rcx
je 0x1c263
movabsq $0x20c49ba5e353f7cf, %rdx # imm = 0x20C49BA5E353F7CF
movq %r14, %rax
imulq %rdx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rdx
addq %rax, %rdx
cmpq %rcx, %rdx
jl 0x1c263
movq %rdx, %rsi
callq 0x30346
testb $0x2, %bpl
je 0x1c275
movq 0x38(%rbx), %rax
addq %r14, 0x30(%rax)
incq 0x38(%rax)
incq 0x53184(%rip)           # 0x6f400
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/server.c
// Function: closeListeningSockets
void closeListeningSockets(int unlink_unix_socket) {
    int j;

    for (j = 0; j < server.ipfd_count; j++) close(server.ipfd[j]);
    if (server.sofd != -1) close(server.sofd);
    for (j = 0; j < server.cfd_count; j++) close(server.cfd[j]);
    if (unlink_unix_socket && server.unixsocket) {
        serverLog(LL_NOTICE,"Removing the unix socket file.");
        unlink(server.unixsocket); /* don't care if this fails */
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edi, %ebx
cmpl $0x0, 0x52d44(%rip)     # 0x6f21c
leaq 0x52ba9(%rip), %r14     # 0x6f088
jle 0x1c500
xorl %r15d, %r15d
movl 0x154(%r14,%r15,4), %edi
callq 0x123b0
incq %r15
movslq 0x52d21(%rip), %rax     # 0x6f21c
cmpq %rax, %r15
jl 0x1c4e4
movl 0x52d1a(%rip), %edi     # 0x6f220
cmpl $-0x1, %edi
je 0x1c510
callq 0x123b0
cmpl $0x0, 0x52d4d(%rip)     # 0x6f264
jle 0x1c538
xorl %r15d, %r15d
movl 0x19c(%r14,%r15,4), %edi
callq 0x123b0
incq %r15
movslq 0x52d31(%rip), %rax     # 0x6f264
cmpq %rax, %r15
jl 0x1c51c
testl %ebx, %ebx
je 0x1c56a
cmpq $0x0, 0x52c8c(%rip)     # 0x6f1d0
je 0x1c56a
leaq 0x36bee(%rip), %rsi     # 0x5313b
movl $0x2, %edi
xorl %eax, %eax
callq 0x19fb1
movq 0x52c70(%rip), %rdi     # 0x6f1d0
popq %rbx
popq %r14
popq %r15
jmp 0x120f0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x36be0(%rip), %rsi     # 0x5315a
movl $0x3, %edi
xorl %eax, %eax
callq 0x19fb1
cmpl $-0x1, 0x531ab(%rip)    # 0x6f738
je 0x1c5bd
leaq 0x36bdf(%rip), %rsi     # 0x53175
movl $0x3, %edi
xorl %eax, %eax
callq 0x19fb1
movl 0x53190(%rip), %edi     # 0x6f738
movl $0xa, %esi
callq 0x12540
movl 0x53180(%rip), %edi     # 0x6f738
callq 0x33394
cmpl $0x0, 0x53184(%rip)     # 0x6f748
setg %al
testb $0x2, %bl
sete %cl
testb $0x1, %bl
jne 0x1c5d6
andb %al, %cl
je 0x1c607
leaq 0x36bc5(%rip), %rsi     # 0x531a2
movl $0x2, %edi
xorl %eax, %eax
callq 0x19fb1
movq 0x53160(%rip), %rdi     # 0x6f750
callq 0x3300c
testl %eax, %eax
je 0x1c607
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
leaq 0x36bcb(%rip), %rsi     # 0x531d0
jmp 0x1c642
cmpl $0x0, 0x53032(%rip)     # 0x6f640
je 0x1c62f
leaq 0x36be2(%rip), %rsi     # 0x531f9
movl $0x2, %edi
xorl %eax, %eax
callq 0x19fb1
movq 0x52aae(%rip), %rdi     # 0x6f0d8
callq 0x120f0
movl $0x1, %edi
callq 0x1c4ca
xorl %ebx, %ebx
leaq 0x36bce(%rip), %rsi     # 0x53210
movl $0x3, %edi
xorl %eax, %eax
callq 0x19fb1
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/server.c
// Function: time_independent_strcmp
int time_independent_strcmp(char *a, char *b) {
    char bufa[CONFIG_AUTHPASS_MAX_LEN], bufb[CONFIG_AUTHPASS_MAX_LEN];
    /* The above two strlen perform len(a) + len(b) operations where either
     * a or b are fixed (our password) length, and the difference is only
     * relative to the length of the user provided string, so no information
     * leak is possible in the following two lines of code. */
    unsigned int alen = strlen(a);
    unsigned int blen = strlen(b);
    unsigned int j;
    int diff = 0;

    /* We can't compare strings longer than our static buffers.
     * Note that this will never pass the first test in practical circumstances
     * so there is no info leak. */
    if (alen > sizeof(bufa) || blen > sizeof(bufb)) return 1;

    memset(bufa,0,sizeof(bufa));        /* Constant time. */
    memset(bufb,0,sizeof(bufb));        /* Constant time. */
    /* Again the time of the following two copies is proportional to
     * len(a) + len(b) so no info is leaked. */
    memcpy(bufa,a,alen);
    memcpy(bufb,b,blen);

    /* Always compare all the chars in the two buffers without
     * conditional expressions. */
    for (j = 0; j < sizeof(bufa); j++) {
        diff |= (bufa[j] ^ bufb[j]);
    }
    /* Length must be equal as well. */
    diff |= alen ^ blen;
    return diff; /* If zero strings are the same. */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x418, %rsp            # imm = 0x418
movq %rsi, %r15
movq %rdi, %r12
callq 0x12250
movq %rax, %rbx
movq %r15, %rdi
callq 0x12250
movq %rax, %r14
movl %ebx, %r13d
movl $0x201, %eax            # imm = 0x201
cmpq %rax, %r13
setae %cl
movl %r14d, %ebp
cmpq %rax, %rbp
setae %al
orb %cl, %al
movl $0x1, %eax
jne 0x1c711
movq %rbx, 0x8(%rsp)
leaq 0x210(%rsp), %rdi
xorl %ebx, %ebx
movl $0x200, %edx            # imm = 0x200
xorl %esi, %esi
callq 0x12380
leaq 0x10(%rsp), %rdi
movl $0x200, %edx            # imm = 0x200
xorl %esi, %esi
callq 0x12380
leaq 0x210(%rsp), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x12520
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x12520
xorl %eax, %eax
movb 0x10(%rsp,%rbx), %cl
xorb 0x210(%rsp,%rbx), %cl
movsbl %cl, %ecx
orl %ecx, %eax
incq %rbx
cmpq $0x200, %rbx            # imm = 0x200
jne 0x1c6ed
xorl 0x8(%rsp), %r14d
orl %r14d, %eax
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/server.c
// Function: bytesToHuman
void bytesToHuman(char *s, unsigned long long n) {
    double d;

    if (n < 1024) {
        /* Bytes */
        sprintf(s,"%lluB",n);
        return;
    } else if (n < (1024*1024)) {
        d = (double)n/(1024);
        sprintf(s,"%.2fK",d);
    } else if (n < (1024LL*1024*1024)) {
        d = (double)n/(1024*1024);
        sprintf(s,"%.2fM",d);
    } else if (n < (1024LL*1024*1024*1024)) {
        d = (double)n/(1024LL*1024*1024);
        sprintf(s,"%.2fG",d);
    } else if (n < (1024LL*1024*1024*1024*1024)) {
        d = (double)n/(1024LL*1024*1024*1024);
        sprintf(s,"%.2fT",d);
    } else if (n < (1024LL*1024*1024*1024*1024*1024)) {
        d = (double)n/(1024LL*1024*1024*1024*1024);
        sprintf(s,"%.2fP",d);
    } else {
        /* Let's hope we never need this */
        sprintf(s,"%lluB",n);
    }
}

// Assembly:
movq %rsi, %rdx
cmpq $0x3ff, %rsi            # imm = 0x3FF
ja 0x1c92e
leaq 0x369ed(%rip), %rsi     # 0x53314
xorl %eax, %eax
jmp 0x12860
cmpq $0xfffff, %rdx          # imm = 0xFFFFF
ja 0x1c94d
cvtsi2sd %rdx, %xmm0
mulsd 0x35b2c(%rip), %xmm0    # 0x52470
leaq 0x369cf(%rip), %rsi     # 0x5331a
jmp 0x1c9cb
cmpq $0x3fffffff, %rdx       # imm = 0x3FFFFFFF
ja 0x1c96c
cvtsi2sd %rdx, %xmm0
mulsd 0x35b05(%rip), %xmm0    # 0x52468
leaq 0x369b6(%rip), %rsi     # 0x53320
jmp 0x1c9cb
movq %rdx, %rax
shrq $0x28, %rax
jne 0x1c98b
cvtsi2sd %rdx, %xmm0
mulsd 0x35ade(%rip), %xmm0    # 0x52460
leaq 0x3699d(%rip), %rsi     # 0x53326
jmp 0x1c9cb
movq %rdx, %rax
shrq $0x32, %rax
jne 0x1c9aa
cvtsi2sd %rdx, %xmm0
mulsd 0x35ab7(%rip), %xmm0    # 0x52458
leaq 0x36984(%rip), %rsi     # 0x5332c
jmp 0x1c9cb
movq %rdx, %rax
shrq $0x3c, %rax
jne 0x1c920
cvtsi2sd %rdx, %xmm0
mulsd 0x35a8c(%rip), %xmm0    # 0x52450
leaq 0x36967(%rip), %rsi     # 0x53332
movb $0x1, %al
jmp 0x12860
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/server.c
// Function: linuxOvercommitMemoryValue
int linuxOvercommitMemoryValue(void) {
    FILE *fp = fopen("/proc/sys/vm/overcommit_memory","r");
    char buf[64];

    if (!fp) return -1;
    if (fgets(buf,64,fp) == NULL) {
        fclose(fp);
        return -1;
    }
    fclose(fp);

    return atoi(buf);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
leaq 0x36771(%rip), %rdi     # 0x538fd
leaq 0x37662(%rip), %rsi     # 0x547f5
callq 0x12500
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x1d1cf
movq %rax, %r14
movq %rsp, %rdi
movl $0x40, %esi
movq %rax, %rdx
callq 0x12470
movq %rax, %r15
movq %r14, %rdi
callq 0x12220
testq %r15, %r15
je 0x1d1cf
movq %rsp, %rdi
callq 0x12830
movl %eax, %ebx
movl %ebx, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x51ed5(%rip), %rdi     # 0x6f0d8
leaq 0x382af(%rip), %rsi     # 0x554b9
callq 0x12500
testq %rax, %rax
je 0x1d238
movq %rax, %rbx
callq 0x121f0
leaq 0x38924(%rip), %rsi     # 0x55b47
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0x124d0
movq %rbx, %rdi
popq %rbx
jmp 0x12220
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/server.c
// Function: daemonize
void daemonize(void) {
    int fd;

    if (fork() != 0) exit(0); /* parent exits */
    setsid(); /* create a new session */

    /* Every output goes to /dev/null. If Discnt is daemonized but
     * the 'logfile' is set to 'stdout' in the configuration file
     * it will not log at all. */
    if ((fd = open("/dev/null", O_RDWR, 0)) != -1) {
        dup2(fd, STDIN_FILENO);
        dup2(fd, STDOUT_FILENO);
        dup2(fd, STDERR_FILENO);
        if (fd > STDERR_FILENO) close(fd);
    }
}

// Assembly:
pushq %rbx
callq 0x12940
testl %eax, %eax
jne 0x1d295
callq 0x123d0
leaq 0x367c9(%rip), %rdi     # 0x53a19
movl $0x2, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x126f0
cmpl $-0x1, %eax
je 0x1d293
movl %eax, %ebx
movl %eax, %edi
xorl %esi, %esi
callq 0x122a0
movl %ebx, %edi
movl $0x1, %esi
callq 0x122a0
movl %ebx, %edi
movl $0x2, %esi
callq 0x122a0
cmpl $0x3, %ebx
jl 0x1d293
movl %ebx, %edi
popq %rbx
jmp 0x123b0
popq %rbx
retq
xorl %edi, %edi
callq 0x12870
// File: /workspace/github_c_makefile_star2_O1/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 0x215a0
movq %rax, %rbx
callq 0x215a8
movq %rax, %rdi
callq 0x12830
xorl %ebp, %ebp
testl %eax, %eax
setg %bpl
callq 0x215b0
movq %rax, (%rsp)
leaq 0x36757(%rip), %rdi     # 0x53a23
leaq 0x36dfa(%rip), %rsi     # 0x540cd
leaq 0x362a6(%rip), %r8      # 0x53580
movq %rbx, %rdx
movl %ebp, %ecx
movl $0x40, %r9d
xorl %eax, %eax
callq 0x122c0
xorl %edi, %edi
callq 0x12870
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/server.c
// Function: usage
void usage(void) {
    fprintf(stderr,"Usage: ./discnt-server [/path/to/discnt.conf] [options]\n");
    fprintf(stderr,"       ./discnt-server - (read config from stdin)\n");
    fprintf(stderr,"       ./discnt-server -v or --version\n");
    fprintf(stderr,"       ./discnt-server -h or --help\n");
    fprintf(stderr,"       ./discnt-server --test-memory <megabytes>\n\n");
    fprintf(stderr,"Examples:\n");
    fprintf(stderr,"       ./discnt-server (run the server with default conf)\n");
    fprintf(stderr,"       ./discnt-server /etc/discnt/5262.conf\n");
    fprintf(stderr,"       ./discnt-server --port 5555\n");
    fprintf(stderr,"       ./discnt-server --port 5555 --slaveof 127.0.0.1 6666\n");
    fprintf(stderr,"       ./discnt-server /etc/mydiscnt.conf --loglevel verbose\n\n");
    exit(1);
}

// Assembly:
pushq %rbx
movq 0x50cf5(%rip), %rbx     # 0x6dff0
movq (%rbx), %rcx
leaq 0x36759(%rip), %rdi     # 0x53a5e
movl $0x38, %esi
movl $0x1, %edx
callq 0x12890
movq (%rbx), %rcx
leaq 0x36779(%rip), %rdi     # 0x53a97
movl $0x32, %esi
movl $0x1, %edx
callq 0x12890
movq (%rbx), %rcx
leaq 0x36793(%rip), %rdi     # 0x53aca
movl $0x27, %esi
movl $0x1, %edx
callq 0x12890
movq (%rbx), %rcx
leaq 0x367a2(%rip), %rdi     # 0x53af2
movl $0x24, %esi
movl $0x1, %edx
callq 0x12890
movq (%rbx), %rcx
leaq 0x367ae(%rip), %rdi     # 0x53b17
movl $0x32, %esi
movl $0x1, %edx
callq 0x12890
movq (%rbx), %rcx
leaq 0x367c8(%rip), %rdi     # 0x53b4a
movl $0xa, %esi
movl $0x1, %edx
callq 0x12890
movq (%rbx), %rcx
leaq 0x367ba(%rip), %rdi     # 0x53b55
movl $0x3a, %esi
movl $0x1, %edx
callq 0x12890
movq (%rbx), %rcx
leaq 0x367dc(%rip), %rdi     # 0x53b90
movl $0x2d, %esi
movl $0x1, %edx
callq 0x12890
movq (%rbx), %rcx
leaq 0x367f1(%rip), %rdi     # 0x53bbe
movl $0x23, %esi
movl $0x1, %edx
callq 0x12890
movq (%rbx), %rcx
leaq 0x367fc(%rip), %rdi     # 0x53be2
movl $0x3c, %esi
movl $0x1, %edx
callq 0x12890
movq (%rbx), %rcx
leaq 0x36820(%rip), %rdi     # 0x53c1f
movl $0x3e, %esi
movl $0x1, %edx
callq 0x12890
movl $0x1, %edi
callq 0x12870
// File: /workspace/github_c_makefile_star2_O1/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 0x1fea5
movq %rax, %rbx
movl 0x5224c(%rip), %r12d    # 0x6f680
callq 0x215a0
movq %rax, %r14
callq 0x215a8
movq %rax, %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x12510
xorl %ebp, %ebp
testq %rax, %rax
setg %bpl
movl 0x51cdc(%rip), %r15d    # 0x6f13c
callq 0x121f0
movslq %eax, %r10
testl %r12d, %r12d
je 0x1d49e
leaq 0x36916(%rip), %rsi     # 0x53d8a
leaq 0x36c52(%rip), %rdx     # 0x540cd
leaq 0x36943(%rip), %r9      # 0x53dc5
movl $0x2, %edi
movq %r14, %rcx
movl %ebp, %r8d
xorl %eax, %eax
pushq %r10
pushq %r15
callq 0x19fb1
addq $0x10, %rsp
jmp 0x1d4e3
subq $0x8, %rsp
leaq 0x3691c(%rip), %r11     # 0x53dc5
leaq 0x367ae(%rip), %rdx     # 0x53c5e
leaq 0x36c16(%rip), %rcx     # 0x540cd
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 0x19e3d
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1ffff