long double fdtrcl(ia, ib, x)
int ia, ib;
long double x;
{
  long double a, b, w;
  if ((ia < 1) || (ib < 1) || (x < 0.0L)) {
    mtherr("fdtrcl", 1);
    return (0.0L);
  }
  a = ia;
  b = ib;
  w = b / (b + a * x);
  return (incbetl(0.5L * b, 0.5L * a, w));
}


x86 assembly (clang, -O0):
<fdtrcl>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
fldt   0x10(%rbp)
mov    %edi,-0x14(%rbp)
mov    %esi,-0x18(%rbp)
fstpt  -0x30(%rbp)
cmpl   $0x1,-0x14(%rbp)
jl     115f <fdtrcl+0x3f>
cmpl   $0x1,-0x18(%rbp)
jl     115f <fdtrcl+0x3f>
fldt   -0x30(%rbp)
fldz
fucomip %st(1),%st
fstp   %st(0)
jbe    117c <fdtrcl+0x5c>
jmp    115f <fdtrcl+0x3f>
lea    0xe9e(%rip),%rdi
xor    %eax,%eax
mov    $0x1,%esi
call   1040 <mtherr@plt>
fldz
fstpt  -0x10(%rbp)
jmp    11d4 <fdtrcl+0xb4>
mov    -0x14(%rbp),%eax
mov    %eax,-0x6c(%rbp)
fildl  -0x6c(%rbp)
fstpt  -0x40(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x68(%rbp)
fildl  -0x68(%rbp)
fstpt  -0x50(%rbp)
fldt   -0x50(%rbp)
fldt   -0x40(%rbp)
fldt   -0x30(%rbp)
fmulp  %st,%st(1)
fadd   %st(1),%st
fdivrp %st,%st(1)
fstpt  -0x60(%rbp)
fldt   -0x50(%rbp)
flds   0xe51(%rip)
fmul   %st,%st(1)
fldt   -0x40(%rbp)
fmulp  %st,%st(1)
fldt   -0x60(%rbp)
mov    %rsp,%rax
fstpt  0x20(%rax)
fstpt  0x10(%rax)
fstpt  (%rax)
xor    %eax,%eax
call   1030 <incbetl@plt>
mov    %eax,-0x64(%rbp)
fildl  -0x64(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fdtrcl>:
sub    $0x48,%rsp
fldt   0x50(%rsp)
test   %edi,%edi
jle    117b <fdtrcl+0x5b>
test   %esi,%esi
jle    117b <fdtrcl+0x5b>
fldz
fucomip %st(1),%st
ja     117b <fdtrcl+0x5b>
mov    %edi,0x3c(%rsp)
fildl  0x3c(%rsp)
mov    %esi,0x40(%rsp)
fildl  0x40(%rsp)
fxch   %st(2)
fmul   %st(1),%st
fadd   %st(2),%st
fdivr  %st(2),%st
flds   0xeac(%rip)
fmul   %st,%st(3)
fmulp  %st,%st(2)
fxch   %st(1)
fstpt  0x10(%rsp)
fxch   %st(1)
fstpt  (%rsp)
fstpt  0x20(%rsp)
xor    %eax,%eax
call   1030 <incbetl@plt>
mov    %eax,0x44(%rsp)
fildl  0x44(%rsp)
add    $0x48,%rsp
ret
fstp   %st(0)
lea    0xe80(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <mtherr@plt>
fldz
add    $0x48,%rsp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"fdtrcl\00"
define x86_fp80 @fdtrcl(i32 %0, i32 %1, x86_fp80 %2) {
%4 = alloca x86_fp80
%5 = alloca i32
%6 = alloca i32
%7 = alloca x86_fp80
%8 = alloca x86_fp80
%9 = alloca x86_fp80
%10 = alloca x86_fp80
store i32 %0, i32* %5
store i32 %1, i32* %6
store x86_fp80 %2, x86_fp80* %7
%11 = load i32, i32* %5
%12 = icmp slt i32 %11, 1
br i1 %12, label %19, label %13
13: ; preds = %3
%14 = load i32, i32* %6
%15 = icmp slt i32 %14, 1
br i1 %15, label %19, label %16
16: ; preds = %13
%17 = load x86_fp80, x86_fp80* %7
%18 = fcmp olt x86_fp80 %17, 0xK00000000000000000000
br i1 %18, label %19, label %21
19: ; preds = %16, %13, %3
%20 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @mtherr to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 1)
store x86_fp80 0xK00000000000000000000, x86_fp80* %4
br label %39
21: ; preds = %16
%22 = load i32, i32* %5
%23 = sitofp i32 %22 to x86_fp80
store x86_fp80 %23, x86_fp80* %8
%24 = load i32, i32* %6
%25 = sitofp i32 %24 to x86_fp80
store x86_fp80 %25, x86_fp80* %9
%26 = load x86_fp80, x86_fp80* %9
%27 = load x86_fp80, x86_fp80* %9
%28 = load x86_fp80, x86_fp80* %8
%29 = load x86_fp80, x86_fp80* %7
%30 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %28, x86_fp80 %29, x86_fp80 %27)
%31 = fdiv x86_fp80 %26, %30
store x86_fp80 %31, x86_fp80* %10
%32 = load x86_fp80, x86_fp80* %9
%33 = fmul x86_fp80 0xK3FFE8000000000000000, %32
%34 = load x86_fp80, x86_fp80* %8
%35 = fmul x86_fp80 0xK3FFE8000000000000000, %34
%36 = load x86_fp80, x86_fp80* %10
%37 = call i32 (x86_fp80, x86_fp80, x86_fp80, ...) bitcast (i32 (...)* @incbetl to i32 (x86_fp80, x86_fp80, x86_fp80, ...)*)(x86_fp80 %33, x86_fp80 %35, x86_fp80 %36)
%38 = sitofp i32 %37 to x86_fp80
store x86_fp80 %38, x86_fp80* %4
br label %39
39: ; preds = %21, %19
%40 = load x86_fp80, x86_fp80* %4
ret x86_fp80 %40
}

LLVM IR (-O2):
@.str = [7 x i8] c"fdtrcl\00"
define x86_fp80 @fdtrcl(i32 %0, i32 %1, x86_fp80 %2) {
%4 = icmp slt i32 %0, 1
%5 = icmp slt i32 %1, 1
%6 = or i1 %4, %5
%7 = fcmp olt x86_fp80 %2, 0xK00000000000000000000
%8 = or i1 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %3
%10 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @mtherr to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 1)
br label %20
11: ; preds = %3
%12 = sitofp i32 %0 to x86_fp80
%13 = sitofp i32 %1 to x86_fp80
%14 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %12, x86_fp80 %2, x86_fp80 %13)
%15 = fdiv x86_fp80 %13, %14
%16 = fmul x86_fp80 %13, 0xK3FFE8000000000000000
%17 = fmul x86_fp80 %12, 0xK3FFE8000000000000000
%18 = tail call i32 (x86_fp80, x86_fp80, x86_fp80, ...) bitcast (i32 (...)* @incbetl to i32 (x86_fp80, x86_fp80, x86_fp80, ...)*)(x86_fp80 %16, x86_fp80 %17, x86_fp80 %15)
%19 = sitofp i32 %18 to x86_fp80
br label %20
20: ; preds = %11, %9
%21 = phi x86_fp80 [ 0xK00000000000000000000, %9 ], [ %19, %11 ]
ret x86_fp80 %21
}