// File: /workspace/github_c_makefile_star2_O0/nilyang[P]redis-tdd-annotation/src/redis.c
// Function: redisLogRaw
void redisLogRaw(int level, const char *msg) {
    const int syslogLevelMap[] = { LOG_DEBUG, LOG_INFO, LOG_NOTICE, LOG_WARNING };
    const char *c = ".-*#";
    FILE *fp;
    char buf[64];
    int rawmode = (level & REDIS_LOG_RAW);
    int log_to_stdout = server.logfile[0] == '\0';

    level &= 0xff; /* clear flags */
    if (level < server.verbosity) return;

    fp = log_to_stdout ? stdout : fopen(server.logfile,"a");
    if (!fp) return;

    if (rawmode) {
        fprintf(fp,"%s",msg);
    } else {
        int off;
        struct timeval tv;

        gettimeofday(&tv,NULL);
        off = strftime(buf,sizeof(buf),"%d %b %H:%M:%S.",localtime(&tv.tv_sec));
        snprintf(buf+off,sizeof(buf)-off,"%03d",(int)tv.tv_usec/1000);
        fprintf(fp,"[%d] %s %c %s\n",(int)getpid(),buf,c[level],msg);
    }
    fflush(fp);

    if (!log_to_stdout) fclose(fp);
    if (server.syslog_enabled) syslog(syslogLevelMap[level], "%s", msg);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq 0xb94e7(%rip), %rax     # 0xde2d0
movq %rax, -0x20(%rbp)
movq 0xb94e4(%rip), %rax     # 0xde2d8
movq %rax, -0x18(%rbp)
leaq 0xb98f0(%rip), %rax     # 0xde6ef
movq %rax, -0x28(%rbp)
movl -0x4(%rbp), %eax
andl $0x400, %eax            # imm = 0x400
movl %eax, -0x74(%rbp)
movq 0xef0b3(%rip), %rax     # 0x113ec8
movsbl (%rax), %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x78(%rbp)
movl -0x4(%rbp), %eax
andl $0xff, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl 0xeef22(%rip), %eax     # 0x113d5c
jge 0x24e41
jmp 0x24f9e
cmpl $0x0, -0x78(%rbp)
je 0x24e5a
movq 0xea1a2(%rip), %rax     # 0x10eff0
movq (%rax), %rax
movq %rax, -0x98(%rbp)
jmp 0x24e74
movq 0xef067(%rip), %rdi     # 0x113ec8
leaq 0xc778f(%rip), %rsi     # 0xec5f7
callq 0x1fa70
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x24e8b
jmp 0x24f9e
cmpl $0x0, -0x74(%rbp)
je 0x24eac
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq 0xc45a6(%rip), %rsi     # 0xe9446
movb $0x0, %al
callq 0x1fb30
jmp 0x24f63
leaq -0x90(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1f300
leaq -0x70(%rbp), %rax
movq %rax, -0xa8(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x1fb40
movq -0xa8(%rbp), %rdi
movq %rax, %rcx
movl $0x40, %esi
leaq 0xb980b(%rip), %rdx     # 0xde6f4
callq 0x1fb80
movl %eax, -0x7c(%rbp)
leaq -0x70(%rbp), %rdi
movslq -0x7c(%rbp), %rax
addq %rax, %rdi
movslq -0x7c(%rbp), %rax
movl $0x40, %esi
subq %rax, %rsi
movq -0x88(%rbp), %rax
movl $0x3e8, %ecx            # imm = 0x3E8
cltd
idivl %ecx
movl %eax, %ecx
leaq 0xb97e4(%rip), %rdx     # 0xde704
movb $0x0, %al
callq 0x1f120
movq -0x30(%rbp), %rax
movq %rax, -0xa0(%rbp)
callq 0x1f410
movq -0xa0(%rbp), %rdi
movl %eax, %edx
leaq -0x70(%rbp), %rcx
movq -0x28(%rbp), %rax
movslq -0x4(%rbp), %rsi
movsbl (%rax,%rsi), %r8d
movq -0x10(%rbp), %r9
leaq 0xb97ad(%rip), %rsi     # 0xde709
movb $0x0, %al
callq 0x1fb30
movq -0x30(%rbp), %rdi
callq 0x1fc80
cmpl $0x0, -0x78(%rbp)
jne 0x24f7b
movq -0x30(%rbp), %rdi
callq 0x1f9b0
cmpl $0x0, 0xeef4e(%rip)     # 0x113ed0
je 0x24f9e
movslq -0x4(%rbp), %rax
movl -0x20(%rbp,%rax,4), %edi
movq -0x10(%rbp), %rdx
leaq 0xc44af(%rip), %rsi     # 0xe9446
movb $0x0, %al
callq 0x1f180
addq $0xb0, %rsp
popq %rbp
retq
nopw (%rax,%rax)