#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 pow(double, double);
double eval_bw_f(double a, double pi, double p0, double A, double B, double C,
                 double D, double E) {
  double term1 = (D + a * A) / p0;
  double term2 = B * pi * a * pow(p0, a - 1) / (pi * pow(p0, a) + 1 - pi);
  return p0 + E / (term1 + term2) - 1.0 / C;
}


x86 assembly (clang, -O0):
<eval_bw_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  %xmm6,-0x38(%rbp)
movsd  %xmm7,-0x40(%rbp)
movsd  -0x38(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x28(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xe79(%rip),%xmm2
subsd  %xmm2,%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x68(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
call   1030 <pow@plt>
movsd  -0x60(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x58(%rbp),%xmm0
mulsd  %xmm2,%xmm1
movsd  0xe2d(%rip),%xmm2
addsd  %xmm2,%xmm1
subsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm2
addsd  -0x50(%rbp),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  0xdf7(%rip),%xmm1
divsd  -0x30(%rbp),%xmm1
subsd  %xmm1,%xmm0
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eval_bw_f>:
sub    $0x68,%rsp
movaps %xmm7,0x40(%rsp)
movaps %xmm5,0x50(%rsp)
movapd %xmm2,0x30(%rsp)
movsd  %xmm1,0x28(%rsp)
movsd  %xmm0,0x20(%rsp)
mulsd  %xmm0,%xmm3
addsd  %xmm6,%xmm3
movapd %xmm3,(%rsp)
mulsd  %xmm1,%xmm4
mulsd  %xmm0,%xmm4
movsd  %xmm4,0x18(%rsp)
movsd  0xead(%rip),%xmm1
addsd  %xmm0,%xmm1
movapd %xmm2,%xmm0
call   1030 <pow@plt>
mulsd  0x18(%rsp),%xmm0
movapd (%rsp),%xmm1
unpcklpd %xmm0,%xmm1
movapd %xmm1,(%rsp)
movapd 0x30(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
call   1030 <pow@plt>
movsd  0x28(%rsp),%xmm1
mulsd  %xmm1,%xmm0
addsd  0xe71(%rip),%xmm0
subsd  %xmm1,%xmm0
movapd 0x30(%rsp),%xmm2
movapd %xmm2,%xmm1
unpcklpd %xmm0,%xmm1
movapd (%rsp),%xmm3
divpd  %xmm1,%xmm3
movapd %xmm3,%xmm0
unpckhpd %xmm3,%xmm0
addpd  %xmm3,%xmm0
movapd 0x40(%rsp),%xmm1
shufpd $0x2,0xe43(%rip),%xmm1
unpcklpd 0x50(%rsp),%xmm0
divpd  %xmm0,%xmm1
movapd %xmm2,%xmm0
addsd  %xmm1,%xmm0
unpckhpd %xmm1,%xmm1
subsd  %xmm1,%xmm0
add    $0x68,%rsp
ret

LLVM IR (-O0):
define double @eval_bw_f(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7) {
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
store double %0, double* %9
store double %1, double* %10
store double %2, double* %11
store double %3, double* %12
store double %4, double* %13
store double %5, double* %14
store double %6, double* %15
store double %7, double* %16
%19 = load double, double* %15
%20 = load double, double* %9
%21 = load double, double* %12
%22 = call double @llvm.fmuladd.f64(double %20, double %21, double %19)
%23 = load double, double* %11
%24 = fdiv double %22, %23
store double %24, double* %17
%25 = load double, double* %13
%26 = load double, double* %10
%27 = fmul double %25, %26
%28 = load double, double* %9
%29 = fmul double %27, %28
%30 = load double, double* %11
%31 = load double, double* %9
%32 = fsub double %31, 1.000000e+00
%33 = call double @pow(double %30, double %32)
%34 = fmul double %29, %33
%35 = load double, double* %10
%36 = load double, double* %11
%37 = load double, double* %9
%38 = call double @pow(double %36, double %37)
%39 = call double @llvm.fmuladd.f64(double %35, double %38, double 1.000000e+00)
%40 = load double, double* %10
%41 = fsub double %39, %40
%42 = fdiv double %34, %41
store double %42, double* %18
%43 = load double, double* %11
%44 = load double, double* %16
%45 = load double, double* %17
%46 = load double, double* %18
%47 = fadd double %45, %46
%48 = fdiv double %44, %47
%49 = fadd double %43, %48
%50 = load double, double* %14
%51 = fdiv double 1.000000e+00, %50
%52 = fsub double %49, %51
ret double %52
}

LLVM IR (-O2):
define double @eval_bw_f(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7) {
%9 = tail call double @llvm.fmuladd.f64(double %0, double %3, double %6)
%10 = fmul double %1, %4
%11 = fmul double %10, %0
%12 = fadd double %0, -1.000000e+00
%13 = tail call double @pow(double %2, double %12)
%14 = fmul double %11, %13
%15 = tail call double @pow(double %2, double %0)
%16 = tail call double @llvm.fmuladd.f64(double %1, double %15, double 1.000000e+00)
%17 = fsub double %16, %1
%18 = insertelement <2 x double> poison, double %9, i64 0
%19 = insertelement <2 x double> %18, double %14, i64 1
%20 = insertelement <2 x double> poison, double %2, i64 0
%21 = insertelement <2 x double> %20, double %17, i64 1
%22 = fdiv <2 x double> %19, %21
%23 = shufflevector <2 x double> %22, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%24 = fadd <2 x double> %22, %23
%25 = insertelement <2 x double> <double poison, double 1.000000e+00>, double %7, i64 0
%26 = insertelement <2 x double> %24, double %5, i64 1
%27 = fdiv <2 x double> %25, %26
%28 = extractelement <2 x double> %27, i64 0
%29 = fadd double %28, %2
%30 = extractelement <2 x double> %27, i64 1
%31 = fsub double %29, %30
ret double %31
}