LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: sentinelFailoverStateMachine
void sentinelFailoverStateMachine(sentinelRedisInstance *ri) {
    serverAssert(ri->flags & SRI_MASTER);

    if (!(ri->flags & SRI_FAILOVER_IN_PROGRESS)) return;

    switch(ri->failover_state) {
        case SENTINEL_FAILOVER_STATE_WAIT_START:
            sentinelFailoverWaitStart(ri);
            break;
        case SENTINEL_FAILOVER_STATE_SELECT_SLAVE:
            sentinelFailoverSelectSlave(ri);
            break;
        case SENTINEL_FAILOVER_STATE_SEND_SLAVEOF_NOONE:
            sentinelFailoverSendSlaveOfNoOne(ri);
            break;
        case SENTINEL_FAILOVER_STATE_WAIT_PROMOTION:
            sentinelFailoverWaitPromotion(ri);
            break;
        case SENTINEL_FAILOVER_STATE_RECONF_SLAVES:
            sentinelFailoverReconfNextSlave(ri);
            break;
    }
}

// Assembly:
movl (%rdi), %eax
testb $0x1, %al
je 0x7c1c4
testb $0x40, %al
jne 0x7c18e
retq
movl 0xf0(%rdi), %eax
decl %eax
cmpl $0x4, %eax
ja 0x7c18d
leaq 0x50032(%rip), %rcx     # 0xcc1d4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x7bac0
jmp 0x7bfa5
jmp 0x7bcfb
jmp 0x7bd91
jmp 0x7bc5d
pushq %rax
leaq 0x50303(%rip), %rdi     # 0xcc4cf
leaq 0x5007d(%rip), %rsi     # 0xcc250
movl $0x1057, %edx           # imm = 0x1057
callq 0x61908
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: sentinelHandleRedisInstance
void sentinelHandleRedisInstance(sentinelRedisInstance *ri) {
    /* ========== MONITORING HALF ============ */
    /* Every kind of instance */
    sentinelReconnectInstance(ri);
    sentinelSendPeriodicCommands(ri);

    /* ============== ACTING HALF ============= */
    /* We don't proceed with the acting half if we are in TILT mode.
     * TILT happens when we find something odd with the time, like a
     * sudden change in the clock. */
    if (sentinel.tilt) {
        if (mstime()-sentinel.tilt_start_time < SENTINEL_TILT_PERIOD) return;
        sentinel.tilt = 0;
        sentinelEvent(LL_WARNING,"-tilt",NULL,"#tilt mode exited");
    }

    /* Every kind of instance */
    sentinelCheckSubjectivelyDown(ri);

    /* Masters and slaves */
    if (ri->flags & (SRI_MASTER|SRI_SLAVE)) {
        /* Nothing so far. */
    }

    /* Only masters */
    if (ri->flags & SRI_MASTER) {
        sentinelCheckObjectivelyDown(ri);
        if (sentinelStartFailoverIfNeeded(ri))
            sentinelAskMasterStateToOtherSentinels(ri,SENTINEL_ASK_FORCED);
        sentinelFailoverStateMachine(ri);
        sentinelAskMasterStateToOtherSentinels(ri,SENTINEL_NO_FLAGS);
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x78d2f
movq %rbx, %rdi
callq 0x7a328
cmpl $0x0, 0x9a519(%rip)     # 0x116718
je 0x7c23b
callq 0x2ffce
subq 0x9a513(%rip), %rax     # 0x116720
cmpq $0x7530, %rax           # imm = 0x7530
jl 0x7c248
movl $0x0, 0x9a4f9(%rip)     # 0x116718
leaq 0x51521(%rip), %rsi     # 0xcd747
leaq 0x51520(%rip), %rcx     # 0xcd74d
movl $0x3, %edi
xorl %edx, %edx
xorl %eax, %eax
callq 0x76a24
movq %rbx, %rdi
callq 0x7b2e5
testb $0x1, (%rbx)
jne 0x7c24a
popq %rbx
retq
movq %rbx, %rdi
callq 0x7b463
movq %rbx, %rdi
callq 0x7b998
testl %eax, %eax
je 0x7c26b
movq %rbx, %rdi
movl $0x1, %esi
callq 0x7b62c
movq %rbx, %rdi
callq 0x7c183
movq %rbx, %rdi
xorl %esi, %esi
popq %rbx
jmp 0x7b62c
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: sentinelHandleDictOfRedisInstances
void sentinelHandleDictOfRedisInstances(dict *instances) {
    dictIterator *di;
    dictEntry *de;
    sentinelRedisInstance *switch_to_promoted = NULL;

    /* There are a number of things we need to perform against every master. */
    di = dictGetIterator(instances);
    while((de = dictNext(di)) != NULL) {
        sentinelRedisInstance *ri = dictGetVal(de);

        sentinelHandleRedisInstance(ri);
        if (ri->flags & SRI_MASTER) {
            sentinelHandleDictOfRedisInstances(ri->slaves);
            sentinelHandleDictOfRedisInstances(ri->sentinels);
            if (ri->failover_state == SENTINEL_FAILOVER_STATE_UPDATE_CONFIG) {
                switch_to_promoted = ri;
            }
        }
    }
    if (switch_to_promoted)
        sentinelFailoverSwitchToPromotedSlave(switch_to_promoted);
    dictReleaseIterator(di);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
callq 0x2efbb
movq %rax, %rbx
movq %rax, %rdi
callq 0x2f015
testq %rax, %rax
je 0x7c2eb
xorl %r14d, %r14d
movq 0x8(%rax), %r15
movq %r15, %rdi
callq 0x7c1e7
testb $0x1, (%r15)
je 0x7c2d1
movq 0x88(%r15), %rdi
callq 0x7c27e
movq 0x80(%r15), %rdi
callq 0x7c27e
cmpl $0x6, 0xf0(%r15)
cmoveq %r15, %r14
movq %rbx, %rdi
callq 0x2f015
testq %rax, %rax
jne 0x7c29b
testq %r14, %r14
je 0x7c2eb
movq %r14, %rdi
callq 0x7c113
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2f0dd
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: sentinelCheckTiltCondition
void sentinelCheckTiltCondition(void) {
    mstime_t now = mstime();
    mstime_t delta = now - sentinel.previous_time;

    if (delta < 0 || delta > SENTINEL_TILT_TRIGGER) {
        sentinel.tilt = 1;
        sentinel.tilt_start_time = mstime();
        sentinelEvent(LL_WARNING,"+tilt",NULL,"#tilt mode entered");
    }
    sentinel.previous_time = mstime();
}

// Assembly:
pushq %rax
callq 0x2ffce
subq 0x9a423(%rip), %rax     # 0x116728
cmpq $0x7d1, %rax            # imm = 0x7D1
jb 0x7c33f
movl $0x1, 0x9a401(%rip)     # 0x116718
callq 0x2ffce
movq %rax, 0x9a3fd(%rip)     # 0x116720
leaq 0x51435(%rip), %rsi     # 0xcd75f
leaq 0x51434(%rip), %rcx     # 0xcd765
movl $0x3, %edi
xorl %edx, %edx
xorl %eax, %eax
callq 0x76a24
callq 0x2ffce
movq %rax, 0x9a3dd(%rip)     # 0x116728
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: sentinelTimer
void sentinelTimer(void) {
    sentinelCheckTiltCondition();
    sentinelHandleDictOfRedisInstances(sentinel.masters);
    sentinelRunPendingScripts();
    sentinelCollectTerminatedScripts();
    sentinelKillTimedoutScripts();

    /* We continuously change the frequency of the Redis "timer interrupt"
     * in order to desynchronize every Sentinel from every other.
     * This non-determinism avoids that Sentinels started at the same time
     * exactly continue to stay synchronized asking to be voted at the
     * same time again and again (resulting in nobody likely winning the
     * election because of split brain voting). */
    server.hz = CONFIG_DEFAULT_HZ + rand() % CONFIG_DEFAULT_HZ;
}

// Assembly:
pushq %rax
callq 0x7c2f8
movq 0x9a3b6(%rip), %rdi     # 0x116710
callq 0x7c27e
callq 0x76f65
callq 0x770b6
callq 0x77211
callq 0x26b70
cltq
imulq $0x66666667, %rax, %rcx # imm = 0x66666667
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x22, %rcx
addl %edx, %ecx
addl %ecx, %ecx
leal (%rcx,%rcx,4), %ecx
negl %ecx
addl %ecx, %eax
addl $0xa, %eax
leaq 0x8550c(%rip), %rcx     # 0x1018a8
movl %eax, 0x20(%rcx)
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: redisAeAddRead
static void redisAeAddRead(void *privdata) {
    redisAeEvents *e = (redisAeEvents*)privdata;
    aeEventLoop *loop = e->loop;
    if (!e->reading) {
        e->reading = 1;
        aeCreateFileEvent(loop,e->fd,AE_READABLE,redisAeReadEvent,e);
    }
}

// Assembly:
cmpl $0x0, 0x14(%rdi)
je 0x7c3a8
retq
movq %rdi, %r8
movq 0x8(%rdi), %rdi
movl $0x1, 0x14(%r8)
movl 0x10(%r8), %esi
leaq 0xc2(%rip), %rcx        # 0x7c484
movl $0x1, %edx
jmp 0x2ce46
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: redisAeDelRead
static void redisAeDelRead(void *privdata) {
    redisAeEvents *e = (redisAeEvents*)privdata;
    aeEventLoop *loop = e->loop;
    if (e->reading) {
        e->reading = 0;
        aeDeleteFileEvent(loop,e->fd,AE_READABLE);
    }
}

// Assembly:
cmpl $0x0, 0x14(%rdi)
je 0x7c3ed
movq 0x8(%rdi), %rax
movl $0x0, 0x14(%rdi)
movl 0x10(%rdi), %esi
movq %rax, %rdi
movl $0x1, %edx
jmp 0x2cf0e
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: redisAeAddWrite
static void redisAeAddWrite(void *privdata) {
    redisAeEvents *e = (redisAeEvents*)privdata;
    aeEventLoop *loop = e->loop;
    if (!e->writing) {
        e->writing = 1;
        aeCreateFileEvent(loop,e->fd,AE_WRITABLE,redisAeWriteEvent,e);
    }
}

// Assembly:
cmpl $0x0, 0x18(%rdi)
je 0x7c3f5
retq
movq %rdi, %r8
movq 0x8(%rdi), %rdi
movl $0x1, 0x18(%r8)
movl 0x10(%r8), %esi
leaq 0x7d(%rip), %rcx        # 0x7c48c
movl $0x2, %edx
jmp 0x2ce46
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: redisAeDelWrite
static void redisAeDelWrite(void *privdata) {
    redisAeEvents *e = (redisAeEvents*)privdata;
    aeEventLoop *loop = e->loop;
    if (e->writing) {
        e->writing = 0;
        aeDeleteFileEvent(loop,e->fd,AE_WRITABLE);
    }
}

// Assembly:
cmpl $0x0, 0x18(%rdi)
je 0x7c43a
movq 0x8(%rdi), %rax
movl $0x0, 0x18(%rdi)
movl 0x10(%rdi), %esi
movq %rax, %rdi
movl $0x2, %edx
jmp 0x2cf0e
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: redisAeCleanup
static void redisAeCleanup(void *privdata) {
    redisAeEvents *e = (redisAeEvents*)privdata;
    redisAeDelRead(privdata);
    redisAeDelWrite(privdata);
    zfree(e);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x14(%rdi)
je 0x7c45d
movq 0x8(%rbx), %rdi
movl $0x0, 0x14(%rbx)
movl 0x10(%rbx), %esi
movl $0x1, %edx
callq 0x2cf0e
cmpl $0x0, 0x18(%rbx)
je 0x7c47b
movq 0x8(%rbx), %rdi
movl $0x0, 0x18(%rbx)
movl 0x10(%rbx), %esi
movl $0x2, %edx
callq 0x2cf0e
movq %rbx, %rdi
popq %rbx
jmp 0x38413
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/notify.c
// Function: keyspaceEventsStringToFlags
int keyspaceEventsStringToFlags(char *classes) {
    char *p = classes;
    int c, flags = 0;

    while((c = *p++) != '\0') {
        switch(c) {
        case 'A': flags |= NOTIFY_ALL; break;
        case 'g': flags |= NOTIFY_GENERIC; break;
        case '$': flags |= NOTIFY_STRING; break;
        case 'l': flags |= NOTIFY_LIST; break;
        case 's': flags |= NOTIFY_SET; break;
        case 'h': flags |= NOTIFY_HASH; break;
        case 'z': flags |= NOTIFY_ZSET; break;
        case 'x': flags |= NOTIFY_EXPIRED; break;
        case 'e': flags |= NOTIFY_EVICTED; break;
        case 'K': flags |= NOTIFY_KEYSPACE; break;
        case 'E': flags |= NOTIFY_KEYEVENT; break;
        default: return -1;
        }
    }
    return flags;
}

// Assembly:
xorl %eax, %eax
leaq 0x512db(%rip), %rcx     # 0xcd778
movzbl (%rdi), %edx
cmpl $0x64, %edx
jle 0x7c4c6
cmpl $0x72, %edx
jg 0x7c4dc
addl $-0x65, %edx
cmpl $0x7, %edx
ja 0x7c541
movslq (%rcx,%rdx,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
movl $0x200, %esi            # imm = 0x200
jmp 0x7c532
cmpl $0x44, %edx
jg 0x7c4f2
cmpl $0x24, %edx
je 0x7c52d
movl $0x3fc, %esi            # imm = 0x3FC
cmpl $0x41, %edx
je 0x7c532
jmp 0x7c53c
cmpl $0x73, %edx
je 0x7c526
cmpl $0x78, %edx
je 0x7c51f
cmpl $0x7a, %edx
jne 0x7c541
movl $0x80, %esi
jmp 0x7c532
cmpl $0x45, %edx
je 0x7c518
cmpl $0x4b, %edx
jne 0x7c541
movl $0x1, %esi
jmp 0x7c532
movl $0x4, %esi
jmp 0x7c532
movl $0x10, %esi
jmp 0x7c532
movl $0x40, %esi
jmp 0x7c532
movl $0x2, %esi
jmp 0x7c532
movl $0x100, %esi            # imm = 0x100
jmp 0x7c532
movl $0x20, %esi
jmp 0x7c532
movl $0x8, %esi
incq %rdi
orl %esi, %eax
jmp 0x7c49d
testl %edx, %edx
jne 0x7c541
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/notify.c
// Function: keyspaceEventsFlagsToString
sds keyspaceEventsFlagsToString(int flags) {
    sds res;

    res = sdsempty();
    if ((flags & NOTIFY_ALL) == NOTIFY_ALL) {
        res = sdscatlen(res,"A",1);
    } else {
        if (flags & NOTIFY_GENERIC) res = sdscatlen(res,"g",1);
        if (flags & NOTIFY_STRING) res = sdscatlen(res,"$",1);
        if (flags & NOTIFY_LIST) res = sdscatlen(res,"l",1);
        if (flags & NOTIFY_SET) res = sdscatlen(res,"s",1);
        if (flags & NOTIFY_HASH) res = sdscatlen(res,"h",1);
        if (flags & NOTIFY_ZSET) res = sdscatlen(res,"z",1);
        if (flags & NOTIFY_EXPIRED) res = sdscatlen(res,"x",1);
        if (flags & NOTIFY_EVICTED) res = sdscatlen(res,"e",1);
    }
    if (flags & NOTIFY_KEYSPACE) res = sdscatlen(res,"K",1);
    if (flags & NOTIFY_KEYEVENT) res = sdscatlen(res,"E",1);
    return res;
}

// Assembly:
pushq %rbx
movl %edi, %ebx
callq 0x3628d
movl %ebx, %ecx
notl %ecx
testl $0x3fc, %ecx            # imm = 0x3FC
jne 0x7c567
leaq 0x57080(%rip), %rsi     # 0xd35e2
jmp 0x7c623
testb $0x4, %bl
je 0x7c580
leaq 0x4e229(%rip), %rsi     # 0xca79c
movl $0x1, %edx
movq %rax, %rdi
callq 0x36ad1
testb $0x8, %bl
je 0x7c599
leaq 0x5120c(%rip), %rsi     # 0xcd798
movl $0x1, %edx
movq %rax, %rdi
callq 0x36ad1
testb $0x10, %bl
je 0x7c5b2
leaq 0x4d3a8(%rip), %rsi     # 0xc994d
movl $0x1, %edx
movq %rax, %rdi
callq 0x36ad1
testb $0x20, %bl
je 0x7c5cb
leaq 0x503bd(%rip), %rsi     # 0xcc97b
movl $0x1, %edx
movq %rax, %rdi
callq 0x36ad1
testb $0x40, %bl
je 0x7c5e4
leaq 0x55b54(%rip), %rsi     # 0xd212b
movl $0x1, %edx
movq %rax, %rdi
callq 0x36ad1
testb %bl, %bl
jns 0x7c5fc
leaq 0x47c8c(%rip), %rsi     # 0xc427b
movl $0x1, %edx
movq %rax, %rdi
callq 0x36ad1
btl $0x8, %ebx
jae 0x7c616
leaq 0x43464(%rip), %rsi     # 0xbfa6d
movl $0x1, %edx
movq %rax, %rdi
callq 0x36ad1
btl $0x9, %ebx
jae 0x7c630
leaq 0x55272(%rip), %rsi     # 0xd1895
movl $0x1, %edx
movq %rax, %rdi
callq 0x36ad1
testb $0x1, %bl
je 0x7c649
leaq 0x4ec7d(%rip), %rsi     # 0xcb2b9
movl $0x1, %edx
movq %rax, %rdi
callq 0x36ad1
testb $0x2, %bl
jne 0x7c650
popq %rbx
retq
leaq 0x4cbf2(%rip), %rsi     # 0xc9249
movl $0x1, %edx
movq %rax, %rdi
popq %rbx
jmp 0x36ad1
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/notify.c
// Function: notifyKeyspaceEvent
void notifyKeyspaceEvent(int type, char *event, robj *key, int dbid) {
    sds chan;
    robj *chanobj, *eventobj;
    int len = -1;
    char buf[24];

    /* If notifications for this class of events are off, return ASAP. */
    if (!(server.notify_keyspace_events & type)) return;

    eventobj = createStringObject(event,strlen(event));

    /* __keyspace@<db>__:<key> <event> notifications. */
    if (server.notify_keyspace_events & NOTIFY_KEYSPACE) {
        chan = sdsnewlen("__keyspace@",11);
        len = ll2string(buf,sizeof(buf),dbid);
        chan = sdscatlen(chan, buf, len);
        chan = sdscatlen(chan, "__:", 3);
        chan = sdscatsds(chan, key->ptr);
        chanobj = createObject(OBJ_STRING, chan);
        pubsubPublishMessage(chanobj, eventobj);
        decrRefCount(chanobj);
    }

    /* __keyevente@<db>__:<event> <key> notifications. */
    if (server.notify_keyspace_events & NOTIFY_KEYEVENT) {
        chan = sdsnewlen("__keyevent@",11);
        if (len == -1) len = ll2string(buf,sizeof(buf),dbid);
        chan = sdscatlen(chan, buf, len);
        chan = sdscatlen(chan, "__:", 3);
        chan = sdscatsds(chan, eventobj->ptr);
        chanobj = createObject(OBJ_STRING, chan);
        pubsubPublishMessage(chanobj, key);
        decrRefCount(chanobj);
    }
    decrRefCount(eventobj);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x8522e(%rip), %rbx     # 0x1018a8
testl %edi, 0x998(%rbx)
je 0x7c7b6
movl %ecx, %ebp
movq %rdx, %r13
movq %rsi, %r14
movq %rsi, %rdi
callq 0x26500
movq %r14, %rdi
movq %rax, %rsi
callq 0x40744
movq %rax, %r14
movl 0x998(%rbx), %eax
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
testb $0x1, %al
je 0x7c72f
leaq 0x510df(%rip), %rdi     # 0xcd79a
movl $0xb, %esi
callq 0x36178
movq %rax, %r12
movslq %ebp, %rdx
movq %rsp, %rdi
movl $0x18, %esi
callq 0x3ff83
movl %eax, %r15d
movslq %eax, %rdx
movq %r12, %rdi
movq %rsp, %rsi
callq 0x36ad1
leaq 0x510b6(%rip), %rsi     # 0xcd7a6
movl $0x3, %edx
movq %rax, %rdi
callq 0x36ad1
movq 0x8(%r13), %rsi
movq %rax, %rdi
callq 0x36bc3
xorl %edi, %edi
movq %rax, %rsi
callq 0x40650
movq %rax, %r12
movq %rax, %rdi
movq %r14, %rsi
callq 0x60376
movq %r12, %rdi
callq 0x40c8f
movl 0x998(%rbx), %eax
testb $0x2, %al
je 0x7c7ae
leaq 0x51070(%rip), %rdi     # 0xcd7aa
movl $0xb, %esi
callq 0x36178
movq %rax, %r12
cmpl $-0x1, %r15d
jne 0x7c760
movslq %ebp, %rdx
movq %rsp, %rdi
movl $0x18, %esi
callq 0x3ff83
movl %eax, %r15d
movslq %r15d, %rdx
movq %rsp, %rsi
movq %r12, %rdi
callq 0x36ad1
leaq 0x51031(%rip), %rsi     # 0xcd7a6
movl $0x3, %edx
movq %rax, %rdi
callq 0x36ad1
movq 0x8(%r14), %rsi
movq %rax, %rdi
callq 0x36bc3
xorl %edi, %edi
movq %rax, %rsi
callq 0x40650
movq %rax, %r15
movq %rax, %rdi
movq %r13, %rsi
callq 0x60376
movq %r15, %rdi
callq 0x40c8f
movq %r14, %rdi
callq 0x40c8f
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/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 %rbp
pushq %r15
pushq %r14
pushq %r12
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 0x7ca1e
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, 0x99d32(%rip)     # 0x116758
je 0x7cb3a
movq %rdi, %r10
testq %rdi, %rdi
je 0x7ca70
leaq 0x20(%rsp), %rax
movq %rsp, %rcx
movq %rax, 0x10(%rcx)
leaq 0x200(%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 0x26810
jmp 0x7ca92
movq 0x99cd9(%rip), %rcx     # 0x116750
leaq 0x4fefc(%rip), %rdx     # 0xcc97a
leaq 0xd0(%rsp), %rdi
movl $0x100, %esi            # imm = 0x100
xorl %eax, %eax
callq 0x26120
movl %eax, %ebp
testl %eax, %eax
jle 0x7cb3a
movq 0x99cb5(%rip), %rbx     # 0x116758
movq 0x99cb6(%rip), %r12     # 0x116760
movq %r12, %r15
subq %rbx, %r15
cmpb $0x0, 0x99cb9(%rip)     # 0x116770
je 0x7cad5
movl $0x100, %r14d           # imm = 0x100
cmpq %r14, %r15
cmovbq %r15, %r14
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x26110
jmp 0x7caf6
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x26110
movb $0x1, 0x99c87(%rip)     # 0x116770
movl $0x100, %r14d           # imm = 0x100
cmpq %r14, %r15
cmovbq %r15, %r14
movl %ebp, %eax
decq %r14
cmpq %r14, %rax
cmovbq %rax, %r14
leaq 0xd0(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x26c50
addq %rbx, %r14
movq 0x99c49(%rip), %rax     # 0x116768
cmpq %rax, %r14
jae 0x7cb29
movb $0x2e, (%rax)
jmp 0x7cb3a
jne 0x7cb3a
incq %r14
cmpq %r12, %r14
jae 0x7cb3a
movb $0x20, (%rax)
movb $0x0, (%r14)
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/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, %r14
movq %rdi, %r15
leaq 0x50c6a(%rip), %rcx     # 0xcd7cc
movq %rsp, %rdx
callq 0x416bb
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x7cbb3
movq (%rsp), %rax
testq %rax, %rax
js 0x7cb9d
xorl %ebx, %ebx
testq %rax, %rax
je 0x7cbae
testl %ebp, %ebp
jne 0x7cb92
imulq $0x3e8, %rax, %rax      # imm = 0x3E8
movq %rax, (%rsp)
callq 0x2ffce
addq (%rsp), %rax
jmp 0x7cbb0
leaq 0x50c52(%rip), %rsi     # 0xcd7f6
movq %r15, %rdi
callq 0x3cc06
jmp 0x7cbb3
xorl %eax, %eax
movq %rax, (%r14)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/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;

        /* Process remaining data in the input buffer, unless the client
         * is blocked again. Actually processInputBuffer() checks that the
         * client is not blocked before to proceed, but things may change and
         * the code is conceptually more correct this way. */
        if (!(c->flags & CLIENT_BLOCKED)) {
            if (c->querybuf && sdslen(c->querybuf) > 0) {
                processInputBuffer(c);
            }
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0x84cc1(%rip), %r14     # 0x1018a8
movq 0x920(%r14), %rdi
cmpq $0x0, 0x28(%rdi)
je 0x7cc7e
leaq 0x50bb8(%rip), %r15     # 0xcd7b8
movq (%rdi), %rsi
testq %rsi, %rsi
je 0x7cc84
movq 0x10(%rsi), %rbx
callq 0x2b331
movl 0x98(%rbx), %eax
movl %eax, %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
movl %ecx, 0x98(%rbx)
testb $0x10, %al
jne 0x7cc70
movq 0x28(%rbx), %rcx
testq %rcx, %rcx
je 0x7cc70
movzbl -0x1(%rcx), %eax
movl %eax, %edx
andl $0x7, %edx
cmpl $0x4, %edx
ja 0x7cc70
movslq (%r15,%rdx,4), %rdx
addq %r15, %rdx
jmpq *%rdx
shrl $0x3, %eax
jmp 0x7cc63
movq -0x11(%rcx), %rax
jmp 0x7cc63
movzwl -0x5(%rcx), %eax
jmp 0x7cc63
movl -0x9(%rcx), %eax
jmp 0x7cc63
movzbl -0x3(%rcx), %eax
testq %rax, %rax
je 0x7cc70
movq %rbx, %rdi
callq 0x3e73e
movq 0x920(%r14), %rdi
cmpq $0x0, 0x28(%rdi)
jne 0x7cc00
popq %rbx
popq %r14
popq %r15
retq
leaq 0x43379(%rip), %rdi     # 0xc0004
leaq 0x50b78(%rip), %rsi     # 0xcd80a
movl $0x73, %edx
callq 0x61908
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/blocked.c
// Function: unblockClient
void unblockClient(client *c) {
    if (c->btype == BLOCKED_LIST) {
        unblockClientWaitingData(c);
    } else if (c->btype == BLOCKED_WAIT) {
        unblockClientWaitingReplicas(c);
    } else {
        serverPanic("Unknown btype in unblockClient().");
    }
    /* Clear the flags, and put the client in the unblocked list so that
     * we'll process new commands in its query buffer ASAP. */
    c->flags &= ~CLIENT_BLOCKED;
    c->btype = BLOCKED_NONE;
    server.bpop_blocked_clients--;
    /* The client may already be into the unblocked list because of a previous
     * blocking operation, don't add back it into the list multiple times. */
    if (!(c->flags & CLIENT_UNBLOCKED)) {
        c->flags |= CLIENT_UNBLOCKED;
        listAddNodeTail(server.unblocked_clients,c);
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x168(%rdi), %eax
cmpl $0x2, %eax
je 0x7ccc4
cmpl $0x1, %eax
jne 0x7cd15
movq %rbx, %rdi
callq 0x4d83d
jmp 0x7cccc
movq %rbx, %rdi
callq 0x47401
movl 0x98(%rbx), %edx
movl %edx, %eax
andl $-0x11, %eax
movl %eax, 0x98(%rbx)
movl $0x0, 0x168(%rbx)
leaq 0x84bba(%rip), %rcx     # 0x1018a8
decl 0x918(%rcx)
testb %dl, %dl
js 0x7cd13
orl $0x80, %eax
movl %eax, 0x98(%rbx)
movq 0x920(%rcx), %rdi
movq %rbx, %rsi
popq %rbx
jmp 0x2b24b
popq %rbx
retq
leaq 0x50af8(%rip), %rdi     # 0xcd814
leaq 0x50ae7(%rip), %rsi     # 0xcd80a
movl $0x8c, %edx
callq 0x619b4
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/blocked.c
// Function: replyToBlockedClientTimedOut
void replyToBlockedClientTimedOut(client *c) {
    if (c->btype == BLOCKED_LIST) {
        addReply(c,shared.nullmultibulk);
    } else if (c->btype == BLOCKED_WAIT) {
        addReplyLongLong(c,replicationCountAcksByOffset(c->bpop.reploffset));
    } else {
        serverPanic("Unknown btype in replyToBlockedClientTimedOut().");
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x168(%rdi), %eax
cmpl $0x2, %eax
je 0x7cd5f
cmpl $0x1, %eax
jne 0x7cd77
leaq 0x855be(%rip), %rax     # 0x102310
movq 0x58(%rax), %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x3c854
movq 0x190(%rbx), %rdi
callq 0x472d2
movslq %eax, %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x3d23f
leaq 0x50aba(%rip), %rdi     # 0xcd838
leaq 0x50a85(%rip), %rsi     # 0xcd80a
movl $0xa3, %edx
callq 0x619b4
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/blocked.c
// Function: disconnectAllBlockedClients
void disconnectAllBlockedClients(void) {
    listNode *ln;
    listIter li;

    listRewind(server.clients,&li);
    while((ln = listNext(&li))) {
        client *c = listNodeValue(ln);

        if (c->flags & CLIENT_BLOCKED) {
            addReplySds(c,sdsnew(
                "-UNBLOCKED force unblock from blocking operation, "
                "instance state changed (master -> slave?)\r\n"));
            unblockClient(c);
            c->flags |= CLIENT_CLOSE_AFTER_REPLY;
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq 0x84aff(%rip), %rax     # 0x1018a8
movq 0x1c8(%rax), %rdi
movq %rsp, %rbx
movq %rbx, %rsi
callq 0x2b3b7
movq %rbx, %rdi
callq 0x2b3d4
testq %rax, %rax
je 0x7ce10
movq %rsp, %rbx
leaq 0x50a99(%rip), %r14     # 0xcd86b
movq 0x10(%rax), %r15
testb $0x10, 0x98(%r15)
je 0x7ce03
movq %r14, %rdi
callq 0x362b0
movq %r15, %rdi
movq %rax, %rsi
callq 0x3ca86
movq %r15, %rdi
callq 0x7cca6
orb $0x40, 0x98(%r15)
movq %rbx, %rdi
callq 0x2b3d4
testq %rax, %rax
jne 0x7cdd2
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/hyperloglog.c
// Function: MurmurHash64A
uint64_t MurmurHash64A (const void * key, int len, unsigned int seed) {
    const uint64_t m = 0xc6a4a7935bd1e995;
    const int r = 47;
    uint64_t h = seed ^ (len * m);
    const uint8_t *data = (const uint8_t *)key;
    const uint8_t *end = data + (len-(len&7));

    while(data != end) {
        uint64_t k;

#if (BYTE_ORDER == LITTLE_ENDIAN)
        k = *((uint64_t*)data);
#else
        k = (uint64_t) data[0];
        k |= (uint64_t) data[1] << 8;
        k |= (uint64_t) data[2] << 16;
        k |= (uint64_t) data[3] << 24;
        k |= (uint64_t) data[4] << 32;
        k |= (uint64_t) data[5] << 40;
        k |= (uint64_t) data[6] << 48;
        k |= (uint64_t) data[7] << 56;
#endif

        k *= m;
        k ^= k >> r;
        k *= m;
        h ^= k;
        h *= m;
        data += 8;
    }

    switch(len & 7) {
    case 7: h ^= (uint64_t)data[6] << 48;
    case 6: h ^= (uint64_t)data[5] << 40;
    case 5: h ^= (uint64_t)data[4] << 32;
    case 4: h ^= (uint64_t)data[3] << 24;
    case 3: h ^= (uint64_t)data[2] << 16;
    case 2: h ^= (uint64_t)data[1] << 8;
    case 1: h ^= (uint64_t)data[0];
            h *= m;
    };

    h ^= h >> r;
    h *= m;
    h ^= h >> r;
    return h;
}

// Assembly:
movabsq $-0x395b586ca42e166b, %rax # imm = 0xC6A4A7935BD1E995
movl %edx, %edx
movslq %esi, %rsi
movq %rsi, %rcx
imulq %rax, %rcx
xorq %rdx, %rcx
movl %esi, %edx
andl $0x7, %edx
andl $-0x8, %esi
je 0x7ce72
movslq %esi, %r8
leaq (%rdi,%r8), %rsi
xorl %r9d, %r9d
movq (%rdi,%r9), %r10
imulq %rax, %r10
movq %r10, %r11
shrq $0x2f, %r11
xorq %r10, %r11
imulq %rax, %r11
xorq %r11, %rcx
imulq %rax, %rcx
addq $0x8, %r9
cmpq %r9, %r8
jne 0x7ce49
movq %rsi, %rdi
movl %edx, %edx
leaq 0x50a51(%rip), %rsi     # 0xcd8cc
movslq (%rsi,%rdx,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
movzbl 0x6(%rdi), %edx
shlq $0x30, %rdx
xorq %rdx, %rcx
movzbl 0x5(%rdi), %edx
shlq $0x28, %rdx
xorq %rdx, %rcx
movzbl 0x4(%rdi), %edx
shlq $0x20, %rdx
xorq %rdx, %rcx
movzbl 0x3(%rdi), %edx
shll $0x18, %edx
xorq %rdx, %rcx
movzbl 0x2(%rdi), %edx
shll $0x10, %edx
xorq %rdx, %rcx
movzbl 0x1(%rdi), %edx
shll $0x8, %edx
xorq %rdx, %rcx
movzbl (%rdi), %edx
xorq %rcx, %rdx
imulq %rax, %rdx
movq %rdx, %rcx
movq %rcx, %rdx
shrq $0x2f, %rdx
xorq %rcx, %rdx
imulq %rax, %rdx
movq %rdx, %rax
shrq $0x2f, %rax
xorq %rdx, %rax
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/hyperloglog.c
// Function: hllSparseSum
double hllSparseSum(uint8_t *sparse, int sparselen, double *PE, int *ezp, int *invalid) {
    double E = 0;
    int ez = 0, idx = 0, runlen, regval;
    uint8_t *end = sparse+sparselen, *p = sparse;

    while(p < end) {
        if (HLL_SPARSE_IS_ZERO(p)) {
            runlen = HLL_SPARSE_ZERO_LEN(p);
            idx += runlen;
            ez += runlen;
            /* Increment E at the end of the loop. */
            p++;
        } else if (HLL_SPARSE_IS_XZERO(p)) {
            runlen = HLL_SPARSE_XZERO_LEN(p);
            idx += runlen;
            ez += runlen;
            /* Increment E at the end of the loop. */
            p += 2;
        } else {
            runlen = HLL_SPARSE_VAL_LEN(p);
            regval = HLL_SPARSE_VAL_VALUE(p);
            idx += runlen;
            E += PE[regval]*runlen;
            p++;
        }
    }
    if (idx != HLL_REGISTERS && invalid) *invalid = 1;
    E += ez; /* Add 2^0 'ez' times. */
    *ezp = ez;
    return E;
}

// Assembly:
testl %esi, %esi
jle 0x7d98a
pushq %rbx
movslq %esi, %rsi
addq %rdi, %rsi
xorl %eax, %eax
xorpd %xmm0, %xmm0
xorl %r9d, %r9d
movzbl (%rdi), %r11d
movl %r11d, %r10d
andl $-0x40, %r10d
cmpl $0x40, %r10d
je 0x7d928
testl %r10d, %r10d
jne 0x7d94b
leal 0x1(%r11), %r10d
addl %r11d, %eax
incl %eax
jmp 0x7d96c
andl $0x3f, %r11d
shll $0x8, %r11d
movzbl 0x1(%rdi), %r10d
leal (%r11,%r10), %ebx
addl %r11d, %r10d
incl %r10d
addl %ebx, %eax
incl %eax
movl $0x2, %r11d
jmp 0x7d972
movl %r11d, %r10d
andl $0x3, %r10d
incl %r10d
andl $0x7c, %r11d
xorps %xmm1, %xmm1
cvtsi2sd %r10d, %xmm1
mulsd 0x8(%rdx,%r11,2), %xmm1
addsd %xmm1, %xmm0
movl $0x1, %r11d
addl %r10d, %r9d
addq %r11, %rdi
cmpq %rsi, %rdi
jb 0x7d907
cmpl $0x4000, %r9d           # imm = 0x4000
setne %dl
popq %rbx
jmp 0x7d992
xorpd %xmm0, %xmm0
xorl %eax, %eax
movb $0x1, %dl
testq %r8, %r8
je 0x7d9a2
testb %dl, %dl
je 0x7d9a2
movl $0x1, (%r8)
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
addsd %xmm1, %xmm0
movl %eax, (%rcx)
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/hyperloglog.c
// Function: hllRawSum
double hllRawSum(uint8_t *registers, double *PE, int *ezp) {
    double E = 0;
    int j, ez = 0;
    uint64_t *word = (uint64_t*) registers;
    uint8_t *bytes;

    for (j = 0; j < HLL_REGISTERS/8; j++) {
        if (*word == 0) {
            ez += 8;
        } else {
            bytes = (uint8_t*) word;
            if (bytes[0]) E += PE[bytes[0]]; else ez++;
            if (bytes[1]) E += PE[bytes[1]]; else ez++;
            if (bytes[2]) E += PE[bytes[2]]; else ez++;
            if (bytes[3]) E += PE[bytes[3]]; else ez++;
            if (bytes[4]) E += PE[bytes[4]]; else ez++;
            if (bytes[5]) E += PE[bytes[5]]; else ez++;
            if (bytes[6]) E += PE[bytes[6]]; else ez++;
            if (bytes[7]) E += PE[bytes[7]]; else ez++;
        }
        word++;
    }
    E += ez; /* 2^(-reg[j]) is 1 when m is 0, add it 'ez' times for every
                zero register in the HLL. */
    *ezp = ez;
    return E;
}

// Assembly:
xorl %eax, %eax
xorpd %xmm0, %xmm0
xorl %ecx, %ecx
movq (%rdi,%rax,8), %r8
testq %r8, %r8
je 0x7d9d2
testb %r8b, %r8b
je 0x7d9da
movzbl %r8b, %r9d
addsd (%rsi,%r9,8), %xmm0
jmp 0x7d9dc
addl $0x8, %ecx
jmp 0x7da90
incl %ecx
testl $0xff00, %r8d           # imm = 0xFF00
je 0x7d9f8
movq %r8, %r9
shrq $0x8, %r9
movzbl %r9b, %r9d
addsd (%rsi,%r9,8), %xmm0
jmp 0x7d9fa
incl %ecx
testl $0xff0000, %r8d         # imm = 0xFF0000
je 0x7da16
movq %r8, %r9
shrq $0x10, %r9
movzbl %r9b, %r9d
addsd (%rsi,%r9,8), %xmm0
jmp 0x7da18
incl %ecx
movq %r8, %r9
shrq $0x18, %r9
testb %r9b, %r9b
je 0x7da30
movzbl %r9b, %r9d
addsd (%rsi,%r9,8), %xmm0
jmp 0x7da32
incl %ecx
movq %r8, %r9
shrq $0x20, %r9
testb %r9b, %r9b
je 0x7da4a
movzbl %r9b, %r9d
addsd (%rsi,%r9,8), %xmm0
jmp 0x7da4c
incl %ecx
movq %r8, %r9
shrq $0x28, %r9
testb %r9b, %r9b
je 0x7da64
movzbl %r9b, %r9d
addsd (%rsi,%r9,8), %xmm0
jmp 0x7da66
incl %ecx
movq %r8, %r9
shrq $0x30, %r9
testb %r9b, %r9b
je 0x7da7e
movzbl %r9b, %r9d
addsd (%rsi,%r9,8), %xmm0
jmp 0x7da80
incl %ecx
shrq $0x38, %r8
jne 0x7da8a
incl %ecx
jmp 0x7da90
addsd (%rsi,%r8,8), %xmm0
incq %rax
cmpl $0x800, %eax            # imm = 0x800
jne 0x7d9b8
cvtsi2sd %ecx, %xmm1
addsd %xmm1, %xmm0
movl %ecx, (%rdx)
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/hyperloglog.c
// Function: hllAdd
int hllAdd(robj *o, unsigned char *ele, size_t elesize) {
    struct hllhdr *hdr = o->ptr;
    switch(hdr->encoding) {
    case HLL_DENSE: return hllDenseAdd(hdr->registers,ele,elesize);
    case HLL_SPARSE: return hllSparseAdd(o,ele,elesize);
    default: return -1; /* Invalid representation. */
    }
}

// Assembly:
movq %rdi, %rax
movq 0x8(%rdi), %rdi
movzbl 0x4(%rdi), %ecx
cmpl $0x1, %ecx
je 0x7dd48
testl %ecx, %ecx
jne 0x7dd50
addq $0x10, %rdi
jmp 0x7cf25
movq %rax, %rdi
jmp 0x7d435
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/hyperloglog.c
// Function: hllMerge
int hllMerge(uint8_t *max, robj *hll) {
    struct hllhdr *hdr = hll->ptr;
    int i;

    if (hdr->encoding == HLL_DENSE) {
        uint8_t val;

        for (i = 0; i < HLL_REGISTERS; i++) {
            HLL_DENSE_GET_REGISTER(val,hdr->registers,i);
            if (val > max[i]) max[i] = val;
        }
    } else {
        uint8_t *p = hll->ptr, *end = p + sdslen(hll->ptr);
        long runlen, regval;

        p += HLL_HDR_SIZE;
        i = 0;
        while(p < end) {
            if (HLL_SPARSE_IS_ZERO(p)) {
                runlen = HLL_SPARSE_ZERO_LEN(p);
                i += runlen;
                p++;
            } else if (HLL_SPARSE_IS_XZERO(p)) {
                runlen = HLL_SPARSE_XZERO_LEN(p);
                i += runlen;
                p += 2;
            } else {
                runlen = HLL_SPARSE_VAL_LEN(p);
                regval = HLL_SPARSE_VAL_VALUE(p);
                while(runlen--) {
                    if (regval > max[i]) max[i] = regval;
                    i++;
                }
                p++;
            }
        }
        if (i != HLL_REGISTERS) return C_ERR;
    }
    return C_OK;
}

// Assembly:
pushq %rbp
pushq %rbx
movq 0x8(%rsi), %rdx
cmpb $0x0, 0x4(%rdx)
je 0x7dd8e
movzbl -0x1(%rdx), %ecx
movl %ecx, %esi
andl $0x7, %esi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x4, %esi
ja 0x7de7d
leaq 0x4fbd0(%rip), %r8      # 0xcd950
movslq (%r8,%rsi,4), %rsi
addq %r8, %rsi
jmpq *%rsi
shrl $0x3, %ecx
jmp 0x7dde2
xorl %eax, %eax
movl %eax, %ecx
shrl $0x3, %ecx
movzbl 0x10(%rdx,%rcx), %r8d
movzbl 0x11(%rdx,%rcx), %esi
shll $0x8, %esi
orl %r8d, %esi
movl %eax, %ecx
andb $0x7, %cl
shrl %cl, %esi
andb $0x3f, %sil
cmpb (%rdi), %sil
jbe 0x7ddb9
movb %sil, (%rdi)
addq $0x6, %rax
incq %rdi
cmpq $0x18000, %rax          # imm = 0x18000
jne 0x7dd90
jmp 0x7de7b
movq -0x11(%rdx), %rcx
jmp 0x7dde2
movzwl -0x5(%rdx), %ecx
jmp 0x7dde2
movl -0x9(%rdx), %ecx
jmp 0x7dde2
movzbl -0x3(%rdx), %ecx
cmpq $0x11, %rcx
jl 0x7de7d
addq %rdx, %rcx
addq $0x10, %rdx
xorl %esi, %esi
movzbl (%rdx), %r8d
movl %r8d, %r9d
andl $-0x40, %r9d
cmpl $0x40, %r9d
je 0x7de12
testl %r9d, %r9d
jne 0x7de2f
addl %r8d, %esi
incl %esi
jmp 0x7de65
andl $0x3f, %r8d
shll $0x8, %r8d
movzbl 0x1(%rdx), %r9d
addl %r8d, %esi
addl %r9d, %esi
incl %esi
movl $0x2, %r8d
jmp 0x7de6b
movl %r8d, %r9d
andl $0x3, %r9d
shrl $0x2, %r8d
andl $0x1f, %r8d
leal 0x1(%r8), %r10d
movslq %esi, %r11
addq %rdi, %r11
incq %r9
xorl %ebx, %ebx
movzbl (%r11,%rbx), %ebp
cmpl %ebp, %r8d
jb 0x7de5b
movb %r10b, (%r11,%rbx)
incq %rbx
cmpq %rbx, %r9
jne 0x7de4d
addl %ebx, %esi
movl $0x1, %r8d
addq %r8, %rdx
cmpq %rcx, %rdx
jb 0x7ddf5
cmpl $0x4000, %esi           # imm = 0x4000
jne 0x7de7d
xorl %eax, %eax
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/hyperloglog.c
// Function: isHLLObjectOrReply
int isHLLObjectOrReply(client *c, robj *o) {
    struct hllhdr *hdr;

    /* Key exists, check type */
    if (checkType(c,o,OBJ_STRING))
        return C_ERR; /* Error already sent. */

    if (!sdsEncodedObject(o)) goto invalid;
    if (stringObjectLen(o) < sizeof(*hdr)) goto invalid;
    hdr = o->ptr;

    /* Magic should be "HYLL". */
    if (hdr->magic[0] != 'H' || hdr->magic[1] != 'Y' ||
        hdr->magic[2] != 'L' || hdr->magic[3] != 'L') goto invalid;

    if (hdr->encoding > HLL_MAX_ENCODING) goto invalid;

    /* Dense representation string length should match exactly. */
    if (hdr->encoding == HLL_DENSE &&
        stringObjectLen(o) != HLL_DENSE_SIZE) goto invalid;

    /* All tests passed. */
    return C_OK;

invalid:
    addReplySds(c,
        sdsnew("-WRONGTYPE Key is not a valid "
               "HyperLogLog string value.\r\n"));
    return C_ERR;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
xorl %edx, %edx
callq 0x40d47
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x7df1d
movl (%r14), %eax
shrl $0x4, %eax
testb $0x7, %al
jne 0x7df01
movq %r14, %rdi
callq 0x41270
cmpq $0x10, %rax
jb 0x7df01
movq 0x8(%r14), %rax
cmpb $0x48, (%rax)
jne 0x7df01
cmpb $0x59, 0x1(%rax)
jne 0x7df01
cmpb $0x4c, 0x2(%rax)
jne 0x7df01
cmpb $0x4c, 0x3(%rax)
jne 0x7df01
movb 0x4(%rax), %al
cmpb $0x1, %al
jbe 0x7df24
leaq 0x4fb55(%rip), %rdi     # 0xcda5d
callq 0x362b0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3ca86
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
xorl %ebp, %ebp
testb %al, %al
jne 0x7df1d
movq %r14, %rdi
callq 0x41270
cmpq $0x3010, %rax           # imm = 0x3010
jne 0x7df01
jmp 0x7df1d
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/latency.c
// Function: THPIsEnabled
int THPIsEnabled(void) {
    char buf[1024];

    FILE *fp = fopen("/sys/kernel/mm/transparent_hugepage/enabled","r");
    if (!fp) return 0;
    if (fgets(buf,sizeof(buf),fp) == NULL) {
        fclose(fp);
        return 0;
    }
    fclose(fp);
    return (strstr(buf,"[never]") == NULL) ? 1 : 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x400, %rsp            # imm = 0x400
leaq 0x4f156(%rip), %rdi     # 0xcdc44
leaq 0x40f68(%rip), %rsi     # 0xbfa5d
callq 0x26ae0
xorl %ebx, %ebx
testq %rax, %rax
je 0x7eb3b
movq %rax, %r14
movq %rsp, %rdi
movl $0x400, %esi            # imm = 0x400
movq %rax, %rdx
callq 0x26440
movq %rax, %r15
movq %r14, %rdi
callq 0x26a10
testq %r15, %r15
je 0x7eb3b
leaq 0x4f145(%rip), %rsi     # 0xcdc70
movq %rsp, %rdi
callq 0x266b0
xorl %ebx, %ebx
testq %rax, %rax
sete %bl
movl %ebx, %eax
addq $0x400, %rsp            # imm = 0x400
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/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 0x82d1d(%rip), %r13     # 0x1018a8
movq 0xa20(%r13), %rdi
movq %r12, %rsi
callq 0x2ef19
movq %rax, %r14
xorl %edi, %edi
callq 0x26cd0
movq %rax, %r15
testq %r14, %r14
jne 0x7ebe5
movl $0x508, %edi            # imm = 0x508
callq 0x382d1
movq %rax, %r14
movl $0x508, %edx            # imm = 0x508
movq %rax, %rdi
xorl %esi, %esi
callq 0x26110
movq 0xa20(%r13), %r13
movq %r12, %rdi
callq 0x3844d
movq %r13, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x2e9b8
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 0x7ec28
movl 0xc(%r14,%rax,8), %ecx
cmpq %rbx, %rcx
jge 0x7ec5b
movl %ebx, 0xc(%r14,%rax,8)
jmp 0x7ec5b
xorl %r15d, %r15d
xorl %edi, %edi
callq 0x26cd0
movslq (%r14), %rcx
movl %eax, 0x8(%r14,%rcx,8)
movl %ebx, 0xc(%r14,%rcx,8)
movl 0x4(%r14), %eax
cmpq %rbx, %rax
jge 0x7ec4c
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_O3/gplessis[P]dotdeb-redis/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 0x82c31(%rip), %r12     # 0x1018a8
movq 0xa20(%r12), %rdi
callq 0x2efe5
movq %rax, %rbx
movq %rax, %rdi
callq 0x2f015
xorl %ebp, %ebp
testq %rax, %rax
je 0x7ecc9
movq (%rax), %r15
testq %r14, %r14
je 0x7ecad
movq %r15, %rdi
movq %r14, %rsi
callq 0x262f0
testl %eax, %eax
jne 0x7ecbf
movq 0xa20(%r12), %rdi
movq %r15, %rsi
callq 0x2ecb5
incl %ebp
movq %rbx, %rdi
callq 0x2f015
jmp 0x7ec91
movq %rbx, %rdi
callq 0x2f0dd
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/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 0x3cee9
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 0x7f631
movl $0x2, %esi
movq %rbx, %rdi
callq 0x3d274
movslq 0x8(%r14,%r13,8), %rsi
movq %rbx, %rdi
callq 0x3d23f
movl 0xc(%r14,%r13,8), %esi
movq %rbx, %rdi
callq 0x3d23f
incl %ebp
incl %r12d
cmpl $0xa0, %r12d
jne 0x7f5d9
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 0x3cf25
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/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 0x8223d(%rip), %r14     # 0x1018a8
movq 0xa20(%r14), %rax
movq 0x48(%rax), %rsi
addq 0x28(%rax), %rsi
callq 0x3d274
movq 0xa20(%r14), %rdi
callq 0x2efbb
movq %rax, %r14
movq %rax, %rdi
callq 0x2f015
testq %rax, %rax
je 0x7f724
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 0x3d274
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3d0f2
movslq %ebp, %r15
movslq 0x8(%r12,%r15,8), %rsi
movq %rbx, %rdi
callq 0x3d23f
movl 0xc(%r12,%r15,8), %esi
movq %rbx, %rdi
callq 0x3d23f
movl 0x4(%r12), %esi
movq %rbx, %rdi
callq 0x3d23f
movq %r14, %rdi
jmp 0x7f691
movq %r14, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2f0dd
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/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 0x382d1
movl $0x0, (%rax)
movq $0x0, 0x8(%rax)
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/sparkline.c
// Function: sparklineSequenceAddSample
void sparklineSequenceAddSample(struct sequence *seq, double value, char *label) {
    label = (label == NULL || label[0] == '\0') ? NULL : zstrdup(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 %rdi, %rbx
testq %rsi, %rsi
movsd %xmm0, (%rsp)
je 0x7fb8f
cmpb $0x0, (%rsi)
je 0x7fb8f
movq %rsi, %rdi
callq 0x3844d
movsd (%rsp), %xmm0
movq %rax, %r14
jmp 0x7fb92
xorl %r14d, %r14d
movslq (%rbx), %rsi
testq %rsi, %rsi
je 0x7fbb2
movsd 0x10(%rbx), %xmm1
ucomisd %xmm0, %xmm1
ja 0x7fbb7
ucomisd 0x18(%rbx), %xmm0
jbe 0x7fbbf
leaq 0x18(%rbx), %rax
jmp 0x7fbbb
movsd %xmm0, 0x18(%rbx)
leaq 0x10(%rbx), %rax
movsd %xmm0, (%rax)
movq 0x8(%rbx), %rdi
shlq $0x4, %rsi
addq $0x10, %rsi
callq 0x3837d
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 0x7fbf7
incl 0x4(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq