#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*/ expecti(int, int);
void test() {
  int a = 0;
  if (0)
    a = 1;
  expecti(a, 0);
  if (1)
    a = 1;
  expecti(a, 1);
  if (0) {
    a = 0;
  } else
    expecti(a, 1);
  if (1) {
    a = 0;
  }
  expecti(a, 0);
  if (0)
    expecti(0, 1);
  else {
    expecti(1, 1);
  }
  if (1) {
    expecti(1, 1);
  } else
    a = 1;
  expecti(a, 0);
  if (1) {
    if (0) {
      expecti(1, 0);
    } else
      expecti(1, 1);
    if (1) {
      if (1)
        expecti(1, 1);
      else {
        expecti(1, 0);
      }
    } else
      expecti(0, 1);
  } else {
    expecti(1, 1);
  }
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1030 <expecti@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <expecti@plt>
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <expecti@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1030 <expecti@plt>
mov    $0x1,%esi
mov    %esi,%edi
call   1030 <expecti@plt>
mov    $0x1,%esi
mov    %esi,%edi
call   1030 <expecti@plt>
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1030 <expecti@plt>
mov    $0x1,%esi
mov    %esi,%edi
call   1030 <expecti@plt>
mov    $0x1,%esi
mov    %esi,%edi
call   1030 <expecti@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
call   1030 <expecti@plt>
mov    $0x1,%edi
mov    $0x1,%esi
call   1030 <expecti@plt>
mov    $0x1,%edi
mov    $0x1,%esi
call   1030 <expecti@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1030 <expecti@plt>
mov    $0x1,%edi
mov    $0x1,%esi
call   1030 <expecti@plt>
mov    $0x1,%edi
mov    $0x1,%esi
call   1030 <expecti@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1030 <expecti@plt>
mov    $0x1,%edi
mov    $0x1,%esi
call   1030 <expecti@plt>
mov    $0x1,%edi
mov    $0x1,%esi
pop    %rax
jmp    1030 <expecti@plt>

LLVM IR (-O0):
define void @test() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* %1
%3 = call i32 @expecti(i32 %2, i32 0)
store i32 1, i32* %1
%4 = load i32, i32* %1
%5 = call i32 @expecti(i32 %4, i32 1)
%6 = load i32, i32* %1
%7 = call i32 @expecti(i32 %6, i32 1)
store i32 0, i32* %1
%8 = load i32, i32* %1
%9 = call i32 @expecti(i32 %8, i32 0)
%10 = call i32 @expecti(i32 1, i32 1)
%11 = call i32 @expecti(i32 1, i32 1)
%12 = load i32, i32* %1
%13 = call i32 @expecti(i32 %12, i32 0)
%14 = call i32 @expecti(i32 1, i32 1)
%15 = call i32 @expecti(i32 1, i32 1)
ret void
}

LLVM IR (-O2):
define void @test() {
%1 = tail call i32 @expecti(i32 0, i32 0)
%2 = tail call i32 @expecti(i32 1, i32 1)
%3 = tail call i32 @expecti(i32 1, i32 1)
%4 = tail call i32 @expecti(i32 0, i32 0)
%5 = tail call i32 @expecti(i32 1, i32 1)
%6 = tail call i32 @expecti(i32 1, i32 1)
%7 = tail call i32 @expecti(i32 0, i32 0)
%8 = tail call i32 @expecti(i32 1, i32 1)
%9 = tail call i32 @expecti(i32 1, i32 1)
ret void
}