LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zzlDeleteRangeByLex
unsigned char *zzlDeleteRangeByLex(unsigned char *zl, zlexrangespec *range, unsigned long *deleted) {
    unsigned char *eptr, *sptr;
    unsigned long num = 0;

    if (deleted != NULL) *deleted = 0;

    eptr = zzlFirstInLexRange(zl,range);
    if (eptr == NULL) return zl;

    /* When the tail of the ziplist is deleted, eptr will point to the sentinel
     * byte and ziplistNext will return NULL. */
    while ((sptr = ziplistNext(zl,eptr)) != NULL) {
        if (zzlLexValueLteMax(eptr,range)) {
            /* Delete both the element and the score. */
            zl = ziplistDelete(zl,&eptr);
            zl = ziplistDelete(zl,&eptr);
            num++;
        } else {
            /* No longer in range. */
            break;
        }
    }

    if (deleted != NULL) *deleted = num;
    return zl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
testq %rdx, %rdx
je 0x519e7
movq $0x0, (%rbx)
movq %r14, %rdi
movq %r15, %rsi
callq 0x513f4
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x51a5b
movq %r14, %rdi
movq %rax, %rsi
callq 0x3b745
xorl %r13d, %r13d
testq %rax, %rax
je 0x51a53
leaq 0x8(%rsp), %r12
movq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x513b6
testl %eax, %eax
je 0x51a53
movq %r14, %rdi
movq %r12, %rsi
callq 0x3b88c
movq %rax, %rdi
movq %r12, %rsi
callq 0x3b88c
movq %rax, %r14
incq %r13
movq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x3b745
testq %rax, %rax
jne 0x51a14
testq %rbx, %rbx
je 0x51a5b
movq %r13, (%rbx)
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zsetLength
unsigned int zsetLength(robj *zobj) {
    int length = -1;
    if (zobj->encoding == OBJ_ENCODING_ZIPLIST) {
        length = zzlLength(zobj->ptr);
    } else if (zobj->encoding == OBJ_ENCODING_SKIPLIST) {
        length = ((zset*)zobj->ptr)->zsl->length;
    } else {
        serverPanic("Unknown sorted set encoding");
    }
    return length;
}

// Assembly:
pushq %rax
movl (%rdi), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x7, %eax
je 0x51aa8
cmpl $0x5, %eax
jne 0x51ab5
movq 0x8(%rdi), %rdi
callq 0x3bb78
shrl %eax
jmp 0x51ab3
movq 0x8(%rdi), %rax
movq 0x8(%rax), %rax
movl 0x10(%rax), %eax
popq %rcx
retq
leaq 0x6f20a(%rip), %rdi     # 0xc0cc6
leaq 0x71c13(%rip), %rsi     # 0xc36d6
movl $0x440, %edx            # imm = 0x440
callq 0x619b4
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zsetConvertToZiplistIfNeeded
void zsetConvertToZiplistIfNeeded(robj *zobj, size_t maxelelen) {
    if (zobj->encoding == OBJ_ENCODING_ZIPLIST) return;
    zset *zset = zobj->ptr;

    if (zset->zsl->length <= server.zset_max_ziplist_entries &&
        maxelelen <= server.zset_max_ziplist_value)
            zsetConvert(zobj,OBJ_ENCODING_ZIPLIST);
}

// Assembly:
movl $0xf0, %eax
andl (%rdi), %eax
cmpl $0x50, %eax
jne 0x51dc1
retq
movq 0x8(%rdi), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rcx
leaq 0xafad4(%rip), %rax     # 0x1018a8
cmpq 0x958(%rax), %rcx
ja 0x51dc0
cmpq %rsi, 0x960(%rax)
jb 0x51dc0
movl $0x5, %esi
jmp 0x51ad7
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zsetScore
int zsetScore(robj *zobj, robj *member, double *score) {
    if (!zobj || !member) return C_ERR;

    if (zobj->encoding == OBJ_ENCODING_ZIPLIST) {
        if (zzlFind(zobj->ptr, member, score) == NULL) return C_ERR;
    } else if (zobj->encoding == OBJ_ENCODING_SKIPLIST) {
        zset *zs = zobj->ptr;
        dictEntry *de = dictFind(zs->dict, member);
        if (de == NULL) return C_ERR;
        *score = *(double*)dictGetVal(de);
    } else {
        serverPanic("Unknown sorted set encoding");
    }
    return C_OK;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
orb %al, %cl
jne 0x51e51
movq %rdx, %r14
movl (%rdi), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x7, %eax
je 0x51e31
cmpl $0x5, %eax
jne 0x51e5b
movq 0x8(%rdi), %rdi
movq %r14, %rdx
callq 0x51551
testq %rax, %rax
jne 0x51e4f
jmp 0x51e51
movq 0x8(%rdi), %rax
movq (%rax), %rdi
callq 0x2ebca
testq %rax, %rax
je 0x51e51
movq 0x8(%rax), %rax
movsd (%rax), %xmm0
movsd %xmm0, (%r14)
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x6ee64(%rip), %rdi     # 0xc0cc6
leaq 0x7186d(%rip), %rsi     # 0xc36d6
movl $0x4ac, %edx            # imm = 0x4AC
callq 0x619b4
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/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 == OBJ_ENCODING_INT) {
        spec->min = (long)min->ptr;
    } else {
        if (((char*)min->ptr)[0] == '(') {
            spec->min = strtod((char*)min->ptr+1,&eptr);
            if (eptr[0] != '\0' || isnan(spec->min)) return C_ERR;
            spec->minex = 1;
        } else {
            spec->min = strtod((char*)min->ptr,&eptr);
            if (eptr[0] != '\0' || isnan(spec->min)) return C_ERR;
        }
    }
    if (max->encoding == OBJ_ENCODING_INT) {
        spec->max = (long)max->ptr;
    } else {
        if (((char*)max->ptr)[0] == '(') {
            spec->max = strtod((char*)max->ptr+1,&eptr);
            if (eptr[0] != '\0' || isnan(spec->max)) return C_ERR;
            spec->maxex = 1;
        } else {
            spec->max = strtod((char*)max->ptr,&eptr);
            if (eptr[0] != '\0' || isnan(spec->max)) return C_ERR;
        }
    }

    return C_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq $0x0, 0x10(%rdx)
movl $0xf0, %eax
andl (%rdi), %eax
movq 0x8(%rdi), %rdi
cmpl $0x10, %eax
jne 0x52b75
cvtsi2sd %rdi, %xmm0
movsd %xmm0, (%rbx)
movl $0xf0, %eax
andl (%r14), %eax
movq 0x8(%r14), %rdi
cmpl $0x10, %eax
jne 0x52baa
xorps %xmm0, %xmm0
cvtsi2sd %rdi, %xmm0
movsd %xmm0, 0x8(%rbx)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
cmpb $0x28, (%rdi)
jne 0x52be0
incq %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rsi
callq 0x26cc0
movsd %xmm0, (%rbx)
movq (%r15), %rax
cmpb $0x0, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jne 0x52b6b
ucomisd %xmm0, %xmm0
jp 0x52b6b
movl $0x1, 0x10(%rbx)
jmp 0x52b4b
cmpb $0x28, (%rdi)
jne 0x52c11
incq %rdi
leaq 0x8(%rsp), %r14
movq %r14, %rsi
callq 0x26cc0
movsd %xmm0, 0x8(%rbx)
movq (%r14), %rax
cmpb $0x0, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jne 0x52b6b
ucomisd %xmm0, %xmm0
jp 0x52b6b
movl $0x1, 0x14(%rbx)
jmp 0x52b69
leaq 0x8(%rsp), %r15
movq %r15, %rsi
callq 0x26cc0
movsd %xmm0, (%rbx)
movq (%r15), %rax
cmpb $0x0, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jne 0x52b6b
ucomisd %xmm0, %xmm0
jnp 0x52b4b
jmp 0x52b6b
leaq 0x8(%rsp), %r14
movq %r14, %rsi
callq 0x26cc0
movsd %xmm0, 0x8(%rbx)
movq (%r14), %rax
cmpb $0x0, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jne 0x52b6b
ucomisd %xmm0, %xmm0
jnp 0x52b69
jmp 0x52b6b
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/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 == OBJ_ENCODING_INT ||
        max->encoding == OBJ_ENCODING_INT) return C_ERR;

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

