#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 sqrt(double);
double zcdf(double);
double chisqp(double ax, size_t df) {
  double x;
  double a;
  double y;
  double s;
  double e;
  double c;
  double z;
  int dfeven;
  dfeven = 0;
  if ((df % 2) == 0)
    dfeven = 1;
  x = ax;
  if (x <= 0.0 || df < 1)
    return 1.0;
  a = x / 2.0;
  if (df > 1)
    y = (((-a) < -20.0) ? 0.0 : exp(-a));
  if (dfeven == 1)
    s = y;
  else
    s = 2.0 * zcdf(-sqrt(x));
  if (df > 2) {
    x = (df - 1.0) / 2.0;
    if (dfeven == 1)
      z = 1.0;
    else
      z = 0.5;
    if (a > 20.0) {
      if (dfeven == 1)
        e = 0.0;
      else
        e = 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 {
      if (dfeven == 1)
        e = 1.0;
      else
        e = (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):
<chisqp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movsd  %xmm0,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
movl   $0x0,-0x54(%rbp)
mov    -0x18(%rbp),%rax
and    $0x1,%rax
cmp    $0x0,%rax
jne    1171 <chisqp+0x31>
movl   $0x1,-0x54(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x20(%rbp),%xmm0
jae    1194 <chisqp+0x54>
cmpq   $0x1,-0x18(%rbp)
jae    11a6 <chisqp+0x66>
movsd  0xe74(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    14f2 <chisqp+0x3b2>
movsd  -0x20(%rbp),%xmm0
movsd  0xe4d(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
cmpq   $0x1,-0x18(%rbp)
jbe    1232 <chisqp+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 <chisqp+0xc2>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
jmp    1228 <chisqp+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   $0x1,-0x54(%rbp)
jne    124b <chisqp+0x10b>
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    1285 <chisqp+0x145>
movsd  -0x20(%rbp),%xmm0
call   1060 <sqrt@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <zcdf@plt>
movaps %xmm0,%xmm1
movsd  0xd84(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
cmpq   $0x2,-0x18(%rbp)
jbe    14e8 <chisqp+0x3a8>
movaps 0xda9(%rip),%xmm1
movq   -0x18(%rbp),%xmm0
punpckldq %xmm1,%xmm0
movapd 0xda8(%rip),%xmm1
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  0xd51(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xd35(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
cmpl   $0x1,-0x54(%rbp)
jne    12f0 <chisqp+0x1b0>
movsd  0xd2a(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    12fd <chisqp+0x1bd>
movsd  0xd20(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xd16(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1433 <chisqp+0x2f3>
cmpl   $0x1,-0x54(%rbp)
jne    132b <chisqp+0x1eb>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
jmp    1338 <chisqp+0x1f8>
movsd  0xcfd(%rip),%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     1424 <chisqp+0x2e4>
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  0xc5e(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    13c1 <chisqp+0x281>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
jmp    13fe <chisqp+0x2be>
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,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xbfb(%rip),%xmm0
addsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    1347 <chisqp+0x207>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    14f2 <chisqp+0x3b2>
cmpl   $0x1,-0x54(%rbp)
jne    144f <chisqp+0x30f>
movsd  0xbcb(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
jmp    146d <chisqp+0x32d>
movsd  -0x28(%rbp),%xmm0
call   1060 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xbc4(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x50(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     14c7 <chisqp+0x387>
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  0xb58(%rip),%xmm0
addsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    1475 <chisqp+0x335>
movsd  -0x48(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    14f2 <chisqp+0x3b2>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chisqp>:
push   %rbx
sub    $0x50,%rsp
movapd %xmm0,%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
movsd  0xea7(%rip),%xmm5
jae    137f <chisqp+0x23f>
mov    %rdi,%rbx
test   %rdi,%rdi
je     137f <chisqp+0x23f>
movsd  0xe95(%rip),%xmm4
mulsd  %xmm1,%xmm4
cmp    $0x2,%rbx
movapd %xmm4,0x20(%rsp)
jb     11ba <chisqp+0x7a>
xorpd  %xmm8,%xmm8
ucomisd 0xe80(%rip),%xmm4
ja     11ba <chisqp+0x7a>
movapd 0xea6(%rip),%xmm0
xorpd  %xmm4,%xmm0
movsd  %xmm1,0x8(%rsp)
call   1040 <exp@plt>
movsd  0x8(%rsp),%xmm1
movapd 0x20(%rsp),%xmm4
movapd %xmm0,%xmm8
movapd %xmm8,%xmm5
test   $0x1,%bl
je     1209 <chisqp+0xc9>
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
movsd  %xmm8,0x10(%rsp)
jb     11de <chisqp+0x9e>
xorps  %xmm0,%xmm0
sqrtsd %xmm1,%xmm0
jmp    11e7 <chisqp+0xa7>
movapd %xmm1,%xmm0
call   1060 <sqrt@plt>
xorpd  0xe51(%rip),%xmm0
call   1030 <zcdf@plt>
movapd %xmm0,%xmm5
addsd  %xmm0,%xmm5
movapd 0x20(%rsp),%xmm4
movsd  0x10(%rsp),%xmm8
cmp    $0x3,%rbx
jb     137f <chisqp+0x23f>
xor    %eax,%eax
test   $0x1,%bl
movq   %rbx,%xmm0
punpckldq 0xe2b(%rip),%xmm0
subpd  0xe33(%rip),%xmm0
movapd %xmm0,%xmm6
unpckhpd %xmm0,%xmm6
addsd  %xmm0,%xmm6
addsd  0xdd7(%rip),%xmm6
sete   %al
mulsd  0xdbc(%rip),%xmm6
lea    0xe1d(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm7
ucomisd 0xdb0(%rip),%xmm4
movapd %xmm6,0x30(%rsp)
jbe    129e <chisqp+0x15e>
movsd  %xmm5,0x18(%rsp)
movapd %xmm4,%xmm0
movsd  %xmm7,0x8(%rsp)
call   1050 <log@plt>
movsd  0x8(%rsp),%xmm2
movapd %xmm0,%xmm1
movapd 0x30(%rsp),%xmm0
ucomisd %xmm2,%xmm0
jae    12b4 <chisqp+0x174>
movsd  0x18(%rsp),%xmm0
jmp    1383 <chisqp+0x243>
test   $0x1,%bl
jne    1389 <chisqp+0x249>
movsd  0xd51(%rip),%xmm1
jmp    13e3 <chisqp+0x2a3>
movsd  %xmm1,0x48(%rsp)
xorpd  %xmm3,%xmm3
test   $0x1,%bl
je     12cb <chisqp+0x18b>
movsd  0xd5d(%rip),%xmm3
movapd 0x20(%rsp),%xmm0
xorpd  0xd67(%rip),%xmm0
movapd %xmm0,0x20(%rsp)
movsd  0x18(%rsp),%xmm5
jmp    130e <chisqp+0x1ce>
nopw   0x0(%rax,%rax,1)
movsd  0x18(%rsp),%xmm5
addsd  %xmm1,%xmm5
addsd  0xcfe(%rip),%xmm2
movapd 0x30(%rsp),%xmm0
ucomisd %xmm2,%xmm0
jb     137f <chisqp+0x23f>
movsd  %xmm2,0x8(%rsp)
movsd  %xmm5,0x18(%rsp)
movsd  %xmm3,0x10(%rsp)
movapd %xmm2,%xmm0
call   1050 <log@plt>
movsd  0x8(%rsp),%xmm2
movapd %xmm0,%xmm3
addsd  0x10(%rsp),%xmm3
movsd  0x48(%rsp),%xmm0
mulsd  %xmm2,%xmm0
addsd  0x20(%rsp),%xmm0
subsd  %xmm3,%xmm0
xorpd  %xmm1,%xmm1
movsd  0xcd7(%rip),%xmm4
ucomisd %xmm0,%xmm4
ja     12f0 <chisqp+0x1b0>
movsd  %xmm3,0x10(%rsp)
call   1040 <exp@plt>
movsd  0x10(%rsp),%xmm3
movsd  0x8(%rsp),%xmm2
movapd %xmm0,%xmm1
jmp    12f0 <chisqp+0x1b0>
movapd %xmm5,%xmm0
add    $0x50,%rsp
pop    %rbx
ret
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm4
jb     139c <chisqp+0x25c>
xorps  %xmm0,%xmm0
sqrtsd %xmm4,%xmm0
jmp    13d7 <chisqp+0x297>
movapd %xmm4,%xmm0
movsd  %xmm5,0x18(%rsp)
movsd  %xmm8,0x10(%rsp)
movsd  %xmm7,0x8(%rsp)
call   1060 <sqrt@plt>
movsd  0x8(%rsp),%xmm7
movsd  0x10(%rsp),%xmm8
movapd 0x30(%rsp),%xmm6
movsd  0x18(%rsp),%xmm5
movapd 0x20(%rsp),%xmm4
movsd  0xc41(%rip),%xmm1
divsd  %xmm0,%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm7,%xmm6
jb     141a <chisqp+0x2da>
xorpd  %xmm0,%xmm0
movsd  0xc07(%rip),%xmm2
nopl   0x0(%rax)
movapd %xmm4,%xmm3
divsd  %xmm7,%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm1,%xmm0
addsd  %xmm2,%xmm7
ucomisd %xmm7,%xmm6
jae    1400 <chisqp+0x2c0>
mulsd  %xmm8,%xmm0
addsd  %xmm5,%xmm0
jmp    1383 <chisqp+0x243>

LLVM IR (-O0):
define double @chisqp(double %0, i64 %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca i64
%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 i64 %1, i64* %5
store i32 0, i32* %13
%14 = load i64, i64* %5
%15 = urem i64 %14, 2
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 1, i32* %13
br label %18
18: ; preds = %17, %2
%19 = load double, double* %4
store double %19, double* %6
%20 = load double, double* %6
%21 = fcmp ole double %20, 0.000000e+00
br i1 %21, label %25, label %22
22: ; preds = %18
%23 = load i64, i64* %5
%24 = icmp ult i64 %23, 1
br i1 %24, label %25, label %26
25: ; preds = %22, %18
store double 1.000000e+00, double* %3
br label %142
26: ; preds = %22
%27 = load double, double* %6
%28 = fdiv double %27, 2.000000e+00
store double %28, double* %7
%29 = load i64, i64* %5
%30 = icmp ugt i64 %29, 1
br i1 %30, label %31, label %42
31: ; preds = %26
%32 = load double, double* %7
%33 = fneg double %32
%34 = fcmp olt double %33, -2.000000e+01
br i1 %34, label %35, label %36
35: ; preds = %31
br label %40
36: ; preds = %31
%37 = load double, double* %7
%38 = fneg double %37
%39 = call double @exp(double %38)
br label %40
40: ; preds = %36, %35
%41 = phi double [ 0.000000e+00, %35 ], [ %39, %36 ]
store double %41, double* %8
br label %42
42: ; preds = %40, %26
%43 = load i32, i32* %13
%44 = icmp eq i32 %43, 1
br i1 %44, label %45, label %47
45: ; preds = %42
%46 = load double, double* %8
store double %46, double* %9
br label %53
47: ; preds = %42
%48 = load double, double* %6
%49 = call double @sqrt(double %48)
%50 = fneg double %49
%51 = call double @zcdf(double %50)
%52 = fmul double 2.000000e+00, %51
store double %52, double* %9
br label %53
53: ; preds = %47, %45
%54 = load i64, i64* %5
%55 = icmp ugt i64 %54, 2
br i1 %55, label %56, label %140
56: ; preds = %53
%57 = load i64, i64* %5
%58 = uitofp i64 %57 to double
%59 = fsub double %58, 1.000000e+00
%60 = fdiv double %59, 2.000000e+00
store double %60, double* %6
%61 = load i32, i32* %13
%62 = icmp eq i32 %61, 1
br i1 %62, label %63, label %64
63: ; preds = %56
store double 1.000000e+00, double* %12
br label %65
64: ; preds = %56
store double 5.000000e-01, double* %12
br label %65
65: ; preds = %64, %63
%66 = load double, double* %7
%67 = fcmp ogt double %66, 2.000000e+01
br i1 %67, label %68, label %111
68: ; preds = %65
%69 = load i32, i32* %13
%70 = icmp eq i32 %69, 1
br i1 %70, label %71, label %72
71: ; preds = %68
store double 0.000000e+00, double* %10
br label %73
72: ; preds = %68
store double 0x3FE250D048E7A1BD, double* %10
br label %73
73: ; preds = %72, %71
%74 = load double, double* %7
%75 = call double @log(double %74)
store double %75, double* %11
br label %76
76: ; preds = %103, %73
%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 %142
111: ; preds = %65
%112 = load i32, i32* %13
%113 = icmp eq i32 %112, 1
br i1 %113, label %114, label %115
114: ; preds = %111
store double 1.000000e+00, double* %10
br label %119
115: ; preds = %111
%116 = load double, double* %7
%117 = call double @sqrt(double %116)
%118 = fdiv double 0x3FE20DD750429B6D, %117
store double %118, double* %10
br label %119
119: ; preds = %115, %114
store double 0.000000e+00, double* %11
br label %120
120: ; preds = %124, %119
%121 = load double, double* %12
%122 = load double, double* %6
%123 = fcmp ole double %121, %122
br i1 %123, label %124, label %135
124: ; preds = %120
%125 = load double, double* %10
%126 = load double, double* %7
%127 = load double, double* %12
%128 = fdiv double %126, %127
%129 = fmul double %125, %128
store double %129, double* %10
%130 = load double, double* %11
%131 = load double, double* %10
%132 = fadd double %130, %131
store double %132, double* %11
%133 = load double, double* %12
%134 = fadd double %133, 1.000000e+00
store double %134, double* %12
br label %120
135: ; preds = %120
%136 = load double, double* %11
%137 = load double, double* %8
%138 = load double, double* %9
%139 = call double @llvm.fmuladd.f64(double %136, double %137, double %138)
store double %139, double* %3
br label %142
140: ; preds = %53
%141 = load double, double* %9
store double %141, double* %3
br label %142
142: ; preds = %140, %135, %109, %25
%143 = load double, double* %3
ret double %143
}

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