#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*/ stdout;
int /*<<< orphan*/ test_benchmark();
int /*<<< orphan*/ test_extract();
int /*<<< orphan*/ test_homo();
int /*<<< orphan*/ test_inversion();
int /*<<< orphan*/ test_matrix();
int /*<<< orphan*/ test_movement();
int /*<<< orphan*/ test_rotation();
int /*<<< orphan*/ test_scara();
int /*<<< orphan*/ test_solve();
int /*<<< orphan*/ test_stress(int);
int /*<<< orphan*/ test_translation();
int /*<<< orphan*/ test_vector();
int main(int argc, char *argv[]) {
  int ret;
  (void)argc;
  (void)argv;
  ret = 0;
  ret += !!test_vector();
  ret += !!test_matrix();
  ret += !!test_translation();
  ret += !!test_rotation();
  ret += !!test_movement();
  ret += !!test_homo();
  ret += !!test_scara();
  ret += !!test_inversion();
  ret += !!test_extract();
  ret += !!test_benchmark();
  ret += !!test_solve();
  ret += !!test_stress(100000);
  if (ret == 0) {
    fprintf(stdout, "All tests passed.\n");
  }
  return ret;
}


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   $0x0,-0x14(%rbp)
mov    $0x0,%al
call   1070 <test_vector@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   10d0 <test_matrix@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1080 <test_translation@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   10f0 <test_rotation@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   10e0 <test_movement@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1090 <test_homo@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1030 <test_scara@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   10b0 <test_inversion@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1050 <test_extract@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1060 <test_benchmark@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1040 <test_solve@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x186a0,%edi
call   10c0 <test_stress@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    135f <main+0x18f>
mov    0x2c8f(%rip),%rax
mov    (%rax),%edi
lea    0xca6(%rip),%rsi
call   10a0 <fprintf@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1070 <test_vector@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   10d0 <test_matrix@plt>
xor    %ebp,%ebp
test   %eax,%eax
setne  %bpl
cmp    $0x1,%ebx
sbb    $0xffffffff,%ebp
xor    %eax,%eax
call   1080 <test_translation@plt>
cmp    $0x1,%eax
sbb    $0xffffffff,%ebp
xor    %eax,%eax
call   10f0 <test_rotation@plt>
cmp    $0x1,%eax
sbb    $0xffffffff,%ebp
xor    %eax,%eax
call   10e0 <test_movement@plt>
cmp    $0x1,%eax
sbb    $0xffffffff,%ebp
xor    %eax,%eax
call   1090 <test_homo@plt>
cmp    $0x1,%eax
sbb    $0xffffffff,%ebp
xor    %eax,%eax
call   1030 <test_scara@plt>
cmp    $0x1,%eax
sbb    $0xffffffff,%ebp
xor    %eax,%eax
call   10b0 <test_inversion@plt>
cmp    $0x1,%eax
sbb    $0xffffffff,%ebp
xor    %eax,%eax
call   1050 <test_extract@plt>
cmp    $0x1,%eax
sbb    $0xffffffff,%ebp
xor    %eax,%eax
call   1060 <test_benchmark@plt>
cmp    $0x1,%eax
sbb    $0xffffffff,%ebp
xor    %eax,%eax
call   1040 <test_solve@plt>
cmp    $0x1,%eax
sbb    $0xffffffff,%ebp
mov    $0x186a0,%edi
call   10c0 <test_stress@plt>
xor    %ebx,%ebx
test   %eax,%eax
setne  %bl
add    %ebp,%ebx
jne    1290 <main+0xc0>
mov    0x2d5e(%rip),%rax
mov    (%rax),%edi
lea    0xd75(%rip),%rsi
call   10a0 <fprintf@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [19 x i8] c"All tests passed.\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
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
store i32 0, i32* %6
%9 = call i32 (...) @test_vector()
%10 = icmp ne i32 %9, 0
%11 = xor i1 %10, true
%12 = xor i1 %11, true
%13 = zext i1 %12 to i32
%14 = load i32, i32* %6
%15 = add nsw i32 %14, %13
store i32 %15, i32* %6
%16 = call i32 (...) @test_matrix()
%17 = icmp ne i32 %16, 0
%18 = xor i1 %17, true
%19 = xor i1 %18, true
%20 = zext i1 %19 to i32
%21 = load i32, i32* %6
%22 = add nsw i32 %21, %20
store i32 %22, i32* %6
%23 = call i32 (...) @test_translation()
%24 = icmp ne i32 %23, 0
%25 = xor i1 %24, true
%26 = xor i1 %25, true
%27 = zext i1 %26 to i32
%28 = load i32, i32* %6
%29 = add nsw i32 %28, %27
store i32 %29, i32* %6
%30 = call i32 (...) @test_rotation()
%31 = icmp ne i32 %30, 0
%32 = xor i1 %31, true
%33 = xor i1 %32, true
%34 = zext i1 %33 to i32
%35 = load i32, i32* %6
%36 = add nsw i32 %35, %34
store i32 %36, i32* %6
%37 = call i32 (...) @test_movement()
%38 = icmp ne i32 %37, 0
%39 = xor i1 %38, true
%40 = xor i1 %39, true
%41 = zext i1 %40 to i32
%42 = load i32, i32* %6
%43 = add nsw i32 %42, %41
store i32 %43, i32* %6
%44 = call i32 (...) @test_homo()
%45 = icmp ne i32 %44, 0
%46 = xor i1 %45, true
%47 = xor i1 %46, true
%48 = zext i1 %47 to i32
%49 = load i32, i32* %6
%50 = add nsw i32 %49, %48
store i32 %50, i32* %6
%51 = call i32 (...) @test_scara()
%52 = icmp ne i32 %51, 0
%53 = xor i1 %52, true
%54 = xor i1 %53, true
%55 = zext i1 %54 to i32
%56 = load i32, i32* %6
%57 = add nsw i32 %56, %55
store i32 %57, i32* %6
%58 = call i32 (...) @test_inversion()
%59 = icmp ne i32 %58, 0
%60 = xor i1 %59, true
%61 = xor i1 %60, true
%62 = zext i1 %61 to i32
%63 = load i32, i32* %6
%64 = add nsw i32 %63, %62
store i32 %64, i32* %6
%65 = call i32 (...) @test_extract()
%66 = icmp ne i32 %65, 0
%67 = xor i1 %66, true
%68 = xor i1 %67, true
%69 = zext i1 %68 to i32
%70 = load i32, i32* %6
%71 = add nsw i32 %70, %69
store i32 %71, i32* %6
%72 = call i32 (...) @test_benchmark()
%73 = icmp ne i32 %72, 0
%74 = xor i1 %73, true
%75 = xor i1 %74, true
%76 = zext i1 %75 to i32
%77 = load i32, i32* %6
%78 = add nsw i32 %77, %76
store i32 %78, i32* %6
%79 = call i32 (...) @test_solve()
%80 = icmp ne i32 %79, 0
%81 = xor i1 %80, true
%82 = xor i1 %81, true
%83 = zext i1 %82 to i32
%84 = load i32, i32* %6
%85 = add nsw i32 %84, %83
store i32 %85, i32* %6
%86 = call i32 @test_stress(i32 100000)
%87 = icmp ne i32 %86, 0
%88 = xor i1 %87, true
%89 = xor i1 %88, true
%90 = zext i1 %89 to i32
%91 = load i32, i32* %6
%92 = add nsw i32 %91, %90
store i32 %92, i32* %6
%93 = load i32, i32* %6
%94 = icmp eq i32 %93, 0
br i1 %94, label %95, label %98
95: ; preds = %2
%96 = load i32, i32* @stdout
%97 = call i32 @fprintf(i32 %96, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %98
98: ; preds = %95, %2
%99 = load i32, i32* %6
ret i32 %99
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [19 x i8] c"All tests passed.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_vector()
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i32
%6 = tail call i32 (...) @test_matrix()
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i32
%9 = add nuw nsw i32 %8, %5
%10 = tail call i32 (...) @test_translation()
%11 = icmp ne i32 %10, 0
%12 = zext i1 %11 to i32
%13 = add nuw nsw i32 %9, %12
%14 = tail call i32 (...) @test_rotation()
%15 = icmp ne i32 %14, 0
%16 = zext i1 %15 to i32
%17 = add nuw nsw i32 %13, %16
%18 = tail call i32 (...) @test_movement()
%19 = icmp ne i32 %18, 0
%20 = zext i1 %19 to i32
%21 = add nuw nsw i32 %17, %20
%22 = tail call i32 (...) @test_homo()
%23 = icmp ne i32 %22, 0
%24 = zext i1 %23 to i32
%25 = add nuw nsw i32 %21, %24
%26 = tail call i32 (...) @test_scara()
%27 = icmp ne i32 %26, 0
%28 = zext i1 %27 to i32
%29 = add nuw nsw i32 %25, %28
%30 = tail call i32 (...) @test_inversion()
%31 = icmp ne i32 %30, 0
%32 = zext i1 %31 to i32
%33 = add nuw nsw i32 %29, %32
%34 = tail call i32 (...) @test_extract()
%35 = icmp ne i32 %34, 0
%36 = zext i1 %35 to i32
%37 = add nuw nsw i32 %33, %36
%38 = tail call i32 (...) @test_benchmark()
%39 = icmp ne i32 %38, 0
%40 = zext i1 %39 to i32
%41 = add nuw nsw i32 %37, %40
%42 = tail call i32 (...) @test_solve()
%43 = icmp ne i32 %42, 0
%44 = zext i1 %43 to i32
%45 = add nuw nsw i32 %41, %44
%46 = tail call i32 @test_stress(i32 100000)
%47 = icmp ne i32 %46, 0
%48 = zext i1 %47 to i32
%49 = add nuw nsw i32 %45, %48
%50 = icmp eq i32 %49, 0
br i1 %50, label %51, label %54
51: ; preds = %2
%52 = load i32, i32* @stdout
%53 = tail call i32 @fprintf(i32 %52, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %54
54: ; preds = %51, %2
ret i32 %49
}