#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*/ __ESBMC_assert(int, char *);
int /*<<< orphan*/ __ESBMC_assume(int);
int main() {
  float a, b;
  __ESBMC_assume(a == 1 || a == 0.5 || a == 2 || a == 3 || a == 0.1);
  b = a;
  a *= 2;
  a /= 2;
  __ESBMC_assert(a == b, "float div works");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movss  -0x8(%rbp),%xmm0
mov    $0x1,%al
movss  0xec2(%rip),%xmm1
ucomiss %xmm1,%xmm0
mov    %al,-0xd(%rbp)
jne    1155 <main+0x35>
jp     1155 <main+0x35>
jmp    11ec <main+0xcc>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
movsd  0xea8(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0xd(%rbp)
jne    1180 <main+0x60>
jp     1180 <main+0x60>
jmp    11ec <main+0xcc>
movss  -0x8(%rbp),%xmm0
mov    $0x1,%al
movss  0xe75(%rip),%xmm1
ucomiss %xmm1,%xmm0
mov    %al,-0xd(%rbp)
jne    11a6 <main+0x86>
jp     11a6 <main+0x86>
jmp    11ec <main+0xcc>
movss  -0x8(%rbp),%xmm0
mov    $0x1,%al
movss  0xe53(%rip),%xmm1
ucomiss %xmm1,%xmm0
mov    %al,-0xd(%rbp)
jne    11cc <main+0xac>
jp     11cc <main+0xac>
jmp    11ec <main+0xcc>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe3b(%rip),%xmm1
ucomisd %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__ESBMC_assume@plt>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xdf9(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xde2(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
lea    0xdd8(%rip),%rsi
call   1030 <__ESBMC_assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1040 <__ESBMC_assume@plt>
lea    0xed1(%rip),%rsi
xor    %edi,%edi
call   1030 <__ESBMC_assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"float div works\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
%4 = load float, float* %2
%5 = fcmp oeq float %4, 1.000000e+00
br i1 %5, label %20, label %6
6: ; preds = %0
%7 = load float, float* %2
%8 = fpext float %7 to double
%9 = fcmp oeq double %8, 5.000000e-01
br i1 %9, label %20, label %10
10: ; preds = %6
%11 = load float, float* %2
%12 = fcmp oeq float %11, 2.000000e+00
br i1 %12, label %20, label %13
13: ; preds = %10
%14 = load float, float* %2
%15 = fcmp oeq float %14, 3.000000e+00
br i1 %15, label %20, label %16
16: ; preds = %13
%17 = load float, float* %2
%18 = fpext float %17 to double
%19 = fcmp oeq double %18, 1.000000e-01
br label %20
20: ; preds = %16, %13, %10, %6, %0
%21 = phi i1 [ true, %13 ], [ true, %10 ], [ true, %6 ], [ true, %0 ], [ %19, %16 ]
%22 = zext i1 %21 to i32
%23 = call i32 @__ESBMC_assume(i32 %22)
%24 = load float, float* %2
store float %24, float* %3
%25 = load float, float* %2
%26 = fmul float %25, 2.000000e+00
store float %26, float* %2
%27 = load float, float* %2
%28 = fdiv float %27, 2.000000e+00
store float %28, float* %2
%29 = load float, float* %2
%30 = load float, float* %3
%31 = fcmp oeq float %29, %30
%32 = zext i1 %31 to i32
%33 = call i32 @__ESBMC_assert(i32 %32, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%34 = load i32, i32* %1
ret i32 %34
}

LLVM IR (-O2):
@.str = [16 x i8] c"float div works\00"
define i32 @main() {
%1 = tail call i32 @__ESBMC_assume(i32 0)
%2 = tail call i32 @__ESBMC_assert(i32 0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 0
}