#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 f();
int main() {
  if (f() > 1000)
    return 1;
  if (f() >= 1000)
    return 1;
  if (1000 < f())
    return 1;
  if (1000 <= f())
    return 1;
  if (1000 == f())
    return 1;
  if (100 != f())
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <f@plt>
cmp    $0x3e8,%eax
jle    113d <main+0x2d>
movl   $0x1,-0x4(%rbp)
jmp    11ea <main+0xda>
mov    $0x0,%al
call   1030 <f@plt>
cmp    $0x3e8,%eax
jl     115b <main+0x4b>
movl   $0x1,-0x4(%rbp)
jmp    11ea <main+0xda>
mov    $0x0,%al
call   1030 <f@plt>
mov    %eax,%ecx
mov    $0x3e8,%eax
cmp    %ecx,%eax
jge    117d <main+0x6d>
movl   $0x1,-0x4(%rbp)
jmp    11ea <main+0xda>
mov    $0x0,%al
call   1030 <f@plt>
mov    %eax,%ecx
mov    $0x3e8,%eax
cmp    %ecx,%eax
jg     119f <main+0x8f>
movl   $0x1,-0x4(%rbp)
jmp    11ea <main+0xda>
mov    $0x0,%al
call   1030 <f@plt>
mov    %eax,%ecx
mov    $0x3e8,%eax
cmp    %ecx,%eax
jne    11c1 <main+0xb1>
movl   $0x1,-0x4(%rbp)
jmp    11ea <main+0xda>
mov    $0x0,%al
call   1030 <f@plt>
mov    %eax,%ecx
mov    $0x64,%eax
cmp    %ecx,%eax
je     11e3 <main+0xd3>
movl   $0x1,-0x4(%rbp)
jmp    11ea <main+0xda>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <f@plt>
mov    $0x1,%ebx
cmp    $0x3e8,%eax
jg     116b <main+0x5b>
xor    %eax,%eax
call   1030 <f@plt>
cmp    $0x3e7,%eax
jg     116b <main+0x5b>
xor    %eax,%eax
call   1030 <f@plt>
cmp    $0x3e8,%eax
jg     116b <main+0x5b>
xor    %eax,%eax
call   1030 <f@plt>
cmp    $0x3e7,%eax
jg     116b <main+0x5b>
xor    %eax,%eax
call   1030 <f@plt>
cmp    $0x3e8,%eax
je     116b <main+0x5b>
xor    %eax,%eax
call   1030 <f@plt>
xor    %ebx,%ebx
cmp    $0x64,%eax
setne  %bl
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @f()
%3 = icmp sgt i32 %2, 1000
br i1 %3, label %4, label %5
4: ; preds = %0
store i32 1, i32* %1
br label %26
5: ; preds = %0
%6 = call i32 (...) @f()
%7 = icmp sge i32 %6, 1000
br i1 %7, label %8, label %9
8: ; preds = %5
store i32 1, i32* %1
br label %26
9: ; preds = %5
%10 = call i32 (...) @f()
%11 = icmp slt i32 1000, %10
br i1 %11, label %12, label %13
12: ; preds = %9
store i32 1, i32* %1
br label %26
13: ; preds = %9
%14 = call i32 (...) @f()
%15 = icmp sle i32 1000, %14
br i1 %15, label %16, label %17
16: ; preds = %13
store i32 1, i32* %1
br label %26
17: ; preds = %13
%18 = call i32 (...) @f()
%19 = icmp eq i32 1000, %18
br i1 %19, label %20, label %21
20: ; preds = %17
store i32 1, i32* %1
br label %26
21: ; preds = %17
%22 = call i32 (...) @f()
%23 = icmp ne i32 100, %22
br i1 %23, label %24, label %25
24: ; preds = %21
store i32 1, i32* %1
br label %26
25: ; preds = %21
store i32 0, i32* %1
br label %26
26: ; preds = %25, %24, %20, %16, %12, %8, %4
%27 = load i32, i32* %1
ret i32 %27
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f()
%2 = icmp sgt i32 %1, 1000
br i1 %2, label %19, label %3
3: ; preds = %0
%4 = tail call i32 (...) @f()
%5 = icmp sgt i32 %4, 999
br i1 %5, label %19, label %6
6: ; preds = %3
%7 = tail call i32 (...) @f()
%8 = icmp sgt i32 %7, 1000
br i1 %8, label %19, label %9
9: ; preds = %6
%10 = tail call i32 (...) @f()
%11 = icmp sgt i32 %10, 999
br i1 %11, label %19, label %12
12: ; preds = %9
%13 = tail call i32 (...) @f()
%14 = icmp eq i32 %13, 1000
br i1 %14, label %19, label %15
15: ; preds = %12
%16 = tail call i32 (...) @f()
%17 = icmp ne i32 %16, 100
%18 = zext i1 %17 to i32
br label %19
19: ; preds = %15, %12, %9, %6, %3, %0
%20 = phi i32 [ 1, %0 ], [ 1, %3 ], [ 1, %6 ], [ 1, %9 ], [ 1, %12 ], [ %18, %15 ]
ret i32 %20
}