void R_revPBE_Exchange(rho, Vx, Ex, Px) double rho[], Vx[], *Ex, *Px;
{
  int i;
  double mu, kappa;
  double onethird, fourthird, twothird;
  double pi;
  double n;
  double n_onethird;
  double ex_p;
  double ux_p;
  double s, F, Fs, Fss, kf, P0;
  double u, v;
  double agr, lap, delgr;
  int Ngrid;
  double *ex_functional;
  double *tmp;
  double *drho;
  double *ddrho;
  double *dadrho;
  double *rgrid;
  mu = 0.2195149727645171;
  kappa = 1.2450000000000000;
  pi = 4.0 * atan(1.0);
  onethird = 1.0 / 3.0;
  fourthird = 4.0 / 3.0;
  twothird = 2.0 / 3.0;
  Ngrid = N_LogGrid();
  rgrid = r_LogGrid();
  ex_functional = alloc_LogGrid();
  tmp = alloc_LogGrid();
  drho = alloc_LogGrid();
  ddrho = alloc_LogGrid();
  dadrho = alloc_LogGrid();
  for (i = 0; i < Ngrid; ++i)
    tmp[i] = rho[i] / (4.0 * pi);
  Derivative_LogGrid(tmp, drho);
  Derivative_LogGrid(drho, ddrho);
  for (i = 0; i < Ngrid; ++i)
    tmp[i] = fabs(drho[i]);
  Derivative_LogGrid(tmp, dadrho);
  for (i = 0; i < Ngrid; ++i) {
    n = rho[i] / (4.0 * pi);
    if (n > 1.0e-18) {
      agr = fabs(drho[i]);
      delgr = drho[i] * dadrho[i];
      lap = ddrho[i] + (2.0 / rgrid[i]) * drho[i];
      n_onethird = pow((3.0 * n / pi), onethird);
      kf = pow((3.0 * pi * pi * n), onethird);
      s = agr / (2.0 * kf * n);
      u = delgr / (n * n * (8.0 * kf * kf * kf));
      v = lap / (n * (4.0 * kf * kf));
      P0 = 1.0 + (mu / kappa) * s * s;
      F = (1.0 + kappa - kappa / P0);
      Fs = 2.0 * mu / (P0 * P0);
      Fss = -4.0 * (mu / kappa) * s * Fs / P0;
      ex_p = -(3.0 / 4.0) * n_onethird * F;
      ux_p = -(3.0 / 4.0) * n_onethird *
             (fourthird * F - v * Fs - (u - fourthird * s * s * s) * Fss);
      ex_functional[i] = ex_p;
      Vx[i] = ux_p;
    } else {
      ex_functional[i] = 0.0;
      Vx[i] = 0.0;
    }
  }
  for (i = 0; i < Ngrid; ++i)
    tmp[i] = (rho[i]) * ex_functional[i];
  *Ex = Integrate_LogGrid(tmp);
  for (i = 0; i < Ngrid; ++i)
    tmp[i] = (rho[i]) * Vx[i];
  *Px = Integrate_LogGrid(tmp);
  dealloc_LogGrid(ex_functional);
  dealloc_LogGrid(tmp);
  dealloc_LogGrid(drho);
  dealloc_LogGrid(ddrho);
  dealloc_LogGrid(dadrho);
}


x86 assembly (clang, -O0):
<R_revPBE_Exchange>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movsd  0xe8d(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xe78(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xe63(%rip),%xmm0
call   1040 <atan@plt>
movaps %xmm0,%xmm1
movsd  0xe4b(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xe32(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xe1d(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xe08(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    $0x0,%al
call   10a0 <N_LogGrid@plt>
mov    %eax,-0xd4(%rbp)
mov    $0x0,%al
call   1050 <r_LogGrid@plt>
cltq
mov    %rax,-0x108(%rbp)
mov    $0x0,%al
call   1090 <alloc_LogGrid@plt>
cltq
mov    %rax,-0xe0(%rbp)
mov    $0x0,%al
call   1090 <alloc_LogGrid@plt>
cltq
mov    %rax,-0xe8(%rbp)
mov    $0x0,%al
call   1090 <alloc_LogGrid@plt>
cltq
mov    %rax,-0xf0(%rbp)
mov    $0x0,%al
call   1090 <alloc_LogGrid@plt>
cltq
mov    %rax,-0xf8(%rbp)
mov    $0x0,%al
call   1090 <alloc_LogGrid@plt>
cltq
mov    %rax,-0x100(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0xd4(%rbp),%eax
jge    12bc <R_revPBE_Exchange+0x13c>
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  0xd83(%rip),%xmm1
mulsd  -0x58(%rbp),%xmm1
divsd  %xmm1,%xmm0
mov    -0xe8(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1271 <R_revPBE_Exchange+0xf1>
mov    -0xe8(%rbp),%rdi
mov    -0xf0(%rbp),%rsi
mov    $0x0,%al
call   1030 <Derivative_LogGrid@plt>
mov    -0xf0(%rbp),%rdi
mov    -0xf8(%rbp),%rsi
mov    $0x0,%al
call   1030 <Derivative_LogGrid@plt>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0xd4(%rbp),%eax
jge    1335 <R_revPBE_Exchange+0x1b5>
mov    -0xf0(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xd5d(%rip),%xmm1
pand   %xmm1,%xmm0
mov    -0xe8(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    12ed <R_revPBE_Exchange+0x16d>
mov    -0xe8(%rbp),%rdi
mov    -0x100(%rbp),%rsi
mov    $0x0,%al
call   1030 <Derivative_LogGrid@plt>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0xd4(%rbp),%eax
jge    16f2 <R_revPBE_Exchange+0x572>
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  0xca3(%rip),%xmm1
mulsd  -0x58(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  0xca8(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    16bc <R_revPBE_Exchange+0x53c>
mov    -0xf0(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xcbf(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
mov    -0xf0(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x100(%rbp),%rax
movslq -0x24(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
mov    -0xf8(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x108(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  0xc48(%rip),%xmm0
divsd  (%rax,%rcx,8),%xmm0
mov    -0xf0(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  0xc2b(%rip),%xmm0
mulsd  -0x60(%rbp),%xmm0
divsd  -0x58(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
call   1070 <pow@plt>
movsd  %xmm0,-0x68(%rbp)
movsd  0xc0a(%rip),%xmm0
mulsd  -0x58(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
call   1070 <pow@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
movsd  0xbc9(%rip),%xmm1
mulsd  -0xa0(%rbp),%xmm1
ff
mulsd  -0x60(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0xd0(%rbp),%xmm0
ff
movsd  -0x60(%rbp),%xmm1
mulsd  -0x60(%rbp),%xmm1
movsd  0xba1(%rip),%xmm2
mulsd  -0xa0(%rbp),%xmm2
ff
mulsd  -0xa0(%rbp),%xmm2
ff
mulsd  -0xa0(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
movsd  -0x60(%rbp),%xmm1
movsd  0xb24(%rip),%xmm2
mulsd  -0xa0(%rbp),%xmm2
ff
mulsd  -0xa0(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
divsd  -0x38(%rbp),%xmm0
mulsd  -0x80(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xaec(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  0xad8(%rip),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
divsd  -0xa8(%rbp),%xmm1
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xae2(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  -0xa8(%rbp),%xmm1
ff
mulsd  -0xa8(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x30(%rbp),%xmm1
divsd  -0x38(%rbp),%xmm1
movsd  0xaa7(%rip),%xmm0
mulsd  %xmm1,%xmm0
mulsd  -0x80(%rbp),%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
divsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
movsd  0xa76(%rip),%xmm0
mulsd  -0x68(%rbp),%xmm0
mulsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x70(%rbp)
movsd  0xa5c(%rip),%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm3
ff
movsd  -0xb8(%rbp),%xmm1
ff
mulsd  -0x90(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  -0xb0(%rbp),%xmm3
ff
movsd  -0x48(%rbp),%xmm1
mulsd  -0x80(%rbp),%xmm1
mulsd  -0x80(%rbp),%xmm1
movsd  -0x80(%rbp),%xmm4
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm4,%xmm1
addsd  %xmm3,%xmm1
movsd  -0x98(%rbp),%xmm3
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x70(%rbp),%xmm0
mov    -0xe0(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x78(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    16df <R_revPBE_Exchange+0x55f>
mov    -0xe0(%rbp),%rax
movslq -0x24(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    16e4 <R_revPBE_Exchange+0x564>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1351 <R_revPBE_Exchange+0x1d1>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0xd4(%rbp),%eax
jge    1743 <R_revPBE_Exchange+0x5c3>
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0xe0(%rbp),%rax
movslq -0x24(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0xe8(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    16f9 <R_revPBE_Exchange+0x579>
mov    -0xe8(%rbp),%rdi
mov    $0x0,%al
call   1060 <Integrate_LogGrid@plt>
cvtsi2sd %eax,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0xd4(%rbp),%eax
jge    17ab <R_revPBE_Exchange+0x62b>
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0xe8(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1764 <R_revPBE_Exchange+0x5e4>
mov    -0xe8(%rbp),%rdi
mov    $0x0,%al
call   1060 <Integrate_LogGrid@plt>
cvtsi2sd %eax,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0xe0(%rbp),%rdi
mov    $0x0,%al
call   1080 <dealloc_LogGrid@plt>
mov    -0xe8(%rbp),%rdi
mov    $0x0,%al
call   1080 <dealloc_LogGrid@plt>
mov    -0xf0(%rbp),%rdi
mov    $0x0,%al
call   1080 <dealloc_LogGrid@plt>
mov    -0xf8(%rbp),%rdi
mov    $0x0,%al
call   1080 <dealloc_LogGrid@plt>
mov    -0x100(%rbp),%rdi
mov    $0x0,%al
call   1080 <dealloc_LogGrid@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<R_revPBE_Exchange>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %rcx,0x8(%rsp)
mov    %rdx,0x28(%rsp)
mov    %rsi,0x18(%rsp)
mov    %rdi,%r13
movsd  0xe55(%rip),%xmm0
call   1040 <atan@plt>
xor    %eax,%eax
call   10a0 <N_LogGrid@plt>
mov    %eax,%r14d
xor    %eax,%eax
call   1050 <r_LogGrid@plt>
mov    %eax,0x30(%rsp)
xor    %eax,%eax
call   1090 <alloc_LogGrid@plt>
movslq %eax,%r15
xor    %eax,%eax
call   1090 <alloc_LogGrid@plt>
movslq %eax,%rbx
xor    %eax,%eax
call   1090 <alloc_LogGrid@plt>
movslq %eax,%r12
xor    %eax,%eax
call   1090 <alloc_LogGrid@plt>
movslq %eax,%rbp
xor    %eax,%eax
call   1090 <alloc_LogGrid@plt>
cltq
mov    %rax,0x10(%rsp)
test   %r14d,%r14d
mov    %rbp,0x20(%rsp)
jle    12af <R_revPBE_Exchange+0x12f>
mov    %r14d,%ebp
cmp    $0x1,%r14d
mov    %r14d,0x4(%rsp)
je     1238 <R_revPBE_Exchange+0xb8>
lea    0x0(,%rbp,8),%rax
add    %r13,%rax
cmp    %rax,%rbx
jae    12d3 <R_revPBE_Exchange+0x153>
lea    (%rbx,%rbp,8),%rax
cmp    %r13,%rax
jbe    12d3 <R_revPBE_Exchange+0x153>
xor    %eax,%eax
mov    0x8(%rsp),%r14
mov    %rax,%rcx
not    %rcx
test   $0x1,%bpl
je     1263 <R_revPBE_Exchange+0xe3>
movsd  0x0(%r13,%rax,8),%xmm0
divsd  0xdae(%rip),%xmm0
movsd  %xmm0,(%rbx,%rax,8)
or     $0x1,%rax
add    %rbp,%rcx
je     1356 <R_revPBE_Exchange+0x1d6>
movsd  0xd94(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  0x0(%r13,%rax,8),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%rbx,%rax,8)
movsd  0x8(%r13,%rax,8),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rbx,%rax,8)
add    $0x2,%rax
cmp    %rax,%rbp
jne    1280 <R_revPBE_Exchange+0x100>
jmp    1356 <R_revPBE_Exchange+0x1d6>
mov    %rbx,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1030 <Derivative_LogGrid@plt>
mov    %r12,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1030 <Derivative_LogGrid@plt>
mov    0x8(%rsp),%r14
jmp    1440 <R_revPBE_Exchange+0x2c0>
mov    %ebp,%eax
and    $0xfffffffe,%eax
lea    -0x2(%rax),%rdx
mov    %rdx,%rcx
shr    %rcx
add    $0x1,%rcx
test   %rdx,%rdx
je     132d <R_revPBE_Exchange+0x1ad>
mov    %rcx,%rsi
and    $0xfffffffffffffffe,%rsi
xor    %edx,%edx
movapd 0xd94(%rip),%xmm0
nopl   0x0(%rax)
movupd 0x0(%r13,%rdx,8),%xmm1
divpd  %xmm0,%xmm1
movupd %xmm1,(%rbx,%rdx,8)
movupd 0x10(%r13,%rdx,8),%xmm1
divpd  %xmm0,%xmm1
movupd %xmm1,0x10(%rbx,%rdx,8)
add    $0x4,%rdx
add    $0xfffffffffffffffe,%rsi
jne    1300 <R_revPBE_Exchange+0x180>
jmp    132f <R_revPBE_Exchange+0x1af>
xor    %edx,%edx
test   $0x1,%cl
mov    0x8(%rsp),%r14
je     134d <R_revPBE_Exchange+0x1cd>
movupd 0x0(%r13,%rdx,8),%xmm0
divpd  0xd48(%rip),%xmm0
movupd %xmm0,(%rbx,%rdx,8)
cmp    %rbp,%rax
jne    123f <R_revPBE_Exchange+0xbf>
mov    %rbx,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1030 <Derivative_LogGrid@plt>
mov    %r12,%rdi
mov    0x20(%rsp),%rsi
xor    %eax,%eax
call   1030 <Derivative_LogGrid@plt>
mov    0x4(%rsp),%eax
test   %eax,%eax
jle    1440 <R_revPBE_Exchange+0x2c0>
cmp    $0x4,%eax
jb     139d <R_revPBE_Exchange+0x21d>
lea    (%r12,%rbp,8),%rax
cmp    %rax,%rbx
jae    14c6 <R_revPBE_Exchange+0x346>
lea    (%rbx,%rbp,8),%rax
cmp    %rax,%r12
jae    14c6 <R_revPBE_Exchange+0x346>
xor    %eax,%eax
mov    %rax,%rcx
not    %rcx
add    %rbp,%rcx
mov    %rbp,%rdx
and    $0x3,%rdx
je     13d9 <R_revPBE_Exchange+0x259>
movapd 0xce7(%rip),%xmm0
nopl   0x0(%rax)
movsd  (%r12,%rax,8),%xmm1
andpd  %xmm0,%xmm1
movlpd %xmm1,(%rbx,%rax,8)
add    $0x1,%rax
add    $0xffffffffffffffff,%rdx
jne    13c0 <R_revPBE_Exchange+0x240>
cmp    $0x3,%rcx
jb     1582 <R_revPBE_Exchange+0x402>
movapd 0xcb5(%rip),%xmm0
nopl   0x0(%rax,%rax,1)
movsd  (%r12,%rax,8),%xmm1
andpd  %xmm0,%xmm1
movlpd %xmm1,(%rbx,%rax,8)
movsd  0x8(%r12,%rax,8),%xmm1
andpd  %xmm0,%xmm1
movlpd %xmm1,0x8(%rbx,%rax,8)
movsd  0x10(%r12,%rax,8),%xmm1
andpd  %xmm0,%xmm1
movlpd %xmm1,0x10(%rbx,%rax,8)
movsd  0x18(%r12,%rax,8),%xmm1
andpd  %xmm0,%xmm1
movlpd %xmm1,0x18(%rbx,%rax,8)
add    $0x4,%rax
cmp    %rax,%rbp
jne    13f0 <R_revPBE_Exchange+0x270>
jmp    1582 <R_revPBE_Exchange+0x402>
mov    %rbx,%rdi
mov    0x10(%rsp),%rsi
xor    %eax,%eax
call   1030 <Derivative_LogGrid@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <Integrate_LogGrid@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mov    0x28(%rsp),%rax
movsd  %xmm0,(%rax)
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <Integrate_LogGrid@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%r14)
mov    %r15,%rdi
xor    %eax,%eax
call   1080 <dealloc_LogGrid@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <dealloc_LogGrid@plt>
mov    %r12,%rdi
xor    %eax,%eax
call   1080 <dealloc_LogGrid@plt>
mov    0x20(%rsp),%rdi
xor    %eax,%eax
call   1080 <dealloc_LogGrid@plt>
mov    0x10(%rsp),%rdi
xor    %eax,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1080 <dealloc_LogGrid@plt>
mov    %ebp,%eax
and    $0xfffffffc,%eax
lea    -0x4(%rax),%rcx
mov    %rcx,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
test   %rcx,%rcx
je     18aa <R_revPBE_Exchange+0x72a>
mov    %rdx,%rsi
and    $0xfffffffffffffffe,%rsi
xor    %ecx,%ecx
movapd 0xbac(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movupd (%r12,%rcx,8),%xmm1
movupd 0x10(%r12,%rcx,8),%xmm2
andpd  %xmm0,%xmm1
andpd  %xmm0,%xmm2
movupd %xmm1,(%rbx,%rcx,8)
movupd %xmm2,0x10(%rbx,%rcx,8)
movupd 0x20(%r12,%rcx,8),%xmm1
movupd 0x30(%r12,%rcx,8),%xmm2
andpd  %xmm0,%xmm1
andpd  %xmm0,%xmm2
movupd %xmm1,0x20(%rbx,%rcx,8)
movupd %xmm2,0x30(%rbx,%rcx,8)
add    $0x8,%rcx
add    $0xfffffffffffffffe,%rsi
jne    1500 <R_revPBE_Exchange+0x380>
test   $0x1,%dl
je     1579 <R_revPBE_Exchange+0x3f9>
movupd (%r12,%rcx,8),%xmm0
movupd 0x10(%r12,%rcx,8),%xmm1
movapd 0xb3a(%rip),%xmm2
andpd  %xmm2,%xmm0
andpd  %xmm2,%xmm1
movupd %xmm0,(%rbx,%rcx,8)
movupd %xmm1,0x10(%rbx,%rcx,8)
cmp    %rbp,%rax
jne    139f <R_revPBE_Exchange+0x21f>
mov    %rbx,%rdi
mov    0x10(%rsp),%rsi
xor    %eax,%eax
call   1030 <Derivative_LogGrid@plt>
cmpl   $0x0,0x4(%rsp)
mov    0x18(%rsp),%rax
jle    144f <R_revPBE_Exchange+0x2cf>
movslq 0x30(%rsp),%rcx
mov    %rcx,0x48(%rsp)
xor    %r14d,%r14d
movsd  0xa52(%rip),%xmm0
movsd  0xa52(%rip),%xmm3
jmp    15d9 <R_revPBE_Exchange+0x459>
movsd  %xmm1,(%r15,%r14,8)
movsd  %xmm2,(%rax,%r14,8)
add    $0x1,%r14
cmp    %r14,%rbp
je     17b4 <R_revPBE_Exchange+0x634>
movsd  0x0(%r13,%r14,8),%xmm4
divsd  %xmm0,%xmm4
xorpd  %xmm1,%xmm1
ucomisd %xmm3,%xmm4
xorpd  %xmm2,%xmm2
jbe    15c0 <R_revPBE_Exchange+0x440>
movsd  (%r12,%r14,8),%xmm0
mov    0x10(%rsp),%rax
movsd  (%rax,%r14,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x50(%rsp)
movsd  0xa03(%rip),%xmm1
mov    0x48(%rsp),%rax
divsd  (%rax,%r14,8),%xmm1
mulsd  %xmm0,%xmm1
andpd  0xa74(%rip),%xmm0
movapd %xmm0,0x60(%rsp)
mov    0x20(%rsp),%rax
addsd  (%rax,%r14,8),%xmm1
xorpd  0xa6b(%rip),%xmm1
shufpd $0x2,0xa72(%rip),%xmm1
movapd %xmm1,0x70(%rsp)
movapd %xmm4,%xmm0
mulsd  0x9c0(%rip),%xmm0
divsd  0x9c0(%rip),%xmm0
movsd  0x9c0(%rip),%xmm1
movapd %xmm4,0x30(%rsp)
call   1070 <pow@plt>
movsd  %xmm0,0x58(%rsp)
movapd 0x30(%rsp),%xmm0
mulsd  0x9a9(%rip),%xmm0
movsd  0x999(%rip),%xmm1
call   1070 <pow@plt>
mov    0x18(%rsp),%rax
movapd %xmm0,%xmm1
mulsd  0x993(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm0,%xmm2
mulsd  0x987(%rip),%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm0,%xmm0
movapd 0x30(%rsp),%xmm3
mulsd  %xmm3,%xmm0
movapd 0x60(%rsp),%xmm5
divsd  %xmm0,%xmm5
movapd %xmm3,%xmm0
mulsd  %xmm3,%xmm0
mulsd  %xmm0,%xmm1
movsd  0x50(%rsp),%xmm4
divsd  %xmm1,%xmm4
movapd %xmm5,%xmm1
mulsd  0x951(%rip),%xmm1
mulsd  %xmm5,%xmm1
addsd  0x8f5(%rip),%xmm1
movsd  0x945(%rip),%xmm0
divsd  %xmm1,%xmm0
unpcklpd %xmm1,%xmm3
unpcklpd %xmm1,%xmm2
mulpd  %xmm3,%xmm2
movapd 0x70(%rsp),%xmm6
divpd  %xmm2,%xmm6
movapd %xmm5,%xmm3
mulsd  0x92f(%rip),%xmm3
movapd %xmm6,%xmm2
movapd %xmm6,%xmm7
unpckhpd %xmm6,%xmm2
mulsd  %xmm2,%xmm3
divsd  %xmm1,%xmm3
addsd  0x90b(%rip),%xmm0
movsd  0x58(%rsp),%xmm6
mulsd  0x90d(%rip),%xmm6
mulsd  %xmm7,%xmm2
movapd %xmm6,%xmm1
mulsd  %xmm0,%xmm1
mulsd  0x901(%rip),%xmm0
addsd  %xmm2,%xmm0
movapd %xmm5,%xmm2
mulsd  0x8f9(%rip),%xmm2
mulsd  %xmm5,%xmm2
mulsd  %xmm5,%xmm2
addsd  %xmm4,%xmm2
mulsd  %xmm3,%xmm2
movsd  0x871(%rip),%xmm3
addsd  %xmm0,%xmm2
movsd  0x85d(%rip),%xmm0
mulsd  %xmm6,%xmm2
jmp    15c0 <R_revPBE_Exchange+0x440>
mov    0x4(%rsp),%eax
test   %eax,%eax
mov    0x8(%rsp),%r14
jle    144f <R_revPBE_Exchange+0x2cf>
cmp    $0x4,%eax
jae    17d1 <R_revPBE_Exchange+0x651>
xor    %eax,%eax
jmp    18f8 <R_revPBE_Exchange+0x778>
lea    (%rbx,%rbp,8),%rax
lea    0x0(,%rbp,8),%rcx
add    %r13,%rcx
lea    (%r15,%rbp,8),%rdx
cmp    %rcx,%rbx
setb   %sil
cmp    %r13,%rax
seta   %dil
cmp    %rdx,%rbx
setb   %cl
cmp    %rax,%r15
setb   %dl
xor    %eax,%eax
test   %dil,%sil
jne    18f8 <R_revPBE_Exchange+0x778>
and    %dl,%cl
jne    18f8 <R_revPBE_Exchange+0x778>
mov    %ebp,%eax
and    $0xfffffffc,%eax
lea    -0x4(%rax),%rcx
mov    %rcx,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
test   %rcx,%rcx
je     18ba <R_revPBE_Exchange+0x73a>
mov    %rdx,%rsi
and    $0xfffffffffffffffe,%rsi
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
movupd 0x0(%r13,%rcx,8),%xmm0
movupd 0x10(%r13,%rcx,8),%xmm1
movupd (%r15,%rcx,8),%xmm2
mulpd  %xmm0,%xmm2
movupd 0x10(%r15,%rcx,8),%xmm0
mulpd  %xmm1,%xmm0
movupd %xmm2,(%rbx,%rcx,8)
movupd %xmm0,0x10(%rbx,%rcx,8)
movupd 0x20(%r13,%rcx,8),%xmm0
movupd 0x30(%r13,%rcx,8),%xmm1
movupd 0x20(%r15,%rcx,8),%xmm2
mulpd  %xmm0,%xmm2
movupd 0x30(%r15,%rcx,8),%xmm0
mulpd  %xmm1,%xmm0
movupd %xmm2,0x20(%rbx,%rcx,8)
movupd %xmm0,0x30(%rbx,%rcx,8)
add    $0x8,%rcx
add    $0xfffffffffffffffe,%rsi
jne    1840 <R_revPBE_Exchange+0x6c0>
jmp    18bc <R_revPBE_Exchange+0x73c>
xor    %ecx,%ecx
test   $0x1,%dl
jne    1551 <R_revPBE_Exchange+0x3d1>
jmp    1579 <R_revPBE_Exchange+0x3f9>
xor    %ecx,%ecx
test   $0x1,%dl
je     18ef <R_revPBE_Exchange+0x76f>
movupd 0x0(%r13,%rcx,8),%xmm0
movupd 0x10(%r13,%rcx,8),%xmm1
movupd (%r15,%rcx,8),%xmm2
mulpd  %xmm0,%xmm2
movupd 0x10(%r15,%rcx,8),%xmm0
mulpd  %xmm1,%xmm0
movupd %xmm2,(%rbx,%rcx,8)
movupd %xmm0,0x10(%rbx,%rcx,8)
cmp    %rbp,%rax
je     1997 <R_revPBE_Exchange+0x817>
mov    %rax,%rcx
not    %rcx
add    %rbp,%rcx
mov    %rbp,%rdx
and    $0x3,%rdx
je     192c <R_revPBE_Exchange+0x7ac>
nopw   0x0(%rax,%rax,1)
movsd  0x0(%r13,%rax,8),%xmm0
mulsd  (%r15,%rax,8),%xmm0
movsd  %xmm0,(%rbx,%rax,8)
add    $0x1,%rax
add    $0xffffffffffffffff,%rdx
jne    1910 <R_revPBE_Exchange+0x790>
cmp    $0x3,%rcx
jb     1997 <R_revPBE_Exchange+0x817>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  0x0(%r13,%rax,8),%xmm0
mulsd  (%r15,%rax,8),%xmm0
movsd  %xmm0,(%rbx,%rax,8)
movsd  0x8(%r13,%rax,8),%xmm0
mulsd  0x8(%r15,%rax,8),%xmm0
movsd  %xmm0,0x8(%rbx,%rax,8)
movsd  0x10(%r13,%rax,8),%xmm0
mulsd  0x10(%r15,%rax,8),%xmm0
movsd  %xmm0,0x10(%rbx,%rax,8)
movsd  0x18(%r13,%rax,8),%xmm0
mulsd  0x18(%r15,%rax,8),%xmm0
movsd  %xmm0,0x18(%rbx,%rax,8)
add    $0x4,%rax
cmp    %rax,%rbp
jne    1940 <R_revPBE_Exchange+0x7c0>
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <Integrate_LogGrid@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mov    0x28(%rsp),%rax
movsd  %xmm0,(%rax)
mov    0x4(%rsp),%eax
test   %eax,%eax
mov    0x18(%rsp),%rdi
jle    1469 <R_revPBE_Exchange+0x2e9>
cmp    $0x4,%eax
jae    1a68 <R_revPBE_Exchange+0x8e8>
xor    %eax,%eax
mov    %rax,%rcx
not    %rcx
add    %rbp,%rcx
mov    %rbp,%rdx
and    $0x3,%rdx
je     19fb <R_revPBE_Exchange+0x87b>
nop
movsd  0x0(%r13,%rax,8),%xmm0
mulsd  (%rdi,%rax,8),%xmm0
movsd  %xmm0,(%rbx,%rax,8)
add    $0x1,%rax
add    $0xffffffffffffffff,%rdx
jne    19e0 <R_revPBE_Exchange+0x860>
cmp    $0x3,%rcx
jb     1469 <R_revPBE_Exchange+0x2e9>
cs nopw 0x0(%rax,%rax,1)
nop
movsd  0x0(%r13,%rax,8),%xmm0
mulsd  (%rdi,%rax,8),%xmm0
movsd  %xmm0,(%rbx,%rax,8)
movsd  0x8(%r13,%rax,8),%xmm0
mulsd  0x8(%rdi,%rax,8),%xmm0
movsd  %xmm0,0x8(%rbx,%rax,8)
movsd  0x10(%r13,%rax,8),%xmm0
mulsd  0x10(%rdi,%rax,8),%xmm0
movsd  %xmm0,0x10(%rbx,%rax,8)
movsd  0x18(%r13,%rax,8),%xmm0
mulsd  0x18(%rdi,%rax,8),%xmm0
movsd  %xmm0,0x18(%rbx,%rax,8)
add    $0x4,%rax
cmp    %rax,%rbp
jne    1a10 <R_revPBE_Exchange+0x890>
jmp    1469 <R_revPBE_Exchange+0x2e9>
lea    (%rbx,%rbp,8),%rax
lea    0x0(,%rbp,8),%rcx
add    %r13,%rcx
cmp    %rcx,%rbx
setb   %r8b
cmp    %r13,%rax
seta   %dl
lea    (%rdi,%rbp,8),%rcx
cmp    %rcx,%rbx
setb   %cl
cmp    %rdi,%rax
seta   %sil
xor    %eax,%eax
test   %dl,%r8b
jne    19cd <R_revPBE_Exchange+0x84d>
and    %sil,%cl
jne    19cd <R_revPBE_Exchange+0x84d>
mov    %ebp,%eax
and    $0xfffffffc,%eax
lea    -0x4(%rax),%rcx
mov    %rcx,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
test   %rcx,%rcx
je     1b36 <R_revPBE_Exchange+0x9b6>
mov    %rdx,%rsi
and    $0xfffffffffffffffe,%rsi
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
movupd 0x0(%r13,%rcx,8),%xmm0
movupd 0x10(%r13,%rcx,8),%xmm1
movupd (%rdi,%rcx,8),%xmm2
mulpd  %xmm0,%xmm2
movupd 0x10(%rdi,%rcx,8),%xmm0
mulpd  %xmm1,%xmm0
movupd %xmm2,(%rbx,%rcx,8)
movupd %xmm0,0x10(%rbx,%rcx,8)
movupd 0x20(%r13,%rcx,8),%xmm0
movupd 0x30(%r13,%rcx,8),%xmm1
movupd 0x20(%rdi,%rcx,8),%xmm2
mulpd  %xmm0,%xmm2
movupd 0x30(%rdi,%rcx,8),%xmm0
mulpd  %xmm1,%xmm0
movupd %xmm2,0x20(%rbx,%rcx,8)
movupd %xmm0,0x30(%rbx,%rcx,8)
add    $0x8,%rcx
add    $0xfffffffffffffffe,%rsi
jne    1ad0 <R_revPBE_Exchange+0x950>
jmp    1b38 <R_revPBE_Exchange+0x9b8>
xor    %ecx,%ecx
test   $0x1,%dl
je     1b69 <R_revPBE_Exchange+0x9e9>
movupd 0x0(%r13,%rcx,8),%xmm0
movupd 0x10(%r13,%rcx,8),%xmm1
movupd (%rdi,%rcx,8),%xmm2
mulpd  %xmm0,%xmm2
movupd 0x10(%rdi,%rcx,8),%xmm0
mulpd  %xmm1,%xmm0
movupd %xmm2,(%rbx,%rcx,8)
movupd %xmm0,0x10(%rbx,%rcx,8)
cmp    %rbp,%rax
je     1469 <R_revPBE_Exchange+0x2e9>
jmp    19cd <R_revPBE_Exchange+0x84d>

LLVM IR (-O0):
define void @R_revPBE_Exchange(double* %0, double* %1, double* %2, double* %3) {
%5 = alloca double*
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
%9 = alloca i32
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
%26 = alloca double
%27 = alloca double
%28 = alloca double
%29 = alloca double
%30 = alloca double
%31 = alloca i32
%32 = alloca double*
%33 = alloca double*
%34 = alloca double*
%35 = alloca double*
%36 = alloca double*
%37 = alloca double*
store double* %0, double** %5
store double* %1, double** %6
store double* %2, double** %7
store double* %3, double** %8
store double 0x3FCC19110E80C25E, double* %10
store double 1.245000e+00, double* %11
%38 = call double @atan(double 1.000000e+00)
%39 = fmul double 4.000000e+00, %38
store double %39, double* %15
store double 0x3FD5555555555555, double* %12
store double 0x3FF5555555555555, double* %13
store double 0x3FE5555555555555, double* %14
%40 = call i32 (...) @N_LogGrid()
store i32 %40, i32* %31
%41 = call i32 (...) @r_LogGrid()
%42 = sext i32 %41 to i64
%43 = inttoptr i64 %42 to double*
store double* %43, double** %37
%44 = call i32 (...) @alloc_LogGrid()
%45 = sext i32 %44 to i64
%46 = inttoptr i64 %45 to double*
store double* %46, double** %32
%47 = call i32 (...) @alloc_LogGrid()
%48 = sext i32 %47 to i64
%49 = inttoptr i64 %48 to double*
store double* %49, double** %33
%50 = call i32 (...) @alloc_LogGrid()
%51 = sext i32 %50 to i64
%52 = inttoptr i64 %51 to double*
store double* %52, double** %34
%53 = call i32 (...) @alloc_LogGrid()
%54 = sext i32 %53 to i64
%55 = inttoptr i64 %54 to double*
store double* %55, double** %35
%56 = call i32 (...) @alloc_LogGrid()
%57 = sext i32 %56 to i64
%58 = inttoptr i64 %57 to double*
store double* %58, double** %36
store i32 0, i32* %9
br label %59
59: ; preds = %76, %4
%60 = load i32, i32* %9
%61 = load i32, i32* %31
%62 = icmp slt i32 %60, %61
br i1 %62, label %63, label %79
63: ; preds = %59
%64 = load double*, double** %5
%65 = load i32, i32* %9
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds double, double* %64, i64 %66
%68 = load double, double* %67
%69 = load double, double* %15
%70 = fmul double 4.000000e+00, %69
%71 = fdiv double %68, %70
%72 = load double*, double** %33
%73 = load i32, i32* %9
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds double, double* %72, i64 %74
store double %71, double* %75
br label %76
76: ; preds = %63
%77 = load i32, i32* %9
%78 = add nsw i32 %77, 1
store i32 %78, i32* %9
br label %59
79: ; preds = %59
%80 = load double*, double** %33
%81 = load double*, double** %34
%82 = call i32 (double*, double*, ...) bitcast (i32 (...)* @Derivative_LogGrid to i32 (double*, double*, ...)*)(double* %80, double* %81)
%83 = load double*, double** %34
%84 = load double*, double** %35
%85 = call i32 (double*, double*, ...) bitcast (i32 (...)* @Derivative_LogGrid to i32 (double*, double*, ...)*)(double* %83, double* %84)
store i32 0, i32* %9
br label %86
86: ; preds = %101, %79
%87 = load i32, i32* %9
%88 = load i32, i32* %31
%89 = icmp slt i32 %87, %88
br i1 %89, label %90, label %104
90: ; preds = %86
%91 = load double*, double** %34
%92 = load i32, i32* %9
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds double, double* %91, i64 %93
%95 = load double, double* %94
%96 = call double @llvm.fabs.f64(double %95)
%97 = load double*, double** %33
%98 = load i32, i32* %9
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds double, double* %97, i64 %99
store double %96, double* %100
br label %101
101: ; preds = %90
%102 = load i32, i32* %9
%103 = add nsw i32 %102, 1
store i32 %103, i32* %9
br label %86
104: ; preds = %86
%105 = load double*, double** %33
%106 = load double*, double** %36
%107 = call i32 (double*, double*, ...) bitcast (i32 (...)* @Derivative_LogGrid to i32 (double*, double*, ...)*)(double* %105, double* %106)
store i32 0, i32* %9
br label %108
108: ; preds = %273, %104
%109 = load i32, i32* %9
%110 = load i32, i32* %31
%111 = icmp slt i32 %109, %110
br i1 %111, label %112, label %276
112: ; preds = %108
%113 = load double*, double** %5
%114 = load i32, i32* %9
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds double, double* %113, i64 %115
%117 = load double, double* %116
%118 = load double, double* %15
%119 = fmul double 4.000000e+00, %118
%120 = fdiv double %117, %119
store double %120, double* %16
%121 = load double, double* %16
%122 = fcmp ogt double %121, 1.000000e-18
br i1 %122, label %123, label %263
123: ; preds = %112
%124 = load double*, double** %34
%125 = load i32, i32* %9
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds double, double* %124, i64 %126
%128 = load double, double* %127
%129 = call double @llvm.fabs.f64(double %128)
store double %129, double* %28
%130 = load double*, double** %34
%131 = load i32, i32* %9
%132 = sext i32 %131 to i64
%133 = getelementptr inbounds double, double* %130, i64 %132
%134 = load double, double* %133
%135 = load double*, double** %36
%136 = load i32, i32* %9
%137 = sext i32 %136 to i64
%138 = getelementptr inbounds double, double* %135, i64 %137
%139 = load double, double* %138
%140 = fmul double %134, %139
store double %140, double* %30
%141 = load double*, double** %35
%142 = load i32, i32* %9
%143 = sext i32 %142 to i64
%144 = getelementptr inbounds double, double* %141, i64 %143
%145 = load double, double* %144
%146 = load double*, double** %37
%147 = load i32, i32* %9
%148 = sext i32 %147 to i64
%149 = getelementptr inbounds double, double* %146, i64 %148
%150 = load double, double* %149
%151 = fdiv double 2.000000e+00, %150
%152 = load double*, double** %34
%153 = load i32, i32* %9
%154 = sext i32 %153 to i64
%155 = getelementptr inbounds double, double* %152, i64 %154
%156 = load double, double* %155
%157 = call double @llvm.fmuladd.f64(double %151, double %156, double %145)
store double %157, double* %29
%158 = load double, double* %16
%159 = fmul double 3.000000e+00, %158
%160 = load double, double* %15
%161 = fdiv double %159, %160
%162 = load double, double* %12
%163 = call double @pow(double %161, double %162)
store double %163, double* %17
%164 = load double, double* %15
%165 = fmul double 3.000000e+00, %164
%166 = load double, double* %15
%167 = fmul double %165, %166
%168 = load double, double* %16
%169 = fmul double %167, %168
%170 = load double, double* %12
%171 = call double @pow(double %169, double %170)
store double %171, double* %24
%172 = load double, double* %28
%173 = load double, double* %24
%174 = fmul double 2.000000e+00, %173
%175 = load double, double* %16
%176 = fmul double %174, %175
%177 = fdiv double %172, %176
store double %177, double* %20
%178 = load double, double* %30
%179 = load double, double* %16
%180 = load double, double* %16
%181 = fmul double %179, %180
%182 = load double, double* %24
%183 = fmul double 8.000000e+00, %182
%184 = load double, double* %24
%185 = fmul double %183, %184
%186 = load double, double* %24
%187 = fmul double %185, %186
%188 = fmul double %181, %187
%189 = fdiv double %178, %188
store double %189, double* %26
%190 = load double, double* %29
%191 = load double, double* %16
%192 = load double, double* %24
%193 = fmul double 4.000000e+00, %192
%194 = load double, double* %24
%195 = fmul double %193, %194
%196 = fmul double %191, %195
%197 = fdiv double %190, %196
store double %197, double* %27
%198 = load double, double* %10
%199 = load double, double* %11
%200 = fdiv double %198, %199
%201 = load double, double* %20
%202 = fmul double %200, %201
%203 = load double, double* %20
%204 = call double @llvm.fmuladd.f64(double %202, double %203, double 1.000000e+00)
store double %204, double* %25
%205 = load double, double* %11
%206 = fadd double 1.000000e+00, %205
%207 = load double, double* %11
%208 = load double, double* %25
%209 = fdiv double %207, %208
%210 = fsub double %206, %209
store double %210, double* %21
%211 = load double, double* %10
%212 = fmul double 2.000000e+00, %211
%213 = load double, double* %25
%214 = load double, double* %25
%215 = fmul double %213, %214
%216 = fdiv double %212, %215
store double %216, double* %22
%217 = load double, double* %10
%218 = load double, double* %11
%219 = fdiv double %217, %218
%220 = fmul double -4.000000e+00, %219
%221 = load double, double* %20
%222 = fmul double %220, %221
%223 = load double, double* %22
%224 = fmul double %222, %223
%225 = load double, double* %25
%226 = fdiv double %224, %225
store double %226, double* %23
%227 = load double, double* %17
%228 = fmul double -7.500000e-01, %227
%229 = load double, double* %21
%230 = fmul double %228, %229
store double %230, double* %18
%231 = load double, double* %17
%232 = fmul double -7.500000e-01, %231
%233 = load double, double* %13
%234 = load double, double* %21
%235 = load double, double* %27
%236 = load double, double* %22
%237 = fmul double %235, %236
%238 = fneg double %237
%239 = call double @llvm.fmuladd.f64(double %233, double %234, double %238)
%240 = load double, double* %26
%241 = load double, double* %13
%242 = load double, double* %20
%243 = fmul double %241, %242
%244 = load double, double* %20
%245 = fmul double %243, %244
%246 = load double, double* %20
%247 = fneg double %245
%248 = call double @llvm.fmuladd.f64(double %247, double %246, double %240)
%249 = load double, double* %23
%250 = fneg double %248
%251 = call double @llvm.fmuladd.f64(double %250, double %249, double %239)
%252 = fmul double %232, %251
store double %252, double* %19
%253 = load double, double* %18
%254 = load double*, double** %32
%255 = load i32, i32* %9
%256 = sext i32 %255 to i64
%257 = getelementptr inbounds double, double* %254, i64 %256
store double %253, double* %257
%258 = load double, double* %19
%259 = load double*, double** %6
%260 = load i32, i32* %9
%261 = sext i32 %260 to i64
%262 = getelementptr inbounds double, double* %259, i64 %261
store double %258, double* %262
br label %272
263: ; preds = %112
%264 = load double*, double** %32
%265 = load i32, i32* %9
%266 = sext i32 %265 to i64
%267 = getelementptr inbounds double, double* %264, i64 %266
store double 0.000000e+00, double* %267
%268 = load double*, double** %6
%269 = load i32, i32* %9
%270 = sext i32 %269 to i64
%271 = getelementptr inbounds double, double* %268, i64 %270
store double 0.000000e+00, double* %271
br label %272
272: ; preds = %263, %123
br label %273
273: ; preds = %272
%274 = load i32, i32* %9
%275 = add nsw i32 %274, 1
store i32 %275, i32* %9
br label %108
276: ; preds = %108
store i32 0, i32* %9
br label %277
277: ; preds = %297, %276
%278 = load i32, i32* %9
%279 = load i32, i32* %31
%280 = icmp slt i32 %278, %279
br i1 %280, label %281, label %300
281: ; preds = %277
%282 = load double*, double** %5
%283 = load i32, i32* %9
%284 = sext i32 %283 to i64
%285 = getelementptr inbounds double, double* %282, i64 %284
%286 = load double, double* %285
%287 = load double*, double** %32
%288 = load i32, i32* %9
%289 = sext i32 %288 to i64
%290 = getelementptr inbounds double, double* %287, i64 %289
%291 = load double, double* %290
%292 = fmul double %286, %291
%293 = load double*, double** %33
%294 = load i32, i32* %9
%295 = sext i32 %294 to i64
%296 = getelementptr inbounds double, double* %293, i64 %295
store double %292, double* %296
br label %297
297: ; preds = %281
%298 = load i32, i32* %9
%299 = add nsw i32 %298, 1
store i32 %299, i32* %9
br label %277
300: ; preds = %277
%301 = load double*, double** %33
%302 = call i32 (double*, ...) bitcast (i32 (...)* @Integrate_LogGrid to i32 (double*, ...)*)(double* %301)
%303 = sitofp i32 %302 to double
%304 = load double*, double** %7
store double %303, double* %304
store i32 0, i32* %9
br label %305
305: ; preds = %325, %300
%306 = load i32, i32* %9
%307 = load i32, i32* %31
%308 = icmp slt i32 %306, %307
br i1 %308, label %309, label %328
309: ; preds = %305
%310 = load double*, double** %5
%311 = load i32, i32* %9
%312 = sext i32 %311 to i64
%313 = getelementptr inbounds double, double* %310, i64 %312
%314 = load double, double* %313
%315 = load double*, double** %6
%316 = load i32, i32* %9
%317 = sext i32 %316 to i64
%318 = getelementptr inbounds double, double* %315, i64 %317
%319 = load double, double* %318
%320 = fmul double %314, %319
%321 = load double*, double** %33
%322 = load i32, i32* %9
%323 = sext i32 %322 to i64
%324 = getelementptr inbounds double, double* %321, i64 %323
store double %320, double* %324
br label %325
325: ; preds = %309
%326 = load i32, i32* %9
%327 = add nsw i32 %326, 1
store i32 %327, i32* %9
br label %305
328: ; preds = %305
%329 = load double*, double** %33
%330 = call i32 (double*, ...) bitcast (i32 (...)* @Integrate_LogGrid to i32 (double*, ...)*)(double* %329)
%331 = sitofp i32 %330 to double
%332 = load double*, double** %8
store double %331, double* %332
%333 = load double*, double** %32
%334 = call i32 (double*, ...) bitcast (i32 (...)* @dealloc_LogGrid to i32 (double*, ...)*)(double* %333)
%335 = load double*, double** %33
%336 = call i32 (double*, ...) bitcast (i32 (...)* @dealloc_LogGrid to i32 (double*, ...)*)(double* %335)
%337 = load double*, double** %34
%338 = call i32 (double*, ...) bitcast (i32 (...)* @dealloc_LogGrid to i32 (double*, ...)*)(double* %337)
%339 = load double*, double** %35
%340 = call i32 (double*, ...) bitcast (i32 (...)* @dealloc_LogGrid to i32 (double*, ...)*)(double* %339)
%341 = load double*, double** %36
%342 = call i32 (double*, ...) bitcast (i32 (...)* @dealloc_LogGrid to i32 (double*, ...)*)(double* %341)
ret void
}

LLVM IR (-O2):
define void @R_revPBE_Exchange(double* nocapture %0, double* nocapture %1, double* nocapture writeonly %2, double* nocapture writeonly %3) {
%5 = tail call double @atan(double 1.000000e+00)
%6 = tail call i32 (...) @N_LogGrid()
%7 = tail call i32 (...) @r_LogGrid()
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to double*
%10 = tail call i32 (...) @alloc_LogGrid()
%11 = sext i32 %10 to i64
%12 = inttoptr i64 %11 to double*
%13 = inttoptr i64 %11 to i8*
%14 = tail call i32 (...) @alloc_LogGrid()
%15 = sext i32 %14 to i64
%16 = inttoptr i64 %15 to double*
%17 = inttoptr i64 %15 to i8*
%18 = tail call i32 (...) @alloc_LogGrid()
%19 = sext i32 %18 to i64
%20 = inttoptr i64 %19 to double*
%21 = inttoptr i64 %19 to i8*
%22 = tail call i32 (...) @alloc_LogGrid()
%23 = sext i32 %22 to i64
%24 = inttoptr i64 %23 to double*
%25 = tail call i32 (...) @alloc_LogGrid()
%26 = sext i32 %25 to i64
%27 = inttoptr i64 %26 to double*
%28 = icmp sgt i32 %6, 0
br i1 %28, label %29, label %110
29: ; preds = %4
%30 = zext i32 %6 to i64
%31 = icmp eq i32 %6, 1
br i1 %31, label %79, label %32
32: ; preds = %29
%33 = getelementptr double, double* %16, i64 %30
%34 = getelementptr double, double* %0, i64 %30
%35 = bitcast double* %34 to i8*
%36 = icmp ult i8* %17, %35
%37 = icmp ugt double* %33, %0
%38 = and i1 %36, %37
br i1 %38, label %79, label %39
39: ; preds = %32
%40 = and i64 %30, 4294967294
%41 = add nsw i64 %40, -2
%42 = lshr exact i64 %41, 1
%43 = add nuw i64 %42, 1
%44 = and i64 %43, 1
%45 = icmp eq i64 %41, 0
br i1 %45, label %67, label %46
46: ; preds = %39
%47 = and i64 %43, -2
br label %48
48: ; preds = %48, %46
%49 = phi i64 [ 0, %46 ], [ %64, %48 ]
%50 = phi i64 [ 0, %46 ], [ %65, %48 ]
%51 = getelementptr inbounds double, double* %0, i64 %49
%52 = bitcast double* %51 to <2 x double>*
%53 = load <2 x double>, <2 x double>* %52
%54 = fdiv <2 x double> %53, <double 0x402921FB54442D18, double 0x402921FB54442D18>
%55 = getelementptr inbounds double, double* %16, i64 %49
%56 = bitcast double* %55 to <2 x double>*
store <2 x double> %54, <2 x double>* %56
%57 = or i64 %49, 2
%58 = getelementptr inbounds double, double* %0, i64 %57
%59 = bitcast double* %58 to <2 x double>*
%60 = load <2 x double>, <2 x double>* %59
%61 = fdiv <2 x double> %60, <double 0x402921FB54442D18, double 0x402921FB54442D18>
%62 = getelementptr inbounds double, double* %16, i64 %57
%63 = bitcast double* %62 to <2 x double>*
store <2 x double> %61, <2 x double>* %63
%64 = add nuw i64 %49, 4
%65 = add nuw i64 %50, 2
%66 = icmp eq i64 %65, %47
br i1 %66, label %67, label %48
67: ; preds = %48, %39
%68 = phi i64 [ 0, %39 ], [ %64, %48 ]
%69 = icmp eq i64 %44, 0
br i1 %69, label %77, label %70
70: ; preds = %67
%71 = getelementptr inbounds double, double* %0, i64 %68
%72 = bitcast double* %71 to <2 x double>*
%73 = load <2 x double>, <2 x double>* %72
%74 = fdiv <2 x double> %73, <double 0x402921FB54442D18, double 0x402921FB54442D18>
%75 = getelementptr inbounds double, double* %16, i64 %68
%76 = bitcast double* %75 to <2 x double>*
store <2 x double> %74, <2 x double>* %76
br label %77
77: ; preds = %67, %70
%78 = icmp eq i64 %40, %30
br i1 %78, label %107, label %79
79: ; preds = %32, %29, %77
%80 = phi i64 [ 0, %32 ], [ 0, %29 ], [ %40, %77 ]
%81 = xor i64 %80, -1
%82 = and i64 %30, 1
%83 = icmp eq i64 %82, 0
br i1 %83, label %90, label %84
84: ; preds = %79
%85 = getelementptr inbounds double, double* %0, i64 %80
%86 = load double, double* %85
%87 = fdiv double %86, 0x402921FB54442D18
%88 = getelementptr inbounds double, double* %16, i64 %80
store double %87, double* %88
%89 = or i64 %80, 1
br label %90
90: ; preds = %84, %79
%91 = phi i64 [ %80, %79 ], [ %89, %84 ]
%92 = sub nsw i64 0, %30
%93 = icmp eq i64 %81, %92
br i1 %93, label %107, label %94
94: ; preds = %90, %94
%95 = phi i64 [ %105, %94 ], [ %91, %90 ]
%96 = getelementptr inbounds double, double* %0, i64 %95
%97 = load double, double* %96
%98 = fdiv double %97, 0x402921FB54442D18
%99 = getelementptr inbounds double, double* %16, i64 %95
store double %98, double* %99
%100 = add nuw nsw i64 %95, 1
%101 = getelementptr inbounds double, double* %0, i64 %100
%102 = load double, double* %101
%103 = fdiv double %102, 0x402921FB54442D18
%104 = getelementptr inbounds double, double* %16, i64 %100
store double %103, double* %104
%105 = add nuw nsw i64 %95, 2
%106 = icmp eq i64 %105, %30
br i1 %106, label %107, label %94
107: ; preds = %90, %94, %77
%108 = tail call i32 (double*, double*, ...) bitcast (i32 (...)* @Derivative_LogGrid to i32 (double*, double*, ...)*)(double* %16, double* %20)
%109 = tail call i32 (double*, double*, ...) bitcast (i32 (...)* @Derivative_LogGrid to i32 (double*, double*, ...)*)(double* %20, double* %24)
br i1 %28, label %115, label %113
110: ; preds = %4
%111 = tail call i32 (double*, double*, ...) bitcast (i32 (...)* @Derivative_LogGrid to i32 (double*, double*, ...)*)(double* %16, double* %20)
%112 = tail call i32 (double*, double*, ...) bitcast (i32 (...)* @Derivative_LogGrid to i32 (double*, double*, ...)*)(double* %20, double* %24)
br label %113
113: ; preds = %110, %107
%114 = tail call i32 (double*, double*, ...) bitcast (i32 (...)* @Derivative_LogGrid to i32 (double*, double*, ...)*)(double* %16, double* %27)
br label %445
115: ; preds = %107
%116 = zext i32 %6 to i64
%117 = icmp ult i32 %6, 4
br i1 %117, label %184, label %118
118: ; preds = %115
%119 = getelementptr double, double* %16, i64 %30
%120 = bitcast double* %119 to i8*
%121 = getelementptr double, double* %20, i64 %30
%122 = bitcast double* %121 to i8*
%123 = icmp ult i8* %17, %122
%124 = icmp ult i8* %21, %120
%125 = and i1 %123, %124
br i1 %125, label %184, label %126
126: ; preds = %118
%127 = and i64 %30, 4294967292
%128 = add nsw i64 %127, -4
%129 = lshr exact i64 %128, 2
%130 = add nuw nsw i64 %129, 1
%131 = and i64 %130, 1
%132 = icmp eq i64 %128, 0
br i1 %132, label %166, label %133
133: ; preds = %126
%134 = and i64 %130, 9223372036854775806
br label %135
135: ; preds = %135, %133
%136 = phi i64 [ 0, %133 ], [ %163, %135 ]
%137 = phi i64 [ 0, %133 ], [ %164, %135 ]
%138 = getelementptr inbounds double, double* %20, i64 %136
%139 = bitcast double* %138 to <2 x double>*
%140 = load <2 x double>, <2 x double>* %139
%141 = getelementptr inbounds double, double* %138, i64 2
%142 = bitcast double* %141 to <2 x double>*
%143 = load <2 x double>, <2 x double>* %142
%144 = call <2 x double> @llvm.fabs.v2f64(<2 x double> %140)
%145 = call <2 x double> @llvm.fabs.v2f64(<2 x double> %143)
%146 = getelementptr inbounds double, double* %16, i64 %136
%147 = bitcast double* %146 to <2 x double>*
store <2 x double> %144, <2 x double>* %147
%148 = getelementptr inbounds double, double* %146, i64 2
%149 = bitcast double* %148 to <2 x double>*
store <2 x double> %145, <2 x double>* %149
%150 = or i64 %136, 4
%151 = getelementptr inbounds double, double* %20, i64 %150
%152 = bitcast double* %151 to <2 x double>*
%153 = load <2 x double>, <2 x double>* %152
%154 = getelementptr inbounds double, double* %151, i64 2
%155 = bitcast double* %154 to <2 x double>*
%156 = load <2 x double>, <2 x double>* %155
%157 = call <2 x double> @llvm.fabs.v2f64(<2 x double> %153)
%158 = call <2 x double> @llvm.fabs.v2f64(<2 x double> %156)
%159 = getelementptr inbounds double, double* %16, i64 %150
%160 = bitcast double* %159 to <2 x double>*
store <2 x double> %157, <2 x double>* %160
%161 = getelementptr inbounds double, double* %159, i64 2
%162 = bitcast double* %161 to <2 x double>*
store <2 x double> %158, <2 x double>* %162
%163 = add nuw i64 %136, 8
%164 = add i64 %137, 2
%165 = icmp eq i64 %164, %134
br i1 %165, label %166, label %135
166: ; preds = %135, %126
%167 = phi i64 [ 0, %126 ], [ %163, %135 ]
%168 = icmp eq i64 %131, 0
br i1 %168, label %182, label %169
169: ; preds = %166
%170 = getelementptr inbounds double, double* %20, i64 %167
%171 = bitcast double* %170 to <2 x double>*
%172 = load <2 x double>, <2 x double>* %171
%173 = getelementptr inbounds double, double* %170, i64 2
%174 = bitcast double* %173 to <2 x double>*
%175 = load <2 x double>, <2 x double>* %174
%176 = call <2 x double> @llvm.fabs.v2f64(<2 x double> %172)
%177 = call <2 x double> @llvm.fabs.v2f64(<2 x double> %175)
%178 = getelementptr inbounds double, double* %16, i64 %167
%179 = bitcast double* %178 to <2 x double>*
store <2 x double> %176, <2 x double>* %179
%180 = getelementptr inbounds double, double* %178, i64 2
%181 = bitcast double* %180 to <2 x double>*
store <2 x double> %177, <2 x double>* %181
br label %182
182: ; preds = %166, %169
%183 = icmp eq i64 %127, %30
br i1 %183, label %226, label %184
184: ; preds = %118, %115, %182
%185 = phi i64 [ 0, %118 ], [ 0, %115 ], [ %127, %182 ]
%186 = xor i64 %185, -1
%187 = add nsw i64 %186, %30
%188 = and i64 %30, 3
%189 = icmp eq i64 %188, 0
br i1 %189, label %200, label %190
190: ; preds = %184, %190
%191 = phi i64 [ %197, %190 ], [ %185, %184 ]
%192 = phi i64 [ %198, %190 ], [ 0, %184 ]
%193 = getelementptr inbounds double, double* %20, i64 %191
%194 = load double, double* %193
%195 = tail call double @llvm.fabs.f64(double %194)
%196 = getelementptr inbounds double, double* %16, i64 %191
store double %195, double* %196
%197 = add nuw nsw i64 %191, 1
%198 = add i64 %192, 1
%199 = icmp eq i64 %198, %188
br i1 %199, label %200, label %190
200: ; preds = %190, %184
%201 = phi i64 [ %185, %184 ], [ %197, %190 ]
%202 = icmp ult i64 %187, 3
br i1 %202, label %226, label %203
203: ; preds = %200, %203
%204 = phi i64 [ %224, %203 ], [ %201, %200 ]
%205 = getelementptr inbounds double, double* %20, i64 %204
%206 = load double, double* %205
%207 = tail call double @llvm.fabs.f64(double %206)
%208 = getelementptr inbounds double, double* %16, i64 %204
store double %207, double* %208
%209 = add nuw nsw i64 %204, 1
%210 = getelementptr inbounds double, double* %20, i64 %209
%211 = load double, double* %210
%212 = tail call double @llvm.fabs.f64(double %211)
%213 = getelementptr inbounds double, double* %16, i64 %209
store double %212, double* %213
%214 = add nuw nsw i64 %204, 2
%215 = getelementptr inbounds double, double* %20, i64 %214
%216 = load double, double* %215
%217 = tail call double @llvm.fabs.f64(double %216)
%218 = getelementptr inbounds double, double* %16, i64 %214
store double %217, double* %218
%219 = add nuw nsw i64 %204, 3
%220 = getelementptr inbounds double, double* %20, i64 %219
%221 = load double, double* %220
%222 = tail call double @llvm.fabs.f64(double %221)
%223 = getelementptr inbounds double, double* %16, i64 %219
store double %222, double* %223
%224 = add nuw nsw i64 %204, 4
%225 = icmp eq i64 %224, %116
br i1 %225, label %226, label %203
226: ; preds = %200, %203, %182
%227 = tail call i32 (double*, double*, ...) bitcast (i32 (...)* @Derivative_LogGrid to i32 (double*, double*, ...)*)(double* %16, double* %27)
br i1 %28, label %228, label %445
228: ; preds = %226
%229 = zext i32 %6 to i64
br label %345
230: ; preds = %407
br i1 %28, label %231, label %445
231: ; preds = %230
%232 = zext i32 %6 to i64
%233 = icmp ult i32 %6, 4
br i1 %233, label %324, label %234
234: ; preds = %231
%235 = getelementptr double, double* %16, i64 %30
%236 = bitcast double* %235 to i8*
%237 = getelementptr double, double* %0, i64 %30
%238 = bitcast double* %237 to i8*
%239 = getelementptr double, double* %12, i64 %30
%240 = bitcast double* %239 to i8*
%241 = icmp ult i8* %17, %238
%242 = icmp ugt double* %235, %0
%243 = and i1 %241, %242
%244 = icmp ult i8* %17, %240
%245 = icmp ult i8* %13, %236
%246 = and i1 %244, %245
%247 = or i1 %243, %246
br i1 %247, label %324, label %248
248: ; preds = %234
%249 = and i64 %30, 4294967292
%250 = add nsw i64 %249, -4
%251 = lshr exact i64 %250, 2
%252 = add nuw nsw i64 %251, 1
%253 = and i64 %252, 1
%254 = icmp eq i64 %250, 0
br i1 %254, label %300, label %255
255: ; preds = %248
%256 = and i64 %252, 9223372036854775806
br label %257
257: ; preds = %257, %255
%258 = phi i64 [ 0, %255 ], [ %297, %257 ]
%259 = phi i64 [ 0, %255 ], [ %298, %257 ]
%260 = getelementptr inbounds double, double* %0, i64 %258
%261 = bitcast double* %260 to <2 x double>*
%262 = load <2 x double>, <2 x double>* %261
%263 = getelementptr inbounds double, double* %260, i64 2
%264 = bitcast double* %263 to <2 x double>*
%265 = load <2 x double>, <2 x double>* %264
%266 = getelementptr inbounds double, double* %12, i64 %258
%267 = bitcast double* %266 to <2 x double>*
%268 = load <2 x double>, <2 x double>* %267
%269 = getelementptr inbounds double, double* %266, i64 2
%270 = bitcast double* %269 to <2 x double>*
%271 = load <2 x double>, <2 x double>* %270
%272 = fmul <2 x double> %262, %268
%273 = fmul <2 x double> %265, %271
%274 = getelementptr inbounds double, double* %16, i64 %258
%275 = bitcast double* %274 to <2 x double>*
store <2 x double> %272, <2 x double>* %275
%276 = getelementptr inbounds double, double* %274, i64 2
%277 = bitcast double* %276 to <2 x double>*
store <2 x double> %273, <2 x double>* %277
%278 = or i64 %258, 4
%279 = getelementptr inbounds double, double* %0, i64 %278
%280 = bitcast double* %279 to <2 x double>*
%281 = load <2 x double>, <2 x double>* %280
%282 = getelementptr inbounds double, double* %279, i64 2
%283 = bitcast double* %282 to <2 x double>*
%284 = load <2 x double>, <2 x double>* %283
%285 = getelementptr inbounds double, double* %12, i64 %278
%286 = bitcast double* %285 to <2 x double>*
%287 = load <2 x double>, <2 x double>* %286
%288 = getelementptr inbounds double, double* %285, i64 2
%289 = bitcast double* %288 to <2 x double>*
%290 = load <2 x double>, <2 x double>* %289
%291 = fmul <2 x double> %281, %287
%292 = fmul <2 x double> %284, %290
%293 = getelementptr inbounds double, double* %16, i64 %278
%294 = bitcast double* %293 to <2 x double>*
store <2 x double> %291, <2 x double>* %294
%295 = getelementptr inbounds double, double* %293, i64 2
%296 = bitcast double* %295 to <2 x double>*
store <2 x double> %292, <2 x double>* %296
%297 = add nuw i64 %258, 8
%298 = add i64 %259, 2
%299 = icmp eq i64 %298, %256
br i1 %299, label %300, label %257
300: ; preds = %257, %248
%301 = phi i64 [ 0, %248 ], [ %297, %257 ]
%302 = icmp eq i64 %253, 0
br i1 %302, label %322, label %303
303: ; preds = %300
%304 = getelementptr inbounds double, double* %0, i64 %301
%305 = bitcast double* %304 to <2 x double>*
%306 = load <2 x double>, <2 x double>* %305
%307 = getelementptr inbounds double, double* %304, i64 2
%308 = bitcast double* %307 to <2 x double>*
%309 = load <2 x double>, <2 x double>* %308
%310 = getelementptr inbounds double, double* %12, i64 %301
%311 = bitcast double* %310 to <2 x double>*
%312 = load <2 x double>, <2 x double>* %311
%313 = getelementptr inbounds double, double* %310, i64 2
%314 = bitcast double* %313 to <2 x double>*
%315 = load <2 x double>, <2 x double>* %314
%316 = fmul <2 x double> %306, %312
%317 = fmul <2 x double> %309, %315
%318 = getelementptr inbounds double, double* %16, i64 %301
%319 = bitcast double* %318 to <2 x double>*
store <2 x double> %316, <2 x double>* %319
%320 = getelementptr inbounds double, double* %318, i64 2
%321 = bitcast double* %320 to <2 x double>*
store <2 x double> %317, <2 x double>* %321
br label %322
322: ; preds = %300, %303
%323 = icmp eq i64 %249, %30
br i1 %323, label %448, label %324
324: ; preds = %234, %231, %322
%325 = phi i64 [ 0, %234 ], [ 0, %231 ], [ %249, %322 ]
%326 = xor i64 %325, -1
%327 = add nsw i64 %326, %30
%328 = and i64 %30, 3
%329 = icmp eq i64 %328, 0
br i1 %329, label %342, label %330
330: ; preds = %324, %330
%331 = phi i64 [ %339, %330 ], [ %325, %324 ]
%332 = phi i64 [ %340, %330 ], [ 0, %324 ]
%333 = getelementptr inbounds double, double* %0, i64 %331
%334 = load double, double* %333
%335 = getelementptr inbounds double, double* %12, i64 %331
%336 = load double, double* %335
%337 = fmul double %334, %336
%338 = getelementptr inbounds double, double* %16, i64 %331
store double %337, double* %338
%339 = add nuw nsw i64 %331, 1
%340 = add i64 %332, 1
%341 = icmp eq i64 %340, %328
br i1 %341, label %342, label %330
342: ; preds = %330, %324
%343 = phi i64 [ %325, %324 ], [ %339, %330 ]
%344 = icmp ult i64 %327, 3
br i1 %344, label %448, label %414
345: ; preds = %228, %407
%346 = phi i64 [ 0, %228 ], [ %412, %407 ]
%347 = getelementptr inbounds double, double* %0, i64 %346
%348 = load double, double* %347
%349 = fdiv double %348, 0x402921FB54442D18
%350 = fcmp ogt double %349, 1.000000e-18
br i1 %350, label %351, label %407
351: ; preds = %345
%352 = getelementptr inbounds double, double* %20, i64 %346
%353 = load double, double* %352
%354 = tail call double @llvm.fabs.f64(double %353)
%355 = getelementptr inbounds double, double* %27, i64 %346
%356 = load double, double* %355
%357 = fmul double %353, %356
%358 = getelementptr inbounds double, double* %24, i64 %346
%359 = load double, double* %358
%360 = getelementptr inbounds double, double* %9, i64 %346
%361 = load double, double* %360
%362 = fdiv double 2.000000e+00, %361
%363 = tail call double @llvm.fmuladd.f64(double %362, double %353, double %359)
%364 = fmul double %349, 3.000000e+00
%365 = fdiv double %364, 0x400921FB54442D18
%366 = tail call double @pow(double %365, double 0x3FD5555555555555)
%367 = fmul double %349, 0x403D9BDB2E9D68CD
%368 = tail call double @pow(double %367, double 0x3FD5555555555555)
%369 = fmul double %368, 2.000000e+00
%370 = fmul double %349, %369
%371 = fdiv double %354, %370
%372 = fmul double %349, %349
%373 = fmul double %368, 8.000000e+00
%374 = fmul double %368, %373
%375 = fmul double %368, %374
%376 = fmul double %372, %375
%377 = fdiv double %357, %376
%378 = fmul double %368, 4.000000e+00
%379 = fmul double %368, %378
%380 = fmul double %371, 0x3FC69190453927F0
%381 = tail call double @llvm.fmuladd.f64(double %380, double %371, double 1.000000e+00)
%382 = fdiv double 1.245000e+00, %381
%383 = fsub double 2.245000e+00, %382
%384 = insertelement <2 x double> poison, double %349, i64 0
%385 = insertelement <2 x double> %384, double %381, i64 1
%386 = insertelement <2 x double> poison, double %379, i64 0
%387 = insertelement <2 x double> %386, double %381, i64 1
%388 = fmul <2 x double> %385, %387
%389 = fmul double %371, 0xBFE69190453927F0
%390 = fneg double %363
%391 = insertelement <2 x double> <double poison, double 0x3FDC19110E80C25E>, double %390, i64 0
%392 = fdiv <2 x double> %391, %388
%393 = extractelement <2 x double> %392, i64 1
%394 = fmul double %389, %393
%395 = fdiv double %394, %381
%396 = fmul double %366, -7.500000e-01
%397 = fmul double %396, %383
%398 = extractelement <2 x double> %392, i64 0
%399 = fmul double %398, %393
%400 = tail call double @llvm.fmuladd.f64(double %383, double 0x3FF5555555555555, double %399)
%401 = fmul double %371, 0xBFF5555555555555
%402 = fmul double %371, %401
%403 = tail call double @llvm.fmuladd.f64(double %402, double %371, double %377)
%404 = fneg double %403
%405 = tail call double @llvm.fmuladd.f64(double %404, double %395, double %400)
%406 = fmul double %396, %405
br label %407
407: ; preds = %345, %351
%408 = phi double [ %397, %351 ], [ 0.000000e+00, %345 ]
%409 = phi double [ %406, %351 ], [ 0.000000e+00, %345 ]
%410 = getelementptr inbounds double, double* %12, i64 %346
store double %408, double* %410
%411 = getelementptr inbounds double, double* %1, i64 %346
store double %409, double* %411
%412 = add nuw nsw i64 %346, 1
%413 = icmp eq i64 %412, %229
br i1 %413, label %230, label %345
414: ; preds = %342, %414
%415 = phi i64 [ %443, %414 ], [ %343, %342 ]
%416 = getelementptr inbounds double, double* %0, i64 %415
%417 = load double, double* %416
%418 = getelementptr inbounds double, double* %12, i64 %415
%419 = load double, double* %418
%420 = fmul double %417, %419
%421 = getelementptr inbounds double, double* %16, i64 %415
store double %420, double* %421
%422 = add nuw nsw i64 %415, 1
%423 = getelementptr inbounds double, double* %0, i64 %422
%424 = load double, double* %423
%425 = getelementptr inbounds double, double* %12, i64 %422
%426 = load double, double* %425
%427 = fmul double %424, %426
%428 = getelementptr inbounds double, double* %16, i64 %422
store double %427, double* %428
%429 = add nuw nsw i64 %415, 2
%430 = getelementptr inbounds double, double* %0, i64 %429
%431 = load double, double* %430
%432 = getelementptr inbounds double, double* %12, i64 %429
%433 = load double, double* %432
%434 = fmul double %431, %433
%435 = getelementptr inbounds double, double* %16, i64 %429
store double %434, double* %435
%436 = add nuw nsw i64 %415, 3
%437 = getelementptr inbounds double, double* %0, i64 %436
%438 = load double, double* %437
%439 = getelementptr inbounds double, double* %12, i64 %436
%440 = load double, double* %439
%441 = fmul double %438, %440
%442 = getelementptr inbounds double, double* %16, i64 %436
store double %441, double* %442
%443 = add nuw nsw i64 %415, 4
%444 = icmp eq i64 %443, %232
br i1 %444, label %448, label %414
445: ; preds = %230, %113, %226
%446 = tail call i32 (double*, ...) bitcast (i32 (...)* @Integrate_LogGrid to i32 (double*, ...)*)(double* %16)
%447 = sitofp i32 %446 to double
store double %447, double* %2
br label %595
448: ; preds = %342, %414, %322
%449 = tail call i32 (double*, ...) bitcast (i32 (...)* @Integrate_LogGrid to i32 (double*, ...)*)(double* %16)
%450 = sitofp i32 %449 to double
store double %450, double* %2
br i1 %28, label %451, label %595
451: ; preds = %448
%452 = zext i32 %6 to i64
%453 = icmp ult i32 %6, 4
br i1 %453, label %543, label %454
454: ; preds = %451
%455 = getelementptr double, double* %16, i64 %30
%456 = getelementptr double, double* %0, i64 %30
%457 = bitcast double* %456 to i8*
%458 = getelementptr double, double* %1, i64 %30
%459 = bitcast double* %458 to i8*
%460 = icmp ult i8* %17, %457
%461 = icmp ugt double* %455, %0
%462 = and i1 %460, %461
%463 = icmp ult i8* %17, %459
%464 = icmp ugt double* %455, %1
%465 = and i1 %463, %464
%466 = or i1 %462, %465
br i1 %466, label %543, label %467
467: ; preds = %454
%468 = and i64 %30, 4294967292
%469 = add nsw i64 %468, -4
%470 = lshr exact i64 %469, 2
%471 = add nuw nsw i64 %470, 1
%472 = and i64 %471, 1
%473 = icmp eq i64 %469, 0
br i1 %473, label %519, label %474
474: ; preds = %467
%475 = and i64 %471, 9223372036854775806
br label %476
476: ; preds = %476, %474
%477 = phi i64 [ 0, %474 ], [ %516, %476 ]
%478 = phi i64 [ 0, %474 ], [ %517, %476 ]
%479 = getelementptr inbounds double, double* %0, i64 %477
%480 = bitcast double* %479 to <2 x double>*
%481 = load <2 x double>, <2 x double>* %480
%482 = getelementptr inbounds double, double* %479, i64 2
%483 = bitcast double* %482 to <2 x double>*
%484 = load <2 x double>, <2 x double>* %483
%485 = getelementptr inbounds double, double* %1, i64 %477
%486 = bitcast double* %485 to <2 x double>*
%487 = load <2 x double>, <2 x double>* %486
%488 = getelementptr inbounds double, double* %485, i64 2
%489 = bitcast double* %488 to <2 x double>*
%490 = load <2 x double>, <2 x double>* %489
%491 = fmul <2 x double> %481, %487
%492 = fmul <2 x double> %484, %490
%493 = getelementptr inbounds double, double* %16, i64 %477
%494 = bitcast double* %493 to <2 x double>*
store <2 x double> %491, <2 x double>* %494
%495 = getelementptr inbounds double, double* %493, i64 2
%496 = bitcast double* %495 to <2 x double>*
store <2 x double> %492, <2 x double>* %496
%497 = or i64 %477, 4
%498 = getelementptr inbounds double, double* %0, i64 %497
%499 = bitcast double* %498 to <2 x double>*
%500 = load <2 x double>, <2 x double>* %499
%501 = getelementptr inbounds double, double* %498, i64 2
%502 = bitcast double* %501 to <2 x double>*
%503 = load <2 x double>, <2 x double>* %502
%504 = getelementptr inbounds double, double* %1, i64 %497
%505 = bitcast double* %504 to <2 x double>*
%506 = load <2 x double>, <2 x double>* %505
%507 = getelementptr inbounds double, double* %504, i64 2
%508 = bitcast double* %507 to <2 x double>*
%509 = load <2 x double>, <2 x double>* %508
%510 = fmul <2 x double> %500, %506
%511 = fmul <2 x double> %503, %509
%512 = getelementptr inbounds double, double* %16, i64 %497
%513 = bitcast double* %512 to <2 x double>*
store <2 x double> %510, <2 x double>* %513
%514 = getelementptr inbounds double, double* %512, i64 2
%515 = bitcast double* %514 to <2 x double>*
store <2 x double> %511, <2 x double>* %515
%516 = add nuw i64 %477, 8
%517 = add i64 %478, 2
%518 = icmp eq i64 %517, %475
br i1 %518, label %519, label %476
519: ; preds = %476, %467
%520 = phi i64 [ 0, %467 ], [ %516, %476 ]
%521 = icmp eq i64 %472, 0
br i1 %521, label %541, label %522
522: ; preds = %519
%523 = getelementptr inbounds double, double* %0, i64 %520
%524 = bitcast double* %523 to <2 x double>*
%525 = load <2 x double>, <2 x double>* %524
%526 = getelementptr inbounds double, double* %523, i64 2
%527 = bitcast double* %526 to <2 x double>*
%528 = load <2 x double>, <2 x double>* %527
%529 = getelementptr inbounds double, double* %1, i64 %520
%530 = bitcast double* %529 to <2 x double>*
%531 = load <2 x double>, <2 x double>* %530
%532 = getelementptr inbounds double, double* %529, i64 2
%533 = bitcast double* %532 to <2 x double>*
%534 = load <2 x double>, <2 x double>* %533
%535 = fmul <2 x double> %525, %531
%536 = fmul <2 x double> %528, %534
%537 = getelementptr inbounds double, double* %16, i64 %520
%538 = bitcast double* %537 to <2 x double>*
store <2 x double> %535, <2 x double>* %538
%539 = getelementptr inbounds double, double* %537, i64 2
%540 = bitcast double* %539 to <2 x double>*
store <2 x double> %536, <2 x double>* %540
br label %541
541: ; preds = %519, %522
%542 = icmp eq i64 %468, %30
br i1 %542, label %595, label %543
543: ; preds = %454, %451, %541
%544 = phi i64 [ 0, %454 ], [ 0, %451 ], [ %468, %541 ]
%545 = xor i64 %544, -1
%546 = add nsw i64 %545, %30
%547 = and i64 %30, 3
%548 = icmp eq i64 %547, 0
br i1 %548, label %561, label %549
549: ; preds = %543, %549
%550 = phi i64 [ %558, %549 ], [ %544, %543 ]
%551 = phi i64 [ %559, %549 ], [ 0, %543 ]
%552 = getelementptr inbounds double, double* %0, i64 %550
%553 = load double, double* %552
%554 = getelementptr inbounds double, double* %1, i64 %550
%555 = load double, double* %554
%556 = fmul double %553, %555
%557 = getelementptr inbounds double, double* %16, i64 %550
store double %556, double* %557
%558 = add nuw nsw i64 %550, 1
%559 = add i64 %551, 1
%560 = icmp eq i64 %559, %547
br i1 %560, label %561, label %549
561: ; preds = %549, %543
%562 = phi i64 [ %544, %543 ], [ %558, %549 ]
%563 = icmp ult i64 %546, 3
br i1 %563, label %595, label %564
564: ; preds = %561, %564
%565 = phi i64 [ %593, %564 ], [ %562, %561 ]
%566 = getelementptr inbounds double, double* %0, i64 %565
%567 = load double, double* %566
%568 = getelementptr inbounds double, double* %1, i64 %565
%569 = load double, double* %568
%570 = fmul double %567, %569
%571 = getelementptr inbounds double, double* %16, i64 %565
store double %570, double* %571
%572 = add nuw nsw i64 %565, 1
%573 = getelementptr inbounds double, double* %0, i64 %572
%574 = load double, double* %573
%575 = getelementptr inbounds double, double* %1, i64 %572
%576 = load double, double* %575
%577 = fmul double %574, %576
%578 = getelementptr inbounds double, double* %16, i64 %572
store double %577, double* %578
%579 = add nuw nsw i64 %565, 2
%580 = getelementptr inbounds double, double* %0, i64 %579
%581 = load double, double* %580
%582 = getelementptr inbounds double, double* %1, i64 %579
%583 = load double, double* %582
%584 = fmul double %581, %583
%585 = getelementptr inbounds double, double* %16, i64 %579
store double %584, double* %585
%586 = add nuw nsw i64 %565, 3
%587 = getelementptr inbounds double, double* %0, i64 %586
%588 = load double, double* %587
%589 = getelementptr inbounds double, double* %1, i64 %586
%590 = load double, double* %589
%591 = fmul double %588, %590
%592 = getelementptr inbounds double, double* %16, i64 %586
store double %591, double* %592
%593 = add nuw nsw i64 %565, 4
%594 = icmp eq i64 %593, %452
br i1 %594, label %595, label %564
595: ; preds = %561, %564, %541, %445, %448
%596 = tail call i32 (double*, ...) bitcast (i32 (...)* @Integrate_LogGrid to i32 (double*, ...)*)(double* %16)
%597 = sitofp i32 %596 to double
store double %597, double* %3
%598 = tail call i32 (double*, ...) bitcast (i32 (...)* @dealloc_LogGrid to i32 (double*, ...)*)(double* %12)
%599 = tail call i32 (double*, ...) bitcast (i32 (...)* @dealloc_LogGrid to i32 (double*, ...)*)(double* %16)
%600 = tail call i32 (double*, ...) bitcast (i32 (...)* @dealloc_LogGrid to i32 (double*, ...)*)(double* %20)
%601 = tail call i32 (double*, ...) bitcast (i32 (...)* @dealloc_LogGrid to i32 (double*, ...)*)(double* %24)
%602 = tail call i32 (double*, ...) bitcast (i32 (...)* @dealloc_LogGrid to i32 (double*, ...)*)(double* %27)
ret void
}