// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
leaq 0x98da1(%rip), %rax     # 0xbf0e8
movq %rcx, 0x200(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x23ca0
cmpq $0x0, %rax
je 0x26477
movq -0x8(%rbp), %rax
movl 0x88(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0x26386
callq 0x26490
cmpl $0x0, %eax
je 0x26386
jmp 0x26477
movq -0x8(%rbp), %rax
movl 0x88(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x2639d
jmp 0x26477
movq -0x8(%rbp), %rax
movl 0x88(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x263b4
jmp 0x26477
movq -0x8(%rbp), %rax
cmpl $0x0, 0x48(%rax)
jne 0x263e8
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movsbl (%rax), %eax
cmpl $0x2a, %eax
jne 0x263db
movq -0x8(%rbp), %rax
movl $0x2, 0x48(%rax)
jmp 0x263e6
movq -0x8(%rbp), %rax
movl $0x1, 0x48(%rax)
jmp 0x263e8
movq -0x8(%rbp), %rax
cmpl $0x1, 0x48(%rax)
jne 0x26404
movq -0x8(%rbp), %rdi
callq 0x25a90
cmpl $0x0, %eax
je 0x26402
jmp 0x26477
jmp 0x26444
movq -0x8(%rbp), %rax
cmpl $0x2, 0x48(%rax)
jne 0x26420
movq -0x8(%rbp), %rdi
callq 0x25d20
cmpl $0x0, %eax
je 0x2641e
jmp 0x26477
jmp 0x26442
leaq 0x7f4f6(%rip), %rdi     # 0xa591d
leaq 0x7f2cc(%rip), %rsi     # 0xa56fa
movl $0x462, %edx            # imm = 0x462
callq 0x304a0
movl $0x1, %edi
callq 0x12100
jmp 0x26444
movq -0x8(%rbp), %rax
cmpl $0x0, 0x28(%rax)
jne 0x26459
movq -0x8(%rbp), %rdi
callq 0x259f0
jmp 0x26472
movq -0x8(%rbp), %rdi
callq 0x1ba30
cmpl $0x0, %eax
jne 0x26470
movq -0x8(%rbp), %rdi
callq 0x259f0
jmp 0x26472
jmp 0x2634e
leaq 0x98c6a(%rip), %rax     # 0xbf0e8
movq $0x0, 0x200(%rax)
addq $0x10, %rsp
popq %rbp
retq
nop