LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/cluster.c
// Function: cluserReadAck
void cluserReadAck(const clusterMsgDataAck *msg, clusterNode *node) {
    uint32_t name_length, revision;
    counter *cntr;
    sds name;

    name_length = intrev16ifbe(msg->name_length);
    name = sdsnewlen(msg->name,name_length);

    revision = intrev32ifbe(msg->revision);

    cntr = counterLookup(name);
    if (cntr != NULL) {
        if (cntr->revision == revision) {
            counterGotAck(cntr,node);
        } else {
            serverLog(LL_VERBOSE,"Ack from %.40s for invalid revision %u of %s at %u",
                node->name, revision, name, cntr->revision);
        }
    } else {
        serverLog(LL_VERBOSE,"Ack from %.40s for unknown counter %s",
            node->name, name);
    }

    sdsfree(name);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movzwl 0x4(%rdi), %esi
addq $0x6, %rdi
callq 0x1da70
movq %rax, %rbx
movl (%r15), %ebp
movq %rax, %rdi
callq 0x30d6f
testq %rax, %rax
je 0x2d7a9
movl 0x38(%rax), %r9d
cmpl %ebp, %r9d
jne 0x2d7c4
movq %rax, %rdi
movq %r14, %rsi
callq 0x30cb9
jmp 0x2d7df
leaq 0x29c5c(%rip), %rsi     # 0x5740c
movl $0x1, %edi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x19c06
jmp 0x2d7df
leaq 0x29c0e(%rip), %rsi     # 0x573d9
movl $0x1, %edi
movq %r14, %rdx
movl %ebp, %ecx
movq %rbx, %r8
xorl %eax, %eax
callq 0x19c06
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1dc25
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/cluster.c
// Function: clusterBroadcastMessage
void clusterBroadcastMessage(dict *nodes, void *buf, size_t len) {
    dictIterator *di;
    dictEntry *de;

    di = dictGetSafeIterator(nodes);
    while((de = dictNext(di)) != NULL) {
        clusterNode *node = dictGetKey(de);

        if (!node->link) continue;
        if (node->flags & (CLUSTER_NODE_MYSELF|CLUSTER_NODE_HANDSHAKE))
            continue;
        clusterSendMessage(node->link,buf,len);
    }
    dictReleaseIterator(di);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
callq 0x18ec7
movq %rax, %r15
movq %rax, %rdi
callq 0x18ef7
testq %rax, %rax
je 0x2d9c4
movq (%rax), %rax
movq 0x88(%rax), %rdi
testq %rdi, %rdi
je 0x2d9bf
testb $0xc, 0x30(%rax)
jne 0x2d9bf
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2d8da
movq %r15, %rdi
jmp 0x2d995
movq %r15, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x18fbf
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/cluster.c
// Function: clusterBeforeSleep
void clusterBeforeSleep(void) {
    /* Update the cluster state. */
    if (server.cluster->todo_before_sleep & CLUSTER_TODO_UPDATE_STATE)
        clusterUpdateState();

    /* Save the config, possibly using fsync. */
    if (server.cluster->todo_before_sleep & CLUSTER_TODO_SAVE_CONFIG) {
        int fsync = server.cluster->todo_before_sleep &
                    CLUSTER_TODO_FSYNC_CONFIG;
        clusterSaveConfigOrDie(fsync);
    }

    /* Reset our flags (not strictly needed since every single function
     * called for flags set should be able to clear its flag). */
    server.cluster->todo_before_sleep = 0;
}

// Assembly:
pushq %rbx
leaq 0x4123e(%rip), %rbx     # 0x6f088
movq 0x668(%rbx), %rax
movl 0x28(%rax), %edi
testb $0x1, %dil
je 0x2de69
callq 0x2c079
movq 0x668(%rbx), %rax
movl 0x28(%rax), %edi
testb $0x2, %dil
je 0x2de7e
andl $0x4, %edi
callq 0x2bcca
movq 0x668(%rbx), %rax
movl $0x0, 0x28(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/cluster.c
// Function: representClusterNodeFlags
sds representClusterNodeFlags(sds ci, uint16_t flags) {
    if (flags == 0) {
        ci = sdscat(ci,"noflags,");
    } else {
        int i, size = sizeof(discntNodeFlagsTable)/sizeof(struct discntNodeFlags);
        for (i = 0; i < size; i++) {
            struct discntNodeFlags *nodeflag = discntNodeFlagsTable + i;
            if (flags & nodeflag->flag) ci = sdscat(ci, nodeflag->name);
        }
    }
    sdsIncrLen(ci,-1); /* Remove trailing comma. */
    return ci;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %esi, %esi
je 0x2dec7
movl %esi, %ebp
movl $0x8, %r14d
leaq 0x3e3dc(%rip), %r15     # 0x6c280
testw %bp, -0x8(%r14,%r15)
je 0x2debb
movq (%r14,%r15), %rsi
movq %rbx, %rdi
callq 0x1e495
movq %rax, %rbx
addq $0x10, %r14
cmpq $0x58, %r14
jne 0x2dea4
jmp 0x2ded9
leaq 0x2925c(%rip), %rsi     # 0x5712a
movq %rbx, %rdi
callq 0x1e495
movq %rax, %rbx
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x1e119
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/cluster.c
// Function: clusterGenNodeDescription
sds clusterGenNodeDescription(clusterNode *node) {
    sds ci;

    /* Node coordinates */
    ci = sdscatprintf(sdsempty(),"%.40s %s:%d ",
        node->name,
        node->ip,
        node->port);

    /* Flags */
    ci = representClusterNodeFlags(ci, node->flags);

    /* Latency from the POV of this node, link status */
    ci = sdscatprintf(ci," %lld %lld %s",
        (long long) node->ping_sent,
        (long long) node->pong_received,
        (node->link || node->flags & CLUSTER_NODE_MYSELF) ?
                    "connected" : "disconnected");

    return ci;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x1db82
leaq 0x50(%rbx), %rcx
movl 0x80(%rbx), %r8d
leaq 0x29224(%rip), %rsi     # 0x57133
movq %rax, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1e826
movzwl 0x30(%rbx), %esi
movq %rax, %rdi
callq 0x2de87
movq 0x38(%rbx), %rdx
movq 0x40(%rbx), %rcx
cmpq $0x0, 0x88(%rbx)
je 0x2df43
leaq 0x29210(%rip), %r8      # 0x57151
jmp 0x2df59
testb $0x4, 0x30(%rbx)
leaq 0x29200(%rip), %rsi     # 0x5714e
leaq 0x291fc(%rip), %r8      # 0x57151
cmoveq %rsi, %r8
leaq 0x291e0(%rip), %rsi     # 0x57140
movq %rax, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x1e826
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/cluster.c
// Function: clusterShuffleReachableNodes
void clusterShuffleReachableNodes(void) {
    int r, i;
    clusterNode *tmp;
    for(i = server.cluster->reachable_nodes_count - 1; i > 0; i--) {
        r = rand() % (i + 1);
        tmp = server.cluster->reachable_nodes[r];
        server.cluster->reachable_nodes[r] = server.cluster->reachable_nodes[i];
        server.cluster->reachable_nodes[i] = tmp;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0x41111(%rip), %rbx     # 0x6f088
movq 0x668(%rbx), %rax
movslq 0x38(%rax), %r14
cmpq $0x2, %r14
jl 0x2dfc9
leaq -0x1(%r14), %r15
callq 0x12970
cltd
idivl %r14d
movq 0x668(%rbx), %rax
movq 0x30(%rax), %rax
movslq %edx, %rcx
movq (%rax,%rcx,8), %rdx
movq -0x8(%rax,%r14,8), %rsi
movq %rsi, (%rax,%rcx,8)
movq 0x668(%rbx), %rax
movq 0x30(%rax), %rax
movq %rdx, -0x8(%rax,%r14,8)
cmpq $0x2, %r14
movq %r15, %r14
ja 0x2df88
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/cluster.c
// Function: helloCommand
void helloCommand(client *c) {
    dictIterator *di = dictGetIterator(server.cluster->nodes);
    dictEntry *de;

    addReplyMultiBulkLen(c,2+dictSize(server.cluster->nodes));
    addReplyLongLong(c,1); /* Version. */
    addReplyBulkCBuffer(c,myself->name,CLUSTER_NAMELEN); /* My ID. */

    while((de = dictNext(di)) != NULL) {
        clusterNode *node = dictGetVal(de);
        int priority = 1;
        if (node->link == NULL && node != server.cluster->myself) priority = 5;
        if (node->flags & CLUSTER_NODE_PFAIL) priority = 10;
        if (node->flags & CLUSTER_NODE_FAIL) priority = 100;
        addReplyMultiBulkLen(c,4);
        addReplyBulkCBuffer(c,node->name,CLUSTER_NAMELEN); /* ID. */
        addReplyBulkCString(c,node->ip); /* IP address. */
        addReplyBulkLongLong(c,node->port); /* TCP port. */
        addReplyBulkLongLong(c,priority); /* Priority. */
    }
    dictReleaseIterator(di);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x40cb4(%rip), %r15     # 0x6f088
movq 0x668(%r15), %rax
movq 0x10(%rax), %rdi
callq 0x18e9d
movq %rax, %r14
movq 0x668(%r15), %rax
movq 0x10(%rax), %rax
movq 0x28(%rax), %rcx
movq 0x48(%rax), %rax
leaq (%rcx,%rax), %rsi
addq $0x2, %rsi
movq %rbx, %rdi
callq 0x22676
movl $0x1, %esi
movq %rbx, %rdi
callq 0x22641
movq 0x55182(%rip), %rsi     # 0x835a0
movl $0x28, %edx
movq %rbx, %rdi
callq 0x2277b
movq %r14, %rdi
callq 0x18ef7
testq %rax, %rax
je 0x2e4dd
movl $0xa, %ebp
movl $0x64, %r13d
movq 0x8(%rax), %r15
movl $0x1, %r12d
cmpq $0x0, 0x88(%r15)
jne 0x2e479
leaq 0x40c26(%rip), %rax     # 0x6f088
movq 0x668(%rax), %rax
xorl %ecx, %ecx
cmpq (%rax), %r15
setne %cl
leaq 0x1(,%rcx,4), %r12
movl 0x30(%r15), %eax
testb $0x1, %al
cmovneq %rbp, %r12
testb $0x2, %al
cmovneq %r13, %r12
movl $0x4, %esi
movq %rbx, %rdi
callq 0x22676
movl $0x28, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2277b
leaq 0x50(%r15), %rsi
movq %rbx, %rdi
callq 0x22491
movslq 0x80(%r15), %rsi
movq %rbx, %rdi
callq 0x2284a
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2284a
movq %r14, %rdi
callq 0x18ef7
testq %rax, %rax
jne 0x2e447
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x18fbf
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/cluster.c
// Function: clusterSendShard
void clusterSendShard(counter *cntr) {
    dictIterator *di;
    dictEntry *de;
    clusterNode *node;

    counterClearWantAcks(cntr);

    di = dictGetIterator(server.cluster->nodes);
    while((de = dictNext(di)) != NULL) {
        node = dictGetVal(de);

        if (node == myself) continue;
        if (nodeInHandshake(node)) continue;

        counterWantAck(cntr, node);

        clusterSendShardToNode(cntr, node);
    }
    dictReleaseIterator(di);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x30c5c
leaq 0x4093d(%rip), %rax     # 0x6f088
movq 0x668(%rax), %rax
movq 0x10(%rax), %rdi
callq 0x18e9d
movq %rax, %r14
movq %rax, %rdi
callq 0x18ef7
testq %rax, %rax
je 0x2e79a
movq 0x8(%rax), %r15
cmpq 0x54e2a(%rip), %r15     # 0x835a0
je 0x2e795
testb $0x8, 0x30(%r15)
jne 0x2e795
movq %rbx, %rdi
movq %r15, %rsi
callq 0x30c85
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2e4f3
movq %r14, %rdi
jmp 0x2e761
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x18fbf
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/endianconv.c
// Function: pack754
uint64_t pack754(long double f, unsigned bits, unsigned expbits)
{
    long double fnorm;
    int shift;
    long long sign, exp, significand;
    unsigned significandbits = bits - expbits - 1; // -1 for sign bit

    if (f == 0.0) return 0; // get this special case out of the way

    // check sign and begin normalization
    if (f < 0) { sign = 1; fnorm = -f; }
    else { sign = 0; fnorm = f; }

    // get the normalized form of f and track the exponent
    shift = 0;
    while(fnorm >= 2.0) { fnorm /= 2.0; shift++; }
    while(fnorm < 1.0) { fnorm *= 2.0; shift--; }
    fnorm = fnorm - 1.0;

    // calculate the binary form (non-float) of the significand data
    significand = fnorm * ((1LL<<significandbits) + 0.5f);

    // get the biased exponent
    exp = shift + ((1<<(expbits-1)) - 1); // shift + bias

    // return the final answer
    return (sign<<(bits-1)) | (exp<<(bits-expbits-1)) | significand;
}

// Assembly:
fldt 0x8(%rsp)
xorl %eax, %eax
fldz
fxch %st(1)
fucomi %st(1), %st
fstp %st(1)
jne 0x2eaab
jp 0x2eaab
fstp %st(0)
retq
movl %esi, %edx
notl %edx
fld %st(0)
fchs
xorl %r8d, %r8d
fucomi %st(1), %st
fxch %st(1)
fcmovnbe %st(1), %st
fstp %st(1)
seta %r8b
flds 0x28994(%rip)           # 0x5745c
fxch %st(1)
fucomi %st(1), %st
fstp %st(1)
jae 0x2ead4
fldz
jmp 0x2eaec
xorl %eax, %eax
flds 0x28980(%rip)           # 0x5745c
fxch %st(1)
fmuls 0x2897c(%rip)           # 0x57460
incl %eax
fucomi %st(1), %st
fxch %st(1)
jae 0x2eadc
fstp %st(0)
addl %edi, %edx
fld1
fucompi %st(1), %st
jbe 0x2eb06
fld1
fxch %st(1)
fadd %st, %st(0)
decl %eax
fxch %st(1)
fucomi %st(1), %st
ja 0x2eaf8
jmp 0x2eb08
fldz
fstp %st(0)
movl $0x1, %r9d
movl %edx, %ecx
shlq %cl, %r9
cvtsi2ss %r9, %xmm0
fld1
fchs
addss 0x2893a(%rip), %xmm0    # 0x57460
faddp %st, %st(1)
movss %xmm0, -0xc(%rsp)
fmuls -0xc(%rsp)
fnstcw -0x10(%rsp)
movzwl -0x10(%rsp), %ecx
orl $0xc00, %ecx            # imm = 0xC00
movw %cx, -0xe(%rsp)
fldcw -0xe(%rsp)
fistpll -0x8(%rsp)
fldcw -0x10(%rsp)
decb %sil
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
movl %esi, %ecx
shll %cl, %r9d
notl %r9d
addl %eax, %r9d
movslq %r9d, %rax
decb %dil
movl %edi, %ecx
shlq %cl, %r8
movl %edx, %ecx
shlq %cl, %rax
orq %r8, %rax
orq -0x8(%rsp), %rax
retq
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/endianconv.c
// Function: unpack754
long double unpack754(uint64_t i, unsigned bits, unsigned expbits)
{
    long double result;
    long long shift;
    unsigned bias;
    unsigned significandbits = bits - expbits - 1; // -1 for sign bit

    if (i == 0) return 0.0;

    // pull the significand
    result = (i&((1LL<<significandbits)-1)); // mask
    result /= (1LL<<significandbits); // convert back to float
    result += 1.0f; // add the one back on

    // deal with the exponent
    bias = (1<<(expbits-1)) - 1;
    shift = ((i>>significandbits)&((1LL<<expbits)-1)) - bias;
    while(shift > 0) { result *= 2.0; shift--; }
    while(shift < 0) { result /= 2.0; shift++; }

    // sign it
    result *= (i>>(bits-1))&1? -1.0: 1.0;

    return result;
}

// Assembly:
fldz
testq %rdi, %rdi
je 0x2ec32
fstp %st(0)
movl %edx, %eax
notl %eax
addl %esi, %eax
movl $0x1, %r8d
movl %eax, %ecx
shlq %cl, %r8
leaq -0x1(%r8), %rcx
xorl %r9d, %r9d
andq %rdi, %rcx
movq %rcx, -0x8(%rsp)
sets %r9b
fildll -0x8(%rsp)
leaq 0x288ad(%rip), %rcx     # 0x57468
fadds (%rcx,%r9,4)
movq %r8, -0x10(%rsp)
fildll -0x10(%rsp)
fdivrp %st, %st(1)
fld1
leal -0x1(%rdx), %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
shll %cl, %r8d
faddp %st, %st(1)
notl %r8d
movq %rdi, %r10
movl %eax, %ecx
shrq %cl, %r10
movq $-0x1, %r9
movl %edx, %ecx
shlq %cl, %r9
notq %r9
andq %r10, %r9
movq %r9, %rax
subq %r8, %rax
jle 0x2ec0f
incq %rax
fadd %st, %st(0)
decq %rax
cmpq $0x1, %rax
ja 0x2ec02
jmp 0x2ec1f
jns 0x2ec1f
subq %r9, %r8
fmuls 0x28846(%rip)           # 0x57460
decq %r8
jne 0x2ec14
decb %sil
movzbl %sil, %eax
btq %rax, %rdi
fld %st(0)
fchs
fcmovnb %st(1), %st
fstp %st(1)
retq
nop
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/bio.c
// Function: bioCreateBackgroundJob
void bioCreateBackgroundJob(int type, void *arg1, void *arg2, void *arg3) {
    struct bio_job *job = zmalloc(sizeof(*job));

    job->time = time(NULL);
    job->arg1 = arg1;
    job->arg2 = arg2;
    job->arg3 = arg3;
    pthread_mutex_lock(&bio_mutex[type]);
    listAddNodeTail(bio_jobs[type],job);
    bio_pending[type]++;
    pthread_cond_signal(&bio_newjob_cond[type]);
    pthread_mutex_unlock(&bio_mutex[type]);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %ebp
movl $0x20, %edi
callq 0x1fbbd
movq %rax, %r12
xorl %edi, %edi
callq 0x12540
movq %rax, (%r12)
movq %r15, 0x8(%r12)
movq %r14, 0x10(%r12)
movq %rbx, 0x18(%r12)
movslq %ebp, %r14
leaq (%r14,%r14,4), %rax
leaq 0x5468d(%rip), %rcx     # 0x835b0
leaq (%rcx,%rax,8), %rbx
movq %rbx, %rdi
callq 0x12950
leaq 0x5478a(%rip), %rax     # 0x836c0
movq (%rax,%r14,8), %rdi
movq %r12, %rsi
callq 0x165ab
leaq 0x54787(%rip), %rax     # 0x836d0
incq (%rax,%r14,8)
leaq (%r14,%r14,2), %rax
shlq $0x4, %rax
leaq 0x546a4(%rip), %rdi     # 0x83600
addq %rax, %rdi
callq 0x12470
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x125b0
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/bio.c
// Function: bioWaitStepOfType
unsigned long long bioWaitStepOfType(int type) {
    unsigned long long val;
    pthread_mutex_lock(&bio_mutex[type]);
    val = bio_pending[type];
    if (val != 0) {
        pthread_cond_wait(&bio_step_cond[type],&bio_mutex[type]);
        val = bio_pending[type];
    }
    pthread_mutex_unlock(&bio_mutex[type]);
    return val;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movslq %edi, %r14
leaq (%r14,%r14,4), %rax
leaq 0x545ed(%rip), %rcx     # 0x835b0
leaq (%rcx,%rax,8), %rbx
movq %rbx, %rdi
callq 0x12950
leaq 0x546fa(%rip), %r15     # 0x836d0
cmpq $0x0, (%r15,%r14,8)
je 0x2effd
leaq (%r14,%r14,2), %rax
shlq $0x4, %rax
leaq 0x54674(%rip), %rdi     # 0x83660
addq %rax, %rdi
movq %rbx, %rsi
callq 0x12200
movq (%r15,%r14,8), %r14
jmp 0x2f000
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x125b0
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/memtest.c
// Function: memtest_addressing
void memtest_addressing(unsigned long *l, size_t bytes) {
    unsigned long words = bytes/sizeof(unsigned long);
    unsigned long j, *p;

    /* Fill */
    p = l;
    for (j = 0; j < words; j++) {
        *p = (unsigned long)p;
        p++;
        if ((j & 0xffff) == 0) memtest_progress_step(j,words*2,'A');
    }
    /* Test */
    p = l;
    for (j = 0; j < words; j++) {
        if (*p != (unsigned long)p) {
            printf("\n*** MEMORY ADDRESSING ERROR: %p contains %lu\n",
                (void*) p, *p);
            exit(1);
        }
        p++;
        if ((j & 0xffff) == 0) memtest_progress_step(j+words,words*2,'A');
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpq $0x8, %rsi
jb 0x2f25e
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %r13
shrq $0x3, %r13
leaq (,%r13,2), %r14
xorl %r12d, %r12d
movq %rdi, %rbp
movq %rbp, (%rbx,%r12,8)
testw %r12w, %r12w
jne 0x2f217
movq %r12, %rdi
movq %r14, %rsi
movl $0x41, %edx
callq 0x2f176
incq %r12
addq $0x8, %rbp
cmpq %r12, %r13
jne 0x2f1fd
cmpq $0x8, %r15
jb 0x2f25e
xorl %r15d, %r15d
movq %rbx, %r12
movq (%rbx), %rdx
cmpq %rdx, %r12
jne 0x2f26d
testw %r15w, %r15w
jne 0x2f24e
leaq (%r15,%r13), %rdi
movq %r14, %rsi
movl $0x41, %edx
callq 0x2f176
addq $0x8, %rbx
incq %r15
addq $0x8, %r12
cmpq %r15, %r13
jne 0x2f22f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x28342(%rip), %rdi     # 0x575b6
movq %rbx, %rsi
xorl %eax, %eax
callq 0x122c0
movl $0x1, %edi
callq 0x12860
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/memtest.c
// Function: memtest_fill_random
void memtest_fill_random(unsigned long *l, size_t bytes) {
    unsigned long step = 4096/sizeof(unsigned long);
    unsigned long words = bytes/sizeof(unsigned long)/2;
    unsigned long iwords = words/step;  /* words per iteration */
    unsigned long off, w, *l1, *l2;

    assert((bytes & 4095) == 0);
    for (off = 0; off < step; off++) {
        l1 = l+off;
        l2 = l1+words;
        for (w = 0; w < iwords; w++) {
#ifdef MEMTEST_32BIT
            *l1 = *l2 = ((unsigned long)     (rand()&0xffff)) |
                        (((unsigned long)    (rand()&0xffff)) << 16);
#else
            *l1 = *l2 = ((unsigned long)     (rand()&0xffff)) |
                        (((unsigned long)    (rand()&0xffff)) << 16) |
                        (((unsigned long)    (rand()&0xffff)) << 32) |
                        (((unsigned long)    (rand()&0xffff)) << 48);
#endif
            l1 += step;
            l2 += step;
            if ((w & 0xffff) == 0)
                memtest_progress_step(w+iwords*off,words,'R');
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
testl $0xfff, %esi            # imm = 0xFFF
jne 0x2f3a7
movq %rsi, %rax
shrq $0x4, %rax
movq %rax, 0x20(%rsp)
movq %rsi, %rax
shrq $0xd, %rax
movq %rax, 0x18(%rsp)
movq $0x0, 0x10(%rsp)
movq $0x0, 0x8(%rsp)
movq %rsi, 0x30(%rsp)
movl $0xffff, %r15d          # imm = 0xFFFF
cmpq $0x2000, %rsi           # imm = 0x2000
jb 0x2f36a
movq 0x28(%rsp), %rax
movq 0x8(%rsp), %rcx
leaq (%rax,%rcx,8), %r14
xorl %ebx, %ebx
callq 0x12970
movl %eax, %ebp
andl %r15d, %ebp
callq 0x12970
movl %eax, %r12d
shll $0x10, %r12d
orl %ebp, %r12d
callq 0x12970
movl %eax, %r13d
andl %r15d, %r13d
shlq $0x20, %r13
orq %r12, %r13
callq 0x12970
shlq $0x30, %rax
orq %r13, %rax
movq 0x20(%rsp), %rcx
movq %rax, (%r14,%rcx,8)
movq %rax, (%r14)
testw %bx, %bx
jne 0x2f359
movq 0x10(%rsp), %rax
leaq (%rax,%rbx), %rdi
movq 0x20(%rsp), %rsi
movl $0x52, %edx
callq 0x2f176
addq $0x1000, %r14           # imm = 0x1000
incq %rbx
cmpq %rbx, 0x18(%rsp)
jne 0x2f2f9
movq 0x8(%rsp), %rcx
incq %rcx
movq 0x10(%rsp), %rax
addq 0x18(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %rcx, 0x8(%rsp)
cmpq $0x200, %rcx            # imm = 0x200
movq 0x30(%rsp), %rsi
jne 0x2f2dc
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x28237(%rip), %rdi     # 0x575e5
leaq 0x28244(%rip), %rsi     # 0x575f9
leaq 0x28247(%rip), %rcx     # 0x57603
movl $0x7c, %edx
callq 0x12350
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/memtest.c
// Function: memtest_compare
void memtest_compare(unsigned long *l, size_t bytes) {
    unsigned long words = bytes/sizeof(unsigned long)/2;
    unsigned long w, *l1, *l2;

    assert((bytes & 4095) == 0);
    l1 = l;
    l2 = l1+words;
    for (w = 0; w < words; w++) {
        if (*l1 != *l2) {
            printf("\n*** MEMORY ERROR DETECTED: %p != %p (%lu vs %lu)\n",
                (void*)l1, (void*)l2, *l1, *l2);
            exit(1);
        }
        l1 ++;
        l2 ++;
        if ((w & 0xffff) == 0) memtest_progress_step(w,words,'=');
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
testl $0xfff, %r14d           # imm = 0xFFF
jne 0x2f558
cmpq $0x10, %r14
jb 0x2f52e
movq %rdi, %rbx
shrq $0x4, %r14
leaq (%rdi,%r14,8), %r15
xorl %r12d, %r12d
movq (%rbx), %rcx
movq (%r15), %r8
cmpq %r8, %rcx
jne 0x2f53a
testw %r12w, %r12w
jne 0x2f51e
movq %r12, %rdi
movq %r14, %rsi
movl $0x3d, %edx
callq 0x2f176
addq $0x8, %rbx
addq $0x8, %r15
incq %r12
cmpq %r12, %r14
jne 0x2f4fd
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x28177(%rip), %rdi     # 0x576b8
movq %rbx, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x122c0
movl $0x1, %edi
callq 0x12860
leaq 0x28086(%rip), %rdi     # 0x575e5
leaq 0x28093(%rip), %rsi     # 0x575f9
leaq 0x2811d(%rip), %rcx     # 0x5768a
movl $0xb7, %edx
callq 0x12350
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/memtest.c
// Function: memtest_compare_times
void memtest_compare_times(unsigned long *m, size_t bytes, int pass, int times) {
    int j;

    for (j = 0; j < times; j++) {
        memtest_progress_start("Compare",pass);
        memtest_compare(m,bytes);
        memtest_progress_end();
    }
}

// Assembly:
testl %ecx, %ecx
jle 0x2f5cf
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
leaq 0x28154(%rip), %r12     # 0x576eb
leaq 0x27fb0(%rip), %r13     # 0x5754e
movq %r12, %rdi
movl %ebp, %esi
callq 0x2f09c
movq %r15, %rdi
movq %r14, %rsi
callq 0x2f4d5
movq %r13, %rdi
xorl %eax, %eax
callq 0x122c0
decl %ebx
jne 0x2f59e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/memtest.c
// Function: memtest_test
void memtest_test(size_t megabytes, int passes) {
    size_t bytes = megabytes*1024*1024;
    unsigned long *m = malloc(bytes);
    int pass = 0;

    if (m == NULL) {
        fprintf(stderr,"Unable to allocate %zu megabytes: %s",
            megabytes, strerror(errno));
        exit(1);
    }
    while (pass != passes) {
        pass++;

        memtest_progress_start("Addressing test",pass);
        memtest_addressing(m,bytes);
        memtest_progress_end();

        memtest_progress_start("Random fill",pass);
        memtest_fill_random(m,bytes);
        memtest_progress_end();
        memtest_compare_times(m,bytes,pass,4);

        memtest_progress_start("Solid fill",pass);
        memtest_fill_value(m,bytes,0,(unsigned long)-1,'S');
        memtest_progress_end();
        memtest_compare_times(m,bytes,pass,4);

        memtest_progress_start("Checkerboard fill",pass);
        memtest_fill_value(m,bytes,ULONG_ONEZERO,ULONG_ZEROONE,'C');
        memtest_progress_end();
        memtest_compare_times(m,bytes,pass,4);
    }
    free(m);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r12
movq %rdi, %r14
shlq $0x14, %r14
movq %r14, %rdi
callq 0x125c0
testq %rax, %rax
je 0x2f729
movq %rax, %r15
testl %ebx, %ebx
je 0x2f713
negl %ebx
movl $0x1, %ebp
leaq 0x27f3d(%rip), %r13     # 0x5754e
movabsq $0x5555555555555555, %r12 # imm = 0x5555555555555555
leaq 0x280f6(%rip), %rdi     # 0x57718
movl %ebp, %esi
callq 0x2f09c
movq %r15, %rdi
movq %r14, %rsi
callq 0x2f1d1
movq %r13, %rdi
xorl %eax, %eax
callq 0x122c0
leaq 0x280e3(%rip), %rdi     # 0x57728
movl %ebp, %esi
callq 0x2f09c
movq %r15, %rdi
movq %r14, %rsi
callq 0x2f288
movq %r13, %rdi
xorl %eax, %eax
callq 0x122c0
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
movl $0x4, %ecx
callq 0x2f577
leaq 0x280ba(%rip), %rdi     # 0x57734
movl %ebp, %esi
callq 0x2f09c
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq $-0x1, %rcx
movl $0x53, %r8d
callq 0x2f3c6
movq %r13, %rdi
xorl %eax, %eax
callq 0x122c0
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
movl $0x4, %ecx
callq 0x2f577
leaq 0x28081(%rip), %rdi     # 0x5773f
movl %ebp, %esi
callq 0x2f09c
movq %r15, %rdi
movq %r14, %rsi
movabsq $-0x5555555555555556, %rdx # imm = 0xAAAAAAAAAAAAAAAA
movq %r12, %rcx
movl $0x43, %r8d
callq 0x2f3c6
movq %r13, %rdi
xorl %eax, %eax
callq 0x122c0
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
movl $0x4, %ecx
callq 0x2f577
leal (%rbx,%rbp), %eax
incl %eax
movl %ebp, %ecx
incl %ecx
movl %ecx, %ebp
cmpl $0x1, %eax
jne 0x2f61b
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x12070
movq %r12, %rdi
callq 0x12af4
// File: /workspace/github_c_makefile_star2_O3/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 0x3f455(%rip), %r14     # 0x6f088
movq 0x638(%r14), %rdi
cmpq $0x0, 0x28(%rdi)
je 0x2fcdc
leaq 0x28404(%rip), %r15     # 0x58050
movq (%rdi), %rsi
testq %rsi, %rsi
je 0x2fce2
movq 0x10(%rsi), %rbx
callq 0x16691
movl 0x88(%rbx), %eax
movl %eax, %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
movl %ecx, 0x88(%rbx)
testb $0x10, %al
jne 0x2fcca
movl $0x0, 0x90(%rbx)
movq 0x18(%rbx), %rcx
testq %rcx, %rcx
je 0x2fcca
movzbl -0x1(%rcx), %eax
movl %eax, %edx
andl $0x7, %edx
cmpl $0x4, %edx
ja 0x2fcca
movslq (%r15,%rdx,4), %rdx
addq %r15, %rdx
jmpq *%rdx
shrl $0x3, %eax
jmp 0x2fcbd
movq -0x11(%rcx), %rax
jmp 0x2fcbd
movzwl -0x5(%rcx), %eax
jmp 0x2fcbd
movl -0x9(%rcx), %eax
jmp 0x2fcbd
movzbl -0x3(%rcx), %eax
testq %rax, %rax
je 0x2fcca
movq %rbx, %rdi
callq 0x238fc
movq 0x638(%r14), %rdi
cmpq $0x0, 0x28(%rdi)
jne 0x2fc4c
popq %rbx
popq %r14
popq %r15
retq
leaq 0x24fe5(%rip), %rdi     # 0x54cce
leaq 0x283b2(%rip), %rsi     # 0x580a2
movl $0x71, %edx
callq 0x2a46a
movl $0x1, %edi
callq 0x12120
// File: /workspace/github_c_makefile_star2_O3/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 0x30849
movsd 0x10(%rbx), %xmm1
ucomisd %xmm0, %xmm1
ja 0x3084e
ucomisd 0x18(%rbx), %xmm0
jbe 0x30856
leaq 0x18(%rbx), %rax
jmp 0x30852
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 0x1fc79
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 0x30893
incl 0x4(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x30c71
xorl %esi, %esi
popq %rbx
jmp 0x19409
leaq 0x3e0c8(%rip), %rdi     # 0x6ed40
xorl %esi, %esi
callq 0x184d5
movq %rax, 0x40(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq 0x60(%rsi), %rax
testq %rax, %rax
je 0x30d0f
movq (%rax), %rax
movq 0x10(%rax), %rax
movq (%rax), %rdi
movq (%rbx), %rsi
movl $0x1, %edx
callq 0x33ca9
movq 0x60(%rbx), %rax
jmp 0x30ced
movq 0x8(%rbx), %rdi
leaq 0x8(%rsp), %r14
movq %r14, %rsi
callq 0x16717
movq %r14, %rdi
callq 0x16734
testq %rax, %rax
je 0x30d48
leaq 0x8(%rsp), %r14
movq 0x10(%rax), %rdi
callq 0x1fd17
movq %r14, %rdi
callq 0x16734
testq %rax, %rax
jne 0x30d32
movq 0x8(%rbx), %rdi
callq 0x164fc
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x30d5f
callq 0x18d18
movq %rbx, %rdi
callq 0x1fd17
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3e30e(%rip), %rax     # 0x6f088
movq 0x618(%rax), %rdi
callq 0x18d3e
testq %rax, %rax
je 0x30d91
movq 0x8(%rax), %rax
jmp 0x30d93
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3e2e4(%rip), %r15     # 0x6f088
movl 0x628(%r15), %edi
shlq $0x4, %rdi
addq $0x70, %rdi
callq 0x1fc17
movq %rax, %rbx
movq %r14, %rdi
callq 0x1dbd5
movq %rax, (%rbx)
callq 0x164dc
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 0x18802
testl %eax, %eax
jne 0x30e04
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x27b22(%rip), %rdi     # 0x5892d
leaq 0x27b11(%rip), %rsi     # 0x58923
movl $0x8b, %edx
callq 0x2a46a
movl $0x1, %edi
callq 0x12120
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x70, %edi
callq 0x1fc17
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 0x52739(%rip), %rax     # 0x835a0
cmpq %r12, (%rax)
jne 0x30e77
cmpq $0x0, 0x10(%r14)
jne 0x30e92
movq %rbx, 0x10(%r14)
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0x165ab
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x27aca(%rip), %rdi     # 0x58963
leaq 0x27a83(%rip), %rsi     # 0x58923
movl $0x96, %edx
callq 0x2a46a
movl $0x1, %edi
callq 0x12120
// File: /workspace/github_c_makefile_star2_O3/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 0x19e27
movq %rax, %r14
fldz
fstpt 0x20(%rbx)
movq 0x8(%rbx), %rdi
leaq 0x10(%rsp), %r15
movq %r15, %rsi
callq 0x16717
movq %r15, %rdi
callq 0x16734
testq %rax, %rax
je 0x30f47
leaq 0x10(%rsp), %r15
movq 0x10(%rax), %rax
cmpq 0x10(%rbx), %rax
je 0x30f2f
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 0x30f32
fldt 0x30(%rax)
fldt 0x20(%rbx)
faddp %st, %st(1)
fstpt 0x20(%rbx)
movq %r15, %rdi
callq 0x16734
testq %rax, %rax
jne 0x30f04
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 $0x28, %rsp
movq %rdi, %r14
movq 0x60(%rdi), %rdi
testq %rdi, %rdi
je 0x31069
movq %rsi, %rbx
leaq 0x18(%rsp), %r15
movq %r15, %rsi
callq 0x16717
movq %r15, %rdi
callq 0x16734
testq %rax, %rax
je 0x31069
leaq 0x18(%rsp), %r15
leaq 0x3e7fc(%rip), %r12     # 0x6f798
leaq 0x278e5(%rip), %r13     # 0x58888
movq 0x10(%rax), %rbp
cmpq %rbx, 0x10(%rbp)
jg 0x31058
movq %r14, %rdi
callq 0x30ec8
fldt 0x20(%rbp)
fldt 0x20(%r14)
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jne 0x30fce
jnp 0x31058
movq (%rbp), %rdi
movq 0x139e0(%r12), %rsi
callq 0x21c5a
movq (%rbp), %rdi
movq 0xf8(%r12), %rsi
callq 0x21c5a
movq (%r14), %rsi
movzbl -0x1(%rsi), %edx
movl %edx, %eax
andl $0x7, %eax
cmpl $0x4, %eax
ja 0x31027
movslq (%r13,%rax,4), %rax
addq %r13, %rax
jmpq *%rax
shrl $0x3, %edx
jmp 0x31029
movq -0x11(%rsi), %rdx
jmp 0x31029
movzwl -0x5(%rsi), %edx
jmp 0x31029
movl -0x9(%rsi), %edx
jmp 0x31029
movzbl -0x3(%rsi), %edx
jmp 0x31029
xorl %edx, %edx
movq (%rbp), %rdi
callq 0x2277b
movq (%rbp), %rdi
fldt 0x20(%r14)
fstpt (%rsp)
callq 0x224d7
imulq $0x3e8, 0x8(%rbp), %rax # imm = 0x3E8
addq %rbx, %rax
movq %rax, 0x10(%rbp)
fldt 0x20(%r14)
fstpt 0x20(%rbp)
movq %r15, %rdi
callq 0x16734
testq %rax, %rax
jne 0x30fa3
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x16717
movq %r15, %rdi
callq 0x16734
testq %rax, %rax
je 0x310f9
movq 0x10(%rax), %r12
cmpq %r14, (%r12)
jne 0x3109a
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 0x310d8
fstp %st(0)
callq 0x19e27
fldz
jmp 0x310da
xorl %eax, %eax
movq %rax, 0x40(%r12)
fld %st(0)
fstpt 0x50(%r12)
fstpt 0x60(%r12)
leaq 0x3df96(%rip), %rax     # 0x6f088
incq 0x6a0(%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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, %r14
leaq 0x3df6f(%rip), %rax     # 0x6f088
movq 0x618(%rax), %rdi
callq 0x18e9d
movq %rax, %rbx
movq %rax, %rdi
callq 0x18ef7
xorl %ebp, %ebp
testq %rax, %rax
je 0x31176
leaq 0x8(%rsp), %r15
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
movq %r15, %rsi
callq 0x16717
movq %r15, %rdi
callq 0x16734
testq %rax, %rax
je 0x31169
movq 0x10(%rax), %rax
xorl %ecx, %ecx
cmpq %r14, (%rax)
sete %cl
addl %ecx, %ebp
jmp 0x3114c
movq %rbx, %rdi
callq 0x18ef7
testq %rax, %rax
jne 0x3113c
movq %rbx, %rdi
callq 0x18fbf
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3dee8(%rip), %rax     # 0x6f088
movq 0x618(%rax), %rdi
callq 0x18ec7
movq %rax, %r14
movq %rax, %rdi
callq 0x18ef7
testq %rax, %rax
je 0x31214
leaq 0x8(%rsp), %r15
movq 0x8(%rax), %r12
movq 0x8(%r12), %rdi
movq %r15, %rsi
callq 0x16717
movq %r15, %rdi
callq 0x16734
testq %rax, %rax
je 0x31207
movq 0x10(%rax), %rcx
cmpq %rbx, (%rcx)
jne 0x311d2
cmpq 0x10(%r12), %rcx
jne 0x311f8
movq $0x0, 0x10(%r12)
movq 0x8(%r12), %rdi
movq %rax, %rsi
callq 0x16691
jmp 0x311d2
movq %r14, %rdi
callq 0x18ef7
testq %rax, %rax
jne 0x311c1
movq %r14, %rdi
callq 0x18fbf
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x2, 0x28(%rdi)
jl 0x31282
movl $0x1, %r15d
xorl %r14d, %r14d
leaq 0x3de3f(%rip), %r12     # 0x6f088
movq 0x30(%rbx), %rax
movq (%rax,%r15,8), %rax
movq 0x8(%rax), %rsi
movq 0x618(%r12), %rdi
callq 0x18d3e
xorl %ecx, %ecx
testq %rax, %rax
je 0x31271
cmpq $0x0, 0x8(%rax)
setne %cl
addq %rcx, %r14
incq %r15
movslq 0x28(%rbx), %rax
cmpq %rax, %r15
jl 0x31249
jmp 0x31285
xorl %r14d, %r14d
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x22641
// File: /workspace/github_c_makefile_star2_O3/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 %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r15
movq %rdi, %rbx
fldt 0x70(%rsp)
fstpt 0x18(%rsp)
leaq 0x3ddcd(%rip), %r12     # 0x6f088
movq 0x618(%r12), %rdi
callq 0x18d3e
testq %rax, %rax
je 0x312d6
movq 0x8(%rax), %r14
testq %r14, %r14
jne 0x312e1
movq %r15, %rdi
callq 0x30d95
movq %rax, %r14
movq 0x10(%r14), %rax
testq %rax, %rax
jne 0x31303
leaq 0x522af(%rip), %rax     # 0x835a0
movq (%rax), %rdx
movq %r14, %rdi
movq %rdx, %rsi
callq 0x30e26
movq 0x10(%r14), %rax
fldt 0x30(%rax)
fldt 0x18(%rsp)
faddp %st, %st(1)
fldl 0x275c6(%rip)           # 0x588d8
fxch %st(1)
fucomi %st(1), %st
jbe 0x3131c
fstp %st(0)
jmp 0x3135e
fldl 0x275be(%rip)           # 0x588e0
fucomi %st(1), %st
jbe 0x3132c
fstp %st(1)
fstp %st(1)
jmp 0x3135e
fstpt 0x30(%rsp)
fstpt 0x24(%rsp)
movq %r14, %rdi
fstpt 0x3c(%rsp)
callq 0x30ec8
fldt 0x20(%r14)
fldt 0x18(%rsp)
faddp %st, %st(1)
fldt 0x3c(%rsp)
fxch %st(1)
fucomi %st(1), %st
fstp %st(1)
ja 0x3135e
fldt 0x30(%rsp)
fucompi %st(1), %st
jbe 0x3137c
fstp %st(0)
leaq 0x27612(%rip), %rsi     # 0x58979
movq %rbx, %rdi
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x22033
movq 0x10(%r14), %rax
fldt 0x24(%rsp)
fstpt 0x30(%rax)
fld %st(0)
fstpt 0x20(%r14)
incq 0x6a0(%r12)
fstpt (%rsp)
movq %rbx, %rdi
callq 0x224d7
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq