#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*/ assert(int);
int rand();
int main() {
  int top = rand();
  int top2 = rand();
  int x, y;
  if (top) {
    x = 1;
  } else {
    x = 0;
  }
  if (top2) {
    y = 1;
  } else {
    y = 0;
  }
  assert(x < 2);
  assert(x < 1);
  assert(x < 0);
  assert(x <= 2);
  assert(x <= 1);
  assert(x <= 0);
  assert(x <= -1);
  assert(x > -1);
  assert(x > 0);
  assert(x > 1);
  assert(x >= -1);
  assert(x >= 0);
  assert(x >= 1);
  assert(x >= 2);
  assert(x == y);
  assert(x == 1);
  assert(x == 2);
  assert(x != y);
  assert(x != 1);
  assert(x != 2);
  int z = rand();
  y = 3;
  if (z == 3) {
    assert(y == z);
    assert(y != z);
  } else {
    assert(y == z);
    assert(y != z);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1159 <main+0x39>
movl   $0x1,-0x10(%rbp)
jmp    1160 <main+0x40>
movl   $0x0,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1176 <main+0x56>
movl   $0x1,-0x14(%rbp)
jmp    117d <main+0x5d>
movl   $0x0,-0x14(%rbp)
cmpl   $0x2,-0x10(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x1,-0x10(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x0,-0x10(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x2,-0x10(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x1,-0x10(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x0,-0x10(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0xffffffff,-0x10(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0xffffffff,-0x10(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x0,-0x10(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x1,-0x10(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0xffffffff,-0x10(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x0,-0x10(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x1,-0x10(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x2,-0x10(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x1,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x2,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x1,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x2,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x0,%al
call   1040 <rand@plt>
mov    %eax,-0x18(%rbp)
movl   $0x3,-0x14(%rbp)
cmpl   $0x3,-0x18(%rbp)
jne    131b <main+0x1fb>
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
jmp    1341 <main+0x221>
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
xor    %eax,%eax
call   1040 <rand@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1040 <rand@plt>
xor    %r14d,%r14d
xor    %ebx,%ebx
test   %ebp,%ebp
setne  %r14b
sete   %bl
test   %eax,%eax
sete   %bpl
mov    $0x1,%edi
call   1030 <assert@plt>
mov    %ebx,%edi
call   1030 <assert@plt>
xor    %edi,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    %ebx,%edi
call   1030 <assert@plt>
xor    %edi,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    %r14d,%edi
call   1030 <assert@plt>
xor    %edi,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    %r14d,%edi
call   1030 <assert@plt>
xor    %edi,%edi
call   1030 <assert@plt>
xor    %bl,%bpl
movzbl %bpl,%ebp
mov    %ebp,%edi
xor    $0x1,%edi
call   1030 <assert@plt>
mov    %r14d,%edi
call   1030 <assert@plt>
xor    %edi,%edi
call   1030 <assert@plt>
mov    %ebp,%edi
call   1030 <assert@plt>
mov    %ebx,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %eax,%eax
call   1040 <rand@plt>
xor    %ebx,%ebx
xor    %edi,%edi
cmp    $0x3,%eax
setne  %bl
sete   %dil
call   1030 <assert@plt>
mov    %ebx,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = call i32 (...) @rand()
store i32 %7, i32* %2
%8 = call i32 (...) @rand()
store i32 %8, i32* %3
%9 = load i32, i32* %2
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %0
store i32 1, i32* %4
br label %13
12: ; preds = %0
store i32 0, i32* %4
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %3
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %13
store i32 1, i32* %5
br label %18
17: ; preds = %13
store i32 0, i32* %5
br label %18
18: ; preds = %17, %16
%19 = load i32, i32* %4
%20 = icmp slt i32 %19, 2
%21 = zext i1 %20 to i32
%22 = call i32 @assert(i32 %21)
%23 = load i32, i32* %4
%24 = icmp slt i32 %23, 1
%25 = zext i1 %24 to i32
%26 = call i32 @assert(i32 %25)
%27 = load i32, i32* %4
%28 = icmp slt i32 %27, 0
%29 = zext i1 %28 to i32
%30 = call i32 @assert(i32 %29)
%31 = load i32, i32* %4
%32 = icmp sle i32 %31, 2
%33 = zext i1 %32 to i32
%34 = call i32 @assert(i32 %33)
%35 = load i32, i32* %4
%36 = icmp sle i32 %35, 1
%37 = zext i1 %36 to i32
%38 = call i32 @assert(i32 %37)
%39 = load i32, i32* %4
%40 = icmp sle i32 %39, 0
%41 = zext i1 %40 to i32
%42 = call i32 @assert(i32 %41)
%43 = load i32, i32* %4
%44 = icmp sle i32 %43, -1
%45 = zext i1 %44 to i32
%46 = call i32 @assert(i32 %45)
%47 = load i32, i32* %4
%48 = icmp sgt i32 %47, -1
%49 = zext i1 %48 to i32
%50 = call i32 @assert(i32 %49)
%51 = load i32, i32* %4
%52 = icmp sgt i32 %51, 0
%53 = zext i1 %52 to i32
%54 = call i32 @assert(i32 %53)
%55 = load i32, i32* %4
%56 = icmp sgt i32 %55, 1
%57 = zext i1 %56 to i32
%58 = call i32 @assert(i32 %57)
%59 = load i32, i32* %4
%60 = icmp sge i32 %59, -1
%61 = zext i1 %60 to i32
%62 = call i32 @assert(i32 %61)
%63 = load i32, i32* %4
%64 = icmp sge i32 %63, 0
%65 = zext i1 %64 to i32
%66 = call i32 @assert(i32 %65)
%67 = load i32, i32* %4
%68 = icmp sge i32 %67, 1
%69 = zext i1 %68 to i32
%70 = call i32 @assert(i32 %69)
%71 = load i32, i32* %4
%72 = icmp sge i32 %71, 2
%73 = zext i1 %72 to i32
%74 = call i32 @assert(i32 %73)
%75 = load i32, i32* %4
%76 = load i32, i32* %5
%77 = icmp eq i32 %75, %76
%78 = zext i1 %77 to i32
%79 = call i32 @assert(i32 %78)
%80 = load i32, i32* %4
%81 = icmp eq i32 %80, 1
%82 = zext i1 %81 to i32
%83 = call i32 @assert(i32 %82)
%84 = load i32, i32* %4
%85 = icmp eq i32 %84, 2
%86 = zext i1 %85 to i32
%87 = call i32 @assert(i32 %86)
%88 = load i32, i32* %4
%89 = load i32, i32* %5
%90 = icmp ne i32 %88, %89
%91 = zext i1 %90 to i32
%92 = call i32 @assert(i32 %91)
%93 = load i32, i32* %4
%94 = icmp ne i32 %93, 1
%95 = zext i1 %94 to i32
%96 = call i32 @assert(i32 %95)
%97 = load i32, i32* %4
%98 = icmp ne i32 %97, 2
%99 = zext i1 %98 to i32
%100 = call i32 @assert(i32 %99)
%101 = call i32 (...) @rand()
store i32 %101, i32* %6
store i32 3, i32* %5
%102 = load i32, i32* %6
%103 = icmp eq i32 %102, 3
br i1 %103, label %104, label %115
104: ; preds = %18
%105 = load i32, i32* %5
%106 = load i32, i32* %6
%107 = icmp eq i32 %105, %106
%108 = zext i1 %107 to i32
%109 = call i32 @assert(i32 %108)
%110 = load i32, i32* %5
%111 = load i32, i32* %6
%112 = icmp ne i32 %110, %111
%113 = zext i1 %112 to i32
%114 = call i32 @assert(i32 %113)
br label %126
115: ; preds = %18
%116 = load i32, i32* %5
%117 = load i32, i32* %6
%118 = icmp eq i32 %116, %117
%119 = zext i1 %118 to i32
%120 = call i32 @assert(i32 %119)
%121 = load i32, i32* %5
%122 = load i32, i32* %6
%123 = icmp ne i32 %121, %122
%124 = zext i1 %123 to i32
%125 = call i32 @assert(i32 %124)
br label %126
126: ; preds = %115, %104
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @rand()
%2 = tail call i32 (...) @rand()
%3 = icmp eq i32 %1, 0
%4 = xor i1 %3, true
%5 = icmp eq i32 %2, 0
%6 = tail call i32 @assert(i32 1)
%7 = zext i1 %3 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = tail call i32 @assert(i32 0)
%10 = tail call i32 @assert(i32 1)
%11 = tail call i32 @assert(i32 1)
%12 = tail call i32 @assert(i32 %7)
%13 = tail call i32 @assert(i32 0)
%14 = tail call i32 @assert(i32 1)
%15 = zext i1 %4 to i32
%16 = tail call i32 @assert(i32 %15)
%17 = tail call i32 @assert(i32 0)
%18 = tail call i32 @assert(i32 1)
%19 = tail call i32 @assert(i32 1)
%20 = tail call i32 @assert(i32 %15)
%21 = tail call i32 @assert(i32 0)
%22 = xor i1 %3, %5
%23 = zext i1 %22 to i32
%24 = xor i32 %23, 1
%25 = tail call i32 @assert(i32 %24)
%26 = tail call i32 @assert(i32 %15)
%27 = tail call i32 @assert(i32 0)
%28 = tail call i32 @assert(i32 %23)
%29 = tail call i32 @assert(i32 %7)
%30 = tail call i32 @assert(i32 1)
%31 = tail call i32 (...) @rand()
%32 = icmp eq i32 %31, 3
%33 = zext i1 %32 to i32
%34 = xor i1 %32, true
%35 = zext i1 %34 to i32
%36 = tail call i32 @assert(i32 %33)
%37 = tail call i32 @assert(i32 %35)
ret i32 0
}