#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 test1(int);
int test2(int);
int test7(int);
int test8(int);
void test(int a, int b) {
  if (test1(a) != b)
    abort();
  if (test2(a) != b)
    abort();
  if (test7(a) != b)
    abort();
  if (test8(a) != b)
    abort();
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <test1@plt>
cmp    -0x8(%rbp),%eax
je     1176 <test+0x26>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x4(%rbp),%edi
call   1060 <test2@plt>
cmp    -0x8(%rbp),%eax
je     118e <test+0x3e>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x4(%rbp),%edi
call   1040 <test7@plt>
cmp    -0x8(%rbp),%eax
je     11a6 <test+0x56>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x4(%rbp),%edi
call   1070 <test8@plt>
cmp    -0x8(%rbp),%eax
je     11be <test+0x6e>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1050 <test1@plt>
cmp    %ebx,%eax
jne    1188 <test+0x38>
mov    %ebp,%edi
call   1060 <test2@plt>
cmp    %ebx,%eax
jne    1188 <test+0x38>
mov    %ebp,%edi
call   1040 <test7@plt>
cmp    %ebx,%eax
jne    1188 <test+0x38>
mov    %ebp,%edi
call   1070 <test8@plt>
cmp    %ebx,%eax
jne    1188 <test+0x38>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @test(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = call i32 @test1(i32 %5)
%7 = load i32, i32* %4
%8 = icmp ne i32 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %2
%12 = load i32, i32* %3
%13 = call i32 @test2(i32 %12)
%14 = load i32, i32* %4
%15 = icmp ne i32 %13, %14
br i1 %15, label %16, label %18
16: ; preds = %11
%17 = call i32 (...) @abort()
unreachable
18: ; preds = %11
%19 = load i32, i32* %3
%20 = call i32 @test7(i32 %19)
%21 = load i32, i32* %4
%22 = icmp ne i32 %20, %21
br i1 %22, label %23, label %25
23: ; preds = %18
%24 = call i32 (...) @abort()
unreachable
25: ; preds = %18
%26 = load i32, i32* %3
%27 = call i32 @test8(i32 %26)
%28 = load i32, i32* %4
%29 = icmp ne i32 %27, %28
br i1 %29, label %30, label %32
30: ; preds = %25
%31 = call i32 (...) @abort()
unreachable
32: ; preds = %25
ret void
}

LLVM IR (-O2):
define void @test(i32 %0, i32 %1) {
%3 = tail call i32 @test1(i32 %0)
%4 = icmp eq i32 %3, %1
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %2
%8 = tail call i32 @test2(i32 %0)
%9 = icmp eq i32 %8, %1
br i1 %9, label %12, label %10
10: ; preds = %7
%11 = tail call i32 (...) @abort()
unreachable
12: ; preds = %7
%13 = tail call i32 @test7(i32 %0)
%14 = icmp eq i32 %13, %1
br i1 %14, label %17, label %15
15: ; preds = %12
%16 = tail call i32 (...) @abort()
unreachable
17: ; preds = %12
%18 = tail call i32 @test8(i32 %0)
%19 = icmp eq i32 %18, %1
br i1 %19, label %22, label %20
20: ; preds = %17
%21 = tail call i32 (...) @abort()
unreachable
22: ; preds = %17
ret void
}