// File: /workspace/github_c_makefile_star2_O1/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 0x21af8
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x58(%rdi), %rax
cmpq $0x0, 0x28(%rax)
je 0x21af9
movq 0x8(%rax), %r15
movq 0x10(%r15), %rdi
testq %rdi, %rdi
je 0x21bca
movzbl -0x1(%rdi), %eax
movl %eax, %ecx
andl $0x7, %ecx
cmpl $0x4, %ecx
ja 0x21b4b
leaq 0x32e32(%rip), %rdx     # 0x5491c
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
shrl $0x3, %eax
jmp 0x21b4d
retq
movq 0x8(%r14), %rdi
callq 0x1de83
movq %rax, %r14
movq 0x58(%rbx), %rdi
movq %rax, %rsi
callq 0x16aff
movzbl -0x1(%r14), %eax
movl %eax, %ecx
andl $0x7, %ecx
cmpl $0x4, %ecx
ja 0x21c06
leaq 0x32e41(%rip), %rdx     # 0x5496c
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq -0x11(%rdi), %rax
jmp 0x21b4d
movzwl -0x5(%rdi), %eax
jmp 0x21b4d
movl -0x9(%rdi), %eax
jmp 0x21b4d
movzbl -0x3(%rdi), %eax
jmp 0x21b4d
xorl %eax, %eax
movq 0x8(%r14), %rsi
movzbl -0x1(%rsi), %ecx
movl %ecx, %edx
andl $0x7, %edx
cmpl $0x4, %edx
ja 0x21b8b
leaq 0x32dca(%rip), %r8      # 0x54930
movslq (%r8,%rdx,4), %rdx
addq %r8, %rdx
jmpq *%rdx
shrl $0x3, %ecx
jmp 0x21b8d
movq -0x11(%rsi), %rcx
jmp 0x21b8d
movzwl -0x5(%rsi), %ecx
jmp 0x21b8d
movl -0x9(%rsi), %ecx
jmp 0x21b8d
movzbl -0x3(%rsi), %ecx
jmp 0x21b8d
xorl %ecx, %ecx
addq %rax, %rcx
cmpq $0x4000, %rcx           # imm = 0x4000
ja 0x21bca
callq 0x1e764
movq %rax, 0x10(%r15)
movq 0x8(%r14), %rcx
movzbl -0x1(%rcx), %eax
movl %eax, %edx
andl $0x7, %edx
cmpl $0x4, %edx
ja 0x21c06
leaq 0x32d89(%rip), %rsi     # 0x54944
movslq (%rsi,%rdx,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
movzbl -0x3(%rcx), %eax
jmp 0x21c22
movq 0x8(%r14), %rdi
callq 0x1de83
movq %rax, %r14
movq 0x58(%rbx), %rdi
movq %rax, %rsi
callq 0x16aff
movzbl -0x1(%r14), %eax
movl %eax, %ecx
andl $0x7, %ecx
cmpl $0x4, %ecx
ja 0x21c06
leaq 0x32d60(%rip), %rdx     # 0x54958
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
shrl $0x3, %eax
jmp 0x21c22
xorl %eax, %eax
jmp 0x21c22
movq -0x11(%r14), %rax
jmp 0x21c22
movzwl -0x5(%r14), %eax
jmp 0x21c22
movl -0x9(%r14), %eax
jmp 0x21c22
movzbl -0x3(%r14), %eax
addq %rax, 0x60(%rbx)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x21c44
movq -0x11(%rcx), %rax
jmp 0x21c22
movzwl -0x5(%rcx), %eax
jmp 0x21c22
movl -0x9(%rcx), %eax
jmp 0x21c22