#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*/ printf(char *, int);
scalar_t__ test_compares();
scalar_t__ test_constants();
scalar_t__ test_defined();
scalar_t__ test_errs();
scalar_t__ test_exception();
int main(int ac, char *av[]) {
  int errs = 0;
  errs += test_constants();
  errs += test_compares();
  errs += test_defined();
  errs += test_errs();
  errs += test_exception();
  printf("%d errs!\n", errs);
  return errs + 55;
}


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   1080 <test_constants@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1050 <test_compares@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1040 <test_defined@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1070 <test_errs@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1060 <test_exception@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe15(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x37,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
xor    %eax,%eax
call   1080 <test_constants@plt>
mov    %rax,%r14
xor    %eax,%eax
call   1050 <test_compares@plt>
mov    %rax,%r15
add    %r14d,%r15d
xor    %eax,%eax
call   1040 <test_defined@plt>
mov    %rax,%rbx
add    %r15d,%ebx
xor    %eax,%eax
call   1070 <test_errs@plt>
mov    %rax,%r14
add    %ebx,%r14d
xor    %eax,%eax
call   1060 <test_exception@plt>
mov    %rax,%rbx
lea    (%r14,%rax,1),%esi
lea    0xe55(%rip),%rdi
call   1030 <printf@plt>
lea    (%rbx,%r14,1),%eax
add    $0x37,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%d errs!\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 0, i32* %6
%7 = call i64 (...) @test_constants()
%8 = load i32, i32* %6
%9 = sext i32 %8 to i64
%10 = add nsw i64 %9, %7
%11 = trunc i64 %10 to i32
store i32 %11, i32* %6
%12 = call i64 (...) @test_compares()
%13 = load i32, i32* %6
%14 = sext i32 %13 to i64
%15 = add nsw i64 %14, %12
%16 = trunc i64 %15 to i32
store i32 %16, i32* %6
%17 = call i64 (...) @test_defined()
%18 = load i32, i32* %6
%19 = sext i32 %18 to i64
%20 = add nsw i64 %19, %17
%21 = trunc i64 %20 to i32
store i32 %21, i32* %6
%22 = call i64 (...) @test_errs()
%23 = load i32, i32* %6
%24 = sext i32 %23 to i64
%25 = add nsw i64 %24, %22
%26 = trunc i64 %25 to i32
store i32 %26, i32* %6
%27 = call i64 (...) @test_exception()
%28 = load i32, i32* %6
%29 = sext i32 %28 to i64
%30 = add nsw i64 %29, %27
%31 = trunc i64 %30 to i32
store i32 %31, i32* %6
%32 = load i32, i32* %6
%33 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %32)
%34 = load i32, i32* %6
%35 = add nsw i32 %34, 55
ret i32 %35
}

LLVM IR (-O2):
@.str = [10 x i8] c"%d errs!\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 (...) @test_constants()
%4 = tail call i64 (...) @test_compares()
%5 = add i64 %4, %3
%6 = tail call i64 (...) @test_defined()
%7 = add i64 %5, %6
%8 = tail call i64 (...) @test_errs()
%9 = add i64 %7, %8
%10 = tail call i64 (...) @test_exception()
%11 = add i64 %9, %10
%12 = trunc i64 %11 to i32
%13 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %12)
%14 = add nsw i32 %12, 55
ret i32 %14
}