#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 test(int);
int main(void) {
  if (test(5) != 100)
    abort();
  if (test(102) != 105)
    abort();
  if (test(321) != 10044)
    abort();
  if (test(121) != 100223)
    abort();
  if (test(-3) != 12398)
    abort();
  if (test(3) != 89127883)
    abort();
  if (test(-2) != -1)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x5,%edi
call   1050 <test@plt>
cmp    $0x64,%eax
je     1159 <main+0x29>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x66,%edi
call   1050 <test@plt>
cmp    $0x69,%eax
je     1173 <main+0x43>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x141,%edi
call   1050 <test@plt>
cmp    $0x273c,%eax
je     118f <main+0x5f>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x79,%edi
call   1050 <test@plt>
cmp    $0x1877f,%eax
je     11ab <main+0x7b>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0xfffffffd,%edi
call   1050 <test@plt>
cmp    $0x306e,%eax
je     11c7 <main+0x97>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x3,%edi
call   1050 <test@plt>
cmp    $0x54ffbcb,%eax
je     11e3 <main+0xb3>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0xfffffffe,%edi
call   1050 <test@plt>
cmp    $0xffffffff,%eax
je     11fd <main+0xcd>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1050 <test@plt>
cmp    $0x64,%eax
jne    11a9 <main+0x79>
mov    $0x66,%edi
call   1050 <test@plt>
cmp    $0x69,%eax
jne    11a9 <main+0x79>
mov    $0x141,%edi
call   1050 <test@plt>
cmp    $0x273c,%eax
jne    11a9 <main+0x79>
mov    $0x79,%edi
call   1050 <test@plt>
cmp    $0x1877f,%eax
jne    11a9 <main+0x79>
mov    $0xfffffffd,%edi
call   1050 <test@plt>
cmp    $0x306e,%eax
jne    11a9 <main+0x79>
mov    $0x3,%edi
call   1050 <test@plt>
cmp    $0x54ffbcb,%eax
jne    11a9 <main+0x79>
mov    $0xfffffffe,%edi
call   1050 <test@plt>
cmp    $0xffffffff,%eax
jne    11a9 <main+0x79>
xor    %edi,%edi
call   1040 <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 @test(i32 5)
%3 = icmp ne i32 %2, 100
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @test(i32 102)
%8 = icmp ne i32 %7, 105
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %6
%12 = call i32 @test(i32 321)
%13 = icmp ne i32 %12, 10044
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 (...) @abort()
unreachable
16: ; preds = %11
%17 = call i32 @test(i32 121)
%18 = icmp ne i32 %17, 100223
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = call i32 (...) @abort()
unreachable
21: ; preds = %16
%22 = call i32 @test(i32 -3)
%23 = icmp ne i32 %22, 12398
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = call i32 (...) @abort()
unreachable
26: ; preds = %21
%27 = call i32 @test(i32 3)
%28 = icmp ne i32 %27, 89127883
br i1 %28, label %29, label %31
29: ; preds = %26
%30 = call i32 (...) @abort()
unreachable
31: ; preds = %26
%32 = call i32 @test(i32 -2)
%33 = icmp ne i32 %32, -1
br i1 %33, label %34, label %36
34: ; preds = %31
%35 = call i32 (...) @abort()
unreachable
36: ; preds = %31
%37 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @test(i32 5)
%2 = icmp eq i32 %1, 100
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @test(i32 102)
%7 = icmp eq i32 %6, 105
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 (...) @abort()
unreachable
10: ; preds = %5
%11 = tail call i32 @test(i32 321)
%12 = icmp eq i32 %11, 10044
br i1 %12, label %15, label %13
13: ; preds = %10
%14 = tail call i32 (...) @abort()
unreachable
15: ; preds = %10
%16 = tail call i32 @test(i32 121)
%17 = icmp eq i32 %16, 100223
br i1 %17, label %20, label %18
18: ; preds = %15
%19 = tail call i32 (...) @abort()
unreachable
20: ; preds = %15
%21 = tail call i32 @test(i32 -3)
%22 = icmp eq i32 %21, 12398
br i1 %22, label %25, label %23
23: ; preds = %20
%24 = tail call i32 (...) @abort()
unreachable
25: ; preds = %20
%26 = tail call i32 @test(i32 3)
%27 = icmp eq i32 %26, 89127883
br i1 %27, label %30, label %28
28: ; preds = %25
%29 = tail call i32 (...) @abort()
unreachable
30: ; preds = %25
%31 = tail call i32 @test(i32 -2)
%32 = icmp eq i32 %31, -1
br i1 %32, label %35, label %33
33: ; preds = %30
%34 = tail call i32 (...) @abort()
unreachable
35: ; preds = %30
%36 = tail call i32 @exit(i32 0)
unreachable
}