#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*/ CT_ASSERT(int);
void float_test() {
  float x;
  float y;
  x = (float)2;
  y = (float)4;
  CT_ASSERT(y == x * x);
  CT_ASSERT(y == x + x);
  CT_ASSERT(y != 3 * x);
  CT_ASSERT(y != y + x);
  CT_ASSERT(x == y - x);
  CT_ASSERT(x == y / x);
}


x86 assembly (clang, -O0):
<float_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  0xee8(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  0xed7(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
mulss  -0x4(%rbp),%xmm1
ucomiss %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <CT_ASSERT@plt>
movss  -0x8(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
addss  -0x4(%rbp),%xmm1
ucomiss %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <CT_ASSERT@plt>
movss  -0x8(%rbp),%xmm0
movss  0xe79(%rip),%xmm1
mulss  -0x4(%rbp),%xmm1
ucomiss %xmm1,%xmm0
setne  %al
setp   %cl
or     %cl,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <CT_ASSERT@plt>
movss  -0x8(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
addss  -0x4(%rbp),%xmm1
ucomiss %xmm1,%xmm0
setne  %al
setp   %cl
or     %cl,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <CT_ASSERT@plt>
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
subss  -0x4(%rbp),%xmm1
ucomiss %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <CT_ASSERT@plt>
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
divss  -0x4(%rbp),%xmm1
ucomiss %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <CT_ASSERT@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<float_test>:
push   %rax
mov    $0x1,%edi
call   1030 <CT_ASSERT@plt>
mov    $0x1,%edi
call   1030 <CT_ASSERT@plt>
mov    $0x1,%edi
call   1030 <CT_ASSERT@plt>
mov    $0x1,%edi
call   1030 <CT_ASSERT@plt>
mov    $0x1,%edi
call   1030 <CT_ASSERT@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <CT_ASSERT@plt>

LLVM IR (-O0):
define void @float_test() {
%1 = alloca float
%2 = alloca float
store float 2.000000e+00, float* %1
store float 4.000000e+00, float* %2
%3 = load float, float* %2
%4 = load float, float* %1
%5 = load float, float* %1
%6 = fmul float %4, %5
%7 = fcmp oeq float %3, %6
%8 = zext i1 %7 to i32
%9 = call i32 @CT_ASSERT(i32 %8)
%10 = load float, float* %2
%11 = load float, float* %1
%12 = load float, float* %1
%13 = fadd float %11, %12
%14 = fcmp oeq float %10, %13
%15 = zext i1 %14 to i32
%16 = call i32 @CT_ASSERT(i32 %15)
%17 = load float, float* %2
%18 = load float, float* %1
%19 = fmul float 3.000000e+00, %18
%20 = fcmp une float %17, %19
%21 = zext i1 %20 to i32
%22 = call i32 @CT_ASSERT(i32 %21)
%23 = load float, float* %2
%24 = load float, float* %2
%25 = load float, float* %1
%26 = fadd float %24, %25
%27 = fcmp une float %23, %26
%28 = zext i1 %27 to i32
%29 = call i32 @CT_ASSERT(i32 %28)
%30 = load float, float* %1
%31 = load float, float* %2
%32 = load float, float* %1
%33 = fsub float %31, %32
%34 = fcmp oeq float %30, %33
%35 = zext i1 %34 to i32
%36 = call i32 @CT_ASSERT(i32 %35)
%37 = load float, float* %1
%38 = load float, float* %2
%39 = load float, float* %1
%40 = fdiv float %38, %39
%41 = fcmp oeq float %37, %40
%42 = zext i1 %41 to i32
%43 = call i32 @CT_ASSERT(i32 %42)
ret void
}

LLVM IR (-O2):
define void @float_test() {
%1 = tail call i32 @CT_ASSERT(i32 1)
%2 = tail call i32 @CT_ASSERT(i32 1)
%3 = tail call i32 @CT_ASSERT(i32 1)
%4 = tail call i32 @CT_ASSERT(i32 1)
%5 = tail call i32 @CT_ASSERT(i32 1)
%6 = tail call i32 @CT_ASSERT(i32 1)
ret void
}