#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 */
float igamf(float, float);
int /*<<< orphan*/ mtherr(char *, int);
float pdtrcf(int k, float mm) {
  float v, m;
  m = mm;
  if ((k < 0) || (m <= 0.0)) {
    mtherr("pdtrcf", 1);
    return (0.0);
  }
  v = k + 1;
  return (igamf(v, m));
}


x86 assembly (clang, -O0):
<pdtrcf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     115a <pdtrcf+0x3a>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jb     1178 <pdtrcf+0x58>
lea    0xe9f(%rip),%rdi
mov    $0x1,%esi
call   1040 <mtherr@plt>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    119b <pdtrcf+0x7b>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
movss  -0x14(%rbp),%xmm1
call   1030 <igamf@plt>
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pdtrcf>:
test   %edi,%edi
js     113e <pdtrcf+0x1e>
movaps %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomiss %xmm1,%xmm0
jae    113e <pdtrcf+0x1e>
add    $0x1,%edi
xorps  %xmm0,%xmm0
cvtsi2ss %edi,%xmm0
jmp    1030 <igamf@plt>
push   %rax
lea    0xeba(%rip),%rdi
mov    $0x1,%esi
call   1040 <mtherr@plt>
xorps  %xmm0,%xmm0
pop    %rax
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"pdtrcf\00"
define float @pdtrcf(i32 %0, float %1) {
%3 = icmp sgt i32 %0, -1
%4 = fcmp ugt float %1, 0.000000e+00
%5 = and i1 %3, %4
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @mtherr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 1)
br label %12
8: ; preds = %2
%9 = add nuw nsw i32 %0, 1
%10 = sitofp i32 %9 to float
%11 = tail call float @igamf(float %10, float %1)
br label %12
12: ; preds = %8, %6
%13 = phi float [ 0.000000e+00, %6 ], [ %11, %8 ]
ret float %13
}