#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 */
int /*<<< orphan*/ M_PI;
double compute_1F1_1d(int, double, int);
double exp(double);
int fabs(double);
double lfact(int);
double lgamma(int);
double log(double);
int sqrt(int /*<<< orphan*/);
double surface_area_sphere(int);
double compute_d1F1_dz2_2d(int dim, double z1, double z2, int iter) {
  if (fabs(z1) < 1e-8)
    return surface_area_sphere(dim) / (double)(dim + 1);
  if (fabs(z2) < 1e-8)
    return .5 * sqrt(M_PI) * compute_1F1_1d(dim + 2, z1, iter);
  if (z1 < 0)
    return exp(z1) * compute_d1F1_dz2_2d(dim, -z1, z2 - z1, iter);
  int i, j;
  double g, F = 0.0, logz1 = log(z1), logz2 = log(z2);
  double a = .5, b = .5 * (dim + 1);
  for (i = 0; i < iter; i++) {
    for (j = 1; j < iter; j++) {
      g = lgamma(i + a) + lgamma(j + a) - lgamma(i + j + b) + i * logz1 +
          (j - 1) * logz2 - lfact(i) - lfact(j - 1);
      if ((i > z1 || j > z2) && exp(g) < 1e-8 * F)
        break;
      F += exp(g);
    }
  }
  return 2 * sqrt(M_PI) * F;
}


