#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 M_PI;
double sqrt(double);
double el_circumference_fast(double semiMajor, double semiMinor) {
  return M_PI *
         (3.0 * (semiMajor + semiMinor) -
          sqrt((3.0 * semiMajor + semiMinor) * (semiMajor + 3.0 * semiMinor)));
}


x86 assembly (clang, -O0):
<el_circumference_fast>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    0x2ebf(%rip),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xead(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm1
movsd  0xe93(%rip),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movsd  -0x20(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x18(%rbp),%xmm0
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
movsd  0xe56(%rip),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<el_circumference_fast>:
sub    $0x28,%rsp
mov    0x2ecd(%rip),%rax
movsd  (%rax),%xmm3
movapd %xmm0,%xmm4
addsd  %xmm1,%xmm4
movapd %xmm0,%xmm2
unpcklpd %xmm1,%xmm2
unpcklpd %xmm0,%xmm1
mulpd  0xec5(%rip),%xmm2
addpd  %xmm1,%xmm2
movapd %xmm2,%xmm0
unpckhpd %xmm2,%xmm0
mulsd  %xmm2,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     115b <el_circumference_fast+0x4b>
sqrtsd %xmm0,%xmm0
jmp    1178 <el_circumference_fast+0x68>
movsd  %xmm3,0x8(%rsp)
movapd %xmm4,0x10(%rsp)
call   1030 <sqrt@plt>
movapd 0x10(%rsp),%xmm4
movsd  0x8(%rsp),%xmm3
mulsd  0xe90(%rip),%xmm4
subsd  %xmm0,%xmm4
mulsd  %xmm4,%xmm3
movapd %xmm3,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @el_circumference_fast(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* @M_PI
%6 = load double, double* %3
%7 = load double, double* %4
%8 = fadd double %6, %7
%9 = load double, double* %3
%10 = load double, double* %4
%11 = call double @llvm.fmuladd.f64(double 3.000000e+00, double %9, double %10)
%12 = load double, double* %3
%13 = load double, double* %4
%14 = call double @llvm.fmuladd.f64(double 3.000000e+00, double %13, double %12)
%15 = fmul double %11, %14
%16 = call double @sqrt(double %15)
%17 = fneg double %16
%18 = call double @llvm.fmuladd.f64(double 3.000000e+00, double %8, double %17)
%19 = fmul double %5, %18
ret double %19
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @el_circumference_fast(double %0, double %1) {
%3 = load double, double* @M_PI
%4 = fadd double %0, %1
%5 = insertelement <2 x double> poison, double %0, i64 0
%6 = insertelement <2 x double> %5, double %1, i64 1
%7 = insertelement <2 x double> poison, double %1, i64 0
%8 = insertelement <2 x double> %7, double %0, i64 1
%9 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %6, <2 x double> <double 3.000000e+00, double 3.000000e+00>, <2 x double> %8)
%10 = shufflevector <2 x double> %9, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%11 = fmul <2 x double> %9, %10
%12 = extractelement <2 x double> %11, i64 0
%13 = tail call double @sqrt(double %12)
%14 = fneg double %13
%15 = tail call double @llvm.fmuladd.f64(double %4, double 3.000000e+00, double %14)
%16 = fmul double %3, %15
ret double %16
}