#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 str32_strsearch(char *, unsigned long, char *, int);
unsigned char compare_unsigned(char *target_str, unsigned long int length,
                               unsigned long int status_nzcv) {
  if (str32_strsearch(target_str, length, "== \0", 3) != -1) {
    if (status_nzcv & 0x40000000)
      return ((unsigned char)0);
  } else if (str32_strsearch(target_str, length, "!= \0", 3) != -1) {
    if (!(status_nzcv & 0x40000000))
      return ((unsigned char)0);
  } else if (str32_strsearch(target_str, length, ">= \0", 3) != -1) {
    if (status_nzcv & 0x20000000)
      return ((unsigned char)0);
  } else if (str32_strsearch(target_str, length, "<= \0", 3) != -1) {
    if ((!(status_nzcv & 0x20000000)) || (status_nzcv & 0x40000000))
      return ((unsigned char)0);
  } else if (str32_strsearch(target_str, length, "> \0", 2) != -1) {
    if ((status_nzcv & 0x20000000) && (!(status_nzcv & 0x40000000)))
      return ((unsigned char)0);
  } else if (str32_strsearch(target_str, length, "< \0", 2) != -1) {
    if (!(status_nzcv & 0x20000000))
      return ((unsigned char)0);
  }
  return ((unsigned char)1);
}


