LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/server.c
// Function: monitorCommand
void monitorCommand(client *c) {
    /* ignore MONITOR if already slave or in monitor mode */
    if (c->flags & CLIENT_SLAVE) return;

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

// Assembly:
movl 0x98(%rdi), %eax
testb $0x1, %al
jne 0x2b2d7
pushq %rbx
movq %rdi, %rbx
orl $0x5, %eax
movl %eax, 0x98(%rdi)
movq 0xce7d1(%rip), %rdi     # 0xf9a90
movq %rbx, %rsi
callq 0x26ecc
movq 0xcf04a(%rip), %rsi     # 0xfa318
movq %rbx, %rdi
popq %rbx
jmp 0x36987
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/server.c
// Function: timeCommand
void timeCommand(client *c) {
    struct timeval tv;

    /* gettimeofday() can only fail if &tv is a bad address so we
     * don't check for errors. */
    gettimeofday(&tv,NULL);
    addReplyMultiBulkLen(c,2);
    addReplyBulkLongLong(c,tv.tv_sec);
    addReplyBulkLongLong(c,tv.tv_usec);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x26300
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x370d9
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x37206
movq 0x8(%r14), %rsi
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x37206
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 0x2b6f4
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 0xce7a3(%rip), %eax     # 0xf9ea0
jl 0x2b749
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 0x26810
movl %ebx, %edi
movq %r14, %rsi
callq 0x2b51f
addq $0x4d8, %rsp            # imm = 0x4D8
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 0xce742(%rip), %eax     # 0xf9ea0
jl 0x2b88a
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq 0xce8d0(%rip), %rdi     # 0xfa048
movb (%rdi), %r15b
testb %r15b, %r15b
jne 0x2b78d
cmpl $0x0, 0xce73d(%rip)     # 0xf9ec4
jne 0x2b880
testb %r15b, %r15b
je 0x2b7af
movl $0x441, %esi            # imm = 0x441
movl $0x1a4, %edx            # imm = 0x1A4
xorl %eax, %eax
callq 0x26690
movl %eax, %ebp
cmpl $-0x1, %eax
jne 0x2b7b2
jmp 0x2b880
pushq $0x1
popq %rbp
callq 0x26420
movslq %eax, %rdx
movq %rsp, %r14
pushq $0x40
popq %rsi
movq %r14, %rdi
callq 0x39796
movq %r14, %rdi
callq 0x26500
movl %ebp, %edi
movq %r14, %rsi
movq %rax, %rdx
callq 0x26bb0
cmpq $-0x1, %rax
je 0x2b874
leaq 0x8311b(%rip), %rsi     # 0xae909
pushq $0x11
popq %rdx
movl %ebp, %edi
callq 0x26bb0
cmpq $-0x1, %rax
je 0x2b874
xorl %edi, %edi
callq 0x26cd0
movq %rsp, %r14
pushq $0x40
popq %rsi
movq %r14, %rdi
movq %rax, %rdx
callq 0x39796
movq %r14, %rdi
callq 0x26500
movl %ebp, %edi
movq %r14, %rsi
movq %rax, %rdx
callq 0x26bb0
cmpq $-0x1, %rax
je 0x2b874
leaq 0x8f81e(%rip), %rsi     # 0xbb056
pushq $0x2
popq %rdx
movl %ebp, %edi
callq 0x26bb0
cmpq $-0x1, %rax
je 0x2b874
movq %rbx, %rdi
callq 0x26500
movl %ebp, %edi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x26bb0
cmpq $-0x1, %rax
je 0x2b874
leaq 0x8554f(%rip), %rsi     # 0xb0db9
pushq $0x1
popq %rdx
movl %ebp, %edi
callq 0x26bb0
testb %r15b, %r15b
je 0x2b880
movl %ebp, %edi
callq 0x26180
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/server.c
// Function: dictSdsKeyCompare
int dictSdsKeyCompare(void *privdata, const void *key1,
        const void *key2)
{
    int l1,l2;
    DICT_NOTUSED(privdata);

    l1 = sdslen((sds)key1);
    l2 = sdslen((sds)key2);
    if (l1 != l2) return 0;
    return memcmp(key1, key2, l1) == 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rsi, %rdi
callq 0x2b91b
movq %rax, %r15
movq %rbx, %rdi
callq 0x2b91b
movq %rax, %rcx
xorl %eax, %eax
cmpl %ecx, %r15d
jne 0x2b915
movslq %r15d, %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x266f0
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
sete %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 0x2b9f8
andl (%rbx), %eax
cmpl $0x10, %eax
jne 0x2b9f8
movq 0x8(%rsi), %rcx
xorl %eax, %eax
cmpq 0x8(%rbx), %rcx
sete %al
jmp 0x2ba2f
movq %rsi, %rdi
callq 0x3a57d
movq %rax, %r14
movq %rbx, %rdi
callq 0x3a57d
movq %rax, %rbx
movq 0x8(%r14), %rsi
movq 0x8(%rax), %rdx
callq 0x2b8d6
movl %eax, %ebp
movq %r14, %rdi
callq 0x3a265
movq %rbx, %rdi
callq 0x3a265
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 %r14
pushq %rbx
subq $0x20, %rsp
movl (%rdi), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x8, %eax
je 0x2ba52
cmpl $0x1, %eax
je 0x2ba70
testl %eax, %eax
jne 0x2ba8e
movq 0x8(%rdi), %rbx
movq %rbx, %rdi
callq 0x2b91b
movq %rbx, %rdi
movl %eax, %esi
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x2a0a1
movq 0x8(%rdi), %rdx
movq %rsp, %rbx
pushq $0x20
popq %rsi
movq %rbx, %rdi
callq 0x39796
movq %rbx, %rdi
movl %eax, %esi
callq 0x2a0a1
jmp 0x2bab8
callq 0x3a57d
movq %rax, %rbx
movq 0x8(%rax), %r14
movq %r14, %rdi
callq 0x2b91b
movq %r14, %rdi
movl %eax, %esi
callq 0x2a0a1
movl %eax, %ebp
movq %rbx, %rdi
callq 0x3a265
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/server.c
// Function: htNeedsResize
int htNeedsResize(dict *dict) {
    long long size, used;

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

// Assembly:
movq 0x38(%rdi), %rcx
addq 0x18(%rdi), %rcx
xorl %eax, %eax
cmpq $0x5, %rcx
jl 0x2baee
movq 0x48(%rdi), %rax
addq 0x28(%rdi), %rax
imulq $0x64, %rax, %rax
cqto
idivq %rcx
movq %rax, %rcx
xorl %eax, %eax
cmpq $0xa, %rcx
setl %al
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/server.c
// Function: tryResizeHashTables
void tryResizeHashTables(int dbid) {
    if (htNeedsResize(server.db[dbid].dict))
        dictResize(server.db[dbid].dict);
    if (htNeedsResize(server.db[dbid].expires))
        dictResize(server.db[dbid].expires);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0xcddd5(%rip), %r15     # 0xf98d0
movslq %edi, %r14
shlq $0x6, %r14
movq (%r15,%r14), %rbx
movq %rbx, %rdi
callq 0x2bac1
testl %eax, %eax
je 0x2bb21
movq %rbx, %rdi
callq 0x2a192
movq 0xcddaf(%rip), %r15     # 0xf98d0
movq 0x8(%r15,%r14), %rbx
movq %rbx, %rdi
callq 0x2bac1
testl %eax, %eax
je 0x2bb3f
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2a192
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/server.c
// Function: incrementallyRehash
int incrementallyRehash(int dbid) {
    /* Keys dictionary */
    if (dictIsRehashing(server.db[dbid].dict)) {
        dictRehashMilliseconds(server.db[dbid].dict,1);
        return 1; /* already used our millisecond for this loop... */
    }
    /* Expires */
    if (dictIsRehashing(server.db[dbid].expires)) {
        dictRehashMilliseconds(server.db[dbid].expires,1);
        return 1; /* already used our millisecond for this loop... */
    }
    return 0;
}

// Assembly:
pushq %rbx
movq 0xcdd83(%rip), %rax     # 0xf98d0
movslq %edi, %rcx
shlq $0x6, %rcx
movq (%rax,%rcx), %rdi
cmpq $-0x1, 0x50(%rdi)
jne 0x2bb6d
addq %rcx, %rax
movq 0x8(%rax), %rdi
cmpq $-0x1, 0x50(%rdi)
je 0x2bb7b
pushq $0x1
popq %rbx
movl %ebx, %esi
callq 0x2a3a5
movl %ebx, %eax
popq %rbx
retq
xorl %ebx, %ebx
jmp 0x2bb77
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/server.c
// Function: activeExpireCycleTryExpire
int activeExpireCycleTryExpire(redisDb *db, dictEntry *de, long long now) {
    long long t = dictGetSignedIntegerVal(de);
    if (now > t) {
        sds key = dictGetKey(de);
        robj *keyobj = createStringObject(key,sdslen(key));

        propagateExpire(db,keyobj);
        dbDelete(db,keyobj);
        notifyKeyspaceEvent(NOTIFY_EXPIRED,
            "expired",keyobj,db->id);
        decrRefCount(keyobj);
        server.stat_expiredkeys++;
        return 1;
    } else {
        return 0;
    }
}

// Assembly:
xorl %eax, %eax
cmpq %rdx, 0x8(%rsi)
jge 0x2bc0c
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rsi), %r14
movq %r14, %rdi
callq 0x2b91b
movq %r14, %rdi
movq %rax, %rsi
callq 0x39e29
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3c34a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3b1df
movl 0x30(%rbx), %ecx
leaq 0x82d35(%rip), %rsi     # 0xae91b
movl $0x100, %edi            # imm = 0x100
movq %r14, %rdx
callq 0x6fb58
movq %r14, %rdi
callq 0x3a265
incq 0xce046(%rip)           # 0xf9c48
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 %= STATS_METRIC_SAMPLES;
    server.inst_metric[metric].last_sample_time = mstime();
    server.inst_metric[metric].last_sample_count = current_reading;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movl %edi, %ebp
callq 0x2b8ae
movq %rax, %rcx
movslq %ebp, %rax
imulq $0x98, %rax, %rax
leaq 0xcda02(%rip), %rdx     # 0xf98a8
leaq (%rax,%rdx), %r14
addq $0x430, %r14            # imm = 0x430
subq (%r14), %rcx
jle 0x2becb
movq %rbx, %rax
subq 0x8(%r14), %rax
imulq $0x3e8, %rax, %rax      # imm = 0x3E8
cqto
idivq %rcx
jmp 0x2becd
xorl %eax, %eax
movslq 0x90(%r14), %rcx
movq %rax, 0x10(%r14,%rcx,8)
leal 0x1(%rcx), %eax
pushq $0x10
popq %rcx
cltd
idivl %ecx
movl %edx, 0x90(%r14)
callq 0x2b8ae
movq %rax, (%r14)
movq %rbx, 0x8(%r14)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/server.c
// Function: getInstantaneousMetric
long long getInstantaneousMetric(int metric) {
    int j;
    long long sum = 0;

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

// Assembly:
movslq %edi, %rax
imulq $0x98, %rax, %rax
leaq 0xcd99d(%rip), %rcx     # 0xf98a8
addq %rax, %rcx
addq $0x440, %rcx            # imm = 0x440
xorl %edx, %edx
xorl %eax, %eax
cmpq $0x10, %rdx
je 0x2bf28
addq (%rcx,%rdx,8), %rax
incq %rdx
jmp 0x2bf19
pushq $0x10
popq %rcx
cqto
idivq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/server.c
// Function: clientsCronHandleTimeout
int clientsCronHandleTimeout(client *c, mstime_t now_ms) {
    time_t now = now_ms/1000;

    if (server.maxidletime &&
        !(c->flags & CLIENT_SLAVE) &&    /* no timeout for slaves */
        !(c->flags & CLIENT_MASTER) &&   /* no timeout for masters */
        !(c->flags & CLIENT_BLOCKED) &&  /* no timeout for BLPOP */
        !(c->flags & CLIENT_PUBSUB) &&   /* no timeout for Pub/Sub 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. */

        if (c->bpop.timeout != 0 && c->bpop.timeout < now_ms) {
            /* Handle blocking operation specific timeout. */
            replyToBlockedClientTimedOut(c);
            unblockClient(c);
        } else if (server.cluster_enabled) {
            /* Cluster: handle unblock & redirect of clients blocked
             * into keys no longer served by this server. */
            if (clusterRedirectBlockedClientIfNeeded(c))
                unblockClient(c);
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq 0xcdf66(%rip), %rdi     # 0xf9ea4
testq %rdi, %rdi
setne %al
movl 0x98(%rbx), %ecx
testl $0x40013, %ecx          # imm = 0x40013
sete %dl
andb %al, %dl
cmpb $0x1, %dl
jne 0x2bf91
movl $0x3e8, %r8d            # imm = 0x3E8
movq %rsi, %rax
cqto
idivq %r8
subq 0x88(%rbx), %rax
cmpq %rdi, %rax
jle 0x2bf91
leaq 0x829b5(%rip), %rsi     # 0xae930
pushq $0x1
popq %rbp
movl %ebp, %edi
xorl %eax, %eax
callq 0x2b699
movq %rbx, %rdi
callq 0x37527
jmp 0x2bfd6
xorl %ebp, %ebp
testb $0x10, %cl
je 0x2bfd6
movq 0x170(%rbx), %rax
testq %rax, %rax
sete %cl
cmpq %rsi, %rax
setge %al
orb %cl, %al
jne 0x2bfb9
movq %rbx, %rdi
callq 0x701ec
jmp 0x2bfce
cmpl $0x0, 0xce284(%rip)     # 0xfa244
je 0x2bfd6
movq %rbx, %rdi
callq 0x61e0f
testl %eax, %eax
je 0x2bfd6
movq %rbx, %rdi
callq 0x70160
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 0x28(%rdi), %rdi
callq 0x3149d
movq %rax, %rcx
movq 0xce22a(%rip), %rsi     # 0xfa220
subq 0x88(%rbx), %rsi
cmpq $0x8001, %rax           # imm = 0x8001
jb 0x2c01a
movq 0x30(%rbx), %rdi
incq %rdi
movq %rcx, %rax
xorl %edx, %edx
divq %rdi
cmpq $0x2, %rax
ja 0x2c029
cmpq $0x401, %rcx            # imm = 0x401
jb 0x2c083
cmpq $0x3, %rsi
jl 0x2c083
movq 0x28(%rbx), %rdi
movzbl -0x1(%rdi), %eax
andl $0x7, %eax
decl %eax
cmpl $0x3, %eax
ja 0x2c083
leaq 0x8233a(%rip), %rcx     # 0xae37c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movzbl -0x2(%rdi), %eax
movzbl -0x3(%rdi), %ecx
jmp 0x2c06f
movl -0x5(%rdi), %eax
subl -0x9(%rdi), %eax
jmp 0x2c072
movq -0x9(%rdi), %rax
subq -0x11(%rdi), %rax
jmp 0x2c072
movzwl -0x3(%rdi), %eax
movzwl -0x5(%rdi), %ecx
subq %rcx, %rax
cmpq $0x401, %rax            # imm = 0x401
jb 0x2c083
callq 0x313d7
movq %rax, 0x28(%rbx)
andq $0x0, 0x30(%rbx)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/server.c
// Function: clientsCron
void clientsCron(void) {
    /* Make sure to process at least numclients/server.hz 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 1
     * second. */
    int numclients = listLength(server.clients);
    int iterations = numclients/server.hz;
    mstime_t now = mstime();

    /* Process at least a few clients while we are at it, even if we need
     * to process less than CLIENTS_CRON_MIN_ITERATIONS to meet our contract
     * of processing each client once per second. */
    if (iterations < CLIENTS_CRON_MIN_ITERATIONS)
        iterations = (numclients < CLIENTS_CRON_MIN_ITERATIONS) ?
                     numclients : CLIENTS_CRON_MIN_ITERATIONS;

    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,now)) continue;
        if (clientsCronResizeQueryBuffer(c)) continue;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0xcd9d6(%rip), %rax     # 0xf9a70
movl 0x28(%rax), %ebx
movl %ebx, %eax
cltd
idivl 0xcd822(%rip)           # 0xf98c8
movl %eax, %ebp
callq 0x2b8ae
cmpl $0x5, %ebx
pushq $0x5
popq %r15
cmovll %ebx, %r15d
movq %rax, %rbx
cmpl $0x5, %ebp
cmovgel %ebp, %r15d
movq 0xcd9a7(%rip), %rdi     # 0xf9a70
cmpq $0x0, 0x28(%rdi)
je 0x2c102
subl $0x1, %r15d
jb 0x2c102
callq 0x2714c
movq 0xcd98e(%rip), %rax     # 0xf9a70
movq (%rax), %rax
movq 0x10(%rax), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2bf31
testl %eax, %eax
jne 0x2c0c2
movq %r14, %rdi
callq 0x2bfdf
jmp 0x2c0c2
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/server.c
// Function: databasesCron
void databasesCron(void) {
    /* Expire keys by random sampling. Not required for slaves
     * as master will synthesize DELs for us. */
    if (server.active_expire_enabled && server.masterhost == NULL)
        activeExpireCycle(ACTIVE_EXPIRE_CYCLE_SLOW);

    /* Perform hash tables rehashing if needed, but only if there are no
     * other processes saving the DB on disk. Otherwise rehashing is bad
     * as will cause a lot of copy-on-write of memory pages. */
    if (server.rdb_child_pid == -1 && server.aof_child_pid == -1) {
        /* We use global counters so if we stop the computation at a given
         * DB we'll be able to start from the successive in the next
         * cron loop iteration. */
        static unsigned int resize_db = 0;
        static unsigned int rehash_db = 0;
        int dbs_per_call = CRON_DBS_PER_CALL;
        int j;

        /* Don't test more DBs than we have. */
        if (dbs_per_call > server.dbnum) dbs_per_call = server.dbnum;

        /* Resize */
        for (j = 0; j < dbs_per_call; j++) {
            tryResizeHashTables(resize_db % server.dbnum);
            resize_db++;
        }

        /* Rehash */
        if (server.activerehashing) {
            for (j = 0; j < dbs_per_call; j++) {
                int work_done = incrementallyRehash(rehash_db % server.dbnum);
                rehash_db++;
                if (work_done) {
                    /* If the function did some work, stop here, we'll do
                     * more at the next cron loop. */
                    break;
                }
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
cmpl $0x0, 0xcdd95(%rip)     # 0xf9eac
je 0x2c12a
cmpq $0x0, 0xcdfaf(%rip)     # 0xfa0d0
jne 0x2c12a
xorl %edi, %edi
callq 0x2bc0d
cmpl $-0x1, 0xcdea7(%rip)    # 0xf9fd8
jne 0x2c1a4
cmpl $-0x1, 0xcde0a(%rip)    # 0xf9f44
jne 0x2c1a4
movl 0xcdd76(%rip), %eax     # 0xf9eb8
cmpl $0x10, %eax
pushq $0x10
popq %rbx
cmovll %eax, %ebx
xorl %eax, %eax
testl %ebx, %ebx
cmovlel %eax, %ebx
movl %ebx, %ebp
subl $0x1, %ebp
jb 0x2c176
movl 0xce1a9(%rip), %eax     # 0xfa308
xorl %edx, %edx
divl 0xcdd51(%rip)           # 0xf9eb8
movl %edx, %edi
callq 0x2baef
incl 0xce194(%rip)           # 0xfa308
jmp 0x2c154
cmpl $0x0, 0xcd77b(%rip)     # 0xf98f8
je 0x2c1a4
incl %ebx
decl %ebx
je 0x2c1a4
movl 0xce181(%rip), %eax     # 0xfa30c
xorl %edx, %edx
divl 0xcdd25(%rip)           # 0xf9eb8
movl %edx, %edi
callq 0x2bb45
incl 0xce16c(%rip)           # 0xfa30c
testl %eax, %eax
je 0x2c181
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/server.c
// Function: beforeSleep
void beforeSleep(struct aeEventLoop *eventLoop) {
    UNUSED(eventLoop);

    /* Call the Redis Cluster before sleep function. Note that this function
     * may change the state of Redis Cluster (from ok to fail or vice versa),
     * so it's a good idea to call it before serving the unblocked clients
     * later in this function. */
    if (server.cluster_enabled) clusterBeforeSleep();

    /* Run a fast expire cycle (the called function will return
     * ASAP if a fast cycle is not needed). */
    if (server.active_expire_enabled && server.masterhost == NULL)
        activeExpireCycle(ACTIVE_EXPIRE_CYCLE_FAST);

    /* Send all the slaves an ACK request if at least one client blocked
     * during the previous event loop iteration. */
    if (server.get_ack_from_slaves) {
        robj *argv[3];

        argv[0] = createStringObject("REPLCONF",8);
        argv[1] = createStringObject("GETACK",6);
        argv[2] = createStringObject("*",1); /* Not used argument. */
        replicationFeedSlaves(server.slaves, server.slaveseldb, argv, 3);
        decrRefCount(argv[0]);
        decrRefCount(argv[1]);
        decrRefCount(argv[2]);
        server.get_ack_from_slaves = 0;
    }

    /* Unblock all the clients blocked for synchronous replication
     * in WAIT. */
    if (listLength(server.clients_waiting_acks))
        processClientsWaitingReplicas();

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

    /* Write the AOF buffer on disk */
    flushAppendOnlyFile(0);

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

// Assembly:
pushq %rbx
subq $0x20, %rsp
cmpl $0x0, 0xcda84(%rip)     # 0xfa244
je 0x2c7c7
callq 0x5f33f
cmpl $0x0, 0xcd6de(%rip)     # 0xf9eac
je 0x2c7e2
cmpq $0x0, 0xcd8f8(%rip)     # 0xfa0d0
jne 0x2c7e2
pushq $0x1
popq %rdi
callq 0x2bc0d
cmpl $0x0, 0xcd9bf(%rip)     # 0xfa1a8
je 0x2c85f
leaq 0x822e9(%rip), %rdi     # 0xaeadb
pushq $0x8
popq %rsi
callq 0x39e29
movq %rsp, %rbx
movq %rax, (%rbx)
leaq 0x822dd(%rip), %rdi     # 0xaeae4
pushq $0x6
popq %rsi
callq 0x39e29
movq %rax, 0x8(%rbx)
leaq 0x822d1(%rip), %rdi     # 0xaeaeb
pushq $0x1
popq %rsi
callq 0x39e29
movq %rax, 0x10(%rbx)
movq 0xcd25b(%rip), %rdi     # 0xf9a88
movl 0xcd831(%rip), %esi     # 0xfa064
pushq $0x3
popq %rcx
movq %rbx, %rdx
callq 0x3cf58
movq (%rbx), %rdi
callq 0x3a265
movq 0x8(%rbx), %rdi
callq 0x3a265
movq 0x10(%rbx), %rdi
callq 0x3a265
andl $0x0, 0xcd949(%rip)     # 0xfa1a8
movq 0xcd93a(%rip), %rax     # 0xfa1a0
cmpq $0x0, 0x28(%rax)
je 0x2c872
callq 0x3fe4e
movq 0xcd94f(%rip), %rax     # 0xfa1c8
cmpq $0x0, 0x28(%rax)
je 0x2c885
callq 0x700a9
xorl %edi, %edi
callq 0x53b99
callq 0x37b5a
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/server.c
// Function: lookupCommandByCString
struct redisCommand *lookupCommandByCString(char *s) {
    struct redisCommand *cmd;
    sds name = sdsnew(s);

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

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
callq 0x3115a
movq %rax, %rbx
movq 0xcc381(%rip), %rdi     # 0xf98d8
movq %rax, %rsi
callq 0x2a900
movq %rax, %r14
movq %rbx, %rdi
callq 0x311c8
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 Redis 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 0xcc333(%rip), %rdi     # 0xf98b8
pushq $0x1
popq %rsi
callq 0x26aa0
cmpl $-0x1, %eax
je 0x2d5c5
movl %ebp, %eax
shrb %al
movq 0xcc313(%rip), %rdi     # 0xf98b0
testq %rdi, %rdi
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x2d5b4
callq 0x52ea3
cmpl $-0x1, %eax
je 0x2d5c5
testb $0x1, %bpl
je 0x2d5cd
xorl %edi, %edi
callq 0x2ee95
testl %eax, %eax
je 0x2d5cd
pushq $-0x1
popq %rax
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x3
popq %rbp
movl $0x400, %r14d           # imm = 0x400
movl 0xccbd0(%rip), %eax     # 0xfa1ac
addl %r14d, %eax
cmpl %eax, %ebp
jge 0x2d5ee
movl %ebp, %edi
callq 0x26180
incl %ebp
jmp 0x2d5d6
testq %rbx, %rbx
je 0x2d5fe
imull $0x3e8, %ebx, %edi      # imm = 0x3E8
callq 0x26670
movq 0xcc2b3(%rip), %rdi     # 0xf98b8
movq 0xcc2b4(%rip), %rsi     # 0xf98c0
movq 0xc790d(%rip), %rax     # 0xf4f20
movq (%rax), %rdx
callq 0x26780
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 0x81adc(%rip), %rdi     # 0xaf278
leaq 0x83ef2(%rip), %rsi     # 0xb1695
callq 0x26ae0
testq %rax, %rax
je 0x2d7f6
movq %rax, %rbx
movq %rsp, %rdi
movl $0x400, %esi            # imm = 0x400
movq %rax, %rdx
callq 0x26440
testq %rax, %rax
je 0x2d7ee
movq %rsp, %rdi
callq 0x26760
testl %eax, %eax
jle 0x2d7ee
movl 0xcc175(%rip), %edx     # 0xf994c
cmpl %edx, %eax
jge 0x2d7ee
leaq 0x81ab3(%rip), %rsi     # 0xaf295
pushq $0x3
popq %rdi
movl %eax, %ecx
xorl %eax, %eax
callq 0x2b699
movq %rbx, %rdi
callq 0x26a10
addq $0x400, %rsp            # imm = 0x400
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/server.c
// Function: resetServerStats
void resetServerStats(void) {
    int j;

    server.stat_numcommands = 0;
    server.stat_numconnections = 0;
    server.stat_expiredkeys = 0;
    server.stat_evictedkeys = 0;
    server.stat_keyspace_misses = 0;
    server.stat_keyspace_hits = 0;
    server.stat_fork_time = 0;
    server.stat_fork_rate = 0;
    server.stat_rejected_conn = 0;
    server.stat_sync_full = 0;
    server.stat_sync_partial_ok = 0;
    server.stat_sync_partial_err = 0;
    for (j = 0; j < STATS_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.aof_delayed_fsync = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0xcc28a(%rip)    # 0xf9c58
movups %xmm0, 0xcc273(%rip)    # 0xf9c48
movups %xmm0, 0xcc25c(%rip)    # 0xf9c38
movups %xmm0, 0xcc28d(%rip)    # 0xf9c70
movups %xmm0, 0xcc296(%rip)    # 0xf9c80
movups %xmm0, 0xcc29f(%rip)    # 0xf9c90
xorl %r14d, %r14d
leaq 0xcbead(%rip), %r15     # 0xf98a8
cmpq $0x1c8, %r14            # imm = 0x1C8
je 0x2da37
leaq (%r14,%r15), %rbx
addq $0x438, %rbx            # imm = 0x438
andl $0x0, 0x88(%rbx)
callq 0x2b8ae
movq %rax, -0x8(%rbx)
movl $0x88, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x26110
addq $0x98, %r14
jmp 0x2d9fb
andq $0x0, 0xcc549(%rip)     # 0xf9f88
xorps %xmm0, %xmm0
movups %xmm0, 0xcc27f(%rip)    # 0xf9cc8
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 0x26ac0
andl $0x0, 0x80(%r14)
leaq 0x2791(%rip), %rax      # 0x30703
movq %rax, -0x8(%r14)
pushq $0xf
popq %rdi
movq %rsp, %rbx
movq %rbx, %rsi
xorl %edx, %edx
callq 0x266c0
pushq $0x2
popq %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x266c0
movq %r14, %rdi
callq 0x26ac0
movl $0xc0000004, 0x88(%rbx) # imm = 0xC0000004
leaq 0x2b275(%rip), %rax     # 0x59221
movq %rax, (%rbx)
pushq $0xb
popq %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x266c0
pushq $0x7
popq %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x266c0
pushq $0x8
popq %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x266c0
pushq $0x4
popq %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x266c0
addq $0x98, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/server.c
// Function: evictionPoolAlloc
struct evictionPoolEntry *evictionPoolAlloc(void) {
    struct evictionPoolEntry *ep;
    int j;

    ep = zmalloc(sizeof(*ep)*MAXMEMORY_EVICTION_POOL_SIZE);
    for (j = 0; j < MAXMEMORY_EVICTION_POOL_SIZE; j++) {
        ep[j].idle = 0;
        ep[j].key = NULL;
    }
    return ep;
}

// Assembly:
pushq %rax
movl $0x100, %edi            # imm = 0x100
callq 0x327b9
xorl %ecx, %ecx
xorps %xmm0, %xmm0
cmpq $0x100, %rcx            # imm = 0x100
je 0x2e011
movups %xmm0, (%rax,%rcx)
addq $0x10, %rcx
jmp 0x2dffe
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/server.c
// Function: resetCommandTableStats
void resetCommandTableStats(void) {
    int numcommands = sizeof(redisCommandTable)/sizeof(struct redisCommand);
    int j;

    for (j = 0; j < numcommands; j++) {
        struct redisCommand *c = redisCommandTable+j;

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

// Assembly:
pushq $0x40
popq %rax
leaq 0xc7693(%rip), %rcx     # 0xf56b0
xorps %xmm0, %xmm0
cmpq $0x3740, %rax           # imm = 0x3740
je 0x2e032
movaps %xmm0, (%rax,%rcx)
addq $0x50, %rax
jmp 0x2e020
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/server.c
// Function: redisOpArrayFree
void redisOpArrayFree(redisOpArray *oa) {
    while(oa->numops) {
        int j;
        redisOp *op;

        oa->numops--;
        op = oa->ops+oa->numops;
        for (j = 0; j < op->argc; j++)
            decrRefCount(op->argv[j]);
        zfree(op->argv);
    }
    zfree(oa->ops);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movslq 0x8(%rbx), %r14
testq %r14, %r14
je 0x2e0e9
decq %r14
movl %r14d, 0x8(%rbx)
shlq $0x5, %r14
addq (%rbx), %r14
xorl %r15d, %r15d
movslq 0x8(%r14), %rax
movq (%r14), %rdi
cmpq %rax, %r15
jge 0x2e0e2
movq (%rdi,%r15,8), %rdi
callq 0x3a265
incq %r15
jmp 0x2e0c8
callq 0x328f9
jmp 0x2e0ae
movq (%rbx), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x328f9
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/server.c
// Function: propagate
void propagate(struct redisCommand *cmd, int dbid, robj **argv, int argc,
               int flags)
{
    if (server.aof_state != AOF_OFF && flags & PROPAGATE_AOF)
        feedAppendOnlyFile(cmd,dbid,argv,argc);
    if (flags & PROPAGATE_REPL)
        replicationFeedSlaves(server.slaves,dbid,argv,argc);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %r8d, %r15d
movl %ecx, %ebx
movq %rdx, %r14
movl %esi, %ebp
testb $0x1, %r15b
je 0x2e15b
cmpl $0x0, 0xcbdc3(%rip)     # 0xf9f10
je 0x2e15b
movl %ebp, %esi
movq %r14, %rdx
movl %ebx, %ecx
callq 0x545f2
testb $0x2, %r15b
jne 0x2e16c
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0xcb915(%rip), %rdi     # 0xf9a88
movl %ebp, %esi
movq %r14, %rdx
movl %ebx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3cf58
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/server.c
// Function: alsoPropagate
void alsoPropagate(struct redisCommand *cmd, int dbid, robj **argv, int argc,
                   int target)
{
    robj **argvcopy;
    int j;

    if (server.loading) return; /* No propagation during loading. */

    argvcopy = zmalloc(sizeof(robj*)*argc);
    for (j = 0; j < argc; j++) {
        argvcopy[j] = argv[j];
        incrRefCount(argv[j]);
    }
    redisOpArrayAppend(&server.also_propagate,cmd,dbid,argvcopy,argc,target);
}

// Assembly:
cmpl $0x0, 0xcba34(%rip)     # 0xf9bc4
je 0x2e193
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r12
movq %rdi, %r15
movl %esi, (%rsp)
movl %r8d, 0x4(%rsp)
movslq %ecx, %r14
leaq (,%r14,8), %rdi
callq 0x327b9
movq %rax, %r13
xorl %ebx, %ebx
testl %r14d, %r14d
movl $0x0, %r14d
cmovgl %ebp, %r14d
cmpq %rbx, %r14
je 0x2e1e8
movq (%r12,%rbx,8), %rdi
movq %rdi, (%r13,%rbx,8)
callq 0x39e74
incq %rbx
jmp 0x2e1d0
leaq 0xcbe49(%rip), %rdi     # 0xfa038
movq %r15, %rsi
movl (%rsp), %edx
movq %r13, %rcx
movl %ebp, %r8d
movl 0x4(%rsp), %r9d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2e03c
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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);
    if (server.cluster_enabled)
        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
xorl %r15d, %r15d
leaq 0xcaaa1(%rip), %r14     # 0xf98a8
movslq 0xcac16(%rip), %rax     # 0xf9a24
cmpq %rax, %r15
jge 0x2ee25
movl 0x13c(%r14,%r15,4), %edi
callq 0x26180
incq %r15
jmp 0x2ee07
movl 0xcabfd(%rip), %edi     # 0xf9a28
cmpl $-0x1, %edi
je 0x2ee35
callq 0x26180
cmpl $0x0, 0xcb408(%rip)     # 0xfa244
je 0x2ee5f
xorl %r15d, %r15d
movslq 0xcac24(%rip), %rax     # 0xf9a6c
cmpq %rax, %r15
jge 0x2ee5f
movl 0x184(%r14,%r15,4), %edi
callq 0x26180
incq %r15
jmp 0x2ee41
testl %ebx, %ebx
je 0x2ee8f
cmpq $0x0, 0xcab6d(%rip)     # 0xf99d8
je 0x2ee8f
leaq 0x807a2(%rip), %rsi     # 0xaf616
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0x2b699
movq 0xcab53(%rip), %rdi     # 0xf99d8
popq %rbx
popq %r14
popq %r15
jmp 0x263b0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 0x26500
movq %rax, %rbx
movq %r15, %rdi
callq 0x26500
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
je 0x2f04f
pushq $0x1
popq %rax
jmp 0x2f0c6
movq %rbx, 0x8(%rsp)
leaq 0x210(%rsp), %rdi
xorl %ebx, %ebx
movl $0x200, %edx            # imm = 0x200
xorl %esi, %esi
callq 0x26110
leaq 0x10(%rsp), %rdi
movl $0x200, %edx            # imm = 0x200
xorl %esi, %esi
callq 0x26110
leaq 0x210(%rsp), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x26c50
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x26c50
xorl %eax, %eax
cmpq $0x200, %rbx            # imm = 0x200
je 0x2f0be
movb 0x10(%rsp,%rbx), %cl
xorb 0x210(%rsp,%rbx), %cl
movsbl %cl, %ecx
orl %ecx, %eax
incq %rbx
jmp 0x2f0a0
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_O2/gplessis[P]dotdeb-redis/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 0x2f32b
leaq 0x8057b(%rip), %rsi     # 0xaf89f
xorl %eax, %eax
jmp 0x26580
cmpq $0xfffff, %rdx          # imm = 0xFFFFF
ja 0x2f34a
cvtsi2sd %rdx, %xmm0
mulsd 0x7f0ff(%rip), %xmm0    # 0xae440
leaq 0x8055d(%rip), %rsi     # 0xaf8a5
jmp 0x2f3c8
cmpq $0x3fffffff, %rdx       # imm = 0x3FFFFFFF
ja 0x2f369
cvtsi2sd %rdx, %xmm0
mulsd 0x7f0d8(%rip), %xmm0    # 0xae438
leaq 0x80544(%rip), %rsi     # 0xaf8ab
jmp 0x2f3c8
movq %rdx, %rax
shrq $0x28, %rax
jne 0x2f388
cvtsi2sd %rdx, %xmm0
mulsd 0x7f0b1(%rip), %xmm0    # 0xae430
leaq 0x8052b(%rip), %rsi     # 0xaf8b1
jmp 0x2f3c8
movq %rdx, %rax
shrq $0x32, %rax
jne 0x2f3a7
cvtsi2sd %rdx, %xmm0
mulsd 0x7f08a(%rip), %xmm0    # 0xae428
leaq 0x80512(%rip), %rsi     # 0xaf8b7
jmp 0x2f3c8
movq %rdx, %rax
shrq $0x3c, %rax
jne 0x2f31d
cvtsi2sd %rdx, %xmm0
mulsd 0x7f05f(%rip), %xmm0    # 0xae420
leaq 0x804f5(%rip), %rsi     # 0xaf8bd
movb $0x1, %al
jmp 0x26580
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 0x800f9(%rip), %rdi     # 0xb0433
leaq 0x81354(%rip), %rsi     # 0xb1695
callq 0x26ae0
pushq $-0x1
popq %rbx
testq %rax, %rax
je 0x30379
movq %rax, %r14
movq %rsp, %rdi
pushq $0x40
popq %rsi
movq %rax, %rdx
callq 0x26440
movq %rax, %r15
movq %r14, %rdi
callq 0x26a10
testq %r15, %r15
je 0x30379
movq %rsp, %rdi
callq 0x26760
movl %eax, %ebx
movl %ebx, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/server.c
// Function: linuxMemoryWarnings
void linuxMemoryWarnings(void) {
    if (linuxOvercommitMemoryValue() == 0) {
        serverLog(LL_WARNING,"WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.");
    }
    if (THPIsEnabled()) {
        serverLog(LL_WARNING,"WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.");
    }
}

// Assembly:
pushq %rax
callq 0x3032a
testl %eax, %eax
jne 0x303a0
leaq 0x800bc(%rip), %rsi     # 0xb0452
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x2b699
callq 0x71deb
testl %eax, %eax
je 0x303bb
leaq 0x8019f(%rip), %rsi     # 0xb054f
pushq $0x3
popq %rdi
xorl %eax, %eax
popq %rcx
jmp 0x2b699
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/server.c
// Function: createPidFile
void createPidFile(void) {
    /* If pidfile requested, but no pidfile defined, use
     * default pidfile path */
    if (!server.pidfile) server.pidfile = zstrdup(CONFIG_DEFAULT_PID_FILE);

    /* 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 0xc9543(%rip), %rdi     # 0xf9908
testq %rdi, %rdi
jne 0x303e0
leaq 0x802ee(%rip), %rdi     # 0xb06bf
callq 0x32933
movq %rax, %rdi
movq %rax, 0xc9528(%rip)     # 0xf9908
leaq 0x822b8(%rip), %rsi     # 0xb269f
callq 0x26ae0
testq %rax, %rax
je 0x30415
movq %rax, %rbx
callq 0x26420
leaq 0x92c3e(%rip), %rsi     # 0xc303e
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0x26b90
movq %rbx, %rdi
popq %rbx
jmp 0x26a10
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 Redis 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 0x26ab0
testl %eax, %eax
jne 0x3046c
callq 0x26130
leaq 0x802a5(%rip), %rdi     # 0xb06d2
pushq $0x2
popq %rsi
xorl %edx, %edx
xorl %eax, %eax
callq 0x26690
cmpl $-0x1, %eax
je 0x3046a
movl %eax, %ebx
movl %eax, %edi
xorl %esi, %esi
callq 0x26090
pushq $0x1
popq %rsi
movl %ebx, %edi
callq 0x26090
pushq $0x2
popq %rsi
movl %ebx, %edi
callq 0x26090
cmpl $0x3, %ebx
jl 0x3046a
movl %ebx, %edi
popq %rbx
jmp 0x26180
popq %rbx
retq
xorl %edi, %edi
callq 0x262c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/server.c
// Function: version
void version(void) {
    printf("Redis server v=%s sha=%s:%d malloc=%s bits=%d build=%llx\n",
        REDIS_VERSION,
        redisGitSHA1(),
        atoi(redisGitDirty()) > 0,
        ZMALLOC_LIB,
        sizeof(long) == 4 ? 32 : 64,
        (unsigned long long) redisBuildId());
    exit(0);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
callq 0x360a8
movq %rax, %rbx
callq 0x360b0
movq %rax, %rdi
callq 0x26760
xorl %ebp, %ebp
testl %eax, %eax
setg %bpl
callq 0x360b8
movq %rax, (%rsp)
leaq 0x80239(%rip), %rdi     # 0xb06dc
leaq 0x80d2f(%rip), %rsi     # 0xb11d9
leaq 0x7f732(%rip), %r8      # 0xafbe3
pushq $0x40
popq %r9
movq %rbx, %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x260a0
xorl %edi, %edi
callq 0x262c0