// File: /workspace/github_c_makefile_star2_O1/winton[P]redis_parse/hiredis/async.c
// Function: redisProcessCallbacks
void redisProcessCallbacks(redisAsyncContext *ac) {
    redisContext *c = &(ac->c);
    redisCallback cb;
    void *reply = NULL;
    int status;

    while((status = redisGetReply(c,&reply)) == REDIS_OK) {
        if (reply == NULL) {
            /* When the connection is being disconnected and there are
             * no more replies, this is the cue to really disconnect. */
            if (c->flags & REDIS_DISCONNECTING && sdslen(c->obuf) == 0) {
                __redisAsyncDisconnect(ac);
                return;
            }

            /* When the connection is not being disconnected, simply stop
             * trying to get replies and wait for the next loop tick. */
            break;
        }

        /* Even if the context is subscribed, pending regular callbacks will
         * get a reply before pub/sub messages arrive. */
        if (__redisShiftCallback(&ac->replies,&cb) != REDIS_OK) {
            /* A spontaneous reply in a not-subscribed context can only be the
             * error reply that is sent when a new connection exceeds the
             * maximum number of allowed connections on the server side. This
             * is seen as an error instead of a regular reply because the
             * server closes the connection after sending it. To prevent the
             * error from being overwritten by an EOF error the connection is
             * closed here. See issue #43. */
            if ( !(c->flags & REDIS_SUBSCRIBED) && ((redisReply*)reply)->type == REDIS_REPLY_ERROR ) {
                c->err = REDIS_ERR_OTHER;
                snprintf(c->errstr,sizeof(c->errstr),"%s",((redisReply*)reply)->str);
                __redisAsyncDisconnect(ac);
                return;
            }
            /* No more regular callbacks and no errors, the context *must* be subscribed. */
            assert(c->flags & REDIS_SUBSCRIBED);
            __redisGetSubscribeCallback(ac,reply,&cb);
        }

        if (cb.fn != NULL) {
            __redisRunCallback(ac,&cb,reply);
            c->reader->fn->freeObject(reply);

            /* Proceed with free'ing when redisAsyncFree() was called. */
            if (c->flags & REDIS_FREEING) {
                __redisAsyncFree(ac);
                return;
            }
        } else {
            /* No callback for this reply. This can either be a NULL callback,
             * or there were no callbacks to begin with. Either way, don't
             * abort with an error, but simply ignore it because the client
             * doesn't know what the server will spit out over the wire. */
            c->reader->fn->freeObject(reply);
        }
    }

    /* Disconnect when there was an error reading the reply */
    if (status != REDIS_OK)
        __redisAsyncDisconnect(ac);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rsi
movq $0x0, (%rsi)
callq 0x2440
testl %eax, %eax
je 0x5ae0
movq %rbx, %rdi
callq 0x5a17
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8(%rsp), %r13
cmpq $0x0, 0x8(%rsp)
je 0x5dc5
movq 0xf8(%rbx), %r14
testq %r14, %r14
je 0x5b2b
movq (%r14), %rax
movq %rax, 0xf8(%rbx)
cmpq 0x100(%rbx), %r14
jne 0x5b1b
movq $0x0, 0x100(%rbx)
movq 0x8(%r14), %r15
movq 0x10(%r14), %rbp
movq %r14, %rdi
callq 0x2060
testq %r14, %r14
jne 0x5d55
movl 0x88(%rbx), %eax
testb $0x20, %al
jne 0x5b54
movq 0x8(%rsp), %rcx
cmpl $0x6, (%rcx)
je 0x5df5
testb $0x20, %al
je 0x5e78
movq 0x8(%rsp), %r12
cmpl $0x2, (%r12)
jne 0x5c88
movq %rbp, 0x18(%rsp)
cmpq $0x1, 0x20(%r12)
jbe 0x5e1b
movq 0x28(%r12), %rbp
movq (%rbp), %rax
cmpl $0x1, (%rax)
jne 0x5e3a
movq 0x18(%rax), %r14
callq 0x2460
movq (%rax), %rax
movsbq (%r14), %rcx
movl (%rax,%rcx,4), %r13d
xorl %eax, %eax
cmpl $0x70, %r13d
sete %dl
movq 0x8(%rbp), %rcx
cmpl $0x1, (%rcx)
jne 0x5e59
movb %dl, %al
movq 0x118(%rbx,%rax,8), %rbp
movq 0x18(%rcx), %rdi
movslq 0x10(%rcx), %rsi
callq 0x22a0
movq %rbp, %rdi
movq %rax, 0x10(%rsp)
movq %rax, %rsi
callq 0x642e
testq %rax, %rax
je 0x5d41
xorl %ecx, %ecx
cmpl $0x70, %r13d
sete %cl
movq 0x8(%rax), %rax
movq 0x8(%rax), %r15
movq 0x10(%rax), %rax
movq %rax, 0x18(%rsp)
addq %rcx, %r14
movq %r14, %rdi
leaq 0x1abf(%rip), %rsi      # 0x76c7
callq 0x2070
testl %eax, %eax
jne 0x5d41
cmpq $0x0, 0x10(%rbp)
je 0x5d21
movq 0x8(%rbp), %rax
movq 0x10(%rsp), %rdi
callq *(%rax)
andl 0x18(%rbp), %eax
movq (%rbp), %rcx
movq %rax, 0x20(%rsp)
movq (%rcx,%rax,8), %rax
testq %rax, %rax
je 0x5d21
xorl %r14d, %r14d
movq %rax, %r13
movq 0x8(%rbp), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x5c6c
movq 0x28(%rbp), %rdi
movq (%r13), %rdx
movq 0x10(%rsp), %rsi
callq *%rax
testl %eax, %eax
je 0x5c77
jmp 0x5cc8
movq 0x10(%rsp), %rax
cmpq %rax, (%r13)
je 0x5cc8
movq 0x10(%r13), %rax
movq %r13, %r14
testq %rax, %rax
jne 0x5c47
jmp 0x5d21
movq 0x108(%rbx), %rdi
testq %rdi, %rdi
je 0x5d55
movq (%rdi), %rax
movq %rax, 0x108(%rbx)
cmpq 0x110(%rbx), %rdi
jne 0x5cb6
movq $0x0, 0x110(%rbx)
movq 0x8(%rdi), %r15
movq 0x10(%rdi), %rbp
callq 0x2060
jmp 0x5d55
testq %r14, %r14
je 0x5cd3
addq $0x10, %r14
jmp 0x5ce0
movq 0x20(%rsp), %r14
shlq $0x3, %r14
addq (%rbp), %r14
movq 0x10(%r13), %rax
movq %rax, (%r14)
movq 0x8(%rbp), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0x5cfe
movq 0x28(%rbp), %rdi
movq (%r13), %rsi
callq *%rax
movq 0x8(%rbp), %rax
movq 0x28(%rax), %rax
testq %rax, %rax
je 0x5d15
movq 0x28(%rbp), %rdi
movq 0x8(%r13), %rsi
callq *%rax
movq %r13, %rdi
callq 0x2060
decq 0x20(%rbp)
movq 0x28(%r12), %rax
movq 0x10(%rax), %rax
cmpl $0x3, (%rax)
jne 0x5e97
cmpq $0x0, 0x8(%rax)
jne 0x5d41
andb $-0x21, 0x88(%rbx)
movq 0x10(%rsp), %rdi
callq 0x2260
leaq 0x8(%rsp), %r13
movq 0x18(%rsp), %rbp
testq %r15, %r15
je 0x5d97
movq 0x8(%rsp), %rsi
orl $0x10, 0x88(%rbx)
movq %rbx, %rdi
movq %rbp, %rdx
callq *%r15
andb $-0x11, 0x88(%rbx)
movq 0x98(%rbx), %rax
movq 0x128(%rax), %rax
movq 0x8(%rsp), %rdi
callq *0x20(%rax)
testb $0x8, 0x88(%rbx)
je 0x5dad
jmp 0x5de8
movq 0x98(%rbx), %rax
movq 0x128(%rax), %rax
movq 0x8(%rsp), %rdi
callq *0x20(%rax)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x2440
testl %eax, %eax
je 0x5ae5
jmp 0x5ac9
testb $0x4, 0x88(%rbx)
je 0x5ad1
movq 0x90(%rbx), %rax
cmpl $0x0, -0x8(%rax)
jne 0x5ad1
jmp 0x5ac9
movq %rbx, %rdi
callq 0x57f9
jmp 0x5ad1
movl $0x2, (%rbx)
leaq 0x4(%rbx), %rdi
movq 0x18(%rcx), %rcx
leaq 0x1253(%rip), %rdx      # 0x705d
movl $0x80, %esi
xorl %eax, %eax
callq 0x2180
jmp 0x5ac9
leaq 0x17e0(%rip), %rdi      # 0x7602
leaq 0x1733(%rip), %rsi      # 0x755c
leaq 0x17e7(%rip), %rcx      # 0x7617
movl $0x145, %edx            # imm = 0x145
callq 0x21b0
leaq 0x182a(%rip), %rdi      # 0x766b
leaq 0x1714(%rip), %rsi      # 0x755c
leaq 0x17c8(%rip), %rcx      # 0x7617
movl $0x146, %edx            # imm = 0x146
callq 0x21b0
leaq 0x1839(%rip), %rdi      # 0x7699
leaq 0x16f5(%rip), %rsi      # 0x755c
leaq 0x17a9(%rip), %rcx      # 0x7617
movl $0x150, %edx            # imm = 0x150
callq 0x21b0
leaq 0x16c1(%rip), %rdi      # 0x7540
leaq 0x16d6(%rip), %rsi      # 0x755c
leaq 0x16df(%rip), %rcx      # 0x756c
movl $0x18e, %edx            # imm = 0x18E
callq 0x21b0
leaq 0x1835(%rip), %rdi      # 0x76d3
leaq 0x16b7(%rip), %rsi      # 0x755c
leaq 0x176b(%rip), %rcx      # 0x7617
movl $0x15c, %edx            # imm = 0x15C
callq 0x21b0