#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 pow(double, int);
double sqrt(double);
double _PHYSICS_get_orbit_semi_minor_axis(double semi_major_axis,
                                          double eccentrity) {
  return sqrt(semi_major_axis * sqrt(1 - pow(eccentrity, 2)) *
              (semi_major_axis * (1 - pow(eccentrity, 2))));
}


x86 assembly (clang, -O0):
<_PHYSICS_get_orbit_semi_minor_axis>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
mov    %eax,%ecx
mov    $0x1,%eax
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
movsd  -0x20(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
mov    %eax,%ecx
mov    $0x1,%eax
sub    %ecx,%eax
cvtsi2sd %eax,%xmm2
mulsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_PHYSICS_get_orbit_semi_minor_axis>:
push   %rbx
sub    $0x20,%rsp
movsd  %xmm0,0x8(%rsp)
movsd  %xmm1,0x18(%rsp)
movapd %xmm1,%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
mov    $0x1,%ecx
sub    %eax,%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
mov    $0x1,%ebx
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1162 <_PHYSICS_get_orbit_semi_minor_axis+0x42>
sqrtsd %xmm0,%xmm0
jmp    1167 <_PHYSICS_get_orbit_semi_minor_axis+0x47>
call   1040 <sqrt@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x18(%rsp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
sub    %eax,%ebx
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
mulsd  0x8(%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
ucomisd 0xe60(%rip),%xmm0
jb     11ac <_PHYSICS_get_orbit_semi_minor_axis+0x8c>
sqrtsd %xmm0,%xmm0
add    $0x20,%rsp
pop    %rbx
ret
add    $0x20,%rsp
pop    %rbx
jmp    1040 <sqrt@plt>

LLVM IR (-O0):
define double @_PHYSICS_get_orbit_semi_minor_axis(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call i32 @pow(double %6, i32 2)
%8 = sub nsw i32 1, %7
%9 = sitofp i32 %8 to double
%10 = call double @sqrt(double %9)
%11 = fmul double %5, %10
%12 = load double, double* %3
%13 = load double, double* %4
%14 = call i32 @pow(double %13, i32 2)
%15 = sub nsw i32 1, %14
%16 = sitofp i32 %15 to double
%17 = fmul double %12, %16
%18 = fmul double %11, %17
%19 = call double @sqrt(double %18)
ret double %19
}

LLVM IR (-O2):
define double @_PHYSICS_get_orbit_semi_minor_axis(double %0, double %1) {
%3 = tail call i32 @pow(double %1, i32 2)
%4 = sub nsw i32 1, %3
%5 = sitofp i32 %4 to double
%6 = tail call double @sqrt(double %5)
%7 = fmul double %6, %0
%8 = tail call i32 @pow(double %1, i32 2)
%9 = sub nsw i32 1, %8
%10 = sitofp i32 %9 to double
%11 = fmul double %10, %0
%12 = fmul double %7, %11
%13 = tail call double @sqrt(double %12)
ret double %13
}