long double pdtrl(k, m)
int k;
long double m;
{
  long double v;
  if ((k < 0) || (m <= 0.0L)) {
    mtherr("pdtrl", 1);
    return (0.0L);
  }
  v = k + 1;
  return (igamcl(v, m));
}


x86 assembly (clang, -O0):
<pdtrl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
fldt   0x10(%rbp)
mov    %edi,-0x14(%rbp)
fstpt  -0x30(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     114f <pdtrl+0x2f>
fldt   -0x30(%rbp)
fldz
fucomip %st(1),%st
fstp   %st(0)
jb     116c <pdtrl+0x4c>
jmp    114f <pdtrl+0x2f>
lea    0xeaa(%rip),%rdi
xor    %eax,%eax
mov    $0x1,%esi
call   1040 <mtherr@plt>
fldz
fstpt  -0x10(%rbp)
jmp    1199 <pdtrl+0x79>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
fildl  -0x48(%rbp)
fstpt  -0x40(%rbp)
fldt   -0x40(%rbp)
fldt   -0x30(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
xor    %eax,%eax
call   1030 <igamcl@plt>
mov    %eax,-0x44(%rbp)
fildl  -0x44(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pdtrl>:
sub    $0x28,%rsp
fldt   0x30(%rsp)
test   %edi,%edi
js     115a <pdtrl+0x3a>
fldz
fucomip %st(1),%st
jae    115a <pdtrl+0x3a>
add    $0x1,%edi
mov    %edi,0x20(%rsp)
fildl  0x20(%rsp)
fxch   %st(1)
fstpt  0x10(%rsp)
fstpt  (%rsp)
xor    %eax,%eax
call   1030 <igamcl@plt>
mov    %eax,0x24(%rsp)
fildl  0x24(%rsp)
add    $0x28,%rsp
ret
fstp   %st(0)
lea    0xe9d(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <mtherr@plt>
fldz
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"pdtrl\00"
define x86_fp80 @pdtrl(i32 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca i32
%5 = alloca x86_fp80
%6 = alloca x86_fp80
store i32 %0, i32* %4
store x86_fp80 %1, x86_fp80* %5
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %2
%10 = load x86_fp80, x86_fp80* %5
%11 = fcmp ole x86_fp80 %10, 0xK00000000000000000000
br i1 %11, label %12, label %14
12: ; preds = %9, %2
%13 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @mtherr to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 1)
store x86_fp80 0xK00000000000000000000, x86_fp80* %3
br label %22
14: ; preds = %9
%15 = load i32, i32* %4
%16 = add nsw i32 %15, 1
%17 = sitofp i32 %16 to x86_fp80
store x86_fp80 %17, x86_fp80* %6
%18 = load x86_fp80, x86_fp80* %6
%19 = load x86_fp80, x86_fp80* %5
%20 = call i32 (x86_fp80, x86_fp80, ...) bitcast (i32 (...)* @igamcl to i32 (x86_fp80, x86_fp80, ...)*)(x86_fp80 %18, x86_fp80 %19)
%21 = sitofp i32 %20 to x86_fp80
store x86_fp80 %21, x86_fp80* %3
br label %22
22: ; preds = %14, %12
%23 = load x86_fp80, x86_fp80* %3
ret x86_fp80 %23
}

LLVM IR (-O2):
@.str = [6 x i8] c"pdtrl\00"
define x86_fp80 @pdtrl(i32 %0, x86_fp80 %1) {
%3 = icmp slt i32 %0, 0
%4 = fcmp ole x86_fp80 %1, 0xK00000000000000000000
%5 = or i1 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @mtherr to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 1)
br label %13
8: ; preds = %2
%9 = add nuw nsw i32 %0, 1
%10 = sitofp i32 %9 to x86_fp80
%11 = tail call i32 (x86_fp80, x86_fp80, ...) bitcast (i32 (...)* @igamcl to i32 (x86_fp80, x86_fp80, ...)*)(x86_fp80 %10, x86_fp80 %1)
%12 = sitofp i32 %11 to x86_fp80
br label %13
13: ; preds = %8, %6
%14 = phi x86_fp80 [ 0xK00000000000000000000, %6 ], [ %12, %8 ]
ret x86_fp80 %14
}