LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/aof.c
// Function: startAppendOnly
int startAppendOnly(void) {
    char cwd[MAXPATHLEN]; /* Current working dir path for error messages. */

    server.aof_last_fsync = server.unixtime;
    server.aof_fd = open(server.aof_filename,O_WRONLY|O_APPEND|O_CREAT,0644);
    serverAssert(server.aof_state == AOF_OFF);
    if (server.aof_fd == -1) {
        char *cwdp = getcwd(cwd,MAXPATHLEN);

        serverLog(LL_WARNING,
            "Redis needs to enable the AOF but can't open the "
            "append only file %s (in server root dir %s): %s",
            server.aof_filename,
            cwdp ? cwdp : "unknown",
            strerror(errno));
        return C_ERR;
    }
    if (server.rdb_child_pid != -1) {
        server.aof_rewrite_scheduled = 1;
        serverLog(LL_WARNING,"AOF was enabled but there is already a child process saving an RDB file on disk. An AOF background was scheduled to start when possible.");
    } else if (rewriteAppendOnlyFileBackground() == C_ERR) {
        close(server.aof_fd);
        serverLog(LL_WARNING,"Redis needs to enable the AOF but can't trigger a background AOF rewrite operation. Check the above logs for more info about the error.");
        return C_ERR;
    }
    /* We correctly switched on AOF, now wait for the rewrite to be complete
     * in order to append data on disk. */
    server.aof_state = AOF_WAIT_REWRITE;
    return C_OK;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
leaq 0xa54ad(%rip), %rbx     # 0x106858
movq 0x968(%rbx), %rax
movq %rax, 0x6b0(%rbx)
movq 0x660(%rbx), %rdi
movl $0x441, %esi            # imm = 0x441
movl $0x1a4, %edx            # imm = 0x1A4
xorl %eax, %eax
callq 0x266a0
movl %eax, 0x6a0(%rbx)
cmpl $0x0, 0x658(%rbx)
jne 0x614a3
cmpl $-0x1, %eax
je 0x61411
cmpl $-0x1, 0x720(%rbx)
je 0x61462
movl $0x1, 0x688(%rbx)
leaq 0x66bb6(%rip), %rsi     # 0xc7fb9
movl $0x3, %edi
xorl %eax, %eax
callq 0x32ea6
jmp 0x6146c
movq %rsp, %rdi
movl $0x1000, %esi           # imm = 0x1000
callq 0x26920
movq 0x660(%rbx), %rbx
testq %rax, %rax
leaq 0x62964(%rip), %r14     # 0xc3d93
cmovneq %rax, %r14
callq 0x26890
movl (%rax), %edi
callq 0x26690
leaq 0x66b12(%rip), %rsi     # 0xc7f58
movl $0x3, %edi
movq %rbx, %rdx
movq %r14, %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0x32ea6
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x61478
callq 0x614c5
cmpl $-0x1, %eax
je 0x61483
movl $0x2, 0x658(%rbx)
xorl %eax, %eax
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r14
retq
movl 0x6a0(%rbx), %edi
callq 0x26180
leaq 0x66bad(%rip), %rsi     # 0xc8042
movl $0x3, %edi
xorl %eax, %eax
callq 0x32ea6
jmp 0x6145b
leaq 0x66a92(%rip), %rdi     # 0xc7f3c
leaq 0x66a5e(%rip), %rsi     # 0xc7f0f
movl $0xfc, %edx
callq 0x654e1
movl $0x1, %edi
callq 0x263d0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/aof.c
// Function: catAppendOnlyGenericCommand
sds catAppendOnlyGenericCommand(sds dst, int argc, robj **argv) {
    char buf[32];
    int len, j;
    robj *o;

    buf[0] = '*';
    len = 1+ll2string(buf+1,sizeof(buf)-1,argc);
    buf[len++] = '\r';
    buf[len++] = '\n';
    dst = sdscatlen(dst,buf,len);

    for (j = 0; j < argc; j++) {
        o = getDecodedObject(argv[j]);
        buf[0] = '$';
        len = 1+ll2string(buf+1,sizeof(buf)-1,sdslen(o->ptr));
        buf[len++] = '\r';
        buf[len++] = '\n';
        dst = sdscatlen(dst,buf,len);
        dst = sdscatlen(dst,o->ptr,sdslen(o->ptr));
        dst = sdscatlen(dst,"\r\n",2);
        decrRefCount(o);
    }
    return dst;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movl %esi, %r12d
movq %rdi, %rbp
leaq 0x1(%rsp), %rdi
movb $0x2a, -0x1(%rdi)
movslq %esi, %r13
movl $0x1f, %esi
movq %r13, %rdx
callq 0x433e5
cltq
movq %rsp, %r15
movw $0xa0d, 0x1(%rax,%r15)  # imm = 0xA0D
addl $0x3, %eax
movslq %eax, %rdx
movq %rbp, %rdi
movq %r15, %rsi
callq 0x39a56
movq %rax, %rbp
testl %r13d, %r13d
jle 0x61840
movl %r12d, %r14d
xorl %r12d, %r12d
movq (%rbx,%r12,8), %rdi
callq 0x444b2
movq %rax, %r13
movb $0x24, (%rsp)
movq 0x8(%rax), %rax
movzbl -0x1(%rax), %edx
movl %edx, %ecx
andl $0x7, %ecx
cmpl $0x4, %ecx
ja 0x617a1
leaq 0x666dc(%rip), %rsi     # 0xc7e58
movslq (%rsi,%rcx,4), %rcx
addq %rsi, %rcx
jmpq *%rcx
shrl $0x3, %edx
jmp 0x617a3
movq -0x11(%rax), %rdx
jmp 0x617a3
movzwl -0x5(%rax), %edx
jmp 0x617a3
movl -0x9(%rax), %edx
jmp 0x617a3
movzbl -0x3(%rax), %edx
jmp 0x617a3
xorl %edx, %edx
movl $0x1f, %esi
leaq 0x1(%rsp), %rdi
callq 0x433e5
cltq
movw $0xa0d, 0x1(%rax,%r15)  # imm = 0xA0D
addl $0x3, %eax
movslq %eax, %rdx
movq %rbp, %rdi
movq %r15, %rsi
callq 0x39a56
movq 0x8(%r13), %rsi
movzbl -0x1(%rsi), %edx
movl %edx, %ecx
andl $0x7, %ecx
cmpl $0x4, %ecx
ja 0x6180b
leaq 0x66686(%rip), %rdi     # 0xc7e6c
movslq (%rdi,%rcx,4), %rcx
addq %rdi, %rcx
jmpq *%rcx
shrl $0x3, %edx
jmp 0x6180d
movq -0x11(%rsi), %rdx
jmp 0x6180d
movzwl -0x5(%rsi), %edx
jmp 0x6180d
movl -0x9(%rsi), %edx
jmp 0x6180d
movzbl -0x3(%rsi), %edx
jmp 0x6180d
xorl %edx, %edx
movq %rax, %rdi
callq 0x39a56
movl $0x2, %edx
movq %rax, %rdi
leaq 0x6554c(%rip), %rsi     # 0xc6d70
callq 0x39a56
movq %rax, %rbp
movq %r13, %rdi
callq 0x440f3
incq %r12
cmpq %r12, %r14
jne 0x61753
movq %rbp, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/aof.c
// Function: catAppendOnlyExpireAtCommand
sds catAppendOnlyExpireAtCommand(sds buf, struct redisCommand *cmd, robj *key, robj *seconds) {
    long long when;
    robj *argv[3];

    /* Make sure we can use strtoll */
    seconds = getDecodedObject(seconds);
    when = strtoll(seconds->ptr,NULL,10);
    /* Convert argument into milliseconds for EXPIRE, SETEX, EXPIREAT */
    if (cmd->proc == expireCommand || cmd->proc == setexCommand ||
        cmd->proc == expireatCommand)
    {
        when *= 1000;
    }
    /* Convert into absolute time for EXPIRE, PEXPIRE, SETEX, PSETEX */
    if (cmd->proc == expireCommand || cmd->proc == pexpireCommand ||
        cmd->proc == setexCommand || cmd->proc == psetexCommand)
    {
        when += mstime();
    }
    decrRefCount(seconds);

    argv[0] = createStringObject("PEXPIREAT",9);
    argv[1] = key;
    argv[2] = createStringObjectFromLongLong(when);
    buf = catAppendOnlyGenericCommand(buf, 3, argv);
    decrRefCount(argv[0]);
    decrRefCount(argv[2]);
    return buf;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %rbx
movq %rcx, %rdi
callq 0x444b2
movq %rax, %r12
movq 0x8(%rax), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x26b00
movq %rax, %r15
movq 0x8(%r13), %rax
imulq $0x3e8, %r15, %rcx      # imm = 0x3E8
cmpq 0xa0738(%rip), %rax     # 0x101fd0
leaq -0x12c0b(%rip), %rdx    # 0x4ec94
cmoveq %rcx, %r15
cmpq %rdx, %rax
cmoveq %rcx, %r15
cmpq 0xa0677(%rip), %rax     # 0x101f28
cmoveq %rcx, %r15
cmpq %rdx, %rax
je 0x618d5
cmpq 0xa0667(%rip), %rax     # 0x101f28
je 0x618d5
cmpq 0xa06e6(%rip), %rax     # 0x101fb0
je 0x618d5
cmpq 0xa06b5(%rip), %rax     # 0x101f88
jne 0x618dd
callq 0x330c8
addq %rax, %r15
movq %r12, %rdi
callq 0x440f3
leaq 0x66a43(%rip), %rdi     # 0xc832f
movl $0x9, %esi
callq 0x43ba8
movq %rax, %r12
movq %rsp, %r13
movq %rax, (%r13)
movq %r14, 0x8(%r13)
movq %r15, %rdi
callq 0x43bb7
movq %rax, %r14
movq %rax, 0x10(%r13)
movq %rbx, %rdi
movl $0x3, %esi
movq %r13, %rdx
callq 0x616f3
movq %rax, %rbx
movq %r12, %rdi
callq 0x440f3
movq %r14, %rdi
callq 0x440f3
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/aof.c
// Function: createFakeClient
struct client *createFakeClient(void) {
    struct client *c = zmalloc(sizeof(*c));

    selectDb(c,0);
    c->fd = -1;
    c->name = NULL;
    c->querybuf = sdsempty();
    c->querybuf_peak = 0;
    c->argc = 0;
    c->argv = NULL;
    c->bufpos = 0;
    c->flags = 0;
    c->btype = BLOCKED_NONE;
    /* We set the fake client as a slave waiting for the synchronization
     * so that Redis will not try to send replies to this client. */
    c->replstate = SLAVE_STATE_WAIT_BGSAVE_START;
    c->reply = listCreate();
    c->reply_bytes = 0;
    c->obuf_soft_limit_reached_time = 0;
    c->watched_keys = listCreate();
    c->peerid = NULL;
    listSetFreeMethod(c->reply,decrRefCountVoid);
    listSetDupMethod(c->reply,dupClientReplyValue);
    initClientMultiState(c);
    return c;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl $0x41c8, %edi           # imm = 0x41C8
callq 0x3b29d
movq %rax, %rbx
xorl %r14d, %r14d
movq %rax, %rdi
xorl %esi, %esi
callq 0x4554b
movl $0xffffffff, 0x8(%rbx)  # imm = 0xFFFFFFFF
movq %r14, 0x20(%rbx)
callq 0x39222
movq %rax, 0x28(%rbx)
movq %r14, 0x30(%rbx)
movl %r14d, 0x38(%rbx)
movq %r14, 0x40(%rbx)
movl %r14d, 0x1c0(%rbx)
movl %r14d, 0x98(%rbx)
movl %r14d, 0x168(%rbx)
movl $0x6, 0xa0(%rbx)
callq 0x2e33c
movq %rax, 0x68(%rbx)
movq %r14, 0x70(%rbx)
movq %r14, 0x90(%rbx)
callq 0x2e33c
movq %rax, 0x1a0(%rbx)
movq %r14, 0x1b8(%rbx)
movq 0x68(%rbx), %rax
leaq -0x1da1d(%rip), %rcx    # 0x4419b
movq %rcx, 0x18(%rax)
leaq -0x22a56(%rip), %rcx    # 0x3f16d
movq %rcx, 0x10(%rax)
movq %rbx, %rdi
callq 0x64578
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/aof.c
// Function: freeFakeClientArgv
void freeFakeClientArgv(struct client *c) {
    int j;

    for (j = 0; j < c->argc; j++)
        decrRefCount(c->argv[j]);
    zfree(c->argv);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x38(%rdi)
jle 0x61c03
xorl %r14d, %r14d
movq 0x40(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x440f3
incq %r14
movslq 0x38(%rbx), %rax
cmpq %rax, %r14
jl 0x61bea
movq 0x40(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3b3df
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/aof.c
// Function: freeFakeClient
void freeFakeClient(struct client *c) {
    sdsfree(c->querybuf);
    listRelease(c->reply);
    listRelease(c->watched_keys);
    freeClientMultiState(c);
    zfree(c);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
callq 0x392b6
movq 0x68(%rbx), %rdi
callq 0x2e360
movq 0x1a0(%rbx), %rdi
callq 0x2e360
movq %rbx, %rdi
callq 0x6458e
movq %rbx, %rdi
popq %rbx
jmp 0x3b3df
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/aof.c
// Function: aofUpdateCurrentSize
void aofUpdateCurrentSize(void) {
    struct redis_stat sb;
    mstime_t latency;

    latencyStartMonitor(latency);
    if (redis_fstat(server.aof_fd,&sb) == -1) {
        serverLog(LL_WARNING,"Unable to obtain the AOF file length. stat: %s",
            strerror(errno));
    } else {
        server.aof_current_size = sb.st_size;
    }
    latencyEndMonitor(latency);
    latencyAddSampleIfNeeded("aof-fstat",latency);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x98, %rsp
leaq 0xa46a7(%rip), %r14     # 0x106858
cmpq $0x0, 0xa08(%r14)
je 0x621c5
callq 0x330c8
movq %rax, %rbx
jmp 0x621c7
xorl %ebx, %ebx
movl 0x6a0(%r14), %edi
leaq 0x8(%rsp), %rsi
callq 0x266f0
cmpl $-0x1, %eax
je 0x621eb
movq 0x38(%rsp), %rax
movq %rax, 0x680(%r14)
jmp 0x6220d
callq 0x26890
movl (%rax), %edi
callq 0x26690
leaq 0x66883(%rip), %rsi     # 0xc8a81
movl $0x3, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x32ea6
cmpq $0x0, 0xa08(%r14)
je 0x62222
callq 0x330c8
subq %rbx, %rax
movq %rax, %rbx
movq 0xa08(%r14), %rax
testq %rax, %rax
sete %cl
cmpq %rax, %rbx
setl %al
orb %cl, %al
je 0x62244
addq $0x98, %rsp
popq %rbx
popq %r14
retq
leaq 0x66865(%rip), %rdi     # 0xc8ab0
movq %rbx, %rsi
addq $0x98, %rsp
popq %rbx
popq %r14
jmp 0x825dd
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/aof.c
// Function: rioWriteBulkObject
int rioWriteBulkObject(rio *r, robj *obj) {
    /* Avoid using getDecodedObject to help copy-on-write (we are often
     * in a child process when this function is called). */
    if (obj->encoding == OBJ_ENCODING_INT) {
        return rioWriteBulkLongLong(r,(long)obj->ptr);
    } else if (sdsEncodedObject(obj)) {
        return rioWriteBulkString(r,obj->ptr,sdslen(obj->ptr));
    } else {
        serverPanic("Unknown string encoding");
    }
}

// Assembly:
pushq %rax
movl (%rsi), %eax
shrl $0x4, %eax
andl $0xf, %eax
je 0x6227d
cmpl $0x8, %eax
je 0x6227d
cmpl $0x1, %eax
jne 0x622c4
movq 0x8(%rsi), %rsi
callq 0x7643f
jmp 0x622c2
movq 0x8(%rsi), %rsi
movzbl -0x1(%rsi), %edx
movl %edx, %eax
andl $0x7, %eax
cmpl $0x4, %eax
ja 0x622bb
leaq 0x65c12(%rip), %rcx     # 0xc7ea8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
shrl $0x3, %edx
jmp 0x622bd
movq -0x11(%rsi), %rdx
jmp 0x622bd
movzwl -0x5(%rsi), %edx
jmp 0x622bd
movl -0x9(%rsi), %edx
jmp 0x622bd
movzbl -0x3(%rsi), %edx
jmp 0x622bd
xorl %edx, %edx
callq 0x76328
popq %rcx
retq
leaq 0x61a68(%rip), %rdi     # 0xc3d33
leaq 0x65c3d(%rip), %rsi     # 0xc7f0f
movl $0x347, %edx            # imm = 0x347
callq 0x6558d
movl $0x1, %edi
callq 0x263d0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/aof.c
// Function: rewriteListObject
int rewriteListObject(rio *r, robj *key, robj *o) {
    long long count = 0, items = listTypeLength(o);

    if (o->encoding == OBJ_ENCODING_QUICKLIST) {
        quicklist *list = o->ptr;
        quicklistIter *li = quicklistGetIterator(list, AL_START_HEAD);
        quicklistEntry entry;

        while (quicklistNext(li,&entry)) {
            if (count == 0) {
                int cmd_items = (items > AOF_REWRITE_ITEMS_PER_CMD) ?
                    AOF_REWRITE_ITEMS_PER_CMD : items;
                if (rioWriteBulkCount(r,'*',2+cmd_items) == 0) return 0;
                if (rioWriteBulkString(r,"RPUSH",5) == 0) return 0;
                if (rioWriteBulkObject(r,key) == 0) return 0;
            }

            if (entry.value) {
                if (rioWriteBulkString(r,(char*)entry.value,entry.sz) == 0) return 0;
            } else {
                if (rioWriteBulkLongLong(r,entry.longval) == 0) return 0;
            }
            if (++count == AOF_REWRITE_ITEMS_PER_CMD) count = 0;
            items--;
        }
        quicklistReleaseIterator(li);
    } else {
        serverPanic("Unknown list encoding");
    }
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r12
movq %rsi, (%rsp)
movq %rdi, %r14
movq %rdx, %rdi
callq 0x4fc1c
movq %rax, %r15
movl $0xf0, %eax
andl (%r12), %eax
cmpl $0x90, %eax
jne 0x62412
movq 0x8(%r12), %rdi
xorl %esi, %esi
callq 0x2f71a
movq %rax, %r12
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x2f7a4
testl %eax, %eax
sete %r13b
je 0x623f4
xorl %ebx, %ebx
leaq 0x8(%rsp), %rbp
testq %rbx, %rbx
jne 0x623a0
cmpq $0x40, %r15
movl $0x40, %edx
cmovlq %r15, %rdx
addl $0x2, %edx
movq %r14, %rdi
movl $0x2a, %esi
callq 0x76284
testq %rax, %rax
je 0x623fc
movl $0x5, %edx
movq %r14, %rdi
leaq 0x66352(%rip), %rsi     # 0xc86d8
callq 0x76328
testq %rax, %rax
je 0x623fc
movq %r14, %rdi
movq (%rsp), %rsi
callq 0x6225d
testl %eax, %eax
je 0x623fc
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x623b8
movl 0x30(%rsp), %edx
movq %r14, %rdi
callq 0x76328
jmp 0x623c5
movq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x7643f
testq %rax, %rax
je 0x623fc
incq %rbx
cmpq $0x40, %rbx
movl $0x0, %eax
cmoveq %rax, %rbx
decq %r15
movq %r12, %rdi
movq %rbp, %rsi
callq 0x2f7a4
testl %eax, %eax
sete %r13b
jne 0x6234c
movq %r12, %rdi
callq 0x2f767
movzbl %r13b, %eax
andl $0x1, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x635b9(%rip), %rdi     # 0xc59d2
leaq 0x65aef(%rip), %rsi     # 0xc7f0f
movl $0x368, %edx            # imm = 0x368
callq 0x6558d
movl $0x1, %edi
callq 0x263d0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/aof.c
// Function: rewriteHashObject
int rewriteHashObject(rio *r, robj *key, robj *o) {
    hashTypeIterator *hi;
    long long count = 0, items = hashTypeLength(o);

    hi = hashTypeInitIterator(o);
    while (hashTypeNext(hi) != C_ERR) {
        if (count == 0) {
            int cmd_items = (items > AOF_REWRITE_ITEMS_PER_CMD) ?
                AOF_REWRITE_ITEMS_PER_CMD : items;

            if (rioWriteBulkCount(r,'*',2+cmd_items*2) == 0) return 0;
            if (rioWriteBulkString(r,"HMSET",5) == 0) return 0;
            if (rioWriteBulkObject(r,key) == 0) return 0;
        }

        if (rioWriteHashIteratorCursor(r, hi, OBJ_HASH_KEY) == 0) return 0;
        if (rioWriteHashIteratorCursor(r, hi, OBJ_HASH_VALUE) == 0) return 0;
        if (++count == AOF_REWRITE_ITEMS_PER_CMD) count = 0;
        items--;
    }

    hashTypeReleaseIterator(hi);

    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movq %rdx, %rdi
callq 0x5948d
movq %rax, %r15
movq %r12, %rdi
callq 0x5960a
movq %rax, %r12
movq %rax, %rdi
callq 0x59696
cmpl $-0x1, %eax
je 0x62a0e
xorl %r13d, %r13d
testq %r13, %r13
jne 0x629c0
cmpq $0x40, %r15
movl $0x40, %eax
cmovlq %r15, %rax
leal 0x2(,%rax,2), %edx
movq %r14, %rdi
movl $0x2a, %esi
callq 0x76284
xorl %ebp, %ebp
testq %rax, %rax
je 0x62a1b
movl $0x5, %edx
movq %r14, %rdi
leaq 0x64242(%rip), %rsi     # 0xc6be9
callq 0x76328
testq %rax, %rax
je 0x62a1b
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6225d
testl %eax, %eax
je 0x62a1b
movq %r14, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x62a2c
xorl %ebp, %ebp
testl %eax, %eax
je 0x62a1b
movq %r14, %rdi
movq %r12, %rsi
movl $0x2, %edx
callq 0x62a2c
testl %eax, %eax
je 0x62a1b
incq %r13
cmpq $0x40, %r13
movl $0x0, %eax
cmoveq %rax, %r13
decq %r15
movq %r12, %rdi
callq 0x59696
cmpl $-0x1, %eax
jne 0x62967
movq %r12, %rdi
callq 0x5967a
movl $0x1, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/aof.c
// Function: rioWriteHashIteratorCursor
static int rioWriteHashIteratorCursor(rio *r, hashTypeIterator *hi, int what) {
    if (hi->encoding == OBJ_ENCODING_ZIPLIST) {
        unsigned char *vstr = NULL;
        unsigned int vlen = UINT_MAX;
        long long vll = LLONG_MAX;

        hashTypeCurrentFromZiplist(hi, what, &vstr, &vlen, &vll);
        if (vstr) {
            return rioWriteBulkString(r, (char*)vstr, vlen);
        } else {
            return rioWriteBulkLongLong(r, vll);
        }

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

        hashTypeCurrentFromHashTable(hi, what, &value);
        return rioWriteBulkObject(r, value);
    }

    serverPanic("Unknown hash encoding");
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl 0x8(%rsi), %eax
cmpl $0x2, %eax
je 0x62a93
cmpl $0x5, %eax
jne 0x62ac7
leaq 0x10(%rsp), %r14
movq $0x0, (%r14)
leaq 0x4(%rsp), %rcx
movl $0xffffffff, (%rcx)     # imm = 0xFFFFFFFF
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
leaq 0x8(%rsp), %r8
movq %rax, (%r8)
movq %rsi, %rdi
movl %edx, %esi
movq %r14, %rdx
callq 0x597a1
movq (%r14), %rsi
testq %rsi, %rsi
je 0x62ab2
movl 0x4(%rsp), %edx
movq %rbx, %rdi
callq 0x76328
jmp 0x62abf
leaq 0x10(%rsp), %r14
movq %rsi, %rdi
movl %edx, %esi
movq %r14, %rdx
callq 0x59828
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x6225d
jmp 0x62abf
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x7643f
addq $0x18, %rsp
popq %rbx
popq %r14
retq
leaq 0x62f33(%rip), %rdi     # 0xc5a01
leaq 0x6543a(%rip), %rsi     # 0xc7f0f
movl $0x3fb, %edx            # imm = 0x3FB
callq 0x6558d
movl $0x1, %edi
callq 0x263d0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/aof.c
// Function: aofReadDiffFromParent
ssize_t aofReadDiffFromParent(void) {
    char buf[65536]; /* Default pipe buffer size on most Linux systems. */
    ssize_t nread, total = 0;

    while ((nread =
            read(server.aof_pipe_read_data_from_parent,buf,sizeof(buf))) > 0) {
        server.aof_child_diff = sdscatlen(server.aof_child_diff,buf,nread);
        total += nread;
    }
    return total;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10008, %rsp          # imm = 0x10008
leaq 0xa3d5a(%rip), %r12     # 0x106858
movl 0x6ec(%r12), %edi
movq %rsp, %rsi
movl $0x10000, %edx          # imm = 0x10000
callq 0x26350
testq %rax, %rax
jle 0x62b5d
movq %rax, %r15
xorl %ebx, %ebx
movq %rsp, %r14
movq 0x708(%r12), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x39a56
movq %rax, 0x708(%r12)
addq %r15, %rbx
movl 0x6ec(%r12), %edi
movl $0x10000, %edx          # imm = 0x10000
movq %r14, %rsi
callq 0x26350
movq %rax, %r15
testq %rax, %rax
jg 0x62b20
jmp 0x62b5f
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x10008, %rsp          # imm = 0x10008
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/./rio.h
// Function: rioWrite
static inline size_t rioWrite(rio *r, const void *buf, size_t len) {
    while (len) {
        size_t bytes_to_write = (r->max_processing_chunk && r->max_processing_chunk < len) ? r->max_processing_chunk : len;
        if (r->update_cksum) r->update_cksum(r,buf,bytes_to_write);
        if (r->write(r,buf,bytes_to_write) == 0)
            return 0;
        buf = (char*)buf + bytes_to_write;
        len -= bytes_to_write;
        r->processed_bytes += bytes_to_write;
    }
    return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
xorl %ebx, %ebx
testq %r14, %r14
je 0x63383
movq 0x20(%r12), %rax
movq 0x38(%r12), %rcx
cmpq %r14, %rcx
movq %r14, %r13
cmovbq %rcx, %r13
testq %rcx, %rcx
cmoveq %r14, %r13
testq %rax, %rax
je 0x6335e
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq *%rax
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq *0x8(%r12)
testq %rax, %rax
je 0x6337c
addq %r13, %r15
subq %r13, %r14
addq %r13, 0x30(%r12)
testq %rax, %rax
jne 0x6332e
jmp 0x63388
movl $0x1, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/aof.c
// Function: aofChildPipeReadable
void aofChildPipeReadable(aeEventLoop *el, int fd, void *privdata, int mask) {
    char byte;
    UNUSED(el);
    UNUSED(privdata);
    UNUSED(mask);

    if (read(fd,&byte,1) == 1 && byte == '!') {
        serverLog(LL_NOTICE,"AOF rewrite child asks to stop sending diffs.");
        server.aof_stop_sending_diff = 1;
        if (write(server.aof_pipe_write_ack_to_child,"!",1) != 1) {
            /* If we can't send the ack, inform the user, but don't try again
             * since in the other side the children will use a timeout if the
             * kernel can't buffer our write, or, the children was
             * terminated. */
            serverLog(LL_WARNING,"Can't send ACK to AOF child: %s",
                strerror(errno));
        }
    }
    /* Remove the handler since this can be called only one time during a
     * rewrite. */
    aeDeleteFileEvent(server.el,server.aof_pipe_read_ack_from_child,AE_READABLE);
}

// Assembly:
pushq %rax
movl %esi, %edi
leaq 0x7(%rsp), %rsi
movl $0x1, %edx
callq 0x26350
cmpq $0x1, %rax
jne 0x63417
cmpb $0x21, 0x7(%rsp)
jne 0x63417
leaq 0x654e0(%rip), %rsi     # 0xc889b
movl $0x2, %edi
xorl %eax, %eax
callq 0x32ea6
leaq 0xa348a(%rip), %rax     # 0x106858
movl $0x1, 0x700(%rax)
movl 0x6f8(%rax), %edi
leaq 0x650af(%rip), %rsi     # 0xc8494
movl $0x1, %edx
callq 0x26bc0
cmpq $0x1, %rax
je 0x63417
callq 0x26890
movl (%rax), %edi
callq 0x26690
leaq 0x654c1(%rip), %rsi     # 0xc88c9
movl $0x3, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x32ea6
leaq 0xa343a(%rip), %rax     # 0x106858
movq 0x40(%rax), %rdi
movl 0x6f4(%rax), %esi
movl $0x1, %edx
popq %rax
jmp 0x2ffb6
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/aof.c
// Function: aofCreatePipes
int aofCreatePipes(void) {
    int fds[6] = {-1, -1, -1, -1, -1, -1};
    int j;

    if (pipe(fds) == -1) goto error; /* parent -> children data. */
    if (pipe(fds+2) == -1) goto error; /* children -> parent ack. */
    if (pipe(fds+4) == -1) goto error; /* children -> parent ack. */
    /* Parent -> children data is non blocking. */
    if (anetNonBlock(NULL,fds[0]) != ANET_OK) goto error;
    if (anetNonBlock(NULL,fds[1]) != ANET_OK) goto error;
    if (aeCreateFileEvent(server.el, fds[2], AE_READABLE, aofChildPipeReadable, NULL) == AE_ERR) goto error;

    server.aof_pipe_write_data_to_child = fds[1];
    server.aof_pipe_read_data_from_parent = fds[0];
    server.aof_pipe_write_ack_to_parent = fds[3];
    server.aof_pipe_read_ack_from_child = fds[2];
    server.aof_pipe_write_ack_to_child = fds[5];
    server.aof_pipe_read_ack_from_parent = fds[4];
    server.aof_stop_sending_diff = 0;
    return C_OK;

error:
    serverLog(LL_WARNING,"Error opening /setting AOF rewrite IPC pipes: %s",
        strerror(errno));
    for (j = 0; j < 6; j++) if(fds[j] != -1) close(fds[j]);
    return C_ERR;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
pcmpeqd %xmm0, %xmm0
movq %rsp, %rdi
movdqa %xmm0, (%rdi)
movq $-0x1, 0x10(%rdi)
callq 0x265f0
cmpl $-0x1, %eax
je 0x63492
leaq 0x8(%rsp), %rdi
callq 0x265f0
cmpl $-0x1, %eax
je 0x63492
leaq 0x10(%rsp), %rdi
callq 0x265f0
cmpl $-0x1, %eax
je 0x63492
movl (%rsp), %esi
xorl %edi, %edi
callq 0x30779
testl %eax, %eax
jne 0x63492
movl 0x4(%rsp), %esi
xorl %edi, %edi
callq 0x30779
testl %eax, %eax
je 0x634db
callq 0x26890
movl (%rax), %edi
callq 0x26690
leaq 0x65444(%rip), %rsi     # 0xc88e9
xorl %ebx, %ebx
movl $0x3, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x32ea6
movl (%rsp,%rbx,4), %edi
cmpl $-0x1, %edi
je 0x634c3
callq 0x26180
incq %rbx
cmpq $0x6, %rbx
jne 0x634b6
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
leaq 0xa3376(%rip), %r14     # 0x106858
movq 0x40(%r14), %rdi
movl 0x8(%rsp), %esi
leaq -0x15c(%rip), %rcx      # 0x63395
xorl %ebx, %ebx
movl $0x1, %edx
xorl %r8d, %r8d
callq 0x2fee7
cmpl $-0x1, %eax
je 0x63492
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
rolq $0x20, %rax
movq %rax, 0x6e8(%r14)
rolq $0x20, %rcx
movq %rcx, 0x6f0(%r14)
movq 0x10(%rsp), %rax
rolq $0x20, %rax
movq %rax, 0x6f8(%r14)
movl $0x0, 0x700(%r14)
jmp 0x634d1
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/aof.c
// Function: bgrewriteaofCommand
void bgrewriteaofCommand(client *c) {
    if (server.aof_child_pid != -1) {
        addReplyError(c,"Background append only file rewriting already in progress");
    } else if (server.rdb_child_pid != -1) {
        server.aof_rewrite_scheduled = 1;
        addReplyStatus(c,"Background append only file rewriting scheduled");
    } else if (rewriteAppendOnlyFileBackground() == C_OK) {
        addReplyStatus(c,"Background append only file rewriting started");
    } else {
        addReply(c,shared.err);
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0xa330c(%rip), %rax     # 0x106858
cmpl $-0x1, 0x68c(%rax)
je 0x63565
leaq 0x6548d(%rip), %rsi     # 0xc89e9
movq %rbx, %rdi
popq %rbx
jmp 0x3ffcb
cmpl $-0x1, 0x720(%rax)
je 0x63588
movl $0x1, 0x688(%rax)
leaq 0x654a4(%rip), %rsi     # 0xc8a23
movq %rbx, %rdi
popq %rbx
jmp 0x40192
callq 0x614c5
testl %eax, %eax
je 0x635a5
leaq 0xa3d18(%rip), %rax     # 0x1072b0
movq 0x10(%rax), %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x3fc19
leaq 0x654a7(%rip), %rsi     # 0xc8a53
jmp 0x6357f
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/pubsub.c
// Function: pubsubSubscribeChannel
int pubsubSubscribeChannel(client *c, robj *channel) {
    dictEntry *de;
    list *clients = NULL;
    int retval = 0;

    /* Add the channel to the client -> channels hash table */
    if (dictAdd(c->pubsub_channels,channel,NULL) == DICT_OK) {
        retval = 1;
        incrRefCount(channel);
        /* Add the client to the channel -> list of clients hash table */
        de = dictFind(server.pubsub_channels,channel);
        if (de == NULL) {
            clients = listCreate();
            dictAdd(server.pubsub_channels,channel,clients);
            incrRefCount(channel);
        } else {
            clients = dictGetVal(de);
        }
        listAddNodeTail(clients,c);
    }
    /* Notify the client */
    addReply(c,shared.mbulkhdr[3]);
    addReply(c,shared.subscribebulk);
    addReplyBulk(c,channel);
    addReplyLongLong(c,clientSubscriptionsCount(c));
    return retval;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x1a8(%rdi), %rdi
xorl %r15d, %r15d
xorl %edx, %edx
callq 0x31a95
testl %eax, %eax
jne 0x63a92
movq %r14, %rdi
callq 0x43c0c
leaq 0xa2e15(%rip), %r12     # 0x106858
movq 0x978(%r12), %rdi
movq %r14, %rsi
callq 0x31cca
testq %rax, %rax
je 0x63a5e
movq 0x8(%rax), %r15
jmp 0x63a81
callq 0x2e33c
movq %rax, %r15
movq 0x978(%r12), %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x31a95
movq %r14, %rdi
callq 0x43c0c
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2e40f
movl $0x1, %r15d
leaq 0xa3817(%rip), %r12     # 0x1072b0
movq 0x13a48(%r12), %rsi
movq %rbx, %rdi
callq 0x3fc19
movq 0x108(%r12), %rsi
movq %rbx, %rdi
callq 0x3fc19
movq %rbx, %rdi
movq %r14, %rsi
callq 0x40537
movq 0x1a8(%rbx), %rax
movl 0x48(%rax), %ecx
addl 0x28(%rax), %ecx
movq 0x1b0(%rbx), %rax
addl 0x28(%rax), %ecx
movslq %ecx, %rsi
movq %rbx, %rdi
callq 0x40606
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/pubsub.c
// Function: pubsubUnsubscribeChannel
int pubsubUnsubscribeChannel(client *c, robj *channel, int notify) {
    dictEntry *de;
    list *clients;
    listNode *ln;
    int retval = 0;

    /* Remove the channel from the client -> channels hash table */
    incrRefCount(channel); /* channel may be just a pointer to the same object
                            we have in the hash tables. Protect it... */
    if (dictDelete(c->pubsub_channels,channel) == DICT_OK) {
        retval = 1;
        /* Remove the client from the channel -> clients list hash table */
        de = dictFind(server.pubsub_channels,channel);
        serverAssertWithInfo(c,NULL,de != NULL);
        clients = dictGetVal(de);
        ln = listSearchKey(clients,c);
        serverAssertWithInfo(c,NULL,ln != NULL);
        listDelNode(clients,ln);
        if (listLength(clients) == 0) {
            /* Free the list and associated hash entry at all if this was
             * the latest client, so that it will be possible to abuse
             * Redis PUBSUB creating millions of channels. */
            dictDelete(server.pubsub_channels,channel);
        }
    }
    /* Notify the client */
    if (notify) {
        addReply(c,shared.mbulkhdr[3]);
        addReply(c,shared.unsubscribebulk);
        addReplyBulk(c,channel);
        addReplyLongLong(c,dictSize(c->pubsub_channels)+
                       listLength(c->pubsub_patterns));

    }
    decrRefCount(channel); /* it is finally safe to release it */
    return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x43c0c
movq 0x1a8(%rbx), %rdi
movq %r14, %rsi
callq 0x31dba
xorl %r15d, %r15d
testl %eax, %eax
jne 0x63b85
leaq 0xa2d2b(%rip), %r13     # 0x106858
movq 0x978(%r13), %rdi
movq %r14, %rsi
callq 0x31cca
testq %rax, %rax
je 0x63bf7
movq 0x8(%rax), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x2e653
testq %rax, %rax
je 0x63c12
movq %r12, %rdi
movq %rax, %rsi
callq 0x2e4f4
movl $0x1, %r15d
cmpq $0x0, 0x28(%r12)
jne 0x63b85
movq 0x978(%r13), %rdi
movq %r14, %rsi
callq 0x31dba
testl %ebp, %ebp
je 0x63bdd
leaq 0xa3720(%rip), %r12     # 0x1072b0
movq 0x13a48(%r12), %rsi
movq %rbx, %rdi
callq 0x3fc19
movq 0x110(%r12), %rsi
movq %rbx, %rdi
callq 0x3fc19
movq %rbx, %rdi
movq %r14, %rsi
callq 0x40537
movq 0x1a8(%rbx), %rax
movq 0x1b0(%rbx), %rcx
movq 0x48(%rax), %rsi
addq 0x28(%rax), %rsi
addq 0x28(%rcx), %rsi
movq %rbx, %rdi
callq 0x40606
movq %r14, %rdi
callq 0x440f3
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x60473(%rip), %rdx     # 0xc4071
leaq 0x6514f(%rip), %rcx     # 0xc8d54
movq %rbx, %rdi
xorl %esi, %esi
movl $0x65, %r8d
jmp 0x63c2b
leaq 0x5f3a3(%rip), %rdx     # 0xc2fbc
leaq 0x65134(%rip), %rcx     # 0xc8d54
movq %rbx, %rdi
xorl %esi, %esi
movl $0x68, %r8d
callq 0x66380
movl $0x1, %edi
callq 0x263d0
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/pubsub.c
// Function: pubsubSubscribePattern
int pubsubSubscribePattern(client *c, robj *pattern) {
    int retval = 0;

    if (listSearchKey(c->pubsub_patterns,pattern) == NULL) {
        retval = 1;
        pubsubPattern *pat;
        listAddNodeTail(c->pubsub_patterns,pattern);
        incrRefCount(pattern);
        pat = zmalloc(sizeof(*pat));
        pat->pattern = getDecodedObject(pattern);
        pat->client = c;
        listAddNodeTail(server.pubsub_patterns,pat);
    }
    /* Notify the client */
    addReply(c,shared.mbulkhdr[3]);
    addReply(c,shared.psubscribebulk);
    addReplyBulk(c,pattern);
    addReplyLongLong(c,clientSubscriptionsCount(c));
    return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x1b0(%rdi), %rdi
callq 0x2e653
xorl %ebp, %ebp
testq %rax, %rax
jne 0x63ca8
movq 0x1b0(%rbx), %rdi
movq %r14, %rsi
callq 0x2e40f
movq %r14, %rdi
callq 0x43c0c
movl $0x10, %edi
callq 0x3b29d
movq %rax, %r15
movq %r14, %rdi
callq 0x444b2
movq %rax, 0x8(%r15)
movq %rbx, (%r15)
leaq 0xa2bc4(%rip), %rax     # 0x106858
movq 0x980(%rax), %rdi
movq %r15, %rsi
callq 0x2e40f
movl $0x1, %ebp
leaq 0xa3601(%rip), %r15     # 0x1072b0
movq 0x13a48(%r15), %rsi
movq %rbx, %rdi
callq 0x3fc19
movq 0x118(%r15), %rsi
movq %rbx, %rdi
callq 0x3fc19
movq %rbx, %rdi
movq %r14, %rsi
callq 0x40537
movq 0x1a8(%rbx), %rax
movl 0x48(%rax), %ecx
addl 0x28(%rax), %ecx
movq 0x1b0(%rbx), %rax
addl 0x28(%rax), %ecx
movslq %ecx, %rsi
movq %rbx, %rdi
callq 0x40606
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/pubsub.c
// Function: pubsubUnsubscribePattern
int pubsubUnsubscribePattern(client *c, robj *pattern, int notify) {
    listNode *ln;
    pubsubPattern pat;
    int retval = 0;

    incrRefCount(pattern); /* Protect the object. May be the same we remove */
    if ((ln = listSearchKey(c->pubsub_patterns,pattern)) != NULL) {
        retval = 1;
        listDelNode(c->pubsub_patterns,ln);
        pat.client = c;
        pat.pattern = pattern;
        ln = listSearchKey(server.pubsub_patterns,&pat);
        listDelNode(server.pubsub_patterns,ln);
    }
    /* Notify the client */
    if (notify) {
        addReply(c,shared.mbulkhdr[3]);
        addReply(c,shared.punsubscribebulk);
        addReplyBulk(c,pattern);
        addReplyLongLong(c,dictSize(c->pubsub_channels)+
                       listLength(c->pubsub_patterns));
    }
    decrRefCount(pattern);
    return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x43c0c
movq 0x1b0(%r14), %rdi
movq %rbx, %rsi
callq 0x2e653
testq %rax, %rax
je 0x63d7a
movq 0x1b0(%r14), %rdi
movq %rax, %rsi
callq 0x2e4f4
movq %rsp, %rsi
movq %r14, (%rsi)
movq %rbx, 0x8(%rsi)
leaq 0xa2b01(%rip), %r15     # 0x106858
movq 0x980(%r15), %rdi
callq 0x2e653
movq 0x980(%r15), %rdi
movq %rax, %rsi
callq 0x2e4f4
movl $0x1, %r15d
jmp 0x63d7d
xorl %r15d, %r15d
testl %ebp, %ebp
je 0x63dd5
leaq 0xa3528(%rip), %r12     # 0x1072b0
movq 0x13a48(%r12), %rsi
movq %r14, %rdi
callq 0x3fc19
movq 0x120(%r12), %rsi
movq %r14, %rdi
callq 0x3fc19
movq %r14, %rdi
movq %rbx, %rsi
callq 0x40537
movq 0x1a8(%r14), %rax
movq 0x1b0(%r14), %rcx
movq 0x48(%rax), %rsi
addq 0x28(%rax), %rsi
addq 0x28(%rcx), %rsi
movq %r14, %rdi
callq 0x40606
movq %rbx, %rdi
callq 0x440f3
movl %r15d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/pubsub.c
// Function: subscribeCommand
void subscribeCommand(client *c) {
    int j;

    for (j = 1; j < c->argc; j++)
        pubsubSubscribeChannel(c,c->argv[j]);
    c->flags |= CLIENT_PUBSUB;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x2, 0x38(%rdi)
jl 0x64189
movl $0x1, %r14d
movq 0x40(%rbx), %rax
movq (%rax,%r14,8), %rsi
movq %rbx, %rdi
callq 0x63a11
incq %r14
movslq 0x38(%rbx), %rax
cmpq %rax, %r14
jl 0x6416d
orb $0x4, 0x9a(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/pubsub.c
// Function: unsubscribeCommand
void unsubscribeCommand(client *c) {
    if (c->argc == 1) {
        pubsubUnsubscribeAllChannels(c,1);
    } else {
        int j;

        for (j = 1; j < c->argc; j++)
            pubsubUnsubscribeChannel(c,c->argv[j],1);
    }
    if (clientSubscriptionsCount(c) == 0) c->flags &= ~CLIENT_PUBSUB;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x1, 0x38(%rdi)
jne 0x641b4
movq %rbx, %rdi
movl $0x1, %esi
callq 0x63ded
jmp 0x641e1
cmpl $0x2, 0x38(%rbx)
jl 0x641e1
movl $0x1, %r14d
movq 0x40(%rbx), %rax
movq (%rax,%r14,8), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x63af5
incq %r14
movslq 0x38(%rbx), %rax
cmpq %rax, %r14
jl 0x641c0
movq 0x1a8(%rbx), %rax
movq 0x1b0(%rbx), %rcx
movl 0x48(%rax), %edx
addl 0x28(%rax), %edx
addl 0x28(%rcx), %edx
jne 0x64201
andb $-0x5, 0x9a(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/pubsub.c
// Function: psubscribeCommand
void psubscribeCommand(client *c) {
    int j;

    for (j = 1; j < c->argc; j++)
        pubsubSubscribePattern(c,c->argv[j]);
    c->flags |= CLIENT_PUBSUB;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x2, 0x38(%rdi)
jl 0x64238
movl $0x1, %r14d
movq 0x40(%rbx), %rax
movq (%rax,%r14,8), %rsi
movq %rbx, %rdi
callq 0x63c3a
incq %r14
movslq 0x38(%rbx), %rax
cmpq %rax, %r14
jl 0x6421c
orb $0x4, 0x9a(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/pubsub.c
// Function: punsubscribeCommand
void punsubscribeCommand(client *c) {
    if (c->argc == 1) {
        pubsubUnsubscribeAllPatterns(c,1);
    } else {
        int j;

        for (j = 1; j < c->argc; j++)
            pubsubUnsubscribePattern(c,c->argv[j],1);
    }
    if (clientSubscriptionsCount(c) == 0) c->flags &= ~CLIENT_PUBSUB;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x1, 0x38(%rdi)
jne 0x64263
movq %rbx, %rdi
movl $0x1, %esi
callq 0x63ea3
jmp 0x64290
cmpl $0x2, 0x38(%rbx)
jl 0x64290
movl $0x1, %r14d
movq 0x40(%rbx), %rax
movq (%rax,%r14,8), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x63d07
incq %r14
movslq 0x38(%rbx), %rax
cmpq %rax, %r14
jl 0x6426f
movq 0x1a8(%rbx), %rax
movq 0x1b0(%rbx), %rcx
movl 0x48(%rax), %edx
addl 0x28(%rax), %edx
addl 0x28(%rcx), %edx
jne 0x642b0
andb $-0x5, 0x9a(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/pubsub.c
// Function: publishCommand
void publishCommand(client *c) {
    int receivers = pubsubPublishMessage(c->argv[1],c->argv[2]);
    if (server.cluster_enabled)
        clusterPropagatePublish(c->argv[1],c->argv[2]);
    else
        forceCommandPropagation(c,PROPAGATE_REPL);
    addReplyLongLong(c,receivers);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movq 0x8(%rax), %rdi
movq 0x10(%rax), %rsi
callq 0x63f62
movl %eax, %ebp
leaq 0xa2580(%rip), %rax     # 0x106858
cmpl $0x0, 0x98c(%rax)
je 0x642f4
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rdi
movq 0x10(%rax), %rsi
callq 0x6caf2
jmp 0x64301
movq %rbx, %rdi
movl $0x2, %esi
callq 0x35f12
movslq %ebp, %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x40606
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/multi.c
// Function: freeClientMultiState
void freeClientMultiState(client *c) {
    int j;

    for (j = 0; j < c->mstate.count; j++) {
        int i;
        multiCmd *mc = c->mstate.commands+j;

        for (i = 0; i < mc->argc; i++)
            decrRefCount(mc->argv[i]);
        zfree(mc->argv);
    }
    zfree(c->mstate.commands);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x158(%rdi)
jle 0x645ed
xorl %r14d, %r14d
movq 0x150(%rbx), %rax
leaq (%r14,%r14,2), %rcx
leaq (%rax,%rcx,8), %r15
cmpl $0x0, 0x8(%r15)
jle 0x645d6
xorl %r12d, %r12d
movq (%r15), %rax
movq (%rax,%r12,8), %rdi
callq 0x440f3
incq %r12
movslq 0x8(%r15), %rax
cmpq %rax, %r12
jl 0x645be
movq (%r15), %rdi
callq 0x3b3df
incq %r14
movslq 0x158(%rbx), %rax
cmpq %rax, %r14
jl 0x645a5
movq 0x150(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3b3df
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/multi.c
// Function: discardTransaction
void discardTransaction(client *c) {
    freeClientMultiState(c);
    initClientMultiState(c);
    c->flags &= ~(CLIENT_MULTI|CLIENT_DIRTY_CAS|CLIENT_DIRTY_EXEC);
    unwatchAllKeys(c);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x6458e
movq $0x0, 0x150(%rbx)
movl $0x0, 0x158(%rbx)
andl $0xffffefd7, 0x98(%rbx) # imm = 0xFFFFEFD7
movq %rbx, %rdi
popq %rbx
jmp 0x646d5
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/multi.c
// Function: multiCommand
void multiCommand(client *c) {
    if (c->flags & CLIENT_MULTI) {
        addReplyError(c,"MULTI calls can not be nested");
        return;
    }
    c->flags |= CLIENT_MULTI;
    addReply(c,shared.ok);
}

// Assembly:
movl 0x98(%rdi), %eax
testb $0x8, %al
jne 0x64805
orl $0x8, %eax
movl %eax, 0x98(%rdi)
leaq 0xa2ab4(%rip), %rax     # 0x1072b0
movq 0x8(%rax), %rsi
jmp 0x3fc19
leaq 0x645a8(%rip), %rsi     # 0xc8db4
jmp 0x3ffcb
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/multi.c
// Function: discardCommand
void discardCommand(client *c) {
    if (!(c->flags & CLIENT_MULTI)) {
        addReplyError(c,"DISCARD without MULTI");
        return;
    }
    discardTransaction(c);
    addReply(c,shared.ok);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testb $0x8, 0x98(%rdi)
jne 0x6482e
leaq 0x645ad(%rip), %rsi     # 0xc8dd2
movq %rbx, %rdi
popq %rbx
jmp 0x3ffcb
movq %rbx, %rdi
callq 0x6458e
movq $0x0, 0x150(%rbx)
movl $0x0, 0x158(%rbx)
andl $0xffffefd7, 0x98(%rbx) # imm = 0xFFFFEFD7
movq %rbx, %rdi
callq 0x646d5
leaq 0xa2a4c(%rip), %rax     # 0x1072b0
movq 0x8(%rax), %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x3fc19
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/multi.c
// Function: execCommandPropagateMulti
void execCommandPropagateMulti(client *c) {
    robj *multistring = createStringObject("MULTI",5);

    propagate(server.multiCommand,c->db->id,&multistring,1,
              PROPAGATE_AOF|PROPAGATE_REPL);
    decrRefCount(multistring);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x64576(%rip), %rdi     # 0xc8df5
movl $0x5, %esi
callq 0x43ba8
movq %rsp, %r14
movq %rax, (%r14)
leaq 0xa1fc2(%rip), %rax     # 0x106858
movq 0x348(%rax), %rdi
movq 0x10(%rbx), %rax
movl 0x30(%rax), %esi
movq %r14, %rdx
movl $0x1, %ecx
movl $0x3, %r8d
callq 0x35dfb
movq (%r14), %rdi
callq 0x440f3
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/multi.c
// Function: watchForKey
void watchForKey(client *c, robj *key) {
    list *clients = NULL;
    listIter li;
    listNode *ln;
    watchedKey *wk;

    /* Check if we are already watching for this key */
    listRewind(c->watched_keys,&li);
    while((ln = listNext(&li))) {
        wk = listNodeValue(ln);
        if (wk->db == c->db && equalStringObjects(key,wk->key))
            return; /* Key already watched */
    }
    /* This key is not already watched in this DB. Let's add it */
    clients = dictFetchValue(c->db->watched_keys,key);
    if (!clients) {
        clients = listCreate();
        dictAdd(c->db->watched_keys,key,clients);
        incrRefCount(key);
    }
    listAddNodeTail(clients,c);
    /* Add the new key to the list of keys watched by this client */
    wk = zmalloc(sizeof(*wk));
    wk->key = key;
    wk->db = c->db;
    incrRefCount(key);
    listAddNodeTail(c->watched_keys,wk);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x1a0(%rdi), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0x2e582
movq %r15, %rdi
callq 0x2e59f
testq %rax, %rax
je 0x64b46
movq %rsp, %r15
movq 0x10(%rax), %rax
movq 0x8(%rax), %rcx
cmpq 0x10(%rbx), %rcx
jne 0x64b39
movq (%rax), %rsi
movq %r14, %rdi
callq 0x446bf
testl %eax, %eax
jne 0x64bbb
movq %r15, %rdi
callq 0x2e59f
testq %rax, %rax
jne 0x64b18
movq 0x10(%rbx), %rax
movq 0x20(%rax), %rdi
movq %r14, %rsi
callq 0x32019
movq %rax, %r15
testq %rax, %rax
jne 0x64b81
callq 0x2e33c
movq %rax, %r15
movq 0x10(%rbx), %rax
movq 0x20(%rax), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x31a95
movq %r14, %rdi
callq 0x43c0c
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2e40f
movl $0x10, %edi
callq 0x3b29d
movq %rax, %r15
movq %r14, (%rax)
movq 0x10(%rbx), %rax
movq %rax, 0x8(%r15)
movq %r14, %rdi
callq 0x43c0c
movq 0x1a0(%rbx), %rdi
movq %r15, %rsi
callq 0x2e40f
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/multi.c
// Function: touchWatchedKey
void touchWatchedKey(redisDb *db, robj *key) {
    list *clients;
    listIter li;
    listNode *ln;

    if (dictSize(db->watched_keys) == 0) return;
    clients = dictFetchValue(db->watched_keys, key);
    if (!clients) return;

    /* Mark all the clients watching this key as CLIENT_DIRTY_CAS */
    /* Check if we are already watching for this key */
    listRewind(clients,&li);
    while((ln = listNext(&li))) {
        client *c = listNodeValue(ln);

        c->flags |= CLIENT_DIRTY_CAS;
    }
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq 0x20(%rdi), %rdi
movq 0x28(%rdi), %rax
addq 0x48(%rdi), %rax
je 0x64c18
callq 0x32019
testq %rax, %rax
je 0x64c18
movq %rsp, %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2e582
movq %rbx, %rdi
callq 0x2e59f
testq %rax, %rax
je 0x64c18
movq %rsp, %rbx
movq 0x10(%rax), %rax
orl $0x20, 0x98(%rax)
movq %rbx, %rdi
callq 0x2e59f
testq %rax, %rax
jne 0x64c00
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/multi.c
// Function: touchWatchedKeysOnFlush
void touchWatchedKeysOnFlush(int dbid) {
    listIter li1, li2;
    listNode *ln;

    /* For every client, check all the waited keys */
    listRewind(server.clients,&li1);
    while((ln = listNext(&li1))) {
        client *c = listNodeValue(ln);
        listRewind(c->watched_keys,&li2);
        while((ln = listNext(&li2))) {
            watchedKey *wk = listNodeValue(ln);

            /* For every watched key matching the specified DB, if the
             * key exists, mark the client as dirty, as the key will be
             * removed. */
            if (dbid == -1 || wk->db->id == dbid) {
                if (dictFind(wk->db->dict, wk->key->ptr) != NULL)
                    c->flags |= CLIENT_DIRTY_CAS;
            }
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edi, %ebx
leaq 0xa1c26(%rip), %rax     # 0x106858
movq 0x1c8(%rax), %rdi
leaq 0x8(%rsp), %r14
movq %r14, %rsi
callq 0x2e582
movq %r14, %rdi
callq 0x2e59f
testq %rax, %rax
je 0x64cc0
leaq 0x18(%rsp), %r14
leaq 0x8(%rsp), %r15
movq 0x10(%rax), %r12
movq 0x1a0(%r12), %rdi
movq %r14, %rsi
callq 0x2e582
movq %r14, %rdi
callq 0x2e59f
testq %rax, %rax
je 0x64cb3
movq 0x10(%rax), %rax
cmpl $-0x1, %ebx
je 0x64c90
movq 0x8(%rax), %rcx
cmpl %ebx, 0x30(%rcx)
jne 0x64c71
movq (%rax), %rcx
movq 0x8(%rax), %rax
movq (%rax), %rdi
movq 0x8(%rcx), %rsi
callq 0x31cca
testq %rax, %rax
je 0x64c71
orb $0x20, 0x98(%r12)
jmp 0x64c71
movq %r15, %rdi
callq 0x2e59f
testq %rax, %rax
jne 0x64c5d
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq