#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 cephes_igamcf(float, float);
float cephes_igamf(float, float);
float gammainccf(float a, float x) {
  if ((x <= 0) || (a <= 0))
    return 1.0;
  if ((x < 1.0) || (x < a))
    return 1.0 - cephes_igamf(a, x);
  return cephes_igamcf(a, x);
}


x86 assembly (clang, -O0):
<gammainccf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0xc(%rbp),%xmm0
jae    114c <gammainccf+0x2c>
xorps  %xmm0,%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     115e <gammainccf+0x3e>
movss  0xeb4(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11cd <gammainccf+0xad>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe91(%rip),%xmm0
ucomisd %xmm1,%xmm0
ja     118c <gammainccf+0x6c>
movss  -0xc(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    11b9 <gammainccf+0x99>
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
call   1030 <cephes_igamf@plt>
cvtss2sd %xmm0,%xmm1
movsd  0xe59(%rip),%xmm0
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11cd <gammainccf+0xad>
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
call   1040 <cephes_igamcf@plt>
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gammainccf>:
push   %rax
xorps  %xmm2,%xmm2
ucomiss %xmm0,%xmm2
movss  0xed1(%rip),%xmm3
jae    115f <gammainccf+0x3f>
ucomiss %xmm1,%xmm2
jae    115f <gammainccf+0x3f>
movss  0xec2(%rip),%xmm2
ucomiss %xmm1,%xmm2
ja     114e <gammainccf+0x2e>
ucomiss %xmm1,%xmm0
ja     114e <gammainccf+0x2e>
pop    %rax
jmp    1040 <cephes_igamcf@plt>
call   1030 <cephes_igamf@plt>
movss  0xea5(%rip),%xmm3
subss  %xmm0,%xmm3
movaps %xmm3,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @gammainccf(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %4
store float %1, float* %5
%6 = load float, float* %5
%7 = fcmp ole float %6, 0.000000e+00
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load float, float* %4
%10 = fcmp ole float %9, 0.000000e+00
br i1 %10, label %11, label %12
11: ; preds = %8, %2
store float 1.000000e+00, float* %3
br label %31
12: ; preds = %8
%13 = load float, float* %5
%14 = fpext float %13 to double
%15 = fcmp olt double %14, 1.000000e+00
br i1 %15, label %20, label %16
16: ; preds = %12
%17 = load float, float* %5
%18 = load float, float* %4
%19 = fcmp olt float %17, %18
br i1 %19, label %20, label %27
20: ; preds = %16, %12
%21 = load float, float* %4
%22 = load float, float* %5
%23 = call float @cephes_igamf(float %21, float %22)
%24 = fpext float %23 to double
%25 = fsub double 1.000000e+00, %24
%26 = fptrunc double %25 to float
store float %26, float* %3
br label %31
27: ; preds = %16
%28 = load float, float* %4
%29 = load float, float* %5
%30 = call float @cephes_igamcf(float %28, float %29)
store float %30, float* %3
br label %31
31: ; preds = %27, %20, %11
%32 = load float, float* %3
ret float %32
}

LLVM IR (-O2):
define float @gammainccf(float %0, float %1) {
%3 = fcmp ole float %1, 0.000000e+00
%4 = fcmp ole float %0, 0.000000e+00
%5 = or i1 %4, %3
br i1 %5, label %15, label %6
6: ; preds = %2
%7 = fcmp olt float %1, 1.000000e+00
%8 = fcmp olt float %1, %0
%9 = or i1 %7, %8
br i1 %9, label %10, label %13
10: ; preds = %6
%11 = tail call float @cephes_igamf(float %0, float %1)
%12 = fsub float 1.000000e+00, %11
br label %15
13: ; preds = %6
%14 = tail call float @cephes_igamcf(float %0, float %1)
br label %15
15: ; preds = %2, %13, %10
%16 = phi float [ %12, %10 ], [ %14, %13 ], [ 1.000000e+00, %2 ]
ret float %16
}