#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 EXP(double x) {
  if (x > -2) {
    if (x > -0.5) {
      if (x > 0)
        return exp(x);
      return (((0.03254409303190190000 * x + 0.16280432765779600000) * x +
               0.49929760485974900000) *
                  x +
              0.99995149601363700000) *
                 x +
             0.99999925508501600000;
    }
    if (x > -1)
      return (((0.01973899026052090000 * x + 0.13822379685007000000) * x +
               0.48056651562365000000) *
                  x +
              0.99326940370383500000) *
                 x +
             0.99906756856399500000;
    return (((0.00940528203591384000 * x + 0.09414963667859410000) * x +
             0.40825793595877300000) *
                x +
            0.93933625499130400000) *
               x +
           0.98369508190545300000;
  }
  if (x > -8) {
    if (x > -4)
      return (((0.00217245711583303000 * x + 0.03484829428350620000) * x +
               0.22118199801337800000) *
                  x +
              0.67049462206469500000) *
                 x +
             0.83556950223398500000;
    return (((0.00012398771025456900 * x + 0.00349155785951272000) * x +
             0.03727721426017900000) *
                x +
            0.17974997741536900000) *
               x +
           0.33249299994217400000;
  }
  if (x > -16)
    return (((0.00000051741713416603 * x + 0.00002721456879608080) * x +
             0.00053418601865636800) *
                x +
            0.00464101989351936000) *
               x +
           0.01507447981459420000;
  return 0;
}


