// File: FreeSlave[P]vhlt/common/log.cpp
// Function: Fatal(assume_msgs, char const*, ...)
void CDECL FORMAT_PRINTF(2,3)      Fatal(assume_msgs msgid, const char* const warning, ...)
{
    char            message[MAX_WARNING];
    char            message2[MAX_WARNING];

    va_list         argptr;

    va_start(argptr, warning);
#ifdef ZHLT_LANGFILE
    vsnprintf(message, MAX_WARNING, Localize (warning), argptr);
#else
    vsnprintf(message, MAX_WARNING, warning, argptr);
#endif
    va_end(argptr);

#ifdef ZHLT_LANGFILE
    safe_snprintf(message2, MAX_MESSAGE, "%s%s\n", Localize ("Error: "), message);
#else
    safe_snprintf(message2, MAX_MESSAGE, "Error: %s\n", message);
#endif
    WriteLog(message2);
    LogError(message2);

    {
        char            message[MAX_MESSAGE];
        const MessageTable_t* msg = GetAssume(msgid);

#ifdef ZHLT_LANGFILE
        safe_snprintf(message, MAX_MESSAGE, "%s\n%s%s\n%s%s\n", Localize (msg->title), Localize ("Description: "), Localize (msg->text), Localize ("Howto Fix: "), Localize (msg->howto));
#else
        safe_snprintf(message, MAX_MESSAGE, "%s\nDescription: %s\nHowto Fix: %s\n", msg->title, msg->text, msg->howto);
#endif
        PrintOnce(message);
    }

    fatal = 1;
}

// Assembly:
subq $0x1958, %rsp           # imm = 0x1958
testb %al, %al
je 0xbbfb
movaps %xmm0, 0x90(%rsp)
movaps %xmm1, 0xa0(%rsp)
movaps %xmm2, 0xb0(%rsp)
movaps %xmm3, 0xc0(%rsp)
movaps %xmm4, 0xd0(%rsp)
movaps %xmm5, 0xe0(%rsp)
movaps %xmm6, 0xf0(%rsp)
movaps %xmm7, 0x100(%rsp)
movq %r9, 0x88(%rsp)
movq %r8, 0x80(%rsp)
movq %rcx, 0x78(%rsp)
movq %rdx, 0x70(%rsp)
movl %edi, 0x1954(%rsp)
movq %rsi, 0x1948(%rsp)
leaq 0x60(%rsp), %rax
movq %rax, 0x930(%rsp)
leaq 0x1960(%rsp), %rax
movq %rax, 0x928(%rsp)
movl $0x30, 0x924(%rsp)
movl $0x10, 0x920(%rsp)
movq 0x1948(%rsp), %rdi
callq 0xb7f0
movq %rax, %rdx
leaq 0x1140(%rsp), %rdi
movq %rdi, 0x18(%rsp)
movl $0x800, %esi            # imm = 0x800
movq %rsi, 0x30(%rsp)
leaq 0x920(%rsp), %rcx
callq 0x4250
leaq 0x1ff45(%rip), %rdi     # 0x2bbd7
callq 0xb7f0
movq 0x18(%rsp), %r8
movq 0x30(%rsp), %rsi
movq %rax, %rcx
leaq 0x1ff3c(%rip), %rdx     # 0x2bbe7
xorl %eax, %eax
movb %al, 0x5f(%rsp)
leaq 0x940(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x99e0
movq 0x20(%rsp), %rdi
callq 0xb9d0
movq 0x20(%rsp), %rdi
callq 0xb6b0
movl 0x1954(%rsp), %edi
callq 0xcb00
movq %rax, 0x118(%rsp)
movq 0x118(%rsp), %rax
movq (%rax), %rdi
callq 0xb7f0
movq %rax, 0x38(%rsp)
leaq 0x1fee6(%rip), %rdi     # 0x2bbed
callq 0xb7f0
movq %rax, 0x40(%rsp)
movq 0x118(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0xb7f0
movq %rax, 0x48(%rsp)
leaq 0x1fecd(%rip), %rdi     # 0x2bbfb
callq 0xb7f0
movq %rax, 0x28(%rsp)
movq 0x118(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xb7f0
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rcx
movq 0x40(%rsp), %r8
movq 0x48(%rsp), %r9
movq %rax, %r10
movb 0x5f(%rsp), %al
movq %rsp, %rdx
movq %r10, 0x8(%rdx)
movq %rdi, (%rdx)
leaq 0x1fe65(%rip), %rdx     # 0x2bbdf
leaq 0x120(%rsp), %rdi
movq %rdi, 0x50(%rsp)
callq 0x99e0
movq 0x50(%rsp), %rdi
movb 0x5f(%rsp), %al
callq 0xbdb0
movb $0x1, 0x20c5757(%rip)   # 0x20d14f8
addq $0x1958, %rsp           # imm = 0x1958
retq
nopl (%rax)