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

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double mag_binext(double, double, double, double, double,
                  double (*)(int, double *, double), int, double *, double,
                  double);
int /*<<< orphan*/ sincos(double, double *, double *);
double magt_binext(double t, double t0, double tE, double alpha, double u0,
                   double rho, double d, double q,
                   double (*ld_func)(int, double *, double), int n,
                   double gam[], double acc, double ld_acc) {
  double p;
  double y1, y2;
  double sa, ca;
  p = (t - t0) / tE;
  sincos(alpha, &sa, &ca);
  y1 = p * ca - u0 * sa;
  y2 = p * sa + u0 * ca;
  return (mag_binext(y1, y2, rho, d, q, ld_func, n, gam, acc, ld_acc));
}


x86 assembly (clang, -O0):
<magt_binext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movsd  0x18(%rbp),%xmm8
movsd  0x10(%rbp),%xmm8
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  %xmm6,-0x38(%rbp)
movsd  %xmm7,-0x40(%rbp)
mov    %rdi,-0x48(%rbp)
mov    %esi,-0x4c(%rbp)
mov    %rdx,-0x58(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x20(%rbp),%xmm0
lea    -0x78(%rbp),%rdi
lea    -0x80(%rbp),%rsi
call   1030 <sincos@plt>
movsd  -0x60(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm1
mulsd  -0x78(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm1
mulsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
movsd  -0x40(%rbp),%xmm4
mov    -0x48(%rbp),%rdi
mov    -0x4c(%rbp),%esi
mov    -0x58(%rbp),%rdx
movsd  0x10(%rbp),%xmm5
movsd  0x18(%rbp),%xmm6
call   1040 <mag_binext@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<magt_binext>:
push   %rbp
push   %r14
push   %rbx
sub    $0x40,%rsp
mov    %rdx,%r14
mov    %esi,%ebp
mov    %rdi,%rbx
movsd  %xmm7,0x28(%rsp)
movsd  %xmm6,0x20(%rsp)
movsd  %xmm5,0x18(%rsp)
movsd  %xmm4,0x10(%rsp)
subsd  %xmm1,%xmm0
divsd  %xmm2,%xmm0
movsd  %xmm0,0x8(%rsp)
lea    0x38(%rsp),%rdi
lea    0x30(%rsp),%rsi
movaps %xmm3,%xmm0
call   1030 <sincos@plt>
movsd  0x30(%rsp),%xmm4
movsd  0x38(%rsp),%xmm2
movsd  0x8(%rsp),%xmm1
movapd %xmm1,%xmm0
mulsd  %xmm2,%xmm1
movsd  0x10(%rsp),%xmm3
mulsd  %xmm3,%xmm2
mulsd  %xmm4,%xmm0
subsd  %xmm2,%xmm0
mulsd  %xmm3,%xmm4
addsd  %xmm4,%xmm1
movsd  0x18(%rsp),%xmm2
movsd  0x20(%rsp),%xmm3
movsd  0x28(%rsp),%xmm4
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
movsd  0x60(%rsp),%xmm5
movsd  0x68(%rsp),%xmm6
call   1040 <mag_binext@plt>
add    $0x40,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define double @magt_binext(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, double (i32, double*, double)* %8, i32 %9, double* %10, double %11, double %12) {
%14 = alloca double
%15 = alloca double
%16 = bitcast double* %14 to i8*
%17 = bitcast double* %15 to i8*
%18 = fsub double %0, %1
%19 = fdiv double %18, %2
%20 = call i32 @sincos(double %3, double* %14, double* %15)
%21 = load double, double* %15
%22 = load double, double* %14
%23 = fneg double %22
%24 = fmul double %23, %4
%25 = call double @llvm.fmuladd.f64(double %19, double %21, double %24)
%26 = fmul double %21, %4
%27 = call double @llvm.fmuladd.f64(double %19, double %22, double %26)
%28 = call double @mag_binext(double %25, double %27, double %5, double %6, double %7, double (i32, double*, double)* %8, i32 %9, double* %10, double %11, double %12)
ret double %28
}