x86 assembly (clang, -O0):
<EXP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    12ba <EXP+0x1aa>
movsd  -0x10(%rbp),%xmm0
movsd  0xf57(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    11d7 <EXP+0xc7>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1171 <EXP+0x61>
movsd  -0x10(%rbp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,-0x8(%rbp)
jmp    1439 <EXP+0x329>
movsd  -0x10(%rbp),%xmm0
movsd  0xf92(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xf8e(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xf69(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xf4c(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xf2f(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1439 <EXP+0x329>
movsd  -0x10(%rbp),%xmm0
movsd  0xebc(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1254 <EXP+0x144>
movsd  -0x10(%rbp),%xmm0
movsd  0xeed(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xee9(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xec4(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xea7(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe8a(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1439 <EXP+0x329>
movsd  -0x10(%rbp),%xmm0
movsd  0xe5f(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe5b(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe36(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe19(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdfc(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1439 <EXP+0x329>
movsd  -0x10(%rbp),%xmm0
movsd  0xd41(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    13b4 <EXP+0x2a4>
movsd  -0x10(%rbp),%xmm0
movsd  0xd62(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    134e <EXP+0x23e>
movsd  -0x10(%rbp),%xmm0
movsd  0xd93(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd8f(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd6a(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd4d(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd30(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1439 <EXP+0x329>
movsd  -0x10(%rbp),%xmm0
movsd  0xd05(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd01(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xcdc(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xcbf(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xca2(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1439 <EXP+0x329>
movsd  -0x10(%rbp),%xmm0
movsd  0xc4f(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1431 <EXP+0x321>
movsd  -0x10(%rbp),%xmm0
movsd  0xc58(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc54(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc2f(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc12(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xbf5(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1439 <EXP+0x329>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EXP>:
ucomisd 0xee8(%rip),%xmm0
jbe    1137 <EXP+0x27>
ucomisd 0xf76(%rip),%xmm0
jbe    1190 <EXP+0x80>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1226 <EXP+0x116>
jmp    1030 <exp@plt>
ucomisd 0xec9(%rip),%xmm0
jbe    11db <EXP+0xcb>
ucomisd 0xef3(%rip),%xmm0
jbe    1263 <EXP+0x153>
movsd  0xf15(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xf11(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xf0d(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xf09(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xf05(%rip),%xmm1
movapd %xmm1,%xmm0
ret
ucomisd 0xf08(%rip),%xmm0
jbe    12a0 <EXP+0x190>
movsd  0xf2a(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xf26(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xf22(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xf1e(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xf1a(%rip),%xmm1
movapd %xmm1,%xmm0
ret
ucomisd 0xe2d(%rip),%xmm0
jbe    12dd <EXP+0x1cd>
movsd  0xe27(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xe23(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xe1f(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xe1b(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xe17(%rip),%xmm1
movapd %xmm1,%xmm0
ret
movsd  0xeca(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xec6(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xec2(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xebe(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xeba(%rip),%xmm1
movapd %xmm1,%xmm0
ret
movsd  0xddd(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xdd9(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xdd5(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xdd1(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xdcd(%rip),%xmm1
movapd %xmm1,%xmm0
ret
movsd  0xe00(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xdfc(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xdf8(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xdf4(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xdf0(%rip),%xmm1
movapd %xmm1,%xmm0
ret
xorpd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @EXP(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp ogt double %4, -2.000000e+00
br i1 %5, label %6, label %45
6: ; preds = %1
%7 = load double, double* %3
%8 = fcmp ogt double %7, -5.000000e-01
br i1 %8, label %9, label %24
9: ; preds = %6
%10 = load double, double* %3
%11 = fcmp ogt double %10, 0.000000e+00
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = load double, double* %3
%14 = call double @exp(double %13)
store double %14, double* %2
br label %82
15: ; preds = %9
%16 = load double, double* %3
%17 = call double @llvm.fmuladd.f64(double 0x3FA0A99E8E800005, double %16, double 0x3FC4D6C5AF780012)
%18 = load double, double* %3
%19 = call double @llvm.fmuladd.f64(double %17, double %18, double 0x3FDFF47DF0F6000B)
%20 = load double, double* %3
%21 = call double @llvm.fmuladd.f64(double %19, double %20, double 0x3FEFFF9A479EE003)
%22 = load double, double* %3
%23 = call double @llvm.fmuladd.f64(double %21, double %22, double 0x3FEFFFFE7013AA07)
store double %23, double* %2
br label %82
24: ; preds = %6
%25 = load double, double* %3
%26 = fcmp ogt double %25, -1.000000e+00
br i1 %26, label %27, label %36
27: ; preds = %24
%28 = load double, double* %3
%29 = call double @llvm.fmuladd.f64(double 0x3F943675367FFFF2, double %28, double 0x3FC1B1513F7FFFF3)
%30 = load double, double* %3
%31 = call double @llvm.fmuladd.f64(double %29, double %30, double 0x3FDEC19A0F09FFFF)
%32 = load double, double* %3
%33 = call double @llvm.fmuladd.f64(double %31, double %32, double 0x3FEFC8DCEAA0D004)
%34 = load double, double* %3
%35 = call double @llvm.fmuladd.f64(double %33, double %34, double 0x3FEFF85C8CAF4047)
store double %35, double* %2
br label %82
36: ; preds = %24
%37 = load double, double* %3
%38 = call double @llvm.fmuladd.f64(double 0x3F8343139607FFFF, double %37, double 0x3FB81A30CA770000)
%39 = load double, double* %3
%40 = call double @llvm.fmuladd.f64(double %38, double %39, double 0x3FDA20E5E4D1A008)
%41 = load double, double* %3
%42 = call double @llvm.fmuladd.f64(double %40, double %41, double 0x3FEE0F0AE7E45004)
%43 = load double, double* %3
%44 = call double @llvm.fmuladd.f64(double %42, double %43, double 0x3FEF7A6E1BC0A387)
store double %44, double* %2
br label %82
45: ; preds = %1
%46 = load double, double* %3
%47 = fcmp ogt double %46, -8.000000e+00
br i1 %47, label %48, label %69
48: ; preds = %45
%49 = load double, double* %3
%50 = fcmp ogt double %49, -4.000000e+00
br i1 %50, label %51, label %60
51: ; preds = %48
%52 = load double, double* %3
%53 = call double @llvm.fmuladd.f64(double 0x3F61CBF908768008, double %52, double 0x3FA1D7A2B889BFFD)
%54 = load double, double* %3
%55 = call double @llvm.fmuladd.f64(double %53, double %54, double 0x3FCC4FB113F737F8)
%56 = load double, double* %3
%57 = call double @llvm.fmuladd.f64(double %55, double %56, double 0x3FE574B1233D2D04)
%58 = load double, double* %3
%59 = call double @llvm.fmuladd.f64(double %57, double %58, double 0x3FEABCFC40B428AB)
store double %59, double* %2
br label %82
60: ; preds = %48
%61 = load double, double* %3
%62 = call double @llvm.fmuladd.f64(double 0x3F20405652409FEF, double %61, double 0x3F6C9A53DA32C806)
%63 = load double, double* %3
%64 = call double @llvm.fmuladd.f64(double %62, double %63, double 0x3FA315FFC0445409)
%65 = load double, double* %3
%66 = call double @llvm.fmuladd.f64(double %64, double %65, double 0x3FC7020C193A55F7)
%67 = load double, double* %3
%68 = call double @llvm.fmuladd.f64(double %66, double %67, double 0x3FD54790B839A2E5)
store double %68, double* %2
br label %82
69: ; preds = %45
%70 = load double, double* %3
%71 = fcmp ogt double %70, -1.600000e+01
br i1 %71, label %72, label %81
72: ; preds = %69
%73 = load double, double* %3
%74 = call double @llvm.fmuladd.f64(double 0x3EA15C944F9401FD, double %73, double 0x3EFC895AED611406)
%75 = load double, double* %3
%76 = call double @llvm.fmuladd.f64(double %74, double %75, double 0x3F418113BD743AC8)
%77 = load double, double* %3
%78 = call double @llvm.fmuladd.f64(double %76, double %77, double 0x3F7302764A9AA0D9)
%79 = load double, double* %3
%80 = call double @llvm.fmuladd.f64(double %78, double %79, double 0x3F8EDF5E6E769140)
store double %80, double* %2
br label %82
81: ; preds = %69
store double 0.000000e+00, double* %2
br label %82
82: ; preds = %81, %72, %60, %51, %36, %27, %15, %12
%83 = load double, double* %2
ret double %83
}

LLVM IR (-O2):
define double @EXP(double %0) {
%2 = fcmp ogt double %0, -2.000000e+00
br i1 %2, label %3, label %26
3: ; preds = %1
%4 = fcmp ogt double %0, -5.000000e-01
br i1 %4, label %5, label %14
5: ; preds = %3
%6 = fcmp ogt double %0, 0.000000e+00
br i1 %6, label %7, label %9
7: ; preds = %5
%8 = tail call double @exp(double %0)
br label %47
9: ; preds = %5
%10 = tail call double @llvm.fmuladd.f64(double %0, double 0x3FA0A99E8E800005, double 0x3FC4D6C5AF780012)
%11 = tail call double @llvm.fmuladd.f64(double %10, double %0, double 0x3FDFF47DF0F6000B)
%12 = tail call double @llvm.fmuladd.f64(double %11, double %0, double 0x3FEFFF9A479EE003)
%13 = tail call double @llvm.fmuladd.f64(double %12, double %0, double 0x3FEFFFFE7013AA07)
br label %47
14: ; preds = %3
%15 = fcmp ogt double %0, -1.000000e+00
br i1 %15, label %16, label %21
16: ; preds = %14
%17 = tail call double @llvm.fmuladd.f64(double %0, double 0x3F943675367FFFF2, double 0x3FC1B1513F7FFFF3)
%18 = tail call double @llvm.fmuladd.f64(double %17, double %0, double 0x3FDEC19A0F09FFFF)
%19 = tail call double @llvm.fmuladd.f64(double %18, double %0, double 0x3FEFC8DCEAA0D004)
%20 = tail call double @llvm.fmuladd.f64(double %19, double %0, double 0x3FEFF85C8CAF4047)
br label %47
21: ; preds = %14
%22 = tail call double @llvm.fmuladd.f64(double %0, double 0x3F8343139607FFFF, double 0x3FB81A30CA770000)
%23 = tail call double @llvm.fmuladd.f64(double %22, double %0, double 0x3FDA20E5E4D1A008)
%24 = tail call double @llvm.fmuladd.f64(double %23, double %0, double 0x3FEE0F0AE7E45004)
%25 = tail call double @llvm.fmuladd.f64(double %24, double %0, double 0x3FEF7A6E1BC0A387)
br label %47
26: ; preds = %1
%27 = fcmp ogt double %0, -8.000000e+00
br i1 %27, label %28, label %40
28: ; preds = %26
%29 = fcmp ogt double %0, -4.000000e+00
br i1 %29, label %30, label %35
30: ; preds = %28
%31 = tail call double @llvm.fmuladd.f64(double %0, double 0x3F61CBF908768008, double 0x3FA1D7A2B889BFFD)
%32 = tail call double @llvm.fmuladd.f64(double %31, double %0, double 0x3FCC4FB113F737F8)
%33 = tail call double @llvm.fmuladd.f64(double %32, double %0, double 0x3FE574B1233D2D04)
%34 = tail call double @llvm.fmuladd.f64(double %33, double %0, double 0x3FEABCFC40B428AB)
br label %47
35: ; preds = %28
%36 = tail call double @llvm.fmuladd.f64(double %0, double 0x3F20405652409FEF, double 0x3F6C9A53DA32C806)
%37 = tail call double @llvm.fmuladd.f64(double %36, double %0, double 0x3FA315FFC0445409)
%38 = tail call double @llvm.fmuladd.f64(double %37, double %0, double 0x3FC7020C193A55F7)
%39 = tail call double @llvm.fmuladd.f64(double %38, double %0, double 0x3FD54790B839A2E5)
br label %47
40: ; preds = %26
%41 = fcmp ogt double %0, -1.600000e+01
br i1 %41, label %42, label %47
42: ; preds = %40
%43 = tail call double @llvm.fmuladd.f64(double %0, double 0x3EA15C944F9401FD, double 0x3EFC895AED611406)
%44 = tail call double @llvm.fmuladd.f64(double %43, double %0, double 0x3F418113BD743AC8)
%45 = tail call double @llvm.fmuladd.f64(double %44, double %0, double 0x3F7302764A9AA0D9)
%46 = tail call double @llvm.fmuladd.f64(double %45, double %0, double 0x3F8EDF5E6E769140)
br label %47
47: ; preds = %40, %42, %35, %30, %21, %16, %9, %7
%48 = phi double [ %8, %7 ], [ %13, %9 ], [ %20, %16 ], [ %25, %21 ], [ %34, %30 ], [ %39, %35 ], [ %46, %42 ], [ 0.000000e+00, %40 ]
ret double %48
}