#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 f1(long);
int f2(long);
int f3(long);
int f4(long);
int f5(long);
int f6(long);
main() {
  if (f1(5L) != 5)
    abort();
  if (f2(1L) != 0)
    abort();
  if (f2(0L) != 1)
    abort();
  if (f3(5L) != 4)
    abort();
  if (f4(1L) != 1)
    abort();
  if (f4(0L) != 0)
    abort();
  if (f5(-5L) != 4)
    abort();
  if (f6(-1L) != 1)
    abort();
  if (f6(0L) != 0)
    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 <f1@plt>
cmp    $0x5,%eax
je     11a9 <main+0x29>
mov    $0x0,%al
call   1050 <abort@plt>
mov    $0x1,%edi
call   1030 <f2@plt>
cmp    $0x0,%eax
je     11c3 <main+0x43>
mov    $0x0,%al
call   1050 <abort@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1030 <f2@plt>
cmp    $0x1,%eax
je     11dc <main+0x5c>
mov    $0x0,%al
call   1050 <abort@plt>
mov    $0x5,%edi
call   1060 <f3@plt>
cmp    $0x4,%eax
je     11f6 <main+0x76>
mov    $0x0,%al
call   1050 <abort@plt>
mov    $0x1,%edi
call   10a0 <f4@plt>
cmp    $0x1,%eax
je     1210 <main+0x90>
mov    $0x0,%al
call   1050 <abort@plt>
xor    %eax,%eax
mov    %eax,%edi
call   10a0 <f4@plt>
cmp    $0x0,%eax
je     1229 <main+0xa9>
mov    $0x0,%al
call   1050 <abort@plt>
mov    $0xfffffffffffffffb,%rdi
call   1080 <f5@plt>
cmp    $0x4,%eax
je     1245 <main+0xc5>
mov    $0x0,%al
call   1050 <abort@plt>
mov    $0xffffffffffffffff,%rdi
call   1040 <f6@plt>
cmp    $0x1,%eax
je     1261 <main+0xe1>
mov    $0x0,%al
call   1050 <abort@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <f6@plt>
cmp    $0x0,%eax
je     127a <main+0xfa>
mov    $0x0,%al
call   1050 <abort@plt>
xor    %edi,%edi
call   1090 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1070 <f1@plt>
cmp    $0x5,%eax
jne    1207 <main+0x87>
mov    $0x1,%edi
call   1030 <f2@plt>
test   %eax,%eax
jne    1207 <main+0x87>
xor    %edi,%edi
call   1030 <f2@plt>
cmp    $0x1,%eax
jne    1207 <main+0x87>
mov    $0x5,%edi
call   1060 <f3@plt>
cmp    $0x4,%eax
jne    1207 <main+0x87>
mov    $0x1,%edi
call   10a0 <f4@plt>
cmp    $0x1,%eax
jne    1207 <main+0x87>
xor    %edi,%edi
call   10a0 <f4@plt>
test   %eax,%eax
jne    1207 <main+0x87>
mov    $0xfffffffffffffffb,%rdi
call   1080 <f5@plt>
cmp    $0x4,%eax
jne    1207 <main+0x87>
mov    $0xffffffffffffffff,%rdi
call   1040 <f6@plt>
cmp    $0x1,%eax
jne    1207 <main+0x87>
xor    %edi,%edi
call   1040 <f6@plt>
test   %eax,%eax
jne    1207 <main+0x87>
xor    %edi,%edi
call   1090 <exit@plt>
xor    %eax,%eax
call   1050 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @f1(i64 5)
%3 = icmp ne i32 %2, 5
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @f2(i64 1)
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %6
%12 = call i32 @f2(i64 0)
%13 = icmp ne i32 %12, 1
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 (...) @abort()
unreachable
16: ; preds = %11
%17 = call i32 @f3(i64 5)
%18 = icmp ne i32 %17, 4
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = call i32 (...) @abort()
unreachable
21: ; preds = %16
%22 = call i32 @f4(i64 1)
%23 = icmp ne i32 %22, 1
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = call i32 (...) @abort()
unreachable
26: ; preds = %21
%27 = call i32 @f4(i64 0)
%28 = icmp ne i32 %27, 0
br i1 %28, label %29, label %31
29: ; preds = %26
%30 = call i32 (...) @abort()
unreachable
31: ; preds = %26
%32 = call i32 @f5(i64 -5)
%33 = icmp ne i32 %32, 4
br i1 %33, label %34, label %36
34: ; preds = %31
%35 = call i32 (...) @abort()
unreachable
36: ; preds = %31
%37 = call i32 @f6(i64 -1)
%38 = icmp ne i32 %37, 1
br i1 %38, label %39, label %41
39: ; preds = %36
%40 = call i32 (...) @abort()
unreachable
41: ; preds = %36
%42 = call i32 @f6(i64 0)
%43 = icmp ne i32 %42, 0
br i1 %43, label %44, label %46
44: ; preds = %41
%45 = call i32 (...) @abort()
unreachable
46: ; preds = %41
%47 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f1(i64 5)
%2 = icmp eq i32 %1, 5
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @f2(i64 1)
%7 = icmp eq i32 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 (...) @abort()
unreachable
10: ; preds = %5
%11 = tail call i32 @f2(i64 0)
%12 = icmp eq i32 %11, 1
br i1 %12, label %15, label %13
13: ; preds = %10
%14 = tail call i32 (...) @abort()
unreachable
15: ; preds = %10
%16 = tail call i32 @f3(i64 5)
%17 = icmp eq i32 %16, 4
br i1 %17, label %20, label %18
18: ; preds = %15
%19 = tail call i32 (...) @abort()
unreachable
20: ; preds = %15
%21 = tail call i32 @f4(i64 1)
%22 = icmp eq i32 %21, 1
br i1 %22, label %25, label %23
23: ; preds = %20
%24 = tail call i32 (...) @abort()
unreachable
25: ; preds = %20
%26 = tail call i32 @f4(i64 0)
%27 = icmp eq i32 %26, 0
br i1 %27, label %30, label %28
28: ; preds = %25
%29 = tail call i32 (...) @abort()
unreachable
30: ; preds = %25
%31 = tail call i32 @f5(i64 -5)
%32 = icmp eq i32 %31, 4
br i1 %32, label %35, label %33
33: ; preds = %30
%34 = tail call i32 (...) @abort()
unreachable
35: ; preds = %30
%36 = tail call i32 @f6(i64 -1)
%37 = icmp eq i32 %36, 1
br i1 %37, label %40, label %38
38: ; preds = %35
%39 = tail call i32 (...) @abort()
unreachable
40: ; preds = %35
%41 = tail call i32 @f6(i64 0)
%42 = icmp eq i32 %41, 0
br i1 %42, label %45, label %43
43: ; preds = %40
%44 = tail call i32 (...) @abort()
unreachable
45: ; preds = %40
%46 = tail call i32 @exit(i32 0)
unreachable
}