// Assembly:
movl $0xf0, %eax
movl (%rdi), %ecx
andl %eax, %ecx
cmpl $0x10, %ecx
jne 0x52c57
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
andl (%rsi), %eax
cmpl $0x10, %eax
je 0x52cb6
movq %rdx, %rbx
leaq 0x8(%rdx), %r14
addq $0x10, %rdx
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq %rbx, %rsi
callq 0x50918
cmpl $-0x1, %eax
je 0x52c9c
leaq 0x14(%rbx), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x50918
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
jne 0x52cbb
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x52ca9
callq 0x40c8f
movq (%r14), %rdi
testq %rdi, %rdi
je 0x52cb6
callq 0x40c8f
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zuiInitIterator
void zuiInitIterator(zsetopsrc *op) {
    if (op->subject == NULL)
        return;

    if (op->type == OBJ_SET) {
        iterset *it = &op->iter.set;
        if (op->encoding == OBJ_ENCODING_INTSET) {
            it->is.is = op->subject->ptr;
            it->is.ii = 0;
        } else if (op->encoding == OBJ_ENCODING_HT) {
            it->ht.dict = op->subject->ptr;
            it->ht.di = dictGetIterator(op->subject->ptr);
            it->ht.de = dictNext(it->ht.di);
        } else {
            serverPanic("Unknown set encoding");
        }
    } else if (op->type == OBJ_ZSET) {
        iterzset *it = &op->iter.zset;
        if (op->encoding == OBJ_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);
                serverAssert(it->zl.sptr != NULL);
            }
        } else if (op->encoding == OBJ_ENCODING_SKIPLIST) {
            it->sl.zs = op->subject->ptr;
            it->sl.node = it->sl.zs->zsl->header->level[0].forward;
        } else {
            serverPanic("Unknown sorted set encoding");
        }
    } else {
        serverPanic("Unsupported type");
    }
}

// Assembly:
pushq %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x52db4
movq %rdi, %rbx
movl 0x8(%rdi), %ecx
cmpl $0x3, %ecx
je 0x52d26
cmpl $0x2, %ecx
jne 0x52db6
movl 0xc(%rbx), %ecx
cmpl $0x2, %ecx
je 0x52d97
cmpl $0x6, %ecx
jne 0x52de0
movq 0x8(%rax), %rax
movq %rax, 0x18(%rbx)
movl $0x0, 0x20(%rbx)
jmp 0x52db4
movl 0xc(%rbx), %ecx
cmpl $0x7, %ecx
je 0x52d7e
cmpl $0x5, %ecx
jne 0x52dcb
movq 0x8(%rax), %rdi
movq %rdi, 0x18(%rbx)
xorl %esi, %esi
callq 0x3b680
movq %rax, 0x20(%rbx)
testq %rax, %rax
je 0x52db4
movq 0x18(%rbx), %rdi
movq %rax, %rsi
callq 0x3b745
movq %rax, 0x28(%rbx)
testq %rax, %rax
jne 0x52db4
leaq 0x70c06(%rip), %rdi     # 0xc3971
leaq 0x70964(%rip), %rsi     # 0xc36d6
movl $0x685, %edx            # imm = 0x685
callq 0x61908
jmp 0x52df8
movq 0x8(%rax), %rax
movq %rax, 0x18(%rbx)
movq 0x8(%rax), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq %rax, 0x20(%rbx)
jmp 0x52db4
movq 0x8(%rax), %rdi
movq %rdi, 0x18(%rbx)
callq 0x2efbb
movq %rax, 0x20(%rbx)
movq %rax, %rdi
callq 0x2f015
movq %rax, 0x28(%rbx)
popq %rbx
retq
leaq 0x70bc8(%rip), %rdi     # 0xc3985
leaq 0x70912(%rip), %rsi     # 0xc36d6
movl $0x68e, %edx            # imm = 0x68E
jmp 0x52df3
leaq 0x6def4(%rip), %rdi     # 0xc0cc6
leaq 0x708fd(%rip), %rsi     # 0xc36d6
movl $0x68b, %edx            # imm = 0x68B
jmp 0x52df3
leaq 0x6fc83(%rip), %rdi     # 0xc2a6a
leaq 0x708e8(%rip), %rsi     # 0xc36d6
movl $0x67c, %edx            # imm = 0x67C
callq 0x619b4
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zuiClearIterator
void zuiClearIterator(zsetopsrc *op) {
    if (op->subject == NULL)
        return;

    if (op->type == OBJ_SET) {
        iterset *it = &op->iter.set;
        if (op->encoding == OBJ_ENCODING_INTSET) {
            UNUSED(it); /* skip */
        } else if (op->encoding == OBJ_ENCODING_HT) {
            dictReleaseIterator(it->ht.di);
        } else {
            serverPanic("Unknown set encoding");
        }
    } else if (op->type == OBJ_ZSET) {
        iterzset *it = &op->iter.zset;
        if (op->encoding == OBJ_ENCODING_ZIPLIST) {
            UNUSED(it); /* skip */
        } else if (op->encoding == OBJ_ENCODING_SKIPLIST) {
            UNUSED(it); /* skip */
        } else {
            serverPanic("Unknown sorted set encoding");
        }
    } else {
        serverPanic("Unsupported type");
    }
}

