#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 exp(double);
double fabs(double);
double gamma(double);
double log(double);
int /*<<< orphan*/ printf(char *);
double incomgam(double a, double x) {
  double p, q, d, s, s1, p0, q0, p1, q1, q2;
  int n = 0;
  if (a <= 0.0) {
    printf("the parameter a<=0!\n");
    return -1.0;
  }
  if (x < 0.0) {
    printf("the parameter x<0!\n");
    return -1.0;
  }
  if (fabs(x) < 0.0000001)
    return (0.0);
  if (x > 1.0e+35)
    return (1.0);
  q = a * log(x);
  q2 = exp(q);
  if (x < 1.0 + a) {
    p = a;
    d = 1.0 / a;
    s = d;
    while (++n <= 100) {
      p += 1.0;
      d *= x / p;
      s += d;
      if (fabs(d / s) < 1.0e-07) {
        s *= exp(-x) * q2 / gamma(a);
        return s;
      }
    }
  } else {
    s = 1.0 / x;
    p0 = 0.0;
    p1 = 1.0;
    q0 = 1.0;
    q1 = x;
    while (++n <= 100) {
      p0 = p1 + (n - a) * p0;
      q0 = q1 + (n - a) * q0;
      p = x * p0 + n * p1;
      q = x * q0 + n * q1;
      if (fabs(q) > 0.0000001) {
        s1 = p / q;
        p1 = p;
        q1 = q;
        if (fabs((s1 - s) / s1) < 1.0e-07) {
          s = s1 * exp(-x) * q2 / gamma(a);
          return (1.0 - s);
        }
        s = s1;
      }
      p1 = p;
      q1 = q;
    }
  }
  printf("the parameter a is too large!\n");
  s = 1.0 - s * exp(-x) * q2 / gamma(a);
  return s;
}


