LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/src/sentinel.c
// Function: sentinelFailoverWaitStart
void sentinelFailoverWaitStart(sentinelRedisInstance *ri) {
    char *leader;
    int isleader;

    /* Check if we are the leader for the failover epoch. */
    // 获取给定纪元的领头 Sentinel
    leader = sentinelGetLeader(ri, ri->failover_epoch);
    // 本 Sentinel 是否为领头 Sentinel ？
    isleader = leader && strcasecmp(leader,server.runid) == 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. */
    // 如果本 Sentinel 不是领头，并且这次故障迁移不是一次强制故障迁移操作
    // 那么本 Sentinel 不做动作
    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. */
        // 当选的时长（类似于任期）是 SENTINEL_ELECTION_TIMEOUT
        // 和 Sentinel 设置的故障迁移时长之间的较小那个值
        if (election_timeout > ri->failover_timeout)
            election_timeout = ri->failover_timeout;

        /* Abort the failover if I'm not the leader after some time. */
        // Sentinel 的当选时间已过，取消故障转移计划
        if (mstime() - ri->failover_start_time > election_timeout) {
            sentinelEvent(REDIS_WARNING,"-failover-abort-not-elected",ri,"%@");
            // 取消故障转移
            sentinelAbortFailover(ri);
        }
        return;
    }

    // 本 Sentinel 作为领头，开始执行故障迁移操作...

    sentinelEvent(REDIS_WARNING,"+elected-leader",ri,"%@");

    // 进入选择从服务器状态
    ri->failover_state = SENTINEL_FAILOVER_STATE_SELECT_SLAVE;
    ri->failover_state_change_time = mstime();

    sentinelEvent(REDIS_WARNING,"+failover-state-select-slave",ri,"%@");
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x128(%rdi), %rsi
callq 0x5a77a
testq %rax, %rax
je 0x5aa57
movq %rax, %r14
leaq 0x6c56d(%rip), %rsi     # 0xc6fa8
addq $0x58, %rsi
movq %rax, %rdi
callq 0x1f2e0
movl %eax, %ebp
movq %r14, %rdi
callq 0x271f7
testl %ebp, %ebp
jne 0x5aa5e
jmp 0x5aab2
xorl %edi, %edi
callq 0x271f7
testb $0x10, 0x1(%rbx)
jne 0x5aab2
movq 0x148(%rbx), %rax
movl $0x2710, %ecx           # imm = 0x2710
cmpq %rcx, %rax
movslq %eax, %r14
cmovgeq %rcx, %r14
callq 0x22843
subq 0x140(%rbx), %rax
cmpq %r14, %rax
jle 0x5ab02
leaq 0x3b2e0(%rip), %rsi     # 0x95d72
leaq 0x3a549(%rip), %rcx     # 0x94fe2
pushq $0x3
popq %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x5678f
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x5ab07
leaq 0x3b2d5(%rip), %rsi     # 0x95d8e
leaq 0x3a522(%rip), %r14     # 0x94fe2
pushq $0x3
popq %rbp
movl %ebp, %edi
movq %rbx, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x5678f
movl $0x2, 0x130(%rbx)
callq 0x22843
movq %rax, 0x138(%rbx)
leaq 0x3b2af(%rip), %rsi     # 0x95d9e
movl %ebp, %edi
movq %rbx, %rdx
movq %r14, %rcx
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x5678f
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/src/sentinel.c
// Function: sentinelAbortFailover
void sentinelAbortFailover(sentinelRedisInstance *ri) {
    redisAssert(ri->flags & SRI_FAILOVER_IN_PROGRESS);
    redisAssert(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 %al, %al
jns 0x5ab4e
movq %rdi, %rbx
cmpl $0x5, 0x130(%rdi)
jge 0x5ab63
andl $0xffffef7f, %eax       # imm = 0xFFFFEF7F
movl %eax, (%rbx)
andl $0x0, 0x130(%rbx)
callq 0x22843
movq %rax, 0x138(%rbx)
movq 0x158(%rbx), %rax
testq %rax, %rax
je 0x5ab4c
andb $-0x2, 0x1(%rax)
andq $0x0, 0x158(%rbx)
popq %rbx
retq
leaq 0x3b360(%rip), %rdi     # 0x95eb5
leaq 0x3a23c(%rip), %rsi     # 0x94d98
movl $0x12d4, %edx           # imm = 0x12D4
jmp 0x5ab76
leaq 0x3b370(%rip), %rdi     # 0x95eda
leaq 0x3a227(%rip), %rsi     # 0x94d98
movl $0x12d5, %edx           # imm = 0x12D5
callq 0x4906b
pushq $0x1
popq %rdi
callq 0x1f3b0
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/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(REDIS_WARNING,"-failover-abort-no-good-slave",ri,"%@");

        // 中止故障转移
        sentinelAbortFailover(ri);

    } else {

        // 成功选定新主服务器

        // 发送事件
        sentinelEvent(REDIS_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(REDIS_NOTICE,"+failover-state-send-slaveof-noone",
            slave, "%@");
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x59dfb
testq %rax, %rax
je 0x5abf4
movq %rax, %r14
leaq 0x3b23a(%rip), %rsi     # 0x95dd9
leaq 0x3a43c(%rip), %r15     # 0x94fe2
pushq $0x3
popq %rdi
movq %rax, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x5678f
orb $0x1, 0x1(%r14)
movq %r14, 0x158(%rbx)
movl $0x3, 0x130(%rbx)
callq 0x22843
movq %rax, 0x138(%rbx)
leaq 0x3b20a(%rip), %rsi     # 0x95de9
pushq $0x2
popq %rdi
movq %r14, %rdx
movq %r15, %rcx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x5678f
leaq 0x3b1c0(%rip), %rsi     # 0x95dbb
leaq 0x3a3e0(%rip), %rcx     # 0x94fe2
pushq $0x3
popq %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x5678f
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x5ab07
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/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(REDIS_WARNING,"-failover-abort-slave-timeout",ri,"%@");
        sentinelAbortFailover(ri);
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x22843
subq 0x138(%rbx), %rax
cmpq 0x148(%rbx), %rax
jle 0x5ace8
leaq 0x3b141(%rip), %rsi     # 0x95e0c
leaq 0x3a310(%rip), %rcx     # 0x94fe2
pushq $0x3
popq %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x5678f
movq %rbx, %rdi
popq %rbx
jmp 0x5ab07
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/src/sentinel.c
// Function: sentinelFailoverSwitchToPromotedSlave
void sentinelFailoverSwitchToPromotedSlave(sentinelRedisInstance *master) {

    /// 选出要添加的 master
    sentinelRedisInstance *ref = master->promoted_slave ?
                                 master->promoted_slave : master;

    // 发送更新 master 事件
    sentinelEvent(REDIS_WARNING,"+switch-master",master,"%s %s %d %s %d",
        // 原 master 信息
        master->name, master->addr->ip, master->addr->port,
        // 新 master 信息
        ref->addr->ip, ref->addr->port);

    // 用新主服务器的信息代替原 master 的信息
    sentinelResetMasterAndChangeAddress(master,ref->addr->ip,ref->addr->port);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x158(%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 0x3a6a0(%rip), %rsi     # 0x95676
leaq 0x3a6a8(%rip), %rcx     # 0x95685
pushq $0x3
popq %rdi
movq %rbx, %rdx
xorl %eax, %eax
pushq %r15
pushq (%r11)
pushq %r10
callq 0x5678f
addq $0x20, %rsp
movq 0x20(%r14), %rax
movq (%rax), %rsi
movl 0x8(%rax), %edx
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x5789f
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/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 |= REDIS_NOTIFY_ALL; break;
        case 'g': flags |= REDIS_NOTIFY_GENERIC; break;
        case '$': flags |= REDIS_NOTIFY_STRING; break;
        case 'l': flags |= REDIS_NOTIFY_LIST; break;
        case 's': flags |= REDIS_NOTIFY_SET; break;
        case 'h': flags |= REDIS_NOTIFY_HASH; break;
        case 'z': flags |= REDIS_NOTIFY_ZSET; break;
        case 'x': flags |= REDIS_NOTIFY_EXPIRED; break;
        case 'e': flags |= REDIS_NOTIFY_EVICTED; break;
        case 'K': flags |= REDIS_NOTIFY_KEYSPACE; break;
        case 'E': flags |= REDIS_NOTIFY_KEYEVENT; break;
        // 不能识别
        default: return -1;
        }
    }

    return flags;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
xorl %eax, %eax
movl $0x8, %ecx
movl $0x2, %edx
movl $0x1, %esi
movl $0x20, %r8d
leaq 0x3ac70(%rip), %r9      # 0x95f48
movl $0x4, %r10d
movl $0x40, %r11d
movl $0x10, %ebx
movzbl (%rdi), %r14d
leal -0x65(%r14), %r15d
cmpl $0x7, %r15d
jbe 0x5b328
cmpl $0x24, %r14d
je 0x5b347
cmpl $0x41, %r14d
je 0x5b35f
cmpl $0x45, %r14d
je 0x5b354
cmpl $0x4b, %r14d
je 0x5b350
cmpl $0x73, %r14d
je 0x5b34b
cmpl $0x78, %r14d
je 0x5b358
cmpl $0x7a, %r14d
jne 0x5b36e
movl $0x80, %ebp
jmp 0x5b364
movslq (%r9,%r15,4), %r14
addq %r9, %r14
jmpq *%r14
movl $0x200, %ebp            # imm = 0x200
jmp 0x5b364
movl %r11d, %ebp
jmp 0x5b364
movl %ebx, %ebp
jmp 0x5b364
movl %r10d, %ebp
jmp 0x5b364
movl %ecx, %ebp
jmp 0x5b364
movl %r8d, %ebp
jmp 0x5b364
movl %esi, %ebp
jmp 0x5b364
movl %edx, %ebp
jmp 0x5b364
movl $0x100, %ebp            # imm = 0x100
jmp 0x5b364
movl $0x3fc, %ebp            # imm = 0x3FC
incq %rdi
orl %ebp, %eax
jmp 0x5b2e9
testl %r14d, %r14d
je 0x5b378
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/src/notify.c
// Function: keyspaceEventsFlagsToString
sds keyspaceEventsFlagsToString(int flags) {
    sds res;

    res = sdsempty();
    if ((flags & REDIS_NOTIFY_ALL) == REDIS_NOTIFY_ALL) {
        res = sdscatlen(res,"A",1);
    } else {
        if (flags & REDIS_NOTIFY_GENERIC) res = sdscatlen(res,"g",1);
        if (flags & REDIS_NOTIFY_STRING) res = sdscatlen(res,"$",1);
        if (flags & REDIS_NOTIFY_LIST) res = sdscatlen(res,"l",1);
        if (flags & REDIS_NOTIFY_SET) res = sdscatlen(res,"s",1);
        if (flags & REDIS_NOTIFY_HASH) res = sdscatlen(res,"h",1);
        if (flags & REDIS_NOTIFY_ZSET) res = sdscatlen(res,"z",1);
        if (flags & REDIS_NOTIFY_EXPIRED) res = sdscatlen(res,"x",1);
        if (flags & REDIS_NOTIFY_EVICTED) res = sdscatlen(res,"e",1);
    }
    if (flags & REDIS_NOTIFY_KEYSPACE) res = sdscatlen(res,"K",1);
    if (flags & REDIS_NOTIFY_KEYEVENT) res = sdscatlen(res,"E",1);

    return res;
}

// Assembly:
pushq %rbx
movl %edi, %ebx
callq 0x271bf
movl %ebx, %ecx
notl %ecx
testw $0x3fc, %cx             # imm = 0x3FC
jne 0x5b39e
leaq 0x3e083(%rip), %rsi     # 0x9941c
jmp 0x5b44c
testb $0x4, %bl
je 0x5b3b5
leaq 0x3c28a(%rip), %rsi     # 0x97634
pushq $0x1
popq %rdx
movq %rax, %rdi
callq 0x2736d
testb $0x8, %bl
je 0x5b3cc
leaq 0x3aba7(%rip), %rsi     # 0x95f68
pushq $0x1
popq %rdx
movq %rax, %rdi
callq 0x2736d
testb $0x10, %bl
je 0x5b3e3
leaq 0x38232(%rip), %rsi     # 0x9360a
pushq $0x1
popq %rdx
movq %rax, %rdi
callq 0x2736d
testb $0x20, %bl
je 0x5b3fa
leaq 0x3a008(%rip), %rsi     # 0x953f7
pushq $0x1
popq %rdx
movq %rax, %rdi
callq 0x2736d
testb $0x40, %bl
je 0x5b411
leaq 0x3c9a4(%rip), %rsi     # 0x97daa
pushq $0x1
popq %rdx
movq %rax, %rdi
callq 0x2736d
testb %bl, %bl
jns 0x5b427
leaq 0x34751(%rip), %rsi     # 0x8fb6d
pushq $0x1
popq %rdx
movq %rax, %rdi
callq 0x2736d
btl $0x8, %ebx
jae 0x5b43f
leaq 0x317af(%rip), %rsi     # 0x8cbe3
pushq $0x1
popq %rdx
movq %rax, %rdi
callq 0x2736d
btl $0x9, %ebx
jae 0x5b457
leaq 0x3ce4f(%rip), %rsi     # 0x9829b
pushq $0x1
popq %rdx
movq %rax, %rdi
callq 0x2736d
testb $0x1, %bl
je 0x5b46e
leaq 0x38c48(%rip), %rsi     # 0x940ab
pushq $0x1
popq %rdx
movq %rax, %rdi
callq 0x2736d
testb $0x2, %bl
jne 0x5b475
popq %rbx
retq
leaq 0x37e05(%rip), %rsi     # 0x93281
pushq $0x1
popq %rdx
movq %rax, %rdi
popq %rbx
jmp 0x2736d
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/src/blocked.c
// Function: getTimeoutFromObjectOrReply
int getTimeoutFromObjectOrReply(redisClient *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") != REDIS_OK)
        return REDIS_ERR;

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

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

    return REDIS_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r14
movq %rdi, %r15
leaq 0x3a624(%rip), %rcx     # 0x95f86
movq %rsp, %rdx
callq 0x2f617
pushq $-0x1
popq %rbx
testl %eax, %eax
jne 0x5b9b1
movq (%rsp), %rax
testq %rax, %rax
js 0x5b99b
xorl %ebx, %ebx
testq %rax, %rax
je 0x5b9ac
testl %ebp, %ebp
jne 0x5b990
imulq $0x3e8, %rax, %rax      # imm = 0x3E8
movq %rax, (%rsp)
callq 0x22843
addq (%rsp), %rax
jmp 0x5b9ae
leaq 0x3a60e(%rip), %rsi     # 0x95fb0
movq %r15, %rdi
callq 0x2c2da
jmp 0x5b9b1
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_O2/nilyang[P]redis-tdd-annotation/src/blocked.c
// Function: processUnblockedClients
void processUnblockedClients(void) {
    listNode *ln;
    redisClient *c;

    while (listLength(server.unblocked_clients)) {
        ln = listFirst(server.unblocked_clients);
        redisAssert(ln != NULL);
        c = ln->value;
        listDelNode(server.unblocked_clients,ln);
        c->flags &= ~REDIS_UNBLOCKED;
        c->btype = REDIS_BLOCKED_NONE;

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

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x6b5c4(%rip), %r14     # 0xc6fa8
movq 0x738(%r14), %rdi
cmpq $0x0, 0x28(%rdi)
je 0x5ba39
movq (%rdi), %rsi
testq %rsi, %rsi
je 0x5ba41
movq 0x10(%rsi), %rbx
callq 0x1ff28
andb $0x7f, 0x90(%rbx)
andl $0x0, 0x118(%rbx)
movq 0x20(%rbx), %rax
testq %rax, %rax
je 0x5b9e4
cmpl $0x0, -0x8(%rax)
je 0x5b9e4
movq %rbx, 0x1d0(%r14)
movq %rbx, %rdi
callq 0x2d4f9
andq $0x0, 0x1d0(%r14)
jmp 0x5b9e4
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x33572(%rip), %rdi     # 0x8efba
leaq 0x3a575(%rip), %rsi     # 0x95fc4
pushq $0x74
popq %rdx
callq 0x4906b
pushq $0x1
popq %rdi
callq 0x1f3b0
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/src/blocked.c
// Function: unblockClient
void unblockClient(redisClient *c) {
    if (c->btype == REDIS_BLOCKED_LIST) {
        unblockClientWaitingData(c);
    } else if (c->btype == REDIS_BLOCKED_WAIT) {
        unblockClientWaitingReplicas(c);
    } else {
        redisPanic("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 &= ~REDIS_BLOCKED;
    c->flags |= REDIS_UNBLOCKED;
    c->btype = REDIS_BLOCKED_NONE;
    server.bpop_blocked_clients--;
    listAddNodeTail(server.unblocked_clients,c);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x118(%rdi), %eax
cmpl $0x2, %eax
je 0x5ba7d
cmpl $0x1, %eax
jne 0x5babf
movq %rbx, %rdi
callq 0x38583
jmp 0x5ba85
movq %rbx, %rdi
callq 0x33a3c
movl $0xffffff6f, %eax       # imm = 0xFFFFFF6F
andl 0x90(%rbx), %eax
orl $0x80, %eax
movl %eax, 0x90(%rbx)
andl $0x0, 0x118(%rbx)
leaq 0x6b4ff(%rip), %rax     # 0xc6fa8
decl 0x730(%rax)
movq 0x738(%rax), %rdi
movq %rbx, %rsi
popq %rbx
jmp 0x1fe4c
leaq 0x3a508(%rip), %rdi     # 0x95fce
leaq 0x3a4f7(%rip), %rsi     # 0x95fc4
movl $0x8c, %edx
callq 0x490e8
pushq $0x1
popq %rdi
callq 0x1f3b0
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/src/blocked.c
// Function: replyToBlockedClientTimedOut
void replyToBlockedClientTimedOut(redisClient *c) {
    if (c->btype == REDIS_BLOCKED_LIST) {
        addReply(c,shared.nullmultibulk);
    } else if (c->btype == REDIS_BLOCKED_WAIT) {
        addReplyLongLong(c,replicationCountAcksByOffset(c->bpop.reploffset));
    } else {
        redisPanic("Unknown btype in replyToBlockedClientTimedOut().");
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x118(%rdi), %eax
cmpl $0x2, %eax
je 0x5bb07
cmpl $0x1, %eax
jne 0x5bb1f
leaq 0x6bd06(%rip), %rax     # 0xc7800
movq 0x58(%rax), %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x2c10d
movq 0x140(%rbx), %rdi
callq 0x3391f
movslq %eax, %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x2c794
leaq 0x3a4cc(%rip), %rdi     # 0x95ff2
leaq 0x3a497(%rip), %rsi     # 0x95fc4
movl $0xa0, %edx
callq 0x490e8
pushq $0x1
popq %rdi
callq 0x1f3b0
nop
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/src/hyperloglog.c
// Function: isHLLObjectOrReply
int isHLLObjectOrReply(redisClient *c, robj *o) {
    struct hllhdr *hdr;

    /* Key exists, check type */
    if (checkType(c,o,REDIS_STRING))
        return REDIS_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 REDIS_OK;

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorl %edx, %edx
callq 0x2eec6
pushq $-0x1
popq %r15
testl %eax, %eax
jne 0x5cac0
movq %r14, %rdi
callq 0x2f227
cmpq $0x10, %rax
jb 0x5caa9
movq 0x8(%r14), %rax
cmpb $0x48, (%rax)
jne 0x5caa9
cmpb $0x59, 0x1(%rax)
jne 0x5caa9
cmpb $0x4c, 0x2(%rax)
jne 0x5caa9
cmpb $0x4c, 0x3(%rax)
jne 0x5caa9
movb 0x4(%rax), %al
cmpb $0x1, %al
jbe 0x5cad0
leaq 0x3966a(%rip), %rdi     # 0x9611a
callq 0x271cd
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2c20f
movl %r15d, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %ebp, %ebp
testb %al, %al
jne 0x5cac3
movq %r14, %rdi
callq 0x2f227
cmpq $0x3010, %rax           # imm = 0x3010
jne 0x5caa9
jmp 0x5cac3
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/deps/hiredis/net.c
// Function: redisContextWaitReady
static int redisContextWaitReady(redisContext *c, int fd, const struct timeval *timeout) {
    struct pollfd   wfd[1];
    long msec;

    msec          = -1;
    wfd[0].fd     = fd;
    wfd[0].events = POLLOUT;

    /* Only use timeout when not NULL. */
    if (timeout != NULL) {
        if (timeout->tv_usec > 1000000 || timeout->tv_sec > __MAX_MSEC) {
            close(fd);
            return REDIS_ERR;
        }

        msec = (timeout->tv_sec * 1000) + ((timeout->tv_usec + 999) / 1000);

        if (msec < 0 || msec > INT_MAX) {
            msec = INT_MAX;
        }
    }

    if (errno == EINPROGRESS) {
        int res;

        if ((res = poll(wfd, 1, msec)) == -1) {
            __redisSetErrorFromErrno(c, REDIS_ERR_IO, "poll(2)");
            close(fd);
            return REDIS_ERR;
        } else if (res == 0) {
            errno = ETIMEDOUT;
            __redisSetErrorFromErrno(c,REDIS_ERR_IO,NULL);
            close(fd);
            return REDIS_ERR;
        }

        if (redisCheckSocketError(c, fd) != REDIS_OK)
            return REDIS_ERR;

        return REDIS_OK;
    }

    __redisSetErrorFromErrno(c,REDIS_ERR_IO,NULL);
    close(fd);
    return REDIS_ERR;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl %esi, (%rsp)
movw $0x4, 0x4(%rsp)
testq %rdx, %rdx
je 0x5e9ed
movq 0x8(%rdx), %rax
cmpq $0xf4240, %rax          # imm = 0xF4240
jg 0x5ea33
movq (%rdx), %rcx
movabsq $0x20c49ba5e353f7, %rdx # imm = 0x20C49BA5E353F7
cmpq %rdx, %rcx
jge 0x5ea33
imulq $0x3e8, %rcx, %rcx      # imm = 0x3E8
addq $0x3e7, %rax            # imm = 0x3E7
movl $0x3e8, %esi            # imm = 0x3E8
cqto
idivq %rsi
movq %rax, %r15
addq %rcx, %r15
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpq %rax, %r15
cmovaeq %rax, %r15
jmp 0x5e9f1
pushq $-0x1
popq %r15
callq 0x1f810
cmpl $0x73, (%rax)
jne 0x5ea29
movq %rax, %r12
movq %rsp, %rdi
pushq $0x1
popq %rsi
movl %r15d, %edx
callq 0x1f600
testl %eax, %eax
je 0x5ea21
cmpl $-0x1, %eax
jne 0x5ea49
leaq 0x37bdc(%rip), %rsi     # 0x965f8
movq %r14, %rdi
jmp 0x5ea2e
movl $0x6e, (%r12)
movq %r14, %rdi
xorl %esi, %esi
callq 0x5e643
movl %ebx, %edi
callq 0x1f170
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r14, %rdi
movl %ebx, %esi
callq 0x5e5d4
movl %eax, %ecx
xorl %eax, %eax
negl %ecx
sbbl %eax, %eax
jmp 0x5ea3d
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/deps/lua/src/lua_cjson.c
// Function: json_encode
static int json_encode(lua_State *l)
{
    json_config_t *cfg;
    char *json;
    int len;

    /* Can't use json_verify_arg_count() since we need to ensure
     * there is only 1 argument */
    luaL_argcheck(l, lua_gettop(l) == 1, 1, "expected 1 argument");

    cfg = json_fetch_config(l);
    cfg->current_depth = 0;

    /* Reset the persistent buffer if it exists.
     * Otherwise allocate a new buffer. */
    if (strbuf_allocated(&cfg->encode_buf))
        strbuf_reset(&cfg->encode_buf);
    else
        strbuf_init(&cfg->encode_buf, 0);

    json_append_data(l, cfg, &cfg->encode_buf);
    json = strbuf_string(&cfg->encode_buf, &len);

    lua_pushlstring(l, json, len);

    if (!cfg->encode_keep_buffer)
        strbuf_free(&cfg->encode_buf);

    return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x60737
cmpl $0x1, %eax
je 0x7040c
leaq 0x27e03(%rip), %rdx     # 0x98204
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x6a92c
movq %rbx, %rdi
callq 0x70858
movq %rax, %r15
andl $0x0, 0x528(%rax)
leaq 0x500(%rax), %r14
cmpq $0x0, 0x500(%rax)
je 0x70439
andl $0x0, 0x50c(%r15)
jmp 0x70443
movq %r14, %rdi
xorl %esi, %esi
callq 0x74e2c
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x708b2
movslq 0x50c(%r15), %rdx
movq 0x500(%r15), %rsi
movq %rbx, %rdi
callq 0x60d61
cmpl $0x0, 0x544(%r15)
jne 0x70479
movq %r14, %rdi
callq 0x74ecc
pushq $0x1
popq %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/deps/lua/src/lua_cjson.c
// Function: json_decode
static int json_decode(lua_State *l)
{
    const char *json;
    size_t len;

    json_verify_arg_count(l, 1);

    json = luaL_checklstring(l, 1, &len);

    /* Detect Unicode other than UTF-8 (see RFC 4627, Sec 3)
     *
     * CJSON can support any simple data type, hence only the first
     * character is guaranteed to be ASCII (at worst: '"'). This is
     * still enough to detect whether the wrong encoding is in use. */
    if (len >= 2 && (!json[0] || !json[1]))
        luaL_error(l, "JSON parser does not support UTF-16 or UTF-32");

    lua_json_decode(l, json, len);

    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rbp
movl %ebp, %esi
callq 0x70e1a
movq %rsp, %r15
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x6ac18
movq %rax, %r14
movq (%r15), %r15
cmpq $0x2, %r15
jb 0x704d9
cmpb $0x0, (%r14)
je 0x704c4
cmpb $0x0, 0x1(%r14)
jne 0x704d9
leaq 0x27ef2(%rip), %rsi     # 0x983bd
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6a9e3
movq (%rsp), %r15
movq %rbx, %rdi
callq 0x70858
leaq 0x8(%rsp), %r12
movq %rax, 0x18(%r12)
movq %r14, (%r12)
andl $0x0, 0x8(%r12)
movl %r15d, %edi
callq 0x74e70
movq %rax, 0x10(%r12)
leaq 0x28(%rsp), %r14
movq %r12, %rdi
movq %r14, %rsi
callq 0x70e4e
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x71223
movq %r12, %rdi
movq %r14, %rsi
callq 0x70e4e
cmpl $0xa, (%r14)
je 0x7054a
leaq 0x27ecc(%rip), %rdx     # 0x98404
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rcx
movq %rbx, %rdi
callq 0x7147e
movq 0x18(%rsp), %rdi
callq 0x74ecc
pushq $0x1
popq %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/deps/lua/src/lua_cjson.c
// Function: json_cfg_encode_sparse_array
static int json_cfg_encode_sparse_array(lua_State *l)
{
    json_config_t *cfg;
    int val;

    json_verify_arg_count(l, 3);
    cfg = json_fetch_config(l);

    switch (lua_gettop(l)) {
    case 3:
        val = luaL_checkinteger(l, 3);
        luaL_argcheck(l, val >= 0, 3, "expected integer >= 0");
        cfg->encode_sparse_safe = val;
    case 2:
        val = luaL_checkinteger(l, 2);
        luaL_argcheck(l, val >= 0, 2, "expected integer >= 0");
        cfg->encode_sparse_ratio = val;
    case 1:
        luaL_argcheck(l, lua_isboolean(l, 1), 1, "expected boolean");
        cfg->encode_sparse_convert = lua_toboolean(l, 1);
    }

    lua_pushboolean(l, cfg->encode_sparse_convert);
    lua_pushinteger(l, cfg->encode_sparse_ratio);
    lua_pushinteger(l, cfg->encode_sparse_safe);

    return 3;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x3
popq %rsi
callq 0x70e1a
movq %rbx, %rdi
callq 0x70858
movq %rax, %r14
movq %rbx, %rdi
callq 0x60737
cmpl $0x1, %eax
je 0x705f2
cmpl $0x2, %eax
je 0x705c6
cmpl $0x3, %eax
jne 0x7062a
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x6ae56
movq %rax, %r15
testl %r15d, %r15d
jns 0x705bf
leaq 0x27fca(%rip), %rdx     # 0x9857e
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x6a92c
movl %r15d, 0x534(%r14)
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x6ae56
movq %rax, %r15
testl %r15d, %r15d
jns 0x705eb
leaq 0x27f9e(%rip), %rdx     # 0x9857e
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x6a92c
movl %r15d, 0x530(%r14)
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x60984
cmpl $0x1, %eax
je 0x70614
leaq 0x27f8b(%rip), %rdx     # 0x98594
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x6a92c
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x60b89
movl %eax, %esi
movl %eax, 0x52c(%r14)
jmp 0x70631
movl 0x52c(%r14), %esi
movq %rbx, %rdi
callq 0x60f7c
movslq 0x530(%r14), %rsi
movq %rbx, %rdi
callq 0x60d47
movslq 0x534(%r14), %rsi
movq %rbx, %rdi
callq 0x60d47
pushq $0x3
popq %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/deps/lua/src/lua_cjson.c
// Function: json_cfg_encode_max_depth
static int json_cfg_encode_max_depth(lua_State *l)
{
    json_config_t *cfg;
    int depth;

    json_verify_arg_count(l, 1);
    cfg = json_fetch_config(l);

    if (lua_gettop(l)) {
        depth = luaL_checkinteger(l, 1);
        luaL_argcheck(l, depth > 0, 1, "expected positive integer");
        cfg->encode_max_depth = depth;
    }

    lua_pushinteger(l, cfg->encode_max_depth);

    return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x70e1a
movq %rbx, %rdi
callq 0x70858
movq %rax, %r14
movq %rbx, %rdi
callq 0x60737
testl %eax, %eax
je 0x706b5
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x6ae56
movq %rax, %r15
testl %r15d, %r15d
jg 0x706ac
leaq 0x27f04(%rip), %rdx     # 0x985a5
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x6a92c
movl %r15d, 0x538(%r14)
jmp 0x706bc
movl 0x538(%r14), %r15d
movslq %r15d, %rsi
movq %rbx, %rdi
callq 0x60d47
pushq $0x1
popq %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/deps/lua/src/lua_cjson.c
// Function: json_cfg_encode_number_precision
static int json_cfg_encode_number_precision(lua_State *l)
{
    json_config_t *cfg;
    int precision;

    json_verify_arg_count(l, 1);
    cfg = json_fetch_config(l);

    if (lua_gettop(l)) {
        precision = luaL_checkinteger(l, 1);
        luaL_argcheck(l, 1 <= precision && precision <= 14, 1,
                      "expected integer between 1 and 14");
        json_set_number_precision(cfg, precision);
    }

    lua_pushinteger(l, cfg->encode_number_precision);

    return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x70e1a
movq %rbx, %rdi
callq 0x70858
movq %rax, %r14
movq %rbx, %rdi
callq 0x60737
testl %eax, %eax
je 0x70729
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x6ae56
movq %rax, %r15
decl %eax
cmpl $0xe, %eax
jb 0x7071e
leaq 0x27eac(%rip), %rdx     # 0x985bf
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x6a92c
movq %r14, %rdi
movl %r15d, %esi
callq 0x71663
movslq 0x548(%r14), %rsi
movq %rbx, %rdi
callq 0x60d47
pushq $0x1
popq %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/deps/lua/src/lua_cjson.c
// Function: json_cfg_encode_keep_buffer
static int json_cfg_encode_keep_buffer(lua_State *l)
{
    json_config_t *cfg;

    json_verify_arg_count(l, 1);
    cfg = json_fetch_config(l);

    if (lua_gettop(l)) {
        luaL_checktype(l, 1, LUA_TBOOLEAN);
        cfg->encode_keep_buffer = lua_toboolean(l, 1);
    }

    lua_pushboolean(l, cfg->encode_keep_buffer);

    return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x70e1a
movq %rbx, %rdi
callq 0x70858
movq %rax, %r14
movq %rbx, %rdi
callq 0x60737
testl %eax, %eax
je 0x7078b
pushq $0x1
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
movl %ebp, %edx
callq 0x6ad58
movq %rbx, %rdi
movl %ebp, %esi
callq 0x60b89
movl %eax, %esi
movl %eax, 0x544(%r14)
jmp 0x70792
movl 0x544(%r14), %esi
movq %rbx, %rdi
callq 0x60f7c
pushq $0x1
popq %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/deps/lua/src/lua_cjson.c
// Function: json_cfg_refuse_invalid_numbers
static int json_cfg_refuse_invalid_numbers(lua_State *l)
{
    static const char *options_enc_dec[] = { "none", "encode", "decode",
                                             "both", NULL };
    json_config_t *cfg;

    json_verify_arg_count(l, 1);
    cfg = json_fetch_config(l);

    json_enum_option(l, options_enc_dec,
                     &cfg->encode_refuse_badnum,
                     &cfg->decode_refuse_badnum);

    return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x70e1a
movq %rbx, %rdi
callq 0x70858
movq %rax, %r14
movq %rbx, %rdi
callq 0x60737
testl %eax, %eax
je 0x707e8
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x60984
cmpl $0x1, %eax
jne 0x707fa
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x60b89
leal (%rax,%rax,2), %eax
jmp 0x7080e
movl 0x540(%r14), %eax
addl %eax, %eax
orl 0x53c(%r14), %eax
jmp 0x70828
leaq 0x5670f(%rip), %rcx     # 0xc6f10
pushq $0x1
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x6ab42
movl %eax, %ecx
andl $0x1, %ecx
movl %ecx, 0x53c(%r14)
movl %eax, %ecx
shrl %ecx
andl $0x1, %ecx
movl %ecx, 0x540(%r14)
testl %eax, %eax
je 0x70843
cltq
leaq 0x566db(%rip), %rcx     # 0xc6f10
movq (%rcx,%rax,8), %rsi
movq %rbx, %rdi
callq 0x60db8
jmp 0x7084d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x60f7c
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/deps/lua/src/lua_cjson.c
// Function: json_fetch_config
static json_config_t *json_fetch_config(lua_State *l)
{
    json_config_t *cfg;

    lua_pushlightuserdata(l, &json_config_key);
    lua_gettable(l, LUA_REGISTRYINDEX);
    cfg = lua_touserdata(l, -1);
    if (!cfg)
        luaL_error(l, "BUG: Unable to fetch CJSON configuration");

    lua_pop(l, 1);

    return cfg;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x6b2ea(%rip), %rsi     # 0xdbb50
callq 0x60f96
movq %rbx, %rdi
movl $0xffffd8f0, %esi       # imm = 0xFFFFD8F0
callq 0x60fce
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0x60c9d
movq %rax, %r14
testq %rax, %rax
jne 0x7089c
leaq 0x27986(%rip), %rsi     # 0x98218
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6a9e3
pushq $-0x2
popq %rsi
movq %rbx, %rdi
callq 0x60744
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/deps/lua/src/lua_cjson.c
// Function: json_append_number
static void json_append_number(lua_State *l, strbuf_t *json, int index,
                               json_config_t *cfg)
{
    double num = lua_tonumber(l, index);

    if (cfg->encode_refuse_badnum && (isinf(num) || isnan(num)))
        json_encode_exception(l, cfg, index, "must not be NaN or Inf");

    /* Lowest double printed with %.14g is 21 characters long:
     * -1.7976931348623e+308
     *
     * Use 32 to include the \0, and a few extra just in case..
     */
    strbuf_append_fmt(json, 32, cfg->number_fmt, num);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
movl %edx, %esi
callq 0x60b2b
cmpl $0x0, 0x53c(%rbx)
movq %xmm0, %rax
setne %cl
btrq $0x3f, %rax
movabsq $0x7fefffffffffffff, %rdx # imm = 0x7FEFFFFFFFFFFFFF
cmpq %rdx, %rax
setg %al
andb %cl, %al
cmpb $0x1, %al
jne 0x70cdf
leaq 0x2765c(%rip), %rcx     # 0x98324
movq %r15, %rdi
movq %rbx, %rsi
movl %ebp, %edx
movq %xmm0, (%rsp)
callq 0x70d2f
movq (%rsp), %xmm0
addq $0x520, %rbx            # imm = 0x520
pushq $0x20
popq %rsi
movq %r14, %rdi
movq %rbx, %rdx
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x7504d
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/deps/lua/src/lua_cjson.c
// Function: json_encode_exception
static void json_encode_exception(lua_State *l, json_config_t *cfg, int lindex,
                                  const char *reason)
{
    if (!cfg->encode_keep_buffer)
        strbuf_free(&cfg->encode_buf);
    luaL_error(l, "Cannot serialise %s: %s",
                  lua_typename(l, lua_type(l, lindex)), reason);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rcx, %rbx
movl %edx, %ebp
movq %rdi, %r14
cmpl $0x0, 0x544(%rsi)
jne 0x70d53
addq $0x500, %rsi            # imm = 0x500
movq %rsi, %rdi
callq 0x74ecc
movq %r14, %rdi
movl %ebp, %esi
callq 0x60984
movq %r14, %rdi
movl %eax, %esi
callq 0x609a0
leaq 0x27637(%rip), %rsi     # 0x983a5
movq %r14, %rdi
movq %rax, %rdx
movq %rbx, %rcx
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x6a9e3
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/deps/lua/src/lua_cjson.c
// Function: json_encode_descend
static void json_encode_descend(lua_State *l, json_config_t *cfg)
{
    cfg->current_depth++;

    if (cfg->current_depth > cfg->encode_max_depth) {
        if (!cfg->encode_keep_buffer)
            strbuf_free(&cfg->encode_buf);
        luaL_error(l, "Cannot serialise, excessive nesting (%d)",
                   cfg->current_depth);
    }
}

// Assembly:
movl 0x528(%rsi), %eax
leal 0x1(%rax), %edx
movl %edx, 0x528(%rsi)
cmpl 0x538(%rsi), %eax
jge 0x70db2
retq
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x0, 0x544(%rsi)
jne 0x70dd8
leaq 0x500(%r14), %rdi
callq 0x74ecc
movl 0x528(%r14), %edx
leaq 0x27575(%rip), %rsi     # 0x98354
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6a9e3
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/deps/lua/src/lua_cjson.c
// Function: json_is_invalid_number
static int json_is_invalid_number(json_parse_t *json)
{
    int i = json->index;

    /* Reject numbers starting with + */
    if (json->data[i] == '+')
        return 1;

    /* Skip minus sign if it exists */
    if (json->data[i] == '-')
        i++;

    /* Reject numbers starting with 0x, or leading zeros */
    if (json->data[i] == '0') {
        int ch2 = json->data[i + 1];

        if ((ch2 | 0x20) == 'x' ||          /* Hex */
            ('0' <= ch2 && ch2 <= '9'))     /* Leading zero */
            return 1;

        return 0;
    } else if (json->data[i] <= '9') {
        return 0;                           /* Ordinary number */
    }


    /* Reject inf/nan */
    if (!strncasecmp(&json->data[i], "inf", 3))
        return 1;
    if (!strncasecmp(&json->data[i], "nan", 3))
        return 1;

    /* Pass all other numbers which may still be invalid, but
     * strtod() will catch them. */
    return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movslq 0x8(%rdi), %rcx
movq (%rdi), %rbx
movzbl (%rbx,%rcx), %eax
movb $0x1, %bpl
cmpl $0x2b, %eax
je 0x7154b
cmpl $0x2d, %eax
jne 0x714f3
movb 0x1(%rbx,%rcx), %al
incq %rcx
addq %rcx, %rbx
cmpb $0x30, %al
jne 0x71515
movb 0x1(%rbx), %al
movl %eax, %ecx
andb $-0x21, %cl
cmpb $0x58, %cl
sete %cl
addb $-0x30, %al
cmpb $0xa, %al
setb %bpl
orb %cl, %bpl
jmp 0x7154b
cmpb $0x3a, %al
jge 0x7151d
xorl %ebp, %ebp
jmp 0x7154b
leaq 0x1b89f(%rip), %rsi     # 0x8cdc3
pushq $0x3
popq %rdx
movq %rbx, %rdi
callq 0x1f860
testl %eax, %eax
je 0x7154b
leaq 0x1bdae(%rip), %rsi     # 0x8d2e8
pushq $0x3
popq %rdx
movq %rbx, %rdi
callq 0x1f860
testl %eax, %eax
sete %bpl
movzbl %bpl, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/deps/lua/src/lua_cjson.c
// Function: json_next_number_token
static void json_next_number_token(json_parse_t *json, json_token_t *token)
{
    const char *startptr;
    char *endptr;

    token->type = T_NUMBER;
    startptr = &json->data[json->index];
    token->value.number = strtod(&json->data[json->index], &endptr);
    if (startptr == endptr)
        json_set_token_error(token, json, "invalid number");
    else
        json->index += endptr - startptr;   /* Skip the processed number */

    return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl $0x5, (%rsi)
movslq 0x8(%rdi), %r15
addq (%rdi), %r15
movq %rsp, %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x1fc40
movsd %xmm0, 0x8(%r14)
movq (%r12), %rax
cmpq %rax, %r15
je 0x71596
subl %r15d, %eax
addl %eax, 0x8(%rbx)
jmp 0x715af
movl $0xc, (%r14)
movl 0x8(%rbx), %eax
movl %eax, 0x4(%r14)
leaq 0x26e6f(%rip), %rax     # 0x9841a
movq %rax, 0x8(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/deps/lua/src/lua_struct.c
// Function: getnum
static int getnum (const char **fmt, int df) {
  if (!isdigit(**fmt))  /* no number? */
    return df;  /* return default value */
  else {
    int a = 0;
    do {
      a = a*10 + *((*fmt)++) - '0';
    } while (isdigit(**fmt));
    return a;
  }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
callq 0x1f550
movq (%rax), %rdx
movq (%rbx), %rcx
movsbq (%rcx), %rsi
testb $0x8, 0x1(%rdx,%rsi,2)
je 0x72034
incq %rcx
xorl %ebp, %ebp
imull $0xa, %ebp, %edx
movq %rcx, (%rbx)
movsbl -0x1(%rcx), %esi
leal (%rdx,%rsi), %ebp
addl $-0x30, %ebp
movq (%rax), %rdx
movsbq (%rcx), %rsi
incq %rcx
testb $0x8, 0x1(%rdx,%rsi,2)
jne 0x72013
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/deps/lua/src/lua_cmsgpack.c
// Function: mp_buf_append
void mp_buf_append(mp_buf *buf, const unsigned char *s, size_t len) {
    if (buf->free < len) {
        size_t newlen = buf->len+len;

        buf->b = realloc(buf->b,newlen*2);
        buf->free = newlen;
    }
    memcpy(buf->b+buf->len,s,len);
    buf->len += len;
    buf->free -= len;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq (%rdi), %rdi
cmpq %rdx, 0x10(%r14)
jae 0x72074
movq 0x8(%r14), %r12
addq %rbx, %r12
leaq (%r12,%r12), %rsi
callq 0x1fab0
movq %rax, %rdi
movq %rax, (%r14)
movq %r12, 0x10(%r14)
addq 0x8(%r14), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1fbd0
addq %rbx, 0x8(%r14)
subq %rbx, 0x10(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/deps/lua/src/lua_cmsgpack.c
// Function: memrevifle
static void memrevifle(void *ptr, size_t len) {
    unsigned char *p = ptr, *e = p+len-1, aux;
    int test = 1;
    unsigned char *testp = (unsigned char*) &test;

    if (testp[0] == 0) return; /* Big endian, nothign to do. */
    len /= 2;
    while(len--) {
        aux = *p;
        *p = *e;
        *e = aux;
        p++;
        e--;
    }
}

// Assembly:
leaq (%rsi,%rdi), %rax
decq %rax
shrq %rsi
xorl %ecx, %ecx
cmpq %rcx, %rsi
je 0x7256d
movb (%rdi,%rcx), %dl
movb (%rax), %r8b
movb %r8b, (%rdi,%rcx)
movb %dl, (%rax)
decq %rax
incq %rcx
jmp 0x72554
retq
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/deps/lua/src/lua_cmsgpack.c
// Function: luaopen_cmsgpack
LUALIB_API int luaopen_cmsgpack (lua_State *L) {
    luaL_register(L, "cmsgpack", thislib);

    lua_pushliteral(L, LUACMSGPACK_VERSION);
    lua_setfield(L, -2, "_VERSION");
    lua_pushliteral(L, LUACMSGPACK_COPYRIGHT);
    lua_setfield(L, -2, "_COPYRIGHT");
    lua_pushliteral(L, LUACMSGPACK_DESCRIPTION);
    lua_setfield(L, -2, "_DESCRIPTION"); 
    return 1;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x21373(%rip), %rsi     # 0x938ee
leaq 0x4f11e(%rip), %rdx     # 0xc16a0
callq 0x6af83
leaq 0x262ba(%rip), %rsi     # 0x98848
pushq $0x12
popq %rdx
movq %rbx, %rdi
callq 0x60d61
leaq 0x252a7(%rip), %rdx     # 0x97847
pushq $-0x2
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x611c6
leaq 0x262a7(%rip), %rsi     # 0x9885b
pushq $0x28
popq %rdx
movq %rbx, %rdi
callq 0x60d61
leaq 0x262be(%rip), %rdx     # 0x98884
movq %rbx, %rdi
movl %ebp, %esi
callq 0x611c6
leaq 0x262b8(%rip), %rsi     # 0x9888f
pushq $0x24
popq %rdx
movq %rbx, %rdi
callq 0x60d61
leaq 0x262cb(%rip), %rdx     # 0x988b4
movq %rbx, %rdi
movl %ebp, %esi
callq 0x611c6
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/deps/lua/src/lua_cmsgpack.c
// Function: mp_pack
static int mp_pack(lua_State *L) {
    mp_buf *buf = mp_buf_new();

    mp_encode_lua_type(L,buf,0);
    lua_pushlstring(L,(char*)buf->b,buf->len);
    mp_buf_free(buf);
    return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rdi
pushq $0x18
popq %rsi
callq 0x1f950
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x72707
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x60d61
movq %r14, %rdi
callq 0x72097
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/deps/lua/src/lua_cmsgpack.c
// Function: mp_unpack
static int mp_unpack(lua_State *L) {
    size_t len;
    const unsigned char *s;
    mp_cur *c;

    if (!lua_isstring(L,-1)) {
        lua_pushstring(L,"MessagePack decoding needs a string as input.");
        lua_error(L);
    }

    s = (const unsigned char*) lua_tolstring(L,-1,&len);
    c = mp_cur_new(s,len);
    mp_decode_to_lua_type(L,c);
    
    if (c->err == MP_CUR_ERROR_EOF) {
        mp_cur_free(c);
        lua_pushstring(L,"Missing bytes in input.");
        lua_error(L);
    } else if (c->err == MP_CUR_ERROR_BADFMT) {
        mp_cur_free(c);
        lua_pushstring(L,"Bad data format in input.");
        lua_error(L);
    } else if (c->left != 0) {
        mp_cur_free(c);
        lua_pushstring(L,"Extra bytes in input.");
        lua_error(L);
    }
    mp_cur_free(c);
    return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $-0x1
popq %rsi
callq 0x60a0c
testl %eax, %eax
jne 0x7266f
leaq 0x26262(%rip), %rsi     # 0x988c1
movq %rbx, %rdi
callq 0x60db8
movq %rbx, %rdi
callq 0x616b3
pushq $-0x1
popq %rsi
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rdx
callq 0x60bad
movq %rax, %r15
movq (%r14), %r12
pushq $0x18
popq %rdi
callq 0x1f350
movq %rax, %r14
movq %r15, (%rax)
movq %r12, 0x8(%rax)
andl $0x0, 0x10(%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x72108
movl 0x10(%r14), %eax
cmpl $0x1, %eax
je 0x726be
cmpl $0x2, %eax
jne 0x726c7
leaq 0x2624b(%rip), %r15     # 0x98907
jmp 0x726d5
leaq 0x2622a(%rip), %r15     # 0x988ef
jmp 0x726d5
cmpq $0x0, 0x8(%r14)
je 0x726f0
leaq 0x2624c(%rip), %r15     # 0x98921
movq %r14, %rdi
callq 0x1f4d0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x60db8
movq %rbx, %rdi
callq 0x616b3
movq %r14, %rdi
callq 0x1f4d0
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/deps/jemalloc/src/jemalloc.c
// Function: arenas_extend
arena_t *
arenas_extend(unsigned ind)
{
	arena_t *ret;

	ret = (arena_t *)base_alloc(sizeof(arena_t));
	if (ret != NULL && arena_new(ret, ind) == false) {
		arenas[ind] = ret;
		return (ret);
	}
	/* Only reached if there is an OOM error. */

	/*
	 * OOM here is quite inconvenient to propagate, since dealing with it
	 * would require a check for failure in the fast path.  Instead, punt
	 * by using arenas[0].  In practice, this is an extremely unlikely
	 * failure.
	 */
	malloc_write("<jemalloc>: Error initializing arena\n");
	if (opt_abort)
		abort();

	return (arenas[0]);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edi, %ebp
movl $0x11c0, %edi           # imm = 0x11C0
callq 0x7c708
testq %rax, %rax
je 0x75231
movq %rax, %rbx
movq %rax, %rdi
movl %ebp, %esi
callq 0x7a0a4
testb %al, %al
je 0x75252
leaq 0x23d04(%rip), %rdi     # 0x98f3c
callq 0x879d0
cmpb $0x1, 0x66916(%rip)     # 0xdbb5a
je 0x75269
movq 0x6692b(%rip), %rax     # 0xdbb78
movq (%rax), %rbx
jmp 0x7525f
movq 0x6691f(%rip), %rax     # 0xdbb78
movl %ebp, %ecx
movq %rbx, (%rax,%rcx,8)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x1f1b0