LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 0x3a57d
movq %rax, %r12
movq 0x8(%rax), %rdi
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x26af0
movq %rax, %r15
movq 0x8(%r13), %rax
imulq $0x3e8, %r15, %rcx      # imm = 0x3E8
cmpq 0xa0a89(%rip), %rax     # 0xf4fd0
leaq -0x10f78(%rip), %rdx    # 0x435d6
cmoveq %rcx, %r15
cmpq %rdx, %rax
cmoveq %rcx, %r15
cmpq 0xa09c8(%rip), %rax     # 0xf4f28
cmoveq %rcx, %r15
cmpq %rdx, %rax
je 0x54584
cmpq 0xa09b8(%rip), %rax     # 0xf4f28
je 0x54584
cmpq 0xa0a37(%rip), %rax     # 0xf4fb0
je 0x54584
cmpq 0xa0a06(%rip), %rax     # 0xf4f88
jne 0x5458c
callq 0x2b8ae
addq %rax, %r15
movq %r12, %rdi
callq 0x3a265
leaq 0x620ec(%rip), %rdi     # 0xb6687
pushq $0x9
popq %rsi
callq 0x39e29
movq %rax, %r12
movq %rsp, %r13
movq %rax, (%r13)
movq %r14, 0x8(%r13)
movq %r15, %rdi
callq 0x39e38
movq %rax, %r14
movq %rax, 0x10(%r13)
pushq $0x3
popq %rsi
movq %rbx, %rdi
movq %r13, %rdx
callq 0x54403
movq %rax, %rbx
movq %r12, %rdi
callq 0x3a265
movq %r14, %rdi
callq 0x3a265
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 %rbx
movl $0x41c8, %edi           # imm = 0x41C8
callq 0x327b9
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
callq 0x3b3b1
orl $-0x1, 0x8(%rbx)
andq $0x0, 0x20(%rbx)
callq 0x3114c
movq %rax, 0x28(%rbx)
andq $0x0, 0x30(%rbx)
andl $0x0, 0x38(%rbx)
andq $0x0, 0x40(%rbx)
andl $0x0, 0x1c0(%rbx)
andl $0x0, 0x98(%rbx)
andl $0x0, 0x168(%rbx)
movl $0x6, 0xa0(%rbx)
callq 0x26e0c
movq %rax, 0x68(%rbx)
andq $0x0, 0x70(%rbx)
andq $0x0, 0x90(%rbx)
callq 0x26e0c
movq %rax, 0x1a0(%rbx)
andq $0x0, 0x1b8(%rbx)
movq 0x68(%rbx), %rax
leaq -0x1a5ff(%rip), %rcx    # 0x3a304
movq %rcx, 0x18(%rax)
leaq -0x1e7dd(%rip), %rcx    # 0x36131
movq %rcx, 0x10(%rax)
movq %rbx, %rdi
callq 0x56d90
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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
xorl %r14d, %r14d
movslq 0x38(%rbx), %rax
movq 0x40(%rbx), %rdi
cmpq %rax, %r14
jge 0x54944
movq (%rdi,%r14,8), %rdi
callq 0x3a265
incq %r14
jmp 0x54929
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x328f9
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 0x311c8
movq 0x68(%rbx), %rdi
callq 0x26e2a
movq 0x1a0(%rbx), %rdi
callq 0x26e2a
movq %rbx, %rdi
callq 0x56da0
movq %rbx, %rdi
popq %rbx
jmp 0x328f9
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 0xa4a5c(%rip), %r14     # 0xf98a8
cmpq $0x0, 0xa18(%r14)
je 0x54e60
callq 0x2b8ae
movq %rax, %rbx
jmp 0x54e62
xorl %ebx, %ebx
movl 0x6b0(%r14), %edi
leaq 0x8(%rsp), %rsi
callq 0x266e0
cmpl $-0x1, %eax
je 0x54e86
movq 0x38(%rsp), %rax
movq %rax, 0x690(%r14)
jmp 0x54ea6
callq 0x26880
movl (%rax), %edi
callq 0x26680
leaq 0x61f55(%rip), %rsi     # 0xb6dee
pushq $0x3
popq %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x2b699
cmpq $0x0, 0xa18(%r14)
je 0x54ecf
callq 0x2b8ae
subq %rbx, %rax
movq 0xa18(%r14), %rcx
testq %rcx, %rcx
sete %dl
cmpq %rcx, %rax
setl %cl
orb %dl, %cl
je 0x54eda
addq $0x98, %rsp
popq %rbx
popq %r14
retq
leaq 0x61f3c(%rip), %rdi     # 0xb6e1d
movq %rax, %rsi
addq $0x98, %rsp
popq %rbx
popq %r14
jmp 0x71e85
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rsi), %eax
shrl $0x4, %eax
andl $0xf, %eax
je 0x54f1c
cmpl $0x8, %eax
je 0x54f1c
cmpl $0x1, %eax
jne 0x54f3e
movq 0x8(%rsi), %rsi
movq %rbx, %rdi
callq 0x66ced
jmp 0x54f36
movq 0x8(%rsi), %r14
movq %r14, %rdi
callq 0x543cb
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x66c85
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x5d716(%rip), %rdi     # 0xb265b
leaq 0x6131b(%rip), %rsi     # 0xb6267
movl $0x31e, %edx            # imm = 0x31E
callq 0x57b45
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 0x4427e
movq %rax, %r15
movl $0xf0, %eax
andl (%r12), %eax
cmpl $0x90, %eax
jne 0x5506a
movq 0x8(%r12), %rdi
xorl %ebx, %ebx
xorl %esi, %esi
callq 0x28354
movq %rax, %r12
leaq 0x8(%rsp), %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x28422
movl %eax, %ebp
testl %eax, %eax
je 0x5504c
testq %rbx, %rbx
jne 0x5500a
cmpq $0x40, %r15
pushq $0x40
popq %rdx
cmovlq %r15, %rdx
addl $0x2, %edx
movq %r14, %rdi
pushq $0x2a
popq %rsi
callq 0x66bc1
testq %rax, %rax
je 0x55054
movq %r14, %rdi
leaq 0x61a58(%rip), %rsi     # 0xb6a45
pushq $0x5
popq %rdx
callq 0x66c85
testq %rax, %rax
je 0x55054
movq %r14, %rdi
movq (%rsp), %rsi
callq 0x54ef3
testl %eax, %eax
je 0x55054
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x55022
movl 0x30(%rsp), %edx
movq %r14, %rdi
callq 0x66c85
jmp 0x5502f
movq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x66ced
testq %rax, %rax
je 0x55054
incq %rbx
cmpq $0x40, %rbx
movl $0x0, %eax
cmoveq %rax, %rbx
decq %r15
jmp 0x54fab
movq %r12, %rdi
callq 0x283e5
xorl %eax, %eax
testl %ebp, %ebp
sete %al
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5f0a1(%rip), %rdi     # 0xb4112
leaq 0x611ef(%rip), %rsi     # 0xb6267
movl $0x33f, %edx            # imm = 0x33F
callq 0x57b45
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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, %rbx
movq %rsi, (%rsp)
movq %rdi, %r14
movq %rdx, %rdi
callq 0x4cbe1
movq %rax, %r15
movq %rbx, %rdi
callq 0x4cd29
movq %rax, %r12
xorl %r13d, %r13d
pushq $0x1
popq %rbx
movq %r12, %rdi
callq 0x4cdb1
cmpl $-0x1, %eax
je 0x555d4
testq %r13, %r13
jne 0x55597
cmpq $0x40, %r15
pushq $0x40
popq %rax
cmovlq %r15, %rax
leal 0x2(,%rax,2), %edx
movq %r14, %rdi
pushq $0x2a
popq %rsi
callq 0x66bc1
xorl %ebp, %ebp
testq %rax, %rax
je 0x555de
movq %r14, %rdi
leaq 0x5faf3(%rip), %rsi     # 0xb506d
pushq $0x5
popq %rdx
callq 0x66c85
testq %rax, %rax
je 0x555de
movq %r14, %rdi
movq (%rsp), %rsi
callq 0x54ef3
testl %eax, %eax
je 0x555de
movq %r14, %rdi
movq %r12, %rsi
movl %ebx, %edx
callq 0x555ef
xorl %ebp, %ebp
testl %eax, %eax
je 0x555de
movq %r14, %rdi
movq %r12, %rsi
pushq $0x2
popq %rdx
callq 0x555ef
testl %eax, %eax
je 0x555de
incq %r13
cmpq $0x40, %r13
movl $0x0, %eax
cmoveq %rax, %r13
decq %r15
jmp 0x55536
movq %r12, %rdi
callq 0x4cd95
movl %ebx, %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_O2/gplessis[P]dotdeb-redis/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 0x5564c
cmpl $0x5, %eax
jne 0x55680
leaq 0x10(%rsp), %r14
andq $0x0, (%r14)
leaq 0x4(%rsp), %rcx
orl $-0x1, (%rcx)
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
leaq 0x8(%rsp), %r8
movq %rax, (%r8)
movq %rsi, %rdi
movl %edx, %esi
movq %r14, %rdx
callq 0x4ce9b
movq (%r14), %rsi
testq %rsi, %rsi
je 0x5566b
movl 0x4(%rsp), %edx
movq %rbx, %rdi
callq 0x66c85
jmp 0x55678
leaq 0x10(%rsp), %r14
movq %rsi, %rdi
movl %edx, %esi
movq %r14, %rdx
callq 0x4cf20
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x54ef3
jmp 0x55678
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x66ced
addq $0x18, %rsp
popq %rbx
popq %r14
retq
leaq 0x5eaba(%rip), %rdi     # 0xb4141
leaq 0x60bd9(%rip), %rsi     # 0xb6267
movl $0x3d2, %edx            # imm = 0x3D2
callq 0x57b45
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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
xorl %ebx, %ebx
leaq 0xa41f1(%rip), %r12     # 0xf98a8
movq %rsp, %r14
movl 0x6fc(%r12), %edi
movl $0x10000, %edx          # imm = 0x10000
movq %r14, %rsi
callq 0x26340
testq %rax, %rax
jle 0x556f7
movq %rax, %r15
movq 0x718(%r12), %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x31758
movq %rax, 0x718(%r12)
addq %r15, %rbx
jmp 0x556ba
movq %rbx, %rax
addq $0x10008, %rsp          # imm = 0x10008
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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
pushq $0x1
popq %rdx
callq 0x26340
cmpq $0x1, %rax
jne 0x55daa
cmpb $0x21, 0x7(%rsp)
jne 0x55daa
leaq 0x60eb4(%rip), %rsi     # 0xb6c08
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0x2b699
leaq 0xa3b43(%rip), %rax     # 0xf98a8
movl $0x1, 0x710(%rax)
movl 0x708(%rax), %edi
leaq 0x60a85(%rip), %rsi     # 0xb6801
pushq $0x1
popq %rdx
callq 0x26bb0
cmpq $0x1, %rax
je 0x55daa
callq 0x26880
movl (%rax), %edi
callq 0x26680
leaq 0x60e99(%rip), %rsi     # 0xb6c36
pushq $0x3
popq %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x2b699
leaq 0xa3af7(%rip), %rax     # 0xf98a8
movq 0x40(%rax), %rdi
movl 0x704(%rax), %esi
pushq $0x1
popq %rdx
popq %rax
jmp 0x28ba8
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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)
orq $-0x1, 0x10(%rdi)
callq 0x265e0
cmpl $-0x1, %eax
je 0x55e20
leaq 0x8(%rsp), %rdi
callq 0x265e0
cmpl $-0x1, %eax
je 0x55e20
leaq 0x10(%rsp), %rdi
callq 0x265e0
cmpl $-0x1, %eax
je 0x55e20
movl (%rsp), %esi
xorl %edi, %edi
callq 0x2929c
testl %eax, %eax
jne 0x55e20
movl 0x4(%rsp), %esi
xorl %edi, %edi
callq 0x2929c
testl %eax, %eax
je 0x55e5f
callq 0x26880
movl (%rax), %edi
callq 0x26680
leaq 0x60e23(%rip), %rsi     # 0xb6c56
xorl %r14d, %r14d
pushq $0x3
popq %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x2b699
pushq $-0x1
popq %rbx
cmpq $0x6, %r14
je 0x55eb2
movl (%rsp,%r14,4), %edi
cmpl $-0x1, %edi
je 0x55e5a
callq 0x26180
incq %r14
jmp 0x55e46
leaq 0xa3a42(%rip), %r14     # 0xf98a8
movq 0x40(%r14), %rdi
movl 0x8(%rsp), %esi
leaq -0x145(%rip), %rcx      # 0x55d30
xorl %ebx, %ebx
pushq $0x1
popq %rdx
xorl %r8d, %r8d
callq 0x28ae8
cmpl $-0x1, %eax
je 0x55e20
pshufd $0xb1, (%rsp), %xmm0    # xmm0 = mem[1,0,3,2]
movdqu %xmm0, 0x6f8(%r14)
movq 0x10(%rsp), %xmm0
pshufd $0xe1, %xmm0, %xmm0     # xmm0 = xmm0[1,0,2,3]
movq %xmm0, 0x708(%r14)
andl $0x0, 0x710(%r14)
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 0xa39e1(%rip), %rax     # 0xf98a8
cmpl $-0x1, 0x69c(%rax)
je 0x55ee0
leaq 0x60e7f(%rip), %rsi     # 0xb6d56
movq %rbx, %rdi
popq %rbx
jmp 0x36b6f
cmpl $-0x1, 0x730(%rax)
je 0x55f03
movl $0x1, 0x698(%rax)
leaq 0x60e96(%rip), %rsi     # 0xb6d90
movq %rbx, %rdi
popq %rbx
jmp 0x36cc3
callq 0x541f2
testl %eax, %eax
je 0x55f20
leaq 0xa43fd(%rip), %rax     # 0xfa310
movq 0x10(%rax), %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x36987
leaq 0x60e99(%rip), %rsi     # 0xb6dc0
jmp 0x55efa
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 0x2a3ed
testl %eax, %eax
jne 0x563b8
movq %r14, %rdi
callq 0x39e74
leaq 0xa353d(%rip), %r12     # 0xf98a8
movq 0x988(%r12), %rdi
movq %r14, %rsi
callq 0x2a5f9
testq %rax, %rax
je 0x56386
movq 0x8(%rax), %r15
jmp 0x563a9
callq 0x26e0c
movq %rax, %r15
movq 0x988(%r12), %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x2a3ed
movq %r14, %rdi
callq 0x39e74
movq %r15, %rdi
movq %rbx, %rsi
callq 0x26ecc
pushq $0x1
popq %r15
leaq 0xa3f51(%rip), %r12     # 0xfa310
movq 0x13a48(%r12), %rsi
movq %rbx, %rdi
callq 0x36987
movq 0x108(%r12), %rsi
movq %rbx, %rdi
callq 0x36987
movq %rbx, %rdi
movq %r14, %rsi
callq 0x36fd9
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 0x370a6
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 0x39e74
movq 0x1a8(%rbx), %rdi
movq %r14, %rsi
callq 0x2a6dc
xorl %r15d, %r15d
testl %eax, %eax
jne 0x564a9
leaq 0xa3455(%rip), %r13     # 0xf98a8
movq 0x988(%r13), %rdi
movq %r14, %rsi
callq 0x2a5f9
testq %rax, %rax
je 0x5651b
movq 0x8(%rax), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x270cf
testq %rax, %rax
je 0x5652d
movq %r12, %rdi
movq %rax, %rsi
callq 0x26fa8
pushq $0x1
popq %r15
cmpq $0x0, 0x28(%r12)
jne 0x564a9
movq 0x988(%r13), %rdi
movq %r14, %rsi
callq 0x2a6dc
testl %ebp, %ebp
je 0x56501
leaq 0xa3e5c(%rip), %r12     # 0xfa310
movq 0x13a48(%r12), %rsi
movq %rbx, %rdi
callq 0x36987
movq 0x110(%r12), %rsi
movq %rbx, %rdi
callq 0x36987
movq %rbx, %rdi
movq %r14, %rsi
callq 0x36fd9
movq 0x1a8(%rbx), %rax
movq 0x1b0(%rbx), %rcx
movq 0x48(%rax), %rsi
addq 0x28(%rax), %rsi
addq 0x28(%rcx), %rsi
movq %rbx, %rdi
callq 0x370a6
movq %r14, %rdi
callq 0x3a265
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5c3af(%rip), %rdx     # 0xb28d1
leaq 0x60b5f(%rip), %rcx     # 0xb7088
pushq $0x65
jmp 0x5653d
leaq 0x5b474(%rip), %rdx     # 0xb19a8
leaq 0x60b4d(%rip), %rcx     # 0xb7088
pushq $0x68
popq %r8
movq %rbx, %rdi
xorl %esi, %esi
callq 0x588a4
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 0x270cf
xorl %ebp, %ebp
testq %rax, %rax
jne 0x565bb
movq 0x1b0(%rbx), %rdi
movq %r14, %rsi
callq 0x26ecc
movq %r14, %rdi
callq 0x39e74
pushq $0x10
popq %rdi
callq 0x327b9
movq %rax, %r15
movq %r14, %rdi
callq 0x3a57d
movq %rax, 0x8(%r15)
movq %rbx, (%r15)
leaq 0xa32ff(%rip), %rax     # 0xf98a8
movq 0x990(%rax), %rdi
movq %r15, %rsi
callq 0x26ecc
pushq $0x1
popq %rbp
leaq 0xa3d4e(%rip), %r15     # 0xfa310
movq 0x13a48(%r15), %rsi
movq %rbx, %rdi
callq 0x36987
movq 0x118(%r15), %rsi
movq %rbx, %rdi
callq 0x36987
movq %rbx, %rdi
movq %r14, %rsi
callq 0x36fd9
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 0x370a6
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 0x39e74
movq 0x1b0(%r14), %rdi
movq %rbx, %rsi
callq 0x270cf
testq %rax, %rax
je 0x5668b
movq 0x1b0(%r14), %rdi
movq %rax, %rsi
callq 0x26fa8
movq %rsp, %rsi
movq %r14, (%rsi)
movq %rbx, 0x8(%rsi)
leaq 0xa323e(%rip), %r15     # 0xf98a8
movq 0x990(%r15), %rdi
callq 0x270cf
movq 0x990(%r15), %rdi
movq %rax, %rsi
callq 0x26fa8
pushq $0x1
popq %r15
jmp 0x5668e
xorl %r15d, %r15d
testl %ebp, %ebp
je 0x566e6
leaq 0xa3c77(%rip), %r12     # 0xfa310
movq 0x13a48(%r12), %rsi
movq %r14, %rdi
callq 0x36987
movq 0x120(%r12), %rsi
movq %r14, %rdi
callq 0x36987
movq %r14, %rdi
movq %rbx, %rsi
callq 0x36fd9
movq 0x1a8(%r14), %rax
movq 0x1b0(%r14), %rcx
movq 0x48(%rax), %rsi
addq 0x28(%rax), %rsi
addq 0x28(%rcx), %rsi
movq %r14, %rdi
callq 0x370a6
movq %rbx, %rdi
callq 0x3a265
movl %r15d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/pubsub.c
// Function: pubsubUnsubscribeAllChannels
int pubsubUnsubscribeAllChannels(client *c, int notify) {
    dictIterator *di = dictGetSafeIterator(c->pubsub_channels);
    dictEntry *de;
    int count = 0;

    while((de = dictNext(di)) != NULL) {
        robj *channel = dictGetKey(de);

        count += pubsubUnsubscribeChannel(c,channel,notify);
    }
    /* We were subscribed to nothing? Still reply to the client. */
    if (notify && count == 0) {
        addReply(c,shared.mbulkhdr[3]);
        addReply(c,shared.unsubscribebulk);
        addReply(c,shared.nullbulk);
        addReplyLongLong(c,dictSize(c->pubsub_channels)+
                       listLength(c->pubsub_patterns));
    }
    dictReleaseIterator(di);
    return count;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %r15
movq 0x1a8(%rdi), %rdi
callq 0x2a9c4
movq %rax, %r14
xorl %ebx, %ebx
movq %r14, %rdi
callq 0x2a9d3
testq %rax, %rax
je 0x5673a
movq (%rax), %rsi
movq %r15, %rdi
movl %ebp, %edx
callq 0x5641b
addl %eax, %ebx
jmp 0x5671c
testl %ebp, %ebp
je 0x56798
testl %ebx, %ebx
jne 0x56798
leaq 0xa3bc7(%rip), %r12     # 0xfa310
movq 0x13a48(%r12), %rsi
movq %r15, %rdi
callq 0x36987
movq 0x110(%r12), %rsi
movq %r15, %rdi
callq 0x36987
movq 0x50(%r12), %rsi
movq %r15, %rdi
callq 0x36987
movq 0x1a8(%r15), %rax
movq 0x1b0(%r15), %rcx
movq 0x48(%rax), %rsi
addq 0x28(%rax), %rsi
addq 0x28(%rcx), %rsi
movq %r15, %rdi
callq 0x370a6
movq %r14, %rdi
callq 0x2aa94
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/pubsub.c
// Function: pubsubUnsubscribeAllPatterns
int pubsubUnsubscribeAllPatterns(client *c, int notify) {
    listNode *ln;
    listIter li;
    int count = 0;

    listRewind(c->pubsub_patterns,&li);
    while ((ln = listNext(&li)) != NULL) {
        robj *pattern = ln->value;

        count += pubsubUnsubscribePattern(c,pattern,notify);
    }
    if (notify && count == 0) {
        /* We were subscribed to nothing? Still reply to the client. */
        addReply(c,shared.mbulkhdr[3]);
        addReply(c,shared.punsubscribebulk);
        addReply(c,shared.nullbulk);
        addReplyLongLong(c,dictSize(c->pubsub_channels)+
                       listLength(c->pubsub_patterns));
    }
    return count;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %esi, %r14d
movq %rdi, %rbx
movq 0x1b0(%rdi), %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rsi
callq 0x2702c
xorl %ebp, %ebp
movq %r15, %rdi
callq 0x27046
testq %rax, %rax
je 0x567f1
movq 0x10(%rax), %rsi
movq %rbx, %rdi
movl %r14d, %edx
callq 0x5661a
addl %eax, %ebp
jmp 0x567d1
testl %r14d, %r14d
je 0x5684d
testl %ebp, %ebp
jne 0x5684d
leaq 0xa3b0f(%rip), %r14     # 0xfa310
movq 0x13a48(%r14), %rsi
movq %rbx, %rdi
callq 0x36987
movq 0x120(%r14), %rsi
movq %rbx, %rdi
callq 0x36987
movq 0x50(%r14), %rsi
movq %rbx, %rdi
callq 0x36987
movq 0x1a8(%rbx), %rax
movq 0x1b0(%rbx), %rcx
movq 0x48(%rax), %rsi
addq 0x28(%rax), %rsi
addq 0x28(%rcx), %rsi
movq %rbx, %rdi
callq 0x370a6
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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
pushq $0x1
popq %r14
movslq 0x38(%rbx), %rax
cmpq %rax, %r14
jge 0x56a2d
movq 0x40(%rbx), %rax
movq (%rax,%r14,8), %rsi
movq %rbx, %rdi
callq 0x56339
incq %r14
jmp 0x56a0f
orb $0x4, 0x9a(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x38(%rdi), %eax
cmpl $0x1, %eax
jne 0x56a7b
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x566fe
movq 0x1a8(%rbx), %rax
movq 0x1b0(%rbx), %rcx
movl 0x48(%rax), %edx
addl 0x28(%rax), %edx
addl 0x28(%rcx), %edx
jne 0x56a76
andb $-0x5, 0x9a(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x1
popq %r14
pushq $0x1
popq %rbp
cltq
cmpq %rax, %r14
jge 0x56a56
movq 0x40(%rbx), %rax
movq (%rax,%r14,8), %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x5641b
incq %r14
movl 0x38(%rbx), %eax
jmp 0x56a82
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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
pushq $0x1
popq %r14
movslq 0x38(%rbx), %rax
cmpq %rax, %r14
jge 0x56acc
movq 0x40(%rbx), %rax
movq (%rax,%r14,8), %rsi
movq %rbx, %rdi
callq 0x56551
incq %r14
jmp 0x56aae
orb $0x4, 0x9a(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x38(%rdi), %eax
cmpl $0x1, %eax
jne 0x56b1a
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x567ab
movq 0x1a8(%rbx), %rax
movq 0x1b0(%rbx), %rcx
movl 0x48(%rax), %edx
addl 0x28(%rax), %edx
addl 0x28(%rcx), %edx
jne 0x56b15
andb $-0x5, 0x9a(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x1
popq %r14
pushq $0x1
popq %rbp
cltq
cmpq %rax, %r14
jge 0x56af5
movq 0x40(%rbx), %rax
movq (%rax,%r14,8), %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x5661a
incq %r14
movl 0x38(%rbx), %eax
jmp 0x56b21
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 0x5685a
movl %eax, %ebp
leaq 0xa2d46(%rip), %rax     # 0xf98a8
cmpl $0x0, 0x99c(%rax)
je 0x56b7e
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rdi
movq 0x10(%rax), %rsi
callq 0x5e3cb
jmp 0x56b89
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x2e213
movslq %ebp, %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x370a6
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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
xorl %r15d, %r15d
movslq 0x158(%rbx), %rax
movq 0x150(%rbx), %r14
cmpq %rax, %r15
jge 0x56def
imulq $0x18, %r15, %rax
addq %rax, %r14
xorl %r12d, %r12d
movslq 0x8(%r14), %rax
movq (%r14), %rdi
cmpq %rax, %r12
jge 0x56de5
movq (%rdi,%r12,8), %rdi
callq 0x3a265
incq %r12
jmp 0x56dcb
callq 0x328f9
incq %r15
jmp 0x56dae
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x328f9
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/multi.c
// Function: queueMultiCommand
void queueMultiCommand(client *c) {
    multiCmd *mc;
    int j;

    c->mstate.commands = zrealloc(c->mstate.commands,
            sizeof(multiCmd)*(c->mstate.count+1));
    mc = c->mstate.commands+c->mstate.count;
    mc->cmd = c->cmd;
    mc->argc = c->argc;
    mc->argv = zmalloc(sizeof(robj*)*c->argc);
    memcpy(mc->argv,c->argv,sizeof(robj*)*c->argc);
    for (j = 0; j < c->argc; j++)
        incrRefCount(mc->argv[j]);
    c->mstate.count++;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x150(%rdi), %rdi
movslq 0x158(%rbx), %rax
imulq $0x18, %rax, %rsi
addq $0x18, %rsi
callq 0x32863
movq %rax, %r14
movq %rax, 0x150(%rbx)
movslq 0x158(%rbx), %rax
imulq $0x18, %rax, %r12
leaq (%r14,%r12), %r15
movq 0x48(%rbx), %rax
movq %rax, 0x10(%r14,%r12)
movslq 0x38(%rbx), %rdi
movl %edi, 0x8(%r14,%r12)
shlq $0x3, %rdi
callq 0x327b9
movq %rax, (%r14,%r12)
movq 0x40(%rbx), %rsi
movslq 0x38(%rbx), %rdx
shlq $0x3, %rdx
movq %rax, %rdi
callq 0x26c50
xorl %r14d, %r14d
movslq 0x38(%rbx), %rax
cmpq %rax, %r14
jge 0x56e91
movq (%r15), %rax
movq (%rax,%r14,8), %rdi
callq 0x39e74
incq %r14
jmp 0x56e77
incl 0x158(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 0x56da0
andq $0x0, 0x150(%rbx)
andl $0x0, 0x158(%rbx)
andl $0xffffefd7, 0x98(%rbx) # imm = 0xFFFFEFD7
movq %rbx, %rdi
popq %rbx
jmp 0x56ece
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/multi.c
// Function: unwatchAllKeys
void unwatchAllKeys(client *c) {
    listIter li;
    listNode *ln;

    if (listLength(c->watched_keys) == 0) return;
    listRewind(c->watched_keys,&li);
    while((ln = listNext(&li))) {
        list *clients;
        watchedKey *wk;

        /* Lookup the watched key -> clients list and remove the client
         * from the list */
        wk = listNodeValue(ln);
        clients = dictFetchValue(wk->db->watched_keys, wk->key);
        serverAssertWithInfo(c,NULL,clients != NULL);
        listDelNode(clients,listSearchKey(clients,c));
        /* Kill the entry at all if this was the only client */
        if (listLength(clients) == 0)
            dictDelete(wk->db->watched_keys, wk->key);
        /* Remove this watched key from the client->watched list */
        listDelNode(c->watched_keys,ln);
        decrRefCount(wk->key);
        zfree(wk);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x1a0(%rdi), %rdi
cmpq $0x0, 0x28(%rdi)
je 0x56f75
movq %rsp, %r14
movq %r14, %rsi
callq 0x2702c
movq %r14, %rdi
callq 0x27046
testq %rax, %rax
je 0x56f75
movq %rax, %r12
movq 0x10(%rax), %r15
movq (%r15), %rsi
movq 0x8(%r15), %rax
movq 0x20(%rax), %rdi
callq 0x2a900
testq %rax, %rax
je 0x56f83
movq %rax, %r13
movq %rax, %rdi
movq %rbx, %rsi
callq 0x270cf
movq %r13, %rdi
movq %rax, %rsi
callq 0x26fa8
cmpq $0x0, 0x28(%r13)
jne 0x56f54
movq (%r15), %rsi
movq 0x8(%r15), %rax
movq 0x20(%rax), %rdi
callq 0x2a6dc
movq 0x1a0(%rbx), %rdi
movq %r12, %rsi
callq 0x26fa8
movq (%r15), %rdi
callq 0x3a265
movq %r15, %rdi
callq 0x328f9
jmp 0x56efb
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x601a5(%rip), %rdx     # 0xb712f
leaq 0x601ae(%rip), %rcx     # 0xb713f
movq %rbx, %rdi
xorl %esi, %esi
movl $0xf7, %r8d
callq 0x588a4
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 0x56fe2
orl $0x8, %eax
movl %eax, 0x98(%rdi)
leaq 0xa3337(%rip), %rax     # 0xfa310
movq 0x8(%rax), %rsi
jmp 0x36987
leaq 0x600ff(%rip), %rsi     # 0xb70e8
jmp 0x36b6f
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 0x5700b
leaq 0x60104(%rip), %rsi     # 0xb7106
movq %rbx, %rdi
popq %rbx
jmp 0x36b6f
movq %rbx, %rdi
callq 0x56ea3
leaq 0xa32f6(%rip), %rax     # 0xfa310
movq 0x8(%rax), %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x36987
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 0x600f4(%rip), %rdi     # 0xb7129
pushq $0x5
popq %rsi
callq 0x39e29
movq %rsp, %r14
movq %rax, (%r14)
leaq 0xa285e(%rip), %rax     # 0xf98a8
movq 0x348(%rax), %rdi
movq 0x10(%rbx), %rax
movl 0x30(%rax), %esi
pushq $0x1
popq %rcx
pushq $0x3
popq %r8
movq %r14, %rdx
callq 0x2e12f
movq (%r14), %rdi
callq 0x3a265
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 0x2702c
movq %r15, %rdi
callq 0x27046
testq %rax, %rax
je 0x57262
movq 0x10(%rax), %rax
movq 0x8(%rax), %rcx
cmpq 0x10(%rbx), %rcx
jne 0x57236
movq (%rax), %rsi
movq %r14, %rdi
callq 0x3a712
testl %eax, %eax
je 0x57236
jmp 0x572d5
movq 0x10(%rbx), %rax
movq 0x20(%rax), %rdi
movq %r14, %rsi
callq 0x2a900
movq %rax, %r15
testq %rax, %rax
jne 0x5729d
callq 0x26e0c
movq %rax, %r15
movq 0x10(%rbx), %rax
movq 0x20(%rax), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2a3ed
movq %r14, %rdi
callq 0x39e74
movq %r15, %rdi
movq %rbx, %rsi
callq 0x26ecc
pushq $0x10
popq %rdi
callq 0x327b9
movq %rax, %r15
movq %r14, (%rax)
movq 0x10(%rbx), %rax
movq %rax, 0x8(%r15)
movq %r14, %rdi
callq 0x39e74
movq 0x1a0(%rbx), %rdi
movq %r15, %rsi
callq 0x26ecc
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 0x57324
callq 0x2a900
testq %rax, %rax
je 0x57324
movq %rsp, %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2702c
movq %rbx, %rdi
callq 0x27046
testq %rax, %rax
je 0x57324
movq 0x10(%rax), %rax
orl $0x20, 0x98(%rax)
jmp 0x5730a
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 0xa256a(%rip), %rax     # 0xf98a8
movq 0x1c8(%rax), %rdi
leaq 0x18(%rsp), %r14
movq %r14, %rsi
callq 0x2702c
leaq 0x8(%rsp), %r15
movq %r14, %rdi
callq 0x27046
testq %rax, %rax
je 0x573b6
movq 0x10(%rax), %r12
movq 0x1a0(%r12), %rdi
movq %r15, %rsi
callq 0x2702c
movq %r15, %rdi
callq 0x27046
testq %rax, %rax
je 0x57357
movq 0x10(%rax), %rax
movq 0x8(%rax), %rcx
cmpl $-0x1, %ebx
je 0x57397
cmpl %ebx, 0x30(%rcx)
jne 0x57378
movq (%rcx), %rdi
movq (%rax), %rax
movq 0x8(%rax), %rsi
callq 0x2a5f9
testq %rax, %rax
je 0x57378
orb $0x20, 0x98(%r12)
jmp 0x57378
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/multi.c
// Function: watchCommand
void watchCommand(client *c) {
    int j;

    if (c->flags & CLIENT_MULTI) {
        addReplyError(c,"WATCH inside MULTI is not allowed");
        return;
    }
    for (j = 1; j < c->argc; j++)
        watchForKey(c,c->argv[j]);
    addReply(c,shared.ok);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testb $0x8, 0x98(%rdi)
jne 0x5740e
pushq $0x1
popq %r14
movslq 0x38(%rbx), %rax
cmpq %rax, %r14
jge 0x573f4
movq 0x40(%rbx), %rax
movq (%rax,%r14,8), %rsi
movq %rbx, %rdi
callq 0x57215
incq %r14
jmp 0x573d6
leaq 0xa2f15(%rip), %rax     # 0xfa310
movq 0x8(%rax), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x36987
leaq 0x5fd32(%rip), %rsi     # 0xb7147
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x36b6f