#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 sqrtf(float);
float renorm_factor(float n) {
  if (n < 1.5625f && n > 0.64f)
    return .5 * (3 - n);
  else if (n < 100.0f && n > 0.01f)
    return 1. / sqrtf(n);
  else
    return 0.;
}


x86 assembly (clang, -O0):
<renorm_factor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  0xedb(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    1170 <renorm_factor+0x60>
movss  -0x8(%rbp),%xmm0
movss  0xec8(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    1170 <renorm_factor+0x60>
movss  0xec3(%rip),%xmm0
subss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xec2(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11c8 <renorm_factor+0xb8>
movss  0xe90(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    11c0 <renorm_factor+0xb0>
movss  -0x8(%rbp),%xmm0
movss  0xe7d(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    11c0 <renorm_factor+0xb0>
movss  -0x8(%rbp),%xmm0
call   1030 <sqrtf@plt>
cvtsi2sd %eax,%xmm1
movsd  0xe6a(%rip),%xmm0
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11c8 <renorm_factor+0xb8>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<renorm_factor>:
push   %rax
movss  0xee7(%rip),%xmm1
ucomiss %xmm0,%xmm1
jbe    113d <renorm_factor+0x2d>
ucomiss 0xedf(%rip),%xmm0
jbe    113d <renorm_factor+0x2d>
movss  0xee1(%rip),%xmm1
subss  %xmm0,%xmm1
mulss  0xed9(%rip),%xmm1
jmp    1172 <renorm_factor+0x62>
movss  0xec3(%rip),%xmm1
ucomiss %xmm0,%xmm1
xorps  %xmm1,%xmm1
jbe    1172 <renorm_factor+0x62>
ucomiss 0xeb8(%rip),%xmm0
jbe    1172 <renorm_factor+0x62>
call   1030 <sqrtf@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0xeae(%rip),%xmm1
divsd  %xmm0,%xmm1
cvtsd2ss %xmm1,%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @renorm_factor(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fcmp olt float %4, 1.562500e+00
br i1 %5, label %6, label %15
6: ; preds = %1
%7 = load float, float* %3
%8 = fcmp ogt float %7, 0x3FE47AE140000000
br i1 %8, label %9, label %15
9: ; preds = %6
%10 = load float, float* %3
%11 = fsub float 3.000000e+00, %10
%12 = fpext float %11 to double
%13 = fmul double 5.000000e-01, %12
%14 = fptrunc double %13 to float
store float %14, float* %2
br label %28
15: ; preds = %6, %1
%16 = load float, float* %3
%17 = fcmp olt float %16, 1.000000e+02
br i1 %17, label %18, label %27
18: ; preds = %15
%19 = load float, float* %3
%20 = fcmp ogt float %19, 0x3F847AE140000000
br i1 %20, label %21, label %27
21: ; preds = %18
%22 = load float, float* %3
%23 = call i32 @sqrtf(float %22)
%24 = sitofp i32 %23 to double
%25 = fdiv double 1.000000e+00, %24
%26 = fptrunc double %25 to float
store float %26, float* %2
br label %28
27: ; preds = %18, %15
store float 0.000000e+00, float* %2
br label %28
28: ; preds = %27, %21, %9
%29 = load float, float* %2
ret float %29
}

LLVM IR (-O2):
define float @renorm_factor(float %0) {
%2 = fcmp olt float %0, 1.562500e+00
%3 = fcmp ogt float %0, 0x3FE47AE140000000
%4 = and i1 %2, %3
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = fsub float 3.000000e+00, %0
%7 = fmul float %6, 5.000000e-01
br label %17
8: ; preds = %1
%9 = fcmp olt float %0, 1.000000e+02
%10 = fcmp ogt float %0, 0x3F847AE140000000
%11 = and i1 %9, %10
br i1 %11, label %12, label %17
12: ; preds = %8
%13 = tail call i32 @sqrtf(float %0)
%14 = sitofp i32 %13 to double
%15 = fdiv double 1.000000e+00, %14
%16 = fptrunc double %15 to float
br label %17
17: ; preds = %8, %12, %5
%18 = phi float [ %7, %5 ], [ %16, %12 ], [ 0.000000e+00, %8 ]
ret float %18
}