#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 */
scalar_t__ add();
scalar_t__ copy();
scalar_t__ equals();
scalar_t__ init();
scalar_t__ sub();
int main(void) {
  int _exit = 0;
  if (init()) {
    _exit = 1;
  };
  if (copy()) {
    _exit = 1;
  };
  if (equals()) {
    _exit = 1;
  };
  if (add()) {
    _exit = 1;
  };
  if (sub()) {
    _exit = 1;
  };
  return _exit;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1050 <init@plt>
cmp    $0x0,%rax
je     117e <main+0x2e>
movl   $0x1,-0x8(%rbp)
mov    $0x0,%al
call   1040 <copy@plt>
cmp    $0x0,%rax
je     1196 <main+0x46>
movl   $0x1,-0x8(%rbp)
mov    $0x0,%al
call   1060 <equals@plt>
cmp    $0x0,%rax
je     11ae <main+0x5e>
movl   $0x1,-0x8(%rbp)
mov    $0x0,%al
call   1030 <add@plt>
cmp    $0x0,%rax
je     11c6 <main+0x76>
movl   $0x1,-0x8(%rbp)
mov    $0x0,%al
call   1070 <sub@plt>
cmp    $0x0,%rax
je     11de <main+0x8e>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <init@plt>
mov    %rax,%r14
xor    %eax,%eax
call   1040 <copy@plt>
mov    %rax,%r15
xor    %eax,%eax
call   1060 <equals@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <add@plt>
mov    %rax,%r12
xor    %eax,%eax
call   1070 <sub@plt>
or     %r12,%rax
or     %r15,%rbx
or     %rax,%rbx
xor    %eax,%eax
or     %r14,%rbx
setne  %al
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i64 (...) @init()
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
store i32 1, i32* %2
br label %6
6: ; preds = %5, %0
%7 = call i64 (...) @copy()
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %6
store i32 1, i32* %2
br label %10
10: ; preds = %9, %6
%11 = call i64 (...) @equals()
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %10
store i32 1, i32* %2
br label %14
14: ; preds = %13, %10
%15 = call i64 (...) @add()
%16 = icmp ne i64 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %14
store i32 1, i32* %2
br label %18
18: ; preds = %17, %14
%19 = call i64 (...) @sub()
%20 = icmp ne i64 %19, 0
br i1 %20, label %21, label %22
21: ; preds = %18
store i32 1, i32* %2
br label %22
22: ; preds = %21, %18
%23 = load i32, i32* %2
ret i32 %23
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @init()
%2 = icmp ne i64 %1, 0
%3 = tail call i64 (...) @copy()
%4 = icmp ne i64 %3, 0
%5 = tail call i64 (...) @equals()
%6 = icmp ne i64 %5, 0
%7 = tail call i64 (...) @add()
%8 = icmp ne i64 %7, 0
%9 = tail call i64 (...) @sub()
%10 = icmp ne i64 %9, 0
%11 = select i1 %10, i1 true, i1 %8
%12 = select i1 %11, i1 true, i1 %6
%13 = select i1 %12, i1 true, i1 %4
%14 = select i1 %13, i1 true, i1 %2
%15 = zext i1 %14 to i32
ret i32 %15
}