#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*/ reb_drift_kepu_stumpff(double, double *, double *, double *,
                                          double *);
void reb_drift_kepu_fchk(double dt0, double r0, double mu, double alpha,
                         double u, double s, double *f) {
  double x = s * s * alpha;
  double c0, c1, c2, c3;
  reb_drift_kepu_stumpff(x, &c0, &c1, &c2, &c3);
  c1 = c1 * s;
  c2 = c2 * s * s;
  c3 = c3 * s * s * s;
  *f = r0 * c1 + u * c2 + mu * c3 - dt0;
}


x86 assembly (clang, -O0):
<reb_drift_kepu_fchk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
mov    %rdi,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
lea    -0x48(%rbp),%rdi
lea    -0x50(%rbp),%rsi
lea    -0x58(%rbp),%rdx
lea    -0x60(%rbp),%rcx
call   1030 <reb_drift_kepu_stumpff@plt>
movsd  -0x50(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x58(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x60(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
subsd  -0x8(%rbp),%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reb_drift_kepu_fchk>:
push   %rbx
sub    $0x50,%rsp
mov    %rdi,%rbx
movsd  %xmm5,0x8(%rsp)
movsd  %xmm4,0x18(%rsp)
movsd  %xmm2,0x20(%rsp)
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x28(%rsp)
movapd %xmm5,%xmm0
mulsd  %xmm5,%xmm0
mulsd  %xmm3,%xmm0
lea    0x48(%rsp),%rdi
lea    0x40(%rsp),%rsi
lea    0x38(%rsp),%rdx
lea    0x30(%rsp),%rcx
call   1030 <reb_drift_kepu_stumpff@plt>
movsd  0x40(%rsp),%xmm0
movsd  0x8(%rsp),%xmm3
mulsd  %xmm3,%xmm0
movsd  0x38(%rsp),%xmm1
mulsd  %xmm3,%xmm1
mulsd  %xmm3,%xmm1
movsd  0x30(%rsp),%xmm2
mulsd  %xmm3,%xmm2
mulsd  %xmm3,%xmm2
mulsd  %xmm3,%xmm2
mulsd  0x18(%rsp),%xmm1
mulsd  0x10(%rsp),%xmm0
addsd  %xmm1,%xmm0
mulsd  0x20(%rsp),%xmm2
addsd  %xmm0,%xmm2
subsd  0x28(%rsp),%xmm2
movsd  %xmm2,(%rbx)
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @reb_drift_kepu_fchk(double %0, double %1, double %2, double %3, double %4, double %5, double* %6) {
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double*
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
store double %0, double* %8
store double %1, double* %9
store double %2, double* %10
store double %3, double* %11
store double %4, double* %12
store double %5, double* %13
store double* %6, double** %14
%20 = load double, double* %13
%21 = load double, double* %13
%22 = fmul double %20, %21
%23 = load double, double* %11
%24 = fmul double %22, %23
store double %24, double* %15
%25 = load double, double* %15
%26 = call i32 @reb_drift_kepu_stumpff(double %25, double* %16, double* %17, double* %18, double* %19)
%27 = load double, double* %17
%28 = load double, double* %13
%29 = fmul double %27, %28
store double %29, double* %17
%30 = load double, double* %18
%31 = load double, double* %13
%32 = fmul double %30, %31
%33 = load double, double* %13
%34 = fmul double %32, %33
store double %34, double* %18
%35 = load double, double* %19
%36 = load double, double* %13
%37 = fmul double %35, %36
%38 = load double, double* %13
%39 = fmul double %37, %38
%40 = load double, double* %13
%41 = fmul double %39, %40
store double %41, double* %19
%42 = load double, double* %9
%43 = load double, double* %17
%44 = load double, double* %12
%45 = load double, double* %18
%46 = fmul double %44, %45
%47 = call double @llvm.fmuladd.f64(double %42, double %43, double %46)
%48 = load double, double* %10
%49 = load double, double* %19
%50 = call double @llvm.fmuladd.f64(double %48, double %49, double %47)
%51 = load double, double* %8
%52 = fsub double %50, %51
%53 = load double*, double** %14
store double %52, double* %53
ret void
}

LLVM IR (-O2):
define void @reb_drift_kepu_fchk(double %0, double %1, double %2, double %3, double %4, double %5, double* nocapture writeonly %6) {
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = fmul double %5, %5
%13 = fmul double %12, %3
%14 = bitcast double* %8 to i8*
%15 = bitcast double* %9 to i8*
%16 = bitcast double* %10 to i8*
%17 = bitcast double* %11 to i8*
%18 = call i32 @reb_drift_kepu_stumpff(double %13, double* %8, double* %9, double* %10, double* %11)
%19 = load double, double* %9
%20 = fmul double %19, %5
%21 = load double, double* %10
%22 = fmul double %21, %5
%23 = fmul double %22, %5
%24 = load double, double* %11
%25 = fmul double %24, %5
%26 = fmul double %25, %5
%27 = fmul double %26, %5
%28 = fmul double %23, %4
%29 = call double @llvm.fmuladd.f64(double %1, double %20, double %28)
%30 = call double @llvm.fmuladd.f64(double %2, double %27, double %29)
%31 = fsub double %30, %0
store double %31, double* %6
ret void
}