#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 acos(double);
double fabs(double);
double sqrt(double);
void occultuniform(double *b0, double w, double *muo1, int nb) {
  int i;
  double z, pi, lambdae, kap0, kap1;
  if (fabs(w - 0.5) < 0.001)
    w = 0.5;
  pi = acos(-1.);
  for (i = 0; i < nb; i++) {
    z = b0[i];
    if (z >= 1.0 + w) {
      muo1[i] = 1.;
      continue;
    }
    if (w >= 1.0 && z <= w - 1.0) {
      muo1[i] = 0.0;
      continue;
    }
    if (z >= fabs(1.0 - w) && z <= 1.0 + w) {
      kap1 = acos((((1.0 - w * w + z * z) / 2.0 / z) < (1.0)
                       ? ((1.0 - w * w + z * z) / 2.0 / z)
                       : (1.0)));
      kap0 = acos((((w * w + z * z - 1.0) / 2.0 / w / z) < (1.0)
                       ? ((w * w + z * z - 1.0) / 2.0 / w / z)
                       : (1.0)));
      lambdae = w * w * kap0 + kap1;
      lambdae =
          (lambdae - 0.5 * sqrt(((4.0 * z * z - ((1.0 + z * z - w * w) *
                                                 (1.0 + z * z - w * w))) > (0.0)
                                     ? (4.0 * z * z - ((1.0 + z * z - w * w) *
                                                       (1.0 + z * z - w * w)))
                                     : (0.0)))) /
          pi;
      muo1[i] = 1.0 - lambdae;
      continue;
    }
    if (z <= 1.0 - w)
      muo1[i] = 1.0 - w * w;
  }
  return;
}


