#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*/ assert(int /*<<< orphan*/);
int nondet_int();
main() {
  int k, l;
  int r = 2;
  if (nondet_int()) {
    while (r < 50) {
      r = r + nondet_int();
      if (r > 53) {
        r = 53;
        assert(0);
      } else {
        r = 0;
        assert(0);
      }
    }
    l = 13;
    for (k = 0; k <= r; k++) {
      int t = 2;
      assert(0);
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x10(%rbp)
mov    $0x0,%al
call   1030 <nondet_int@plt>
cmp    $0x0,%eax
je     11d7 <main+0xb7>
jmp    114b <main+0x2b>
cmpl   $0x32,-0x10(%rbp)
jge    119c <main+0x7c>
mov    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <nondet_int@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x35,-0x10(%rbp)
jle    1189 <main+0x69>
movl   $0x35,-0x10(%rbp)
xor    %edi,%edi
call   1040 <assert@plt>
jmp    1197 <main+0x77>
movl   $0x0,-0x10(%rbp)
xor    %edi,%edi
call   1040 <assert@plt>
jmp    114b <main+0x2b>
movl   $0xd,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     11d2 <main+0xb2>
movl   $0x2,-0x14(%rbp)
xor    %edi,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11aa <main+0x8a>
jmp    11d7 <main+0xb7>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <nondet_int@plt>
test   %eax,%eax
je     117c <main+0x5c>
xor    %eax,%eax
call   1030 <nondet_int@plt>
mov    %eax,%ebx
xor    %edi,%edi
call   1040 <assert@plt>
cmp    $0x33,%ebx
jg     1165 <main+0x45>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <nondet_int@plt>
mov    %eax,%ebx
xor    %edi,%edi
call   1040 <assert@plt>
cmp    $0x36,%ebx
jl     1150 <main+0x30>
mov    $0x36,%ebx
nopw   0x0(%rax,%rax,1)
xor    %edi,%edi
call   1040 <assert@plt>
add    $0xffffffff,%ebx
jne    1170 <main+0x50>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 2, i32* %4
%6 = call i32 (...) @nondet_int()
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %34
8: ; preds = %0
br label %9
9: ; preds = %22, %8
%10 = load i32, i32* %4
%11 = icmp slt i32 %10, 50
br i1 %11, label %12, label %23
12: ; preds = %9
%13 = load i32, i32* %4
%14 = call i32 (...) @nondet_int()
%15 = add nsw i32 %13, %14
store i32 %15, i32* %4
%16 = load i32, i32* %4
%17 = icmp sgt i32 %16, 53
br i1 %17, label %18, label %20
18: ; preds = %12
store i32 53, i32* %4
%19 = call i32 @assert(i32 0)
br label %22
20: ; preds = %12
store i32 0, i32* %4
%21 = call i32 @assert(i32 0)
br label %22
22: ; preds = %20, %18
br label %9
23: ; preds = %9
store i32 13, i32* %3
store i32 0, i32* %2
br label %24
24: ; preds = %30, %23
%25 = load i32, i32* %2
%26 = load i32, i32* %4
%27 = icmp sle i32 %25, %26
br i1 %27, label %28, label %33
28: ; preds = %24
store i32 2, i32* %5
%29 = call i32 @assert(i32 0)
br label %30
30: ; preds = %28
%31 = load i32, i32* %2
%32 = add nsw i32 %31, 1
store i32 %32, i32* %2
br label %24
33: ; preds = %24
br label %34
34: ; preds = %33, %0
%35 = load i32, i32* %1
ret i32 %35
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @nondet_int()
%2 = icmp eq i32 %1, 0
br i1 %2, label %17, label %3
3: ; preds = %0
%4 = tail call i32 (...) @nondet_int()
%5 = icmp sgt i32 %4, 51
%6 = tail call i32 @assert(i32 0)
br i1 %5, label %11, label %7
7: ; preds = %3, %7
%8 = tail call i32 (...) @nondet_int()
%9 = icmp sgt i32 %8, 53
%10 = tail call i32 @assert(i32 0)
br i1 %9, label %11, label %7
11: ; preds = %7, %3
br label %12
12: ; preds = %11, %12
%13 = phi i32 [ %15, %12 ], [ 0, %11 ]
%14 = tail call i32 @assert(i32 0)
%15 = add nuw nsw i32 %13, 1
%16 = icmp eq i32 %13, 53
br i1 %16, label %17, label %12
17: ; preds = %12, %0
ret i32 0
}