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


x86 assembly (clang, -O0):
<circleangle>:
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    12d6 <circleangle+0x1b6>
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    11dd <circleangle+0xbd>
mov    0x2e31(%rip),%rax
movsd  (%rax),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x28(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11a4 <circleangle+0x84>
mov    -0x2c(%rbp),%ecx
mov    -0x8(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    126c <circleangle+0x14c>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm2
movsd  -0x40(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
subsd  -0x48(%rbp),%xmm0
movsd  0xdd8(%rip),%xmm1
mulsd  -0x18(%rbp),%xmm1
mov    -0x8(%rbp),%rax
mulsd  (%rax),%xmm1
divsd  %xmm1,%xmm0
call   1030 <acos@plt>
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11f2 <circleangle+0xd2>
mov    -0x2c(%rbp),%ecx
mov    -0x8(%rbp),%rax
movslq %ecx,%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    12b7 <circleangle+0x197>
mov    -0x28(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x28(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1286 <circleangle+0x166>
mov    -0x2c(%rbp),%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
jmp    1434 <circleangle+0x314>
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    1340 <circleangle+0x220>
mov    -0x28(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x28(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    130f <circleangle+0x1ef>
mov    -0x2c(%rbp),%ecx
mov    -0x8(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    13cf <circleangle+0x2af>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm2
movsd  -0x40(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
subsd  -0x48(%rbp),%xmm0
movsd  0xc75(%rip),%xmm1
mulsd  -0x18(%rbp),%xmm1
mov    -0x8(%rbp),%rax
mulsd  (%rax),%xmm1
divsd  %xmm1,%xmm0
call   1030 <acos@plt>
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1355 <circleangle+0x235>
mov    -0x2c(%rbp),%ecx
mov    -0x8(%rbp),%rax
movslq %ecx,%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    141a <circleangle+0x2fa>
mov    -0x28(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x28(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    13e9 <circleangle+0x2c9>
mov    -0x2c(%rbp),%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<circleangle>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rdx,%rbx
mov    %esi,%r14d
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    1285 <circleangle+0x155>
movapd %xmm2,%xmm0
subsd  %xmm1,%xmm0
mov    %r13,%rdi
mov    %r14d,%esi
call   1050 <mybsearch@plt>
mov    %eax,%r15d
movsd  0x10(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
mov    %r13,%rdi
mov    %r14d,%esi
call   1050 <mybsearch@plt>
mov    %eax,%r12d
test   %r15d,%r15d
jle    12df <circleangle+0x1af>
lea    -0x1(%r15),%ecx
xor    %eax,%eax
cmp    $0x3,%ecx
jb     11ea <circleangle+0xba>
mov    0x2e20(%rip),%rdx
lea    0x8(%rdx),%rsi
cmp    %rsi,%rbx
jae    13de <circleangle+0x2ae>
lea    (%rbx,%rcx,8),%rsi
add    $0x8,%rsi
cmp    0x2e04(%rip),%rsi
jbe    13de <circleangle+0x2ae>
movsd  0x8(%rsp),%xmm2
mov    %r15d,%edx
sub    %eax,%edx
mov    %eax,%ecx
not    %ecx
add    %r15d,%ecx
and    $0x7,%edx
je     1225 <circleangle+0xf5>
neg    %edx
xor    %esi,%esi
mov    0x2ddc(%rip),%rdi
nopl   0x0(%rax)
movsd  (%rdi),%xmm0
movsd  %xmm0,(%rbx)
add    $0x8,%rbx
add    $0xffffffff,%esi
cmp    %esi,%edx
jne    1210 <circleangle+0xe0>
sub    %esi,%eax
cmp    $0x7,%ecx
jb     12e8 <circleangle+0x1b8>
mov    0x2db3(%rip),%rcx
cs nopw 0x0(%rax,%rax,1)
nop
movsd  (%rcx),%xmm0
movsd  %xmm0,(%rbx)
movsd  (%rcx),%xmm0
movsd  %xmm0,0x8(%rbx)
movsd  %xmm0,0x10(%rbx)
movsd  %xmm0,0x18(%rbx)
movsd  (%rcx),%xmm0
movsd  %xmm0,0x20(%rbx)
movsd  %xmm0,0x28(%rbx)
movsd  %xmm0,0x30(%rbx)
movsd  (%rcx),%xmm0
movsd  %xmm0,0x38(%rbx)
add    $0x40,%rbx
add    $0x8,%eax
cmp    %eax,%r15d
jne    1240 <circleangle+0x110>
jmp    12e8 <circleangle+0x1b8>
movapd %xmm1,%xmm0
subsd  %xmm2,%xmm0
mov    %r13,%rdi
mov    %r14d,%esi
call   1050 <mybsearch@plt>
mov    %eax,%r15d
movsd  0x10(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
mov    %r13,%rdi
mov    %r14d,%esi
call   1050 <mybsearch@plt>
mov    %eax,%r12d
test   %r15d,%r15d
jle    1351 <circleangle+0x221>
mov    %r15d,%edx
shl    $0x3,%rdx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
mov    %r15d,%eax
add    $0xffffffff,%eax
lea    (%rbx,%rax,8),%rbx
add    $0x8,%rbx
jmp    1354 <circleangle+0x224>
xor    %r15d,%r15d
movsd  0x8(%rsp),%xmm2
cmp    %r12d,%r15d
jge    13b2 <circleangle+0x282>
mov    %r15d,%ebp
addsd  %xmm2,%xmm2
mov    %r12d,%r15d
movsd  %xmm2,0x8(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   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,(%rbx)
add    $0x8,%rbx
add    $0x1,%rbp
cmp    %ebp,%r15d
jne    1310 <circleangle+0x1e0>
jmp    13af <circleangle+0x27f>
xor    %r15d,%r15d
movsd  0x8(%rsp),%xmm2
cmp    %r12d,%r15d
jge    13b2 <circleangle+0x282>
mov    %r15d,%ebp
addsd  %xmm2,%xmm2
mov    %r12d,%r15d
movsd  %xmm2,0x8(%rsp)
nop
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,(%rbx)
add    $0x8,%rbx
add    $0x1,%rbp
cmp    %ebp,%r15d
jne    1370 <circleangle+0x240>
mov    %r12d,%r15d
cmp    %r14d,%r15d
jge    13cf <circleangle+0x29f>
not    %r15d
add    %r14d,%r15d
lea    0x8(,%r15,8),%rdx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
add    $0x1,%rcx
mov    %rcx,%rax
and    $0xfffffffffffffffc,%rax
lea    -0x4(%rax),%rbp
mov    %rbp,%rdi
shr    $0x2,%rdi
add    $0x1,%rdi
mov    %edi,%esi
and    $0x3,%esi
cmp    $0xc,%rbp
jae    1407 <circleangle+0x2d7>
xor    %ebp,%ebp
jmp    1459 <circleangle+0x329>
and    $0xfffffffffffffffc,%rdi
movsd  (%rdx),%xmm0
unpcklpd %xmm0,%xmm0
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
movupd %xmm0,(%rbx,%rbp,8)
movupd %xmm0,0x10(%rbx,%rbp,8)
movupd %xmm0,0x20(%rbx,%rbp,8)
movupd %xmm0,0x30(%rbx,%rbp,8)
movupd %xmm0,0x40(%rbx,%rbp,8)
movupd %xmm0,0x50(%rbx,%rbp,8)
movupd %xmm0,0x60(%rbx,%rbp,8)
movupd %xmm0,0x70(%rbx,%rbp,8)
add    $0x10,%rbp
add    $0xfffffffffffffffc,%rdi
jne    1420 <circleangle+0x2f0>
test   %rsi,%rsi
je     1494 <circleangle+0x364>
movsd  (%rdx),%xmm0
unpcklpd %xmm0,%xmm0
lea    (%rbx,%rbp,8),%rdx
add    $0x10,%rdx
shl    $0x5,%rsi
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movupd %xmm0,-0x10(%rdx,%rdi,1)
movupd %xmm0,(%rdx,%rdi,1)
add    $0x20,%rdi
cmp    %rdi,%rsi
jne    1480 <circleangle+0x350>
lea    (%rbx,%rax,8),%rbx
cmp    %rax,%rcx
movsd  0x8(%rsp),%xmm2
je     12e8 <circleangle+0x1b8>
jmp    11f0 <circleangle+0xc0>

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

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