// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/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;
    }

    /* Newline from slaves can be used to refresh the last ACK time.
     * This is useful for a slave to ping back while loading a big
     * RDB file. */
    if (querylen == 0 && c->flags & CLIENT_SLAVE)
        c->repl_ack_time = server.unixtime;

    /* 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 redis 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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
movl $0xa, %esi
callq 0x267f0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x44b05
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x42810
cmpq $0x10000, %rax          # imm = 0x10000
jbe 0x44af9
movq -0x10(%rbp), %rdi
leaq 0xf605e(%rip), %rsi     # 0x13ab47
callq 0x42f90
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x44cd0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x44cbf
cmpq $0x0, -0x18(%rbp)
je 0x44b33
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x28(%rcx), %rax
je 0x44b33
movq -0x18(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0xd, %eax
jne 0x44b33
movq -0x18(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
subq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x38(%rbp), %rsi
callq 0x38230
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
callq 0x3a5f0
movq %rax, -0x28(%rbp)
movq -0x30(%rbp), %rdi
callq 0x38620
cmpq $0x0, -0x28(%rbp)
jne 0x44ba3
movq -0x10(%rbp), %rdi
leaq 0xf5fe7(%rip), %rsi     # 0x13ab6e
callq 0x42f90
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x44cd0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x44cbf
cmpq $0x0, -0x38(%rbp)
jne 0x44bd5
movq -0x10(%rbp), %rax
movl 0x98(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x44bd5
leaq 0x133615(%rip), %rax    # 0x1781d8
movq 0x978(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xd8(%rax)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x38(%rbp), %rax
addq $0x2, %rax
movl %eax, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x39db0
cmpl $0x0, -0x1c(%rbp)
je 0x44c27
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x44c0f
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x3afa0
movslq -0x1c(%rbp), %rdi
shlq $0x3, %rdi
callq 0x3acd0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x38(%rax)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x44caf
movq -0x28(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x42810
cmpq $0x0, %rax
je 0x44c91
movq -0x28(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
xorl %edi, %edi
callq 0x48480
movq %rax, %rdx
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x38(%rcx), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x38(%rax)
jmp 0x44ca2
movq -0x28(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x38620
jmp 0x44ca4
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x44c39
movq -0x28(%rbp), %rdi
callq 0x3afa0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)