#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 fabs(double);
double pow(double, double);
double sqrt(double);
double u_air(double x) {
  double ax;
  double val = 0.0;
  ax = fabs(x);
  if (ax < 421.0) {
    if (ax < 6.65) {
      if (ax < 0.251) {
        val = 1.47E06 * ax;
      } else {
        val = 0.737E06 * sqrt(ax);
      }
    } else {
      val = 0.459E06 * pow(ax, 0.75);
    }
  } else {
    val = 2.08E06 * sqrt(ax);
  }
  return val;
}


x86 assembly (clang, -O0):
<u_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 0xeff(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xeae(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    11e8 <u_air+0xc8>
movsd  0xeab(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    11bd <u_air+0x9d>
movsd  0xeb0(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    119a <u_air+0x7a>
movsd  0xead(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    11b8 <u_air+0x98>
movsd  -0x10(%rbp),%xmm0
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xe81(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    11e3 <u_air+0xc3>
movsd  -0x10(%rbp),%xmm0
movsd  0xe56(%rip),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xe3e(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1206 <u_air+0xe6>
movsd  -0x10(%rbp),%xmm0
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xe0b(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<u_air>:
push   %rax
andpd  0xed7(%rip),%xmm0
movsd  0xedf(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    1161 <u_air+0x41>
movsd  0xee1(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    1174 <u_air+0x54>
movsd  0xeeb(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    11a6 <u_air+0x86>
movsd  0xeed(%rip),%xmm1
mulsd  %xmm0,%xmm1
jmp    11a0 <u_air+0x80>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     118f <u_air+0x6f>
xorps  %xmm1,%xmm1
sqrtsd %xmm0,%xmm1
jmp    1198 <u_air+0x78>
movsd  0xeac(%rip),%xmm1
call   1030 <pow@plt>
movapd %xmm0,%xmm1
mulsd  0xea3(%rip),%xmm1
jmp    11a0 <u_air+0x80>
call   1040 <sqrt@plt>
movapd %xmm0,%xmm1
mulsd  0xe78(%rip),%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     11c1 <u_air+0xa1>
xorps  %xmm1,%xmm1
sqrtsd %xmm0,%xmm1
mulsd  0xe81(%rip),%xmm1
jmp    11a0 <u_air+0x80>
call   1040 <sqrt@plt>
movapd %xmm0,%xmm1
mulsd  0xe6e(%rip),%xmm1
jmp    11a0 <u_air+0x80>

LLVM IR (-O0):
define double @u_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, 4.210000e+02
br i1 %8, label %9, label %28
9: ; preds = %1
%10 = load double, double* %3
%11 = fcmp olt double %10, 6.650000e+00
br i1 %11, label %12, label %23
12: ; preds = %9
%13 = load double, double* %3
%14 = fcmp olt double %13, 2.510000e-01
br i1 %14, label %15, label %18
15: ; preds = %12
%16 = load double, double* %3
%17 = fmul double 1.470000e+06, %16
store double %17, double* %4
br label %22
18: ; preds = %12
%19 = load double, double* %3
%20 = call double @sqrt(double %19)
%21 = fmul double 7.370000e+05, %20
store double %21, double* %4
br label %22
22: ; preds = %18, %15
br label %27
23: ; preds = %9
%24 = load double, double* %3
%25 = call double @pow(double %24, double 7.500000e-01)
%26 = fmul double 4.590000e+05, %25
store double %26, double* %4
br label %27
27: ; preds = %23, %22
br label %32
28: ; preds = %1
%29 = load double, double* %3
%30 = call double @sqrt(double %29)
%31 = fmul double 2.080000e+06, %30
store double %31, double* %4
br label %32
32: ; preds = %28, %27
%33 = load double, double* %4
ret double %33
}

LLVM IR (-O2):
define double @u_air(double %0) {
%2 = tail call double @llvm.fabs.f64(double %0)
%3 = fcmp olt double %2, 4.210000e+02
br i1 %3, label %4, label %16
4: ; preds = %1
%5 = fcmp olt double %2, 6.650000e+00
br i1 %5, label %6, label %13
6: ; preds = %4
%7 = fcmp olt double %2, 2.510000e-01
br i1 %7, label %8, label %10
8: ; preds = %6
%9 = fmul double %2, 1.470000e+06
br label %19
10: ; preds = %6
%11 = tail call double @sqrt(double %2)
%12 = fmul double %11, 7.370000e+05
br label %19
13: ; preds = %4
%14 = tail call double @pow(double %2, double 7.500000e-01)
%15 = fmul double %14, 4.590000e+05
br label %19
16: ; preds = %1
%17 = tail call double @sqrt(double %2)
%18 = fmul double %17, 2.080000e+06
br label %19
19: ; preds = %13, %10, %8, %16
%20 = phi double [ %9, %8 ], [ %12, %10 ], [ %15, %13 ], [ %18, %16 ]
ret double %20
}