#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*/
runga_kutta_step(float, int, float const *, float const *, float const *,
                 unsigned int, int, float **, float *, float *, float,
                 float const *, void *,
                 void (*)(void *, float *, float, float const *));
void dormand_prince_step(float h, unsigned int N, float ynp[N], float tn,
                         const float yn[N], void *data,
                         void (*f)(void *data, float *out, float t,
                                   const float *yn)) {
  const float c[6] = {1. / 5., 3. / 10., 4. / 5., 8. / 9., 1., 1.};
  const float a[(7 * (7 + 1) / 2)] = {
      1. / 5.,
      3. / 40.,
      9. / 40.,
      44. / 45.,
      -56. / 15.,
      32. / 9.,
      19372. / 6561.,
      -25360. / 2187.,
      64448. / 6561.,
      -212. / 729.,
      9017. / 3168.,
      -355. / 33.,
      46732. / 5247.,
      49. / 176.,
      -5103. / 18656.,
      35. / 384.,
      0.,
      500. / 1113.,
      125. / 192.,
      -2187. / 6784.,
      11. / 84.,
  };
  const float b[7] = {
      5179. / 57600.,    0.,           7571. / 16695., 393. / 640.,
      -92097. / 339200., 187. / 2100., 1. / 40.};
  float k[6][N];
  f(data, k[0], tn, yn);
  float tmp[N];
  runga_kutta_step(h, 7, a, b, c, N, 6, k, ynp, tmp, tn, yn, data, f);
}


