// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/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_SLAVE) && 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).
         *
         * The same applies for clients we want to terminate ASAP. */
        if (c->flags & (CLIENT_CLOSE_AFTER_REPLY|CLIENT_CLOSE_ASAP)) 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);
            /* freeMemoryIfNeeded may flush slave output buffers. This may result
             * into a slave, that may be the active client, to be freed. */
            if (server.current_client == NULL) break;
        }
    }
    server.current_client = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
leaq 0x132e61(%rip), %rax    # 0x1781d8
movq %rcx, 0x1f0(%rax)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x42810
cmpq $0x0, %rax
je 0x454bf
movq -0x8(%rbp), %rax
movl 0x98(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x453b6
callq 0x454e0
cmpl $0x0, %eax
je 0x453b6
jmp 0x454bf
movq -0x8(%rbp), %rax
movl 0x98(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x453cd
jmp 0x454bf
movq -0x8(%rbp), %rax
movl 0x98(%rax), %eax
andl $0x440, %eax            # imm = 0x440
cmpl $0x0, %eax
je 0x453e6
jmp 0x454bf
movq -0x8(%rbp), %rax
cmpl $0x0, 0x58(%rax)
jne 0x4541a
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movsbl (%rax), %eax
cmpl $0x2a, %eax
jne 0x4540d
movq -0x8(%rbp), %rax
movl $0x2, 0x58(%rax)
jmp 0x45418
movq -0x8(%rbp), %rax
movl $0x1, 0x58(%rax)
jmp 0x4541a
movq -0x8(%rbp), %rax
cmpl $0x1, 0x58(%rax)
jne 0x45439
movq -0x8(%rbp), %rdi
callq 0x44aa0
cmpl $0x0, %eax
je 0x45437
jmp 0x454bf
jmp 0x45479
movq -0x8(%rbp), %rax
cmpl $0x2, 0x58(%rax)
jne 0x45455
movq -0x8(%rbp), %rdi
callq 0x44d60
cmpl $0x0, %eax
je 0x45453
jmp 0x454bf
jmp 0x45477
leaq 0xf583f(%rip), %rdi     # 0x13ac9b
leaq 0xf55d3(%rip), %rsi     # 0x13aa36
movl $0x50b, %edx            # imm = 0x50B
callq 0x76d80
movl $0x1, %edi
callq 0x263c0
jmp 0x45479
movq -0x8(%rbp), %rax
cmpl $0x0, 0x38(%rax)
jne 0x4548e
movq -0x8(%rbp), %rdi
callq 0x449a0
jmp 0x454ba
movq -0x8(%rbp), %rdi
callq 0x341c0
cmpl $0x0, %eax
jne 0x454a5
movq -0x8(%rbp), %rdi
callq 0x449a0
leaq 0x132d2c(%rip), %rax    # 0x1781d8
cmpq $0x0, 0x1f0(%rax)
jne 0x454b8
jmp 0x454bf
jmp 0x454ba
jmp 0x4537e
leaq 0x132d12(%rip), %rax    # 0x1781d8
movq $0x0, 0x1f0(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)