#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 */
double NAN;
int /*<<< orphan*/ error(char *);
double gammacdf(double x, double shape, double rate) {
  if (shape <= 0 || rate <= 0)
    error("Both parameters must be larger than 0.");
  if (x <= 0)
    return 0.;
  return NAN;
}


x86 assembly (clang, -O0):
<gammacdf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jae    1143 <gammacdf+0x33>
xorps  %xmm0,%xmm0
ucomisd -0x20(%rbp),%xmm0
jb     114f <gammacdf+0x3f>
lea    0xeb6(%rip),%rdi
call   1030 <error@plt>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     116a <gammacdf+0x5a>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    117a <gammacdf+0x6a>
mov    0x2e87(%rip),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gammacdf>:
sub    $0x18,%rsp
movapd %xmm0,%xmm3
xorpd  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jae    1128 <gammacdf+0x18>
ucomisd %xmm2,%xmm0
jb     113e <gammacdf+0x2e>
lea    0xed1(%rip),%rdi
movapd %xmm3,(%rsp)
call   1030 <error@plt>
movapd (%rsp),%xmm3
mov    0x2eb3(%rip),%rax
xorpd  %xmm0,%xmm0
cmpnlesd %xmm0,%xmm3
movsd  (%rax),%xmm0
andpd  %xmm3,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [39 x i8] c"Both parameters must be larger than 0.\00"
@NAN = global double 0.000000e+00
define double @gammacdf(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
%8 = load double, double* %6
%9 = fcmp ole double %8, 0.000000e+00
br i1 %9, label %13, label %10
10: ; preds = %3
%11 = load double, double* %7
%12 = fcmp ole double %11, 0.000000e+00
br i1 %12, label %13, label %15
13: ; preds = %10, %3
%14 = call i32 @error(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %13, %10
%16 = load double, double* %5
%17 = fcmp ole double %16, 0.000000e+00
br i1 %17, label %18, label %19
18: ; preds = %15
store double 0.000000e+00, double* %4
br label %21
19: ; preds = %15
%20 = load double, double* @NAN
store double %20, double* %4
br label %21
21: ; preds = %19, %18
%22 = load double, double* %4
ret double %22
}

LLVM IR (-O2):
@.str = [39 x i8] c"Both parameters must be larger than 0.\00"
@NAN = global double 0.000000e+00
define double @gammacdf(double %0, double %1, double %2) {
%4 = fcmp ole double %1, 0.000000e+00
%5 = fcmp ole double %2, 0.000000e+00
%6 = or i1 %4, %5
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = tail call i32 @error(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %3, %7
%10 = fcmp ugt double %0, 0.000000e+00
%11 = load double, double* @NAN
%12 = select i1 %10, double %11, double 0.000000e+00
ret double %12
}