#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 */
float dnbinom_precalc_f(unsigned int, float, float, float);
float dnbinom_mu_precalc_f(unsigned int x, float size, float mu,
                           float log_n_combinations) {
  float p;
  if (size <= 0)
    return 0;
  if (mu <= 0)
    return 0;
  p = mu / (size + mu);
  return dnbinom_precalc_f(x, size, p, log_n_combinations);
}


x86 assembly (clang, -O0):
<dnbinom_mu_precalc_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
movss  %xmm2,-0x14(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0xc(%rbp),%xmm0
jb     1144 <dnbinom_mu_precalc_f+0x34>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1192 <dnbinom_mu_precalc_f+0x82>
xorps  %xmm0,%xmm0
ucomiss -0x10(%rbp),%xmm0
jb     115e <dnbinom_mu_precalc_f+0x4e>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1192 <dnbinom_mu_precalc_f+0x82>
movss  -0x10(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
addss  -0x10(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%edi
movss  -0xc(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
movss  -0x14(%rbp),%xmm2
call   1030 <dnbinom_precalc_f@plt>
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dnbinom_mu_precalc_f>:
xorps  %xmm3,%xmm3
ucomiss %xmm0,%xmm3
jae    112d <dnbinom_mu_precalc_f+0x1d>
ucomiss %xmm1,%xmm3
jae    112d <dnbinom_mu_precalc_f+0x1d>
movaps %xmm0,%xmm3
addss  %xmm1,%xmm3
divss  %xmm3,%xmm1
jmp    1030 <dnbinom_precalc_f@plt>
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @dnbinom_mu_precalc_f(i32 %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca i32
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
store i32 %0, i32* %6
store float %1, float* %7
store float %2, float* %8
store float %3, float* %9
%11 = load float, float* %7
%12 = fcmp ole float %11, 0.000000e+00
br i1 %12, label %13, label %14
13: ; preds = %4
store float 0.000000e+00, float* %5
br label %29
14: ; preds = %4
%15 = load float, float* %8
%16 = fcmp ole float %15, 0.000000e+00
br i1 %16, label %17, label %18
17: ; preds = %14
store float 0.000000e+00, float* %5
br label %29
18: ; preds = %14
%19 = load float, float* %8
%20 = load float, float* %7
%21 = load float, float* %8
%22 = fadd float %20, %21
%23 = fdiv float %19, %22
store float %23, float* %10
%24 = load i32, i32* %6
%25 = load float, float* %7
%26 = load float, float* %10
%27 = load float, float* %9
%28 = call float @dnbinom_precalc_f(i32 %24, float %25, float %26, float %27)
store float %28, float* %5
br label %29
29: ; preds = %18, %17, %13
%30 = load float, float* %5
ret float %30
}

LLVM IR (-O2):
define float @dnbinom_mu_precalc_f(i32 %0, float %1, float %2, float %3) {
%5 = fcmp ugt float %1, 0.000000e+00
%6 = fcmp ugt float %2, 0.000000e+00
%7 = and i1 %5, %6
br i1 %7, label %8, label %12
8: ; preds = %4
%9 = fadd float %1, %2
%10 = fdiv float %2, %9
%11 = tail call float @dnbinom_precalc_f(i32 %0, float %1, float %10, float %3)
br label %12
12: ; preds = %4, %8
%13 = phi float [ %11, %8 ], [ 0.000000e+00, %4 ]
ret float %13
}