#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*/ emit(char const *);
int /*<<< orphan*/ emit_uint32(int);
int /*<<< orphan*/ quit_failure();
void test_check__(int cond, const char *file, int line, const char *expr) {
  if (cond)
    return;
  emit("Failed!\n");
  emit("File: ");
  emit(file);
  emit("\n");
  emit("Line: ");
  emit_uint32(line);
  emit("\n");
  emit("Expr: ");
  emit(expr);
  emit("\n");
  quit_failure();
}


x86 assembly (clang, -O0):
<test_check__>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1155 <test_check__+0x25>
jmp    11ca <test_check__+0x9a>
lea    0xea4(%rip),%rdi
call   1050 <emit@plt>
lea    0xea1(%rip),%rdi
call   1050 <emit@plt>
mov    -0x10(%rbp),%rdi
call   1050 <emit@plt>
lea    0xe8a(%rip),%rdi
call   1050 <emit@plt>
lea    0xe87(%rip),%rdi
call   1050 <emit@plt>
mov    -0x14(%rbp),%edi
call   1040 <emit_uint32@plt>
lea    0xe6a(%rip),%rdi
call   1050 <emit@plt>
lea    0xe6e(%rip),%rdi
call   1050 <emit@plt>
mov    -0x20(%rbp),%rdi
call   1050 <emit@plt>
lea    0xe49(%rip),%rdi
call   1050 <emit@plt>
mov    $0x0,%al
call   1030 <quit_failure@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_check__>:
test   %edi,%edi
je     1135 <test_check__+0x5>
ret
push   %rbp
push   %r14
push   %rbx
mov    %rcx,%r14
mov    %edx,%ebp
mov    %rsi,%rbx
lea    0xeb8(%rip),%rdi
call   1050 <emit@plt>
lea    0xeb5(%rip),%rdi
call   1050 <emit@plt>
mov    %rbx,%rdi
call   1050 <emit@plt>
lea    0xe9f(%rip),%rbx
mov    %rbx,%rdi
call   1050 <emit@plt>
lea    0xe99(%rip),%rdi
call   1050 <emit@plt>
mov    %ebp,%edi
call   1040 <emit_uint32@plt>
mov    %rbx,%rdi
call   1050 <emit@plt>
lea    0xe85(%rip),%rdi
call   1050 <emit@plt>
mov    %r14,%rdi
call   1050 <emit@plt>
mov    %rbx,%rdi
call   1050 <emit@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <quit_failure@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"Failed!\0A\00"
@.str.1 = [7 x i8] c"File: \00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [7 x i8] c"Line: \00"
@.str.4 = [7 x i8] c"Expr: \00"
define void @test_check__(i32 %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i32, i32* %5
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %4
br label %27
12: ; preds = %4
%13 = call i32 @emit(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%14 = call i32 @emit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%15 = load i8*, i8** %6
%16 = call i32 @emit(i8* %15)
%17 = call i32 @emit(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%18 = call i32 @emit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%19 = load i32, i32* %7
%20 = call i32 @emit_uint32(i32 %19)
%21 = call i32 @emit(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%22 = call i32 @emit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%23 = load i8*, i8** %8
%24 = call i32 @emit(i8* %23)
%25 = call i32 @emit(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%26 = call i32 (...) @quit_failure()
br label %27
27: ; preds = %12, %11
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"Failed!\0A\00"
@.str.1 = [7 x i8] c"File: \00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [7 x i8] c"Line: \00"
@.str.4 = [7 x i8] c"Expr: \00"
define void @test_check__(i32 %0, i8* %1, i32 %2, i8* %3) {
%5 = icmp eq i32 %0, 0
br i1 %5, label %6, label %18
6: ; preds = %4
%7 = tail call i32 @emit(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @emit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%9 = tail call i32 @emit(i8* %1)
%10 = tail call i32 @emit(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%11 = tail call i32 @emit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%12 = tail call i32 @emit_uint32(i32 %2)
%13 = tail call i32 @emit(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%14 = tail call i32 @emit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%15 = tail call i32 @emit(i8* %3)
%16 = tail call i32 @emit(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%17 = tail call i32 (...) @quit_failure()
br label %18
18: ; preds = %4, %6
ret void
}