#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*/ clang_analyzer_eval(int);
void zeroImpliesEquality(int a, int b) {
  clang_analyzer_eval((a - b) == 0);
  if ((a - b) == 0) {
    clang_analyzer_eval(b != a);
    clang_analyzer_eval(b == a);
    clang_analyzer_eval(!(a != b));
    clang_analyzer_eval(!(b == a));
    return;
  }
  clang_analyzer_eval((a - b) == 0);
  clang_analyzer_eval(b == a);
  clang_analyzer_eval(b != a);
}


x86 assembly (clang, -O0):
<zeroImpliesEquality>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
cmp    $0x0,%eax
jne    1198 <zeroImpliesEquality+0x88>
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
sete   %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
jmp    11d4 <zeroImpliesEquality+0xc4>
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zeroImpliesEquality>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
cmp    %esi,%ebp
sete   %dil
call   1030 <clang_analyzer_eval@plt>
xor    %r14d,%r14d
xor    %edi,%edi
call   1030 <clang_analyzer_eval@plt>
mov    $0x1,%r15d
cmp    %ebx,%ebp
jne    114f <zeroImpliesEquality+0x3f>
mov    $0x1,%r14d
mov    $0x1,%edi
call   1030 <clang_analyzer_eval@plt>
xor    %r15d,%r15d
mov    %r14d,%edi
call   1030 <clang_analyzer_eval@plt>
mov    %r15d,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <clang_analyzer_eval@plt>

LLVM IR (-O0):
define void @zeroImpliesEquality(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 = load i32, i32* %4
%7 = sub nsw i32 %5, %6
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
%10 = call i32 @clang_analyzer_eval(i32 %9)
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = sub nsw i32 %11, %12
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %38
15: ; preds = %2
%16 = load i32, i32* %4
%17 = load i32, i32* %3
%18 = icmp ne i32 %16, %17
%19 = zext i1 %18 to i32
%20 = call i32 @clang_analyzer_eval(i32 %19)
%21 = load i32, i32* %4
%22 = load i32, i32* %3
%23 = icmp eq i32 %21, %22
%24 = zext i1 %23 to i32
%25 = call i32 @clang_analyzer_eval(i32 %24)
%26 = load i32, i32* %3
%27 = load i32, i32* %4
%28 = icmp ne i32 %26, %27
%29 = xor i1 %28, true
%30 = zext i1 %29 to i32
%31 = call i32 @clang_analyzer_eval(i32 %30)
%32 = load i32, i32* %4
%33 = load i32, i32* %3
%34 = icmp eq i32 %32, %33
%35 = xor i1 %34, true
%36 = zext i1 %35 to i32
%37 = call i32 @clang_analyzer_eval(i32 %36)
br label %55
38: ; preds = %2
%39 = load i32, i32* %3
%40 = load i32, i32* %4
%41 = sub nsw i32 %39, %40
%42 = icmp eq i32 %41, 0
%43 = zext i1 %42 to i32
%44 = call i32 @clang_analyzer_eval(i32 %43)
%45 = load i32, i32* %4
%46 = load i32, i32* %3
%47 = icmp eq i32 %45, %46
%48 = zext i1 %47 to i32
%49 = call i32 @clang_analyzer_eval(i32 %48)
%50 = load i32, i32* %4
%51 = load i32, i32* %3
%52 = icmp ne i32 %50, %51
%53 = zext i1 %52 to i32
%54 = call i32 @clang_analyzer_eval(i32 %53)
br label %55
55: ; preds = %38, %15
ret void
}

LLVM IR (-O2):
define void @zeroImpliesEquality(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
%4 = zext i1 %3 to i32
%5 = tail call i32 @clang_analyzer_eval(i32 %4)
%6 = tail call i32 @clang_analyzer_eval(i32 0)
br i1 %3, label %7, label %9
7: ; preds = %2
%8 = tail call i32 @clang_analyzer_eval(i32 1)
br label %9
9: ; preds = %2, %7
%10 = phi i32 [ 1, %7 ], [ 0, %2 ]
%11 = phi i32 [ 0, %7 ], [ 1, %2 ]
%12 = tail call i32 @clang_analyzer_eval(i32 %10)
%13 = tail call i32 @clang_analyzer_eval(i32 %11)
ret void
}