// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/cluster.c
// Function: clusterLogCantFailover
void clusterLogCantFailover(int reason) {
    char *msg;
    static time_t lastlog_time = 0;
    mstime_t nolog_fail_time = server.cluster_node_timeout + 5000;

    /* Don't log if we have the same reason for some time. */
    if (reason == server.cluster->cant_failover_reason &&
        time(NULL)-lastlog_time < CLUSTER_CANT_FAILOVER_RELOG_PERIOD)
        return;

    server.cluster->cant_failover_reason = reason;

    /* We also don't emit any log if the master failed no long ago, the
     * goal of this function is to log slaves in a stalled condition for
     * a long time. */
    if (myself->slaveof &&
        nodeFailed(myself->slaveof) &&
        (mstime() - myself->slaveof->fail_time) < nolog_fail_time) return;

    switch(reason) {
    case CLUSTER_CANT_FAILOVER_DATA_AGE:
        msg = "Disconnected from master for longer than allowed. "
              "Please check the 'cluster-slave-validity-factor' configuration "
              "option.";
        break;
    case CLUSTER_CANT_FAILOVER_WAITING_DELAY:
        msg = "Waiting the delay before I can start a new failover.";
        break;
    case CLUSTER_CANT_FAILOVER_EXPIRED:
        msg = "Failover attempt expired.";
        break;
    case CLUSTER_CANT_FAILOVER_WAITING_VOTES:
        msg = "Waiting for votes, but majority still not reached.";
        break;
    default:
        msg = "Unknown reason code.";
        break;
    }
    lastlog_time = time(NULL);
    serverLog(LL_WARNING,"Currently unable to failover: %s", msg);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
leaq 0xf66c6(%rip), %rax     # 0x1781d8
movq 0x9a0(%rax), %rax
addq $0x1388, %rax           # imm = 0x1388
movq %rax, -0x18(%rbp)
movl -0x4(%rbp), %eax
leaq 0xf66ab(%rip), %rcx     # 0x1781d8
movq 0x9b0(%rcx), %rcx
cmpl 0x60050(%rcx), %eax
jne 0x81b59
xorl %eax, %eax
movl %eax, %edi
callq 0x26ce0
subq 0x10b01c(%rip), %rax    # 0x18cb68
cmpq $0x12c, %rax            # imm = 0x12C
jge 0x81b59
jmp 0x81c49
movl -0x4(%rbp), %ecx
leaq 0xf6675(%rip), %rax     # 0x1781d8
movq 0x9b0(%rax), %rax
movl %ecx, 0x60050(%rax)
movq 0x10afe9(%rip), %rax    # 0x18cb60
cmpq $0x0, 0x850(%rax)
je 0x81bbf
movq 0x10afd8(%rip), %rax    # 0x18cb60
movq 0x850(%rax), %rax
movl 0x30(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x81bbf
callq 0x2ff70
movq 0x10afba(%rip), %rcx    # 0x18cb60
movq 0x850(%rcx), %rcx
subq 0x868(%rcx), %rax
cmpq -0x18(%rbp), %rax
jge 0x81bbf
jmp 0x81c49
movl -0x4(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0x3, %eax
ja 0x81c17
movq -0x20(%rbp), %rax
leaq 0xbfaea(%rip), %rcx     # 0x1416c4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xc06fc(%rip), %rax     # 0x1422e6
movq %rax, -0x10(%rbp)
jmp 0x81c22
leaq 0xc0768(%rip), %rax     # 0x14235f
movq %rax, -0x10(%rbp)
jmp 0x81c22
leaq 0xc0790(%rip), %rax     # 0x142394
movq %rax, -0x10(%rbp)
jmp 0x81c22
leaq 0xc079d(%rip), %rax     # 0x1423ae
movq %rax, -0x10(%rbp)
jmp 0x81c22
leaq 0xc07c3(%rip), %rax     # 0x1423e1
movq %rax, -0x10(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x26ce0
movq %rax, 0x10af36(%rip)    # 0x18cb68
movq -0x10(%rbp), %rdx
movl $0x3, %edi
leaq 0xc07b4(%rip), %rsi     # 0x1423f6
movb $0x0, %al
callq 0x2fc60
addq $0x20, %rsp
popq %rbp
retq
nop