#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 testMixedTypeComparisons(char a, unsigned long b) {
  if (a != 0)
    return;
  if (b != 0x100)
    return;
  clang_analyzer_eval(a <= b);
  clang_analyzer_eval(b >= a);
  clang_analyzer_eval(a != b);
}


x86 assembly (clang, -O0):
<testMixedTypeComparisons>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x0,%eax
je     1134 <testMixedTypeComparisons+0x24>
jmp    118c <testMixedTypeComparisons+0x7c>
cmpq   $0x100,-0x10(%rbp)
je     1147 <testMixedTypeComparisons+0x37>
jmp    118c <testMixedTypeComparisons+0x7c>
movsbq -0x1(%rbp),%rax
cmp    -0x10(%rbp),%rax
setbe  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
mov    -0x10(%rbp),%rax
movsbq -0x1(%rbp),%rcx
cmp    %rcx,%rax
setae  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
movsbq -0x1(%rbp),%rax
cmp    -0x10(%rbp),%rax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testMixedTypeComparisons>:
test   %dil,%dil
jne    113e <testMixedTypeComparisons+0x2e>
cmp    $0x100,%rsi
jne    113e <testMixedTypeComparisons+0x2e>
push   %rax
mov    $0x1,%edi
call   1030 <clang_analyzer_eval@plt>
mov    $0x1,%edi
call   1030 <clang_analyzer_eval@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <clang_analyzer_eval@plt>
ret

LLVM IR (-O0):
define void @testMixedTypeComparisons(i8 signext %0, i64 %1) {
%3 = alloca i8
%4 = alloca i64
store i8 %0, i8* %3
store i64 %1, i64* %4
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %2
br label %32
9: ; preds = %2
%10 = load i64, i64* %4
%11 = icmp ne i64 %10, 256
br i1 %11, label %12, label %13
12: ; preds = %9
br label %32
13: ; preds = %9
%14 = load i8, i8* %3
%15 = sext i8 %14 to i64
%16 = load i64, i64* %4
%17 = icmp ule i64 %15, %16
%18 = zext i1 %17 to i32
%19 = call i32 @clang_analyzer_eval(i32 %18)
%20 = load i64, i64* %4
%21 = load i8, i8* %3
%22 = sext i8 %21 to i64
%23 = icmp uge i64 %20, %22
%24 = zext i1 %23 to i32
%25 = call i32 @clang_analyzer_eval(i32 %24)
%26 = load i8, i8* %3
%27 = sext i8 %26 to i64
%28 = load i64, i64* %4
%29 = icmp ne i64 %27, %28
%30 = zext i1 %29 to i32
%31 = call i32 @clang_analyzer_eval(i32 %30)
br label %32
32: ; preds = %13, %12, %8
ret void
}

LLVM IR (-O2):
define void @testMixedTypeComparisons(i8 signext %0, i64 %1) {
%3 = icmp ne i8 %0, 0
%4 = icmp ne i64 %1, 256
%5 = or i1 %3, %4
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = tail call i32 @clang_analyzer_eval(i32 1)
%8 = tail call i32 @clang_analyzer_eval(i32 1)
%9 = tail call i32 @clang_analyzer_eval(i32 1)
br label %10
10: ; preds = %2, %6
ret void
}