#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 const sqrt(double const);
double dstrb_beta_skewness(const double a, const double b) {
  assert(a > 0.);
  assert(b > 0.);
  return (2 * (b - a) * sqrt(a + b + 1)) / ((a + b + 2) * sqrt(a * b));
}


x86 assembly (clang, -O0):
<dstrb_beta_skewness>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%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  -0x10(%rbp),%xmm1
subsd  -0x8(%rbp),%xmm1
movsd  0xe8a(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  0xe77(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  0xe43(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1040 <sqrt@plt>
movsd  -0x20(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dstrb_beta_skewness>:
sub    $0x28,%rsp
movsd  %xmm1,0x18(%rsp)
movsd  %xmm0,0x20(%rsp)
xorpd  %xmm1,%xmm1
xor    %edi,%edi
ucomisd %xmm1,%xmm0
seta   %dil
call   1030 <assert@plt>
xor    %edi,%edi
movsd  0x18(%rsp),%xmm0
ucomisd 0xebd(%rip),%xmm0
seta   %dil
call   1030 <assert@plt>
movsd  0x18(%rsp),%xmm0
movapd %xmm0,%xmm1
movsd  0x20(%rsp),%xmm2
subsd  %xmm2,%xmm1
addsd  %xmm1,%xmm1
addsd  %xmm0,%xmm2
movsd  0xe80(%rip),%xmm0
addsd  %xmm2,%xmm0
ucomisd 0xe84(%rip),%xmm0
jb     1194 <dstrb_beta_skewness+0x74>
sqrtsd %xmm0,%xmm0
jmp    11b1 <dstrb_beta_skewness+0x91>
movsd  %xmm1,0x10(%rsp)
movsd  %xmm2,0x8(%rsp)
call   1040 <sqrt@plt>
movsd  0x8(%rsp),%xmm2
movsd  0x10(%rsp),%xmm1
addsd  0xe4f(%rip),%xmm2
mulsd  %xmm0,%xmm1
movsd  0x20(%rsp),%xmm0
mulsd  0x18(%rsp),%xmm0
ucomisd 0xe3f(%rip),%xmm0
jb     11d9 <dstrb_beta_skewness+0xb9>
sqrtsd %xmm0,%xmm0
jmp    11f6 <dstrb_beta_skewness+0xd6>
movsd  %xmm1,0x10(%rsp)
movsd  %xmm2,0x8(%rsp)
call   1040 <sqrt@plt>
movsd  0x8(%rsp),%xmm2
movsd  0x10(%rsp),%xmm1
mulsd  %xmm0,%xmm2
divsd  %xmm2,%xmm1
movapd %xmm1,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @dstrb_beta_skewness(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = fcmp ogt double %5, 0.000000e+00
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load double, double* %4
%10 = fcmp ogt double %9, 0.000000e+00
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = load double, double* %4
%14 = load double, double* %3
%15 = fsub double %13, %14
%16 = fmul double 2.000000e+00, %15
%17 = load double, double* %3
%18 = load double, double* %4
%19 = fadd double %17, %18
%20 = fadd double %19, 1.000000e+00
%21 = call double @sqrt(double %20)
%22 = fmul double %16, %21
%23 = load double, double* %3
%24 = load double, double* %4
%25 = fadd double %23, %24
%26 = fadd double %25, 2.000000e+00
%27 = load double, double* %3
%28 = load double, double* %4
%29 = fmul double %27, %28
%30 = call double @sqrt(double %29)
%31 = fmul double %26, %30
%32 = fdiv double %22, %31
ret double %32
}

LLVM IR (-O2):
define double @dstrb_beta_skewness(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 %1, %0
%10 = fmul double %9, 2.000000e+00
%11 = fadd double %0, %1
%12 = fadd double %11, 1.000000e+00
%13 = tail call double @sqrt(double %12)
%14 = fmul double %10, %13
%15 = fadd double %11, 2.000000e+00
%16 = fmul double %0, %1
%17 = tail call double @sqrt(double %16)
%18 = fmul double %15, %17
%19 = fdiv double %14, %18
ret double %19
}