LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/sentinel.c
// Function: sentinelFailoverWaitStart
void sentinelFailoverWaitStart(sentinelRedisInstance *ri) {
    char *leader;
    int isleader;

    /* Check if we are the leader for the failover epoch. */
    leader = sentinelGetLeader(ri, ri->failover_epoch);
    isleader = leader && strcasecmp(leader,sentinel.myid) == 0;
    sdsfree(leader);

    /* If I'm not the leader, and it is not a forced failover via
     * SENTINEL FAILOVER, then I can't continue with the failover. */
    if (!isleader && !(ri->flags & SRI_FORCE_FAILOVER)) {
        int election_timeout = SENTINEL_ELECTION_TIMEOUT;

        /* The election timeout is the MIN between SENTINEL_ELECTION_TIMEOUT
         * and the configured failover timeout. */
        if (election_timeout > ri->failover_timeout)
            election_timeout = ri->failover_timeout;
        /* Abort the failover if I'm not the leader after some time. */
        if (mstime() - ri->failover_start_time > election_timeout) {
            sentinelEvent(LL_WARNING,"-failover-abort-not-elected",ri,"%@");
            sentinelAbortFailover(ri);
        }
        return;
    }
    sentinelEvent(LL_WARNING,"+elected-leader",ri,"%@");
    if (sentinel.simfailure_flags & SENTINEL_SIMFAILURE_CRASH_AFTER_ELECTION)
        sentinelSimFailureCrash();
    ri->failover_state = SENTINEL_FAILOVER_STATE_SELECT_SLAVE;
    ri->failover_state_change_time = mstime();
    sentinelEvent(LL_WARNING,"+failover-state-select-slave",ri,"%@");
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0xe8(%rdi), %rsi
callq 0x7f2a7
movq %rax, %r14
testq %rax, %rax
je 0x7f5a7
leaq 0x9c0e9(%rip), %rsi     # 0x11b678
movq %r14, %rdi
callq 0x26300
movl %eax, %ebp
movq %r14, %rdi
callq 0x392b6
testl %ebp, %ebp
jne 0x7f5af
jmp 0x7f609
movq %r14, %rdi
callq 0x392b6
testb $0x8, 0x1(%rbx)
jne 0x7f609
movq 0x108(%rbx), %rax
movl $0x2710, %ecx           # imm = 0x2710
cmpq %rcx, %rax
movslq %eax, %r14
cmovgeq %rcx, %r14
callq 0x330c8
subq 0x100(%rbx), %rax
cmpq %r14, %rax
jle 0x7f666
leaq 0x50ebb(%rip), %rsi     # 0xd04a2
leaq 0x4fe12(%rip), %rcx     # 0xcf400
movl $0x3, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x7a50c
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x7f688
leaq 0x50eae(%rip), %rsi     # 0xd04be
leaq 0x4fde9(%rip), %rcx     # 0xcf400
movl $0x3, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x7a50c
testb $0x1, 0x9c0bb(%rip)     # 0x11b6e8
jne 0x7f66b
movl $0x2, 0xf0(%rbx)
callq 0x330c8
movq %rax, 0xf8(%rbx)
leaq 0x50e82(%rip), %rsi     # 0xd04ce
leaq 0x4fdad(%rip), %rcx     # 0xcf400
movl $0x3, %edi
movq %rbx, %rdx
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x7a50c
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x50d28(%rip), %rsi     # 0xd039a
movl $0x3, %edi
xorl %eax, %eax
callq 0x32ea6
movl $0x63, %edi
callq 0x262d0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/sentinel.c
// Function: sentinelAbortFailover
void sentinelAbortFailover(sentinelRedisInstance *ri) {
    serverAssert(ri->flags & SRI_FAILOVER_IN_PROGRESS);
    serverAssert(ri->failover_state <= SENTINEL_FAILOVER_STATE_WAIT_PROMOTION);

    ri->flags &= ~(SRI_FAILOVER_IN_PROGRESS|SRI_FORCE_FAILOVER);
    ri->failover_state = SENTINEL_FAILOVER_STATE_NONE;
    ri->failover_state_change_time = mstime();
    if (ri->promoted_slave) {
        ri->promoted_slave->flags &= ~SRI_PROMOTED;
        ri->promoted_slave = NULL;
    }
}

// Assembly:
pushq %rbx
movl (%rdi), %eax
testb $0x40, %al
je 0x7f6d4
movq %rdi, %rbx
cmpl $0x5, 0xf0(%rdi)
jge 0x7f6e9
andl $0xfffff7bf, %eax       # imm = 0xFFFFF7BF
movl %eax, (%rbx)
movl $0x0, 0xf0(%rbx)
callq 0x330c8
movq %rax, 0xf8(%rbx)
movq 0x118(%rbx), %rax
testq %rax, %rax
je 0x7f6d2
andb $0x7f, (%rax)
movq $0x0, 0x118(%rbx)
popq %rbx
retq
leaq 0x50f0a(%rip), %rdi     # 0xd05e5
leaq 0x4fa6e(%rip), %rsi     # 0xcf150
movl $0x1074, %edx           # imm = 0x1074
jmp 0x7f6fc
leaq 0x50f1a(%rip), %rdi     # 0xd060a
leaq 0x4fa59(%rip), %rsi     # 0xcf150
movl $0x1075, %edx           # imm = 0x1075
callq 0x654e1
movl $0x1, %edi
callq 0x263d0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/sentinel.c
// Function: sentinelFailoverSelectSlave
void sentinelFailoverSelectSlave(sentinelRedisInstance *ri) {
    sentinelRedisInstance *slave = sentinelSelectSlave(ri);

    /* We don't handle the timeout in this state as the function aborts
     * the failover or go forward in the next state. */
    if (slave == NULL) {
        sentinelEvent(LL_WARNING,"-failover-abort-no-good-slave",ri,"%@");
        sentinelAbortFailover(ri);
    } else {
        sentinelEvent(LL_WARNING,"+selected-slave",slave,"%@");
        slave->flags |= SRI_PROMOTED;
        ri->promoted_slave = slave;
        ri->failover_state = SENTINEL_FAILOVER_STATE_SEND_SLAVEOF_NOONE;
        ri->failover_state_change_time = mstime();
        sentinelEvent(LL_NOTICE,"+failover-state-send-slaveof-noone",
            slave, "%@");
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x7e82d
testq %rax, %rax
je 0x7f77f
movq %rax, %r14
leaq 0x50de2(%rip), %rsi     # 0xd0509
leaq 0x4fcd2(%rip), %r15     # 0xcf400
movl $0x3, %edi
movq %rax, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x7a50c
orb $-0x80, (%r14)
movq %r14, 0x118(%rbx)
movl $0x3, 0xf0(%rbx)
callq 0x330c8
movq %rax, 0xf8(%rbx)
leaq 0x50db1(%rip), %rsi     # 0xd0519
movl $0x2, %edi
movq %r14, %rdx
movq %r15, %rcx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x7a50c
leaq 0x50d65(%rip), %rsi     # 0xd04eb
leaq 0x4fc73(%rip), %rcx     # 0xcf400
movl $0x3, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x7a50c
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x7f688
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/sentinel.c
// Function: sentinelFailoverSendSlaveOfNoOne
void sentinelFailoverSendSlaveOfNoOne(sentinelRedisInstance *ri) {
    int retval;

    /* We can't send the command to the promoted slave if it is now
     * disconnected. Retry again and again with this state until the timeout
     * is reached, then abort the failover. */
    if (ri->promoted_slave->link->disconnected) {
        if (mstime() - ri->failover_state_change_time > ri->failover_timeout) {
            sentinelEvent(LL_WARNING,"-failover-abort-slave-timeout",ri,"%@");
            sentinelAbortFailover(ri);
        }
        return;
    }

    /* Send SLAVEOF NO ONE command to turn the slave into a master.
     * We actually register a generic callback for this command as we don't
     * really care about the reply. We check if it worked indirectly observing
     * if INFO returns a different role (master instead of slave). */
    retval = sentinelSendSlaveOf(ri->promoted_slave,NULL,0);
    if (retval != C_OK) return;
    sentinelEvent(LL_NOTICE, "+failover-state-wait-promotion",
        ri->promoted_slave,"%@");
    ri->failover_state = SENTINEL_FAILOVER_STATE_WAIT_PROMOTION;
    ri->failover_state_change_time = mstime();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x118(%rdi), %rdi
movq 0x28(%rdi), %rax
cmpl $0x0, 0x4(%rax)
je 0x7f7f9
callq 0x330c8
subq 0xf8(%rbx), %rax
cmpq 0x108(%rbx), %rax
jle 0x7f83d
leaq 0x50d62(%rip), %rsi     # 0xd053c
leaq 0x4fc1f(%rip), %rcx     # 0xcf400
movl $0x3, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x7a50c
movq %rbx, %rdi
popq %rbx
jmp 0x7f688
xorl %esi, %esi
xorl %edx, %edx
callq 0x7d6ce
testl %eax, %eax
jne 0x7f83d
movq 0x118(%rbx), %rdx
leaq 0x50d46(%rip), %rsi     # 0xd055a
leaq 0x4fbe5(%rip), %rcx     # 0xcf400
movl $0x2, %edi
xorl %eax, %eax
callq 0x7a50c
movl $0x4, 0xf0(%rbx)
callq 0x330c8
movq %rax, 0xf8(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/sentinel.c
// Function: sentinelFailoverWaitPromotion
void sentinelFailoverWaitPromotion(sentinelRedisInstance *ri) {
    /* Just handle the timeout. Switching to the next state is handled
     * by the function parsing the INFO command of the promoted slave. */
    if (mstime() - ri->failover_state_change_time > ri->failover_timeout) {
        sentinelEvent(LL_WARNING,"-failover-abort-slave-timeout",ri,"%@");
        sentinelAbortFailover(ri);
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x330c8
subq 0xf8(%rbx), %rax
cmpq 0x108(%rbx), %rax
jle 0x7f87e
leaq 0x50cdd(%rip), %rsi     # 0xd053c
leaq 0x4fb9a(%rip), %rcx     # 0xcf400
movl $0x3, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x7a50c
movq %rbx, %rdi
popq %rbx
jmp 0x7f688
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/sentinel.c
// Function: sentinelFailoverSwitchToPromotedSlave
void sentinelFailoverSwitchToPromotedSlave(sentinelRedisInstance *master) {
    sentinelRedisInstance *ref = master->promoted_slave ?
                                 master->promoted_slave : master;

    sentinelEvent(LL_WARNING,"+switch-master",master,"%s %s %d %s %d",
        master->name, master->addr->ip, master->addr->port,
        ref->addr->ip, ref->addr->port);

    sentinelResetMasterAndChangeAddress(master,ref->addr->ip,ref->addr->port);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x118(%rdi), %r14
testq %r14, %r14
cmoveq %rdi, %r14
movq 0x8(%rdi), %r8
movq 0x20(%rdi), %rax
movq (%rax), %r9
movl 0x8(%rax), %r10d
movq 0x20(%r14), %r11
movl 0x8(%r11), %r15d
subq $0x8, %rsp
leaq 0x4ff3d(%rip), %rsi     # 0xcfaee
leaq 0x4ff45(%rip), %rcx     # 0xcfafd
movl $0x3, %edi
movq %rbx, %rdx
xorl %eax, %eax
pushq %r15
pushq (%r11)
pushq %r10
callq 0x7a50c
addq $0x20, %rsp
movq 0x20(%r14), %rax
movq (%rax), %rsi
movl 0x8(%rax), %edx
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x7ba76
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x7fc2a
testb $0x40, %al
jne 0x7fbf4
retq
movl 0xf0(%rdi), %eax
decl %eax
cmpl $0x4, %eax
ja 0x7fbf3
leaq 0x4f4d4(%rip), %rcx     # 0xcf0dc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x7f56d
jmp 0x7fa11
jmp 0x7f7a9
jmp 0x7f83f
jmp 0x7f70b
pushq %rax
leaq 0x4f79d(%rip), %rdi     # 0xcf3cf
leaq 0x4f517(%rip), %rsi     # 0xcf150
movl $0x1057, %edx           # imm = 0x1057
callq 0x654e1
movl $0x1, %edi
callq 0x263d0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x7c86d
movq %rbx, %rdi
callq 0x7dde4
cmpl $0x0, 0x9ba53(%rip)     # 0x11b6b8
je 0x7fca1
callq 0x330c8
subq 0x9ba4d(%rip), %rax     # 0x11b6c0
cmpq $0x7530, %rax           # imm = 0x7530
jl 0x7fcae
movl $0x0, 0x9ba33(%rip)     # 0x11b6b8
leaq 0x509bb(%rip), %rsi     # 0xd0647
leaq 0x509ba(%rip), %rcx     # 0xd064d
movl $0x3, %edi
xorl %edx, %edx
xorl %eax, %eax
callq 0x7a50c
movq %rbx, %rdi
callq 0x7edaf
testb $0x1, (%rbx)
jne 0x7fcb0
popq %rbx
retq
movq %rbx, %rdi
callq 0x7ef2f
movq %rbx, %rdi
callq 0x7f445
testl %eax, %eax
je 0x7fcd1
movq %rbx, %rdi
movl $0x1, %esi
callq 0x7f10c
movq %rbx, %rdi
callq 0x7fbe9
movq %rbx, %rdi
xorl %esi, %esi
popq %rbx
jmp 0x7f10c
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x320bb
movq %rax, %rbx
movq %rax, %rdi
callq 0x32116
xorl %r14d, %r14d
testq %rax, %rax
je 0x7fd41
movq 0x8(%rax), %r15
movq %r15, %rdi
callq 0x7fc4d
testb $0x1, (%r15)
je 0x7fd37
movq 0x88(%r15), %rdi
callq 0x7fce4
movq 0x80(%r15), %rdi
callq 0x7fce4
cmpl $0x6, 0xf0(%r15)
cmoveq %r15, %r14
movq %rbx, %rdi
callq 0x32116
jmp 0x7fcfc
testq %r14, %r14
je 0x7fd4e
movq %r14, %rdi
callq 0x7fb79
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x321d3
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x330c8
subq 0x9b960(%rip), %rax     # 0x11b6c8
cmpq $0x7d1, %rax            # imm = 0x7D1
jb 0x7fda2
movl $0x1, 0x9b93e(%rip)     # 0x11b6b8
callq 0x330c8
movq %rax, 0x9b93a(%rip)     # 0x11b6c0
leaq 0x508d2(%rip), %rsi     # 0xd065f
leaq 0x508d1(%rip), %rcx     # 0xd0665
movl $0x3, %edi
xorl %edx, %edx
xorl %eax, %eax
callq 0x7a50c
callq 0x330c8
movq %rax, 0x9b91a(%rip)     # 0x11b6c8
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x7fd5b
movq 0x9b8f3(%rip), %rdi     # 0x11b6b0
callq 0x7fce4
callq 0x7aa4c
callq 0x7ab9d
callq 0x7acf8
callq 0x26b80
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 0x86a59(%rip), %rcx     # 0x106858
movl %eax, 0x20(%rcx)
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x50777(%rip), %rcx     # 0xd0678
movzbl (%rdi), %edx
cmpl $0x64, %edx
jle 0x7ff2a
cmpl $0x72, %edx
jg 0x7ff40
addl $-0x65, %edx
cmpl $0x7, %edx
ja 0x7ffa5
movslq (%rcx,%rdx,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
movl $0x200, %esi            # imm = 0x200
jmp 0x7ff96
cmpl $0x44, %edx
jg 0x7ff56
cmpl $0x24, %edx
je 0x7ff91
movl $0x3fc, %esi            # imm = 0x3FC
cmpl $0x41, %edx
je 0x7ff96
jmp 0x7ffa0
cmpl $0x73, %edx
je 0x7ff8a
cmpl $0x78, %edx
je 0x7ff83
cmpl $0x7a, %edx
jne 0x7ffa5
movl $0x80, %esi
jmp 0x7ff96
cmpl $0x45, %edx
je 0x7ff7c
cmpl $0x4b, %edx
jne 0x7ffa5
movl $0x1, %esi
jmp 0x7ff96
movl $0x4, %esi
jmp 0x7ff96
movl $0x10, %esi
jmp 0x7ff96
movl $0x40, %esi
jmp 0x7ff96
movl $0x2, %esi
jmp 0x7ff96
movl $0x100, %esi            # imm = 0x100
jmp 0x7ff96
movl $0x20, %esi
jmp 0x7ff96
movl $0x8, %esi
incq %rdi
orl %esi, %eax
jmp 0x7ff01
testl %edx, %edx
jne 0x7ffa5
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x39222
movl %ebx, %ecx
notl %ecx
testl $0x3fc, %ecx            # imm = 0x3FC
jne 0x7ffcb
leaq 0x56975(%rip), %rsi     # 0xd693b
jmp 0x80087
testb $0x4, %bl
je 0x7ffe4
leaq 0x4d72d(%rip), %rsi     # 0xcd704
movl $0x1, %edx
movq %rax, %rdi
callq 0x39a56
testb $0x8, %bl
je 0x7fffd
leaq 0x506a8(%rip), %rsi     # 0xd0698
movl $0x1, %edx
movq %rax, %rdi
callq 0x39a56
testb $0x10, %bl
je 0x80016
leaq 0x4c8ac(%rip), %rsi     # 0xcc8b5
movl $0x1, %edx
movq %rax, %rdi
callq 0x39a56
testb $0x20, %bl
je 0x8002f
leaq 0x4f859(%rip), %rsi     # 0xcf87b
movl $0x1, %edx
movq %rax, %rdi
callq 0x39a56
testb $0x40, %bl
je 0x80048
leaq 0x420c6(%rip), %rsi     # 0xc2101
movl $0x1, %edx
movq %rax, %rdi
callq 0x39a56
testb %bl, %bl
jns 0x80060
leaq 0x471bc(%rip), %rsi     # 0xc720f
movl $0x1, %edx
movq %rax, %rdi
callq 0x39a56
btl $0x8, %ebx
jae 0x8007a
leaq 0x42998(%rip), %rsi     # 0xc2a05
movl $0x1, %edx
movq %rax, %rdi
callq 0x39a56
btl $0x9, %ebx
jae 0x80094
leaq 0x546ae(%rip), %rsi     # 0xd4735
movl $0x1, %edx
movq %rax, %rdi
callq 0x39a56
testb $0x1, %bl
je 0x800ad
leaq 0x4e181(%rip), %rsi     # 0xce221
movl $0x1, %edx
movq %rax, %rdi
callq 0x39a56
testb $0x2, %bl
jne 0x800b4
popq %rbx
retq
leaq 0x4c106(%rip), %rsi     # 0xcc1c1
movl $0x1, %edx
movq %rax, %rdi
popq %rbx
jmp 0x39a56
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x8677a(%rip), %rbx     # 0x106858
testl %edi, 0x988(%rbx)
je 0x80218
movl %ecx, %ebp
movq %rdx, %r13
movq %rsi, %r14
movq %rsi, %rdi
callq 0x26510
movq %r14, %rdi
movq %rax, %rsi
callq 0x43ba8
movq %rax, %r14
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
testb $0x1, 0x988(%rbx)
je 0x8018c
leaq 0x5057c(%rip), %rdi     # 0xd069a
movl $0xb, %esi
callq 0x3910c
movq %rax, %r12
movslq %ebp, %rdx
movq %rsp, %rdi
movl $0x18, %esi
callq 0x433e5
movl %eax, %r15d
movslq %eax, %rdx
movq %r12, %rdi
movq %rsp, %rsi
callq 0x39a56
leaq 0x50553(%rip), %rsi     # 0xd06a6
movl $0x3, %edx
movq %rax, %rdi
callq 0x39a56
movq 0x8(%r13), %rsi
movq %rax, %rdi
callq 0x39b4d
xorl %edi, %edi
movq %rax, %rsi
callq 0x43ab4
movq %rax, %r12
movq %rax, %rdi
movq %r14, %rsi
callq 0x63f62
movq %r12, %rdi
callq 0x440f3
testb $0x2, 0x988(%rbx)
je 0x80210
leaq 0x5050e(%rip), %rdi     # 0xd06aa
movl $0xb, %esi
callq 0x3910c
movq %rax, %r12
cmpl $-0x1, %r15d
jne 0x801c2
movslq %ebp, %rdx
movq %rsp, %rdi
movl $0x18, %esi
callq 0x433e5
movl %eax, %r15d
movslq %r15d, %rdx
movq %rsp, %rsi
movq %r12, %rdi
callq 0x39a56
leaq 0x504cf(%rip), %rsi     # 0xd06a6
movl $0x3, %edx
movq %rax, %rdi
callq 0x39a56
movq 0x8(%r14), %rsi
movq %rax, %rdi
callq 0x39b4d
xorl %edi, %edi
movq %rax, %rsi
callq 0x43ab4
movq %rax, %r15
movq %rax, %rdi
movq %r13, %rsi
callq 0x63f62
movq %r15, %rdi
callq 0x440f3
movq %r14, %rdi
callq 0x440f3
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x86231(%rip), %r14     # 0x106858
movq 0x910(%r14), %rdi
cmpq $0x0, 0x28(%rdi)
je 0x806ca
leaq 0x50078(%rip), %r15     # 0xd06b8
movq (%rdi), %rsi
testq %rsi, %rsi
je 0x806d0
movq 0x10(%rsi), %rbx
callq 0x2e4f4
movl 0x98(%rbx), %eax
movl %eax, %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
movl %ecx, 0x98(%rbx)
testb $0x10, %al
jne 0x806b8
movq 0x28(%rbx), %rcx
testq %rcx, %rcx
je 0x806b8
movzbl -0x1(%rcx), %eax
movl %eax, %edx
andl $0x7, %edx
cmpl $0x4, %edx
ja 0x806a9
movslq (%r15,%rdx,4), %rdx
addq %r15, %rdx
jmpq *%rdx
shrl $0x3, %eax
jmp 0x806ab
movq -0x11(%rcx), %rax
jmp 0x806ab
movzwl -0x5(%rcx), %eax
jmp 0x806ab
movl -0x9(%rcx), %eax
jmp 0x806ab
movzbl -0x3(%rcx), %eax
jmp 0x806ab
xorl %eax, %eax
testq %rax, %rax
je 0x806b8
movq %rbx, %rdi
callq 0x41b1d
movq 0x910(%r14), %rdi
cmpq $0x0, 0x28(%rdi)
jne 0x80640
popq %rbx
popq %r14
popq %r15
retq
leaq 0x428e5(%rip), %rdi     # 0xc2fbc
leaq 0x5002c(%rip), %rsi     # 0xd070a
movl $0x73, %edx
callq 0x654e1
movl $0x1, %edi
callq 0x263d0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x80710
cmpl $0x1, %eax
jne 0x80761
movq %rbx, %rdi
callq 0x50f8c
jmp 0x80718
movq %rbx, %rdi
callq 0x4a6e3
movl 0x98(%rbx), %edx
movl %edx, %eax
andl $-0x11, %eax
movl %eax, 0x98(%rbx)
movl $0x0, 0x168(%rbx)
leaq 0x8611e(%rip), %rcx     # 0x106858
decl 0x908(%rcx)
testb %dl, %dl
js 0x8075f
orl $0x80, %eax
movl %eax, 0x98(%rbx)
movq 0x910(%rcx), %rdi
movq %rbx, %rsi
popq %rbx
jmp 0x2e40f
popq %rbx
retq
leaq 0x4ffac(%rip), %rdi     # 0xd0714
leaq 0x4ff9b(%rip), %rsi     # 0xd070a
movl $0x8c, %edx
callq 0x6558d
movl $0x1, %edi
callq 0x263d0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x807ab
cmpl $0x1, %eax
jne 0x807c3
leaq 0x86b12(%rip), %rax     # 0x1072b0
movq 0x58(%rax), %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x3fc19
movq 0x190(%rbx), %rdi
callq 0x4a5b4
movslq %eax, %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x40606
leaq 0x4ff6e(%rip), %rdi     # 0xd0738
leaq 0x4ff39(%rip), %rsi     # 0xd070a
movl $0xa3, %edx
callq 0x6558d
movl $0x1, %edi
callq 0x263d0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x86063(%rip), %rax     # 0x106858
movq 0x1c8(%rax), %rdi
movq %rsp, %rbx
movq %rbx, %rsi
callq 0x2e582
movq %rbx, %rdi
callq 0x2e59f
testq %rax, %rax
je 0x8085c
movq %rsp, %rbx
leaq 0x4ff4d(%rip), %r14     # 0xd076b
movq 0x10(%rax), %r15
testb $0x10, 0x98(%r15)
je 0x8084f
movq %r14, %rdi
callq 0x39245
movq %r15, %rdi
movq %rax, %rsi
callq 0x3fe4b
movq %r15, %rdi
callq 0x806f2
orb $0x40, 0x98(%r15)
movq %rbx, %rdi
callq 0x2e59f
testq %rax, %rax
jne 0x8081e
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 (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 0x441ab
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x818c7
movq %r14, %rdi
callq 0x446f9
cmpq $0x10, %rax
jb 0x818ab
movq 0x8(%r14), %rax
cmpb $0x48, (%rax)
jne 0x818ab
cmpb $0x59, 0x1(%rax)
jne 0x818ab
cmpb $0x4c, 0x2(%rax)
jne 0x818ab
cmpb $0x4c, 0x3(%rax)
jne 0x818ab
movb 0x4(%rax), %al
cmpb $0x1, %al
jbe 0x818ce
leaq 0x4f093(%rip), %rdi     # 0xd0945
callq 0x39245
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3fe4b
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
xorl %ebp, %ebp
testb %al, %al
jne 0x818c7
movq %r14, %rdi
callq 0x446f9
cmpq $0x3010, %rax           # imm = 0x3010
jne 0x818ab
jmp 0x818c7
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x4e5d6(%rip), %rdi     # 0xd0b2c
leaq 0x40498(%rip), %rsi     # 0xc29f5
callq 0x26af0
xorl %ebx, %ebx
testq %rax, %rax
je 0x825a3
movq %rax, %r14
movq %rsp, %rdi
movl $0x400, %esi            # imm = 0x400
movq %rax, %rdx
callq 0x26450
movq %rax, %r15
movq %r14, %rdi
callq 0x26a20
testq %r15, %r15
je 0x825a3
leaq 0x4e5c5(%rip), %rsi     # 0xd0b58
movq %rsp, %rdi
callq 0x266c0
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_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x835bb
cmpb $0x0, (%rsi)
je 0x835bb
movq %rsi, %rdi
callq 0x3b419
movsd (%rsp), %xmm0
movq %rax, %r14
jmp 0x835be
xorl %r14d, %r14d
movslq (%rbx), %rsi
testq %rsi, %rsi
je 0x835de
movsd 0x10(%rbx), %xmm1
ucomisd %xmm0, %xmm1
ja 0x835e3
ucomisd 0x18(%rbx), %xmm0
jbe 0x835eb
leaq 0x18(%rbx), %rax
jmp 0x835e7
movsd %xmm0, 0x18(%rbx)
leaq 0x10(%rbx), %rax
movsd %xmm0, (%rax)
movq 0x8(%rbx), %rdi
shlq $0x4, %rsi
addq $0x10, %rsi
callq 0x3b349
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 0x83623
incl 0x4(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/redis-check-rdb.c
// Function: rdbCheckError
void rdbCheckError(const char *fmt, ...) {
    char msg[1024];
    va_list ap;

    va_start(ap, fmt);
    vsnprintf(msg, sizeof(msg), fmt, ap);
    va_end(ap);

    printf("--- RDB ERROR DETECTED ---\n");
    printf("[offset %llu] %s\n",
        (unsigned long long) (rdbstate.rio ?
            rdbstate.rio->processed_bytes : 0), msg);
    printf("[additional info] While doing: %s\n",
        rdb_check_doing_string[rdbstate.doing]);
    if (rdbstate.key)
        printf("[additional info] Reading key '%s'\n",
            (char*)rdbstate.key->ptr);
    if (rdbstate.key_type != -1)
        printf("[additional info] Reading type %d (%s)\n",
            rdbstate.key_type,
            ((unsigned)rdbstate.key_type <
             sizeof(rdb_type_string)/sizeof(char*)) ?
                rdb_type_string[rdbstate.key_type] : "unknown");
    rdbShowGenericInfo();
}

// Assembly:
subq $0x4d8, %rsp            # imm = 0x4D8
movq %rdi, %r10
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x83a27
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)
movq %rsp, %rcx
movq %rdi, 0x10(%rcx)
leaq 0x4e0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rcx)
leaq 0xd0(%rsp), %rdi
movl $0x400, %esi            # imm = 0x400
movq %r10, %rdx
callq 0x26820
leaq 0x4e9ec(%rip), %rdi     # 0xd244f
callq 0x26260
movq 0x97ec9(%rip), %rax     # 0x11b938
testq %rax, %rax
je 0x83a7a
movq 0x30(%rax), %rsi
jmp 0x83a7c
xorl %esi, %esi
leaq 0x4e88c(%rip), %rdi     # 0xd230f
leaq 0xd0(%rsp), %rdx
xorl %eax, %eax
callq 0x260a0
movslq 0x97ecf(%rip), %rax     # 0x11b968
leaq 0x82b70(%rip), %rcx     # 0x106610
movq (%rcx,%rax,8), %rsi
leaq 0x4e876(%rip), %rdi     # 0xd2321
xorl %eax, %eax
callq 0x260a0
movq 0x97e87(%rip), %rax     # 0x11b940
testq %rax, %rax
je 0x83ad0
movq 0x8(%rax), %rsi
leaq 0x4e87b(%rip), %rdi     # 0xd2344
xorl %eax, %eax
callq 0x260a0
movl 0x97e72(%rip), %esi     # 0x11b948
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, %rsi
je 0x83b07
cmpl $0xe, %esi
ja 0x83af2
leaq 0x82b64(%rip), %rax     # 0x106650
movq (%rax,%rsi,8), %rdx
jmp 0x83af9
leaq 0x4029a(%rip), %rdx     # 0xc3d93
leaq 0x4e868(%rip), %rdi     # 0xd2368
xorl %eax, %eax
callq 0x260a0
callq 0x83988
addq $0x4d8, %rsp            # imm = 0x4D8
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/redis-check-rdb.c
// Function: rdbCheckInfo
void rdbCheckInfo(const char *fmt, ...) {
    char msg[1024];
    va_list ap;

    va_start(ap, fmt);
    vsnprintf(msg, sizeof(msg), fmt, ap);
    va_end(ap);

    printf("[offset %llu] %s\n",
        (unsigned long long) (rdbstate.rio ?
            rdbstate.rio->processed_bytes : 0), msg);
}

// Assembly:
subq $0x4d8, %rsp            # imm = 0x4D8
movq %rdi, %r10
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x83b72
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)
movq %rsp, %rcx
movq %rdi, 0x10(%rcx)
leaq 0x4e0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rcx)
leaq 0xd0(%rsp), %rdi
movl $0x400, %esi            # imm = 0x400
movq %r10, %rdx
callq 0x26820
movq 0x97d8a(%rip), %rax     # 0x11b938
testq %rax, %rax
je 0x83bb9
movq 0x30(%rax), %rsi
jmp 0x83bbb
xorl %esi, %esi
leaq 0x4e74d(%rip), %rdi     # 0xd230f
leaq 0xd0(%rsp), %rdx
xorl %eax, %eax
callq 0x260a0
addq $0x4d8, %rsp            # imm = 0x4D8
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/redis-check-rdb.c
// Function: rdbCheckSetError
void rdbCheckSetError(const char *fmt, ...) {
    va_list ap;

    va_start(ap, fmt);
    vsnprintf(rdbstate.error, sizeof(rdbstate.error), fmt, ap);
    va_end(ap);
    rdbstate.error_set = 1;
}

// Assembly:
subq $0xd8, %rsp
movq %rdi, %r10
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x83c37
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)
movq %rsp, %rcx
movq %rdi, 0x10(%rcx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rcx)
leaq 0x97d12(%rip), %rdi     # 0x11b970
movl $0x400, %esi            # imm = 0x400
movq %r10, %rdx
callq 0x26820
movl $0x1, 0x97cf7(%rip)     # 0x11b96c
addq $0xd8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/redis-check-rdb.c
// Function: rdbCheckSetupSignals
void rdbCheckSetupSignals(void) {
    struct sigaction act;

    sigemptyset(&act.sa_mask);
    act.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
    act.sa_sigaction = rdbCheckHandleCrash;
    sigaction(SIGSEGV, &act, NULL);
    sigaction(SIGBUS, &act, NULL);
    sigaction(SIGFPE, &act, NULL);
    sigaction(SIGILL, &act, NULL);
}

// Assembly:
pushq %rbx
subq $0xa0, %rsp
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x26ad0
movl $0xc0000004, 0x80(%rbx) # imm = 0xC0000004
leaq -0x3f(%rip), %rax       # 0x83c7d
movq %rax, -0x8(%rbx)
leaq 0x8(%rsp), %rbx
movl $0xb, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x266d0
movl $0x7, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x266d0
movl $0x8, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x266d0
movl $0x4, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x266d0
addq $0xa0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/redis-check-rdb.c
// Function: redis_check_rdb_main
int redis_check_rdb_main(int argc, char **argv) {
    if (argc != 2) {
        fprintf(stderr, "Usage: %s <rdb-file-name>\n", argv[0]);
        exit(1);
    }
    createSharedObjects(); /* Needed for loading. */
    server.loading_process_events_interval_bytes = 0;
    rdbCheckMode = 1;
    rdbCheckInfo("Checking RDB file %s", argv[1]);
    rdbCheckSetupSignals();
    int retval = redis_check_rdb(argv[1]);
    if (retval == 0) {
        rdbCheckInfo("\\o/ RDB looks OK! \\o/");
        rdbShowGenericInfo();
    }
    exit(retval);
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
cmpl $0x2, %edi
jne 0x842a2
callq 0x344a4
leaq 0x8260b(%rip), %rax     # 0x106858
movq $0x0, 0x338(%rax)
movl $0x1, 0x976ce(%rip)     # 0x11b930
movq 0x8(%rbx), %rsi
leaq 0x4e1b7(%rip), %rdi     # 0xd2424
xorl %eax, %eax
callq 0x83b14
callq 0x83c96
movq 0x8(%rbx), %rdi
callq 0x83d0a
movl %eax, %ebx
testl %eax, %eax
jne 0x8429b
leaq 0x4e1aa(%rip), %rdi     # 0xd2439
xorl %eax, %eax
callq 0x83b14
callq 0x83988
movl %ebx, %edi
callq 0x262d0
movq 0x7dd1f(%rip), %rax     # 0x101fc8
movq (%rax), %rdi
movq (%rbx), %rdx
leaq 0x4e153(%rip), %rsi     # 0xd2409
xorl %eax, %eax
callq 0x26ba0
movl $0x1, %edi
callq 0x262d0
nop
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/geo.c
// Function: geoArrayCreate
geoArray *geoArrayCreate(void) {
    geoArray *ga = zmalloc(sizeof(*ga));
    /* It gets allocated on first geoArrayAppend() call. */
    ga->array = NULL;
    ga->buckets = 0;
    ga->used = 0;
    return ga;
}

// Assembly:
pushq %rax
movl $0x18, %edi
callq 0x3b29d
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/geo.c
// Function: geoArrayAppend
geoPoint *geoArrayAppend(geoArray *ga) {
    if (ga->used == ga->buckets) {
        ga->buckets = (ga->buckets == 0) ? 8 : ga->buckets*2;
        ga->array = zrealloc(ga->array,sizeof(geoPoint)*ga->buckets);
    }
    geoPoint *gp = ga->array+ga->used;
    ga->used++;
    return gp;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rax
cmpq %rax, 0x10(%rdi)
jne 0x84318
leaq (%rax,%rax), %rcx
testq %rax, %rax
movl $0x8, %eax
cmovneq %rcx, %rax
movq %rax, 0x8(%rbx)
movq (%rbx), %rdi
shlq $0x3, %rax
leaq (%rax,%rax,4), %rsi
callq 0x3b349
movq %rax, (%rbx)
movq 0x10(%rbx), %rcx
leaq (%rcx,%rcx,4), %rax
shlq $0x3, %rax
addq (%rbx), %rax
incq %rcx
movq %rcx, 0x10(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/geo.c
// Function: geoArrayFree
void geoArrayFree(geoArray *ga) {
    size_t i;
    for (i = 0; i < ga->used; i++) sdsfree(ga->array[i].member);
    zfree(ga->array);
    zfree(ga);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x10(%rdi)
je 0x84361
movl $0x20, %r14d
xorl %r15d, %r15d
movq (%rbx), %rax
movq (%rax,%r14), %rdi
callq 0x392b6
incq %r15
addq $0x28, %r14
cmpq 0x10(%rbx), %r15
jb 0x84348
movq (%rbx), %rdi
callq 0x3b3df
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x3b3df
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/geo.c
// Function: extractLongLatOrReply
int extractLongLatOrReply(client *c, robj **argv, double *xy) {
    int i;
    for (i = 0; i < 2; i++) {
        if (getDoubleFromObjectOrReply(c, argv[i], xy + i, NULL) !=
            C_OK) {
            return C_ERR;
        }
    }
    if (xy[0] < GEO_LONG_MIN || xy[0] > GEO_LONG_MAX ||
        xy[1] < GEO_LAT_MIN  || xy[1] > GEO_LAT_MAX) {
        addReplySds(c, sdscatprintf(sdsempty(),
            "-ERR invalid longitude,latitude pair %f,%f\r\n",xy[0],xy[1]));
        return C_ERR;
    }
    return C_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
xorl %r12d, %r12d
movq (%r15,%r12), %rsi
leaq (%r14,%r12), %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x448a1
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x8443f
addq $0x8, %r12
cmpq $0x8, %r12
je 0x843b6
movsd (%r14), %xmm0
andpd 0x4e0c6(%rip), %xmm0    # 0xd24b0
ucomisd 0x4e07e(%rip), %xmm0    # 0xd2470
ja 0x8440e
movsd 0x8(%r14), %xmm0
andpd 0x4e0ae(%rip), %xmm0    # 0xd24b0
xorl %eax, %eax
ucomisd 0x4e06c(%rip), %xmm0    # 0xd2478
jbe 0x8443f
callq 0x39222
movsd (%r14), %xmm0
movsd 0x8(%r14), %xmm1
leaq 0x4e0af(%rip), %rsi     # 0xd24d4
movq %rax, %rdi
movb $0x2, %al
callq 0x39eb7
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3fe4b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/geo.c
// Function: longLatFromMember
int longLatFromMember(robj *zobj, robj *member, double *xy) {
    double score = 0;

    if (zsetScore(zobj, member, &score) == C_ERR) return C_ERR;
    if (!decodeGeohash(score, xy)) return C_ERR;
    return C_OK;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
leaq 0x8(%rsp), %rdx
movq $0x0, (%rdx)
callq 0x55517
cmpl $-0x1, %eax
je 0x844a6
movsd 0x8(%rsp), %xmm0
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x4c465(%rip), %xmm0    # 0xd08e8
cvttsd2si %xmm0, %rdi
andq %rcx, %rdi
orq %rax, %rdi
movl $0x1a, %esi
movq %rbx, %rdx
callq 0xa10ee
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x1, %ecx
sbbl %eax, %eax
jmp 0x844ab
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/geo.c
// Function: extractUnitOrReply
double extractUnitOrReply(client *c, robj *unit) {
    char *u = unit->ptr;

    if (!strcmp(u, "m")) {
        return 1;
    } else if (!strcmp(u, "km")) {
        return 1000;
    } else if (!strcmp(u, "ft")) {
        return 0.3048;
    } else if (!strcmp(u, "mi")) {
        return 1609.34;
    } else {
        addReplyError(c,
            "unsupported unit provided. please use m, km, ft, mi");
        return -1;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rsi), %r14
leaq 0x4dc81(%rip), %rsi     # 0xd2144
movq %r14, %rdi
callq 0x26900
testl %eax, %eax
je 0x84521
leaq 0x4e02b(%rip), %rsi     # 0xd2501
movq %r14, %rdi
callq 0x26900
testl %eax, %eax
je 0x8452b
leaq 0x50b44(%rip), %rsi     # 0xd502d
movq %r14, %rdi
callq 0x26900
testl %eax, %eax
je 0x84535
leaq 0x4e039(%rip), %rsi     # 0xd2535
movq %r14, %rdi
callq 0x26900
testl %eax, %eax
je 0x8453f
leaq 0x4dff5(%rip), %rsi     # 0xd2504
movq %rbx, %rdi
callq 0x3ffcb
movsd 0x4df79(%rip), %xmm0    # 0xd2498
jmp 0x84547
movsd 0x3f4af(%rip), %xmm0    # 0xc39d8
jmp 0x84547
movsd 0x4df4d(%rip), %xmm0    # 0xd2480
jmp 0x84547
movsd 0x4df4b(%rip), %xmm0    # 0xd2488
jmp 0x84547
movsd 0x4df49(%rip), %xmm0    # 0xd2490
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/geo.c
// Function: extractDistanceOrReply
double extractDistanceOrReply(client *c, robj **argv,
                                     double *conversion) {
    double distance;
    if (getDoubleFromObjectOrReply(c, argv[0], &distance,
                                   "need numeric radius") != C_OK) {
        return -1;
    }

    if (distance < 0) {
        addReplyError(c,"radius cannot be negative");
        return -1;
    }
    
    double to_meters = extractUnitOrReply(c,argv[1]);
    if (to_meters < 0) {
        return -1;
    }

    if (conversion) *conversion = to_meters;
    return distance * to_meters;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq (%rsi), %rsi
leaq 0x4dfcd(%rip), %rcx     # 0xd2538
leaq 0x8(%rsp), %rdx
callq 0x448a1
movsd 0x4df1b(%rip), %xmm1    # 0xd2498
testl %eax, %eax
jne 0x845d7
xorpd %xmm0, %xmm0
ucomisd 0x8(%rsp), %xmm0
jbe 0x845a6
leaq 0x4dfb8(%rip), %rsi     # 0xd254c
movq %r14, %rdi
callq 0x3ffcb
movsd 0x4def4(%rip), %xmm1    # 0xd2498
jmp 0x845d7
movq 0x8(%r15), %rsi
movq %r14, %rdi
callq 0x844b1
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
movsd 0x4ded6(%rip), %xmm1    # 0xd2498
ja 0x845d7
testq %rbx, %rbx
je 0x845cd
movsd %xmm0, (%rbx)
mulsd 0x8(%rsp), %xmm0
movapd %xmm0, %xmm1
movapd %xmm1, %xmm0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq