// File: /workspace/github_c_makefile_star2_O3/erikdubbelboer[P]discnt/src/networking.c
// Function: processInputBuffer
void processInputBuffer(client *c) {
    server.current_client = c;
    /* Keep processing while there is something in the input buffer */
    while(sdslen(c->querybuf)) {
        /* Return if clients are paused. */
        if (!(c->flags & CLIENT_MONITOR) && clientsArePaused()) break;

        /* Immediately abort if the client is in the middle of something. */
        if (c->flags & CLIENT_BLOCKED) break;

        /* CLIENT_CLOSE_AFTER_REPLY closes the connection once the reply is
         * written to the client. Make sure to not let the reply grow after
         * this flag has been set (i.e. don't process more commands). */
        if (c->flags & CLIENT_CLOSE_AFTER_REPLY) break;

        /* Determine request type when unknown. */
        if (!c->reqtype) {
            if (c->querybuf[0] == '*') {
                c->reqtype = PROTO_REQ_MULTIBULK;
            } else {
                c->reqtype = PROTO_REQ_INLINE;
            }
        }

        if (c->reqtype == PROTO_REQ_INLINE) {
            if (processInlineBuffer(c) != C_OK) break;
        } else if (c->reqtype == PROTO_REQ_MULTIBULK) {
            if (processMultibulkBuffer(c) != C_OK) break;
        } else {
            serverPanic("Unknown request type");
        }

        /* Multibulk processing could see a <= 0 length. */
        if (c->argc == 0) {
            resetClient(c);
        } else {
            /* Only reset the client when the command was executed. */
            if (processCommand(c) == C_OK)
                resetClient(c);
        }
    }
    server.current_client = NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x4b77d(%rip), %r14     # 0x6f088
movq %rdi, 0x200(%r14)
leaq 0x3126f(%rip), %r15     # 0x54b88
movq 0x18(%rbx), %rcx
movzbl -0x1(%rcx), %eax
movl %eax, %edx
andl $0x7, %edx
cmpl $0x4, %edx
ja 0x23a1e
movslq (%r15,%rdx,4), %rdx
addq %r15, %rdx
jmpq *%rdx
shrl $0x3, %eax
jmp 0x23952
movq -0x11(%rcx), %rax
jmp 0x23952
movzwl -0x5(%rcx), %eax
jmp 0x23952
movl -0x9(%rcx), %eax
jmp 0x23952
movzbl -0x3(%rcx), %eax
testq %rax, %rax
je 0x23a1e
movl 0x88(%rbx), %eax
testb $0x4, %al
jne 0x23978
callq 0x23a51
testl %eax, %eax
jne 0x23a1e
movl 0x88(%rbx), %eax
testb $0x50, %al
jne 0x23a1e
movl 0x48(%rbx), %eax
cmpl $0x2, %eax
je 0x239a5
cmpl $0x1, %eax
je 0x239b6
testl %eax, %eax
jne 0x23a2f
movq 0x18(%rbx), %rax
cmpb $0x2a, (%rax)
jne 0x239af
movl $0x2, 0x48(%rbx)
movq %rbx, %rdi
callq 0x2339e
jmp 0x239be
movl $0x1, 0x48(%rbx)
movq %rbx, %rdi
callq 0x2316e
testl %eax, %eax
jne 0x23a1e
cmpl $0x0, 0x28(%rbx)
je 0x239d8
movq %rbx, %rdi
callq 0x1bf48
testl %eax, %eax
jne 0x23919
movq %rbx, %rdi
callq 0x22d46
movq $0x0, 0x48(%rbx)
movq $-0x1, 0x50(%rbx)
movl 0x88(%rbx), %eax
movl %eax, %ecx
andl $0xff7fffff, %ecx       # imm = 0xFF7FFFFF
movl %eax, %edx
andl $0xff3fffff, %edx       # imm = 0xFF3FFFFF
orl $0x800000, %edx         # imm = 0x800000
btl $0x16, %eax
cmovael %ecx, %edx
movl %edx, 0x88(%rbx)
jmp 0x23919
movq $0x0, 0x200(%r14)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x31413(%rip), %rdi     # 0x54e49
leaq 0x311e9(%rip), %rsi     # 0x54c26
movl $0x462, %edx            # imm = 0x462
callq 0x2a81d
movl $0x1, %edi
callq 0x12120