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

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ LF_GBS_drift(double *, double *, int, double);
int /*<<< orphan*/ LF_GBS_kick(double *, double *, double *, int, double);
int /*<<< orphan*/ abort();
scalar_t__ isinf(double);
scalar_t__ isnan(double);
void adv_DKD_LF_GBS(double *r0, double *v0, double *r, double *v, double *m,
                    int N, double H, double n) {
  int i, k;
  double dt;
  dt = H / n;
  for (i = 0; i < 3 * N; i++) {
    r[i] = r0[i];
    v[i] = v0[i];
  }
  LF_GBS_drift(r, v, N, 0.5 * dt);
  if (isnan(r[0]) || isnan(v[0]))
    abort();
  if (isinf(r[0]) || isinf(v[0]))
    abort();
  for (k = 0; k < (n - 1); k++) {
    LF_GBS_kick(r, v, m, N, dt);
    if (isnan(r[0]) || isnan(v[0]))
      abort();
    if (isinf(r[0]) || isinf(v[0]))
      abort();
    LF_GBS_drift(r, v, N, dt);
    if (isnan(r[0]) || isnan(v[0]))
      abort();
    if (isinf(r[0]) || isinf(v[0]))
      abort();
  }
  LF_GBS_kick(r, v, m, N, dt);
  if (isnan(r[0]) || isnan(v[0]))
    abort();
  if (isinf(r[0]) || isinf(v[0]))
    abort();
  LF_GBS_drift(r, v, N, 0.5 * dt);
  if (isnan(r[0]) || isnan(v[0]))
    abort();
  if (isinf(r[0]) || isinf(v[0]))
    abort();
}


