// File: /workspace/github_c_makefile_star2_O1/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 0x4b445(%rip), %r14     # 0x6f088
movq %rdi, 0x200(%r14)
leaq 0x30f23(%rip), %r15     # 0x54b74
movq 0x18(%rbx), %rcx
movzbl -0x1(%rcx), %eax
movl %eax, %edx
andl $0x7, %edx
cmpl $0x4, %edx
ja 0x23c88
movslq (%r15,%rdx,4), %rdx
addq %r15, %rdx
jmpq *%rdx
shrl $0x3, %eax
jmp 0x23c8a
movq -0x11(%rcx), %rax
jmp 0x23c8a
movzwl -0x5(%rcx), %eax
jmp 0x23c8a
movl -0x9(%rcx), %eax
jmp 0x23c8a
movzbl -0x3(%rcx), %eax
jmp 0x23c8a
xorl %eax, %eax
testq %rax, %rax
je 0x23d50
testb $0x4, 0x88(%rbx)
jne 0x23ca9
callq 0x23d83
testl %eax, %eax
jne 0x23d50
testb $0x50, 0x88(%rbx)
jne 0x23d50
cmpl $0x0, 0x48(%rbx)
jne 0x23ccd
movq 0x18(%rbx), %rax
xorl %ecx, %ecx
cmpb $0x2a, (%rax)
sete %cl
incl %ecx
movl %ecx, 0x48(%rbx)
movl 0x48(%rbx), %eax
cmpl $0x2, %eax
je 0x23ce8
cmpl $0x1, %eax
jne 0x23d61
movq %rbx, %rdi
callq 0x2346c
jmp 0x23cf0
movq %rbx, %rdi
callq 0x236b4
testl %eax, %eax
jne 0x23d50
cmpl $0x0, 0x28(%rbx)
je 0x23d0a
movq %rbx, %rdi
callq 0x1c289
testl %eax, %eax
jne 0x23c51
movq %rbx, %rdi
callq 0x2303c
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 0x23c51
movq $0x0, 0x200(%r14)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x310cd(%rip), %rdi     # 0x54e35
leaq 0x30ea3(%rip), %rsi     # 0x54c12
movl $0x462, %edx            # imm = 0x462
callq 0x2ade4
movl $0x1, %edi
callq 0x12120