#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*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ test_frustum();
int /*<<< orphan*/ test_mult_m4m4();
int /*<<< orphan*/ test_rotate();
int /*<<< orphan*/ test_translate();
int main(int argc, char **argv) {
  bool result = true;
  while (!(test_frustum())) {
    fprintf(stderr, "test failed: "
                    "test_frustum()"
                    "\n");
    result = false;
    break;
  };
  while (!(test_mult_m4m4())) {
    fprintf(stderr, "test failed: "
                    "test_mult_m4m4()"
                    "\n");
    result = false;
    break;
  };
  while (!(test_rotate())) {
    fprintf(stderr, "test failed: "
                    "test_rotate()"
                    "\n");
    result = false;
    break;
  };
  while (!(test_translate())) {
    fprintf(stderr, "test failed: "
                    "test_translate()"
                    "\n");
    result = false;
    break;
  };
  return result ? 0 : 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    $0x0,%al
call   1050 <test_frustum@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1189 <main+0x39>
jmp    11a5 <main+0x55>
mov    0x2e50(%rip),%rax
mov    (%rax),%edi
lea    0xe67(%rip),%rsi
call   1060 <fprintf@plt>
movl   $0x0,-0x14(%rbp)
jmp    11aa <main+0x5a>
mov    $0x0,%al
call   1070 <test_mult_m4m4@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    11c6 <main+0x76>
jmp    11e2 <main+0x92>
mov    0x2e13(%rip),%rax
mov    (%rax),%edi
lea    0xe47(%rip),%rsi
call   1060 <fprintf@plt>
movl   $0x0,-0x14(%rbp)
jmp    11e7 <main+0x97>
mov    $0x0,%al
call   1030 <test_rotate@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1203 <main+0xb3>
jmp    121f <main+0xcf>
mov    0x2dd6(%rip),%rax
mov    (%rax),%edi
lea    0xe29(%rip),%rsi
call   1060 <fprintf@plt>
movl   $0x0,-0x14(%rbp)
jmp    1224 <main+0xd4>
mov    $0x0,%al
call   1040 <test_translate@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1240 <main+0xf0>
jmp    125c <main+0x10c>
mov    0x2d99(%rip),%rax
mov    (%rax),%edi
lea    0xe08(%rip),%rsi
call   1060 <fprintf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%edx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1050 <test_frustum@plt>
mov    $0x1,%ebx
test   %eax,%eax
jne    1178 <main+0x28>
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
lea    0xe8f(%rip),%rsi
call   1060 <fprintf@plt>
xor    %ebx,%ebx
xor    %eax,%eax
call   1070 <test_mult_m4m4@plt>
test   %eax,%eax
jne    119a <main+0x4a>
mov    0x2e56(%rip),%rax
mov    (%rax),%edi
lea    0xe8a(%rip),%rsi
call   1060 <fprintf@plt>
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <test_rotate@plt>
test   %eax,%eax
jne    11bc <main+0x6c>
mov    0x2e34(%rip),%rax
mov    (%rax),%edi
lea    0xe87(%rip),%rsi
call   1060 <fprintf@plt>
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <test_translate@plt>
test   %eax,%eax
jne    11de <main+0x8e>
mov    0x2e12(%rip),%rax
mov    (%rax),%edi
lea    0xe81(%rip),%rsi
call   1060 <fprintf@plt>
xor    %ebx,%ebx
xor    %eax,%eax
test   %ebx,%ebx
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [29 x i8] c"test failed: test_frustum()\0A\00"
@.str.1 = [31 x i8] c"test failed: test_mult_m4m4()\0A\00"
@.str.2 = [28 x i8] c"test failed: test_rotate()\0A\00"
@.str.3 = [31 x i8] c"test failed: test_translate()\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %6
br label %7
7: ; preds = %2
%8 = call i32 (...) @test_frustum()
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = load i32, i32* @stderr
%13 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %6
br label %14
14: ; preds = %11, %7
br label %15
15: ; preds = %14
%16 = call i32 (...) @test_mult_m4m4()
%17 = icmp ne i32 %16, 0
%18 = xor i1 %17, true
br i1 %18, label %19, label %22
19: ; preds = %15
%20 = load i32, i32* @stderr
%21 = call i32 @fprintf(i32 %20, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %6
br label %22
22: ; preds = %19, %15
br label %23
23: ; preds = %22
%24 = call i32 (...) @test_rotate()
%25 = icmp ne i32 %24, 0
%26 = xor i1 %25, true
br i1 %26, label %27, label %30
27: ; preds = %23
%28 = load i32, i32* @stderr
%29 = call i32 @fprintf(i32 %28, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %6
br label %30
30: ; preds = %27, %23
br label %31
31: ; preds = %30
%32 = call i32 (...) @test_translate()
%33 = icmp ne i32 %32, 0
%34 = xor i1 %33, true
br i1 %34, label %35, label %38
35: ; preds = %31
%36 = load i32, i32* @stderr
%37 = call i32 @fprintf(i32 %36, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %6
br label %38
38: ; preds = %35, %31
%39 = load i32, i32* %6
%40 = icmp ne i32 %39, 0
%41 = zext i1 %40 to i64
%42 = select i1 %40, i32 0, i32 1
ret i32 %42
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [29 x i8] c"test failed: test_frustum()\0A\00"
@.str.1 = [31 x i8] c"test failed: test_mult_m4m4()\0A\00"
@.str.2 = [28 x i8] c"test failed: test_rotate()\0A\00"
@.str.3 = [31 x i8] c"test failed: test_translate()\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_frustum()
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %5
%9 = phi i32 [ 0, %5 ], [ 1, %2 ]
%10 = tail call i32 (...) @test_mult_m4m4()
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %8
%13 = load i32, i32* @stderr
%14 = tail call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
br label %15
15: ; preds = %8, %12
%16 = phi i32 [ 0, %12 ], [ %9, %8 ]
%17 = tail call i32 (...) @test_rotate()
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %22
19: ; preds = %15
%20 = load i32, i32* @stderr
%21 = tail call i32 @fprintf(i32 %20, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
br label %22
22: ; preds = %15, %19
%23 = phi i32 [ 0, %19 ], [ %16, %15 ]
%24 = tail call i32 (...) @test_translate()
%25 = icmp eq i32 %24, 0
br i1 %25, label %26, label %29
26: ; preds = %22
%27 = load i32, i32* @stderr
%28 = tail call i32 @fprintf(i32 %27, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
br label %29
29: ; preds = %26, %22
%30 = phi i32 [ 0, %26 ], [ %23, %22 ]
%31 = icmp eq i32 %30, 0
%32 = zext i1 %31 to i32
ret i32 %32
}