#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);
scalar_t__ nondet_bool();
float nondet_float();
int main() {
  float a, b, c;
  a = nondet_float();
  b = nondet_float();
  if (nondet_bool())
    c = a + b;
  else
    c = a - b;
  assert(c == a + b || c == a - b);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <nondet_float@plt>
movss  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <nondet_float@plt>
movss  %xmm0,-0xc(%rbp)
mov    $0x0,%al
call   1050 <nondet_bool@plt>
cmp    $0x0,%rax
je     117c <main+0x4c>
movss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    118b <main+0x5b>
movss  -0x8(%rbp),%xmm0
subss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
addss  -0xc(%rbp),%xmm1
mov    $0x1,%al
ucomiss %xmm1,%xmm0
mov    %al,-0x11(%rbp)
jne    11b3 <main+0x83>
jp     11b3 <main+0x83>
jmp    11d0 <main+0xa0>
movss  -0x10(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
subss  -0xc(%rbp),%xmm1
ucomiss %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <nondet_float@plt>
movss  %xmm0,0x4(%rsp)
xor    %eax,%eax
call   1030 <nondet_float@plt>
movss  %xmm0,(%rsp)
xor    %eax,%eax
call   1050 <nondet_bool@plt>
movss  0x4(%rsp),%xmm2
movaps %xmm2,%xmm0
movss  (%rsp),%xmm1
addss  %xmm1,%xmm0
subss  %xmm1,%xmm2
movaps %xmm2,%xmm1
test   %rax,%rax
je     1172 <main+0x42>
movaps %xmm0,%xmm1
ucomiss %xmm0,%xmm1
setnp  %al
sete   %cl
and    %al,%cl
ucomiss %xmm2,%xmm1
setnp  %al
sete   %dl
and    %al,%dl
or     %cl,%dl
movzbl %dl,%edi
call   1040 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
store i32 0, i32* %1
%5 = call float (...) @nondet_float()
store float %5, float* %2
%6 = call float (...) @nondet_float()
store float %6, float* %3
%7 = call i64 (...) @nondet_bool()
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %0
%10 = load float, float* %2
%11 = load float, float* %3
%12 = fadd float %10, %11
store float %12, float* %4
br label %17
13: ; preds = %0
%14 = load float, float* %2
%15 = load float, float* %3
%16 = fsub float %14, %15
store float %16, float* %4
br label %17
17: ; preds = %13, %9
%18 = load float, float* %4
%19 = load float, float* %2
%20 = load float, float* %3
%21 = fadd float %19, %20
%22 = fcmp oeq float %18, %21
br i1 %22, label %29, label %23
23: ; preds = %17
%24 = load float, float* %4
%25 = load float, float* %2
%26 = load float, float* %3
%27 = fsub float %25, %26
%28 = fcmp oeq float %24, %27
br label %29
29: ; preds = %23, %17
%30 = phi i1 [ true, %17 ], [ %28, %23 ]
%31 = zext i1 %30 to i32
%32 = call i32 @assert(i32 %31)
%33 = load i32, i32* %1
ret i32 %33
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call float (...) @nondet_float()
%2 = tail call float (...) @nondet_float()
%3 = tail call i64 (...) @nondet_bool()
%4 = icmp eq i64 %3, 0
%5 = fadd float %1, %2
%6 = fsub float %1, %2
%7 = select i1 %4, float %6, float %5
%8 = fcmp oeq float %7, %5
%9 = fcmp oeq float %7, %6
%10 = or i1 %8, %9
%11 = zext i1 %10 to i32
%12 = tail call i32 @assert(i32 %11)
ret i32 0
}