long double pdtril(k, y)
int k;
long double y;
{
  long double v;
  if ((k < 0) || (y < 0.0L) || (y >= 1.0L)) {
    mtherr("pdtril", 1);
    return (0.0L);
  }
  v = k + 1;
  v = igamil(v, y);
  return (v);
}


x86 assembly (clang, -O0):
<pdtril>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
fldt   0x10(%rbp)
mov    %edi,-0x14(%rbp)
fstpt  -0x30(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     1165 <pdtril+0x45>
fldt   -0x30(%rbp)
fldz
fucomip %st(1),%st
fstp   %st(0)
ja     1165 <pdtril+0x45>
jmp    114f <pdtril+0x2f>
fldt   -0x30(%rbp)
fld1
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jb     1182 <pdtril+0x62>
jmp    1165 <pdtril+0x45>
lea    0xe94(%rip),%rdi
xor    %eax,%eax
mov    $0x1,%esi
call   1040 <mtherr@plt>
fldz
fstpt  -0x10(%rbp)
jmp    11b5 <pdtril+0x95>
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 <igamil@plt>
mov    %eax,-0x44(%rbp)
fildl  -0x44(%rbp)
fstpt  -0x40(%rbp)
fldt   -0x40(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pdtril>:
sub    $0x28,%rsp
fldt   0x30(%rsp)
fld1
fxch   %st(1)
fucomi %st(1),%st
fstp   %st(1)
jae    1164 <pdtril+0x44>
test   %edi,%edi
js     1164 <pdtril+0x44>
fldz
fucomip %st(1),%st
ja     1164 <pdtril+0x44>
add    $0x1,%edi
mov    %edi,0x20(%rsp)
fildl  0x20(%rsp)
fxch   %st(1)
fstpt  0x10(%rsp)
fstpt  (%rsp)
xor    %eax,%eax
call   1030 <igamil@plt>
mov    %eax,0x24(%rsp)
fildl  0x24(%rsp)
add    $0x28,%rsp
ret
fstp   %st(0)
lea    0xe93(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <mtherr@plt>
fldz
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"pdtril\00"
define x86_fp80 @pdtril(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 %15, label %9
9: ; preds = %2
%10 = load x86_fp80, x86_fp80* %5
%11 = fcmp olt x86_fp80 %10, 0xK00000000000000000000
br i1 %11, label %15, label %12
12: ; preds = %9
%13 = load x86_fp80, x86_fp80* %5
%14 = fcmp oge x86_fp80 %13, 0xK3FFF8000000000000000
br i1 %14, label %15, label %17
15: ; preds = %12, %9, %2
%16 = 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* %3
br label %26
17: ; preds = %12
%18 = load i32, i32* %4
%19 = add nsw i32 %18, 1
%20 = sitofp i32 %19 to x86_fp80
store x86_fp80 %20, x86_fp80* %6
%21 = load x86_fp80, x86_fp80* %6
%22 = load x86_fp80, x86_fp80* %5
%23 = call i32 (x86_fp80, x86_fp80, ...) bitcast (i32 (...)* @igamil to i32 (x86_fp80, x86_fp80, ...)*)(x86_fp80 %21, x86_fp80 %22)
%24 = sitofp i32 %23 to x86_fp80
store x86_fp80 %24, x86_fp80* %6
%25 = load x86_fp80, x86_fp80* %6
store x86_fp80 %25, x86_fp80* %3
br label %26
26: ; preds = %17, %15
%27 = load x86_fp80, x86_fp80* %3
ret x86_fp80 %27
}

LLVM IR (-O2):
@.str = [7 x i8] c"pdtril\00"
define x86_fp80 @pdtril(i32 %0, x86_fp80 %1) {
%3 = icmp slt i32 %0, 0
%4 = fcmp olt x86_fp80 %1, 0xK00000000000000000000
%5 = or i1 %3, %4
%6 = fcmp oge x86_fp80 %1, 0xK3FFF8000000000000000
%7 = or i1 %6, %5
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = 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 %15
10: ; preds = %2
%11 = add nuw nsw i32 %0, 1
%12 = sitofp i32 %11 to x86_fp80
%13 = tail call i32 (x86_fp80, x86_fp80, ...) bitcast (i32 (...)* @igamil to i32 (x86_fp80, x86_fp80, ...)*)(x86_fp80 %12, x86_fp80 %1)
%14 = sitofp i32 %13 to x86_fp80
br label %15
15: ; preds = %10, %8
%16 = phi x86_fp80 [ 0xK00000000000000000000, %8 ], [ %14, %10 ]
ret x86_fp80 %16
}