x86 assembly (clang, -O0):
<compare_unsigned>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xecd(%rip),%rdx
mov    $0x3,%ecx
call   1030 <str32_strsearch@plt>
cmp    $0xffffffff,%eax
je     1168 <compare_unsigned+0x58>
mov    -0x20(%rbp),%rax
and    $0x40000000,%rax
cmp    $0x0,%rax
je     1163 <compare_unsigned+0x53>
movb   $0x0,-0x1(%rbp)
jmp    1301 <compare_unsigned+0x1f1>
jmp    12fd <compare_unsigned+0x1ed>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xe8e(%rip),%rdx
mov    $0x3,%ecx
call   1030 <str32_strsearch@plt>
cmp    $0xffffffff,%eax
je     11ac <compare_unsigned+0x9c>
mov    -0x20(%rbp),%rax
and    $0x40000000,%rax
cmp    $0x0,%rax
jne    11a7 <compare_unsigned+0x97>
movb   $0x0,-0x1(%rbp)
jmp    1301 <compare_unsigned+0x1f1>
jmp    12f8 <compare_unsigned+0x1e8>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xe4f(%rip),%rdx
mov    $0x3,%ecx
call   1030 <str32_strsearch@plt>
cmp    $0xffffffff,%eax
je     11f0 <compare_unsigned+0xe0>
mov    -0x20(%rbp),%rax
and    $0x20000000,%rax
cmp    $0x0,%rax
je     11eb <compare_unsigned+0xdb>
movb   $0x0,-0x1(%rbp)
jmp    1301 <compare_unsigned+0x1f1>
jmp    12f3 <compare_unsigned+0x1e3>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xe10(%rip),%rdx
mov    $0x3,%ecx
call   1030 <str32_strsearch@plt>
cmp    $0xffffffff,%eax
je     1248 <compare_unsigned+0x138>
mov    -0x20(%rbp),%rax
and    $0x20000000,%rax
cmp    $0x0,%rax
je     123a <compare_unsigned+0x12a>
mov    -0x20(%rbp),%rax
and    $0x40000000,%rax
cmp    $0x0,%rax
je     1243 <compare_unsigned+0x133>
movb   $0x0,-0x1(%rbp)
jmp    1301 <compare_unsigned+0x1f1>
jmp    12ee <compare_unsigned+0x1de>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xdbd(%rip),%rdx
mov    $0x2,%ecx
call   1030 <str32_strsearch@plt>
cmp    $0xffffffff,%eax
je     12a0 <compare_unsigned+0x190>
mov    -0x20(%rbp),%rax
and    $0x20000000,%rax
cmp    $0x0,%rax
je     129b <compare_unsigned+0x18b>
mov    -0x20(%rbp),%rax
and    $0x40000000,%rax
cmp    $0x0,%rax
jne    129b <compare_unsigned+0x18b>
movb   $0x0,-0x1(%rbp)
jmp    1301 <compare_unsigned+0x1f1>
jmp    12e9 <compare_unsigned+0x1d9>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xd69(%rip),%rdx
mov    $0x2,%ecx
call   1030 <str32_strsearch@plt>
cmp    $0xffffffff,%eax
je     12e4 <compare_unsigned+0x1d4>
mov    -0x20(%rbp),%rax
and    $0x20000000,%rax
cmp    $0x0,%rax
jne    12df <compare_unsigned+0x1cf>
movb   $0x0,-0x1(%rbp)
jmp    1301 <compare_unsigned+0x1f1>
jmp    12e4 <compare_unsigned+0x1d4>
jmp    12e9 <compare_unsigned+0x1d9>
jmp    12ee <compare_unsigned+0x1de>
jmp    12f3 <compare_unsigned+0x1e3>
jmp    12f8 <compare_unsigned+0x1e8>
jmp    12fd <compare_unsigned+0x1ed>
movb   $0x1,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_unsigned>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
lea    0xedb(%rip),%rdx
mov    $0x3,%ecx
call   1030 <str32_strsearch@plt>
cmp    $0xffffffff,%eax
je     1146 <compare_unsigned+0x36>
test   $0x40000000,%r14d
je     1227 <compare_unsigned+0x117>
jmp    1223 <compare_unsigned+0x113>
lea    0xeb8(%rip),%rdx
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0x3,%ecx
call   1030 <str32_strsearch@plt>
cmp    $0xffffffff,%eax
je     1174 <compare_unsigned+0x64>
test   $0x40000000,%r14d
je     1223 <compare_unsigned+0x113>
jmp    1227 <compare_unsigned+0x117>
lea    0xe8f(%rip),%rdx
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0x3,%ecx
call   1030 <str32_strsearch@plt>
cmp    $0xffffffff,%eax
je     11a2 <compare_unsigned+0x92>
test   $0x20000000,%r14d
jne    1223 <compare_unsigned+0x113>
jmp    1227 <compare_unsigned+0x117>
lea    0xe66(%rip),%rdx
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0x3,%ecx
call   1030 <str32_strsearch@plt>
cmp    $0xffffffff,%eax
je     11d0 <compare_unsigned+0xc0>
and    $0x60000000,%r14d
cmp    $0x20000000,%r14d
jne    1223 <compare_unsigned+0x113>
jmp    1227 <compare_unsigned+0x117>
lea    0xe3d(%rip),%rdx
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0x2,%ecx
call   1030 <str32_strsearch@plt>
cmp    $0xffffffff,%eax
je     11fe <compare_unsigned+0xee>
and    $0x60000000,%r14d
cmp    $0x20000000,%r14d
je     1223 <compare_unsigned+0x113>
jmp    1227 <compare_unsigned+0x117>
lea    0xe13(%rip),%rdx
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0x2,%ecx
call   1030 <str32_strsearch@plt>
test   $0x20000000,%r14d
jne    1227 <compare_unsigned+0x117>
cmp    $0xffffffff,%eax
je     1227 <compare_unsigned+0x117>
xor    %eax,%eax
jmp    1229 <compare_unsigned+0x119>
mov    $0x1,%al
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c"== \00\00"
@.str.1 = [5 x i8] c"!= \00\00"
@.str.2 = [5 x i8] c">= \00\00"
@.str.3 = [5 x i8] c"<= \00\00"
@.str.4 = [4 x i8] c"> \00\00"
@.str.5 = [4 x i8] c"< \00\00"
define zeroext i8 @compare_unsigned(i8* %0, i64 %1, i64 %2) {
%4 = alloca i8
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i32 @str32_strsearch(i8* %8, i64 %9, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 3)
%11 = icmp ne i32 %10, -1
br i1 %11, label %12, label %18
12: ; preds = %3
%13 = load i64, i64* %7
%14 = and i64 %13, 1073741824
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %12
store i8 0, i8* %4
br label %87
17: ; preds = %12
br label %86
18: ; preds = %3
%19 = load i8*, i8** %5
%20 = load i64, i64* %6
%21 = call i32 @str32_strsearch(i8* %19, i64 %20, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 3)
%22 = icmp ne i32 %21, -1
br i1 %22, label %23, label %29
23: ; preds = %18
%24 = load i64, i64* %7
%25 = and i64 %24, 1073741824
%26 = icmp ne i64 %25, 0
br i1 %26, label %28, label %27
27: ; preds = %23
store i8 0, i8* %4
br label %87
28: ; preds = %23
br label %85
29: ; preds = %18
%30 = load i8*, i8** %5
%31 = load i64, i64* %6
%32 = call i32 @str32_strsearch(i8* %30, i64 %31, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 3)
%33 = icmp ne i32 %32, -1
br i1 %33, label %34, label %40
34: ; preds = %29
%35 = load i64, i64* %7
%36 = and i64 %35, 536870912
%37 = icmp ne i64 %36, 0
br i1 %37, label %38, label %39
38: ; preds = %34
store i8 0, i8* %4
br label %87
39: ; preds = %34
br label %84
40: ; preds = %29
%41 = load i8*, i8** %5
%42 = load i64, i64* %6
%43 = call i32 @str32_strsearch(i8* %41, i64 %42, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 3)
%44 = icmp ne i32 %43, -1
br i1 %44, label %45, label %55
45: ; preds = %40
%46 = load i64, i64* %7
%47 = and i64 %46, 536870912
%48 = icmp ne i64 %47, 0
br i1 %48, label %49, label %53
49: ; preds = %45
%50 = load i64, i64* %7
%51 = and i64 %50, 1073741824
%52 = icmp ne i64 %51, 0
br i1 %52, label %53, label %54
53: ; preds = %49, %45
store i8 0, i8* %4
br label %87
54: ; preds = %49
br label %83
55: ; preds = %40
%56 = load i8*, i8** %5
%57 = load i64, i64* %6
%58 = call i32 @str32_strsearch(i8* %56, i64 %57, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 2)
%59 = icmp ne i32 %58, -1
br i1 %59, label %60, label %70
60: ; preds = %55
%61 = load i64, i64* %7
%62 = and i64 %61, 536870912
%63 = icmp ne i64 %62, 0
br i1 %63, label %64, label %69
64: ; preds = %60
%65 = load i64, i64* %7
%66 = and i64 %65, 1073741824
%67 = icmp ne i64 %66, 0
br i1 %67, label %69, label %68
68: ; preds = %64
store i8 0, i8* %4
br label %87
69: ; preds = %64, %60
br label %82
70: ; preds = %55
%71 = load i8*, i8** %5
%72 = load i64, i64* %6
%73 = call i32 @str32_strsearch(i8* %71, i64 %72, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 2)
%74 = icmp ne i32 %73, -1
br i1 %74, label %75, label %81
75: ; preds = %70
%76 = load i64, i64* %7
%77 = and i64 %76, 536870912
%78 = icmp ne i64 %77, 0
br i1 %78, label %80, label %79
79: ; preds = %75
store i8 0, i8* %4
br label %87
80: ; preds = %75
br label %81
81: ; preds = %80, %70
br label %82
82: ; preds = %81, %69
br label %83
83: ; preds = %82, %54
br label %84
84: ; preds = %83, %39
br label %85
85: ; preds = %84, %28
br label %86
86: ; preds = %85, %17
store i8 1, i8* %4
br label %87
87: ; preds = %86, %79, %68, %53, %38, %27, %16
%88 = load i8, i8* %4
ret i8 %88
}

