#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 */
long ipow(int, long);
double exp_remez13_05_05(double value) {
  long n;
  double a, px, x;
  double d;
  x = value;
  a = (1.4426950408889634073599) * x + 0.5;
  n = (long)a;
  if (a < 0)
    n = n - 1;
  px = (double)n;
  x = x - px * (6.93145751953125E-1);
  x = x - px * (1.42860682030941723212E-6);
  a = 1.61356848991757396195626449324190427883666354504187e-10;
  a = a * x;
  a = a + 2.09773502429720720042832865218235470540902290986604e-9;
  a = a * x;
  a = a + 2.50517997973487340520345973228530569065189960125308e-8;
  a = a * x;
  a = a + 2.7556973177905466877853160305636358948188615327725e-7;
  a = a * x;
  a = a + 2.7557319860870868162733628841564031959051602041504e-6;
  a = a * x;
  a = a + 2.48015878916569323181318984106104816451563207545696e-5;
  a = a * x;
  a = a + 1.98412698405602139306149764767811806786694849547848e-4;
  a = a * x;
  a = a + 1.38888888883724638191056667131613472090590184962952e-3;
  a = a * x;
  a = a + 8.333333333333743243093579329746662890641071879753e-3;
  a = a * x;
  a = a + 4.16666666666688187524214985734081300874557496783939e-2;
  a = a * x;
  a = a + 0.16666666666666665609766712753641211515446088211247;
  a = a * x;
  a = a + 0.49999999999999996637019704330727593814705189927683;
  a = a * x;
  a = a + 1.00000000000000000008007233620462705038544342452684;
  a = a * x;
  a = a + 1.0000000000000000000857966908786376708355989802095;
  n = ipow(2, n);
  d = (double)n;
  return a * d;
}


