#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*/ assert(int);
int pow1pm1(double const, double);
double mse_pfdr_deltaapprox_R0(const double lambda, const double gamma,
                               const unsigned int c, const unsigned int m) {
  assert(lambda >= 0. && lambda <= 1.);
  assert(gamma >= 0. && gamma <= 1.);
  const double Klambda = -1. / ((1. - lambda) * pow1pm1(-gamma, (double)m));
  return Klambda * Klambda * c * (m - c) / (double)m;
}


x86 assembly (clang, -O0):
<mse_pfdr_deltaapprox_R0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
mov    %esi,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x21(%rbp)
jb     1162 <mse_pfdr_deltaapprox_R0+0x42>
movsd  0xea9(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
setae  %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsd  -0x10(%rbp),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x22(%rbp)
jb     1199 <mse_pfdr_deltaapprox_R0+0x79>
movsd  0xe72(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
setae  %al
mov    %al,-0x22(%rbp)
mov    -0x22(%rbp),%al
movzbl %al,%edi
and    $0x1,%edi
call   1030 <assert@plt>
movsd  -0x8(%rbp),%xmm1
movsd  0xe4c(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movaps 0xe4c(%rip),%xmm1
movsd  -0x10(%rbp),%xmm0
pxor   %xmm1,%xmm0
mov    -0x18(%rbp),%eax
cvtsi2sd %rax,%xmm1
call   1040 <pow1pm1@plt>
movsd  -0x30(%rbp),%xmm1
cvtsi2sd %eax,%xmm0
mulsd  %xmm0,%xmm1
movsd  0xe19(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm0,%xmm0
mov    -0x14(%rbp),%eax
mov    %eax,%edx
cvtsi2sd %rax,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
sub    %edx,%ecx
cvtsi2sd %rcx,%xmm1
mulsd  %xmm1,%xmm0
cvtsi2sd %rax,%xmm1
divsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mse_pfdr_deltaapprox_R0>:
push   %rbp
push   %rbx
sub    $0x28,%rsp
movsd  %xmm0,0x20(%rsp)
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
setae  %al
movsd  0xec1(%rip),%xmm2
movsd  %xmm2,0x8(%rsp)
ucomisd %xmm0,%xmm2
mov    %esi,%ebx
mov    %edi,%ebp
movaps %xmm1,0x10(%rsp)
setae  %cl
and    %al,%cl
movzbl %cl,%edi
call   1030 <assert@plt>
movapd 0x10(%rsp),%xmm1
ucomisd 0xea3(%rip),%xmm1
setae  %al
movsd  0xe88(%rip),%xmm0
ucomisd %xmm1,%xmm0
setae  %cl
and    %al,%cl
movzbl %cl,%edi
call   1030 <assert@plt>
movaps 0x10(%rsp),%xmm2
xorps  0xe8b(%rip),%xmm2
movsd  0x8(%rsp),%xmm0
subsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
mov    %ebx,%eax
xorps  %xmm1,%xmm1
cvtsi2sd %rax,%xmm1
movsd  %xmm1,0x10(%rsp)
movaps %xmm2,%xmm0
call   1040 <pow1pm1@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x8(%rsp),%xmm0
movsd  0xe34(%rip),%xmm1
divsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm1
mov    %ebp,%eax
xorps  %xmm2,%xmm2
cvtsi2sd %rax,%xmm2
mulsd  %xmm1,%xmm2
sub    %ebp,%ebx
xorps  %xmm0,%xmm0
cvtsi2sd %rbx,%xmm0
mulsd  %xmm2,%xmm0
divsd  0x10(%rsp),%xmm0
add    $0x28,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define double @mse_pfdr_deltaapprox_R0(double %0, double %1, i32 %2, i32 %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca i32
%8 = alloca i32
%9 = alloca double
store double %0, double* %5
store double %1, double* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = load double, double* %5
%11 = fcmp oge double %10, 0.000000e+00
br i1 %11, label %12, label %15
12: ; preds = %4
%13 = load double, double* %5
%14 = fcmp ole double %13, 1.000000e+00
br label %15
15: ; preds = %12, %4
%16 = phi i1 [ false, %4 ], [ %14, %12 ]
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
%19 = load double, double* %6
%20 = fcmp oge double %19, 0.000000e+00
br i1 %20, label %21, label %24
21: ; preds = %15
%22 = load double, double* %6
%23 = fcmp ole double %22, 1.000000e+00
br label %24
24: ; preds = %21, %15
%25 = phi i1 [ false, %15 ], [ %23, %21 ]
%26 = zext i1 %25 to i32
%27 = call i32 @assert(i32 %26)
%28 = load double, double* %5
%29 = fsub double 1.000000e+00, %28
%30 = load double, double* %6
%31 = fneg double %30
%32 = load i32, i32* %8
%33 = uitofp i32 %32 to double
%34 = call i32 @pow1pm1(double %31, double %33)
%35 = sitofp i32 %34 to double
%36 = fmul double %29, %35
%37 = fdiv double -1.000000e+00, %36
store double %37, double* %9
%38 = load double, double* %9
%39 = load double, double* %9
%40 = fmul double %38, %39
%41 = load i32, i32* %7
%42 = uitofp i32 %41 to double
%43 = fmul double %40, %42
%44 = load i32, i32* %8
%45 = load i32, i32* %7
%46 = sub i32 %44, %45
%47 = uitofp i32 %46 to double
%48 = fmul double %43, %47
%49 = load i32, i32* %8
%50 = uitofp i32 %49 to double
%51 = fdiv double %48, %50
ret double %51
}

LLVM IR (-O2):
define double @mse_pfdr_deltaapprox_R0(double %0, double %1, i32 %2, i32 %3) {
%5 = fcmp oge double %0, 0.000000e+00
%6 = fcmp ole double %0, 1.000000e+00
%7 = and i1 %5, %6
%8 = zext i1 %7 to i32
%9 = tail call i32 @assert(i32 %8)
%10 = fcmp oge double %1, 0.000000e+00
%11 = fcmp ole double %1, 1.000000e+00
%12 = and i1 %10, %11
%13 = zext i1 %12 to i32
%14 = tail call i32 @assert(i32 %13)
%15 = fsub double 1.000000e+00, %0
%16 = fneg double %1
%17 = uitofp i32 %3 to double
%18 = tail call i32 @pow1pm1(double %16, double %17)
%19 = sitofp i32 %18 to double
%20 = fmul double %15, %19
%21 = fdiv double -1.000000e+00, %20
%22 = fmul double %21, %21
%23 = uitofp i32 %2 to double
%24 = fmul double %22, %23
%25 = sub i32 %3, %2
%26 = uitofp i32 %25 to double
%27 = fmul double %24, %26
%28 = fdiv double %27, %17
ret double %28
}