#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 log(double);
double poz(double);
double sqrt(double);
double pochisq(const double ax, const int df) {
  double x = ax;
  double a, y, s;
  double e, c, z;
  int even;
  if (x <= 0.0 || df < 1) {
    return 1.0;
  }
  a = 0.5 * x;
  even = (2 * (df / 2)) == df;
  y = 0.0;
  if (df > 1) {
    y = (((-a) < -20.0) ? 0.0 : exp(-a));
  }
  s = (even ? y : (2.0 * poz(-sqrt(x))));
  if (df > 2) {
    x = 0.5 * (df - 1.0);
    z = (even ? 1.0 : 0.5);
    if (a > 20.0) {
      e = (even ? 0.0 : 0.5723649429247000870717135);
      c = log(a);
      while (z <= x) {
        e = log(z) + e;
        s += (((c * z - a - e) < -20.0) ? 0.0 : exp(c * z - a - e));
        z += 1.0;
      }
      return (s);
    } else {
      e = (even ? 1.0 : (0.5641895835477562869480795 / sqrt(a)));
      c = 0.0;
      while (z <= x) {
        e = e * (a / z);
        c = c + e;
        z += 1.0;
      }
      return (c * y + s);
    }
  } else {
    return s;
  }
}


x86 assembly (clang, -O0):
<pochisq>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movsd  %xmm0,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x20(%rbp),%xmm0
jae    1175 <pochisq+0x35>
cmpl   $0x1,-0x14(%rbp)
jge    1187 <pochisq+0x47>
movsd  0xea3(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    151d <pochisq+0x3dd>
movsd  0xe71(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
shl    $0x1,%eax
cmp    -0x14(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x54(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
cmpl   $0x1,-0x14(%rbp)
jle    1232 <pochisq+0xf2>
movsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xe1d(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1202 <pochisq+0xc2>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
jmp    1228 <pochisq+0xe8>
movsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1040 <exp@plt>
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
cmpl   $0x0,-0x54(%rbp)
je     124b <pochisq+0x10b>
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
jmp    1285 <pochisq+0x145>
movsd  -0x20(%rbp),%xmm0
call   1060 <sqrt@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <poz@plt>
movaps %xmm0,%xmm1
movsd  0xd94(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
cmpl   $0x2,-0x14(%rbp)
jle    1513 <pochisq+0x3d3>
cvtsi2sdl -0x14(%rbp),%xmm1
movsd  0xd7a(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xd4e(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x54(%rbp),%eax
movsd  0xd5a(%rip),%xmm0
movsd  0xd32(%rip),%xmm1
movsd  %xmm1,-0x78(%rbp)
cmp    $0x0,%eax
movsd  %xmm0,-0x70(%rbp)
jne    12eb <pochisq+0x1ab>
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xd16(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    144b <pochisq+0x30b>
mov    -0x54(%rbp),%eax
xorps  %xmm0,%xmm0
movsd  0xd16(%rip),%xmm1
movsd  %xmm1,-0x88(%rbp)
ff
cmp    $0x0,%eax
movsd  %xmm0,-0x80(%rbp)
jne    133d <pochisq+0x1fd>
movsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x28(%rbp),%xmm0
call   1050 <log@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  -0x50(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     143c <pochisq+0x2fc>
movsd  -0x50(%rbp),%xmm0
call   1050 <log@plt>
addsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x48(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
subsd  -0x40(%rbp),%xmm1
movsd  0xc4f(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    13d3 <pochisq+0x293>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
jmp    1413 <pochisq+0x2d3>
movsd  -0x48(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
subsd  -0x40(%rbp),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xbf3(%rip),%xmm0
addsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    1356 <pochisq+0x216>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    151d <pochisq+0x3dd>
cmpl   $0x0,-0x54(%rbp)
je     146a <pochisq+0x32a>
movsd  0xbc3(%rip),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
jmp    148b <pochisq+0x34b>
movsd  -0x28(%rbp),%xmm0
call   1060 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xba9(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x50(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     14f2 <pochisq+0x3b2>
movsd  -0x40(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
divsd  -0x50(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x48(%rbp),%xmm0
addsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xb3d(%rip),%xmm0
addsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    14a0 <pochisq+0x360>
movsd  -0x48(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    151d <pochisq+0x3dd>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pochisq>:
push   %rbp
push   %rbx
sub    $0x38,%rsp
movapd %xmm0,%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
movsd  0xea6(%rip),%xmm5
jae    135c <pochisq+0x21c>
mov    %edi,%ebx
test   %edi,%edi
jle    135c <pochisq+0x21c>
movsd  0xe96(%rip),%xmm4
mulsd  %xmm1,%xmm4
mov    %ebx,%ebp
and    $0xfffffffe,%ebp
xorpd  %xmm8,%xmm8
cmp    $0x2,%ebx
movapd %xmm4,0x20(%rsp)
jb     11bb <pochisq+0x7b>
ucomisd 0xe7d(%rip),%xmm4
ja     11bb <pochisq+0x7b>
movapd 0xea3(%rip),%xmm0
xorpd  %xmm4,%xmm0
movsd  %xmm1,(%rsp)
call   1040 <exp@plt>
movsd  (%rsp),%xmm1
movapd 0x20(%rsp),%xmm4
movapd %xmm0,%xmm8
movapd %xmm8,%xmm5
cmp    %ebx,%ebp
je     1209 <pochisq+0xc9>
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
movsd  %xmm8,0x8(%rsp)
jb     11de <pochisq+0x9e>
xorps  %xmm0,%xmm0
sqrtsd %xmm1,%xmm0
jmp    11e7 <pochisq+0xa7>
movapd %xmm1,%xmm0
call   1060 <sqrt@plt>
xorpd  0xe51(%rip),%xmm0
call   1030 <poz@plt>
movapd %xmm0,%xmm5
addsd  %xmm0,%xmm5
movapd 0x20(%rsp),%xmm4
movsd  0x8(%rsp),%xmm8
cmp    $0x3,%ebx
jb     135c <pochisq+0x21c>
xor    %eax,%eax
cmp    %ebx,%ebp
sete   %al
ucomisd 0xdef(%rip),%xmm4
cvtsi2sd %ebx,%xmm6
addsd  0xdeb(%rip),%xmm6
mulsd  0xdd3(%rip),%xmm6
lea    0xe14(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm7
movsd  %xmm6,0x18(%rsp)
jbe    127d <pochisq+0x13d>
movsd  %xmm5,0x10(%rsp)
movapd %xmm4,%xmm0
movsd  %xmm7,(%rsp)
call   1050 <log@plt>
movsd  (%rsp),%xmm2
movapd %xmm0,%xmm1
movsd  0x18(%rsp),%xmm0
ucomisd %xmm2,%xmm0
jae    1292 <pochisq+0x152>
movsd  0x10(%rsp),%xmm0
jmp    1360 <pochisq+0x220>
cmp    %ebx,%ebp
jne    1367 <pochisq+0x227>
movsd  0xd73(%rip),%xmm1
jmp    13bf <pochisq+0x27f>
movsd  %xmm1,0x30(%rsp)
xorpd  %xmm3,%xmm3
cmp    %ebx,%ebp
je     12a8 <pochisq+0x168>
movsd  0xd80(%rip),%xmm3
movapd 0x20(%rsp),%xmm0
xorpd  0xd8a(%rip),%xmm0
movapd %xmm0,0x20(%rsp)
movsd  0x10(%rsp),%xmm5
jmp    12ee <pochisq+0x1ae>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  0x10(%rsp),%xmm5
addsd  %xmm1,%xmm5
addsd  0xd1e(%rip),%xmm2
movsd  0x18(%rsp),%xmm0
ucomisd %xmm2,%xmm0
jb     135c <pochisq+0x21c>
movsd  %xmm2,(%rsp)
movsd  %xmm5,0x10(%rsp)
movsd  %xmm3,0x8(%rsp)
movapd %xmm2,%xmm0
call   1050 <log@plt>
movsd  (%rsp),%xmm2
movapd %xmm0,%xmm3
addsd  0x8(%rsp),%xmm3
movsd  0x30(%rsp),%xmm0
mulsd  %xmm2,%xmm0
addsd  0x20(%rsp),%xmm0
subsd  %xmm3,%xmm0
xorpd  %xmm1,%xmm1
movsd  0xcf9(%rip),%xmm4
ucomisd %xmm0,%xmm4
ja     12d0 <pochisq+0x190>
movsd  %xmm3,0x8(%rsp)
call   1040 <exp@plt>
movsd  0x8(%rsp),%xmm3
movsd  (%rsp),%xmm2
movapd %xmm0,%xmm1
jmp    12d0 <pochisq+0x190>
movapd %xmm5,%xmm0
add    $0x38,%rsp
pop    %rbx
pop    %rbp
ret
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm4
jb     137a <pochisq+0x23a>
xorps  %xmm0,%xmm0
sqrtsd %xmm4,%xmm0
jmp    13b3 <pochisq+0x273>
movapd %xmm4,%xmm0
movsd  %xmm5,0x10(%rsp)
movsd  %xmm8,0x8(%rsp)
movsd  %xmm7,(%rsp)
call   1060 <sqrt@plt>
movsd  (%rsp),%xmm7
movsd  0x8(%rsp),%xmm8
movsd  0x18(%rsp),%xmm6
movsd  0x10(%rsp),%xmm5
movapd 0x20(%rsp),%xmm4
movsd  0xc65(%rip),%xmm1
divsd  %xmm0,%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm7,%xmm6
jb     13fa <pochisq+0x2ba>
xorpd  %xmm0,%xmm0
movsd  0xc2b(%rip),%xmm2
cs nopw 0x0(%rax,%rax,1)
nop
movapd %xmm4,%xmm3
divsd  %xmm7,%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm1,%xmm0
addsd  %xmm2,%xmm7
ucomisd %xmm7,%xmm6
jae    13e0 <pochisq+0x2a0>
mulsd  %xmm8,%xmm0
addsd  %xmm5,%xmm0
jmp    1360 <pochisq+0x220>

LLVM IR (-O0):
define double @pochisq(double %0, i32 %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca i32
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca i32
store double %0, double* %4
store i32 %1, i32* %5
%14 = load double, double* %4
store double %14, double* %6
%15 = load double, double* %6
%16 = fcmp ole double %15, 0.000000e+00
br i1 %16, label %20, label %17
17: ; preds = %2
%18 = load i32, i32* %5
%19 = icmp slt i32 %18, 1
br i1 %19, label %20, label %21
20: ; preds = %17, %2
store double 1.000000e+00, double* %3
br label %143
21: ; preds = %17
%22 = load double, double* %6
%23 = fmul double 5.000000e-01, %22
store double %23, double* %7
%24 = load i32, i32* %5
%25 = sdiv i32 %24, 2
%26 = mul nsw i32 2, %25
%27 = load i32, i32* %5
%28 = icmp eq i32 %26, %27
%29 = zext i1 %28 to i32
store i32 %29, i32* %13
store double 0.000000e+00, double* %8
%30 = load i32, i32* %5
%31 = icmp sgt i32 %30, 1
br i1 %31, label %32, label %43
32: ; preds = %21
%33 = load double, double* %7
%34 = fneg double %33
%35 = fcmp olt double %34, -2.000000e+01
br i1 %35, label %36, label %37
36: ; preds = %32
br label %41
37: ; preds = %32
%38 = load double, double* %7
%39 = fneg double %38
%40 = call double @exp(double %39)
br label %41
41: ; preds = %37, %36
%42 = phi double [ 0.000000e+00, %36 ], [ %40, %37 ]
store double %42, double* %8
br label %43
43: ; preds = %41, %21
%44 = load i32, i32* %13
%45 = icmp ne i32 %44, 0
br i1 %45, label %46, label %48
46: ; preds = %43
%47 = load double, double* %8
br label %54
48: ; preds = %43
%49 = load double, double* %6
%50 = call double @sqrt(double %49)
%51 = fneg double %50
%52 = call double @poz(double %51)
%53 = fmul double 2.000000e+00, %52
br label %54
54: ; preds = %48, %46
%55 = phi double [ %47, %46 ], [ %53, %48 ]
store double %55, double* %9
%56 = load i32, i32* %5
%57 = icmp sgt i32 %56, 2
br i1 %57, label %58, label %141
58: ; preds = %54
%59 = load i32, i32* %5
%60 = sitofp i32 %59 to double
%61 = fsub double %60, 1.000000e+00
%62 = fmul double 5.000000e-01, %61
store double %62, double* %6
%63 = load i32, i32* %13
%64 = icmp ne i32 %63, 0
%65 = zext i1 %64 to i64
%66 = select i1 %64, double 1.000000e+00, double 5.000000e-01
store double %66, double* %12
%67 = load double, double* %7
%68 = fcmp ogt double %67, 2.000000e+01
br i1 %68, label %69, label %111
69: ; preds = %58
%70 = load i32, i32* %13
%71 = icmp ne i32 %70, 0
%72 = zext i1 %71 to i64
%73 = select i1 %71, double 0.000000e+00, double 0x3FE250D048E7A1BD
store double %73, double* %10
%74 = load double, double* %7
%75 = call double @log(double %74)
store double %75, double* %11
br label %76
76: ; preds = %103, %69
%77 = load double, double* %12
%78 = load double, double* %6
%79 = fcmp ole double %77, %78
br i1 %79, label %80, label %109
80: ; preds = %76
%81 = load double, double* %12
%82 = call double @log(double %81)
%83 = load double, double* %10
%84 = fadd double %82, %83
store double %84, double* %10
%85 = load double, double* %11
%86 = load double, double* %12
%87 = load double, double* %7
%88 = fneg double %87
%89 = call double @llvm.fmuladd.f64(double %85, double %86, double %88)
%90 = load double, double* %10
%91 = fsub double %89, %90
%92 = fcmp olt double %91, -2.000000e+01
br i1 %92, label %93, label %94
93: ; preds = %80
br label %103
94: ; preds = %80
%95 = load double, double* %11
%96 = load double, double* %12
%97 = load double, double* %7
%98 = fneg double %97
%99 = call double @llvm.fmuladd.f64(double %95, double %96, double %98)
%100 = load double, double* %10
%101 = fsub double %99, %100
%102 = call double @exp(double %101)
br label %103
103: ; preds = %94, %93
%104 = phi double [ 0.000000e+00, %93 ], [ %102, %94 ]
%105 = load double, double* %9
%106 = fadd double %105, %104
store double %106, double* %9
%107 = load double, double* %12
%108 = fadd double %107, 1.000000e+00
store double %108, double* %12
br label %76
109: ; preds = %76
%110 = load double, double* %9
store double %110, double* %3
br label %143
111: ; preds = %58
%112 = load i32, i32* %13
%113 = icmp ne i32 %112, 0
br i1 %113, label %114, label %115
114: ; preds = %111
br label %119
115: ; preds = %111
%116 = load double, double* %7
%117 = call double @sqrt(double %116)
%118 = fdiv double 0x3FE20DD750429B6D, %117
br label %119
119: ; preds = %115, %114
%120 = phi double [ 1.000000e+00, %114 ], [ %118, %115 ]
store double %120, double* %10
store double 0.000000e+00, double* %11
br label %121
121: ; preds = %125, %119
%122 = load double, double* %12
%123 = load double, double* %6
%124 = fcmp ole double %122, %123
br i1 %124, label %125, label %136
125: ; preds = %121
%126 = load double, double* %10
%127 = load double, double* %7
%128 = load double, double* %12
%129 = fdiv double %127, %128
%130 = fmul double %126, %129
store double %130, double* %10
%131 = load double, double* %11
%132 = load double, double* %10
%133 = fadd double %131, %132
store double %133, double* %11
%134 = load double, double* %12
%135 = fadd double %134, 1.000000e+00
store double %135, double* %12
br label %121
136: ; preds = %121
%137 = load double, double* %11
%138 = load double, double* %8
%139 = load double, double* %9
%140 = call double @llvm.fmuladd.f64(double %137, double %138, double %139)
store double %140, double* %3
br label %143
141: ; preds = %54
%142 = load double, double* %9
store double %142, double* %3
br label %143
143: ; preds = %141, %136, %109, %20
%144 = load double, double* %3
ret double %144
}

LLVM IR (-O2):
define double @pochisq(double %0, i32 %1) {
%3 = fcmp ole double %0, 0.000000e+00
%4 = icmp slt i32 %1, 1
%5 = or i1 %3, %4
br i1 %5, label %72, label %6
6: ; preds = %2
%7 = fmul double %0, 5.000000e-01
%8 = and i32 %1, -2
%9 = icmp eq i32 %8, %1
%10 = icmp ult i32 %1, 2
%11 = fcmp ogt double %7, 2.000000e+01
%12 = or i1 %10, %11
br i1 %12, label %16, label %13
13: ; preds = %6
%14 = fneg double %7
%15 = tail call double @exp(double %14)
br label %16
16: ; preds = %13, %6
%17 = phi double [ 0.000000e+00, %6 ], [ %15, %13 ]
br i1 %9, label %23, label %18
18: ; preds = %16
%19 = tail call double @sqrt(double %0)
%20 = fneg double %19
%21 = tail call double @poz(double %20)
%22 = fmul double %21, 2.000000e+00
br label %23
23: ; preds = %16, %18
%24 = phi double [ %22, %18 ], [ %17, %16 ]
%25 = icmp ugt i32 %1, 2
br i1 %25, label %26, label %72
26: ; preds = %23
%27 = sitofp i32 %1 to double
%28 = fadd double %27, -1.000000e+00
%29 = fmul double %28, 5.000000e-01
%30 = select i1 %9, double 1.000000e+00, double 5.000000e-01
br i1 %11, label %31, label %53
31: ; preds = %26
%32 = tail call double @log(double %7)
%33 = fcmp ugt double %30, %29
br i1 %33, label %72, label %34
34: ; preds = %31
%35 = select i1 %9, double 0.000000e+00, double 0x3FE250D048E7A1BD
%36 = fneg double %7
br label %37
37: ; preds = %34, %48
%38 = phi double [ %30, %34 ], [ %51, %48 ]
%39 = phi double [ %35, %34 ], [ %42, %48 ]
%40 = phi double [ %24, %34 ], [ %50, %48 ]
%41 = tail call double @log(double %38)
%42 = fadd double %39, %41
%43 = tail call double @llvm.fmuladd.f64(double %32, double %38, double %36)
%44 = fsub double %43, %42
%45 = fcmp olt double %44, -2.000000e+01
br i1 %45, label %48, label %46
46: ; preds = %37
%47 = tail call double @exp(double %44)
br label %48
48: ; preds = %37, %46
%49 = phi double [ %47, %46 ], [ 0.000000e+00, %37 ]
%50 = fadd double %40, %49
%51 = fadd double %38, 1.000000e+00
%52 = fcmp ugt double %51, %29
br i1 %52, label %72, label %37
53: ; preds = %26
br i1 %9, label %57, label %54
54: ; preds = %53
%55 = tail call double @sqrt(double %7)
%56 = fdiv double 0x3FE20DD750429B6D, %55
br label %57
57: ; preds = %53, %54
%58 = phi double [ %56, %54 ], [ 1.000000e+00, %53 ]
%59 = fcmp ugt double %30, %29
br i1 %59, label %69, label %60
60: ; preds = %57, %60
%61 = phi double [ %67, %60 ], [ %30, %57 ]
%62 = phi double [ %66, %60 ], [ 0.000000e+00, %57 ]
%63 = phi double [ %65, %60 ], [ %58, %57 ]
%64 = fdiv double %7, %61
%65 = fmul double %63, %64
%66 = fadd double %62, %65
%67 = fadd double %61, 1.000000e+00
%68 = fcmp ugt double %67, %29
br i1 %68, label %69, label %60
69: ; preds = %60, %57
%70 = phi double [ 0.000000e+00, %57 ], [ %66, %60 ]
%71 = tail call double @llvm.fmuladd.f64(double %70, double %17, double %24)
br label %72
72: ; preds = %48, %31, %23, %2, %69
%73 = phi double [ %71, %69 ], [ 1.000000e+00, %2 ], [ %24, %23 ], [ %24, %31 ], [ %50, %48 ]
ret double %73
}