#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);
int main(void) {
  if (foo(6, 0xc6) != 7)
    abort();
  if (foo(0x80, 0xc1) != 0x81)
    abort();
  if (foo(4, 4) != 5)
    abort();
  if (foo(5, 4) != 5)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x6,%edi
mov    $0xc6,%esi
call   1040 <foo@plt>
cmp    $0x7,%eax
je     114e <main+0x2e>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x80,%edi
mov    $0xc1,%esi
call   1040 <foo@plt>
cmp    $0x81,%eax
je     116f <main+0x4f>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x4,%esi
mov    %esi,%edi
call   1040 <foo@plt>
cmp    $0x5,%eax
je     118b <main+0x6b>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x5,%edi
mov    $0x4,%esi
call   1040 <foo@plt>
cmp    $0x5,%eax
je     11aa <main+0x8a>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x6,%edi
mov    $0xc6,%esi
call   1040 <foo@plt>
cmp    $0x7,%eax
jne    1177 <main+0x57>
mov    $0x80,%edi
mov    $0xc1,%esi
call   1040 <foo@plt>
cmp    $0x81,%eax
jne    1177 <main+0x57>
mov    $0x4,%edi
mov    $0x4,%esi
call   1040 <foo@plt>
cmp    $0x5,%eax
jne    1177 <main+0x57>
mov    $0x5,%edi
mov    $0x4,%esi
call   1040 <foo@plt>
cmp    $0x5,%eax
jne    1177 <main+0x57>
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 6, i32 198)
%3 = icmp ne i32 %2, 7
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @foo(i32 128, i32 193)
%8 = icmp ne i32 %7, 129
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %6
%12 = call i32 @foo(i32 4, i32 4)
%13 = icmp ne i32 %12, 5
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 (...) @abort()
unreachable
16: ; preds = %11
%17 = call i32 @foo(i32 5, i32 4)
%18 = icmp ne i32 %17, 5
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = call i32 (...) @abort()
unreachable
21: ; preds = %16
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 6, i32 198)
%2 = icmp eq i32 %1, 7
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @foo(i32 128, i32 193)
%7 = icmp eq i32 %6, 129
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 (...) @abort()
unreachable
10: ; preds = %5
%11 = tail call i32 @foo(i32 4, i32 4)
%12 = icmp eq i32 %11, 5
br i1 %12, label %15, label %13
13: ; preds = %10
%14 = tail call i32 (...) @abort()
unreachable
15: ; preds = %10
%16 = tail call i32 @foo(i32 5, i32 4)
%17 = icmp eq i32 %16, 5
br i1 %17, label %20, label %18
18: ; preds = %15
%19 = tail call i32 (...) @abort()
unreachable
20: ; preds = %15
ret i32 0
}