// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: sentinelEvent
void sentinelEvent(int level, char *type, sentinelRedisInstance *ri,
                   const char *fmt, ...) {
    va_list ap;
    char msg[LOG_MAX_LEN];
    robj *channel, *payload;

    /* Handle %@ */
    if (fmt[0] == '%' && fmt[1] == '@') {
        sentinelRedisInstance *master = (ri->flags & SRI_MASTER) ?
                                         NULL : ri->master;

        if (master) {
            snprintf(msg, sizeof(msg), "%s %s %s %d @ %s %s %d",
                sentinelRedisInstanceTypeStr(ri),
                ri->name, ri->addr->ip, ri->addr->port,
                master->name, master->addr->ip, master->addr->port);
        } else {
            snprintf(msg, sizeof(msg), "%s %s %s %d",
                sentinelRedisInstanceTypeStr(ri),
                ri->name, ri->addr->ip, ri->addr->port);
        }
        fmt += 2;
    } else {
        msg[0] = '\0';
    }

    /* Use vsprintf for the rest of the formatting if any. */
    if (fmt[0] != '\0') {
        va_start(ap, fmt);
        vsnprintf(msg+strlen(msg), sizeof(msg)-strlen(msg), fmt, ap);
        va_end(ap);
    }

    /* Log the message if the log level allows it to be logged. */
    if (level >= server.verbosity)
        serverLog(level,"%s %s",type,msg);

    /* Publish the message via Pub/Sub if it's not a debugging one. */
    if (level != LL_DEBUG) {
        channel = createStringObject(type,strlen(type));
        payload = createStringObject(msg,strlen(msg));
        pubsubPublishMessage(channel,payload);
        decrRefCount(channel);
        decrRefCount(payload);
    }

    /* Call the notification script if applicable. */
    if (level == LL_WARNING && ri != NULL) {
        sentinelRedisInstance *master = (ri->flags & SRI_MASTER) ?
                                         ri : ri->master;
        if (master && master->notification_script) {
            sentinelScheduleScriptExecution(master->notification_script,
                type,msg,NULL);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x568, %rsp            # imm = 0x568
testb %al, %al
je 0x949d8
movaps %xmm0, -0x4e0(%rbp)
movaps %xmm1, -0x4d0(%rbp)
movaps %xmm2, -0x4c0(%rbp)
movaps %xmm3, -0x4b0(%rbp)
movaps %xmm4, -0x4a0(%rbp)
movaps %xmm5, -0x490(%rbp)
movaps %xmm6, -0x480(%rbp)
movaps %xmm7, -0x470(%rbp)
movq %r9, -0x4e8(%rbp)
movq %r8, -0x4f0(%rbp)
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x25, %eax
jne 0x94b4c
movq -0x28(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x40, %eax
jne 0x94b4c
movq -0x20(%rbp), %rax
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x94a2f
xorl %eax, %eax
movq %rax, -0x518(%rbp)
jmp 0x94a41
movq -0x20(%rbp), %rax
movq 0xb8(%rax), %rax
movq %rax, -0x518(%rbp)
movq -0x518(%rbp), %rax
movq %rax, -0x458(%rbp)
cmpq $0x0, -0x458(%rbp)
je 0x94ae9
leaq -0x440(%rbp), %rax
movq %rax, -0x520(%rbp)
movq -0x20(%rbp), %rdi
callq 0x94d40
movq -0x520(%rbp), %rdi
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq 0x8(%rax), %r8
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq (%rax), %r9
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movl 0x8(%rax), %ebx
movq -0x458(%rbp), %rax
movq 0x8(%rax), %r11
movq -0x458(%rbp), %rax
movq 0x20(%rax), %rax
movq (%rax), %r10
movq -0x458(%rbp), %rax
movq 0x20(%rax), %rax
movl 0x8(%rax), %eax
movl $0x400, %esi            # imm = 0x400
leaq 0xb1515(%rip), %rdx     # 0x145fe4
movl %ebx, (%rsp)
movq %r11, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movl %eax, 0x18(%rsp)
movb $0x0, %al
callq 0x26120
jmp 0x94b3e
leaq -0x440(%rbp), %rax
movq %rax, -0x528(%rbp)
movq -0x20(%rbp), %rdi
callq 0x94d40
movq -0x528(%rbp), %rdi
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq 0x8(%rax), %r8
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq (%rax), %r9
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movl 0x8(%rax), %eax
movl $0x400, %esi            # imm = 0x400
leaq 0xb14c7(%rip), %rdx     # 0x145ffb
movl %eax, (%rsp)
movb $0x0, %al
callq 0x26120
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
jmp 0x94b53
movb $0x0, -0x440(%rbp)
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x94bdd
leaq -0x40(%rbp), %rax
leaq -0x510(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x20, (%rax)
leaq -0x440(%rbp), %rax
movq %rax, -0x538(%rbp)
leaq -0x440(%rbp), %rdi
callq 0x264f0
movq %rax, %rcx
movq -0x538(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x530(%rbp)
leaq -0x440(%rbp), %rdi
callq 0x264f0
movq -0x530(%rbp), %rdi
movl $0x400, %esi            # imm = 0x400
subq %rax, %rsi
movq -0x28(%rbp), %rdx
leaq -0x40(%rbp), %rcx
callq 0x26810
leaq -0x40(%rbp), %rax
movl -0xc(%rbp), %eax
leaq 0xe35f1(%rip), %rcx     # 0x1781d8
cmpl 0x5f8(%rcx), %eax
jl 0x94c0b
movl -0xc(%rbp), %edi
movq -0x18(%rbp), %rdx
leaq -0x440(%rbp), %rcx
leaq 0xb24c8(%rip), %rsi     # 0x1470cc
movb $0x0, %al
callq 0x2fc60
cmpl $0x0, -0xc(%rbp)
je 0x94c9a
movq -0x18(%rbp), %rax
movq %rax, -0x548(%rbp)
movq -0x18(%rbp), %rdi
callq 0x264f0
movq -0x548(%rbp), %rdi
movq %rax, %rsi
callq 0x486a0
movq %rax, -0x448(%rbp)
leaq -0x440(%rbp), %rax
movq %rax, -0x540(%rbp)
leaq -0x440(%rbp), %rdi
callq 0x264f0
movq -0x540(%rbp), %rdi
movq %rax, %rsi
callq 0x486a0
movq %rax, -0x450(%rbp)
movq -0x448(%rbp), %rdi
movq -0x450(%rbp), %rsi
callq 0x74fa0
movq -0x448(%rbp), %rdi
callq 0x48f70
movq -0x450(%rbp), %rdi
callq 0x48f70
cmpl $0x3, -0xc(%rbp)
jne 0x94d27
cmpq $0x0, -0x20(%rbp)
je 0x94d27
movq -0x20(%rbp), %rax
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x94cc6
movq -0x20(%rbp), %rax
movq %rax, -0x550(%rbp)
jmp 0x94cd8
movq -0x20(%rbp), %rax
movq 0xb8(%rax), %rax
movq %rax, -0x550(%rbp)
movq -0x550(%rbp), %rax
movq %rax, -0x460(%rbp)
cmpq $0x0, -0x460(%rbp)
je 0x94d25
movq -0x460(%rbp), %rax
cmpq $0x0, 0x120(%rax)
je 0x94d25
movq -0x460(%rbp), %rax
movq 0x120(%rax), %rdi
movq -0x18(%rbp), %rsi
leaq -0x440(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0x94db0
jmp 0x94d27
addq $0x568, %rsp            # imm = 0x568
popq %rbx
popq %rbp
retq
nopw %cs:(%rax,%rax)