x86 assembly (clang, -O0):
<dormand_prince_step>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %rbx
sub    $0xf8,%rsp
movss  %xmm0,-0x1c(%rbp)
mov    %edi,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
movss  %xmm1,-0x2c(%rbp)
mov    %rdx,-0x38(%rbp)
mov    %rcx,-0x40(%rbp)
mov    %r8,-0x48(%rbp)
mov    0xecc(%rip),%rax
mov    %rax,-0x50(%rbp)
movaps 0xeb1(%rip),%xmm0
movaps %xmm0,-0x60(%rbp)
movaps 0xf26(%rip),%xmm0
movaps %xmm0,-0x70(%rbp)
movaps 0xf0b(%rip),%xmm0
movaps %xmm0,-0x80(%rbp)
movaps 0xef0(%rip),%xmm0
movaps %xmm0,-0x90(%rbp)
movaps 0xed2(%rip),%xmm0
movaps %xmm0,-0xa0(%rbp)
movaps 0xeb4(%rip),%xmm0
movaps %xmm0,-0xb0(%rbp)
movaps 0xe96(%rip),%xmm0
movaps %xmm0,-0xc0(%rbp)
movaps 0xe78(%rip),%xmm0
movaps %xmm0,-0xd0(%rbp)
movups 0xee6(%rip),%xmm0
movups %xmm0,-0xe4(%rbp)
movaps 0xecc(%rip),%xmm0
movaps %xmm0,-0xf0(%rbp)
mov    -0x20(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0xf8(%rbp)
lea    (%rax,%rax,2),%rcx
lea    0xf(,%rcx,8),%rcx
movabs $0x3ffffffff0,%rdx
and    %rdx,%rcx
mov    %rsp,%r15
sub    %rcx,%r15
mov    %r15,%rsp
mov    %rax,-0x100(%rbp)
mov    -0x48(%rbp),%rax
mov    -0x40(%rbp),%rdi
movss  -0x2c(%rbp),%xmm0
mov    -0x38(%rbp),%rdx
mov    %r15,%rsi
call   *%rax
mov    -0x20(%rbp),%eax
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rbx
sub    %rcx,%rbx
mov    %rbx,%rsp
mov    %rax,-0x108(%rbp)
movss  -0x1c(%rbp),%xmm0
lea    -0xd0(%rbp),%rsi
lea    -0xf0(%rbp),%rdx
lea    -0x60(%rbp),%rcx
mov    -0x20(%rbp),%r8d
mov    -0x28(%rbp),%r14
movss  -0x2c(%rbp),%xmm1
mov    -0x38(%rbp),%r11
mov    -0x40(%rbp),%r10
mov    -0x48(%rbp),%rax
mov    $0x7,%edi
mov    $0x6,%r9d
sub    $0x30,%rsp
mov    %r15,(%rsp)
mov    %r14,0x8(%rsp)
mov    %rbx,0x10(%rsp)
mov    %r11,0x18(%rsp)
mov    %r10,0x20(%rsp)
mov    %rax,0x28(%rsp)
call   1030 <runga_kutta_step@plt>
add    $0x30,%rsp
mov    -0xf8(%rbp),%rax
mov    %rax,%rsp
lea    -0x18(%rbp),%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<dormand_prince_step>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc8,%rsp
mov    %r8,%r13
mov    %rcx,%r12
movss  %xmm1,-0x2c(%rbp)
mov    %rsi,-0x48(%rbp)
mov    %edi,-0x30(%rbp)
movss  %xmm0,-0x34(%rbp)
mov    %rsp,-0x40(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x50(%rbp)
movaps 0xeaf(%rip),%xmm0
movaps %xmm0,-0x60(%rbp)
movaps 0xf24(%rip),%xmm0
movaps %xmm0,-0x90(%rbp)
movaps 0xf06(%rip),%xmm0
movaps %xmm0,-0xa0(%rbp)
movaps 0xee8(%rip),%xmm0
movaps %xmm0,-0xb0(%rbp)
movaps 0xeca(%rip),%xmm0
movaps %xmm0,-0xc0(%rbp)
movaps 0xeac(%rip),%xmm0
movaps %xmm0,-0xd0(%rbp)
movaps 0xe8e(%rip),%xmm0
movaps %xmm0,-0xe0(%rbp)
movaps 0xe70(%rip),%xmm0
movaps %xmm0,-0xf0(%rbp)
movups 0xede(%rip),%xmm0
movups %xmm0,-0x74(%rbp)
movaps 0xec7(%rip),%xmm0
movaps %xmm0,-0x80(%rbp)
mov    %edi,%r15d
lea    (%r15,%r15,2),%rax
lea    0xf(,%rax,8),%rax
movabs $0x3ffffffff0,%rsi
and    %rax,%rsi
mov    %rsp,%r14
sub    %rsi,%r14
mov    %r14,%rsp
mov    %rcx,%rdi
mov    %r14,%rsi
movaps %xmm1,%xmm0
mov    %rdx,%rbx
call   *%r8
mov    %rsp,%rax
lea    0xf(,%r15,4),%rcx
and    $0xfffffffffffffff0,%rcx
sub    %rcx,%rax
mov    %rax,%rsp
lea    -0xf0(%rbp),%rsi
lea    -0x80(%rbp),%rdx
lea    -0x60(%rbp),%rcx
movss  -0x34(%rbp),%xmm0
mov    $0x7,%edi
mov    -0x30(%rbp),%r8d
mov    $0x6,%r9d
movss  -0x2c(%rbp),%xmm1
push   %r13
push   %r12
push   %rbx
push   %rax
push   -0x48(%rbp)
push   %r14
call   1030 <runga_kutta_step@plt>
add    $0x30,%rsp
mov    -0x40(%rbp),%rsp
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.dormand_prince_step.c = [6 x float] [float 0x3FC99999A0000000, float 0x3FD3333340000000, float 0x3FE99999A0000000, float 0x3FEC71C720000000, float 1.000000e+00, float 1.000000e+00]
@__const.dormand_prince_step.a = [28 x float] [float 0x3FC99999A0000000, float 0x3FB3333340000000, float 0x3FCCCCCCC0000000, float 0x3FEF49F4A0000000, float 0xC00DDDDDE0000000, float 0x400C71C720000000, float 0x40079EEC00000000, float 0xC027310BE0000000, float 0x4023A55240000000, float 0xBFD29C9EC0000000, float 0x4006C52C00000000, float 0xC02583E100000000, float 0x4021D016A0000000, float 0x3FD1D17460000000, float 0xBFD1818980000000, float 0x3FB7555560000000, float 0.000000e+00, float 0x3FDCC049A0000000, float 0x3FE4D55560000000, float 0xBFD4A1CFC0000000, float 0x3FC0C30C40000000, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00]
@__const.dormand_prince_step.b = [7 x float] [float 0x3FB7048D20000000, float 0.000000e+00, float 0x3FDD05F700000000, float 0x3FE3A66660000000, float 0xBFD1607580000000, float 0x3FB6CBD320000000, float 0x3F999999A0000000]
define void @dormand_prince_step(float %0, i32 %1, float* %2, float %3, float* %4, i8* %5, void (i8*, float*, float, float*)* %6) {
%8 = alloca float
%9 = alloca i32
%10 = alloca float*
%11 = alloca float
%12 = alloca float*
%13 = alloca i8*
%14 = alloca void (i8*, float*, float, float*)*
%15 = alloca [6 x float]
%16 = alloca [28 x float]
%17 = alloca [7 x float]
%18 = alloca i8*
%19 = alloca i64
%20 = alloca i64
store float %0, float* %8
store i32 %1, i32* %9
store float* %2, float** %10
store float %3, float* %11
store float* %4, float** %12
store i8* %5, i8** %13
store void (i8*, float*, float, float*)* %6, void (i8*, float*, float, float*)** %14
%21 = load i32, i32* %9
%22 = zext i32 %21 to i64
%23 = load i32, i32* %9
%24 = zext i32 %23 to i64
%25 = bitcast [6 x float]* %15 to i8*
%26 = bitcast [28 x float]* %16 to i8*
%27 = bitcast [7 x float]* %17 to i8*
%28 = load i32, i32* %9
%29 = zext i32 %28 to i64
%30 = call i8* @llvm.stacksave()
store i8* %30, i8** %18
%31 = mul nuw i64 6, %29
%32 = alloca float, i64 %31
store i64 %29, i64* %19
%33 = load void (i8*, float*, float, float*)*, void (i8*, float*, float, float*)** %14
%34 = load i8*, i8** %13
%35 = mul nsw i64 0, %29
%36 = getelementptr inbounds float, float* %32, i64 %35
%37 = load float, float* %11
%38 = load float*, float** %12
%39 = load i32, i32* %9
%40 = zext i32 %39 to i64
%41 = alloca float, i64 %40
store i64 %40, i64* %20
%42 = load float, float* %8
%43 = getelementptr inbounds [28 x float], [28 x float]* %16, i64 0, i64 0
%44 = getelementptr inbounds [7 x float], [7 x float]* %17, i64 0, i64 0
%45 = getelementptr inbounds [6 x float], [6 x float]* %15, i64 0, i64 0
%46 = load i32, i32* %9
%47 = bitcast float* %32 to float**
%48 = load float*, float** %10
%49 = load float, float* %11
%50 = load float*, float** %12
%51 = load i8*, i8** %13
%52 = load void (i8*, float*, float, float*)*, void (i8*, float*, float, float*)** %14
%53 = call i32 @runga_kutta_step(float %42, i32 7, float* %43, float* %44, float* %45, i32 %46, i32 6, float** %47, float* %48, float* %41, float %49, float* %50, i8* %51, void (i8*, float*, float, float*)* %52)
%54 = load i8*, i8** %18
ret void
}

LLVM IR (-O2):
@__const.dormand_prince_step.c = [6 x float] [float 0x3FC99999A0000000, float 0x3FD3333340000000, float 0x3FE99999A0000000, float 0x3FEC71C720000000, float 1.000000e+00, float 1.000000e+00]
@__const.dormand_prince_step.a = [28 x float] [float 0x3FC99999A0000000, float 0x3FB3333340000000, float 0x3FCCCCCCC0000000, float 0x3FEF49F4A0000000, float 0xC00DDDDDE0000000, float 0x400C71C720000000, float 0x40079EEC00000000, float 0xC027310BE0000000, float 0x4023A55240000000, float 0xBFD29C9EC0000000, float 0x4006C52C00000000, float 0xC02583E100000000, float 0x4021D016A0000000, float 0x3FD1D17460000000, float 0xBFD1818980000000, float 0x3FB7555560000000, float 0.000000e+00, float 0x3FDCC049A0000000, float 0x3FE4D55560000000, float 0xBFD4A1CFC0000000, float 0x3FC0C30C40000000, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00]
@__const.dormand_prince_step.b = [7 x float] [float 0x3FB7048D20000000, float 0.000000e+00, float 0x3FDD05F700000000, float 0x3FE3A66660000000, float 0xBFD1607580000000, float 0x3FB6CBD320000000, float 0x3F999999A0000000]
define void @dormand_prince_step(float %0, i32 %1, float* %2, float %3, float* %4, i8* %5, void (i8*, float*, float, float*)* %6) {
%8 = alloca [6 x float]
%9 = alloca [28 x float]
%10 = alloca [7 x float]
%11 = bitcast [6 x float]* %8 to i8*
%12 = bitcast [28 x float]* %9 to i8*
%13 = bitcast [7 x float]* %10 to i8*
%14 = zext i32 %1 to i64
%15 = tail call i8* @llvm.stacksave()
%16 = mul nuw nsw i64 %14, 3
%17 = alloca float*, i64 %16
%18 = bitcast float** %17 to float*
%19 = alloca float, i64 %14
%20 = getelementptr inbounds [28 x float], [28 x float]* %9, i64 0, i64 0
%21 = getelementptr inbounds [7 x float], [7 x float]* %10, i64 0, i64 0
%22 = getelementptr inbounds [6 x float], [6 x float]* %8, i64 0, i64 0
%23 = call i32 @runga_kutta_step(float %0, i32 7, float* %20, float* %21, float* %22, i32 %1, i32 6, float** %17, float* %2, float* %19, float %3, float* %4, i8* %5, void (i8*, float*, float, float*)* %6)
ret void
}