#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*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int fac(int);
int fib(int);
int pow2m1(int);
int sq_sum(int);
int sum(int);
int main(void) {
  if (sum(5) != 15)
    abort();
  if (fac(5) != 120)
    abort();
  if (sq_sum(5) != 55)
    abort();
  if (pow2m1(5) != 31)
    abort();
  if (fib(5) != 8)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x5,%edi
call   1070 <sum@plt>
cmp    $0xf,%eax
je     1199 <main+0x29>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x5,%edi
call   1050 <fac@plt>
cmp    $0x78,%eax
je     11b3 <main+0x43>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x5,%edi
call   1060 <sq_sum@plt>
cmp    $0x37,%eax
je     11cd <main+0x5d>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x5,%edi
call   1040 <pow2m1@plt>
cmp    $0x1f,%eax
je     11e7 <main+0x77>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x5,%edi
call   1080 <fib@plt>
cmp    $0x8,%eax
je     1201 <main+0x91>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1090 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1070 <sum@plt>
cmp    $0xf,%eax
jne    11c3 <main+0x53>
mov    $0x5,%edi
call   1050 <fac@plt>
cmp    $0x78,%eax
jne    11c3 <main+0x53>
mov    $0x5,%edi
call   1060 <sq_sum@plt>
cmp    $0x37,%eax
jne    11c3 <main+0x53>
mov    $0x5,%edi
call   1040 <pow2m1@plt>
cmp    $0x1f,%eax
jne    11c3 <main+0x53>
mov    $0x5,%edi
call   1080 <fib@plt>
cmp    $0x8,%eax
jne    11c3 <main+0x53>
xor    %edi,%edi
call   1090 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @sum(i32 5)
%3 = icmp ne i32 %2, 15
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @fac(i32 5)
%8 = icmp ne i32 %7, 120
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %6
%12 = call i32 @sq_sum(i32 5)
%13 = icmp ne i32 %12, 55
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 (...) @abort()
unreachable
16: ; preds = %11
%17 = call i32 @pow2m1(i32 5)
%18 = icmp ne i32 %17, 31
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = call i32 (...) @abort()
unreachable
21: ; preds = %16
%22 = call i32 @fib(i32 5)
%23 = icmp ne i32 %22, 8
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = call i32 (...) @abort()
unreachable
26: ; preds = %21
%27 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @sum(i32 5)
%2 = icmp eq i32 %1, 15
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @fac(i32 5)
%7 = icmp eq i32 %6, 120
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 (...) @abort()
unreachable
10: ; preds = %5
%11 = tail call i32 @sq_sum(i32 5)
%12 = icmp eq i32 %11, 55
br i1 %12, label %15, label %13
13: ; preds = %10
%14 = tail call i32 (...) @abort()
unreachable
15: ; preds = %10
%16 = tail call i32 @pow2m1(i32 5)
%17 = icmp eq i32 %16, 31
br i1 %17, label %20, label %18
18: ; preds = %15
%19 = tail call i32 (...) @abort()
unreachable
20: ; preds = %15
%21 = tail call i32 @fib(i32 5)
%22 = icmp eq i32 %21, 8
br i1 %22, label %25, label %23
23: ; preds = %20
%24 = tail call i32 (...) @abort()
unreachable
25: ; preds = %20
%26 = tail call i32 @exit(i32 0)
unreachable
}