#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ t01_log(int, char *, ...);
void _t01_panic(char *msg, char *file, int line) {
  t01_log(3, "------------------------------------------------");
  t01_log(3, "!!! Software Failure. Press left mouse button to continue");
  t01_log(3, "Guru Meditation: %s #%s:%d", msg, file, line);
  t01_log(3, "------------------------------------------------");
  *((char *)-1) = 'x';
}


x86 assembly (clang, -O0):
<_t01_panic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0x3,%edi
lea    0xed1(%rip),%rsi
mov    $0x0,%al
call   1030 <t01_log@plt>
mov    $0x3,%edi
lea    0xeef(%rip),%rsi
mov    $0x0,%al
call   1030 <t01_log@plt>
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
mov    $0x3,%edi
lea    0xf0a(%rip),%rsi
mov    $0x0,%al
call   1030 <t01_log@plt>
mov    $0x3,%edi
lea    0xe8c(%rip),%rsi
mov    $0x0,%al
call   1030 <t01_log@plt>
mov    $0xffffffffffffffff,%rax
movb   $0x78,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_t01_panic>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
lea    0xed9(%rip),%r15
mov    $0x3,%edi
mov    %r15,%rsi
xor    %eax,%eax
call   1030 <t01_log@plt>
lea    0xef4(%rip),%rsi
mov    $0x3,%edi
xor    %eax,%eax
call   1030 <t01_log@plt>
lea    0xf1b(%rip),%rsi
mov    $0x3,%edi
mov    %rbp,%rdx
mov    %rbx,%rcx
mov    %r14d,%r8d
xor    %eax,%eax
call   1030 <t01_log@plt>
mov    $0x3,%edi
mov    %r15,%rsi
xor    %eax,%eax
call   1030 <t01_log@plt>
movb   $0x78,0xffffffffffffffff
78
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [49 x i8] c"------------------------------------------------\00"
@.str.1 = [58 x i8] c"!!! Software Failure. Press left mouse button to continue\00"
@.str.2 = [27 x i8] c"Guru Meditation: %s #%s:%d\00"
define void @_t01_panic(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = call i32 (i32, i8*, ...) @t01_log(i32 3, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (i32, i8*, ...) @t01_log(i32 3, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0))
%9 = load i8*, i8** %4
%10 = load i8*, i8** %5
%11 = load i32, i32* %6
%12 = call i32 (i32, i8*, ...) @t01_log(i32 3, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i8* %9, i8* %10, i32 %11)
%13 = call i32 (i32, i8*, ...) @t01_log(i32 3, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
store i8 120, i8* inttoptr (i64 -1 to i8*)
ret void
}

LLVM IR (-O2):
@.str = [49 x i8] c"------------------------------------------------\00"
@.str.1 = [58 x i8] c"!!! Software Failure. Press left mouse button to continue\00"
@.str.2 = [27 x i8] c"Guru Meditation: %s #%s:%d\00"
define void @_t01_panic(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 (i32, i8*, ...) @t01_log(i32 3, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 (i32, i8*, ...) @t01_log(i32 3, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 (i32, i8*, ...) @t01_log(i32 3, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i8* %0, i8* %1, i32 %2)
%7 = tail call i32 (i32, i8*, ...) @t01_log(i32 3, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
store i8 120, i8* inttoptr (i64 -1 to i8*)
ret void
}