#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 x = __VERIFIER_nondet_int();
  int y = __VERIFIER_nondet_int();
  if (y < 1) {
    return 0;
  }
  while (x >= 0) {
    x = x - y;
    y = __VERIFIER_nondet_int();
    if (y < 1) {
      break;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jge    1149 <main+0x39>
movl   $0x0,-0x4(%rbp)
jmp    1186 <main+0x76>
jmp    114e <main+0x3e>
cmpl   $0x0,-0x8(%rbp)
jl     117f <main+0x6f>
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jge    117a <main+0x6a>
jmp    117f <main+0x6f>
jmp    114e <main+0x3e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
jle    1141 <main+0x31>
test   %ebx,%ebx
js     1141 <main+0x31>
mov    %eax,%ebp
nopl   (%rax)
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
jle    1141 <main+0x31>
sub    %ebp,%ebx
mov    %eax,%ebp
jns    1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
%3 = icmp sgt i32 %2, 0
%4 = icmp sgt i32 %1, -1
%5 = select i1 %3, i1 %4, i1 false
br i1 %5, label %6, label %14
6: ; preds = %0, %6
%7 = phi i32 [ %9, %6 ], [ %1, %0 ]
%8 = phi i32 [ %10, %6 ], [ %2, %0 ]
%9 = sub nsw i32 %7, %8
%10 = tail call i32 (...) @__VERIFIER_nondet_int()
%11 = icmp sgt i32 %10, 0
%12 = icmp sgt i32 %9, -1
%13 = select i1 %11, i1 %12, i1 false
br i1 %13, label %6, label %14
14: ; preds = %6, %0
ret i32 0
}