#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 M_PI;
double acos(double);
int mybsearch(double *, double, int);
void circleanglesorted(double *r, double p, double z, int n, double *answer) {
  int i, a, b;
  double zsquared = z * z;
  double psquared = p * p;
  double ri;
  if (p > z) {
    a = mybsearch(r, p - z, n);
    b = mybsearch(r, p + z, n);
    for (i = 0; i < a; i++)
      *(answer + i) = M_PI;
    for (; i < b; i++) {
      ri = *(r + i);
      *(answer + i) = acos((ri * ri + zsquared - psquared) / (2 * z * ri));
    }
    for (; i < n; i++)
      *(answer + i) = 0.0;
  } else {
    a = mybsearch(r, z - p, n);
    b = mybsearch(r, z + p, n);
    for (i = 0; i < a; i++)
      *(answer + i) = 0.0;
    for (; i < b; i++) {
      ri = *(r + i);
      *(answer + i) = acos((ri * ri + zsquared - psquared) / (2 * z * ri));
    }
    for (; i < n; i++)
      *(answer + i) = 0.0;
  }
  return;
}


x86 assembly (clang, -O0):
<circleanglesorted>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %esi,-0x1c(%rbp)
mov    %rdx,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    127f <circleanglesorted+0x15f>
mov    -0x8(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
mov    -0x1c(%rbp),%esi
call   1040 <mybsearch@plt>
mov    %eax,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
mov    -0x1c(%rbp),%esi
call   1040 <mybsearch@plt>
mov    %eax,-0x34(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x30(%rbp),%eax
jge    11d6 <circleanglesorted+0xb6>
mov    0x2e31(%rip),%rax
movsd  (%rax),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11a4 <circleanglesorted+0x84>
jmp    11db <circleanglesorted+0xbb>
mov    -0x2c(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    124b <circleanglesorted+0x12b>
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x40(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
subsd  -0x48(%rbp),%xmm0
movsd  0xde3(%rip),%xmm1
mulsd  -0x18(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1030 <acos@plt>
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11db <circleanglesorted+0xbb>
jmp    1250 <circleanglesorted+0x130>
mov    -0x2c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    127a <circleanglesorted+0x15a>
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1250 <circleanglesorted+0x130>
jmp    138b <circleanglesorted+0x26b>
mov    -0x8(%rbp),%rdi
movsd  -0x18(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
mov    -0x1c(%rbp),%esi
call   1040 <mybsearch@plt>
mov    %eax,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
movsd  -0x18(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
mov    -0x1c(%rbp),%esi
call   1040 <mybsearch@plt>
mov    %eax,-0x34(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x30(%rbp),%eax
jge    12e2 <circleanglesorted+0x1c2>
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    12b8 <circleanglesorted+0x198>
jmp    12e7 <circleanglesorted+0x1c7>
mov    -0x2c(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    1357 <circleanglesorted+0x237>
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x40(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
subsd  -0x48(%rbp),%xmm0
movsd  0xcd7(%rip),%xmm1
mulsd  -0x18(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1030 <acos@plt>
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    12e7 <circleanglesorted+0x1c7>
jmp    135c <circleanglesorted+0x23c>
mov    -0x2c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1386 <circleanglesorted+0x266>
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    135c <circleanglesorted+0x23c>
jmp    138b <circleanglesorted+0x26b>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<circleanglesorted>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rdx,%r14
mov    %esi,%ebx
movapd %xmm0,%xmm2
mov    %rdi,%r13
movapd %xmm1,%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x20(%rsp)
movapd %xmm2,%xmm0
mulsd  %xmm2,%xmm0
movsd  %xmm0,0x18(%rsp)
ucomisd %xmm1,%xmm2
movsd  %xmm1,0x8(%rsp)
movsd  %xmm2,0x10(%rsp)
jbe    1266 <circleanglesorted+0x136>
movapd %xmm2,%xmm0
subsd  %xmm1,%xmm0
mov    %r13,%rdi
mov    %ebx,%esi
call   1050 <mybsearch@plt>
mov    %eax,%r15d
movsd  0x10(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
mov    %r13,%rdi
mov    %ebx,%esi
call   1050 <mybsearch@plt>
test   %r15d,%r15d
jle    12b0 <circleanglesorted+0x180>
mov    %r15d,%ebp
cmp    $0x4,%r15d
jb     11de <circleanglesorted+0xae>
mov    0x2e28(%rip),%r8
lea    0x8(%r8),%rcx
cmp    %rcx,%r14
jae    13c4 <circleanglesorted+0x294>
lea    (%r14,%rbp,8),%rcx
cmp    0x2e10(%rip),%rcx
jbe    13c4 <circleanglesorted+0x294>
xor    %ecx,%ecx
movsd  0x8(%rsp),%xmm2
mov    %rcx,%rdx
not    %rdx
add    %rbp,%rdx
mov    %rbp,%rsi
and    $0x3,%rsi
je     1214 <circleanglesorted+0xe4>
mov    0x2de9(%rip),%rdi
nop
movsd  (%rdi),%xmm0
movsd  %xmm0,(%r14,%rcx,8)
add    $0x1,%rcx
add    $0xffffffffffffffff,%rsi
jne    1200 <circleanglesorted+0xd0>
cmp    $0x3,%rdx
jb     12b9 <circleanglesorted+0x189>
mov    0x2dc3(%rip),%rdx
cs nopw 0x0(%rax,%rax,1)
nop
movsd  (%rdx),%xmm0
movsd  %xmm0,(%r14,%rcx,8)
movsd  (%rdx),%xmm0
movsd  %xmm0,0x8(%r14,%rcx,8)
movsd  (%rdx),%xmm0
movsd  %xmm0,0x10(%r14,%rcx,8)
movsd  (%rdx),%xmm0
movsd  %xmm0,0x18(%r14,%rcx,8)
add    $0x4,%rcx
cmp    %rcx,%rbp
jne    1230 <circleanglesorted+0x100>
jmp    12b9 <circleanglesorted+0x189>
movapd %xmm1,%xmm0
subsd  %xmm2,%xmm0
mov    %r13,%rdi
mov    %ebx,%esi
call   1050 <mybsearch@plt>
mov    %eax,%r15d
movsd  0x10(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
mov    %r13,%rdi
mov    %ebx,%esi
call   1050 <mybsearch@plt>
mov    %eax,%r12d
test   %r15d,%r15d
jle    1322 <circleanglesorted+0x1f2>
mov    %r15d,%edx
shl    $0x3,%rdx
mov    %r14,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
jmp    1325 <circleanglesorted+0x1f5>
xor    %r15d,%r15d
movsd  0x8(%rsp),%xmm2
cmp    %eax,%r15d
jge    1394 <circleanglesorted+0x264>
mov    %ebx,%r12d
addsd  %xmm2,%xmm2
mov    %r15d,%ebp
mov    %eax,%r15d
mov    %eax,%ebx
movsd  %xmm2,0x8(%rsp)
nopw   0x0(%rax,%rax,1)
movsd  0x0(%r13,%rbp,8),%xmm1
movapd %xmm1,%xmm0
mulsd  %xmm1,%xmm0
addsd  0x20(%rsp),%xmm0
subsd  0x18(%rsp),%xmm0
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
call   1030 <acos@plt>
movsd  0x8(%rsp),%xmm2
movsd  %xmm0,(%r14,%rbp,8)
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    12e0 <circleanglesorted+0x1b0>
mov    %r12d,%ebx
jmp    1394 <circleanglesorted+0x264>
xor    %r15d,%r15d
movsd  0x8(%rsp),%xmm2
cmp    %r12d,%r15d
jge    1394 <circleanglesorted+0x264>
mov    %ebx,0x10(%rsp)
addsd  %xmm2,%xmm2
mov    %r15d,%ebp
mov    %r12d,%ebx
movsd  %xmm2,0x8(%rsp)
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  0x0(%r13,%rbp,8),%xmm1
movapd %xmm1,%xmm0
mulsd  %xmm1,%xmm0
addsd  0x20(%rsp),%xmm0
subsd  0x18(%rsp),%xmm0
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
call   1030 <acos@plt>
movsd  0x8(%rsp),%xmm2
movsd  %xmm0,(%r14,%rbp,8)
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1350 <circleanglesorted+0x220>
mov    %r12d,%r15d
mov    0x10(%rsp),%ebx
cmp    %ebx,%r15d
jge    13b5 <circleanglesorted+0x285>
mov    %r15d,%eax
lea    (%r14,%rax,8),%rdi
not    %r15d
add    %ebx,%r15d
lea    0x8(,%r15,8),%rdx
xor    %esi,%esi
call   1040 <memset@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %ebp,%ecx
and    $0xfffffffc,%ecx
lea    -0x4(%rcx),%rdx
mov    %rdx,%rdi
shr    $0x2,%rdi
add    $0x1,%rdi
mov    %edi,%esi
and    $0x3,%esi
cmp    $0xc,%rdx
jae    13e7 <circleanglesorted+0x2b7>
xor    %edx,%edx
jmp    1441 <circleanglesorted+0x311>
and    $0xfffffffffffffffc,%rdi
movsd  (%r8),%xmm0
unpcklpd %xmm0,%xmm0
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
movupd %xmm0,(%r14,%rdx,8)
movupd %xmm0,0x10(%r14,%rdx,8)
movupd %xmm0,0x20(%r14,%rdx,8)
movupd %xmm0,0x30(%r14,%rdx,8)
movupd %xmm0,0x40(%r14,%rdx,8)
movupd %xmm0,0x50(%r14,%rdx,8)
movupd %xmm0,0x60(%r14,%rdx,8)
movupd %xmm0,0x70(%r14,%rdx,8)
add    $0x10,%rdx
add    $0xfffffffffffffffc,%rdi
jne    1400 <circleanglesorted+0x2d0>
test   %rsi,%rsi
je     1474 <circleanglesorted+0x344>
movsd  (%r8),%xmm0
unpcklpd %xmm0,%xmm0
lea    (%r14,%rdx,8),%rdx
add    $0x10,%rdx
shl    $0x5,%rsi
xor    %edi,%edi
nopl   (%rax)
movupd %xmm0,-0x10(%rdx,%rdi,1)
movupd %xmm0,(%rdx,%rdi,1)
add    $0x20,%rdi
cmp    %rdi,%rsi
jne    1460 <circleanglesorted+0x330>
cmp    %rbp,%rcx
movsd  0x8(%rsp),%xmm2
jne    11e6 <circleanglesorted+0xb6>
jmp    12b9 <circleanglesorted+0x189>

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

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