x86 assembly (clang, -O0):
<adv_DKD_LF_GBS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
movsd  %xmm0,-0x38(%rbp)
movsd  %xmm1,-0x40(%rbp)
movsd  -0x38(%rbp),%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
imul   $0x3,-0x2c(%rbp),%ecx
cmp    %ecx,%eax
jge    11e1 <adv_DKD_LF_GBS+0x91>
mov    -0x8(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1190 <adv_DKD_LF_GBS+0x40>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x2c(%rbp),%edx
movsd  0xe0c(%rip),%xmm0
mulsd  -0x50(%rbp),%xmm0
call   1050 <LF_GBS_drift@plt>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
call   1060 <isnan@plt>
cmp    $0x0,%rax
jne    122c <adv_DKD_LF_GBS+0xdc>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
call   1060 <isnan@plt>
cmp    $0x0,%rax
je     1233 <adv_DKD_LF_GBS+0xe3>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
call   1070 <isinf@plt>
cmp    $0x0,%rax
jne    1261 <adv_DKD_LF_GBS+0x111>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
call   1070 <isinf@plt>
cmp    $0x0,%rax
je     1268 <adv_DKD_LF_GBS+0x118>
mov    $0x0,%al
call   1030 <abort@plt>
movl   $0x0,-0x48(%rbp)
cvtsi2sdl -0x48(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm0
movsd  0xd87(%rip),%xmm2
subsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jbe    13a4 <adv_DKD_LF_GBS+0x254>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x2c(%rbp),%ecx
movsd  -0x50(%rbp),%xmm0
call   1040 <LF_GBS_kick@plt>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
call   1060 <isnan@plt>
cmp    $0x0,%rax
jne    12d6 <adv_DKD_LF_GBS+0x186>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
call   1060 <isnan@plt>
cmp    $0x0,%rax
je     12dd <adv_DKD_LF_GBS+0x18d>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
call   1070 <isinf@plt>
cmp    $0x0,%rax
jne    130b <adv_DKD_LF_GBS+0x1bb>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
call   1070 <isinf@plt>
cmp    $0x0,%rax
je     1312 <adv_DKD_LF_GBS+0x1c2>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x2c(%rbp),%edx
movsd  -0x50(%rbp),%xmm0
call   1050 <LF_GBS_drift@plt>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
call   1060 <isnan@plt>
cmp    $0x0,%rax
jne    1355 <adv_DKD_LF_GBS+0x205>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
call   1060 <isnan@plt>
cmp    $0x0,%rax
je     135c <adv_DKD_LF_GBS+0x20c>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
call   1070 <isinf@plt>
cmp    $0x0,%rax
jne    138a <adv_DKD_LF_GBS+0x23a>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
call   1070 <isinf@plt>
cmp    $0x0,%rax
je     1391 <adv_DKD_LF_GBS+0x241>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    1396 <adv_DKD_LF_GBS+0x246>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    126f <adv_DKD_LF_GBS+0x11f>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x2c(%rbp),%ecx
movsd  -0x50(%rbp),%xmm0
call   1040 <LF_GBS_kick@plt>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
call   1060 <isnan@plt>
cmp    $0x0,%rax
jne    13eb <adv_DKD_LF_GBS+0x29b>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
call   1060 <isnan@plt>
cmp    $0x0,%rax
je     13f2 <adv_DKD_LF_GBS+0x2a2>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
call   1070 <isinf@plt>
cmp    $0x0,%rax
jne    1420 <adv_DKD_LF_GBS+0x2d0>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
call   1070 <isinf@plt>
cmp    $0x0,%rax
je     1427 <adv_DKD_LF_GBS+0x2d7>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x2c(%rbp),%edx
movsd  0xbc6(%rip),%xmm0
mulsd  -0x50(%rbp),%xmm0
call   1050 <LF_GBS_drift@plt>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
call   1060 <isnan@plt>
cmp    $0x0,%rax
jne    1472 <adv_DKD_LF_GBS+0x322>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
call   1060 <isnan@plt>
cmp    $0x0,%rax
je     1479 <adv_DKD_LF_GBS+0x329>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
call   1070 <isinf@plt>
cmp    $0x0,%rax
jne    14a7 <adv_DKD_LF_GBS+0x357>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
call   1070 <isinf@plt>
cmp    $0x0,%rax
je     14ae <adv_DKD_LF_GBS+0x35e>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<adv_DKD_LF_GBS>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %r9d,%r15d
mov    %r8,%r12
mov    %rcx,%r14
mov    %rdx,%rbx
movsd  %xmm1,0x20(%rsp)
divsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rsp)
test   %r9d,%r9d
jle    1357 <adv_DKD_LF_GBS+0x207>
lea    (%r15,%r15,2),%ecx
cmp    $0x2,%ecx
mov    $0x1,%eax
cmovge %ecx,%eax
cmp    $0x4,%eax
jae    119e <adv_DKD_LF_GBS+0x4e>
xor    %ecx,%ecx
jmp    12f3 <adv_DKD_LF_GBS+0x1a3>
lea    (%r14,%rax,8),%rcx
cmp    %rbx,%rcx
seta   0x18(%rsp)
lea    (%rbx,%rax,8),%rbp
cmp    %r14,%rbp
seta   %r11b
lea    (%rdi,%rax,8),%rdx
cmp    %rbx,%rdx
seta   %r13b
cmp    %rdi,%rbp
seta   0xf(%rsp)
lea    (%rsi,%rax,8),%r10
cmp    %rbx,%r10
seta   %r8b
cmp    %rsi,%rbp
seta   %bpl
cmp    %r14,%rdx
seta   %r9b
cmp    %rdi,%rcx
seta   %dl
cmp    %r14,%r10
seta   %r10b
cmp    %rsi,%rcx
seta   0xe(%rsp)
xor    %ecx,%ecx
test   %r11b,0x18(%rsp)
jne    12f3 <adv_DKD_LF_GBS+0x1a3>
and    0xf(%rsp),%r13b
jne    12f3 <adv_DKD_LF_GBS+0x1a3>
and    %bpl,%r8b
jne    12f3 <adv_DKD_LF_GBS+0x1a3>
and    %dl,%r9b
jne    12f3 <adv_DKD_LF_GBS+0x1a3>
and    0xe(%rsp),%r10b
jne    12f3 <adv_DKD_LF_GBS+0x1a3>
mov    %eax,%ecx
and    $0x7ffffffc,%ecx
lea    -0x4(%rcx),%rdx
mov    %rdx,%r8
shr    $0x2,%r8
add    $0x1,%r8
test   %rdx,%rdx
je     157f <adv_DKD_LF_GBS+0x42f>
mov    %r8,%rbp
and    $0xfffffffffffffffe,%rbp
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movups (%rdi,%rdx,8),%xmm0
movups 0x10(%rdi,%rdx,8),%xmm1
movups %xmm0,(%rbx,%rdx,8)
movups %xmm1,0x10(%rbx,%rdx,8)
movups (%rsi,%rdx,8),%xmm0
movups 0x10(%rsi,%rdx,8),%xmm1
movups %xmm0,(%r14,%rdx,8)
movups %xmm1,0x10(%r14,%rdx,8)
movups 0x20(%rdi,%rdx,8),%xmm0
movups 0x30(%rdi,%rdx,8),%xmm1
movups %xmm0,0x20(%rbx,%rdx,8)
movups %xmm1,0x30(%rbx,%rdx,8)
movupd 0x20(%rsi,%rdx,8),%xmm0
movupd 0x30(%rsi,%rdx,8),%xmm1
movupd %xmm0,0x20(%r14,%rdx,8)
movupd %xmm1,0x30(%r14,%rdx,8)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%rbp
jne    1260 <adv_DKD_LF_GBS+0x110>
test   $0x1,%r8b
je     12ee <adv_DKD_LF_GBS+0x19e>
movups (%rdi,%rdx,8),%xmm0
movups 0x10(%rdi,%rdx,8),%xmm1
movups %xmm0,(%rbx,%rdx,8)
movups %xmm1,0x10(%rbx,%rdx,8)
movupd (%rsi,%rdx,8),%xmm0
movupd 0x10(%rsi,%rdx,8),%xmm1
movupd %xmm0,(%r14,%rdx,8)
movupd %xmm1,0x10(%r14,%rdx,8)
cmp    %rax,%rcx
je     1357 <adv_DKD_LF_GBS+0x207>
mov    %rcx,%rdx
not    %rdx
test   $0x1,%al
je     1316 <adv_DKD_LF_GBS+0x1c6>
movsd  (%rdi,%rcx,8),%xmm0
movsd  %xmm0,(%rbx,%rcx,8)
movsd  (%rsi,%rcx,8),%xmm0
movsd  %xmm0,(%r14,%rcx,8)
or     $0x1,%rcx
add    %rax,%rdx
je     1357 <adv_DKD_LF_GBS+0x207>
nopl   0x0(%rax,%rax,1)
movsd  (%rdi,%rcx,8),%xmm0
movsd  %xmm0,(%rbx,%rcx,8)
movsd  (%rsi,%rcx,8),%xmm0
movsd  %xmm0,(%r14,%rcx,8)
movsd  0x8(%rdi,%rcx,8),%xmm0
movsd  %xmm0,0x8(%rbx,%rcx,8)
movsd  0x8(%rsi,%rcx,8),%xmm0
movsd  %xmm0,0x8(%r14,%rcx,8)
add    $0x2,%rcx
cmp    %rcx,%rax
jne    1320 <adv_DKD_LF_GBS+0x1d0>
movsd  0xca1(%rip),%xmm0
mulsd  0x10(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15d,%edx
movsd  %xmm0,0x18(%rsp)
call   1050 <LF_GBS_drift@plt>
movsd  (%rbx),%xmm0
call   1060 <isnan@plt>
test   %rax,%rax
jne    1590 <adv_DKD_LF_GBS+0x440>
movsd  (%r14),%xmm0
call   1060 <isnan@plt>
test   %rax,%rax
jne    1590 <adv_DKD_LF_GBS+0x440>
movsd  (%rbx),%xmm0
call   1070 <isinf@plt>
test   %rax,%rax
jne    1590 <adv_DKD_LF_GBS+0x440>
movsd  (%r14),%xmm0
call   1070 <isinf@plt>
test   %rax,%rax
jne    1590 <adv_DKD_LF_GBS+0x440>
movsd  0x20(%rsp),%xmm1
addsd  0xc37(%rip),%xmm1
xorpd  %xmm0,%xmm0
movsd  %xmm1,0x20(%rsp)
ucomisd %xmm0,%xmm1
jbe    14c9 <adv_DKD_LF_GBS+0x379>
mov    $0x1,%ebp
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r12,%rdx
mov    %r15d,%ecx
movsd  0x10(%rsp),%xmm0
call   1040 <LF_GBS_kick@plt>
movsd  (%rbx),%xmm0
call   1060 <isnan@plt>
test   %rax,%rax
jne    1590 <adv_DKD_LF_GBS+0x440>
movsd  (%r14),%xmm0
call   1060 <isnan@plt>
test   %rax,%rax
jne    1590 <adv_DKD_LF_GBS+0x440>
movsd  (%rbx),%xmm0
call   1070 <isinf@plt>
test   %rax,%rax
jne    1590 <adv_DKD_LF_GBS+0x440>
movsd  (%r14),%xmm0
call   1070 <isinf@plt>
test   %rax,%rax
jne    1590 <adv_DKD_LF_GBS+0x440>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15d,%edx
movsd  0x10(%rsp),%xmm0
call   1050 <LF_GBS_drift@plt>
movsd  (%rbx),%xmm0
call   1060 <isnan@plt>
test   %rax,%rax
jne    1590 <adv_DKD_LF_GBS+0x440>
movsd  (%r14),%xmm0
call   1060 <isnan@plt>
test   %rax,%rax
jne    1590 <adv_DKD_LF_GBS+0x440>
movsd  (%rbx),%xmm0
call   1070 <isinf@plt>
test   %rax,%rax
jne    1590 <adv_DKD_LF_GBS+0x440>
movsd  (%r14),%xmm0
call   1070 <isinf@plt>
test   %rax,%rax
jne    1590 <adv_DKD_LF_GBS+0x440>
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
add    $0x1,%ebp
movsd  0x20(%rsp),%xmm1
ucomisd %xmm0,%xmm1
ja     13f0 <adv_DKD_LF_GBS+0x2a0>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r12,%rdx
mov    %r15d,%ecx
movsd  0x10(%rsp),%xmm0
call   1040 <LF_GBS_kick@plt>
movsd  (%rbx),%xmm0
call   1060 <isnan@plt>
test   %rax,%rax
jne    1590 <adv_DKD_LF_GBS+0x440>
movsd  (%r14),%xmm0
call   1060 <isnan@plt>
test   %rax,%rax
jne    1590 <adv_DKD_LF_GBS+0x440>
movsd  (%rbx),%xmm0
call   1070 <isinf@plt>
test   %rax,%rax
jne    1590 <adv_DKD_LF_GBS+0x440>
movsd  (%r14),%xmm0
call   1070 <isinf@plt>
test   %rax,%rax
jne    1590 <adv_DKD_LF_GBS+0x440>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15d,%edx
movsd  0x18(%rsp),%xmm0
call   1050 <LF_GBS_drift@plt>
movsd  (%rbx),%xmm0
call   1060 <isnan@plt>
test   %rax,%rax
jne    1590 <adv_DKD_LF_GBS+0x440>
movsd  (%r14),%xmm0
call   1060 <isnan@plt>
test   %rax,%rax
jne    1590 <adv_DKD_LF_GBS+0x440>
movsd  (%rbx),%xmm0
call   1070 <isinf@plt>
test   %rax,%rax
jne    1590 <adv_DKD_LF_GBS+0x440>
movsd  (%r14),%xmm0
call   1070 <isinf@plt>
test   %rax,%rax
jne    1590 <adv_DKD_LF_GBS+0x440>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %edx,%edx
test   $0x1,%r8b
jne    12c4 <adv_DKD_LF_GBS+0x174>
jmp    12ee <adv_DKD_LF_GBS+0x19e>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @adv_DKD_LF_GBS(double* %0, double* %1, double* %2, double* %3, double* %4, i32 %5, double %6, double %7) {
%9 = alloca double*
%10 = alloca double*
%11 = alloca double*
%12 = alloca double*
%13 = alloca double*
%14 = alloca i32
%15 = alloca double
%16 = alloca double
%17 = alloca i32
%18 = alloca i32
%19 = alloca double
store double* %0, double** %9
store double* %1, double** %10
store double* %2, double** %11
store double* %3, double** %12
store double* %4, double** %13
store i32 %5, i32* %14
store double %6, double* %15
store double %7, double* %16
%20 = load double, double* %15
%21 = load double, double* %16
%22 = fdiv double %20, %21
store double %22, double* %19
store i32 0, i32* %17
br label %23
23: ; preds = %47, %8
%24 = load i32, i32* %17
%25 = load i32, i32* %14
%26 = mul nsw i32 3, %25
%27 = icmp slt i32 %24, %26
br i1 %27, label %28, label %50
28: ; preds = %23
%29 = load double*, double** %9
%30 = load i32, i32* %17
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds double, double* %29, i64 %31
%33 = load double, double* %32
%34 = load double*, double** %11
%35 = load i32, i32* %17
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds double, double* %34, i64 %36
store double %33, double* %37
%38 = load double*, double** %10
%39 = load i32, i32* %17
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds double, double* %38, i64 %40
%42 = load double, double* %41
%43 = load double*, double** %12
%44 = load i32, i32* %17
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds double, double* %43, i64 %45
store double %42, double* %46
br label %47
47: ; preds = %28
%48 = load i32, i32* %17
%49 = add nsw i32 %48, 1
store i32 %49, i32* %17
br label %23
50: ; preds = %23
%51 = load double*, double** %11
%52 = load double*, double** %12
%53 = load i32, i32* %14
%54 = load double, double* %19
%55 = fmul double 5.000000e-01, %54
%56 = call i32 @LF_GBS_drift(double* %51, double* %52, i32 %53, double %55)
%57 = load double*, double** %11
%58 = getelementptr inbounds double, double* %57, i64 0
%59 = load double, double* %58
%60 = call i64 @isnan(double %59)
%61 = icmp ne i64 %60, 0
br i1 %61, label %68, label %62
62: ; preds = %50
%63 = load double*, double** %12
%64 = getelementptr inbounds double, double* %63, i64 0
%65 = load double, double* %64
%66 = call i64 @isnan(double %65)
%67 = icmp ne i64 %66, 0
br i1 %67, label %68, label %70
68: ; preds = %62, %50
%69 = call i32 (...) @abort()
unreachable
70: ; preds = %62
%71 = load double*, double** %11
%72 = getelementptr inbounds double, double* %71, i64 0
%73 = load double, double* %72
%74 = call i64 @isinf(double %73)
%75 = icmp ne i64 %74, 0
br i1 %75, label %82, label %76
76: ; preds = %70
%77 = load double*, double** %12
%78 = getelementptr inbounds double, double* %77, i64 0
%79 = load double, double* %78
%80 = call i64 @isinf(double %79)
%81 = icmp ne i64 %80, 0
br i1 %81, label %82, label %84
82: ; preds = %76, %70
%83 = call i32 (...) @abort()
unreachable
84: ; preds = %76
store i32 0, i32* %18
br label %85
85: ; preds = %159, %84
%86 = load i32, i32* %18
%87 = sitofp i32 %86 to double
%88 = load double, double* %16
%89 = fsub double %88, 1.000000e+00
%90 = fcmp olt double %87, %89
br i1 %90, label %91, label %162
91: ; preds = %85
%92 = load double*, double** %11
%93 = load double*, double** %12
%94 = load double*, double** %13
%95 = load i32, i32* %14
%96 = load double, double* %19
%97 = call i32 @LF_GBS_kick(double* %92, double* %93, double* %94, i32 %95, double %96)
%98 = load double*, double** %11
%99 = getelementptr inbounds double, double* %98, i64 0
%100 = load double, double* %99
%101 = call i64 @isnan(double %100)
%102 = icmp ne i64 %101, 0
br i1 %102, label %109, label %103
103: ; preds = %91
%104 = load double*, double** %12
%105 = getelementptr inbounds double, double* %104, i64 0
%106 = load double, double* %105
%107 = call i64 @isnan(double %106)
%108 = icmp ne i64 %107, 0
br i1 %108, label %109, label %111
109: ; preds = %103, %91
%110 = call i32 (...) @abort()
unreachable
111: ; preds = %103
%112 = load double*, double** %11
%113 = getelementptr inbounds double, double* %112, i64 0
%114 = load double, double* %113
%115 = call i64 @isinf(double %114)
%116 = icmp ne i64 %115, 0
br i1 %116, label %123, label %117
117: ; preds = %111
%118 = load double*, double** %12
%119 = getelementptr inbounds double, double* %118, i64 0
%120 = load double, double* %119
%121 = call i64 @isinf(double %120)
%122 = icmp ne i64 %121, 0
br i1 %122, label %123, label %125
123: ; preds = %117, %111
%124 = call i32 (...) @abort()
unreachable
125: ; preds = %117
%126 = load double*, double** %11
%127 = load double*, double** %12
%128 = load i32, i32* %14
%129 = load double, double* %19
%130 = call i32 @LF_GBS_drift(double* %126, double* %127, i32 %128, double %129)
%131 = load double*, double** %11
%132 = getelementptr inbounds double, double* %131, i64 0
%133 = load double, double* %132
%134 = call i64 @isnan(double %133)
%135 = icmp ne i64 %134, 0
br i1 %135, label %142, label %136
136: ; preds = %125
%137 = load double*, double** %12
%138 = getelementptr inbounds double, double* %137, i64 0
%139 = load double, double* %138
%140 = call i64 @isnan(double %139)
%141 = icmp ne i64 %140, 0
br i1 %141, label %142, label %144
142: ; preds = %136, %125
%143 = call i32 (...) @abort()
unreachable
144: ; preds = %136
%145 = load double*, double** %11
%146 = getelementptr inbounds double, double* %145, i64 0
%147 = load double, double* %146
%148 = call i64 @isinf(double %147)
%149 = icmp ne i64 %148, 0
br i1 %149, label %156, label %150
150: ; preds = %144
%151 = load double*, double** %12
%152 = getelementptr inbounds double, double* %151, i64 0
%153 = load double, double* %152
%154 = call i64 @isinf(double %153)
%155 = icmp ne i64 %154, 0
br i1 %155, label %156, label %158
156: ; preds = %150, %144
%157 = call i32 (...) @abort()
unreachable
158: ; preds = %150
br label %159
159: ; preds = %158
%160 = load i32, i32* %18
%161 = add nsw i32 %160, 1
store i32 %161, i32* %18
br label %85
162: ; preds = %85
%163 = load double*, double** %11
%164 = load double*, double** %12
%165 = load double*, double** %13
%166 = load i32, i32* %14
%167 = load double, double* %19
%168 = call i32 @LF_GBS_kick(double* %163, double* %164, double* %165, i32 %166, double %167)
%169 = load double*, double** %11
%170 = getelementptr inbounds double, double* %169, i64 0
%171 = load double, double* %170
%172 = call i64 @isnan(double %171)
%173 = icmp ne i64 %172, 0
br i1 %173, label %180, label %174
174: ; preds = %162
%175 = load double*, double** %12
%176 = getelementptr inbounds double, double* %175, i64 0
%177 = load double, double* %176
%178 = call i64 @isnan(double %177)
%179 = icmp ne i64 %178, 0
br i1 %179, label %180, label %182
180: ; preds = %174, %162
%181 = call i32 (...) @abort()
unreachable
182: ; preds = %174
%183 = load double*, double** %11
%184 = getelementptr inbounds double, double* %183, i64 0
%185 = load double, double* %184
%186 = call i64 @isinf(double %185)
%187 = icmp ne i64 %186, 0
br i1 %187, label %194, label %188
188: ; preds = %182
%189 = load double*, double** %12
%190 = getelementptr inbounds double, double* %189, i64 0
%191 = load double, double* %190
%192 = call i64 @isinf(double %191)
%193 = icmp ne i64 %192, 0
br i1 %193, label %194, label %196
194: ; preds = %188, %182
%195 = call i32 (...) @abort()
unreachable
196: ; preds = %188
%197 = load double*, double** %11
%198 = load double*, double** %12
%199 = load i32, i32* %14
%200 = load double, double* %19
%201 = fmul double 5.000000e-01, %200
%202 = call i32 @LF_GBS_drift(double* %197, double* %198, i32 %199, double %201)
%203 = load double*, double** %11
%204 = getelementptr inbounds double, double* %203, i64 0
%205 = load double, double* %204
%206 = call i64 @isnan(double %205)
%207 = icmp ne i64 %206, 0
br i1 %207, label %214, label %208
208: ; preds = %196
%209 = load double*, double** %12
%210 = getelementptr inbounds double, double* %209, i64 0
%211 = load double, double* %210
%212 = call i64 @isnan(double %211)
%213 = icmp ne i64 %212, 0
br i1 %213, label %214, label %216
214: ; preds = %208, %196
%215 = call i32 (...) @abort()
unreachable
216: ; preds = %208
%217 = load double*, double** %11
%218 = getelementptr inbounds double, double* %217, i64 0
%219 = load double, double* %218
%220 = call i64 @isinf(double %219)
%221 = icmp ne i64 %220, 0
br i1 %221, label %228, label %222
222: ; preds = %216
%223 = load double*, double** %12
%224 = getelementptr inbounds double, double* %223, i64 0
%225 = load double, double* %224
%226 = call i64 @isinf(double %225)
%227 = icmp ne i64 %226, 0
br i1 %227, label %228, label %230
228: ; preds = %222, %216
%229 = call i32 (...) @abort()
unreachable
230: ; preds = %222
ret void
}

LLVM IR (-O2):
define void @adv_DKD_LF_GBS(double* nocapture %0, double* nocapture %1, double* %2, double* %3, double* %4, i32 %5, double %6, double %7) {
%9 = fdiv double %6, %7
%10 = icmp sgt i32 %5, 0
br i1 %10, label %11, label %156
11: ; preds = %8
%12 = mul i32 %5, 3
%13 = call i32 @llvm.smax.i32(i32 %12, i32 1)
%14 = zext i32 %13 to i64
%15 = icmp ult i32 %13, 4
br i1 %15, label %122, label %16
16: ; preds = %11
%17 = getelementptr double, double* %2, i64 %14
%18 = getelementptr double, double* %3, i64 %14
%19 = getelementptr double, double* %0, i64 %14
%20 = getelementptr double, double* %1, i64 %14
%21 = icmp ugt double* %18, %2
%22 = icmp ugt double* %17, %3
%23 = and i1 %21, %22
%24 = icmp ugt double* %19, %2
%25 = icmp ugt double* %17, %0
%26 = and i1 %24, %25
%27 = or i1 %23, %26
%28 = icmp ugt double* %20, %2
%29 = icmp ugt double* %17, %1
%30 = and i1 %28, %29
%31 = or i1 %27, %30
%32 = icmp ugt double* %19, %3
%33 = icmp ugt double* %18, %0
%34 = and i1 %32, %33
%35 = or i1 %31, %34
%36 = icmp ugt double* %20, %3
%37 = icmp ugt double* %18, %1
%38 = and i1 %36, %37
%39 = or i1 %35, %38
br i1 %39, label %122, label %40
40: ; preds = %16
%41 = and i64 %14, 2147483644
%42 = add nsw i64 %41, -4
%43 = lshr exact i64 %42, 2
%44 = add nuw nsw i64 %43, 1
%45 = and i64 %44, 1
%46 = icmp eq i64 %42, 0
br i1 %46, label %96, label %47
47: ; preds = %40
%48 = and i64 %44, 9223372036854775806
br label %49
49: ; preds = %49, %47
%50 = phi i64 [ 0, %47 ], [ %93, %49 ]
%51 = phi i64 [ 0, %47 ], [ %94, %49 ]
%52 = getelementptr inbounds double, double* %0, i64 %50
%53 = bitcast double* %52 to <2 x double>*
%54 = load <2 x double>, <2 x double>* %53
%55 = getelementptr inbounds double, double* %52, i64 2
%56 = bitcast double* %55 to <2 x double>*
%57 = load <2 x double>, <2 x double>* %56
%58 = getelementptr inbounds double, double* %2, i64 %50
%59 = bitcast double* %58 to <2 x double>*
store <2 x double> %54, <2 x double>* %59
%60 = getelementptr inbounds double, double* %58, i64 2
%61 = bitcast double* %60 to <2 x double>*
store <2 x double> %57, <2 x double>* %61
%62 = getelementptr inbounds double, double* %1, i64 %50
%63 = bitcast double* %62 to <2 x double>*
%64 = load <2 x double>, <2 x double>* %63
%65 = getelementptr inbounds double, double* %62, i64 2
%66 = bitcast double* %65 to <2 x double>*
%67 = load <2 x double>, <2 x double>* %66
%68 = getelementptr inbounds double, double* %3, i64 %50
%69 = bitcast double* %68 to <2 x double>*
store <2 x double> %64, <2 x double>* %69
%70 = getelementptr inbounds double, double* %68, i64 2
%71 = bitcast double* %70 to <2 x double>*
store <2 x double> %67, <2 x double>* %71
%72 = or i64 %50, 4
%73 = getelementptr inbounds double, double* %0, i64 %72
%74 = bitcast double* %73 to <2 x double>*
%75 = load <2 x double>, <2 x double>* %74
%76 = getelementptr inbounds double, double* %73, i64 2
%77 = bitcast double* %76 to <2 x double>*
%78 = load <2 x double>, <2 x double>* %77
%79 = getelementptr inbounds double, double* %2, i64 %72
%80 = bitcast double* %79 to <2 x double>*
store <2 x double> %75, <2 x double>* %80
%81 = getelementptr inbounds double, double* %79, i64 2
%82 = bitcast double* %81 to <2 x double>*
store <2 x double> %78, <2 x double>* %82
%83 = getelementptr inbounds double, double* %1, i64 %72
%84 = bitcast double* %83 to <2 x double>*
%85 = load <2 x double>, <2 x double>* %84
%86 = getelementptr inbounds double, double* %83, i64 2
%87 = bitcast double* %86 to <2 x double>*
%88 = load <2 x double>, <2 x double>* %87
%89 = getelementptr inbounds double, double* %3, i64 %72
%90 = bitcast double* %89 to <2 x double>*
store <2 x double> %85, <2 x double>* %90
%91 = getelementptr inbounds double, double* %89, i64 2
%92 = bitcast double* %91 to <2 x double>*
store <2 x double> %88, <2 x double>* %92
%93 = add nuw i64 %50, 8
%94 = add i64 %51, 2
%95 = icmp eq i64 %94, %48
br i1 %95, label %96, label %49
96: ; preds = %49, %40
%97 = phi i64 [ 0, %40 ], [ %93, %49 ]
%98 = icmp eq i64 %45, 0
br i1 %98, label %120, label %99
99: ; preds = %96
%100 = getelementptr inbounds double, double* %0, i64 %97
%101 = bitcast double* %100 to <2 x double>*
%102 = load <2 x double>, <2 x double>* %101
%103 = getelementptr inbounds double, double* %100, i64 2
%104 = bitcast double* %103 to <2 x double>*
%105 = load <2 x double>, <2 x double>* %104
%106 = getelementptr inbounds double, double* %2, i64 %97
%107 = bitcast double* %106 to <2 x double>*
store <2 x double> %102, <2 x double>* %107
%108 = getelementptr inbounds double, double* %106, i64 2
%109 = bitcast double* %108 to <2 x double>*
store <2 x double> %105, <2 x double>* %109
%110 = getelementptr inbounds double, double* %1, i64 %97
%111 = bitcast double* %110 to <2 x double>*
%112 = load <2 x double>, <2 x double>* %111
%113 = getelementptr inbounds double, double* %110, i64 2
%114 = bitcast double* %113 to <2 x double>*
%115 = load <2 x double>, <2 x double>* %114
%116 = getelementptr inbounds double, double* %3, i64 %97
%117 = bitcast double* %116 to <2 x double>*
store <2 x double> %112, <2 x double>* %117
%118 = getelementptr inbounds double, double* %116, i64 2
%119 = bitcast double* %118 to <2 x double>*
store <2 x double> %115, <2 x double>* %119
br label %120
120: ; preds = %96, %99
%121 = icmp eq i64 %41, %14
br i1 %121, label %156, label %122
122: ; preds = %16, %11, %120
%123 = phi i64 [ 0, %16 ], [ 0, %11 ], [ %41, %120 ]
%124 = xor i64 %123, -1
%125 = and i64 %14, 1
%126 = icmp eq i64 %125, 0
br i1 %126, label %135, label %127
127: ; preds = %122
%128 = getelementptr inbounds double, double* %0, i64 %123
%129 = load double, double* %128
%130 = getelementptr inbounds double, double* %2, i64 %123
store double %129, double* %130
%131 = getelementptr inbounds double, double* %1, i64 %123
%132 = load double, double* %131
%133 = getelementptr inbounds double, double* %3, i64 %123
store double %132, double* %133
%134 = or i64 %123, 1
br label %135
135: ; preds = %127, %122
%136 = phi i64 [ %123, %122 ], [ %134, %127 ]
%137 = sub nsw i64 0, %14
%138 = icmp eq i64 %124, %137
br i1 %138, label %156, label %139
139: ; preds = %135, %139
%140 = phi i64 [ %154, %139 ], [ %136, %135 ]
%141 = getelementptr inbounds double, double* %0, i64 %140
%142 = load double, double* %141
%143 = getelementptr inbounds double, double* %2, i64 %140
store double %142, double* %143
%144 = getelementptr inbounds double, double* %1, i64 %140
%145 = load double, double* %144
%146 = getelementptr inbounds double, double* %3, i64 %140
store double %145, double* %146
%147 = add nuw nsw i64 %140, 1
%148 = getelementptr inbounds double, double* %0, i64 %147
%149 = load double, double* %148
%150 = getelementptr inbounds double, double* %2, i64 %147
store double %149, double* %150
%151 = getelementptr inbounds double, double* %1, i64 %147
%152 = load double, double* %151
%153 = getelementptr inbounds double, double* %3, i64 %147
store double %152, double* %153
%154 = add nuw nsw i64 %140, 2
%155 = icmp eq i64 %154, %14
br i1 %155, label %156, label %139
156: ; preds = %135, %139, %120, %8
%157 = fmul double %9, 5.000000e-01
%158 = tail call i32 @LF_GBS_drift(double* %2, double* %3, i32 %5, double %157)
%159 = load double, double* %2
%160 = tail call i64 @isnan(double %159)
%161 = icmp eq i64 %160, 0
br i1 %161, label %162, label %166
162: ; preds = %156
%163 = load double, double* %3
%164 = tail call i64 @isnan(double %163)
%165 = icmp eq i64 %164, 0
br i1 %165, label %168, label %166
166: ; preds = %162, %156
%167 = tail call i32 (...) @abort()
unreachable
168: ; preds = %162
%169 = load double, double* %2
%170 = tail call i64 @isinf(double %169)
%171 = icmp eq i64 %170, 0
br i1 %171, label %172, label %179
172: ; preds = %168
%173 = load double, double* %3
%174 = tail call i64 @isinf(double %173)
%175 = icmp eq i64 %174, 0
br i1 %175, label %176, label %179
176: ; preds = %172
%177 = fadd double %7, -1.000000e+00
%178 = fcmp ogt double %177, 0.000000e+00
br i1 %178, label %184, label %228
179: ; preds = %172, %168
%180 = tail call i32 (...) @abort()
unreachable
181: ; preds = %221
%182 = sitofp i32 %225 to double
%183 = fcmp ogt double %177, %182
br i1 %183, label %184, label %228
184: ; preds = %176, %181
%185 = phi i32 [ %225, %181 ], [ 0, %176 ]
%186 = tail call i32 @LF_GBS_kick(double* %2, double* %3, double* %4, i32 %5, double %9)
%187 = load double, double* %2
%188 = tail call i64 @isnan(double %187)
%189 = icmp eq i64 %188, 0
br i1 %189, label %190, label %194
190: ; preds = %184
%191 = load double, double* %3
%192 = tail call i64 @isnan(double %191)
%193 = icmp eq i64 %192, 0
br i1 %193, label %196, label %194
194: ; preds = %190, %184
%195 = tail call i32 (...) @abort()
unreachable
196: ; preds = %190
%197 = load double, double* %2
%198 = tail call i64 @isinf(double %197)
%199 = icmp eq i64 %198, 0
br i1 %199, label %200, label %204
200: ; preds = %196
%201 = load double, double* %3
%202 = tail call i64 @isinf(double %201)
%203 = icmp eq i64 %202, 0
br i1 %203, label %206, label %204
204: ; preds = %200, %196
%205 = tail call i32 (...) @abort()
unreachable
206: ; preds = %200
%207 = tail call i32 @LF_GBS_drift(double* %2, double* %3, i32 %5, double %9)
%208 = load double, double* %2
%209 = tail call i64 @isnan(double %208)
%210 = icmp eq i64 %209, 0
br i1 %210, label %211, label %215
211: ; preds = %206
%212 = load double, double* %3
%213 = tail call i64 @isnan(double %212)
%214 = icmp eq i64 %213, 0
br i1 %214, label %217, label %215
215: ; preds = %211, %206
%216 = tail call i32 (...) @abort()
unreachable
217: ; preds = %211
%218 = load double, double* %2
%219 = tail call i64 @isinf(double %218)
%220 = icmp eq i64 %219, 0
br i1 %220, label %221, label %226
221: ; preds = %217
%222 = load double, double* %3
%223 = tail call i64 @isinf(double %222)
%224 = icmp eq i64 %223, 0
%225 = add nuw nsw i32 %185, 1
br i1 %224, label %181, label %226
226: ; preds = %221, %217
%227 = tail call i32 (...) @abort()
unreachable
228: ; preds = %181, %176
%229 = tail call i32 @LF_GBS_kick(double* %2, double* %3, double* %4, i32 %5, double %9)
%230 = load double, double* %2
%231 = tail call i64 @isnan(double %230)
%232 = icmp eq i64 %231, 0
br i1 %232, label %233, label %237
233: ; preds = %228
%234 = load double, double* %3
%235 = tail call i64 @isnan(double %234)
%236 = icmp eq i64 %235, 0
br i1 %236, label %239, label %237
237: ; preds = %233, %228
%238 = tail call i32 (...) @abort()
unreachable
239: ; preds = %233
%240 = load double, double* %2
%241 = tail call i64 @isinf(double %240)
%242 = icmp eq i64 %241, 0
br i1 %242, label %243, label %247
243: ; preds = %239
%244 = load double, double* %3
%245 = tail call i64 @isinf(double %244)
%246 = icmp eq i64 %245, 0
br i1 %246, label %249, label %247
247: ; preds = %243, %239
%248 = tail call i32 (...) @abort()
unreachable
249: ; preds = %243
%250 = tail call i32 @LF_GBS_drift(double* %2, double* %3, i32 %5, double %157)
%251 = load double, double* %2
%252 = tail call i64 @isnan(double %251)
%253 = icmp eq i64 %252, 0
br i1 %253, label %254, label %258
254: ; preds = %249
%255 = load double, double* %3
%256 = tail call i64 @isnan(double %255)
%257 = icmp eq i64 %256, 0
br i1 %257, label %260, label %258
258: ; preds = %254, %249
%259 = tail call i32 (...) @abort()
unreachable
260: ; preds = %254
%261 = load double, double* %2
%262 = tail call i64 @isinf(double %261)
%263 = icmp eq i64 %262, 0
br i1 %263, label %264, label %268
264: ; preds = %260
%265 = load double, double* %3
%266 = tail call i64 @isinf(double %265)
%267 = icmp eq i64 %266, 0
br i1 %267, label %270, label %268
268: ; preds = %264, %260
%269 = tail call i32 (...) @abort()
unreachable
270: ; preds = %264
ret void
}