#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 exp(double);
double fabs(double);
double sqrt(double);
double alfa_air(double x) {
  double ax;
  double val = 0.0;
  ax = fabs(x);
  if (ax < 330.0) {
    if (ax < 97.1) {
      if (ax < 1.0E-08) {
        val = 0.0;
      } else {
        val = 5.04E02 * exp(-360.0 / ax);
      }
    } else {
      val = 1.28E-02 * (ax - 66.0) * (ax - 66.0);
    }
  } else {
    val = 2.44E02 * (sqrt(ax) - 14.5);
  }
  return val;
}


x86 assembly (clang, -O0):
<alfa_air>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movaps 0xf0f(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xeae(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    11f7 <alfa_air+0xd7>
movsd  0xeb3(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    11bb <alfa_air+0x9b>
movsd  0xeb8(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1190 <alfa_air+0x70>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    11b6 <alfa_air+0x96>
movsd  0xea8(%rip),%xmm0
divsd  -0x10(%rbp),%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  0xe8b(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    11f2 <alfa_air+0xd2>
movsd  -0x10(%rbp),%xmm1
movsd  0xe58(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xe54(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xe3b(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1221 <alfa_air+0x101>
movsd  -0x10(%rbp),%xmm0
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xe04(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xdf0(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alfa_air>:
push   %rax
andpd  0xed7(%rip),%xmm0
movsd  0xedf(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    117a <alfa_air+0x5a>
movsd  0xee9(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    118d <alfa_air+0x6d>
xorpd  %xmm1,%xmm1
movsd  0xeef(%rip),%xmm2
ucomisd %xmm0,%xmm2
ja     11c4 <alfa_air+0xa4>
movsd  0xee9(%rip),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1030 <exp@plt>
movapd %xmm0,%xmm1
mulsd  0xed8(%rip),%xmm1
jmp    11c4 <alfa_air+0xa4>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     11ab <alfa_air+0x8b>
xorps  %xmm1,%xmm1
sqrtsd %xmm0,%xmm1
jmp    11b4 <alfa_air+0x94>
movsd  0xe9b(%rip),%xmm2
addsd  %xmm0,%xmm2
movsd  0xe97(%rip),%xmm1
mulsd  %xmm2,%xmm1
mulsd  %xmm2,%xmm1
jmp    11c4 <alfa_air+0xa4>
call   1040 <sqrt@plt>
movapd %xmm0,%xmm1
addsd  0xe5c(%rip),%xmm1
mulsd  0xe5c(%rip),%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @alfa_air(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
store double 0.000000e+00, double* %4
%5 = load double, double* %2
%6 = call double @llvm.fabs.f64(double %5)
store double %6, double* %3
%7 = load double, double* %3
%8 = fcmp olt double %7, 3.300000e+02
br i1 %8, label %9, label %30
9: ; preds = %1
%10 = load double, double* %3
%11 = fcmp olt double %10, 0x4058466666666666
br i1 %11, label %12, label %22
12: ; preds = %9
%13 = load double, double* %3
%14 = fcmp olt double %13, 1.000000e-08
br i1 %14, label %15, label %16
15: ; preds = %12
store double 0.000000e+00, double* %4
br label %21
16: ; preds = %12
%17 = load double, double* %3
%18 = fdiv double -3.600000e+02, %17
%19 = call double @exp(double %18)
%20 = fmul double 5.040000e+02, %19
store double %20, double* %4
br label %21
21: ; preds = %16, %15
br label %29
22: ; preds = %9
%23 = load double, double* %3
%24 = fsub double %23, 6.600000e+01
%25 = fmul double 1.280000e-02, %24
%26 = load double, double* %3
%27 = fsub double %26, 6.600000e+01
%28 = fmul double %25, %27
store double %28, double* %4
br label %29
29: ; preds = %22, %21
br label %35
30: ; preds = %1
%31 = load double, double* %3
%32 = call double @sqrt(double %31)
%33 = fsub double %32, 1.450000e+01
%34 = fmul double 2.440000e+02, %33
store double %34, double* %4
br label %35
35: ; preds = %30, %29
%36 = load double, double* %4
ret double %36
}

LLVM IR (-O2):
define double @alfa_air(double %0) {
%2 = tail call double @llvm.fabs.f64(double %0)
%3 = fcmp olt double %2, 3.300000e+02
br i1 %3, label %4, label %16
4: ; preds = %1
%5 = fcmp olt double %2, 0x4058466666666666
br i1 %5, label %6, label %12
6: ; preds = %4
%7 = fcmp olt double %2, 1.000000e-08
br i1 %7, label %20, label %8
8: ; preds = %6
%9 = fdiv double -3.600000e+02, %2
%10 = tail call double @exp(double %9)
%11 = fmul double %10, 5.040000e+02
br label %20
12: ; preds = %4
%13 = fadd double %2, -6.600000e+01
%14 = fmul double %13, 1.280000e-02
%15 = fmul double %13, %14
br label %20
16: ; preds = %1
%17 = tail call double @sqrt(double %2)
%18 = fadd double %17, -1.450000e+01
%19 = fmul double %18, 2.440000e+02
br label %20
20: ; preds = %6, %12, %8, %16
%21 = phi double [ %11, %8 ], [ %15, %12 ], [ %19, %16 ], [ 0.000000e+00, %6 ]
ret double %21
}