// File: /workspace/github_c_makefile_star2_O3/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)
movq %rsp, %rsi
movq %rax, (%rsi)
callq 0x34e0
testl %eax, %eax
je 0x74ab
movq %rbx, %rdi
callq 0x73de
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x128(%rbx), %r14
movq %rsp, %r15
movq (%rsp), %r12
testq %r12, %r12
je 0x7784
movq (%r14), %rdi
testq %rdi, %rdi
je 0x7503
movq (%rdi), %rax
movq %rax, 0x128(%rbx)
cmpq 0x130(%rbx), %rdi
jne 0x74e8
movq $0x0, 0x130(%rbx)
movq 0x10(%rdi), %rax
movq %rax, 0x20(%rsp)
movups (%rdi), %xmm0
movaps %xmm0, 0x10(%rsp)
callq 0x3050
jmp 0x7711
movl (%r12), %eax
cmpl $0x6, %eax
je 0x77cc
movl 0x88(%rbx), %ecx
testb $0x60, %cl
je 0x7808
testb $0x20, %cl
je 0x7711
cmpl $0x2, %eax
jne 0x7654
cmpq $0x1, 0x20(%r12)
jbe 0x7827
movq 0x28(%r12), %rbp
movq (%rbp), %rax
cmpl $0x1, (%rax)
jne 0x7846
movq 0x18(%rax), %r15
callq 0x3510
movq (%rax), %rax
movsbq (%r15), %rcx
movl (%rax,%rcx,4), %r13d
xorl %eax, %eax
cmpl $0x70, %r13d
sete %dl
movq 0x8(%rbp), %rcx
cmpl $0x1, (%rcx)
jne 0x7865
movb %dl, %al
movq 0x148(%rbx,%rax,8), %rbp
movq 0x18(%rcx), %rdi
movslq 0x10(%rcx), %rsi
callq 0x32c0
movq %rbp, %rdi
movq %rax, 0x8(%rsp)
movq %rax, %rsi
callq 0x7ea8
testq %rax, %rax
je 0x7704
xorl %ecx, %ecx
cmpl $0x70, %r13d
sete %cl
movq 0x8(%rax), %rax
movq 0x10(%rax), %rdx
movq %rdx, 0x20(%rsp)
movups (%rax), %xmm0
movaps %xmm0, 0x10(%rsp)
addq %rcx, %r15
movq %r15, %rdi
leaq 0x20ec(%rip), %rsi      # 0x96c0
callq 0x3060
testl %eax, %eax
jne 0x7704
cmpq $0x0, 0x10(%rbp)
je 0x76e4
movq 0x8(%rbp), %rax
movq 0x8(%rsp), %rdi
callq *(%rax)
andl 0x18(%rbp), %eax
movq (%rbp), %rcx
movq %rax, 0x30(%rsp)
movq (%rcx,%rax,8), %rax
testq %rax, %rax
je 0x76e4
xorl %r15d, %r15d
movq %rax, %r13
movq 0x8(%rbp), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x7638
movq 0x28(%rbp), %rdi
movq (%r13), %rdx
movq 0x8(%rsp), %rsi
callq *%rax
testl %eax, %eax
je 0x7643
jmp 0x768b
movq 0x8(%rsp), %rax
cmpq %rax, (%r13)
je 0x768b
movq 0x10(%r13), %rax
movq %r13, %r15
testq %rax, %rax
jne 0x7613
jmp 0x76e4
movq 0x138(%rbx), %rdi
testq %rdi, %rdi
je 0x7711
movq (%rdi), %rax
movq %rax, 0x138(%rbx)
cmpq 0x140(%rbx), %rdi
jne 0x74e8
movq $0x0, 0x140(%rbx)
jmp 0x74e8
testq %r15, %r15
je 0x7696
addq $0x10, %r15
jmp 0x76a3
movq 0x30(%rsp), %r15
shlq $0x3, %r15
addq (%rbp), %r15
movq 0x10(%r13), %rax
movq %rax, (%r15)
movq 0x8(%rbp), %rcx
movq 0x20(%rcx), %rax
testq %rax, %rax
je 0x76c5
movq 0x28(%rbp), %rdi
movq (%r13), %rsi
callq *%rax
movq 0x8(%rbp), %rcx
movq 0x28(%rcx), %rax
testq %rax, %rax
je 0x76d8
movq 0x28(%rbp), %rdi
movq 0x8(%r13), %rsi
callq *%rax
movq %r13, %rdi
callq 0x3050
decq 0x20(%rbp)
movq 0x28(%r12), %rax
movq 0x10(%rax), %rax
cmpl $0x3, (%rax)
jne 0x7884
cmpq $0x0, 0x8(%rax)
jne 0x7704
andb $-0x21, 0x88(%rbx)
movq 0x8(%rsp), %rdi
callq 0x3280
movq %rsp, %r15
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x7757
movq (%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 (%rsp), %rdi
callq *0x20(%rax)
testb $0x8, 0x88(%rbx)
je 0x776c
jmp 0x77bf
movq 0x98(%rbx), %rax
movq 0x220(%rax), %rax
movq (%rsp), %rdi
callq *0x20(%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x34e0
testl %eax, %eax
je 0x74b5
jmp 0x7494
movl 0x88(%rbx), %eax
testb $0x4, %al
je 0x77a5
movq 0x90(%rbx), %rcx
cmpl $0x0, -0x8(%rcx)
jne 0x77a5
cmpq $0x0, (%r14)
je 0x7494
testb $0x40, %al
je 0x749c
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x78a3
jmp 0x749c
movq %rbx, %rdi
callq 0x71b8
jmp 0x749c
movl $0x2, (%rbx)
leaq 0x4(%rbx), %rdi
movq 0x18(%r12), %rcx
leaq 0x187b(%rip), %rdx      # 0x905d
movl $0x80, %esi
xorl %eax, %eax
callq 0x3180
movq 0x98(%rbx), %rax
movq 0x220(%rax), %rax
movq (%rsp), %rdi
callq *0x20(%rax)
jmp 0x7494
leaq 0x1d11(%rip), %rdi      # 0x9520
leaq 0x1d47(%rip), %rsi      # 0x955d
leaq 0x1d48(%rip), %rcx      # 0x9565
movl $0x1cf, %edx            # imm = 0x1CF
callq 0x31b0
leaq 0x1dcd(%rip), %rdi      # 0x95fb
leaq 0x1d28(%rip), %rsi      # 0x955d
leaq 0x1dd4(%rip), %rcx      # 0x9610
movl $0x177, %edx            # imm = 0x177
callq 0x31b0
leaq 0x1e17(%rip), %rdi      # 0x9664
leaq 0x1d09(%rip), %rsi      # 0x955d
leaq 0x1db5(%rip), %rcx      # 0x9610
movl $0x178, %edx            # imm = 0x178
callq 0x31b0
leaq 0x1e26(%rip), %rdi      # 0x9692
leaq 0x1cea(%rip), %rsi      # 0x955d
leaq 0x1d96(%rip), %rcx      # 0x9610
movl $0x182, %edx            # imm = 0x182
callq 0x31b0
leaq 0x1e41(%rip), %rdi      # 0x96cc
leaq 0x1ccb(%rip), %rsi      # 0x955d
leaq 0x1d77(%rip), %rcx      # 0x9610
movl $0x18e, %edx            # imm = 0x18E
callq 0x31b0