LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/src/t_zset.c
// Function: zslParseRange
static int zslParseRange(robj *min, robj *max, zrangespec *spec) {
    char *eptr;

    // 默认为闭区间
    spec->minex = spec->maxex = 0;

    /* Parse the min-max interval. If one of the values is prefixed
     * by the "(" character, it's considered "open". For instance
     * ZRANGEBYSCORE zset (1.5 (2.5 will match min < x < max
     * ZRANGEBYSCORE zset 1.5 2.5 will instead match min <= x <= max */
    if (min->encoding == REDIS_ENCODING_INT) {
        // min 的值为整数，开区间
        spec->min = (long)min->ptr;
    } else {
        // min 对象为字符串，分析 min 的值并决定区间
        if (((char*)min->ptr)[0] == '(') {
            // T = O(N)
            spec->min = strtod((char*)min->ptr+1,&eptr);
            if (eptr[0] != '\0' || isnan(spec->min)) return REDIS_ERR;
            spec->minex = 1;
        } else {
            // T = O(N)
            spec->min = strtod((char*)min->ptr,&eptr);
            if (eptr[0] != '\0' || isnan(spec->min)) return REDIS_ERR;
        }
    }

    if (max->encoding == REDIS_ENCODING_INT) {
        // max 的值为整数，开区间
        spec->max = (long)max->ptr;
    } else {
        // max 对象为字符串，分析 max 的值并决定区间
        if (((char*)max->ptr)[0] == '(') {
            // T = O(N)
            spec->max = strtod((char*)max->ptr+1,&eptr);
            if (eptr[0] != '\0' || isnan(spec->max)) return REDIS_ERR;
            spec->maxex = 1;
        } else {
            // T = O(N)
            spec->max = strtod((char*)max->ptr,&eptr);
            if (eptr[0] != '\0' || isnan(spec->max)) return REDIS_ERR;
        }
    }

    return REDIS_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
andq $0x0, 0x10(%rdx)
movl $0xf0, %eax
andl (%rdi), %eax
movq %rsi, %r15
movq 0x8(%rdi), %rdi
pushq $-0x1
popq %rbx
cmpl $0x10, %eax
jne 0x3ca2b
cvtsi2sd %rdi, %xmm0
movsd %xmm0, (%r14)
movl $0xf0, %eax
andl (%r15), %eax
movq 0x8(%r15), %rdi
cmpl $0x10, %eax
jne 0x3ca5c
cvtsi2sd %rdi, %xmm0
movsd %xmm0, 0x8(%r14)
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
cmpb $0x28, (%rdi)
jne 0x3ca8d
incq %rdi
movq %rsp, %r12
movq %r12, %rsi
callq 0x1fc40
movsd %xmm0, (%r14)
movq (%r12), %rax
cmpb $0x0, (%rax)
jne 0x3ca1d
ucomisd %xmm0, %xmm0
jp 0x3ca1d
movl $0x1, 0x10(%r14)
jmp 0x3c9ff
cmpb $0x28, (%rdi)
jne 0x3cab9
incq %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0x1fc40
movsd %xmm0, 0x8(%r14)
movq (%r15), %rax
cmpb $0x0, (%rax)
jne 0x3ca1d
ucomisd %xmm0, %xmm0
jp 0x3ca1d
movl $0x1, 0x14(%r14)
jmp 0x3ca1b
movq %rsp, %r12
movq %r12, %rsi
callq 0x1fc40
movsd %xmm0, (%r14)
movq (%r12), %rax
cmpb $0x0, (%rax)
jne 0x3ca1d
ucomisd %xmm0, %xmm0
jnp 0x3c9ff
jmp 0x3ca1d
movq %rsp, %r15
movq %r15, %rsi
callq 0x1fc40
movsd %xmm0, 0x8(%r14)
movq (%r15), %rax
cmpb $0x0, (%rax)
jne 0x3ca1d
ucomisd %xmm0, %xmm0
jnp 0x3ca1b
jmp 0x3ca1d
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/src/t_zset.c
// Function: zslParseLexRange
static int zslParseLexRange(robj *min, robj *max, zlexrangespec *spec) {
    /* The range can't be valid if objects are integer encoded.
     * Every item must start with ( or [. */
    if (min->encoding == REDIS_ENCODING_INT ||
        max->encoding == REDIS_ENCODING_INT) return REDIS_ERR;

    spec->min = spec->max = NULL;
    if (zslParseLexRangeItem(min, &spec->min, &spec->minex) == REDIS_ERR ||
        zslParseLexRangeItem(max, &spec->max, &spec->maxex) == REDIS_ERR) {
        if (spec->min) decrRefCount(spec->min);
        if (spec->max) decrRefCount(spec->max);
        return REDIS_ERR;
    } else {
        return REDIS_OK;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl $0xf0, %eax
movl (%rdi), %ecx
andl %eax, %ecx
pushq $-0x1
popq %rbp
cmpl $0x10, %ecx
je 0x3cb57
movq %rsi, %r15
andl (%rsi), %eax
cmpl $0x10, %eax
je 0x3cb57
movq %rdx, %rbx
leaq 0x8(%rdx), %r14
addq $0x10, %rdx
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq %rbx, %rsi
callq 0x3ae16
cmpl $-0x1, %eax
je 0x3cb3d
leaq 0x14(%rbx), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x3ae16
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
jne 0x3cb59
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3cb4a
callq 0x2ee1f
movq (%r14), %rdi
testq %rdi, %rdi
je 0x3cb57
callq 0x2ee1f
movl %ebp, %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/t_zset.c
// Function: zuiInitIterator
void zuiInitIterator(zsetopsrc *op) {

    // 迭代对象为空，无动作
    if (op->subject == NULL)
        return;

    // 迭代集合
    if (op->type == REDIS_SET) {

        iterset *it = &op->iter.set;

        // 迭代 intset
        if (op->encoding == REDIS_ENCODING_INTSET) {
            it->is.is = op->subject->ptr;
            it->is.ii = 0;

        // 迭代字典
        } else if (op->encoding == REDIS_ENCODING_HT) {
            it->ht.dict = op->subject->ptr;
            it->ht.di = dictGetIterator(op->subject->ptr);
            it->ht.de = dictNext(it->ht.di);

        } else {
            redisPanic("Unknown set encoding");
        }

    // 迭代有序集合
    } else if (op->type == REDIS_ZSET) {

        iterzset *it = &op->iter.zset;

        // 迭代 ziplist
        if (op->encoding == REDIS_ENCODING_ZIPLIST) {
            it->zl.zl = op->subject->ptr;
            it->zl.eptr = ziplistIndex(it->zl.zl,0);
            if (it->zl.eptr != NULL) {
                it->zl.sptr = ziplistNext(it->zl.zl,it->zl.eptr);
                redisAssert(it->zl.sptr != NULL);
            }

        // 迭代跳跃表
        } else if (op->encoding == REDIS_ENCODING_SKIPLIST) {
            it->sl.zs = op->subject->ptr;
            it->sl.node = it->sl.zs->zsl->header->level[0].forward;

        } else {
            redisPanic("Unknown sorted set encoding");
        }

    // 未知对象类型
    } else {
        redisPanic("Unsupported type");
    }
}

// Assembly:
pushq %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x3cc50
movq %rdi, %rbx
movl 0x8(%rdi), %ecx
cmpl $0x3, %ecx
je 0x3cbc2
cmpl $0x2, %ecx
jne 0x3cc52
movl 0xc(%rbx), %ecx
cmpl $0x2, %ecx
je 0x3cc33
cmpl $0x6, %ecx
jne 0x3cc7c
movq 0x8(%rax), %rax
movq %rax, 0x18(%rbx)
andl $0x0, 0x20(%rbx)
jmp 0x3cc50
movl 0xc(%rbx), %ecx
cmpl $0x7, %ecx
je 0x3cc1a
cmpl $0x5, %ecx
jne 0x3cc67
movq 0x8(%rax), %rdi
movq %rdi, 0x18(%rbx)
xorl %esi, %esi
callq 0x2abfb
movq %rax, 0x20(%rbx)
testq %rax, %rax
je 0x3cc50
movq 0x18(%rbx), %rdi
movq %rax, %rsi
callq 0x2ae0d
movq %rax, 0x28(%rbx)
testq %rax, %rax
jne 0x3cc50
leaq 0x527e9(%rip), %rdi     # 0x8f3f0
leaq 0x525b5(%rip), %rsi     # 0x8f1c3
movl $0x8e1, %edx            # imm = 0x8E1
callq 0x4906b
jmp 0x3cc94
movq 0x8(%rax), %rax
movq %rax, 0x18(%rbx)
movq 0x8(%rax), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq %rax, 0x20(%rbx)
jmp 0x3cc50
movq 0x8(%rax), %rdi
movq %rdi, 0x18(%rbx)
callq 0x21ef6
movq %rax, 0x20(%rbx)
movq %rax, %rdi
callq 0x21f2f
movq %rax, 0x28(%rbx)
popq %rbx
retq
leaq 0x527ab(%rip), %rdi     # 0x8f404
leaq 0x52563(%rip), %rsi     # 0x8f1c3
movl $0x8ef, %edx            # imm = 0x8EF
jmp 0x3cc8f
leaq 0x50739(%rip), %rdi     # 0x8d3a7
leaq 0x5254e(%rip), %rsi     # 0x8f1c3
movl $0x8ea, %edx            # imm = 0x8EA
jmp 0x3cc8f
leaq 0x51e39(%rip), %rdi     # 0x8eabc
leaq 0x52539(%rip), %rsi     # 0x8f1c3
movl $0x8d3, %edx            # imm = 0x8D3
callq 0x490e8
pushq $0x1
popq %rdi
callq 0x1f3b0
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/src/t_zset.c
// Function: zuiClearIterator
void zuiClearIterator(zsetopsrc *op) {

    if (op->subject == NULL)
        return;

    if (op->type == REDIS_SET) {

        iterset *it = &op->iter.set;

        if (op->encoding == REDIS_ENCODING_INTSET) {
            REDIS_NOTUSED(it); /* skip */

        } else if (op->encoding == REDIS_ENCODING_HT) {
            dictReleaseIterator(it->ht.di);

        } else {
            redisPanic("Unknown set encoding");
        }

    } else if (op->type == REDIS_ZSET) {

        iterzset *it = &op->iter.zset;

        if (op->encoding == REDIS_ENCODING_ZIPLIST) {
            REDIS_NOTUSED(it); /* skip */

        } else if (op->encoding == REDIS_ENCODING_SKIPLIST) {
            REDIS_NOTUSED(it); /* skip */

        } else {
            redisPanic("Unknown sorted set encoding");
        }
    } else {
        redisPanic("Unsupported type");
    }
}

// Assembly:
pushq %rax
cmpq $0x0, (%rdi)
je 0x3ccd2
movl 0x8(%rdi), %eax
cmpl $0x3, %eax
je 0x3ccc7
cmpl $0x2, %eax
jne 0x3ccd4
movl 0xc(%rdi), %eax
cmpl $0x6, %eax
je 0x3ccd2
cmpl $0x2, %eax
jne 0x3cce9
movq 0x20(%rdi), %rdi
popq %rax
jmp 0x21fe6
movl 0xc(%rdi), %eax
orl $0x2, %eax
cmpl $0x7, %eax
jne 0x3ccfe
popq %rax
retq
leaq 0x52729(%rip), %rdi     # 0x8f404
leaq 0x524e1(%rip), %rsi     # 0x8f1c3
movl $0x917, %edx            # imm = 0x917
jmp 0x3cd11
leaq 0x51dcc(%rip), %rdi     # 0x8eabc
leaq 0x524cc(%rip), %rsi     # 0x8f1c3
movl $0x906, %edx            # imm = 0x906
jmp 0x3cd11
leaq 0x506a2(%rip), %rdi     # 0x8d3a7
leaq 0x524b7(%rip), %rsi     # 0x8f1c3
movl $0x914, %edx            # imm = 0x914
callq 0x490e8
pushq $0x1
popq %rdi
callq 0x1f3b0
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/src/t_zset.c
// Function: zuiLength
int zuiLength(zsetopsrc *op) {

    if (op->subject == NULL)
        return 0;

    if (op->type == REDIS_SET) {
        if (op->encoding == REDIS_ENCODING_INTSET) {
            return intsetLen(op->subject->ptr);
        } else if (op->encoding == REDIS_ENCODING_HT) {
            dict *ht = op->subject->ptr;
            return dictSize(ht);
        } else {
            redisPanic("Unknown set encoding");
        }

    } else if (op->type == REDIS_ZSET) {

        if (op->encoding == REDIS_ENCODING_ZIPLIST) {
            return zzlLength(op->subject->ptr);
        } else if (op->encoding == REDIS_ENCODING_SKIPLIST) {
            zset *zs = op->subject->ptr;
            return zs->zsl->length;
        } else {
            redisPanic("Unknown sorted set encoding");
        }

    } else {
        redisPanic("Unsupported type");
    }
}

// Assembly:
pushq %rax
movq (%rdi), %rax
testq %rax, %rax
je 0x3cd4b
movl 0x8(%rdi), %ecx
cmpl $0x3, %ecx
je 0x3cd4f
cmpl $0x2, %ecx
jne 0x3cd7f
movl 0xc(%rdi), %ecx
cmpl $0x2, %ecx
je 0x3cd73
cmpl $0x6, %ecx
jne 0x3cda9
movq 0x8(%rax), %rdi
popq %rax
jmp 0x4b620
xorl %eax, %eax
jmp 0x3cd7d
movl 0xc(%rdi), %ecx
cmpl $0x7, %ecx
je 0x3cd66
cmpl $0x5, %ecx
jne 0x3cd94
movq 0x8(%rax), %rdi
popq %rax
jmp 0x3b252
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movl 0x10(%rax), %eax
jmp 0x3cd7d
movq 0x8(%rax), %rcx
movl 0x48(%rcx), %eax
addl 0x28(%rcx), %eax
popq %rcx
retq
leaq 0x5267e(%rip), %rdi     # 0x8f404
leaq 0x52436(%rip), %rsi     # 0x8f1c3
movl $0x939, %edx            # imm = 0x939
jmp 0x3cdbc
leaq 0x5060c(%rip), %rdi     # 0x8d3a7
leaq 0x52421(%rip), %rsi     # 0x8f1c3
movl $0x935, %edx            # imm = 0x935
jmp 0x3cdbc
leaq 0x51d0c(%rip), %rdi     # 0x8eabc
leaq 0x5240c(%rip), %rsi     # 0x8f1c3
movl $0x92a, %edx            # imm = 0x92A
callq 0x490e8
pushq $0x1
popq %rdi
callq 0x1f3b0
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/src/t_zset.c
// Function: zuiLongLongFromValue
int zuiLongLongFromValue(zsetopval *val) {

    if (!(val->flags & OPVAL_DIRTY_LL)) {

        // 打开标识 DIRTY LL
        val->flags |= OPVAL_DIRTY_LL;

        // 从对象中取值
        if (val->ele != NULL) {
            // 从 INT 编码的字符串中取出整数
            if (val->ele->encoding == REDIS_ENCODING_INT) {
                val->ell = (long)val->ele->ptr;
                val->flags |= OPVAL_VALID_LL;
            // 从未编码的字符串中转换整数
            } else if (sdsEncodedObject(val->ele)) {
                if (string2ll(val->ele->ptr,sdslen(val->ele->ptr),&val->ell))
                    val->flags |= OPVAL_VALID_LL;

            } else {
                redisPanic("Unsupported element encoding");
            }

        // 从 ziplist 节点中取值
        } else if (val->estr != NULL) {
            // 将节点值（一个字符串）转换为整数
            if (string2ll((char*)val->estr,val->elen,&val->ell))
                val->flags |= OPVAL_VALID_LL;

        } else {
            /* The long long was already set, flag as valid. */
            // 总是打开 VALID LL 标识
            val->flags |= OPVAL_VALID_LL;
        }
    }

    // 检查 VALID LL 标识是否已打开
    return val->flags & OPVAL_VALID_LL;
}

// Assembly:
pushq %rbx
movl (%rdi), %eax
testb $0x2, %al
jne 0x3d00f
movq %rdi, %rbx
movl %eax, %ecx
orl $0x2, %ecx
movl %ecx, (%rdi)
movq 0x28(%rdi), %rcx
testq %rcx, %rcx
je 0x3cfe8
movl (%rcx), %edx
shrl $0x4, %edx
andl $0xf, %edx
je 0x3cfde
cmpl $0x8, %edx
je 0x3cfde
cmpl $0x1, %edx
jne 0x3d014
movq 0x8(%rcx), %rcx
movq %rcx, 0x40(%rbx)
jmp 0x3d00a
movq 0x8(%rcx), %rdi
movslq -0x8(%rdi), %rsi
jmp 0x3cff4
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x3d00a
movl 0x38(%rbx), %esi
leaq 0x40(%rbx), %rdx
callq 0x2e5a4
movl %eax, %ecx
movl (%rbx), %eax
testl %ecx, %ecx
je 0x3d00f
orl $0x4, %eax
jmp 0x3d00d
orl $0x6, %eax
movl %eax, (%rbx)
andl $0x4, %eax
popq %rbx
retq
leaq 0x52434(%rip), %rdi     # 0x8f44f
leaq 0x521a1(%rip), %rsi     # 0x8f1c3
movl $0x9b9, %edx            # imm = 0x9B9
callq 0x490e8
pushq $0x1
popq %rdi
callq 0x1f3b0
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/src/t_zset.c
// Function: zuiObjectFromValue
robj *zuiObjectFromValue(zsetopval *val) {

    if (val->ele == NULL) {

        // 从 long long 值中创建对象
        if (val->estr != NULL) {
            val->ele = createStringObject((char*)val->estr,val->elen);
        } else {
            val->ele = createStringObjectFromLongLong(val->ell);
        }

        // 打开 ROBJ 标识
        val->flags |= OPVAL_DIRTY_ROBJ;
    }

    // 返回值对象
    return val->ele;
}

// Assembly:
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x3d03e
retq
pushq %rbx
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
testq %rdi, %rdi
je 0x3d055
movl 0x38(%rbx), %esi
callq 0x2ea81
jmp 0x3d05e
movq 0x40(%rbx), %rdi
callq 0x2ea90
movq %rax, 0x28(%rbx)
orb $0x1, (%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/src/t_zset.c
// Function: zuiBufferFromValue
int zuiBufferFromValue(zsetopval *val) {

    if (val->estr == NULL) {
        if (val->ele != NULL) {
            if (val->ele->encoding == REDIS_ENCODING_INT) {
                val->elen = ll2string((char*)val->_buf,sizeof(val->_buf),(long)val->ele->ptr);
                val->estr = val->_buf;
            } else if (sdsEncodedObject(val->ele)) {
                val->elen = sdslen(val->ele->ptr);
                val->estr = val->ele->ptr;
            } else {
                redisPanic("Unsupported element encoding");
            }
        } else {
            val->elen = ll2string((char*)val->_buf,sizeof(val->_buf),val->ell);
            val->estr = val->_buf;
        }
    }

    return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpq $0x0, 0x30(%rdi)
jne 0x3d0c0
movq %rdi, %rbx
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x3d0a6
movl (%rax), %ecx
shrl $0x4, %ecx
andl $0xf, %ecx
je 0x3d09c
cmpl $0x8, %ecx
je 0x3d09c
cmpl $0x1, %ecx
jne 0x3d0cb
leaq 0x4(%rbx), %r14
movq 0x8(%rax), %rdx
jmp 0x3d0ae
movq 0x8(%rax), %r14
movl -0x8(%r14), %eax
jmp 0x3d0b9
leaq 0x4(%rbx), %r14
movq 0x40(%rbx), %rdx
pushq $0x20
popq %rsi
movq %r14, %rdi
callq 0x2e511
movl %eax, 0x38(%rbx)
movq %r14, 0x30(%rbx)
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x5237d(%rip), %rdi     # 0x8f44f
leaq 0x520ea(%rip), %rsi     # 0x8f1c3
movl $0x9f1, %edx            # imm = 0x9F1
callq 0x490e8
pushq $0x1
popq %rdi
callq 0x1f3b0
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/src/t_zset.c
// Function: zcardCommand
void zcardCommand(redisClient *c) {
    robj *key = c->argv[1];
    robj *zobj;

    // 取出有序集合
    if ((zobj = lookupKeyReadOrReply(c,key,shared.czero)) == NULL ||
        checkType(c,zobj,REDIS_ZSET)) return;

    // 返回集合基数
    addReplyLongLong(c,zsetLength(zobj));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x38(%rdi), %rax
movq 0x8(%rax), %rsi
leaq 0x88c8b(%rip), %rax     # 0xc7800
movq 0x20(%rax), %rdx
callq 0x2f9a9
testq %rax, %rax
je 0x3eb98
movq %rax, %r14
pushq $0x3
popq %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2eec6
testl %eax, %eax
je 0x3eba0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %r14, %rdi
callq 0x3bc1e
movl %eax, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2c794
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/src/t_zset.c
// Function: zscoreCommand
void zscoreCommand(redisClient *c) {
    robj *key = c->argv[1];
    robj *zobj;
    double score;

    if ((zobj = lookupKeyReadOrReply(c,key,shared.nullbulk)) == NULL ||
        checkType(c,zobj,REDIS_ZSET)) return;

    // ziplist
    if (zobj->encoding == REDIS_ENCODING_ZIPLIST) {
        // 取出元素
        if (zzlFind(zobj->ptr,c->argv[2],&score) != NULL)
            // 回复分值
            addReplyDouble(c,score);
        else
            addReply(c,shared.nullbulk);

    // SKIPLIST
    } else if (zobj->encoding == REDIS_ENCODING_SKIPLIST) {
        zset *zs = zobj->ptr;
        dictEntry *de;

        c->argv[2] = tryObjectEncoding(c->argv[2]);
        // 直接从字典中取出并返回分值
        de = dictFind(zs->dict,c->argv[2]);
        if (de != NULL) {
            score = *(double*)dictGetVal(de);
            addReplyDouble(c,score);
        } else {
            addReply(c,shared.nullbulk);
        }

    } else {
        redisPanic("Unknown sorted set encoding");
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x38(%rdi), %rax
movq 0x8(%rax), %rsi
leaq 0x88c2c(%rip), %r15     # 0xc7800
movq 0x50(%r15), %rdx
callq 0x2f9a9
testq %rax, %rax
je 0x3ebf7
movq %rax, %r14
pushq $0x3
popq %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2eec6
testl %eax, %eax
je 0x3ec01
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movl (%r14), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x7, %eax
je 0x3ec43
cmpl $0x5, %eax
jne 0x3ecb0
movq 0x8(%r14), %rdi
movq 0x38(%rbx), %rax
movq 0x10(%rax), %rsi
leaq 0x8(%rsp), %rdx
callq 0x3b828
testq %rax, %rax
je 0x3ec9f
movsd 0x8(%rsp), %xmm0
movq %rbx, %rdi
callq 0x2c607
jmp 0x3ebf7
movq 0x8(%r14), %r14
movq 0x38(%rbx), %rax
movq 0x10(%rax), %rdi
callq 0x2ef4c
movq 0x38(%rbx), %rcx
movq %rax, 0x10(%rcx)
movq (%r14), %rdi
movq 0x38(%rbx), %rax
movq 0x10(%rax), %rsi
callq 0x21b64
testq %rax, %rax
je 0x3ec8a
movq 0x8(%rax), %rax
movsd (%rax), %xmm0
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x2c607
movq 0x50(%r15), %rsi
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x2c10d
movq 0x50(%r15), %rsi
movq %rbx, %rdi
callq 0x2c10d
jmp 0x3ebf7
leaq 0x4e6f0(%rip), %rdi     # 0x8d3a7
leaq 0x50505(%rip), %rsi     # 0x8f1c3
movl $0xe7e, %edx            # imm = 0xE7E
callq 0x490e8
pushq $0x1
popq %rdi
callq 0x1f3b0
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/src/t_zset.c
// Function: zscanCommand
void zscanCommand(redisClient *c) {
    robj *o;
    unsigned long cursor;

    if (parseScanCursorOrReply(c,c->argv[2],&cursor) == REDIS_ERR) return;
    if ((o = lookupKeyReadOrReply(c,c->argv[1],shared.emptyscan)) == NULL ||
        checkType(c,o,REDIS_ZSET)) return;
    scanGenericCommand(c,o,cursor);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x38(%rdi), %rax
movq 0x10(%rax), %rsi
movq %rsp, %rdx
callq 0x302a1
cmpl $-0x1, %eax
je 0x3efb5
movq 0x38(%rbx), %rax
movq 0x8(%rax), %rsi
leaq 0x88883(%rip), %rax     # 0xc7800
movq 0x148(%rax), %rdx
movq %rbx, %rdi
callq 0x2f9a9
testq %rax, %rax
je 0x3efb5
movq %rax, %r14
pushq $0x3
popq %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2eec6
testl %eax, %eax
jne 0x3efb5
movq (%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x30317
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/src/t_hash.c
// Function: hashTypeTryConversion
void hashTypeTryConversion(robj *o, robj **argv, int start, int end) {
    int i;

    // 如果对象不是 ziplist 编码，那么直接返回
    if (o->encoding != REDIS_ENCODING_ZIPLIST) return;

    // 检查所有输入对象，看它们的字符串值是否超过了指定长度
    for (i = start; i <= end; i++) {
        if (sdsEncodedObject(argv[i]) &&
            sdslen(argv[i]->ptr) > server.hash_max_ziplist_value)
        {
            // 将对象的编码转换成 REDIS_ENCODING_HT
            hashTypeConvert(o, REDIS_ENCODING_HT);
            break;
        }
    }
}

// Assembly:
movl $0xf0, %eax
andl (%rdi), %eax
cmpl $0x50, %eax
jne 0x3f008
leaq 0x87fd5(%rip), %rax     # 0xc6fa8
movq 0x760(%rax), %rax
movslq %edx, %rdx
movslq %ecx, %rcx
cmpq %rcx, %rdx
jg 0x3f008
movq (%rsi,%rdx,8), %r8
movl (%r8), %r9d
shrl $0x4, %r9d
testb $0x7, %r9b
jne 0x3f003
movq 0x8(%r8), %r8
movslq -0x8(%r8), %r8
cmpq %r8, %rax
jb 0x3f009
incq %rdx
jmp 0x3efe0
retq
pushq $0x2
popq %rsi
jmp 0x3f011
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/src/t_hash.c
// Function: hashTypeConvert
void hashTypeConvert(robj *o, int enc) {

    if (o->encoding == REDIS_ENCODING_ZIPLIST) {
        hashTypeConvertZiplist(o, enc);

    } else if (o->encoding == REDIS_ENCODING_HT) {
        redisPanic("Not implemented");

    } else {
        redisPanic("Unknown hash encoding");
    }
}

// Assembly:
pushq %rax
movl (%rdi), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x5, %eax
jne 0x3f025
popq %rax
jmp 0x3f8f2
cmpl $0x2, %eax
jne 0x3f03f
leaq 0x50614(%rip), %rdi     # 0x8f645
leaq 0x5054e(%rip), %rsi     # 0x8f586
movl $0x2b6, %edx            # imm = 0x2B6
jmp 0x3f052
leaq 0x4fa8d(%rip), %rdi     # 0x8ead3
leaq 0x50539(%rip), %rsi     # 0x8f586
movl $0x2b9, %edx            # imm = 0x2B9
callq 0x490e8
pushq $0x1
popq %rdi
callq 0x1f3b0
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/src/t_hash.c
// Function: hashTypeGetFromZiplist
int hashTypeGetFromZiplist(robj *o, robj *field,
                           unsigned char **vstr,
                           unsigned int *vlen,
                           long long *vll)
{
    unsigned char *zl, *fptr = NULL, *vptr = NULL;
    int ret;

    // 确保编码正确
    redisAssert(o->encoding == REDIS_ENCODING_ZIPLIST);

    // 取出未编码的域
    field = getDecodedObject(field);

    // 遍历 ziplist ，查找域的位置
    zl = o->ptr;
    fptr = ziplistIndex(zl, ZIPLIST_HEAD);
    if (fptr != NULL) {
        // 定位包含域的节点
        fptr = ziplistFind(fptr, field->ptr, sdslen(field->ptr), 1);
        if (fptr != NULL) {
            /* Grab pointer to the value (fptr points to the field) */
            // 域已经找到，取出和它相对应的值的位置
            vptr = ziplistNext(zl, fptr);
            redisAssert(vptr != NULL);
        }
    }

    decrRefCount(field);

    // 从 ziplist 节点中取出值
    if (vptr != NULL) {
        ret = ziplistGet(vptr, vstr, vlen, vll);
        redisAssert(ret);
        return 0;
    }

    // 没找到
    return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0xf0, %eax
andl (%rdi), %eax
cmpl $0x50, %eax
jne 0x3f16f
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %r13
movq %rsi, %rdi
callq 0x2f087
movq %rax, %r12
movq 0x8(%r13), %rbp
xorl %r13d, %r13d
movq %rbp, %rdi
xorl %esi, %esi
callq 0x2abfb
testq %rax, %rax
je 0x3f125
movq 0x8(%r12), %rsi
movl -0x8(%rsi), %edx
pushq $0x1
popq %rcx
movq %rax, %rdi
callq 0x2b27f
testq %rax, %rax
je 0x3f122
movq %rbp, %rdi
movq %rax, %rsi
callq 0x2ae0d
movq %rax, %r13
testq %rax, %rax
jne 0x3f125
leaq 0x50478(%rip), %rdi     # 0x8f58f
leaq 0x50468(%rip), %rsi     # 0x8f586
pushq $0x75
jmp 0x3f17f
xorl %r13d, %r13d
movq %r12, %rdi
callq 0x2ee1f
testq %r13, %r13
je 0x3f15d
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x2aea9
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x3f160
leaq 0x5044a(%rip), %rdi     # 0x8f59c
leaq 0x5042d(%rip), %rsi     # 0x8f586
pushq $0x7e
jmp 0x3f17f
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x503ea(%rip), %rdi     # 0x8f560
leaq 0x50409(%rip), %rsi     # 0x8f586
pushq $0x66
popq %rdx
callq 0x4906b
pushq $0x1
popq %rdi
callq 0x1f3b0
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/src/t_hash.c
// Function: hashTypeGetFromHashTable
int hashTypeGetFromHashTable(robj *o, robj *field, robj **value) {
    dictEntry *de;

    // 确保编码正确
    redisAssert(o->encoding == REDIS_ENCODING_HT);

    // 在字典中查找域（键）
    de = dictFind(o->ptr, field);

    // 键不存在
    if (de == NULL) return -1;

    // 取出域（键）的值
    *value = dictGetVal(de);

    // 成功找到
    return 0;
}

// Assembly:
pushq %rbx
movl $0xf0, %eax
andl (%rdi), %eax
cmpl $0x20, %eax
jne 0x3f1bb
movq %rdx, %rbx
movq 0x8(%rdi), %rdi
callq 0x21b64
testq %rax, %rax
je 0x3f1b6
movq 0x8(%rax), %rax
movq %rax, (%rbx)
xorl %eax, %eax
jmp 0x3f1b9
pushq $-0x1
popq %rax
popq %rbx
retq
leaq 0x503de(%rip), %rdi     # 0x8f5a0
leaq 0x503bd(%rip), %rsi     # 0x8f586
movl $0x91, %edx
callq 0x4906b
pushq $0x1
popq %rdi
callq 0x1f3b0
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/src/t_hash.c
// Function: hashTypeGetObject
robj *hashTypeGetObject(robj *o, robj *field) {
    robj *value = NULL;

    // 从 ziplist 中取出值
    if (o->encoding == REDIS_ENCODING_ZIPLIST) {
        unsigned char *vstr = NULL;
        unsigned int vlen = UINT_MAX;
        long long vll = LLONG_MAX;

        if (hashTypeGetFromZiplist(o, field, &vstr, &vlen, &vll) == 0) {
            // 创建值对象
            if (vstr) {
                value = createStringObject((char*)vstr, vlen);
            } else {
                value = createStringObjectFromLongLong(vll);
            }
        }

    // 从字典中取出值
    } else if (o->encoding == REDIS_ENCODING_HT) {
        robj *aux;

        if (hashTypeGetFromHashTable(o, field, &aux) == 0) {
            incrRefCount(aux);
            value = aux;
        }

    } else {
        redisPanic("Unknown hash encoding");
    }

    // 返回值对象，或者 NULL
    return value;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movl (%rdi), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x2, %eax
je 0x3f233
cmpl $0x5, %eax
jne 0x3f26a
leaq 0x8(%rsp), %rdx
andq $0x0, (%rdx)
leaq 0x14(%rsp), %rcx
orl $-0x1, (%rcx)
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
leaq 0x18(%rsp), %r8
movq %rax, (%r8)
callq 0x3f09d
testl %eax, %eax
jne 0x3f241
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3f254
movl 0x14(%rsp), %esi
callq 0x2ea81
jmp 0x3f25e
leaq 0x8(%rsp), %rdx
callq 0x3f18d
testl %eax, %eax
je 0x3f245
xorl %ebx, %ebx
jmp 0x3f261
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x2eacc
jmp 0x3f261
movq 0x18(%rsp), %rdi
callq 0x2ea90
movq %rax, %rbx
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
retq
leaq 0x4f862(%rip), %rdi     # 0x8ead3
leaq 0x5030e(%rip), %rsi     # 0x8f586
movl $0xc7, %edx
callq 0x490e8
pushq $0x1
popq %rdi
callq 0x1f3b0
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/src/t_hash.c
// Function: hashTypeExists
int hashTypeExists(robj *o, robj *field) {

    // 检查 ziplist
    if (o->encoding == REDIS_ENCODING_ZIPLIST) {
        unsigned char *vstr = NULL;
        unsigned int vlen = UINT_MAX;
        long long vll = LLONG_MAX;

        if (hashTypeGetFromZiplist(o, field, &vstr, &vlen, &vll) == 0) return 1;

    // 检查字典
    } else if (o->encoding == REDIS_ENCODING_HT) {
        robj *aux;

        if (hashTypeGetFromHashTable(o, field, &aux) == 0) return 1;

    // 未知编码
    } else {
        redisPanic("Unknown hash encoding");
    }

    // 不存在
    return 0;
}

// Assembly:
subq $0x18, %rsp
movl (%rdi), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x2, %eax
je 0x3f2c8
cmpl $0x5, %eax
jne 0x3f2e0
movq %rsp, %rdx
andq $0x0, (%rdx)
leaq 0xc(%rsp), %rcx
orl $-0x1, (%rcx)
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
leaq 0x10(%rsp), %r8
movq %rax, (%r8)
callq 0x3f09d
jmp 0x3f2d0
movq %rsp, %rdx
callq 0x3f18d
testl %eax, %eax
je 0x3f2d8
xorl %eax, %eax
jmp 0x3f2db
pushq $0x1
popq %rax
addq $0x18, %rsp
retq
leaq 0x4f7ec(%rip), %rdi     # 0x8ead3
leaq 0x50298(%rip), %rsi     # 0x8f586
movl $0xe7, %edx
callq 0x490e8
pushq $0x1
popq %rdi
callq 0x1f3b0
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/src/t_hash.c
// Function: hashTypeLength
unsigned long hashTypeLength(robj *o) {
    unsigned long length = ULONG_MAX;

    if (o->encoding == REDIS_ENCODING_ZIPLIST) {
        // ziplist 中，每个 field-value 对都需要使用两个节点来保存
        length = ziplistLen(o->ptr) / 2;
    } else if (o->encoding == REDIS_ENCODING_HT) {
        length = dictSize((dict*)o->ptr);
    } else {
        redisPanic("Unknown hash encoding");
    }

    return length;
}

// Assembly:
pushq %rax
movl (%rdi), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x2, %eax
je 0x3f4a8
cmpl $0x5, %eax
jne 0x3f4b6
movq 0x8(%rdi), %rdi
callq 0x2b465
shrl %eax
jmp 0x3f4b4
movq 0x8(%rdi), %rcx
movq 0x48(%rcx), %rax
addq 0x28(%rcx), %rax
popq %rcx
retq
leaq 0x4f616(%rip), %rdi     # 0x8ead3
leaq 0x500c2(%rip), %rsi     # 0x8f586
movl $0x188, %edx            # imm = 0x188
callq 0x490e8
pushq $0x1
popq %rdi
callq 0x1f3b0
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/src/t_hash.c
// Function: hashTypeDelete
int hashTypeDelete(robj *o, robj *field) {
    int deleted = 0;

    // 从 ziplist 中删除
    if (o->encoding == REDIS_ENCODING_ZIPLIST) {
        unsigned char *zl, *fptr;

        field = getDecodedObject(field);

        zl = o->ptr;
        fptr = ziplistIndex(zl, ZIPLIST_HEAD);
        if (fptr != NULL) {
            // 定位到域
            fptr = ziplistFind(fptr, field->ptr, sdslen(field->ptr), 1);
            if (fptr != NULL) {
                // 删除域和值
                zl = ziplistDelete(zl,&fptr);
                zl = ziplistDelete(zl,&fptr);
                o->ptr = zl;
                deleted = 1;
            }
        }

        decrRefCount(field);

    // 从字典中删除
    } else if (o->encoding == REDIS_ENCODING_HT) {
        if (dictDelete((dict*)o->ptr, field) == REDIS_OK) {
            deleted = 1;

            /* Always check if the dictionary needs a resize after a delete. */
            // 删除成功时，看字典是否需要收缩
            if (htNeedsResize(o->ptr)) dictResize(o->ptr);
        }

    } else {
        redisPanic("Unknown hash encoding");
    }

    return deleted;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rdi), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x2, %eax
je 0x3f567
cmpl $0x5, %eax
jne 0x3f5a0
movq %rsi, %rdi
callq 0x2f087
movq %rax, %r14
movq 0x8(%rbx), %r15
xorl %ebp, %ebp
movq %r15, %rdi
xorl %esi, %esi
callq 0x2abfb
movq %rax, (%rsp)
testq %rax, %rax
je 0x3f55d
movq 0x8(%r14), %rsi
movl -0x8(%rsi), %edx
pushq $0x1
popq %r12
movq %rax, %rdi
movl %r12d, %ecx
callq 0x2b27f
movq %rax, (%rsp)
testq %rax, %rax
je 0x3f55d
movq %rsp, %r13
movq %r15, %rdi
movq %r13, %rsi
callq 0x2afb7
movq %rax, %rdi
movq %r13, %rsi
callq 0x2afb7
movq %rax, 0x8(%rbx)
movl %r12d, %ebp
movq %r14, %rdi
callq 0x2ee1f
jmp 0x3f58f
movq 0x8(%rbx), %rdi
callq 0x21c36
xorl %ebp, %ebp
testl %eax, %eax
jne 0x3f58f
movq 0x8(%rbx), %rdi
callq 0x229c3
pushq $0x1
popq %rbp
testl %eax, %eax
je 0x3f58f
movq 0x8(%rbx), %rdi
callq 0x2172d
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4f52c(%rip), %rdi     # 0x8ead3
leaq 0x4ffd8(%rip), %rsi     # 0x8f586
movl $0x175, %edx            # imm = 0x175
callq 0x490e8
pushq $0x1
popq %rdi
callq 0x1f3b0
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/src/t_hash.c
// Function: hashTypeInitIterator
hashTypeIterator *hashTypeInitIterator(robj *subject) {

    hashTypeIterator *hi = zmalloc(sizeof(hashTypeIterator));

    // 指向对象
    hi->subject = subject;

    // 记录编码
    hi->encoding = subject->encoding;

    // 以 ziplist 的方式初始化迭代器
    if (hi->encoding == REDIS_ENCODING_ZIPLIST) {
        hi->fptr = NULL;
        hi->vptr = NULL;

    // 以字典的方式初始化迭代器
    } else if (hi->encoding == REDIS_ENCODING_HT) {
        hi->di = dictGetIterator(subject->ptr);

    } else {
        redisPanic("Unknown hash encoding");
    }

    // 返回迭代器
    return hi;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x30
popq %rdi
callq 0x2828d
movq %rax, %rbx
movq %r14, (%rax)
movl (%r14), %eax
shrl $0x4, %eax
andl $0xf, %eax
movl %eax, 0x8(%rbx)
cmpl $0x2, %eax
je 0x3f5f4
cmpl $0x5, %eax
jne 0x3f60c
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
jmp 0x3f601
movq 0x8(%r14), %rdi
callq 0x21ef6
movq %rax, 0x20(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x4f4c0(%rip), %rdi     # 0x8ead3
leaq 0x4ff6c(%rip), %rsi     # 0x8f586
movl $0x1ab, %edx            # imm = 0x1AB
callq 0x490e8
pushq $0x1
popq %rdi
callq 0x1f3b0
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/src/t_hash.c
// Function: hashTypeReleaseIterator
void hashTypeReleaseIterator(hashTypeIterator *hi) {

    // 释放字典迭代器
    if (hi->encoding == REDIS_ENCODING_HT) {
        dictReleaseIterator(hi->di);
    }

    // 释放 ziplist 迭代器
    zfree(hi);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl $0x2, 0x8(%rdi)
jne 0x3f63f
movq 0x20(%rbx), %rdi
callq 0x21fe6
movq %rbx, %rdi
popq %rbx
jmp 0x283cd
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/src/t_hash.c
// Function: hashTypeNext
int hashTypeNext(hashTypeIterator *hi) {

    // 迭代 ziplist
    if (hi->encoding == REDIS_ENCODING_ZIPLIST) {
        unsigned char *zl;
        unsigned char *fptr, *vptr;

        zl = hi->subject->ptr;
        fptr = hi->fptr;
        vptr = hi->vptr;

        // 第一次执行时，初始化指针
        if (fptr == NULL) {
            /* Initialize cursor */
            redisAssert(vptr == NULL);
            fptr = ziplistIndex(zl, 0);

        // 获取下一个迭代节点
        } else {
            /* Advance cursor */
            redisAssert(vptr != NULL);
            fptr = ziplistNext(zl, vptr);
        }

        // 迭代完毕，或者 ziplist 为空
        if (fptr == NULL) return REDIS_ERR;

        /* Grab pointer to the value (fptr points to the field) */
        // 记录值的指针
        vptr = ziplistNext(zl, fptr);
        redisAssert(vptr != NULL);

        /* fptr, vptr now point to the first or next pair */
        // 更新迭代器指针
        hi->fptr = fptr;
        hi->vptr = vptr;

    // 迭代字典
    } else if (hi->encoding == REDIS_ENCODING_HT) {
        if ((hi->de = dictNext(hi->di)) == NULL) return REDIS_ERR;

    // 未知编码
    } else {
        redisPanic("Unknown hash encoding");
    }

    // 迭代成功
    return REDIS_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x8(%rdi), %eax
cmpl $0x2, %eax
je 0x3f67e
cmpl $0x5, %eax
jne 0x3f6ce
movq (%rbx), %rax
movq 0x18(%rbx), %rsi
movq 0x8(%rax), %r14
cmpq $0x0, 0x10(%rbx)
je 0x3f692
testq %rsi, %rsi
je 0x3f6e8
movq %r14, %rdi
callq 0x2ae0d
jmp 0x3f6a1
movq 0x20(%rbx), %rdi
callq 0x21f2f
movq %rax, 0x28(%rbx)
testq %rax, %rax
jne 0x3f6c1
jmp 0x3f6c5
testq %rsi, %rsi
jne 0x3f712
movq %r14, %rdi
xorl %esi, %esi
callq 0x2abfb
movq %rax, %r15
testq %rax, %rax
je 0x3f6c5
movq %r14, %rdi
movq %r15, %rsi
callq 0x2ae0d
testq %rax, %rax
je 0x3f6fd
movq %r15, 0x10(%rbx)
movq %rax, 0x18(%rbx)
xorl %eax, %eax
jmp 0x3f6c8
pushq $-0x1
popq %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x4f3fe(%rip), %rdi     # 0x8ead3
leaq 0x4feaa(%rip), %rsi     # 0x8f586
movl $0x1f5, %edx            # imm = 0x1F5
callq 0x490e8
jmp 0x3f72a
leaq 0x4fea0(%rip), %rdi     # 0x8f58f
leaq 0x4fe90(%rip), %rsi     # 0x8f586
movl $0x1de, %edx            # imm = 0x1DE
jmp 0x3f725
leaq 0x4fe8b(%rip), %rdi     # 0x8f58f
leaq 0x4fe7b(%rip), %rsi     # 0x8f586
movl $0x1e8, %edx            # imm = 0x1E8
jmp 0x3f725
leaq 0x4fea8(%rip), %rdi     # 0x8f5c1
leaq 0x4fe66(%rip), %rsi     # 0x8f586
movl $0x1d8, %edx            # imm = 0x1D8
callq 0x4906b
pushq $0x1
popq %rdi
callq 0x1f3b0
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/src/t_hash.c
// Function: hashTypeCurrentFromZiplist
void hashTypeCurrentFromZiplist(hashTypeIterator *hi, int what,
                                unsigned char **vstr,
                                unsigned int *vlen,
                                long long *vll)
{
    int ret;

    // 确保编码正确
    redisAssert(hi->encoding == REDIS_ENCODING_ZIPLIST);

    // 取出键
    if (what & REDIS_HASH_KEY) {
        ret = ziplistGet(hi->fptr, vstr, vlen, vll);
        redisAssert(ret);

    // 取出值
    } else {
        ret = ziplistGet(hi->vptr, vstr, vlen, vll);
        redisAssert(ret);
    }
}

// Assembly:
pushq %rax
cmpl $0x5, 0x8(%rdi)
jne 0x3f782
testb $0x1, %sil
jne 0x3f76a
movq 0x18(%rdi), %rdi
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
callq 0x2aea9
testl %eax, %eax
jne 0x3f780
leaq 0x4fe40(%rip), %rdi     # 0x8f59c
leaq 0x4fe23(%rip), %rsi     # 0x8f586
movl $0x213, %edx            # imm = 0x213
jmp 0x3f7aa
movq 0x10(%rdi), %rdi
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
callq 0x2aea9
testl %eax, %eax
je 0x3f797
popq %rax
retq
leaq 0x4fe45(%rip), %rdi     # 0x8f5ce
leaq 0x4fdf6(%rip), %rsi     # 0x8f586
movl $0x209, %edx            # imm = 0x209
jmp 0x3f7aa
leaq 0x4fdfe(%rip), %rdi     # 0x8f59c
leaq 0x4fde1(%rip), %rsi     # 0x8f586
movl $0x20e, %edx            # imm = 0x20E
callq 0x4906b
pushq $0x1
popq %rdi
callq 0x1f3b0
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/src/t_hash.c
// Function: hashTypeCurrentFromHashTable
void hashTypeCurrentFromHashTable(hashTypeIterator *hi, int what, robj **dst) {
    redisAssert(hi->encoding == REDIS_ENCODING_HT);

    // 取出键
    if (what & REDIS_HASH_KEY) {
        *dst = dictGetKey(hi->de);

    // 取出值
    } else {
        *dst = dictGetVal(hi->de);
    }
}

// Assembly:
cmpl $0x2, 0x8(%rdi)
jne 0x3f7d3
movq 0x28(%rdi), %rax
shll $0x3, %esi
andl $0x8, %esi
xorq $0x8, %rsi
movq (%rax,%rsi), %rax
movq %rax, (%rdx)
retq
pushq %rax
leaq 0x4fe1a(%rip), %rdi     # 0x8f5f5
leaq 0x4fda4(%rip), %rsi     # 0x8f586
movl $0x21d, %edx            # imm = 0x21D
callq 0x4906b
pushq $0x1
popq %rdi
callq 0x1f3b0
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/src/t_hash.c
// Function: hashTypeCurrentObject
robj *hashTypeCurrentObject(hashTypeIterator *hi, int what) {
    robj *dst;

    // ziplist
    if (hi->encoding == REDIS_ENCODING_ZIPLIST) {
        unsigned char *vstr = NULL;
        unsigned int vlen = UINT_MAX;
        long long vll = LLONG_MAX;

        // 取出键或值
        hashTypeCurrentFromZiplist(hi, what, &vstr, &vlen, &vll);

        // 创建键或值的对象
        if (vstr) {
            dst = createStringObject((char*)vstr, vlen);
        } else {
            dst = createStringObjectFromLongLong(vll);
        }

    // 字典
    } else if (hi->encoding == REDIS_ENCODING_HT) {
        // 取出键或者值
        hashTypeCurrentFromHashTable(hi, what, &dst);
        // 对对象的引用计数进行自增
        incrRefCount(dst);

    // 未知编码
    } else {
        redisPanic("Unknown hash encoding");
    }

    // 返回对象
    return dst;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movl 0x8(%rdi), %eax
cmpl $0x2, %eax
je 0x3f844
cmpl $0x5, %eax
jne 0x3f874
leaq 0x18(%rsp), %rbx
andq $0x0, (%rbx)
leaq 0xc(%rsp), %rcx
orl $-0x1, (%rcx)
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
leaq 0x10(%rsp), %r8
movq %rax, (%r8)
movq %rbx, %rdx
callq 0x3f732
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3f85e
movl 0xc(%rsp), %esi
callq 0x2ea81
jmp 0x3f868
leaq 0x18(%rsp), %rbx
movq %rbx, %rdx
callq 0x3f7b7
movq (%rbx), %rbx
movq %rbx, %rdi
callq 0x2eacc
jmp 0x3f86b
movq 0x10(%rsp), %rdi
callq 0x2ea90
movq %rax, %rbx
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
retq
leaq 0x4f258(%rip), %rdi     # 0x8ead3
leaq 0x4fd04(%rip), %rsi     # 0x8f586
movl $0x250, %edx            # imm = 0x250
callq 0x490e8
pushq $0x1
popq %rdi
callq 0x1f3b0
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/src/t_hash.c
// Function: hashTypeLookupWriteOrCreate
robj *hashTypeLookupWriteOrCreate(redisClient *c, robj *key) {

    robj *o = lookupKeyWrite(c->db,key);

    // 对象不存在，创建新的
    if (o == NULL) {
        o = createHashObject();
        dbAdd(c->db,key,o);

    // 对象存在，检查类型
    } else {
        if (o->type != REDIS_HASH) {
            addReply(c,shared.wrongtypeerr);
            return NULL;
        }
    }

    // 返回对象
    return o;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x2f988
testq %rax, %rax
je 0x3f8d2
movq %rax, %r14
movl (%rax), %eax
andl $0xf, %eax
cmpl $0x4, %eax
je 0x3f8e9
leaq 0x87f3f(%rip), %rax     # 0xc7800
movq 0x70(%rax), %rsi
movq %rbx, %rdi
callq 0x2c10d
xorl %r14d, %r14d
jmp 0x3f8e9
callq 0x2ec6d
movq %rax, %r14
movq 0x8(%rbx), %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x2fa09
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/src/t_hash.c
// Function: hashTypeConvertZiplist
void hashTypeConvertZiplist(robj *o, int enc) {
    redisAssert(o->encoding == REDIS_ENCODING_ZIPLIST);

    // 如果输入是 ZIPLIST ，那么不做动作
    if (enc == REDIS_ENCODING_ZIPLIST) {
        /* Nothing to do... */

    // 转换成 HT 编码
    } else if (enc == REDIS_ENCODING_HT) {

        hashTypeIterator *hi;
        dict *dict;
        int ret;

        // 创建哈希迭代器
        hi = hashTypeInitIterator(o);

        // 创建空白的新字典
        dict = dictCreate(&hashDictType, NULL);

        // 遍历整个 ziplist
        while (hashTypeNext(hi) != REDIS_ERR) {
            robj *field, *value;

            // 取出 ziplist 里的键
            field = hashTypeCurrentObject(hi, REDIS_HASH_KEY);
            field = tryObjectEncoding(field);

            // 取出 ziplist 里的值
            value = hashTypeCurrentObject(hi, REDIS_HASH_VALUE);
            value = tryObjectEncoding(value);

            // 将键值对添加到字典
            ret = dictAdd(dict, field, value);
            if (ret != DICT_OK) {
                redisLogHexDump(REDIS_WARNING,"ziplist with dup elements dump",
                    o->ptr,ziplistBlobLen(o->ptr));
                redisAssert(ret == DICT_OK);
            }
        }

        // 释放 ziplist 的迭代器
        hashTypeReleaseIterator(hi);

        // 释放对象原来的 ziplist
        zfree(o->ptr);

        // 更新哈希的编码和值对象
        o->encoding = REDIS_ENCODING_HT;
        o->ptr = dict;

    } else {
        redisPanic("Unknown hash encoding");
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0xf0, %eax
andl (%rdi), %eax
cmpl $0x50, %eax
jne 0x3f9fa
cmpl $0x5, %esi
je 0x3f9eb
cmpl $0x2, %esi
jne 0x3fa0f
movq %rdi, %rbx
callq 0x3f5c0
movq %rax, %r15
leaq 0x8705f(%rip), %rdi     # 0xc6990
xorl %esi, %esi
callq 0x216f0
movq %rax, %r14
pushq $0x1
popq %rbp
pushq $0x2
popq %r12
movq %r15, %rdi
callq 0x3f648
cmpl $-0x1, %eax
je 0x3f9ca
movq %r15, %rdi
movl %ebp, %esi
callq 0x3f7f4
movq %rax, %rdi
callq 0x2ef4c
movq %rax, %r13
movq %r15, %rdi
movl %r12d, %esi
callq 0x3f7f4
movq %rax, %rdi
callq 0x2ef4c
movq %r14, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x21956
testl %eax, %eax
je 0x3f942
movq 0x8(%rbx), %rbx
movq %rbx, %rdi
callq 0x2b4ab
leaq 0x4fc7b(%rip), %rsi     # 0x8f617
pushq $0x3
popq %rdi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x4a22a
leaq 0x4fc85(%rip), %rdi     # 0x8f636
leaq 0x4fbce(%rip), %rsi     # 0x8f586
movl $0x298, %edx            # imm = 0x298
callq 0x4906b
pushq $0x1
popq %rdi
callq 0x1f3b0
movq %r15, %rdi
callq 0x3f62c
movq 0x8(%rbx), %rdi
callq 0x283cd
movl $0xffffff0f, %eax       # imm = 0xFFFFFF0F
andl (%rbx), %eax
orl $0x20, %eax
movl %eax, (%rbx)
movq %r14, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4fb5f(%rip), %rdi     # 0x8f560
leaq 0x4fb7e(%rip), %rsi     # 0x8f586
movl $0x274, %edx            # imm = 0x274
jmp 0x3f9bd
leaq 0x4f0bd(%rip), %rdi     # 0x8ead3
leaq 0x4fb69(%rip), %rsi     # 0x8f586
movl $0x2a7, %edx            # imm = 0x2A7
callq 0x490e8
jmp 0x3f9c2
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/src/t_hash.c
// Function: hsetCommand
void hsetCommand(redisClient *c) {
    int update;
    robj *o;

    // 取出或新创建哈希对象
    if ((o = hashTypeLookupWriteOrCreate(c,c->argv[1])) == NULL) return;

    // 如果需要的话，转换哈希对象的编码
    hashTypeTryConversion(o,c->argv,2,3);

    // 编码 field 和 value 对象以节约空间
    hashTypeTryObjectEncoding(o,&c->argv[2], &c->argv[3]);

    // 设置 field 和 value 到 hash
    update = hashTypeSet(o,c->argv[2],c->argv[3]);

    // 返回状态：显示 field-value 对是新添加还是更新
    addReply(c, update ? shared.czero : shared.cone);

    // 发送键修改信号
    signalModifiedKey(c->db,c->argv[1]);

    // 发送事件通知
    notifyKeyspaceEvent(REDIS_NOTIFY_HASH,"hset",c->argv[1],c->db->id);

    // 将服务器设为脏
    server.dirty++;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x38(%rdi), %rax
movq 0x8(%rax), %rsi
callq 0x3f894
testq %rax, %rax
je 0x3fadb
movq %rax, %r14
movq 0x38(%rbx), %rsi
pushq $0x2
popq %rdx
pushq $0x3
popq %rcx
movq %rax, %rdi
callq 0x3efc0
movq 0x38(%rbx), %rdx
leaq 0x10(%rdx), %rsi
addq $0x18, %rdx
movq %r14, %rdi
callq 0x3f05f
movq 0x38(%rbx), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
movq %r14, %rdi
callq 0x3f300
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
leaq 0x87d6f(%rip), %rax     # 0xc7800
movq 0x20(%rax,%rcx,8), %rsi
movq %rbx, %rdi
callq 0x2c10d
movq 0x8(%rbx), %rdi
movq 0x38(%rbx), %rax
movq 0x8(%rax), %rsi
callq 0x2fbc0
movq 0x8(%rbx), %rax
movq 0x38(%rbx), %rcx
movq 0x8(%rcx), %rdx
movl 0x30(%rax), %ecx
leaq 0x4a9a5(%rip), %rsi     # 0x8a46a
pushq $0x40
popq %rdi
callq 0x5b488
leaq 0x874d4(%rip), %rax     # 0xc6fa8
incq 0x560(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/nilyang[P]redis-tdd-annotation/src/t_hash.c
// Function: hsetnxCommand
void hsetnxCommand(redisClient *c) {
    robj *o;

    // 取出或新创建哈希对象
    if ((o = hashTypeLookupWriteOrCreate(c,c->argv[1])) == NULL) return;

    // 如果需要的话，转换哈希对象的编码
    hashTypeTryConversion(o,c->argv,2,3);

    // 如果 field-value 对已经存在
    // 那么回复 0 
    if (hashTypeExists(o, c->argv[2])) {
        addReply(c, shared.czero);

    // 否则，设置 field-value 对
    } else {
        // 对 field 和 value 对象编码，以节省空间
        hashTypeTryObjectEncoding(o,&c->argv[2], &c->argv[3]);
        // 设置
        hashTypeSet(o,c->argv[2],c->argv[3]);

        // 回复 1 ，表示设置成功
        addReply(c, shared.cone);

        // 发送键修改信号
        signalModifiedKey(c->db,c->argv[1]);

        // 发送事件通知
        notifyKeyspaceEvent(REDIS_NOTIFY_HASH,"hset",c->argv[1],c->db->id);

        // 将数据库设为脏
        server.dirty++;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x38(%rdi), %rax
movq 0x8(%rax), %rsi
callq 0x3f894
testq %rax, %rax
je 0x3fbbb
movq %rax, %r14
movq 0x38(%rbx), %rsi
pushq $0x2
popq %rdx
pushq $0x3
popq %rcx
movq %rax, %rdi
callq 0x3efc0
movq 0x38(%rbx), %rax
movq 0x10(%rax), %rsi
movq %r14, %rdi
callq 0x3f28a
testl %eax, %eax
je 0x3fb43
leaq 0x87cd0(%rip), %rax     # 0xc7800
movq 0x20(%rax), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2c10d
movq 0x38(%rbx), %rdx
leaq 0x10(%rdx), %rsi
addq $0x18, %rdx
movq %r14, %rdi
callq 0x3f05f
movq 0x38(%rbx), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
movq %r14, %rdi
callq 0x3f300
leaq 0x87c8e(%rip), %rax     # 0xc7800
movq 0x28(%rax), %rsi
movq %rbx, %rdi
callq 0x2c10d
movq 0x8(%rbx), %rdi
movq 0x38(%rbx), %rax
movq 0x8(%rax), %rsi
callq 0x2fbc0
movq 0x8(%rbx), %rax
movq 0x38(%rbx), %rcx
movq 0x8(%rcx), %rdx
movl 0x30(%rax), %ecx
leaq 0x4a8c5(%rip), %rsi     # 0x8a46a
pushq $0x40
popq %rdi
callq 0x5b488
leaq 0x873f4(%rip), %rax     # 0xc6fa8
incq 0x560(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq