#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double G_func2(double);
double dsignum(double);
double fabs(double);
int floor(double);
double sqrt(double);
int lkep_drift3(double mu, double *r0, double *v0, double dt) {
  double r0mag, v0mag2;
  double r0v0;
  double rcalc, dtcalc, terr;
  double u;
  double beta;
  double P;
  double dU;
  int n;
  double q;
  double U0w2, U1w2;
  double U, U0, U1, U2, U3;
  double f, g, F, G;
  double r1[3], v1[3];
  int d;
  double ln = 5.0;
  int no_iter;
  double du, dqdu, drdu, fn, fnp, fnpp;
  r0mag = sqrt(r0[0] * r0[0] + r0[1] * r0[1] + r0[2] * r0[2]);
  v0mag2 = v0[0] * v0[0] + v0[1] * v0[1] + v0[2] * v0[2];
  r0v0 = r0[0] * v0[0] + r0[1] * v0[1] + r0[2] * v0[2];
  beta = 2 * mu / r0mag - v0mag2;
  if (beta > 0) {
    P = 2 * ((double)3.14159265358979323846264338327950288419716939937510) *
        mu / sqrt(beta * beta * beta);
    n = floor((dt + P / 2.0 - 2 * r0v0 / beta) / P);
    dU = 2 * n *
         ((double)3.14159265358979323846264338327950288419716939937510) /
         sqrt(beta * beta * beta * beta * beta);
  } else {
    dU = 0.0;
  }
  u = dt / (4 * r0mag);
  no_iter = 0;
  do {
    q = beta * u * u / (1 + beta * u * u);
    if (q > 0.5 || no_iter > 12)
      return -1;
    dqdu = 2 * beta * u / (1 + beta * u * u) / (1 + beta * u * u);
    U0w2 = 1 - 2 * q;
    U1w2 = 2 * (1 - q) * u;
    U = 16.0 / 15 * U1w2 * U1w2 * U1w2 * U1w2 * U1w2 * G_func2(q) + dU;
    U0 = 2 * U0w2 * U0w2 - 1;
    U1 = 2 * U0w2 * U1w2;
    U2 = 2 * U1w2 * U1w2;
    U3 = beta * U + U1 * U2 / 3.0;
    rcalc = r0mag * U0 + r0v0 * U1 + mu * U2;
    drdu = 4 * (1 - q) * (r0v0 * U0 + (mu - beta * r0mag) * U1);
    dtcalc = r0mag * U1 + r0v0 * U2 + mu * U3;
    fn = dtcalc - dt;
    fnp = 4 * (1 - q) * rcalc;
    fnpp = 4 * (drdu * (1 - q) - rcalc * dqdu);
    du = -ln * fn /
         (fnp + dsignum(fnp) * sqrt(fabs((ln - 1) * (ln - 1) * fnp * fnp -
                                         ln * (ln - 1) * fn * fnpp)));
    u += du;
    no_iter++;
    terr = fabs((dt - dtcalc) / dt);
  } while (terr > 1e-10);
  f = 1 - (mu / r0mag) * U2;
  g = r0mag * U1 + r0v0 * U2;
  F = -mu * U1 / (rcalc * r0mag);
  G = 1 - (mu / rcalc) * U2;
  for (d = 0; d < 3; d++) {
    r1[d] = f * r0[d] + g * v0[d];
    v1[d] = F * r0[d] + G * v0[d];
  }
  for (d = 0; d < 3; d++) {
    r0[d] = r1[d];
    v0[d] = v1[d];
  }
  return 0;
}


