LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/rdb.c
// Function: rdbSaveLongLongAsStringObject
ssize_t rdbSaveLongLongAsStringObject(rio *rdb, long long value) {
    unsigned char buf[32];
    ssize_t n, nwritten = 0;
    int enclen = rdbEncodeInteger(value,buf);
    if (enclen > 0) {
        return rdbWriteRaw(rdb,buf,enclen);
    } else {
        /* Encode as string */
        enclen = ll2string((char*)buf,32,value);
        serverAssert(enclen < 32);
        if ((n = rdbSaveLen(rdb,enclen)) == -1) return -1;
        nwritten += n;
        if ((n = rdbWriteRaw(rdb,buf,enclen)) == -1) return -1;
        nwritten += n;
    }
    return nwritten;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rdx
movq %rdi, %rbx
movsbq %dl, %rax
cmpq %rsi, %rax
jne 0x4b9a7
movb $-0x40, (%rsp)
movb %dl, 0x1(%rsp)
movl $0x2, %eax
jmp 0x4b9f2
movswq %dx, %rax
cmpq %rdx, %rax
jne 0x4b9c3
movb $-0x3f, (%rsp)
movb %dl, 0x1(%rsp)
movb %dh, 0x2(%rsp)
movl $0x3, %eax
jmp 0x4b9f2
movslq %edx, %rax
cmpq %rdx, %rax
jne 0x4ba62
movb $-0x3e, (%rsp)
movb %dl, 0x1(%rsp)
movb %dh, 0x2(%rsp)
movl %edx, %eax
shrl $0x10, %eax
movb %al, 0x3(%rsp)
movl %edx, %eax
shrl $0x18, %eax
movb %al, 0x4(%rsp)
movl $0x5, %eax
xorl %ecx, %ecx
testb %cl, %cl
je 0x4ba43
movq %rsp, %rdi
movl $0x20, %esi
callq 0x433e5
cmpl $0x20, %eax
jge 0x4ba68
movl %eax, %r15d
movq %rbx, %rdi
movl %eax, %esi
callq 0x4b054
movq $-0x1, %r14
cmpl $-0x1, %eax
je 0x4ba54
movl %eax, %ebp
movslq %r15d, %rdx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x4ad7c
cmpl $-0x1, %eax
je 0x4ba54
movslq %ebp, %rcx
movslq %eax, %r14
addq %rcx, %r14
jmp 0x4ba54
movq %rsp, %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x4ad7c
movslq %eax, %r14
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %cl
xorl %eax, %eax
jmp 0x4b9f4
leaq 0x79f13(%rip), %rdi     # 0xc5982
leaq 0x79f18(%rip), %rsi     # 0xc598e
movl $0x181, %edx            # imm = 0x181
callq 0x654e1
movl $0x1, %edi
callq 0x263d0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/rdb.c
// Function: rdbSaveStringObject
int rdbSaveStringObject(rio *rdb, robj *obj) {
    /* Avoid to decode the object, then encode it again, if the
     * object is already integer encoded. */
    if (obj->encoding == OBJ_ENCODING_INT) {
        return rdbSaveLongLongAsStringObject(rdb,(long)obj->ptr);
    } else {
        serverAssertWithInfo(NULL,obj,sdsEncodedObject(obj));
        return rdbSaveRawString(rdb,obj->ptr,sdslen(obj->ptr));
    }
}

// Assembly:
pushq %rax
movl (%rsi), %eax
shrl $0x4, %eax
andl $0xf, %eax
je 0x4baaa
cmpl $0x8, %eax
je 0x4baaa
cmpl $0x1, %eax
jne 0x4baf1
movq 0x8(%rsi), %rsi
callq 0x4b97f
jmp 0x4baef
movq 0x8(%rsi), %rsi
movzbl -0x1(%rsi), %edx
movl %edx, %eax
andl $0x7, %eax
cmpl $0x4, %eax
ja 0x4bae8
leaq 0x79c99(%rip), %rcx     # 0xc575c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
shrl $0x3, %edx
jmp 0x4baea
movq -0x11(%rsi), %rdx
jmp 0x4baea
movzwl -0x5(%rsi), %edx
jmp 0x4baea
movl -0x9(%rsi), %edx
jmp 0x4baea
movzbl -0x3(%rsi), %edx
jmp 0x4baea
xorl %edx, %edx
callq 0x4b8a5
popq %rcx
retq
leaq 0x79e9c(%rip), %rdx     # 0xc5994
leaq 0x79e8f(%rip), %rcx     # 0xc598e
xorl %edi, %edi
movl $0x191, %r8d            # imm = 0x191
callq 0x66380
movl $0x1, %edi
callq 0x263d0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/rdb.c
// Function: rdbSaveDoubleValue
int rdbSaveDoubleValue(rio *rdb, double val) {
    unsigned char buf[128];
    int len;

    if (isnan(val)) {
        buf[0] = 253;
        len = 1;
    } else if (!isfinite(val)) {
        len = 1;
        buf[0] = (val < 0) ? 255 : 254;
    } else {
#if (DBL_MANT_DIG >= 52) && (LLONG_MAX == 0x7fffffffffffffffLL)
        /* Check if the float is in a safe range to be casted into a
         * long long. We are assuming that long long is 64 bit here.
         * Also we are assuming that there are no implementations around where
         * double has precision < 52 bit.
         *
         * Under this assumptions we test if a double is inside an interval
         * where casting to long long is safe. Then using two castings we
         * make sure the decimal part is zero. If all this is true we use
         * integer printing function that is much faster. */
        double min = -4503599627370495; /* (2^52)-1 */
        double max = 4503599627370496; /* -(2^52) */
        if (val > min && val < max && val == ((double)((long long)val)))
            ll2string((char*)buf+1,sizeof(buf)-1,(long long)val);
        else
#endif
            snprintf((char*)buf+1,sizeof(buf)-1,"%.17g",val);
        buf[0] = strlen((char*)buf+1);
        len = buf[0]+1;
    }
    return rdbWriteRaw(rdb,buf,len);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
ucomisd %xmm0, %xmm0
jp 0x4bd66
movq %xmm0, %rax
btrq $0x3f, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
cmpq %rcx, %rax
jl 0x4bd23
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
seta %al
orb $-0x2, %al
movb %al, (%rsp)
movl $0x1, %edx
jmp 0x4bd50
leaq 0x1(%rsp), %r14
leaq 0x77238(%rip), %rdx     # 0xc2f67
movl $0x7f, %esi
movq %r14, %rdi
movb $0x1, %al
callq 0x26120
movq %r14, %rdi
callq 0x26510
movb %al, -0x1(%r14)
movzbl %al, %edx
incq %rdx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x4ad7c
addq $0x88, %rsp
popq %rbx
popq %r14
retq
movb $-0x3, (%rsp)
jmp 0x4bd1c
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/rdb.c
// Function: rdbSaveObjectType
int rdbSaveObjectType(rio *rdb, robj *o) {
    switch (o->type) {
    case OBJ_STRING:
        return rdbSaveType(rdb,RDB_TYPE_STRING);
    case OBJ_LIST:
        if (o->encoding == OBJ_ENCODING_QUICKLIST)
            return rdbSaveType(rdb,RDB_TYPE_LIST_QUICKLIST);
        else
            serverPanic("Unknown list encoding");
    case OBJ_SET:
        if (o->encoding == OBJ_ENCODING_INTSET)
            return rdbSaveType(rdb,RDB_TYPE_SET_INTSET);
        else if (o->encoding == OBJ_ENCODING_HT)
            return rdbSaveType(rdb,RDB_TYPE_SET);
        else
            serverPanic("Unknown set encoding");
    case OBJ_ZSET:
        if (o->encoding == OBJ_ENCODING_ZIPLIST)
            return rdbSaveType(rdb,RDB_TYPE_ZSET_ZIPLIST);
        else if (o->encoding == OBJ_ENCODING_SKIPLIST)
            return rdbSaveType(rdb,RDB_TYPE_ZSET);
        else
            serverPanic("Unknown sorted set encoding");
    case OBJ_HASH:
        if (o->encoding == OBJ_ENCODING_ZIPLIST)
            return rdbSaveType(rdb,RDB_TYPE_HASH_ZIPLIST);
        else if (o->encoding == OBJ_ENCODING_HT)
            return rdbSaveType(rdb,RDB_TYPE_HASH);
        else
            serverPanic("Unknown hash encoding");
    default:
        serverPanic("Unknown object type");
    }
    return -1; /* avoid warning */
}

// Assembly:
pushq %rax
movl (%rsi), %eax
movl %eax, %ecx
andl $0xf, %ecx
cmpl $0x4, %ecx
ja 0x4bfb8
leaq 0x79879(%rip), %rdx     # 0xc5770
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq %rsp, %rsi
movb $0x0, (%rsi)
jmp 0x4bf97
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x2, %eax
je 0x4bf7b
cmpl $0x5, %eax
jne 0x4bfcd
leaq 0x6(%rsp), %rsi
movb $0xd, (%rsi)
jmp 0x4bf97
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x2, %eax
je 0x4bf85
cmpl $0x6, %eax
jne 0x4bfe2
leaq 0x2(%rsp), %rsi
movb $0xb, (%rsi)
jmp 0x4bf97
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x7, %eax
je 0x4bf8f
cmpl $0x5, %eax
jne 0x4bff7
leaq 0x4(%rsp), %rsi
movb $0xc, (%rsi)
jmp 0x4bf97
andl $0xf0, %eax
cmpl $0x90, %eax
jne 0x4bfa3
leaq 0x1(%rsp), %rsi
movb $0xe, (%rsi)
jmp 0x4bf97
leaq 0x7(%rsp), %rsi
movb $0x4, (%rsi)
jmp 0x4bf97
leaq 0x3(%rsp), %rsi
movb $0x2, (%rsi)
jmp 0x4bf97
leaq 0x5(%rsp), %rsi
movb $0x3, (%rsi)
movl $0x1, %edx
callq 0x4ad7c
popq %rcx
retq
leaq 0x79a28(%rip), %rdi     # 0xc59d2
leaq 0x799dd(%rip), %rsi     # 0xc598e
movl $0x215, %edx            # imm = 0x215
jmp 0x4c00a
leaq 0x77d17(%rip), %rdi     # 0xc3cd6
leaq 0x799c8(%rip), %rsi     # 0xc598e
movl $0x22c, %edx            # imm = 0x22C
jmp 0x4c00a
leaq 0x79a2d(%rip), %rdi     # 0xc5a01
leaq 0x799b3(%rip), %rsi     # 0xc598e
movl $0x22a, %edx            # imm = 0x22A
jmp 0x4c00a
leaq 0x79a01(%rip), %rdi     # 0xc59ea
leaq 0x7999e(%rip), %rsi     # 0xc598e
movl $0x21c, %edx            # imm = 0x21C
jmp 0x4c00a
leaq 0x77c78(%rip), %rdi     # 0xc3c76
leaq 0x79989(%rip), %rsi     # 0xc598e
movl $0x223, %edx            # imm = 0x223
callq 0x6558d
movl $0x1, %edi
callq 0x263d0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/rdb.c
// Function: rdbSaveAuxField
int rdbSaveAuxField(rio *rdb, void *key, size_t keylen, void *val, size_t vallen) {
    if (rdbSaveType(rdb,RDB_OPCODE_AUX) == -1) return -1;
    if (rdbSaveRawString(rdb,key,keylen) == -1) return -1;
    if (rdbSaveRawString(rdb,val,vallen) == -1) return -1;
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r15
leaq 0x7(%rsp), %rsi
movb $-0x6, (%rsi)
movl $0x1, %edx
callq 0x4ad7c
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $-0x1, %eax
je 0x4c50b
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x4b8a5
cmpq $-0x1, %rax
je 0x4c50b
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x4b8a5
xorl %ecx, %ecx
cmpq $-0x1, %rax
setne %cl
leal -0x1(,%rcx,2), %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/rdb.c
// Function: rdbSaveInfoAuxFields
int rdbSaveInfoAuxFields(rio *rdb) {
    int redis_bits = (sizeof(void*) == 8) ? 64 : 32;

    /* Add a few fields about the state when the RDB was created. */
    if (rdbSaveAuxFieldStrStr(rdb,"redis-ver",REDIS_VERSION) == -1) return -1;
    if (rdbSaveAuxFieldStrInt(rdb,"redis-bits",redis_bits) == -1) return -1;
    if (rdbSaveAuxFieldStrInt(rdb,"ctime",time(NULL)) == -1) return -1;
    if (rdbSaveAuxFieldStrInt(rdb,"used-mem",zmalloc_used_memory()) == -1) return -1;
    return 1;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x7946e(%rip), %rsi     # 0xc5a23
leaq 0x75cc4(%rip), %rdx     # 0xc2280
callq 0x4c51c
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $-0x1, %eax
je 0x4c628
leaq 0x7945b(%rip), %rsi     # 0xc5a2d
movl $0x40, %edx
movq %rbx, %rdi
callq 0x4c55f
cmpl $-0x1, %eax
je 0x4c628
xorl %edi, %edi
callq 0x26ce0
leaq 0x79446(%rip), %rsi     # 0xc5a38
movq %rbx, %rdi
movq %rax, %rdx
callq 0x4c55f
cmpl $-0x1, %eax
je 0x4c628
callq 0x3b446
leaq 0x79430(%rip), %rsi     # 0xc5a3e
movq %rbx, %rdi
movq %rax, %rdx
callq 0x4c55f
xorl %ecx, %ecx
cmpl $-0x1, %eax
setne %cl
leal -0x1(,%rcx,2), %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/rdb.c
// Function: rdbLoadProgressCallback
void rdbLoadProgressCallback(rio *r, const void *buf, size_t len) {
    if (server.rdb_checksum)
        rioGenericUpdateChecksum(r, buf, len);
    if (server.loading_process_events_interval_bytes &&
        (r->processed_bytes + len)/server.loading_process_events_interval_bytes > r->processed_bytes/server.loading_process_events_interval_bytes)
    {
        /* The DB can take some non trivial amount of time to load. Update
         * our cached time since it is used to create and update the last
         * interaction time with clients and for other important things. */
        updateCachedTime();
        if (server.masterhost && server.repl_state == REPL_STATE_TRANSFER)
            replicationSendNewlineToMaster();
        loadingProgress(r->processed_bytes);
        processEventsWhileBlocked();
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
leaq 0xb8e4b(%rip), %r15     # 0x106858
cmpl $0x0, 0x744(%r15)
je 0x4da22
movq %rbx, %rdi
movq %r14, %rdx
callq 0x7623d
movq 0x338(%r15), %rdi
testq %rdi, %rdi
je 0x4da7e
movq 0x30(%rbx), %rcx
addq %rcx, %r14
movq %r14, %rax
xorl %edx, %edx
divq %rdi
movq %rax, %rsi
movq %rcx, %rax
xorl %edx, %edx
divq %rdi
cmpq %rax, %rsi
jbe 0x4da7e
callq 0x33d54
cmpq $0x0, 0x818(%r15)
je 0x4da6b
cmpl $0xe, 0x83c(%r15)
jne 0x4da6b
callq 0x4893a
movq 0x30(%rbx), %rdi
callq 0x4d9b2
popq %rbx
popq %r14
popq %r15
jmp 0x42e34
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/rdb.c
// Function: saveCommand
void saveCommand(client *c) {
    if (server.rdb_child_pid != -1) {
        addReplyError(c,"Background save already in progress");
        return;
    }
    if (rdbSave(server.rdb_filename) == C_OK) {
        addReply(c,shared.ok);
    } else {
        addReply(c,shared.err);
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0xb80d6(%rip), %rax     # 0x106858
cmpl $-0x1, 0x720(%rax)
je 0x4e79b
leaq 0x77824(%rip), %rsi     # 0xc5fb6
movq %rbx, %rdi
popq %rbx
jmp 0x3ffcb
movq 0x738(%rax), %rdi
callq 0x4cb97
testl %eax, %eax
je 0x4e7b8
leaq 0xb8afe(%rip), %rax     # 0x1072b0
movq 0x10(%rax), %rsi
jmp 0x4e7c3
leaq 0xb8af1(%rip), %rax     # 0x1072b0
movq 0x8(%rax), %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x3fc19
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/rdb.c
// Function: bgsaveCommand
void bgsaveCommand(client *c) {
    int schedule = 0;

    /* The SCHEDULE option changes the behavior of BGSAVE when an AOF rewrite
     * is in progress. Instead of returning an error a BGSAVE gets scheduled. */
    if (c->argc > 1) {
        if (c->argc == 2 && !strcasecmp(c->argv[1]->ptr,"schedule")) {
            schedule = 1;
        } else {
            addReply(c,shared.syntaxerr);
            return;
        }
    }

    if (server.rdb_child_pid != -1) {
        addReplyError(c,"Background save already in progress");
    } else if (server.aof_child_pid != -1) {
        if (schedule) {
            server.rdb_bgsave_scheduled = 1;
            addReplyStatus(c,"Background saving scheduled");
        } else {
            addReplyError(c,
                "An AOF log rewriting in progress: can't BGSAVE right now. "
                "Use BGSAVE SCHEDULE in order to schedule a BGSAVE whenver "
                "possible.");
        }
    } else if (rdbSaveBackground(server.rdb_filename) == C_OK) {
        addReplyStatus(c,"Background saving started");
    } else {
        addReply(c,shared.err);
    }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x38(%rdi), %ebp
cmpl $0x2, %ebp
jge 0x4e7ff
leaq 0xb8077(%rip), %rax     # 0x106858
cmpl $-0x1, 0x720(%rax)
je 0x4e839
leaq 0x777c5(%rip), %rsi     # 0xc5fb6
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3ffcb
jne 0x4e81d
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x777c6(%rip), %rsi     # 0xc5fda
callq 0x26300
testl %eax, %eax
je 0x4e7da
leaq 0xb8a8c(%rip), %rax     # 0x1072b0
movq 0x80(%rax), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3fc19
cmpl $-0x1, 0x68c(%rax)
je 0x4e850
cmpl $0x2, %ebp
jge 0x4e86d
leaq 0x777b1(%rip), %rsi     # 0xc5fff
jmp 0x4e7f1
movq 0x738(%rax), %rdi
callq 0x4cd9b
testl %eax, %eax
je 0x4e880
leaq 0xb8a49(%rip), %rax     # 0x1072b0
movq 0x10(%rax), %rsi
jmp 0x4e82b
movl $0x1, 0x768(%rax)
leaq 0x77765(%rip), %rsi     # 0xc5fe3
jmp 0x4e887
leaq 0x777f6(%rip), %rsi     # 0xc607d
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x40192
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/t_string.c
// Function: setGenericCommand
void setGenericCommand(client *c, int flags, robj *key, robj *val, robj *expire, int unit, robj *ok_reply, robj *abort_reply) {
    long long milliseconds = 0; /* initialized to avoid any harmness warning */

    if (expire) {
        if (getLongLongFromObjectOrReply(c, expire, &milliseconds, NULL) != C_OK)
            return;
        if (milliseconds <= 0) {
            addReplyErrorFormat(c,"invalid expire time in %s",c->cmd->name);
            return;
        }
        if (unit == UNIT_SECONDS) milliseconds *= 1000;
    }

    if ((flags & OBJ_SET_NX && lookupKeyWrite(c->db,key) != NULL) ||
        (flags & OBJ_SET_XX && lookupKeyWrite(c->db,key) == NULL))
    {
        addReply(c, abort_reply ? abort_reply : shared.nullbulk);
        return;
    }
    setKey(c->db,key,val);
    server.dirty++;
    if (expire) setExpire(c->db,key,mstime()+milliseconds);
    notifyKeyspaceEvent(NOTIFY_STRING,"set",key,c->db->id);
    if (expire) notifyKeyspaceEvent(NOTIFY_GENERIC,
        "expire",key,c->db->id);
    addReply(c, ok_reply ? ok_reply : shared.ok);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
movq $0x0, (%rsp)
testq %r8, %r8
je 0x4e8f6
movl %r9d, %r13d
movq %rsp, %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x44b44
testl %eax, %eax
jne 0x4e9e8
movq (%rsp), %rax
testq %rax, %rax
jle 0x4e9f7
testl %r13d, %r13d
jne 0x4e8f6
imulq $0x3e8, %rax, %rax      # imm = 0x3E8
movq %rax, (%rsp)
testb $0x1, %bpl
je 0x4e911
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x44f66
testq %rax, %rax
jne 0x4e99a
testb $0x2, %bpl
je 0x4e928
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x44f66
testq %rax, %rax
je 0x4e99a
movq 0x40(%rsp), %r13
movq 0x10(%rbx), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x45162
leaq 0xb7f15(%rip), %rax     # 0x106858
incq 0x710(%rax)
movq 0x10(%rbx), %r12
testq %r15, %r15
je 0x4e9b4
callq 0x330c8
addq (%rsp), %rax
movq %r12, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x46505
movq 0x10(%rbx), %rax
movl 0x30(%rax), %ecx
leaq 0x71edb(%rip), %rsi     # 0xc0853
movl $0x8, %edi
movq %r14, %rdx
callq 0x800c9
movq 0x10(%rbx), %rax
movl 0x30(%rax), %ecx
leaq 0x83874(%rip), %rsi     # 0xd2207
movl $0x4, %edi
jmp 0x4e9c5
movq 0x48(%rsp), %rsi
testq %rsi, %rsi
jne 0x4e9af
leaq 0xb8905(%rip), %rax     # 0x1072b0
movq 0x50(%rax), %rsi
movq %rbx, %rdi
jmp 0x4e9e3
movl 0x30(%r12), %ecx
leaq 0x71e93(%rip), %rsi     # 0xc0853
movl $0x8, %edi
movq %r14, %rdx
callq 0x800c9
testq %r13, %r13
jne 0x4e9dd
leaq 0xb88d7(%rip), %rax     # 0x1072b0
movq 0x8(%rax), %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x3fc19
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x48(%rbx), %rax
movq (%rax), %rdx
leaq 0x77797(%rip), %rsi     # 0xc619c
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3fff2
jmp 0x4e9e8
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/t_string.c
// Function: getGenericCommand
int getGenericCommand(client *c) {
    robj *o;

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

    if (o->type != OBJ_STRING) {
        addReply(c,shared.wrongtypeerr);
        return C_ERR;
    } else {
        addReplyBulk(c,o);
        return C_OK;
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movq 0x8(%rax), %rsi
leaq 0xb8575(%rip), %r14     # 0x1072b0
movq 0x50(%r14), %rdx
callq 0x44f89
xorl %ebp, %ebp
testq %rax, %rax
je 0x4ed6e
testb $0xf, (%rax)
je 0x4ed63
movq 0x70(%r14), %rsi
movq %rbx, %rdi
callq 0x3fc19
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x4ed6e
movq %rbx, %rdi
movq %rax, %rsi
callq 0x40537
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/t_string.c
// Function: getsetCommand
void getsetCommand(client *c) {
    if (getGenericCommand(c) == C_ERR) return;
    c->argv[2] = tryObjectEncoding(c->argv[2]);
    setKey(c->db,c->argv[1],c->argv[2]);
    notifyKeyspaceEvent(NOTIFY_STRING,"set",c->argv[1],c->db->id);
    server.dirty++;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x4ed25
cmpl $-0x1, %eax
je 0x4ede0
movq 0x40(%rbx), %rax
movq 0x10(%rax), %rdi
callq 0x4426d
movq 0x40(%rbx), %rcx
movq %rax, 0x10(%rcx)
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
callq 0x45162
movq 0x10(%rbx), %rax
movq 0x40(%rbx), %rcx
movq 0x8(%rcx), %rdx
movl 0x30(%rax), %ecx
leaq 0x71a8b(%rip), %rsi     # 0xc0853
movl $0x8, %edi
callq 0x800c9
leaq 0xb7a7f(%rip), %rax     # 0x106858
incq 0x710(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/t_string.c
// Function: getrangeCommand
void getrangeCommand(client *c) {
    robj *o;
    long long start, end;
    char *str, llbuf[32];
    size_t strlen;

    if (getLongLongFromObjectOrReply(c,c->argv[2],&start,NULL) != C_OK)
        return;
    if (getLongLongFromObjectOrReply(c,c->argv[3],&end,NULL) != C_OK)
        return;
    if ((o = lookupKeyReadOrReply(c,c->argv[1],shared.emptybulk)) == NULL ||
        checkType(c,o,OBJ_STRING)) return;

    if (o->encoding == OBJ_ENCODING_INT) {
        str = llbuf;
        strlen = ll2string(llbuf,sizeof(llbuf),(long)o->ptr);
    } else {
        str = o->ptr;
        strlen = sdslen(str);
    }

    /* Convert negative indexes */
    if (start < 0 && end < 0 && start > end) {
        addReply(c,shared.emptybulk);
        return;
    }
    if (start < 0) start = strlen+start;
    if (end < 0) end = strlen+end;
    if (start < 0) start = 0;
    if (end < 0) end = 0;
    if ((unsigned long long)end >= strlen) end = strlen-1;

    /* Precondition: end >= 0 && end < strlen, so the only condition where
     * nothing can be returned is: start > end. */
    if (start > end || strlen == 0) {
        addReply(c,shared.emptybulk);
    } else {
        addReplyBulkCBuffer(c,(char*)str+start,end-start+1);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movq 0x10(%rax), %rsi
leaq 0x8(%rsp), %rdx
xorl %ecx, %ecx
callq 0x44b44
testl %eax, %eax
jne 0x4f260
movq 0x40(%rbx), %rax
movq 0x18(%rax), %rsi
movq %rsp, %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x44b44
testl %eax, %eax
je 0x4f26c
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
leaq 0xb8035(%rip), %r12     # 0x1072b0
movq 0x18(%r12), %rdx
movq %rbx, %rdi
callq 0x44f89
testq %rax, %rax
je 0x4f260
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x441ab
testl %eax, %eax
jne 0x4f260
movl $0xf0, %eax
andl (%r14), %eax
movq 0x8(%r14), %r14
cmpl $0x10, %eax
jne 0x4f2ce
leaq 0x10(%rsp), %r15
movl $0x20, %esi
movq %r15, %rdi
movq %r14, %rdx
callq 0x433e5
cltq
movq %r15, %r14
jmp 0x4f2d6
movq %r14, %rdi
callq 0x4f1e9
movq 0x8(%rsp), %rdx
movq (%rsp), %rcx
testq %rdx, %rdx
jns 0x4f300
testq %rcx, %rcx
jns 0x4f300
cmpq %rcx, %rdx
jle 0x4f300
movq 0x18(%r12), %rsi
movq %rbx, %rdi
callq 0x3fc19
jmp 0x4f260
testq %rdx, %rdx
jns 0x4f30d
addq %rax, %rdx
movq %rdx, 0x8(%rsp)
testq %rcx, %rcx
jns 0x4f319
addq %rax, %rcx
movq %rcx, (%rsp)
cmpq $0x0, 0x8(%rsp)
jns 0x4f32a
movq $0x0, 0x8(%rsp)
cmpq $0x0, (%rsp)
jns 0x4f339
movq $0x0, (%rsp)
cmpq %rax, (%rsp)
jb 0x4f347
leaq -0x1(%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rsp), %rcx
movq (%rsp), %rdx
subq %rcx, %rdx
jl 0x4f2ee
testq %rax, %rax
je 0x4f2ee
addq %rcx, %r14
incq %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4070f
jmp 0x4f260
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/t_string.c
// Function: mgetCommand
void mgetCommand(client *c) {
    int j;

    addReplyMultiBulkLen(c,c->argc-1);
    for (j = 1; j < c->argc; j++) {
        robj *o = lookupKeyRead(c->db,c->argv[j]);
        if (o == NULL) {
            addReply(c,shared.nullbulk);
        } else {
            if (o->type != OBJ_STRING) {
                addReply(c,shared.nullbulk);
            } else {
                addReplyBulk(c,o);
            }
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movslq 0x38(%rdi), %rsi
decq %rsi
callq 0x4063b
cmpl $0x2, 0x38(%rbx)
jl 0x4f3d7
movl $0x1, %r14d
leaq 0xb7f19(%rip), %r15     # 0x1072b0
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq (%rax,%r14,8), %rsi
callq 0x44f5f
testq %rax, %rax
je 0x4f3b2
testb $0xf, (%rax)
je 0x4f3c0
movq 0x50(%r15), %rsi
movq %rbx, %rdi
callq 0x3fc19
jmp 0x4f3cb
movq %rbx, %rdi
movq %rax, %rsi
callq 0x40537
incq %r14
movslq 0x38(%rbx), %rax
cmpq %rax, %r14
jl 0x4f397
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/t_string.c
// Function: msetGenericCommand
void msetGenericCommand(client *c, int nx) {
    int j, busykeys = 0;

    if ((c->argc % 2) == 0) {
        addReplyError(c,"wrong number of arguments for MSET");
        return;
    }
    /* Handle the NX flag. The MSETNX semantic is to return zero and don't
     * set nothing at all if at least one already key exists. */
    if (nx) {
        for (j = 1; j < c->argc; j += 2) {
            if (lookupKeyWrite(c->db,c->argv[j]) != NULL) {
                busykeys++;
            }
        }
        if (busykeys) {
            addReply(c, shared.czero);
            return;
        }
    }

    for (j = 1; j < c->argc; j += 2) {
        c->argv[j+1] = tryObjectEncoding(c->argv[j+1]);
        setKey(c->db,c->argv[j],c->argv[j+1]);
        notifyKeyspaceEvent(NOTIFY_STRING,"set",c->argv[j],c->db->id);
    }
    server.dirty += (c->argc-1)/2;
    addReply(c, nx ? shared.cone : shared.ok);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testb $0x1, 0x38(%rdi)
jne 0x4f406
leaq 0x76dd9(%rip), %rsi     # 0xc61cd
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3ffcb
movl %esi, %ebp
testl %esi, %esi
je 0x4f453
cmpl $0x2, 0x38(%rbx)
jl 0x4f453
xorl %r14d, %r14d
movl $0x1, %r15d
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq (%rax,%r15,8), %rsi
callq 0x44f66
cmpq $0x1, %rax
sbbl $-0x1, %r14d
addq $0x2, %r15
cmpl %r15d, 0x38(%rbx)
jg 0x4f41b
testl %r14d, %r14d
je 0x4f453
leaq 0xb7e66(%rip), %rax     # 0x1072b0
movq 0x20(%rax), %rsi
jmp 0x4f4f0
movl 0x38(%rbx), %eax
cmpl $0x2, %eax
jl 0x4f4bd
movl $0x1, %r15d
leaq 0x713eb(%rip), %r14     # 0xc0853
movq 0x40(%rbx), %rax
movq 0x8(%rax,%r15,8), %rdi
callq 0x4426d
movq 0x40(%rbx), %rcx
movq %rax, 0x8(%rcx,%r15,8)
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq (%rax,%r15,8), %rsi
movq 0x8(%rax,%r15,8), %rdx
callq 0x45162
movq 0x10(%rbx), %rax
movq 0x40(%rbx), %rcx
movq (%rcx,%r15,8), %rdx
movl 0x30(%rax), %ecx
movl $0x8, %edi
movq %r14, %rsi
callq 0x800c9
addq $0x2, %r15
movl 0x38(%rbx), %eax
cmpl %r15d, %eax
jg 0x4f468
xorl %ecx, %ecx
testl %ebp, %ebp
setne %cl
movl %eax, %edx
decl %edx
shrl $0x1f, %edx
addl %edx, %eax
decl %eax
sarl %eax
cltq
leaq 0xb737e(%rip), %rdx     # 0x106858
addq %rax, 0x710(%rdx)
leaq 0xb7dc8(%rip), %rax     # 0x1072b0
shll $0x5, %ecx
movq 0x8(%rax,%rcx), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3fc19
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/t_string.c
// Function: incrDecrCommand
void incrDecrCommand(client *c, long long incr) {
    long long value, oldvalue;
    robj *o, *new;

    o = lookupKeyWrite(c->db,c->argv[1]);
    if (o != NULL && checkType(c,o,OBJ_STRING)) return;
    if (getLongLongFromObjectOrReply(c,o,&value,NULL) != C_OK) return;

    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;

    if (o && o->refcount == 1 && o->encoding == OBJ_ENCODING_INT &&
        (value < 0 || value >= OBJ_SHARED_INTEGERS) &&
        value >= LONG_MIN && value <= LONG_MAX)
    {
        new = o;
        o->ptr = (void*)((long)value);
    } else {
        new = createStringObjectFromLongLong(value);
        if (o) {
            dbOverwrite(c->db,c->argv[1],new);
        } else {
            dbAdd(c->db,c->argv[1],new);
        }
    }
    signalModifiedKey(c->db,c->argv[1]);
    notifyKeyspaceEvent(NOTIFY_STRING,"incrby",c->argv[1],c->db->id);
    server.dirty++;
    addReply(c,shared.colon);
    addReply(c,new);
    addReply(c,shared.crlf);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
callq 0x44f66
movq %rax, %r14
testq %rax, %rax
je 0x4f550
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x441ab
testl %eax, %eax
jne 0x4f686
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x44b44
testl %eax, %eax
jne 0x4f686
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
movq 0x8(%rsp), %rdi
subq %rdi, %rax
testq %r15, %r15
jns 0x4f58f
testq %rdi, %rdi
jns 0x4f58f
leaq 0x1(%rax), %rcx
cmpq %r15, %rcx
jg 0x4f5a9
testq %r15, %r15
setg %cl
testq %rdi, %rdi
setg %dl
andb %cl, %dl
cmpq %r15, %rax
setl %al
andb %dl, %al
cmpb $0x1, %al
jne 0x4f5bd
leaq 0x76c40(%rip), %rsi     # 0xc61f0
movq %rbx, %rdi
callq 0x3ffcb
jmp 0x4f686
addq %r15, %rdi
movq %rdi, 0x8(%rsp)
testq %r14, %r14
je 0x4f5f6
cmpl $0x1, 0x4(%r14)
jne 0x4f5f6
movl $0xf0, %eax
andl (%r14), %eax
cmpl $0x10, %eax
sete %al
cmpq $0x2710, %rdi           # imm = 0x2710
setae %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x4f5f6
movq %rdi, 0x8(%r14)
jmp 0x4f61e
callq 0x43bb7
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rcx
movq 0x8(%rcx), %rsi
testq %r14, %r14
movq %rax, %r14
movq %rax, %rdx
je 0x4f619
callq 0x45107
jmp 0x4f61e
callq 0x45007
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 0x700f1(%rip), %rsi     # 0xbf736
movl $0x8, %edi
callq 0x800c9
leaq 0xb7202(%rip), %rax     # 0x106858
incq 0x710(%rax)
leaq 0xb7c4c(%rip), %r15     # 0x1072b0
movq 0x48(%r15), %rsi
movq %rbx, %rdi
callq 0x3fc19
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3fc19
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x3fc19
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/t_string.c
// Function: incrbyfloatCommand
void incrbyfloatCommand(client *c) {
    long double incr, value;
    robj *o, *new, *aux;

    o = lookupKeyWrite(c->db,c->argv[1]);
    if (o != NULL && checkType(c,o,OBJ_STRING)) return;
    if (getLongDoubleFromObjectOrReply(c,o,&value,NULL) != C_OK ||
        getLongDoubleFromObjectOrReply(c,c->argv[2],&incr,NULL) != C_OK)
        return;

    value += incr;
    if (isnan(value) || isinf(value)) {
        addReplyError(c,"increment would produce NaN or Infinity");
        return;
    }
    new = createStringObjectFromLongDouble(value,1);
    if (o)
        dbOverwrite(c->db,c->argv[1],new);
    else
        dbAdd(c->db,c->argv[1],new);
    signalModifiedKey(c->db,c->argv[1]);
    notifyKeyspaceEvent(NOTIFY_STRING,"incrbyfloat",c->argv[1],c->db->id);
    server.dirty++;
    addReplyBulk(c,new);

    /* Always replicate INCRBYFLOAT as a SET command with the final value
     * in order to make sure that differences in float precision or formatting
     * will not create differences in replicas or after an AOF restart. */
    aux = createStringObject("SET",3);
    rewriteClientCommandArgument(c,0,aux);
    decrRefCount(aux);
    rewriteClientCommandArgument(c,2,new);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
callq 0x44f66
movq %rax, %r14
testq %rax, %rax
je 0x4f748
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x441ab
testl %eax, %eax
jne 0x4f88e
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x449fa
testl %eax, %eax
jne 0x4f88e
movq 0x40(%rbx), %rax
movq 0x10(%rax), %rsi
leaq 0x30(%rsp), %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x449fa
testl %eax, %eax
jne 0x4f88e
fldt 0x30(%rsp)
fldt 0x20(%rsp)
faddp %st, %st(1)
fld %st(0)
fstpt 0x10(%rsp)
movzwl 0x18(%rsp), %eax
movq 0x10(%rsp), %rcx
fld %st(0)
fstpt 0x20(%rsp)
shrq $0x3f, %rcx
andl $0x7fff, %eax           # imm = 0x7FFF
leal -0x1(%rax), %edx
movzwl %dx, %edx
cmpl $0x7ffe, %edx           # imm = 0x7FFE
setb %dl
andb %cl, %dl
testq %rax, %rax
sete %al
orb %dl, %al
jne 0x4f7db
fstp %st(0)
leaq 0x76a48(%rip), %rsi     # 0xc6216
movq %rbx, %rdi
callq 0x3ffcb
jmp 0x4f88e
fstpt (%rsp)
movl $0x1, %edi
callq 0x43c10
movq %rax, %r15
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
movq %r15, %rdx
testq %r14, %r14
je 0x4f806
callq 0x45107
jmp 0x4f80b
callq 0x45007
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 0x6ff0c(%rip), %rsi     # 0xbf73e
movl $0x8, %edi
callq 0x800c9
leaq 0xb7015(%rip), %rax     # 0x106858
incq 0x710(%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x40537
leaq 0x80a58(%rip), %rdi     # 0xd02b4
movl $0x3, %esi
callq 0x43ba8
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x42c2e
movq %r14, %rdi
callq 0x440f3
movq %rbx, %rdi
movl $0x2, %esi
movq %r15, %rdx
callq 0x42c2e
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/t_string.c
// Function: strlenCommand
void strlenCommand(client *c) {
    robj *o;
    if ((o = lookupKeyReadOrReply(c,c->argv[1],shared.czero)) == NULL ||
        checkType(c,o,OBJ_STRING)) return;
    addReplyLongLong(c,stringObjectLen(o));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movq 0x8(%rax), %rsi
leaq 0xb7805(%rip), %rax     # 0x1072b0
movq 0x20(%rax), %rdx
callq 0x44f89
testq %rax, %rax
je 0x4facd
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x441ab
testl %eax, %eax
je 0x4fad5
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %r14, %rdi
callq 0x446f9
movq %rbx, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x40606
nop
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/t_list.c
// Function: listTypePush
void listTypePush(robj *subject, robj *value, int where) {
    if (subject->encoding == OBJ_ENCODING_QUICKLIST) {
        int pos = (where == LIST_HEAD) ? QUICKLIST_HEAD : QUICKLIST_TAIL;
        value = getDecodedObject(value);
        size_t len = sdslen(value->ptr);
        quicklistPush(subject->ptr, value->ptr, len, pos);
        decrRefCount(value);
    } else {
        serverPanic("Unknown list encoding");
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl $0xf0, %eax
andl (%rdi), %eax
cmpl $0x90, %eax
jne 0x4fb6d
movl %edx, %ebp
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x444b2
movq %rax, %r14
movq 0x8(%rax), %rsi
movzbl -0x1(%rsi), %edx
movl %edx, %eax
andl $0x7, %eax
xorl %ecx, %ecx
cmpl $0x4, %eax
ja 0x4fb52
leaq 0x7673f(%rip), %rdi     # 0xc626c
movslq (%rdi,%rax,4), %rax
addq %rdi, %rax
jmpq *%rax
shrl $0x3, %edx
jmp 0x4fb54
movq -0x11(%rsi), %rdx
jmp 0x4fb54
movzwl -0x5(%rsi), %edx
jmp 0x4fb54
movl -0x9(%rsi), %edx
jmp 0x4fb54
movzbl -0x3(%rsi), %edx
jmp 0x4fb54
xorl %edx, %edx
negl %ebp
sbbl %ecx, %ecx
movq 0x8(%rbx), %rdi
callq 0x2fcbc
movq %r14, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x440f3
leaq 0x75e5e(%rip), %rdi     # 0xc59d2
leaq 0x76741(%rip), %rsi     # 0xc62bc
movl $0x31, %edx
callq 0x6558d
movl $0x1, %edi
callq 0x263d0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/t_list.c
// Function: listTypePop
robj *listTypePop(robj *subject, int where) {
    long long vlong;
    robj *value = NULL;

    int ql_where = where == LIST_HEAD ? QUICKLIST_HEAD : QUICKLIST_TAIL;
    if (subject->encoding == OBJ_ENCODING_QUICKLIST) {
        if (quicklistPopCustom(subject->ptr, ql_where, (unsigned char **)&value,
                               NULL, &vlong, listPopSaver)) {
            if (!value)
                value = createStringObjectFromLongLong(vlong);
        }
    } else {
        serverPanic("Unknown list encoding");
    }
    return value;
}

// Assembly:
subq $0x18, %rsp
movq $0x0, 0x8(%rsp)
movl $0xf0, %eax
andl (%rdi), %eax
cmpl $0x90, %eax
jne 0x4fbfa
xorl %eax, %eax
negl %esi
sbbl %eax, %eax
movq 0x8(%rdi), %rdi
leaq -0x33(%rip), %r9        # 0x4fb8f
leaq 0x8(%rsp), %rdx
leaq 0x10(%rsp), %r8
movl %eax, %esi
xorl %ecx, %ecx
callq 0x2fb15
testl %eax, %eax
je 0x4fbf0
cmpq $0x0, 0x8(%rsp)
jne 0x4fbf0
movq 0x10(%rsp), %rdi
callq 0x43bb7
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
addq $0x18, %rsp
retq
leaq 0x75dd1(%rip), %rdi     # 0xc59d2
leaq 0x766b4(%rip), %rsi     # 0xc62bc
movl $0x45, %edx
callq 0x6558d
movl $0x1, %edi
callq 0x263d0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/t_list.c
// Function: listTypeLength
unsigned long listTypeLength(robj *subject) {
    if (subject->encoding == OBJ_ENCODING_QUICKLIST) {
        return quicklistCount(subject->ptr);
    } else {
        serverPanic("Unknown list encoding");
    }
}

// Assembly:
pushq %rax
movl $0xf0, %eax
andl (%rdi), %eax
cmpl $0x90, %eax
jne 0x4fc38
movq 0x8(%rdi), %rdi
callq 0x2e83c
movl %eax, %eax
popq %rcx
retq
leaq 0x75d93(%rip), %rdi     # 0xc59d2
leaq 0x76676(%rip), %rsi     # 0xc62bc
movl $0x4e, %edx
callq 0x6558d
movl $0x1, %edi
callq 0x263d0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/t_list.c
// Function: listTypeInitIterator
listTypeIterator *listTypeInitIterator(robj *subject, long index,
                                       unsigned char direction) {
    listTypeIterator *li = zmalloc(sizeof(listTypeIterator));
    li->subject = subject;
    li->encoding = subject->encoding;
    li->direction = direction;
    li->iter = NULL;
    /* LIST_HEAD means start at TAIL and move *towards* head.
     * LIST_TAIL means start at HEAD and move *towards tail. */
    int iter_direction =
        direction == LIST_HEAD ? AL_START_TAIL : AL_START_HEAD;
    if (li->encoding == OBJ_ENCODING_QUICKLIST) {
        li->iter = quicklistGetIteratorAtIdx(li->subject->ptr,
                                             iter_direction, index);
    } else {
        serverPanic("Unknown list encoding");
    }
    return li;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r15
movl $0x18, %edi
callq 0x3b29d
movq %rax, %r14
movq %r15, (%rax)
movb (%r15), %al
shrb $0x4, %al
movb %al, 0x8(%r14)
movb %bpl, 0x9(%r14)
movq $0x0, 0x10(%r14)
cmpb $0x9, %al
jne 0x4fcba
xorl %esi, %esi
testb %bpl, %bpl
sete %sil
movq 0x8(%r15), %rdi
movq %rbx, %rdx
callq 0x270a2
movq %rax, 0x10(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x75d11(%rip), %rdi     # 0xc59d2
leaq 0x765f4(%rip), %rsi     # 0xc62bc
movl $0x62, %edx
callq 0x6558d
movl $0x1, %edi
callq 0x263d0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/t_list.c
// Function: listTypeNext
int listTypeNext(listTypeIterator *li, listTypeEntry *entry) {
    /* Protect from converting when iterating */
    serverAssert(li->subject->encoding == li->encoding);

    entry->li = li;
    if (li->encoding == OBJ_ENCODING_QUICKLIST) {
        return quicklistNext(li->iter, &entry->entry);
    } else {
        serverPanic("Unknown list encoding");
    }
    return 0;
}

// Assembly:
pushq %rax
movq (%rdi), %rax
movl (%rax), %ecx
shrl $0x4, %ecx
andl $0xf, %ecx
movzbl 0x8(%rdi), %eax
cmpl %eax, %ecx
jne 0x4fd1b
movq %rdi, (%rsi)
cmpb $0x9, %al
jne 0x4fd35
movq 0x10(%rdi), %rdi
addq $0x8, %rsi
popq %rax
jmp 0x2f7a4
leaq 0x765a3(%rip), %rdi     # 0xc62c5
leaq 0x76593(%rip), %rsi     # 0xc62bc
movl $0x72, %edx
callq 0x654e1
jmp 0x4fd4d
leaq 0x75c96(%rip), %rdi     # 0xc59d2
leaq 0x76579(%rip), %rsi     # 0xc62bc
movl $0x78, %edx
callq 0x6558d
movl $0x1, %edi
callq 0x263d0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/t_list.c
// Function: listTypeGet
robj *listTypeGet(listTypeEntry *entry) {
    robj *value = NULL;
    if (entry->li->encoding == OBJ_ENCODING_QUICKLIST) {
        if (entry->entry.value) {
            value = createStringObject((char *)entry->entry.value,
                                       entry->entry.sz);
        } else {
            value = createStringObjectFromLongLong(entry->entry.longval);
        }
    } else {
        serverPanic("Unknown list encoding");
    }
    return value;
}

// Assembly:
movq (%rdi), %rax
cmpb $0x9, 0x8(%rax)
jne 0x4fd7d
movq 0x20(%rdi), %rax
testq %rax, %rax
je 0x4fd74
movl 0x30(%rdi), %esi
movq %rax, %rdi
jmp 0x43ba8
movq 0x28(%rdi), %rdi
jmp 0x43bb7
pushq %rax
leaq 0x75c4d(%rip), %rdi     # 0xc59d2
leaq 0x76530(%rip), %rsi     # 0xc62bc
movl $0x88, %edx
callq 0x6558d
movl $0x1, %edi
callq 0x263d0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/t_list.c
// Function: listTypeInsert
void listTypeInsert(listTypeEntry *entry, robj *value, int where) {
    if (entry->li->encoding == OBJ_ENCODING_QUICKLIST) {
        value = getDecodedObject(value);
        sds str = value->ptr;
        size_t len = sdslen(str);
        if (where == LIST_TAIL) {
            quicklistInsertAfter((quicklist *)entry->entry.quicklist,
                                 &entry->entry, str, len);
        } else if (where == LIST_HEAD) {
            quicklistInsertBefore((quicklist *)entry->entry.quicklist,
                                  &entry->entry, str, len);
        }
        decrRefCount(value);
    } else {
        serverPanic("Unknown list encoding");
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq (%rdi), %rax
cmpb $0x9, 0x8(%rax)
jne 0x4fe38
movl %edx, %ebp
movq %rdi, %r14
movq %rsi, %rdi
callq 0x444b2
movq %rax, %rbx
movq 0x8(%rax), %rdx
movzbl -0x1(%rdx), %ecx
movl %ecx, %eax
andl $0x7, %eax
cmpl $0x4, %eax
ja 0x4fdff
leaq 0x764a6(%rip), %rsi     # 0xc6280
movslq (%rsi,%rax,4), %rax
addq %rsi, %rax
jmpq *%rax
shrl $0x3, %ecx
jmp 0x4fe01
movq -0x11(%rdx), %rcx
jmp 0x4fe01
movzwl -0x5(%rdx), %ecx
jmp 0x4fe01
movl -0x9(%rdx), %ecx
jmp 0x4fe01
movzbl -0x3(%rdx), %ecx
jmp 0x4fe01
xorl %ecx, %ecx
testl %ebp, %ebp
je 0x4fe1c
cmpl $0x1, %ebp
jne 0x4fe2c
movq 0x8(%r14), %rdi
addq $0x8, %r14
movq %r14, %rsi
callq 0x2f58f
jmp 0x4fe2c
movq 0x8(%r14), %rdi
addq $0x8, %r14
movq %r14, %rsi
callq 0x2f587
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x440f3
leaq 0x75b93(%rip), %rdi     # 0xc59d2
leaq 0x76476(%rip), %rsi     # 0xc62bc
movl $0x9b, %edx
callq 0x6558d
movl $0x1, %edi
callq 0x263d0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/t_list.c
// Function: listTypeEqual
int listTypeEqual(listTypeEntry *entry, robj *o) {
    if (entry->li->encoding == OBJ_ENCODING_QUICKLIST) {
        serverAssertWithInfo(NULL,o,sdsEncodedObject(o));
        return quicklistCompare(entry->entry.zi,o->ptr,sdslen(o->ptr));
    } else {
        serverPanic("Unknown list encoding");
    }
}

// Assembly:
pushq %rax
movq (%rdi), %rax
cmpb $0x9, 0x8(%rax)
jne 0x4feb7
movl (%rsi), %eax
shrl $0x4, %eax
testb $0x7, %al
jne 0x4fed1
movq 0x18(%rdi), %rdi
movq 0x8(%rsi), %rsi
movzbl -0x1(%rsi), %edx
movl %edx, %eax
andl $0x7, %eax
cmpl $0x4, %eax
ja 0x4feaf
leaq 0x7640a(%rip), %rcx     # 0xc6294
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
shrl $0x3, %edx
jmp 0x4feb1
movq -0x11(%rsi), %rdx
jmp 0x4feb1
movzwl -0x5(%rsi), %edx
jmp 0x4feb1
movl -0x9(%rsi), %edx
jmp 0x4feb1
movzbl -0x3(%rsi), %edx
jmp 0x4feb1
xorl %edx, %edx
popq %rax
jmp 0x2f715
leaq 0x75b14(%rip), %rdi     # 0xc59d2
leaq 0x763f7(%rip), %rsi     # 0xc62bc
movl $0xa5, %edx
callq 0x6558d
jmp 0x4feec
leaq 0x76413(%rip), %rdx     # 0xc62eb
leaq 0x763dd(%rip), %rcx     # 0xc62bc
xorl %edi, %edi
movl $0xa2, %r8d
callq 0x66380
movl $0x1, %edi
callq 0x263d0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/t_list.c
// Function: listTypeConvert
void listTypeConvert(robj *subject, int enc) {
    serverAssertWithInfo(NULL,subject,subject->type==OBJ_LIST);
    serverAssertWithInfo(NULL,subject,subject->encoding==OBJ_ENCODING_ZIPLIST);

    if (enc == OBJ_ENCODING_QUICKLIST) {
        size_t zlen = server.list_max_ziplist_size;
        int depth = server.list_compress_depth;
        subject->ptr = quicklistCreateFromZiplist(zlen, depth, subject->ptr);
        subject->encoding = OBJ_ENCODING_QUICKLIST;
    } else {
        serverPanic("Unsupported list conversion");
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %eax
movl %eax, %ecx
andl $0xf, %ecx
cmpl $0x1, %ecx
jne 0x4ff7e
andl $0xf0, %eax
cmpl $0x50, %eax
jne 0x4ff99
cmpl $0x9, %esi
jne 0x4ffb9
leaq 0xb6903(%rip), %rax     # 0x106858
movl 0x960(%rax), %edi
movl 0x964(%rax), %esi
movq 0x8(%rbx), %rdx
callq 0x2ed5d
movq %rax, 0x8(%rbx)
movl $0xffffff0f, %eax       # imm = 0xFFFFFF0F
andl (%rbx), %eax
orl $0x90, %eax
movl %eax, (%rbx)
popq %rbx
retq
leaq 0x7637a(%rip), %rdx     # 0xc62ff
leaq 0x76330(%rip), %rcx     # 0xc62bc
xorl %edi, %edi
movq %rbx, %rsi
movl $0xb4, %r8d
jmp 0x4ffb2
leaq 0x76377(%rip), %rdx     # 0xc6317
leaq 0x76315(%rip), %rcx     # 0xc62bc
xorl %edi, %edi
movq %rbx, %rsi
movl $0xb5, %r8d
callq 0x66380
jmp 0x4ffd1
leaq 0x7637f(%rip), %rdi     # 0xc633f
leaq 0x762f5(%rip), %rsi     # 0xc62bc
movl $0xbd, %edx
callq 0x6558d
movl $0x1, %edi
callq 0x263d0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/t_list.c
// Function: pushGenericCommand
void pushGenericCommand(client *c, int where) {
    int j, waiting = 0, pushed = 0;
    robj *lobj = lookupKeyWrite(c->db,c->argv[1]);

    if (lobj && lobj->type != OBJ_LIST) {
        addReply(c,shared.wrongtypeerr);
        return;
    }

    for (j = 2; j < c->argc; j++) {
        c->argv[j] = tryObjectEncoding(c->argv[j]);
        if (!lobj) {
            lobj = createQuicklistObject();
            quicklistSetOptions(lobj->ptr, server.list_max_ziplist_size,
                                server.list_compress_depth);
            dbAdd(c->db,c->argv[1],lobj);
        }
        listTypePush(lobj,c->argv[j],where);
        pushed++;
    }
    addReplyLongLong(c, waiting + (lobj ? listTypeLength(lobj) : 0));
    if (pushed) {
        char *event = (where == LIST_HEAD) ? "lpush" : "rpush";

        signalModifiedKey(c->db,c->argv[1]);
        notifyKeyspaceEvent(NOTIFY_LIST,event,c->argv[1],c->db->id);
    }
    server.dirty += pushed;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
callq 0x44f66
movq %rax, %r14
testq %rax, %rax
je 0x50010
movl (%r14), %eax
andl $0xf, %eax
cmpl $0x1, %eax
jne 0x500a9
xorl %r15d, %r15d
cmpl $0x3, 0x38(%rbx)
jl 0x50097
movl $0x2, %r15d
leaq 0xb6832(%rip), %r12     # 0x106858
movq 0x40(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x4426d
movq 0x40(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
testq %r14, %r14
jne 0x50075
callq 0x43e25
movq %rax, %r14
movq 0x8(%rax), %rdi
movl 0x960(%r12), %esi
movl 0x964(%r12), %edx
callq 0x2e774
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
movq %r14, %rdx
callq 0x45007
movq 0x40(%rbx), %rax
movq (%rax,%r15,8), %rsi
movq %r14, %rdi
movl %ebp, %edx
callq 0x4faf0
incq %r15
movslq 0x38(%rbx), %rax
cmpq %rax, %r15
jl 0x50026
addl $-0x2, %r15d
testq %r14, %r14
je 0x500c4
movq %r14, %rdi
callq 0x4fc1c
movq %rax, %rsi
jmp 0x500c6
leaq 0xb7200(%rip), %rax     # 0x1072b0
movq 0x70(%rax), %rsi
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3fc19
xorl %esi, %esi
movq %rbx, %rdi
callq 0x40606
testl %r15d, %r15d
je 0x50114
testl %ebp, %ebp
leaq 0x6f4b6(%rip), %rax     # 0xbf592
leaq 0x6f482(%rip), %r14     # 0xbf565
cmoveq %rax, %r14
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
movl $0x10, %edi
movq %r14, %rsi
callq 0x800c9
movl %r15d, %eax
leaq 0xb673a(%rip), %rcx     # 0x106858
addq %rax, 0x710(%rcx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq