// File: /workspace/github_c_makefile_star2_O2/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
pushq $0xa
popq %rsi
movq %r14, %rdi
callq 0x122b0
testq %rax, %rax
je 0x1db45
movq %r14, %r15
cmpq %r14, %rax
je 0x1da7d
leaq -0x1(%rax), %r15
cmpb $0xd, -0x1(%rax)
cmovneq %rax, %r15
subq %r14, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x19398
movq %rax, %r12
leaq 0xc(%rsp), %rsi
movq %rax, %rdi
callq 0x1a708
movq %rax, %r14
movq %r12, %rdi
callq 0x19548
testq %r14, %r14
je 0x1db73
movq 0x18(%rbx), %rdi
addl $0x2, %r15d
pushq $-0x1
popq %rdx
movl %r15d, %esi
callq 0x1a20e
movl 0xc(%rsp), %eax
testl %eax, %eax
je 0x1daec
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x1dadc
callq 0x1ac81
movl 0xc(%rsp), %eax
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x1ab29
movq %rax, 0x30(%rbx)
andl $0x0, 0x28(%rbx)
xorl %r12d, %r12d
movslq 0xc(%rsp), %rax
cmpq %rax, %r12
jge 0x1db39
movq (%r14,%r12,8), %r15
movq %r15, %rdi
callq 0x1c6dd
testq %rax, %rax
je 0x1db2c
xorl %edi, %edi
movq %r15, %rsi
callq 0x1f928
movq 0x30(%rbx), %rcx
movslq 0x28(%rbx), %rdx
movq %rax, (%rcx,%rdx,8)
leal 0x1(%rdx), %eax
movl %eax, 0x28(%rbx)
jmp 0x1db34
movq %r15, %rdi
callq 0x19548
incq %r12
jmp 0x1daf3
movq %r14, %rdi
callq 0x1ac81
xorl %ebp, %ebp
jmp 0x1db8f
movq %r14, %rdi
callq 0x1c6dd
pushq $-0x1
popq %rbp
cmpq $0x10001, %rax          # imm = 0x10001
jb 0x1db8f
leaq 0x30b1a(%rip), %rsi     # 0x4e679
movq %rbx, %rdi
callq 0x1cacf
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1db9e
jmp 0x1db8f
leaq 0x30b26(%rip), %rsi     # 0x4e6a0
movq %rbx, %rdi
callq 0x1cacf
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1db9e
pushq $-0x1
popq %rbp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq