#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 */
int /*<<< orphan*/ dd_add(double *, double *, double *);
int /*<<< orphan*/ dd_add_dd_d(double *, double, double *);
int /*<<< orphan*/ dd_inc(double *, double *);
int dd_is_one(double const *);
int dd_is_zero(double const *);
int /*<<< orphan*/ dd_ldexp(double *, int);
int /*<<< orphan*/ dd_mlt(double *, double *);
int /*<<< orphan*/ dd_mlt_d(double *, double);
int /*<<< orphan*/ dd_mul(double *, double *, double *);
int /*<<< orphan*/ dd_mul_pwr2(double *, double const, double *);
int /*<<< orphan*/ dd_sqr(double *, double *);
int /*<<< orphan*/ dd_sub(double const *, double *, double *);
double fabs(double);
double floor(double const);
void dd_exp(const double *a, double *b) {
  const double k = 512.0;
  const double inv_k = 1.0 / k;
  const double exp1hi = 2.718281828459045091e+00;
  const double exp1lo = 1.445646891729250158e-16;
  const double log2hi = 6.931471805599452862e-01;
  const double log2lo = 2.319046813846299558e-17;
  const double dd_eps = 4.93038065763132e-32;
  double m, tol;
  double r[2];
  double s[2];
  double t[2];
  double p[2];
  int i;
  double *inv_fac;
  double i_fac[30];
  i_fac[0] = 1.66666666666666657e-01;
  i_fac[1] = 9.25185853854297066e-18;
  i_fac[2] = 4.16666666666666644e-02;
  i_fac[3] = 2.31296463463574266e-18;
  i_fac[4] = 8.33333333333333322e-03;
  i_fac[5] = 1.15648231731787138e-19;
  i_fac[6] = 1.38888888888888894e-03;
  i_fac[7] = -5.30054395437357706e-20;
  i_fac[8] = 1.98412698412698413e-04;
  i_fac[9] = 1.72095582934207053e-22;
  i_fac[10] = 2.48015873015873016e-05;
  i_fac[11] = 2.15119478667758816e-23;
  i_fac[12] = 2.75573192239858925e-06;
  i_fac[13] = -1.85839327404647208e-22;
  i_fac[14] = 2.75573192239858883e-07;
  i_fac[15] = 2.37677146222502973e-23;
  i_fac[16] = 2.50521083854417202e-08;
  i_fac[17] = -1.44881407093591197e-24;
  i_fac[18] = 2.08767569878681002e-09;
  i_fac[19] = -1.20734505911325997e-25;
  i_fac[20] = 1.60590438368216133e-10;
  i_fac[21] = 1.25852945887520981e-26;
  i_fac[22] = 1.14707455977297245e-11;
  i_fac[23] = 2.06555127528307454e-28;
  i_fac[24] = 7.64716373181981641e-13;
  i_fac[25] = 7.03872877733453001e-30;
  i_fac[26] = 4.77947733238738525e-14;
  i_fac[27] = 4.39920548583408126e-31;
  i_fac[28] = 2.81145725434552060e-15;
  i_fac[29] = 1.65088427308614326e-31;
  if (a[0] <= -709.0) {
    b[0] = 0.0;
    b[1] = 0.0;
    return;
  }
  if (a[0] >= 709.0) {
    b[0] = -1.0;
    b[1] = 0.0;
    return;
  }
  if (dd_is_zero(a) == 1) {
    b[0] = 1.0;
    b[1] = 0.0;
    return;
  }
  if (dd_is_one(a) == 1) {
    b[0] = exp1hi;
    b[1] = exp1lo;
    return;
  }
  m = floor(a[0] / log2hi + 0.5);
  r[0] = log2hi;
  r[1] = log2lo;
  dd_mlt_d(r, m);
  dd_sub(a, r, r);
  dd_mul_pwr2(r, inv_k, r);
  dd_sqr(r, p);
  dd_mul_pwr2(p, 0.5, s);
  dd_inc(s, r);
  dd_mlt(p, r);
  inv_fac = &i_fac[0];
  dd_mul(p, inv_fac, t);
  i = 0;
  tol = inv_k * dd_eps;
  do {
    dd_inc(s, t);
    dd_mlt(p, r);
    inv_fac = &i_fac[2 * (++i)];
    dd_mul(p, inv_fac, t);
  } while (fabs(t[0]) > tol && i < 5);
  dd_inc(s, t);
  for (i = 0; i < 9; i++) {
    dd_mul_pwr2(s, 2.0, p);
    dd_sqr(s, t);
    dd_add(p, t, s);
  }
  dd_add_dd_d(s, 1.0, b);
  i = (int)m;
  dd_ldexp(b, i);
}


