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


x86 assembly (clang, -O0):
<zeroImpliesReversedEqual>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
cmp    $0x0,%eax
jne    116e <zeroImpliesReversedEqual+0x5e>
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>
jmp    11aa <zeroImpliesReversedEqual+0x9a>
mov    -0x8(%rbp),%eax
sub    -0x4(%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):
<zeroImpliesReversedEqual>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
cmp    %ebp,%esi
sete   %dil
call   1030 <clang_analyzer_eval@plt>
xor    %edi,%edi
call   1030 <clang_analyzer_eval@plt>
cmp    %ebp,%ebx
je     1136 <zeroImpliesReversedEqual+0x26>
xor    %edi,%edi
call   1030 <clang_analyzer_eval@plt>
mov    $0x1,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <clang_analyzer_eval@plt>

LLVM IR (-O0):
define void @zeroImpliesReversedEqual(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%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* %4
%12 = load i32, i32* %3
%13 = sub nsw i32 %11, %12
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %26
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)
br label %43
26: ; preds = %2
%27 = load i32, i32* %4
%28 = load i32, i32* %3
%29 = sub nsw i32 %27, %28
%30 = icmp eq i32 %29, 0
%31 = zext i1 %30 to i32
%32 = call i32 @clang_analyzer_eval(i32 %31)
%33 = load i32, i32* %4
%34 = load i32, i32* %3
%35 = icmp eq i32 %33, %34
%36 = zext i1 %35 to i32
%37 = call i32 @clang_analyzer_eval(i32 %36)
%38 = load i32, i32* %4
%39 = load i32, i32* %3
%40 = icmp ne i32 %38, %39
%41 = zext i1 %40 to i32
%42 = call i32 @clang_analyzer_eval(i32 %41)
br label %43
43: ; preds = %26, %15
ret void
}

LLVM IR (-O2):
define void @zeroImpliesReversedEqual(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, %0
%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 %9, label %7
7: ; preds = %2
%8 = tail call i32 @clang_analyzer_eval(i32 0)
br label %9
9: ; preds = %2, %7
%10 = tail call i32 @clang_analyzer_eval(i32 1)
ret void
}