x86 assembly (clang, -O0):
<exp_remez13_05_05>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xecc(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xec8(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
cvttsd2si -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    116d <exp_remez13_05_05+0x5d>
mov    -0x10(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x10(%rbp)
cvtsi2sdq -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x28(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xedf(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xea1(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe84(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe60(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe37(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe0e(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xde5(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xdbc(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xd93(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xd6a(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xd41(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xd18(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xcef(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xcc6(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xc9d(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xc7c(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
mov    $0x2,%edi
call   1030 <ipow@plt>
mov    %rax,-0x10(%rbp)
cvtsi2sdq -0x10(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exp_remez13_05_05>:
push   %rax
movsd  0xee7(%rip),%xmm2
mulsd  %xmm0,%xmm2
addsd  0xee3(%rip),%xmm2
cvttsd2si %xmm2,%rsi
xorpd  %xmm1,%xmm1
xor    %eax,%eax
ucomisd %xmm2,%xmm1
seta   %al
sub    %rax,%rsi
xorps  %xmm2,%xmm2
cvtsi2sd %rsi,%xmm2
movsd  0xec6(%rip),%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
mulsd  0xebe(%rip),%xmm2
movapd %xmm0,%xmm1
addsd  %xmm2,%xmm1
movsd  0xeb6(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xeb2(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xeae(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xeaa(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xea6(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xea2(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xe9e(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xe9a(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xe96(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xe92(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xe8e(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xe8a(%rip),%xmm0
mulsd  %xmm1,%xmm0
movapd %xmm1,%xmm2
movsd  0xe82(%rip),%xmm1
addsd  %xmm1,%xmm0
mulsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,(%rsp)
mov    $0x2,%edi
call   1030 <ipow@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @exp_remez13_05_05(double %0) {
%2 = alloca double
%3 = alloca i64
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %2
%8 = load double, double* %2
store double %8, double* %6
%9 = load double, double* %6
%10 = call double @llvm.fmuladd.f64(double 0x3FF71547652B82FE, double %9, double 5.000000e-01)
store double %10, double* %4
%11 = load double, double* %4
%12 = fptosi double %11 to i64
store i64 %12, i64* %3
%13 = load double, double* %4
%14 = fcmp olt double %13, 0.000000e+00
br i1 %14, label %15, label %18
15: ; preds = %1
%16 = load i64, i64* %3
%17 = sub nsw i64 %16, 1
store i64 %17, i64* %3
br label %18
18: ; preds = %15, %1
%19 = load i64, i64* %3
%20 = sitofp i64 %19 to double
store double %20, double* %5
%21 = load double, double* %6
%22 = load double, double* %5
%23 = fneg double %22
%24 = call double @llvm.fmuladd.f64(double %23, double 0x3FE62E4000000000, double %21)
store double %24, double* %6
%25 = load double, double* %6
%26 = load double, double* %5
%27 = fneg double %26
%28 = call double @llvm.fmuladd.f64(double %27, double 0x3EB7F7D1CF79ABCA, double %25)
store double %28, double* %6
store double 0x3DE62D3D4A3C8448, double* %4
%29 = load double, double* %4
%30 = load double, double* %6
%31 = fmul double %29, %30
store double %31, double* %4
%32 = load double, double* %4
%33 = fadd double %32, 0x3E2204F7D58F55BF
store double %33, double* %4
%34 = load double, double* %4
%35 = load double, double* %6
%36 = fmul double %34, %35
store double %36, double* %4
%37 = load double, double* %4
%38 = fadd double %37, 0x3E5AE62FB0EDE00F
store double %38, double* %4
%39 = load double, double* %4
%40 = load double, double* %6
%41 = fmul double %39, %40
store double %41, double* %4
%42 = load double, double* %4
%43 = fadd double %42, 0x3E927E407F56B408
store double %43, double* %4
%44 = load double, double* %4
%45 = load double, double* %6
%46 = fmul double %44, %45
store double %46, double* %4
%47 = load double, double* %4
%48 = fadd double %47, 0x3EC71DE3AE4D65E9
store double %48, double* %4
%49 = load double, double* %4
%50 = load double, double* %6
%51 = fmul double %49, %50
store double %51, double* %4
%52 = load double, double* %4
%53 = fadd double %52, 0x3EFA01A024631011
store double %53, double* %4
%54 = load double, double* %4
%55 = load double, double* %6
%56 = fmul double %54, %55
store double %56, double* %4
%57 = load double, double* %4
%58 = fadd double %57, 0x3F2A01A019FDA16C
store double %58, double* %4
%59 = load double, double* %4
%60 = load double, double* %6
%61 = fmul double %59, %60
store double %61, double* %4
%62 = load double, double* %4
%63 = fadd double %62, 0x3F56C16C16BDC9C8
store double %63, double* %4
%64 = load double, double* %4
%65 = load double, double* %6
%66 = fmul double %64, %65
store double %66, double* %4
%67 = load double, double* %4
%68 = fadd double %67, 0x3F811111111111FD
store double %68, double* %4
%69 = load double, double* %4
%70 = load double, double* %6
%71 = fmul double %69, %70
store double %71, double* %4
%72 = load double, double* %4
%73 = fadd double %72, 0x3FA555555555568B
store double %73, double* %4
%74 = load double, double* %4
%75 = load double, double* %6
%76 = fmul double %74, %75
store double %76, double* %4
%77 = load double, double* %4
%78 = fadd double %77, 0x3FC5555555555555
store double %78, double* %4
%79 = load double, double* %4
%80 = load double, double* %6
%81 = fmul double %79, %80
store double %81, double* %4
%82 = load double, double* %4
%83 = fadd double %82, 0x3FDFFFFFFFFFFFFF
store double %83, double* %4
%84 = load double, double* %4
%85 = load double, double* %6
%86 = fmul double %84, %85
store double %86, double* %4
%87 = load double, double* %4
%88 = fadd double %87, 1.000000e+00
store double %88, double* %4
%89 = load double, double* %4
%90 = load double, double* %6
%91 = fmul double %89, %90
store double %91, double* %4
%92 = load double, double* %4
%93 = fadd double %92, 1.000000e+00
store double %93, double* %4
%94 = load i64, i64* %3
%95 = call i64 @ipow(i32 2, i64 %94)
store i64 %95, i64* %3
%96 = load i64, i64* %3
%97 = sitofp i64 %96 to double
store double %97, double* %7
%98 = load double, double* %4
%99 = load double, double* %7
%100 = fmul double %98, %99
ret double %100
}

LLVM IR (-O2):
define double @exp_remez13_05_05(double %0) {
%2 = tail call double @llvm.fmuladd.f64(double %0, double 0x3FF71547652B82FE, double 5.000000e-01)
%3 = fptosi double %2 to i64
%4 = fcmp olt double %2, 0.000000e+00
%5 = sext i1 %4 to i64
%6 = add nsw i64 %5, %3
%7 = sitofp i64 %6 to double
%8 = fneg double %7
%9 = tail call double @llvm.fmuladd.f64(double %8, double 0x3FE62E4000000000, double %0)
%10 = tail call double @llvm.fmuladd.f64(double %8, double 0x3EB7F7D1CF79ABCA, double %9)
%11 = fmul double %10, 0x3DE62D3D4A3C8448
%12 = fadd double %11, 0x3E2204F7D58F55BF
%13 = fmul double %10, %12
%14 = fadd double %13, 0x3E5AE62FB0EDE00F
%15 = fmul double %10, %14
%16 = fadd double %15, 0x3E927E407F56B408
%17 = fmul double %10, %16
%18 = fadd double %17, 0x3EC71DE3AE4D65E9
%19 = fmul double %10, %18
%20 = fadd double %19, 0x3EFA01A024631011
%21 = fmul double %10, %20
%22 = fadd double %21, 0x3F2A01A019FDA16C
%23 = fmul double %10, %22
%24 = fadd double %23, 0x3F56C16C16BDC9C8
%25 = fmul double %10, %24
%26 = fadd double %25, 0x3F811111111111FD
%27 = fmul double %10, %26
%28 = fadd double %27, 0x3FA555555555568B
%29 = fmul double %10, %28
%30 = fadd double %29, 0x3FC5555555555555
%31 = fmul double %10, %30
%32 = fadd double %31, 0x3FDFFFFFFFFFFFFF
%33 = fmul double %10, %32
%34 = fadd double %33, 1.000000e+00
%35 = fmul double %10, %34
%36 = fadd double %35, 1.000000e+00
%37 = tail call i64 @ipow(i32 2, i64 %6)
%38 = sitofp i64 %37 to double
%39 = fmul double %36, %38
ret double %39
}