// File: /workspace/github_c_makefile_star2_O0/andyfighting[P]hiredis_timer_cmpt/async.c
// Function: _redisAsyncFree
static void __redisAsyncFree(redisAsyncContext *ac) {
    redisContext *c = &(ac->c);
    redisCallback cb;
    dictIterator *it;
    dictEntry *de;

    /* Execute pending callbacks with NULL reply. */
    while (__redisShiftCallback(&ac->replies,&cb) == REDIS_OK)
        __redisRunCallback(ac,&cb,NULL);

    /* Execute callbacks for invalid commands */
    while (__redisShiftCallback(&ac->sub.invalid,&cb) == REDIS_OK)
        __redisRunCallback(ac,&cb,NULL);

    /* Run subscription callbacks callbacks with NULL reply */
    it = dictGetIterator(ac->sub.channels);
    while ((de = dictNext(it)) != NULL)
        __redisRunCallback(ac,dictGetEntryVal(de),NULL);
    dictReleaseIterator(it);
    dictRelease(ac->sub.channels);

    it = dictGetIterator(ac->sub.patterns);
    while ((de = dictNext(it)) != NULL)
        __redisRunCallback(ac,dictGetEntryVal(de),NULL);
    dictReleaseIterator(it);
    dictRelease(ac->sub.patterns);

    /* Signal event lib to clean up */
    _EL_CLEANUP(ac);

    /* Execute disconnect callback. When redisAsyncFree() initiated destroying
     * this context, the status will always be REDIS_OK. */
    if (ac->onDisconnect && (c->flags & REDIS_CONNECTED)) {
        if (c->flags & REDIS_FREEING) {
            ac->onDisconnect(ac,REDIS_OK);
        } else {
            ac->onDisconnect(ac,(ac->err == 0) ? REDIS_OK : REDIS_ERR);
        }
    }

    /* Cleanup self */
    redisFree(c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
addq $0x128, %rdi            # imm = 0x128
leaq -0x28(%rbp), %rsi
callq 0x9b20
cmpl $0x0, %eax
jne 0x95c0
movq -0x8(%rbp), %rdi
leaq -0x28(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x9df0
jmp 0x9594
jmp 0x95c2
movq -0x8(%rbp), %rdi
addq $0x138, %rdi            # imm = 0x138
leaq -0x28(%rbp), %rsi
callq 0x9b20
cmpl $0x0, %eax
jne 0x95ee
movq -0x8(%rbp), %rdi
leaq -0x28(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x9df0
jmp 0x95c2
movq -0x8(%rbp), %rax
movq 0x148(%rax), %rdi
callq 0xa7c0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0xa820
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x962c
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x9df0
jmp 0x9602
movq -0x30(%rbp), %rdi
callq 0xa8d0
movq -0x8(%rbp), %rax
movq 0x148(%rax), %rdi
callq 0xa8f0
movq -0x8(%rbp), %rax
movq 0x150(%rax), %rdi
callq 0xa7c0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0xa820
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x9683
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x9df0
jmp 0x9659
movq -0x30(%rbp), %rdi
callq 0xa8d0
movq -0x8(%rbp), %rax
movq 0x150(%rax), %rdi
callq 0xa8f0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x110(%rax)
je 0x96c2
movq -0x8(%rbp), %rax
movq 0x110(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0xe8(%rcx), %rdi
callq *%rax
jmp 0x96c4
movq -0x8(%rbp), %rax
cmpq $0x0, 0x118(%rax)
je 0x9735
movq -0x10(%rbp), %rax
movl 0x88(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x9735
movq -0x10(%rbp), %rax
movl 0x88(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x970b
movq -0x8(%rbp), %rax
movq 0x118(%rax), %rax
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq *%rax
jmp 0x9733
movq -0x8(%rbp), %rax
movq 0x118(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rcx
movl 0xd0(%rcx), %edx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovel %ecx, %esi
callq *%rax
jmp 0x9735
movq -0x10(%rbp), %rdi
callq 0x3330
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)