#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*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
bool threshold(int green, int red, int blue) {
  if (green >= 0 && green <= 255 && red >= 0 && red <= 255 && blue >= 0 &&
      blue <= 255) {
    if (green <= 100 && red >= 100 && blue <= 100) {
      return 1;
    } else {
      return 0;
    }
  } else {
    fprintf(stderr, "Error: Ureadable pixel colors");
    exit(2);
  }
}


x86 assembly (clang, -O0):
<threshold>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     11ac <threshold+0x8c>
cmpl   $0xff,-0x8(%rbp)
jg     11ac <threshold+0x8c>
cmpl   $0x0,-0xc(%rbp)
jl     11ac <threshold+0x8c>
cmpl   $0xff,-0xc(%rbp)
jg     11ac <threshold+0x8c>
cmpl   $0x0,-0x10(%rbp)
jl     11ac <threshold+0x8c>
cmpl   $0xff,-0x10(%rbp)
jg     11ac <threshold+0x8c>
cmpl   $0x64,-0x8(%rbp)
jg     11a0 <threshold+0x80>
cmpl   $0x64,-0xc(%rbp)
jl     11a0 <threshold+0x80>
cmpl   $0x64,-0x10(%rbp)
jg     11a0 <threshold+0x80>
movl   $0x1,-0x4(%rbp)
jmp    11cb <threshold+0xab>
movl   $0x0,-0x4(%rbp)
jmp    11cb <threshold+0xab>
mov    0x2e2d(%rip),%rax
mov    (%rax),%edi
lea    0xe44(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<threshold>:
mov    %esi,%eax
or     %edi,%eax
or     %edx,%eax
cmp    $0xff,%eax
ja     1147 <threshold+0x27>
cmp    $0x65,%edi
setl   %al
cmp    $0x64,%esi
setge  %cl
and    %al,%cl
cmp    $0x65,%edx
setb   %al
and    %cl,%al
movzbl %al,%eax
ret
push   %rax
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
lea    0xea8(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [30 x i8] c"Error: Ureadable pixel colors\00"
define i32 @threshold(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* %5
%9 = icmp sge i32 %8, 0
br i1 %9, label %10, label %36
10: ; preds = %3
%11 = load i32, i32* %5
%12 = icmp sle i32 %11, 255
br i1 %12, label %13, label %36
13: ; preds = %10
%14 = load i32, i32* %6
%15 = icmp sge i32 %14, 0
br i1 %15, label %16, label %36
16: ; preds = %13
%17 = load i32, i32* %6
%18 = icmp sle i32 %17, 255
br i1 %18, label %19, label %36
19: ; preds = %16
%20 = load i32, i32* %7
%21 = icmp sge i32 %20, 0
br i1 %21, label %22, label %36
22: ; preds = %19
%23 = load i32, i32* %7
%24 = icmp sle i32 %23, 255
br i1 %24, label %25, label %36
25: ; preds = %22
%26 = load i32, i32* %5
%27 = icmp sle i32 %26, 100
br i1 %27, label %28, label %35
28: ; preds = %25
%29 = load i32, i32* %6
%30 = icmp sge i32 %29, 100
br i1 %30, label %31, label %35
31: ; preds = %28
%32 = load i32, i32* %7
%33 = icmp sle i32 %32, 100
br i1 %33, label %34, label %35
34: ; preds = %31
store i32 1, i32* %4
br label %40
35: ; preds = %31, %28, %25
store i32 0, i32* %4
br label %40
36: ; preds = %22, %19, %16, %13, %10, %3
%37 = load i32, i32* @stderr
%38 = call i32 @fprintf(i32 %37, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%39 = call i32 @exit(i32 2)
unreachable
40: ; preds = %35, %34
%41 = load i32, i32* %4
ret i32 %41
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [30 x i8] c"Error: Ureadable pixel colors\00"
define i32 @threshold(i32 %0, i32 %1, i32 %2) {
%4 = or i32 %1, %0
%5 = or i32 %4, %2
%6 = icmp ult i32 %5, 256
br i1 %6, label %7, label %14
7: ; preds = %3
%8 = icmp slt i32 %0, 101
%9 = icmp sgt i32 %1, 99
%10 = and i1 %8, %9
%11 = icmp ult i32 %2, 101
%12 = and i1 %10, %11
%13 = zext i1 %12 to i32
ret i32 %13
14: ; preds = %3
%15 = load i32, i32* @stderr
%16 = tail call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%17 = tail call i32 @exit(i32 2)
unreachable
}