#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*/ check(int);
int negate(int);
int nondet_int();
int times2(int);
void main() {
  int a, b, d;
  a = nondet_int();
  b = -7;
  a = times2(a);
  a = times2(a);
  b = negate(b);
  d = a + b + nondet_int();
  if ((a == 44 && b == 7) || d < 4) {
  ERROR:
    return;
  }
  check(a);
  check(b);
  int c = a + b;
  c *= 2;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   1030 <nondet_int@plt>
mov    %eax,-0x4(%rbp)
movl   $0xfffffff9,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1060 <times2@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1060 <times2@plt>
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <negate@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1030 <nondet_int@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x2c,-0x4(%rbp)
jne    11a8 <main+0x68>
cmpl   $0x7,-0x8(%rbp)
je     11b2 <main+0x72>
cmpl   $0x4,-0xc(%rbp)
jge    11bc <main+0x7c>
jmp    11b7 <main+0x77>
jmp    11de <main+0x9e>
mov    -0x4(%rbp),%edi
call   1050 <check@plt>
mov    -0x8(%rbp),%edi
call   1050 <check@plt>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x10(%rbp)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <nondet_int@plt>
mov    %eax,%edi
call   1060 <times2@plt>
mov    %eax,%edi
call   1060 <times2@plt>
mov    %eax,%r14d
mov    $0xfffffff9,%edi
call   1040 <negate@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <nondet_int@plt>
mov    %r14d,%ecx
xor    $0x2c,%ecx
mov    %ebx,%edx
xor    $0x7,%edx
or     %ecx,%edx
je     119e <main+0x5e>
add    %ebx,%eax
add    %r14d,%eax
cmp    $0x4,%eax
jl     119e <main+0x5e>
mov    %r14d,%edi
call   1050 <check@plt>
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <check@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @nondet_int()
%2 = tail call i32 @times2(i32 %1)
%3 = tail call i32 @times2(i32 %2)
%4 = tail call i32 @negate(i32 -7)
%5 = add nsw i32 %4, %3
%6 = tail call i32 (...) @nondet_int()
%7 = add nsw i32 %5, %6
%8 = icmp eq i32 %3, 44
%9 = icmp eq i32 %4, 7
%10 = select i1 %8, i1 %9, i1 false
%11 = icmp slt i32 %7, 4
%12 = select i1 %10, i1 true, i1 %11
br i1 %12, label %16, label %13
13: ; preds = %0
%14 = tail call i32 @check(i32 %3)
%15 = tail call i32 @check(i32 %4)
br label %16
16: ; preds = %0, %13
ret void
}