// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: sentinelPingReplyCallback
void sentinelPingReplyCallback(redisAsyncContext *c, void *reply, void *privdata) {
    sentinelRedisInstance *ri = privdata;
    instanceLink *link = c->data;
    redisReply *r;

    if (!reply || !link) return;
    link->pending_commands--;
    r = reply;

    if (r->type == REDIS_REPLY_STATUS ||
        r->type == REDIS_REPLY_ERROR) {
        /* Update the "instance available" field only if this is an
         * acceptable reply. */
        if (strncmp(r->str,"PONG",4) == 0 ||
            strncmp(r->str,"LOADING",7) == 0 ||
            strncmp(r->str,"MASTERDOWN",10) == 0)
        {
            link->last_avail_time = mstime();
            link->act_ping_time = 0; /* Flag the pong as received. */
        } else {
            /* Send a SCRIPT KILL command if the instance appears to be
             * down because of a busy script. */
            if (strncmp(r->str,"BUSY",4) == 0 &&
                (ri->flags & SRI_S_DOWN) &&
                !(ri->flags & SRI_SCRIPT_KILL_SENT))
            {
                if (redisAsyncCommand(ri->link->cc,
                        sentinelDiscardReplyCallback, ri,
                        "SCRIPT KILL") == C_OK)
                    ri->link->pending_commands++;
                ri->flags |= SRI_SCRIPT_KILL_SENT;
            }
        }
    }
    link->last_pong_time = mstime();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0xb0(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x99239
cmpq $0x0, -0x28(%rbp)
jne 0x9923e
jmp 0x9937d
movq -0x28(%rbp), %rax
movl 0x8(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x5, (%rax)
je 0x99269
movq -0x30(%rbp), %rax
cmpl $0x6, (%rax)
jne 0x9936d
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rdi
leaq 0xad5e8(%rip), %rsi     # 0x146860
movl $0x4, %edx
callq 0x26350
cmpl $0x0, %eax
je 0x992c3
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rdi
leaq 0xad5cf(%rip), %rsi     # 0x146865
movl $0x7, %edx
callq 0x26350
cmpl $0x0, %eax
je 0x992c3
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rdi
leaq 0xad5b9(%rip), %rsi     # 0x14686d
movl $0xa, %edx
callq 0x26350
cmpl $0x0, %eax
jne 0x992e4
callq 0x2ff70
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x40(%rax)
jmp 0x9936b
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rdi
leaq 0xad585(%rip), %rsi     # 0x146878
movl $0x4, %edx
callq 0x26350
cmpl $0x0, %eax
jne 0x99369
movq -0x20(%rbp), %rax
movl (%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x99369
movq -0x20(%rbp), %rax
movl (%rax), %eax
andl $0x1000, %eax           # imm = 0x1000
cmpl $0x0, %eax
jne 0x99369
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x10(%rax), %rdi
movq -0x20(%rbp), %rdx
leaq -0x3857(%rip), %rsi     # 0x95ae0
leaq 0xad53f(%rip), %rcx     # 0x14687d
movb $0x0, %al
callq 0xa6e80
cmpl $0x0, %eax
jne 0x9935b
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl (%rax), %ecx
orl $0x1000, %ecx           # imm = 0x1000
movl %ecx, (%rax)
jmp 0x9936b
jmp 0x9936d
callq 0x2ff70
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x50(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)