LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/networking.c
// Function: resetClient
void resetClient(redisClient *c) {
    redisCommandProc *prevcmd = c->cmd ? c->cmd->proc : NULL;

    freeClientArgv(c);
    c->reqtype = 0;
    c->multibulklen = 0;
    c->bulklen = -1;
    /* We clear the ASKING flag as well if we are not inside a MULTI, and
     * if what we just executed is not the ASKING command itself. */
    if (!(c->flags & REDIS_MULTI) && prevcmd != askingCommand)
        c->flags &= (~REDIS_ASKING);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x40(%rdi), %rax
testq %rax, %rax
je 0x2e6ff
movq 0x8(%rax), %rax
cmpq 0x977ff(%rip), %rax     # 0xc5ef8
setne %bpl
jmp 0x2e702
movb $0x1, %bpl
movq %rbx, %rdi
callq 0x2e629
movq $0x0, 0x50(%rbx)
movq $-0x1, 0x58(%rbx)
movl 0x90(%rbx), %eax
testb $0x8, %al
jne 0x2e734
testb %bpl, %bpl
je 0x2e734
andl $0xfffffdf7, %eax       # imm = 0xFFFFFDF7
movl %eax, 0x90(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/networking.c
// Function: setProtocolError
static void setProtocolError(redisClient *c, int pos) {
    if (server.verbosity >= REDIS_VERBOSE) {
        sds client = catClientInfoString(sdsempty(),c);
        redisLog(REDIS_VERBOSE,
            "Protocol error from client: %s", client);
        sdsfree(client);
    }
    c->flags |= REDIS_CLOSE_AFTER_REPLY;
    sdsrange(c->querybuf,pos,-1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
leaq 0x9b6d6(%rip), %rax     # 0xc9fa8
cmpl $0x0, 0x464(%rax)
jle 0x2e90c
callq 0x281b2
movq %rax, %rdi
movq %r14, %rsi
callq 0x2ee21
movq %rax, %r15
leaq 0x6897d(%rip), %rsi     # 0x97272
movl $0x1, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x23064
movq %r15, %rdi
callq 0x28204
orb $0x40, 0x90(%r14)
movq 0x20(%r14), %rdi
movl %ebx, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %r15
jmp 0x28c31
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/networking.c
// Function: clientsArePaused
int clientsArePaused(void) {
    if (server.clients_paused && server.clients_pause_end_time < server.mstime) {
        listNode *ln;
        listIter li;
        redisClient *c;

        server.clients_paused = 0;

        /* Put all the clients in the unblocked clients queue in order to
         * force the re-processing of the input buffer if any. */
        listRewind(server.clients,&li);
        while ((ln = listNext(&li)) != NULL) {
            c = listNodeValue(ln);

            if (c->flags & REDIS_SLAVE) continue;
            listAddNodeTail(server.unblocked_clients,c);
        }
    }
    return server.clients_paused;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
leaq 0x9b207(%rip), %r14     # 0xc9fa8
cmpl $0x0, 0x1d8(%r14)
je 0x2ee12
movq 0x1e0(%r14), %rax
cmpq 0x7a0(%r14), %rax
jge 0x2ee12
movl $0x0, 0x1d8(%r14)
movq 0x1b0(%r14), %rdi
leaq 0x8(%rsp), %rbx
movq %rbx, %rsi
callq 0x205d2
movq %rbx, %rdi
callq 0x205ef
testq %rax, %rax
je 0x2ee12
leaq 0x8(%rsp), %rbx
movq 0x10(%rax), %rsi
testb $0x1, 0x90(%rsi)
jne 0x2ee05
movq 0x738(%r14), %rdi
callq 0x2045f
movq %rbx, %rdi
callq 0x205ef
testq %rax, %rax
jne 0x2edec
movl 0x1d8(%r14), %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/networking.c
// Function: genClientPeerId
int genClientPeerId(redisClient *client, char *peerid, size_t peerid_len) {
    char ip[REDIS_IP_STR_LEN];
    int port;

    if (client->flags & REDIS_UNIX_SOCKET) {
        /* Unix socket client. */
        snprintf(peerid,peerid_len,"%s:0",server.unixsocket);
        return REDIS_OK;
    } else {
        /* TCP client. */
        int retval = anetPeerToString(client->fd,ip,sizeof(ip),&port);
        formatPeerId(peerid,peerid_len,ip,port);
        return (retval == -1) ? REDIS_ERR : REDIS_OK;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movq %rsi, %r14
testb $0x8, 0x91(%rdi)
jne 0x2f198
movl (%rdi), %edi
leaq 0x10(%rsp), %r15
leaq 0xc(%rsp), %r12
movl $0x2e, %edx
movq %r15, %rsi
movq %r12, %rcx
callq 0x21d05
movl %eax, %r13d
movl (%r12), %ecx
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x2f0e9
xorl %ebp, %ebp
cmpl $-0x1, %r13d
sete %bpl
negl %ebp
jmp 0x2f1bc
leaq 0x9ae09(%rip), %rax     # 0xc9fa8
movq 0x118(%rax), %rcx
leaq 0x67e89(%rip), %rdx     # 0x97036
xorl %ebp, %ebp
movq %r14, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1f120
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/networking.c
// Function: getClientPeerId
char *getClientPeerId(redisClient *c) {
    char peerid[REDIS_PEER_ID_LEN];

    if (c->peerid == NULL) {
        genClientPeerId(c,peerid,sizeof(peerid));
        c->peerid = sdsnew(peerid);
    }
    return c->peerid;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
cmpq $0x0, 0x168(%rdi)
jne 0x2f203
movq %rsp, %r14
movl $0x4e, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2f13c
movq %r14, %rdi
callq 0x281da
movq %rax, 0x168(%rbx)
movq 0x168(%rbx), %rax
addq $0x58, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/networking.c
// Function: rewriteClientCommandVector
void rewriteClientCommandVector(redisClient *c, int argc, ...) {
    va_list ap;
    int j;
    robj **argv; /* The new argument vector */

    // 创建新参数
    argv = zmalloc(sizeof(robj*)*argc);
    va_start(ap,argc);
    for (j = 0; j < argc; j++) {
        robj *a;
        
        a = va_arg(ap, robj*);
        argv[j] = a;
        incrRefCount(a);
    }
    /* We free the objects in the original vector at the end, so we are
     * sure that if the same objects are reused in the new vector the
     * refcount gets incremented before it gets decremented. */
    // 释放旧参数
    for (j = 0; j < c->argc; j++) decrRefCount(c->argv[j]);
    zfree(c->argv);

    /* Replace argv and argc with our new versions. */
    // 用新参数替换
    c->argv = argv;
    c->argc = argc;
    c->cmd = lookupCommandOrOriginal(c->argv[0]->ptr);
    redisAssertWithInfo(c,NULL,c->cmd != NULL);
    va_end(ap);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd0, %rsp
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x20(%rsp), %r15
movq %rdx, 0x10(%r15)
movq %rcx, 0x18(%r15)
movq %r8, 0x20(%r15)
movq %r9, 0x28(%r15)
testb %al, %al
je 0x2f5e5
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movslq %esi, %r12
leaq (,%r12,8), %rdi
callq 0x29709
movq %rax, %r14
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rsp)
leaq 0x100(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %r15, 0x10(%rsp)
testl %r12d, %r12d
jle 0x2f65e
movl %ebp, %r15d
xorl %r12d, %r12d
movl (%rsp), %ecx
cmpq $0x28, %rcx
ja 0x2f63c
movq %rcx, %rax
addq 0x10(%rsp), %rax
addl $0x8, %ecx
movl %ecx, (%rsp)
jmp 0x2f64a
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq (%rax), %rdi
movq %rdi, (%r14,%r12,8)
callq 0x3041b
incq %r12
cmpq %r12, %r15
jne 0x2f623
cmpl $0x0, 0x30(%rbx)
jle 0x2f680
xorl %r15d, %r15d
movq 0x38(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x30834
incq %r15
movslq 0x30(%rbx), %rax
cmpq %rax, %r15
jl 0x2f667
movq 0x38(%rbx), %rdi
callq 0x2984b
movq %r14, 0x38(%rbx)
movl %ebp, 0x30(%rbx)
movq (%r14), %rax
movq 0x8(%rax), %rdi
callq 0x25a2d
movq %rax, 0x40(%rbx)
testq %rax, %rax
je 0x2f6b5
addq $0xd0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x67ac2(%rip), %rdx     # 0x9717e
leaq 0x6767b(%rip), %rcx     # 0x96d3e
movq %rbx, %rdi
xorl %esi, %esi
movl $0x768, %r8d            # imm = 0x768
callq 0x4d872
movl $0x1, %edi
callq 0x1f3b0
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/networking.c
// Function: rewriteClientCommandArgument
void rewriteClientCommandArgument(redisClient *c, int i, robj *newval) {
    robj *oldval;
   
    redisAssertWithInfo(c,NULL,i < c->argc);
    oldval = c->argv[i];
    c->argv[i] = newval;
    incrRefCount(newval);
    decrRefCount(oldval);

    /* If this is the command name make sure to fix c->cmd. */
    if (i == 0) {
        c->cmd = lookupCommandOrOriginal(c->argv[0]->ptr);
        redisAssertWithInfo(c,NULL,c->cmd != NULL);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl %esi, 0x30(%rdi)
jle 0x2f72d
movq 0x38(%rbx), %rax
movslq %esi, %r15
movq (%rax,%r15,8), %r14
movq %rdx, (%rax,%r15,8)
movq %rdx, %rdi
callq 0x3041b
movq %r14, %rdi
callq 0x30834
testl %r15d, %r15d
jne 0x2f727
movq 0x38(%rbx), %rax
movq (%rax), %rax
movq 0x8(%rax), %rdi
callq 0x25a2d
movq %rax, 0x40(%rbx)
testq %rax, %rax
je 0x2f748
popq %rbx
popq %r14
popq %r15
retq
leaq 0x67a59(%rip), %rdx     # 0x9718d
leaq 0x67603(%rip), %rcx     # 0x96d3e
movq %rbx, %rdi
xorl %esi, %esi
movl $0x772, %r8d            # imm = 0x772
jmp 0x2f761
leaq 0x67a2f(%rip), %rdx     # 0x9717e
leaq 0x675e8(%rip), %rcx     # 0x96d3e
movq %rbx, %rdi
xorl %esi, %esi
movl $0x77b, %r8d            # imm = 0x77B
callq 0x4d872
movl $0x1, %edi
callq 0x1f3b0
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/networking.c
// Function: getClientLimitClassByName
int getClientLimitClassByName(char *name) {
    if (!strcasecmp(name,"normal")) return REDIS_CLIENT_LIMIT_CLASS_NORMAL;
    else if (!strcasecmp(name,"slave")) return REDIS_CLIENT_LIMIT_CLASS_SLAVE;
    else if (!strcasecmp(name,"pubsub")) return REDIS_CLIENT_LIMIT_CLASS_PUBSUB;
    else return -1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x679e6(%rip), %rsi     # 0x97199
callq 0x1f2e0
testl %eax, %eax
je 0x2f7eb
leaq 0x6d677(%rip), %rsi     # 0x9ce3a
movq %rbx, %rdi
callq 0x1f2e0
testl %eax, %eax
je 0x2f7ef
leaq 0x64dec(%rip), %rsi     # 0x945c2
movq %rbx, %rdi
callq 0x1f2e0
movl %eax, %ecx
xorl %eax, %eax
negl %ecx
sbbl %eax, %eax
orl $0x2, %eax
jmp 0x2f7f4
xorl %eax, %eax
jmp 0x2f7f4
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/networking.c
// Function: flushSlavesOutputBuffers
void flushSlavesOutputBuffers(void) {
    listIter li;
    listNode *ln;

    listRewind(server.slaves,&li);
    while((ln = listNext(&li))) {
        redisClient *slave = listNodeValue(ln);
        int events;

        events = aeGetFileEvents(server.el,slave->fd);
        if (events & AE_WRITABLE &&
            slave->replstate == REDIS_REPL_ONLINE &&
            listLength(slave->reply))
        {
            sendReplyToClient(server.el,slave->fd,slave,0);
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq 0x9a6cc(%rip), %r15     # 0xc9fa8
movq 0x1c0(%r15), %rdi
movq %rsp, %rbx
movq %rbx, %rsi
callq 0x205d2
movq %rbx, %rdi
callq 0x205ef
testq %rax, %rax
je 0x2f93f
movq %rsp, %rbx
movq 0x10(%rax), %r14
movq 0x28(%r15), %rdi
movl (%r14), %esi
callq 0x20b4d
testb $0x2, %al
je 0x2f932
cmpl $0x9, 0x98(%r14)
jne 0x2f932
movq 0x60(%r14), %rax
cmpq $0x0, 0x28(%rax)
je 0x2f932
movl (%r14), %esi
movq %r14, %rdx
callq 0x2d13a
movq %rbx, %rdi
callq 0x205ef
testq %rax, %rax
jne 0x2f8fe
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/networking.c
// Function: processEventsWhileBlocked
int processEventsWhileBlocked(void) {
    int iterations = 4; /* See the function top-comment. */
    int count = 0;
    while (iterations--) {
        int events = aeProcessEvents(server.el, AE_FILE_EVENTS|AE_DONT_WAIT);
        if (!events) break;
        count += events;
    }
    return count;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
xorl %ebx, %ebx
movl $0xfffffffb, %ebp       # imm = 0xFFFFFFFB
leaq 0x9a64d(%rip), %r14     # 0xc9fa8
incl %ebp
je 0x2f973
movq 0x28(%r14), %rdi
movl $0x5, %esi
callq 0x20cc3
addl %eax, %ebx
testl %eax, %eax
jne 0x2f95b
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/util.c
// Function: ll2string
int ll2string(char *s, size_t len, long long value) {
    char buf[32], *p;
    unsigned long long v;
    size_t l;

    if (len == 0) return 0;
    v = (value < 0) ? -value : value;
    p = buf+31; /* point to the last character */
    do {
        *p-- = '0'+(v%10);
        v /= 10;
    } while(v);
    if (value < 0) *p-- = '-';
    p++;
    l = 32-(p-buf);
    if (l+1 > len) l = len-1; /* Make sure it fits, including the nul term */
    memcpy(s,p,l);
    s[l] = '\0';
    return l;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
testq %rsi, %rsi
je 0x2feb4
movq %rdx, %rcx
movq %rdi, %rbx
movq %rdx, %rdi
negq %rdi
cmovsq %rdx, %rdi
xorl %r8d, %r8d
movabsq $-0x3333333333333333, %r9 # imm = 0xCCCCCCCCCCCCCCCD
movq %rdi, %rax
mulq %r9
shrq $0x3, %rdx
leal (%rdx,%rdx), %eax
leal (%rax,%rax,4), %eax
movl %edi, %r10d
subl %eax, %r10d
orb $0x30, %r10b
movb %r10b, 0x1f(%rsp,%r8)
decq %r8
cmpq $0x9, %rdi
movq %rdx, %rdi
ja 0x2fe41
movq $-0x1, %r15
testq %rcx, %rcx
jns 0x2fe85
movb $0x2d, 0x1f(%rsp,%r8)
movq $-0x2, %r15
addq %r8, %r15
leaq (%rsp,%r15), %rax
addq $0x21, %rax
negq %r15
cmpq %rsi, %r15
cmovaq %rsi, %r15
leaq -0x1(%r15), %r14
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x1fbd0
movb $0x0, -0x1(%rbx,%r15)
jmp 0x2feb7
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/util.c
// Function: getRandomHexChars
void getRandomHexChars(char *p, unsigned int len) {
    FILE *fp = fopen("/dev/urandom","r");
    char *charset = "0123456789abcdef";
    unsigned int j;

    if (fp == NULL || fread(p,len,1,fp) == 0) {
        /* If we can't read from /dev/urandom, do some reasonable effort
         * in order to create some entropy, since this function is used to
         * generate run_id and cluster instance IDs */
        char *x = p;
        unsigned int l = len;
        struct timeval tv;
        pid_t pid = getpid();

        /* Use time and PID to fill the initial array. */
        gettimeofday(&tv,NULL);
        if (l >= sizeof(tv.tv_usec)) {
            memcpy(x,&tv.tv_usec,sizeof(tv.tv_usec));
            l -= sizeof(tv.tv_usec);
            x += sizeof(tv.tv_usec);
        }
        if (l >= sizeof(tv.tv_sec)) {
            memcpy(x,&tv.tv_sec,sizeof(tv.tv_sec));
            l -= sizeof(tv.tv_sec);
            x += sizeof(tv.tv_sec);
        }
        if (l >= sizeof(pid)) {
            memcpy(x,&pid,sizeof(pid));
            l -= sizeof(pid);
            x += sizeof(pid);
        }
        /* Finally xor it with rand() output, that was already seeded with
         * time() at startup. */
        for (j = 0; j < len; j++)
            p[j] ^= rand();
    }
    /* Turn it into hex digits taking just 4 bits out of 8 for every byte. */
    for (j = 0; j < len; j++)
        p[j] = charset[p[j] & 0x0F];
    if (fp) fclose(fp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %r12d
movq %rdi, %rbx
leaq 0x6720e(%rip), %rdi     # 0x972bf
leaq 0x71fd2(%rip), %rsi     # 0xa208a
callq 0x1fa60
movq %rax, %r14
movl %r12d, %r15d
testq %rax, %rax
je 0x300e0
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rcx
callq 0x1f7c0
testq %rax, %rax
jne 0x30144
callq 0x1f410
movl %eax, %ebp
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x1f2f0
movq %rbx, %rax
movl %r12d, %ecx
cmpl $0x8, %r12d
jb 0x30110
movq 0x10(%rsp), %rax
movq %rax, (%rbx)
leal -0x8(%r12), %ecx
leaq 0x8(%rbx), %rax
cmpl $0x8, %ecx
jb 0x30124
movq 0x8(%rsp), %rdx
movq %rdx, (%rax)
addl $-0x8, %ecx
addq $0x8, %rax
cmpl $0x4, %ecx
jb 0x3012b
movl %ebp, (%rax)
testl %r12d, %r12d
je 0x30144
xorl %r13d, %r13d
callq 0x1faf0
xorb %al, (%rbx,%r13)
incq %r13
cmpq %r13, %r15
jne 0x30133
testl %r12d, %r12d
je 0x30167
xorl %eax, %eax
leaq 0x6717a(%rip), %rcx     # 0x972cc
movzbl (%rbx,%rax), %edx
andl $0xf, %edx
movb (%rdx,%rcx), %dl
movb %dl, (%rbx,%rax)
incq %rax
cmpq %rax, %r15
jne 0x30152
testq %r14, %r14
je 0x30182
movq %r14, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1f9a0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/object.c
// Function: createObject
robj *createObject(int type, void *ptr) {

    robj *o = zmalloc(sizeof(*o));

    o->type = type;
    o->encoding = REDIS_ENCODING_RAW;
    o->ptr = ptr;
    o->refcount = 1;

    /* Set the LRU to the current lruclock (minutes resolution). */
    o->lru = LRU_CLOCK();
    return o;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
movl $0x10, %edi
callq 0x29709
andl $0xf, %ebp
movb %bpl, (%rax)
movq %rbx, 0x8(%rax)
movl $0x1, 0x4(%rax)
leaq 0x99cba(%rip), %rcx     # 0xc9fa8
movl 0x30(%rcx), %ecx
shll $0x8, %ecx
orl %ebp, %ecx
movl %ecx, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/object.c
// Function: createEmbeddedStringObject
robj *createEmbeddedStringObject(char *ptr, size_t len) {
    robj *o = zmalloc(sizeof(robj)+sizeof(struct sdshdr)+len+1);
    struct sdshdr *sh = (void*)(o+1);

    o->type = REDIS_STRING;
    o->encoding = REDIS_ENCODING_EMBSTR;
    o->ptr = sh+1;
    o->refcount = 1;
    o->lru = LRU_CLOCK();

    sh->len = len;
    sh->free = 0;
    if (ptr) {
        memcpy(sh->buf,ptr,len);
        sh->buf[len] = '\0';
    } else {
        memset(sh->buf,0,len+1);
    }
    return o;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x19(%rsi), %rdi
callq 0x29709
movq %rax, %r14
movb $-0x80, (%rax)
leaq 0x18(%rax), %r12
movq %r12, 0x8(%rax)
movl $0x1, 0x4(%rax)
leaq 0x99c44(%rip), %rax     # 0xc9fa8
movl 0x30(%rax), %eax
shll $0x8, %eax
orl $0x80, %eax
movl %eax, (%r14)
movl %ebx, 0x10(%r14)
movl $0x0, 0x14(%r14)
testq %r15, %r15
je 0x30398
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1fbd0
movb $0x0, (%r12,%rbx)
jmp 0x303a8
incq %rbx
movq %r12, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x1f110
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/object.c
// Function: dupStringObject
robj *dupStringObject(robj *o) {
    robj *d;

    redisAssert(o->type == REDIS_STRING);

    switch(o->encoding) {

    case REDIS_ENCODING_RAW:
        return createRawStringObject(o->ptr,sdslen(o->ptr));

    case REDIS_ENCODING_EMBSTR:
        return createEmbeddedStringObject(o->ptr,sdslen(o->ptr));

    case REDIS_ENCODING_INT:
        d = createObject(REDIS_STRING, NULL);
        d->encoding = REDIS_ENCODING_INT;
        d->ptr = o->ptr;
        return d;

    default:
        redisPanic("Wrong encoding.");
        break;
    }
}

// Assembly:
pushq %rbx
movl (%rdi), %eax
testb $0xf, %al
jne 0x30505
movq %rdi, %rbx
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x8, %eax
je 0x304f7
cmpl $0x1, %eax
je 0x304bf
testl %eax, %eax
jne 0x3051f
movq 0x8(%rbx), %rdi
movslq -0x8(%rdi), %rsi
popq %rbx
jmp 0x302ff
movl $0x10, %edi
callq 0x29709
movb $0x0, (%rax)
movq $0x0, 0x8(%rax)
movl $0x1, 0x4(%rax)
leaq 0x99ac6(%rip), %rcx     # 0xc9fa8
movl 0x30(%rcx), %ecx
shll $0x8, %ecx
orl $0x10, %ecx
movl %ecx, (%rax)
movq 0x8(%rbx), %rcx
movq %rcx, 0x8(%rax)
popq %rbx
retq
movq 0x8(%rbx), %rdi
movslq -0x8(%rdi), %rsi
popq %rbx
jmp 0x30331
leaq 0x6681a(%rip), %rdi     # 0x96d26
leaq 0x66dec(%rip), %rsi     # 0x972ff
movl $0xc0, %edx
callq 0x4d037
jmp 0x30537
leaq 0x66de2(%rip), %rdi     # 0x97308
leaq 0x66dd2(%rip), %rsi     # 0x972ff
movl $0xd1, %edx
callq 0x4d0e5
movl $0x1, %edi
callq 0x1f3b0
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/object.c
// Function: createListObject
robj *createListObject(void) {

    list *l = listCreate();

    robj *o = createObject(REDIS_LIST,l);

    listSetFreeMethod(l,decrRefCountVoid);

    o->encoding = REDIS_ENCODING_LINKEDLIST;

    return o;
}

// Assembly:
pushq %rbx
callq 0x2038c
movq %rax, %rbx
movl $0x10, %edi
callq 0x29709
movb $0x1, (%rax)
movq %rbx, 0x8(%rax)
movl $0x1, 0x4(%rax)
leaq 0x99a3f(%rip), %rcx     # 0xc9fa8
movl 0x30(%rcx), %ecx
shll $0x8, %ecx
incl %ecx
movl %ecx, (%rax)
leaq 0x12(%rip), %rcx        # 0x3058c
movq %rcx, 0x18(%rbx)
movl $0xffffff0f, %ecx       # imm = 0xFFFFFF0F
andl (%rax), %ecx
orl $0x40, %ecx
movl %ecx, (%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/object.c
// Function: createZiplistObject
robj *createZiplistObject(void) {

    unsigned char *zl = ziplistNew();

    robj *o = createObject(REDIS_LIST,zl);

    o->encoding = REDIS_ENCODING_ZIPLIST;

    return o;
}

// Assembly:
pushq %rbx
callq 0x2bbe0
movq %rax, %rbx
movl $0x10, %edi
callq 0x29709
movb $0x1, (%rax)
movq %rbx, 0x8(%rax)
movl $0x1, 0x4(%rax)
leaq 0x999ef(%rip), %rcx     # 0xc9fa8
movl 0x30(%rcx), %ecx
shll $0x8, %ecx
orl $0x51, %ecx
movl %ecx, (%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/object.c
// Function: createSetObject
robj *createSetObject(void) {

    dict *d = dictCreate(&setDictType,NULL);

    robj *o = createObject(REDIS_SET,d);

    o->encoding = REDIS_ENCODING_HT;

    return o;
}

// Assembly:
pushq %rbx
leaq 0x992a2(%rip), %rdi     # 0xc9870
xorl %esi, %esi
callq 0x21f97
movq %rax, %rbx
movl $0x10, %edi
callq 0x29709
movb $0x2, (%rax)
movq %rbx, 0x8(%rax)
movl $0x1, 0x4(%rax)
leaq 0x999b1(%rip), %rcx     # 0xc9fa8
movl 0x30(%rcx), %ecx
shll $0x8, %ecx
orl $0x22, %ecx
movl %ecx, (%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/object.c
// Function: createIntsetObject
robj *createIntsetObject(void) {

    intset *is = intsetNew();

    robj *o = createObject(REDIS_SET,is);

    o->encoding = REDIS_ENCODING_INTSET;

    return o;
}

// Assembly:
pushq %rbx
callq 0x4f5c0
movq %rax, %rbx
movl $0x10, %edi
callq 0x29709
movb $0x2, (%rax)
movq %rbx, 0x8(%rax)
movl $0x1, 0x4(%rax)
leaq 0x9997c(%rip), %rcx     # 0xc9fa8
movl 0x30(%rcx), %ecx
shll $0x8, %ecx
orl $0x62, %ecx
movl %ecx, (%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/object.c
// Function: createHashObject
robj *createHashObject(void) {

    unsigned char *zl = ziplistNew();

    robj *o = createObject(REDIS_HASH, zl);

    o->encoding = REDIS_ENCODING_ZIPLIST;

    return o;
}

// Assembly:
pushq %rbx
callq 0x2bbe0
movq %rax, %rbx
movl $0x10, %edi
callq 0x29709
movb $0x4, (%rax)
movq %rbx, 0x8(%rax)
movl $0x1, 0x4(%rax)
leaq 0x99947(%rip), %rcx     # 0xc9fa8
movl 0x30(%rcx), %ecx
shll $0x8, %ecx
orl $0x54, %ecx
movl %ecx, (%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/object.c
// Function: createZsetObject
robj *createZsetObject(void) {

    zset *zs = zmalloc(sizeof(*zs));

    robj *o;

    zs->dict = dictCreate(&zsetDictType,NULL);
    zs->zsl = zslCreate();

    o = createObject(REDIS_ZSET,zs);

    o->encoding = REDIS_ENCODING_SKIPLIST;

    return o;
}

// Assembly:
pushq %rbx
movl $0x10, %edi
callq 0x29709
movq %rax, %rbx
leaq 0x9921d(%rip), %rdi     # 0xc98a0
xorl %esi, %esi
callq 0x21f97
movq %rax, (%rbx)
callq 0x3cfc2
movq %rax, 0x8(%rbx)
movl $0x10, %edi
callq 0x29709
movb $0x3, (%rax)
movq %rbx, 0x8(%rax)
movl $0x1, 0x4(%rax)
leaq 0x998f3(%rip), %rcx     # 0xc9fa8
movl 0x30(%rcx), %ecx
shll $0x8, %ecx
orl $0x73, %ecx
movl %ecx, (%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/object.c
// Function: createZsetZiplistObject
robj *createZsetZiplistObject(void) {

    unsigned char *zl = ziplistNew();

    robj *o = createObject(REDIS_ZSET,zl);

    o->encoding = REDIS_ENCODING_ZIPLIST;

    return o;
}

// Assembly:
pushq %rbx
callq 0x2bbe0
movq %rax, %rbx
movl $0x10, %edi
callq 0x29709
movb $0x3, (%rax)
movq %rbx, 0x8(%rax)
movl $0x1, 0x4(%rax)
leaq 0x998be(%rip), %rcx     # 0xc9fa8
movl 0x30(%rcx), %ecx
shll $0x8, %ecx
orl $0x53, %ecx
movl %ecx, (%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/object.c
// Function: freeListObject
void freeListObject(robj *o) {

    switch (o->encoding) {

    case REDIS_ENCODING_LINKEDLIST:
        listRelease((list*) o->ptr);
        break;

    case REDIS_ENCODING_ZIPLIST:
        zfree(o->ptr);
        break;

    default:
        redisPanic("Unknown list encoding type");
    }
}

// Assembly:
movl (%rdi), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x5, %eax
je 0x30721
cmpl $0x4, %eax
jne 0x3072a
movq 0x8(%rdi), %rdi
jmp 0x203b0
movq 0x8(%rdi), %rdi
jmp 0x2984b
pushq %rax
leaq 0x66be8(%rip), %rdi     # 0x9731a
leaq 0x66bc6(%rip), %rsi     # 0x972ff
movl $0x158, %edx            # imm = 0x158
callq 0x4d0e5
movl $0x1, %edi
callq 0x1f3b0
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/object.c
// Function: freeSetObject
void freeSetObject(robj *o) {

    switch (o->encoding) {

    case REDIS_ENCODING_HT:
        dictRelease((dict*) o->ptr);
        break;

    case REDIS_ENCODING_INTSET:
        zfree(o->ptr);
        break;

    default:
        redisPanic("Unknown set encoding type");
    }
}

// Assembly:
movl (%rdi), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x6, %eax
je 0x30768
cmpl $0x2, %eax
jne 0x30771
movq 0x8(%rdi), %rdi
jmp 0x227ed
movq 0x8(%rdi), %rdi
jmp 0x2984b
pushq %rax
leaq 0x66bbe(%rip), %rdi     # 0x97337
leaq 0x66b7f(%rip), %rsi     # 0x972ff
movl $0x16c, %edx            # imm = 0x16C
callq 0x4d0e5
movl $0x1, %edi
callq 0x1f3b0
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/object.c
// Function: freeZsetObject
void freeZsetObject(robj *o) {

    zset *zs;

    switch (o->encoding) {

    case REDIS_ENCODING_SKIPLIST:
        zs = o->ptr;
        dictRelease(zs->dict);
        zslFree(zs->zsl);
        zfree(zs);
        break;

    case REDIS_ENCODING_ZIPLIST:
        zfree(o->ptr);
        break;

    default:
        redisPanic("Unknown sorted set encoding");
    }
}

// Assembly:
pushq %rbx
movl (%rdi), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x5, %eax
je 0x307c1
cmpl $0x7, %eax
jne 0x307cb
movq 0x8(%rdi), %rbx
movq (%rbx), %rdi
callq 0x227ed
movq 0x8(%rbx), %rdi
callq 0x3d036
movq %rbx, %rdi
jmp 0x307c5
movq 0x8(%rdi), %rdi
popq %rbx
jmp 0x2984b
leaq 0x66b81(%rip), %rdi     # 0x97353
leaq 0x66b26(%rip), %rsi     # 0x972ff
movl $0x185, %edx            # imm = 0x185
callq 0x4d0e5
movl $0x1, %edi
callq 0x1f3b0
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/object.c
// Function: freeHashObject
void freeHashObject(robj *o) {

    switch (o->encoding) {

    case REDIS_ENCODING_HT:
        dictRelease((dict*) o->ptr);
        break;

    case REDIS_ENCODING_ZIPLIST:
        zfree(o->ptr);
        break;

    default:
        redisPanic("Unknown hash encoding type");
        break;
    }
}

// Assembly:
movl (%rdi), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x5, %eax
je 0x30808
cmpl $0x2, %eax
jne 0x30811
movq 0x8(%rdi), %rdi
jmp 0x227ed
movq 0x8(%rdi), %rdi
jmp 0x2984b
pushq %rax
leaq 0x66b58(%rip), %rdi     # 0x97371
leaq 0x66adf(%rip), %rsi     # 0x972ff
movl $0x199, %edx            # imm = 0x199
callq 0x4d0e5
movl $0x1, %edi
callq 0x1f3b0
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/object.c
// Function: decrRefCount
void decrRefCount(robj *o) {

    if (o->refcount <= 0) redisPanic("decrRefCount against refcount <= 0");

    // 释放对象
    if (o->refcount == 1) {
        switch(o->type) {
        case REDIS_STRING: freeStringObject(o); break;
        case REDIS_LIST: freeListObject(o); break;
        case REDIS_SET: freeSetObject(o); break;
        case REDIS_ZSET: freeZsetObject(o); break;
        case REDIS_HASH: freeHashObject(o); break;
        default: redisPanic("Unknown object type"); break;
        }
        zfree(o);

    // 减少计数
    } else {
        o->refcount--;
    }
}

// Assembly:
pushq %rbx
movl 0x4(%rdi), %eax
testl %eax, %eax
jle 0x308a5
movq %rdi, %rbx
cmpl $0x1, %eax
jne 0x3086f
movl (%rbx), %eax
movl %eax, %ecx
andl $0xf, %ecx
cmpl $0x4, %ecx
ja 0x308c7
leaq 0x66a8d(%rip), %rdx     # 0x972e4
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
testb $-0x10, %al
jne 0x3089c
movq 0x8(%rbx), %rdi
callq 0x28204
jmp 0x3089c
decl %eax
movl %eax, 0x4(%rbx)
popq %rbx
retq
movq %rbx, %rdi
callq 0x307ed
jmp 0x3089c
movq %rbx, %rdi
callq 0x3074d
jmp 0x3089c
movq %rbx, %rdi
callq 0x30794
jmp 0x3089c
movq %rbx, %rdi
callq 0x30706
movq %rbx, %rdi
popq %rbx
jmp 0x2984b
leaq 0x66ae2(%rip), %rdi     # 0x9738e
leaq 0x66a4c(%rip), %rsi     # 0x972ff
movl $0x1ac, %edx            # imm = 0x1AC
callq 0x4d0e5
movl $0x1, %edi
callq 0x1f3b0
leaq 0x66ae5(%rip), %rdi     # 0x973b3
leaq 0x66a2a(%rip), %rsi     # 0x972ff
movl $0x1b6, %edx            # imm = 0x1B6
jmp 0x308b8
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/object.c
// Function: isObjectRepresentableAsLongLong
int isObjectRepresentableAsLongLong(robj *o, long long *llval) {

    redisAssertWithInfo(NULL,o,o->type == REDIS_STRING);

    // INT 编码的 long 值总是能保存为 long long
    if (o->encoding == REDIS_ENCODING_INT) {
        if (llval) *llval = (long) o->ptr;
        return REDIS_OK;

    // 如果是字符串的话，那么尝试将它转换为 long long
    } else {
        return string2ll(o->ptr,sdslen(o->ptr),llval) ? REDIS_OK : REDIS_ERR;
    }
}

// Assembly:
pushq %rax
movq %rsi, %rdx
movq %rdi, %rsi
movl (%rdi), %eax
testb $0xf, %al
jne 0x3094c
andl $0xf0, %eax
cmpl $0x10, %eax
jne 0x30934
xorl %eax, %eax
testq %rdx, %rdx
je 0x3094a
movq 0x8(%rsi), %rcx
movq %rcx, (%rdx)
jmp 0x3094a
movq 0x8(%rsi), %rdi
movslq -0x8(%rdi), %rsi
callq 0x2fec4
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x1, %ecx
sbbl %eax, %eax
popq %rcx
retq
leaq 0x663d3(%rip), %rdx     # 0x96d26
leaq 0x669a5(%rip), %rcx     # 0x972ff
xorl %edi, %edi
movl $0x1fd, %r8d            # imm = 0x1FD
callq 0x4d872
movl $0x1, %edi
callq 0x1f3b0
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/object.c
// Function: getDecodedObject
robj *getDecodedObject(robj *o) {
    robj *dec;

    if (sdsEncodedObject(o)) {
        incrRefCount(o);
        return o;
    }

    // 解码对象，将对象的值从整数转换为字符串
    if (o->type == REDIS_STRING && o->encoding == REDIS_ENCODING_INT) {
        char buf[32];

        ll2string(buf,32,(long)o->ptr);
        dec = createStringObject(buf,strlen(buf));
        return dec;

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

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rax
movl (%rdi), %edx
movl %edx, %ecx
shrl $0x4, %ecx
testb $0x7, %cl
jne 0x30adc
incl 0x4(%rax)
jmp 0x30b10
testb $0xf, %dl
jne 0x30b16
andl $0xf, %ecx
cmpl $0x1, %ecx
jne 0x30b16
movq 0x8(%rax), %rdx
movq %rsp, %rbx
movl $0x20, %esi
movq %rbx, %rdi
callq 0x2fe12
movq %rbx, %rdi
callq 0x1f4f0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x303b7
addq $0x20, %rsp
popq %rbx
retq
leaq 0x668ac(%rip), %rdi     # 0x973c9
leaq 0x667db(%rip), %rsi     # 0x972ff
movl $0x27a, %edx            # imm = 0x27A
callq 0x4d0e5
movl $0x1, %edi
callq 0x1f3b0
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/object.c
// Function: equalStringObjects
int equalStringObjects(robj *a, robj *b) {

    // 对象的编码为 INT ，直接对比值
    // 这里避免了将整数值转换为字符串，所以效率更高
    if (a->encoding == REDIS_ENCODING_INT &&
        b->encoding == REDIS_ENCODING_INT){
        /* If both strings are integer encoded just check if the stored
         * long is the same. */
        return a->ptr == b->ptr;

    // 进行字符串对象
    } else {
        return compareStringObjects(a,b) == 0;
    }
}

// Assembly:
movl $0xf0, %eax
movl (%rdi), %ecx
andl %eax, %ecx
cmpl $0x10, %ecx
jne 0x30c57
andl (%rsi), %eax
cmpl $0x10, %eax
jne 0x30c57
movq 0x8(%rdi), %rax
cmpq 0x8(%rsi), %rax
sete %al
jmp 0x30c6b
pushq %rax
movl $0x1, %edx
callq 0x30b38
testl %eax, %eax
sete %al
addq $0x8, %rsp
movzbl %al, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/object.c
// Function: stringObjectLen
size_t stringObjectLen(robj *o) {

    redisAssertWithInfo(NULL,o,o->type == REDIS_STRING);

    if (sdsEncodedObject(o)) {
        return sdslen(o->ptr);

    // INT 编码，计算将这个值转换为字符串要多少字节
    // 相当于返回它的长度
    } else {
        char buf[32];
        return ll2string(buf,32,(long)o->ptr);
    }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, %rsi
movl (%rdi), %eax
testb $0xf, %al
jne 0x30ca4
shrl $0x4, %eax
testb $0x7, %al
jne 0x30c8c
movq 0x8(%rsi), %rax
movl -0x8(%rax), %eax
jmp 0x30c9d
movq 0x8(%rsi), %rdx
movq %rsp, %rdi
movl $0x20, %esi
callq 0x2fe12
cltq
addq $0x28, %rsp
retq
leaq 0x6607b(%rip), %rdx     # 0x96d26
leaq 0x6664d(%rip), %rcx     # 0x972ff
xorl %edi, %edi
movl $0x2e5, %r8d            # imm = 0x2E5
callq 0x4d872
movl $0x1, %edi
callq 0x1f3b0
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/object.c
// Function: getDoubleFromObject
int getDoubleFromObject(robj *o, double *target) {
    double value;
    char *eptr;

    if (o == NULL) {
        value = 0;

    } else {
        redisAssertWithInfo(NULL,o,o->type == REDIS_STRING);

        // 尝试从字符串中转换 double 值
        if (sdsEncodedObject(o)) {
            errno = 0;
            value = strtod(o->ptr, &eptr);
            if (isspace(((char*)o->ptr)[0]) ||
                eptr[0] != '\0' ||
                (errno == ERANGE &&
                    (value == HUGE_VAL || value == -HUGE_VAL || value == 0)) ||
                errno == EINVAL ||
                isnan(value))
                return REDIS_ERR;

        // INT 编码
        } else if (o->encoding == REDIS_ENCODING_INT) {
            value = (long)o->ptr;

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

    // 返回值
    *target = value;
    return REDIS_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
testq %rdi, %rdi
je 0x30d8e
movq %rdi, %r14
movl (%rdi), %eax
testb $0xf, %al
jne 0x30daa
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x8, %eax
je 0x30d07
cmpl $0x1, %eax
je 0x30d94
testl %eax, %eax
jne 0x30dca
callq 0x1f810
movq %rax, %r15
movl $0x0, (%rax)
movq 0x8(%r14), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1fc40
movsd %xmm0, (%rsp)
callq 0x1f550
movq (%rax), %rcx
movq 0x8(%r14), %rax
movsbq (%rax), %rdx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testb $0x20, 0x1(%rcx,%rdx,2)
jne 0x30da0
movq 0x8(%rsp), %rcx
cmpb $0x0, (%rcx)
jne 0x30da0
movl (%r15), %ecx
cmpl $0x22, %ecx
movq (%rsp), %xmm0
jne 0x30d81
movq %xmm0, %rdx
btrq $0x3f, %rdx
movabsq $0x7ff0000000000000, %rsi # imm = 0x7FF0000000000000
cmpq %rsi, %rdx
sete %sil
testq %rdx, %rdx
sete %dl
orb %sil, %dl
jne 0x30da0
cmpl $0x16, %ecx
je 0x30da0
ucomisd %xmm0, %xmm0
jnp 0x30d9a
jmp 0x30da0
xorpd %xmm0, %xmm0
jmp 0x30d9a
cvtsi2sdq 0x8(%r14), %xmm0
movsd %xmm0, (%rbx)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x65f75(%rip), %rdx     # 0x96d26
leaq 0x66547(%rip), %rcx     # 0x972ff
xorl %edi, %edi
movq %r14, %rsi
movl $0x301, %r8d            # imm = 0x301
callq 0x4d872
jmp 0x30de2
leaq 0x66643(%rip), %rdi     # 0x97414
leaq 0x66527(%rip), %rsi     # 0x972ff
movl $0x314, %edx            # imm = 0x314
callq 0x4d0e5
movl $0x1, %edi
callq 0x1f3b0
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/object.c
// Function: getDoubleFromObjectOrReply
int getDoubleFromObjectOrReply(redisClient *c, robj *o, double *target, const char *msg) {

    double value;

    if (getDoubleFromObject(o, &value) != REDIS_OK) {
        if (msg != NULL) {
            addReplyError(c,(char*)msg);
        } else {
            addReplyError(c,"value is not a valid float");
        }
        return REDIS_ERR;
    }

    *target = value;
    return REDIS_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %rax
movq %rdi, %r14
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x30cc9
testl %eax, %eax
je 0x30e1f
testq %rbx, %rbx
je 0x30e2e
movq %r14, %rdi
movq %rbx, %rsi
jmp 0x30e38
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%r15)
xorl %eax, %eax
jmp 0x30e42
leaq 0x6885c(%rip), %rsi     # 0x99691
movq %r14, %rdi
callq 0x2d9d7
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/object.c
// Function: getLongDoubleFromObject
int getLongDoubleFromObject(robj *o, long double *target) {
    long double value;
    char *eptr;

    if (o == NULL) {
        value = 0;
    } else {

        redisAssertWithInfo(NULL,o,o->type == REDIS_STRING);

        // RAW 编码，尝试从字符串中转换 long double
        if (sdsEncodedObject(o)) {
            errno = 0;
            value = strtold(o->ptr, &eptr);
            if (isspace(((char*)o->ptr)[0]) || eptr[0] != '\0' ||
                errno == ERANGE || isnan(value))
                return REDIS_ERR;

        // INT 编码，直接保存
        } else if (o->encoding == REDIS_ENCODING_INT) {
            value = (long)o->ptr;

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

    *target = value;
    return REDIS_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
fldz
testq %rdi, %rdi
je 0x30ef1
movq %rdi, %r14
fstp %st(0)
movl (%rdi), %eax
testb $0xf, %al
jne 0x30f03
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x8, %eax
je 0x30e8a
cmpl $0x1, %eax
je 0x30ee6
testl %eax, %eax
jne 0x30f23
callq 0x1f810
movq %rax, %r15
movl $0x0, (%rax)
movq 0x8(%r14), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1f0f0
fstpt 0x14(%rsp)
callq 0x1f550
movq (%rax), %rcx
movq 0x8(%r14), %rax
movsbq (%rax), %rdx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testb $0x20, 0x1(%rcx,%rdx,2)
jne 0x30ef5
movq 0x8(%rsp), %rcx
cmpb $0x0, (%rcx)
jne 0x30ef5
cmpl $0x22, (%r15)
sete %cl
fldt 0x14(%rsp)
fucomi %st(0), %st
setp %dl
orb %cl, %dl
je 0x30ef1
jmp 0x30ef7
movq 0x8(%r14), %rax
movq %rax, (%rsp)
fildll (%rsp)
fstpt (%rbx)
xorl %eax, %eax
fldz
fstp %st(0)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x65e1c(%rip), %rdx     # 0x96d26
leaq 0x663ee(%rip), %rcx     # 0x972ff
xorl %edi, %edi
movq %r14, %rsi
movl $0x344, %r8d            # imm = 0x344
callq 0x4d872
jmp 0x30f3b
leaq 0x664ea(%rip), %rdi     # 0x97414
leaq 0x663ce(%rip), %rsi     # 0x972ff
movl $0x353, %edx            # imm = 0x353
callq 0x4d0e5
movl $0x1, %edi
callq 0x1f3b0
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/object.c
// Function: getLongDoubleFromObjectOrReply
int getLongDoubleFromObjectOrReply(redisClient *c, robj *o, long double *target, const char *msg) {

    long double value;

    if (getLongDoubleFromObject(o, &value) != REDIS_OK) {
        if (msg != NULL) {
            addReplyError(c,(char*)msg);
        } else {
            addReplyError(c,"value is not a valid float");
        }
        return REDIS_ERR;
    }

    *target = value;
    return REDIS_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %rax
movq %rdi, %r14
movq %rsp, %rsi
movq %rax, %rdi
callq 0x30e4c
testl %eax, %eax
je 0x30f76
testq %rbx, %rbx
je 0x30f80
movq %r14, %rdi
movq %rbx, %rsi
jmp 0x30f8a
fldt (%rsp)
fstpt (%r15)
xorl %eax, %eax
jmp 0x30f94
leaq 0x6870a(%rip), %rsi     # 0x99691
movq %r14, %rdi
callq 0x2d9d7
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/object.c
// Function: getLongLongFromObject
int getLongLongFromObject(robj *o, long long *target) {
    long long value;
    char *eptr;

    if (o == NULL) {
        // o 为 NULL 时，将值设为 0 。
        value = 0;
    } else {

        // 确保对象为 REDIS_STRING 类型
        redisAssertWithInfo(NULL,o,o->type == REDIS_STRING);
        if (sdsEncodedObject(o)) {
            errno = 0;
            // T = O(N)
            value = strtoll(o->ptr, &eptr, 10);
            if (isspace(((char*)o->ptr)[0]) || eptr[0] != '\0' ||
                errno == ERANGE)
                return REDIS_ERR;
        } else if (o->encoding == REDIS_ENCODING_INT) {
            // 对于 REDIS_ENCODING_INT 编码的整数值
            // 直接将它的值保存到 value 中
            value = (long)o->ptr;
        } else {
            redisPanic("Unknown string encoding");
        }
    }

    // 保存值到指针
    if (target) *target = value;

    // 返回结果标识符
    return REDIS_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
xorl %r15d, %r15d
testq %rdi, %rdi
je 0x3102a
movq %rdi, %r14
movl (%rdi), %eax
testb $0xf, %al
jne 0x31040
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x8, %eax
je 0x30fd6
cmpl $0x1, %eax
je 0x31026
testl %eax, %eax
jne 0x31060
callq 0x1f810
movq %rax, %r12
movl $0x0, (%rax)
movq 0x8(%r14), %rdi
movq %rsp, %rsi
movl $0xa, %edx
callq 0x1fa70
movq %rax, %r15
callq 0x1f550
movq (%rax), %rcx
movq 0x8(%r14), %rax
movsbq (%rax), %rdx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testb $0x20, 0x1(%rcx,%rdx,2)
jne 0x31034
movq (%rsp), %rcx
cmpb $0x0, (%rcx)
jne 0x31034
cmpl $0x22, (%r12)
jne 0x3102a
jmp 0x31034
movq 0x8(%r14), %r15
testq %rbx, %rbx
je 0x31032
movq %r15, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x65cdf(%rip), %rdx     # 0x96d26
leaq 0x662b1(%rip), %rcx     # 0x972ff
xorl %edi, %edi
movq %r14, %rsi
movl $0x38a, %r8d            # imm = 0x38A
callq 0x4d872
jmp 0x31078
leaq 0x663ad(%rip), %rdi     # 0x97414
leaq 0x66291(%rip), %rsi     # 0x972ff
movl $0x397, %edx            # imm = 0x397
callq 0x4d0e5
movl $0x1, %edi
callq 0x1f3b0
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/object.c
// Function: getLongLongFromObjectOrReply
int getLongLongFromObjectOrReply(redisClient *c, robj *o, long long *target, const char *msg) {

    long long value;

    // T = O(N)
    if (getLongLongFromObject(o, &value) != REDIS_OK) {
        if (msg != NULL) {
            addReplyError(c,(char*)msg);
        } else {
            addReplyError(c,"value is not an integer or out of range");
        }
        return REDIS_ERR;
    }

    *target = value;

    return REDIS_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %rax
movq %rdi, %r14
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x30f9e
testl %eax, %eax
je 0x310b5
testq %rbx, %rbx
je 0x310c1
movq %r14, %rdi
movq %rbx, %rsi
jmp 0x310cb
movq 0x8(%rsp), %rax
movq %rax, (%r15)
xorl %eax, %eax
jmp 0x310d5
leaq 0x66366(%rip), %rsi     # 0x9742e
movq %r14, %rdi
callq 0x2d9d7
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/object.c
// Function: objectCommand
void objectCommand(redisClient *c) {
    robj *o;

    // 返回对戏哪个的引用计数
    if (!strcasecmp(c->argv[1]->ptr,"refcount") && c->argc == 3) {
        if ((o = objectCommandLookupOrReply(c,c->argv[2],shared.nullbulk))
                == NULL) return;
        addReplyLongLong(c,o->refcount);

    // 返回对象的编码
    } else if (!strcasecmp(c->argv[1]->ptr,"encoding") && c->argc == 3) {
        if ((o = objectCommandLookupOrReply(c,c->argv[2],shared.nullbulk))
                == NULL) return;
        addReplyBulkCString(c,strEncoding(o->encoding));
    
    // 返回对象的空闲时间
    } else if (!strcasecmp(c->argv[1]->ptr,"idletime") && c->argc == 3) {
        if ((o = objectCommandLookupOrReply(c,c->argv[2],shared.nullbulk))
                == NULL) return;
        addReplyLongLong(c,estimateObjectIdleTime(o)/1000);
    } else {
        addReplyError(c,"Syntax error. Try OBJECT (refcount|encoding|idletime)");
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x38(%rdi), %r15
movq 0x8(%r15), %rax
movq 0x8(%rax), %r14
leaq 0x662c0(%rip), %rsi     # 0x97496
movq %r14, %rdi
callq 0x1f2e0
testl %eax, %eax
jne 0x31214
cmpl $0x3, 0x30(%rbx)
jne 0x31214
movq 0x10(%r15), %rsi
leaq 0x9960d(%rip), %rax     # 0xca800
movq 0x50(%rax), %rdx
movq %rbx, %rdi
callq 0x31179
testq %rax, %rax
je 0x3130e
movslq 0x4(%rax), %rsi
movq %rbx, %rdi
jmp 0x312f0
leaq 0x67d70(%rip), %rsi     # 0x98f8b
movq %r14, %rdi
callq 0x1f2e0
testl %eax, %eax
jne 0x3126e
cmpl $0x3, 0x30(%rbx)
jne 0x3126e
movq 0x10(%r15), %rsi
leaq 0x995c8(%rip), %rax     # 0xca800
movq 0x50(%rax), %rdx
movq %rbx, %rdi
callq 0x31179
testq %rax, %rax
je 0x3130e
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x8, %eax
ja 0x31314
leaq 0x91ffb(%rip), %rcx     # 0xc3260
movq (%rcx,%rax,8), %rsi
jmp 0x3131b
leaq 0x6622a(%rip), %rsi     # 0x9749f
movq %r14, %rdi
callq 0x1f2e0
testl %eax, %eax
jne 0x312fa
cmpl $0x3, 0x30(%rbx)
jne 0x312fa
movq 0x10(%r15), %rsi
leaq 0x9956e(%rip), %rax     # 0xca800
movq 0x50(%rax), %rdx
movq %rbx, %rdi
callq 0x31179
testq %rax, %rax
je 0x3130e
leaq 0x98cfe(%rip), %rcx     # 0xc9fa8
movl 0x30(%rcx), %ecx
andl $0xffffff, %ecx         # imm = 0xFFFFFF
movl (%rax), %eax
shrl $0x8, %eax
movq %rcx, %rdx
subq %rax, %rdx
movl %eax, %esi
xorl $0xffffff, %esi         # imm = 0xFFFFFF
addl %ecx, %esi
cmpl %eax, %ecx
cmovaeq %rdx, %rsi
imulq $0x3e8, %rsi, %rax      # imm = 0x3E8
shrq $0x3, %rax
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
mulq %rcx
shrq $0x4, %rdx
movq %rbx, %rdi
movq %rdx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x2dea3
leaq 0x661a7(%rip), %rsi     # 0x974a8
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2d9d7
popq %rbx
popq %r14
popq %r15
retq
leaq 0x66173(%rip), %rsi     # 0x9748e
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2ddc1
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/db.c
// Function: lookupKeyRead
robj *lookupKeyRead(redisDb *db, robj *key) {
    robj *val;

    // 检查 key 释放已经过期
    expireIfNeeded(db,key);

    // 从数据库中取出键的值
    val = lookupKey(db,key);

    // 更新命中/不命中信息
    if (val == NULL)
        server.stat_keyspace_misses++;
    else
        server.stat_keyspace_hits++;

    // 返回值
    return val;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x313a3
movq %r14, %rdi
movq %rbx, %rsi
callq 0x31328
xorl %ecx, %ecx
testq %rax, %rax
sete %cl
leaq 0x98c15(%rip), %rdx     # 0xc9fa8
incq 0x368(%rdx,%rcx,8)
addq $0x8, %rsp
popq %rbx
popq %r14
retq