#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 __VERIFIER_nondet_int();
int main() {
  int c, flag, x, y, z;
  c = 0;
  flag = 1;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  z = __VERIFIER_nondet_int();
  while ((y < z) && (flag > 0)) {
    if ((y > 0) && (x > 1)) {
      y = x * y;
    } else {
      if ((y > 0) && (x < -1)) {
        y = -x * y;
      } else {
        flag = 0;
      }
    }
    c = c + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%ecx
xor    %eax,%eax
cmp    -0x18(%rbp),%ecx
mov    %al,-0x19(%rbp)
jge    1166 <main+0x56>
cmpl   $0x0,-0xc(%rbp)
setg   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1176 <main+0x66>
jmp    11d8 <main+0xc8>
cmpl   $0x0,-0x14(%rbp)
jle    1199 <main+0x89>
cmpl   $0x1,-0x10(%rbp)
jle    1199 <main+0x89>
mov    -0x10(%rbp),%eax
imul   -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    11ca <main+0xba>
cmpl   $0x0,-0x14(%rbp)
jle    11be <main+0xae>
cmpl   $0xffffffff,-0x10(%rbp)
jge    11be <main+0xae>
xor    %eax,%eax
sub    -0x10(%rbp),%eax
imul   -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    11c5 <main+0xb5>
movl   $0x0,-0xc(%rbp)
jmp    11ca <main+0xba>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    114b <main+0x3b>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
pop    %rcx
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
store i32 0, i32* %2
store i32 1, i32* %3
%7 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %7, i32* %4
%8 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %8, i32* %5
%9 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %9, i32* %6
br label %10
10: ; preds = %42, %0
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %17
14: ; preds = %10
%15 = load i32, i32* %3
%16 = icmp sgt i32 %15, 0
br label %17
17: ; preds = %14, %10
%18 = phi i1 [ false, %10 ], [ %16, %14 ]
br i1 %18, label %19, label %45
19: ; preds = %17
%20 = load i32, i32* %5
%21 = icmp sgt i32 %20, 0
br i1 %21, label %22, label %29
22: ; preds = %19
%23 = load i32, i32* %4
%24 = icmp sgt i32 %23, 1
br i1 %24, label %25, label %29
25: ; preds = %22
%26 = load i32, i32* %4
%27 = load i32, i32* %5
%28 = mul nsw i32 %26, %27
store i32 %28, i32* %5
br label %42
29: ; preds = %22, %19
%30 = load i32, i32* %5
%31 = icmp sgt i32 %30, 0
br i1 %31, label %32, label %40
32: ; preds = %29
%33 = load i32, i32* %4
%34 = icmp slt i32 %33, -1
br i1 %34, label %35, label %40
35: ; preds = %32
%36 = load i32, i32* %4
%37 = sub nsw i32 0, %36
%38 = load i32, i32* %5
%39 = mul nsw i32 %37, %38
store i32 %39, i32* %5
br label %41
40: ; preds = %32, %29
store i32 0, i32* %3
br label %41
41: ; preds = %40, %35
br label %42
42: ; preds = %41, %25
%43 = load i32, i32* %2
%44 = add nsw i32 %43, 1
store i32 %44, i32* %2
br label %10
45: ; preds = %17
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
%3 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}