#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*/ __poet_fail();
int nondet(int, int);
int main(void) {
  int x, y;
  x = 1;
  y = nondet(-200, 200);
  if (y <= 10) {
    y = 10;
  } else {
    while (x < y) {
      x = 2 * x;
      y = y - 1;
    }
  }
  x = y + 1;
  if (x <= 0) {
    __poet_fail();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    $0xffffff38,%edi
mov    $0xc8,%esi
call   1040 <nondet@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jg     115e <main+0x3e>
movl   $0xa,-0xc(%rbp)
jmp    118b <main+0x6b>
jmp    1163 <main+0x43>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1186 <main+0x66>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1163 <main+0x43>
jmp    118b <main+0x6b>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     11a5 <main+0x85>
mov    $0x0,%al
call   1030 <__poet_fail@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xffffff38,%edi
mov    $0xc8,%esi
call   1040 <nondet@plt>
cmp    $0xb,%eax
jl     1157 <main+0x37>
mov    $0x1,%ecx
nopw   0x0(%rax,%rax,1)
add    %ecx,%ecx
add    $0xffffffff,%eax
cmp    %eax,%ecx
jl     1140 <main+0x20>
add    $0x1,%eax
test   %eax,%eax
jg     1157 <main+0x37>
xor    %eax,%eax
call   1030 <__poet_fail@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @nondet(i32 -200, i32 200)
%2 = icmp slt i32 %1, 11
br i1 %2, label %13, label %3
3: ; preds = %0, %3
%4 = phi i32 [ %7, %3 ], [ %1, %0 ]
%5 = phi i32 [ %6, %3 ], [ 1, %0 ]
%6 = shl nsw i32 %5, 1
%7 = add nsw i32 %4, -1
%8 = icmp slt i32 %6, %7
br i1 %8, label %3, label %9
9: ; preds = %3
%10 = icmp slt i32 %4, 1
br i1 %10, label %11, label %13
11: ; preds = %9
%12 = tail call i32 (...) @__poet_fail()
br label %13
13: ; preds = %0, %11, %9
ret i32 0
}