#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 fabs(double);
double gp_exp(double);
double lngamma(double);
double log(double);
double igamma(double a, double x) {
  double arg;
  double aa;
  double an;
  double b;
  int i;
  if (x < 0.0 || a <= 0.0)
    return -1.0;
  if (x == 0.0)
    return 0.0;
  if (x > 1.0E+08)
    return 1.0;
  arg = a * log(x) - x - lngamma((a + 1.0));
  arg = gp_exp(arg);
  if ((x > 1.0) && (x >= a + 2.0)) {
    double pn1, pn2, pn3, pn4, pn5, pn6;
    double rn;
    double rnold;
    aa = 1.0 - a;
    b = aa + x + 1.0;
    pn1 = 1.0;
    pn2 = x;
    pn3 = x + 1.0;
    pn4 = x * b;
    rnold = pn3 / pn4;
    for (i = 1; i <= 200; i++) {
      aa++;
      b += 2.0;
      an = aa * (double)i;
      pn5 = b * pn3 - an * pn1;
      pn6 = b * pn4 - an * pn2;
      if (pn6 != 0.0) {
        rn = pn5 / pn6;
        if (fabs(rnold - rn) <=
            ((1.0E-08) < (1.0E-08 * rn) ? (1.0E-08) : (1.0E-08 * rn)))
          return 1.0 - arg * rn * a;
        rnold = rn;
      }
      pn1 = pn3;
      pn2 = pn4;
      pn3 = pn5;
      pn4 = pn6;
      if (fabs(pn5) >= 1.0E+37) {
        pn1 /= 1.0E+37;
        pn2 /= 1.0E+37;
        pn3 /= 1.0E+37;
        pn4 /= 1.0E+37;
      }
    }
  } else {
    for (i = 0, aa = a, an = b = 1.0; i <= 200; i++) {
      aa++;
      an *= x / aa;
      b += an;
      if (an < b * 1.0E-08)
        return arg * b;
    }
  }
  return -1.0;
}


