#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 */
double pow(double, double);
double alpha(double a) {
  if (a <= 21)
    return 0;
  if (a <= 50)
    return 0.5842 * pow(a - 21, 0.4) + 0.07886 * (a - 21);
  return 0.1102 * (a - 8.7);
}


x86 assembly (clang, -O0):
<alpha>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  0xedb(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     113d <alpha+0x2d>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11c7 <alpha+0xb7>
movsd  0xec3(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     11a5 <alpha+0x95>
movsd  -0x10(%rbp),%xmm0
movsd  0xea3(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xec7(%rip),%xmm1
call   1030 <pow@plt>
movsd  -0x10(%rbp),%xmm2
movsd  0xe85(%rip),%xmm1
subsd  %xmm1,%xmm2
movsd  0xea1(%rip),%xmm1
mulsd  %xmm2,%xmm1
movsd  0xe8d(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11c7 <alpha+0xb7>
movsd  -0x10(%rbp),%xmm1
movsd  0xe66(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xe52(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alpha>:
push   %rax
movapd %xmm0,%xmm2
xorpd  %xmm0,%xmm0
movsd  0xedf(%rip),%xmm1
ucomisd %xmm2,%xmm1
jae    1149 <alpha+0x39>
movsd  0xed9(%rip),%xmm0
ucomisd %xmm2,%xmm0
jae    114b <alpha+0x3b>
addsd  0xef3(%rip),%xmm2
mulsd  0xef3(%rip),%xmm2
movapd %xmm2,%xmm0
pop    %rax
ret
addsd  0xebd(%rip),%xmm2
movsd  %xmm2,(%rsp)
movsd  0xeb8(%rip),%xmm1
movapd %xmm2,%xmm0
call   1030 <pow@plt>
movsd  (%rsp),%xmm1
mulsd  0xeaa(%rip),%xmm1
mulsd  0xeaa(%rip),%xmm0
addsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @alpha(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp ole double %4, 2.100000e+01
br i1 %5, label %6, label %7
6: ; preds = %1
store double 0.000000e+00, double* %2
br label %22
7: ; preds = %1
%8 = load double, double* %3
%9 = fcmp ole double %8, 5.000000e+01
br i1 %9, label %10, label %18
10: ; preds = %7
%11 = load double, double* %3
%12 = fsub double %11, 2.100000e+01
%13 = call double @pow(double %12, double 4.000000e-01)
%14 = load double, double* %3
%15 = fsub double %14, 2.100000e+01
%16 = fmul double 0x3FB4302B40F66A55, %15
%17 = call double @llvm.fmuladd.f64(double 5.842000e-01, double %13, double %16)
store double %17, double* %2
br label %22
18: ; preds = %7
%19 = load double, double* %3
%20 = fsub double %19, 0x4021666666666666
%21 = fmul double 1.102000e-01, %20
store double %21, double* %2
br label %22
22: ; preds = %18, %10, %6
%23 = load double, double* %2
ret double %23
}

LLVM IR (-O2):
define double @alpha(double %0) {
%2 = fcmp ugt double %0, 2.100000e+01
br i1 %2, label %3, label %13
3: ; preds = %1
%4 = fcmp ugt double %0, 5.000000e+01
br i1 %4, label %10, label %5
5: ; preds = %3
%6 = fadd double %0, -2.100000e+01
%7 = tail call double @pow(double %6, double 4.000000e-01)
%8 = fmul double %6, 0x3FB4302B40F66A55
%9 = tail call double @llvm.fmuladd.f64(double %7, double 5.842000e-01, double %8)
br label %13
10: ; preds = %3
%11 = fadd double %0, 0xC021666666666666
%12 = fmul double %11, 1.102000e-01
br label %13
13: ; preds = %1, %10, %5
%14 = phi double [ %9, %5 ], [ %12, %10 ], [ 0.000000e+00, %1 ]
ret double %14
}