LLVM IR (-O2):
@.str = [5 x i8] c"== \00\00"
@.str.1 = [5 x i8] c"!= \00\00"
@.str.2 = [5 x i8] c">= \00\00"
@.str.3 = [5 x i8] c"<= \00\00"
@.str.4 = [4 x i8] c"> \00\00"
@.str.5 = [4 x i8] c"< \00\00"
define zeroext i8 @compare_unsigned(i8* %0, i64 %1, i64 %2) {
%4 = tail call i32 @str32_strsearch(i8* %0, i64 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 3)
%5 = icmp eq i32 %4, -1
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = and i64 %2, 1073741824
%8 = icmp eq i64 %7, 0
br i1 %8, label %39, label %40
9: ; preds = %3
%10 = tail call i32 @str32_strsearch(i8* %0, i64 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 3)
%11 = icmp eq i32 %10, -1
br i1 %11, label %15, label %12
12: ; preds = %9
%13 = and i64 %2, 1073741824
%14 = icmp eq i64 %13, 0
br i1 %14, label %40, label %39
15: ; preds = %9
%16 = tail call i32 @str32_strsearch(i8* %0, i64 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 3)
%17 = icmp eq i32 %16, -1
br i1 %17, label %21, label %18
18: ; preds = %15
%19 = and i64 %2, 536870912
%20 = icmp eq i64 %19, 0
br i1 %20, label %39, label %40
21: ; preds = %15
%22 = tail call i32 @str32_strsearch(i8* %0, i64 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 3)
%23 = icmp eq i32 %22, -1
br i1 %23, label %27, label %24
24: ; preds = %21
%25 = and i64 %2, 1610612736
%26 = icmp eq i64 %25, 536870912
br i1 %26, label %39, label %40
27: ; preds = %21
%28 = tail call i32 @str32_strsearch(i8* %0, i64 %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 2)
%29 = icmp eq i32 %28, -1
br i1 %29, label %33, label %30
30: ; preds = %27
%31 = and i64 %2, 1610612736
%32 = icmp eq i64 %31, 536870912
br i1 %32, label %40, label %39
33: ; preds = %27
%34 = tail call i32 @str32_strsearch(i8* %0, i64 %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 2)
%35 = icmp ne i32 %34, -1
%36 = and i64 %2, 536870912
%37 = icmp eq i64 %36, 0
%38 = and i1 %37, %35
br i1 %38, label %40, label %39
39: ; preds = %24, %12, %33, %30, %18, %6
br label %40
40: ; preds = %33, %30, %24, %18, %12, %6, %39
%41 = phi i8 [ 1, %39 ], [ 0, %6 ], [ 0, %12 ], [ 0, %18 ], [ 0, %24 ], [ 0, %30 ], [ 0, %33 ]
ret i8 %41
}