#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_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ safe_output(char *);
void print_error(char *command) {
  if (command) {
    safe_output("Unknown ");
    safe_output(command);
    safe_output(" error. Quitting.\n");
  } else {
    safe_output("Unknown error. Quitting.\n");
  }
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<print_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     115d <print_error+0x3d>
lea    0xec2(%rip),%rdi
call   1030 <safe_output@plt>
mov    -0x8(%rbp),%rdi
call   1030 <safe_output@plt>
lea    0xebd(%rip),%rdi
call   1030 <safe_output@plt>
jmp    1169 <print_error+0x49>
lea    0xea5(%rip),%rdi
call   1030 <safe_output@plt>
mov    0x2e70(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<print_error>:
push   %rbx
test   %rdi,%rdi
jne    112f <print_error+0xf>
lea    0xedc(%rip),%rdi
jmp    114d <print_error+0x2d>
mov    %rdi,%rbx
lea    0xec7(%rip),%rdi
call   1030 <safe_output@plt>
mov    %rbx,%rdi
call   1030 <safe_output@plt>
lea    0xec3(%rip),%rdi
call   1030 <safe_output@plt>
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"Unknown \00"
@.str.1 = [19 x i8] c" error. Quitting.\0A\00"
@.str.2 = [26 x i8] c"Unknown error. Quitting.\0A\00"
@EXIT_FAILURE = global i32 0
define void @print_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = call i32 @safe_output(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%7 = load i8*, i8** %2
%8 = call i32 @safe_output(i8* %7)
%9 = call i32 @safe_output(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
br label %12
10: ; preds = %1
%11 = call i32 @safe_output(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
br label %12
12: ; preds = %10, %5
%13 = load i32, i32* @EXIT_FAILURE
%14 = call i32 @exit(i32 %13)
unreachable
}

LLVM IR (-O2):
@.str = [9 x i8] c"Unknown \00"
@.str.1 = [19 x i8] c" error. Quitting.\0A\00"
@.str.2 = [26 x i8] c"Unknown error. Quitting.\0A\00"
@EXIT_FAILURE = global i32 0
define void @print_error(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @safe_output(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @safe_output(i8* %0)
br label %6
6: ; preds = %1, %3
%7 = phi i8* [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), %3 ], [ getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), %1 ]
%8 = tail call i32 @safe_output(i8* %7)
%9 = load i32, i32* @EXIT_FAILURE
%10 = tail call i32 @exit(i32 %9)
unreachable
}