#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 A(int);
int B(int);
int C(int);
int D(int);
int /*<<< orphan*/ assert(int);
int main(int argc, char *argv[]) {
  int all_bit_one = ~0;
  int all_bit_zero = 0;
  assert(A(all_bit_one));
  assert(!B(all_bit_one));
  assert(C(all_bit_one));
  assert(!D(all_bit_one));
  assert(!A(all_bit_zero));
  assert(B(all_bit_zero));
  assert(!C(all_bit_zero));
  assert(D(all_bit_zero));
  assert(!A(0x1234ff));
  assert(!B(0x1234ff));
  assert(C(0x1234ff));
  assert(D(0x1234ff));
  assert(!A(0x1234));
  assert(!B(0x1234));
  assert(!C(0x1234));
  assert(D(0x1234));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xffffffff,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x14(%rbp),%edi
call   1070 <A@plt>
mov    %eax,%edi
call   1050 <assert@plt>
mov    -0x14(%rbp),%edi
call   1040 <B@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x14(%rbp),%edi
call   1060 <C@plt>
mov    %eax,%edi
call   1050 <assert@plt>
mov    -0x14(%rbp),%edi
call   1030 <D@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x18(%rbp),%edi
call   1070 <A@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x18(%rbp),%edi
call   1040 <B@plt>
mov    %eax,%edi
call   1050 <assert@plt>
mov    -0x18(%rbp),%edi
call   1060 <C@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x18(%rbp),%edi
call   1030 <D@plt>
mov    %eax,%edi
call   1050 <assert@plt>
mov    $0x1234ff,%edi
call   1070 <A@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    $0x1234ff,%edi
call   1040 <B@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    $0x1234ff,%edi
call   1060 <C@plt>
mov    %eax,%edi
call   1050 <assert@plt>
mov    $0x1234ff,%edi
call   1030 <D@plt>
mov    %eax,%edi
call   1050 <assert@plt>
mov    $0x1234,%edi
call   1070 <A@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    $0x1234,%edi
call   1040 <B@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    $0x1234,%edi
call   1060 <C@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    $0x1234,%edi
call   1030 <D@plt>
mov    %eax,%edi
call   1050 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xffffffff,%edi
call   1070 <A@plt>
mov    %eax,%edi
call   1050 <assert@plt>
mov    $0xffffffff,%edi
call   1040 <B@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1050 <assert@plt>
mov    $0xffffffff,%edi
call   1060 <C@plt>
mov    %eax,%edi
call   1050 <assert@plt>
mov    $0xffffffff,%edi
call   1030 <D@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1050 <assert@plt>
xor    %edi,%edi
call   1070 <A@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1050 <assert@plt>
xor    %edi,%edi
call   1040 <B@plt>
mov    %eax,%edi
call   1050 <assert@plt>
xor    %edi,%edi
call   1060 <C@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1050 <assert@plt>
xor    %edi,%edi
call   1030 <D@plt>
mov    %eax,%edi
call   1050 <assert@plt>
mov    $0x1234ff,%edi
call   1070 <A@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1050 <assert@plt>
mov    $0x1234ff,%edi
call   1040 <B@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1050 <assert@plt>
mov    $0x1234ff,%edi
call   1060 <C@plt>
mov    %eax,%edi
call   1050 <assert@plt>
mov    $0x1234ff,%edi
call   1030 <D@plt>
mov    %eax,%edi
call   1050 <assert@plt>
mov    $0x1234,%edi
call   1070 <A@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1050 <assert@plt>
mov    $0x1234,%edi
call   1040 <B@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1050 <assert@plt>
mov    $0x1234,%edi
call   1060 <C@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1050 <assert@plt>
mov    $0x1234,%edi
call   1030 <D@plt>
mov    %eax,%edi
call   1050 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 -1, i32* %6
store i32 0, i32* %7
%8 = load i32, i32* %6
%9 = call i32 @A(i32 %8)
%10 = call i32 @assert(i32 %9)
%11 = load i32, i32* %6
%12 = call i32 @B(i32 %11)
%13 = icmp ne i32 %12, 0
%14 = xor i1 %13, true
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
%17 = load i32, i32* %6
%18 = call i32 @C(i32 %17)
%19 = call i32 @assert(i32 %18)
%20 = load i32, i32* %6
%21 = call i32 @D(i32 %20)
%22 = icmp ne i32 %21, 0
%23 = xor i1 %22, true
%24 = zext i1 %23 to i32
%25 = call i32 @assert(i32 %24)
%26 = load i32, i32* %7
%27 = call i32 @A(i32 %26)
%28 = icmp ne i32 %27, 0
%29 = xor i1 %28, true
%30 = zext i1 %29 to i32
%31 = call i32 @assert(i32 %30)
%32 = load i32, i32* %7
%33 = call i32 @B(i32 %32)
%34 = call i32 @assert(i32 %33)
%35 = load i32, i32* %7
%36 = call i32 @C(i32 %35)
%37 = icmp ne i32 %36, 0
%38 = xor i1 %37, true
%39 = zext i1 %38 to i32
%40 = call i32 @assert(i32 %39)
%41 = load i32, i32* %7
%42 = call i32 @D(i32 %41)
%43 = call i32 @assert(i32 %42)
%44 = call i32 @A(i32 1193215)
%45 = icmp ne i32 %44, 0
%46 = xor i1 %45, true
%47 = zext i1 %46 to i32
%48 = call i32 @assert(i32 %47)
%49 = call i32 @B(i32 1193215)
%50 = icmp ne i32 %49, 0
%51 = xor i1 %50, true
%52 = zext i1 %51 to i32
%53 = call i32 @assert(i32 %52)
%54 = call i32 @C(i32 1193215)
%55 = call i32 @assert(i32 %54)
%56 = call i32 @D(i32 1193215)
%57 = call i32 @assert(i32 %56)
%58 = call i32 @A(i32 4660)
%59 = icmp ne i32 %58, 0
%60 = xor i1 %59, true
%61 = zext i1 %60 to i32
%62 = call i32 @assert(i32 %61)
%63 = call i32 @B(i32 4660)
%64 = icmp ne i32 %63, 0
%65 = xor i1 %64, true
%66 = zext i1 %65 to i32
%67 = call i32 @assert(i32 %66)
%68 = call i32 @C(i32 4660)
%69 = icmp ne i32 %68, 0
%70 = xor i1 %69, true
%71 = zext i1 %70 to i32
%72 = call i32 @assert(i32 %71)
%73 = call i32 @D(i32 4660)
%74 = call i32 @assert(i32 %73)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @A(i32 -1)
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @B(i32 -1)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = tail call i32 @C(i32 -1)
%10 = tail call i32 @assert(i32 %9)
%11 = tail call i32 @D(i32 -1)
%12 = icmp eq i32 %11, 0
%13 = zext i1 %12 to i32
%14 = tail call i32 @assert(i32 %13)
%15 = tail call i32 @A(i32 0)
%16 = icmp eq i32 %15, 0
%17 = zext i1 %16 to i32
%18 = tail call i32 @assert(i32 %17)
%19 = tail call i32 @B(i32 0)
%20 = tail call i32 @assert(i32 %19)
%21 = tail call i32 @C(i32 0)
%22 = icmp eq i32 %21, 0
%23 = zext i1 %22 to i32
%24 = tail call i32 @assert(i32 %23)
%25 = tail call i32 @D(i32 0)
%26 = tail call i32 @assert(i32 %25)
%27 = tail call i32 @A(i32 1193215)
%28 = icmp eq i32 %27, 0
%29 = zext i1 %28 to i32
%30 = tail call i32 @assert(i32 %29)
%31 = tail call i32 @B(i32 1193215)
%32 = icmp eq i32 %31, 0
%33 = zext i1 %32 to i32
%34 = tail call i32 @assert(i32 %33)
%35 = tail call i32 @C(i32 1193215)
%36 = tail call i32 @assert(i32 %35)
%37 = tail call i32 @D(i32 1193215)
%38 = tail call i32 @assert(i32 %37)
%39 = tail call i32 @A(i32 4660)
%40 = icmp eq i32 %39, 0
%41 = zext i1 %40 to i32
%42 = tail call i32 @assert(i32 %41)
%43 = tail call i32 @B(i32 4660)
%44 = icmp eq i32 %43, 0
%45 = zext i1 %44 to i32
%46 = tail call i32 @assert(i32 %45)
%47 = tail call i32 @C(i32 4660)
%48 = icmp eq i32 %47, 0
%49 = zext i1 %48 to i32
%50 = tail call i32 @assert(i32 %49)
%51 = tail call i32 @D(i32 4660)
%52 = tail call i32 @assert(i32 %51)
ret i32 0
}