x86 assembly (clang, -O0):
<occultuniform>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  0xec3(%rip),%xmm0
subsd  %xmm0,%xmm1
movaps 0xef0(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xea4(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1173 <occultuniform+0x53>
movsd  0xe9a(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xe95(%rip),%xmm0
call   1030 <acos@plt>
movsd  %xmm0,-0x30(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1687 <occultuniform+0x567>
mov    -0x8(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xe61(%rip),%xmm1
addsd  -0x10(%rbp),%xmm1
ucomisd %xmm1,%xmm0
jb     11e0 <occultuniform+0xc0>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  0xe42(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    1679 <occultuniform+0x559>
movsd  -0x10(%rbp),%xmm0
movsd  0xe2b(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     122c <occultuniform+0x10c>
movsd  -0x28(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  0xe0f(%rip),%xmm2
subsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jb     122c <occultuniform+0x10c>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    1679 <occultuniform+0x559>
movsd  -0x28(%rbp),%xmm0
movsd  0xddf(%rip),%xmm1
subsd  -0x10(%rbp),%xmm1
movaps 0xdfb(%rip),%xmm2
pand   %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jb     161a <occultuniform+0x4fa>
movsd  -0x28(%rbp),%xmm1
movsd  0xdb8(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     161a <occultuniform+0x4fa>
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xd7c(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xd66(%rip),%xmm0
divsd  %xmm0,%xmm1
divsd  -0x28(%rbp),%xmm1
movsd  0xd4d(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1333 <occultuniform+0x213>
movsd  -0x10(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm0,%xmm1
movsd  0xd16(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xd00(%rip),%xmm1
divsd  %xmm1,%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    1345 <occultuniform+0x225>
movsd  0xcdd(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    1345 <occultuniform+0x225>
movsd  -0x50(%rbp),%xmm0
call   1030 <acos@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xca0(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xc9c(%rip),%xmm0
divsd  %xmm0,%xmm1
divsd  -0x10(%rbp),%xmm1
divsd  -0x28(%rbp),%xmm1
movsd  0xc7e(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    13ec <occultuniform+0x2cc>
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xc50(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xc4c(%rip),%xmm1
divsd  %xmm1,%xmm0
divsd  -0x10(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    13fe <occultuniform+0x2de>
movsd  0xc24(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    13fe <occultuniform+0x2de>
movsd  -0x58(%rbp),%xmm0
call   1030 <acos@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xbe8(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
movsd  -0x28(%rbp),%xmm1
mulsd  %xmm1,%xmm3
movsd  0xbb8(%rip),%xmm1
addsd  %xmm1,%xmm3
movsd  -0x10(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm4
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm4,%xmm1
addsd  %xmm3,%xmm1
movsd  -0x28(%rbp),%xmm4
movsd  -0x28(%rbp),%xmm3
mulsd  %xmm3,%xmm4
movsd  0xb75(%rip),%xmm3
addsd  %xmm3,%xmm4
movsd  -0x10(%rbp),%xmm3
movsd  -0x10(%rbp),%xmm5
movq   %xmm3,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm3
mulsd  %xmm5,%xmm3
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    15c5 <occultuniform+0x4a5>
movsd  0xb20(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
movsd  -0x28(%rbp),%xmm1
mulsd  %xmm1,%xmm3
movsd  0xaf0(%rip),%xmm1
addsd  %xmm1,%xmm3
movsd  -0x10(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm4
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm4,%xmm1
addsd  %xmm3,%xmm1
movsd  -0x28(%rbp),%xmm4
movsd  -0x28(%rbp),%xmm3
mulsd  %xmm3,%xmm4
movsd  0xaad(%rip),%xmm3
addsd  %xmm3,%xmm4
movsd  -0x10(%rbp),%xmm3
movsd  -0x10(%rbp),%xmm5
movq   %xmm3,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm3
mulsd  %xmm5,%xmm3
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
jmp    15d2 <occultuniform+0x4b2>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
jmp    15d2 <occultuniform+0x4b2>
movsd  -0x68(%rbp),%xmm0
call   1040 <sqrt@plt>
movsd  -0x60(%rbp),%xmm1
movsd  0xa47(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
divsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xa15(%rip),%xmm0
subsd  -0x38(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    1679 <occultuniform+0x559>
movsd  -0x28(%rbp),%xmm1
movsd  0x9f1(%rip),%xmm0
subsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1674 <occultuniform+0x554>
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0x9b5(%rip),%xmm1
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    1679 <occultuniform+0x559>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    118c <occultuniform+0x6c>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<occultuniform>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x98,%rsp
test   %edx,%edx
jle    1383 <occultuniform+0x263>
mov    %rsi,%r14
mov    %rdi,%r15
movsd  0xebc(%rip),%xmm2
addsd  %xmm0,%xmm2
andpd  0xef0(%rip),%xmm2
cmpltsd 0xeaf(%rip),%xmm2
movsd  0xeaf(%rip),%xmm1
andpd  %xmm2,%xmm1
andnpd %xmm0,%xmm2
orpd   %xmm1,%xmm2
movsd  0xea3(%rip),%xmm1
movapd %xmm2,%xmm3
addsd  %xmm1,%xmm3
movsd  0xe9b(%rip),%xmm4
addsd  %xmm2,%xmm4
movapd %xmm1,%xmm0
subsd  %xmm2,%xmm0
movapd 0xea6(%rip),%xmm8
movapd %xmm0,0x80(%rsp)
andpd  %xmm0,%xmm8
movapd 0xea0(%rip),%xmm0
xorpd  %xmm2,%xmm0
movapd %xmm2,%xmm6
mulsd  %xmm2,%xmm6
movapd %xmm1,%xmm7
movapd %xmm6,0x60(%rsp)
subsd  %xmm6,%xmm7
mov    %edx,%r12d
xor    %ebx,%ebx
mulsd  %xmm2,%xmm0
movapd %xmm0,0x70(%rsp)
movapd %xmm2,0x30(%rsp)
movapd %xmm3,0x50(%rsp)
movsd  %xmm4,0x18(%rsp)
movapd %xmm8,0x40(%rsp)
movsd  %xmm7,0x10(%rsp)
nopl   0x0(%rax,%rax,1)
movsd  (%r15,%rbx,8),%xmm6
ucomisd %xmm3,%xmm6
movapd %xmm1,%xmm0
jae    1370 <occultuniform+0x250>
ucomisd %xmm1,%xmm2
jb     1228 <occultuniform+0x108>
xorpd  %xmm0,%xmm0
ucomisd %xmm6,%xmm4
jae    1370 <occultuniform+0x250>
ucomisd %xmm8,%xmm6
jb     12f7 <occultuniform+0x1d7>
ucomisd %xmm6,%xmm3
jb     12f7 <occultuniform+0x1d7>
movapd %xmm6,%xmm0
mulsd  %xmm6,%xmm0
movsd  %xmm0,0x8(%rsp)
addsd  %xmm7,%xmm0
movsd  0xdb9(%rip),%xmm3
mulsd  %xmm3,%xmm0
divsd  %xmm6,%xmm0
minsd  %xmm1,%xmm0
movsd  %xmm6,0x28(%rsp)
call   1030 <acos@plt>
movsd  %xmm0,0x20(%rsp)
movapd 0x60(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
addsd  0xd98(%rip),%xmm0
mulsd  0xd80(%rip),%xmm0
divsd  0x30(%rsp),%xmm0
divsd  0x28(%rsp),%xmm0
minsd  0xd74(%rip),%xmm0
call   1030 <acos@plt>
movsd  0xd67(%rip),%xmm1
movapd %xmm0,%xmm5
movsd  0x28(%rsp),%xmm3
movapd %xmm3,%xmm0
mulsd  0xd61(%rip),%xmm0
movsd  0x8(%rsp),%xmm2
addsd  %xmm1,%xmm2
addsd  0x70(%rsp),%xmm2
mulsd  %xmm2,%xmm2
mulsd  %xmm3,%xmm0
subsd  %xmm2,%xmm0
xorpd  %xmm2,%xmm2
maxsd  %xmm2,%xmm0
ucomisd %xmm2,%xmm0
jb     130c <occultuniform+0x1ec>
sqrtsd %xmm0,%xmm0
jmp    1325 <occultuniform+0x205>
movapd 0x80(%rsp),%xmm0
ucomisd %xmm6,%xmm0
movapd %xmm7,%xmm0
jae    1370 <occultuniform+0x250>
jmp    1376 <occultuniform+0x256>
movsd  %xmm5,0x8(%rsp)
call   1040 <sqrt@plt>
movsd  0x8(%rsp),%xmm5
movsd  0xcf3(%rip),%xmm1
movapd 0x30(%rsp),%xmm2
movapd 0x50(%rsp),%xmm3
movsd  0x18(%rsp),%xmm4
movapd 0x40(%rsp),%xmm8
movsd  0x10(%rsp),%xmm7
movsd  0x20(%rsp),%xmm6
mulsd  0x60(%rsp),%xmm5
addsd  %xmm6,%xmm5
mulsd  0xca4(%rip),%xmm0
addsd  %xmm5,%xmm0
divsd  0xcc8(%rip),%xmm0
addsd  %xmm1,%xmm0
nopl   0x0(%rax)
movsd  %xmm0,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1200 <occultuniform+0xe0>
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @occultuniform(double* nocapture %0, double %1, double* nocapture writeonly %2, i32 %3) {
%5 = fadd double %1, -5.000000e-01
%6 = tail call double @llvm.fabs.f64(double %5)
%7 = fcmp olt double %6, 1.000000e-03
%8 = select i1 %7, double 5.000000e-01, double %1
%9 = icmp sgt i32 %3, 0
br i1 %9, label %10, label %69
10: ; preds = %4
%11 = fadd double %8, 1.000000e+00
%12 = fcmp ult double %8, 1.000000e+00
%13 = fadd double %8, -1.000000e+00
%14 = fsub double 1.000000e+00, %8
%15 = tail call double @llvm.fabs.f64(double %14)
%16 = fneg double %8
%17 = tail call double @llvm.fmuladd.f64(double %16, double %8, double 1.000000e+00)
%18 = fmul double %8, %8
%19 = zext i32 %3 to i64
br label %20
20: ; preds = %10, %66
%21 = phi i64 [ 0, %10 ], [ %67, %66 ]
%22 = getelementptr inbounds double, double* %0, i64 %21
%23 = load double, double* %22
%24 = fcmp ult double %23, %11
br i1 %24, label %25, label %63
25: ; preds = %20
%26 = fcmp ugt double %23, %13
%27 = select i1 %12, i1 true, i1 %26
br i1 %27, label %28, label %63
28: ; preds = %25
%29 = fcmp ult double %23, %15
%30 = fcmp ugt double %23, %11
%31 = select i1 %29, i1 true, i1 %30
br i1 %31, label %61, label %32
32: ; preds = %28
%33 = tail call double @llvm.fmuladd.f64(double %23, double %23, double %17)
%34 = fmul double %33, 5.000000e-01
%35 = fdiv double %34, %23
%36 = fcmp olt double %35, 1.000000e+00
%37 = select i1 %36, double %35, double 1.000000e+00
%38 = tail call double @acos(double %37)
%39 = fmul double %23, %23
%40 = tail call double @llvm.fmuladd.f64(double %8, double %8, double %39)
%41 = fadd double %40, -1.000000e+00
%42 = fmul double %41, 5.000000e-01
%43 = fdiv double %42, %8
%44 = fdiv double %43, %23
%45 = fcmp olt double %44, 1.000000e+00
%46 = select i1 %45, double %44, double 1.000000e+00
%47 = tail call double @acos(double %46)
%48 = tail call double @llvm.fmuladd.f64(double %18, double %47, double %38)
%49 = fmul double %23, 4.000000e+00
%50 = tail call double @llvm.fmuladd.f64(double %23, double %23, double 1.000000e+00)
%51 = tail call double @llvm.fmuladd.f64(double %16, double %8, double %50)
%52 = fneg double %51
%53 = fmul double %51, %52
%54 = tail call double @llvm.fmuladd.f64(double %49, double %23, double %53)
%55 = fcmp ogt double %54, 0.000000e+00
%56 = select i1 %55, double %54, double 0.000000e+00
%57 = tail call double @sqrt(double %56)
%58 = tail call double @llvm.fmuladd.f64(double %57, double -5.000000e-01, double %48)
%59 = fdiv double %58, 0x400921FB54442D18
%60 = fsub double 1.000000e+00, %59
br label %63
61: ; preds = %28
%62 = fcmp ugt double %23, %14
br i1 %62, label %66, label %63
63: ; preds = %61, %25, %20, %32
%64 = phi double [ %60, %32 ], [ 1.000000e+00, %20 ], [ 0.000000e+00, %25 ], [ %17, %61 ]
%65 = getelementptr inbounds double, double* %2, i64 %21
store double %64, double* %65
br label %66
66: ; preds = %63, %61
%67 = add nuw nsw i64 %21, 1
%68 = icmp eq i64 %67, %19
br i1 %68, label %69, label %20
69: ; preds = %66, %4
ret void
}