#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*/ _exit(int);
scalar_t__ test1(int);
scalar_t__ test1u(int);
int test2(int);
int test2u(int);
int test3(int);
int test3u(int);
int test4(int);
int test4u(int);
scalar_t__ test5(int);
scalar_t__ test5u(int);
scalar_t__ test6(int);
scalar_t__ test6u(int);
int main() {
  int c;
  for (c = -128; c < 256; c++) {
    if (test1(c) != 0)
      _exit(-1);
    if (test1u(c) != 0)
      _exit(-2);
    if (test2(c) != 1)
      _exit(-3);
    if (test2u(c) != 1)
      _exit(-4);
    if (test3(c) != 1)
      _exit(-5);
    if (test3u(c) != 1)
      _exit(-6);
    if (test4(c) != 1)
      _exit(-7);
    if (test4u(c) != 1)
      _exit(-8);
    if (test5(c) != 0)
      _exit(-9);
    if (test5u(c) != 0)
      _exit(-10);
    if (test6(c) != 0)
      _exit(-11);
    if (test6u(c) != 0)
      _exit(-12);
  }
  _exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xffffff80,-0x8(%rbp)
cmpl   $0x100,-0x8(%rbp)
jge    1350 <main+0x180>
mov    -0x8(%rbp),%edi
call   1070 <test1@plt>
cmp    $0x0,%rax
je     120f <main+0x3f>
mov    $0xffffffff,%edi
call   1030 <_exit@plt>
mov    -0x8(%rbp),%edi
call   10e0 <test1u@plt>
cmp    $0x0,%rax
je     122b <main+0x5b>
mov    $0xfffffffe,%edi
call   1030 <_exit@plt>
mov    -0x8(%rbp),%edi
call   10c0 <test2@plt>
cmp    $0x1,%eax
je     1246 <main+0x76>
mov    $0xfffffffd,%edi
call   1030 <_exit@plt>
mov    -0x8(%rbp),%edi
call   1090 <test2u@plt>
cmp    $0x1,%eax
je     1261 <main+0x91>
mov    $0xfffffffc,%edi
call   1030 <_exit@plt>
mov    -0x8(%rbp),%edi
call   1060 <test3@plt>
cmp    $0x1,%eax
je     127c <main+0xac>
mov    $0xfffffffb,%edi
call   1030 <_exit@plt>
mov    -0x8(%rbp),%edi
call   1040 <test3u@plt>
cmp    $0x1,%eax
je     1297 <main+0xc7>
mov    $0xfffffffa,%edi
call   1030 <_exit@plt>
mov    -0x8(%rbp),%edi
call   10b0 <test4@plt>
cmp    $0x1,%eax
je     12b2 <main+0xe2>
mov    $0xfffffff9,%edi
call   1030 <_exit@plt>
mov    -0x8(%rbp),%edi
call   10d0 <test4u@plt>
cmp    $0x1,%eax
je     12cd <main+0xfd>
mov    $0xfffffff8,%edi
call   1030 <_exit@plt>
mov    -0x8(%rbp),%edi
call   1050 <test5@plt>
cmp    $0x0,%rax
je     12e9 <main+0x119>
mov    $0xfffffff7,%edi
call   1030 <_exit@plt>
mov    -0x8(%rbp),%edi
call   1080 <test5u@plt>
cmp    $0x0,%rax
je     1305 <main+0x135>
mov    $0xfffffff6,%edi
call   1030 <_exit@plt>
mov    -0x8(%rbp),%edi
call   10a0 <test6@plt>
cmp    $0x0,%rax
je     1321 <main+0x151>
mov    $0xfffffff5,%edi
call   1030 <_exit@plt>
mov    -0x8(%rbp),%edi
call   10f0 <test6u@plt>
cmp    $0x0,%rax
je     133d <main+0x16d>
mov    $0xfffffff4,%edi
call   1030 <_exit@plt>
jmp    1342 <main+0x172>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11e6 <main+0x16>
xor    %edi,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xffffff80,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1070 <test1@plt>
test   %rax,%rax
jne    12b6 <main+0xe6>
mov    %ebx,%edi
call   10e0 <test1u@plt>
test   %rax,%rax
jne    12c0 <main+0xf0>
mov    %ebx,%edi
call   10c0 <test2@plt>
cmp    $0x1,%eax
jne    12ca <main+0xfa>
mov    %ebx,%edi
call   1090 <test2u@plt>
cmp    $0x1,%eax
jne    12d4 <main+0x104>
mov    %ebx,%edi
call   1060 <test3@plt>
cmp    $0x1,%eax
jne    12de <main+0x10e>
mov    %ebx,%edi
call   1040 <test3u@plt>
cmp    $0x1,%eax
jne    12e8 <main+0x118>
mov    %ebx,%edi
call   10b0 <test4@plt>
cmp    $0x1,%eax
jne    12f2 <main+0x122>
mov    %ebx,%edi
call   10d0 <test4u@plt>
cmp    $0x1,%eax
jne    12fc <main+0x12c>
mov    %ebx,%edi
call   1050 <test5@plt>
test   %rax,%rax
jne    1306 <main+0x136>
mov    %ebx,%edi
call   1080 <test5u@plt>
test   %rax,%rax
jne    1310 <main+0x140>
mov    %ebx,%edi
call   10a0 <test6@plt>
test   %rax,%rax
jne    131a <main+0x14a>
mov    %ebx,%edi
call   10f0 <test6u@plt>
test   %rax,%rax
jne    1324 <main+0x154>
add    $0x1,%ebx
cmp    $0x100,%ebx
jne    11e0 <main+0x10>
xor    %edi,%edi
call   1030 <_exit@plt>
mov    $0xffffffff,%edi
call   1030 <_exit@plt>
mov    $0xfffffffe,%edi
call   1030 <_exit@plt>
mov    $0xfffffffd,%edi
call   1030 <_exit@plt>
mov    $0xfffffffc,%edi
call   1030 <_exit@plt>
mov    $0xfffffffb,%edi
call   1030 <_exit@plt>
mov    $0xfffffffa,%edi
call   1030 <_exit@plt>
mov    $0xfffffff9,%edi
call   1030 <_exit@plt>
mov    $0xfffffff8,%edi
call   1030 <_exit@plt>
mov    $0xfffffff7,%edi
call   1030 <_exit@plt>
mov    $0xfffffff6,%edi
call   1030 <_exit@plt>
mov    $0xfffffff5,%edi
call   1030 <_exit@plt>
mov    $0xfffffff4,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 -128, i32* %2
br label %3
3: ; preds = %79, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 256
br i1 %5, label %6, label %82
6: ; preds = %3
%7 = load i32, i32* %2
%8 = call i64 @test1(i32 %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %6
%11 = call i32 @_exit(i32 -1)
unreachable
12: ; preds = %6
%13 = load i32, i32* %2
%14 = call i64 @test1u(i32 %13)
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = call i32 @_exit(i32 -2)
unreachable
18: ; preds = %12
%19 = load i32, i32* %2
%20 = call i32 @test2(i32 %19)
%21 = icmp ne i32 %20, 1
br i1 %21, label %22, label %24
22: ; preds = %18
%23 = call i32 @_exit(i32 -3)
unreachable
24: ; preds = %18
%25 = load i32, i32* %2
%26 = call i32 @test2u(i32 %25)
%27 = icmp ne i32 %26, 1
br i1 %27, label %28, label %30
28: ; preds = %24
%29 = call i32 @_exit(i32 -4)
unreachable
30: ; preds = %24
%31 = load i32, i32* %2
%32 = call i32 @test3(i32 %31)
%33 = icmp ne i32 %32, 1
br i1 %33, label %34, label %36
34: ; preds = %30
%35 = call i32 @_exit(i32 -5)
unreachable
36: ; preds = %30
%37 = load i32, i32* %2
%38 = call i32 @test3u(i32 %37)
%39 = icmp ne i32 %38, 1
br i1 %39, label %40, label %42
40: ; preds = %36
%41 = call i32 @_exit(i32 -6)
unreachable
42: ; preds = %36
%43 = load i32, i32* %2
%44 = call i32 @test4(i32 %43)
%45 = icmp ne i32 %44, 1
br i1 %45, label %46, label %48
46: ; preds = %42
%47 = call i32 @_exit(i32 -7)
unreachable
48: ; preds = %42
%49 = load i32, i32* %2
%50 = call i32 @test4u(i32 %49)
%51 = icmp ne i32 %50, 1
br i1 %51, label %52, label %54
52: ; preds = %48
%53 = call i32 @_exit(i32 -8)
unreachable
54: ; preds = %48
%55 = load i32, i32* %2
%56 = call i64 @test5(i32 %55)
%57 = icmp ne i64 %56, 0
br i1 %57, label %58, label %60
58: ; preds = %54
%59 = call i32 @_exit(i32 -9)
unreachable
60: ; preds = %54
%61 = load i32, i32* %2
%62 = call i64 @test5u(i32 %61)
%63 = icmp ne i64 %62, 0
br i1 %63, label %64, label %66
64: ; preds = %60
%65 = call i32 @_exit(i32 -10)
unreachable
66: ; preds = %60
%67 = load i32, i32* %2
%68 = call i64 @test6(i32 %67)
%69 = icmp ne i64 %68, 0
br i1 %69, label %70, label %72
70: ; preds = %66
%71 = call i32 @_exit(i32 -11)
unreachable
72: ; preds = %66
%73 = load i32, i32* %2
%74 = call i64 @test6u(i32 %73)
%75 = icmp ne i64 %74, 0
br i1 %75, label %76, label %78
76: ; preds = %72
%77 = call i32 @_exit(i32 -12)
unreachable
78: ; preds = %72
br label %79
79: ; preds = %78
%80 = load i32, i32* %2
%81 = add nsw i32 %80, 1
store i32 %81, i32* %2
br label %3
82: ; preds = %3
%83 = call i32 @_exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
br label %4
1: ; preds = %60
%2 = add nsw i32 %5, 1
%3 = icmp eq i32 %2, 256
br i1 %3, label %65, label %4
4: ; preds = %0, %1
%5 = phi i32 [ -128, %0 ], [ %2, %1 ]
%6 = tail call i64 @test1(i32 %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %4
%9 = tail call i32 @_exit(i32 -1)
unreachable
10: ; preds = %4
%11 = tail call i64 @test1u(i32 %5)
%12 = icmp eq i64 %11, 0
br i1 %12, label %15, label %13
13: ; preds = %10
%14 = tail call i32 @_exit(i32 -2)
unreachable
15: ; preds = %10
%16 = tail call i32 @test2(i32 %5)
%17 = icmp eq i32 %16, 1
br i1 %17, label %20, label %18
18: ; preds = %15
%19 = tail call i32 @_exit(i32 -3)
unreachable
20: ; preds = %15
%21 = tail call i32 @test2u(i32 %5)
%22 = icmp eq i32 %21, 1
br i1 %22, label %25, label %23
23: ; preds = %20
%24 = tail call i32 @_exit(i32 -4)
unreachable
25: ; preds = %20
%26 = tail call i32 @test3(i32 %5)
%27 = icmp eq i32 %26, 1
br i1 %27, label %30, label %28
28: ; preds = %25
%29 = tail call i32 @_exit(i32 -5)
unreachable
30: ; preds = %25
%31 = tail call i32 @test3u(i32 %5)
%32 = icmp eq i32 %31, 1
br i1 %32, label %35, label %33
33: ; preds = %30
%34 = tail call i32 @_exit(i32 -6)
unreachable
35: ; preds = %30
%36 = tail call i32 @test4(i32 %5)
%37 = icmp eq i32 %36, 1
br i1 %37, label %40, label %38
38: ; preds = %35
%39 = tail call i32 @_exit(i32 -7)
unreachable
40: ; preds = %35
%41 = tail call i32 @test4u(i32 %5)
%42 = icmp eq i32 %41, 1
br i1 %42, label %45, label %43
43: ; preds = %40
%44 = tail call i32 @_exit(i32 -8)
unreachable
45: ; preds = %40
%46 = tail call i64 @test5(i32 %5)
%47 = icmp eq i64 %46, 0
br i1 %47, label %50, label %48
48: ; preds = %45
%49 = tail call i32 @_exit(i32 -9)
unreachable
50: ; preds = %45
%51 = tail call i64 @test5u(i32 %5)
%52 = icmp eq i64 %51, 0
br i1 %52, label %55, label %53
53: ; preds = %50
%54 = tail call i32 @_exit(i32 -10)
unreachable
55: ; preds = %50
%56 = tail call i64 @test6(i32 %5)
%57 = icmp eq i64 %56, 0
br i1 %57, label %60, label %58
58: ; preds = %55
%59 = tail call i32 @_exit(i32 -11)
unreachable
60: ; preds = %55
%61 = tail call i64 @test6u(i32 %5)
%62 = icmp eq i64 %61, 0
br i1 %62, label %1, label %63
63: ; preds = %60
%64 = tail call i32 @_exit(i32 -12)
unreachable
65: ; preds = %1
%66 = tail call i32 @_exit(i32 0)
unreachable
}