// Assembly:
pushq %rax
cmpq $0x0, (%rdi)
je 0x52e38
movl 0x8(%rdi), %eax
cmpl $0x3, %eax
je 0x52e2d
cmpl $0x2, %eax
jne 0x52e3a
movl 0xc(%rdi), %eax
cmpl $0x6, %eax
je 0x52e38
cmpl $0x2, %eax
jne 0x52e4f
movq 0x20(%rdi), %rdi
popq %rax
jmp 0x2f0dd
movl 0xc(%rdi), %eax
orl $0x2, %eax
cmpl $0x7, %eax
jne 0x52e64
popq %rax
retq
leaq 0x70b44(%rip), %rdi     # 0xc3985
leaq 0x7088e(%rip), %rsi     # 0xc36d6
movl $0x6a9, %edx            # imm = 0x6A9
jmp 0x52e77
leaq 0x6fc14(%rip), %rdi     # 0xc2a6a
leaq 0x70879(%rip), %rsi     # 0xc36d6
movl $0x69d, %edx            # imm = 0x69D
jmp 0x52e77
leaq 0x6de5b(%rip), %rdi     # 0xc0cc6
leaq 0x70864(%rip), %rsi     # 0xc36d6
movl $0x6a6, %edx            # imm = 0x6A6
callq 0x619b4
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zuiLength
int zuiLength(zsetopsrc *op) {
    if (op->subject == NULL)
        return 0;

    if (op->type == OBJ_SET) {
        if (op->encoding == OBJ_ENCODING_INTSET) {
            return intsetLen(op->subject->ptr);
        } else if (op->encoding == OBJ_ENCODING_HT) {
            dict *ht = op->subject->ptr;
            return dictSize(ht);
        } else {
            serverPanic("Unknown set encoding");
        }
    } else if (op->type == OBJ_ZSET) {
        if (op->encoding == OBJ_ENCODING_ZIPLIST) {
            return zzlLength(op->subject->ptr);
        } else if (op->encoding == OBJ_ENCODING_SKIPLIST) {
            zset *zs = op->subject->ptr;
            return zs->zsl->length;
        } else {
            serverPanic("Unknown sorted set encoding");
        }
    } else {
        serverPanic("Unsupported type");
    }
}

// Assembly:
pushq %rax
movq (%rdi), %rax
testq %rax, %rax
je 0x52eb3
movl 0x8(%rdi), %ecx
cmpl $0x3, %ecx
je 0x52eb7
cmpl $0x2, %ecx
jne 0x52eea
movl 0xc(%rdi), %ecx
cmpl $0x2, %ecx
je 0x52ede
cmpl $0x6, %ecx
jne 0x52f14
movq 0x8(%rax), %rdi
popq %rax
jmp 0x64e5b
xorl %eax, %eax
jmp 0x52ee8
movl 0xc(%rdi), %ecx
cmpl $0x7, %ecx
je 0x52ed1
cmpl $0x5, %ecx
jne 0x52eff
movq 0x8(%rax), %rdi
callq 0x3bb78
shrl %eax
jmp 0x52ee8
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movl 0x10(%rax), %eax
jmp 0x52ee8
movq 0x8(%rax), %rcx
movl 0x48(%rcx), %eax
addl 0x28(%rcx), %eax
popq %rcx
retq
leaq 0x70a94(%rip), %rdi     # 0xc3985
leaq 0x707de(%rip), %rsi     # 0xc36d6
movl $0x6c4, %edx            # imm = 0x6C4
jmp 0x52f27
leaq 0x6ddc0(%rip), %rdi     # 0xc0cc6
leaq 0x707c9(%rip), %rsi     # 0xc36d6
movl $0x6c1, %edx            # imm = 0x6C1
jmp 0x52f27
leaq 0x6fb4f(%rip), %rdi     # 0xc2a6a
leaq 0x707b4(%rip), %rsi     # 0xc36d6
movl $0x6b8, %edx            # imm = 0x6B8
callq 0x619b4
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zuiLongLongFromValue
int zuiLongLongFromValue(zsetopval *val) {
    if (!(val->flags & OPVAL_DIRTY_LL)) {
        val->flags |= OPVAL_DIRTY_LL;

        if (val->ele != NULL) {
            if (val->ele->encoding == OBJ_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 {
                serverPanic("Unsupported element encoding");
            }
        } 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. */
            val->flags |= OPVAL_VALID_LL;
        }
    }
    return val->flags & OPVAL_VALID_LL;
}

// Assembly:
pushq %rbx
movl (%rdi), %eax
testb $0x2, %al
jne 0x531bc
movq %rdi, %rbx
movl %eax, %ecx
orl $0x2, %ecx
movl %ecx, (%rdi)
movq 0x28(%rdi), %rcx
testq %rcx, %rcx
je 0x5317a
movl (%rcx), %edx
shrl $0x4, %edx
andl $0xf, %edx
je 0x53153
cmpl $0x8, %edx
je 0x53153
cmpl $0x1, %edx
jne 0x531c1
movq 0x8(%rcx), %rcx
movq %rcx, 0x40(%rbx)
jmp 0x53188
movq 0x8(%rcx), %rdi
movzbl -0x1(%rdi), %esi
movl %esi, %eax
andl $0x7, %eax
cmpl $0x4, %eax
ja 0x531a4
leaq 0x704c4(%rip), %rcx     # 0xc3630
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
shrl $0x3, %esi
jmp 0x531a6
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x53188
movl 0x38(%rbx), %esi
jmp 0x531a6
orl $0x6, %eax
jmp 0x531ba
movq -0x11(%rdi), %rsi
jmp 0x531a6
movzwl -0x5(%rdi), %esi
jmp 0x531a6
movl -0x9(%rdi), %esi
jmp 0x531a6
movzbl -0x3(%rdi), %esi
jmp 0x531a6
xorl %esi, %esi
leaq 0x40(%rbx), %rdx
callq 0x40065
movl %eax, %ecx
movl (%rbx), %eax
testl %ecx, %ecx
je 0x531bc
orl $0x4, %eax
movl %eax, (%rbx)
andl $0x4, %eax
popq %rbx
retq
leaq 0x70808(%rip), %rdi     # 0xc39d0
leaq 0x70507(%rip), %rsi     # 0xc36d6
movl $0x713, %edx            # imm = 0x713
callq 0x619b4
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zuiObjectFromValue
robj *zuiObjectFromValue(zsetopval *val) {
    if (val->ele == NULL) {
        if (val->estr != NULL) {
            val->ele = createStringObject((char*)val->estr,val->elen);
        } else {
            val->ele = createStringObjectFromLongLong(val->ell);
        }
        val->flags |= OPVAL_DIRTY_ROBJ;
    }
    return val->ele;
}

