#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 /*<<< orphan*/ abs(double);
double pow(int /*<<< orphan*/, double);
float AC_getMiePhase(float fCos, float fCos2, float g, float g2) {
  return 1.5 * ((1.0 - g2) / (2.0 + g2)) * (1.0 + fCos2) /
         pow(abs(1.0 + g2 - 2.0 * g * fCos), 1.5);
}


x86 assembly (clang, -O0):
<AC_getMiePhase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xec3(%rip),%xmm1
subsd  %xmm0,%xmm1
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm2
movsd  0xea6(%rip),%xmm0
addsd  %xmm2,%xmm0
divsd  %xmm0,%xmm1
movsd  0xe8e(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0xe89(%rip),%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe6b(%rip),%xmm1
addsd  %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm2
movsd  0xe4e(%rip),%xmm0
mulsd  %xmm2,%xmm0
movss  -0x4(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <abs@plt>
mov    %eax,%edi
movsd  0xe0b(%rip),%xmm0
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AC_getMiePhase>:
push   %rax
cvtss2sd %xmm3,%xmm3
movsd  0xed3(%rip),%xmm4
movapd %xmm4,%xmm5
subsd  %xmm3,%xmm5
movsd  0xecb(%rip),%xmm6
addsd  %xmm3,%xmm6
divsd  %xmm6,%xmm5
mulsd  0xec3(%rip),%xmm5
cvtss2sd %xmm1,%xmm1
addsd  %xmm4,%xmm1
mulsd  %xmm5,%xmm1
movsd  %xmm1,(%rsp)
addsd  %xmm4,%xmm3
xorps  %xmm1,%xmm1
cvtss2sd %xmm2,%xmm1
cvtss2sd %xmm0,%xmm0
mulsd  0xea3(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  %xmm3,%xmm1
movapd %xmm1,%xmm0
call   1030 <abs@plt>
mov    %eax,%edi
movsd  0xe80(%rip),%xmm0
call   1040 <pow@plt>
movsd  (%rsp),%xmm1
divsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @AC_getMiePhase(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %8
%10 = fpext float %9 to double
%11 = fsub double 1.000000e+00, %10
%12 = load float, float* %8
%13 = fpext float %12 to double
%14 = fadd double 2.000000e+00, %13
%15 = fdiv double %11, %14
%16 = fmul double 1.500000e+00, %15
%17 = load float, float* %6
%18 = fpext float %17 to double
%19 = fadd double 1.000000e+00, %18
%20 = fmul double %16, %19
%21 = load float, float* %8
%22 = fpext float %21 to double
%23 = fadd double 1.000000e+00, %22
%24 = load float, float* %7
%25 = fpext float %24 to double
%26 = fmul double 2.000000e+00, %25
%27 = load float, float* %5
%28 = fpext float %27 to double
%29 = fneg double %26
%30 = call double @llvm.fmuladd.f64(double %29, double %28, double %23)
%31 = call i32 @abs(double %30)
%32 = call double @pow(i32 %31, double 1.500000e+00)
%33 = fdiv double %20, %32
%34 = fptrunc double %33 to float
ret float %34
}

LLVM IR (-O2):
define float @AC_getMiePhase(float %0, float %1, float %2, float %3) {
%5 = fpext float %3 to double
%6 = fsub double 1.000000e+00, %5
%7 = fadd double %5, 2.000000e+00
%8 = fdiv double %6, %7
%9 = fmul double %8, 1.500000e+00
%10 = fpext float %1 to double
%11 = fadd double %10, 1.000000e+00
%12 = fmul double %11, %9
%13 = fadd double %5, 1.000000e+00
%14 = fpext float %2 to double
%15 = fpext float %0 to double
%16 = fmul double %14, -2.000000e+00
%17 = tail call double @llvm.fmuladd.f64(double %16, double %15, double %13)
%18 = tail call i32 @abs(double %17)
%19 = tail call double @pow(i32 %18, double 1.500000e+00)
%20 = fdiv double %12, %19
%21 = fptrunc double %20 to float
ret float %21
}