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


x86 assembly (clang, -O0):
<al_ter>:
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  0xe9e(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1216 <al_ter+0xe6>
movsd  0xea3(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    11d5 <al_ter+0xa5>
movsd  0xeb0(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    11a0 <al_ter+0x70>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    11d0 <al_ter+0xa0>
movsd  0xea0(%rip),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  0xe79(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1211 <al_ter+0xe1>
movsd  -0x10(%rbp),%xmm0
movsd  0xe4e(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe30(%rip),%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xe18(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1240 <al_ter+0x110>
movsd  -0x10(%rbp),%xmm0
call   1050 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xde5(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xdd1(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<al_ter>:
push   %rax
movapd %xmm0,%xmm1
andpd  0xed3(%rip),%xmm1
movsd  0xedb(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1176 <al_ter+0x56>
movsd  0xee5(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1189 <al_ter+0x69>
xorpd  %xmm0,%xmm0
movsd  0xeeb(%rip),%xmm2
ucomisd %xmm1,%xmm2
ja     11bc <al_ter+0x9c>
movsd  0xee5(%rip),%xmm0
divsd  %xmm1,%xmm0
call   1030 <exp@plt>
mulsd  0xedc(%rip),%xmm0
pop    %rax
ret
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jb     11a3 <al_ter+0x83>
xorps  %xmm0,%xmm0
sqrtsd %xmm1,%xmm0
jmp    11ac <al_ter+0x8c>
movsd  0xe9f(%rip),%xmm0
addsd  %xmm1,%xmm0
mulsd  %xmm0,%xmm0
mulsd  0xe97(%rip),%xmm0
pop    %rax
ret
movapd %xmm1,%xmm0
call   1040 <sqrt@plt>
addsd  0xe64(%rip),%xmm0
mulsd  0xe64(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @al_ter(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 %23
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 %22
16: ; preds = %12
%17 = load double, double* %3
%18 = fdiv double -3.600000e+02, %17
store double %18, double* %3
%19 = load double, double* %3
%20 = call double @exp(double %19)
%21 = fmul double 5.040000e+02, %20
store double %21, double* %4
br label %22
22: ; preds = %16, %15
br label %29
23: ; preds = %9
%24 = load double, double* %3
%25 = fsub double %24, 6.600000e+01
store double %25, double* %3
%26 = load double, double* %3
%27 = call double @pow(double %26, double 2.000000e+00)
%28 = fmul double 1.280000e-02, %27
store double %28, double* %4
br label %29
29: ; preds = %23, %22
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 @al_ter(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, %13
%15 = fmul double %14, 1.280000e-02
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
}