LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/networking.c
// Function: dupLastObjectIfNeeded
robj *dupLastObjectIfNeeded(list *reply) {
    robj *new, *cur;
    listNode *ln;
    serverAssert(listLength(reply) > 0);
    ln = listLast(reply);
    cur = listNodeValue(ln);
    if (cur->refcount > 1) {
        new = dupStringObject(cur);
        decrRefCount(cur);
        listNodeValue(ln) = new;
    }
    return listNodeValue(ln);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpq $0x0, 0x28(%rdi)
je 0x365b7
movq 0x8(%rdi), %r15
movq 0x10(%r15), %rbx
cmpl $0x2, 0x4(%rbx)
jl 0x365ae
movq %rbx, %rdi
callq 0x39f59
movq %rax, %r14
movq %rbx, %rdi
callq 0x3a265
movq %r14, 0x10(%r15)
movq %r14, %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x7b349(%rip), %rdi     # 0xb1907
leaq 0x7b335(%rip), %rsi     # 0xb18fa
movl $0xc6, %edx
callq 0x57ac8
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/networking.c
// Function: addReplyToBuffer
int _addReplyToBuffer(client *c, const char *s, size_t len) {
    size_t available = sizeof(c->buf)-c->bufpos;

    if (c->flags & CLIENT_CLOSE_AFTER_REPLY) return C_OK;

    /* If there already are entries in the reply list, we cannot
     * add anything more to the static buffer. */
    if (listLength(c->reply) > 0) return C_ERR;

    /* Check that the buffer has enough space available for this string. */
    if (len > available) return C_ERR;

    memcpy(c->buf+c->bufpos,s,len);
    c->bufpos+=len;
    return C_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
xorl %ebx, %ebx
testb $0x40, 0x98(%rdi)
jne 0x36631
movq %rdx, %r14
movq %rdi, %r15
movslq 0x1c0(%rdi), %rax
movl $0x4000, %ecx           # imm = 0x4000
subq %rax, %rcx
movq 0x68(%rdi), %rdx
cmpq $0x0, 0x28(%rdx)
setne %dl
cmpq %r14, %rcx
setb %cl
orb %dl, %cl
je 0x36617
pushq $-0x1
popq %rbx
jmp 0x36631
leaq (%r15,%rax), %rdi
addq $0x1c4, %rdi            # imm = 0x1C4
movq %r14, %rdx
callq 0x26c50
addl %r14d, 0x1c0(%r15)
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/networking.c
// Function: addReplyObjectToList
void _addReplyObjectToList(client *c, robj *o) {
    robj *tail;

    if (c->flags & CLIENT_CLOSE_AFTER_REPLY) return;

    if (listLength(c->reply) == 0) {
        incrRefCount(o);
        listAddNodeTail(c->reply,o);
        c->reply_bytes += getStringObjectSdsUsedMemory(o);
    } else {
        tail = listNodeValue(listLast(c->reply));

        /* Append to this object when possible. */
        if (tail->ptr != NULL &&
            tail->encoding == OBJ_ENCODING_RAW &&
            sdslen(tail->ptr)+sdslen(o->ptr) <= PROTO_REPLY_CHUNK_BYTES)
        {
            c->reply_bytes -= sdsZmallocSize(tail->ptr);
            tail = dupLastObjectIfNeeded(c->reply);
            tail->ptr = sdscatlen(tail->ptr,o->ptr,sdslen(o->ptr));
            c->reply_bytes += sdsZmallocSize(tail->ptr);
        } else {
            incrRefCount(o);
            listAddNodeTail(c->reply,o);
            c->reply_bytes += getStringObjectSdsUsedMemory(o);
        }
    }
    asyncCloseClientOnOutputBufferLimitReached(c);
}

// Assembly:
testb $0x40, 0x98(%rdi)
jne 0x366d8
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x68(%rdi), %rax
cmpq $0x0, 0x28(%rax)
je 0x366d9
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %r15
testq %r15, %r15
je 0x366d9
testb $-0x10, (%rax)
jne 0x366d9
movq %r15, %rdi
callq 0x3670c
movq %rax, %r12
movq 0x8(%r14), %rdi
callq 0x3670c
addq %r12, %rax
cmpq $0x4000, %rax           # imm = 0x4000
ja 0x366d9
movq %r15, %rdi
callq 0x360cc
subq %rax, 0x70(%rbx)
movq 0x68(%rbx), %rdi
callq 0x3657a
movq %rax, %r15
movq 0x8(%rax), %r12
movq 0x8(%r14), %r14
movq %r14, %rdi
callq 0x3670c
movq %r12, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x31758
movq %rax, 0x8(%r15)
movq %rax, %rdi
callq 0x360cc
jmp 0x366f5
retq
movq %r14, %rdi
callq 0x39e74
movq 0x68(%rbx), %rdi
movq %r14, %rsi
callq 0x26ecc
movq %r14, %rdi
callq 0x360db
addq %rax, 0x70(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x36744
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/networking.c
// Function: asyncCloseClientOnOutputBufferLimitReached
void asyncCloseClientOnOutputBufferLimitReached(client *c) {
    serverAssert(c->reply_bytes < SIZE_MAX-(1024*64));
    if (c->reply_bytes == 0 || c->flags & CLIENT_CLOSE_ASAP) return;
    if (checkClientOutputBufferLimits(c)) {
        sds client = catClientInfoString(sdsempty(),c);

        freeClientAsync(c);
        serverLog(LL_WARNING,"Client %s scheduled to be closed ASAP for overcoming of output buffer limits.", client);
        sdsfree(client);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x70(%rdi), %rax
cmpq $-0x10001, %rax         # imm = 0xFFFEFFFF
jae 0x367b7
testq %rax, %rax
je 0x367af
movq %rdi, %rbx
testb $0x4, 0x99(%rdi)
jne 0x367af
movq %rbx, %rdi
callq 0x39141
testl %eax, %eax
je 0x367af
callq 0x3114c
movq %rax, %rdi
movq %rbx, %rsi
callq 0x383ac
movq %rax, %r14
movq %rbx, %rdi
callq 0x378cf
leaq 0x7b6f5(%rip), %rsi     # 0xb1e88
pushq $0x3
popq %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2b699
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x311c8
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x7b6a6(%rip), %rdi     # 0xb1e64
leaq 0x7b135(%rip), %rsi     # 0xb18fa
movl $0x72f, %edx            # imm = 0x72F
callq 0x57ac8
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/networking.c
// Function: addReplySdsToList
void _addReplySdsToList(client *c, sds s) {
    robj *tail;

    if (c->flags & CLIENT_CLOSE_AFTER_REPLY) {
        sdsfree(s);
        return;
    }

    if (listLength(c->reply) == 0) {
        listAddNodeTail(c->reply,createObject(OBJ_STRING,s));
        c->reply_bytes += sdsZmallocSize(s);
    } else {
        tail = listNodeValue(listLast(c->reply));

        /* Append to this object when possible. */
        if (tail->ptr != NULL && tail->encoding == OBJ_ENCODING_RAW &&
            sdslen(tail->ptr)+sdslen(s) <= PROTO_REPLY_CHUNK_BYTES)
        {
            c->reply_bytes -= sdsZmallocSize(tail->ptr);
            tail = dupLastObjectIfNeeded(c->reply);
            tail->ptr = sdscatlen(tail->ptr,s,sdslen(s));
            c->reply_bytes += sdsZmallocSize(tail->ptr);
            sdsfree(s);
        } else {
            listAddNodeTail(c->reply,createObject(OBJ_STRING,s));
            c->reply_bytes += sdsZmallocSize(s);
        }
    }
    asyncCloseClientOnOutputBufferLimitReached(c);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
testb $0x40, 0x98(%rdi)
jne 0x36886
movq %rdi, %rbx
movq 0x68(%rdi), %r15
cmpq $0x0, 0x28(%r15)
je 0x36897
movq 0x8(%r15), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %r12
testq %r12, %r12
je 0x36897
testb $-0x10, (%rax)
jne 0x36897
movq %r12, %rdi
callq 0x3670c
movq %rax, %r13
movq %r14, %rdi
callq 0x3670c
addq %r13, %rax
cmpq $0x4000, %rax           # imm = 0x4000
ja 0x36897
movq %r12, %rdi
callq 0x360cc
subq %rax, 0x70(%rbx)
movq 0x68(%rbx), %rdi
callq 0x3657a
movq %rax, %r15
movq 0x8(%rax), %r12
movq %r14, %rdi
callq 0x3670c
movq %r12, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x31758
movq %rax, 0x8(%r15)
movq %rax, %rdi
callq 0x360cc
addq %rax, 0x70(%rbx)
movq %r14, %rdi
callq 0x311c8
jmp 0x368b8
movq %r14, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x311c8
xorl %edi, %edi
movq %r14, %rsi
callq 0x39d58
movq %r15, %rdi
movq %rax, %rsi
callq 0x26ecc
movq %r14, %rdi
callq 0x360cc
addq %rax, 0x70(%rbx)
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x36744
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/networking.c
// Function: addReplyStringToList
void _addReplyStringToList(client *c, const char *s, size_t len) {
    robj *tail;

    if (c->flags & CLIENT_CLOSE_AFTER_REPLY) return;

    if (listLength(c->reply) == 0) {
        robj *o = createStringObject(s,len);

        listAddNodeTail(c->reply,o);
        c->reply_bytes += getStringObjectSdsUsedMemory(o);
    } else {
        tail = listNodeValue(listLast(c->reply));

        /* Append to this object when possible. */
        if (tail->ptr != NULL && tail->encoding == OBJ_ENCODING_RAW &&
            sdslen(tail->ptr)+len <= PROTO_REPLY_CHUNK_BYTES)
        {
            c->reply_bytes -= sdsZmallocSize(tail->ptr);
            tail = dupLastObjectIfNeeded(c->reply);
            tail->ptr = sdscatlen(tail->ptr,s,len);
            c->reply_bytes += sdsZmallocSize(tail->ptr);
        } else {
            robj *o = createStringObject(s,len);

            listAddNodeTail(c->reply,o);
            c->reply_bytes += getStringObjectSdsUsedMemory(o);
        }
    }
    asyncCloseClientOnOutputBufferLimitReached(c);
}

// Assembly:
testb $0x40, 0x98(%rdi)
jne 0x3694d
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x68(%rdi), %rax
cmpq $0x0, 0x28(%rax)
je 0x3694e
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %r12
testq %r12, %r12
je 0x3694e
testb $-0x10, (%rax)
jne 0x3694e
movq %r12, %rdi
callq 0x3670c
addq %r14, %rax
cmpq $0x4000, %rax           # imm = 0x4000
ja 0x3694e
movq %r12, %rdi
callq 0x360cc
subq %rax, 0x70(%rbx)
movq 0x68(%rbx), %rdi
callq 0x3657a
movq %rax, %r12
movq 0x8(%rax), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x31758
movq %rax, 0x8(%r12)
movq %rax, %rdi
callq 0x360cc
jmp 0x36970
retq
movq %r15, %rdi
movq %r14, %rsi
callq 0x39e29
movq %rax, %r14
movq 0x68(%rbx), %rdi
movq %rax, %rsi
callq 0x26ecc
movq %r14, %rdi
callq 0x360db
addq %rax, 0x70(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x36744
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/networking.c
// Function: addReply
void addReply(client *c, robj *obj) {
    if (prepareClientToWrite(c) != C_OK) return;

    /* This is an important place where we can avoid copy-on-write
     * when there is a saving child running, avoiding touching the
     * refcount field of the object if it's not needed.
     *
     * If the encoding is RAW and there is room in the static buffer
     * we'll be able to send the object to the client without
     * messing with its page. */
    if (sdsEncodedObject(obj)) {
        if (_addReplyToBuffer(c,obj->ptr,sdslen(obj->ptr)) != C_OK)
            _addReplyObjectToList(c,obj);
    } else if (obj->encoding == OBJ_ENCODING_INT) {
        /* Optimization: if there is room in the static buffer for 32 bytes
         * (more than the max chars a 64 bit integer can take as string) we
         * avoid decoding the object and go for the lower level approach. */
        if (listLength(c->reply) == 0 && (sizeof(c->buf) - c->bufpos) >= 32) {
            char buf[32];
            int len;

            len = ll2string(buf,sizeof(buf),(long)obj->ptr);
            if (_addReplyToBuffer(c,buf,len) == C_OK)
                return;
            /* else... continue with the normal code path, but should never
             * happen actually since we verified there is room. */
        }
        obj = getDecodedObject(obj);
        if (_addReplyToBuffer(c,obj->ptr,sdslen(obj->ptr)) != C_OK)
            _addReplyObjectToList(c,obj);
        decrRefCount(obj);
    } else {
        serverPanic("Wrong obj->encoding in addReply()");
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x364cf
testl %eax, %eax
je 0x369a9
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movl (%r14), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x8, %eax
je 0x369c4
cmpl $0x1, %eax
je 0x369f6
testl %eax, %eax
jne 0x36a7d
movq 0x8(%r14), %r15
movq %r15, %rdi
callq 0x3670c
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x365d7
testl %eax, %eax
je 0x3699f
movq %rbx, %rdi
movq %r14, %rsi
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x36639
movq 0x68(%rbx), %rax
cmpq $0x0, 0x28(%rax)
jne 0x36a3c
movslq 0x1c0(%rbx), %rax
addq $-0x4001, %rax          # imm = 0xBFFF
cmpq $-0x21, %rax
ja 0x36a3c
movq 0x8(%r14), %rdx
movq %rsp, %r15
pushq $0x20
popq %rsi
movq %r15, %rdi
callq 0x39796
movslq %eax, %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x365d7
testl %eax, %eax
je 0x3699f
movq %r14, %rdi
callq 0x3a57d
movq %rax, %r14
movq 0x8(%rax), %r15
movq %r15, %rdi
callq 0x3670c
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x365d7
testl %eax, %eax
je 0x36a70
movq %rbx, %rdi
movq %r14, %rsi
callq 0x36639
movq %r14, %rdi
callq 0x3a265
jmp 0x3699f
leaq 0x7ae99(%rip), %rdi     # 0xb191d
leaq 0x7ae6f(%rip), %rsi     # 0xb18fa
movl $0x169, %edx            # imm = 0x169
callq 0x57b45
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/networking.c
// Function: addReplySds
void addReplySds(client *c, sds s) {
    if (prepareClientToWrite(c) != C_OK) {
        /* The caller expects the sds to be free'd. */
        sdsfree(s);
        return;
    }
    if (_addReplyToBuffer(c,s,sdslen(s)) == C_OK) {
        sdsfree(s);
    } else {
        /* This method free's the sds when it is no longer needed. */
        _addReplySdsToList(c,s);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x364cf
testl %eax, %eax
je 0x36abf
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x311c8
movq %rbx, %rdi
callq 0x3670c
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x365d7
testl %eax, %eax
je 0x36ab0
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x367d7
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/networking.c
// Function: addReplyErrorFormat
void addReplyErrorFormat(client *c, const char *fmt, ...) {
    size_t l, j;
    va_list ap;
    va_start(ap,fmt);
    sds s = sdscatvprintf(sdsempty(),fmt,ap);
    va_end(ap);
    /* Make sure there are no newlines in the string, otherwise invalid protocol
     * is emitted. */
    l = sdslen(s);
    for (j = 0; j < l; j++) {
        if (s[j] == '\r' || s[j] == '\n') s[j] = ' ';
    }
    addReplyErrorLength(c,s,sdslen(s));
    sdsfree(s);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x20(%rsp), %rsi
movq %rdx, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x36bf8
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %r15
movq %rsi, 0x10(%r15)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%r15)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%r15)
callq 0x3114c
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x31954
movq %rax, %r14
movq %rax, %rdi
callq 0x3670c
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0x36c56
movzbl (%r14,%rcx), %edx
cmpl $0xd, %edx
je 0x36c4c
cmpl $0xa, %edx
jne 0x36c51
movb $0x20, (%r14,%rcx)
incq %rcx
jmp 0x36c38
movq %r14, %rdi
callq 0x3670c
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x36b2d
movq %r14, %rdi
callq 0x311c8
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/networking.c
// Function: addReplyStatusFormat
void addReplyStatusFormat(client *c, const char *fmt, ...) {
    va_list ap;
    va_start(ap,fmt);
    sds s = sdscatvprintf(sdsempty(),fmt,ap);
    va_end(ap);
    addReplyStatusLength(c,s,sdslen(s));
    sdsfree(s);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x20(%rsp), %rsi
movq %rdx, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x36d4c
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %r15
movq %rsi, 0x10(%r15)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%r15)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%r15)
callq 0x3114c
movq %rax, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x31954
movq %rax, %rbx
movq %rax, %rdi
callq 0x3670c
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x36c81
movq %rbx, %rdi
callq 0x311c8
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/networking.c
// Function: addDeferredMultiBulkLength
void *addDeferredMultiBulkLength(client *c) {
    /* Note that we install the write event here even if the object is not
     * ready to be sent, since we are sure that before returning to the
     * event loop setDeferredMultiBulkLength() will be called. */
    if (prepareClientToWrite(c) != C_OK) return NULL;
    listAddNodeTail(c->reply,createObject(OBJ_STRING,NULL));
    return listLast(c->reply);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x364cf
testl %eax, %eax
je 0x36dc1
xorl %eax, %eax
jmp 0x36de1
movq 0x68(%rbx), %r14
xorl %edi, %edi
xorl %esi, %esi
callq 0x39d58
movq %r14, %rdi
movq %rax, %rsi
callq 0x26ecc
movq 0x68(%rbx), %rax
movq 0x8(%rax), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/networking.c
// Function: setDeferredMultiBulkLength
void setDeferredMultiBulkLength(client *c, void *node, long length) {
    listNode *ln = (listNode*)node;
    robj *len, *next;

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

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

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

// Assembly:
testq %rsi, %rsi
je 0x36eaf
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rsi), %r13
callq 0x3114c
leaq 0x7ab33(%rip), %rsi     # 0xb1947
movq %rax, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x31a38
movq %rax, 0x8(%r13)
andb $0xf, (%r13)
movq %rax, %rdi
callq 0x360cc
addq %rax, 0x70(%rbx)
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x36e9e
movq 0x10(%rax), %r15
cmpq $0x0, 0x8(%r15)
je 0x36e9e
movq 0x8(%r13), %rdi
callq 0x360cc
subq %rax, 0x70(%rbx)
movq %r15, %rdi
callq 0x360db
subq %rax, 0x70(%rbx)
movq 0x8(%r13), %r12
movq 0x8(%r15), %r15
movq %r15, %rdi
callq 0x3670c
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x31758
movq %rax, 0x8(%r13)
movq %rax, %rdi
callq 0x360cc
addq %rax, 0x70(%rbx)
movq 0x68(%rbx), %rdi
movq 0x8(%r14), %rsi
callq 0x26fa8
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x36744
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/networking.c
// Function: addReplyDouble
void addReplyDouble(client *c, double d) {
    char dbuf[128], sbuf[128];
    int dlen, slen;
    if (isinf(d)) {
        /* Libc in odd systems (Hi Solaris!) will format infinite in a
         * different way, so better to handle it in an explicit way. */
        addReplyBulkCString(c, d > 0 ? "inf" : "-inf");
    } else {
        dlen = snprintf(dbuf,sizeof(dbuf),"%.17g",d);
        slen = snprintf(sbuf,sizeof(sbuf),"$%d\r\n%s\r\n",dlen,dbuf);
        addReplyString(c,sbuf,slen);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rdi, %rbx
movq %xmm0, %rax
btrq $0x3f, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
cmpq %rcx, %rax
jne 0x36f06
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
leaq 0x7aa68(%rip), %rax     # 0xb194f
leaq 0x7aa60(%rip), %rsi     # 0xb194e
cmovaq %rax, %rsi
movq %rbx, %rdi
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %r15
jmp 0x36f5d
leaq 0x7aa46(%rip), %rdx     # 0xb1953
leaq 0x80(%rsp), %r14
movl $0x80, %esi
movq %r14, %rdi
movb $0x1, %al
callq 0x26120
leaq 0x77fe9(%rip), %rdx     # 0xaef14
movq %rsp, %r15
movl $0x80, %esi
movq %r15, %rdi
movl %eax, %ecx
movq %r14, %r8
xorl %eax, %eax
callq 0x26120
movslq %eax, %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x36aeb
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/networking.c
// Function: addReplyBulkCString
void addReplyBulkCString(client *c, const char *s) {
    if (s == NULL) {
        addReply(c,shared.nullbulk);
    } else {
        addReplyBulkCBuffer(c,s,strlen(s));
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rsi, %rsi
je 0x36f89
movq %rsi, %r14
movq %rsi, %rdi
callq 0x26500
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3716c
leaq 0xc3380(%rip), %rax     # 0xfa310
movq 0x50(%rax), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x36987
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/networking.c
// Function: addReplyLongLongWithPrefix
void addReplyLongLongWithPrefix(client *c, long long ll, char prefix) {
    char buf[128];
    int len;

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

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

// Assembly:
pushq %rbx
subq $0x80, %rsp
movq %rsi, %rax
movq %rdi, %rbx
cmpb $0x2a, %dl
setne %cl
cmpq $0x20, %rsi
setae %sil
orb %cl, %sil
jne 0x3703e
leaq 0xc32dc(%rip), %rcx     # 0xfa310
movq 0x13a30(%rcx,%rax,8), %rsi
jmp 0x37060
cmpq $0x20, %rax
setae %cl
cmpb $0x24, %dl
setne %sil
orb %cl, %sil
jne 0x37070
leaq 0xc32b8(%rip), %rcx     # 0xfa310
movq 0x13b30(%rcx,%rax,8), %rsi
movq %rbx, %rdi
addq $0x80, %rsp
popq %rbx
jmp 0x36987
leaq 0x1(%rsp), %rdi
movb %dl, -0x1(%rdi)
pushq $0x7f
popq %rsi
movq %rax, %rdx
callq 0x39796
cltq
movq %rsp, %rsi
movw $0xa0d, 0x1(%rax,%rsi)  # imm = 0xA0D
addl $0x3, %eax
movslq %eax, %rdx
movq %rbx, %rdi
callq 0x36aeb
addq $0x80, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/networking.c
// Function: addReplyLongLong
void addReplyLongLong(client *c, long long ll) {
    if (ll == 0)
        addReply(c,shared.czero);
    else if (ll == 1)
        addReply(c,shared.cone);
    else
        addReplyLongLongWithPrefix(c,ll,':');
}

// Assembly:
cmpq $0x1, %rsi
je 0x370c1
testq %rsi, %rsi
jne 0x370d1
leaq 0xc3258(%rip), %rax     # 0xfa310
movq 0x20(%rax), %rsi
jmp 0x36987
leaq 0xc3248(%rip), %rax     # 0xfa310
movq 0x28(%rax), %rsi
jmp 0x36987
pushq $0x3a
popq %rdx
jmp 0x3700c
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/networking.c
// Function: addReplyBulkLen
void addReplyBulkLen(client *c, robj *obj) {
    size_t len;

    if (sdsEncodedObject(obj)) {
        len = sdslen(obj->ptr);
    } else {
        long n = (long)obj->ptr;

        /* Compute how many bytes will take this integer as a radix 10 string */
        len = 1;
        if (n < 0) {
            len++;
            n = -n;
        }
        while((n = n/10) != 0) {
            len++;
        }
    }

    if (len < OBJ_SHARED_BULKHDR_LEN)
        addReply(c,shared.bulkhdr[len]);
    else
        addReplyLongLongWithPrefix(c,len,'$');
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl (%rsi), %eax
shrl $0x4, %eax
testb $0x7, %al
jne 0x3713e
movq 0x8(%rsi), %rdi
callq 0x3670c
movq %rax, %rsi
cmpq $0x1f, %rsi
ja 0x37132
leaq 0xc31ef(%rip), %rax     # 0xfa310
movq 0x13b30(%rax,%rsi,8), %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x36987
pushq $0x24
popq %rdx
movq %rbx, %rdi
popq %rbx
jmp 0x3700c
movq 0x8(%rsi), %rcx
movq %rcx, %rax
negq %rax
movq %rcx, %rsi
shrq $0x3f, %rsi
incq %rsi
testq %rcx, %rcx
cmovnsq %rcx, %rax
pushq $0xa
popq %rcx
cmpq $0xa, %rax
jb 0x37114
xorl %edx, %edx
divq %rcx
incq %rsi
jmp 0x3715c
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/networking.c
// Function: addReplyBulkSds
void addReplyBulkSds(client *c, sds s)  {
    addReplySds(c,sdscatfmt(sdsempty(),"$%u\r\n",
        (unsigned long)sdslen(s)));
    addReplySds(c,s);
    addReply(c,shared.crlf);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x3114c
movq %rax, %r15
movq %r14, %rdi
callq 0x3670c
leaq 0x7a78d(%rip), %rsi     # 0xb1959
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x31abc
movq %rbx, %rdi
movq %rax, %rsi
callq 0x36a9d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x36a9d
leaq 0xc311a(%rip), %rax     # 0xfa310
movq (%rax), %rsi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x36987
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/networking.c
// Function: copyClientOutputBuffer
void copyClientOutputBuffer(client *dst, client *src) {
    listRelease(dst->reply);
    dst->reply = listDup(src->reply);
    memcpy(dst->buf,src->buf,src->bufpos);
    dst->bufpos = src->bufpos;
    dst->reply_bytes = src->reply_bytes;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x68(%rdi), %rdi
callq 0x26e2a
movq 0x68(%rbx), %rdi
callq 0x2705f
movq %rax, 0x68(%r14)
movl $0x1c4, %esi            # imm = 0x1C4
leaq (%r14,%rsi), %rdi
addq %rbx, %rsi
movslq 0x1c0(%rbx), %rdx
callq 0x26c50
movl 0x1c0(%rbx), %eax
movl %eax, 0x1c0(%r14)
movq 0x70(%rbx), %rax
movq %rax, 0x70(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/networking.c
// Function: acceptTcpHandler
void acceptTcpHandler(aeEventLoop *el, int fd, void *privdata, int mask) {
    int cport, cfd, max = MAX_ACCEPTS_PER_CALL;
    char cip[NET_IP_STR_LEN];
    UNUSED(el);
    UNUSED(mask);
    UNUSED(privdata);

    while(max--) {
        cfd = anetTcpAccept(server.neterr, fd, cip, sizeof(cip), &cport);
        if (cfd == ANET_ERR) {
            if (errno != EWOULDBLOCK)
                serverLog(LL_WARNING,
                    "Accepting client connection: %s", server.neterr);
            return;
        }
        serverLog(LL_VERBOSE,"Accepted %s:%d", cip, cport);
        acceptCommonHandler(cfd,0,cip);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %esi, %ebx
movl $0xfffffc18, %r13d      # imm = 0xFFFFFC18
movl $0x208, %r14d           # imm = 0x208
addq 0xbdd09(%rip), %r14     # 0xf4fb8
leaq 0x10(%rsp), %r15
pushq $0x1
popq %rbp
testl %r13d, %r13d
je 0x37329
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
pushq $0x2e
popq %rcx
leaq 0xc(%rsp), %r8
callq 0x29cc1
cmpl $-0x1, %eax
je 0x37302
movl %eax, %r12d
movl 0xc(%rsp), %ecx
movl %ebp, %edi
leaq 0x7a699(%rip), %rsi     # 0xb197f
movq %r15, %rdx
xorl %eax, %eax
callq 0x2b699
movl %r12d, %edi
xorl %esi, %esi
movq %r15, %rdx
callq 0x37338
incl %r13d
jmp 0x372b7
callq 0x26880
cmpl $0xb, (%rax)
je 0x37329
movl $0x208, %edx            # imm = 0x208
addq 0xbdca0(%rip), %rdx     # 0xf4fb8
leaq 0x7a640(%rip), %rsi     # 0xb195f
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x2b699
addq $0x48, %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/networking.c
// Function: acceptUnixHandler
void acceptUnixHandler(aeEventLoop *el, int fd, void *privdata, int mask) {
    int cfd, max = MAX_ACCEPTS_PER_CALL;
    UNUSED(el);
    UNUSED(mask);
    UNUSED(privdata);

    while(max--) {
        cfd = anetUnixAccept(server.neterr, fd);
        if (cfd == ANET_ERR) {
            if (errno != EWOULDBLOCK)
                serverLog(LL_WARNING,
                    "Accepting client connection: %s", server.neterr);
            return;
        }
        serverLog(LL_VERBOSE,"Accepted connection to %s", server.unixsocket);
        acceptCommonHandler(cfd,CLIENT_UNIX_SOCKET,NULL);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movl $0x208, %r14d           # imm = 0x208
addq 0xbdb50(%rip), %r14     # 0xf4fb8
movl $0xfffffc18, %r13d      # imm = 0xFFFFFC18
leaq 0x7a519(%rip), %r15     # 0xb198e
pushq $0x1
popq %rbp
testl %r13d, %r13d
je 0x374c7
movq %r14, %rdi
movl %ebx, %esi
callq 0x29d9b
cmpl $-0x1, %eax
je 0x374bd
movl %eax, %r12d
leaq 0xc2412(%rip), %rax     # 0xf98a8
movq 0x130(%rax), %rdx
movl %ebp, %edi
movq %r15, %rsi
xorl %eax, %eax
callq 0x2b699
movl %r12d, %edi
movl $0x800, %esi            # imm = 0x800
xorl %edx, %edx
callq 0x37338
incl %r13d
jmp 0x37478
callq 0x26880
cmpl $0xb, (%rax)
jne 0x374d6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x208, %edx            # imm = 0x208
addq 0xbdad6(%rip), %rdx     # 0xf4fb8
leaq 0x7a476(%rip), %rsi     # 0xb195f
pushq $0x3
popq %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2b699
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/networking.c
// Function: unlinkClient
void unlinkClient(client *c) {
    listNode *ln;

    /* If this is marked as current client unset it. */
    if (server.current_client == c) server.current_client = NULL;

    /* Certain operations must be done only if the client has an active socket.
     * If the client was already unlinked or if it's a "fake client" the
     * fd is already set to -1. */
    if (c->fd != -1) {
        /* Remove from the list of active clients. */
        ln = listSearchKey(server.clients,c);
        serverAssert(ln != NULL);
        listDelNode(server.clients,ln);

        /* Unregister async I/O handlers and close the socket. */
        aeDeleteFileEvent(server.el,c->fd,AE_READABLE);
        aeDeleteFileEvent(server.el,c->fd,AE_WRITABLE);
        close(c->fd);
        c->fd = -1;
    }

    /* Remove from the list of pending writes if needed. */
    if (c->flags & CLIENT_PENDING_WRITE) {
        ln = listSearchKey(server.clients_pending_write,c);
        serverAssert(ln != NULL);
        listDelNode(server.clients_pending_write,ln);
        c->flags &= ~CLIENT_PENDING_WRITE;
    }

    /* When client was just unblocked because of a blocking operation,
     * remove it from the list of unblocked clients. */
    if (c->flags & CLIENT_UNBLOCKED) {
        ln = listSearchKey(server.unblocked_clients,c);
        serverAssert(ln != NULL);
        listDelNode(server.unblocked_clients,ln);
        c->flags &= ~CLIENT_UNBLOCKED;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xc2137(%rip), %r14     # 0xf98a8
cmpq %rdi, 0x1f0(%r14)
jne 0x37782
andq $0x0, 0x1f0(%r14)
cmpl $-0x1, 0x8(%rbx)
je 0x377d9
movq 0x1c8(%r14), %rdi
movq %rbx, %rsi
callq 0x270cf
testq %rax, %rax
je 0x3784f
movq 0x1c8(%r14), %rdi
movq %rax, %rsi
callq 0x26fa8
movq 0x40(%r14), %rdi
movl 0x8(%rbx), %esi
pushq $0x1
popq %rdx
callq 0x28ba8
movq 0x40(%r14), %rdi
movl 0x8(%rbx), %esi
pushq $0x2
popq %rdx
callq 0x28ba8
movl 0x8(%rbx), %edi
callq 0x26180
orl $-0x1, 0x8(%rbx)
movl 0x98(%rbx), %eax
btl $0x15, %eax
jae 0x37819
movq 0x1d8(%r14), %rdi
movq %rbx, %rsi
callq 0x270cf
testq %rax, %rax
je 0x37864
movq 0x1d8(%r14), %rdi
movq %rax, %rsi
callq 0x26fa8
movl $0xffdfffff, %eax       # imm = 0xFFDFFFFF
andl 0x98(%rbx), %eax
movl %eax, 0x98(%rbx)
testb %al, %al
jns 0x37847
movq 0x920(%r14), %rdi
movq %rbx, %rsi
callq 0x270cf
testq %rax, %rax
je 0x37879
movq 0x920(%r14), %rdi
movq %rax, %rsi
callq 0x26fa8
andb $0x7f, 0x98(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x7a152(%rip), %rdi     # 0xb19a8
leaq 0x7a09d(%rip), %rsi     # 0xb18fa
movl $0x2f6, %edx            # imm = 0x2F6
jmp 0x3788c
leaq 0x7a13d(%rip), %rdi     # 0xb19a8
leaq 0x7a088(%rip), %rsi     # 0xb18fa
movl $0x303, %edx            # imm = 0x303
jmp 0x3788c
leaq 0x7a128(%rip), %rdi     # 0xb19a8
leaq 0x7a073(%rip), %rsi     # 0xb18fa
movl $0x30c, %edx            # imm = 0x30C
callq 0x57ac8
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/networking.c
// Function: freeClientArgv
static void freeClientArgv(client *c) {
    int j;
    for (j = 0; j < c->argc; j++)
        decrRefCount(c->argv[j]);
    c->argc = 0;
    c->cmd = NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movslq 0x38(%rbx), %rax
cmpq %rax, %r14
jge 0x378be
movq 0x40(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x3a265
incq %r14
jmp 0x378a3
andl $0x0, 0x38(%rbx)
andq $0x0, 0x48(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/networking.c
// Function: freeClientsInAsyncFreeQueue
void freeClientsInAsyncFreeQueue(void) {
    while (listLength(server.clients_to_close)) {
        listNode *ln = listFirst(server.clients_to_close);
        client *c = listNodeValue(ln);

        c->flags &= ~CLIENT_CLOSE_ASAP;
        freeClient(c);
        listDelNode(server.clients_to_close,ln);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0xc1fa0(%rip), %r14     # 0xf98a8
movq 0x1d0(%r14), %rax
cmpq $0x0, 0x28(%rax)
je 0x3793d
movq (%rax), %rbx
movq 0x10(%rbx), %rdi
andl $0xfffffbff, 0x98(%rdi) # imm = 0xFFFFFBFF
callq 0x37527
movq 0x1d0(%r14), %rdi
movq %rbx, %rsi
callq 0x26fa8
jmp 0x37908
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/networking.c
// Function: handleClientsWithPendingWrites
int handleClientsWithPendingWrites(void) {
    listIter li;
    listNode *ln;
    int processed = listLength(server.clients_pending_write);

    listRewind(server.clients_pending_write,&li);
    while((ln = listNext(&li))) {
        client *c = listNodeValue(ln);
        c->flags &= ~CLIENT_PENDING_WRITE;
        listDelNode(server.clients_pending_write,ln);

        /* Try to write buffers to the client socket. */
        if (writeToClient(c->fd,c,0) == C_ERR) continue;

        /* If there is nothing left, do nothing. Otherwise install
         * the write handler. */
        if (clientHasPendingReplies(c) &&
            aeCreateFileEvent(server.el, c->fd, AE_WRITABLE,
                sendReplyToClient, c) == AE_ERR)
        {
            freeClientAsync(c);
        }
    }
    return processed;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0xc1d39(%rip), %r13     # 0xf98a8
movq 0x1d8(%r13), %rdi
movq 0x28(%rdi), %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rsi
callq 0x2702c
leaq -0x43(%rip), %r15       # 0x37b4b
pushq $0x2
popq %rbp
movq %r14, %rdi
callq 0x27046
testq %rax, %rax
je 0x37c0d
movq 0x10(%rax), %r12
andl $0xffdfffff, 0x98(%r12) # imm = 0xFFDFFFFF
movq 0x1d8(%r13), %rdi
movq %rax, %rsi
callq 0x26fa8
movl 0x8(%r12), %edi
movq %r12, %rsi
xorl %edx, %edx
callq 0x37945
cmpl $-0x1, %eax
je 0x37b91
cmpl $0x0, 0x1c0(%r12)
jne 0x37be8
movq 0x68(%r12), %rax
cmpq $0x0, 0x28(%rax)
je 0x37b91
movq 0x40(%r13), %rdi
movl 0x8(%r12), %esi
movl %ebp, %edx
movq %r15, %rcx
movq %r12, %r8
callq 0x28ae8
cmpl $-0x1, %eax
jne 0x37b91
movq %r12, %rdi
callq 0x378cf
jmp 0x37b91
movl %ebx, %eax
addq $0x18, %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/networking.c
// Function: resetClient
void resetClient(client *c) {
    redisCommandProc *prevcmd = c->cmd ? c->cmd->proc : NULL;

    freeClientArgv(c);
    c->reqtype = 0;
    c->multibulklen = 0;
    c->bulklen = -1;

    /* We clear the ASKING flag as well if we are not inside a MULTI, and
     * if what we just executed is not the ASKING command itself. */
    if (!(c->flags & CLIENT_MULTI) && prevcmd != askingCommand)
        c->flags &= ~CLIENT_ASKING;

    /* Remove the CLIENT_REPLY_SKIP flag if any so that the reply
     * to the next command will be sent, but set the flag if the command
     * we just processed was "CLIENT REPLY SKIP". */
    c->flags &= ~CLIENT_REPLY_SKIP;
    if (c->flags & CLIENT_REPLY_SKIP_NEXT) {
        c->flags |= CLIENT_REPLY_SKIP;
        c->flags &= ~CLIENT_REPLY_SKIP_NEXT;
    }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x48(%rdi), %rax
testq %rax, %rax
je 0x37c3e
movq 0x8(%rax), %rax
cmpq 0xbd2e0(%rip), %rax     # 0xf4f18
setne %bpl
jmp 0x37c41
movb $0x1, %bpl
movq %rbx, %rdi
callq 0x37899
andq $0x0, 0x58(%rbx)
orq $-0x1, 0x60(%rbx)
movl 0x98(%rbx), %eax
movl %eax, %ecx
andl $0xfffffdf7, %ecx       # imm = 0xFFFFFDF7
testb $0x1, %bpl
cmovel %eax, %ecx
testb $0x8, %al
cmovnel %eax, %ecx
movl %ecx, %eax
andl $0xfeffffff, %eax       # imm = 0xFEFFFFFF
movl %ecx, %edx
andl $0xfe7fffff, %edx       # imm = 0xFE7FFFFF
orl $0x1000000, %edx        # imm = 0x1000000
btl $0x17, %ecx
cmovael %eax, %edx
movl %edx, 0x98(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/networking.c
// Function: setProtocolError
static void setProtocolError(client *c, int pos) {
    if (server.verbosity <= LL_VERBOSE) {
        sds client = catClientInfoString(sdsempty(),c);
        serverLog(LL_VERBOSE,
            "Protocol error from client: %s", client);
        sdsfree(client);
    }
    c->flags |= CLIENT_CLOSE_AFTER_REPLY;
    sdsrange(c->querybuf,pos,-1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
leaq 0xc1a7e(%rip), %rax     # 0xf98a8
cmpl $0x1, 0x5f8(%rax)
jg 0x37e62
callq 0x3114c
movq %rax, %rdi
movq %r14, %rsi
callq 0x383ac
movq %rax, %r15
leaq 0x7a544(%rip), %rsi     # 0xb2391
pushq $0x1
popq %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x2b699
movq %r15, %rdi
callq 0x311c8
orb $0x40, 0x98(%r14)
movq 0x28(%r14), %rdi
pushq $-0x1
popq %rdx
movl %ebx, %esi
popq %rbx
popq %r14
popq %r15
jmp 0x31e8e
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/networking.c
// Function: processInputBuffer
void processInputBuffer(client *c) {
    server.current_client = c;
    /* Keep processing while there is something in the input buffer */
    while(sdslen(c->querybuf)) {
        /* Return if clients are paused. */
        if (!(c->flags & CLIENT_SLAVE) && clientsArePaused()) break;

        /* Immediately abort if the client is in the middle of something. */
        if (c->flags & CLIENT_BLOCKED) break;

        /* CLIENT_CLOSE_AFTER_REPLY closes the connection once the reply is
         * written to the client. Make sure to not let the reply grow after
         * this flag has been set (i.e. don't process more commands).
         *
         * The same applies for clients we want to terminate ASAP. */
        if (c->flags & (CLIENT_CLOSE_AFTER_REPLY|CLIENT_CLOSE_ASAP)) break;

        /* Determine request type when unknown. */
        if (!c->reqtype) {
            if (c->querybuf[0] == '*') {
                c->reqtype = PROTO_REQ_MULTIBULK;
            } else {
                c->reqtype = PROTO_REQ_INLINE;
            }
        }

        if (c->reqtype == PROTO_REQ_INLINE) {
            if (processInlineBuffer(c) != C_OK) break;
        } else if (c->reqtype == PROTO_REQ_MULTIBULK) {
            if (processMultibulkBuffer(c) != C_OK) break;
        } else {
            serverPanic("Unknown request type");
        }

        /* Multibulk processing could see a <= 0 length. */
        if (c->argc == 0) {
            resetClient(c);
        } else {
            /* Only reset the client when the command was executed. */
            if (processCommand(c) == C_OK)
                resetClient(c);
            /* freeMemoryIfNeeded may flush slave output buffers. This may result
             * into a slave, that may be the active client, to be freed. */
            if (server.current_client == NULL) break;
        }
    }
    server.current_client = NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xc1669(%rip), %r14     # 0xf98a8
movq %rdi, 0x1f0(%r14)
movq 0x28(%rbx), %rdi
callq 0x3670c
testq %rax, %rax
je 0x382f0
movl 0x98(%rbx), %eax
testb $0x1, %al
jne 0x38275
callq 0x38320
testl %eax, %eax
jne 0x382f0
movl 0x98(%rbx), %eax
testw $0x450, %ax             # imm = 0x450
jne 0x382f0
movl 0x58(%rbx), %eax
cmpl $0x2, %eax
je 0x3829c
cmpl $0x1, %eax
je 0x382ad
testl %eax, %eax
jne 0x38300
movq 0x28(%rbx), %rax
cmpb $0x2a, (%rax)
jne 0x382a6
movl $0x2, 0x58(%rbx)
movq %rbx, %rdi
callq 0x37e7d
jmp 0x382b5
movl $0x1, 0x58(%rbx)
movq %rbx, %rdi
callq 0x37c96
testl %eax, %eax
jne 0x382f0
cmpl $0x0, 0x38(%rbx)
je 0x382e3
movq %rbx, %rdi
callq 0x2e4fd
testl %eax, %eax
jne 0x382d3
movq %rbx, %rdi
callq 0x37c1e
cmpq $0x0, 0x1f0(%r14)
jne 0x38246
jmp 0x382f0
movq %rbx, %rdi
callq 0x37c1e
jmp 0x38246
andq $0x0, 0x1f0(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x79858(%rip), %rdi     # 0xb1b5f
leaq 0x795ec(%rip), %rsi     # 0xb18fa
movl $0x50b, %edx            # imm = 0x50B
callq 0x57b45
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/networking.c
// Function: clientsArePaused
int clientsArePaused(void) {
    if (server.clients_paused &&
        server.clients_pause_end_time < server.mstime)
    {
        listNode *ln;
        listIter li;
        client *c;

        server.clients_paused = 0;

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

            /* Don't touch slaves and blocked clients. The latter pending
             * requests be processed when unblocked. */
            if (c->flags & (CLIENT_SLAVE|CLIENT_BLOCKED)) continue;
            c->flags |= CLIENT_UNBLOCKED;
            listAddNodeTail(server.unblocked_clients,c);
        }
    }
    return server.clients_paused;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
leaq 0xc157a(%rip), %r14     # 0xf98a8
movl 0x1f8(%r14), %eax
testl %eax, %eax
je 0x38399
movq 0x200(%r14), %rcx
cmpq 0x980(%r14), %rcx
jge 0x383a4
andl $0x0, 0x1f8(%r14)
movq 0x1c8(%r14), %rdi
leaq 0x8(%rsp), %rbx
movq %rbx, %rsi
callq 0x2702c
movq %rbx, %rdi
callq 0x27046
testq %rax, %rax
je 0x3839d
movq 0x10(%rax), %rsi
movl 0x98(%rsi), %eax
testb $0x11, %al
jne 0x38365
orl $0x80, %eax
movl %eax, 0x98(%rsi)
movq 0x920(%r14), %rdi
callq 0x26ecc
jmp 0x38365
xorl %eax, %eax
jmp 0x383a4
movl 0x1f8(%r14), %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/networking.c
// Function: getClientsMaxBuffers
void getClientsMaxBuffers(unsigned long *longest_output_list,
                          unsigned long *biggest_input_buffer) {
    client *c;
    listNode *ln;
    listIter li;
    unsigned long lol = 0, bib = 0;

    listRewind(server.clients,&li);
    while ((ln = listNext(&li)) != NULL) {
        c = listNodeValue(ln);

        if (listLength(c->reply) > lol) lol = listLength(c->reply);
        if (sdslen(c->querybuf) > bib) bib = sdslen(c->querybuf);
    }
    *longest_output_list = lol;
    *biggest_input_buffer = bib;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xc120b(%rip), %rax     # 0xf98a8
movq 0x1c8(%rax), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0x2702c
xorl %r12d, %r12d
xorl %r13d, %r13d
movq %r15, %rdi
callq 0x27046
testq %rax, %rax
je 0x386e7
movq 0x10(%rax), %rax
movq 0x28(%rax), %rdi
movq 0x68(%rax), %rax
movq 0x28(%rax), %rax
cmpq %r12, %rax
cmovaq %rax, %r12
callq 0x3670c
cmpq %r13, %rax
cmovaq %rax, %r13
jmp 0x386b5
movq %r12, (%r14)
movq %r13, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/networking.c
// Function: getClientPeerId
char *getClientPeerId(client *c) {
    char peerid[NET_PEER_ID_LEN];

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

// Assembly:
movq 0x1b8(%rdi), %rax
testq %rax, %rax
je 0x3873e
retq
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
movq %rsp, %r14
pushq $0x4e
popq %rdx
movq %r14, %rsi
callq 0x386fb
movq %r14, %rdi
callq 0x3115a
movq %rax, 0x1b8(%rbx)
addq $0x58, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/networking.c
// Function: getAllClientsInfoString
sds getAllClientsInfoString(void) {
    listNode *ln;
    listIter li;
    client *client;
    sds o = sdsnewlen(NULL,200*listLength(server.clients));
    sdsclear(o);
    listRewind(server.clients,&li);
    while ((ln = listNext(&li)) != NULL) {
        client = listNodeValue(ln);
        o = catClientInfoString(o,client);
        o = sdscatlen(o,"\n",1);
    }
    return o;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0xc111b(%rip), %rbx     # 0xf98a8
movq 0x1c8(%rbx), %rax
imulq $0xc8, 0x28(%rax), %rsi
xorl %edi, %edi
callq 0x31018
movq %rax, %r14
movq %rax, %rdi
callq 0x31233
movq 0x1c8(%rbx), %rdi
leaq 0x8(%rsp), %rbx
movq %rbx, %rsi
callq 0x2702c
leaq 0x785f0(%rip), %r15     # 0xb0db9
pushq $0x1
popq %r12
movq %rbx, %rdi
callq 0x27046
testq %rax, %rax
je 0x387f9
movq 0x10(%rax), %rsi
movq %r14, %rdi
callq 0x383ac
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x31758
movq %rax, %r14
jmp 0x387cd
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/networking.c
// Function: getClientTypeByName
int getClientTypeByName(char *name) {
    if (!strcasecmp(name,"normal")) return CLIENT_TYPE_NORMAL;
    else if (!strcasecmp(name,"slave")) return CLIENT_TYPE_SLAVE;
    else if (!strcasecmp(name,"pubsub")) return CLIENT_TYPE_PUBSUB;
    else if (!strcasecmp(name,"master")) return CLIENT_TYPE_MASTER;
    else return -1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x853c0(%rip), %rsi     # 0xbe183
callq 0x262f0
testl %eax, %eax
je 0x38e0e
leaq 0x80f0a(%rip), %rsi     # 0xb9cdd
movq %rbx, %rdi
callq 0x262f0
testl %eax, %eax
je 0x38e12
leaq 0x759ea(%rip), %rsi     # 0xae7d0
movq %rbx, %rdi
callq 0x262f0
testl %eax, %eax
je 0x38e16
leaq 0x80e92(%rip), %rsi     # 0xb9c8b
movq %rbx, %rdi
callq 0x262f0
movl %eax, %ecx
xorl %eax, %eax
negl %ecx
sbbl %eax, %eax
orl $0x3, %eax
jmp 0x38e19
xorl %eax, %eax
jmp 0x38e19
pushq $0x1
jmp 0x38e18
pushq $0x2
popq %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/networking.c
// Function: securityWarningCommand
void securityWarningCommand(client *c) {
    static time_t logged_time;
    time_t now = time(NULL);

    if (labs(now-logged_time) > 60) {
        serverLog(LL_WARNING,"Possible SECURITY ATTACK detected. It looks like somebody is sending POST or Host: commands to Redis. This is likely due to an attacker attempting to use Cross Protocol Scripting to compromise your Redis instance. Connection aborted.");
        logged_time = now;
    }
    freeClientAsync(c);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %edi, %edi
callq 0x26cd0
movq %rax, %r14
subq 0xd529f(%rip), %rax     # 0x10e120
movq %rax, %rcx
negq %rcx
cmovsq %rax, %rcx
cmpq $0x3d, %rcx
jb 0x38ea9
leaq 0x78ed3(%rip), %rsi     # 0xb1d6b
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x2b699
movq %r14, 0xd5277(%rip)     # 0x10e120
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x378cf