// File: /workspace/github_c_makefile_star2_O2/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 $0x48, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r12
andq $0x0, 0x10(%r12)
leaq 0x8(%rsp), %r13
andq $0x0, (%r13)
movaps %xmm0, (%r12)
leaq 0x128(%rdi), %r14
leaq 0x138(%rdi), %rax
movq %rax, 0x40(%rsp)
movq %r14, 0x38(%rsp)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x34f0
testl %eax, %eax
jne 0x6c0e
cmpq $0x0, 0x8(%rsp)
je 0x6ba7
movq %r14, %rdi
movq %r12, %rsi
callq 0x6d1a
testl %eax, %eax
je 0x6b4c
movq 0x8(%rsp), %r15
movl (%r15), %eax
cmpl $0x6, %eax
je 0x6bd7
movl 0x88(%rbx), %ecx
testb $0x60, %cl
je 0x6c2f
testb $0x20, %cl
je 0x6b4c
cmpl $0x2, %eax
jne 0x6aad
cmpq $0x1, 0x20(%r15)
jbe 0x6c4e
movq 0x28(%r15), %r13
movq (%r13), %rax
cmpl $0x1, (%rax)
jne 0x6c6d
movq 0x18(%rax), %r12
callq 0x3530
movq (%rax), %rax
movsbq (%r12), %rcx
movl (%rax,%rcx,4), %r14d
xorl %eax, %eax
cmpl $0x70, %r14d
sete %dl
movq 0x8(%r13), %rcx
cmpl $0x1, (%rcx)
jne 0x6c8c
movb %dl, %al
movq 0x148(%rbx,%rax,8), %r13
movq 0x18(%rcx), %rdi
movslq 0x10(%rcx), %rsi
callq 0x32d0
movq %rax, %rbp
movq %r13, %rdi
movq %rax, %rsi
callq 0x732f
testq %rax, %rax
je 0x6b35
xorl %ecx, %ecx
cmpl $0x70, %r14d
sete %cl
movq 0x8(%rax), %rax
movq 0x10(%rax), %rdx
movq %rdx, 0x20(%rsp)
movups (%rax), %xmm0
movaps %xmm0, 0x10(%rsp)
addq %rcx, %r12
movq %r12, %rdi
leaq 0x2c7e(%rip), %rsi      # 0x96b7
callq 0x3060
testl %eax, %eax
jne 0x6b35
cmpq $0x0, 0x10(%r13)
je 0x6b16
movq 0x8(%r13), %rax
movq %rbp, %rdi
callq *(%rax)
andl 0x18(%r13), %eax
shlq $0x3, %rax
movq (%r13), %rcx
movq %rax, 0x30(%rsp)
addq %rax, %rcx
xorl %r14d, %r14d
movq (%rcx), %r12
testq %r12, %r12
je 0x6b16
movq 0x8(%r13), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x6a9d
movq 0x28(%r13), %rdi
movq (%r12), %rdx
movq %rbp, %rsi
callq *%rax
testl %eax, %eax
je 0x6aa3
jmp 0x6abf
cmpq %rbp, (%r12)
je 0x6abf
leaq 0x10(%r12), %rcx
movq %r12, %r14
jmp 0x6a71
movq 0x40(%rsp), %rdi
movq %r12, %rsi
callq 0x6d1a
jmp 0x6b4c
testq %r14, %r14
je 0x6aca
addq $0x10, %r14
jmp 0x6ad3
movq 0x30(%rsp), %r14
addq (%r13), %r14
movq 0x10(%r12), %rax
movq %rax, (%r14)
movq 0x8(%r13), %rcx
movq 0x20(%rcx), %rax
testq %rax, %rax
je 0x6af6
movq 0x28(%r13), %rdi
movq (%r12), %rsi
callq *%rax
movq 0x8(%r13), %rcx
movq 0x28(%rcx), %rax
testq %rax, %rax
je 0x6b0a
movq 0x28(%r13), %rdi
movq 0x8(%r12), %rsi
callq *%rax
movq %r12, %rdi
callq 0x3050
decq 0x20(%r13)
movq 0x28(%r15), %rax
movq 0x10(%rax), %rax
cmpl $0x3, (%rax)
jne 0x6cab
cmpq $0x0, 0x8(%rax)
jne 0x6b35
andb $-0x21, 0x88(%rbx)
movq %rbp, %rdi
callq 0x3290
movq 0x38(%rsp), %r14
leaq 0x10(%rsp), %r12
leaq 0x8(%rsp), %r13
cmpq $0x0, 0x18(%rsp)
je 0x6b8c
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x6d5a
movq 0x98(%rbx), %rax
movq 0x220(%rax), %rax
movq 0x8(%rsp), %rdi
callq *0x20(%rax)
testb $0x8, 0x88(%rbx)
je 0x6935
jmp 0x6c18
movq 0x98(%rbx), %rax
movq 0x220(%rax), %rax
movq 0x8(%rsp), %rdi
callq *0x20(%rax)
jmp 0x6935
movl 0x88(%rbx), %eax
testb $0x4, %al
je 0x6bc4
movq 0x90(%rbx), %rcx
cmpl $0x0, -0x8(%rcx)
jne 0x6bc4
cmpq $0x0, (%r14)
je 0x6c0e
testb $0x40, %al
je 0x6c20
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x6cca
jmp 0x6c20
movl $0x2, (%rbx)
leaq 0x4(%rbx), %rdi
movq 0x18(%r15), %rcx
leaq 0x2471(%rip), %rdx      # 0x905d
movl $0x80, %esi
xorl %eax, %eax
callq 0x3190
movq 0x98(%rbx), %rax
movq 0x220(%rax), %rax
movq 0x8(%rsp), %rdi
callq *0x20(%rax)
movq %rbx, %rdi
callq 0x6882
jmp 0x6c20
movq %rbx, %rdi
callq 0x672e
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x28e1(%rip), %rdi      # 0x9517
leaq 0x2917(%rip), %rsi      # 0x9554
leaq 0x2918(%rip), %rcx      # 0x955c
movl $0x1cf, %edx            # imm = 0x1CF
callq 0x31c0
leaq 0x299d(%rip), %rdi      # 0x95f2
leaq 0x28f8(%rip), %rsi      # 0x9554
leaq 0x29a4(%rip), %rcx      # 0x9607
movl $0x177, %edx            # imm = 0x177
callq 0x31c0
leaq 0x29e7(%rip), %rdi      # 0x965b
leaq 0x28d9(%rip), %rsi      # 0x9554
leaq 0x2985(%rip), %rcx      # 0x9607
movl $0x178, %edx            # imm = 0x178
callq 0x31c0
leaq 0x29f6(%rip), %rdi      # 0x9689
leaq 0x28ba(%rip), %rsi      # 0x9554
leaq 0x2966(%rip), %rcx      # 0x9607
movl $0x182, %edx            # imm = 0x182
callq 0x31c0
leaq 0x2a11(%rip), %rdi      # 0x96c3
leaq 0x289b(%rip), %rsi      # 0x9554
leaq 0x2947(%rip), %rcx      # 0x9607
movl $0x18e, %edx            # imm = 0x18E
callq 0x31c0