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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%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)
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x11(%rbp)
jle    114c <main+0x3c>
cmpl   $0x0,-0xc(%rbp)
setg   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    115c <main+0x4c>
jmp    119c <main+0x8c>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x2a,-0x10(%rbp)
jge    118e <main+0x7e>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1197 <main+0x87>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <main+0x23>
xor    %eax,%eax
add    $0x20,%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   %ebx,%ebx
jle    1157 <main+0x47>
mov    %eax,%ebp
jmp    1137 <main+0x27>
nopl   0x0(%rax,%rax,1)
add    $0xffffffff,%ebp
test   %ebx,%ebx
jle    1157 <main+0x47>
test   %ebp,%ebp
jle    1157 <main+0x47>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
cmp    $0x29,%eax
jg     1130 <main+0x20>
add    $0xffffffff,%ebx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,%ebp
test   %ebx,%ebx
jg     1137 <main+0x27>
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
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %5, i32* %2
%6 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %6, i32* %3
br label %7
7: ; preds = %27, %0
%8 = load i32, i32* %2
%9 = icmp sgt i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %7
%11 = load i32, i32* %3
%12 = icmp sgt i32 %11, 0
br label %13
13: ; preds = %10, %7
%14 = phi i1 [ false, %7 ], [ %12, %10 ]
br i1 %14, label %15, label %28
15: ; preds = %13
%16 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %16, i32* %4
%17 = load i32, i32* %4
%18 = icmp slt i32 %17, 42
br i1 %18, label %19, label %24
19: ; preds = %15
%20 = load i32, i32* %2
%21 = sub nsw i32 %20, 1
store i32 %21, i32* %2
%22 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %22, i32* %4
%23 = load i32, i32* %4
store i32 %23, i32* %3
br label %27
24: ; preds = %15
%25 = load i32, i32* %3
%26 = sub nsw i32 %25, 1
store i32 %26, i32* %3
br label %27
27: ; preds = %24, %19
br label %7
28: ; preds = %13
ret i32 0
}

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