// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/networking.c
// Function: addReplyObjectToList
void _addReplyObjectToList(client *c, robj *o) {
    if (c->flags & CLIENT_CLOSE_AFTER_REPLY) return;

    if (listLength(c->reply) == 0) {
        sds s = sdsdup(o->ptr);
        listAddNodeTail(c->reply,s);
        c->reply_bytes += sdslen(s);
    } else {
        listNode *ln = listLast(c->reply);
        sds tail = listNodeValue(ln);

        /* Append to this object when possible. If tail == NULL it was
         * set via addDeferredMultiBulkLength(). */
        if (tail && sdslen(tail)+sdslen(o->ptr) <= PROTO_REPLY_CHUNK_BYTES) {
            tail = sdscatsds(tail,o->ptr);
            listNodeValue(ln) = tail;
            c->reply_bytes += sdslen(o->ptr);
        } else {
            sds s = sdsdup(o->ptr);
            listAddNodeTail(c->reply,s);
            c->reply_bytes += sdslen(s);
        }
    }
    asyncCloseClientOnOutputBufferLimitReached(c);
}

// Assembly:
testb $0x40, 0x88(%rdi)
jne 0x217f2
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x58(%rdi), %rax
cmpq $0x0, 0x28(%rax)
je 0x217f3
movq 0x8(%rax), %r15
movq 0x10(%r15), %rdi
testq %rdi, %rdi
je 0x2182e
movzbl -0x1(%rdi), %eax
movl %eax, %ecx
andl $0x7, %ecx
cmpl $0x4, %ecx
ja 0x2184e
leaq 0x33188(%rip), %rdx     # 0x5496c
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
shrl $0x3, %eax
jmp 0x21850
retq
movq 0x8(%r14), %rdi
callq 0x1dbd5
movq %rax, %r14
movq 0x58(%rbx), %rdi
movq %rax, %rsi
callq 0x165ab
movzbl -0x1(%r14), %eax
movl %eax, %ecx
andl $0x7, %ecx
cmpl $0x4, %ecx
ja 0x21908
leaq 0x33197(%rip), %rdx     # 0x549bc
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq 0x8(%r14), %rsi
jmp 0x218cd
movq -0x11(%rdi), %rax
jmp 0x21850
movzwl -0x5(%rdi), %eax
jmp 0x21850
movl -0x9(%rdi), %eax
jmp 0x21850
movzbl -0x3(%rdi), %eax
jmp 0x21850
xorl %eax, %eax
movq 0x8(%r14), %rsi
movzbl -0x1(%rsi), %ecx
movl %ecx, %edx
andl $0x7, %edx
cmpl $0x4, %edx
ja 0x2188e
leaq 0x33117(%rip), %r8      # 0x54980
movslq (%r8,%rdx,4), %rdx
addq %r8, %rdx
jmpq *%rdx
shrl $0x3, %ecx
jmp 0x21890
movq -0x11(%rsi), %rcx
jmp 0x21890
movzwl -0x5(%rsi), %ecx
jmp 0x21890
movl -0x9(%rsi), %ecx
jmp 0x21890
movzbl -0x3(%rsi), %ecx
jmp 0x21890
xorl %ecx, %ecx
addq %rax, %rcx
cmpq $0x4000, %rcx           # imm = 0x4000
ja 0x218cd
callq 0x1e4bc
movq %rax, 0x10(%r15)
movq 0x8(%r14), %rcx
movzbl -0x1(%rcx), %eax
movl %eax, %edx
andl $0x7, %edx
cmpl $0x4, %edx
ja 0x21908
leaq 0x330d6(%rip), %rsi     # 0x54994
movslq (%rsi,%rdx,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
movzbl -0x3(%rcx), %eax
jmp 0x21924
movq %rsi, %rdi
callq 0x1dbd5
movq %rax, %r14
movq 0x58(%rbx), %rdi
movq %rax, %rsi
callq 0x165ab
movzbl -0x1(%r14), %eax
movl %eax, %ecx
andl $0x7, %ecx
cmpl $0x4, %ecx
ja 0x21908
leaq 0x330ae(%rip), %rdx     # 0x549a8
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
shrl $0x3, %eax
jmp 0x21924
xorl %eax, %eax
jmp 0x21924
movq -0x11(%r14), %rax
jmp 0x21924
movzwl -0x5(%r14), %eax
jmp 0x21924
movl -0x9(%r14), %eax
jmp 0x21924
movzbl -0x3(%r14), %eax
addq %rax, 0x60(%rbx)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x21946
movq -0x11(%rcx), %rax
jmp 0x21924
movzwl -0x5(%rcx), %eax
jmp 0x21924
movl -0x9(%rcx), %eax
jmp 0x21924