LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/blocked.c
// Function: processUnblockedClients
void processUnblockedClients(void) {
    listNode *ln;
    client *c;

    while (listLength(server.unblocked_clients)) {
        ln = listFirst(server.unblocked_clients);
        serverAssert(ln != NULL);
        c = ln->value;
        listDelNode(server.unblocked_clients,ln);
        c->flags &= ~CLIENT_UNBLOCKED;
        /* Note that the client may be blocked again at this point, since
         * a new blocking command was processed. In that case we just remove
         * it from the unblocked clients list without actually processing
         * its pending query buffer. */
        if (!(c->flags & CLIENT_BLOCKED)) {
            c->btype = BLOCKED_NONE;

            /* Process remaining data in the input buffer. */
            if (c->querybuf && sdslen(c->querybuf) > 0) {
                processInputBuffer(c);
            }
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0x412ab(%rip), %r14     # 0x6a088
leaq 0x2895c(%rip), %r15     # 0x51740
movq 0x638(%r14), %rdi
cmpq $0x0, 0x28(%rdi)
je 0x28e6e
movq (%rdi), %rsi
testq %rsi, %rsi
je 0x28e74
movq 0x10(%rsi), %rbx
callq 0x12c88
movl 0x88(%rbx), %eax
movl %eax, %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
movl %ecx, 0x88(%rbx)
testb $0x10, %al
jne 0x28de4
andl $0x0, 0x90(%rbx)
movq 0x18(%rbx), %rcx
testq %rcx, %rcx
je 0x28de4
movzbl -0x1(%rcx), %eax
movl %eax, %edx
andl $0x7, %edx
cmpl $0x4, %edx
ja 0x28de4
movslq (%r15,%rdx,4), %rdx
addq %r15, %rdx
jmpq *%rdx
shrl $0x3, %eax
jmp 0x28e5c
movq -0x11(%rcx), %rax
jmp 0x28e5c
movzwl -0x5(%rcx), %eax
jmp 0x28e5c
movl -0x9(%rcx), %eax
jmp 0x28e5c
movzbl -0x3(%rcx), %eax
testq %rax, %rax
je 0x28de4
movq %rbx, %rdi
callq 0x1dfb8
jmp 0x28de4
popq %rbx
popq %r14
popq %r15
retq
leaq 0x257d7(%rip), %rdi     # 0x4e652
leaq 0x28910(%rip), %rsi     # 0x51792
pushq $0x71
popq %rdx
callq 0x240ca
pushq $0x1
popq %rdi
callq 0x12120
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/sparkline.c
// Function: sparklineSequenceAddSample
void sparklineSequenceAddSample(struct sequence *seq, double value, char *label) {
    if (seq->length == 0) {
        seq->min = seq->max = value;
    } else {
        if (value < seq->min) seq->min = value;
        else if (value > seq->max) seq->max = value;
    }
    seq->samples = zrealloc(seq->samples,sizeof(struct sample)*(seq->length+1));
    seq->samples[seq->length].value = value;
    seq->samples[seq->length].label = label;
    seq->length++;
    if (label) seq->labels++;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movslq (%rdi), %rsi
testq %rsi, %rsi
je 0x29941
movsd 0x10(%rbx), %xmm1
ucomisd %xmm0, %xmm1
ja 0x29946
ucomisd 0x18(%rbx), %xmm0
jbe 0x2994e
leaq 0x18(%rbx), %rax
jmp 0x2994a
movsd %xmm0, 0x18(%rbx)
leaq 0x10(%rbx), %rax
movsd %xmm0, (%rax)
movq 0x8(%rbx), %rdi
shlq $0x4, %rsi
addq $0x10, %rsi
movsd %xmm0, (%rsp)
callq 0x1abe3
movq %rax, 0x8(%rbx)
movslq (%rbx), %rcx
leal 0x1(%rcx), %edx
shlq $0x4, %rcx
movsd (%rsp), %xmm0
movsd %xmm0, (%rax,%rcx)
movq %r14, 0x8(%rax,%rcx)
movl %edx, (%rbx)
testq %r14, %r14
je 0x2998b
incl 0x4(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/counter.c
// Function: counterClearWantAcks
void counterClearWantAcks(counter *cntr) {
    if (cntr->want_acks == NULL) {
        cntr->want_acks = dictCreate(&clusterNodesDictType, NULL);
    } else {
        dictEmpty(cntr->want_acks, NULL);
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x40(%rdi), %rdi
testq %rdi, %rdi
je 0x29d25
xorl %esi, %esi
popq %rbx
jmp 0x15419
leaq 0x40014(%rip), %rdi     # 0x69d40
xorl %esi, %esi
callq 0x1464a
movq %rax, 0x40(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/counter.c
// Function: dictCounterDestructor
void dictCounterDestructor(void *privdata, void *val) {
    DICT_NOTUSED(privdata);
    listNode *ln;
    listIter li;
    counter *cntr = val;
    pubsub *p;

    /* Unsubscribe everyone */
    /* pubsubUnsubscribeCounter will set cntr->subscribers to NULL */
    while (cntr->subscribers != NULL) {
        ln = listFirst(cntr->subscribers);
        p  = listNodeValue(ln);
        pubsubUnsubscribeCounter(p->c,cntr->name,1);
    }

    /* Free all shards */
    listRewind(cntr->shards,&li);
    while ((ln = listNext(&li)) != NULL) {
        shard *shrd = listNodeValue(ln);
        zfree(shrd);
    }

    listRelease(cntr->shards);
    if (cntr->want_acks) dictRelease(cntr->want_acks);

    /* cntr->name will be freed by the dict code. */

    zfree(cntr);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
pushq $0x1
popq %rbp
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x29dbc
movq (%rax), %rax
movq 0x10(%rax), %rax
movq (%rax), %rdi
movq (%rbx), %rsi
movl %ebp, %edx
callq 0x2c699
jmp 0x29d9d
movq 0x8(%rbx), %rdi
movq %rsp, %r14
movq %r14, %rsi
callq 0x12d0c
movq %r14, %rdi
callq 0x12d26
testq %rax, %rax
je 0x29de3
movq 0x10(%rax), %rdi
callq 0x1ac81
jmp 0x29dcb
movq 0x8(%rbx), %rdi
callq 0x12b0a
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x29dfa
callq 0x14dad
movq %rbx, %rdi
callq 0x1ac81
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/counter.c
// Function: counterLookup
counter *counterLookup(const sds name) {
    dictEntry *de = dictFind(server.counters, name);
    if (de) {
        return dictGetVal(de);
    } else {
        return NULL;
    }
}

// Assembly:
pushq %rax
movq %rdi, %rsi
leaq 0x40272(%rip), %rax     # 0x6a088
movq 0x618(%rax), %rdi
callq 0x14dd3
testq %rax, %rax
je 0x29e2d
movq 0x8(%rax), %rax
jmp 0x29e2f
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/counter.c
// Function: counterCreate
counter *counterCreate(const sds name) {
    counter *cntr = zcalloc(sizeof(counter) + (sizeof(long double) * server.history_size));
    cntr->name      = sdsdup(name);
    cntr->shards    = listCreate();
    cntr->history   = (long double*)(cntr + 1);
    cntr->precision = server.default_precision;

    serverAssert(dictAdd(server.counters, cntr->name, cntr) == DICT_OK);

    return cntr;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x40248(%rip), %r15     # 0x6a088
movl 0x628(%r15), %edi
shlq $0x4, %rdi
addq $0x70, %rdi
callq 0x1ab83
movq %rax, %rbx
movq %r14, %rdi
callq 0x194fb
movq %rax, (%rbx)
callq 0x12aec
movq %rax, 0x8(%rbx)
leaq 0x70(%rbx), %rax
movq %rax, 0x30(%rbx)
movsd 0x620(%r15), %xmm0
movsd %xmm0, 0x50(%rbx)
movq 0x618(%r15), %rdi
movq (%rbx), %rsi
movq %rbx, %rdx
callq 0x148e3
testl %eax, %eax
jne 0x29ea0
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2813e(%rip), %rdi     # 0x51fe5
leaq 0x2812d(%rip), %rsi     # 0x51fdb
movl $0x8b, %edx
callq 0x240ca
pushq $0x1
popq %rdi
callq 0x12120
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/counter.c
// Function: counterAddShard
shard *counterAddShard(counter *cntr, clusterNode* node, const char *node_name) {
    shard *shrd = zcalloc(sizeof(shard));
    shrd->node = node;
    memcpy(shrd->node_name,node_name,CLUSTER_NAMELEN);
    if (node == myself) {
        serverAssert(cntr->myshard == NULL);
        cntr->myshard = shrd;
    }
    listAddNodeTail(cntr->shards, shrd);
    return shrd;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
pushq $0x70
popq %rdi
callq 0x1ab83
movq %rax, %rbx
movq %r12, (%rax)
movq 0x20(%r15), %rax
movq %rax, 0x28(%rbx)
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups %xmm1, 0x18(%rbx)
movups %xmm0, 0x8(%rbx)
leaq 0x546a1(%rip), %rax     # 0x7e5a0
cmpq %r12, (%rax)
jne 0x29f0f
cmpq $0x0, 0x10(%r14)
jne 0x29f2a
movq %rbx, 0x10(%r14)
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0x12bac
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x280ea(%rip), %rdi     # 0x5201b
leaq 0x280a3(%rip), %rsi     # 0x51fdb
movl $0x96, %edx
callq 0x240ca
pushq $0x1
popq %rdi
callq 0x12120
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/counter.c
// Function: countersUpdateValue
void countersUpdateValue(counter *cntr) {
    mstime_t now = mstime();
    long double elapsed;
    listNode *ln;
    listIter li;
    shard *shrd;

    cntr->value = 0;

    listRewind(cntr->shards,&li);
    while ((ln = listNext(&li)) != NULL) {
        shrd = listNodeValue(ln);

        /* Don't do a prediction with our own shard. */
        if (shrd == cntr->myshard) {
            cntr->value += shrd->value;
            continue;
        }

        elapsed = now - shrd->predict_time;
        shrd->value = shrd->predict_value + (elapsed * shrd->predict_change);

        /*if (shrd->node == NULL || nodeFailed(shrd->node)) {
            serverLog(LL_DEBUG,"Counter %s not updating shard of %.40s",
                cntr->name, shrd->node_name);
        } else if (shrd->predict_time > 0 && shrd->predict_value != 0) {
            serverLog(LL_DEBUG,"Counter %s new value %Lf for shard %.40s",
                cntr->name, shrd->value, shrd->node_name);
        } else {
            serverLog(LL_DEBUG,"Counter %s not using shard of %.40s %llu %Lf",
                cntr->name, shrd->node_name, shrd->predict_time, shrd->predict_value);
        }*/

        cntr->value += shrd->value;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
callq 0x15db3
movq %rax, %r14
fldz
fstpt 0x20(%rbx)
movq 0x8(%rbx), %rdi
leaq 0x10(%rsp), %r15
movq %r15, %rsi
callq 0x12d0c
movq %r15, %rdi
callq 0x12d26
testq %rax, %rax
je 0x29fcd
movq 0x10(%rax), %rax
cmpq 0x10(%rbx), %rax
je 0x29fc0
movq %r14, %rcx
subq 0x40(%rax), %rcx
movq %rcx, 0x8(%rsp)
fildll 0x8(%rsp)
fldt 0x50(%rax)
fldt 0x60(%rax)
fmulp %st, %st(2)
faddp %st, %st(1)
fld %st(0)
fstpt 0x30(%rax)
jmp 0x29fc3
fldt 0x30(%rax)
fldt 0x20(%rbx)
faddp %st, %st(1)
fstpt 0x20(%rbx)
jmp 0x29f88
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/counter.c
// Function: counterPubSub
void counterPubSub(counter *cntr, mstime_t now) {
    listNode *ln;
    listIter li;

    if (cntr->subscribers == NULL)
        return;

    listRewind(cntr->subscribers,&li);
    while ((ln = listNext(&li)) != NULL) {
        pubsub *p = listNodeValue(ln);

        if (p->next > now) {
            continue;
        }
        countersUpdateValue(cntr);
        if (p->lastvalue == cntr->value) {
            continue;
        }

        addReply(p->c,shared.mbulkhdr[3]);
        addReply(p->c,shared.messagebulk);
        addReplyBulkCBuffer(p->c,cntr->name,sdslen(cntr->name));
        addReplyCounter(p->c, cntr);

        p->next      = now + p->seconds*1000;
        p->lastvalue = cntr->value;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
movq 0x60(%rdi), %rdi
testq %rdi, %rdi
je 0x2a0a6
movq %rsi, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rsi
callq 0x12d0c
movq %r15, %rdi
callq 0x12d26
testq %rax, %rax
je 0x2a0a6
movq 0x10(%rax), %rbp
cmpq %rbx, 0x10(%rbp)
jg 0x2a005
movq %r14, %rdi
callq 0x29f5e
fldt 0x20(%rbp)
fldt 0x20(%r14)
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jne 0x2a039
jnp 0x2a005
movq (%rbp), %rdi
leaq 0x40754(%rip), %r12     # 0x6a798
movq 0x139e0(%r12), %rsi
callq 0x1c8e7
movq (%rbp), %rdi
movq 0xf8(%r12), %rsi
callq 0x1c8e7
movq (%rbp), %r12
movq (%r14), %r13
movq %r13, %rdi
callq 0x2a0b5
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x1d103
movq (%rbp), %rdi
movq %r14, %rsi
callq 0x29f4a
imulq $0x3e8, 0x8(%rbp), %rax # imm = 0x3E8
addq %rbx, %rax
movq %rax, 0x10(%rbp)
fldt 0x20(%r14)
fstpt 0x20(%rbp)
jmp 0x2a005
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/counter.c
// Function: counterResetShard
void counterResetShard(counter *cntr, clusterNode *node) {
    listNode *ln;
    listIter li;

    listRewind(cntr->shards,&li);
    while ((ln = listNext(&li)) != NULL) {
        shard *shrd = listNodeValue(ln);

        if (shrd->node == node) {
            cntr->value -= shrd->value;

            shrd->value = 0;
            if (shrd == cntr->myshard) {
                shrd->predict_time = 0;
            } else {
                shrd->predict_time = mstime();
            }
            shrd->predict_value = 0;
            shrd->predict_change = 0;

            server.dirty++;
            return;
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rsi
callq 0x12d0c
movq %r15, %rdi
callq 0x12d26
testq %rax, %rax
je 0x2a16e
movq 0x10(%rax), %r12
cmpq %r14, (%r12)
jne 0x2a10f
fldt 0x30(%r12)
fldt 0x20(%rbx)
fsubp %st, %st(1)
fstpt 0x20(%rbx)
fldz
fld %st(0)
fstpt 0x30(%r12)
cmpq 0x10(%rbx), %r12
je 0x2a14d
fstp %st(0)
callq 0x15db3
fldz
jmp 0x2a14f
xorl %eax, %eax
movq %rax, 0x40(%r12)
fld %st(0)
fstpt 0x50(%r12)
fstpt 0x60(%r12)
leaq 0x3ff21(%rip), %rax     # 0x6a088
incq 0x6a0(%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/counter.c
// Function: counterShardsForNode
int counterShardsForNode(clusterNode *node) {
    dictIterator *it;
    dictEntry *de;
    int count = 0;

    it = dictGetIterator(server.counters);
    while ((de = dictNext(it)) != NULL) {
        counter *cntr;
        listNode *ln;
        listIter li;
        shard *shrd;

        cntr = dictGetVal(de);

        listRewind(cntr->shards,&li);
        while ((ln = listNext(&li)) != NULL) {
            shrd = listNodeValue(ln);

            if (shrd->node == node) {
                count++;
            }
        }
    }
    dictReleaseIterator(it);

    return count;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x3fefa(%rip), %rax     # 0x6a088
movq 0x618(%rax), %rdi
callq 0x14f27
movq %rax, %r14
xorl %ebp, %ebp
leaq 0x8(%rsp), %r15
movq %r14, %rdi
callq 0x14f5b
testq %rax, %rax
je 0x2a1de
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
movq %r15, %rsi
callq 0x12d0c
movq %r15, %rdi
callq 0x12d26
testq %rax, %rax
je 0x2a1a4
movq 0x10(%rax), %rax
xorl %ecx, %ecx
cmpq %rbx, (%rax)
sete %cl
addl %ecx, %ebp
jmp 0x2a1c1
movq %r14, %rdi
callq 0x1501c
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/counter.c
// Function: counterDeleteShards
void counterDeleteShards(clusterNode *node) {
    dictIterator *it;
    dictEntry *de;

    it = dictGetSafeIterator(server.counters);
    while ((de = dictNext(it)) != NULL) {
        counter *cntr;
        listIter li;
        listNode *ln;

        cntr = dictGetVal(de);

        listRewind(cntr->shards, &li);
        while ((ln = listNext(&li)) != NULL) {
            shard *shrd = listNodeValue(ln);
            if (shrd->node == node) {
                if (shrd == cntr->myshard) {
                    cntr->myshard = NULL;
                }
                listDelNode(cntr->shards, ln);
            }
        }
    }
    dictReleaseIterator(it);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x3fe80(%rip), %rax     # 0x6a088
movq 0x618(%rax), %rdi
callq 0x14f4c
movq %rax, %r14
leaq 0x8(%rsp), %r15
movq %r14, %rdi
callq 0x14f5b
testq %rax, %rax
je 0x2a26c
movq 0x8(%rax), %r12
movq 0x8(%r12), %rdi
movq %r15, %rsi
callq 0x12d0c
movq %r15, %rdi
callq 0x12d26
testq %rax, %rax
je 0x2a21c
movq 0x10(%rax), %rcx
cmpq %rbx, (%rcx)
jne 0x2a23a
cmpq 0x10(%r12), %rcx
jne 0x2a25d
andq $0x0, 0x10(%r12)
movq 0x8(%r12), %rdi
movq %rax, %rsi
callq 0x12c88
jmp 0x2a23a
movq %r14, %rdi
callq 0x1501c
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/counter.c
// Function: existsCommand
void existsCommand(client *c) {
    long long count = 0;
    int j;

    for (j = 1; j < c->argc; j++) {
        if (counterLookup(c->argv[j]->ptr) != NULL) count++;
    }
    addReplyLongLong(c,count);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x1
popq %r15
xorl %r14d, %r14d
movslq 0x28(%rbx), %rax
cmpq %rax, %r15
jge 0x2a2b6
movq 0x30(%rbx), %rax
movq (%rax,%r15,8), %rax
movq 0x8(%rax), %rdi
callq 0x29e0b
cmpq $0x1, %rax
sbbq $-0x1, %r14
incq %r15
jmp 0x2a28f
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x1d00a
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/counter.c
// Function: genericIncrCommand
void genericIncrCommand(client *c, const sds name, long double increment) {
    counter *cntr;

    cntr = counterLookup(name);
    if (cntr == NULL) {
        cntr = counterCreate(name);
    }

    if (cntr->myshard == NULL) {
        counterAddShard(cntr, myself, myself->name);
    }

    long double newshardvalue = cntr->myshard->value + increment;
    if (newshardvalue > COUNTER_MAX) {
        addReplyErrorFormat(c, "Counter value out of allowed range");
        return;
    } else if (newshardvalue < COUNTER_MIN) {
        addReplyErrorFormat(c, "Counter value out of allowed range");
        return;
    }

    countersUpdateValue(cntr);

    long double newvalue = cntr->value + increment;
    if (newvalue > COUNTER_MAX) {
        addReplyErrorFormat(c, "Counter value out of allowed range");
        return;
    } else if (newvalue < COUNTER_MIN) {
        addReplyErrorFormat(c, "Counter value out of allowed range");
        return;
    }

    cntr->myshard->value = newshardvalue;
    cntr->value = newvalue;
    server.dirty++;
    addReplyCounter(c,cntr);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r15
movq %rdi, %rbx
fldt 0x50(%rsp)
fstpt (%rsp)
movq %rsi, %rdi
callq 0x29e0b
movq %rax, %r14
testq %rax, %rax
jne 0x2a2f7
movq %r15, %rdi
callq 0x29e31
movq %rax, %r14
movq 0x10(%r14), %rax
testq %rax, %rax
jne 0x2a319
leaq 0x54299(%rip), %rax     # 0x7e5a0
movq (%rax), %rdx
movq %r14, %rdi
movq %rdx, %rsi
callq 0x29ec0
movq 0x10(%r14), %rax
fldt 0x30(%rax)
fldt (%rsp)
faddp %st, %st(1)
fldl 0x27c69(%rip)           # 0x51f90
fxch %st(1)
fucomi %st(1), %st
jbe 0x2a331
fstp %st(0)
jmp 0x2a372
fldl 0x27c61(%rip)           # 0x51f98
fucomi %st(1), %st
jbe 0x2a341
fstp %st(1)
fstp %st(1)
jmp 0x2a372
fstpt 0x18(%rsp)
fstpt 0xc(%rsp)
movq %r14, %rdi
fstpt 0x24(%rsp)
callq 0x29f5e
fldt 0x20(%r14)
fldt (%rsp)
faddp %st, %st(1)
fldt 0x24(%rsp)
fxch %st(1)
fucomi %st(1), %st
fstp %st(1)
ja 0x2a372
fldt 0x18(%rsp)
fucompi %st(1), %st
jbe 0x2a38e
fstp %st(0)
leaq 0x27cb6(%rip), %rsi     # 0x52031
movq %rbx, %rdi
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x1caf6
movq 0x10(%r14), %rax
fldt 0xc(%rsp)
fstpt 0x30(%rax)
fstpt 0x20(%r14)
leaq 0x3fce4(%rip), %rax     # 0x6a088
incq 0x6a0(%rax)
movq %rbx, %rdi
movq %r14, %rsi
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x29f4a
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/counter.c
// Function: getCommand
void getCommand(client *c) {
    counter *cntr;

    cntr = counterLookup(c->argv[1]->ptr);
    if (cntr == NULL) {
        if (c->argc == 2) {
            addReplyString(c,OBJ_SHARED_0STR,sizeof(OBJ_SHARED_0STR)-1);
        } else if (!strcasecmp(c->argv[2]->ptr,"state")) {
            addReplyMultiBulkLen(c,2);
            addReplyString(c,OBJ_SHARED_0STR,sizeof(OBJ_SHARED_0STR)-1);
            if (server.cluster->failing_nodes_count > 0) {
                addReplyString(c, OBJ_SHARED_INCONSISTENT, sizeof(OBJ_SHARED_INCONSISTENT)-1);
            } else {
                addReplyString(c, OBJ_SHARED_CONSISTENT, sizeof(OBJ_SHARED_CONSISTENT)-1);
            }
        }
        return;
    }

    countersUpdateValue(cntr);

    if (c->argc == 2) {
        addReplyCounter(c,cntr);
    } else if (!strcasecmp(c->argv[2]->ptr,"state")) {
        addReplyMultiBulkLen(c,2);
        addReplyCounter(c,cntr);
        if (server.cluster->failing_nodes_count > 0) {
            addReplyString(c, OBJ_SHARED_INCONSISTENT, sizeof(OBJ_SHARED_INCONSISTENT)-1);
        } else {
            addReplyString(c, OBJ_SHARED_CONSISTENT, sizeof(OBJ_SHARED_CONSISTENT)-1);
        }
    } else {
        addReplyErrorFormat(c, "Unknown GET option '%s'",
            (char*)c->argv[2]->ptr);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x30(%rdi), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
callq 0x29e0b
testq %rax, %rax
je 0x2a503
movq %rax, %r14
movq %rax, %rdi
callq 0x29f5e
cmpl $0x2, 0x28(%rbx)
jne 0x2a517
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x29f4a
cmpl $0x2, 0x28(%rbx)
jne 0x2a54f
leaq 0x27b44(%rip), %rsi     # 0x52054
pushq $0x7
jmp 0x2a5ce
movq 0x30(%rbx), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %r15
leaq 0x27b32(%rip), %rsi     # 0x5205c
movq %r15, %rdi
callq 0x12090
testl %eax, %eax
je 0x2a571
leaq 0x27b4b(%rip), %rsi     # 0x52088
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x1caf6
movq 0x30(%rbx), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x27afa(%rip), %rsi     # 0x5205c
callq 0x12090
testl %eax, %eax
je 0x2a589
popq %rbx
popq %r14
popq %r15
retq
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x1d03d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x29f4a
jmp 0x2a5a6
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x1d03d
leaq 0x27ab9(%rip), %rsi     # 0x52054
pushq $0x7
popq %rdx
movq %rbx, %rdi
callq 0x1ca4b
leaq 0x3fadb(%rip), %rax     # 0x6a088
movq 0x668(%rax), %rax
cmpl $0x0, 0x3c(%rax)
jle 0x2a5c5
leaq 0x27aa1(%rip), %rsi     # 0x52062
pushq $0x13
jmp 0x2a5ce
leaq 0x27aaa(%rip), %rsi     # 0x52076
pushq $0x11
popq %rdx
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1ca4b
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/counter.c
// Function: mgetCommand
void mgetCommand(client *c) {
    counter *cntr;
    int j;

    addReplyMultiBulkLen(c,c->argc-1);
    for (j = 1; j < c->argc; j++) {
        cntr = counterLookup(c->argv[j]->ptr);

        if (cntr == NULL) {
            addReplyString(c,OBJ_SHARED_0STR,sizeof(OBJ_SHARED_0STR)-1);
        } else {
            addReplyCounter(c,cntr);
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq 0x28(%rdi), %rsi
decq %rsi
callq 0x1d03d
pushq $0x1
popq %r12
leaq 0x27a56(%rip), %r14     # 0x52054
pushq $0x7
popq %r15
movslq 0x28(%rbx), %rax
cmpq %rax, %r12
jge 0x2a63e
movq 0x30(%rbx), %rax
movq (%rax,%r12,8), %rax
movq 0x8(%rax), %rdi
callq 0x29e0b
movq %rbx, %rdi
testq %rax, %rax
je 0x2a62e
movq %rax, %rsi
callq 0x29f4a
jmp 0x2a639
movq %r14, %rsi
movq %r15, %rdx
callq 0x1ca4b
incq %r12
jmp 0x2a602
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/counter.c
// Function: precisionCommand
void precisionCommand(client *c) {
    counter *cntr;
    double precision;

    cntr = counterLookup(c->argv[1]->ptr);
    if (cntr == NULL && c->argc == 2) {
        /* Counter doesn't exist, return the default precision. */
        addReplyDouble(c, server.default_precision);
        return;
    }

    if (c->argc == 2) {
        addReplyDouble(c, cntr->precision);
        return;
    }

    if (getDoubleFromObjectOrReply(c, c->argv[2], &precision, NULL) != C_OK)
        return;

    if (cntr == NULL) {
        cntr = counterCreate(c->argv[1]->ptr);
    }

    cntr->precision = precision;
    server.dirty++;
    addReplyDouble(c, cntr->precision);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x30(%rdi), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
callq 0x29e0b
movq %rax, %r14
movl 0x28(%rbx), %eax
testq %r14, %r14
je 0x2a7ad
cmpl $0x2, %eax
jne 0x2a7d0
movsd 0x50(%r14), %xmm0
jmp 0x2a7c1
cmpl $0x2, %eax
jne 0x2a7d0
leaq 0x3f8cf(%rip), %rax     # 0x6a088
movsd 0x620(%rax), %xmm0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1cdb8
movq 0x30(%rbx), %rax
movq 0x10(%rax), %rsi
movq %rsp, %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x20148
testl %eax, %eax
jne 0x2a823
testq %r14, %r14
jne 0x2a802
movq 0x30(%rbx), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
callq 0x29e31
movq %rax, %r14
movsd (%rsp), %xmm0
movsd %xmm0, 0x50(%r14)
leaq 0x3f874(%rip), %rax     # 0x6a088
incq 0x6a0(%rax)
movq %rbx, %rdi
callq 0x1cdb8
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/counter.c
// Function: keysCommand
void keysCommand(client *c) {
    dictIterator *di;
    dictEntry *de;
    sds pattern = c->argv[1]->ptr;
    int plen = sdslen(pattern), allkeys;
    unsigned long numkeys = 0;
    void *replylen = addDeferredMultiBulkLength(c);

    di = dictGetSafeIterator(server.counters);
    allkeys = (pattern[0] == '*' && pattern[1] == '\0');
    while((de = dictNext(di)) != NULL) {
        sds key = dictGetKey(de);
        robj *keyobj;

        if (allkeys || stringmatchlen(pattern,plen,key,sdslen(key),0)) {
            keyobj = createStringObject(key,sdslen(key));
            addReplyBulk(c,keyobj);
            numkeys++;
            decrRefCount(keyobj);
        }
    }
    dictReleaseIterator(di);
    setDeferredMultiBulkLength(c,replylen,numkeys);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x30(%rdi), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %r14
movq %r14, %rdi
callq 0x2a0b5
movq %rax, %r12
movq %rbx, 0x8(%rsp)
movq %rbx, %rdi
callq 0x1cd0d
movq %rax, 0x10(%rsp)
leaq 0x3f81c(%rip), %rax     # 0x6a088
movq 0x618(%rax), %rdi
callq 0x14f4c
movq %rax, %r13
cmpb $0x2a, (%r14)
jne 0x2a88b
cmpb $0x0, 0x1(%r14)
sete %bl
jmp 0x2a88d
xorl %ebx, %ebx
xorl %ebp, %ebp
movq %r13, %rdi
callq 0x14f5b
testq %rax, %rax
je 0x2a8f2
movq (%rax), %r15
testb %bl, %bl
jne 0x2a8c2
movq %r15, %rdi
callq 0x2a0b5
movq %r14, %rdi
movl %r12d, %esi
movq %r15, %rdx
movl %eax, %ecx
xorl %r8d, %r8d
callq 0x1ee74
testl %eax, %eax
je 0x2a88f
movq %r15, %rdi
callq 0x2a0b5
movq %r15, %rdi
movq %rax, %rsi
callq 0x1f9d5
movq %rax, %r15
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x1d0d0
incq %rbp
movq %r15, %rdi
callq 0x1fb84
jmp 0x2a88f
movq %r13, %rdi
callq 0x1501c
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rbp, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1cd33
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/counter.c
// Function: mincrbyCommand
void mincrbyCommand(client *c) {
    int j;
    long double increment;

    if (getLongDoubleFromObjectOrReply(c,c->argv[1],&increment,NULL) != C_OK)
        return;

    addReplyMultiBulkLen(c,c->argc-2);
    for (j = 2; j < c->argc; j++) {
        genericIncrCommand(c, c->argv[j]->ptr, increment);
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x30(%rdi), %rax
movq 0x8(%rax), %rsi
leaq 0x10(%rsp), %rdx
xorl %ecx, %ecx
callq 0x20298
testl %eax, %eax
je 0x2a944
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movslq 0x28(%rbx), %rsi
addq $-0x2, %rsi
movq %rbx, %rdi
callq 0x1d03d
pushq $0x2
popq %r14
movslq 0x28(%rbx), %rax
cmpq %rax, %r14
jge 0x2a93c
movq 0x30(%rbx), %rax
movq (%rax,%r14,8), %rax
movq 0x8(%rax), %rsi
fldt 0x10(%rsp)
fstpt (%rsp)
movq %rbx, %rdi
callq 0x2a2c6
incq %r14
jmp 0x2a958
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/counter.c
// Function: countersSync
void countersSync(clusterNode *node) {
    dictIterator *it;
    dictEntry *de;

    it = dictGetIterator(server.counters);
    while ((de = dictNext(it)) != NULL) {
        counter *cntr;
        listNode *ln;
        listIter li;
        shard *shrd;

        cntr = dictGetVal(de);

        /* If we have our own shard make sure to send it's prediction
         * to the new node. */
        if (cntr->myshard) {
            clusterSendShardToNode(cntr, node);
        }

        listRewind(cntr->shards,&li);
        while ((ln = listNext(&li)) != NULL) {
            shrd = listNodeValue(ln);

            if (memcmp(shrd->node_name, node->name, CLUSTER_NAMELEN) == 0) {
                shrd->node = node;
            }
        }
    }
    dictReleaseIterator(it);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x3f6f0(%rip), %rax     # 0x6a088
movq 0x618(%rax), %rdi
callq 0x14f27
movq %rax, %r14
movq %rsp, %r15
pushq $0x28
popq %r12
movq %r14, %rdi
callq 0x14f5b
testq %rax, %rax
je 0x2aa07
movq 0x8(%rax), %r13
cmpq $0x0, 0x10(%r13)
je 0x2a9d1
movq %r13, %rdi
movq %rbx, %rsi
callq 0x27a30
movq 0x8(%r13), %rdi
movq %r15, %rsi
callq 0x12d0c
movq %r15, %rdi
callq 0x12d26
testq %rax, %rax
je 0x2a9ae
movq 0x10(%rax), %r13
leaq 0x8(%r13), %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x12610
testl %eax, %eax
jne 0x2a9dd
movq %rbx, (%r13)
jmp 0x2a9dd
movq %r14, %rdi
callq 0x1501c
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/counter.c
// Function: counterMaybeResend
void counterMaybeResend(counter *cntr) {
    clusterNode *node;
    int i;

    /* No acks to send? */
    if (cntr->want_acks == NULL || dictSize(cntr->want_acks) == 0) {
        return;
    }

    /* Too soon? */
    if (cntr->updated > mstime()-5000) {
        return;
    }

    /* Only check reachable nodes that have a valid link. */
    for (i = 0; i < server.cluster->reachable_nodes_count; i++) {
        node = server.cluster->reachable_nodes[i];

        if (node->link == NULL) continue;

        if (dictFind(cntr->want_acks, node->name) != NULL) {
            clusterSendShardToNode(cntr, node);
        }
    }
}

// Assembly:
movq 0x40(%rdi), %rax
testq %rax, %rax
je 0x2aa5a
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x28(%rax), %rcx
addq 0x48(%rax), %rcx
je 0x2aa4f
movq %rdi, %rbx
movq 0x48(%rdi), %r14
callq 0x15db3
addq $-0x1388, %rax          # imm = 0xEC78
cmpq %rax, %r14
jle 0x2aa5b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorl %r15d, %r15d
leaq 0x3f623(%rip), %r12     # 0x6a088
movq 0x668(%r12), %rax
movslq 0x38(%rax), %rcx
cmpq %rcx, %r15
jge 0x2aa4f
movq 0x30(%rax), %rax
movq (%rax,%r15,8), %r14
cmpq $0x0, 0x88(%r14)
je 0x2aaa4
movq 0x40(%rbx), %rdi
movq %r14, %rsi
callq 0x14dd3
testq %rax, %rax
je 0x2aaa4
movq %rbx, %rdi
movq %r14, %rsi
callq 0x27a30
incq %r15
jmp 0x2aa65
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/counter.c
// Function: countersCleanupCron
void countersCleanupCron(void) {
    dictIterator *it;
    dictEntry *de;
    mstime_t notafter = mstime() - 2000; /* Don't delete counters that changed in the last N milliseconds. */

    it = dictGetSafeIterator(server.counters);
    while ((de = dictNext(it)) != NULL) {
        counter *cntr;
        listIter li;
        listNode *ln;

        cntr = dictGetVal(de);

        // Don't delete counters that might haven't synced yet.
        if (cntr->want_acks != NULL && dictSize(cntr->want_acks) > 0) {
            continue;
        }

        listRewind(cntr->shards, &li);
        while ((ln = listNext(&li)) != NULL) {
            shard *shrd = listNodeValue(ln);
            if (shrd->predict_time == 0 || shrd->predict_time > notafter) {
                continue;
            }
            if (shrd->value == 0 && shrd->predict_value == 0 && shrd->predict_change == 0) {
                if (shrd == cntr->myshard) {
                    cntr->myshard = NULL;
                }
                listDelNode(cntr->shards, ln);
            }
        }

        if (listLength(cntr->shards) == 0) {
            /* Don't delete counters that have subscribers as they keep
             * a pointer to the counter.
             */
            if (cntr->subscribers == NULL) {
                dictDelete(server.counters, cntr->name);
            }
        }
    }
    dictReleaseIterator(it);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
callq 0x15db3
movq %rax, %rbx
addq $-0x7d0, %rbx           # imm = 0xF830
leaq 0x3f3a9(%rip), %r12     # 0x6a088
movq 0x618(%r12), %rdi
callq 0x14f4c
movq %rax, %r14
movq %rsp, %r15
movq %r14, %rdi
callq 0x14f5b
testq %rax, %rax
je 0x2adbb
movq 0x8(%rax), %r13
movq 0x40(%r13), %rax
testq %rax, %rax
je 0x2ad1a
movq 0x28(%rax), %rcx
addq 0x48(%rax), %rcx
jne 0x2acf2
movq 0x8(%r13), %rdi
movq %r15, %rsi
callq 0x12d0c
movq %r15, %rdi
callq 0x12d26
testq %rax, %rax
je 0x2ad8b
movq 0x10(%rax), %rcx
movq 0x40(%rcx), %rdx
testq %rdx, %rdx
je 0x2ad26
cmpq %rbx, %rdx
jg 0x2ad26
fldt 0x30(%rcx)
fldz
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jne 0x2ad26
jp 0x2ad26
fldt 0x50(%rcx)
fldz
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jne 0x2ad26
jp 0x2ad26
fldt 0x60(%rcx)
fldz
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jne 0x2ad26
jp 0x2ad26
cmpq 0x10(%r13), %rcx
jne 0x2ad7d
andq $0x0, 0x10(%r13)
movq 0x8(%r13), %rdi
movq %rax, %rsi
callq 0x12c88
jmp 0x2ad26
movq 0x8(%r13), %rax
cmpq $0x0, 0x28(%rax)
jne 0x2acf2
cmpq $0x0, 0x60(%r13)
jne 0x2acf2
movq 0x618(%r12), %rdi
movq (%r13), %rsi
callq 0x14b54
jmp 0x2acf2
movq %r14, %rdi
callq 0x1501c
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/ddb.c
// Function: ddbSaveRawString
ssize_t ddbSaveRawString(rio *ddb, unsigned char *s, size_t len) {
    ssize_t n, nwritten = 0;

    if ((n = ddbSaveLen(ddb,len)) == -1) return -1;
    nwritten += n;
    if (len > 0) {
        if (ddbWriteRaw(ddb,s,len) == -1) return -1;
        nwritten += len;
    }
    return nwritten;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movl %r14d, %esi
callq 0x2af06
cmpl $-0x1, %eax
je 0x2af85
movslq %eax, %rbx
testq %r14, %r14
je 0x2af88
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2ae09
addq %r14, %rbx
cmpl $-0x1, %eax
pushq $-0x1
popq %rax
cmoveq %rax, %rbx
jmp 0x2af88
pushq $-0x1
popq %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/ddb.c
// Function: ddbLoadSds
sds ddbLoadSds(rio *ddb, sds s) {
    uint32_t len;

    len = ddbLoadLen(ddb);

    if (len == DDB_LENERR) {
        if (s) sdsfree(s);
        return NULL;
    }

    if (s == NULL) {
        s = sdsnewlen(NULL,len);
    } else {
        sdsclear(s);
        s = sdsgrowzero(s, len);
    }
    if (len && rioRead(ddb,s,len) == 0) {
        sdsfree(s);
        return NULL;
    }
    sdssetlen(s,len);
    return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
callq 0x2af1b
cmpl $-0x1, %eax
je 0x2afcd
movl %eax, %ebp
movl %eax, %r14d
testq %rbx, %rbx
je 0x2afd4
movq %rbx, %rdi
callq 0x195b3
movq %rbx, %rdi
movq %r14, %rsi
callq 0x19a76
jmp 0x2afde
testq %rbx, %rbx
jne 0x2b01e
jmp 0x2b026
xorl %edi, %edi
movq %r14, %rsi
callq 0x19398
movq %rax, %rbx
testl %ebp, %ebp
je 0x2aff8
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2ae50
testq %rax, %rax
je 0x2b01e
movzbl -0x1(%rbx), %eax
andl $0x7, %eax
cmpl $0x4, %eax
ja 0x2b028
leaq 0x270f5(%rip), %rcx     # 0x52100
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
shlb $0x3, %bpl
movb %bpl, -0x1(%rbx)
jmp 0x2b028
movq %rbx, %rdi
callq 0x19548
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %r14, -0x11(%rbx)
jmp 0x2b028
movw %bp, -0x5(%rbx)
jmp 0x2b028
movl %ebp, -0x9(%rbx)
jmp 0x2b028
movb %bpl, -0x3(%rbx)
jmp 0x2b028
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/ddb.c
// Function: ddbSaveLongDouble
int ddbSaveLongDouble(rio *ddb, long double val) {
    unsigned char buf[128];
    int len;

    if (isnan(val)) {
        buf[0] = 253;
        len = 1;
    } else if (!isfinite(val)) {
        len = 1;
        buf[0] = (val < 0) ? 255 : 254;
    } else {
        snprintf((char*)buf+1,sizeof(buf)-1,"%.17Lg",val);
        buf[0] = strlen((char*)buf+1);
        len = buf[0]+1;
    }
    return ddbWriteRaw(ddb,buf,len);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movq %rdi, %rbx
fldt 0xc0(%rsp)
fucomi %st(0), %st
jp 0x2b0f8
fld %st(0)
fstpt 0x10(%rsp)
movq 0x10(%rsp), %rax
shrq $0x3f, %rax
movzwl 0x18(%rsp), %ecx
andl $0x7fff, %ecx           # imm = 0x7FFF
leal -0x1(%rcx), %edx
movzwl %dx, %edx
cmpl $0x7ffe, %edx           # imm = 0x7FFE
setb %dl
andb %al, %dl
testq %rcx, %rcx
sete %al
orb %dl, %al
jne 0x2b0b2
fldz
fucompi %st(1), %st
fstp %st(0)
seta %al
orb $-0x2, %al
movb %al, 0x20(%rsp)
pushq $0x1
popq %rdx
jmp 0x2b0e0
leaq 0x21(%rsp), %r14
fstpt (%rsp)
leaq 0x2353b(%rip), %rdx     # 0x4e5fc
pushq $0x7f
popq %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x122d0
movq %r14, %rdi
callq 0x12250
movb %al, -0x1(%r14)
movzbl %al, %edx
incq %rdx
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x2ae09
addq $0xa8, %rsp
popq %rbx
popq %r14
retq
fstp %st(0)
movb $-0x3, 0x20(%rsp)
jmp 0x2b0ad
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/ddb.c
// Function: ddbLoadLongDouble
int ddbLoadLongDouble(rio *ddb, long double *val) {
    char buf[256];
    unsigned char len;

    if (rioRead(ddb,&len,1) == 0) return -1;
    switch(len) {
    case 255: *val = R_NegInf; return 0;
    case 254: *val = R_PosInf; return 0;
    case 253: *val = R_Nan; return 0;
    default:
        if (rioRead(ddb,buf,len) == 0) return -1;
        buf[len] = '\0';
        sscanf(buf, "%Lg", val);
        if (*val > COUNTER_MAX || *val < COUNTER_MIN) {
            *val = 0;
        }
        return 0;
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x110, %rsp            # imm = 0x110
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xf(%rsp), %rsi
pushq $0x1
popq %rdx
callq 0x2ae50
pushq $-0x1
popq %rbp
testq %rax, %rax
je 0x2b163
movzbl 0xf(%rsp), %edx
cmpl $0xfd, %edx
je 0x2b156
cmpl $0xfe, %edx
je 0x2b14d
cmpl $0xff, %edx
jne 0x2b175
leaq 0x53225(%rip), %rax     # 0x7e370
jmp 0x2b15d
leaq 0x53214(%rip), %rax     # 0x7e368
jmp 0x2b15d
leaq 0x5321b(%rip), %rax     # 0x7e378
fldl (%rax)
fstpt (%rbx)
xorl %ebp, %ebp
fldz
fstp %st(0)
movl %ebp, %eax
addq $0x110, %rsp            # imm = 0x110
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x2ae50
testq %rax, %rax
fldz
je 0x2b165
fstp %st(0)
movzbl 0xf(%rsp), %eax
movb $0x0, 0x10(%rsp,%rax)
leaq 0x26fdc(%rip), %rsi     # 0x52178
xorl %ebp, %ebp
leaq 0x10(%rsp), %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x125e0
fldt (%rbx)
fabs
fldz
fldl 0x26dd7(%rip)           # 0x51f90
fxch %st(2)
fucompi %st(2), %st
fstp %st(1)
jbe 0x2b165
jmp 0x2b15f
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/ddb.c
// Function: ddbSave
int ddbSave(char *filename) {
    char tmpfile[256];
    FILE *fp;
    rio ddb;
    int error = 0;

    snprintf(tmpfile,256,"temp-%d.ddb", (int) getpid());
    fp = fopen(tmpfile,"w");
    if (!fp) {
        serverLog(LL_WARNING, "Failed opening .ddb for saving: %s",
            strerror(errno));
        return C_ERR;
    }

    rioInitWithFile(&ddb,fp);
    if (ddbSaveRio(&ddb,&error) == C_ERR) {
        errno = error;
        goto werr;
    }

    /* Make sure data will not remain on the OS's output buffers */
    if (fflush(fp) == EOF) goto werr;
    if (fsync(fileno(fp)) == -1) goto werr;
    if (fclose(fp) == EOF) goto werr;

    /* Use RENAME to make sure the DB file is changed atomically only
     * if the generate DB file is ok. */
    if (rename(tmpfile,filename) == -1) {
        serverLog(LL_WARNING,"Error moving temp DB file on the final destination: %s", strerror(errno));
        unlink(tmpfile);
        return C_ERR;
    }
    serverLog(LL_NOTICE,"DB saved on disk");
    server.dirty = 0;
    server.lastsave = time(NULL);
    server.lastbgsave_status = C_OK;
    return C_OK;

werr:
    serverLog(LL_WARNING,"Write error saving DB on disk: %s", strerror(errno));
    fclose(fp);
    unlink(tmpfile);
    return C_ERR;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x178, %rsp            # imm = 0x178
movq %rdi, %r14
andl $0x0, 0xc(%rsp)
callq 0x121f0
leaq 0x26baa(%rip), %rdx     # 0x52187
leaq 0x10(%rsp), %rbx
movl $0x100, %esi            # imm = 0x100
movq %rbx, %rdi
movl %eax, %ecx
xorl %eax, %eax
callq 0x122d0
leaq 0x23773(%rip), %rsi     # 0x4ed6d
movq %rbx, %rdi
callq 0x124f0
testq %rax, %rax
je 0x2b6bd
movq %rax, %rbx
leaq 0x110(%rsp), %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0x2bfd5
leaq 0xc(%rsp), %rsi
movq %r15, %rdi
callq 0x2b3f1
cmpl $-0x1, %eax
je 0x2b6df
movq %rbx, %rdi
callq 0x125d0
cmpl $-0x1, %eax
je 0x2b6ea
movq %rbx, %rdi
callq 0x12550
movl %eax, %edi
callq 0x12730
cmpl $-0x1, %eax
je 0x2b6ea
movq %rbx, %rdi
callq 0x12220
cmpl $-0x1, %eax
je 0x2b6ea
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x127a0
cmpl $-0x1, %eax
je 0x2b72f
leaq 0x26b63(%rip), %rsi     # 0x521ed
xorl %ebx, %ebx
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0x15b9e
leaq 0x3e9eb(%rip), %r14     # 0x6a088
andq $0x0, 0x6a0(%r14)
xorl %edi, %edi
callq 0x12540
movq %rax, 0x6d8(%r14)
andl $0x0, 0x6fc(%r14)
jmp 0x2b71f
callq 0x120d0
movl (%rax), %edi
callq 0x128e0
leaq 0x26ac3(%rip), %rsi     # 0x52193
pushq $0x3
popq %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x15b9e
jmp 0x2b71c
movl 0xc(%rsp), %ebp
callq 0x120d0
movl %ebp, (%rax)
callq 0x120d0
movl (%rax), %edi
callq 0x128e0
leaq 0x26b01(%rip), %rsi     # 0x521fe
pushq $0x3
popq %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x15b9e
movq %rbx, %rdi
callq 0x12220
leaq 0x10(%rsp), %rdi
callq 0x120f0
pushq $-0x1
popq %rbx
movl %ebx, %eax
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x120d0
movl (%rax), %edi
callq 0x128e0
leaq 0x26a74(%rip), %rsi     # 0x521b6
pushq $0x3
popq %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x15b9e
jmp 0x2b712
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/ddb.c
// Function: ddbLoadProgressCallback
void ddbLoadProgressCallback(rio *r, const void *buf, size_t len) {
    if (server.ddb_checksum)
        rioGenericUpdateChecksum(r, buf, len);
    if (server.loading_process_events_interval_bytes &&
        (r->processed_bytes + len)/server.loading_process_events_interval_bytes > r->processed_bytes/server.loading_process_events_interval_bytes)
    {
        /* The DB can take some non trivial amount of time to load. Update
         * our cached time since it is used to create and update the last
         * interaction time with clients and for other important things. */
        updateCachedTime();
        loadingProgress(r->processed_bytes);
        processEventsWhileBlocked();
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x3e4b8(%rip), %r15     # 0x6a088
cmpl $0x0, 0x6d4(%r15)
je 0x2bbe5
movq %rbx, %rdi
movq %r14, %rdx
callq 0x2c09c
movq 0x340(%r15), %rdi
testq %rdi, %rdi
je 0x2bc28
movq 0x30(%rbx), %rcx
addq %rcx, %r14
movq %r14, %rax
xorl %edx, %edx
divq %rdi
movq %rax, %rsi
movq %rcx, %rax
xorl %edx, %edx
divq %rdi
cmpq %rax, %rsi
jbe 0x2bc28
callq 0x1631a
movq 0x30(%rbx), %rdi
callq 0x2bb78
popq %rbx
popq %r14
popq %r15
jmp 0x1ee2e
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/ddb.c
// Function: backgroundSaveDoneHandlerDisk
void backgroundSaveDoneHandlerDisk(int exitcode, int bysignal) {
    if (!bysignal && exitcode == 0) {
        serverLog(LL_NOTICE,
            "Background saving terminated with success");
        server.dirty = server.dirty - server.dirty_before_bgsave;
        server.lastsave = time(NULL);
        server.lastbgsave_status = C_OK;
    } else if (!bysignal && exitcode != 0) {
        serverLog(LL_WARNING, "Background saving error");
        server.lastbgsave_status = C_ERR;
    } else {
        mstime_t latency;

        serverLog(LL_WARNING,
            "Background saving terminated by signal %d", bysignal);
        latencyStartMonitor(latency);
        ddbRemoveTempFile(server.ddb_child_pid);
        latencyEndMonitor(latency);
        latencyAddSampleIfNeeded("ddb-unlink-temp-file",latency);
        /* SIGUSR1 is whitelisted, so we have a way to kill a child without
         * tirggering an error conditon. */
        if (bysignal != SIGUSR1)
            server.lastbgsave_status = C_ERR;
    }
    server.ddb_child_pid = -1;
    server.ddb_child_type = DDB_CHILD_TYPE_NONE;
    server.ddb_save_time_last = time(NULL)-server.ddb_save_time_start;
    server.ddb_save_time_start = -1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %eax
orl %edi, %eax
je 0x2bdda
movl %esi, %ebx
testl %esi, %esi
setne %al
testl %edi, %edi
sete %cl
orb %al, %cl
jne 0x2be12
leaq 0x265c0(%rip), %rsi     # 0x5238b
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x15b9e
jmp 0x2be8a
leaq 0x26580(%rip), %rsi     # 0x52361
xorl %ebx, %ebx
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0x15b9e
leaq 0x3e294(%rip), %r14     # 0x6a088
movq 0x6a8(%r14), %rax
subq %rax, 0x6a0(%r14)
xorl %edi, %edi
callq 0x12540
movq %rax, 0x6d8(%r14)
jmp 0x2be8d
leaq 0x2658a(%rip), %rsi     # 0x523a3
xorl %r14d, %r14d
pushq $0x3
popq %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x15b9e
leaq 0x3e259(%rip), %r15     # 0x6a088
cmpq $0x0, 0x670(%r15)
je 0x2be41
callq 0x15db3
movq %rax, %r14
movl 0x6b0(%r15), %edi
callq 0x2b90e
cmpq $0x0, 0x670(%r15)
je 0x2be85
callq 0x15db3
subq %r14, %rax
movq 0x670(%r15), %rcx
testq %rcx, %rcx
sete %dl
cmpq %rcx, %rax
setl %cl
orb %dl, %cl
jne 0x2be85
leaq 0x25b30(%rip), %rdi     # 0x519ad
movq %rax, %rsi
callq 0x28f22
cmpl $0xa, %ebx
je 0x2be9a
pushq $-0x1
popq %rbx
leaq 0x3e1f4(%rip), %rax     # 0x6a088
movl %ebx, 0x6fc(%rax)
leaq 0x3e1e7(%rip), %rbx     # 0x6a088
orl $-0x1, 0x6b0(%rbx)
andl $0x0, 0x6f8(%rbx)
xorl %edi, %edi
callq 0x12540
subq 0x6f0(%rbx), %rax
movq %rax, 0x6e8(%rbx)
orq $-0x1, 0x6f0(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/ddb.c
// Function: backgroundSaveDoneHandler
void backgroundSaveDoneHandler(int exitcode, int bysignal) {
    switch(server.ddb_child_type) {
    case DDB_CHILD_TYPE_DISK:
        backgroundSaveDoneHandlerDisk(exitcode,bysignal);
        break;
    default:
        serverPanic("Unknown DDB child type.");
        break;
    }
}

// Assembly:
leaq 0x3e1af(%rip), %rax     # 0x6a088
cmpl $0x1, 0x6f8(%rax)
jne 0x2bee7
jmp 0x2bda9
pushq %rax
leaq 0x264de(%rip), %rdi     # 0x523cd
leaq 0x264f1(%rip), %rsi     # 0x523e7
movl $0x26f, %edx            # imm = 0x26F
callq 0x24359
pushq $0x1
popq %rdi
callq 0x12120
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/ddb.c
// Function: saveCommand
void saveCommand(client *c) {
    if (server.ddb_child_pid != -1) {
        addReplyError(c,"Background save already in progress");
        return;
    }
    if (ddbSave(server.ddb_filename) == C_OK) {
        addReply(c,shared.ok);
    } else {
        addReply(c,shared.err);
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x3e175(%rip), %rax     # 0x6a088
cmpl $-0x1, 0x6b0(%rax)
je 0x2bf2c
leaq 0x264ca(%rip), %rsi     # 0x523ed
movq %rbx, %rdi
popq %rbx
jmp 0x1cacf
movq 0x6c8(%rax), %rdi
callq 0x2b5bc
testl %eax, %eax
je 0x2bf49
leaq 0x3e855(%rip), %rax     # 0x6a798
movq 0x10(%rax), %rsi
jmp 0x2bf54
leaq 0x3e848(%rip), %rax     # 0x6a798
movq 0x8(%rax), %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x1c8e7
// File: /workspace/github_c_makefile_star2_O2/erikdubbelboer[P]discnt/src/ddb.c
// Function: bgsaveCommand
void bgsaveCommand(client *c) {
    if (server.ddb_child_pid != -1) {
        addReplyError(c,"Background save already in progress");
    } else if (ddbSaveBackground(server.ddb_filename) == C_OK) {
        addReplyStatus(c,"Background saving started");
    } else {
        addReply(c,shared.err);
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x3e120(%rip), %rax     # 0x6a088
cmpl $-0x1, 0x6b0(%rax)
je 0x2bf81
leaq 0x26475(%rip), %rsi     # 0x523ed
movq %rbx, %rdi
popq %rbx
jmp 0x1cacf
movq 0x6c8(%rax), %rdi
callq 0x2b751
testl %eax, %eax
je 0x2bfa5
leaq 0x3e800(%rip), %rax     # 0x6a798
movq 0x10(%rax), %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x1c8e7
leaq 0x26465(%rip), %rsi     # 0x52411
movq %rbx, %rdi
popq %rbx
jmp 0x1cc23
nopl (%rax)