// File: /workspace/github_c_makefile_star2_O1/andyfighting[P]hiredis_timer_cmpt/async.c
// Function: redisProcessCallbacks
void redisProcessCallbacks(redisAsyncContext *ac) {
    redisContext *c = &(ac->c);
    redisCallback cb = {NULL, NULL, NULL};
    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
                && ac->replies.head == NULL) {
                __redisAsyncDisconnect(ac);
                return;
            }

            /* If monitor mode, repush callback */
            if(c->flags & REDIS_MONITORING) {
                __redisPushCallback(&ac->replies,&cb);
            }

            /* 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 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.
             *
             * Another possibility is that the server is loading its dataset.
             * In this case we also want to close the connection, and have the
             * user wait until the server is ready to take our request.
             */
            if (((redisReply*)reply)->type == REDIS_REPLY_ERROR) {
                c->err = REDIS_ERR_OTHER;
                snprintf(c->errstr,sizeof(c->errstr),"%s",((redisReply*)reply)->str);
                c->reader->fn->freeObject(reply);
                __redisAsyncDisconnect(ac);
                return;
            }
            /* No more regular callbacks and no errors, the context *must* be subscribed or monitoring. */
            assert((c->flags & REDIS_SUBSCRIBED || c->flags & REDIS_MONITORING));
            if(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 $0x38, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
xorl %eax, %eax
movq %rax, 0x20(%rsp)
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
callq 0x34e0
testl %eax, %eax
je 0x76b0
movq %rbx, %rdi
callq 0x75d2
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8(%rsp), %r12
cmpq $0x0, 0x8(%rsp)
je 0x7996
movq 0x128(%rbx), %r14
testq %r14, %r14
je 0x770e
movq (%r14), %rax
movq %rax, 0x128(%rbx)
cmpq 0x130(%rbx), %r14
jne 0x76eb
movq $0x0, 0x130(%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x20(%rsp)
movups (%r14), %xmm0
movaps %xmm0, 0x10(%rsp)
movq %r14, %rdi
callq 0x3050
testq %r14, %r14
jne 0x7920
movq 0x8(%rsp), %r15
movl (%r15), %eax
cmpl $0x6, %eax
je 0x79e9
movl 0x88(%rbx), %ecx
testb $0x60, %cl
je 0x7a25
testb $0x20, %cl
je 0x7920
cmpl $0x2, %eax
jne 0x7852
cmpq $0x1, 0x20(%r15)
jbe 0x7a44
movq 0x28(%r15), %r12
movq (%r12), %rax
cmpl $0x1, (%rax)
jne 0x7a63
movq 0x18(%rax), %r14
callq 0x3510
movq (%rax), %rax
movsbq (%r14), %rcx
movl (%rax,%rcx,4), %ebp
xorl %eax, %eax
cmpl $0x70, %ebp
sete %dl
movq 0x8(%r12), %rcx
cmpl $0x1, (%rcx)
jne 0x7a82
movb %dl, %al
movq 0x148(%rbx,%rax,8), %r13
movq 0x18(%rcx), %rdi
movslq 0x10(%rcx), %rsi
callq 0x32c0
movq %rax, %r12
movq %r13, %rdi
movq %rax, %rsi
callq 0x80d2
testq %rax, %rax
je 0x7913
xorl %ecx, %ecx
cmpl $0x70, %ebp
sete %cl
movq 0x8(%rax), %rax
movq 0x10(%rax), %rdx
movq %rdx, 0x20(%rsp)
movups (%rax), %xmm0
movaps %xmm0, 0x10(%rsp)
addq %rcx, %r14
movq %r14, %rdi
leaq 0x1ed3(%rip), %rsi      # 0x96b0
callq 0x3060
testl %eax, %eax
jne 0x7913
cmpq $0x0, 0x10(%r13)
je 0x78f4
movq 0x8(%r13), %rax
movq %r12, %rdi
callq *(%rax)
andl 0x18(%r13), %eax
movq (%r13), %rcx
movq %rax, 0x30(%rsp)
movq (%rcx,%rax,8), %rax
testq %rax, %rax
je 0x78f4
xorl %ebp, %ebp
movq %rax, %r14
movq 0x8(%r13), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x783c
movq 0x28(%r13), %rdi
movq (%r14), %rdx
movq %r12, %rsi
callq *%rax
testl %eax, %eax
je 0x7841
jmp 0x789b
cmpq %r12, (%r14)
je 0x789b
movq 0x10(%r14), %rax
movq %r14, %rbp
testq %rax, %rax
jne 0x781a
jmp 0x78f4
movq 0x138(%rbx), %rdi
testq %rdi, %rdi
je 0x7920
movq (%rdi), %rax
movq %rax, 0x138(%rbx)
cmpq 0x140(%rbx), %rdi
jne 0x7880
movq $0x0, 0x140(%rbx)
movq 0x10(%rdi), %rax
movq %rax, 0x20(%rsp)
movups (%rdi), %xmm0
movaps %xmm0, 0x10(%rsp)
callq 0x3050
jmp 0x7920
testq %rbp, %rbp
je 0x78a6
addq $0x10, %rbp
jmp 0x78b3
movq 0x30(%rsp), %rbp
shlq $0x3, %rbp
addq (%r13), %rbp
movq 0x10(%r14), %rax
movq %rax, (%rbp)
movq 0x8(%r13), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0x78d1
movq 0x28(%r13), %rdi
movq (%r14), %rsi
callq *%rax
movq 0x8(%r13), %rax
movq 0x28(%rax), %rax
testq %rax, %rax
je 0x78e8
movq 0x28(%r13), %rdi
movq 0x8(%r14), %rsi
callq *%rax
movq %r14, %rdi
callq 0x3050
decq 0x20(%r13)
movq 0x28(%r15), %rax
movq 0x10(%rax), %rax
cmpl $0x3, (%rax)
jne 0x7aa1
cmpq $0x0, 0x8(%rax)
jne 0x7913
andb $-0x21, 0x88(%rbx)
movq %r12, %rdi
callq 0x3280
leaq 0x8(%rsp), %r12
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x7968
movq 0x8(%rsp), %rsi
orl $0x10, 0x88(%rbx)
movq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq *%rax
andb $-0x11, 0x88(%rbx)
movq 0x98(%rbx), %rax
movq 0x220(%rax), %rax
movq 0x8(%rsp), %rdi
callq *0x20(%rax)
testb $0x8, 0x88(%rbx)
je 0x797e
jmp 0x79dc
movq 0x98(%rbx), %rax
movq 0x220(%rax), %rax
movq 0x8(%rsp), %rdi
callq *0x20(%rax)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x34e0
testl %eax, %eax
je 0x76b5
jmp 0x7699
movl 0x88(%rbx), %eax
testb $0x4, %al
je 0x79bb
movq 0x90(%rbx), %rcx
cmpl $0x0, -0x8(%rcx)
jne 0x79bb
cmpq $0x0, 0x128(%rbx)
je 0x7699
testb $0x40, %al
je 0x76a1
addq $0x128, %rbx            # imm = 0x128
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x7ac0
jmp 0x76a1
movq %rbx, %rdi
callq 0x73b4
jmp 0x76a1
movl $0x2, (%rbx)
leaq 0x4(%rbx), %rdi
movq 0x18(%r15), %rcx
leaq 0x165f(%rip), %rdx      # 0x905d
movl $0x80, %esi
xorl %eax, %eax
callq 0x3180
movq 0x98(%rbx), %rax
movq 0x220(%rax), %rax
movq 0x8(%rsp), %rdi
callq *0x20(%rax)
jmp 0x7699
leaq 0x1ae4(%rip), %rdi      # 0x9510
leaq 0x1b1a(%rip), %rsi      # 0x954d
leaq 0x1b1b(%rip), %rcx      # 0x9555
movl $0x1cf, %edx            # imm = 0x1CF
callq 0x31b0
leaq 0x1ba0(%rip), %rdi      # 0x95eb
leaq 0x1afb(%rip), %rsi      # 0x954d
leaq 0x1ba7(%rip), %rcx      # 0x9600
movl $0x177, %edx            # imm = 0x177
callq 0x31b0
leaq 0x1bea(%rip), %rdi      # 0x9654
leaq 0x1adc(%rip), %rsi      # 0x954d
leaq 0x1b88(%rip), %rcx      # 0x9600
movl $0x178, %edx            # imm = 0x178
callq 0x31b0
leaq 0x1bf9(%rip), %rdi      # 0x9682
leaq 0x1abd(%rip), %rsi      # 0x954d
leaq 0x1b69(%rip), %rcx      # 0x9600
movl $0x182, %edx            # imm = 0x182
callq 0x31b0
leaq 0x1c14(%rip), %rdi      # 0x96bc
leaq 0x1a9e(%rip), %rsi      # 0x954d
leaq 0x1b4a(%rip), %rcx      # 0x9600
movl $0x18e, %edx            # imm = 0x18E
callq 0x31b0