#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*/ intr_disable();
int /*<<< orphan*/ put_int(int);
int /*<<< orphan*/ put_str(char *);
void panic_spin(char *filename, int line, const char *func,
                const char *condition) {
  intr_disable();
  put_str("\n\n\n!!!!error!!!!\n");
  put_str("filename:");
  put_str(filename);
  put_str("\n");
  put_str("line:0x");
  put_int(line);
  put_str("\n");
  put_str("function:");
  put_str((char *)func);
  put_str("\n");
  put_str("condition:");
  put_str((char *)condition);
  put_str("\n");
  while (1)
    ;
}


x86 assembly (clang, -O0):
<panic_spin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    $0x0,%al
call   1040 <intr_disable@plt>
lea    0xeab(%rip),%rdi
call   1050 <put_str@plt>
lea    0xeb1(%rip),%rdi
call   1050 <put_str@plt>
mov    -0x8(%rbp),%rdi
call   1050 <put_str@plt>
lea    0xe9a(%rip),%rdi
call   1050 <put_str@plt>
lea    0xe9a(%rip),%rdi
call   1050 <put_str@plt>
mov    -0xc(%rbp),%edi
call   1030 <put_int@plt>
lea    0xe7a(%rip),%rdi
call   1050 <put_str@plt>
lea    0xe82(%rip),%rdi
call   1050 <put_str@plt>
mov    -0x18(%rbp),%rdi
call   1050 <put_str@plt>
lea    0xe59(%rip),%rdi
call   1050 <put_str@plt>
lea    0xe6b(%rip),%rdi
call   1050 <put_str@plt>
mov    -0x20(%rbp),%rdi
call   1050 <put_str@plt>
lea    0xe38(%rip),%rdi
call   1050 <put_str@plt>
jmp    11dd <panic_spin+0xad>

x86 assembly (clang, -O2):
<panic_spin>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r15
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <intr_disable@plt>
lea    0xeb0(%rip),%rdi
call   1050 <put_str@plt>
lea    0xeb6(%rip),%rdi
call   1050 <put_str@plt>
mov    %rbx,%rdi
call   1050 <put_str@plt>
lea    0xea0(%rip),%rbx
mov    %rbx,%rdi
call   1050 <put_str@plt>
lea    0xe9d(%rip),%rdi
call   1050 <put_str@plt>
mov    %ebp,%edi
call   1030 <put_int@plt>
mov    %rbx,%rdi
call   1050 <put_str@plt>
lea    0xe8a(%rip),%rdi
call   1050 <put_str@plt>
mov    %r15,%rdi
call   1050 <put_str@plt>
mov    %rbx,%rdi
call   1050 <put_str@plt>
lea    0xe78(%rip),%rdi
call   1050 <put_str@plt>
mov    %r14,%rdi
call   1050 <put_str@plt>
mov    %rbx,%rdi
call   1050 <put_str@plt>
nopl   0x0(%rax,%rax,1)
jmp    11d0 <panic_spin+0xa0>

LLVM IR (-O0):
@.str = [18 x i8] c"\0A\0A\0A!!!!error!!!!\0A\00"
@.str.1 = [10 x i8] c"filename:\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [8 x i8] c"line:0x\00"
@.str.4 = [10 x i8] c"function:\00"
@.str.5 = [11 x i8] c"condition:\00"
define void @panic_spin(i8* %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = call i32 (...) @intr_disable()
%10 = call i32 @put_str(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @put_str(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%12 = load i8*, i8** %5
%13 = call i32 @put_str(i8* %12)
%14 = call i32 @put_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%15 = call i32 @put_str(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%16 = load i32, i32* %6
%17 = call i32 @put_int(i32 %16)
%18 = call i32 @put_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%19 = call i32 @put_str(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
%20 = load i8*, i8** %7
%21 = call i32 @put_str(i8* %20)
%22 = call i32 @put_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%23 = call i32 @put_str(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
%24 = load i8*, i8** %8
%25 = call i32 @put_str(i8* %24)
%26 = call i32 @put_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %27
27: ; preds = %4, %27
br label %27
}

LLVM IR (-O2):
@.str = [18 x i8] c"\0A\0A\0A!!!!error!!!!\0A\00"
@.str.1 = [10 x i8] c"filename:\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [8 x i8] c"line:0x\00"
@.str.4 = [10 x i8] c"function:\00"
@.str.5 = [11 x i8] c"condition:\00"
define void @panic_spin(i8* %0, i32 %1, i8* %2, i8* %3) {
%5 = tail call i32 (...) @intr_disable()
%6 = tail call i32 @put_str(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @put_str(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%8 = tail call i32 @put_str(i8* %0)
%9 = tail call i32 @put_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%10 = tail call i32 @put_str(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%11 = tail call i32 @put_int(i32 %1)
%12 = tail call i32 @put_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%13 = tail call i32 @put_str(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
%14 = tail call i32 @put_str(i8* %2)
%15 = tail call i32 @put_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%16 = tail call i32 @put_str(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
%17 = tail call i32 @put_str(i8* %3)
%18 = tail call i32 @put_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %19
19: ; preds = %4, %19
br label %19
}