#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*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ printf(char *, char *);
scalar_t__ remove(char *);
int /*<<< orphan*/ stdout;
void exitif(int expression, char *message, char *arg) {
  if (expression == 0)
    return;
  if (message != 0)
    fprintf(stdout, "%s", message);
  if (arg != 0)
    fprintf(stdout, "%s", arg);
  fprintf(stdout, "\nexiting.\n");
  if (remove("prool.tmp")) {
    printf("exitif(): can't delete tmp file `%s'\n", "prool.tmp");
  }
  exit(0);
}


x86 assembly (clang, -O0):
<exitif>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1163 <exitif+0x23>
add    $0x20,%rsp
pop    %rbp
ret
cmpq   $0x0,-0x10(%rbp)
je     1189 <exitif+0x49>
mov    0x2e6b(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xe7e(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
cmpq   $0x0,-0x18(%rbp)
je     11af <exitif+0x6f>
mov    0x2e45(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
lea    0xe58(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2e2a(%rip),%rax
mov    (%rax),%edi
lea    0xe44(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
lea    0xe41(%rip),%rdi
call   1030 <remove@plt>
cmp    $0x0,%rax
je     11ef <exitif+0xaf>
lea    0xe35(%rip),%rdi
lea    0xe24(%rip),%rsi
call   1040 <printf@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<exitif>:
test   %edi,%edi
jne    1145 <exitif+0x5>
ret
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%rdx
test   %rsi,%rsi
je     1168 <exitif+0x28>
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
lea    0xe9f(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
test   %rbx,%rbx
je     1187 <exitif+0x47>
mov    0x2e6c(%rip),%rax
mov    (%rax),%edi
lea    0xe83(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0x2e52(%rip),%rax
mov    (%rax),%edi
lea    0xe6c(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xe69(%rip),%rdi
call   1030 <remove@plt>
test   %rax,%rax
je     11c2 <exitif+0x82>
lea    0xe62(%rip),%rdi
lea    0xe51(%rip),%rsi
call   1040 <printf@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [3 x i8] c"%s\00"
@.str.1 = [11 x i8] c"\0Aexiting.\0A\00"
@.str.2 = [10 x i8] c"prool.tmp\00"
@.str.3 = [38 x i8] c"exitif(): can't delete tmp file `%s'\0A\00"
define void @exitif(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %3
ret void
10: ; preds = %3
%11 = load i8*, i8** %5
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %17
13: ; preds = %10
%14 = load i32, i32* @stdout
%15 = load i8*, i8** %5
%16 = call i32 (i32, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %15)
br label %17
17: ; preds = %13, %10
%18 = load i8*, i8** %6
%19 = icmp ne i8* %18, null
br i1 %19, label %20, label %24
20: ; preds = %17
%21 = load i32, i32* @stdout
%22 = load i8*, i8** %6
%23 = call i32 (i32, i8*, ...) @fprintf(i32 %21, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %22)
br label %24
24: ; preds = %20, %17
%25 = load i32, i32* @stdout
%26 = call i32 (i32, i8*, ...) @fprintf(i32 %25, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%27 = call i64 @remove(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%28 = icmp ne i64 %27, 0
br i1 %28, label %29, label %31
29: ; preds = %24
%30 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
br label %31
31: ; preds = %29, %24
%32 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [3 x i8] c"%s\00"
@.str.1 = [11 x i8] c"\0Aexiting.\0A\00"
@.str.2 = [10 x i8] c"prool.tmp\00"
@.str.3 = [38 x i8] c"exitif(): can't delete tmp file `%s'\0A\00"
define void @exitif(i32 %0, i8* %1, i8* %2) {
%4 = icmp eq i32 %0, 0
br i1 %4, label %5, label %6
5: ; preds = %3
ret void
6: ; preds = %3
%7 = icmp eq i8* %1, null
br i1 %7, label %11, label %8
8: ; preds = %6
%9 = load i32, i32* @stdout
%10 = tail call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
br label %11
11: ; preds = %8, %6
%12 = icmp eq i8* %2, null
br i1 %12, label %16, label %13
13: ; preds = %11
%14 = load i32, i32* @stdout
%15 = tail call i32 (i32, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %16
16: ; preds = %13, %11
%17 = load i32, i32* @stdout
%18 = tail call i32 (i32, i8*, ...) @fprintf(i32 %17, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%19 = tail call i64 @remove(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%20 = icmp eq i64 %19, 0
br i1 %20, label %23, label %21
21: ; preds = %16
%22 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
br label %23
23: ; preds = %21, %16
%24 = tail call i32 @exit(i32 0)
unreachable
}