#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 */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ assertTrue(char *, int);
void test_uint8_comparison() {
  uint8_t x = 205;
  assertTrue("x > 0", x > 0);
  assertTrue("x == 205", x == 205);
  assertTrue("x >= 205", x >= 205);
  assertTrue("x <= 205", x <= 205);
  assertTrue("x <= 220", x <= 220);
  assertTrue("x < 0xFF", x < 0xFF);
  assertTrue("x < 1000", x < 1000);
  uint8_t y = 220;
  assertTrue("x < y", x < y);
  assertTrue("y > x", y > x);
  assertTrue("x != y", x != y);
}


x86 assembly (clang, -O0):
<test_uint8_comparison>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xcd,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xece(%rip),%rdi
call   1030 <assertTrue@plt>
cmpl   $0xcd,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xeb9(%rip),%rdi
call   1030 <assertTrue@plt>
cmpl   $0xcd,-0x4(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%esi
lea    0xea7(%rip),%rdi
call   1030 <assertTrue@plt>
cmpl   $0xcd,-0x4(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe95(%rip),%rdi
call   1030 <assertTrue@plt>
cmpl   $0xdc,-0x4(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe83(%rip),%rdi
call   1030 <assertTrue@plt>
cmpl   $0xff,-0x4(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe71(%rip),%rdi
call   1030 <assertTrue@plt>
cmpl   $0x3e8,-0x4(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe5f(%rip),%rdi
call   1030 <assertTrue@plt>
movl   $0xdc,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe47(%rip),%rdi
call   1030 <assertTrue@plt>
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
setg   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe33(%rip),%rdi
call   1030 <assertTrue@plt>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setne  %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe1f(%rip),%rdi
call   1030 <assertTrue@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_uint8_comparison>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x1,%esi
call   1030 <assertTrue@plt>
lea    0xedd(%rip),%rdi
mov    $0x1,%esi
call   1030 <assertTrue@plt>
lea    0xed5(%rip),%rdi
mov    $0x1,%esi
call   1030 <assertTrue@plt>
lea    0xecd(%rip),%rdi
mov    $0x1,%esi
call   1030 <assertTrue@plt>
lea    0xec5(%rip),%rdi
mov    $0x1,%esi
call   1030 <assertTrue@plt>
lea    0xebd(%rip),%rdi
mov    $0x1,%esi
call   1030 <assertTrue@plt>
lea    0xeb5(%rip),%rdi
mov    $0x1,%esi
call   1030 <assertTrue@plt>
lea    0xead(%rip),%rdi
mov    $0x1,%esi
call   1030 <assertTrue@plt>
lea    0xea2(%rip),%rdi
mov    $0x1,%esi
call   1030 <assertTrue@plt>
lea    0xe97(%rip),%rdi
mov    $0x1,%esi
pop    %rax
jmp    1030 <assertTrue@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"x > 0\00"
@.str.1 = [9 x i8] c"x == 205\00"
@.str.2 = [9 x i8] c"x >= 205\00"
@.str.3 = [9 x i8] c"x <= 205\00"
@.str.4 = [9 x i8] c"x <= 220\00"
@.str.5 = [9 x i8] c"x < 0xFF\00"
@.str.6 = [9 x i8] c"x < 1000\00"
@.str.7 = [6 x i8] c"x < y\00"
@.str.8 = [6 x i8] c"y > x\00"
@.str.9 = [7 x i8] c"x != y\00"
define void @test_uint8_comparison() {
%1 = alloca i32
%2 = alloca i32
store i32 205, i32* %1
%3 = load i32, i32* %1
%4 = icmp sgt i32 %3, 0
%5 = zext i1 %4 to i32
%6 = call i32 @assertTrue(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %1
%8 = icmp eq i32 %7, 205
%9 = zext i1 %8 to i32
%10 = call i32 @assertTrue(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = load i32, i32* %1
%12 = icmp sge i32 %11, 205
%13 = zext i1 %12 to i32
%14 = call i32 @assertTrue(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %13)
%15 = load i32, i32* %1
%16 = icmp sle i32 %15, 205
%17 = zext i1 %16 to i32
%18 = call i32 @assertTrue(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %17)
%19 = load i32, i32* %1
%20 = icmp sle i32 %19, 220
%21 = zext i1 %20 to i32
%22 = call i32 @assertTrue(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32 %21)
%23 = load i32, i32* %1
%24 = icmp slt i32 %23, 255
%25 = zext i1 %24 to i32
%26 = call i32 @assertTrue(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 %25)
%27 = load i32, i32* %1
%28 = icmp slt i32 %27, 1000
%29 = zext i1 %28 to i32
%30 = call i32 @assertTrue(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 %29)
store i32 220, i32* %2
%31 = load i32, i32* %1
%32 = load i32, i32* %2
%33 = icmp slt i32 %31, %32
%34 = zext i1 %33 to i32
%35 = call i32 @assertTrue(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i32 %34)
%36 = load i32, i32* %2
%37 = load i32, i32* %1
%38 = icmp sgt i32 %36, %37
%39 = zext i1 %38 to i32
%40 = call i32 @assertTrue(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i32 %39)
%41 = load i32, i32* %1
%42 = load i32, i32* %2
%43 = icmp ne i32 %41, %42
%44 = zext i1 %43 to i32
%45 = call i32 @assertTrue(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i32 %44)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"x > 0\00"
@.str.1 = [9 x i8] c"x == 205\00"
@.str.2 = [9 x i8] c"x >= 205\00"
@.str.3 = [9 x i8] c"x <= 205\00"
@.str.4 = [9 x i8] c"x <= 220\00"
@.str.5 = [9 x i8] c"x < 0xFF\00"
@.str.6 = [9 x i8] c"x < 1000\00"
@.str.7 = [6 x i8] c"x < y\00"
@.str.8 = [6 x i8] c"y > x\00"
@.str.9 = [7 x i8] c"x != y\00"
define void @test_uint8_comparison() {
%1 = tail call i32 @assertTrue(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = tail call i32 @assertTrue(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 1)
%3 = tail call i32 @assertTrue(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 1)
%4 = tail call i32 @assertTrue(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 1)
%5 = tail call i32 @assertTrue(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32 1)
%6 = tail call i32 @assertTrue(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 1)
%7 = tail call i32 @assertTrue(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 1)
%8 = tail call i32 @assertTrue(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i32 1)
%9 = tail call i32 @assertTrue(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i32 1)
%10 = tail call i32 @assertTrue(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i32 1)
ret void
}