#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 fabs(double);
double pow(double, double);
double sqrt(double);
double period(double sma, double hostmass, double satmass) {
  double t;
  double m;
  double t_numerator;
  double t_denominator;
  m = fabs(hostmass + satmass);
  t_numerator = 4.0 * pow(3.14159265358979323846, 2.0) * pow(fabs(sma), 3.0);
  t_denominator = 6.67408E-11 * m;
  t = sqrt(t_numerator / t_denominator);
  return t;
}


x86 assembly (clang, -O0):
<period>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
movaps 0xee8(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xebf(%rip),%xmm0
movsd  0xebf(%rip),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xe9f(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x8(%rbp),%xmm0
movaps 0xeaa(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0xe76(%rip),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xe50(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
divsd  -0x38(%rbp),%xmm0
call   1040 <sqrt@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<period>:
sub    $0x18,%rsp
addsd  %xmm2,%xmm1
movapd 0xed0(%rip),%xmm2
andpd  %xmm2,%xmm1
movapd %xmm1,(%rsp)
andpd  %xmm2,%xmm0
movsd  0xecb(%rip),%xmm1
call   1030 <pow@plt>
mulsd  0xec6(%rip),%xmm0
movapd (%rsp),%xmm1
mulsd  0xec1(%rip),%xmm1
divsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1176 <period+0x56>
sqrtsd %xmm0,%xmm0
add    $0x18,%rsp
ret
add    $0x18,%rsp
jmp    1040 <sqrt@plt>

LLVM IR (-O0):
define double @period(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%11 = load double, double* %5
%12 = load double, double* %6
%13 = fadd double %11, %12
%14 = call double @llvm.fabs.f64(double %13)
store double %14, double* %8
%15 = call double @pow(double 0x400921FB54442D18, double 2.000000e+00)
%16 = fmul double 4.000000e+00, %15
%17 = load double, double* %4
%18 = call double @llvm.fabs.f64(double %17)
%19 = call double @pow(double %18, double 3.000000e+00)
%20 = fmul double %16, %19
store double %20, double* %9
%21 = load double, double* %8
%22 = fmul double 6.674080e-11, %21
store double %22, double* %10
%23 = load double, double* %9
%24 = load double, double* %10
%25 = fdiv double %23, %24
%26 = call double @sqrt(double %25)
store double %26, double* %7
%27 = load double, double* %7
ret double %27
}

LLVM IR (-O2):
define double @period(double %0, double %1, double %2) {
%4 = fadd double %1, %2
%5 = tail call double @llvm.fabs.f64(double %4)
%6 = tail call double @llvm.fabs.f64(double %0)
%7 = tail call double @pow(double %6, double 3.000000e+00)
%8 = fmul double %7, 0x4043BD3CC9BE45DE
%9 = fmul double %5, 6.674080e-11
%10 = fdiv double %8, %9
%11 = tail call double @sqrt(double %10)
ret double %11
}