double _orbita_models_homogeneous_sphere_Mr(const void *par, double R) {
  double a = ((double *)par)[1], rho_0 = ((double *)par)[0];
  if (R < a)
    return (4. / 3.) * (3.14159265358979323846264338327950288419716939937510) *
           rho_0 * ((R) * (R) * (R));
  else
    return (4. / 3.) * (3.14159265358979323846264338327950288419716939937510) *
           rho_0 * ((a) * (a) * (a));
}


x86 assembly (clang, -O0):
<_orbita_models_homogeneous_sphere_Mr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1166 <_orbita_models_homogeneous_sphere_Mr+0x66>
movsd  0xebc(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    118b <_orbita_models_homogeneous_sphere_Mr+0x8b>
movsd  0xe92(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<_orbita_models_homogeneous_sphere_Mr>:
movsd  (%rdi),%xmm2
movsd  0x8(%rdi),%xmm1
ucomisd %xmm0,%xmm1
mulsd  0xeeb(%rip),%xmm2
jbe    112c <_orbita_models_homogeneous_sphere_Mr+0x2c>
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm2,%xmm1
movapd %xmm1,%xmm0
ret
movapd %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm0,%xmm2
movapd %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @_orbita_models_homogeneous_sphere_Mr(i8* %0, double %1) {
%3 = alloca double
%4 = alloca i8*
%5 = alloca double
%6 = alloca double
%7 = alloca double
store i8* %0, i8** %4
store double %1, double* %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to double*
%10 = getelementptr inbounds double, double* %9, i64 1
%11 = load double, double* %10
store double %11, double* %6
%12 = load i8*, i8** %4
%13 = bitcast i8* %12 to double*
%14 = getelementptr inbounds double, double* %13, i64 0
%15 = load double, double* %14
store double %15, double* %7
%16 = load double, double* %5
%17 = load double, double* %6
%18 = fcmp olt double %16, %17
br i1 %18, label %19, label %28
19: ; preds = %2
%20 = load double, double* %7
%21 = fmul double 0x4010C152382D7365, %20
%22 = load double, double* %5
%23 = load double, double* %5
%24 = fmul double %22, %23
%25 = load double, double* %5
%26 = fmul double %24, %25
%27 = fmul double %21, %26
store double %27, double* %3
br label %37
28: ; preds = %2
%29 = load double, double* %7
%30 = fmul double 0x4010C152382D7365, %29
%31 = load double, double* %6
%32 = load double, double* %6
%33 = fmul double %31, %32
%34 = load double, double* %6
%35 = fmul double %33, %34
%36 = fmul double %30, %35
store double %36, double* %3
br label %37
37: ; preds = %28, %19
%38 = load double, double* %3
ret double %38
}

LLVM IR (-O2):
define double @_orbita_models_homogeneous_sphere_Mr(i8* nocapture %0, double %1) {
%3 = bitcast i8* %0 to double*
%4 = getelementptr inbounds i8, i8* %0, i64 8
%5 = bitcast i8* %4 to double*
%6 = load double, double* %5
%7 = load double, double* %3
%8 = fcmp ogt double %6, %1
%9 = fmul double %7, 0x4010C152382D7365
br i1 %8, label %10, label %14
10: ; preds = %2
%11 = fmul double %1, %1
%12 = fmul double %11, %1
%13 = fmul double %12, %9
br label %18
14: ; preds = %2
%15 = fmul double %6, %6
%16 = fmul double %6, %15
%17 = fmul double %9, %16
br label %18
18: ; preds = %14, %10
%19 = phi double [ %13, %10 ], [ %17, %14 ]
ret double %19
}