#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 Round(double);
scalar_t__ ceil(double);
int /*<<< orphan*/ free(double *);
scalar_t__ malloc(int);
int NUM_rk4(int (*f)(int neq, double time, double *y, double *dy, void *data),
            int neq, double step, double duration, double *ic, double **y,
            void *data) {
  int i;
  int n;
  int status;
  int length;
  double t = 0.0;
  double *tmp;
  double *dy;
  double *K1, *K2, *K3, *K4;
  double *a;
  tmp = (double *)malloc(sizeof(double) * neq);
  dy = (double *)malloc(sizeof(double) * neq);
  K1 = (double *)malloc(sizeof(double) * neq);
  K2 = (double *)malloc(sizeof(double) * neq);
  K3 = (double *)malloc(sizeof(double) * neq);
  K4 = (double *)malloc(sizeof(double) * neq);
  length = (int)ceil(duration / step) + 1;
  a = *y = (double *)malloc(sizeof(double) * neq * length);
  for (i = 0; i < neq; i++) {
    tmp[i] = a[i + neq * 0] = ic[i];
  }
  for (n = 0; n < Round(duration / step); n++) {
    for (i = 0; i < neq; i++) {
      status = f(neq, t, tmp, dy, data);
      if (status)
        return status;
      K1[i] = step * dy[i];
      tmp[i] = a[i + neq * n] + K1[i] / 2;
    }
    for (i = 0; i < neq; i++) {
      status = f(neq, t + step / 2, tmp, dy, data);
      if (status)
        return -1;
      K2[i] = step * dy[i];
      tmp[i] = a[i + neq * n] + K2[i] / 2;
    }
    for (i = 0; i < neq; i++) {
      status = f(neq, t + step / 2, tmp, dy, data);
      if (status)
        return status;
      K3[i] = step * dy[i];
      tmp[i] = a[i + neq * n] + K3[i];
    }
    for (i = 0; i < neq; i++) {
      status = f(neq, t + step, tmp, dy, data);
      if (status)
        return -1;
      K4[i] = step * dy[i];
    }
    for (i = 0; i < neq; i++)
      a[i + neq * (n + 1)] =
          a[i + neq * n] +
          (1.0 / 6.0) * (K1[i] + 2.0 * K2[i] + 2.0 * K3[i] + K4[i]);
    t = t + step;
  }
  free(tmp);
  free(dy);
  free(K1);
  free(K2);
  free(K3);
  free(K4);
  return length;
}


