#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*/ EllipticToRectangular(double const, double const,
                                         double const *, double, double *);
double sqrt(double);
void EllipticToRectangularA(double mu, const double elem[6], double dt,
                            double xyz[]) {
  const double a = elem[0];
  const double n = sqrt(mu / (a * a * a));
  EllipticToRectangular(a, n, elem, dt, xyz);
}


x86 assembly (clang, -O0):
<EllipticToRectangularA>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
mov    -0x10(%rbp),%rdi
movsd  -0x18(%rbp),%xmm2
mov    -0x20(%rbp),%rsi
call   1030 <EllipticToRectangular@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EllipticToRectangularA>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r14
movaps %xmm1,%xmm2
mov    %rdi,%rbx
movsd  (%rdi),%xmm3
movapd %xmm3,%xmm1
mulsd  %xmm3,%xmm1
mulsd  %xmm3,%xmm1
divsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1157 <EllipticToRectangularA+0x37>
xorps  %xmm1,%xmm1
sqrtsd %xmm0,%xmm1
jmp    1178 <EllipticToRectangularA+0x58>
movsd  %xmm2,0x10(%rsp)
movsd  %xmm3,0x8(%rsp)
call   1040 <sqrt@plt>
movsd  0x8(%rsp),%xmm3
movsd  0x10(%rsp),%xmm2
movapd %xmm0,%xmm1
movapd %xmm3,%xmm0
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x18,%rsp
pop    %rbx
pop    %r14
jmp    1030 <EllipticToRectangular@plt>

LLVM IR (-O0):
define void @EllipticToRectangularA(double %0, double* %1, double %2, double* %3) {
%5 = alloca double
%6 = alloca double*
%7 = alloca double
%8 = alloca double*
%9 = alloca double
%10 = alloca double
store double %0, double* %5
store double* %1, double** %6
store double %2, double* %7
store double* %3, double** %8
%11 = load double*, double** %6
%12 = getelementptr inbounds double, double* %11, i64 0
%13 = load double, double* %12
store double %13, double* %9
%14 = load double, double* %5
%15 = load double, double* %9
%16 = load double, double* %9
%17 = fmul double %15, %16
%18 = load double, double* %9
%19 = fmul double %17, %18
%20 = fdiv double %14, %19
%21 = call double @sqrt(double %20)
store double %21, double* %10
%22 = load double, double* %9
%23 = load double, double* %10
%24 = load double*, double** %6
%25 = load double, double* %7
%26 = load double*, double** %8
%27 = call i32 @EllipticToRectangular(double %22, double %23, double* %24, double %25, double* %26)
ret void
}

LLVM IR (-O2):
define void @EllipticToRectangularA(double %0, double* %1, double %2, double* %3) {
%5 = load double, double* %1
%6 = fmul double %5, %5
%7 = fmul double %5, %6
%8 = fdiv double %0, %7
%9 = tail call double @sqrt(double %8)
%10 = tail call i32 @EllipticToRectangular(double %5, double %9, double* %1, double %2, double* %3)
ret void
}