LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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 0x2fb9b
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 0x27b98(%rip), %r12     # 0x576fb
leaq 0x279f4(%rip), %r13     # 0x5755e
movq %r12, %rdi
movl %ebp, %esi
callq 0x2f660
movq %r15, %rdi
movq %r14, %rsi
callq 0x2faa1
movq %r13, %rdi
xorl %eax, %eax
callq 0x122c0
decl %ebx
jne 0x2fb6a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/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 0x125d0
testq %rax, %rax
je 0x2fcf5
movq %rax, %r15
testl %ebx, %ebx
je 0x2fcdf
negl %ebx
movl $0x1, %ebp
leaq 0x27981(%rip), %r13     # 0x5755e
movabsq $0x5555555555555555, %r12 # imm = 0x5555555555555555
leaq 0x27b3a(%rip), %rdi     # 0x57728
movl %ebp, %esi
callq 0x2f660
movq %r15, %rdi
movq %r14, %rsi
callq 0x2f795
movq %r13, %rdi
xorl %eax, %eax
callq 0x122c0
leaq 0x27b27(%rip), %rdi     # 0x57738
movl %ebp, %esi
callq 0x2f660
movq %r15, %rdi
movq %r14, %rsi
callq 0x2f854
movq %r13, %rdi
xorl %eax, %eax
callq 0x122c0
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
movl $0x4, %ecx
callq 0x2fb43
leaq 0x27afe(%rip), %rdi     # 0x57744
movl %ebp, %esi
callq 0x2f660
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq $-0x1, %rcx
movl $0x53, %r8d
callq 0x2f992
movq %r13, %rdi
xorl %eax, %eax
callq 0x122c0
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
movl $0x4, %ecx
callq 0x2fb43
leaq 0x27ac5(%rip), %rdi     # 0x5774f
movl %ebp, %esi
callq 0x2f660
movq %r15, %rdi
movq %r14, %rsi
movabsq $-0x5555555555555556, %rdx # imm = 0xAAAAAAAAAAAAAAAA
movq %r12, %rcx
movl $0x43, %r8d
callq 0x2f992
movq %r13, %rdi
xorl %eax, %eax
callq 0x122c0
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
movl $0x4, %ecx
callq 0x2fb43
leal (%rbx,%rbp), %eax
incl %eax
movl %ebp, %ecx
incl %ecx
movl %ecx, %ebp
cmpl $0x1, %eax
jne 0x2fbe7
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x12070
movq %r12, %rdi
callq 0x12aca
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/memtest.c
// Function: memtest
void memtest(size_t megabytes, int passes) {
    if (ioctl(1, TIOCGWINSZ, &ws) == -1) {
        ws.ws_col = 80;
        ws.ws_row = 20;
    }
    memtest_test(megabytes,passes);
    printf("\nYour memory passed this test.\n");
    printf("Please if you are still in doubt use the following two tools:\n");
    printf("1) memtest86: http://www.memtest86.com/\n");
    printf("2) memtester: http://pyropus.ca/software/memtester/\n");
    exit(0);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq 0x539a2(%rip), %rdx     # 0x836f0
movl $0x5413, %esi           # imm = 0x5413
movl $0x1, %edi
xorl %eax, %eax
callq 0x12390
cmpl $-0x1, %eax
jne 0x2fd6e
movl $0x500014, 0x53982(%rip) # imm = 0x500014
movq %r14, %rdi
movl %ebx, %esi
callq 0x2fb9c
leaq 0x27a21(%rip), %rdi     # 0x577a0
callq 0x12160
leaq 0x27a34(%rip), %rdi     # 0x577bf
callq 0x12160
leaq 0x27a66(%rip), %rdi     # 0x577fd
callq 0x12160
leaq 0x27a82(%rip), %rdi     # 0x57825
callq 0x12160
xorl %edi, %edi
callq 0x12870
nop
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/crc64.c
// Function: crc64
uint64_t crc64(uint64_t crc, const unsigned char *s, uint64_t l) {
    uint64_t j;

    for (j = 0; j < l; j++) {
        uint8_t byte = s[j];
        crc = crc64_tab[(uint8_t)crc ^ byte] ^ (crc >> 8);
    }
    return crc;
}

// Assembly:
movq %rdi, %rax
testq %rdx, %rdx
je 0x2fddd
xorl %ecx, %ecx
leaq 0x27a9f(%rip), %rdi     # 0x57860
movzbl (%rsi,%rcx), %r8d
movzbl %al, %r9d
xorl %r8d, %r9d
shrq $0x8, %rax
xorq (%rdi,%r9,8), %rax
incq %rcx
cmpq %rcx, %rdx
jne 0x2fdc1
retq
nop
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/setproctitle.c
// Function: setproctitle
void setproctitle(const char *fmt, ...) {
	char buf[SPT_MAXTITLE + 1]; /* use buffer in case argv[0] is passed */
	va_list ap;
	char *nul;
	int len, error;

	if (!SPT.base)
		return;

	if (fmt) {
		va_start(ap, fmt);
		len = vsnprintf(buf, sizeof buf, fmt, ap);
		va_end(ap);
	} else {
		len = snprintf(buf, sizeof buf, "%s", SPT.arg0);
	}

	if (len <= 0)
		{ error = errno; goto error; }

	if (!SPT.reset) {
		memset(SPT.base, 0, SPT.end - SPT.base);
		SPT.reset = 1;
	} else {
		memset(SPT.base, 0, spt_min(sizeof buf, SPT.end - SPT.base));
	}

	len = spt_min(len, spt_min(sizeof buf, SPT.end - SPT.base) - 1);
	memcpy(SPT.base, buf, len);
	nul = &SPT.base[len];

	if (nul < SPT.nul) {
		*SPT.nul = '.';
	} else if (nul == SPT.nul && &nul[1] < SPT.end) {
		*SPT.nul = ' ';
		*++nul = '\0';
	}

	return;
error:
	SPT.error = error;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x1d0, %rsp            # imm = 0x1D0
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x30014
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
cmpq $0x0, 0x536f4(%rip)     # 0x83710
je 0x30135
movq %rdi, %r10
testq %rdi, %rdi
je 0x30066
leaq 0x20(%rsp), %rax
movq %rsp, %rcx
movq %rax, 0x10(%rcx)
leaq 0x1f0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rcx)
leaq 0xd0(%rsp), %rdi
movl $0x100, %esi            # imm = 0x100
movq %r10, %rdx
callq 0x121a0
jmp 0x30088
movq 0x5369b(%rip), %rcx     # 0x83708
leaq 0x25658(%rip), %rdx     # 0x556cc
leaq 0xd0(%rsp), %rdi
movl $0x100, %esi            # imm = 0x100
xorl %eax, %eax
callq 0x122d0
movl %eax, %ebx
testl %eax, %eax
jle 0x30135
movq 0x53677(%rip), %rdi     # 0x83710
movq 0x53678(%rip), %rdx     # 0x83718
subq %rdi, %rdx
cmpb $0x0, 0x5367e(%rip)     # 0x83728
je 0x300c4
movl $0x100, %eax            # imm = 0x100
cmpq %rax, %rdx
cmovbq %rdx, %rax
xorl %esi, %esi
movq %rax, %rdx
callq 0x12380
jmp 0x300d2
xorl %esi, %esi
callq 0x12380
movb $0x1, 0x53656(%rip)     # 0x83728
movl %ebx, %eax
movq 0x5363d(%rip), %r15     # 0x83718
movq 0x5362e(%rip), %r14     # 0x83710
movq %r15, %rbx
subq %r14, %rbx
movl $0x100, %ecx            # imm = 0x100
cmpq %rcx, %rbx
cmovaeq %rcx, %rbx
decq %rbx
cmpq %rbx, %rax
cmovbq %rax, %rbx
leaq 0xd0(%rsp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x12520
addq %r14, %rbx
movq 0x53605(%rip), %rax     # 0x83720
cmpq %rax, %rbx
jae 0x30125
movb $0x2e, (%rax)
jmp 0x30135
jne 0x30135
incq %rbx
cmpq %r15, %rbx
jae 0x30135
movb $0x20, (%rax)
movb $0x0, (%rbx)
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/blocked.c
// Function: getTimeoutFromObjectOrReply
int getTimeoutFromObjectOrReply(client *c, robj *object, mstime_t *timeout, int unit) {
    long long tval;

    if (getLongLongFromObjectOrReply(c,object,&tval,
        "timeout is not an integer or out of range") != C_OK)
        return C_ERR;

    if (tval < 0) {
        addReplyError(c,"timeout is negative");
        return C_ERR;
    }

    if (tval > 0) {
        if (unit == UNIT_SECONDS) tval *= 1000;
        tval += mstime();
    }
    *timeout = tval;

    return C_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %rbx
movq %rdi, %r15
leaq 0x27f1a(%rip), %rcx     # 0x58074
movq %rsp, %rdx
callq 0x266f6
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x301aa
movq (%rsp), %rax
testq %rax, %rax
js 0x3019b
je 0x3018f
testl %ebp, %ebp
jne 0x30186
imulq $0x3e8, %rax, %rax      # imm = 0x3E8
movq %rax, (%rsp)
callq 0x1a1d3
addq %rax, (%rsp)
movq (%rsp), %rax
movq %rax, (%rbx)
xorl %r14d, %r14d
jmp 0x301aa
leaq 0x27efc(%rip), %rsi     # 0x5809e
movq %r15, %rdi
callq 0x2230a
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x3eea9(%rip), %r14     # 0x6f088
movq 0x638(%r14), %rdi
cmpq $0x0, 0x28(%rdi)
je 0x3028c
leaq 0x27e68(%rip), %r15     # 0x58060
movq (%rdi), %rsi
testq %rsi, %rsi
je 0x30292
movq 0x10(%rsi), %rbx
callq 0x16be4
movl 0x88(%rbx), %eax
movl %eax, %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
movl %ecx, 0x88(%rbx)
testb $0x10, %al
jne 0x3027a
movl $0x0, 0x90(%rbx)
movq 0x18(%rbx), %rcx
testq %rcx, %rcx
je 0x3027a
movzbl -0x1(%rcx), %eax
movl %eax, %edx
andl $0x7, %edx
cmpl $0x4, %edx
ja 0x3026b
movslq (%r15,%rdx,4), %rdx
addq %r15, %rdx
jmpq *%rdx
shrl $0x3, %eax
jmp 0x3026d
movq -0x11(%rcx), %rax
jmp 0x3026d
movzwl -0x5(%rcx), %eax
jmp 0x3026d
movl -0x9(%rcx), %eax
jmp 0x3026d
movzbl -0x3(%rcx), %eax
jmp 0x3026d
xorl %eax, %eax
testq %rax, %rax
je 0x3027a
movq %rbx, %rdi
callq 0x23c34
movq 0x638(%r14), %rdi
cmpq $0x0, 0x28(%rdi)
jne 0x301f8
popq %rbx
popq %r14
popq %r15
retq
leaq 0x24a21(%rip), %rdi     # 0x54cba
leaq 0x27e12(%rip), %rsi     # 0x580b2
movl $0x71, %edx
callq 0x2a9ff
movl $0x1, %edi
callq 0x12120
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/latency.c
// Function: latencyAddSample
void latencyAddSample(char *event, mstime_t latency) {
    struct latencyTimeSeries *ts = dictFetchValue(server.latency_events,event);
    time_t now = time(NULL);
    int prev;

    /* Create the time series if it does not exist. */
    if (ts == NULL) {
        ts = zmalloc(sizeof(*ts));
        ts->idx = 0;
        ts->max = 0;
        memset(ts->samples,0,sizeof(ts->samples));
        dictAdd(server.latency_events,zstrdup(event),ts);
    }

    /* If the previous sample is in the same second, we update our old sample
     * if this latency is > of the old one, or just return. */
    prev = (ts->idx + LATENCY_TS_LEN - 1) % LATENCY_TS_LEN;
    if (ts->samples[prev].time == now) {
        if (latency > ts->samples[prev].latency)
            ts->samples[prev].latency = latency;
        return;
    }

    ts->samples[ts->idx].time = time(NULL);
    ts->samples[ts->idx].latency = latency;
    if (latency > ts->max) ts->max = latency;

    ts->idx++;
    if (ts->idx == LATENCY_TS_LEN) ts->idx = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r12
leaq 0x3ed2c(%rip), %r13     # 0x6f088
movq 0x678(%r13), %rdi
movq %r12, %rsi
callq 0x191a0
movq %rax, %r14
xorl %edi, %edi
callq 0x12550
movq %rax, %r15
testq %r14, %r14
jne 0x303b6
movl $0x508, %edi            # imm = 0x508
callq 0x1fea5
movq %rax, %r14
movl $0x508, %edx            # imm = 0x508
movq %rax, %rdi
xorl %esi, %esi
callq 0x12380
movq 0x678(%r13), %r13
movq %r12, %rdi
callq 0x20041
movq %r13, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x18b97
movl $0x9f, %eax
addl (%r14), %eax
cltq
imulq $0x66666667, %rax, %rcx # imm = 0x66666667
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x26, %rcx
addl %edx, %ecx
shll $0x5, %ecx
leal (%rcx,%rcx,4), %ecx
subl %ecx, %eax
cltq
movslq 0x8(%r14,%rax,8), %rcx
cmpq %rcx, %r15
jne 0x303f9
movl 0xc(%r14,%rax,8), %ecx
cmpq %rbx, %rcx
jge 0x3042c
movl %ebx, 0xc(%r14,%rax,8)
jmp 0x3042c
xorl %r15d, %r15d
xorl %edi, %edi
callq 0x12550
movslq (%r14), %rcx
movl %eax, 0x8(%r14,%rcx,8)
movl %ebx, 0xc(%r14,%rcx,8)
movl 0x4(%r14), %eax
cmpq %rbx, %rax
jge 0x3041d
movl %ebx, 0x4(%r14)
leal 0x1(%rcx), %eax
cmpl $0xa0, %eax
cmovnel %eax, %r15d
movl %r15d, (%r14)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/latency.c
// Function: latencyResetEvent
int latencyResetEvent(char *event_to_reset) {
    dictIterator *di;
    dictEntry *de;
    int resets = 0;

    di = dictGetSafeIterator(server.latency_events);
    while((de = dictNext(di)) != NULL) {
        char *event = dictGetKey(de);

        if (event_to_reset == NULL || strcasecmp(event,event_to_reset) == 0) {
            dictDelete(server.latency_events, event);
            resets++;
        }
    }
    dictReleaseIterator(di);
    return resets;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
leaq 0x3ec40(%rip), %r12     # 0x6f088
movq 0x678(%r12), %rdi
callq 0x1926c
movq %rax, %rbx
movq %rax, %rdi
callq 0x1929d
xorl %ebp, %ebp
testq %rax, %rax
je 0x3049a
movq (%rax), %r15
testq %r14, %r14
je 0x3047e
movq %r15, %rdi
movq %r14, %rsi
callq 0x12090
testl %eax, %eax
jne 0x30490
movq 0x678(%r12), %rdi
movq %r15, %rsi
callq 0x18e09
incl %ebp
movq %rbx, %rdi
callq 0x1929d
jmp 0x30462
movq %rbx, %rdi
callq 0x1935a
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/latency.c
// Function: latencyCommandReplyWithSamples
void latencyCommandReplyWithSamples(client *c, struct latencyTimeSeries *ts) {
    void *replylen = addDeferredMultiBulkLength(c);
    int samples = 0, j;

    for (j = 0; j < LATENCY_TS_LEN; j++) {
        int i = (ts->idx + j) % LATENCY_TS_LEN;

        if (ts->samples[i].time == 0) continue;
        addReplyMultiBulkLen(c,2);
        addReplyLongLong(c,ts->samples[i].time);
        addReplyLongLong(c,ts->samples[i].latency);
        samples++;
    }
    setDeferredMultiBulkLength(c,replylen,samples);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x225ef
movq %rax, %r15
xorl %ebp, %ebp
xorl %r12d, %r12d
movl (%r14), %eax
addl %r12d, %eax
cltq
imulq $0x66666667, %rax, %rcx # imm = 0x66666667
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x26, %rcx
addl %edx, %ecx
shll $0x5, %ecx
leal (%rcx,%rcx,4), %ecx
subl %ecx, %eax
movslq %eax, %r13
cmpl $0x0, 0x8(%r14,%r13,8)
je 0x3089f
movl $0x2, %esi
movq %rbx, %rdi
callq 0x22976
movslq 0x8(%r14,%r13,8), %rsi
movq %rbx, %rdi
callq 0x22941
movl 0xc(%r14,%r13,8), %esi
movq %rbx, %rdi
callq 0x22941
incl %ebp
incl %r12d
cmpl $0xa0, %r12d
jne 0x30847
movslq %ebp, %rdx
movq %rbx, %rdi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x22615
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/latency.c
// Function: latencyCommandReplyWithLatestEvents
void latencyCommandReplyWithLatestEvents(client *c) {
    dictIterator *di;
    dictEntry *de;

    addReplyMultiBulkLen(c,dictSize(server.latency_events));
    di = dictGetIterator(server.latency_events);
    while((de = dictNext(di)) != NULL) {
        char *event = dictGetKey(de);
        struct latencyTimeSeries *ts = dictGetVal(de);
        int last = (ts->idx + LATENCY_TS_LEN - 1) % LATENCY_TS_LEN;

        addReplyMultiBulkLen(c,4);
        addReplyBulkCString(c,event);
        addReplyLongLong(c,ts->samples[last].time);
        addReplyLongLong(c,ts->samples[last].latency);
        addReplyLongLong(c,ts->max);
    }
    dictReleaseIterator(di);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x3e7af(%rip), %r14     # 0x6f088
movq 0x678(%r14), %rax
movq 0x48(%rax), %rsi
addq 0x28(%rax), %rsi
callq 0x22976
movq 0x678(%r14), %rdi
callq 0x19242
movq %rax, %r14
movq %rax, %rdi
callq 0x1929d
testq %rax, %rax
je 0x30992
movq (%rax), %r15
movq 0x8(%rax), %r12
movl (%r12), %eax
movl %eax, %ecx
addl $0x9f, %ecx
movslq %ecx, %rcx
imulq $0x66666667, %rcx, %rcx # imm = 0x66666667
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x26, %rcx
addl %edx, %ecx
shll $0x5, %ecx
leal (%rcx,%rcx,4), %ecx
negl %ecx
leal (%rax,%rcx), %ebp
addl $0x9f, %ebp
movl $0x4, %esi
movq %rbx, %rdi
callq 0x22976
movq %rbx, %rdi
movq %r15, %rsi
callq 0x22791
movslq %ebp, %r15
movslq 0x8(%r12,%r15,8), %rsi
movq %rbx, %rdi
callq 0x22941
movl 0xc(%r12,%r15,8), %esi
movq %rbx, %rdi
callq 0x22941
movl 0x4(%r12), %esi
movq %rbx, %rdi
callq 0x22941
movq %r14, %rdi
jmp 0x308ff
movq %r14, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1935a
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/sparkline.c
// Function: createSparklineSequence
struct sequence *createSparklineSequence(void) {
    struct sequence *seq = zmalloc(sizeof(*seq));
    seq->length = 0;
    seq->samples = NULL;
    return seq;
}

// Assembly:
pushq %rax
movl $0x20, %edi
callq 0x1fea5
movl $0x0, (%rax)
movq $0x0, 0x8(%rax)
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x30ded
movsd 0x10(%rbx), %xmm1
ucomisd %xmm0, %xmm1
ja 0x30df2
ucomisd 0x18(%rbx), %xmm0
jbe 0x30dfa
leaq 0x18(%rbx), %rax
jmp 0x30df6
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 0x1ff61
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 0x30e37
incl 0x4(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/sparkline.c
// Function: freeSparklineSequence
void freeSparklineSequence(struct sequence *seq) {
    int j;

    for (j = 0; j < seq->length; j++)
        zfree(seq->samples[j].label);
    zfree(seq->samples);
    zfree(seq);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, (%rdi)
jle 0x30e71
movl $0x8, %r14d
xorl %r15d, %r15d
movq 0x8(%rbx), %rax
movq (%rax,%r14), %rdi
callq 0x1ffff
incq %r15
movslq (%rbx), %rax
addq $0x10, %r14
cmpq %rax, %r15
jl 0x30e55
movq 0x8(%rbx), %rdi
callq 0x1ffff
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1ffff
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/sparkline.c
// Function: sparklineRender
sds sparklineRender(sds output, struct sequence *seq, int columns, int rows, int flags) {
    int j;

    for (j = 0; j < seq->length; j += columns) {
        int sublen = (seq->length-j) < columns ? (seq->length-j) : columns;

        if (j != 0) output = sdscatlen(output,"\n",1);
        output = sparklineRenderRange(output, seq, rows, j, sublen, flags);
    }
    return output;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, 0x4(%rsp)
movq %rdi, %rax
movl (%rsi), %r13d
testl %r13d, %r13d
jle 0x3118a
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %r15
xorl %ebx, %ebx
xorl %r12d, %r12d
addl %ebx, %r13d
cmpl %r14d, %r13d
cmovgel %r14d, %r13d
testl %r12d, %r12d
je 0x31164
movl $0x1, %edx
movq %rax, %rdi
leaq 0x22c29(%rip), %rsi     # 0x53d88
callq 0x1e66d
movq %rax, %rdi
movq %r15, %rsi
movl %ebp, %edx
movl %r12d, %ecx
movl %r13d, %r8d
movl 0x4(%rsp), %r9d
callq 0x30e87
addl %r14d, %r12d
movl (%r15), %r13d
subl %r14d, %ebx
cmpl %r13d, %r12d
jl 0x31141
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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 0x31229
xorl %esi, %esi
popq %rbx
jmp 0x197af
leaq 0x3db10(%rip), %rdi     # 0x6ed40
xorl %esi, %esi
callq 0x18875
movq %rax, 0x40(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x312c7
movq (%rax), %rax
movq 0x10(%rax), %rax
movq (%rax), %rdi
movq (%rbx), %rsi
movl $0x1, %edx
callq 0x34373
movq 0x60(%rbx), %rax
jmp 0x312a5
movq 0x8(%rbx), %rdi
leaq 0x8(%rsp), %r14
movq %r14, %rsi
callq 0x16c72
movq %r14, %rdi
callq 0x16c8f
testq %rax, %rax
je 0x31300
leaq 0x8(%rsp), %r14
movq 0x10(%rax), %rdi
callq 0x1ffff
movq %r14, %rdi
callq 0x16c8f
testq %rax, %rax
jne 0x312ea
movq 0x8(%rbx), %rdi
callq 0x16a50
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x31317
callq 0x190b8
movq %rbx, %rdi
callq 0x1ffff
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x3dd56(%rip), %rax     # 0x6f088
movq 0x618(%rax), %rdi
callq 0x190de
testq %rax, %rax
je 0x31349
movq 0x8(%rax), %rax
jmp 0x3134b
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x3dd2c(%rip), %r15     # 0x6f088
movl 0x628(%r15), %edi
shlq $0x4, %rdi
addq $0x70, %rdi
callq 0x1feff
movq %rax, %rbx
movq %r14, %rdi
callq 0x1de83
movq %rax, (%rbx)
callq 0x16a2c
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 0x18b97
testl %eax, %eax
jne 0x313bc
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2757a(%rip), %rdi     # 0x5893d
leaq 0x27569(%rip), %rsi     # 0x58933
movl $0x8b, %edx
callq 0x2a9ff
movl $0x1, %edi
callq 0x12120
// File: /workspace/github_c_makefile_star2_O1/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 0x1feff
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 0x52181(%rip), %rax     # 0x835a0
cmpq %r12, (%rax)
jne 0x3142f
cmpq $0x0, 0x10(%r14)
jne 0x3144a
movq %rbx, 0x10(%r14)
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0x16aff
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x27522(%rip), %rdi     # 0x58973
leaq 0x274db(%rip), %rsi     # 0x58933
movl $0x96, %edx
callq 0x2a9ff
movl $0x1, %edi
callq 0x12120
// File: /workspace/github_c_makefile_star2_O1/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 0x1a1d3
movq %rax, %r14
fldz
fstpt 0x20(%rbx)
movq 0x8(%rbx), %rdi
leaq 0x10(%rsp), %r15
movq %r15, %rsi
callq 0x16c72
movq %r15, %rdi
callq 0x16c8f
testq %rax, %rax
je 0x314ff
leaq 0x10(%rsp), %r15
movq 0x10(%rax), %rax
cmpq 0x10(%rbx), %rax
je 0x314e7
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 0x314ea
fldt 0x30(%rax)
fldt 0x20(%rbx)
faddp %st, %st(1)
fstpt 0x20(%rbx)
movq %r15, %rdi
callq 0x16c8f
testq %rax, %rax
jne 0x314bc
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x31621
movq %rsi, %rbx
leaq 0x18(%rsp), %r15
movq %r15, %rsi
callq 0x16c72
movq %r15, %rdi
callq 0x16c8f
testq %rax, %rax
je 0x31621
leaq 0x18(%rsp), %r15
leaq 0x3e244(%rip), %r12     # 0x6f798
leaq 0x2733d(%rip), %r13     # 0x58898
movq 0x10(%rax), %rbp
cmpq %rbx, 0x10(%rbp)
jg 0x31610
movq %r14, %rdi
callq 0x31480
fldt 0x20(%rbp)
fldt 0x20(%r14)
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jne 0x31586
jnp 0x31610
movq (%rbp), %rdi
movq 0x139e0(%r12), %rsi
callq 0x21f58
movq (%rbp), %rdi
movq 0xf8(%r12), %rsi
callq 0x21f58
movq (%r14), %rsi
movzbl -0x1(%rsi), %edx
movl %edx, %eax
andl $0x7, %eax
cmpl $0x4, %eax
ja 0x315df
movslq (%r13,%rax,4), %rax
addq %r13, %rax
jmpq *%rax
shrl $0x3, %edx
jmp 0x315e1
movq -0x11(%rsi), %rdx
jmp 0x315e1
movzwl -0x5(%rsi), %edx
jmp 0x315e1
movl -0x9(%rsi), %edx
jmp 0x315e1
movzbl -0x3(%rsi), %edx
jmp 0x315e1
xorl %edx, %edx
movq (%rbp), %rdi
callq 0x22a7d
movq (%rbp), %rdi
fldt 0x20(%r14)
fstpt (%rsp)
callq 0x227d7
imulq $0x3e8, 0x8(%rbp), %rax # imm = 0x3E8
addq %rbx, %rax
movq %rax, 0x10(%rbp)
fldt 0x20(%r14)
fstpt 0x20(%rbp)
movq %r15, %rdi
callq 0x16c8f
testq %rax, %rax
jne 0x3155b
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/src/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 0x16c72
movq %r15, %rdi
callq 0x16c8f
testq %rax, %rax
je 0x316b1
movq 0x10(%rax), %r12
cmpq %r14, (%r12)
jne 0x31652
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 0x31690
fstp %st(0)
callq 0x1a1d3
fldz
jmp 0x31692
xorl %eax, %eax
movq %rax, 0x40(%r12)
fld %st(0)
fstpt 0x50(%r12)
fstpt 0x60(%r12)
leaq 0x3d9de(%rip), %rax     # 0x6f088
incq 0x6a0(%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x3d9b7(%rip), %rax     # 0x6f088
movq 0x618(%rax), %rdi
callq 0x19242
movq %rax, %rbx
movq %rax, %rdi
callq 0x1929d
xorl %ebp, %ebp
testq %rax, %rax
je 0x3172e
leaq 0x8(%rsp), %r15
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
movq %r15, %rsi
callq 0x16c72
movq %r15, %rdi
callq 0x16c8f
testq %rax, %rax
je 0x31721
movq 0x10(%rax), %rax
xorl %ecx, %ecx
cmpq %r14, (%rax)
sete %cl
addl %ecx, %ebp
jmp 0x31704
movq %rbx, %rdi
callq 0x1929d
testq %rax, %rax
jne 0x316f4
movq %rbx, %rdi
callq 0x1935a
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x3d930(%rip), %rax     # 0x6f088
movq 0x618(%rax), %rdi
callq 0x1926c
movq %rax, %r14
movq %rax, %rdi
callq 0x1929d
testq %rax, %rax
je 0x317cc
leaq 0x8(%rsp), %r15
movq 0x8(%rax), %r12
movq 0x8(%r12), %rdi
movq %r15, %rsi
callq 0x16c72
movq %r15, %rdi
callq 0x16c8f
testq %rax, %rax
je 0x317bf
movq 0x10(%rax), %rcx
cmpq %rbx, (%rcx)
jne 0x3178a
cmpq 0x10(%r12), %rcx
jne 0x317b0
movq $0x0, 0x10(%r12)
movq 0x8(%r12), %rdi
movq %rax, %rsi
callq 0x16be4
jmp 0x3178a
movq %r14, %rdi
callq 0x1929d
testq %rax, %rax
jne 0x31779
movq %r14, %rdi
callq 0x1935a
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x3183a
movl $0x1, %r15d
xorl %r14d, %r14d
leaq 0x3d887(%rip), %r12     # 0x6f088
movq 0x30(%rbx), %rax
movq (%rax,%r15,8), %rax
movq 0x8(%rax), %rsi
movq 0x618(%r12), %rdi
callq 0x190de
xorl %ecx, %ecx
testq %rax, %rax
je 0x31829
cmpq $0x0, 0x8(%rax)
setne %cl
addq %rcx, %r14
incq %r15
movslq 0x28(%rbx), %rax
cmpq %rax, %r15
jl 0x31801
jmp 0x3183d
xorl %r14d, %r14d
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x22941
// File: /workspace/github_c_makefile_star2_O1/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 0x3d815(%rip), %r12     # 0x6f088
movq 0x618(%r12), %rdi
callq 0x190de
testq %rax, %rax
je 0x3188b
movq 0x8(%rax), %r14
jmp 0x3188e
xorl %r14d, %r14d
testq %r14, %r14
jne 0x3189e
movq %r15, %rdi
callq 0x3134d
movq %rax, %r14
cmpq $0x0, 0x10(%r14)
jne 0x318ba
leaq 0x51cf4(%rip), %rax     # 0x835a0
movq (%rax), %rdx
movq %r14, %rdi
movq %rdx, %rsi
callq 0x313de
movq 0x10(%r14), %rax
fldt 0x30(%rax)
fldt 0x18(%rsp)
faddp %st, %st(1)
fldl 0x2701b(%rip)           # 0x588e8
fxch %st(1)
fucomi %st(1), %st
jbe 0x318d7
fstp %st(0)
jmp 0x31919
fldl 0x27013(%rip)           # 0x588f0
fucomi %st(1), %st
jbe 0x318e7
fstp %st(1)
fstp %st(1)
jmp 0x31919
fstpt 0x30(%rsp)
fstpt 0x24(%rsp)
movq %r14, %rdi
fstpt 0x3c(%rsp)
callq 0x31480
fldt 0x20(%r14)
fldt 0x18(%rsp)
faddp %st, %st(1)
fldt 0x3c(%rsp)
fxch %st(1)
fucomi %st(1), %st
fstp %st(1)
ja 0x31919
fldt 0x30(%rsp)
fucompi %st(1), %st
jbe 0x31937
fstp %st(0)
leaq 0x27067(%rip), %rsi     # 0x58989
movq %rbx, %rdi
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x22331
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 0x227d7
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x30(%rdi), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rsi
leaq 0x3d5fb(%rip), %r12     # 0x6f088
movq 0x618(%r12), %rdi
callq 0x190de
testq %rax, %rax
je 0x31aa5
movq 0x8(%rax), %r14
jmp 0x31aa8
xorl %r14d, %r14d
testq %r14, %r14
je 0x31acc
movq %r14, %rdi
callq 0x31480
cmpl $0x2, 0x28(%rbx)
jne 0x31ae3
fldt 0x20(%r14)
fstpt (%rsp)
movq %rbx, %rdi
callq 0x227d7
jmp 0x31b3d
cmpl $0x2, 0x28(%rbx)
jne 0x31b21
leaq 0x26ed3(%rip), %rsi     # 0x589ac
movl $0x7, %edx
jmp 0x31bb0
movq 0x30(%rbx), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %r15
leaq 0x26ebe(%rip), %rsi     # 0x589b4
movq %r15, %rdi
callq 0x12090
testl %eax, %eax
je 0x31b49
leaq 0x26ed7(%rip), %rsi     # 0x589e0
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x22331
movq 0x30(%rbx), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x26e80(%rip), %rsi     # 0x589b4
callq 0x12090
testl %eax, %eax
je 0x31b67
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x2, %esi
movq %rbx, %rdi
callq 0x22976
fldt 0x20(%r14)
fstpt (%rsp)
movq %rbx, %rdi
callq 0x227d7
jmp 0x31b88
movl $0x2, %esi
movq %rbx, %rdi
callq 0x22976
leaq 0x26e31(%rip), %rsi     # 0x589ac
movl $0x7, %edx
movq %rbx, %rdi
callq 0x22248
movq 0x668(%r12), %rax
cmpl $0x0, 0x3c(%rax)
jle 0x31ba4
leaq 0x26e1d(%rip), %rsi     # 0x589ba
movl $0x13, %edx
jmp 0x31bb0
leaq 0x26e23(%rip), %rsi     # 0x589ce
movl $0x11, %edx
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x22248
// File: /workspace/github_c_makefile_star2_O1/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
subq $0x18, %rsp
movq %rdi, %rbx
movslq 0x28(%rdi), %rsi
decq %rsi
callq 0x22976
cmpl $0x2, 0x28(%rbx)
jl 0x31c4e
movl $0x1, %r15d
leaq 0x3d498(%rip), %r12     # 0x6f088
leaq 0x26db5(%rip), %r14     # 0x589ac
movq 0x30(%rbx), %rax
movq (%rax,%r15,8), %rax
movq 0x8(%rax), %rsi
movq 0x618(%r12), %rdi
callq 0x190de
testq %rax, %rax
je 0x31c1b
movq 0x8(%rax), %rax
jmp 0x31c1d
xorl %eax, %eax
testq %rax, %rax
je 0x31c32
fldt 0x20(%rax)
fstpt (%rsp)
movq %rbx, %rdi
callq 0x227d7
jmp 0x31c42
movl $0x7, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x22248
incq %r15
movslq 0x28(%rbx), %rax
cmpq %rax, %r15
jl 0x31bf7
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x30(%rdi), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rsi
leaq 0x3d2b6(%rip), %r15     # 0x6f088
movq 0x618(%r15), %rdi
callq 0x190de
testq %rax, %rax
je 0x31de9
movq 0x8(%rax), %r14
jmp 0x31dec
xorl %r14d, %r14d
testq %r14, %r14
jne 0x31e02
cmpl $0x2, 0x28(%rbx)
jne 0x31e02
movsd 0x620(%r15), %xmm0
jmp 0x31e57
cmpl $0x2, 0x28(%rbx)
jne 0x31e10
movsd 0x50(%r14), %xmm0
jmp 0x31e57
movq 0x30(%rbx), %rax
movq 0x10(%rax), %rsi
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x26460
testl %eax, %eax
jne 0x31e5f
testq %r14, %r14
jne 0x31e44
movq 0x30(%rbx), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
callq 0x3134d
movq %rax, %r14
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x50(%r14)
incq 0x6a0(%r15)
movq %rbx, %rdi
callq 0x226db
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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
movzbl -0x1(%r14), %eax
movq %rax, (%rsp)
andl $0x7, %eax
cmpl $0x4, %eax
ja 0x32025
leaq 0x26a0a(%rip), %rcx     # 0x588ac
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%rsp), %rax
shrl $0x3, %eax
jmp 0x31ecc
movq -0x11(%r14), %rax
jmp 0x31ecc
movzwl -0x5(%r14), %eax
jmp 0x31ecc
movl -0x9(%r14), %eax
jmp 0x31ecc
movzbl -0x3(%r14), %eax
movq %rax, (%rsp)
movq %rbx, %rdi
callq 0x225ef
movq %rax, 0x8(%rsp)
leaq 0x3d1a4(%rip), %rax     # 0x6f088
movq 0x618(%rax), %rdi
callq 0x1926c
movq %rax, %r13
cmpb $0x2a, (%r14)
jne 0x31f04
cmpb $0x0, 0x1(%r14)
sete %r15b
jmp 0x31f07
xorl %r15d, %r15d
movq %r13, %rdi
callq 0x1929d
testq %rax, %rax
je 0x31ffd
movq %r14, 0x10(%rsp)
xorl %ebp, %ebp
leaq 0x269ae(%rip), %r14     # 0x588d4
movq (%rax), %r12
testb %r15b, %r15b
jne 0x31f8b
movzbl -0x1(%r12), %ecx
movl %ecx, %eax
andl $0x7, %eax
cmpl $0x4, %eax
ja 0x31f71
leaq 0x2697b(%rip), %rdx     # 0x588c0
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
shrl $0x3, %ecx
jmp 0x31f73
movq -0x11(%r12), %rcx
jmp 0x31f73
movzwl -0x5(%r12), %ecx
jmp 0x31f73
movl -0x9(%r12), %ecx
jmp 0x31f73
movzbl -0x3(%r12), %ecx
jmp 0x31f73
xorl %ecx, %ecx
movq 0x10(%rsp), %rdi
movq (%rsp), %rsi
movq %r12, %rdx
xorl %r8d, %r8d
callq 0x24df0
testl %eax, %eax
je 0x31fea
movzbl -0x1(%r12), %esi
movl %esi, %eax
andl $0x7, %eax
cmpl $0x4, %eax
ja 0x31fc7
movslq (%r14,%rax,4), %rax
addq %r14, %rax
jmpq *%rax
shrl $0x3, %esi
jmp 0x31fc9
movq -0x11(%r12), %rsi
jmp 0x31fc9
movzwl -0x5(%r12), %esi
jmp 0x31fc9
movl -0x9(%r12), %esi
jmp 0x31fc9
movzbl -0x3(%r12), %esi
jmp 0x31fc9
xorl %esi, %esi
movq %r12, %rdi
callq 0x25af0
movq %rax, %r12
movq %rbx, %rdi
movq %rax, %rsi
callq 0x22a4a
incq %rbp
movq %r12, %rdi
callq 0x25d25
movq %r13, %rdi
callq 0x1929d
testq %rax, %rax
jne 0x31f26
jmp 0x31fff
xorl %ebp, %ebp
movq %r13, %rdi
callq 0x1935a
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movq %rbp, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x22615
movq $0x0, (%rsp)
jmp 0x31ed0
// File: /workspace/github_c_makefile_star2_O1/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 0x265b9
testl %eax, %eax
jne 0x32097
movslq 0x28(%rbx), %rsi
addq $-0x2, %rsi
movq %rbx, %rdi
callq 0x22976
cmpl $0x3, 0x28(%rbx)
jl 0x32097
movl $0x2, %r14d
movq 0x30(%rbx), %rax
movq (%rax,%r14,8), %rax
movq 0x8(%rax), %rsi
fldt 0x10(%rsp)
fstpt (%rsp)
movq %rbx, %rdi
callq 0x31853
incq %r14
movslq 0x28(%rbx), %rax
cmpq %rax, %r14
jl 0x32070
addq $0x28, %rsp
popq %rbx
popq %r14
retq