x86 assembly (clang, -O0):
<incomgam>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movl   $0x0,-0x6c(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     1188 <incomgam+0x48>
lea    0xebf(%rip),%rdi
call   1040 <printf@plt>
movsd  0xe9a(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    15c7 <incomgam+0x487>
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    11b4 <incomgam+0x74>
lea    0xea8(%rip),%rdi
call   1040 <printf@plt>
movsd  0xe6e(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    15c7 <incomgam+0x487>
movsd  -0x18(%rbp),%xmm1
movaps 0xe60(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xe34(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    11e3 <incomgam+0xa3>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    15c7 <incomgam+0x487>
movsd  -0x18(%rbp),%xmm0
movsd  0xe18(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    120c <incomgam+0xcc>
movsd  0xe0e(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    15c7 <incomgam+0x487>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1060 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x78(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
call   1050 <exp@plt>
movsd  %xmm0,-0x68(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  0xdc3(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1354 <incomgam+0x214>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xda2(%rip),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
cmp    $0x64,%eax
jg     134f <incomgam+0x20f>
movsd  0xd74(%rip),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm1
divsd  -0x38(%rbp),%xmm1
movaps 0xd46(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xd1a(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    134a <incomgam+0x20a>
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1050 <exp@plt>
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <gamma@plt>
movaps %xmm0,%xmm1
movsd  -0x80(%rbp),%xmm0
divsd  %xmm1,%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    15c7 <incomgam+0x487>
jmp    1282 <incomgam+0x142>
jmp    1540 <incomgam+0x400>
movsd  0xcb4(%rip),%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xc9a(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xc8d(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
cmp    $0x64,%eax
jg     153b <incomgam+0x3fb>
movsd  -0x58(%rbp),%xmm1
cvtsi2sdl -0x6c(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x60(%rbp),%xmm1
cvtsi2sdl -0x6c(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
cvtsi2sdl -0x6c(%rbp),%xmm1
mulsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
cvtsi2sdl -0x6c(%rbp),%xmm1
mulsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movaps 0xbec(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0xbc0(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1522 <incomgam+0x3e2>
movsd  -0x20(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x40(%rbp),%xmm1
subsd  -0x38(%rbp),%xmm1
divsd  -0x40(%rbp),%xmm1
movaps 0xb9d(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xb71(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1518 <incomgam+0x3d8>
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1050 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x90(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
call   1030 <gamma@plt>
movaps %xmm0,%xmm1
movsd  -0x88(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xb07(%rip),%xmm0
subsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    15c7 <incomgam+0x487>
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
jmp    1392 <incomgam+0x252>
jmp    1540 <incomgam+0x400>
lea    0xb12(%rip),%rdi
call   1040 <printf@plt>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1050 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0xa0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
call   1030 <gamma@plt>
movsd  -0x98(%rbp),%xmm1
ff
divsd  %xmm0,%xmm1
movsd  0xa5c(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<incomgam>:
sub    $0x38,%rsp
movapd %xmm0,%xmm2
xorpd  %xmm0,%xmm0
ucomisd %xmm2,%xmm0
jae    1161 <incomgam+0x21>
ucomisd %xmm1,%xmm0
jbe    117e <incomgam+0x3e>
lea    0xf0f(%rip),%rdi
jmp    1168 <incomgam+0x28>
lea    0xf19(%rip),%rdi
call   1030 <puts@plt>
movsd  0xe8b(%rip),%xmm3
movapd %xmm3,%xmm0
add    $0x38,%rsp
ret
movapd 0xe9a(%rip),%xmm0
andpd  %xmm1,%xmm0
xorpd  %xmm3,%xmm3
movsd  0xe72(%rip),%xmm4
ucomisd %xmm0,%xmm4
ja     1175 <incomgam+0x35>
ucomisd 0xe74(%rip),%xmm1
jbe    11b0 <incomgam+0x70>
movsd  0xe62(%rip),%xmm3
jmp    1175 <incomgam+0x35>
movapd %xmm1,%xmm0
movsd  %xmm2,0x8(%rsp)
movapd %xmm1,0x20(%rsp)
call   1060 <log@plt>
mulsd  0x8(%rsp),%xmm0
call   1050 <exp@plt>
movapd 0x20(%rsp),%xmm9
movsd  0x8(%rsp),%xmm6
movapd %xmm0,%xmm8
movsd  0xe26(%rip),%xmm0
addsd  %xmm6,%xmm0
ucomisd %xmm9,%xmm0
movsd  %xmm8,(%rsp)
movsd  0xe0f(%rip),%xmm0
jbe    12aa <incomgam+0x16a>
movapd %xmm0,%xmm1
divsd  %xmm6,%xmm1
mov    $0x65,%eax
movapd 0xe04(%rip),%xmm2
movapd %xmm1,%xmm5
movapd %xmm6,%xmm3
movsd  0xddc(%rip),%xmm7
nopl   0x0(%rax)
add    $0xffffffff,%eax
je     1361 <incomgam+0x221>
addsd  %xmm0,%xmm3
movapd %xmm9,%xmm4
divsd  %xmm3,%xmm4
mulsd  %xmm4,%xmm1
addsd  %xmm1,%xmm5
movapd %xmm1,%xmm4
divsd  %xmm5,%xmm4
andpd  %xmm2,%xmm4
ucomisd %xmm4,%xmm7
jbe    1230 <incomgam+0xf0>
xorpd  0xdd7(%rip),%xmm9
movapd %xmm9,%xmm0
movsd  %xmm5,0x10(%rsp)
call   1050 <exp@plt>
movsd  (%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
movsd  0x8(%rsp),%xmm0
call   1040 <gamma@plt>
movsd  0x10(%rsp),%xmm3
movsd  (%rsp),%xmm1
divsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm3
jmp    1175 <incomgam+0x35>
divsd  %xmm9,%xmm0
movsd  %xmm0,0x10(%rsp)
movapd 0xd73(%rip),%xmm0
movsd  %xmm9,%xmm0
movapd %xmm9,%xmm1
unpcklpd %xmm9,%xmm1
movsd  0xd3c(%rip),%xmm2
mov    $0x1,%eax
movapd 0xd3f(%rip),%xmm3
movsd  0xd1f(%rip),%xmm7
jmp    12f8 <incomgam+0x1b8>
nopl   0x0(%rax,%rax,1)
add    $0x1,%eax
cmp    $0x65,%eax
je     1367 <incomgam+0x227>
xorps  %xmm4,%xmm4
cvtsi2sd %eax,%xmm4
movapd %xmm4,%xmm5
subsd  %xmm6,%xmm5
unpcklpd %xmm5,%xmm5
mulpd  %xmm5,%xmm2
addpd  %xmm0,%xmm2
unpcklpd %xmm4,%xmm4
mulpd  %xmm0,%xmm4
movapd %xmm1,%xmm0
mulpd  %xmm2,%xmm0
addpd  %xmm4,%xmm0
movapd %xmm0,%xmm4
andpd  %xmm3,%xmm4
ucomisd %xmm7,%xmm4
jbe    12f0 <incomgam+0x1b0>
movapd %xmm0,%xmm5
unpckhpd %xmm0,%xmm5
divsd  %xmm0,%xmm5
movapd %xmm5,%xmm4
subsd  0x10(%rsp),%xmm4
divsd  %xmm5,%xmm4
andpd  %xmm3,%xmm4
ucomisd %xmm4,%xmm7
ja     139c <incomgam+0x25c>
movsd  %xmm5,0x10(%rsp)
jmp    12f0 <incomgam+0x1b0>
movsd  %xmm5,0x10(%rsp)
lea    0xce2(%rip),%rdi
call   1030 <puts@plt>
movapd 0x20(%rsp),%xmm0
xorpd  0xcbf(%rip),%xmm0
call   1050 <exp@plt>
mulsd  0x10(%rsp),%xmm0
movsd  (%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
jmp    13cd <incomgam+0x28d>
xorpd  0xc9b(%rip),%xmm9
movapd %xmm9,%xmm0
movapd %xmm5,0x10(%rsp)
call   1050 <exp@plt>
movapd 0x10(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  (%rsp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,(%rsp)
movsd  0x8(%rsp),%xmm0
call   1040 <gamma@plt>
movsd  (%rsp),%xmm1
divsd  %xmm0,%xmm1
movsd  0xc27(%rip),%xmm3
subsd  %xmm1,%xmm3
jmp    1175 <incomgam+0x35>

LLVM IR (-O0):
@.str = [21 x i8] c"the parameter a<=0!\0A\00"
@.str.1 = [20 x i8] c"the parameter x<0!\0A\00"
@.str.2 = [31 x i8] c"the parameter a is too large!\0A\00"
define double @incomgam(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca i32
store double %0, double* %4
store double %1, double* %5
store i32 0, i32* %16
%17 = load double, double* %4
%18 = fcmp ole double %17, 0.000000e+00
br i1 %18, label %19, label %21
19: ; preds = %2
%20 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
store double -1.000000e+00, double* %3
br label %171
21: ; preds = %2
%22 = load double, double* %5
%23 = fcmp olt double %22, 0.000000e+00
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
store double -1.000000e+00, double* %3
br label %171
26: ; preds = %21
%27 = load double, double* %5
%28 = call double @llvm.fabs.f64(double %27)
%29 = fcmp olt double %28, 0x3E7AD7F29ABCAF48
br i1 %29, label %30, label %31
30: ; preds = %26
store double 0.000000e+00, double* %3
br label %171
31: ; preds = %26
%32 = load double, double* %5
%33 = fcmp ogt double %32, 0x4733426172C74D82
br i1 %33, label %34, label %35
34: ; preds = %31
store double 1.000000e+00, double* %3
br label %171
35: ; preds = %31
%36 = load double, double* %4
%37 = load double, double* %5
%38 = call double @log(double %37)
%39 = fmul double %36, %38
store double %39, double* %7
%40 = load double, double* %7
%41 = call double @exp(double %40)
store double %41, double* %15
%42 = load double, double* %5
%43 = load double, double* %4
%44 = fadd double 1.000000e+00, %43
%45 = fcmp olt double %42, %44
br i1 %45, label %46, label %85
46: ; preds = %35
%47 = load double, double* %4
store double %47, double* %6
%48 = load double, double* %4
%49 = fdiv double 1.000000e+00, %48
store double %49, double* %8
%50 = load double, double* %8
store double %50, double* %9
br label %51
51: ; preds = %83, %46
%52 = load i32, i32* %16
%53 = add nsw i32 %52, 1
store i32 %53, i32* %16
%54 = icmp sle i32 %53, 100
br i1 %54, label %55, label %84
55: ; preds = %51
%56 = load double, double* %6
%57 = fadd double %56, 1.000000e+00
store double %57, double* %6
%58 = load double, double* %5
%59 = load double, double* %6
%60 = fdiv double %58, %59
%61 = load double, double* %8
%62 = fmul double %61, %60
store double %62, double* %8
%63 = load double, double* %8
%64 = load double, double* %9
%65 = fadd double %64, %63
store double %65, double* %9
%66 = load double, double* %8
%67 = load double, double* %9
%68 = fdiv double %66, %67
%69 = call double @llvm.fabs.f64(double %68)
%70 = fcmp olt double %69, 0x3E7AD7F29ABCAF48
br i1 %70, label %71, label %83
71: ; preds = %55
%72 = load double, double* %5
%73 = fneg double %72
%74 = call double @exp(double %73)
%75 = load double, double* %15
%76 = fmul double %74, %75
%77 = load double, double* %4
%78 = call double @gamma(double %77)
%79 = fdiv double %76, %78
%80 = load double, double* %9
%81 = fmul double %80, %79
store double %81, double* %9
%82 = load double, double* %9
store double %82, double* %3
br label %171
83: ; preds = %55
br label %51
84: ; preds = %51
br label %157
85: ; preds = %35
%86 = load double, double* %5
%87 = fdiv double 1.000000e+00, %86
store double %87, double* %9
store double 0.000000e+00, double* %11
store double 1.000000e+00, double* %13
store double 1.000000e+00, double* %12
%88 = load double, double* %5
store double %88, double* %14
br label %89
89: ; preds = %153, %85
%90 = load i32, i32* %16
%91 = add nsw i32 %90, 1
store i32 %91, i32* %16
%92 = icmp sle i32 %91, 100
br i1 %92, label %93, label %156
93: ; preds = %89
%94 = load double, double* %13
%95 = load i32, i32* %16
%96 = sitofp i32 %95 to double
%97 = load double, double* %4
%98 = fsub double %96, %97
%99 = load double, double* %11
%100 = call double @llvm.fmuladd.f64(double %98, double %99, double %94)
store double %100, double* %11
%101 = load double, double* %14
%102 = load i32, i32* %16
%103 = sitofp i32 %102 to double
%104 = load double, double* %4
%105 = fsub double %103, %104
%106 = load double, double* %12
%107 = call double @llvm.fmuladd.f64(double %105, double %106, double %101)
store double %107, double* %12
%108 = load double, double* %5
%109 = load double, double* %11
%110 = load i32, i32* %16
%111 = sitofp i32 %110 to double
%112 = load double, double* %13
%113 = fmul double %111, %112
%114 = call double @llvm.fmuladd.f64(double %108, double %109, double %113)
store double %114, double* %6
%115 = load double, double* %5
%116 = load double, double* %12
%117 = load i32, i32* %16
%118 = sitofp i32 %117 to double
%119 = load double, double* %14
%120 = fmul double %118, %119
%121 = call double @llvm.fmuladd.f64(double %115, double %116, double %120)
store double %121, double* %7
%122 = load double, double* %7
%123 = call double @llvm.fabs.f64(double %122)
%124 = fcmp ogt double %123, 0x3E7AD7F29ABCAF48
br i1 %124, label %125, label %153
125: ; preds = %93
%126 = load double, double* %6
%127 = load double, double* %7
%128 = fdiv double %126, %127
store double %128, double* %10
%129 = load double, double* %6
store double %129, double* %13
%130 = load double, double* %7
store double %130, double* %14
%131 = load double, double* %10
%132 = load double, double* %9
%133 = fsub double %131, %132
%134 = load double, double* %10
%135 = fdiv double %133, %134
%136 = call double @llvm.fabs.f64(double %135)
%137 = fcmp olt double %136, 0x3E7AD7F29ABCAF48
br i1 %137, label %138, label %151
138: ; preds = %125
%139 = load double, double* %10
%140 = load double, double* %5
%141 = fneg double %140
%142 = call double @exp(double %141)
%143 = fmul double %139, %142
%144 = load double, double* %15
%145 = fmul double %143, %144
%146 = load double, double* %4
%147 = call double @gamma(double %146)
%148 = fdiv double %145, %147
store double %148, double* %9
%149 = load double, double* %9
%150 = fsub double 1.000000e+00, %149
store double %150, double* %3
br label %171
151: ; preds = %125
%152 = load double, double* %10
store double %152, double* %9
br label %153
153: ; preds = %151, %93
%154 = load double, double* %6
store double %154, double* %13
%155 = load double, double* %7
store double %155, double* %14
br label %89
156: ; preds = %89
br label %157
157: ; preds = %156, %84
%158 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0))
%159 = load double, double* %9
%160 = load double, double* %5
%161 = fneg double %160
%162 = call double @exp(double %161)
%163 = fmul double %159, %162
%164 = load double, double* %15
%165 = fmul double %163, %164
%166 = load double, double* %4
%167 = call double @gamma(double %166)
%168 = fdiv double %165, %167
%169 = fsub double 1.000000e+00, %168
store double %169, double* %9
%170 = load double, double* %9
store double %170, double* %3
br label %171
171: ; preds = %157, %138, %71, %34, %30, %24, %19
%172 = load double, double* %3
ret double %172
}

LLVM IR (-O2):
@str = [30 x i8] c"the parameter a is too large!\00"
@str.3 = [19 x i8] c"the parameter x<0!\00"
@str.4 = [20 x i8] c"the parameter a<=0!\00"
define double @incomgam(double %0, double %1) {
%3 = fcmp ugt double %0, 0.000000e+00
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.4, i64 0, i64 0))
br label %97
6: ; preds = %2
%7 = fcmp olt double %1, 0.000000e+00
br i1 %7, label %8, label %10
8: ; preds = %6
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.3, i64 0, i64 0))
br label %97
10: ; preds = %6
%11 = tail call double @llvm.fabs.f64(double %1)
%12 = fcmp olt double %11, 0x3E7AD7F29ABCAF48
br i1 %12, label %97, label %13
13: ; preds = %10
%14 = fcmp ogt double %1, 0x4733426172C74D82
br i1 %14, label %97, label %15
15: ; preds = %13
%16 = tail call double @log(double %1)
%17 = fmul double %16, %0
%18 = tail call double @exp(double %17)
%19 = fadd double %0, 1.000000e+00
%20 = fcmp ogt double %19, %1
br i1 %20, label %21, label %45
21: ; preds = %15
%22 = fdiv double 1.000000e+00, %0
br label %23
23: ; preds = %29, %21
%24 = phi double [ %22, %21 ], [ %33, %29 ]
%25 = phi double [ %22, %21 ], [ %34, %29 ]
%26 = phi double [ %0, %21 ], [ %31, %29 ]
%27 = phi i32 [ 0, %21 ], [ %30, %29 ]
%28 = icmp eq i32 %27, 100
br i1 %28, label %87, label %29
29: ; preds = %23
%30 = add nuw nsw i32 %27, 1
%31 = fadd double %26, 1.000000e+00
%32 = fdiv double %1, %31
%33 = fmul double %24, %32
%34 = fadd double %25, %33
%35 = fdiv double %33, %34
%36 = tail call double @llvm.fabs.f64(double %35)
%37 = fcmp olt double %36, 0x3E7AD7F29ABCAF48
br i1 %37, label %38, label %23
38: ; preds = %29
%39 = fneg double %1
%40 = tail call double @exp(double %39)
%41 = fmul double %18, %40
%42 = tail call double @gamma(double %0)
%43 = fdiv double %41, %42
%44 = fmul double %34, %43
br label %97
45: ; preds = %15
%46 = fdiv double 1.000000e+00, %1
%47 = insertelement <2 x double> <double poison, double 1.000000e+00>, double %1, i64 0
%48 = insertelement <2 x double> poison, double %1, i64 0
%49 = shufflevector <2 x double> %48, <2 x double> poison, <2 x i32> zeroinitializer
br label %50
50: ; preds = %45, %83
%51 = phi i32 [ 1, %45 ], [ %85, %83 ]
%52 = phi double [ %46, %45 ], [ %84, %83 ]
%53 = phi <2 x double> [ <double 1.000000e+00, double 0.000000e+00>, %45 ], [ %60, %83 ]
%54 = phi <2 x double> [ %47, %45 ], [ %64, %83 ]
%55 = sitofp i32 %51 to double
%56 = fsub double %55, %0
%57 = insertelement <2 x double> poison, double %56, i64 0
%58 = shufflevector <2 x double> %57, <2 x double> poison, <2 x i32> zeroinitializer
%59 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %58, <2 x double> %53, <2 x double> %54)
%60 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %58, <2 x double> %53, <2 x double> %54)
%61 = insertelement <2 x double> poison, double %55, i64 0
%62 = shufflevector <2 x double> %61, <2 x double> poison, <2 x i32> zeroinitializer
%63 = fmul <2 x double> %54, %62
%64 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %49, <2 x double> %59, <2 x double> %63)
%65 = extractelement <2 x double> %64, i64 0
%66 = tail call double @llvm.fabs.f64(double %65)
%67 = fcmp ogt double %66, 0x3E7AD7F29ABCAF48
br i1 %67, label %68, label %83
68: ; preds = %50
%69 = extractelement <2 x double> %64, i64 1
%70 = fdiv double %69, %65
%71 = fsub double %70, %52
%72 = fdiv double %71, %70
%73 = tail call double @llvm.fabs.f64(double %72)
%74 = fcmp olt double %73, 0x3E7AD7F29ABCAF48
br i1 %74, label %75, label %83
75: ; preds = %68
%76 = fneg double %1
%77 = tail call double @exp(double %76)
%78 = fmul double %70, %77
%79 = fmul double %18, %78
%80 = tail call double @gamma(double %0)
%81 = fdiv double %79, %80
%82 = fsub double 1.000000e+00, %81
br label %97
83: ; preds = %68, %50
%84 = phi double [ %52, %50 ], [ %70, %68 ]
%85 = add nuw nsw i32 %51, 1
%86 = icmp eq i32 %85, 101
br i1 %86, label %87, label %50
87: ; preds = %83, %23
%88 = phi double [ %25, %23 ], [ %84, %83 ]
%89 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
%90 = fneg double %1
%91 = tail call double @exp(double %90)
%92 = fmul double %88, %91
%93 = fmul double %18, %92
%94 = tail call double @gamma(double %0)
%95 = fdiv double %93, %94
%96 = fsub double 1.000000e+00, %95
br label %97
97: ; preds = %13, %10, %87, %75, %38, %8, %4
%98 = phi double [ -1.000000e+00, %4 ], [ -1.000000e+00, %8 ], [ %44, %38 ], [ %96, %87 ], [ %82, %75 ], [ 0.000000e+00, %10 ], [ 1.000000e+00, %13 ]
ret double %98
}