#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 */
scalar_t__ pow(float, double);
float fa_kaiser_atten2beta(float atten) {
  float beta;
  if (atten <= 21.)
    beta = 0.;
  else if (atten < 50.)
    beta = (float)0.5842 * (float)pow(atten - 21., 0.4) +
           (float)0.07886 * (float)(atten - 21.);
  else
    beta = (float)0.1102 * (float)(atten - 8.7);
  return beta;
}


x86 assembly (clang, -O0):
<fa_kaiser_atten2beta>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xed2(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     1145 <fa_kaiser_atten2beta+0x35>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    11f9 <fa_kaiser_atten2beta+0xe9>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeb2(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    11ca <fa_kaiser_atten2beta+0xba>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe8f(%rip),%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movsd  0xe97(%rip),%xmm1
call   1030 <pow@plt>
cvtsi2ss %rax,%xmm0
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xe64(%rip),%xmm2
subsd  %xmm2,%xmm1
cvtsd2ss %xmm1,%xmm2
movss  0xe7c(%rip),%xmm1
mulss  %xmm2,%xmm1
movss  0xe6c(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    11f4 <fa_kaiser_atten2beta+0xe4>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe35(%rip),%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm1
movss  0xe35(%rip),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    11f9 <fa_kaiser_atten2beta+0xe9>
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fa_kaiser_atten2beta>:
push   %rax
movaps %xmm0,%xmm2
xorps  %xmm0,%xmm0
movss  0xee1(%rip),%xmm1
ucomiss %xmm2,%xmm1
jae    118e <fa_kaiser_atten2beta+0x7e>
movss  0xed8(%rip),%xmm0
ucomiss %xmm2,%xmm0
jbe    1173 <fa_kaiser_atten2beta+0x63>
addss  0xed3(%rip),%xmm2
movss  %xmm2,0x4(%rsp)
movsd  0xed9(%rip),%xmm1
movaps %xmm2,%xmm0
call   1030 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
movss  0x4(%rsp),%xmm1
mulss  0xeab(%rip),%xmm1
mulss  0xea7(%rip),%xmm0
addss  %xmm1,%xmm0
pop    %rax
ret
xorps  %xmm0,%xmm0
cvtss2sd %xmm2,%xmm0
addsd  0xe96(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
mulss  0xe7a(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @fa_kaiser_atten2beta(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = fpext float %4 to double
%6 = fcmp ole double %5, 2.100000e+01
br i1 %6, label %7, label %8
7: ; preds = %1
store float 0.000000e+00, float* %3
br label %32
8: ; preds = %1
%9 = load float, float* %2
%10 = fpext float %9 to double
%11 = fcmp olt double %10, 5.000000e+01
br i1 %11, label %12, label %25
12: ; preds = %8
%13 = load float, float* %2
%14 = fpext float %13 to double
%15 = fsub double %14, 2.100000e+01
%16 = fptrunc double %15 to float
%17 = call i64 @pow(float %16, double 4.000000e-01)
%18 = sitofp i64 %17 to float
%19 = load float, float* %2
%20 = fpext float %19 to double
%21 = fsub double %20, 2.100000e+01
%22 = fptrunc double %21 to float
%23 = fmul float 0x3FB4302B40000000, %22
%24 = call float @llvm.fmuladd.f32(float 0x3FE2B1C440000000, float %18, float %23)
store float %24, float* %3
br label %31
25: ; preds = %8
%26 = load float, float* %2
%27 = fpext float %26 to double
%28 = fsub double %27, 0x4021666666666666
%29 = fptrunc double %28 to float
%30 = fmul float 0x3FBC361140000000, %29
store float %30, float* %3
br label %31
31: ; preds = %25, %12
br label %32
32: ; preds = %31, %7
%33 = load float, float* %3
ret float %33
}

LLVM IR (-O2):
define float @fa_kaiser_atten2beta(float %0) {
%2 = fpext float %0 to double
%3 = fcmp ugt float %0, 2.100000e+01
br i1 %3, label %4, label %16
4: ; preds = %1
%5 = fcmp olt float %0, 5.000000e+01
br i1 %5, label %6, label %12
6: ; preds = %4
%7 = fadd float %0, -2.100000e+01
%8 = tail call i64 @pow(float %7, double 4.000000e-01)
%9 = sitofp i64 %8 to float
%10 = fmul float %7, 0x3FB4302B40000000
%11 = tail call float @llvm.fmuladd.f32(float %9, float 0x3FE2B1C440000000, float %10)
br label %16
12: ; preds = %4
%13 = fadd double %2, 0xC021666666666666
%14 = fptrunc double %13 to float
%15 = fmul float %14, 0x3FBC361140000000
br label %16
16: ; preds = %1, %6, %12
%17 = phi float [ %11, %6 ], [ %15, %12 ], [ 0.000000e+00, %1 ]
ret float %17
}