x86 assembly (clang, -O0):
<compute_d1F1_dz2_2d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %edi,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    %esi,-0x24(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1050 <fabs@plt>
cvtsi2sd %eax,%xmm1
movsd  0xe3f(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    11eb <compute_d1F1_dz2_2d+0x5b>
mov    -0xc(%rbp),%edi
call   1070 <surface_area_sphere@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    149b <compute_d1F1_dz2_2d+0x30b>
movsd  -0x20(%rbp),%xmm0
call   1050 <fabs@plt>
cvtsi2sd %eax,%xmm1
movsd  0xdff(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1257 <compute_d1F1_dz2_2d+0xc7>
mov    0x2dd6(%rip),%rax
mov    (%rax),%edi
call   10a0 <sqrt@plt>
cvtsi2sd %eax,%xmm1
movsd  0xde3(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0xc(%rbp),%edi
add    $0x2,%edi
movsd  -0x18(%rbp),%xmm0
mov    -0x24(%rbp),%esi
call   10b0 <compute_1F1_1d@plt>
movaps %xmm0,%xmm1
movsd  -0x68(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    149b <compute_d1F1_dz2_2d+0x30b>
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    12bb <compute_d1F1_dz2_2d+0x12b>
movsd  -0x18(%rbp),%xmm0
call   1060 <exp@plt>
movsd  %xmm0,-0x70(%rbp)
mov    -0xc(%rbp),%edi
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x20(%rbp),%xmm1
subsd  -0x18(%rbp),%xmm1
mov    -0x24(%rbp),%esi
call   1040 <compute_d1F1_dz2_2d@plt>
movaps %xmm0,%xmm1
movsd  -0x70(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    149b <compute_d1F1_dz2_2d+0x30b>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1090 <log@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1090 <log@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  0xd1f(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm1
movsd  0xd08(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    147c <compute_d1F1_dz2_2d+0x2ec>
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1469 <compute_d1F1_dz2_2d+0x2d9>
cvtsi2sdl -0x28(%rbp),%xmm0
addsd  -0x58(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1080 <lgamma@plt>
movsd  %xmm0,-0x90(%rbp)
ff
cvtsi2sdl -0x2c(%rbp),%xmm0
addsd  -0x58(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1080 <lgamma@plt>
movaps %xmm0,%xmm1
movsd  -0x90(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x28(%rbp),%eax
add    -0x2c(%rbp),%eax
cvtsi2sd %eax,%xmm0
addsd  -0x60(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1080 <lgamma@plt>
movaps %xmm0,%xmm1
movsd  -0x88(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
cvtsi2sdl -0x28(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x2c(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  -0x50(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x28(%rbp),%edi
call   1030 <lfact@plt>
movaps %xmm0,%xmm1
movsd  -0x80(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x2c(%rbp),%edi
sub    $0x1,%edi
call   1030 <lfact@plt>
movaps %xmm0,%xmm1
movsd  -0x78(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
cvtsi2sdl -0x28(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
ja     141e <compute_d1F1_dz2_2d+0x28e>
cvtsi2sdl -0x2c(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    1447 <compute_d1F1_dz2_2d+0x2b7>
movsd  -0x38(%rbp),%xmm0
call   1060 <exp@plt>
movaps %xmm0,%xmm1
movsd  0xbcd(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1447 <compute_d1F1_dz2_2d+0x2b7>
jmp    1469 <compute_d1F1_dz2_2d+0x2d9>
movsd  -0x38(%rbp),%xmm0
call   1060 <exp@plt>
addsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1323 <compute_d1F1_dz2_2d+0x193>
jmp    146e <compute_d1F1_dz2_2d+0x2de>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1310 <compute_d1F1_dz2_2d+0x180>
mov    0x2b65(%rip),%rax
mov    (%rax),%edi
call   10a0 <sqrt@plt>
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute_d1F1_dz2_2d>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x70,%rsp
mov    %esi,%r14d
movsd  %xmm1,0x8(%rsp)
mov    %edi,%ebx
movapd %xmm0,0x20(%rsp)
call   1050 <fabs@plt>
test   %eax,%eax
jle    120a <compute_d1F1_dz2_2d+0x7a>
movsd  0x8(%rsp),%xmm0
call   1050 <fabs@plt>
test   %eax,%eax
jle    1224 <compute_d1F1_dz2_2d+0x94>
xorpd  %xmm1,%xmm1
movapd 0x20(%rsp),%xmm0
ucomisd %xmm0,%xmm1
jbe    125e <compute_d1F1_dz2_2d+0xce>
call   1060 <exp@plt>
movsd  %xmm0,(%rsp)
movsd  0x8(%rsp),%xmm1
movapd 0x20(%rsp),%xmm0
subsd  %xmm0,%xmm1
xorpd  0xe25(%rip),%xmm0
mov    %ebx,%edi
mov    %r14d,%esi
call   1040 <compute_d1F1_dz2_2d@plt>
jmp    1440 <compute_d1F1_dz2_2d+0x2b0>
mov    %ebx,%edi
call   1070 <surface_area_sphere@plt>
add    $0x1,%ebx
xorps  %xmm1,%xmm1
cvtsi2sd %ebx,%xmm1
divsd  %xmm1,%xmm0
jmp    1445 <compute_d1F1_dz2_2d+0x2b5>
mov    0x2dbd(%rip),%rax
mov    (%rax),%edi
call   10a0 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xdbf(%rip),%xmm0
movsd  %xmm0,(%rsp)
add    $0x2,%ebx
mov    %ebx,%edi
movapd 0x20(%rsp),%xmm0
mov    %r14d,%esi
call   10b0 <compute_1F1_1d@plt>
jmp    1440 <compute_d1F1_dz2_2d+0x2b0>
xorpd  %xmm1,%xmm1
movsd  %xmm1,(%rsp)
call   1090 <log@plt>
movsd  %xmm0,0x48(%rsp)
movsd  0x8(%rsp),%xmm0
call   1090 <log@plt>
movsd  %xmm0,0x40(%rsp)
test   %r14d,%r14d
jle    1429 <compute_d1F1_dz2_2d+0x299>
add    $0x1,%ebx
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
mulsd  0xd62(%rip),%xmm0
movsd  %xmm0,0x38(%rsp)
xor    %r12d,%r12d
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x10(%rsp)
xorpd  %xmm0,%xmm0
movsd  %xmm0,(%rsp)
jmp    12e1 <compute_d1F1_dz2_2d+0x151>
nopl   0x0(%rax)
movsd  0x10(%rsp),%xmm0
addsd  0xd42(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
add    $0x1,%r12d
cmp    %r14d,%r12d
je     1429 <compute_d1F1_dz2_2d+0x299>
cmp    $0x1,%r14d
je     12c0 <compute_d1F1_dz2_2d+0x130>
movsd  0x10(%rsp),%xmm0
addsd  0xd0b(%rip),%xmm0
cvttsd2si %xmm0,%r15d
mov    $0x1,%ebx
jmp    135b <compute_d1F1_dz2_2d+0x1cb>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movapd %xmm2,%xmm0
movsd  %xmm2,0x18(%rsp)
call   1060 <exp@plt>
movsd  0x18(%rsp),%xmm2
movsd  (%rsp),%xmm1
mulsd  0xcd6(%rip),%xmm1
ucomisd %xmm0,%xmm1
ja     12c0 <compute_d1F1_dz2_2d+0x130>
movapd %xmm2,%xmm0
call   1060 <exp@plt>
movsd  (%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
add    $0x1,%ebx
cmp    %ebx,%r14d
je     12c0 <compute_d1F1_dz2_2d+0x130>
mov    %r15d,%edi
call   1080 <lgamma@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %ebx,%xmm1
movsd  %xmm0,0x18(%rsp)
movsd  %xmm1,0x50(%rsp)
movapd %xmm1,%xmm0
addsd  0xc7e(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1080 <lgamma@plt>
lea    (%r12,%rbx,1),%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  %xmm0,0x68(%rsp)
addsd  0x38(%rsp),%xmm1
cvttsd2si %xmm1,%edi
call   1080 <lgamma@plt>
movsd  %xmm0,0x58(%rsp)
lea    -0x1(%rbx),%ebp
mov    %r12d,%edi
call   1030 <lfact@plt>
movsd  %xmm0,0x60(%rsp)
mov    %ebp,%edi
call   1030 <lfact@plt>
movsd  0x10(%rsp),%xmm1
ucomisd 0x20(%rsp),%xmm1
movsd  0x68(%rsp),%xmm2
addsd  0x18(%rsp),%xmm2
subsd  0x58(%rsp),%xmm2
mulsd  0x48(%rsp),%xmm1
addsd  %xmm2,%xmm1
xorps  %xmm2,%xmm2
cvtsi2sd %ebp,%xmm2
mulsd  0x40(%rsp),%xmm2
addsd  %xmm1,%xmm2
subsd  0x60(%rsp),%xmm2
subsd  %xmm0,%xmm2
ja     1310 <compute_d1F1_dz2_2d+0x180>
movsd  0x50(%rsp),%xmm0
ucomisd 0x8(%rsp),%xmm0
jbe    1338 <compute_d1F1_dz2_2d+0x1a8>
jmp    1310 <compute_d1F1_dz2_2d+0x180>
mov    0x2bb8(%rip),%rax
mov    (%rax),%edi
call   10a0 <sqrt@plt>
add    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  (%rsp),%xmm0
add    $0x70,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@M_PI = global i32 0
define double @compute_d1F1_dz2_2d(i32 %0, double %1, double %2, i32 %3) {
%5 = tail call i32 @fabs(double %1)
%6 = icmp slt i32 %5, 1
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = tail call double @surface_area_sphere(i32 %0)
%9 = add nsw i32 %0, 1
%10 = sitofp i32 %9 to double
%11 = fdiv double %8, %10
br label %25
12: ; preds = %4
%13 = tail call i32 @fabs(double %2)
%14 = icmp slt i32 %13, 1
br i1 %14, label %15, label %23
15: ; preds = %12
%16 = load i32, i32* @M_PI
%17 = tail call i32 @sqrt(i32 %16)
%18 = sitofp i32 %17 to double
%19 = fmul double %18, 5.000000e-01
%20 = add nsw i32 %0, 2
%21 = tail call double @compute_1F1_1d(i32 %20, double %1, i32 %3)
%22 = fmul double %21, %19
br label %25
23: ; preds = %12
%24 = fcmp olt double %1, 0.000000e+00
br i1 %24, label %27, label %33
25: ; preds = %7, %15, %88, %27
%26 = phi double [ %32, %27 ], [ %11, %7 ], [ %22, %15 ], [ %94, %88 ]
ret double %26
27: ; preds = %23
%28 = tail call double @exp(double %1)
%29 = fneg double %1
%30 = fsub double %2, %1
%31 = tail call double @compute_d1F1_dz2_2d(i32 %0, double %29, double %30, i32 %3)
%32 = fmul double %28, %31
br label %25
33: ; preds = %23
%34 = tail call double @log(double %1)
%35 = tail call double @log(double %2)
%36 = add nsw i32 %0, 1
%37 = sitofp i32 %36 to double
%38 = fmul double %37, 5.000000e-01
%39 = icmp sgt i32 %3, 0
br i1 %39, label %40, label %88
40: ; preds = %33
%41 = icmp eq i32 %3, 1
br label %42
42: ; preds = %40, %84
%43 = phi i32 [ 0, %40 ], [ %86, %84 ]
%44 = phi double [ 0.000000e+00, %40 ], [ %85, %84 ]
br i1 %41, label %84, label %45
45: ; preds = %42
%46 = sitofp i32 %43 to double
%47 = fadd double %46, 5.000000e-01
%48 = fptosi double %47 to i32
%49 = fcmp ogt double %46, %1
br label %50
50: ; preds = %45, %79
%51 = phi i32 [ 1, %45 ], [ %82, %79 ]
%52 = phi double [ %44, %45 ], [ %81, %79 ]
%53 = tail call double @lgamma(i32 %48)
%54 = sitofp i32 %51 to double
%55 = fadd double %54, 5.000000e-01
%56 = fptosi double %55 to i32
%57 = tail call double @lgamma(i32 %56)
%58 = fadd double %53, %57
%59 = add nuw nsw i32 %51, %43
%60 = sitofp i32 %59 to double
%61 = fadd double %38, %60
%62 = fptosi double %61 to i32
%63 = tail call double @lgamma(i32 %62)
%64 = fsub double %58, %63
%65 = tail call double @llvm.fmuladd.f64(double %46, double %34, double %64)
%66 = add nsw i32 %51, -1
%67 = sitofp i32 %66 to double
%68 = tail call double @llvm.fmuladd.f64(double %67, double %35, double %65)
%69 = tail call double @lfact(i32 %43)
%70 = fsub double %68, %69
%71 = tail call double @lfact(i32 %66)
%72 = fsub double %70, %71
%73 = fcmp ogt double %54, %2
%74 = select i1 %49, i1 true, i1 %73
br i1 %74, label %75, label %79
75: ; preds = %50
%76 = tail call double @exp(double %72)
%77 = fmul double %52, 1.000000e-08
%78 = fcmp olt double %76, %77
br i1 %78, label %84, label %79
79: ; preds = %50, %75
%80 = tail call double @exp(double %72)
%81 = fadd double %52, %80
%82 = add nuw nsw i32 %51, 1
%83 = icmp eq i32 %82, %3
br i1 %83, label %84, label %50
84: ; preds = %75, %79, %42
%85 = phi double [ %44, %42 ], [ %81, %79 ], [ %52, %75 ]
%86 = add nuw nsw i32 %43, 1
%87 = icmp eq i32 %86, %3
br i1 %87, label %88, label %42
88: ; preds = %84, %33
%89 = phi double [ 0.000000e+00, %33 ], [ %85, %84 ]
%90 = load i32, i32* @M_PI
%91 = tail call i32 @sqrt(i32 %90)
%92 = shl nsw i32 %91, 1
%93 = sitofp i32 %92 to double
%94 = fmul double %89, %93
br label %25
}