#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 __VERIFIER_nondet_int_val();
void f(int d) {
  int x, y, k, z = 1;
L1:
  while (z < k) {
    z = 2 * z;
  }
L2:
  while (x > 0 && y > 0) {
    int c = __VERIFIER_nondet_int();
    if (c) {
    P1:
      x = x - d;
      y = __VERIFIER_nondet_int_val();
      z = z - 1;
    } else {
      y = y - d;
    }
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x14(%rbp)
jmp    1137 <f+0x17>
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1151 <f+0x31>
mov    -0x14(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1137 <f+0x17>
jmp    1156 <f+0x36>
jmp    115b <f+0x3b>
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x19(%rbp)
jle    1174 <f+0x54>
cmpl   $0x0,-0xc(%rbp)
setg   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1184 <f+0x64>
jmp    11cc <f+0xac>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
je     11be <f+0x9e>
jmp    119d <f+0x7d>
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int_val@plt>
mov    %eax,-0xc(%rbp)
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11c7 <f+0xa7>
mov    -0xc(%rbp),%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    115b <f+0x3b>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
ret

LLVM IR (-O0):
define void @f(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %6
br label %8
8: ; preds = %1
br label %9
9: ; preds = %13, %8
%10 = load i32, i32* %6
%11 = load i32, i32* %5
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %16
13: ; preds = %9
%14 = load i32, i32* %6
%15 = mul nsw i32 2, %14
store i32 %15, i32* %6
br label %9
16: ; preds = %9
br label %17
17: ; preds = %16
br label %18
18: ; preds = %42, %17
%19 = load i32, i32* %3
%20 = icmp sgt i32 %19, 0
br i1 %20, label %21, label %24
21: ; preds = %18
%22 = load i32, i32* %4
%23 = icmp sgt i32 %22, 0
br label %24
24: ; preds = %21, %18
%25 = phi i1 [ false, %18 ], [ %23, %21 ]
br i1 %25, label %26, label %43
26: ; preds = %24
%27 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %27, i32* %7
%28 = load i32, i32* %7
%29 = icmp ne i32 %28, 0
br i1 %29, label %30, label %38
30: ; preds = %26
br label %31
31: ; preds = %30
%32 = load i32, i32* %3
%33 = load i32, i32* %2
%34 = sub nsw i32 %32, %33
store i32 %34, i32* %3
%35 = call i32 (...) @__VERIFIER_nondet_int_val()
store i32 %35, i32* %4
%36 = load i32, i32* %6
%37 = sub nsw i32 %36, 1
store i32 %37, i32* %6
br label %42
38: ; preds = %26
%39 = load i32, i32* %4
%40 = load i32, i32* %2
%41 = sub nsw i32 %39, %40
store i32 %41, i32* %4
br label %42
42: ; preds = %38, %31
br label %18
43: ; preds = %24
ret void
}

LLVM IR (-O2):
define void @f(i32 %0) {
ret void
}