LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/nilyang[P]redis-tdd-annotation/src/ziplist.c
// Function: ziplistResize
static unsigned char *ziplistResize(unsigned char *zl, unsigned int len) {

    // 用 zrealloc ，扩展时不改变现有元素
    zl = zrealloc(zl,len);

    // 更新 bytes 属性
    ZIPLIST_BYTES(zl) = intrev32ifbe(len);

    // 重新设置表末端
    zl[len-1] = ZIP_END;

    return zl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %eax
movl %eax, %esi
callq 0x2e270
movq %rax, -0x8(%rbp)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movb $-0x1, (%rax,%rcx)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/nilyang[P]redis-tdd-annotation/src/ziplist.c
// Function: zipPrevEncodeLengthForceLarge
static void zipPrevEncodeLengthForceLarge(unsigned char *p, unsigned int len) {

    if (p == NULL) return;

    // 设置 5 字节长度标识
    p[0] = ZIP_BIGLEN;

    // 写入 len
    memcpy(p+1,&len,sizeof(len));
    memrev32ifbe(p+1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x34784
jmp 0x34795
movq -0x8(%rbp), %rax
movb $-0x2, (%rax)
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
movl %ecx, 0x1(%rax)
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/nilyang[P]redis-tdd-annotation/src/networking.c
// Function: getStringObjectSdsUsedMemory
size_t getStringObjectSdsUsedMemory(robj *o) {
    redisAssertWithInfo(NULL,o,o->type == REDIS_STRING);
    switch(o->encoding) {
    case REDIS_ENCODING_RAW: return zmalloc_size_sds(o->ptr);
    case REDIS_ENCODING_EMBSTR: return sdslen(o->ptr);
    default: return 0; /* Just integer encoding for now. */
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0xf, %eax
cmpl $0x0, %eax
jne 0x3487c
jmp 0x348a7
movq -0x10(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edi
leaq 0xac5c5(%rip), %rdx     # 0xe0e50
leaq 0xac5d6(%rip), %rcx     # 0xe0e68
movl $0x31, %r8d
callq 0x648b0
movl $0x1, %edi
callq 0x1f3b0
movq -0x10(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
movl %eax, -0x14(%rbp)
je 0x348c4
jmp 0x348ba
movl -0x14(%rbp), %eax
subl $0x8, %eax
je 0x348d7
jmp 0x348ea
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x34840
movq %rax, -0x8(%rbp)
jmp 0x348f2
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x34800
movq %rax, -0x8(%rbp)
jmp 0x348f2
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/nilyang[P]redis-tdd-annotation/src/networking.c
// Function: prepareClientToWrite
int prepareClientToWrite(redisClient *c) {

    // LUA 脚本环境所使用的伪客户端总是可写的
    if (c->flags & REDIS_LUA_CLIENT) return REDIS_OK;
    
    // 客户端是主服务器并且不接受查询，
    // 那么它是不可写的，出错
    if ((c->flags & REDIS_MASTER) &&
        !(c->flags & REDIS_MASTER_FORCE_REPLY)) return REDIS_ERR;

    // 无连接的伪客户端总是不可写的
    if (c->fd <= 0) return REDIS_ERR; /* Fake client */

    // 一般情况，为客户端套接字安装写处理器到事件循环
    if (c->bufpos == 0 && listLength(c->reply) == 0 &&
        (c->replstate == REDIS_REPL_NONE ||
         c->replstate == REDIS_REPL_ONLINE) &&
        aeCreateFileEvent(server.el, c->fd, AE_WRITABLE,
        sendReplyToClient, c) == AE_ERR) return REDIS_ERR;

    return REDIS_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x90(%rax), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x34f7c
movl $0x0, -0x4(%rbp)
jmp 0x35031
movq -0x10(%rbp), %rax
movl 0x90(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x34fae
movq -0x10(%rbp), %rax
movl 0x90(%rax), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
jne 0x34fae
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x35031
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
jg 0x34fc0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x35031
movq -0x10(%rbp), %rax
cmpl $0x0, 0x170(%rax)
jne 0x3502a
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
cmpq $0x0, 0x28(%rax)
jne 0x3502a
movq -0x10(%rbp), %rax
cmpl $0x0, 0x98(%rax)
je 0x34ff6
movq -0x10(%rbp), %rax
cmpl $0x9, 0x98(%rax)
jne 0x3502a
leaq 0xde8fb(%rip), %rax     # 0x1138f8
movq 0x28(%rax), %rdi
movq -0x10(%rbp), %rax
movl (%rax), %esi
movq -0x10(%rbp), %r8
movl $0x2, %edx
leaq 0x29(%rip), %rcx        # 0x35040
callq 0x20a80
cmpl $-0x1, %eax
jne 0x3502a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x35031
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/nilyang[P]redis-tdd-annotation/src/networking.c
// Function: addReplyToBuffer
int _addReplyToBuffer(redisClient *c, char *s, size_t len) {
    size_t available = sizeof(c->buf)-c->bufpos;

    // 正准备关闭客户端，无须再发送内容
    if (c->flags & REDIS_CLOSE_AFTER_REPLY) return REDIS_OK;

    /* If there already are entries in the reply list, we cannot
     * add anything more to the static buffer. */
    // 回复链表里已经有内容，再添加内容到 c->buf 里面就是错误了
    if (listLength(c->reply) > 0) return REDIS_ERR;

    /* Check that the buffer has enough space available for this string. */
    // 空间必须满足
    if (len > available) return REDIS_ERR;

    // 复制内容到 c->buf 里面
    memcpy(c->buf+c->bufpos,s,len);
    c->bufpos+=len;

    return REDIS_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movslq 0x170(%rax), %rcx
movl $0x4000, %eax           # imm = 0x4000
subq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl 0x90(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x35426
movl $0x0, -0x4(%rbp)
jmp 0x35496
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
cmpq $0x0, 0x28(%rax)
jbe 0x3543e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x35496
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jbe 0x35451
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x35496
movq -0x10(%rbp), %rdi
addq $0x174, %rdi            # imm = 0x174
movq -0x10(%rbp), %rax
movslq 0x170(%rax), %rax
addq %rax, %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x1fbf0
movq -0x20(%rbp), %rdx
movq -0x10(%rbp), %rax
movslq 0x170(%rax), %rcx
addq %rdx, %rcx
movl %ecx, 0x170(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/nilyang[P]redis-tdd-annotation/src/networking.c
// Function: asyncCloseClientOnOutputBufferLimitReached
void asyncCloseClientOnOutputBufferLimitReached(redisClient *c) {
    redisAssert(c->reply_bytes < ULONG_MAX-(1024*64));

    // 已经被标记了
    if (c->reply_bytes == 0 || c->flags & REDIS_CLOSE_ASAP) return;

    // 检查限制
    if (checkClientOutputBufferLimits(c)) {
        sds client = catClientInfoString(sdsempty(),c);

        // 异步关闭
        freeClientAsync(c);
        redisLog(REDIS_WARNING,"Client %s scheduled to be closed ASAP for overcoming of output buffer limits.", client);
        sdsfree(client);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $-0x10001, 0x68(%rax)   # imm = 0xFFFEFFFF
jae 0x3566c
jmp 0x3568e
leaq 0xabc57(%rip), %rdi     # 0xe12ca
leaq 0xab7ee(%rip), %rsi     # 0xe0e68
movl $0x81a, %edx            # imm = 0x81A
callq 0x63ca0
movl $0x1, %edi
callq 0x1f3b0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x68(%rax)
je 0x356ad
movq -0x8(%rbp), %rax
movl 0x90(%rax), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x356af
jmp 0x356fb
movq -0x8(%rbp), %rdi
callq 0x38c90
cmpl $0x0, %eax
je 0x356fb
callq 0x2c0c0
movq %rax, %rdi
movq -0x8(%rbp), %rsi
callq 0x37c60
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x37000
movq -0x10(%rbp), %rdx
movl $0x3, %edi
leaq 0xabc04(%rip), %rsi     # 0xe12ef
movb $0x0, %al
callq 0x24fb0
movq -0x10(%rbp), %rdi
callq 0x2c160
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/nilyang[P]redis-tdd-annotation/src/networking.c
// Function: addReplySds
void addReplySds(redisClient *c, sds s) {
    if (prepareClientToWrite(c) != REDIS_OK) {
        /* The caller expects the sds to be free'd. */
        sdsfree(s);
        return;
    }
    if (_addReplyToBuffer(c,s,sdslen(s)) == REDIS_OK) {
        sdsfree(s);
    } else {
        /* This method free's the sds when it is no longer needed. */
        _addReplySdsToList(c,s);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x34f50
cmpl $0x0, %eax
je 0x35c29
movq -0x10(%rbp), %rdi
callq 0x2c160
jmp 0x35c6f
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x34800
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq %rax, %rdx
callq 0x353e0
cmpl $0x0, %eax
jne 0x35c62
movq -0x10(%rbp), %rdi
callq 0x2c160
jmp 0x35c6f
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x35710
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/nilyang[P]redis-tdd-annotation/src/networking.c
// Function: addReplyStatusFormat
void addReplyStatusFormat(redisClient *c, const char *fmt, ...) {
    va_list ap;
    va_start(ap,fmt);
    sds s = sdscatvprintf(sdsempty(),fmt,ap);
    va_end(ap);
    addReplyStatusLength(c,s,sdslen(s));
    sdsfree(s);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
testb %al, %al
je 0x35fab
movaps %xmm0, -0xc0(%rbp)
movaps %xmm1, -0xb0(%rbp)
movaps %xmm2, -0xa0(%rbp)
movaps %xmm3, -0x90(%rbp)
movaps %xmm4, -0x80(%rbp)
movaps %xmm5, -0x70(%rbp)
movaps %xmm6, -0x60(%rbp)
movaps %xmm7, -0x50(%rbp)
movq %r9, -0xc8(%rbp)
movq %r8, -0xd0(%rbp)
movq %rcx, -0xd8(%rbp)
movq %rdx, -0xe0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0xf0(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x30, -0x2c(%rbp)
movl $0x10, -0x30(%rbp)
callq 0x2c0c0
movq %rax, %rdi
movq -0x10(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x2c940
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0x38(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
callq 0x34800
movq -0x100(%rbp), %rdi
movq -0xf8(%rbp), %rsi
movq %rax, %rdx
callq 0x35ed0
movq -0x38(%rbp), %rdi
callq 0x2c160
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/nilyang[P]redis-tdd-annotation/src/networking.c
// Function: addDeferredMultiBulkLength
void *addDeferredMultiBulkLength(redisClient *c) {
    /* Note that we install the write event here even if the object is not
     * ready to be sent, since we are sure that before returning to the
     * event loop setDeferredMultiBulkLength() will be called. */
    if (prepareClientToWrite(c) != REDIS_OK) return NULL;
    listAddNodeTail(c->reply,createObject(REDIS_STRING,NULL));
    return listLast(c->reply);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x34f50
cmpl $0x0, %eax
je 0x36074
movq $0x0, -0x8(%rbp)
jmp 0x360a7
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x18(%rbp)
xorl %edi, %edi
xorl %eax, %eax
movl %eax, %esi
callq 0x3a0d0
movq -0x18(%rbp), %rdi
movq %rax, %rsi
callq 0x1ff90
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/nilyang[P]redis-tdd-annotation/src/networking.c
// Function: setDeferredMultiBulkLength
void setDeferredMultiBulkLength(redisClient *c, void *node, long length) {
    listNode *ln = (listNode*)node;
    robj *len, *next;

    /* Abort when *node is NULL (see addDeferredMultiBulkLength). */
    if (node == NULL) return;

    len = listNodeValue(ln);
    len->ptr = sdscatprintf(sdsempty(),"*%ld\r\n",length);
    len->encoding = REDIS_ENCODING_RAW; /* in case it was an EMBSTR. */
    c->reply_bytes += zmalloc_size_sds(len->ptr);
    if (ln->next != NULL) {
        next = listNodeValue(ln->next);

        /* Only glue when the next node is non-NULL (an sds in this case) */
        if (next->ptr != NULL) {
            c->reply_bytes -= zmalloc_size_sds(len->ptr);
            c->reply_bytes -= getStringObjectSdsUsedMemory(next);
            len->ptr = sdscatlen(len->ptr,next->ptr,sdslen(next->ptr));
            c->reply_bytes += zmalloc_size_sds(len->ptr);
            listDelNode(c->reply,ln->next);
        }
    }
    asyncCloseClientOnOutputBufferLimitReached(c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x360e8
jmp 0x3622a
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
callq 0x2c0c0
movq %rax, %rdi
movq -0x18(%rbp), %rdx
leaq 0xaadae(%rip), %rsi     # 0xe0eb5
movb $0x0, %al
callq 0x2cad0
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
movl (%rax), %ecx
andl $0xffffff0f, %ecx       # imm = 0xFFFFFF0F
orl $0x0, %ecx
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x34840
movq %rax, %rcx
movq -0x8(%rbp), %rax
addq 0x68(%rax), %rcx
movq %rcx, 0x68(%rax)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x36221
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x3621f
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x34840
movq %rax, %rdx
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x68(%rax)
movq -0x30(%rbp), %rdi
callq 0x34860
movq %rax, %rdx
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x68(%rax)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x34800
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq %rax, %rdx
callq 0x2c500
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x34840
movq %rax, %rcx
movq -0x8(%rbp), %rax
addq 0x68(%rax), %rcx
movq %rcx, 0x68(%rax)
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x20170
jmp 0x36221
movq -0x8(%rbp), %rdi
callq 0x35650
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/nilyang[P]redis-tdd-annotation/src/networking.c
// Function: addReplyBulkCString
void addReplyBulkCString(redisClient *c, char *s) {
    if (s == NULL) {
        addReply(c,shared.nullbulk);
    } else {
        addReplyBulkCBuffer(c,s,strlen(s));
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x3635d
movq -0x8(%rbp), %rdi
leaq 0xdddfe(%rip), %rax     # 0x114150
movq 0x50(%rax), %rsi
callq 0x35a70
jmp 0x36386
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1f4d0
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq %rax, %rdx
callq 0x36670
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/nilyang[P]redis-tdd-annotation/src/networking.c
// Function: addReplyLongLongWithPrefix
void addReplyLongLongWithPrefix(redisClient *c, long long ll, char prefix) {
    char buf[128];
    int len;

    /* Things like $3\r\n or *2\r\n are emitted very often by the protocol
     * so we have a few shared objects to use if the integer is small
     * like it is most of the times. */
    if (prefix == '*' && ll < REDIS_SHARED_BULKHDR_LEN) {
        // 多条批量回复
        addReply(c,shared.mbulkhdr[ll]);
        return;
    } else if (prefix == '$' && ll < REDIS_SHARED_BULKHDR_LEN) {
        // 批量回复
        addReply(c,shared.bulkhdr[ll]);
        return;
    }

    buf[0] = prefix;
    len = ll2string(buf+1,sizeof(buf)-1,ll);
    buf[len+1] = '\r';
    buf[len+2] = '\n';
    addReplyString(c,buf,len+3);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movsbl -0x11(%rbp), %eax
cmpl $0x2a, %eax
jne 0x363d9
cmpq $0x20, -0x10(%rbp)
jge 0x363d9
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rcx
leaq 0xddd89(%rip), %rax     # 0x114150
movq 0x13a30(%rax,%rcx,8), %rsi
callq 0x35a70
jmp 0x36473
movsbl -0x11(%rbp), %eax
cmpl $0x24, %eax
jne 0x36407
cmpq $0x20, -0x10(%rbp)
jge 0x36407
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rcx
leaq 0xddd58(%rip), %rax     # 0x114150
movq 0x13b30(%rax,%rcx,8), %rsi
callq 0x35a70
jmp 0x36473
jmp 0x36409
movb -0x11(%rbp), %al
movb %al, -0xa0(%rbp)
leaq -0xa0(%rbp), %rdi
addq $0x1, %rdi
movq -0x10(%rbp), %rdx
movl $0x7f, %esi
callq 0x39660
movl %eax, -0xa4(%rbp)
movl -0xa4(%rbp), %eax
addl $0x1, %eax
cltq
movb $0xd, -0xa0(%rbp,%rax)
movl -0xa4(%rbp), %eax
addl $0x2, %eax
cltq
movb $0xa, -0xa0(%rbp,%rax)
movq -0x8(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
movl -0xa4(%rbp), %eax
addl $0x3, %eax
movslq %eax, %rdx
callq 0x35c80
addq $0xb0, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/nilyang[P]redis-tdd-annotation/src/networking.c
// Function: addReplyLongLong
void addReplyLongLong(redisClient *c, long long ll) {
    if (ll == 0)
        addReply(c,shared.czero);
    else if (ll == 1)
        addReply(c,shared.cone);
    else
        addReplyLongLongWithPrefix(c,ll,':');
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x364ad
movq -0x8(%rbp), %rdi
leaq 0xddcae(%rip), %rax     # 0x114150
movq 0x20(%rax), %rsi
callq 0x35a70
jmp 0x364de
cmpq $0x1, -0x10(%rbp)
jne 0x364ca
movq -0x8(%rbp), %rdi
leaq 0xddc91(%rip), %rax     # 0x114150
movq 0x28(%rax), %rsi
callq 0x35a70
jmp 0x364dc
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x3a, %edx
callq 0x36390
jmp 0x364de
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/nilyang[P]redis-tdd-annotation/src/networking.c
// Function: addReplyMultiBulkLen
void addReplyMultiBulkLen(redisClient *c, long length) {
    if (length < REDIS_SHARED_BULKHDR_LEN)
        addReply(c,shared.mbulkhdr[length]);
    else
        addReplyLongLongWithPrefix(c,length,'*');
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x20, -0x10(%rbp)
jge 0x36525
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rcx
leaq 0xddc3a(%rip), %rax     # 0x114150
movq 0x13a30(%rax,%rcx,8), %rsi
callq 0x35a70
jmp 0x36537
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x2a, %edx
callq 0x36390
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/nilyang[P]redis-tdd-annotation/src/networking.c
// Function: copyClientOutputBuffer
void copyClientOutputBuffer(redisClient *dst, redisClient *src) {

    // 释放 dst 原有的回复链表
    listRelease(dst->reply);
    // 复制新链表到 dst
    dst->reply = listDup(src->reply);

    // 复制内容到回复 buf
    memcpy(dst->buf,src->buf,src->bufpos);

    // 同步偏移量和字节数
    dst->bufpos = src->bufpos;
    dst->reply_bytes = src->reply_bytes;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdi
callq 0x1fe30
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rdi
callq 0x20360
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x8(%rbp), %rdi
addq $0x174, %rdi            # imm = 0x174
movq -0x10(%rbp), %rsi
addq $0x174, %rsi            # imm = 0x174
movq -0x10(%rbp), %rax
movslq 0x170(%rax), %rdx
callq 0x1fbf0
movq -0x10(%rbp), %rax
movl 0x170(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x170(%rax)
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x68(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/nilyang[P]redis-tdd-annotation/src/networking.c
// Function: acceptTcpHandler
void acceptTcpHandler(aeEventLoop *el, int fd, void *privdata, int mask) {
    int cport, cfd, max = MAX_ACCEPTS_PER_CALL;
    char cip[REDIS_IP_STR_LEN];
    REDIS_NOTUSED(el);
    REDIS_NOTUSED(mask);
    REDIS_NOTUSED(privdata);

    while(max--) {
        // accept 客户端连接
        cfd = anetTcpAccept(server.neterr, fd, cip, sizeof(cip), &cport);
        if (cfd == ANET_ERR) {
            if (errno != EWOULDBLOCK)
                redisLog(REDIS_WARNING,
                    "Accepting client connection: %s", server.neterr);
            return;
        }
        redisLog(REDIS_VERBOSE,"Accepted %s:%d", cip, cport);
        // 为客户端创建客户端状态（redisClient）
        acceptCommonHandler(cfd,0);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x3e8, -0x28(%rbp)     # imm = 0x3E8
movl -0x28(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x28(%rbp)
cmpl $0x0, %eax
je 0x36843
movl -0xc(%rbp), %esi
leaq -0x60(%rbp), %rdx
leaq 0xdd129(%rip), %rdi     # 0x1138f8
addq $0x1e8, %rdi            # imm = 0x1E8
movl $0x2e, %ecx
leaq -0x20(%rbp), %r8
callq 0x229d0
movl %eax, -0x24(%rbp)
cmpl $-0x1, -0x24(%rbp)
jne 0x3681a
callq 0x1f820
cmpl $0xb, (%rax)
je 0x36818
movl $0x3, %edi
leaq 0xaa6c4(%rip), %rsi     # 0xe0ec7
leaq 0xdd0ee(%rip), %rdx     # 0x1138f8
addq $0x1e8, %rdx            # imm = 0x1E8
movb $0x0, %al
callq 0x24fb0
jmp 0x36843
leaq -0x60(%rbp), %rdx
movl -0x20(%rbp), %ecx
movl $0x1, %edi
leaq 0xaa6ba(%rip), %rsi     # 0xe0ee7
movb $0x0, %al
callq 0x24fb0
movl -0x24(%rbp), %edi
xorl %esi, %esi
callq 0x36850
jmp 0x367ad
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/nilyang[P]redis-tdd-annotation/src/networking.c
// Function: acceptUnixHandler
void acceptUnixHandler(aeEventLoop *el, int fd, void *privdata, int mask) {
    int cfd, max = MAX_ACCEPTS_PER_CALL;
    REDIS_NOTUSED(el);
    REDIS_NOTUSED(mask);
    REDIS_NOTUSED(privdata);

    while(max--) {
        // accept 本地客户端连接
        cfd = anetUnixAccept(server.neterr, fd);
        if (cfd == ANET_ERR) {
            if (errno != EWOULDBLOCK)
                redisLog(REDIS_WARNING,
                    "Accepting client connection: %s", server.neterr);
            return;
        }
        redisLog(REDIS_VERBOSE,"Accepted connection to %s", server.unixsocket);
        // 为本地客户端创建客户端状态
        acceptCommonHandler(cfd,REDIS_UNIX_SOCKET);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x3e8, -0x24(%rbp)     # imm = 0x3E8
movl -0x24(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x24(%rbp)
cmpl $0x0, %eax
je 0x36a1c
movl -0xc(%rbp), %esi
leaq 0xdcf51(%rip), %rdi     # 0x1138f8
addq $0x1e8, %rdi            # imm = 0x1E8
callq 0x22b80
movl %eax, -0x20(%rbp)
cmpl $-0x1, -0x20(%rbp)
jne 0x369e9
callq 0x1f820
cmpl $0xb, (%rax)
je 0x369e7
movl $0x3, %edi
leaq 0xaa4f5(%rip), %rsi     # 0xe0ec7
leaq 0xdcf1f(%rip), %rdx     # 0x1138f8
addq $0x1e8, %rdx            # imm = 0x1E8
movb $0x0, %al
callq 0x24fb0
jmp 0x36a1c
leaq 0xdcf08(%rip), %rax     # 0x1138f8
movq 0x118(%rax), %rdx
movl $0x1, %edi
leaq 0xaa4f3(%rip), %rsi     # 0xe0ef6
movb $0x0, %al
callq 0x24fb0
movl -0x20(%rbp), %edi
movl $0x800, %esi            # imm = 0x800
callq 0x36850
jmp 0x3698d
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/nilyang[P]redis-tdd-annotation/src/networking.c
// Function: replicationHandleMasterDisconnection
void replicationHandleMasterDisconnection(void) {
    server.master = NULL;
    server.repl_state = REDIS_REPL_CONNECT;
    server.repl_down_since = server.unixtime;
    /* We lost connection with our master, force our slaves to resync
     * with us as well to load the new data set.
     *
     * 和主服务器失联，强制所有这个服务器的从服务器 resync ，
     * 等待载入新数据。
     *
     * If server.masterhost is NULL the user called SLAVEOF NO ONE so
     * slave resync is not needed. 
     *
     * 如果 masterhost 不存在（怎么会这样呢？）
     * 那么调用 SLAVEOF NO ONE ，避免 slave resync
     */
    if (server.masterhost != NULL) disconnectSlaves();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xdc9ad(%rip), %rax     # 0x1138f8
movq $0x0, 0x660(%rax)
leaq 0xdc99b(%rip), %rax     # 0x1138f8
movl $0x1, 0x674(%rax)
leaq 0xdc98a(%rip), %rax     # 0x1138f8
movq 0x798(%rax), %rcx
leaq 0xdc97c(%rip), %rax     # 0x1138f8
movq %rcx, 0x6b0(%rax)
leaq 0xdc96e(%rip), %rax     # 0x1138f8
cmpq $0x0, 0x650(%rax)
je 0x36f99
callq 0x36a30
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/nilyang[P]redis-tdd-annotation/src/networking.c
// Function: freeClientArgv
static void freeClientArgv(redisClient *c) {
    int j;
    for (j = 0; j < c->argc; j++)
        decrRefCount(c->argv[j]);
    c->argc = 0;
    c->cmd = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x30(%rcx), %eax
jge 0x36fdf
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x3aaa0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x36fb3
movq -0x8(%rbp), %rax
movl $0x0, 0x30(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x40(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/nilyang[P]redis-tdd-annotation/src/networking.c
// Function: freeClientsInAsyncFreeQueue
void freeClientsInAsyncFreeQueue(void) {
    
    // 遍历所有要关闭的客户端
    while (listLength(server.clients_to_close)) {
        listNode *ln = listFirst(server.clients_to_close);
        redisClient *c = listNodeValue(ln);

        c->flags &= ~REDIS_CLOSE_ASAP;
        // 关闭客户端
        freeClient(c);
        // 从客户端链表中删除被关闭的客户端
        listDelNode(server.clients_to_close,ln);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0xdc889(%rip), %rax     # 0x1138f8
movq 0x1b8(%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0x370d6
leaq 0xdc874(%rip), %rax     # 0x1138f8
movq 0x1b8(%rax), %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x90(%rax), %ecx
andl $0xfffffbff, %ecx       # imm = 0xFFFFFBFF
movl %ecx, 0x90(%rax)
movq -0x10(%rbp), %rdi
callq 0x36a80
leaq 0xdc834(%rip), %rax     # 0x1138f8
movq 0x1b8(%rax), %rdi
movq -0x8(%rbp), %rsi
callq 0x20170
jmp 0x37068
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x37109
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x37111
xorl %eax, %eax
movq %rax, -0x18(%rbp)
jmp 0x37111
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x36fa0
movq -0x8(%rbp), %rax
movl $0x0, 0x50(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x54(%rax)
movq -0x8(%rbp), %rax
movq $-0x1, 0x58(%rax)
movq -0x8(%rbp), %rax
movl 0x90(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x37179
leaq 0x3aaf3(%rip), %rax     # 0x71c50
cmpq %rax, -0x10(%rbp)
je 0x37179
movq -0x8(%rbp), %rax
movl 0x90(%rax), %ecx
andl $0xfffffdff, %ecx       # imm = 0xFFFFFDFF
movl %ecx, 0x90(%rax)
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
leaq 0xdc532(%rip), %rax     # 0x1138f8
cmpl $0x1, 0x464(%rax)
jl 0x37404
callq 0x2c0c0
movq %rax, %rdi
movq -0x8(%rbp), %rsi
callq 0x37c60
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdx
movl $0x1, %edi
leaq 0xa9fa8(%rip), %rsi     # 0xe139c
movb $0x0, %al
callq 0x24fb0
movq -0x18(%rbp), %rdi
callq 0x2c160
movq -0x8(%rbp), %rax
movl 0x90(%rax), %ecx
orl $0x40, %ecx
movl %ecx, 0x90(%rax)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
movl -0xc(%rbp), %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2d2e0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0xdbd59(%rip), %rax     # 0x1138f8
cmpl $0x0, 0x1d8(%rax)
je 0x37c40
leaq 0xdbd45(%rip), %rax     # 0x1138f8
movq 0x1e0(%rax), %rax
leaq 0xdbd37(%rip), %rcx     # 0x1138f8
cmpq 0x7a0(%rcx), %rax
jge 0x37c40
leaq 0xdbd27(%rip), %rax     # 0x1138f8
movl $0x0, 0x1d8(%rax)
leaq 0xdbd16(%rip), %rax     # 0x1138f8
movq 0x1b0(%rax), %rdi
leaq -0x18(%rbp), %rsi
callq 0x202b0
leaq -0x18(%rbp), %rdi
callq 0x20310
movq %rax, -0x8(%rbp)
cmpq $0x0, %rax
je 0x37c3e
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl 0x90(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x37c25
jmp 0x37bf2
leaq 0xdbccc(%rip), %rax     # 0x1138f8
movq 0x738(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x1ff90
jmp 0x37bf2
jmp 0x37c40
leaq 0xdbcb1(%rip), %rax     # 0x1138f8
movl 0x1d8(%rax), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0x90(%rax), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x382e5
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
leaq 0xdb631(%rip), %rax     # 0x1138f8
movq 0x118(%rax), %rcx
leaq 0xa8e8b(%rip), %rdx     # 0xe1160
movb $0x0, %al
callq 0x1f120
movl $0x0, -0x4(%rbp)
jmp 0x38327
movq -0x10(%rbp), %rax
movl (%rax), %edi
leaq -0x50(%rbp), %rsi
movl $0x2e, %edx
leaq -0x54(%rbp), %rcx
callq 0x22be0
movl %eax, -0x58(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
leaq -0x50(%rbp), %rdx
movl -0x54(%rbp), %ecx
callq 0x38220
movl -0x58(%rbp), %edx
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpl $-0x1, %edx
cmovel %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x168(%rax)
jne 0x38373
movq -0x8(%rbp), %rdi
leaq -0x60(%rbp), %rsi
movl $0x4e, %edx
callq 0x38290
leaq -0x60(%rbp), %rdi
callq 0x2c0e0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x168(%rax)
movq -0x8(%rbp), %rax
movq 0x168(%rax), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/nilyang[P]redis-tdd-annotation/src/networking.c
// Function: pauseClients
void pauseClients(mstime_t end) {

    // 设置暂停时间
    if (!server.clients_paused || end > server.clients_pause_end_time)
        server.clients_pause_end_time = end;

    // 打开客户端的“已被暂停”标志
    server.clients_paused = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
leaq 0xdb0e9(%rip), %rax     # 0x1138f8
cmpl $0x0, 0x1d8(%rax)
je 0x3882c
movq -0x8(%rbp), %rax
leaq 0xdb0d5(%rip), %rcx     # 0x1138f8
cmpq 0x1e0(%rcx), %rax
jle 0x3883e
movq -0x8(%rbp), %rcx
leaq 0xdb0c1(%rip), %rax     # 0x1138f8
movq %rcx, 0x1e0(%rax)
leaq 0xdb0b3(%rip), %rax     # 0x1138f8
movl $0x1, 0x1d8(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x30(%rcx), %eax
jge 0x38a71
jmp 0x38a9c
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq 0xa8837(%rip), %rdx     # 0xe12b7
leaq 0xa83e1(%rip), %rcx     # 0xe0e68
movl $0x772, %r8d            # imm = 0x772
callq 0x648b0
movl $0x1, %edi
callq 0x1f3b0
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movslq -0xc(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x18(%rbp), %rdi
callq 0x3a3f0
movq -0x20(%rbp), %rdi
callq 0x3aaa0
cmpl $0x0, -0xc(%rbp)
jne 0x38b35
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq (%rax), %rax
movq 0x8(%rax), %rdi
callq 0x28740
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x38b08
jmp 0x38b33
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq 0xa8791(%rip), %rdx     # 0xe12a8
leaq 0xa834a(%rip), %rcx     # 0xe0e68
movl $0x77b, %r8d            # imm = 0x77B
callq 0x648b0
movl $0x1, %edi
callq 0x1f3b0
jmp 0x38b35
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/nilyang[P]redis-tdd-annotation/src/networking.c
// Function: getClientLimitClass
int getClientLimitClass(redisClient *c) {
    if (c->flags & REDIS_SLAVE) return REDIS_CLIENT_LIMIT_CLASS_SLAVE;
    if (dictSize(c->pubsub_channels) || listLength(c->pubsub_patterns))
        return REDIS_CLIENT_LIMIT_CLASS_PUBSUB;
    return REDIS_CLIENT_LIMIT_CLASS_NORMAL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x90(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x38b63
movl $0x1, -0x4(%rbp)
jmp 0x38ba9
movq -0x10(%rbp), %rax
movq 0x158(%rax), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x158(%rcx), %rcx
addq 0x48(%rcx), %rax
cmpq $0x0, %rax
jne 0x38b99
movq -0x10(%rbp), %rax
movq 0x160(%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0x38ba2
movl $0x2, -0x4(%rbp)
jmp 0x38ba9
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0xa86fc(%rip), %rsi     # 0xe12c3
callq 0x1f2f0
cmpl $0x0, %eax
jne 0x38bda
movl $0x0, -0x4(%rbp)
jmp 0x38c1d
movq -0x10(%rbp), %rdi
leaq 0xae27d(%rip), %rsi     # 0xe6e62
callq 0x1f2f0
cmpl $0x0, %eax
jne 0x38bf8
movl $0x1, -0x4(%rbp)
jmp 0x38c1d
movq -0x10(%rbp), %rdi
leaq 0xa5a37(%rip), %rsi     # 0xde63a
callq 0x1f2f0
cmpl $0x0, %eax
jne 0x38c16
movl $0x2, -0x4(%rbp)
jmp 0x38c1d
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/nilyang[P]redis-tdd-annotation/src/networking.c
// Function: getClientLimitClassName
char *getClientLimitClassName(int class) {
    switch(class) {
    case REDIS_CLIENT_LIMIT_CLASS_NORMAL:   return "normal";
    case REDIS_CLIENT_LIMIT_CLASS_SLAVE:    return "slave";
    case REDIS_CLIENT_LIMIT_CLASS_PUBSUB:   return "pubsub";
    default:                                return NULL;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
testl %eax, %eax
je 0x38c57
jmp 0x38c43
movl -0x10(%rbp), %eax
subl $0x1, %eax
je 0x38c64
jmp 0x38c4d
movl -0x10(%rbp), %eax
subl $0x2, %eax
je 0x38c71
jmp 0x38c7e
leaq 0xa8665(%rip), %rax     # 0xe12c3
movq %rax, -0x8(%rbp)
jmp 0x38c86
leaq 0xae1f7(%rip), %rax     # 0xe6e62
movq %rax, -0x8(%rbp)
jmp 0x38c86
leaq 0xa59c2(%rip), %rax     # 0xde63a
movq %rax, -0x8(%rbp)
jmp 0x38c86
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
leaq 0xdaad9(%rip), %rax     # 0x1138f8
movq 0x1c0(%rax), %rdi
leaq -0x10(%rbp), %rsi
callq 0x202b0
leaq -0x10(%rbp), %rdi
callq 0x20310
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x38eac
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
leaq 0xdaaa3(%rip), %rax     # 0x1138f8
movq 0x28(%rax), %rdi
movq -0x20(%rbp), %rax
movl (%rax), %esi
callq 0x20df0
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x38eaa
movq -0x20(%rbp), %rax
cmpl $0x9, 0x98(%rax)
jne 0x38eaa
movq -0x20(%rbp), %rax
movq 0x60(%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0x38eaa
leaq 0xdaa63(%rip), %rax     # 0x1138f8
movq 0x28(%rax), %rdi
movq -0x20(%rbp), %rax
movl (%rax), %esi
movq -0x20(%rbp), %rdx
xorl %ecx, %ecx
callq 0x35040
jmp 0x38e2f
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x4, -0x4(%rbp)
movl $0x0, -0x8(%rbp)
movl -0x4(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x4(%rbp)
cmpl $0x0, %eax
je 0x38f11
leaq 0xdaa0b(%rip), %rax     # 0x1138f8
movq 0x28(%rax), %rdi
movl $0x5, %esi
callq 0x21090
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x38f06
jmp 0x38f11
movl -0xc(%rbp), %eax
addl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
jmp 0x38ed6
movl -0x8(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x39687
movl $0x0, -0x4(%rbp)
jmp 0x3976e
cmpq $0x0, -0x20(%rbp)
jge 0x3969a
xorl %eax, %eax
subq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x396a2
movq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x50(%rbp)
leaq -0x40(%rbp), %rax
addq $0x1f, %rax
movq %rax, -0x48(%rbp)
movq -0x50(%rbp), %rax
movl $0xa, %ecx
xorl %edx, %edx
divq %rcx
addq $0x30, %rdx
movb %dl, %cl
movq -0x48(%rbp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x48(%rbp)
movb %cl, (%rax)
movq -0x50(%rbp), %rax
movl $0xa, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
jne 0x396b6
cmpq $0x0, -0x20(%rbp)
jge 0x3970d
movq -0x48(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x48(%rbp)
movb $0x2d, (%rax)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rcx
leaq -0x40(%rbp), %rax
subq %rax, %rcx
movl $0x20, %eax
subq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
addq $0x1, %rax
cmpq -0x18(%rbp), %rax
jbe 0x3974a
movq -0x18(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x58(%rbp), %rdx
callq 0x1fbf0
movq -0x10(%rbp), %rax
movq -0x58(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x58(%rbp), %rax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
addq $0x1, %rdi
callq 0x2e130
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %ecx
andl $-0x10, %ecx
orl $0x0, %ecx
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl (%rax), %ecx
andl $0xffffff0f, %ecx       # imm = 0xFFFFFF0F
orl $0x80, %ecx
movl %ecx, (%rax)
movq -0x20(%rbp), %rcx
addq $0x8, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movl $0x1, 0x4(%rax)
movl $0x3e8, %eax            # imm = 0x3E8
leaq 0xd96be(%rip), %rcx     # 0x1138f8
cltd
idivl 0x8(%rcx)
cmpl $0x3e8, %eax            # imm = 0x3E8
jg 0x3a259
leaq 0xd96ac(%rip), %rax     # 0x1138f8
movl 0x30(%rax), %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
movl %eax, -0x24(%rbp)
jmp 0x3a261
callq 0x25cb0
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %edx
movq -0x18(%rbp), %rax
movl (%rax), %ecx
andl $0xffffff, %edx         # imm = 0xFFFFFF
shll $0x8, %edx
andl $0xff, %ecx
orl %edx, %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
movl $0x0, 0x4(%rax)
cmpq $0x0, -0x8(%rbp)
je 0x3a2bf
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x1fbf0
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movb $0x0, 0x8(%rax,%rcx)
jmp 0x3a2d6
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
movq -0x10(%rbp), %rdx
addq $0x1, %rdx
xorl %esi, %esi
callq 0x1f110
movq -0x18(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/nilyang[P]redis-tdd-annotation/src/object.c
// Function: createStringObject
robj *createStringObject(char *ptr, size_t len) {
    if (len <= REDIS_ENCODING_EMBSTR_SIZE_LIMIT)
        return createEmbeddedStringObject(ptr,len);
    else
        return createRawStringObject(ptr,len);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x27, -0x18(%rbp)
ja 0x3a30a
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x3a1c0
movq %rax, -0x8(%rbp)
jmp 0x3a31b
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x3a190
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/nilyang[P]redis-tdd-annotation/src/object.c
// Function: createStringObjectFromLongLong
robj *createStringObjectFromLongLong(long long value) {

    robj *o;

    // value 的大小符合 REDIS 共享整数的范围
    // 那么返回一个共享对象
    if (value >= 0 && value < REDIS_SHARED_INTEGERS) {
        incrRefCount(shared.integers[value]);
        o = shared.integers[value];

    // 不符合共享范围，创建一个新的整数对象
    } else {
        // 值可以用 long 类型保存，
        // 创建一个 REDIS_ENCODING_INT 编码的字符串对象
        if (value >= LONG_MIN && value <= LONG_MAX) {
            o = createObject(REDIS_STRING, NULL);
            o->encoding = REDIS_ENCODING_INT;
            o->ptr = (void*)((long)value);

        // 值不能用 long 类型保存（long long 类型），将值转换为字符串，
        // 并创建一个 REDIS_ENCODING_RAW 的字符串对象来保存值
        } else {
            o = createObject(REDIS_STRING,sdsfromlonglong(value));
        }
    }

    return o;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jl 0x3a37e
cmpq $0x2710, -0x8(%rbp)     # imm = 0x2710
jge 0x3a37e
movq -0x8(%rbp), %rcx
leaq 0xd9df8(%rip), %rax     # 0x114150
movq 0x1b0(%rax,%rcx,8), %rdi
callq 0x3a3f0
movq -0x8(%rbp), %rcx
leaq 0xd9de0(%rip), %rax     # 0x114150
movq 0x1b0(%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
jmp 0x3a3e5
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
cmpq %rax, -0x8(%rbp)
jl 0x3a3cc
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rax, -0x8(%rbp)
jg 0x3a3cc
xorl %edi, %edi
xorl %eax, %eax
movl %eax, %esi
callq 0x3a0d0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %ecx
andl $0xffffff0f, %ecx       # imm = 0xFFFFFF0F
orl $0x10, %ecx
movl %ecx, (%rax)
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x3a3e3
movq -0x8(%rbp), %rdi
callq 0x2c910
movq %rax, %rsi
xorl %edi, %edi
callq 0x3a0d0
movq %rax, -0x10(%rbp)
jmp 0x3a3e5
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nop