#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_2d(int, double, double, int);
double compute_d1F1_dz2_2d(int, double, double, int);
int compute_d1F1_dz_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_dz1_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) {
    double retval = sqrt(M_PI) * compute_d1F1_dz_1d(dim, z1, iter);
    return retval;
  }
  if (z1 < 0)
    return compute_1F1_2d(dim, z1, z2, iter) -
           exp(z1) * (compute_d1F1_dz1_2d(dim, -z1, z2 - z1, iter) +
                      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 = 1; i < iter; i++) {
    for (j = 0; j < iter; j++) {
      g = lgamma(i + a) + lgamma(j + a) - lgamma(i + j + b) + (i - 1) * logz1 +
          j * logz2 - lfact(i - 1) - lfact(j);
      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_dz1_2d>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %edi,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    %esi,-0x24(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1060 <fabs@plt>
cvtsi2sd %eax,%xmm1
movsd  0xe1f(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    120b <compute_d1F1_dz1_2d+0x5b>
mov    -0xc(%rbp),%edi
call   1090 <surface_area_sphere@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    153b <compute_d1F1_dz1_2d+0x38b>
movsd  -0x20(%rbp),%xmm0
call   1060 <fabs@plt>
cvtsi2sd %eax,%xmm1
movsd  0xddf(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    126c <compute_d1F1_dz1_2d+0xbc>
mov    0x2db6(%rip),%rax
mov    (%rax),%edi
call   10d0 <sqrt@plt>
mov    %eax,-0x6c(%rbp)
mov    -0xc(%rbp),%edi
movsd  -0x18(%rbp),%xmm0
mov    -0x24(%rbp),%esi
call   10b0 <compute_d1F1_dz_1d@plt>
mov    %eax,%ecx
mov    -0x6c(%rbp),%eax
imul   %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    153b <compute_d1F1_dz1_2d+0x38b>
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    134f <compute_d1F1_dz1_2d+0x19f>
mov    -0xc(%rbp),%edi
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
mov    -0x24(%rbp),%esi
call   1070 <compute_1F1_2d@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1080 <exp@plt>
movsd  %xmm0,-0x78(%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   1030 <compute_d1F1_dz1_2d@plt>
movsd  %xmm0,-0x88(%rbp)
ff
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   1050 <compute_d1F1_dz2_2d@plt>
movsd  -0x88(%rbp),%xmm2
ff
movsd  -0x80(%rbp),%xmm1
movaps %xmm0,%xmm3
movsd  -0x78(%rbp),%xmm0
addsd  %xmm3,%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    153b <compute_d1F1_dz1_2d+0x38b>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x18(%rbp),%xmm0
call   10c0 <log@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x20(%rbp),%xmm0
call   10c0 <log@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  0xc8b(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm1
movsd  0xc74(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    151c <compute_d1F1_dz1_2d+0x36c>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1509 <compute_d1F1_dz1_2d+0x359>
cvtsi2sdl -0x34(%rbp),%xmm0
addsd  -0x60(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   10a0 <lgamma@plt>
movsd  %xmm0,-0xa8(%rbp)
ff
cvtsi2sdl -0x38(%rbp),%xmm0
addsd  -0x60(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   10a0 <lgamma@plt>
movaps %xmm0,%xmm1
movsd  -0xa8(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x34(%rbp),%eax
add    -0x38(%rbp),%eax
cvtsi2sd %eax,%xmm0
addsd  -0x68(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   10a0 <lgamma@plt>
movaps %xmm0,%xmm1
movsd  -0xa0(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
mov    -0x34(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm1
movsd  -0x50(%rbp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
cvtsi2sdl -0x38(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x34(%rbp),%edi
sub    $0x1,%edi
call   1040 <lfact@plt>
movaps %xmm0,%xmm1
movsd  -0x98(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x38(%rbp),%edi
call   1040 <lfact@plt>
movaps %xmm0,%xmm1
movsd  -0x90(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
cvtsi2sdl -0x34(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
ja     14be <compute_d1F1_dz1_2d+0x30e>
cvtsi2sdl -0x38(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    14e7 <compute_d1F1_dz1_2d+0x337>
movsd  -0x40(%rbp),%xmm0
call   1080 <exp@plt>
movaps %xmm0,%xmm1
movsd  0xb2d(%rip),%xmm0
mulsd  -0x48(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    14e7 <compute_d1F1_dz1_2d+0x337>
jmp    1509 <compute_d1F1_dz1_2d+0x359>
movsd  -0x40(%rbp),%xmm0
call   1080 <exp@plt>
addsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    13b7 <compute_d1F1_dz1_2d+0x207>
jmp    150e <compute_d1F1_dz1_2d+0x35e>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    13a4 <compute_d1F1_dz1_2d+0x1f4>
mov    0x2ac5(%rip),%rax
mov    (%rax),%edi
call   10d0 <sqrt@plt>
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute_d1F1_dz1_2d>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x80,%rsp
mov    %esi,%r14d
movsd  %xmm1,0x8(%rsp)
mov    %edi,%ebx
movapd %xmm0,0x20(%rsp)
call   1060 <fabs@plt>
test   %eax,%eax
jle    129d <compute_d1F1_dz1_2d+0xed>
movsd  0x8(%rsp),%xmm0
call   1060 <fabs@plt>
test   %eax,%eax
jle    12b7 <compute_d1F1_dz1_2d+0x107>
xorpd  %xmm2,%xmm2
movapd 0x20(%rsp),%xmm0
xorpd  %xmm1,%xmm1
movsd  %xmm1,0x10(%rsp)
ucomisd %xmm0,%xmm2
jbe    12e5 <compute_d1F1_dz1_2d+0x135>
mov    %ebx,%edi
movsd  0x8(%rsp),%xmm1
mov    %r14d,%esi
call   1070 <compute_1F1_2d@plt>
movsd  %xmm0,0x10(%rsp)
movaps 0x20(%rsp),%xmm0
call   1080 <exp@plt>
movsd  %xmm0,0x18(%rsp)
movapd 0x20(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
xorpd  0xdce(%rip),%xmm0
movapd %xmm0,0x20(%rsp)
mov    %ebx,%edi
mov    %r14d,%esi
call   1030 <compute_d1F1_dz1_2d@plt>
movsd  %xmm0,0x38(%rsp)
mov    %ebx,%edi
movapd 0x20(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
mov    %r14d,%esi
call   1050 <compute_d1F1_dz2_2d@plt>
addsd  0x38(%rsp),%xmm0
mulsd  0x18(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
jmp    14cc <compute_d1F1_dz1_2d+0x31c>
mov    %ebx,%edi
call   1090 <surface_area_sphere@plt>
add    $0x1,%ebx
xorps  %xmm1,%xmm1
cvtsi2sd %ebx,%xmm1
divsd  %xmm1,%xmm0
jmp    14cc <compute_d1F1_dz1_2d+0x31c>
mov    0x2d2a(%rip),%rax
mov    (%rax),%edi
call   10d0 <sqrt@plt>
mov    %eax,%ebp
mov    %ebx,%edi
movaps 0x20(%rsp),%xmm0
mov    %r14d,%esi
call   10b0 <compute_d1F1_dz_1d@plt>
imul   %ebp,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
jmp    14cc <compute_d1F1_dz1_2d+0x31c>
call   10c0 <log@plt>
movsd  %xmm0,0x58(%rsp)
movsd  0x8(%rsp),%xmm0
call   10c0 <log@plt>
movsd  %xmm0,0x50(%rsp)
cmp    $0x2,%r14d
jl     14af <compute_d1F1_dz1_2d+0x2ff>
add    $0x1,%ebx
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
mulsd  0xce3(%rip),%xmm0
movsd  %xmm0,0x48(%rsp)
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x10(%rsp)
mov    $0x1,%r12d
movsd  0xccd(%rip),%xmm0
jmp    135b <compute_d1F1_dz1_2d+0x1ab>
nopl   (%rax)
movsd  0x40(%rsp),%xmm0
addsd  0xcba(%rip),%xmm0
add    $0x1,%r12d
cmp    %r14d,%r12d
je     14af <compute_d1F1_dz1_2d+0x2ff>
movsd  %xmm0,0x40(%rsp)
addsd  0xc97(%rip),%xmm0
cvttsd2si %xmm0,%r15d
lea    -0x1(%r12),%ebx
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
movsd  %xmm0,0x60(%rsp)
xor    %ebp,%ebp
jmp    13de <compute_d1F1_dz1_2d+0x22e>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movapd %xmm3,%xmm0
movsd  %xmm3,0x18(%rsp)
call   1080 <exp@plt>
movsd  0x18(%rsp),%xmm3
movsd  0x10(%rsp),%xmm1
mulsd  0xc5d(%rip),%xmm1
ucomisd %xmm0,%xmm1
ja     1340 <compute_d1F1_dz1_2d+0x190>
movapd %xmm3,%xmm0
call   1080 <exp@plt>
movsd  0x10(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
add    $0x1,%ebp
cmp    %ebp,%r14d
je     1340 <compute_d1F1_dz1_2d+0x190>
mov    %r15d,%edi
call   10a0 <lgamma@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %ebp,%xmm1
movsd  %xmm1,0x38(%rsp)
movsd  %xmm0,0x18(%rsp)
movapd %xmm1,%xmm0
addsd  0xbfb(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   10a0 <lgamma@plt>
lea    (%r12,%rbp,1),%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  %xmm0,0x70(%rsp)
addsd  0x48(%rsp),%xmm1
cvttsd2si %xmm1,%edi
call   10a0 <lgamma@plt>
movsd  %xmm0,0x68(%rsp)
mov    %ebx,%edi
call   1040 <lfact@plt>
movsd  %xmm0,0x78(%rsp)
mov    %ebp,%edi
call   1040 <lfact@plt>
movsd  0x38(%rsp),%xmm2
movsd  0x40(%rsp),%xmm1
ucomisd 0x20(%rsp),%xmm1
movsd  0x70(%rsp),%xmm1
addsd  0x18(%rsp),%xmm1
subsd  0x68(%rsp),%xmm1
movapd %xmm1,%xmm3
movsd  0x60(%rsp),%xmm1
mulsd  0x58(%rsp),%xmm1
addsd  %xmm3,%xmm1
movapd %xmm2,%xmm3
mulsd  0x50(%rsp),%xmm3
addsd  %xmm1,%xmm3
subsd  0x78(%rsp),%xmm3
subsd  %xmm0,%xmm3
ja     1390 <compute_d1F1_dz1_2d+0x1e0>
ucomisd 0x8(%rsp),%xmm2
jbe    13b9 <compute_d1F1_dz1_2d+0x209>
jmp    1390 <compute_d1F1_dz1_2d+0x1e0>
mov    0x2b32(%rip),%rax
mov    (%rax),%edi
call   10d0 <sqrt@plt>
add    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x10(%rsp),%xmm0
add    $0x80,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

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