x86 assembly (clang, -O0):
<NUM_rk4>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x28(%rbp)
mov    %rdx,-0x30(%rbp)
mov    %rcx,-0x38(%rbp)
mov    %r8,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x60(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x68(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x70(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x78(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x80(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x88(%rbp)
movsd  -0x28(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
call   1040 <ceil@plt>
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x3,%rax
movslq -0x50(%rbp),%rcx
imul   %rcx,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    -0x38(%rbp),%rcx
mov    %rax,(%rcx)
mov    %rax,-0x90(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1272 <NUM_rk4+0x132>
mov    -0x30(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x90(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   $0x0,-0x14(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x60(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1226 <NUM_rk4+0xe6>
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
mov    %eax,-0x94(%rbp)
movsd  -0x28(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
call   1060 <Round@plt>
mov    %eax,%ecx
mov    -0x94(%rbp),%eax
cmp    %ecx,%eax
jge    162c <NUM_rk4+0x4ec>
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1358 <NUM_rk4+0x218>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%edi
movsd  -0x58(%rbp),%xmm0
mov    -0x60(%rbp),%rsi
mov    -0x68(%rbp),%rdx
mov    -0x40(%rbp),%rcx
call   *%rax
mov    %eax,-0x4c(%rbp)
cmpl   $0x0,-0x4c(%rbp)
je     12e6 <NUM_rk4+0x1a6>
mov    -0x4c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    166b <NUM_rk4+0x52b>
movsd  -0x20(%rbp),%xmm0
mov    -0x68(%rbp),%rax
movslq -0x44(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x70(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x90(%rbp),%rax
mov    -0x44(%rbp),%ecx
mov    -0x14(%rbp),%edx
imul   -0x48(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x70(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  0xcd3(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
mov    -0x60(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    12a8 <NUM_rk4+0x168>
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1425 <NUM_rk4+0x2e5>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%edi
movsd  -0x58(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  0xc84(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
mov    -0x60(%rbp),%rsi
mov    -0x68(%rbp),%rdx
mov    -0x40(%rbp),%rcx
call   *%rax
mov    %eax,-0x4c(%rbp)
cmpl   $0x0,-0x4c(%rbp)
je     13b3 <NUM_rk4+0x273>
movl   $0xffffffff,-0x4(%rbp)
jmp    166b <NUM_rk4+0x52b>
movsd  -0x20(%rbp),%xmm0
mov    -0x68(%rbp),%rax
movslq -0x44(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x78(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x90(%rbp),%rax
mov    -0x44(%rbp),%ecx
mov    -0x14(%rbp),%edx
imul   -0x48(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x78(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  0xc06(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
mov    -0x60(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    135f <NUM_rk4+0x21f>
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    14e1 <NUM_rk4+0x3a1>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%edi
movsd  -0x58(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  0xbb7(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
mov    -0x60(%rbp),%rsi
mov    -0x68(%rbp),%rdx
mov    -0x40(%rbp),%rcx
call   *%rax
mov    %eax,-0x4c(%rbp)
cmpl   $0x0,-0x4c(%rbp)
je     147f <NUM_rk4+0x33f>
mov    -0x4c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    166b <NUM_rk4+0x52b>
movsd  -0x20(%rbp),%xmm0
mov    -0x68(%rbp),%rax
movslq -0x44(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x80(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x90(%rbp),%rax
mov    -0x44(%rbp),%ecx
mov    -0x14(%rbp),%edx
imul   -0x48(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x80(%rbp),%rax
movslq -0x44(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
mov    -0x60(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    142c <NUM_rk4+0x2ec>
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    155c <NUM_rk4+0x41c>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%edi
movsd  -0x58(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
mov    -0x60(%rbp),%rsi
mov    -0x68(%rbp),%rdx
mov    -0x40(%rbp),%rcx
call   *%rax
mov    %eax,-0x4c(%rbp)
cmpl   $0x0,-0x4c(%rbp)
je     152c <NUM_rk4+0x3ec>
movl   $0xffffffff,-0x4(%rbp)
jmp    166b <NUM_rk4+0x52b>
movsd  -0x20(%rbp),%xmm0
mov    -0x68(%rbp),%rax
movslq -0x44(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x88(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    14e8 <NUM_rk4+0x3a8>
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    160f <NUM_rk4+0x4cf>
mov    -0x90(%rbp),%rax
mov    -0x44(%rbp),%ecx
mov    -0x14(%rbp),%edx
imul   -0x48(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x70(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x78(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
addsd  %xmm2,%xmm2
addsd  %xmm0,%xmm2
mov    -0x80(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  %xmm0,%xmm0
addsd  %xmm2,%xmm0
mov    -0x88(%rbp),%rax
movslq -0x44(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  0xa27(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x90(%rbp),%rax
mov    -0x44(%rbp),%ecx
mov    -0x14(%rbp),%edx
mov    -0x48(%rbp),%esi
add    $0x1,%esi
imul   %esi,%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1563 <NUM_rk4+0x423>
movsd  -0x58(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1279 <NUM_rk4+0x139>
mov    -0x60(%rbp),%rdi
call   1030 <free@plt>
mov    -0x68(%rbp),%rdi
call   1030 <free@plt>
mov    -0x70(%rbp),%rdi
call   1030 <free@plt>
mov    -0x78(%rbp),%rdi
call   1030 <free@plt>
mov    -0x80(%rbp),%rdi
call   1030 <free@plt>
mov    -0x88(%rbp),%rdi
call   1030 <free@plt>
mov    -0x50(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NUM_rk4>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xb8,%rsp
mov    %r8,0x60(%rsp)
mov    %rcx,(%rsp)
mov    %rdx,%r14
movsd  %xmm1,0x58(%rsp)
movsd  %xmm0,0x28(%rsp)
mov    %esi,%r13d
mov    %rdi,0x48(%rsp)
lea    0x0(,%r13,8),%ebp
mov    %ebp,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %ebp,%edi
call   1050 <malloc@plt>
mov    %rax,%r15
mov    %ebp,%edi
call   1050 <malloc@plt>
mov    %rax,0x8(%rsp)
mov    %ebp,%edi
call   1050 <malloc@plt>
mov    %rax,0x20(%rsp)
mov    %ebp,%edi
call   1050 <malloc@plt>
mov    %rax,0x10(%rsp)
mov    %ebp,%edi
call   1050 <malloc@plt>
mov    %rax,0x18(%rsp)
movsd  0x58(%rsp),%xmm0
divsd  0x28(%rsp),%xmm0
movsd  %xmm0,0x58(%rsp)
call   1040 <ceil@plt>
add    $0x1,%eax
mov    %rax,0xb0(%rsp)
imul   %eax,%ebp
mov    %ebp,%edi
call   1050 <malloc@plt>
mov    %rax,%r12
mov    (%rsp),%rax
mov    %r12,(%rax)
mov    %r13d,%ebp
mov    %r13,(%rsp)
test   %r13d,%r13d
jle    13b6 <NUM_rk4+0x276>
cmpl   $0x4,(%rsp)
jae    1210 <NUM_rk4+0xd0>
xor    %eax,%eax
jmp    1314 <NUM_rk4+0x1d4>
lea    (%r12,%rbp,8),%rax
lea    (%rbx,%rbp,8),%rdi
lea    (%r14,%rbp,8),%rdx
cmp    %rdi,%r12
setb   %r8b
cmp    %rax,%rbx
setb   %r9b
cmp    %rdx,%r12
setb   %cl
cmp    %r14,%rax
seta   %sil
cmp    %rdx,%rbx
setb   %dl
cmp    %r14,%rdi
seta   %dil
xor    %eax,%eax
test   %r9b,%r8b
jne    1314 <NUM_rk4+0x1d4>
and    %sil,%cl
jne    1314 <NUM_rk4+0x1d4>
and    %dil,%dl
jne    1314 <NUM_rk4+0x1d4>
mov    %ebp,%eax
and    $0xfffffffc,%eax
lea    -0x4(%rax),%rdx
mov    %rdx,%rcx
shr    $0x2,%rcx
add    $0x1,%rcx
test   %rdx,%rdx
je     1905 <NUM_rk4+0x7c5>
mov    %rcx,%rsi
and    $0xfffffffffffffffe,%rsi
xor    %edx,%edx
nopw   0x0(%rax,%rax,1)
movups (%r14,%rdx,8),%xmm0
movups 0x10(%r14,%rdx,8),%xmm1
movups %xmm0,(%r12,%rdx,8)
movups %xmm1,0x10(%r12,%rdx,8)
movups %xmm0,(%rbx,%rdx,8)
movups %xmm1,0x10(%rbx,%rdx,8)
movupd 0x20(%r14,%rdx,8),%xmm0
movupd 0x30(%r14,%rdx,8),%xmm1
movupd %xmm0,0x20(%r12,%rdx,8)
movupd %xmm1,0x30(%r12,%rdx,8)
movupd %xmm0,0x20(%rbx,%rdx,8)
movupd %xmm1,0x30(%rbx,%rdx,8)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%rsi
jne    1290 <NUM_rk4+0x150>
test   $0x1,%cl
je     130b <NUM_rk4+0x1cb>
movupd (%r14,%rdx,8),%xmm0
movupd 0x10(%r14,%rdx,8),%xmm1
movupd %xmm0,(%r12,%rdx,8)
movupd %xmm1,0x10(%r12,%rdx,8)
movupd %xmm0,(%rbx,%rdx,8)
movupd %xmm1,0x10(%rbx,%rdx,8)
cmp    %rbp,%rax
je     13b6 <NUM_rk4+0x276>
mov    %rax,%rcx
not    %rcx
add    %rbp,%rcx
mov    %rbp,%rdx
and    $0x3,%rdx
je     134b <NUM_rk4+0x20b>
cs nopw 0x0(%rax,%rax,1)
movsd  (%r14,%rax,8),%xmm0
movsd  %xmm0,(%r12,%rax,8)
movsd  %xmm0,(%rbx,%rax,8)
add    $0x1,%rax
add    $0xffffffffffffffff,%rdx
jne    1330 <NUM_rk4+0x1f0>
cmp    $0x3,%rcx
jb     13b6 <NUM_rk4+0x276>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  (%r14,%rax,8),%xmm0
movsd  %xmm0,(%r12,%rax,8)
movsd  %xmm0,(%rbx,%rax,8)
movsd  0x8(%r14,%rax,8),%xmm0
movsd  %xmm0,0x8(%r12,%rax,8)
movsd  %xmm0,0x8(%rbx,%rax,8)
movsd  0x10(%r14,%rax,8),%xmm0
movsd  %xmm0,0x10(%r12,%rax,8)
movsd  %xmm0,0x10(%rbx,%rax,8)
movsd  0x18(%r14,%rax,8),%xmm0
movsd  %xmm0,0x18(%r12,%rax,8)
movsd  %xmm0,0x18(%rbx,%rax,8)
add    $0x4,%rax
cmp    %rax,%rbp
jne    1360 <NUM_rk4+0x220>
mov    %rbp,0x38(%rsp)
movsd  0x58(%rsp),%xmm0
call   1060 <Round@plt>
test   %eax,%eax
mov    0x48(%rsp),%r13
mov    0x8(%rsp),%rbp
jle    18ae <NUM_rk4+0x76e>
movsd  0xc20(%rip),%xmm0
mulsd  0x28(%rsp),%xmm0
movsd  %xmm0,0xa8(%rsp)
movslq (%rsp),%rax
mov    %rax,0x70(%rsp)
mov    0x38(%rsp),%rcx
lea    (%r12,%rcx,8),%rax
mov    %rax,0xa0(%rsp)
lea    0x0(%rbp,%rcx,8),%rax
mov    %rax,0x98(%rsp)
mov    0x20(%rsp),%rax
lea    (%rax,%rcx,8),%rax
mov    %rax,0x90(%rsp)
mov    0x10(%rsp),%rax
lea    (%rax,%rcx,8),%rax
mov    %rax,0x88(%rsp)
mov    0x18(%rsp),%rax
lea    (%rax,%rcx,8),%rax
mov    %rax,0x80(%rsp)
and    $0xfffffffe,%ecx
mov    %rcx,0x78(%rsp)
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x50(%rsp)
xor    %r10d,%r10d
cmpl   $0x0,(%rsp)
jle    1700 <NUM_rk4+0x5c0>
mov    %r10,0x30(%rsp)
imul   0x70(%rsp),%r10
mov    %r10,0x68(%rsp)
lea    (%r12,%r10,8),%r14
xor    %ebp,%ebp
xchg   %ax,%ax
mov    (%rsp),%rdi
movsd  0x50(%rsp),%xmm0
mov    %rbx,%rsi
mov    %r15,%rdx
mov    0x60(%rsp),%rcx
call   *%r13
test   %eax,%eax
jne    18ac <NUM_rk4+0x76c>
movsd  (%r15,%rbp,8),%xmm0
mulsd  0x28(%rsp),%xmm0
mov    0x8(%rsp),%rax
movsd  %xmm0,(%rax,%rbp,8)
mulsd  0xb42(%rip),%xmm0
addsd  (%r14,%rbp,8),%xmm0
movsd  %xmm0,(%rbx,%rbp,8)
add    $0x1,%rbp
cmp    %rbp,0x38(%rsp)
jne    1480 <NUM_rk4+0x340>
cmpl   $0x0,(%rsp)
mov    0x8(%rsp),%rbp
mov    0x30(%rsp),%r10
jle    1700 <NUM_rk4+0x5c0>
movsd  0xa8(%rsp),%xmm0
addsd  0x50(%rsp),%xmm0
movsd  %xmm0,0x40(%rsp)
xor    %r13d,%r13d
mov    (%rsp),%rdi
movsd  0x40(%rsp),%xmm0
mov    %rbx,%rsi
mov    %r15,%rdx
mov    0x60(%rsp),%rcx
call   *0x48(%rsp)
test   %eax,%eax
jne    18ee <NUM_rk4+0x7ae>
movsd  (%r15,%r13,8),%xmm0
mulsd  0x28(%rsp),%xmm0
mov    0x20(%rsp),%rax
movsd  %xmm0,(%rax,%r13,8)
mulsd  0xac0(%rip),%xmm0
addsd  (%r14,%r13,8),%xmm0
movsd  %xmm0,(%rbx,%r13,8)
add    $0x1,%r13
cmp    %r13,0x38(%rsp)
jne    1500 <NUM_rk4+0x3c0>
cmpl   $0x0,(%rsp)
mov    0x48(%rsp),%r13
mov    0x30(%rsp),%r10
jle    1700 <NUM_rk4+0x5c0>
xor    %ebp,%ebp
nopl   (%rax)
mov    (%rsp),%rdi
movsd  0x40(%rsp),%xmm0
mov    %rbx,%rsi
mov    %r15,%rdx
mov    0x60(%rsp),%rcx
call   *%r13
test   %eax,%eax
jne    18ac <NUM_rk4+0x76c>
movsd  (%r15,%rbp,8),%xmm0
mulsd  0x28(%rsp),%xmm0
mov    0x10(%rsp),%rax
movsd  %xmm0,(%rax,%rbp,8)
addsd  (%r14,%rbp,8),%xmm0
movsd  %xmm0,(%rbx,%rbp,8)
add    $0x1,%rbp
cmp    %rbp,0x38(%rsp)
jne    1570 <NUM_rk4+0x430>
cmpl   $0x0,(%rsp)
mov    0x8(%rsp),%rbp
mov    0x30(%rsp),%r10
jle    1700 <NUM_rk4+0x5c0>
movsd  0x50(%rsp),%xmm0
addsd  0x28(%rsp),%xmm0
movsd  %xmm0,0x40(%rsp)
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    (%rsp),%rdi
movsd  0x40(%rsp),%xmm0
mov    %rbx,%rsi
mov    %r15,%rdx
mov    0x60(%rsp),%rcx
call   *%r13
test   %eax,%eax
jne    18ee <NUM_rk4+0x7ae>
movsd  (%r15,%rbp,8),%xmm0
mulsd  0x28(%rsp),%xmm0
mov    0x18(%rsp),%rax
movsd  %xmm0,(%rax,%rbp,8)
add    $0x1,%rbp
cmp    %rbp,0x38(%rsp)
jne    15f0 <NUM_rk4+0x4b0>
cmpl   $0x0,(%rsp)
mov    0x8(%rsp),%rbp
mov    0x30(%rsp),%r10
jle    1700 <NUM_rk4+0x5c0>
add    $0x1,%r10
mov    %r10,0x30(%rsp)
imul   0x70(%rsp),%r10
cmpl   $0x1,(%rsp)
jne    173d <NUM_rk4+0x5fd>
xor    %r9d,%r9d
mov    0x20(%rsp),%rdi
mov    0x10(%rsp),%rsi
mov    0x18(%rsp),%rax
movsd  0x990(%rip),%xmm3
add    %r9,%r10
lea    (%r12,%r10,8),%r8
mov    0x68(%rsp),%rcx
add    %r9,%rcx
lea    (%r12,%rcx,8),%r10
lea    (%rax,%r9,8),%rdx
lea    (%rsi,%r9,8),%rsi
lea    (%rdi,%r9,8),%rdi
lea    0x0(%rbp,%r9,8),%rbp
mov    0x38(%rsp),%rax
sub    %r9,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
movsd  (%rdi,%rcx,8),%xmm0
addsd  %xmm0,%xmm0
addsd  0x0(%rbp,%rcx,8),%xmm0
movsd  (%rsi,%rcx,8),%xmm1
addsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
addsd  (%rdx,%rcx,8),%xmm1
mulsd  %xmm3,%xmm1
addsd  (%r10,%rcx,8),%xmm1
movsd  %xmm1,(%r8,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%rax
jne    16b0 <NUM_rk4+0x570>
mov    0x8(%rsp),%r14
mov    0x30(%rsp),%rbp
jmp    170a <NUM_rk4+0x5ca>
cs nopw 0x0(%rax,%rax,1)
mov    %rbp,%r14
add    $0x1,%r10
mov    %r10,%rbp
movsd  0x50(%rsp),%xmm0
addsd  0x28(%rsp),%xmm0
movsd  %xmm0,0x50(%rsp)
movsd  0x58(%rsp),%xmm0
call   1060 <Round@plt>
cltq
cmp    %rax,%rbp
mov    %rbp,%r10
mov    %r14,%rbp
jl     145e <NUM_rk4+0x31e>
jmp    18ae <NUM_rk4+0x76e>
lea    (%r12,%r10,8),%r11
mov    %rbp,%rsi
mov    0xa0(%rsp),%rax
lea    (%rax,%r10,8),%rbp
mov    0x68(%rsp),%rcx
lea    (%rax,%rcx,8),%rdx
cmp    %rdx,%r11
setb   %al
cmp    %rbp,%r14
setb   %r13b
cmp    0x98(%rsp),%r11
setb   %dl
cmp    %rbp,%rsi
setb   %r9b
cmp    0x90(%rsp),%r11
setb   %dil
cmp    %rbp,0x20(%rsp)
setb   %cl
cmp    0x88(%rsp),%r11
setb   %r8b
cmp    %rbp,0x10(%rsp)
setb   0x40(%rsp)
cmp    0x80(%rsp),%r11
setb   %sil
cmp    %rbp,0x18(%rsp)
setb   %bpl
test   %r13b,%al
movsd  0x846(%rip),%xmm3
movapd 0x846(%rip),%xmm4
jne    188b <NUM_rk4+0x74b>
and    %r9b,%dl
mov    0x48(%rsp),%r13
jne    1886 <NUM_rk4+0x746>
and    %cl,%dil
jne    1886 <NUM_rk4+0x746>
and    0x40(%rsp),%r8b
mov    0x20(%rsp),%rdi
mov    0x18(%rsp),%rax
jne    1874 <NUM_rk4+0x734>
mov    $0x0,%r9d
and    %bpl,%sil
mov    0x8(%rsp),%rbp
mov    0x10(%rsp),%rsi
jne    1678 <NUM_rk4+0x538>
xor    %edx,%edx
mov    0x78(%rsp),%rcx
movupd (%r14,%rdx,8),%xmm0
movupd 0x0(%rbp,%rdx,8),%xmm1
movupd (%rdi,%rdx,8),%xmm2
addpd  %xmm2,%xmm2
addpd  %xmm1,%xmm2
movupd (%rsi,%rdx,8),%xmm1
addpd  %xmm1,%xmm1
addpd  %xmm2,%xmm1
movupd (%rax,%rdx,8),%xmm2
addpd  %xmm1,%xmm2
mulpd  %xmm4,%xmm2
addpd  %xmm0,%xmm2
movupd %xmm2,(%r11,%rdx,8)
add    $0x2,%rdx
cmp    %rdx,%rcx
jne    1818 <NUM_rk4+0x6d8>
mov    %rcx,%r9
cmp    0x38(%rsp),%rcx
jne    1678 <NUM_rk4+0x538>
mov    %rbp,%r14
jmp    16ef <NUM_rk4+0x5af>
xor    %r9d,%r9d
mov    0x8(%rsp),%rbp
mov    0x10(%rsp),%rsi
jmp    1678 <NUM_rk4+0x538>
xor    %r9d,%r9d
jmp    1893 <NUM_rk4+0x753>
xor    %r9d,%r9d
mov    0x48(%rsp),%r13
mov    0x8(%rsp),%rbp
mov    0x20(%rsp),%rdi
mov    0x10(%rsp),%rsi
mov    0x18(%rsp),%rax
jmp    1678 <NUM_rk4+0x538>
jmp    18f3 <NUM_rk4+0x7b3>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    0x20(%rsp),%rdi
call   1030 <free@plt>
mov    0x10(%rsp),%rdi
call   1030 <free@plt>
mov    0x18(%rsp),%rdi
call   1030 <free@plt>
mov    0xb0(%rsp),%rax
jmp    18f3 <NUM_rk4+0x7b3>
mov    $0xffffffff,%eax
add    $0xb8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %edx,%edx
test   $0x1,%cl
jne    12e6 <NUM_rk4+0x1a6>
jmp    130b <NUM_rk4+0x1cb>

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

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