// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/networking.c
// Function: processInlineBuffer
int processInlineBuffer(client *c) {
    char *newline;
    int argc, j;
    sds *argv, aux;
    size_t querylen;

    /* Search for end of line */
    newline = strchr(c->querybuf,'\n');

    /* Nothing to do without a \r\n */
    if (newline == NULL) {
        if (sdslen(c->querybuf) > PROTO_INLINE_MAX_SIZE) {
            addReplyError(c,"Protocol error: too big inline request");
            setProtocolError(c,0);
        }
        return C_ERR;
    }

    /* Handle the \r\n case. */
    if (newline && newline != c->querybuf && *(newline-1) == '\r')
        newline--;

    /* Split the input buffer up to the \r\n */
    querylen = newline-(c->querybuf);
    aux = sdsnewlen(c->querybuf,querylen);
    argv = sdssplitargs(aux,&argc);
    sdsfree(aux);
    if (argv == NULL) {
        addReplyError(c,"Protocol error: unbalanced quotes in request");
        setProtocolError(c,0);
        return C_ERR;
    }

    /* Leave data after the first line of the query in the buffer */
    sdsrange(c->querybuf,querylen+2,-1);

    /* Setup argv array on client structure */
    if (argc) {
        if (c->argv) zfree(c->argv);
        c->argv = zmalloc(sizeof(robj*)*argc);
    }

    /* Create disque objects for all arguments. */
    for (c->argc = 0, j = 0; j < argc; j++) {
        if (sdslen(argv[j])) {
            c->argv[c->argc] = createObject(OBJ_STRING,argv[j]);
            c->argc++;
        } else {
            sdsfree(argv[j]);
        }
    }
    zfree(argv);
    return C_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x18(%rdi), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x122b0
testq %rax, %rax
je 0x232a8
movq %r14, %r15
cmpq %r14, %rax
je 0x231ab
leaq -0x1(%rax), %r15
cmpb $0xd, -0x1(%rax)
cmovneq %rax, %r15
subq %r14, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x1da70
movq %rax, %r12
leaq 0xc(%rsp), %rsi
movq %rax, %rdi
callq 0x1f703
movq %rax, %r14
movq %r12, %rdi
callq 0x1dc25
testq %r14, %r14
je 0x232c5
movq 0x18(%rbx), %rdi
addl $0x2, %r15d
movl %r15d, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1f0ab
movl 0xc(%rsp), %eax
testl %eax, %eax
je 0x232ea
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x23210
callq 0x1fd17
movl 0xc(%rsp), %eax
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x1fbbd
movq %rax, 0x30(%rbx)
cmpl $0x0, 0xc(%rsp)
movl $0x0, 0x28(%rbx)
jle 0x232f1
xorl %r15d, %r15d
leaq 0x318d4(%rip), %r12     # 0x54b10
movq (%r14,%r15,8), %rsi
movzbl -0x1(%rsi), %eax
movl %eax, %ecx
andl $0x7, %ecx
cmpl $0x4, %ecx
ja 0x23291
movslq (%r12,%rcx,4), %rcx
addq %r12, %rcx
jmpq *%rcx
shrl $0x3, %eax
jmp 0x23271
movq -0x11(%rsi), %rax
jmp 0x23271
movzwl -0x5(%rsi), %eax
jmp 0x23271
movl -0x9(%rsi), %eax
jmp 0x23271
movzbl -0x3(%rsi), %eax
testq %rax, %rax
je 0x23291
xorl %edi, %edi
callq 0x2564c
movq 0x30(%rbx), %rcx
movslq 0x28(%rbx), %rdx
movq %rax, (%rcx,%rdx,8)
leal 0x1(%rdx), %eax
movl %eax, 0x28(%rbx)
jmp 0x23299
movq %rsi, %rdi
callq 0x1dc25
incq %r15
movslq 0xc(%rsp), %rax
cmpq %rax, %r15
jl 0x2323c
jmp 0x232f1
movzbl -0x1(%r14), %eax
andl $0x7, %eax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $0x4, %eax
je 0x232fd
cmpl $0x3, %eax
jne 0x23327
movl -0x9(%r14), %eax
jmp 0x23301
leaq 0x31a50(%rip), %rsi     # 0x54d1c
movl $0x2c, %edx
movq %rbx, %rdi
callq 0x21fc6
movq %rbx, %rdi
xorl %esi, %esi
callq 0x23336
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x23327
movl $0x0, 0x28(%rbx)
movq %r14, %rdi
callq 0x1fd17
xorl %ebp, %ebp
jmp 0x23327
movq -0x11(%r14), %rax
cmpq $0x10001, %rax          # imm = 0x10001
jb 0x23327
leaq 0x319e5(%rip), %rsi     # 0x54cf5
movl $0x26, %edx
movq %rbx, %rdi
callq 0x21fc6
movq %rbx, %rdi
xorl %esi, %esi
callq 0x23336
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq