#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 */
float M_PI;
float sqrtf(float);
float el_circumference_fastf(float semiMajor, float semiMinor) {
  return M_PI * (3.0f * (semiMajor + semiMinor) -
                 sqrtf((3.0f * semiMajor + semiMinor) *
                       (semiMajor + 3.0f * semiMinor)));
}


x86 assembly (clang, -O0):
<el_circumference_fastf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    0x2ebf(%rip),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  0xead(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  -0x4(%rbp),%xmm2
movss  -0x8(%rbp),%xmm1
movss  0xe93(%rip),%xmm3
mulss  %xmm3,%xmm1
addss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
call   1030 <sqrtf@plt>
movss  -0x10(%rbp),%xmm1
movaps %xmm0,%xmm2
movss  -0xc(%rbp),%xmm0
movd   %xmm2,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm2
movss  0xe60(%rip),%xmm3
mulss  %xmm3,%xmm1
addss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<el_circumference_fastf>:
sub    $0x28,%rsp
mov    0x2ecd(%rip),%rax
movss  (%rax),%xmm3
movaps %xmm0,%xmm4
addss  %xmm1,%xmm4
movaps %xmm0,%xmm2
unpcklps %xmm1,%xmm2
unpcklps %xmm0,%xmm1
mulps  0xeca(%rip),%xmm2
addps  %xmm1,%xmm2
movaps %xmm2,%xmm0
shufps $0x55,%xmm2,%xmm0
mulss  %xmm2,%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     1152 <el_circumference_fastf+0x42>
sqrtss %xmm0,%xmm0
jmp    116d <el_circumference_fastf+0x5d>
movss  %xmm3,0xc(%rsp)
movaps %xmm4,0x10(%rsp)
call   1030 <sqrtf@plt>
movaps 0x10(%rsp),%xmm4
movss  0xc(%rsp),%xmm3
mulss  0xe9b(%rip),%xmm4
subss  %xmm0,%xmm4
mulss  %xmm4,%xmm3
movaps %xmm3,%xmm0
add    $0x28,%rsp
ret

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

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