#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 foo(int);
int main() {
  if (foo(98) != 18 || foo(97) != 0 || foo(99) != 0)
    abort();
  if (foo(-62) != 19 || foo(-63) != 0 || foo(-61) != 0)
    abort();
  if (foo(28) != 105 || foo(27) != 102 || foo(29) != 111)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x62,%edi
call   1040 <foo@plt>
cmp    $0x12,%eax
jne    1168 <main+0x48>
mov    $0x61,%edi
call   1040 <foo@plt>
cmp    $0x0,%eax
jne    1168 <main+0x48>
mov    $0x63,%edi
call   1040 <foo@plt>
cmp    $0x0,%eax
je     116f <main+0x4f>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0xffffffc2,%edi
call   1040 <foo@plt>
cmp    $0x13,%eax
jne    11a8 <main+0x88>
mov    $0xffffffc1,%edi
call   1040 <foo@plt>
cmp    $0x0,%eax
jne    11a8 <main+0x88>
mov    $0xffffffc3,%edi
call   1040 <foo@plt>
cmp    $0x0,%eax
je     11af <main+0x8f>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x1c,%edi
call   1040 <foo@plt>
cmp    $0x69,%eax
jne    11e8 <main+0xc8>
mov    $0x1b,%edi
call   1040 <foo@plt>
cmp    $0x66,%eax
jne    11e8 <main+0xc8>
mov    $0x1d,%edi
call   1040 <foo@plt>
cmp    $0x6f,%eax
je     11ef <main+0xcf>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x62,%edi
call   1040 <foo@plt>
cmp    $0x12,%eax
jne    11a8 <main+0x88>
mov    $0x61,%edi
call   1040 <foo@plt>
test   %eax,%eax
jne    11a8 <main+0x88>
mov    $0x63,%edi
call   1040 <foo@plt>
test   %eax,%eax
jne    11a8 <main+0x88>
mov    $0xffffffc2,%edi
call   1040 <foo@plt>
cmp    $0x13,%eax
jne    11a8 <main+0x88>
mov    $0xffffffc1,%edi
call   1040 <foo@plt>
test   %eax,%eax
jne    11a8 <main+0x88>
mov    $0xffffffc3,%edi
call   1040 <foo@plt>
test   %eax,%eax
jne    11a8 <main+0x88>
mov    $0x1c,%edi
call   1040 <foo@plt>
cmp    $0x69,%eax
jne    11a8 <main+0x88>
mov    $0x1b,%edi
call   1040 <foo@plt>
cmp    $0x66,%eax
jne    11a8 <main+0x88>
mov    $0x1d,%edi
call   1040 <foo@plt>
cmp    $0x6f,%eax
jne    11a8 <main+0x88>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @foo(i32 98)
%3 = icmp ne i32 %2, 18
br i1 %3, label %10, label %4
4: ; preds = %0
%5 = call i32 @foo(i32 97)
%6 = icmp ne i32 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %4
%8 = call i32 @foo(i32 99)
%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 @foo(i32 -62)
%14 = icmp ne i32 %13, 19
br i1 %14, label %21, label %15
15: ; preds = %12
%16 = call i32 @foo(i32 -63)
%17 = icmp ne i32 %16, 0
br i1 %17, label %21, label %18
18: ; preds = %15
%19 = call i32 @foo(i32 -61)
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %18, %15, %12
%22 = call i32 (...) @abort()
unreachable
23: ; preds = %18
%24 = call i32 @foo(i32 28)
%25 = icmp ne i32 %24, 105
br i1 %25, label %32, label %26
26: ; preds = %23
%27 = call i32 @foo(i32 27)
%28 = icmp ne i32 %27, 102
br i1 %28, label %32, label %29
29: ; preds = %26
%30 = call i32 @foo(i32 29)
%31 = icmp ne i32 %30, 111
br i1 %31, label %32, label %34
32: ; preds = %29, %26, %23
%33 = call i32 (...) @abort()
unreachable
34: ; preds = %29
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 98)
%2 = icmp eq i32 %1, 18
br i1 %2, label %3, label %9
3: ; preds = %0
%4 = tail call i32 @foo(i32 97)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i32 @foo(i32 99)
%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 @foo(i32 -62)
%13 = icmp eq i32 %12, 19
br i1 %13, label %14, label %20
14: ; preds = %11
%15 = tail call i32 @foo(i32 -63)
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = tail call i32 @foo(i32 -61)
%19 = icmp eq i32 %18, 0
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 @foo(i32 28)
%24 = icmp eq i32 %23, 105
br i1 %24, label %25, label %31
25: ; preds = %22
%26 = tail call i32 @foo(i32 27)
%27 = icmp eq i32 %26, 102
br i1 %27, label %28, label %31
28: ; preds = %25
%29 = tail call i32 @foo(i32 29)
%30 = icmp eq i32 %29, 111
br i1 %30, label %33, label %31
31: ; preds = %28, %25, %22
%32 = tail call i32 (...) @abort()
unreachable
33: ; preds = %28
ret i32 0
}