x86 assembly (clang, -O0):
<lkep_drift3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1a0,%rsp
movsd  %xmm0,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
movsd  %xmm1,-0x28(%rbp)
movsd  0xea3(%rip),%xmm0
movsd  %xmm0,-0x130(%rbp)
ff
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
movsd  %xmm0,-0x30(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x20(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x20(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x20(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xdab(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
divsd  -0x30(%rbp),%xmm0
subsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    134a <lkep_drift3+0x20a>
movsd  0xd95(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x178(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x178(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm1
movsd  0xd36(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  0xd26(%rip),%xmm1
mulsd  -0x40(%rbp),%xmm1
divsd  -0x68(%rbp),%xmm1
subsd  %xmm1,%xmm0
divsd  -0x70(%rbp),%xmm0
call   1060 <floor@plt>
mov    %eax,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  0xd09(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x170(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x170(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
jmp    1352 <lkep_drift3+0x212>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xcc1(%rip),%xmm1
mulsd  -0x30(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movl   $0x0,-0x134(%rbp)
movsd  -0x68(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm1
mulsd  -0x60(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xc8f(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  0xc67(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     13d8 <lkep_drift3+0x298>
cmpl   $0xc,-0x134(%rbp)
jle    13e4 <lkep_drift3+0x2a4>
movl   $0xffffffff,-0x4(%rbp)
jmp    1aa1 <lkep_drift3+0x961>
movsd  0xc14(%rip),%xmm0
mulsd  -0x68(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm1
mulsd  -0x60(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xc1f(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  -0x68(%rbp),%xmm1
mulsd  -0x60(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xbfc(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x148(%rbp)
ff
movsd  -0x88(%rbp),%xmm1
ff
addsd  %xmm1,%xmm1
movsd  0xbd8(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0xbc4(%rip),%xmm1
subsd  -0x88(%rbp),%xmm1
ff
movsd  0xb84(%rip),%xmm0
mulsd  %xmm1,%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  0xbb3(%rip),%xmm0
mulsd  -0x98(%rbp),%xmm0
ff
mulsd  -0x98(%rbp),%xmm0
ff
mulsd  -0x98(%rbp),%xmm0
ff
mulsd  -0x98(%rbp),%xmm0
ff
mulsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x198(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
call   1030 <G_func2@plt>
movaps %xmm0,%xmm2
movsd  -0x198(%rbp),%xmm0
ff
movsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  0xb06(%rip),%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
movsd  -0x90(%rbp),%xmm1
ff
mulsd  %xmm1,%xmm0
movsd  0xb2a(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  0xad6(%rip),%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
mulsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  0xab6(%rip),%xmm0
mulsd  -0x98(%rbp),%xmm0
ff
mulsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movsd  -0xa0(%rbp),%xmm2
ff
movsd  -0xb0(%rbp),%xmm1
ff
mulsd  -0xb8(%rbp),%xmm1
ff
movsd  0xab1(%rip),%xmm3
divsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x30(%rbp),%xmm1
movsd  -0xa8(%rbp),%xmm2
ff
movsd  -0x40(%rbp),%xmm0
mulsd  -0xb0(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  -0xb8(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xa51(%rip),%xmm1
subsd  -0x88(%rbp),%xmm1
ff
movsd  0xa31(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  -0x40(%rbp),%xmm1
movsd  -0xa8(%rbp),%xmm3
ff
movsd  -0x10(%rbp),%xmm4
movsd  -0x68(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm5
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm5,%xmm2
addsd  %xmm4,%xmm2
mulsd  -0xb0(%rbp),%xmm2
ff
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x150(%rbp)
ff
movsd  -0x30(%rbp),%xmm1
movsd  -0xb0(%rbp),%xmm2
ff
movsd  -0x40(%rbp),%xmm0
mulsd  -0xb8(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  -0xc0(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x158(%rbp)
ff
movsd  0x990(%rip),%xmm1
subsd  -0x88(%rbp),%xmm1
ff
movsd  0x970(%rip),%xmm0
mulsd  %xmm1,%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x160(%rbp)
ff
movsd  -0x150(%rbp),%xmm1
ff
movsd  0x95f(%rip),%xmm2
subsd  -0x88(%rbp),%xmm2
ff
movsd  -0x48(%rbp),%xmm0
mulsd  -0x148(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0x913(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x168(%rbp)
ff
movsd  -0x130(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x158(%rbp),%xmm0
ff
movsd  %xmm0,-0x180(%rbp)
ff
movsd  -0x160(%rbp),%xmm0
ff
movsd  %xmm0,-0x188(%rbp)
ff
movsd  -0x160(%rbp),%xmm0
ff
call   1050 <dsignum@plt>
movsd  %xmm0,-0x190(%rbp)
ff
movsd  -0x130(%rbp),%xmm0
ff
movsd  0x8b3(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  -0x130(%rbp),%xmm1
ff
movsd  0x89f(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mulsd  -0x160(%rbp),%xmm0
ff
movsd  -0x160(%rbp),%xmm2
ff
movsd  -0x130(%rbp),%xmm1
ff
movsd  -0x130(%rbp),%xmm3
ff
movsd  0x86f(%rip),%xmm4
subsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm1
mulsd  -0x158(%rbp),%xmm1
ff
mulsd  -0x168(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movaps 0x861(%rip),%xmm1
pand   %xmm1,%xmm0
call   1040 <sqrt@plt>
movsd  -0x190(%rbp),%xmm1
ff
movsd  -0x188(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0x180(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x140(%rbp)
ff
movsd  -0x140(%rbp),%xmm0
ff
addsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x134(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x134(%rbp)
movsd  -0x28(%rbp),%xmm0
subsd  -0x50(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
movaps 0x7f2(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  0x7cc(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     1377 <lkep_drift3+0x237>
movsd  -0x10(%rbp),%xmm0
divsd  -0x30(%rbp),%xmm0
movsd  -0xb8(%rbp),%xmm1
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0x76d(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
movsd  -0xb0(%rbp),%xmm2
ff
movsd  -0x40(%rbp),%xmm1
mulsd  -0xb8(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0xb0(%rbp),%xmm0
ff
movsd  -0x48(%rbp),%xmm1
mulsd  -0x30(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
divsd  -0x48(%rbp),%xmm0
movsd  -0xb8(%rbp),%xmm1
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0x6c8(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movl   $0x0,-0x124(%rbp)
cmpl   $0x3,-0x124(%rbp)
jge    1a2f <lkep_drift3+0x8ef>
movsd  -0xc8(%rbp),%xmm0
ff
mov    -0x18(%rbp),%rax
movslq -0x124(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0xd0(%rbp),%xmm1
ff
mov    -0x20(%rbp),%rax
movslq -0x124(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movslq -0x124(%rbp),%rax
movsd  %xmm0,-0x100(%rbp,%rax,8)
ff ff
movsd  -0xd8(%rbp),%xmm0
ff
mov    -0x18(%rbp),%rax
movslq -0x124(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0xe0(%rbp),%xmm1
ff
mov    -0x20(%rbp),%rax
movslq -0x124(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movslq -0x124(%rbp),%rax
movsd  %xmm0,-0x120(%rbp,%rax,8)
ff ff
mov    -0x124(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x124(%rbp)
jmp    197e <lkep_drift3+0x83e>
movl   $0x0,-0x124(%rbp)
cmpl   $0x3,-0x124(%rbp)
jge    1a9a <lkep_drift3+0x95a>
movslq -0x124(%rbp),%rax
movsd  -0x100(%rbp,%rax,8),%xmm0
ff ff
mov    -0x18(%rbp),%rax
movslq -0x124(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movslq -0x124(%rbp),%rax
movsd  -0x120(%rbp,%rax,8),%xmm0
ff ff
mov    -0x20(%rbp),%rax
movslq -0x124(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x124(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x124(%rbp)
jmp    1a39 <lkep_drift3+0x8f9>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lkep_drift3>:
push   %rbp
push   %r14
push   %rbx
sub    $0xf0,%rsp
movsd  %xmm1,0x10(%rsp)
mov    %rsi,%r14
mov    %rdi,%rbx
movaps %xmm0,0x40(%rsp)
movsd  (%rdi),%xmm1
movsd  0x8(%rdi),%xmm0
mulsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%rdi),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm2,%xmm2
xorpd  %xmm1,%xmm1
movsd  %xmm1,0x8(%rsp)
ucomisd %xmm2,%xmm0
jb     1198 <lkep_drift3+0x58>
sqrtsd %xmm0,%xmm0
jmp    119d <lkep_drift3+0x5d>
call   1040 <sqrt@plt>
movsd  (%r14),%xmm4
movsd  0x8(%r14),%xmm1
movapd %xmm1,%xmm2
mulsd  %xmm1,%xmm2
movapd %xmm4,%xmm3
mulsd  %xmm4,%xmm3
addsd  %xmm2,%xmm3
movsd  0x10(%r14),%xmm5
movapd %xmm5,%xmm2
mulsd  %xmm5,%xmm2
mulsd  0x8(%rbx),%xmm1
addsd  %xmm3,%xmm2
mulsd  (%rbx),%xmm4
addsd  %xmm1,%xmm4
mulsd  0x10(%rbx),%xmm5
addsd  %xmm4,%xmm5
movapd %xmm5,0xa0(%rsp)
movapd 0x40(%rsp),%xmm3
addsd  %xmm3,%xmm3
divsd  %xmm0,%xmm3
subsd  %xmm2,%xmm3
ucomisd 0xe81(%rip),%xmm3
movapd %xmm0,%xmm1
movsd  %xmm0,(%rsp)
movapd %xmm3,0x30(%rsp)
jbe    12ee <lkep_drift3+0x1ae>
movapd %xmm3,%xmm0
mulsd  %xmm3,%xmm0
mulsd  %xmm3,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
movapd %xmm0,0x20(%rsp)
jb     123e <lkep_drift3+0xfe>
sqrtsd %xmm0,%xmm0
jmp    1249 <lkep_drift3+0x109>
call   1040 <sqrt@plt>
movapd 0x30(%rsp),%xmm3
movapd 0xa0(%rsp),%xmm1
unpcklpd 0x40(%rsp),%xmm1
mulpd  0xda0(%rip),%xmm1
movapd %xmm3,%xmm2
unpcklpd %xmm0,%xmm2
divpd  %xmm2,%xmm1
movapd %xmm1,%xmm2
unpckhpd %xmm1,%xmm2
movsd  0xdb4(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  0x10(%rsp),%xmm0
subsd  %xmm1,%xmm0
divsd  %xmm2,%xmm0
call   1060 <floor@plt>
movapd 0x30(%rsp),%xmm3
add    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xd8e(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
movapd 0x20(%rsp),%xmm0
mulsd  %xmm3,%xmm0
mulsd  %xmm3,%xmm0
ucomisd 0xdc2(%rip),%xmm0
jb     12ce <lkep_drift3+0x18e>
sqrtsd %xmm0,%xmm0
jmp    12d9 <lkep_drift3+0x199>
call   1040 <sqrt@plt>
movapd 0x30(%rsp),%xmm3
movsd  (%rsp),%xmm1
movsd  0x8(%rsp),%xmm2
divsd  %xmm0,%xmm2
movsd  %xmm2,0x8(%rsp)
movsd  0xd4a(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0x10(%rsp),%xmm2
divsd  %xmm0,%xmm2
movapd %xmm3,%xmm0
addsd  %xmm3,%xmm0
movapd %xmm0,0xe0(%rsp)
movapd %xmm3,%xmm0
mulsd  %xmm1,%xmm0
movapd 0x40(%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,0xd0(%rsp)
xor    %ebp,%ebp
movsd  0xd0e(%rip),%xmm7
jmp    13b2 <lkep_drift3+0x272>
nopl   0x0(%rax)
movsd  %xmm6,0x20(%rsp)
call   1040 <sqrt@plt>
movsd  0x20(%rsp),%xmm6
movsd  0x18(%rsp),%xmm1
movapd 0x30(%rsp),%xmm3
movsd  0xce3(%rip),%xmm7
movsd  0x58(%rsp),%xmm2
movsd  0x50(%rsp),%xmm4
movsd  0x60(%rsp),%xmm5
mulsd  %xmm0,%xmm6
addsd  %xmm1,%xmm6
divsd  %xmm6,%xmm5
subsd  %xmm5,%xmm2
add    $0x1,%ebp
movsd  0x10(%rsp),%xmm1
movapd %xmm1,%xmm0
subsd  %xmm4,%xmm0
divsd  %xmm1,%xmm0
andpd  0xc6c(%rip),%xmm0
ucomisd 0xcd4(%rip),%xmm0
jbe    1611 <lkep_drift3+0x4d1>
movapd %xmm3,%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm2,%xmm0
movapd %xmm0,%xmm1
addsd  %xmm7,%xmm1
divsd  %xmm1,%xmm0
ucomisd 0xc5e(%rip),%xmm0
mov    $0xffffffff,%eax
ja     171a <lkep_drift3+0x5da>
cmp    $0xc,%ebp
ja     171a <lkep_drift3+0x5da>
movapd 0xe0(%rsp),%xmm4
mulsd  %xmm2,%xmm4
divsd  %xmm1,%xmm4
divsd  %xmm1,%xmm4
movapd %xmm4,0x60(%rsp)
movapd %xmm0,%xmm1
addsd  %xmm0,%xmm1
movapd %xmm7,%xmm4
subsd  %xmm1,%xmm4
movapd %xmm4,0x20(%rsp)
subsd  %xmm0,%xmm7
movsd  %xmm7,0x18(%rsp)
addsd  %xmm7,%xmm7
movsd  %xmm2,0x58(%rsp)
mulsd  %xmm2,%xmm7
movapd %xmm7,0x80(%rsp)
movapd %xmm7,%xmm1
mulsd  0xc0c(%rip),%xmm1
mulsd  %xmm7,%xmm1
mulsd  %xmm7,%xmm1
mulsd  %xmm7,%xmm1
mulsd  %xmm7,%xmm1
movapd %xmm1,0x70(%rsp)
call   1030 <G_func2@plt>
movapd %xmm0,%xmm6
mulsd  0x70(%rsp),%xmm6
addsd  0x8(%rsp),%xmm6
movapd 0x20(%rsp),%xmm2
movapd %xmm2,%xmm0
movapd 0x80(%rsp),%xmm1
unpcklpd %xmm1,%xmm0
addpd  %xmm0,%xmm0
mulsd  %xmm0,%xmm2
addsd  0xbc2(%rip),%xmm2
unpcklpd %xmm1,%xmm1
mulpd  %xmm0,%xmm1
movapd %xmm1,%xmm5
unpckhpd %xmm1,%xmm5
movapd %xmm1,%xmm0
movapd %xmm1,%xmm4
mulsd  %xmm5,%xmm0
divsd  0xba6(%rip),%xmm0
mulsd  0x30(%rsp),%xmm6
addsd  %xmm0,%xmm6
movapd 0xa0(%rsp),%xmm3
movapd %xmm3,%xmm0
mulsd  %xmm1,%xmm0
movsd  (%rsp),%xmm9
movapd %xmm9,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movapd 0x40(%rsp),%xmm8
movapd %xmm8,%xmm7
mulsd  %xmm5,%xmm7
addsd  %xmm1,%xmm7
movapd 0xd0(%rsp),%xmm0
mulsd  %xmm4,%xmm0
mulsd  %xmm3,%xmm2
addsd  %xmm0,%xmm2
movapd %xmm3,%xmm0
movapd %xmm5,0xc0(%rsp)
mulsd  %xmm5,%xmm0
movapd %xmm9,%xmm3
movapd %xmm4,0x80(%rsp)
mulsd  %xmm4,%xmm3
addsd  %xmm0,%xmm3
movsd  0x18(%rsp),%xmm4
movapd %xmm4,%xmm1
movsd  0xaf6(%rip),%xmm5
mulsd  %xmm5,%xmm1
mulsd  %xmm1,%xmm2
movapd %xmm1,%xmm0
mulsd  %xmm8,%xmm6
movsd  %xmm3,0x98(%rsp)
addsd  %xmm3,%xmm6
movapd %xmm2,%xmm1
mulsd  %xmm4,%xmm1
movsd  %xmm6,0x50(%rsp)
subsd  0x10(%rsp),%xmm6
movsd  %xmm6,0x70(%rsp)
mulsd  %xmm7,%xmm0
movsd  %xmm0,0x18(%rsp)
movapd %xmm7,0xb0(%rsp)
movapd 0x60(%rsp),%xmm2
mulsd  %xmm7,%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm5,%xmm1
movapd %xmm1,0x20(%rsp)
mulsd  0xab3(%rip),%xmm6
movsd  %xmm6,0x60(%rsp)
call   1050 <dsignum@plt>
movsd  0x18(%rsp),%xmm1
movapd %xmm0,%xmm6
movapd %xmm1,%xmm0
mulsd  0xa9a(%rip),%xmm0
movsd  0x70(%rsp),%xmm2
mulsd  0xa94(%rip),%xmm2
mulsd  0x20(%rsp),%xmm2
mulsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
andpd  0xa16(%rip),%xmm0
ucomisd 0xa86(%rip),%xmm0
jb     1340 <lkep_drift3+0x200>
sqrtsd %xmm0,%xmm0
jmp    1357 <lkep_drift3+0x217>
movapd 0xa07(%rip),%xmm1
movapd 0x40(%rsp),%xmm3
xorpd  %xmm3,%xmm1
movapd %xmm3,%xmm2
movsd  (%rsp),%xmm4
divsd  %xmm4,%xmm2
movapd 0xc0(%rsp),%xmm6
mulsd  %xmm6,%xmm2
movapd %xmm7,%xmm0
subsd  %xmm2,%xmm0
movapd 0x80(%rsp),%xmm5
mulsd  %xmm1,%xmm5
movapd 0xb0(%rsp),%xmm1
mulsd  %xmm1,%xmm4
divsd  %xmm4,%xmm5
divsd  %xmm1,%xmm3
mulsd  %xmm6,%xmm3
subsd  %xmm3,%xmm7
movsd  (%r14),%xmm4
movsd  0x8(%r14),%xmm8
movsd  0x98(%rsp),%xmm3
movapd %xmm3,%xmm6
mulsd  %xmm4,%xmm6
movsd  (%rbx),%xmm2
movsd  0x8(%rbx),%xmm1
movapd %xmm0,%xmm9
mulsd  %xmm2,%xmm9
addsd  %xmm6,%xmm9
mulsd  %xmm7,%xmm4
mulsd  %xmm5,%xmm2
addsd  %xmm4,%xmm2
movapd %xmm3,%xmm4
mulsd  %xmm8,%xmm4
movapd %xmm0,%xmm6
mulsd  %xmm1,%xmm6
addsd  %xmm4,%xmm6
mulsd  %xmm7,%xmm8
mulsd  %xmm5,%xmm1
addsd  %xmm8,%xmm1
movsd  0x10(%rbx),%xmm8
movsd  0x10(%r14),%xmm4
mulsd  %xmm4,%xmm3
mulsd  %xmm8,%xmm0
addsd  %xmm3,%xmm0
mulsd  %xmm4,%xmm7
mulsd  %xmm8,%xmm5
addsd  %xmm7,%xmm5
movsd  %xmm9,(%rbx)
movsd  %xmm2,(%r14)
movsd  %xmm6,0x8(%rbx)
movsd  %xmm1,0x8(%r14)
movsd  %xmm0,0x10(%rbx)
movsd  %xmm5,0x10(%r14)
xor    %eax,%eax
add    $0xf0,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @lkep_drift3(double %0, double* %1, double* %2, double %3) {
%5 = alloca i32
%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 double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca i32
%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 double
%32 = alloca double
%33 = alloca [3 x double]
%34 = alloca [3 x double]
%35 = alloca i32
%36 = alloca double
%37 = alloca i32
%38 = alloca double
%39 = alloca double
%40 = alloca double
%41 = alloca double
%42 = alloca double
%43 = alloca double
store double %0, double* %6
store double* %1, double** %7
store double* %2, double** %8
store double %3, double* %9
store double 5.000000e+00, double* %36
%44 = load double*, double** %7
%45 = getelementptr inbounds double, double* %44, i64 0
%46 = load double, double* %45
%47 = load double*, double** %7
%48 = getelementptr inbounds double, double* %47, i64 0
%49 = load double, double* %48
%50 = load double*, double** %7
%51 = getelementptr inbounds double, double* %50, i64 1
%52 = load double, double* %51
%53 = load double*, double** %7
%54 = getelementptr inbounds double, double* %53, i64 1
%55 = load double, double* %54
%56 = fmul double %52, %55
%57 = call double @llvm.fmuladd.f64(double %46, double %49, double %56)
%58 = load double*, double** %7
%59 = getelementptr inbounds double, double* %58, i64 2
%60 = load double, double* %59
%61 = load double*, double** %7
%62 = getelementptr inbounds double, double* %61, i64 2
%63 = load double, double* %62
%64 = call double @llvm.fmuladd.f64(double %60, double %63, double %57)
%65 = call double @sqrt(double %64)
store double %65, double* %10
%66 = load double*, double** %8
%67 = getelementptr inbounds double, double* %66, i64 0
%68 = load double, double* %67
%69 = load double*, double** %8
%70 = getelementptr inbounds double, double* %69, i64 0
%71 = load double, double* %70
%72 = load double*, double** %8
%73 = getelementptr inbounds double, double* %72, i64 1
%74 = load double, double* %73
%75 = load double*, double** %8
%76 = getelementptr inbounds double, double* %75, i64 1
%77 = load double, double* %76
%78 = fmul double %74, %77
%79 = call double @llvm.fmuladd.f64(double %68, double %71, double %78)
%80 = load double*, double** %8
%81 = getelementptr inbounds double, double* %80, i64 2
%82 = load double, double* %81
%83 = load double*, double** %8
%84 = getelementptr inbounds double, double* %83, i64 2
%85 = load double, double* %84
%86 = call double @llvm.fmuladd.f64(double %82, double %85, double %79)
store double %86, double* %11
%87 = load double*, double** %7
%88 = getelementptr inbounds double, double* %87, i64 0
%89 = load double, double* %88
%90 = load double*, double** %8
%91 = getelementptr inbounds double, double* %90, i64 0
%92 = load double, double* %91
%93 = load double*, double** %7
%94 = getelementptr inbounds double, double* %93, i64 1
%95 = load double, double* %94
%96 = load double*, double** %8
%97 = getelementptr inbounds double, double* %96, i64 1
%98 = load double, double* %97
%99 = fmul double %95, %98
%100 = call double @llvm.fmuladd.f64(double %89, double %92, double %99)
%101 = load double*, double** %7
%102 = getelementptr inbounds double, double* %101, i64 2
%103 = load double, double* %102
%104 = load double*, double** %8
%105 = getelementptr inbounds double, double* %104, i64 2
%106 = load double, double* %105
%107 = call double @llvm.fmuladd.f64(double %103, double %106, double %100)
store double %107, double* %12
%108 = load double, double* %6
%109 = fmul double 2.000000e+00, %108
%110 = load double, double* %10
%111 = fdiv double %109, %110
%112 = load double, double* %11
%113 = fsub double %111, %112
store double %113, double* %17
%114 = load double, double* %17
%115 = fcmp ogt double %114, 0.000000e+00
br i1 %115, label %116, label %153
116: ; preds = %4
%117 = load double, double* %6
%118 = fmul double 0x401921FB54442D18, %117
%119 = load double, double* %17
%120 = load double, double* %17
%121 = fmul double %119, %120
%122 = load double, double* %17
%123 = fmul double %121, %122
%124 = call double @sqrt(double %123)
%125 = fdiv double %118, %124
store double %125, double* %18
%126 = load double, double* %9
%127 = load double, double* %18
%128 = fdiv double %127, 2.000000e+00
%129 = fadd double %126, %128
%130 = load double, double* %12
%131 = fmul double 2.000000e+00, %130
%132 = load double, double* %17
%133 = fdiv double %131, %132
%134 = fsub double %129, %133
%135 = load double, double* %18
%136 = fdiv double %134, %135
%137 = call i32 @floor(double %136)
store i32 %137, i32* %20
%138 = load i32, i32* %20
%139 = mul nsw i32 2, %138
%140 = sitofp i32 %139 to double
%141 = fmul double %140, 0x400921FB54442D18
%142 = load double, double* %17
%143 = load double, double* %17
%144 = fmul double %142, %143
%145 = load double, double* %17
%146 = fmul double %144, %145
%147 = load double, double* %17
%148 = fmul double %146, %147
%149 = load double, double* %17
%150 = fmul double %148, %149
%151 = call double @sqrt(double %150)
%152 = fdiv double %141, %151
store double %152, double* %19
br label %154
153: ; preds = %4
store double 0.000000e+00, double* %19
br label %154
154: ; preds = %153, %116
%155 = load double, double* %9
%156 = load double, double* %10
%157 = fmul double 4.000000e+00, %156
%158 = fdiv double %155, %157
store double %158, double* %16
store i32 0, i32* %37
br label %159
159: ; preds = %323, %154
%160 = load double, double* %17
%161 = load double, double* %16
%162 = fmul double %160, %161
%163 = load double, double* %16
%164 = fmul double %162, %163
%165 = load double, double* %17
%166 = load double, double* %16
%167 = fmul double %165, %166
%168 = load double, double* %16
%169 = call double @llvm.fmuladd.f64(double %167, double %168, double 1.000000e+00)
%170 = fdiv double %164, %169
store double %170, double* %21
%171 = load double, double* %21
%172 = fcmp ogt double %171, 5.000000e-01
br i1 %172, label %176, label %173
173: ; preds = %159
%174 = load i32, i32* %37
%175 = icmp sgt i32 %174, 12
br i1 %175, label %176, label %177
176: ; preds = %173, %159
store i32 -1, i32* %5
br label %419
177: ; preds = %173
%178 = load double, double* %17
%179 = fmul double 2.000000e+00, %178
%180 = load double, double* %16
%181 = fmul double %179, %180
%182 = load double, double* %17
%183 = load double, double* %16
%184 = fmul double %182, %183
%185 = load double, double* %16
%186 = call double @llvm.fmuladd.f64(double %184, double %185, double 1.000000e+00)
%187 = fdiv double %181, %186
%188 = load double, double* %17
%189 = load double, double* %16
%190 = fmul double %188, %189
%191 = load double, double* %16
%192 = call double @llvm.fmuladd.f64(double %190, double %191, double 1.000000e+00)
%193 = fdiv double %187, %192
store double %193, double* %39
%194 = load double, double* %21
%195 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %194, double 1.000000e+00)
store double %195, double* %22
%196 = load double, double* %21
%197 = fsub double 1.000000e+00, %196
%198 = fmul double 2.000000e+00, %197
%199 = load double, double* %16
%200 = fmul double %198, %199
store double %200, double* %23
%201 = load double, double* %23
%202 = fmul double 0x3FF1111111111111, %201
%203 = load double, double* %23
%204 = fmul double %202, %203
%205 = load double, double* %23
%206 = fmul double %204, %205
%207 = load double, double* %23
%208 = fmul double %206, %207
%209 = load double, double* %23
%210 = fmul double %208, %209
%211 = load double, double* %21
%212 = call double @G_func2(double %211)
%213 = load double, double* %19
%214 = call double @llvm.fmuladd.f64(double %210, double %212, double %213)
store double %214, double* %24
%215 = load double, double* %22
%216 = fmul double 2.000000e+00, %215
%217 = load double, double* %22
%218 = call double @llvm.fmuladd.f64(double %216, double %217, double -1.000000e+00)
store double %218, double* %25
%219 = load double, double* %22
%220 = fmul double 2.000000e+00, %219
%221 = load double, double* %23
%222 = fmul double %220, %221
store double %222, double* %26
%223 = load double, double* %23
%224 = fmul double 2.000000e+00, %223
%225 = load double, double* %23
%226 = fmul double %224, %225
store double %226, double* %27
%227 = load double, double* %17
%228 = load double, double* %24
%229 = load double, double* %26
%230 = load double, double* %27
%231 = fmul double %229, %230
%232 = fdiv double %231, 3.000000e+00
%233 = call double @llvm.fmuladd.f64(double %227, double %228, double %232)
store double %233, double* %28
%234 = load double, double* %10
%235 = load double, double* %25
%236 = load double, double* %12
%237 = load double, double* %26
%238 = fmul double %236, %237
%239 = call double @llvm.fmuladd.f64(double %234, double %235, double %238)
%240 = load double, double* %6
%241 = load double, double* %27
%242 = call double @llvm.fmuladd.f64(double %240, double %241, double %239)
store double %242, double* %13
%243 = load double, double* %21
%244 = fsub double 1.000000e+00, %243
%245 = fmul double 4.000000e+00, %244
%246 = load double, double* %12
%247 = load double, double* %25
%248 = load double, double* %6
%249 = load double, double* %17
%250 = load double, double* %10
%251 = fneg double %249
%252 = call double @llvm.fmuladd.f64(double %251, double %250, double %248)
%253 = load double, double* %26
%254 = fmul double %252, %253
%255 = call double @llvm.fmuladd.f64(double %246, double %247, double %254)
%256 = fmul double %245, %255
store double %256, double* %40
%257 = load double, double* %10
%258 = load double, double* %26
%259 = load double, double* %12
%260 = load double, double* %27
%261 = fmul double %259, %260
%262 = call double @llvm.fmuladd.f64(double %257, double %258, double %261)
%263 = load double, double* %6
%264 = load double, double* %28
%265 = call double @llvm.fmuladd.f64(double %263, double %264, double %262)
store double %265, double* %14
%266 = load double, double* %14
%267 = load double, double* %9
%268 = fsub double %266, %267
store double %268, double* %41
%269 = load double, double* %21
%270 = fsub double 1.000000e+00, %269
%271 = fmul double 4.000000e+00, %270
%272 = load double, double* %13
%273 = fmul double %271, %272
store double %273, double* %42
%274 = load double, double* %40
%275 = load double, double* %21
%276 = fsub double 1.000000e+00, %275
%277 = load double, double* %13
%278 = load double, double* %39
%279 = fmul double %277, %278
%280 = fneg double %279
%281 = call double @llvm.fmuladd.f64(double %274, double %276, double %280)
%282 = fmul double 4.000000e+00, %281
store double %282, double* %43
%283 = load double, double* %36
%284 = fneg double %283
%285 = load double, double* %41
%286 = fmul double %284, %285
%287 = load double, double* %42
%288 = load double, double* %42
%289 = call double @dsignum(double %288)
%290 = load double, double* %36
%291 = fsub double %290, 1.000000e+00
%292 = load double, double* %36
%293 = fsub double %292, 1.000000e+00
%294 = fmul double %291, %293
%295 = load double, double* %42
%296 = fmul double %294, %295
%297 = load double, double* %42
%298 = load double, double* %36
%299 = load double, double* %36
%300 = fsub double %299, 1.000000e+00
%301 = fmul double %298, %300
%302 = load double, double* %41
%303 = fmul double %301, %302
%304 = load double, double* %43
%305 = fmul double %303, %304
%306 = fneg double %305
%307 = call double @llvm.fmuladd.f64(double %296, double %297, double %306)
%308 = call double @llvm.fabs.f64(double %307)
%309 = call double @sqrt(double %308)
%310 = call double @llvm.fmuladd.f64(double %289, double %309, double %287)
%311 = fdiv double %286, %310
store double %311, double* %38
%312 = load double, double* %38
%313 = load double, double* %16
%314 = fadd double %313, %312
store double %314, double* %16
%315 = load i32, i32* %37
%316 = add nsw i32 %315, 1
store i32 %316, i32* %37
%317 = load double, double* %9
%318 = load double, double* %14
%319 = fsub double %317, %318
%320 = load double, double* %9
%321 = fdiv double %319, %320
%322 = call double @llvm.fabs.f64(double %321)
store double %322, double* %15
br label %323
323: ; preds = %177
%324 = load double, double* %15
%325 = fcmp ogt double %324, 1.000000e-10
br i1 %325, label %159, label %326
326: ; preds = %323
%327 = load double, double* %6
%328 = load double, double* %10
%329 = fdiv double %327, %328
%330 = load double, double* %27
%331 = fneg double %329
%332 = call double @llvm.fmuladd.f64(double %331, double %330, double 1.000000e+00)
store double %332, double* %29
%333 = load double, double* %10
%334 = load double, double* %26
%335 = load double, double* %12
%336 = load double, double* %27
%337 = fmul double %335, %336
%338 = call double @llvm.fmuladd.f64(double %333, double %334, double %337)
store double %338, double* %30
%339 = load double, double* %6
%340 = fneg double %339
%341 = load double, double* %26
%342 = fmul double %340, %341
%343 = load double, double* %13
%344 = load double, double* %10
%345 = fmul double %343, %344
%346 = fdiv double %342, %345
store double %346, double* %31
%347 = load double, double* %6
%348 = load double, double* %13
%349 = fdiv double %347, %348
%350 = load double, double* %27
%351 = fneg double %349
%352 = call double @llvm.fmuladd.f64(double %351, double %350, double 1.000000e+00)
store double %352, double* %32
store i32 0, i32* %35
br label %353
353: ; preds = %391, %326
%354 = load i32, i32* %35
%355 = icmp slt i32 %354, 3
br i1 %355, label %356, label %394
356: ; preds = %353
%357 = load double, double* %29
%358 = load double*, double** %7
%359 = load i32, i32* %35
%360 = sext i32 %359 to i64
%361 = getelementptr inbounds double, double* %358, i64 %360
%362 = load double, double* %361
%363 = load double, double* %30
%364 = load double*, double** %8
%365 = load i32, i32* %35
%366 = sext i32 %365 to i64
%367 = getelementptr inbounds double, double* %364, i64 %366
%368 = load double, double* %367
%369 = fmul double %363, %368
%370 = call double @llvm.fmuladd.f64(double %357, double %362, double %369)
%371 = load i32, i32* %35
%372 = sext i32 %371 to i64
%373 = getelementptr inbounds [3 x double], [3 x double]* %33, i64 0, i64 %372
store double %370, double* %373
%374 = load double, double* %31
%375 = load double*, double** %7
%376 = load i32, i32* %35
%377 = sext i32 %376 to i64
%378 = getelementptr inbounds double, double* %375, i64 %377
%379 = load double, double* %378
%380 = load double, double* %32
%381 = load double*, double** %8
%382 = load i32, i32* %35
%383 = sext i32 %382 to i64
%384 = getelementptr inbounds double, double* %381, i64 %383
%385 = load double, double* %384
%386 = fmul double %380, %385
%387 = call double @llvm.fmuladd.f64(double %374, double %379, double %386)
%388 = load i32, i32* %35
%389 = sext i32 %388 to i64
%390 = getelementptr inbounds [3 x double], [3 x double]* %34, i64 0, i64 %389
store double %387, double* %390
br label %391
391: ; preds = %356
%392 = load i32, i32* %35
%393 = add nsw i32 %392, 1
store i32 %393, i32* %35
br label %353
394: ; preds = %353
store i32 0, i32* %35
br label %395
395: ; preds = %415, %394
%396 = load i32, i32* %35
%397 = icmp slt i32 %396, 3
br i1 %397, label %398, label %418
398: ; preds = %395
%399 = load i32, i32* %35
%400 = sext i32 %399 to i64
%401 = getelementptr inbounds [3 x double], [3 x double]* %33, i64 0, i64 %400
%402 = load double, double* %401
%403 = load double*, double** %7
%404 = load i32, i32* %35
%405 = sext i32 %404 to i64
%406 = getelementptr inbounds double, double* %403, i64 %405
store double %402, double* %406
%407 = load i32, i32* %35
%408 = sext i32 %407 to i64
%409 = getelementptr inbounds [3 x double], [3 x double]* %34, i64 0, i64 %408
%410 = load double, double* %409
%411 = load double*, double** %8
%412 = load i32, i32* %35
%413 = sext i32 %412 to i64
%414 = getelementptr inbounds double, double* %411, i64 %413
store double %410, double* %414
br label %415
415: ; preds = %398
%416 = load i32, i32* %35
%417 = add nsw i32 %416, 1
store i32 %417, i32* %35
br label %395
418: ; preds = %395
store i32 0, i32* %5
br label %419
419: ; preds = %418, %176
%420 = load i32, i32* %5
ret i32 %420
}

LLVM IR (-O2):
define i32 @lkep_drift3(double %0, double* nocapture %1, double* nocapture %2, double %3) {
%5 = load double, double* %1
%6 = getelementptr inbounds double, double* %1, i64 1
%7 = load double, double* %6
%8 = fmul double %7, %7
%9 = tail call double @llvm.fmuladd.f64(double %5, double %5, double %8)
%10 = getelementptr inbounds double, double* %1, i64 2
%11 = load double, double* %10
%12 = tail call double @llvm.fmuladd.f64(double %11, double %11, double %9)
%13 = tail call double @sqrt(double %12)
%14 = load double, double* %2
%15 = getelementptr inbounds double, double* %2, i64 1
%16 = load double, double* %15
%17 = fmul double %16, %16
%18 = tail call double @llvm.fmuladd.f64(double %14, double %14, double %17)
%19 = getelementptr inbounds double, double* %2, i64 2
%20 = load double, double* %19
%21 = tail call double @llvm.fmuladd.f64(double %20, double %20, double %18)
%22 = load double, double* %1
%23 = load double, double* %6
%24 = fmul double %16, %23
%25 = tail call double @llvm.fmuladd.f64(double %22, double %14, double %24)
%26 = load double, double* %10
%27 = tail call double @llvm.fmuladd.f64(double %26, double %20, double %25)
%28 = fmul double %0, 2.000000e+00
%29 = fdiv double %28, %13
%30 = fsub double %29, %21
%31 = fcmp ogt double %30, 0.000000e+00
br i1 %31, label %32, label %56
32: ; preds = %4
%33 = fmul double %30, %30
%34 = fmul double %30, %33
%35 = tail call double @sqrt(double %34)
%36 = insertelement <2 x double> poison, double %0, i64 1
%37 = insertelement <2 x double> %36, double %27, i64 0
%38 = fmul <2 x double> %37, <double 2.000000e+00, double 0x401921FB54442D18>
%39 = insertelement <2 x double> poison, double %30, i64 0
%40 = insertelement <2 x double> %39, double %35, i64 1
%41 = fdiv <2 x double> %38, %40
%42 = extractelement <2 x double> %41, i64 1
%43 = fmul double %42, 5.000000e-01
%44 = fadd double %43, %3
%45 = extractelement <2 x double> %41, i64 0
%46 = fsub double %44, %45
%47 = fdiv double %46, %42
%48 = tail call i32 @floor(double %47)
%49 = shl nsw i32 %48, 1
%50 = sitofp i32 %49 to double
%51 = fmul double %50, 0x400921FB54442D18
%52 = fmul double %30, %34
%53 = fmul double %30, %52
%54 = tail call double @sqrt(double %53)
%55 = fdiv double %51, %54
br label %56
56: ; preds = %4, %32
%57 = phi double [ %55, %32 ], [ 0.000000e+00, %4 ]
%58 = fmul double %13, 4.000000e+00
%59 = fdiv double %3, %58
%60 = fmul double %30, 2.000000e+00
%61 = fneg double %30
%62 = tail call double @llvm.fmuladd.f64(double %61, double %13, double %0)
br label %63
63: ; preds = %73, %56
%64 = phi i32 [ 0, %56 ], [ %128, %73 ]
%65 = phi double [ %59, %56 ], [ %127, %73 ]
%66 = fmul double %30, %65
%67 = fmul double %65, %66
%68 = tail call double @llvm.fmuladd.f64(double %66, double %65, double 1.000000e+00)
%69 = fdiv double %67, %68
%70 = fcmp ogt double %69, 5.000000e-01
%71 = icmp ugt i32 %64, 12
%72 = select i1 %70, i1 true, i1 %71
br i1 %72, label %161, label %73
73: ; preds = %63
%74 = fmul double %60, %65
%75 = fdiv double %74, %68
%76 = fdiv double %75, %68
%77 = tail call double @llvm.fmuladd.f64(double %69, double -2.000000e+00, double 1.000000e+00)
%78 = fsub double 1.000000e+00, %69
%79 = fmul double %78, 2.000000e+00
%80 = fmul double %65, %79
%81 = fmul double %80, 0x3FF1111111111111
%82 = fmul double %80, %81
%83 = fmul double %80, %82
%84 = fmul double %80, %83
%85 = fmul double %80, %84
%86 = tail call double @G_func2(double %69)
%87 = tail call double @llvm.fmuladd.f64(double %85, double %86, double %57)
%88 = insertelement <2 x double> poison, double %77, i64 0
%89 = insertelement <2 x double> %88, double %80, i64 1
%90 = fmul <2 x double> %89, <double 2.000000e+00, double 2.000000e+00>
%91 = extractelement <2 x double> %90, i64 0
%92 = tail call double @llvm.fmuladd.f64(double %91, double %77, double -1.000000e+00)
%93 = insertelement <2 x double> poison, double %80, i64 0
%94 = shufflevector <2 x double> %93, <2 x double> poison, <2 x i32> zeroinitializer
%95 = fmul <2 x double> %94, %90
%96 = extractelement <2 x double> %95, i64 0
%97 = extractelement <2 x double> %95, i64 1
%98 = fmul double %96, %97
%99 = fdiv double %98, 3.000000e+00
%100 = tail call double @llvm.fmuladd.f64(double %30, double %87, double %99)
%101 = fmul double %27, %96
%102 = tail call double @llvm.fmuladd.f64(double %13, double %92, double %101)
%103 = tail call double @llvm.fmuladd.f64(double %0, double %97, double %102)
%104 = fmul double %78, 4.000000e+00
%105 = fmul double %62, %96
%106 = tail call double @llvm.fmuladd.f64(double %27, double %92, double %105)
%107 = fmul double %104, %106
%108 = fmul double %27, %97
%109 = tail call double @llvm.fmuladd.f64(double %13, double %96, double %108)
%110 = tail call double @llvm.fmuladd.f64(double %0, double %100, double %109)
%111 = fsub double %110, %3
%112 = fmul double %104, %103
%113 = fneg double %103
%114 = fmul double %76, %113
%115 = tail call double @llvm.fmuladd.f64(double %107, double %78, double %114)
%116 = fmul double %115, 4.000000e+00
%117 = fmul double %111, 5.000000e+00
%118 = tail call double @dsignum(double %112)
%119 = fmul double %112, 1.600000e+01
%120 = fmul double %111, -2.000000e+01
%121 = fmul double %116, %120
%122 = tail call double @llvm.fmuladd.f64(double %119, double %112, double %121)
%123 = tail call double @llvm.fabs.f64(double %122)
%124 = tail call double @sqrt(double %123)
%125 = tail call double @llvm.fmuladd.f64(double %118, double %124, double %112)
%126 = fdiv double %117, %125
%127 = fsub double %65, %126
%128 = add nuw nsw i32 %64, 1
%129 = fsub double %3, %110
%130 = fdiv double %129, %3
%131 = tail call double @llvm.fabs.f64(double %130)
%132 = fcmp ogt double %131, 1.000000e-10
br i1 %132, label %63, label %133
133: ; preds = %73
%134 = extractelement <2 x double> %95, i64 0
%135 = fneg double %0
%136 = fdiv double %135, %13
%137 = tail call double @llvm.fmuladd.f64(double %136, double %97, double 1.000000e+00)
%138 = fmul double %134, %135
%139 = fmul double %13, %103
%140 = fdiv double %138, %139
%141 = fdiv double %135, %103
%142 = tail call double @llvm.fmuladd.f64(double %141, double %97, double 1.000000e+00)
%143 = load double, double* %1
%144 = load double, double* %2
%145 = fmul double %109, %144
%146 = tail call double @llvm.fmuladd.f64(double %137, double %143, double %145)
%147 = fmul double %142, %144
%148 = tail call double @llvm.fmuladd.f64(double %140, double %143, double %147)
%149 = load double, double* %6
%150 = load double, double* %15
%151 = fmul double %109, %150
%152 = tail call double @llvm.fmuladd.f64(double %137, double %149, double %151)
%153 = fmul double %142, %150
%154 = tail call double @llvm.fmuladd.f64(double %140, double %149, double %153)
%155 = load double, double* %10
%156 = load double, double* %19
%157 = fmul double %109, %156
%158 = tail call double @llvm.fmuladd.f64(double %137, double %155, double %157)
%159 = fmul double %142, %156
%160 = tail call double @llvm.fmuladd.f64(double %140, double %155, double %159)
store double %146, double* %1
store double %148, double* %2
store double %152, double* %6
store double %154, double* %15
store double %158, double* %10
store double %160, double* %19
br label %161
161: ; preds = %63, %133
%162 = phi i32 [ 0, %133 ], [ -1, %63 ]
ret i32 %162
}