x86 assembly (clang, -O0):
<igamma>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
ja     1161 <igamma+0x31>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     1173 <igamma+0x43>
movsd  0xeb7(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1618 <igamma+0x4e8>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1198 <igamma+0x68>
jp     1198 <igamma+0x68>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1618 <igamma+0x4e8>
movsd  -0x18(%rbp),%xmm0
movsd  0xe5b(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    11c1 <igamma+0x91>
movsd  0xe51(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1618 <igamma+0x4e8>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
call   1050 <log@plt>
movaps %xmm0,%xmm2
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x18(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xdf1(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
call   1040 <lngamma@plt>
movaps %xmm0,%xmm1
movsd  -0x88(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1030 <gp_exp@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xdb7(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1556 <igamma+0x426>
movsd  -0x18(%rbp),%xmm0
movsd  0xda8(%rip),%xmm1
addsd  -0x10(%rbp),%xmm1
ucomisd %xmm1,%xmm0
jb     1556 <igamma+0x426>
movsd  0xd89(%rip),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  0xd6d(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xd5c(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xd45(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x58(%rbp),%xmm0
divsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movl   $0x1,-0x3c(%rbp)
cmpl   $0xc8,-0x3c(%rbp)
jg     1551 <igamma+0x421>
movsd  0xd01(%rip),%xmm0
addsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xcf7(%rip),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x28(%rbp),%xmm0
cvtsi2sdl -0x3c(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm1
mulsd  -0x48(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    13c3 <igamma+0x293>
jp     13c3 <igamma+0x293>
jmp    149c <igamma+0x36c>
movsd  -0x68(%rbp),%xmm0
divsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x80(%rbp),%xmm0
subsd  -0x78(%rbp),%xmm0
movaps 0xc4d(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  0xc21(%rip),%xmm0
mulsd  -0x78(%rbp),%xmm0
movsd  0xc14(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1423 <igamma+0x2f3>
movsd  0xc02(%rip),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
jmp    1438 <igamma+0x308>
movsd  0xbed(%rip),%xmm0
mulsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x98(%rbp),%xmm1
ff
movsd  -0xa0(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jb     1492 <igamma+0x362>
movsd  -0x20(%rbp),%xmm0
mulsd  -0x78(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xb84(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1618 <igamma+0x4e8>
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x68(%rbp),%xmm0
movaps 0xb60(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0xb4c(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     153e <igamma+0x40e>
movsd  -0x48(%rbp),%xmm0
movsd  0xb35(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  0xb1f(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  0xb09(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  0xaf3(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
jmp    1543 <igamma+0x413>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    12f2 <igamma+0x1c2>
jmp    160b <igamma+0x4db>
movl   $0x0,-0x3c(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xa99(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xa8c(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
cmpl   $0xc8,-0x3c(%rbp)
jg     1606 <igamma+0x4d6>
movsd  0xa72(%rip),%xmm0
addsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
divsd  -0x28(%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
movsd  0xa48(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    15f3 <igamma+0x4c3>
movsd  -0x20(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1618 <igamma+0x4e8>
jmp    15f8 <igamma+0x4c8>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1581 <igamma+0x451>
jmp    160b <igamma+0x4db>
movsd  0xa0d(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<igamma>:
sub    $0x28,%rsp
movapd %xmm0,%xmm3
xorpd  %xmm0,%xmm0
ucomisd %xmm3,%xmm0
movsd  0xeb8(%rip),%xmm2
jae    1161 <igamma+0x31>
ucomisd %xmm1,%xmm0
ja     1161 <igamma+0x31>
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jne    1169 <igamma+0x39>
jp     1169 <igamma+0x39>
add    $0x28,%rsp
ret
movaps %xmm2,%xmm0
add    $0x28,%rsp
ret
ucomisd 0xe9f(%rip),%xmm1
jbe    1180 <igamma+0x50>
movsd  0xe8d(%rip),%xmm0
add    $0x28,%rsp
ret
movapd %xmm1,%xmm0
movsd  %xmm3,(%rsp)
movapd %xmm1,0x10(%rsp)
call   1050 <log@plt>
mulsd  (%rsp),%xmm0
subsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xe5b(%rip),%xmm1
movsd  (%rsp),%xmm0
addsd  %xmm1,%xmm0
call   1040 <lngamma@plt>
movsd  0x8(%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1030 <gp_exp@plt>
movapd 0x10(%rsp),%xmm7
movsd  0xe2c(%rip),%xmm2
movsd  (%rsp),%xmm6
ucomisd %xmm2,%xmm7
jbe    133f <igamma+0x20f>
movsd  0xe25(%rip),%xmm1
addsd  %xmm6,%xmm1
ucomisd %xmm1,%xmm7
jb     133f <igamma+0x20f>
movapd %xmm2,%xmm15
subsd  %xmm6,%xmm15
movapd %xmm15,%xmm1
addsd  %xmm7,%xmm1
addsd  %xmm2,%xmm1
movapd %xmm2,%xmm5
unpcklpd %xmm7,%xmm5
unpcklpd %xmm7,%xmm7
movapd %xmm2,%xmm4
unpcklpd %xmm1,%xmm4
movapd %xmm7,%xmm2
addpd  %xmm4,%xmm2
mulpd  %xmm7,%xmm4
movapd %xmm4,%xmm3
movsd  %xmm2,%xmm3
unpckhpd %xmm4,%xmm4
divsd  %xmm4,%xmm2
unpcklpd %xmm1,%xmm15
mov    $0x1,%eax
movapd 0xdd5(%rip),%xmm8
movapd 0xddc(%rip),%xmm9
xorpd  %xmm10,%xmm10
movapd 0xdde(%rip),%xmm14
movsd  0xda5(%rip),%xmm13
movsd  0xda4(%rip),%xmm11
movapd 0xdd3(%rip),%xmm12
jmp    12a6 <igamma+0x176>
nop
movapd %xmm3,%xmm5
add    $0x1,%eax
movapd %xmm1,%xmm3
cmp    $0xc9,%eax
je     13b1 <igamma+0x281>
addpd  %xmm8,%xmm15
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movapd %xmm15,%xmm4
xorpd  %xmm9,%xmm4
mulsd  %xmm1,%xmm4
unpcklpd %xmm4,%xmm4
mulpd  %xmm5,%xmm4
movapd %xmm15,%xmm1
unpckhpd %xmm15,%xmm1
mulpd  %xmm3,%xmm1
addpd  %xmm4,%xmm1
movapd %xmm1,%xmm4
unpckhpd %xmm1,%xmm4
ucomisd %xmm10,%xmm4
jne    12eb <igamma+0x1bb>
jnp    131c <igamma+0x1ec>
movapd %xmm1,%xmm5
divsd  %xmm4,%xmm5
subsd  %xmm5,%xmm2
andpd  %xmm14,%xmm2
movapd %xmm5,%xmm4
mulsd  %xmm13,%xmm4
movapd %xmm13,%xmm7
minsd  %xmm4,%xmm7
ucomisd %xmm2,%xmm7
jae    13c7 <igamma+0x297>
movapd %xmm5,%xmm2
movapd %xmm1,%xmm4
andpd  %xmm14,%xmm4
ucomisd %xmm11,%xmm4
jb     1290 <igamma+0x160>
divpd  %xmm12,%xmm3
divpd  %xmm12,%xmm1
jmp    1290 <igamma+0x160>
mov    $0xc8,%eax
movsd  0xcd4(%rip),%xmm5
movapd %xmm2,%xmm1
movapd %xmm2,%xmm3
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movapd %xmm3,%xmm4
addsd  %xmm2,%xmm6
movapd %xmm7,%xmm3
divsd  %xmm6,%xmm3
mulsd  %xmm4,%xmm3
addsd  %xmm3,%xmm1
movapd %xmm1,%xmm4
mulsd  %xmm5,%xmm4
ucomisd %xmm3,%xmm4
ja     13be <igamma+0x28e>
test   %eax,%eax
je     13b1 <igamma+0x281>
addsd  %xmm2,%xmm6
movapd %xmm7,%xmm4
divsd  %xmm6,%xmm4
mulsd  %xmm4,%xmm3
addsd  %xmm3,%xmm1
movapd %xmm1,%xmm4
mulsd  %xmm5,%xmm4
ucomisd %xmm3,%xmm4
ja     13be <igamma+0x28e>
add    $0xfffffffe,%eax
jmp    1360 <igamma+0x230>
movsd  0xc47(%rip),%xmm0
add    $0x28,%rsp
ret
mulsd  %xmm1,%xmm0
add    $0x28,%rsp
ret
mulsd  %xmm0,%xmm5
mulsd  %xmm6,%xmm5
movsd  0xc31(%rip),%xmm0
subsd  %xmm5,%xmm0
add    $0x28,%rsp
ret

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

LLVM IR (-O2):
define double @igamma(double %0, double %1) {
%3 = fcmp olt double %1, 0.000000e+00
%4 = fcmp ole double %0, 0.000000e+00
%5 = or i1 %4, %3
br i1 %5, label %107, label %6
6: ; preds = %2
%7 = fcmp oeq double %1, 0.000000e+00
br i1 %7, label %107, label %8
8: ; preds = %6
%9 = fcmp ogt double %1, 1.000000e+08
br i1 %9, label %107, label %10
10: ; preds = %8
%11 = tail call double @log(double %1)
%12 = fneg double %1
%13 = tail call double @llvm.fmuladd.f64(double %0, double %11, double %12)
%14 = fadd double %0, 1.000000e+00
%15 = tail call double @lngamma(double %14)
%16 = fsub double %13, %15
%17 = tail call double @gp_exp(double %16)
%18 = fcmp ule double %1, 1.000000e+00
%19 = fadd double %0, 2.000000e+00
%20 = fcmp ugt double %19, %1
%21 = or i1 %18, %20
br i1 %21, label %93, label %22
22: ; preds = %10
%23 = fsub double 1.000000e+00, %0
%24 = fadd double %23, %1
%25 = fadd double %24, 1.000000e+00
%26 = insertelement <2 x double> poison, double %1, i64 0
%27 = shufflevector <2 x double> %26, <2 x double> poison, <2 x i32> zeroinitializer
%28 = insertelement <2 x double> <double 1.000000e+00, double poison>, double %25, i64 1
%29 = fadd <2 x double> %27, %28
%30 = fmul <2 x double> %27, %28
%31 = shufflevector <2 x double> %29, <2 x double> %30, <2 x i32> <i32 0, i32 3>
%32 = extractelement <2 x double> %29, i64 0
%33 = extractelement <2 x double> %30, i64 1
%34 = fdiv double %32, %33
%35 = insertelement <2 x double> <double 1.000000e+00, double poison>, double %1, i64 1
%36 = insertelement <2 x double> poison, double %23, i64 0
%37 = insertelement <2 x double> %36, double %25, i64 1
br label %38
38: ; preds = %22, %77
%39 = phi double [ %34, %22 ], [ %70, %77 ]
%40 = phi i32 [ 1, %22 ], [ %80, %77 ]
%41 = phi <2 x double> [ %31, %22 ], [ %78, %77 ]
%42 = phi <2 x double> [ %35, %22 ], [ %79, %77 ]
%43 = phi <2 x double> [ %37, %22 ], [ %44, %77 ]
%44 = fadd <2 x double> %43, <double 1.000000e+00, double 2.000000e+00>
%45 = sitofp i32 %40 to double
%46 = extractelement <2 x double> %44, i64 0
%47 = fneg double %46
%48 = fmul double %45, %47
%49 = insertelement <2 x double> poison, double %48, i64 0
%50 = shufflevector <2 x double> %49, <2 x double> poison, <2 x i32> zeroinitializer
%51 = fmul <2 x double> %42, %50
%52 = shufflevector <2 x double> %44, <2 x double> undef, <2 x i32> <i32 1, i32 1>
%53 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %52, <2 x double> %41, <2 x double> %51)
%54 = extractelement <2 x double> %53, i64 1
%55 = fcmp une double %54, 0.000000e+00
br i1 %55, label %56, label %69
56: ; preds = %38
%57 = extractelement <2 x double> %53, i64 0
%58 = fdiv double %57, %54
%59 = fsub double %39, %58
%60 = tail call double @llvm.fabs.f64(double %59)
%61 = fmul double %58, 1.000000e-08
%62 = fcmp ogt double %61, 1.000000e-08
%63 = select i1 %62, double 1.000000e-08, double %61
%64 = fcmp ugt double %60, %63
br i1 %64, label %69, label %65
65: ; preds = %56
%66 = fneg double %17
%67 = fmul double %58, %66
%68 = tail call double @llvm.fmuladd.f64(double %67, double %0, double 1.000000e+00)
br label %107
69: ; preds = %56, %38
%70 = phi double [ %39, %38 ], [ %58, %56 ]
%71 = extractelement <2 x double> %53, i64 0
%72 = tail call double @llvm.fabs.f64(double %71)
%73 = fcmp ult double %72, 0x479E17B84357691B
br i1 %73, label %77, label %74
74: ; preds = %69
%75 = fdiv <2 x double> %41, <double 0x479E17B84357691B, double 0x479E17B84357691B>
%76 = fdiv <2 x double> %53, <double 0x479E17B84357691B, double 0x479E17B84357691B>
br label %77
77: ; preds = %69, %74
%78 = phi <2 x double> [ %76, %74 ], [ %53, %69 ]
%79 = phi <2 x double> [ %75, %74 ], [ %41, %69 ]
%80 = add nuw nsw i32 %40, 1
%81 = icmp eq i32 %80, 201
br i1 %81, label %107, label %38
82: ; preds = %93
%83 = icmp eq i32 %95, 200
br i1 %83, label %107, label %84
84: ; preds = %82
%85 = fadd double %98, 1.000000e+00
%86 = fdiv double %1, %85
%87 = fmul double %100, %86
%88 = fadd double %101, %87
%89 = fmul double %88, 1.000000e-08
%90 = fcmp olt double %87, %89
br i1 %90, label %104, label %91
91: ; preds = %84
%92 = add nuw nsw i32 %95, 2
br label %93
93: ; preds = %10, %91
%94 = phi double [ %85, %91 ], [ %0, %10 ]
%95 = phi i32 [ %92, %91 ], [ 0, %10 ]
%96 = phi double [ %88, %91 ], [ 1.000000e+00, %10 ]
%97 = phi double [ %87, %91 ], [ 1.000000e+00, %10 ]
%98 = fadd double %94, 1.000000e+00
%99 = fdiv double %1, %98
%100 = fmul double %97, %99
%101 = fadd double %96, %100
%102 = fmul double %101, 1.000000e-08
%103 = fcmp olt double %100, %102
br i1 %103, label %104, label %82
104: ; preds = %84, %93
%105 = phi double [ %101, %93 ], [ %88, %84 ]
%106 = fmul double %17, %105
br label %107
107: ; preds = %77, %82, %65, %8, %6, %2, %104
%108 = phi double [ %106, %104 ], [ -1.000000e+00, %2 ], [ 0.000000e+00, %6 ], [ 1.000000e+00, %8 ], [ %68, %65 ], [ -1.000000e+00, %82 ], [ -1.000000e+00, %77 ]
ret double %108
}