double alpbetjn(mu, dt, l)
double dt, mu;
int l;
{
  double m1;
  double dif = l * dt;
  if (mu == .5)
    return (sqrt(dif + dt) - sqrt(fabs(dif - dt)));
  m1 = 1 - mu;
  return (.5 * (pow(dif + dt, m1) - pow(fabs(dif - dt), m1)) / m1);
}


x86 assembly (clang, -O0):
<alpbetjn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %edi,-0x1c(%rbp)
cvtsi2sdl -0x1c(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xeaf(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    11a5 <alpbetjn+0x85>
jp     11a5 <alpbetjn+0x85>
movsd  -0x30(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
call   1040 <sqrt@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movaps 0xe8a(%rip),%xmm1
pand   %xmm1,%xmm0
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    120e <alpbetjn+0xee>
movsd  0xe5b(%rip),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x30(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
call   1030 <pow@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x30(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movaps 0xe2f(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  -0x28(%rbp),%xmm1
call   1030 <pow@plt>
movsd  -0x40(%rbp),%xmm1
subsd  %xmm0,%xmm1
movsd  0xe00(%rip),%xmm0
mulsd  %xmm1,%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alpbetjn>:
sub    $0x38,%rsp
movapd %xmm1,%xmm3
cvtsi2sd %edi,%xmm4
mulsd  %xmm1,%xmm4
ucomisd 0xec8(%rip),%xmm0
jne    1157 <alpbetjn+0x37>
jp     1157 <alpbetjn+0x37>
movapd %xmm4,%xmm0
addsd  %xmm3,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     11c1 <alpbetjn+0xa1>
sqrtsd %xmm0,%xmm2
jmp    11e6 <alpbetjn+0xc6>
movsd  0xea9(%rip),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x18(%rsp)
movapd %xmm4,%xmm0
addsd  %xmm3,%xmm0
movapd %xmm4,0x20(%rsp)
movsd  %xmm3,0x8(%rsp)
call   1030 <pow@plt>
movsd  %xmm0,0x10(%rsp)
movapd 0x20(%rsp),%xmm0
subsd  0x8(%rsp),%xmm0
andpd  0xe74(%rip),%xmm0
movsd  0x18(%rsp),%xmm1
call   1030 <pow@plt>
movsd  0x10(%rsp),%xmm2
subsd  %xmm0,%xmm2
mulsd  0xe47(%rip),%xmm2
divsd  0x18(%rsp),%xmm2
jmp    121a <alpbetjn+0xfa>
movapd %xmm4,0x20(%rsp)
movsd  %xmm3,0x8(%rsp)
call   1040 <sqrt@plt>
xorpd  %xmm1,%xmm1
movsd  0x8(%rsp),%xmm3
movapd 0x20(%rsp),%xmm4
movapd %xmm0,%xmm2
subsd  %xmm3,%xmm4
andpd  0xe1e(%rip),%xmm4
ucomisd %xmm1,%xmm4
jb     1201 <alpbetjn+0xe1>
xorps  %xmm0,%xmm0
sqrtsd %xmm4,%xmm0
jmp    1216 <alpbetjn+0xf6>
movapd %xmm4,%xmm0
movsd  %xmm2,0x10(%rsp)
call   1040 <sqrt@plt>
movsd  0x10(%rsp),%xmm2
subsd  %xmm0,%xmm2
movapd %xmm2,%xmm0
add    $0x38,%rsp
ret

LLVM IR (-O0):
define double @alpbetjn(double %0, double %1, i32 %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca i32
%8 = alloca double
%9 = alloca double
store double %0, double* %5
store double %1, double* %6
store i32 %2, i32* %7
%10 = load i32, i32* %7
%11 = sitofp i32 %10 to double
%12 = load double, double* %6
%13 = fmul double %11, %12
store double %13, double* %9
%14 = load double, double* %5
%15 = fcmp oeq double %14, 5.000000e-01
br i1 %15, label %16, label %27
16: ; preds = %3
%17 = load double, double* %9
%18 = load double, double* %6
%19 = fadd double %17, %18
%20 = call double @sqrt(double %19)
%21 = load double, double* %9
%22 = load double, double* %6
%23 = fsub double %21, %22
%24 = call double @llvm.fabs.f64(double %23)
%25 = call double @sqrt(double %24)
%26 = fsub double %20, %25
store double %26, double* %4
br label %45
27: ; preds = %3
%28 = load double, double* %5
%29 = fsub double 1.000000e+00, %28
store double %29, double* %8
%30 = load double, double* %9
%31 = load double, double* %6
%32 = fadd double %30, %31
%33 = load double, double* %8
%34 = call double @pow(double %32, double %33)
%35 = load double, double* %9
%36 = load double, double* %6
%37 = fsub double %35, %36
%38 = call double @llvm.fabs.f64(double %37)
%39 = load double, double* %8
%40 = call double @pow(double %38, double %39)
%41 = fsub double %34, %40
%42 = fmul double 5.000000e-01, %41
%43 = load double, double* %8
%44 = fdiv double %42, %43
store double %44, double* %4
br label %45
45: ; preds = %27, %16
%46 = load double, double* %4
ret double %46
}

LLVM IR (-O2):
define double @alpbetjn(double %0, double %1, i32 %2) {
%4 = sitofp i32 %2 to double
%5 = fmul double %4, %1
%6 = fcmp oeq double %0, 5.000000e-01
br i1 %6, label %7, label %14
7: ; preds = %3
%8 = fadd double %5, %1
%9 = tail call double @sqrt(double %8)
%10 = fsub double %5, %1
%11 = tail call double @llvm.fabs.f64(double %10)
%12 = tail call double @sqrt(double %11)
%13 = fsub double %9, %12
br label %24
14: ; preds = %3
%15 = fsub double 1.000000e+00, %0
%16 = fadd double %5, %1
%17 = tail call double @pow(double %16, double %15)
%18 = fsub double %5, %1
%19 = tail call double @llvm.fabs.f64(double %18)
%20 = tail call double @pow(double %19, double %15)
%21 = fsub double %17, %20
%22 = fmul double %21, 5.000000e-01
%23 = fdiv double %22, %15
br label %24
24: ; preds = %14, %7
%25 = phi double [ %13, %7 ], [ %23, %14 ]
ret double %25
}