LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movq $0x0, -0x10(%rbp)
movl $0x0, -0x8(%rbp)
cmpl $0x10, -0x8(%rbp)
jge 0x30c03
movslq -0x4(%rbp), %rcx
leaq 0x147601(%rip), %rax    # 0x1781d8
addq $0x430, %rax            # imm = 0x430
imulq $0x98, %rcx, %rcx
addq %rcx, %rax
movslq -0x8(%rbp), %rcx
movq 0x10(%rax,%rcx,8), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x30bc6
movq -0x10(%rbp), %rax
movl $0x10, %ecx
cqto
idivq %rcx
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl $0x3e8, %ecx            # imm = 0x3E8
cqto
idivq %rcx
movq %rax, -0x20(%rbp)
cmpl $0x0, 0x147b8b(%rip)    # 0x1787d4
je 0x30cd9
movq -0x10(%rbp), %rax
movl 0x98(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x30cd9
movq -0x10(%rbp), %rax
movl 0x98(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x30cd9
movq -0x10(%rbp), %rax
movl 0x98(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0x30cd9
movq -0x10(%rbp), %rax
movl 0x98(%rax), %eax
andl $0x40000, %eax          # imm = 0x40000
cmpl $0x0, %eax
jne 0x30cd9
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
subq 0x88(%rcx), %rax
movslq 0x147b25(%rip), %rcx    # 0x1787d4
cmpq %rcx, %rax
jle 0x30cd9
movl $0x1, %edi
leaq 0x106cf0(%rip), %rsi    # 0x1379b0
movb $0x0, %al
callq 0x2fc60
movq -0x10(%rbp), %rdi
callq 0x43ea0
movl $0x1, -0x4(%rbp)
jmp 0x30d4d
movq -0x10(%rbp), %rax
movl 0x98(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x30d44
movq -0x10(%rbp), %rax
cmpq $0x0, 0x170(%rax)
je 0x30d1e
movq -0x10(%rbp), %rax
movq 0x170(%rax), %rax
cmpq -0x18(%rbp), %rax
jge 0x30d1e
movq -0x10(%rbp), %rdi
callq 0x9da20
movq -0x10(%rbp), %rdi
callq 0x9d930
jmp 0x30d42
cmpl $0x0, 0x147e4f(%rip)    # 0x178b74
je 0x30d40
movq -0x10(%rbp), %rdi
callq 0x874e0
cmpl $0x0, %eax
je 0x30d3e
movq -0x10(%rbp), %rdi
callq 0x9d930
jmp 0x30d40
jmp 0x30d42
jmp 0x30d44
jmp 0x30d46
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x38bd0
movq %rax, -0x10(%rbp)
movq 0x147dcc(%rip), %rax    # 0x178b50
movq -0x8(%rbp), %rcx
subq 0x88(%rcx), %rax
movq %rax, -0x18(%rbp)
cmpq $0x8000, -0x10(%rbp)    # imm = 0x8000
jbe 0x30db8
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rcx
addq $0x1, %rcx
xorl %edx, %edx
divq %rcx
cmpq $0x2, %rax
ja 0x30dc9
cmpq $0x400, -0x10(%rbp)     # imm = 0x400
jbe 0x30df8
cmpq $0x2, -0x18(%rbp)
jle 0x30df8
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x30e10
cmpq $0x400, %rax            # imm = 0x400
jbe 0x30df6
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x38a90
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x28(%rax)
jmp 0x30df8
movq -0x8(%rbp), %rax
movq $0x0, 0x30(%rax)
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq 0x147491(%rip), %rax    # 0x1783a0
movq 0x28(%rax), %rax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
cltd
idivl 0x1472d8(%rip)          # 0x1781f8
movl %eax, -0x8(%rbp)
callq 0x2ff70
movq %rax, -0x10(%rbp)
cmpl $0x5, -0x8(%rbp)
jge 0x30f50
cmpl $0x5, -0x4(%rbp)
jge 0x30f40
movl -0x4(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x30f4a
movl $0x5, %eax
movl %eax, -0x24(%rbp)
jmp 0x30f4a
movl -0x24(%rbp), %eax
movl %eax, -0x8(%rbp)
jmp 0x30f52
movq 0x147447(%rip), %rcx    # 0x1783a0
xorl %eax, %eax
cmpq $0x0, 0x28(%rcx)
movb %al, -0x25(%rbp)
je 0x30f79
movl -0x8(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x8(%rbp)
cmpl $0x0, %eax
setne %al
movb %al, -0x25(%rbp)
movb -0x25(%rbp), %al
testb $0x1, %al
jne 0x30f82
jmp 0x30fce
movq 0x147417(%rip), %rdi    # 0x1783a0
callq 0x27620
movq 0x14740b(%rip), %rax    # 0x1783a0
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x30c20
cmpl $0x0, %eax
je 0x30fbc
jmp 0x30f52
movq -0x18(%rbp), %rdi
callq 0x30d60
cmpl $0x0, %eax
je 0x30fcc
jmp 0x30f52
jmp 0x30f52
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x10, %rsp
cmpl $0x0, 0x1477ed(%rip)    # 0x1787dc
je 0x31002
cmpq $0x0, 0x147a07(%rip)    # 0x178a00
jne 0x31002
xorl %edi, %edi
callq 0x306c0
cmpl $-0x1, 0x1478ff(%rip)   # 0x178908
jne 0x310cd
cmpl $-0x1, 0x14785e(%rip)   # 0x178874
jne 0x310cd
movl $0x10, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl 0x1477bc(%rip), %eax    # 0x1787e8
jle 0x31037
movl 0x1477b4(%rip), %eax    # 0x1787e8
movl %eax, -0x4(%rbp)
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x31075
movl 0x147bec(%rip), %eax    # 0x178c38
xorl %edx, %edx
divl 0x147794(%rip)          # 0x1787e8
movl %edx, %edi
callq 0x30480
movl 0x147bd7(%rip), %eax    # 0x178c38
addl $0x1, %eax
movl %eax, 0x147bce(%rip)    # 0x178c38
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x3103e
cmpl $0x0, 0x1471ac(%rip)    # 0x178228
je 0x310cb
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x310c9
movl 0x147ba9(%rip), %eax    # 0x178c3c
xorl %edx, %edx
divl 0x14774d(%rip)          # 0x1787e8
movl %edx, %edi
callq 0x30510
movl %eax, -0xc(%rbp)
movl 0x147b91(%rip), %eax    # 0x178c3c
addl $0x1, %eax
movl %eax, 0x147b88(%rip)    # 0x178c3c
cmpl $0x0, -0xc(%rbp)
je 0x310bc
jmp 0x310c9
jmp 0x310be
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x31085
jmp 0x310cb
jmp 0x310cd
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
cmpl $0x0, 0x147271(%rip)    # 0x178b74
je 0x3190a
callq 0x831e0
cmpl $0x0, 0x146ecb(%rip)    # 0x1787dc
je 0x31927
cmpq $0x0, 0x1470e5(%rip)    # 0x178a00
jne 0x31927
movl $0x1, %edi
callq 0x306c0
cmpl $0x0, 0x1471aa(%rip)    # 0x178ad8
je 0x319af
leaq 0x106224(%rip), %rdi    # 0x137b5b
movl $0x8, %esi
callq 0x486a0
movq %rax, -0x20(%rbp)
leaq 0x106218(%rip), %rdi    # 0x137b64
movl $0x6, %esi
callq 0x486a0
movq %rax, -0x18(%rbp)
leaq 0x10620a(%rip), %rdi    # 0x137b6b
movl $0x1, %esi
callq 0x486a0
movq %rax, -0x10(%rbp)
movq 0x146a42(%rip), %rdi    # 0x1783b8
movl 0x147018(%rip), %esi    # 0x178994
leaq -0x20(%rbp), %rdx
movl $0x3, %ecx
callq 0x4dcc0
movq -0x20(%rbp), %rdi
callq 0x48f70
movq -0x18(%rbp), %rdi
callq 0x48f70
movq -0x10(%rbp), %rdi
callq 0x48f70
movl $0x0, 0x147129(%rip)    # 0x178ad8
movq 0x14711a(%rip), %rax    # 0x178ad0
cmpq $0x0, 0x28(%rax)
je 0x319c2
callq 0x522e0
movq 0x14712f(%rip), %rax    # 0x178af8
cmpq $0x0, 0x28(%rax)
je 0x319d5
callq 0x9d7c0
xorl %edi, %edi
callq 0x70c00
callq 0x448b0
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x38510
movq %rax, -0x18(%rbp)
movq 0x145898(%rip), %rdi    # 0x178208
movq -0x18(%rbp), %rsi
callq 0x2e280
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rdi
callq 0x38620
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq 0x145842(%rip), %rdi    # 0x1781e8
movl $0x1, %esi
callq 0x26aa0
cmpl $-0x1, %eax
jne 0x329c1
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x32a7d
movl -0x8(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x329f3
cmpq $0x0, 0x14580c(%rip)    # 0x1781e0
je 0x329f3
movq 0x145803(%rip), %rdi    # 0x1781e0
callq 0x6f960
cmpl $-0x1, %eax
jne 0x329f3
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x32a7d
movl -0x8(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x32a13
xorl %edi, %edi
callq 0x35010
cmpl $0x0, %eax
je 0x32a13
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x32a7d
movl $0x3, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl 0x1460b9(%rip), %ecx    # 0x178adc
addl $0x400, %ecx            # imm = 0x400
cmpl %ecx, %eax
jge 0x32a40
movl -0x14(%rbp), %edi
callq 0x26180
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x32a1a
cmpq $0x0, -0x10(%rbp)
je 0x32a56
imulq $0x3e8, -0x10(%rbp), %rax # imm = 0x3E8
movl %eax, %edi
callq 0x26680
movq 0x14578b(%rip), %rdi    # 0x1781e8
movq 0x14578c(%rip), %rsi    # 0x1781f0
movq 0x14053d(%rip), %rax    # 0x172fa8
movq (%rax), %rdx
callq 0x26780
movl $0x1, %edi
callq 0x263c0
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x420, %rsp            # imm = 0x420
leaq 0x105686(%rip), %rdi    # 0x1382f8
leaq 0x107b50(%rip), %rsi    # 0x13a7c9
callq 0x26ae0
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x32c8b
jmp 0x32cf9
leaq -0x410(%rbp), %rdi
movq -0x8(%rbp), %rdx
movl $0x400, %esi            # imm = 0x400
callq 0x26440
cmpq $0x0, %rax
je 0x32cf0
leaq -0x410(%rbp), %rdi
callq 0x26760
movl %eax, -0x414(%rbp)
cmpl $0x0, -0x414(%rbp)
jle 0x32cee
movl -0x414(%rbp), %eax
cmpl 0x1455af(%rip), %eax    # 0x17827c
jge 0x32cee
movl 0x1455a7(%rip), %edx    # 0x17827c
movl -0x414(%rbp), %ecx
movl $0x3, %edi
leaq 0x10562e(%rip), %rsi    # 0x138315
movb $0x0, %al
callq 0x2fc60
jmp 0x32cf0
movq -0x8(%rbp), %rdi
callq 0x26a10
addq $0x420, %rsp            # imm = 0x420
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq $0x0, 0x145525(%rip) # 0x178568
movq $0x0, 0x145522(%rip) # 0x178570
movq $0x0, 0x14551f(%rip) # 0x178578
movq $0x0, 0x14551c(%rip) # 0x178580
movq $0x0, 0x145521(%rip) # 0x178590
movq $0x0, 0x14550e(%rip) # 0x178588
movq $0x0, 0x14551b(%rip) # 0x1785a0
xorps %xmm0, %xmm0
movsd %xmm0, 0x145518(%rip)   # 0x1785a8
movq $0x0, 0x145515(%rip) # 0x1785b0
movq $0x0, 0x145512(%rip) # 0x1785b8
movq $0x0, 0x14550f(%rip) # 0x1785c0
movq $0x0, 0x14550c(%rip) # 0x1785c8
movl $0x0, -0x4(%rbp)
cmpl $0x3, -0x4(%rbp)
jge 0x33175
movslq -0x4(%rbp), %rcx
leaq 0x145100(%rip), %rax    # 0x1781d8
addq $0x430, %rax            # imm = 0x430
imulq $0x98, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x90(%rax)
callq 0x2ff70
movq %rax, %rcx
movslq -0x4(%rbp), %rdx
leaq 0x1450d3(%rip), %rax    # 0x1781d8
addq $0x430, %rax            # imm = 0x430
imulq $0x98, %rdx, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movslq -0x4(%rbp), %rcx
leaq 0x1450b5(%rip), %rax    # 0x1781d8
addq $0x430, %rax            # imm = 0x430
imulq $0x98, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x8(%rax)
movslq -0x4(%rbp), %rax
leaq 0x145092(%rip), %rdi    # 0x1781d8
addq $0x430, %rdi            # imm = 0x430
imulq $0x98, %rax, %rax
addq %rax, %rdi
addq $0x10, %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0x26110
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x330c3
movq $0x0, 0x145478(%rip) # 0x1785f8
movq $0x0, 0x145475(%rip) # 0x178600
movq $0x0, 0x145722(%rip) # 0x1788b8
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
leaq -0x98(%rbp), %rdi
addq $0x8, %rdi
callq 0x26ac0
movl $0x0, -0x10(%rbp)
leaq 0x3da7(%rip), %rax      # 0x375c0
movq %rax, -0x98(%rbp)
movl $0xf, %edi
leaq -0x98(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x266d0
movl $0x2, %edi
leaq -0x98(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x266d0
leaq -0x98(%rbp), %rdi
addq $0x8, %rdi
callq 0x26ac0
movl $0xc0000004, -0x10(%rbp) # imm = 0xC0000004
leaq 0x45b48(%rip), %rax     # 0x793b0
movq %rax, -0x98(%rbp)
movl $0xb, %edi
leaq -0x98(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x266d0
movl $0x7, %edi
leaq -0x98(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x266d0
movl $0x8, %edi
leaq -0x98(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x266d0
movl $0x4, %edi
leaq -0x98(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x266d0
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x100, %edi            # imm = 0x100
callq 0x3acd0
movq %rax, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x10, -0xc(%rbp)
jge 0x3392b
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq $0x0, 0x8(%rax)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x338ed
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
movl $0xb0, -0x4(%rbp)
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x33993
movslq -0x8(%rbp), %rcx
leaq 0x13fd4b(%rip), %rax    # 0x1736b0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x48(%rax)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x33952
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/server.c
// Function: redisOpArrayAppend
int redisOpArrayAppend(redisOpArray *oa, struct redisCommand *cmd, int dbid,
                       robj **argv, int argc, int target)
{
    redisOp *op;

    oa->ops = zrealloc(oa->ops,sizeof(redisOp)*(oa->numops+1));
    op = oa->ops+oa->numops;
    op->cmd = cmd;
    op->dbid = dbid;
    op->argv = argv;
    op->argc = argc;
    op->target = target;
    oa->numops++;
    return oa->numops;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movl %r9d, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
addl $0x1, %eax
movslq %eax, %rsi
shlq $0x5, %rsi
callq 0x3ae40
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movslq 0x8(%rcx), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x18(%rax)
movl -0x14(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movl -0x24(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x28(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0x33aed
movq -0x8(%rbp), %rax
movl 0x8(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movslq 0x8(%rcx), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x33adf
movq -0x18(%rbp), %rax
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x48f70
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x33ab4
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x3afa0
jmp 0x33a7c
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x3afa0
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
cmpl $0x0, 0x144c9f(%rip)    # 0x178840
je 0x33bc1
movl -0x20(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x33bc1
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
callq 0x71c80
movl -0x20(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x33be2
movq 0x1447e5(%rip), %rdi    # 0x1783b8
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
callq 0x4dcc0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
cmpl $0x0, 0x1448e3(%rip)    # 0x1784f4
je 0x33c15
jmp 0x33c8f
movslq -0x1c(%rbp), %rdi
shlq $0x3, %rdi
callq 0x3acd0
movq %rax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x33c69
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x28(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x487b0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x33c2d
movq -0x8(%rbp), %rsi
movl -0xc(%rbp), %edx
movq -0x28(%rbp), %rcx
movl -0x1c(%rbp), %r8d
movl -0x20(%rbp), %r9d
leaq 0x144555(%rip), %rdi    # 0x1781d8
addq $0x790, %rdi            # imm = 0x790
callq 0x339c0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl 0x1433f9(%rip), %eax    # 0x178354
jge 0x34f7f
movslq -0x8(%rbp), %rcx
leaq 0x143270(%rip), %rax    # 0x1781d8
movl 0x13c(%rax,%rcx,4), %edi
callq 0x26180
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x34f52
cmpl $-0x1, 0x1433d2(%rip)   # 0x178358
je 0x34f93
movl 0x1433ca(%rip), %edi    # 0x178358
callq 0x26180
cmpl $0x0, 0x143bda(%rip)    # 0x178b74
je 0x34fd2
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl 0x1433f0(%rip), %eax    # 0x17839c
jge 0x34fd0
movslq -0x8(%rbp), %rcx
leaq 0x14321f(%rip), %rax    # 0x1781d8
movl 0x184(%rax,%rcx,4), %edi
callq 0x26180
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x34fa3
jmp 0x34fd2
cmpl $0x0, -0x4(%rbp)
je 0x35001
cmpq $0x0, 0x143328(%rip)    # 0x178308
je 0x35001
movl $0x2, %edi
leaq 0x1036a8(%rip), %rsi    # 0x138696
movb $0x0, %al
callq 0x2fc60
movq 0x14330c(%rip), %rdi    # 0x178308
callq 0x263b0
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x430, %rsp            # imm = 0x430
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x264f0
movl %eax, -0x424(%rbp)
movq -0x18(%rbp), %rdi
callq 0x264f0
movl %eax, -0x428(%rbp)
movl $0x0, -0x430(%rbp)
movl -0x424(%rbp), %eax
cmpq $0x200, %rax            # imm = 0x200
ja 0x35237
movl -0x428(%rbp), %eax
cmpq $0x200, %rax            # imm = 0x200
jbe 0x35243
movl $0x1, -0x4(%rbp)
jmp 0x3530d
leaq -0x220(%rbp), %rdi
xorl %esi, %esi
movl $0x200, %edx            # imm = 0x200
callq 0x26110
leaq -0x420(%rbp), %rdi
xorl %esi, %esi
movl $0x200, %edx            # imm = 0x200
callq 0x26110
leaq -0x220(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x424(%rbp), %eax
movl %eax, %edx
callq 0x26c60
leaq -0x420(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x428(%rbp), %eax
movl %eax, %edx
callq 0x26c60
movl $0x0, -0x42c(%rbp)
movl -0x42c(%rbp), %eax
cmpq $0x200, %rax            # imm = 0x200
jae 0x352ec
movl -0x42c(%rbp), %eax
movsbl -0x220(%rbp,%rax), %eax
movl -0x42c(%rbp), %ecx
movsbl -0x420(%rbp,%rcx), %ecx
xorl %ecx, %eax
orl -0x430(%rbp), %eax
movl %eax, -0x430(%rbp)
movl -0x42c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x42c(%rbp)
jmp 0x352a3
movl -0x424(%rbp), %eax
xorl -0x428(%rbp), %eax
orl -0x430(%rbp), %eax
movl %eax, -0x430(%rbp)
movl -0x430(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x430, %rsp            # imm = 0x430
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/server.c
// Function: addReplyCommandFlag
int addReplyCommandFlag(client *c, struct redisCommand *cmd, int f, char *reply) {
    if (cmd->flags & f) {
        addReplyStatus(c, reply);
        return 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
movl 0x20(%rax), %eax
andl -0x1c(%rbp), %eax
cmpl $0x0, %eax
je 0x3535c
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x43180
movl $0x1, -0x4(%rbp)
jmp 0x35363
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
leaq 0x102424(%rip), %rdi    # 0x1394b3
leaq 0x103733(%rip), %rsi    # 0x13a7c9
callq 0x26ae0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x370af
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x370ee
leaq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl $0x40, %esi
callq 0x26440
cmpq $0x0, %rax
jne 0x370d9
movq -0x10(%rbp), %rdi
callq 0x26a10
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x370ee
movq -0x10(%rbp), %rdi
callq 0x26a10
leaq -0x50(%rbp), %rdi
callq 0x26760
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
callq 0x37080
cmpl $0x0, %eax
jne 0x37121
movl $0x3, %edi
leaq 0x1023b8(%rip), %rsi    # 0x1394d2
movb $0x0, %al
callq 0x2fc60
callq 0xa1110
cmpl $0x0, %eax
je 0x3713e
movl $0x3, %edi
leaq 0x102498(%rip), %rsi    # 0x1395cf
movb $0x0, %al
callq 0x2fc60
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
cmpq $0x0, 0x1410e8(%rip)    # 0x178238
jne 0x37165
leaq 0x1025e6(%rip), %rdi    # 0x13973f
callq 0x3b040
movq %rax, 0x1410d3(%rip)    # 0x178238
movq 0x1410cc(%rip), %rdi    # 0x178238
leaq 0x10468e(%rip), %rsi    # 0x13b801
callq 0x26ae0
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x371ad
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
callq 0x26420
movq -0x10(%rbp), %rdi
movl %eax, %edx
leaq 0x11551a(%rip), %rsi    # 0x14c6b7
movb $0x0, %al
callq 0x26ba0
movq -0x8(%rbp), %rdi
callq 0x26a10
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x26ab0
cmpl $0x0, %eax
je 0x371d9
xorl %edi, %edi
callq 0x262d0
callq 0x26130
leaq 0x10256d(%rip), %rdi    # 0x139752
movl $0x2, %esi
xorl %edx, %edx
movb $0x0, %al
callq 0x266a0
movl %eax, -0x4(%rbp)
cmpl $-0x1, %eax
je 0x3722f
movl -0x4(%rbp), %edi
xorl %esi, %esi
callq 0x26090
movl -0x4(%rbp), %edi
movl $0x1, %esi
callq 0x26090
movl -0x4(%rbp), %edi
movl $0x2, %esi
callq 0x26090
cmpl $0x2, -0x4(%rbp)
jle 0x3722d
movl -0x4(%rbp), %edi
callq 0x26180
jmp 0x3722f
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
callq 0x41c10
movq %rax, -0x10(%rbp)
callq 0x41c20
movq %rax, %rdi
callq 0x26760
cmpl $0x0, %eax
setg %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
callq 0x41c30
movq -0x10(%rbp), %rdx
movl -0x4(%rbp), %ecx
leaq 0x1024dd(%rip), %rdi    # 0x13975c
leaq 0x102fdc(%rip), %rsi    # 0x13a262
leaq 0x1019d6(%rip), %r8     # 0x138c63
movl $0x40, %r9d
movq %rax, (%rsp)
movb $0x0, %al
callq 0x260a0
xorl %edi, %edi
callq 0x262d0
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/server.c
// Function: usage
void usage(void) {
    fprintf(stderr,"Usage: ./redis-server [/path/to/redis.conf] [options]\n");
    fprintf(stderr,"       ./redis-server - (read config from stdin)\n");
    fprintf(stderr,"       ./redis-server -v or --version\n");
    fprintf(stderr,"       ./redis-server -h or --help\n");
    fprintf(stderr,"       ./redis-server --test-memory <megabytes>\n\n");
    fprintf(stderr,"Examples:\n");
    fprintf(stderr,"       ./redis-server (run the server with default conf)\n");
    fprintf(stderr,"       ./redis-server /etc/redis/6379.conf\n");
    fprintf(stderr,"       ./redis-server --port 7777\n");
    fprintf(stderr,"       ./redis-server --port 7777 --slaveof 127.0.0.1 8888\n");
    fprintf(stderr,"       ./redis-server /etc/myredis.conf --loglevel verbose\n\n");
    fprintf(stderr,"Sentinel mode:\n");
    fprintf(stderr,"       ./redis-server /etc/sentinel.conf --sentinel\n");
    exit(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x13bd2d(%rip), %rax    # 0x172fe8
movq (%rax), %rdi
leaq 0x1024d1(%rip), %rsi    # 0x139796
movb $0x0, %al
callq 0x26ba0
movq 0x13bd15(%rip), %rax    # 0x172fe8
movq (%rax), %rdi
leaq 0x1024f0(%rip), %rsi    # 0x1397cd
movb $0x0, %al
callq 0x26ba0
movq 0x13bcfd(%rip), %rax    # 0x172fe8
movq (%rax), %rdi
leaq 0x10250a(%rip), %rsi    # 0x1397ff
movb $0x0, %al
callq 0x26ba0
movq 0x13bce5(%rip), %rax    # 0x172fe8
movq (%rax), %rdi
leaq 0x102519(%rip), %rsi    # 0x139826
movb $0x0, %al
callq 0x26ba0
movq 0x13bccd(%rip), %rax    # 0x172fe8
movq (%rax), %rdi
leaq 0x102525(%rip), %rsi    # 0x13984a
movb $0x0, %al
callq 0x26ba0
movq 0x13bcb5(%rip), %rax    # 0x172fe8
movq (%rax), %rdi
leaq 0x10253f(%rip), %rsi    # 0x13987c
movb $0x0, %al
callq 0x26ba0
movq 0x13bc9d(%rip), %rax    # 0x172fe8
movq (%rax), %rdi
leaq 0x102532(%rip), %rsi    # 0x139887
movb $0x0, %al
callq 0x26ba0
movq 0x13bc85(%rip), %rax    # 0x172fe8
movq (%rax), %rdi
leaq 0x102554(%rip), %rsi    # 0x1398c1
movb $0x0, %al
callq 0x26ba0
movq 0x13bc6d(%rip), %rax    # 0x172fe8
movq (%rax), %rdi
leaq 0x102568(%rip), %rsi    # 0x1398ed
movb $0x0, %al
callq 0x26ba0
movq 0x13bc55(%rip), %rax    # 0x172fe8
movq (%rax), %rdi
leaq 0x102573(%rip), %rsi    # 0x139910
movb $0x0, %al
callq 0x26ba0
movq 0x13bc3d(%rip), %rax    # 0x172fe8
movq (%rax), %rdi
leaq 0x102597(%rip), %rsi    # 0x13994c
movb $0x0, %al
callq 0x26ba0
movq 0x13bc25(%rip), %rax    # 0x172fe8
movq (%rax), %rdi
leaq 0x1025bc(%rip), %rsi    # 0x139989
movb $0x0, %al
callq 0x26ba0
movq 0x13bc0d(%rip), %rax    # 0x172fe8
movq (%rax), %rdi
leaq 0x1025b4(%rip), %rsi    # 0x139999
movb $0x0, %al
callq 0x26ba0
movl $0x1, %edi
callq 0x262d0
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/server.c
// Function: sigShutdownHandler
static void sigShutdownHandler(int sig) {
    char *msg;

    switch (sig) {
    case SIGINT:
        msg = "Received SIGINT scheduling shutdown...";
        break;
    case SIGTERM:
        msg = "Received SIGTERM scheduling shutdown...";
        break;
    default:
        msg = "Received shutdown signal, scheduling shutdown...";
    };

    /* SIGINT is often delivered via Ctrl+C in an interactive session.
     * If we receive the signal the second time, we interpret this as
     * the user really wanting to quit ASAP without waiting to persist
     * on disk. */
    if (server.shutdown_asap && sig == SIGINT) {
        serverLogFromHandler(LL_WARNING, "You insist... exiting now.");
        rdbRemoveTempFile(getpid());
        exit(1); /* Exit with an error since this was not a clean shutdown. */
    } else if (server.loading) {
        exit(0);
    }

    serverLogFromHandler(LL_WARNING, msg);
    server.shutdown_asap = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x14(%rbp)
subl $0x2, %eax
je 0x375e2
jmp 0x375d8
movl -0x14(%rbp), %eax
subl $0xf, %eax
je 0x375ef
jmp 0x375fc
leaq 0x102dc5(%rip), %rax    # 0x13a3ae
movq %rax, -0x10(%rbp)
jmp 0x37607
leaq 0x102ddf(%rip), %rax    # 0x13a3d5
movq %rax, -0x10(%rbp)
jmp 0x37607
leaq 0x102dfa(%rip), %rax    # 0x13a3fd
movq %rax, -0x10(%rbp)
cmpl $0x0, 0x140c16(%rip)    # 0x178224
je 0x3763d
cmpl $0x2, -0x4(%rbp)
jne 0x3763d
movl $0x3, %edi
leaq 0x102e0c(%rip), %rsi    # 0x13a42e
callq 0x2fd40
callq 0x26420
movl %eax, %edi
callq 0x555f0
movl $0x1, %edi
callq 0x262d0
cmpl $0x0, 0x140eb0(%rip)    # 0x1784f4
je 0x3764d
xorl %edi, %edi
callq 0x262d0
jmp 0x3764f
movq -0x10(%rbp), %rsi
movl $0x3, %edi
callq 0x2fd40
movl $0x1, 0x140bbd(%rip)    # 0x178224
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/server.c
// Function: checkForSentinelMode
int checkForSentinelMode(int argc, char **argv) {
    int j;

    if (strstr(argv[0],"redis-sentinel") != NULL) return 1;
    for (j = 1; j < argc; j++)
        if (!strcmp(argv[j],"--sentinel")) return 1;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0x1027f4(%rip), %rsi    # 0x139e81
callq 0x266c0
cmpq $0x0, %rax
je 0x376a1
movl $0x1, -0x4(%rbp)
jmp 0x376ea
movl $0x1, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x376e3
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x1027cd(%rip), %rsi    # 0x139e90
callq 0x268f0
cmpl $0x0, %eax
jne 0x376d6
movl $0x1, -0x4(%rbp)
jmp 0x376ea
jmp 0x376d8
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x376a8
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/server.c
// Function: loadDataFromDisk
void loadDataFromDisk(void) {
    long long start = ustime();
    if (server.aof_state == AOF_ON) {
        if (loadAppendOnlyFile(server.aof_filename) == C_OK)
            serverLog(LL_NOTICE,"DB loaded from append only file: %.3f seconds",(float)(ustime()-start)/1000000);
    } else {
        if (rdbLoad(server.rdb_filename) == C_OK) {
            serverLog(LL_NOTICE,"DB loaded from disk: %.3f seconds",
                (float)(ustime()-start)/1000000);
        } else if (errno != ENOENT) {
            serverLog(LL_WARNING,"Fatal error loading the DB: %s. Exiting.",strerror(errno));
            exit(1);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x2ff30
movq %rax, -0x8(%rbp)
cmpl $0x1, 0x141128(%rip)    # 0x178840
jne 0x3775e
movq 0x141127(%rip), %rdi    # 0x178848
callq 0x72240
cmpl $0x0, %eax
jne 0x3775c
callq 0x2ff30
subq -0x8(%rbp), %rax
cvtsi2ss %rax, %xmm0
movss 0xffd93(%rip), %xmm1    # 0x1374d4
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movl $0x2, %edi
leaq 0x102746(%rip), %rsi    # 0x139e9b
movb $0x1, %al
callq 0x2fc60
jmp 0x377dc
movq 0x1411bb(%rip), %rdi    # 0x178920
callq 0x56470
cmpl $0x0, %eax
jne 0x377a2
callq 0x2ff30
subq -0x8(%rbp), %rax
cvtsi2ss %rax, %xmm0
movss 0xffd4f(%rip), %xmm1    # 0x1374d4
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movl $0x2, %edi
leaq 0x102730(%rip), %rsi    # 0x139ec9
movb $0x1, %al
callq 0x2fc60
jmp 0x377da
callq 0x26880
cmpl $0x2, (%rax)
je 0x377d8
callq 0x26880
movl (%rax), %edi
callq 0x26690
movq %rax, %rdx
movl $0x3, %edi
leaq 0x102724(%rip), %rsi    # 0x139eeb
movb $0x0, %al
callq 0x2fc60
movl $0x1, %edi
callq 0x262d0
jmp 0x377da
jmp 0x377dc
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)