#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 */
scalar_t__ __VERIFIER_nondet_int();
int *alloca(int);
int main() {
  int *x = alloca(sizeof(int));
  int *y = alloca(sizeof(int));
  int *z = alloca(sizeof(int));
  int *m = alloca(sizeof(int));
  int *n = alloca(sizeof(int));
  if (__VERIFIER_nondet_int()) {
    *x = 1;
  } else {
    *x = -1;
  }
  while (*y < 100 && *z < 100) {
    *y = *y + *x;
    *z = *z - *x;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%edi
call   1030 <alloca@plt>
mov    %rax,-0x10(%rbp)
mov    $0x4,%edi
call   1030 <alloca@plt>
mov    %rax,-0x18(%rbp)
mov    $0x4,%edi
call   1030 <alloca@plt>
mov    %rax,-0x20(%rbp)
mov    $0x4,%edi
call   1030 <alloca@plt>
mov    %rax,-0x28(%rbp)
mov    $0x4,%edi
call   1030 <alloca@plt>
mov    %rax,-0x30(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
cmp    $0x0,%rax
je     1195 <main+0x75>
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
jmp    119f <main+0x7f>
mov    -0x10(%rbp),%rax
movl   $0xffffffff,(%rax)
jmp    11a4 <main+0x84>
mov    -0x18(%rbp),%rcx
xor    %eax,%eax
cmpl   $0x64,(%rcx)
mov    %al,-0x31(%rbp)
jge    11c3 <main+0xa3>
mov    -0x20(%rbp),%rax
cmpl   $0x64,(%rax)
setl   %al
mov    %al,-0x31(%rbp)
mov    -0x31(%rbp),%al
test   $0x1,%al
jne    11d3 <main+0xb3>
jmp    11fc <main+0xdc>
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
add    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
sub    (%rax),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
jmp    11a4 <main+0x84>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
mov    $0x4,%edi
call   1030 <alloca@plt>
mov    %rax,%r14
mov    $0x4,%edi
call   1030 <alloca@plt>
mov    %rax,%r15
mov    $0x4,%edi
call   1030 <alloca@plt>
mov    %rax,%rbx
mov    $0x4,%edi
call   1030 <alloca@plt>
mov    $0x4,%edi
call   1030 <alloca@plt>
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
cmp    $0x1,%rax
sbb    %eax,%eax
or     $0x1,%eax
mov    %eax,(%r14)
mov    (%r15),%eax
cmp    $0x63,%eax
jg     119a <main+0x7a>
mov    (%rbx),%ecx
nopl   (%rax)
cmp    $0x63,%ecx
jg     119a <main+0x7a>
add    (%r14),%eax
mov    %eax,(%r15)
mov    (%rbx),%ecx
sub    (%r14),%ecx
mov    %ecx,(%rbx)
mov    (%r15),%eax
cmp    $0x64,%eax
jl     1180 <main+0x60>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
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
%7 = call i32* @alloca(i32 4)
store i32* %7, i32** %2
%8 = call i32* @alloca(i32 4)
store i32* %8, i32** %3
%9 = call i32* @alloca(i32 4)
store i32* %9, i32** %4
%10 = call i32* @alloca(i32 4)
store i32* %10, i32** %5
%11 = call i32* @alloca(i32 4)
store i32* %11, i32** %6
%12 = call i64 (...) @__VERIFIER_nondet_int()
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %0
%15 = load i32*, i32** %2
store i32 1, i32* %15
br label %18
16: ; preds = %0
%17 = load i32*, i32** %2
store i32 -1, i32* %17
br label %18
18: ; preds = %16, %14
br label %19
19: ; preds = %29, %18
%20 = load i32*, i32** %3
%21 = load i32, i32* %20
%22 = icmp slt i32 %21, 100
br i1 %22, label %23, label %27
23: ; preds = %19
%24 = load i32*, i32** %4
%25 = load i32, i32* %24
%26 = icmp slt i32 %25, 100
br label %27
27: ; preds = %23, %19
%28 = phi i1 [ false, %19 ], [ %26, %23 ]
br i1 %28, label %29, label %42
29: ; preds = %27
%30 = load i32*, i32** %3
%31 = load i32, i32* %30
%32 = load i32*, i32** %2
%33 = load i32, i32* %32
%34 = add nsw i32 %31, %33
%35 = load i32*, i32** %3
store i32 %34, i32* %35
%36 = load i32*, i32** %4
%37 = load i32, i32* %36
%38 = load i32*, i32** %2
%39 = load i32, i32* %38
%40 = sub nsw i32 %37, %39
%41 = load i32*, i32** %4
store i32 %40, i32* %41
br label %19
42: ; preds = %27
ret i32 0
}

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