x86 assembly (clang, -O0):
<dd_exp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1b0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xf3d(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xf28(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xf13(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xefe(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xee9(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xed4(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xebf(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xeaa(%rip),%xmm0
movsd  %xmm0,-0x1a0(%rbp)
ff
movsd  0xe92(%rip),%xmm0
movsd  %xmm0,-0x198(%rbp)
ff
movsd  0xe7a(%rip),%xmm0
movsd  %xmm0,-0x190(%rbp)
ff
movsd  0xe62(%rip),%xmm0
movsd  %xmm0,-0x188(%rbp)
ff
movsd  0xe4a(%rip),%xmm0
movsd  %xmm0,-0x180(%rbp)
ff
movsd  0xe32(%rip),%xmm0
movsd  %xmm0,-0x178(%rbp)
ff
movsd  0xe1a(%rip),%xmm0
movsd  %xmm0,-0x170(%rbp)
ff
movsd  0xe02(%rip),%xmm0
movsd  %xmm0,-0x168(%rbp)
ff
movsd  0xdea(%rip),%xmm0
movsd  %xmm0,-0x160(%rbp)
ff
movsd  0xdd2(%rip),%xmm0
movsd  %xmm0,-0x158(%rbp)
ff
movsd  0xdba(%rip),%xmm0
movsd  %xmm0,-0x150(%rbp)
ff
movsd  0xda2(%rip),%xmm0
movsd  %xmm0,-0x148(%rbp)
ff
movsd  0xd8a(%rip),%xmm0
movsd  %xmm0,-0x140(%rbp)
ff
movsd  0xd72(%rip),%xmm0
movsd  %xmm0,-0x138(%rbp)
ff
movsd  0xd5a(%rip),%xmm0
movsd  %xmm0,-0x130(%rbp)
ff
movsd  0xd42(%rip),%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
movsd  0xd2a(%rip),%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
movsd  0xd12(%rip),%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movsd  0xcfa(%rip),%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
movsd  0xce2(%rip),%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
movsd  0xcca(%rip),%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  0xcb2(%rip),%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  0xc9a(%rip),%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  0xc82(%rip),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  0xc6a(%rip),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  0xc52(%rip),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  0xc3a(%rip),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  0xc22(%rip),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  0xc0a(%rip),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  0xbf2(%rip),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  0xbd6(%rip),%xmm0
ucomisd (%rax),%xmm0
jb     1450 <dd_exp+0x280>
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x8(%rax)
jmp    1743 <dd_exp+0x573>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xcd0(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     148b <dd_exp+0x2bb>
mov    -0x10(%rbp),%rax
movsd  0xce2(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x8(%rax)
jmp    1743 <dd_exp+0x573>
mov    -0x8(%rbp),%rdi
call   1080 <dd_is_zero@plt>
cmp    $0x1,%eax
jne    14be <dd_exp+0x2ee>
mov    -0x10(%rbp),%rax
movsd  0xc9f(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x8(%rax)
jmp    1743 <dd_exp+0x573>
mov    -0x8(%rbp),%rdi
call   10a0 <dd_is_one@plt>
cmp    $0x1,%eax
jne    14f6 <dd_exp+0x326>
mov    -0x10(%rbp),%rax
movsd  0xc3c(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0xc24(%rip),%xmm0
movsd  %xmm0,0x8(%rax)
jmp    1743 <dd_exp+0x573>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xc02(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xc2e(%rip),%xmm1
addsd  %xmm1,%xmm0
call   10f0 <floor@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  0xbe0(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  0xbcb(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
lea    -0x70(%rbp),%rdi
movsd  -0x50(%rbp),%xmm0
call   1090 <dd_mlt_d@plt>
mov    -0x8(%rbp),%rdi
lea    -0x70(%rbp),%rsi
lea    -0x70(%rbp),%rdx
call   1060 <dd_sub@plt>
lea    -0x70(%rbp),%rdi
lea    -0x70(%rbp),%rsi
movsd  0xbb7(%rip),%xmm0
call   1030 <dd_mul_pwr2@plt>
lea    -0x70(%rbp),%rdi
lea    -0xa0(%rbp),%rsi
call   10c0 <dd_sqr@plt>
lea    -0xa0(%rbp),%rdi
lea    -0x80(%rbp),%rsi
movsd  0xbaf(%rip),%xmm0
call   1030 <dd_mul_pwr2@plt>
lea    -0x80(%rbp),%rdi
lea    -0x70(%rbp),%rsi
call   1070 <dd_inc@plt>
lea    -0xa0(%rbp),%rdi
lea    -0x70(%rbp),%rsi
call   1040 <dd_mlt@plt>
lea    -0x1a0(%rbp),%rax
mov    %rax,-0xb0(%rbp)
lea    -0xa0(%rbp),%rdi
mov    -0xb0(%rbp),%rsi
lea    -0x90(%rbp),%rdx
call   10b0 <dd_mul@plt>
movl   $0x0,-0xa4(%rbp)
movsd  0xb4b(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
lea    -0x80(%rbp),%rdi
lea    -0x90(%rbp),%rsi
call   1070 <dd_inc@plt>
lea    -0xa0(%rbp),%rdi
lea    -0x70(%rbp),%rsi
call   1040 <dd_mlt@plt>
mov    -0xa4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
shl    $0x1,%eax
movslq %eax,%rcx
lea    -0x1a0(%rbp),%rax
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0xb0(%rbp)
lea    -0xa0(%rbp),%rdi
mov    -0xb0(%rbp),%rsi
lea    -0x90(%rbp),%rdx
call   10b0 <dd_mul@plt>
movsd  -0x90(%rbp),%xmm0
ff
movaps 0xafb(%rip),%xmm1
pand   %xmm1,%xmm0
xor    %eax,%eax
ucomisd -0x58(%rbp),%xmm0
mov    %al,-0x1a1(%rbp)
jbe    168c <dd_exp+0x4bc>
cmpl   $0x5,-0xa4(%rbp)
setl   %al
mov    %al,-0x1a1(%rbp)
mov    -0x1a1(%rbp),%al
test   $0x1,%al
jne    15f2 <dd_exp+0x422>
lea    -0x80(%rbp),%rdi
lea    -0x90(%rbp),%rsi
call   1070 <dd_inc@plt>
movl   $0x0,-0xa4(%rbp)
cmpl   $0x9,-0xa4(%rbp)
jge    1714 <dd_exp+0x544>
lea    -0x80(%rbp),%rdi
lea    -0xa0(%rbp),%rsi
movsd  0xa7c(%rip),%xmm0
call   1030 <dd_mul_pwr2@plt>
lea    -0x80(%rbp),%rdi
lea    -0x90(%rbp),%rsi
call   10c0 <dd_sqr@plt>
lea    -0xa0(%rbp),%rdi
lea    -0x90(%rbp),%rsi
lea    -0x80(%rbp),%rdx
call   10e0 <dd_add@plt>
mov    -0xa4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
jmp    16b4 <dd_exp+0x4e4>
lea    -0x80(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movsd  0xa24(%rip),%xmm0
call   10d0 <dd_add_dd_d@plt>
cvttsd2si -0x50(%rbp),%eax
mov    %eax,-0xa4(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0xa4(%rbp),%esi
call   1050 <dd_ldexp@plt>
add    $0x1b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dd_exp>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x148,%rsp
mov    %rsi,%rbp
movaps 0xe15(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xe19(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xe1d(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xe21(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
movaps 0xe22(%rip),%xmm0
movaps %xmm0,0x90(%rsp)
movaps 0xe23(%rip),%xmm0
movaps %xmm0,0xa0(%rsp)
movaps 0xe24(%rip),%xmm0
movaps %xmm0,0xb0(%rsp)
movaps 0xe25(%rip),%xmm0
movaps %xmm0,0xc0(%rsp)
movaps 0xe26(%rip),%xmm0
movaps %xmm0,0xd0(%rsp)
movaps 0xe27(%rip),%xmm0
movaps %xmm0,0xe0(%rsp)
movaps 0xe28(%rip),%xmm0
movaps %xmm0,0xf0(%rsp)
movaps 0xe29(%rip),%xmm0
movaps %xmm0,0x100(%rsp)
movaps 0xe2a(%rip),%xmm0
movaps %xmm0,0x110(%rsp)
movaps 0xe2b(%rip),%xmm0
movaps %xmm0,0x120(%rsp)
movaps 0xe2c(%rip),%xmm0
movaps %xmm0,0x130(%rsp)
movsd  (%rdi),%xmm0
movsd  0xe58(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    12f7 <dd_exp+0x127>
ucomisd 0xe52(%rip),%xmm0
jae    1305 <dd_exp+0x135>
mov    %rdi,%rbx
call   1080 <dd_is_zero@plt>
cmp    $0x1,%eax
jne    1317 <dd_exp+0x147>
movsd  0xe73(%rip),%xmm0
movupd %xmm0,0x0(%rbp)
jmp    1608 <dd_exp+0x438>
xorpd  %xmm0,%xmm0
movupd %xmm0,0x0(%rbp)
jmp    1608 <dd_exp+0x438>
movsd  0xe23(%rip),%xmm0
movupd %xmm0,0x0(%rbp)
jmp    1608 <dd_exp+0x438>
mov    %rbx,%rdi
call   10a0 <dd_is_one@plt>
cmp    $0x1,%eax
jne    1336 <dd_exp+0x166>
movapd 0xde4(%rip),%xmm0
movupd %xmm0,0x0(%rbp)
jmp    1608 <dd_exp+0x438>
mov    %rbp,0x8(%rsp)
movsd  (%rbx),%xmm0
divsd  0xdf1(%rip),%xmm0
addsd  0xdf1(%rip),%xmm0
call   10f0 <floor@plt>
movapd 0xd94(%rip),%xmm1
movapd %xmm1,0x40(%rsp)
lea    0x40(%rsp),%r14
mov    %r14,%rdi
movsd  %xmm0,(%rsp)
call   1090 <dd_mlt_d@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r14,%rdx
call   1060 <dd_sub@plt>
movsd  0xdbe(%rip),%xmm0
mov    %r14,%rdi
mov    %r14,%rsi
call   1030 <dd_mul_pwr2@plt>
lea    0x20(%rsp),%r12
mov    %r14,%rdi
mov    %r12,%rsi
call   10c0 <dd_sqr@plt>
lea    0x30(%rsp),%r15
mov    %r12,%rdi
movsd  0xd8b(%rip),%xmm0
mov    %r15,%rsi
call   1030 <dd_mul_pwr2@plt>
mov    %r15,%rdi
mov    %r14,%rsi
call   1070 <dd_inc@plt>
mov    %r12,%rdi
mov    %r14,%rsi
call   1040 <dd_mlt@plt>
lea    0x50(%rsp),%rsi
lea    0x10(%rsp),%rbx
mov    %r12,%rdi
mov    %rbx,%rdx
call   10b0 <dd_mul@plt>
lea    0x60(%rsp),%rbp
xor    %r13d,%r13d
mov    %r15,%rdi
mov    %rbx,%rsi
call   1070 <dd_inc@plt>
mov    %r12,%rdi
mov    %r14,%rsi
call   1040 <dd_mlt@plt>
mov    %r12,%rdi
mov    %rbp,%rsi
mov    %rbx,%rdx
call   10b0 <dd_mul@plt>
movsd  0x10(%rsp),%xmm0
andpd  0xcde(%rip),%xmm0
ucomisd 0xd26(%rip),%xmm0
jbe    143d <dd_exp+0x26d>
lea    0x1(%r13),%rax
add    $0x10,%rbp
cmp    $0x4,%r13
mov    %rax,%r13
jb     13f0 <dd_exp+0x220>
lea    0x30(%rsp),%r14
lea    0x10(%rsp),%r15
mov    %r14,%rdi
mov    %r15,%rsi
call   1070 <dd_inc@plt>
movsd  0xcfe(%rip),%xmm0
lea    0x20(%rsp),%r12
mov    %r14,%rdi
mov    %r12,%rsi
call   1030 <dd_mul_pwr2@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   10c0 <dd_sqr@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   10e0 <dd_add@plt>
mov    %r14,%rdi
movsd  0xcca(%rip),%xmm0
mov    %r12,%rsi
call   1030 <dd_mul_pwr2@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   10c0 <dd_sqr@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   10e0 <dd_add@plt>
mov    %r14,%rdi
movsd  0xc9e(%rip),%xmm0
mov    %r12,%rsi
call   1030 <dd_mul_pwr2@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   10c0 <dd_sqr@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   10e0 <dd_add@plt>
mov    %r14,%rdi
movsd  0xc72(%rip),%xmm0
mov    %r12,%rsi
call   1030 <dd_mul_pwr2@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   10c0 <dd_sqr@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   10e0 <dd_add@plt>
mov    %r14,%rdi
movsd  0xc46(%rip),%xmm0
mov    %r12,%rsi
call   1030 <dd_mul_pwr2@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   10c0 <dd_sqr@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   10e0 <dd_add@plt>
mov    %r14,%rdi
movsd  0xc1a(%rip),%xmm0
mov    %r12,%rsi
call   1030 <dd_mul_pwr2@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   10c0 <dd_sqr@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   10e0 <dd_add@plt>
mov    %r14,%rdi
movsd  0xbee(%rip),%xmm0
mov    %r12,%rsi
call   1030 <dd_mul_pwr2@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   10c0 <dd_sqr@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   10e0 <dd_add@plt>
mov    %r14,%rdi
movsd  0xbc2(%rip),%xmm0
mov    %r12,%rsi
call   1030 <dd_mul_pwr2@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   10c0 <dd_sqr@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   10e0 <dd_add@plt>
mov    %r14,%rdi
movsd  0xb96(%rip),%xmm0
mov    %r12,%rsi
call   1030 <dd_mul_pwr2@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   10c0 <dd_sqr@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   10e0 <dd_add@plt>
movsd  0xb75(%rip),%xmm0
mov    %r14,%rdi
mov    0x8(%rsp),%rbx
mov    %rbx,%rsi
call   10d0 <dd_add_dd_d@plt>
cvttsd2si (%rsp),%esi
mov    %rbx,%rdi
call   1050 <dd_ldexp@plt>
add    $0x148,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @dd_exp(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca [2 x double]
%15 = alloca [2 x double]
%16 = alloca [2 x double]
%17 = alloca [2 x double]
%18 = alloca i32
%19 = alloca double*
%20 = alloca [30 x double]
store double* %0, double** %3
store double* %1, double** %4
store double 5.120000e+02, double* %5
store double 0x3F60000000000000, double* %6
store double 0x4005BF0A8B145769, double* %7
store double 0x3CA4D57EE2B1013A, double* %8
store double 0x3FE62E42FEFA39EF, double* %9
store double 0x3C7ABC9E3B39803F, double* %10
store double 0x396FFFFFFFFFFFF9, double* %11
%21 = getelementptr inbounds [30 x double], [30 x double]* %20, i64 0, i64 0
store double 0x3FC5555555555555, double* %21
%22 = getelementptr inbounds [30 x double], [30 x double]* %20, i64 0, i64 1
store double 0x3C65555555555555, double* %22
%23 = getelementptr inbounds [30 x double], [30 x double]* %20, i64 0, i64 2
store double 0x3FA5555555555555, double* %23
%24 = getelementptr inbounds [30 x double], [30 x double]* %20, i64 0, i64 3
store double 0x3C45555555555555, double* %24
%25 = getelementptr inbounds [30 x double], [30 x double]* %20, i64 0, i64 4
store double 0x3F81111111111111, double* %25
%26 = getelementptr inbounds [30 x double], [30 x double]* %20, i64 0, i64 5
store double 0x3C01111111111111, double* %26
%27 = getelementptr inbounds [30 x double], [30 x double]* %20, i64 0, i64 6
store double 0x3F56C16C16C16C17, double* %27
%28 = getelementptr inbounds [30 x double], [30 x double]* %20, i64 0, i64 7
store double 0xBBEF49F49F49F49F, double* %28
%29 = getelementptr inbounds [30 x double], [30 x double]* %20, i64 0, i64 8
store double 0x3F2A01A01A01A01A, double* %29
%30 = getelementptr inbounds [30 x double], [30 x double]* %20, i64 0, i64 9
store double 0x3B6A01A01A01A01A, double* %30
%31 = getelementptr inbounds [30 x double], [30 x double]* %20, i64 0, i64 10
store double 0x3EFA01A01A01A01A, double* %31
%32 = getelementptr inbounds [30 x double], [30 x double]* %20, i64 0, i64 11
store double 0x3B3A01A01A01A01A, double* %32
%33 = getelementptr inbounds [30 x double], [30 x double]* %20, i64 0, i64 12
store double 0x3EC71DE3A556C734, double* %33
%34 = getelementptr inbounds [30 x double], [30 x double]* %20, i64 0, i64 13
store double 0xBB6C154F8DDC6C00, double* %34
%35 = getelementptr inbounds [30 x double], [30 x double]* %20, i64 0, i64 14
store double 0x3E927E4FB7789F5C, double* %35
%36 = getelementptr inbounds [30 x double], [30 x double]* %20, i64 0, i64 15
store double 0x3B3CBBC05B4FA99A, double* %36
%37 = getelementptr inbounds [30 x double], [30 x double]* %20, i64 0, i64 16
store double 0x3E5AE64567F544E4, double* %37
%38 = getelementptr inbounds [30 x double], [30 x double]* %20, i64 0, i64 17
store double 0xBAFC062E06D1F209, double* %38
%39 = getelementptr inbounds [30 x double], [30 x double]* %20, i64 0, i64 18
store double 0x3E21EED8EFF8D898, double* %39
%40 = getelementptr inbounds [30 x double], [30 x double]* %20, i64 0, i64 19
store double 0xBAC2AEC959E14C06, double* %40
%41 = getelementptr inbounds [30 x double], [30 x double]* %20, i64 0, i64 20
store double 0x3DE6124613A86D09, double* %41
%42 = getelementptr inbounds [30 x double], [30 x double]* %20, i64 0, i64 21
store double 0x3A8F28E0CC748EBE, double* %42
%43 = getelementptr inbounds [30 x double], [30 x double]* %20, i64 0, i64 22
store double 0x3DA93974A8C07C9D, double* %43
%44 = getelementptr inbounds [30 x double], [30 x double]* %20, i64 0, i64 23
store double 0x3A305D6F8A2EFD1F, double* %44
%45 = getelementptr inbounds [30 x double], [30 x double]* %20, i64 0, i64 24
store double 0x3D6AE7F3E733B81F, double* %45
%46 = getelementptr inbounds [30 x double], [30 x double]* %20, i64 0, i64 25
store double 0x39E1D8656B0EE8CB, double* %46
%47 = getelementptr inbounds [30 x double], [30 x double]* %20, i64 0, i64 26
store double 0x3D2AE7F3E733B81F, double* %47
%48 = getelementptr inbounds [30 x double], [30 x double]* %20, i64 0, i64 27
store double 0x39A1D8656B0EE8CB, double* %48
%49 = getelementptr inbounds [30 x double], [30 x double]* %20, i64 0, i64 28
store double 0x3CE952C77030AD4A, double* %49
%50 = getelementptr inbounds [30 x double], [30 x double]* %20, i64 0, i64 29
store double 0x398AC981465DDC6C, double* %50
%51 = load double*, double** %3
%52 = getelementptr inbounds double, double* %51, i64 0
%53 = load double, double* %52
%54 = fcmp ole double %53, -7.090000e+02
br i1 %54, label %55, label %60
55: ; preds = %2
%56 = load double*, double** %4
%57 = getelementptr inbounds double, double* %56, i64 0
store double 0.000000e+00, double* %57
%58 = load double*, double** %4
%59 = getelementptr inbounds double, double* %58, i64 1
store double 0.000000e+00, double* %59
br label %181
60: ; preds = %2
%61 = load double*, double** %3
%62 = getelementptr inbounds double, double* %61, i64 0
%63 = load double, double* %62
%64 = fcmp oge double %63, 7.090000e+02
br i1 %64, label %65, label %70
65: ; preds = %60
%66 = load double*, double** %4
%67 = getelementptr inbounds double, double* %66, i64 0
store double -1.000000e+00, double* %67
%68 = load double*, double** %4
%69 = getelementptr inbounds double, double* %68, i64 1
store double 0.000000e+00, double* %69
br label %181
70: ; preds = %60
%71 = load double*, double** %3
%72 = call i32 @dd_is_zero(double* %71)
%73 = icmp eq i32 %72, 1
br i1 %73, label %74, label %79
74: ; preds = %70
%75 = load double*, double** %4
%76 = getelementptr inbounds double, double* %75, i64 0
store double 1.000000e+00, double* %76
%77 = load double*, double** %4
%78 = getelementptr inbounds double, double* %77, i64 1
store double 0.000000e+00, double* %78
br label %181
79: ; preds = %70
%80 = load double*, double** %3
%81 = call i32 @dd_is_one(double* %80)
%82 = icmp eq i32 %81, 1
br i1 %82, label %83, label %88
83: ; preds = %79
%84 = load double*, double** %4
%85 = getelementptr inbounds double, double* %84, i64 0
store double 0x4005BF0A8B145769, double* %85
%86 = load double*, double** %4
%87 = getelementptr inbounds double, double* %86, i64 1
store double 0x3CA4D57EE2B1013A, double* %87
br label %181
88: ; preds = %79
%89 = load double*, double** %3
%90 = getelementptr inbounds double, double* %89, i64 0
%91 = load double, double* %90
%92 = fdiv double %91, 0x3FE62E42FEFA39EF
%93 = fadd double %92, 5.000000e-01
%94 = call double @llvm.floor.f64(double %93)
store double %94, double* %12
%95 = getelementptr inbounds [2 x double], [2 x double]* %14, i64 0, i64 0
store double 0x3FE62E42FEFA39EF, double* %95
%96 = getelementptr inbounds [2 x double], [2 x double]* %14, i64 0, i64 1
store double 0x3C7ABC9E3B39803F, double* %96
%97 = getelementptr inbounds [2 x double], [2 x double]* %14, i64 0, i64 0
%98 = load double, double* %12
%99 = call i32 @dd_mlt_d(double* %97, double %98)
%100 = load double*, double** %3
%101 = getelementptr inbounds [2 x double], [2 x double]* %14, i64 0, i64 0
%102 = getelementptr inbounds [2 x double], [2 x double]* %14, i64 0, i64 0
%103 = call i32 @dd_sub(double* %100, double* %101, double* %102)
%104 = getelementptr inbounds [2 x double], [2 x double]* %14, i64 0, i64 0
%105 = getelementptr inbounds [2 x double], [2 x double]* %14, i64 0, i64 0
%106 = call i32 @dd_mul_pwr2(double* %104, double 0x3F60000000000000, double* %105)
%107 = getelementptr inbounds [2 x double], [2 x double]* %14, i64 0, i64 0
%108 = getelementptr inbounds [2 x double], [2 x double]* %17, i64 0, i64 0
%109 = call i32 @dd_sqr(double* %107, double* %108)
%110 = getelementptr inbounds [2 x double], [2 x double]* %17, i64 0, i64 0
%111 = getelementptr inbounds [2 x double], [2 x double]* %15, i64 0, i64 0
%112 = call i32 @dd_mul_pwr2(double* %110, double 5.000000e-01, double* %111)
%113 = getelementptr inbounds [2 x double], [2 x double]* %15, i64 0, i64 0
%114 = getelementptr inbounds [2 x double], [2 x double]* %14, i64 0, i64 0
%115 = call i32 @dd_inc(double* %113, double* %114)
%116 = getelementptr inbounds [2 x double], [2 x double]* %17, i64 0, i64 0
%117 = getelementptr inbounds [2 x double], [2 x double]* %14, i64 0, i64 0
%118 = call i32 @dd_mlt(double* %116, double* %117)
%119 = getelementptr inbounds [30 x double], [30 x double]* %20, i64 0, i64 0
store double* %119, double** %19
%120 = getelementptr inbounds [2 x double], [2 x double]* %17, i64 0, i64 0
%121 = load double*, double** %19
%122 = getelementptr inbounds [2 x double], [2 x double]* %16, i64 0, i64 0
%123 = call i32 @dd_mul(double* %120, double* %121, double* %122)
store i32 0, i32* %18
store double 0x38DFFFFFFFFFFFF9, double* %13
br label %124
124: ; preds = %149, %88
%125 = getelementptr inbounds [2 x double], [2 x double]* %15, i64 0, i64 0
%126 = getelementptr inbounds [2 x double], [2 x double]* %16, i64 0, i64 0
%127 = call i32 @dd_inc(double* %125, double* %126)
%128 = getelementptr inbounds [2 x double], [2 x double]* %17, i64 0, i64 0
%129 = getelementptr inbounds [2 x double], [2 x double]* %14, i64 0, i64 0
%130 = call i32 @dd_mlt(double* %128, double* %129)
%131 = load i32, i32* %18
%132 = add nsw i32 %131, 1
store i32 %132, i32* %18
%133 = mul nsw i32 2, %132
%134 = sext i32 %133 to i64
%135 = getelementptr inbounds [30 x double], [30 x double]* %20, i64 0, i64 %134
store double* %135, double** %19
%136 = getelementptr inbounds [2 x double], [2 x double]* %17, i64 0, i64 0
%137 = load double*, double** %19
%138 = getelementptr inbounds [2 x double], [2 x double]* %16, i64 0, i64 0
%139 = call i32 @dd_mul(double* %136, double* %137, double* %138)
br label %140
140: ; preds = %124
%141 = getelementptr inbounds [2 x double], [2 x double]* %16, i64 0, i64 0
%142 = load double, double* %141
%143 = call double @llvm.fabs.f64(double %142)
%144 = load double, double* %13
%145 = fcmp ogt double %143, %144
br i1 %145, label %146, label %149
146: ; preds = %140
%147 = load i32, i32* %18
%148 = icmp slt i32 %147, 5
br label %149
149: ; preds = %146, %140
%150 = phi i1 [ false, %140 ], [ %148, %146 ]
br i1 %150, label %124, label %151
151: ; preds = %149
%152 = getelementptr inbounds [2 x double], [2 x double]* %15, i64 0, i64 0
%153 = getelementptr inbounds [2 x double], [2 x double]* %16, i64 0, i64 0
%154 = call i32 @dd_inc(double* %152, double* %153)
store i32 0, i32* %18
br label %155
155: ; preds = %169, %151
%156 = load i32, i32* %18
%157 = icmp slt i32 %156, 9
br i1 %157, label %158, label %172
158: ; preds = %155
%159 = getelementptr inbounds [2 x double], [2 x double]* %15, i64 0, i64 0
%160 = getelementptr inbounds [2 x double], [2 x double]* %17, i64 0, i64 0
%161 = call i32 @dd_mul_pwr2(double* %159, double 2.000000e+00, double* %160)
%162 = getelementptr inbounds [2 x double], [2 x double]* %15, i64 0, i64 0
%163 = getelementptr inbounds [2 x double], [2 x double]* %16, i64 0, i64 0
%164 = call i32 @dd_sqr(double* %162, double* %163)
%165 = getelementptr inbounds [2 x double], [2 x double]* %17, i64 0, i64 0
%166 = getelementptr inbounds [2 x double], [2 x double]* %16, i64 0, i64 0
%167 = getelementptr inbounds [2 x double], [2 x double]* %15, i64 0, i64 0
%168 = call i32 @dd_add(double* %165, double* %166, double* %167)
br label %169
169: ; preds = %158
%170 = load i32, i32* %18
%171 = add nsw i32 %170, 1
store i32 %171, i32* %18
br label %155
172: ; preds = %155
%173 = getelementptr inbounds [2 x double], [2 x double]* %15, i64 0, i64 0
%174 = load double*, double** %4
%175 = call i32 @dd_add_dd_d(double* %173, double 1.000000e+00, double* %174)
%176 = load double, double* %12
%177 = fptosi double %176 to i32
store i32 %177, i32* %18
%178 = load double*, double** %4
%179 = load i32, i32* %18
%180 = call i32 @dd_ldexp(double* %178, i32 %179)
br label %181
181: ; preds = %172, %83, %74, %65, %55
ret void
}

LLVM IR (-O2):
define void @dd_exp(double* %0, double* %1) {
%3 = alloca <2 x double>
%4 = alloca [2 x double]
%5 = alloca [2 x double]
%6 = alloca [2 x double]
%7 = alloca [30 x double]
%8 = bitcast <2 x double>* %3 to i8*
%9 = bitcast [2 x double]* %4 to i8*
%10 = bitcast [2 x double]* %5 to i8*
%11 = bitcast [2 x double]* %6 to i8*
%12 = bitcast [30 x double]* %7 to i8*
%13 = getelementptr inbounds [30 x double], [30 x double]* %7, i64 0, i64 0
%14 = bitcast [30 x double]* %7 to <2 x double>*
store <2 x double> <double 0x3FC5555555555555, double 0x3C65555555555555>, <2 x double>* %14
%15 = getelementptr inbounds [30 x double], [30 x double]* %7, i64 0, i64 2
%16 = bitcast double* %15 to <2 x double>*
store <2 x double> <double 0x3FA5555555555555, double 0x3C45555555555555>, <2 x double>* %16
%17 = getelementptr inbounds [30 x double], [30 x double]* %7, i64 0, i64 4
%18 = bitcast double* %17 to <2 x double>*
store <2 x double> <double 0x3F81111111111111, double 0x3C01111111111111>, <2 x double>* %18
%19 = getelementptr inbounds [30 x double], [30 x double]* %7, i64 0, i64 6
%20 = bitcast double* %19 to <2 x double>*
store <2 x double> <double 0x3F56C16C16C16C17, double 0xBBEF49F49F49F49F>, <2 x double>* %20
%21 = getelementptr inbounds [30 x double], [30 x double]* %7, i64 0, i64 8
%22 = bitcast double* %21 to <2 x double>*
store <2 x double> <double 0x3F2A01A01A01A01A, double 0x3B6A01A01A01A01A>, <2 x double>* %22
%23 = getelementptr inbounds [30 x double], [30 x double]* %7, i64 0, i64 10
%24 = bitcast double* %23 to <2 x double>*
store <2 x double> <double 0x3EFA01A01A01A01A, double 0x3B3A01A01A01A01A>, <2 x double>* %24
%25 = getelementptr inbounds [30 x double], [30 x double]* %7, i64 0, i64 12
%26 = bitcast double* %25 to <2 x double>*
store <2 x double> <double 0x3EC71DE3A556C734, double 0xBB6C154F8DDC6C00>, <2 x double>* %26
%27 = getelementptr inbounds [30 x double], [30 x double]* %7, i64 0, i64 14
%28 = bitcast double* %27 to <2 x double>*
store <2 x double> <double 0x3E927E4FB7789F5C, double 0x3B3CBBC05B4FA99A>, <2 x double>* %28
%29 = getelementptr inbounds [30 x double], [30 x double]* %7, i64 0, i64 16
%30 = bitcast double* %29 to <2 x double>*
store <2 x double> <double 0x3E5AE64567F544E4, double 0xBAFC062E06D1F209>, <2 x double>* %30
%31 = getelementptr inbounds [30 x double], [30 x double]* %7, i64 0, i64 18
%32 = bitcast double* %31 to <2 x double>*
store <2 x double> <double 0x3E21EED8EFF8D898, double 0xBAC2AEC959E14C06>, <2 x double>* %32
%33 = getelementptr inbounds [30 x double], [30 x double]* %7, i64 0, i64 20
%34 = bitcast double* %33 to <2 x double>*
store <2 x double> <double 0x3DE6124613A86D09, double 0x3A8F28E0CC748EBE>, <2 x double>* %34
%35 = getelementptr inbounds [30 x double], [30 x double]* %7, i64 0, i64 22
%36 = bitcast double* %35 to <2 x double>*
store <2 x double> <double 0x3DA93974A8C07C9D, double 0x3A305D6F8A2EFD1F>, <2 x double>* %36
%37 = getelementptr inbounds [30 x double], [30 x double]* %7, i64 0, i64 24
%38 = bitcast double* %37 to <2 x double>*
store <2 x double> <double 0x3D6AE7F3E733B81F, double 0x39E1D8656B0EE8CB>, <2 x double>* %38
%39 = getelementptr inbounds [30 x double], [30 x double]* %7, i64 0, i64 26
%40 = bitcast double* %39 to <2 x double>*
store <2 x double> <double 0x3D2AE7F3E733B81F, double 0x39A1D8656B0EE8CB>, <2 x double>* %40
%41 = getelementptr inbounds [30 x double], [30 x double]* %7, i64 0, i64 28
%42 = bitcast double* %41 to <2 x double>*
store <2 x double> <double 0x3CE952C77030AD4A, double 0x398AC981465DDC6C>, <2 x double>* %42
%43 = load double, double* %0
%44 = fcmp ugt double %43, -7.090000e+02
br i1 %44, label %47, label %45
45: ; preds = %2
%46 = bitcast double* %1 to i8*
br label %123
47: ; preds = %2
%48 = fcmp ult double %43, 7.090000e+02
br i1 %48, label %51, label %49
49: ; preds = %47
%50 = bitcast double* %1 to <2 x double>*
store <2 x double> <double -1.000000e+00, double 0.000000e+00>, <2 x double>* %50
br label %123
51: ; preds = %47
%52 = tail call i32 @dd_is_zero(double* %0)
%53 = icmp eq i32 %52, 1
br i1 %53, label %54, label %56
54: ; preds = %51
%55 = bitcast double* %1 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 0.000000e+00>, <2 x double>* %55
br label %123
56: ; preds = %51
%57 = tail call i32 @dd_is_one(double* %0)
%58 = icmp eq i32 %57, 1
br i1 %58, label %59, label %61
59: ; preds = %56
%60 = bitcast double* %1 to <2 x double>*
store <2 x double> <double 0x4005BF0A8B145769, double 0x3CA4D57EE2B1013A>, <2 x double>* %60
br label %123
61: ; preds = %56
%62 = load double, double* %0
%63 = fdiv double %62, 0x3FE62E42FEFA39EF
%64 = fadd double %63, 5.000000e-01
%65 = tail call double @llvm.floor.f64(double %64)
%66 = getelementptr inbounds <2 x double>, <2 x double>* %3, i64 0, i64 0
store <2 x double> <double 0x3FE62E42FEFA39EF, double 0x3C7ABC9E3B39803F>, <2 x double>* %3
%67 = call i32 @dd_mlt_d(double* %66, double %65)
%68 = call i32 @dd_sub(double* %0, double* %66, double* %66)
%69 = call i32 @dd_mul_pwr2(double* %66, double 0x3F60000000000000, double* %66)
%70 = getelementptr inbounds [2 x double], [2 x double]* %6, i64 0, i64 0
%71 = call i32 @dd_sqr(double* %66, double* %70)
%72 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 0, i64 0
%73 = call i32 @dd_mul_pwr2(double* %70, double 5.000000e-01, double* %72)
%74 = call i32 @dd_inc(double* %72, double* %66)
%75 = call i32 @dd_mlt(double* %70, double* %66)
%76 = getelementptr inbounds [2 x double], [2 x double]* %5, i64 0, i64 0
%77 = call i32 @dd_mul(double* %70, double* %13, double* %76)
br label %78
78: ; preds = %78, %61
%79 = phi i64 [ %82, %78 ], [ 0, %61 ]
%80 = call i32 @dd_inc(double* %72, double* %76)
%81 = call i32 @dd_mlt(double* %70, double* %66)
%82 = add nuw nsw i64 %79, 1
%83 = shl nuw nsw i64 %82, 1
%84 = getelementptr inbounds [30 x double], [30 x double]* %7, i64 0, i64 %83
%85 = call i32 @dd_mul(double* %70, double* %84, double* %76)
%86 = load double, double* %76
%87 = call double @llvm.fabs.f64(double %86)
%88 = fcmp ogt double %87, 0x38DFFFFFFFFFFFF9
%89 = icmp ult i64 %79, 4
%90 = select i1 %88, i1 %89, i1 false
br i1 %90, label %78, label %91
91: ; preds = %78
%92 = call i32 @dd_inc(double* %72, double* %76)
%93 = call i32 @dd_mul_pwr2(double* %72, double 2.000000e+00, double* %70)
%94 = call i32 @dd_sqr(double* %72, double* %76)
%95 = call i32 @dd_add(double* %70, double* %76, double* %72)
%96 = call i32 @dd_mul_pwr2(double* %72, double 2.000000e+00, double* %70)
%97 = call i32 @dd_sqr(double* %72, double* %76)
%98 = call i32 @dd_add(double* %70, double* %76, double* %72)
%99 = call i32 @dd_mul_pwr2(double* %72, double 2.000000e+00, double* %70)
%100 = call i32 @dd_sqr(double* %72, double* %76)
%101 = call i32 @dd_add(double* %70, double* %76, double* %72)
%102 = call i32 @dd_mul_pwr2(double* %72, double 2.000000e+00, double* %70)
%103 = call i32 @dd_sqr(double* %72, double* %76)
%104 = call i32 @dd_add(double* %70, double* %76, double* %72)
%105 = call i32 @dd_mul_pwr2(double* %72, double 2.000000e+00, double* %70)
%106 = call i32 @dd_sqr(double* %72, double* %76)
%107 = call i32 @dd_add(double* %70, double* %76, double* %72)
%108 = call i32 @dd_mul_pwr2(double* %72, double 2.000000e+00, double* %70)
%109 = call i32 @dd_sqr(double* %72, double* %76)
%110 = call i32 @dd_add(double* %70, double* %76, double* %72)
%111 = call i32 @dd_mul_pwr2(double* %72, double 2.000000e+00, double* %70)
%112 = call i32 @dd_sqr(double* %72, double* %76)
%113 = call i32 @dd_add(double* %70, double* %76, double* %72)
%114 = call i32 @dd_mul_pwr2(double* %72, double 2.000000e+00, double* %70)
%115 = call i32 @dd_sqr(double* %72, double* %76)
%116 = call i32 @dd_add(double* %70, double* %76, double* %72)
%117 = call i32 @dd_mul_pwr2(double* %72, double 2.000000e+00, double* %70)
%118 = call i32 @dd_sqr(double* %72, double* %76)
%119 = call i32 @dd_add(double* %70, double* %76, double* %72)
%120 = call i32 @dd_add_dd_d(double* %72, double 1.000000e+00, double* %1)
%121 = fptosi double %65 to i32
%122 = call i32 @dd_ldexp(double* %1, i32 %121)
br label %123
123: ; preds = %91, %59, %54, %49, %45
ret void
}