#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);
double dstrb_beta_kurtosis(const double a, const double b) {
  assert(a > 0.);
  assert(b > 0.);
  const double c = a - b;
  const double d = a * b;
  const double ab1 = a + b + 1;
  const double ab2 = a + b + 2;
  const double ab3 = a + b + 3;
  return 3 + 6 * (c * c * ab1 - d * ab2) / (d * ab2 * ab3);
}


x86 assembly (clang, -O0):
<dstrb_beta_kurtosis>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  0xe94(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  0xe71(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  0xe46(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm1
mulsd  -0x30(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe05(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
divsd  %xmm0,%xmm1
movsd  0xdde(%rip),%xmm0
addsd  %xmm1,%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dstrb_beta_kurtosis>:
sub    $0x18,%rsp
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,0x10(%rsp)
xorpd  %xmm1,%xmm1
xor    %edi,%edi
ucomisd %xmm1,%xmm0
seta   %dil
call   1030 <assert@plt>
xor    %edi,%edi
movsd  0x8(%rsp),%xmm0
ucomisd 0xedd(%rip),%xmm0
seta   %dil
call   1030 <assert@plt>
movsd  0x10(%rsp),%xmm4
movapd %xmm4,%xmm0
movsd  0x8(%rsp),%xmm2
subsd  %xmm2,%xmm0
movapd %xmm4,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm2,%xmm4
movsd  0xe8c(%rip),%xmm2
addsd  %xmm4,%xmm2
movsd  0xe88(%rip),%xmm3
addsd  %xmm4,%xmm3
mulsd  %xmm1,%xmm3
movsd  0xe80(%rip),%xmm1
mulsd  %xmm0,%xmm0
mulsd  %xmm2,%xmm0
subsd  %xmm3,%xmm0
mulsd  0xe74(%rip),%xmm0
addsd  %xmm1,%xmm4
mulsd  %xmm3,%xmm4
divsd  %xmm4,%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define double @dstrb_beta_kurtosis(double %0, double %1) {
%3 = fcmp ogt double %0, 0.000000e+00
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = fcmp ogt double %1, 0.000000e+00
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = fsub double %0, %1
%10 = fmul double %0, %1
%11 = fadd double %0, %1
%12 = fadd double %11, 1.000000e+00
%13 = fadd double %11, 2.000000e+00
%14 = fadd double %11, 3.000000e+00
%15 = fmul double %9, %9
%16 = fmul double %10, %13
%17 = fneg double %16
%18 = tail call double @llvm.fmuladd.f64(double %15, double %12, double %17)
%19 = fmul double %18, 6.000000e+00
%20 = fmul double %14, %16
%21 = fdiv double %19, %20
%22 = fadd double %21, 3.000000e+00
ret double %22
}