#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*/ __CRAB_assert(int);
scalar_t__ nd();
int main() {
  int u, y, z, x;
  if (nd())
    u = 0;
  else
    u = 10;
  if (nd())
    y = 0;
  else
    y = 10;
  if (nd())
    z = 0;
  else
    z = 10;
  if (nd())
    x = u + y;
  else
    x = u + z;
  if (x < 3)
    u = u + 3;
  else
    u = 3;
  __CRAB_assert(u >= 3 && u <= 5);
  if (nd())
    return 42;
  else
    return u;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <nd@plt>
cmp    $0x0,%rax
je     114c <main+0x2c>
movl   $0x0,-0x8(%rbp)
jmp    1153 <main+0x33>
movl   $0xa,-0x8(%rbp)
mov    $0x0,%al
call   1030 <nd@plt>
cmp    $0x0,%rax
je     1170 <main+0x50>
movl   $0x0,-0xc(%rbp)
jmp    1177 <main+0x57>
movl   $0xa,-0xc(%rbp)
mov    $0x0,%al
call   1030 <nd@plt>
cmp    $0x0,%rax
je     1194 <main+0x74>
movl   $0x0,-0x10(%rbp)
jmp    119b <main+0x7b>
movl   $0xa,-0x10(%rbp)
mov    $0x0,%al
call   1030 <nd@plt>
cmp    $0x0,%rax
je     11ba <main+0x9a>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    11c3 <main+0xa3>
mov    -0x8(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jge    11db <main+0xbb>
mov    -0x8(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x8(%rbp)
jmp    11e2 <main+0xc2>
movl   $0x3,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x3,-0x8(%rbp)
mov    %al,-0x15(%rbp)
jl     11fb <main+0xdb>
cmpl   $0x5,-0x8(%rbp)
setle  %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__CRAB_assert@plt>
mov    $0x0,%al
call   1030 <nd@plt>
cmp    $0x0,%rax
je     1225 <main+0x105>
movl   $0x2a,-0x4(%rbp)
jmp    122b <main+0x10b>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <nd@plt>
test   %rax,%rax
mov    $0xa,%r14d
mov    $0x0,%ebx
cmove  %r14d,%ebx
xor    %eax,%eax
call   1030 <nd@plt>
test   %rax,%rax
mov    $0x0,%r15d
cmove  %r14d,%r15d
xor    %eax,%eax
call   1030 <nd@plt>
test   %rax,%rax
mov    $0x0,%ebp
cmove  %r14d,%ebp
xor    %eax,%eax
call   1030 <nd@plt>
test   %rax,%rax
cmovne %r15d,%ebp
add    %ebx,%ebp
add    $0x3,%ebx
cmp    $0x3,%ebp
mov    $0x3,%ebp
cmovb  %ebx,%ebp
xor    %edi,%edi
cmp    $0x6,%ebp
setb   %dil
call   1040 <__CRAB_assert@plt>
xor    %eax,%eax
call   1030 <nd@plt>
test   %rax,%rax
mov    $0x2a,%eax
cmove  %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
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
%6 = call i64 (...) @nd()
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %0
store i32 0, i32* %2
br label %10
9: ; preds = %0
store i32 10, i32* %2
br label %10
10: ; preds = %9, %8
%11 = call i64 (...) @nd()
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %10
store i32 0, i32* %3
br label %15
14: ; preds = %10
store i32 10, i32* %3
br label %15
15: ; preds = %14, %13
%16 = call i64 (...) @nd()
%17 = icmp ne i64 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %15
store i32 0, i32* %4
br label %20
19: ; preds = %15
store i32 10, i32* %4
br label %20
20: ; preds = %19, %18
%21 = call i64 (...) @nd()
%22 = icmp ne i64 %21, 0
br i1 %22, label %23, label %27
23: ; preds = %20
%24 = load i32, i32* %2
%25 = load i32, i32* %3
%26 = add nsw i32 %24, %25
store i32 %26, i32* %5
br label %31
27: ; preds = %20
%28 = load i32, i32* %2
%29 = load i32, i32* %4
%30 = add nsw i32 %28, %29
store i32 %30, i32* %5
br label %31
31: ; preds = %27, %23
%32 = load i32, i32* %5
%33 = icmp slt i32 %32, 3
br i1 %33, label %34, label %37
34: ; preds = %31
%35 = load i32, i32* %2
%36 = add nsw i32 %35, 3
store i32 %36, i32* %2
br label %38
37: ; preds = %31
store i32 3, i32* %2
br label %38
38: ; preds = %37, %34
%39 = load i32, i32* %2
%40 = icmp sge i32 %39, 3
br i1 %40, label %41, label %44
41: ; preds = %38
%42 = load i32, i32* %2
%43 = icmp sle i32 %42, 5
br label %44
44: ; preds = %41, %38
%45 = phi i1 [ false, %38 ], [ %43, %41 ]
%46 = zext i1 %45 to i32
%47 = call i32 @__CRAB_assert(i32 %46)
%48 = call i64 (...) @nd()
%49 = icmp ne i64 %48, 0
br i1 %49, label %50, label %51
50: ; preds = %44
store i32 42, i32* %1
br label %53
51: ; preds = %44
%52 = load i32, i32* %2
store i32 %52, i32* %1
br label %53
53: ; preds = %51, %50
%54 = load i32, i32* %1
ret i32 %54
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @nd()
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i32 10, i32 0
%4 = tail call i64 (...) @nd()
%5 = icmp eq i64 %4, 0
%6 = select i1 %5, i32 10, i32 0
%7 = tail call i64 (...) @nd()
%8 = icmp eq i64 %7, 0
%9 = select i1 %8, i32 10, i32 0
%10 = tail call i64 (...) @nd()
%11 = icmp eq i64 %10, 0
%12 = select i1 %11, i32 %9, i32 %6
%13 = add nuw nsw i32 %12, %3
%14 = icmp ult i32 %13, 3
%15 = add nuw nsw i32 %3, 3
%16 = select i1 %14, i32 %15, i32 3
%17 = icmp ult i32 %16, 6
%18 = zext i1 %17 to i32
%19 = tail call i32 @__CRAB_assert(i32 %18)
%20 = tail call i64 (...) @nd()
%21 = icmp eq i64 %20, 0
%22 = select i1 %21, i32 %16, i32 42
ret i32 %22
}