#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 f1(int);
int f2(int);
int f3(int);
int f4(int);
int f5(int);
int f6(int);
int f7(int);
int f8(int);
int main() {
  if (f1(5) != 5 || f1(-5) != 4 || f1(0) != 0)
    abort();
  if (f2(5) != -6 || f2(-5) != -5 || f2(0) != -1)
    abort();
  if (f3(5) != 5 || f3(-5) != 4 || f3(0) != -1)
    abort();
  if (f4(5) != -6 || f4(-5) != -5 || f4(0) != 0)
    abort();
  if (f5(5) != -6 || f5(-5) != -5 || f5(0) != -1)
    abort();
  if (f6(5) != 5 || f6(-5) != 4 || f6(0) != 0)
    abort();
  if (f7(5) != -6 || f7(-5) != -5 || f7(0) != 0)
    abort();
  if (f8(5) != 5 || f8(-5) != 4 || f8(0) != -1)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x5,%edi
call   1080 <f1@plt>
cmp    $0x5,%eax
jne    11d5 <main+0x45>
mov    $0xfffffffb,%edi
call   1080 <f1@plt>
cmp    $0x4,%eax
jne    11d5 <main+0x45>
xor    %edi,%edi
call   1080 <f1@plt>
cmp    $0x0,%eax
je     11dc <main+0x4c>
mov    $0x0,%al
call   1060 <abort@plt>
mov    $0x5,%edi
call   1030 <f2@plt>
cmp    $0xfffffffa,%eax
jne    1212 <main+0x82>
mov    $0xfffffffb,%edi
call   1030 <f2@plt>
cmp    $0xfffffffb,%eax
jne    1212 <main+0x82>
xor    %edi,%edi
call   1030 <f2@plt>
cmp    $0xffffffff,%eax
je     1219 <main+0x89>
mov    $0x0,%al
call   1060 <abort@plt>
mov    $0x5,%edi
call   1070 <f3@plt>
cmp    $0x5,%eax
jne    124f <main+0xbf>
mov    $0xfffffffb,%edi
call   1070 <f3@plt>
cmp    $0x4,%eax
jne    124f <main+0xbf>
xor    %edi,%edi
call   1070 <f3@plt>
cmp    $0xffffffff,%eax
je     1256 <main+0xc6>
mov    $0x0,%al
call   1060 <abort@plt>
mov    $0x5,%edi
call   10b0 <f4@plt>
cmp    $0xfffffffa,%eax
jne    128c <main+0xfc>
mov    $0xfffffffb,%edi
call   10b0 <f4@plt>
cmp    $0xfffffffb,%eax
jne    128c <main+0xfc>
xor    %edi,%edi
call   10b0 <f4@plt>
cmp    $0x0,%eax
je     1293 <main+0x103>
mov    $0x0,%al
call   1060 <abort@plt>
mov    $0x5,%edi
call   10a0 <f5@plt>
cmp    $0xfffffffa,%eax
jne    12c9 <main+0x139>
mov    $0xfffffffb,%edi
call   10a0 <f5@plt>
cmp    $0xfffffffb,%eax
jne    12c9 <main+0x139>
xor    %edi,%edi
call   10a0 <f5@plt>
cmp    $0xffffffff,%eax
je     12d0 <main+0x140>
mov    $0x0,%al
call   1060 <abort@plt>
mov    $0x5,%edi
call   1050 <f6@plt>
cmp    $0x5,%eax
jne    1306 <main+0x176>
mov    $0xfffffffb,%edi
call   1050 <f6@plt>
cmp    $0x4,%eax
jne    1306 <main+0x176>
xor    %edi,%edi
call   1050 <f6@plt>
cmp    $0x0,%eax
je     130d <main+0x17d>
mov    $0x0,%al
call   1060 <abort@plt>
mov    $0x5,%edi
call   1090 <f7@plt>
cmp    $0xfffffffa,%eax
jne    1343 <main+0x1b3>
mov    $0xfffffffb,%edi
call   1090 <f7@plt>
cmp    $0xfffffffb,%eax
jne    1343 <main+0x1b3>
xor    %edi,%edi
call   1090 <f7@plt>
cmp    $0x0,%eax
je     134a <main+0x1ba>
mov    $0x0,%al
call   1060 <abort@plt>
mov    $0x5,%edi
call   1040 <f8@plt>
cmp    $0x5,%eax
jne    1380 <main+0x1f0>
mov    $0xfffffffb,%edi
call   1040 <f8@plt>
cmp    $0x4,%eax
jne    1380 <main+0x1f0>
xor    %edi,%edi
call   1040 <f8@plt>
cmp    $0xffffffff,%eax
je     1387 <main+0x1f7>
mov    $0x0,%al
call   1060 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1080 <f1@plt>
cmp    $0x5,%eax
jne    131d <main+0x18d>
mov    $0xfffffffb,%edi
call   1080 <f1@plt>
cmp    $0x4,%eax
jne    131d <main+0x18d>
xor    %edi,%edi
call   1080 <f1@plt>
test   %eax,%eax
jne    131d <main+0x18d>
mov    $0x5,%edi
call   1030 <f2@plt>
cmp    $0xfffffffa,%eax
jne    131d <main+0x18d>
mov    $0xfffffffb,%edi
call   1030 <f2@plt>
cmp    $0xfffffffb,%eax
jne    131d <main+0x18d>
xor    %edi,%edi
call   1030 <f2@plt>
cmp    $0xffffffff,%eax
jne    131d <main+0x18d>
mov    $0x5,%edi
call   1070 <f3@plt>
cmp    $0x5,%eax
jne    131d <main+0x18d>
mov    $0xfffffffb,%edi
call   1070 <f3@plt>
cmp    $0x4,%eax
jne    131d <main+0x18d>
xor    %edi,%edi
call   1070 <f3@plt>
cmp    $0xffffffff,%eax
jne    131d <main+0x18d>
mov    $0x5,%edi
call   10b0 <f4@plt>
cmp    $0xfffffffa,%eax
jne    131d <main+0x18d>
mov    $0xfffffffb,%edi
call   10b0 <f4@plt>
cmp    $0xfffffffb,%eax
jne    131d <main+0x18d>
xor    %edi,%edi
call   10b0 <f4@plt>
test   %eax,%eax
jne    131d <main+0x18d>
mov    $0x5,%edi
call   10a0 <f5@plt>
cmp    $0xfffffffa,%eax
jne    131d <main+0x18d>
mov    $0xfffffffb,%edi
call   10a0 <f5@plt>
cmp    $0xfffffffb,%eax
jne    131d <main+0x18d>
xor    %edi,%edi
call   10a0 <f5@plt>
cmp    $0xffffffff,%eax
jne    131d <main+0x18d>
mov    $0x5,%edi
call   1050 <f6@plt>
cmp    $0x5,%eax
jne    131d <main+0x18d>
mov    $0xfffffffb,%edi
call   1050 <f6@plt>
cmp    $0x4,%eax
jne    131d <main+0x18d>
xor    %edi,%edi
call   1050 <f6@plt>
test   %eax,%eax
jne    131d <main+0x18d>
mov    $0x5,%edi
call   1090 <f7@plt>
cmp    $0xfffffffa,%eax
jne    131d <main+0x18d>
mov    $0xfffffffb,%edi
call   1090 <f7@plt>
cmp    $0xfffffffb,%eax
jne    131d <main+0x18d>
xor    %edi,%edi
call   1090 <f7@plt>
test   %eax,%eax
jne    131d <main+0x18d>
mov    $0x5,%edi
call   1040 <f8@plt>
cmp    $0x5,%eax
jne    131d <main+0x18d>
mov    $0xfffffffb,%edi
call   1040 <f8@plt>
cmp    $0x4,%eax
jne    131d <main+0x18d>
xor    %edi,%edi
call   1040 <f8@plt>
cmp    $0xffffffff,%eax
jne    131d <main+0x18d>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1060 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @f1(i32 5)
%3 = icmp ne i32 %2, 5
br i1 %3, label %10, label %4
4: ; preds = %0
%5 = call i32 @f1(i32 -5)
%6 = icmp ne i32 %5, 4
br i1 %6, label %10, label %7
7: ; preds = %4
%8 = call i32 @f1(i32 0)
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %7, %4, %0
%11 = call i32 (...) @abort()
unreachable
12: ; preds = %7
%13 = call i32 @f2(i32 5)
%14 = icmp ne i32 %13, -6
br i1 %14, label %21, label %15
15: ; preds = %12
%16 = call i32 @f2(i32 -5)
%17 = icmp ne i32 %16, -5
br i1 %17, label %21, label %18
18: ; preds = %15
%19 = call i32 @f2(i32 0)
%20 = icmp ne i32 %19, -1
br i1 %20, label %21, label %23
21: ; preds = %18, %15, %12
%22 = call i32 (...) @abort()
unreachable
23: ; preds = %18
%24 = call i32 @f3(i32 5)
%25 = icmp ne i32 %24, 5
br i1 %25, label %32, label %26
26: ; preds = %23
%27 = call i32 @f3(i32 -5)
%28 = icmp ne i32 %27, 4
br i1 %28, label %32, label %29
29: ; preds = %26
%30 = call i32 @f3(i32 0)
%31 = icmp ne i32 %30, -1
br i1 %31, label %32, label %34
32: ; preds = %29, %26, %23
%33 = call i32 (...) @abort()
unreachable
34: ; preds = %29
%35 = call i32 @f4(i32 5)
%36 = icmp ne i32 %35, -6
br i1 %36, label %43, label %37
37: ; preds = %34
%38 = call i32 @f4(i32 -5)
%39 = icmp ne i32 %38, -5
br i1 %39, label %43, label %40
40: ; preds = %37
%41 = call i32 @f4(i32 0)
%42 = icmp ne i32 %41, 0
br i1 %42, label %43, label %45
43: ; preds = %40, %37, %34
%44 = call i32 (...) @abort()
unreachable
45: ; preds = %40
%46 = call i32 @f5(i32 5)
%47 = icmp ne i32 %46, -6
br i1 %47, label %54, label %48
48: ; preds = %45
%49 = call i32 @f5(i32 -5)
%50 = icmp ne i32 %49, -5
br i1 %50, label %54, label %51
51: ; preds = %48
%52 = call i32 @f5(i32 0)
%53 = icmp ne i32 %52, -1
br i1 %53, label %54, label %56
54: ; preds = %51, %48, %45
%55 = call i32 (...) @abort()
unreachable
56: ; preds = %51
%57 = call i32 @f6(i32 5)
%58 = icmp ne i32 %57, 5
br i1 %58, label %65, label %59
59: ; preds = %56
%60 = call i32 @f6(i32 -5)
%61 = icmp ne i32 %60, 4
br i1 %61, label %65, label %62
62: ; preds = %59
%63 = call i32 @f6(i32 0)
%64 = icmp ne i32 %63, 0
br i1 %64, label %65, label %67
65: ; preds = %62, %59, %56
%66 = call i32 (...) @abort()
unreachable
67: ; preds = %62
%68 = call i32 @f7(i32 5)
%69 = icmp ne i32 %68, -6
br i1 %69, label %76, label %70
70: ; preds = %67
%71 = call i32 @f7(i32 -5)
%72 = icmp ne i32 %71, -5
br i1 %72, label %76, label %73
73: ; preds = %70
%74 = call i32 @f7(i32 0)
%75 = icmp ne i32 %74, 0
br i1 %75, label %76, label %78
76: ; preds = %73, %70, %67
%77 = call i32 (...) @abort()
unreachable
78: ; preds = %73
%79 = call i32 @f8(i32 5)
%80 = icmp ne i32 %79, 5
br i1 %80, label %87, label %81
81: ; preds = %78
%82 = call i32 @f8(i32 -5)
%83 = icmp ne i32 %82, 4
br i1 %83, label %87, label %84
84: ; preds = %81
%85 = call i32 @f8(i32 0)
%86 = icmp ne i32 %85, -1
br i1 %86, label %87, label %89
87: ; preds = %84, %81, %78
%88 = call i32 (...) @abort()
unreachable
89: ; preds = %84
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f1(i32 5)
%2 = icmp eq i32 %1, 5
br i1 %2, label %3, label %9
3: ; preds = %0
%4 = tail call i32 @f1(i32 -5)
%5 = icmp eq i32 %4, 4
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i32 @f1(i32 0)
%8 = icmp eq i32 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %6, %3, %0
%10 = tail call i32 (...) @abort()
unreachable
11: ; preds = %6
%12 = tail call i32 @f2(i32 5)
%13 = icmp eq i32 %12, -6
br i1 %13, label %14, label %20
14: ; preds = %11
%15 = tail call i32 @f2(i32 -5)
%16 = icmp eq i32 %15, -5
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = tail call i32 @f2(i32 0)
%19 = icmp eq i32 %18, -1
br i1 %19, label %22, label %20
20: ; preds = %17, %14, %11
%21 = tail call i32 (...) @abort()
unreachable
22: ; preds = %17
%23 = tail call i32 @f3(i32 5)
%24 = icmp eq i32 %23, 5
br i1 %24, label %25, label %31
25: ; preds = %22
%26 = tail call i32 @f3(i32 -5)
%27 = icmp eq i32 %26, 4
br i1 %27, label %28, label %31
28: ; preds = %25
%29 = tail call i32 @f3(i32 0)
%30 = icmp eq i32 %29, -1
br i1 %30, label %33, label %31
31: ; preds = %28, %25, %22
%32 = tail call i32 (...) @abort()
unreachable
33: ; preds = %28
%34 = tail call i32 @f4(i32 5)
%35 = icmp eq i32 %34, -6
br i1 %35, label %36, label %42
36: ; preds = %33
%37 = tail call i32 @f4(i32 -5)
%38 = icmp eq i32 %37, -5
br i1 %38, label %39, label %42
39: ; preds = %36
%40 = tail call i32 @f4(i32 0)
%41 = icmp eq i32 %40, 0
br i1 %41, label %44, label %42
42: ; preds = %39, %36, %33
%43 = tail call i32 (...) @abort()
unreachable
44: ; preds = %39
%45 = tail call i32 @f5(i32 5)
%46 = icmp eq i32 %45, -6
br i1 %46, label %47, label %53
47: ; preds = %44
%48 = tail call i32 @f5(i32 -5)
%49 = icmp eq i32 %48, -5
br i1 %49, label %50, label %53
50: ; preds = %47
%51 = tail call i32 @f5(i32 0)
%52 = icmp eq i32 %51, -1
br i1 %52, label %55, label %53
53: ; preds = %50, %47, %44
%54 = tail call i32 (...) @abort()
unreachable
55: ; preds = %50
%56 = tail call i32 @f6(i32 5)
%57 = icmp eq i32 %56, 5
br i1 %57, label %58, label %64
58: ; preds = %55
%59 = tail call i32 @f6(i32 -5)
%60 = icmp eq i32 %59, 4
br i1 %60, label %61, label %64
61: ; preds = %58
%62 = tail call i32 @f6(i32 0)
%63 = icmp eq i32 %62, 0
br i1 %63, label %66, label %64
64: ; preds = %61, %58, %55
%65 = tail call i32 (...) @abort()
unreachable
66: ; preds = %61
%67 = tail call i32 @f7(i32 5)
%68 = icmp eq i32 %67, -6
br i1 %68, label %69, label %75
69: ; preds = %66
%70 = tail call i32 @f7(i32 -5)
%71 = icmp eq i32 %70, -5
br i1 %71, label %72, label %75
72: ; preds = %69
%73 = tail call i32 @f7(i32 0)
%74 = icmp eq i32 %73, 0
br i1 %74, label %77, label %75
75: ; preds = %72, %69, %66
%76 = tail call i32 (...) @abort()
unreachable
77: ; preds = %72
%78 = tail call i32 @f8(i32 5)
%79 = icmp eq i32 %78, 5
br i1 %79, label %80, label %86
80: ; preds = %77
%81 = tail call i32 @f8(i32 -5)
%82 = icmp eq i32 %81, 4
br i1 %82, label %83, label %86
83: ; preds = %80
%84 = tail call i32 @f8(i32 0)
%85 = icmp eq i32 %84, -1
br i1 %85, label %88, label %86
86: ; preds = %83, %80, %77
%87 = tail call i32 (...) @abort()
unreachable
88: ; preds = %83
ret i32 0
}