LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x59084
cmpl $0x5, %eax
jne 0x590bb
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 0x58e9f
testl %eax, %eax
jne 0x59092
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x590a5
movl 0x14(%rsp), %esi
callq 0x43ba8
jmp 0x590af
leaq 0x8(%rsp), %rdx
callq 0x58fd4
testl %eax, %eax
je 0x59096
xorl %ebx, %ebx
jmp 0x590b2
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x43c0c
jmp 0x590b2
movq 0x18(%rsp), %rdi
callq 0x43bb7
movq %rax, %rbx
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
retq
leaq 0x6c93f(%rip), %rdi     # 0xc5a01
leaq 0x6da37(%rip), %rsi     # 0xc6b00
movl $0x8d, %edx
callq 0x6558d
movl $0x1, %edi
callq 0x263d0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x59130
cmpl $0x5, %eax
jne 0x5915c
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 0x58e9f
testl %eax, %eax
jne 0x5913c
cmpq $0x0, (%rsp)
je 0x5914b
movl 0xc(%rsp), %eax
jmp 0x59155
movq %rsp, %rdx
callq 0x58fd4
testl %eax, %eax
je 0x59140
xorl %eax, %eax
jmp 0x59157
movq (%rsp), %rdi
callq 0x446f9
jmp 0x59157
movq 0x10(%rsp), %rdi
callq 0x433cf
movl %eax, %eax
addq $0x18, %rsp
retq
leaq 0x6c89e(%rip), %rdi     # 0xc5a01
leaq 0x6d996(%rip), %rsi     # 0xc6b00
movl $0xa4, %edx
callq 0x6558d
movl $0x1, %edi
callq 0x263d0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x591c2
cmpl $0x5, %eax
jne 0x591dc
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 0x58e9f
jmp 0x591ca
movq %rsp, %rdx
callq 0x58fd4
testl %eax, %eax
je 0x591d2
xorl %eax, %eax
jmp 0x591d7
movl $0x1, %eax
addq $0x18, %rsp
retq
leaq 0x6c81e(%rip), %rdi     # 0xc5a01
leaq 0x6d916(%rip), %rsi     # 0xc6b00
movl $0xb7, %edx
callq 0x6558d
movl $0x1, %edi
callq 0x263d0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x594ad
cmpl $0x5, %eax
jne 0x594bb
movq 0x8(%rdi), %rdi
callq 0x3ef20
shrl %eax
jmp 0x594b9
movq 0x8(%rdi), %rcx
movq 0x48(%rcx), %rax
addq 0x28(%rcx), %rax
popq %rcx
retq
leaq 0x6c53f(%rip), %rdi     # 0xc5a01
leaq 0x6d637(%rip), %rsi     # 0xc6b00
movl $0x124, %edx            # imm = 0x124
callq 0x6558d
movl $0x1, %edi
callq 0x263d0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x59551
cmpl $0x5, %eax
jne 0x595e8
movq %rsi, %rdi
callq 0x444b2
movq %rax, %r15
movq 0x8(%rbx), %r12
xorl %r14d, %r14d
movq %r12, %rdi
xorl %esi, %esi
callq 0x3ea40
movq %rax, (%rsp)
testq %rax, %rax
je 0x595d1
movq 0x8(%r15), %rsi
movzbl -0x1(%rsi), %edx
movl %edx, %ecx
andl $0x7, %ecx
xorl %r14d, %r14d
cmpl $0x4, %ecx
ja 0x59596
leaq 0x6d585(%rip), %rdi     # 0xc6ac8
movslq (%rdi,%rcx,4), %rcx
addq %rdi, %rcx
jmpq *%rcx
shrl $0x3, %edx
jmp 0x59598
movq 0x8(%rbx), %rdi
callq 0x31dba
xorl %r14d, %r14d
testl %eax, %eax
jne 0x595d9
movq 0x8(%rbx), %rdi
callq 0x3343a
movl $0x1, %r14d
testl %eax, %eax
je 0x595d9
movq 0x8(%rbx), %rdi
callq 0x317b9
jmp 0x595d9
movq -0x11(%rsi), %rdx
jmp 0x59598
movzwl -0x5(%rsi), %edx
jmp 0x59598
movl -0x9(%rsi), %edx
jmp 0x59598
movzbl -0x3(%rsi), %edx
jmp 0x59598
xorl %edx, %edx
movq %rax, %rdi
movl $0x1, %ecx
callq 0x3ece4
movq %rax, (%rsp)
testq %rax, %rax
je 0x595d1
movq %rsp, %r14
movq %r12, %rdi
movq %r14, %rsi
callq 0x3ebf5
movq %rax, %rdi
movq %r14, %rsi
callq 0x3ebf5
movq %rax, 0x8(%rbx)
movl $0x1, %r14d
movq %r15, %rdi
callq 0x440f3
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x6c412(%rip), %rdi     # 0xc5a01
leaq 0x6d50a(%rip), %rsi     # 0xc6b00
movl $0x115, %edx            # imm = 0x115
callq 0x6558d
movl $0x1, %edi
callq 0x263d0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x3b29d
movq %rax, %rbx
movq %r14, (%rax)
movl (%r14), %eax
shrl $0x4, %eax
andl $0xf, %eax
movl %eax, 0x8(%rbx)
cmpl $0x2, %eax
je 0x59640
cmpl $0x5, %eax
jne 0x59658
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
jmp 0x5964d
movq 0x8(%r14), %rdi
callq 0x320bb
movq %rax, 0x20(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x6c3a2(%rip), %rdi     # 0xc5a01
leaq 0x6d49a(%rip), %rsi     # 0xc6b00
movl $0x135, %edx            # imm = 0x135
callq 0x6558d
movl $0x1, %edi
callq 0x263d0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x8(%rdi), %eax
cmpl $0x2, %eax
je 0x596d6
cmpl $0x5, %eax
jne 0x5973b
movq (%rbx), %rax
movq 0x18(%rbx), %rsi
movq 0x8(%rax), %r14
cmpq $0x0, 0x10(%rbx)
je 0x596ef
testq %rsi, %rsi
je 0x59755
movq %r14, %rdi
callq 0x3ead6
jmp 0x59702
movq 0x20(%rbx), %rdi
callq 0x32116
movq %rax, 0x28(%rbx)
testq %rax, %rax
jne 0x5972c
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x5972e
testq %rsi, %rsi
jne 0x5977f
movq %r14, %rdi
xorl %esi, %esi
callq 0x3ea40
movq %rax, %r15
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x5972e
movq %r14, %rdi
movq %r15, %rsi
callq 0x3ead6
testq %rax, %rax
je 0x5976a
movq %r15, 0x10(%rbx)
movq %rax, 0x18(%rbx)
testq %r15, %r15
je 0x5972e
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6c2bf(%rip), %rdi     # 0xc5a01
leaq 0x6d3b7(%rip), %rsi     # 0xc6b00
movl $0x163, %edx            # imm = 0x163
callq 0x6558d
jmp 0x59797
leaq 0x6d3ad(%rip), %rdi     # 0xc6b09
leaq 0x6d39d(%rip), %rsi     # 0xc6b00
movl $0x154, %edx            # imm = 0x154
jmp 0x59792
leaq 0x6d398(%rip), %rdi     # 0xc6b09
leaq 0x6d388(%rip), %rsi     # 0xc6b00
movl $0x15b, %edx            # imm = 0x15B
jmp 0x59792
leaq 0x6d3b3(%rip), %rdi     # 0xc6b39
leaq 0x6d373(%rip), %rsi     # 0xc6b00
movl $0x150, %edx            # imm = 0x150
callq 0x654e1
movl $0x1, %edi
callq 0x263d0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x597f1
testb $0x1, %sil
jne 0x597d9
movq 0x18(%rdi), %rdi
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
callq 0x3eb60
testl %eax, %eax
jne 0x597ef
leaq 0x6d34b(%rip), %rdi     # 0xc6b16
leaq 0x6d32e(%rip), %rsi     # 0xc6b00
movl $0x178, %edx            # imm = 0x178
jmp 0x59819
movq 0x10(%rdi), %rdi
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
callq 0x3eb60
testl %eax, %eax
je 0x59806
popq %rax
retq
leaq 0x6d34e(%rip), %rdi     # 0xc6b46
leaq 0x6d301(%rip), %rsi     # 0xc6b00
movl $0x171, %edx            # imm = 0x171
jmp 0x59819
leaq 0x6d309(%rip), %rdi     # 0xc6b16
leaq 0x6d2ec(%rip), %rsi     # 0xc6b00
movl $0x175, %edx            # imm = 0x175
callq 0x654e1
movl $0x1, %edi
callq 0x263d0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x598bd
cmpl $0x5, %eax
jne 0x598ee
leaq 0x18(%rsp), %rbx
movq $0x0, (%rbx)
leaq 0x4(%rsp), %rcx
movl $0xffffffff, (%rcx)     # imm = 0xFFFFFFFF
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
leaq 0x10(%rsp), %r8
movq %rax, (%r8)
movq %rbx, %rdx
callq 0x597a1
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x598d4
movl 0x4(%rsp), %esi
callq 0x43ba8
jmp 0x598de
leaq 0x8(%rsp), %rbx
movq %rbx, %rdx
callq 0x59828
movq (%rbx), %rdi
callq 0x43c0c
jmp 0x598e3
movq 0x10(%rsp), %rdi
callq 0x43bb7
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
addq $0x20, %rsp
popq %rbx
retq
leaq 0x6c10c(%rip), %rdi     # 0xc5a01
leaq 0x6d204(%rip), %rsi     # 0xc6b00
movl $0x19d, %edx            # imm = 0x19D
callq 0x6558d
movl $0x1, %edi
callq 0x263d0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x44f66
testq %rax, %rax
je 0x5994e
movq %rax, %r14
movl (%rax), %eax
andl $0xf, %eax
cmpl $0x4, %eax
je 0x59965
leaq 0xad973(%rip), %rax     # 0x1072b0
movq 0x70(%rax), %rsi
movq %rbx, %rdi
callq 0x3fc19
xorl %r14d, %r14d
jmp 0x59965
callq 0x43f05
movq %rax, %r14
movq 0x10(%rbx), %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x45007
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x59a76
cmpl $0x5, %esi
je 0x59a6a
cmpl $0x2, %esi
jne 0x59a8b
movq %rdi, %rbx
callq 0x5960a
movq %rax, %r15
leaq 0xac486(%rip), %rdi     # 0x105e30
xorl %esi, %esi
callq 0x31774
movq %rax, %r14
movq %r15, %rdi
callq 0x59696
cmpl $-0x1, %eax
je 0x59a49
movq %r15, %rdi
movl $0x1, %esi
callq 0x59867
movq %rax, %rdi
callq 0x4426d
movq %rax, %r12
movq %r15, %rdi
movl $0x2, %esi
callq 0x59867
movq %rax, %rdi
callq 0x4426d
movq %r14, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x31a95
testl %eax, %eax
je 0x599b4
movq 0x8(%rbx), %rbx
movq %rbx, %rdi
callq 0x3ef6d
leaq 0x6d174(%rip), %rsi     # 0xc6b8b
movl $0x3, %edi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x671e4
leaq 0x6d17c(%rip), %rdi     # 0xc6baa
leaq 0x6d0cb(%rip), %rsi     # 0xc6b00
movl $0x1c9, %edx            # imm = 0x1C9
callq 0x654e1
movl $0x1, %edi
callq 0x263d0
movq %r15, %rdi
callq 0x5967a
movq 0x8(%rbx), %rdi
callq 0x3b3df
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 0x6d05f(%rip), %rdi     # 0xc6adc
leaq 0x6d07c(%rip), %rsi     # 0xc6b00
movl $0x1b1, %edx            # imm = 0x1B1
jmp 0x59a3a
leaq 0x6bf6f(%rip), %rdi     # 0xc5a01
leaq 0x6d067(%rip), %rsi     # 0xc6b00
movl $0x1d4, %edx            # imm = 0x1D4
callq 0x6558d
jmp 0x59a3f
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x59910
testq %rax, %rax
je 0x59b5d
movq %rax, %r14
movq 0x40(%rbx), %rsi
movq %rax, %rdi
movl $0x2, %edx
movl $0x3, %ecx
callq 0x58d68
movq 0x40(%rbx), %rdx
leaq 0x10(%rdx), %rsi
addq $0x18, %rdx
movq %r14, %rdi
callq 0x58e61
movq 0x40(%rbx), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
movq %r14, %rdi
callq 0x591fe
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
leaq 0xad79f(%rip), %rax     # 0x1072b0
movq 0x20(%rax,%rcx,8), %rsi
movq %rbx, %rdi
callq 0x3fc19
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
callq 0x45220
movq 0x10(%rbx), %rax
movq 0x40(%rbx), %rcx
movq 0x8(%rcx), %rdx
movl 0x30(%rax), %ecx
leaq 0x65bd3(%rip), %rsi     # 0xbf718
movl $0x40, %edi
callq 0x800c9
leaq 0xacd02(%rip), %rax     # 0x106858
incq 0x710(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/t_hash.c
// Function: hsetnxCommand
void hsetnxCommand(client *c) {
    robj *o;
    if ((o = hashTypeLookupWriteOrCreate(c,c->argv[1])) == NULL) return;
    hashTypeTryConversion(o,c->argv,2,3);

    if (hashTypeExists(o, c->argv[2])) {
        addReply(c, shared.czero);
    } else {
        hashTypeTryObjectEncoding(o,&c->argv[2], &c->argv[3]);
        hashTypeSet(o,c->argv[2],c->argv[3]);
        addReply(c, 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 0x59910
testq %rax, %rax
je 0x59c43
movq %rax, %r14
movq 0x40(%rbx), %rsi
movq %rax, %rdi
movl $0x2, %edx
movl $0x3, %ecx
callq 0x58d68
movq 0x40(%rbx), %rax
movq 0x10(%rax), %rsi
movq %r14, %rdi
callq 0x5917e
testl %eax, %eax
je 0x59bc9
leaq 0xad6fa(%rip), %rax     # 0x1072b0
movq 0x20(%rax), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3fc19
movq 0x40(%rbx), %rdx
leaq 0x10(%rdx), %rsi
addq $0x18, %rdx
movq %r14, %rdi
callq 0x58e61
movq 0x40(%rbx), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
movq %r14, %rdi
callq 0x591fe
leaq 0xad6b8(%rip), %rax     # 0x1072b0
movq 0x28(%rax), %rsi
movq %rbx, %rdi
callq 0x3fc19
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
callq 0x45220
movq 0x10(%rbx), %rax
movq 0x40(%rbx), %rcx
movq 0x8(%rcx), %rdx
movl 0x30(%rax), %ecx
leaq 0x65aed(%rip), %rsi     # 0xbf718
movl $0x40, %edi
callq 0x800c9
leaq 0xacc1c(%rip), %rax     # 0x106858
incq 0x710(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/t_hash.c
// Function: hmsetCommand
void hmsetCommand(client *c) {
    int i;
    robj *o;

    if ((c->argc % 2) == 1) {
        addReplyError(c,"wrong number of arguments for HMSET");
        return;
    }

    if ((o = hashTypeLookupWriteOrCreate(c,c->argv[1])) == NULL) return;
    hashTypeTryConversion(o,c->argv,2,c->argc-1);
    for (i = 2; i < c->argc; i += 2) {
        hashTypeTryObjectEncoding(o,&c->argv[i], &c->argv[i+1]);
        hashTypeSet(o,c->argv[i],c->argv[i+1]);
    }
    addReply(c, shared.ok);
    signalModifiedKey(c->db,c->argv[1]);
    notifyKeyspaceEvent(NOTIFY_HASH,"hset",c->argv[1],c->db->id);
    server.dirty++;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x80000001, %eax       # imm = 0x80000001
andl 0x38(%rdi), %eax
cmpl $0x1, %eax
jne 0x59c7b
leaq 0x6cf62(%rip), %rsi     # 0xc6bcb
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3ffcb
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
movq %rbx, %rdi
callq 0x59910
testq %rax, %rax
je 0x59d48
movq %rax, %r14
movq 0x40(%rbx), %rsi
movl 0x38(%rbx), %ecx
decl %ecx
movl $0x2, %ebp
movq %rax, %rdi
movl $0x2, %edx
callq 0x58d68
cmpl $0x3, 0x38(%rbx)
jl 0x59cf6
movl $0x18, %r15d
movq 0x40(%rbx), %rdx
leaq (%rdx,%r15), %rsi
addq $-0x8, %rsi
addq %r15, %rdx
movq %r14, %rdi
callq 0x58e61
movq 0x40(%rbx), %rax
movq -0x8(%rax,%r15), %rsi
movq (%rax,%r15), %rdx
movq %r14, %rdi
callq 0x591fe
addq $0x10, %r15
addl $0x2, %ebp
cmpl %ebp, 0x38(%rbx)
jg 0x59cbe
leaq 0xad5b3(%rip), %rax     # 0x1072b0
movq 0x8(%rax), %rsi
movq %rbx, %rdi
callq 0x3fc19
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
callq 0x45220
movq 0x10(%rbx), %rax
movq 0x40(%rbx), %rcx
movq 0x8(%rcx), %rdx
movl 0x30(%rax), %ecx
leaq 0x659e8(%rip), %rsi     # 0xbf718
movl $0x40, %edi
callq 0x800c9
leaq 0xacb17(%rip), %rax     # 0x106858
incq 0x710(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/t_hash.c
// Function: hincrbyCommand
void hincrbyCommand(client *c) {
    long long value, incr, oldvalue;
    robj *o, *current, *new;

    if (getLongLongFromObjectOrReply(c,c->argv[3],&incr,NULL) != C_OK) return;
    if ((o = hashTypeLookupWriteOrCreate(c,c->argv[1])) == NULL) return;
    if ((current = hashTypeGetObject(o,c->argv[2])) != NULL) {
        if (getLongLongFromObjectOrReply(c,current,&value,
            "hash value is not an integer") != C_OK) {
            decrRefCount(current);
            return;
        }
        decrRefCount(current);
    } else {
        value = 0;
    }

    oldvalue = value;
    if ((incr < 0 && oldvalue < 0 && incr < (LLONG_MIN-oldvalue)) ||
        (incr > 0 && oldvalue > 0 && incr > (LLONG_MAX-oldvalue))) {
        addReplyError(c,"increment or decrement would overflow");
        return;
    }
    value += incr;
    new = createStringObjectFromLongLong(value);
    hashTypeTryObjectEncoding(o,&c->argv[2],NULL);
    hashTypeSet(o,c->argv[2],new);
    decrRefCount(new);
    addReplyLongLong(c,value);
    signalModifiedKey(c->db,c->argv[1]);
    notifyKeyspaceEvent(NOTIFY_HASH,"hincrby",c->argv[1],c->db->id);
    server.dirty++;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movq 0x18(%rax), %rsi
leaq 0x8(%rsp), %rdx
xorl %ecx, %ecx
callq 0x44b44
testl %eax, %eax
je 0x59d87
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
movq %rbx, %rdi
callq 0x59910
testq %rax, %rax
je 0x59d7a
movq %rax, %r14
movq 0x40(%rbx), %rax
movq 0x10(%rax), %rsi
movq %r14, %rdi
callq 0x59026
testq %rax, %rax
je 0x59ddc
movq %rax, %r15
leaq 0x6ce31(%rip), %rcx     # 0xc6bef
movq %rsp, %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x44b44
movl %eax, %ebp
movq %r15, %rdi
callq 0x440f3
testl %ebp, %ebp
jne 0x59d7a
jmp 0x59de4
movq $0x0, (%rsp)
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
movq (%rsp), %rax
movq 0x8(%rsp), %rdi
subq %rax, %rcx
testq %rdi, %rdi
jns 0x59e0d
testq %rax, %rax
jns 0x59e0d
leaq 0x1(%rcx), %rdx
cmpq %rdx, %rdi
jl 0x59e2b
testq %rdi, %rdi
setg %dl
testq %rax, %rax
setg %sil
andb %dl, %sil
cmpq %rcx, %rdi
setg %cl
andb %sil, %cl
cmpb $0x1, %cl
jne 0x59e3f
leaq 0x6c3be(%rip), %rsi     # 0xc61f0
movq %rbx, %rdi
callq 0x3ffcb
jmp 0x59d7a
addq %rax, %rdi
movq %rdi, (%rsp)
callq 0x43bb7
movq %rax, %r15
movl $0xf0, %eax
andl (%r14), %eax
cmpl $0x20, %eax
jne 0x59e6e
movq 0x40(%rbx), %r12
movq 0x10(%r12), %rdi
callq 0x4426d
movq %rax, 0x10(%r12)
movq 0x40(%rbx), %rax
movq 0x10(%rax), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x591fe
movq %r15, %rdi
callq 0x440f3
movq (%rsp), %rsi
movq %rbx, %rdi
callq 0x40606
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
callq 0x45220
movq 0x10(%rbx), %rax
movq 0x40(%rbx), %rcx
movq 0x8(%rcx), %rdx
movl 0x30(%rax), %ecx
leaq 0x65879(%rip), %rsi     # 0xbf735
movl $0x40, %edi
callq 0x800c9
leaq 0xac98b(%rip), %rax     # 0x106858
incq 0x710(%rax)
jmp 0x59d7a
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/t_hash.c
// Function: hgetCommand
void hgetCommand(client *c) {
    robj *o;

    if ((o = lookupKeyReadOrReply(c,c->argv[1],shared.nullbulk)) == NULL ||
        checkType(c,o,OBJ_HASH)) return;

    addHashFieldToReply(c, o, c->argv[2]);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movq 0x8(%rax), %rsi
leaq 0xad24d(%rip), %rax     # 0x1072b0
movq 0x50(%rax), %rdx
callq 0x44f89
testq %rax, %rax
je 0x5a088
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x441ab
testl %eax, %eax
je 0x5a090
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x40(%rbx), %rax
movq 0x10(%rax), %rdx
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x5a0a7
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/t_hash.c
// Function: addHashFieldToReply
static void addHashFieldToReply(client *c, robj *o, robj *field) {
    int ret;

    if (o == NULL) {
        addReply(c, shared.nullbulk);
        return;
    }

    if (o->encoding == OBJ_ENCODING_ZIPLIST) {
        unsigned char *vstr = NULL;
        unsigned int vlen = UINT_MAX;
        long long vll = LLONG_MAX;

        ret = hashTypeGetFromZiplist(o, field, &vstr, &vlen, &vll);
        if (ret < 0) {
            addReply(c, shared.nullbulk);
        } else {
            if (vstr) {
                addReplyBulkCBuffer(c, vstr, vlen);
            } else {
                addReplyBulkLongLong(c, vll);
            }
        }

    } else if (o->encoding == OBJ_ENCODING_HT) {
        robj *value;

        ret = hashTypeGetFromHashTable(o, field, &value);
        if (ret < 0) {
            addReply(c, shared.nullbulk);
        } else {
            addReplyBulk(c, value);
        }

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

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
testq %rsi, %rsi
je 0x5a11d
movl (%rsi), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x2, %eax
je 0x5a135
cmpl $0x5, %eax
jne 0x5a183
leaq 0x8(%rsp), %rax
movq $0x0, (%rax)
leaq 0x14(%rsp), %rcx
movl $0xffffffff, (%rcx)     # imm = 0xFFFFFFFF
movabsq $0x7fffffffffffffff, %rdi # imm = 0x7FFFFFFFFFFFFFFF
leaq 0x18(%rsp), %r8
movq %rdi, (%r8)
movq %rsi, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x58e9f
testl %eax, %eax
js 0x5a15b
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
je 0x5a170
movl 0x14(%rsp), %edx
movq %rbx, %rdi
callq 0x4070f
jmp 0x5a17d
leaq 0xad18c(%rip), %rax     # 0x1072b0
movq 0x50(%rax), %rsi
movq %rbx, %rdi
addq $0x20, %rsp
popq %rbx
jmp 0x3fc19
leaq 0x8(%rsp), %rax
movq %rsi, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x58fd4
testl %eax, %eax
js 0x5a15b
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x40537
jmp 0x5a17d
leaq 0xad14e(%rip), %rax     # 0x1072b0
movq 0x50(%rax), %rsi
movq %rbx, %rdi
callq 0x3fc19
jmp 0x5a17d
movq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x407de
addq $0x20, %rsp
popq %rbx
retq
leaq 0x6b877(%rip), %rdi     # 0xc5a01
leaq 0x6c96f(%rip), %rsi     # 0xc6b00
movl $0x283, %edx            # imm = 0x283
callq 0x6558d
movl $0x1, %edi
callq 0x263d0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/t_hash.c
// Function: hdelCommand
void hdelCommand(client *c) {
    robj *o;
    int j, deleted = 0, keyremoved = 0;

    if ((o = lookupKeyWriteOrReply(c,c->argv[1],shared.czero)) == NULL ||
        checkType(c,o,OBJ_HASH)) return;

    for (j = 2; j < c->argc; j++) {
        if (hashTypeDelete(o,c->argv[j])) {
            deleted++;
            if (hashTypeLength(o) == 0) {
                dbDelete(c->db,c->argv[1]);
                keyremoved = 1;
                break;
            }
        }
    }
    if (deleted) {
        signalModifiedKey(c->db,c->argv[1]);
        notifyKeyspaceEvent(NOTIFY_HASH,"hdel",c->argv[1],c->db->id);
        if (keyremoved)
            notifyKeyspaceEvent(NOTIFY_GENERIC,"del",c->argv[1],
                                c->db->id);
        server.dirty += deleted;
    }
    addReplyLongLong(c,deleted);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movq 0x8(%rax), %rsi
leaq 0xad06c(%rip), %rax     # 0x1072b0
movq 0x20(%rax), %rdx
callq 0x44fbb
testq %rax, %rax
je 0x5a269
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x441ab
testl %eax, %eax
je 0x5a272
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %r15d, %r15d
cmpl $0x3, 0x38(%rbx)
setge %bpl
jl 0x5a2cf
xorl %r15d, %r15d
movl $0x2, %r12d
movq 0x40(%rbx), %rax
movq (%rax,%r12,8), %rsi
movq %r14, %rdi
callq 0x594dd
testl %eax, %eax
je 0x5a2ac
incl %r15d
movq %r14, %rdi
callq 0x5948d
testq %rax, %rax
je 0x5a2be
incq %r12
movslq 0x38(%rbx), %rax
cmpq %rax, %r12
setl %bpl
jl 0x5a288
jmp 0x5a2cf
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
callq 0x452f3
movslq %r15d, %r14
testl %r15d, %r15d
je 0x5a33c
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
callq 0x45220
movq 0x10(%rbx), %rax
movq 0x40(%rbx), %rcx
movq 0x8(%rcx), %rdx
movl 0x30(%rax), %ecx
leaq 0x6544c(%rip), %rsi     # 0xbf74a
movl $0x40, %edi
callq 0x800c9
testb $0x1, %bpl
je 0x5a32e
movq 0x10(%rbx), %rax
movq 0x40(%rbx), %rcx
movq 0x8(%rcx), %rdx
movl 0x30(%rax), %ecx
leaq 0x67192(%rip), %rsi     # 0xc14b6
movl $0x4, %edi
callq 0x800c9
leaq 0xac523(%rip), %rax     # 0x106858
addq %r14, 0x710(%rax)
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x40606
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/t_hash.c
// Function: hlenCommand
void hlenCommand(client *c) {
    robj *o;

    if ((o = lookupKeyReadOrReply(c,c->argv[1],shared.czero)) == NULL ||
        checkType(c,o,OBJ_HASH)) return;

    addReplyLongLong(c,hashTypeLength(o));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movq 0x8(%rax), %rsi
leaq 0xacf4b(%rip), %rax     # 0x1072b0
movq 0x20(%rax), %rdx
callq 0x44f89
testq %rax, %rax
je 0x5a38a
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x441ab
testl %eax, %eax
je 0x5a392
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %r14, %rdi
callq 0x5948d
movq %rbx, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x40606
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/t_hash.c
// Function: hstrlenCommand
void hstrlenCommand(client *c) {
    robj *o;

    if ((o = lookupKeyReadOrReply(c,c->argv[1],shared.czero)) == NULL ||
        checkType(c,o,OBJ_HASH)) return;
    addReplyLongLong(c,hashTypeGetValueLength(o,c->argv[2]));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movq 0x8(%rax), %rsi
leaq 0xaceee(%rip), %rax     # 0x1072b0
movq 0x20(%rax), %rdx
callq 0x44f89
testq %rax, %rax
je 0x5a3e7
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x441ab
testl %eax, %eax
je 0x5a3ef
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x40(%rbx), %rax
movq 0x10(%rax), %rsi
movq %r14, %rdi
callq 0x590dd
movq %rbx, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x40606
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/t_hash.c
// Function: genericHgetallCommand
void genericHgetallCommand(client *c, int flags) {
    robj *o;
    hashTypeIterator *hi;
    int multiplier = 0;
    int length, count = 0;

    if ((o = lookupKeyReadOrReply(c,c->argv[1],shared.emptymultibulk)) == NULL
        || checkType(c,o,OBJ_HASH)) return;

    if (flags & OBJ_HASH_KEY) multiplier++;
    if (flags & OBJ_HASH_VALUE) multiplier++;

    length = hashTypeLength(o) * multiplier;
    addReplyMultiBulkLen(c, length);

    hi = hashTypeInitIterator(o);
    while (hashTypeNext(hi) != C_ERR) {
        if (flags & OBJ_HASH_KEY) {
            addHashIteratorCursorToReply(c, hi, OBJ_HASH_KEY);
            count++;
        }
        if (flags & OBJ_HASH_VALUE) {
            addHashIteratorCursorToReply(c, hi, OBJ_HASH_VALUE);
            count++;
        }
    }

    hashTypeReleaseIterator(hi);
    serverAssert(count == length);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movq 0x40(%rdi), %rax
movq 0x8(%rax), %rsi
leaq 0xace80(%rip), %rax     # 0x1072b0
movq 0x68(%rax), %rdx
callq 0x44f89
testq %rax, %rax
je 0x5a4e8
movq %rax, %r12
movq %r14, %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x441ab
testl %eax, %eax
jne 0x5a4e8
movl %ebx, %ebp
andl $0x1, %ebp
andl $0x2, %ebx
movl %ebx, %r13d
shrl %r13d
addl %ebp, %r13d
movq %r12, %rdi
callq 0x5948d
movq %rax, %r15
imull %r13d, %r15d
movslq %r15d, %rsi
movq %r14, %rdi
callq 0x4063b
movq %r12, %rdi
callq 0x5960a
movq %rax, %r12
movq %rax, %rdi
callq 0x59696
xorl %r13d, %r13d
cmpl $-0x1, %eax
je 0x5a4db
testl %ebp, %ebp
je 0x5a4ba
movq %r14, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x5a519
incl %r13d
testl %ebx, %ebx
je 0x5a4d1
movq %r14, %rdi
movq %r12, %rsi
movl $0x2, %edx
callq 0x5a519
incl %r13d
movq %r12, %rdi
callq 0x59696
jmp 0x5a49e
movq %r12, %rdi
callq 0x5967a
cmpl %r15d, %r13d
jne 0x5a4f7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6c733(%rip), %rdi     # 0xc6c31
leaq 0x6c5fb(%rip), %rsi     # 0xc6b00
movl $0x303, %edx            # imm = 0x303
callq 0x654e1
movl $0x1, %edi
callq 0x263d0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/t_hash.c
// Function: addHashIteratorCursorToReply
static void addHashIteratorCursorToReply(client *c, hashTypeIterator *hi, int what) {
    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) {
            addReplyBulkCBuffer(c, vstr, vlen);
        } else {
            addReplyBulkLongLong(c, vll);
        }

    } else if (hi->encoding == OBJ_ENCODING_HT) {
        robj *value;

        hashTypeCurrentFromHashTable(hi, what, &value);
        addReplyBulk(c, value);

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

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl 0x8(%rsi), %eax
cmpl $0x2, %eax
je 0x5a580
cmpl $0x5, %eax
jne 0x5a5b4
leaq 0x10(%rsp), %r14
movq $0x0, (%r14)
leaq 0x4(%rsp), %rcx
movl $0xffffffff, (%rcx)     # imm = 0xFFFFFFFF
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
leaq 0x8(%rsp), %r8
movq %rax, (%r8)
movq %rsi, %rdi
movl %edx, %esi
movq %r14, %rdx
callq 0x597a1
movq (%r14), %rsi
testq %rsi, %rsi
je 0x5a59f
movl 0x4(%rsp), %edx
movq %rbx, %rdi
callq 0x4070f
jmp 0x5a5ac
leaq 0x10(%rsp), %r14
movq %rsi, %rdi
movl %edx, %esi
movq %r14, %rdx
callq 0x59828
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x40537
jmp 0x5a5ac
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x407de
addq $0x18, %rsp
popq %rbx
popq %r14
retq
leaq 0x6b446(%rip), %rdi     # 0xc5a01
leaq 0x6c53e(%rip), %rsi     # 0xc6b00
movl $0x2e3, %edx            # imm = 0x2E3
callq 0x6558d
movl $0x1, %edi
callq 0x263d0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/t_hash.c
// Function: hexistsCommand
void hexistsCommand(client *c) {
    robj *o;
    if ((o = lookupKeyReadOrReply(c,c->argv[1],shared.czero)) == NULL ||
        checkType(c,o,OBJ_HASH)) return;

    addReply(c, hashTypeExists(o,c->argv[2]) ? shared.cone : shared.czero);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movq 0x8(%rax), %rsi
leaq 0xacca5(%rip), %r15     # 0x1072b0
movq 0x20(%r15), %rdx
callq 0x44f89
testq %rax, %rax
je 0x5a630
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x441ab
testl %eax, %eax
je 0x5a636
popq %rbx
popq %r14
popq %r15
retq
movq 0x40(%rbx), %rax
movq 0x10(%rax), %rsi
movq %r14, %rdi
callq 0x5917e
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
movq 0x20(%r15,%rcx,8), %rsi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x3fc19
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/t_hash.c
// Function: hscanCommand
void hscanCommand(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_HASH)) 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 0x45b7d
cmpl $-0x1, %eax
je 0x5a6c4
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
leaq 0xacc26(%rip), %rax     # 0x1072b0
movq 0x148(%rax), %rdx
movq %rbx, %rdi
callq 0x44f89
testq %rax, %rax
je 0x5a6c4
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x441ab
testl %eax, %eax
jne 0x5a6c4
movq (%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x45bfa
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/aof.c
// Function: aofRewriteBufferSize
unsigned long aofRewriteBufferSize(void) {
    listNode *ln;
    listIter li;
    unsigned long size = 0;

    listRewind(server.aof_rewrite_buf_blocks,&li);
    while((ln = listNext(&li))) {
        aofrwblock *block = listNodeValue(ln);
        size += block->used;
    }
    return size;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
leaq 0xa5f08(%rip), %rax     # 0x106858
movq 0x690(%rax), %rdi
leaq 0x8(%rsp), %rbx
movq %rbx, %rsi
callq 0x2e582
movq %rbx, %rdi
callq 0x2e59f
xorl %ebx, %ebx
testq %rax, %rax
je 0x6098c
leaq 0x8(%rsp), %r14
movq 0x10(%rax), %rax
addq (%rax), %rbx
movq %r14, %rdi
callq 0x2e59f
testq %rax, %rax
jne 0x60978
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/aof.c
// Function: aofChildWriteDiffData
void aofChildWriteDiffData(aeEventLoop *el, int fd, void *privdata, int mask) {
    listNode *ln;
    aofrwblock *block;
    ssize_t nwritten;
    UNUSED(el);
    UNUSED(fd);
    UNUSED(privdata);
    UNUSED(mask);

    while(1) {
        ln = listFirst(server.aof_rewrite_buf_blocks);
        block = ln ? ln->value : NULL;
        if (server.aof_stop_sending_diff || !block) {
            aeDeleteFileEvent(server.el,server.aof_pipe_write_data_to_child,
                              AE_WRITABLE);
            return;
        }
        if (block->used > 0) {
            nwritten = write(server.aof_pipe_write_data_to_child,
                             block->buf,block->used);
            if (nwritten <= 0) return;
            memmove(block->buf,block->buf+nwritten,block->used-nwritten);
            block->used -= nwritten;
        }
        if (block->used == 0) listDelNode(server.aof_rewrite_buf_blocks,ln);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq 0xa5eb1(%rip), %r12     # 0x106858
movq 0x690(%r12), %rax
movq (%rax), %rbx
testq %rbx, %rbx
je 0x609bd
movq 0x10(%rbx), %r13
jmp 0x609c0
xorl %r13d, %r13d
cmpl $0x0, 0x700(%r12)
jne 0x60a25
testq %r13, %r13
je 0x60a25
movq (%r13), %rdx
testq %rdx, %rdx
je 0x60a0c
movl 0x6e8(%r12), %edi
leaq 0x10(%r13), %r14
movq %r14, %rsi
callq 0x26bc0
testq %rax, %rax
jle 0x60a45
leaq (%r14,%rax), %rsi
movq (%r13), %r15
subq %rax, %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0x267f0
movq %r15, (%r13)
cmpq $0x0, (%r13)
jne 0x609a7
movq 0x690(%r12), %rdi
movq %rbx, %rsi
callq 0x2e4f4
jmp 0x609a7
movq 0x40(%r12), %rdi
movl 0x6e8(%r12), %esi
movl $0x2, %edx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2ffb6
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/aof.c
// Function: aofRewriteBufferWrite
ssize_t aofRewriteBufferWrite(int fd) {
    listNode *ln;
    listIter li;
    ssize_t count = 0;

    listRewind(server.aof_rewrite_buf_blocks,&li);
    while((ln = listNext(&li))) {
        aofrwblock *block = listNodeValue(ln);
        ssize_t nwritten;

        if (block->used) {
            nwritten = write(fd,block->buf,block->used);
            if (nwritten != (ssize_t)block->used) {
                if (nwritten == 0) errno = EIO;
                return -1;
            }
            count += nwritten;
        }
    }
    return count;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
leaq 0xa5c96(%rip), %rax     # 0x106858
movq 0x690(%rax), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0x2e582
xorl %r14d, %r14d
movq %r15, %rdi
callq 0x2e59f
testq %rax, %rax
je 0x60c29
movq 0x10(%rax), %r12
movq (%r12), %rdx
movb $0x1, %bpl
testq %rdx, %rdx
je 0x60c1d
leaq 0x10(%r12), %rsi
movl %ebx, %edi
callq 0x26bc0
cmpq (%r12), %rax
jne 0x60c0b
addq %rax, %r14
jmp 0x60c1d
testq %rax, %rax
jne 0x60c1b
callq 0x26890
movl $0x5, (%rax)
xorl %ebp, %ebp
testb %bpl, %bpl
jne 0x60bd7
movq $-0x1, %r14
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/aof.c
// Function: stopAppendOnly
void stopAppendOnly(void) {
    serverAssert(server.aof_state != AOF_OFF);
    flushAppendOnlyFile(1);
    aof_fsync(server.aof_fd);
    close(server.aof_fd);

    server.aof_fd = -1;
    server.aof_selected_db = -1;
    server.aof_state = AOF_OFF;
    /* rewrite operation in progress? kill it, wait child exit */
    if (server.aof_child_pid != -1) {
        int statloc;

        serverLog(LL_NOTICE,"Killing running AOF rewrite child: %ld",
            (long) server.aof_child_pid);
        if (kill(server.aof_child_pid,SIGUSR1) != -1) {
#ifndef AOF_NO_COW
            while(wait3(&statloc,0,NULL) != server.aof_child_pid);
#else
            while(wait3(&statloc, __WALL, NULL) != server.aof_child_pid);
#endif
        }
        /* reset the buffer accumulating changes while the child saves */
        aofRewriteBufferReset();
        aofRemoveTempFile(server.aof_child_pid);
        server.aof_child_pid = -1;
        server.aof_rewrite_time_start = -1;
        /* close pipes used for IPC between the two processes. */
        aofClosePipes();
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
leaq 0xa5bfd(%rip), %r14     # 0x106858
cmpl $0x0, 0x658(%r14)
je 0x60d4a
movl $0x1, %edi
callq 0x60d6c
movl 0x6a0(%r14), %edi
callq 0x26580
movl 0x6a0(%r14), %edi
callq 0x26180
movq $-0x1, 0x6a0(%r14)
movl $0x0, 0x658(%r14)
movslq 0x68c(%r14), %rdx
cmpq $-0x1, %rdx
je 0x60d3f
leaq 0x6725c(%rip), %rsi     # 0xc7f15
movl $0x2, %edi
xorl %eax, %eax
callq 0x32ea6
movl 0x68c(%r14), %edi
movl $0xa, %esi
callq 0x26670
cmpl $-0x1, %eax
je 0x60cf5
leaq 0xc(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x26880
cmpl 0x68c(%r14), %eax
jne 0x60ce0
callq 0x60910
movl 0x68c(%r14), %ecx
leaq 0x67c24(%rip), %rdx     # 0xc892c
leaq 0x10(%rsp), %rbx
movl $0x100, %esi            # imm = 0x100
movq %rbx, %rdi
xorl %eax, %eax
callq 0x26120
movq %rbx, %rdi
callq 0x263c0
movl $0xffffffff, 0x68c(%r14) # imm = 0xFFFFFFFF
movq $-0x1, 0x6c0(%r14)
callq 0x61327
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r14
retq
leaq 0x671a2(%rip), %rdi     # 0xc7ef3
leaq 0x671b7(%rip), %rsi     # 0xc7f0f
movl $0xd6, %edx
callq 0x654e1
movl $0x1, %edi
callq 0x263d0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/aof.c
// Function: aofClosePipes
void aofClosePipes(void) {
    aeDeleteFileEvent(server.el,server.aof_pipe_read_ack_from_child,AE_READABLE);
    aeDeleteFileEvent(server.el,server.aof_pipe_write_data_to_child,AE_WRITABLE);
    close(server.aof_pipe_write_data_to_child);
    close(server.aof_pipe_read_data_from_parent);
    close(server.aof_pipe_write_ack_to_parent);
    close(server.aof_pipe_read_ack_from_child);
    close(server.aof_pipe_write_ack_to_child);
    close(server.aof_pipe_read_ack_from_parent);
}

// Assembly:
pushq %rbx
leaq 0xa5529(%rip), %rbx     # 0x106858
movq 0x40(%rbx), %rdi
movl 0x6f4(%rbx), %esi
movl $0x1, %edx
callq 0x2ffb6
movq 0x40(%rbx), %rdi
movl 0x6e8(%rbx), %esi
movl $0x2, %edx
callq 0x2ffb6
movl 0x6e8(%rbx), %edi
callq 0x26180
movl 0x6ec(%rbx), %edi
callq 0x26180
movl 0x6f0(%rbx), %edi
callq 0x26180
movl 0x6f4(%rbx), %edi
callq 0x26180
movl 0x6f8(%rbx), %edi
callq 0x26180
movl 0x6fc(%rbx), %edi
popq %rbx
jmp 0x26180