// Assembly:
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x531ed
retq
pushq %rbx
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
testq %rdi, %rdi
je 0x53204
movl 0x38(%rbx), %esi
callq 0x40744
jmp 0x5320d
movq 0x40(%rbx), %rdi
callq 0x40753
movq %rax, 0x28(%rbx)
orb $0x1, (%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zuiBufferFromValue
int zuiBufferFromValue(zsetopval *val) {
    if (val->estr == NULL) {
        if (val->ele != NULL) {
            if (val->ele->encoding == OBJ_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 {
                serverPanic("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 0x5328f
movq %rdi, %rbx
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x53273
movl (%rax), %ecx
shrl $0x4, %ecx
andl $0xf, %ecx
je 0x5324b
cmpl $0x8, %ecx
je 0x5324b
cmpl $0x1, %ecx
jne 0x532ba
leaq 0x4(%rbx), %r14
movq 0x8(%rax), %rdx
jmp 0x5327b
movq 0x8(%rax), %r14
movzbl -0x1(%r14), %eax
movl %eax, %ecx
andl $0x7, %ecx
cmpl $0x4, %ecx
ja 0x532b6
leaq 0x703df(%rip), %rdx     # 0xc3644
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
shrl $0x3, %eax
jmp 0x53288
leaq 0x4(%rbx), %r14
movq 0x40(%rbx), %rdx
movl $0x20, %esi
movq %r14, %rdi
callq 0x3ff83
movl %eax, 0x38(%rbx)
movq %r14, 0x30(%rbx)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq -0x11(%r14), %rax
jmp 0x53288
movzwl -0x5(%r14), %eax
jmp 0x53288
movl -0x9(%r14), %eax
jmp 0x53288
movzbl -0x3(%r14), %eax
jmp 0x53288
xorl %eax, %eax
jmp 0x53288
leaq 0x7070f(%rip), %rdi     # 0xc39d0
leaq 0x7040e(%rip), %rsi     # 0xc36d6
movl $0x736, %edx            # imm = 0x736
callq 0x619b4
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zcardCommand
void zcardCommand(client *c) {
    robj *key = c->argv[1];
    robj *zobj;

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

    addReplyLongLong(c,zsetLength(zobj));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movq 0x8(%rax), %rsi
leaq 0xad300(%rip), %rax     # 0x102310
movq 0x20(%rax), %rdx
callq 0x41af9
testq %rax, %rax
je 0x55035
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
movl $0x3, %edx
callq 0x40d47
testl %eax, %eax
je 0x5503d
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %r14, %rdi
callq 0x51a88
movl %eax, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3d23f
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zscoreCommand
void zscoreCommand(client *c) {
    robj *key = c->argv[1];
    robj *zobj;
    double score;

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

    if (zsetScore(zobj,c->argv[2],&score) == C_ERR) {
        addReply(c,shared.nullbulk);
    } else {
        addReplyDouble(c,score);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movq 0x8(%rax), %rsi
leaq 0xad29f(%rip), %r15     # 0x102310
movq 0x50(%r15), %rdx
callq 0x41af9
testq %rax, %rax
je 0x550cc
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
movl $0x3, %edx
callq 0x40d47
testl %eax, %eax
jne 0x550cc
movq 0x40(%rbx), %rax
movq 0x10(%rax), %rsi
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
callq 0x51df0
cmpl $-0x1, %eax
je 0x550c0
movsd 0x8(%rsp), %xmm0
movq %rbx, %rdi
callq 0x3d03c
jmp 0x550cc
movq 0x50(%r15), %rsi
movq %rbx, %rdi
callq 0x3c854
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zscanCommand
void zscanCommand(client *c) {
    robj *o;
    unsigned long cursor;

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

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movq 0x10(%rax), %rsi
movq %rsp, %rdx
callq 0x426e3
cmpl $-0x1, %eax
je 0x553e2
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
leaq 0xacf68(%rip), %rax     # 0x102310
movq 0x148(%rax), %rdx
movq %rbx, %rdi
callq 0x41af9
testq %rax, %rax
je 0x553e2
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
movl $0x3, %edx
callq 0x40d47
testl %eax, %eax
jne 0x553e2
movq (%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x42760
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_hash.c
// Function: hashTypeTryConversion
void hashTypeTryConversion(robj *o, robj **argv, int start, int end) {
    int i;

    if (o->encoding != OBJ_ENCODING_ZIPLIST) return;

    for (i = start; i <= end; i++) {
        if (sdsEncodedObject(argv[i]) &&
            sdslen(argv[i]->ptr) > server.hash_max_ziplist_value)
        {
            hashTypeConvert(o, OBJ_ENCODING_HT);
            break;
        }
    }
}

// Assembly:
movl $0xf0, %eax
andl (%rdi), %eax
cmpl $0x50, %eax
setne %al
cmpl %ecx, %edx
setg %r8b
orb %al, %r8b
jne 0x55481
leaq 0xac49d(%rip), %rax     # 0x1018a8
movq 0x948(%rax), %rax
movslq %edx, %r8
leaq (%rsi,%r8,8), %rsi
subl %edx, %ecx
incl %ecx
xorl %edx, %edx
leaq 0x6e6aa(%rip), %r8      # 0xc3ad0
movq (%rsi,%rdx,8), %r9
movl (%r9), %r10d
shrl $0x4, %r10d
testb $0x7, %r10b
jne 0x5547a
movq 0x8(%r9), %r10
movzbl -0x1(%r10), %r9d
movl %r9d, %r11d
andl $0x7, %r11d
cmpl $0x4, %r11d
ja 0x5547a
movslq (%r8,%r11,4), %r11
addq %r8, %r11
jmpq *%r11
shrl $0x3, %r9d
jmp 0x55475
movq -0x11(%r10), %r9
jmp 0x55475
movzwl -0x5(%r10), %r9d
jmp 0x55475
movl -0x9(%r10), %r9d
jmp 0x55475
movzbl -0x3(%r10), %r9d
cmpq %rax, %r9
ja 0x55482
incq %rdx
cmpl %edx, %ecx
jne 0x55426
retq
movl $0x2, %esi
jmp 0x5548c
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_hash.c
// Function: hashTypeConvert
void hashTypeConvert(robj *o, int enc) {
    if (o->encoding == OBJ_ENCODING_ZIPLIST) {
        hashTypeConvertZiplist(o, enc);
    } else if (o->encoding == OBJ_ENCODING_HT) {
        serverPanic("Not implemented");
    } else {
        serverPanic("Unknown hash encoding");
    }
}

// Assembly:
pushq %rax
movl (%rdi), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x5, %eax
jne 0x554a0
popq %rax
jmp 0x55fbd
cmpl $0x2, %eax
jne 0x554ba
leaq 0x6e78d(%rip), %rdi     # 0xc3c39
leaq 0x6e6cd(%rip), %rsi     # 0xc3b80
movl $0x1dc, %edx            # imm = 0x1DC
jmp 0x554cd
leaq 0x6d5c0(%rip), %rdi     # 0xc2a81
leaq 0x6e6b8(%rip), %rsi     # 0xc3b80
movl $0x1de, %edx            # imm = 0x1DE
callq 0x619b4
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/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;

    serverAssert(o->encoding == OBJ_ENCODING_ZIPLIST);

    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) {
            /* Grab pointer to the value (fptr points to the field) */
            vptr = ziplistNext(zl, fptr);
            serverAssert(vptr != NULL);
        }
    }

    decrRefCount(field);

    if (vptr != NULL) {
        ret = ziplistGet(vptr, vstr, vlen, vll);
        serverAssert(ret);
        return 0;
    }

    return -1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl $0xf0, %eax
andl (%rdi), %eax
cmpl $0x50, %eax
jne 0x55614
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %r13
movq %rsi, %rdi
callq 0x41026
movq %rax, %r12
movq 0x8(%r13), %r13
movq %r13, %rdi
xorl %esi, %esi
callq 0x3b680
testq %rax, %rax
je 0x555fd
movq 0x8(%r12), %rsi
movzbl -0x1(%rsi), %edx
movl %edx, %ecx
andl $0x7, %ecx
cmpl $0x4, %ecx
ja 0x555a0
leaq 0x6e569(%rip), %rdi     # 0xc3ae4
movslq (%rdi,%rcx,4), %rcx
addq %rdi, %rcx
jmpq *%rcx
shrl $0x3, %edx
jmp 0x555a2
movq -0x11(%rsi), %rdx
jmp 0x555a2
movzwl -0x5(%rsi), %edx
jmp 0x555a2
movl -0x9(%rsi), %edx
jmp 0x555a2
movzbl -0x3(%rsi), %edx
jmp 0x555a2
xorl %edx, %edx
movq %rax, %rdi
movl $0x1, %ecx
callq 0x3b97b
testq %rax, %rax
je 0x555fd
movq %r13, %rdi
movq %rax, %rsi
callq 0x3b745
testq %rax, %rax
je 0x55629
movq %rax, %r13
movq %r12, %rdi
callq 0x40c8f
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x3b7cf
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x5560a
leaq 0x6e5a7(%rip), %rdi     # 0xc3b96
leaq 0x6e58a(%rip), %rsi     # 0xc3b80
movl $0x5c, %edx
jmp 0x5563c
movq %r12, %rdi
callq 0x40c8f
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x6e541(%rip), %rdi     # 0xc3b5c
leaq 0x6e55e(%rip), %rsi     # 0xc3b80
movl $0x49, %edx
jmp 0x5563c
leaq 0x6e559(%rip), %rdi     # 0xc3b89
leaq 0x6e549(%rip), %rsi     # 0xc3b80
movl $0x54, %edx
callq 0x61908
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_hash.c
// Function: hashTypeGetFromHashTable
int hashTypeGetFromHashTable(robj *o, robj *field, robj **value) {
    dictEntry *de;

    serverAssert(o->encoding == OBJ_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 0x5567b
movq %rdx, %rbx
movq 0x8(%rdi), %rdi
callq 0x2ebca
testq %rax, %rax
je 0x55674
movq 0x8(%rax), %rax
movq %rax, (%rbx)
xorl %eax, %eax
jmp 0x55679
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
retq
leaq 0x6e518(%rip), %rdi     # 0xc3b9a
leaq 0x6e4f7(%rip), %rsi     # 0xc3b80
movl $0x68, %edx
callq 0x61908
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_hash.c
// Function: hashTypeGetObject
robj *hashTypeGetObject(robj *o, robj *field) {
    robj *value = NULL;

    if (o->encoding == OBJ_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 == OBJ_ENCODING_HT) {
        robj *aux;

        if (hashTypeGetFromHashTable(o, field, &aux) == 0) {
            incrRefCount(aux);
            value = aux;
        }
    } else {
        serverPanic("Unknown hash encoding");
    }
    return value;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movl (%rdi), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x2, %eax
je 0x556fb
cmpl $0x5, %eax
jne 0x55732
leaq 0x8(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0x14(%rsp), %rcx
movl $0xffffffff, (%rcx)     # imm = 0xFFFFFFFF
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
leaq 0x18(%rsp), %r8
movq %rax, (%r8)
callq 0x5551a
testl %eax, %eax
jne 0x55709
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x5571c
movl 0x14(%rsp), %esi
callq 0x40744
jmp 0x55726
leaq 0x8(%rsp), %rdx
callq 0x5564b
testl %eax, %eax
je 0x5570d
xorl %ebx, %ebx
jmp 0x55729
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x407a8
jmp 0x55729
movq 0x18(%rsp), %rdi
callq 0x40753
movq %rax, %rbx
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
retq
leaq 0x6d348(%rip), %rdi     # 0xc2a81
leaq 0x6e440(%rip), %rsi     # 0xc3b80
movl $0x8d, %edx
callq 0x619b4
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_hash.c
// Function: hashTypeGetValueLength
size_t hashTypeGetValueLength(robj *o, robj *field) {
    size_t len = 0;
    if (o->encoding == OBJ_ENCODING_ZIPLIST) {
        unsigned char *vstr = NULL;
        unsigned int vlen = UINT_MAX;
        long long vll = LLONG_MAX;

        if (hashTypeGetFromZiplist(o, field, &vstr, &vlen, &vll) == 0)
            len = vstr ? vlen : sdigits10(vll);
    } else if (o->encoding == OBJ_ENCODING_HT) {
        robj *aux;

        if (hashTypeGetFromHashTable(o, field, &aux) == 0)
            len = stringObjectLen(aux);
    } else {
        serverPanic("Unknown hash encoding");
    }
    return len;
}

// Assembly:
subq $0x18, %rsp
movl (%rdi), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x2, %eax
je 0x557a7
cmpl $0x5, %eax
jne 0x557d3
movq %rsp, %rdx
movq $0x0, (%rdx)
leaq 0xc(%rsp), %rcx
movl $0xffffffff, (%rcx)     # imm = 0xFFFFFFFF
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
leaq 0x10(%rsp), %r8
movq %rax, (%r8)
callq 0x5551a
testl %eax, %eax
jne 0x557b3
cmpq $0x0, (%rsp)
je 0x557c2
movl 0xc(%rsp), %eax
jmp 0x557cc
movq %rsp, %rdx
callq 0x5564b
testl %eax, %eax
je 0x557b7
xorl %eax, %eax
jmp 0x557ce
movq (%rsp), %rdi
callq 0x41270
jmp 0x557ce
movq 0x10(%rsp), %rdi
callq 0x3ff6d
movl %eax, %eax
addq $0x18, %rsp
retq
leaq 0x6d2a7(%rip), %rdi     # 0xc2a81
leaq 0x6e39f(%rip), %rsi     # 0xc3b80
movl $0xa4, %edx
callq 0x619b4
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_hash.c
// Function: hashTypeExists
int hashTypeExists(robj *o, robj *field) {
    if (o->encoding == OBJ_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 == OBJ_ENCODING_HT) {
        robj *aux;

        if (hashTypeGetFromHashTable(o, field, &aux) == 0) return 1;
    } else {
        serverPanic("Unknown hash encoding");
    }
    return 0;
}

// Assembly:
subq $0x18, %rsp
movl (%rdi), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x2, %eax
je 0x55839
cmpl $0x5, %eax
jne 0x55853
movq %rsp, %rdx
movq $0x0, (%rdx)
leaq 0xc(%rsp), %rcx
movl $0xffffffff, (%rcx)     # imm = 0xFFFFFFFF
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
leaq 0x10(%rsp), %r8
movq %rax, (%r8)
callq 0x5551a
jmp 0x55841
movq %rsp, %rdx
callq 0x5564b
testl %eax, %eax
je 0x55849
xorl %eax, %eax
jmp 0x5584e
movl $0x1, %eax
addq $0x18, %rsp
retq
leaq 0x6d227(%rip), %rdi     # 0xc2a81
leaq 0x6e31f(%rip), %rsi     # 0xc3b80
movl $0xb7, %edx
callq 0x619b4
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_hash.c
// Function: hashTypeLength
unsigned long hashTypeLength(robj *o) {
    unsigned long length = ULONG_MAX;

    if (o->encoding == OBJ_ENCODING_ZIPLIST) {
        length = ziplistLen(o->ptr) / 2;
    } else if (o->encoding == OBJ_ENCODING_HT) {
        length = dictSize((dict*)o->ptr);
    } else {
        serverPanic("Unknown hash encoding");
    }

    return length;
}

// Assembly:
pushq %rax
movl (%rdi), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x2, %eax
je 0x55b1a
cmpl $0x5, %eax
jne 0x55b28
movq 0x8(%rdi), %rdi
callq 0x3bb78
shrl %eax
jmp 0x55b26
movq 0x8(%rdi), %rcx
movq 0x48(%rcx), %rax
addq 0x28(%rcx), %rax
popq %rcx
retq
leaq 0x6cf52(%rip), %rdi     # 0xc2a81
leaq 0x6e04a(%rip), %rsi     # 0xc3b80
movl $0x124, %edx            # imm = 0x124
callq 0x619b4
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_hash.c
// Function: hashTypeDelete
int hashTypeDelete(robj *o, robj *field) {
    int deleted = 0;

    if (o->encoding == OBJ_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 == OBJ_ENCODING_HT) {
        if (dictDelete((dict*)o->ptr, field) == C_OK) {
            deleted = 1;

            /* Always check if the dictionary needs a resize after a delete. */
            if (htNeedsResize(o->ptr)) dictResize(o->ptr);
        }

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

    return deleted;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rdi), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x2, %eax
je 0x55bbe
cmpl $0x5, %eax
jne 0x55c55
movq %rsi, %rdi
callq 0x41026
movq %rax, %r15
movq 0x8(%rbx), %r12
xorl %r14d, %r14d
movq %r12, %rdi
xorl %esi, %esi
callq 0x3b680
movq %rax, (%rsp)
testq %rax, %rax
je 0x55c3e
movq 0x8(%r15), %rsi
movzbl -0x1(%rsi), %edx
movl %edx, %ecx
andl $0x7, %ecx
xorl %r14d, %r14d
cmpl $0x4, %ecx
ja 0x55c03
leaq 0x6df98(%rip), %rdi     # 0xc3b48
movslq (%rdi,%rcx,4), %rcx
addq %rdi, %rcx
jmpq *%rcx
shrl $0x3, %edx
jmp 0x55c05
movq 0x8(%rbx), %rdi
callq 0x2ecb5
xorl %r14d, %r14d
testl %eax, %eax
jne 0x55c46
movq 0x8(%rbx), %rdi
callq 0x30340
movl $0x1, %r14d
testl %eax, %eax
je 0x55c46
movq 0x8(%rbx), %rdi
callq 0x2e6d1
jmp 0x55c46
movq -0x11(%rsi), %rdx
jmp 0x55c05
movzwl -0x5(%rsi), %edx
jmp 0x55c05
movl -0x9(%rsi), %edx
jmp 0x55c05
movzbl -0x3(%rsi), %edx
jmp 0x55c05
xorl %edx, %edx
movq %rax, %rdi
movl $0x1, %ecx
callq 0x3b97b
movq %rax, (%rsp)
testq %rax, %rax
je 0x55c3e
movq %rsp, %r14
movq %r12, %rdi
movq %r14, %rsi
callq 0x3b88c
movq %rax, %rdi
movq %r14, %rsi
callq 0x3b88c
movq %rax, 0x8(%rbx)
movl $0x1, %r14d
movq %r15, %rdi
callq 0x40c8f
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x6ce25(%rip), %rdi     # 0xc2a81
leaq 0x6df1d(%rip), %rsi     # 0xc3b80
movl $0x115, %edx            # imm = 0x115
callq 0x619b4
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_hash.c
// Function: hashTypeInitIterator
hashTypeIterator *hashTypeInitIterator(robj *subject) {
    hashTypeIterator *hi = zmalloc(sizeof(hashTypeIterator));
    hi->subject = subject;
    hi->encoding = subject->encoding;

    if (hi->encoding == OBJ_ENCODING_ZIPLIST) {
        hi->fptr = NULL;
        hi->vptr = NULL;
    } else if (hi->encoding == OBJ_ENCODING_HT) {
        hi->di = dictGetIterator(subject->ptr);
    } else {
        serverPanic("Unknown hash encoding");
    }

    return hi;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x30, %edi
callq 0x382d1
movq %rax, %rbx
movq %r14, (%rax)
movl (%r14), %eax
shrl $0x4, %eax
andl $0xf, %eax
movl %eax, 0x8(%rbx)
cmpl $0x2, %eax
je 0x55cad
cmpl $0x5, %eax
jne 0x55cc5
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
jmp 0x55cba
movq 0x8(%r14), %rdi
callq 0x2efbb
movq %rax, 0x20(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x6cdb5(%rip), %rdi     # 0xc2a81
leaq 0x6dead(%rip), %rsi     # 0xc3b80
movl $0x135, %edx            # imm = 0x135
callq 0x619b4
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_hash.c
// Function: hashTypeNext
int hashTypeNext(hashTypeIterator *hi) {
    if (hi->encoding == OBJ_ENCODING_ZIPLIST) {
        unsigned char *zl;
        unsigned char *fptr, *vptr;

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

        if (fptr == NULL) {
            /* Initialize cursor */
            serverAssert(vptr == NULL);
            fptr = ziplistIndex(zl, 0);
        } else {
            /* Advance cursor */
            serverAssert(vptr != NULL);
            fptr = ziplistNext(zl, vptr);
        }
        if (fptr == NULL) return C_ERR;

        /* Grab pointer to the value (fptr points to the field) */
        vptr = ziplistNext(zl, fptr);
        serverAssert(vptr != NULL);

        /* fptr, vptr now point to the first or next pair */
        hi->fptr = fptr;
        hi->vptr = vptr;
    } else if (hi->encoding == OBJ_ENCODING_HT) {
        if ((hi->de = dictNext(hi->di)) == NULL) return C_ERR;
    } else {
        serverPanic("Unknown hash encoding");
    }
    return C_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x8(%rdi), %eax
cmpl $0x2, %eax
je 0x55d39
cmpl $0x5, %eax
jne 0x55d8b
movq (%rbx), %rax
movq 0x18(%rbx), %rsi
movq 0x8(%rax), %r14
cmpq $0x0, 0x10(%rbx)
je 0x55d4d
testq %rsi, %rsi
je 0x55da5
movq %r14, %rdi
callq 0x3b745
jmp 0x55d5c
movq 0x20(%rbx), %rdi
callq 0x2f015
movq %rax, 0x28(%rbx)
testq %rax, %rax
jne 0x55d7c
jmp 0x55d80
testq %rsi, %rsi
jne 0x55dcf
movq %r14, %rdi
xorl %esi, %esi
callq 0x3b680
movq %rax, %r15
testq %rax, %rax
je 0x55d80
movq %r14, %rdi
movq %r15, %rsi
callq 0x3b745
testq %rax, %rax
je 0x55dba
movq %r15, 0x10(%rbx)
movq %rax, 0x18(%rbx)
xorl %eax, %eax
jmp 0x55d85
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %r15
retq
leaq 0x6ccef(%rip), %rdi     # 0xc2a81
leaq 0x6dde7(%rip), %rsi     # 0xc3b80
movl $0x163, %edx            # imm = 0x163
callq 0x619b4
jmp 0x55de7
leaq 0x6dddd(%rip), %rdi     # 0xc3b89
leaq 0x6ddcd(%rip), %rsi     # 0xc3b80
movl $0x154, %edx            # imm = 0x154
jmp 0x55de2
leaq 0x6ddc8(%rip), %rdi     # 0xc3b89
leaq 0x6ddb8(%rip), %rsi     # 0xc3b80
movl $0x15b, %edx            # imm = 0x15B
jmp 0x55de2
leaq 0x6dde3(%rip), %rdi     # 0xc3bb9
leaq 0x6dda3(%rip), %rsi     # 0xc3b80
movl $0x150, %edx            # imm = 0x150
callq 0x61908
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_hash.c
// Function: hashTypeCurrentFromZiplist
void hashTypeCurrentFromZiplist(hashTypeIterator *hi, int what,
                                unsigned char **vstr,
                                unsigned int *vlen,
                                long long *vll)
{
    int ret;

    serverAssert(hi->encoding == OBJ_ENCODING_ZIPLIST);

    if (what & OBJ_HASH_KEY) {
        ret = ziplistGet(hi->fptr, vstr, vlen, vll);
        serverAssert(ret);
    } else {
        ret = ziplistGet(hi->vptr, vstr, vlen, vll);
        serverAssert(ret);
    }
}

// Assembly:
pushq %rax
cmpl $0x5, 0x8(%rdi)
jne 0x55e41
testb $0x1, %sil
jne 0x55e29
movq 0x18(%rdi), %rdi
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
callq 0x3b7cf
testl %eax, %eax
jne 0x55e3f
leaq 0x6dd7b(%rip), %rdi     # 0xc3b96
leaq 0x6dd5e(%rip), %rsi     # 0xc3b80
movl $0x178, %edx            # imm = 0x178
jmp 0x55e69
movq 0x10(%rdi), %rdi
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
callq 0x3b7cf
testl %eax, %eax
je 0x55e56
popq %rax
retq
leaq 0x6dd7e(%rip), %rdi     # 0xc3bc6
leaq 0x6dd31(%rip), %rsi     # 0xc3b80
movl $0x171, %edx            # imm = 0x171
jmp 0x55e69
leaq 0x6dd39(%rip), %rdi     # 0xc3b96
leaq 0x6dd1c(%rip), %rsi     # 0xc3b80
movl $0x175, %edx            # imm = 0x175
callq 0x61908
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_hash.c
// Function: hashTypeCurrentObject
robj *hashTypeCurrentObject(hashTypeIterator *hi, int what) {
    robj *dst;

    if (hi->encoding == OBJ_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 == OBJ_ENCODING_HT) {
        hashTypeCurrentFromHashTable(hi, what, &dst);
        incrRefCount(dst);
    } else {
        serverPanic("Unknown hash encoding");
    }
    return dst;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movl 0x8(%rdi), %eax
cmpl $0x2, %eax
je 0x55f0d
cmpl $0x5, %eax
jne 0x55f3d
leaq 0x18(%rsp), %rbx
movq $0x0, (%rbx)
leaq 0xc(%rsp), %rcx
movl $0xffffffff, (%rcx)     # imm = 0xFFFFFFFF
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
leaq 0x10(%rsp), %r8
movq %rax, (%r8)
movq %rbx, %rdx
callq 0x55df1
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x55f27
movl 0xc(%rsp), %esi
callq 0x40744
jmp 0x55f31
leaq 0x18(%rsp), %rbx
movq %rbx, %rdx
callq 0x55e78
movq (%rbx), %rbx
movq %rbx, %rdi
callq 0x407a8
jmp 0x55f34
movq 0x10(%rsp), %rdi
callq 0x40753
movq %rax, %rbx
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
retq
leaq 0x6cb3d(%rip), %rdi     # 0xc2a81
leaq 0x6dc35(%rip), %rsi     # 0xc3b80
movl $0x19d, %edx            # imm = 0x19D
callq 0x619b4
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_hash.c
// Function: hashTypeLookupWriteOrCreate
robj *hashTypeLookupWriteOrCreate(client *c, robj *key) {
    robj *o = lookupKeyWrite(c->db,key);
    if (o == NULL) {
        o = createHashObject();
        dbAdd(c->db,key,o);
    } else {
        if (o->type != OBJ_HASH) {
            addReply(c,shared.wrongtypeerr);
            return NULL;
        }
    }
    return o;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0x41ad6
testq %rax, %rax
je 0x55f9d
movq %rax, %r14
movl (%rax), %eax
andl $0xf, %eax
cmpl $0x4, %eax
je 0x55fb4
leaq 0xac384(%rip), %rax     # 0x102310
movq 0x70(%rax), %rsi
movq %rbx, %rdi
callq 0x3c854
xorl %r14d, %r14d
jmp 0x55fb4
callq 0x40aa1
movq %rax, %r14
movq 0x10(%rbx), %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x41b77
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_hash.c
// Function: hashTypeConvertZiplist
void hashTypeConvertZiplist(robj *o, int enc) {
    serverAssert(o->encoding == OBJ_ENCODING_ZIPLIST);

    if (enc == OBJ_ENCODING_ZIPLIST) {
        /* Nothing to do... */

    } else if (enc == OBJ_ENCODING_HT) {
        hashTypeIterator *hi;
        dict *dict;
        int ret;

        hi = hashTypeInitIterator(o);
        dict = dictCreate(&hashDictType, NULL);

        while (hashTypeNext(hi) != C_ERR) {
            robj *field, *value;

            field = hashTypeCurrentObject(hi, OBJ_HASH_KEY);
            field = tryObjectEncoding(field);
            value = hashTypeCurrentObject(hi, OBJ_HASH_VALUE);
            value = tryObjectEncoding(value);
            ret = dictAdd(dict, field, value);
            if (ret != DICT_OK) {
                serverLogHexDump(LL_WARNING,"ziplist with dup elements dump",
                    o->ptr,ziplistBlobLen(o->ptr));
                serverAssert(ret == DICT_OK);
            }
        }

        hashTypeReleaseIterator(hi);
        zfree(o->ptr);

        o->encoding = OBJ_ENCODING_HT;
        o->ptr = dict;

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

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl $0xf0, %eax
andl (%rdi), %eax
cmpl $0x50, %eax
jne 0x560c5
cmpl $0x5, %esi
je 0x560b9
cmpl $0x2, %esi
jne 0x560da
movq %rdi, %rbx
callq 0x55c77
movq %rax, %r15
leaq 0xaaed7(%rip), %rdi     # 0x100ed0
xorl %esi, %esi
callq 0x2e68c
movq %rax, %r14
movq %r15, %rdi
callq 0x55d03
cmpl $-0x1, %eax
je 0x56098
movq %r15, %rdi
movl $0x1, %esi
callq 0x55eb7
movq %rax, %rdi
callq 0x40e09
movq %rax, %r12
movq %r15, %rdi
movl $0x2, %esi
callq 0x55eb7
movq %rax, %rdi
callq 0x40e09
movq %r14, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x2e9b8
testl %eax, %eax
je 0x56003
movq 0x8(%rbx), %rbx
movq %rbx, %rdi
callq 0x3bbc5
leaq 0x6dba5(%rip), %rsi     # 0xc3c0b
movl $0x3, %edi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x635cd
leaq 0x6dbad(%rip), %rdi     # 0xc3c2a
leaq 0x6dafc(%rip), %rsi     # 0xc3b80
movl $0x1c9, %edx            # imm = 0x1C9
callq 0x61908
movl $0x1, %edi
callq 0x263c0
movq %r15, %rdi
callq 0x55ce7
movq 0x8(%rbx), %rdi
callq 0x38413
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 %r14
popq %r15
retq
leaq 0x6da90(%rip), %rdi     # 0xc3b5c
leaq 0x6daad(%rip), %rsi     # 0xc3b80
movl $0x1b1, %edx            # imm = 0x1B1
jmp 0x56089
leaq 0x6c9a0(%rip), %rdi     # 0xc2a81
leaq 0x6da98(%rip), %rsi     # 0xc3b80
movl $0x1d4, %edx            # imm = 0x1D4
callq 0x619b4
jmp 0x5608e
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_hash.c
// Function: hsetCommand
void hsetCommand(client *c) {
    int update;
    robj *o;

    if ((o = hashTypeLookupWriteOrCreate(c,c->argv[1])) == NULL) return;
    hashTypeTryConversion(o,c->argv,2,3);
    hashTypeTryObjectEncoding(o,&c->argv[2], &c->argv[3]);
    update = hashTypeSet(o,c->argv[2],c->argv[3]);
    addReply(c, update ? shared.czero : shared.cone);
    signalModifiedKey(c->db,c->argv[1]);
    notifyKeyspaceEvent(NOTIFY_HASH,"hset",c->argv[1],c->db->id);
    server.dirty++;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movq 0x8(%rax), %rsi
callq 0x55f5f
testq %rax, %rax
je 0x561ac
movq %rax, %r14
movq 0x40(%rbx), %rsi
movq %rax, %rdi
movl $0x2, %edx
movl $0x3, %ecx
callq 0x553ec
movq 0x40(%rbx), %rdx
leaq 0x10(%rdx), %rsi
addq $0x18, %rdx
movq %r14, %rdi
callq 0x554dc
movq 0x40(%rbx), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
movq %r14, %rdi
callq 0x55875
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
leaq 0xac1b0(%rip), %rax     # 0x102310
movq 0x20(%rax,%rcx,8), %rsi
movq %rbx, %rdi
callq 0x3c854
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
callq 0x41d90
movq 0x10(%rbx), %rax
movq 0x40(%rbx), %rcx
movq 0x8(%rcx), %rdx
movl 0x30(%rax), %ecx
leaq 0x665d4(%rip), %rsi     # 0xbc768
movl $0x40, %edi
callq 0x7c665
leaq 0xab703(%rip), %rax     # 0x1018a8
incq 0x720(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq