#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);
double sqrt(double);
void ellipseangle(double *r, double a, double z, int n, double *answer) {
  int i;
  if ((a <= 0.0) || (z >= 1.0)) {
    for (i = 0; i < n; i++) {
      *answer = 0.0;
      answer++;
    }
    answer -= i;
  } else if (z <= 0) {
    int bound = mybsearch(r, a, n);
    for (i = 0; i < bound; i++) {
      *answer = M_PI;
      answer++;
    }
    for (; i < n; i++) {
      *answer = 0.0;
      answer++;
    }
    answer -= i;
  } else if (a * a + z * z >= 1.0) {
    a = sqrt(1 - z * z);
    int bound = mybsearch(r, z, n);
    for (i = 0; i < bound; i++) {
      *answer = 0.0;
      answer++;
    }
    r += i;
    for (; i < n; i++) {
      *answer = acos(z / (*r));
      answer++;
      r++;
    }
    answer -= i;
    r -= i;
  } else {
    double b = a * sqrt(1.0 - z * z / (1 - a * a));
    double zsquared = z * z;
    double asquared = a * a;
    double A = zsquared / (1.0 - asquared - zsquared);
    int bound = mybsearch(r, b - z, n);
    for (i = 0; i < bound; i++) {
      *answer = M_PI;
      answer++;
    }
    bound = mybsearch(r, z - b, n);
    for (; i < bound; i++) {
      *answer = 0.0;
      answer++;
    }
    if (z < 1.0 - a * a)
      bound = mybsearch(r, z + b, n);
    else
      bound = n;
    r += i;
    for (; i < bound; i++) {
      *answer = acos(
          (z -
           (-z + sqrt(z * z - A * ((*r) * (*r) - zsquared - asquared))) / A) /
          (*r));
      answer++;
      r++;
    }
    r -= i;
    for (; i < n; i++) {
      *answer = 0.0;
      answer++;
    }
    answer -= i;
  }
  return;
}


x86 assembly (clang, -O0):
<ellipseangle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %esi,-0x1c(%rbp)
mov    %rdx,-0x28(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jae    1175 <ellipseangle+0x45>
movsd  -0x18(%rbp),%xmm0
movsd  0xe95(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     11cc <ellipseangle+0x9c>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    11ad <ellipseangle+0x7d>
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    117c <ellipseangle+0x4c>
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    1702 <ellipseangle+0x5d2>
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jb     1283 <ellipseangle+0x153>
mov    -0x8(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
mov    -0x1c(%rbp),%esi
call   1040 <mybsearch@plt>
mov    %eax,-0x30(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x30(%rbp),%eax
jge    122e <ellipseangle+0xfe>
mov    0x2de0(%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    11f5 <ellipseangle+0xc5>
jmp    1233 <ellipseangle+0x103>
mov    -0x2c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1264 <ellipseangle+0x134>
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    1233 <ellipseangle+0x103>
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    16fd <ellipseangle+0x5cd>
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xd59(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     13d2 <ellipseangle+0x2a2>
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xd22(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1050 <sqrt@plt>
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
movsd  -0x18(%rbp),%xmm0
mov    -0x1c(%rbp),%esi
call   1040 <mybsearch@plt>
mov    %eax,-0x34(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    1338 <ellipseangle+0x208>
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    1307 <ellipseangle+0x1d7>
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    -0x1c(%rbp),%eax
jge    1399 <ellipseangle+0x269>
movsd  -0x18(%rbp),%xmm0
mov    -0x8(%rbp),%rax
divsd  (%rax),%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    134d <ellipseangle+0x21d>
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)
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)
jmp    16f8 <ellipseangle+0x5c8>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x18(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
movsd  0xbed(%rip),%xmm2
addsd  %xmm2,%xmm0
divsd  %xmm0,%xmm1
movsd  0xbdd(%rip),%xmm0
subsd  %xmm1,%xmm0
call   1050 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x68(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  0xb98(%rip),%xmm1
subsd  -0x50(%rbp),%xmm1
subsd  -0x48(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x8(%rbp),%rdi
movsd  -0x40(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
mov    -0x1c(%rbp),%esi
call   1040 <mybsearch@plt>
mov    %eax,-0x5c(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x5c(%rbp),%eax
jge    14d4 <ellipseangle+0x3a4>
mov    0x2b3a(%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    149b <ellipseangle+0x36b>
mov    -0x8(%rbp),%rdi
movsd  -0x18(%rbp),%xmm0
subsd  -0x40(%rbp),%xmm0
mov    -0x1c(%rbp),%esi
call   1040 <mybsearch@plt>
mov    %eax,-0x5c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x5c(%rbp),%eax
jge    151e <ellipseangle+0x3ee>
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    14ed <ellipseangle+0x3bd>
movsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
movsd  0xab0(%rip),%xmm2
addsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jbe    157c <ellipseangle+0x44c>
mov    -0x8(%rbp),%rdi
movsd  -0x18(%rbp),%xmm0
addsd  -0x40(%rbp),%xmm0
mov    -0x1c(%rbp),%esi
call   1040 <mybsearch@plt>
mov    %eax,-0x5c(%rbp)
jmp    1582 <ellipseangle+0x452>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x5c(%rbp)
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    -0x5c(%rbp),%eax
jge    1693 <ellipseangle+0x563>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm3
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm5
movsd  -0x48(%rbp),%xmm4
movq   %xmm4,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm4
mulsd  %xmm5,%xmm3
addsd  %xmm4,%xmm3
subsd  -0x50(%rbp),%xmm3
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1050 <sqrt@plt>
movsd  -0x78(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x70(%rbp),%xmm0
addsd  %xmm2,%xmm1
divsd  -0x58(%rbp),%xmm1
subsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
divsd  (%rax),%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    1597 <ellipseangle+0x467>
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    16de <ellipseangle+0x5ae>
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    16ad <ellipseangle+0x57d>
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    16fd <ellipseangle+0x5cd>
jmp    1702 <ellipseangle+0x5d2>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ellipseangle>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %rdx,%rbx
mov    %esi,%r14d
movapd %xmm0,%xmm5
xorpd  %xmm0,%xmm0
ucomisd %xmm5,%xmm0
jae    11ed <ellipseangle+0xad>
ucomisd 0xe92(%rip),%xmm1
jae    11ed <ellipseangle+0xad>
mov    %rdi,%r15
xorpd  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jae    1202 <ellipseangle+0xc2>
movapd %xmm1,%xmm2
mulsd  %xmm1,%xmm2
movapd %xmm5,%xmm3
mulsd  %xmm5,%xmm3
movapd %xmm3,%xmm0
addsd  %xmm2,%xmm0
ucomisd 0xe5f(%rip),%xmm0
movsd  %xmm1,(%rsp)
movsd  0xe52(%rip),%xmm0
jae    127c <ellipseangle+0x13c>
movapd %xmm0,%xmm4
subsd  %xmm3,%xmm4
movapd %xmm2,0x30(%rsp)
movsd  %xmm4,0x20(%rsp)
divsd  %xmm4,%xmm2
subsd  %xmm2,%xmm0
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
movsd  %xmm3,0x8(%rsp)
jb     12db <ellipseangle+0x19b>
sqrtsd %xmm0,%xmm0
jmp    12f1 <ellipseangle+0x1b1>
test   %r14d,%r14d
jle    17a2 <ellipseangle+0x662>
mov    %r14d,%edx
shl    $0x3,%rdx
jmp    1798 <ellipseangle+0x658>
mov    %r15,%rdi
movapd %xmm5,%xmm0
mov    %r14d,%esi
call   1050 <mybsearch@plt>
test   %eax,%eax
jle    12d4 <ellipseangle+0x194>
lea    -0x1(%rax),%edx
xor    %ecx,%ecx
cmp    $0x3,%edx
jb     1461 <ellipseangle+0x321>
mov    0x2dba(%rip),%r8
lea    0x8(%r8),%rsi
cmp    %rsi,%rbx
jae    124c <ellipseangle+0x10c>
lea    (%rbx,%rdx,8),%rsi
add    $0x8,%rsi
cmp    0x2da2(%rip),%rsi
ja     1461 <ellipseangle+0x321>
add    $0x1,%rdx
mov    %rdx,%rcx
and    $0xfffffffffffffffc,%rcx
lea    -0x4(%rcx),%rsi
mov    %rsi,%rdi
shr    $0x2,%rdi
add    $0x1,%rdi
mov    %edi,%ebp
and    $0x3,%ebp
cmp    $0xc,%rsi
jae    13d0 <ellipseangle+0x290>
xor    %esi,%esi
jmp    1419 <ellipseangle+0x2d9>
subsd  %xmm2,%xmm0
xorpd  %xmm2,%xmm2
ucomisd %xmm0,%xmm2
ja     17b1 <ellipseangle+0x671>
mov    %r15,%rdi
movapd %xmm1,%xmm0
mov    %r14d,%esi
call   1050 <mybsearch@plt>
test   %eax,%eax
jle    137f <ellipseangle+0x23f>
mov    %eax,%r12d
mov    %eax,%edx
shl    $0x3,%rdx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
mov    %r12d,%eax
add    $0xffffffff,%eax
lea    (%rbx,%rax,8),%rbx
add    $0x8,%rbx
cmp    %r14d,%r12d
jl     138b <ellipseangle+0x24b>
jmp    17a2 <ellipseangle+0x662>
xor    %eax,%eax
jmp    14f0 <ellipseangle+0x3b0>
movsd  %xmm5,0x10(%rsp)
call   1060 <sqrt@plt>
movsd  0x10(%rsp),%xmm5
movsd  (%rsp),%xmm1
mulsd  %xmm5,%xmm0
movsd  %xmm0,0x10(%rsp)
subsd  %xmm1,%xmm0
mov    %r15,%rdi
mov    %r14d,%esi
call   1050 <mybsearch@plt>
test   %eax,%eax
jle    13c3 <ellipseangle+0x283>
mov    %eax,%r12d
lea    -0x1(%r12),%ecx
xor    %eax,%eax
cmp    $0x3,%ecx
movsd  (%rsp),%xmm1
jb     15a1 <ellipseangle+0x461>
mov    0x2cb7(%rip),%rdx
lea    0x8(%rdx),%rsi
cmp    %rsi,%rbx
jae    134f <ellipseangle+0x20f>
lea    (%rbx,%rcx,8),%rsi
add    $0x8,%rsi
cmp    0x2c9f(%rip),%rsi
ja     15a1 <ellipseangle+0x461>
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    150b <ellipseangle+0x3cb>
xor    %ebp,%ebp
jmp    1559 <ellipseangle+0x419>
xor    %r12d,%r12d
cmp    %r14d,%r12d
jge    17a2 <ellipseangle+0x662>
mov    %r12d,%eax
lea    (%r15,%rax,8),%r15
sub    %r12d,%r14d
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
movsd  (%rsp),%xmm0
divsd  (%r15,%rbp,8),%xmm0
call   1030 <acos@plt>
movsd  %xmm0,(%rbx,%rbp,8)
add    $0x1,%rbp
cmp    %ebp,%r14d
jne    13a0 <ellipseangle+0x260>
jmp    17a2 <ellipseangle+0x662>
xor    %r12d,%r12d
movsd  (%rsp),%xmm1
jmp    1630 <ellipseangle+0x4f0>
and    $0xfffffffffffffffc,%rdi
movsd  (%r8),%xmm0
unpcklpd %xmm0,%xmm0
xor    %esi,%esi
nop
movupd %xmm0,(%rbx,%rsi,8)
movupd %xmm0,0x10(%rbx,%rsi,8)
movupd %xmm0,0x20(%rbx,%rsi,8)
movupd %xmm0,0x30(%rbx,%rsi,8)
movupd %xmm0,0x40(%rbx,%rsi,8)
movupd %xmm0,0x50(%rbx,%rsi,8)
movupd %xmm0,0x60(%rbx,%rsi,8)
movupd %xmm0,0x70(%rbx,%rsi,8)
add    $0x10,%rsi
add    $0xfffffffffffffffc,%rdi
jne    13e0 <ellipseangle+0x2a0>
test   %rbp,%rbp
je     1454 <ellipseangle+0x314>
movsd  (%r8),%xmm0
unpcklpd %xmm0,%xmm0
lea    (%rbx,%rsi,8),%rsi
add    $0x10,%rsi
shl    $0x5,%rbp
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
nop
movupd %xmm0,-0x10(%rsi,%rdi,1)
movupd %xmm0,(%rsi,%rdi,1)
add    $0x20,%rdi
cmp    %rdi,%rbp
jne    1440 <ellipseangle+0x300>
lea    (%rbx,%rcx,8),%rbx
cmp    %rcx,%rdx
je     14f0 <ellipseangle+0x3b0>
mov    %eax,%esi
sub    %ecx,%esi
mov    %ecx,%edx
not    %edx
add    %eax,%edx
and    $0x7,%esi
je     1496 <ellipseangle+0x356>
neg    %esi
xor    %edi,%edi
mov    0x2b6d(%rip),%rbp
nopl   0x0(%rax,%rax,1)
movsd  0x0(%rbp),%xmm0
movsd  %xmm0,(%rbx)
add    $0x8,%rbx
add    $0xffffffff,%edi
cmp    %edi,%esi
jne    1480 <ellipseangle+0x340>
sub    %edi,%ecx
cmp    $0x7,%edx
jb     14f0 <ellipseangle+0x3b0>
mov    %eax,%edx
sub    %ecx,%edx
mov    0x2b42(%rip),%rcx
cs nopw 0x0(%rax,%rax,1)
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    $0xfffffff8,%edx
jne    14b0 <ellipseangle+0x370>
cmp    %r14d,%eax
jge    17a2 <ellipseangle+0x662>
not    %eax
add    %r14d,%eax
lea    0x8(,%rax,8),%rdx
jmp    1798 <ellipseangle+0x658>
and    $0xfffffffffffffffc,%rdi
movsd  (%rdx),%xmm0
unpcklpd %xmm0,%xmm0
xor    %ebp,%ebp
nopl   0x0(%rax)
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    1520 <ellipseangle+0x3e0>
test   %rsi,%rsi
je     1594 <ellipseangle+0x454>
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    1580 <ellipseangle+0x440>
lea    (%rbx,%rax,8),%rbx
cmp    %rax,%rcx
je     1630 <ellipseangle+0x4f0>
mov    %r12d,%edx
sub    %eax,%edx
mov    %eax,%ecx
not    %ecx
add    %r12d,%ecx
and    $0x7,%edx
je     15d5 <ellipseangle+0x495>
neg    %edx
xor    %esi,%esi
mov    0x2a2b(%rip),%rdi
nopl   (%rax)
movsd  (%rdi),%xmm0
movsd  %xmm0,(%rbx)
add    $0x8,%rbx
add    $0xffffffff,%esi
cmp    %esi,%edx
jne    15c0 <ellipseangle+0x480>
sub    %esi,%eax
cmp    $0x7,%ecx
jb     1630 <ellipseangle+0x4f0>
mov    %r12d,%ecx
sub    %eax,%ecx
mov    0x2a02(%rip),%rax
cs nopw 0x0(%rax,%rax,1)
movsd  (%rax),%xmm0
movsd  %xmm0,(%rbx)
movsd  (%rax),%xmm0
movsd  %xmm0,0x8(%rbx)
movsd  %xmm0,0x10(%rbx)
movsd  %xmm0,0x18(%rbx)
movsd  (%rax),%xmm0
movsd  %xmm0,0x20(%rbx)
movsd  %xmm0,0x28(%rbx)
movsd  %xmm0,0x30(%rbx)
movsd  (%rax),%xmm0
movsd  %xmm0,0x38(%rbx)
add    $0x40,%rbx
add    $0xfffffff8,%ecx
jne    15f0 <ellipseangle+0x4b0>
movapd %xmm1,%xmm0
subsd  0x10(%rsp),%xmm0
mov    %r15,%rdi
mov    %r14d,%esi
call   1050 <mybsearch@plt>
cmp    %eax,%r12d
jge    166f <ellipseangle+0x52f>
mov    %eax,%ebp
not    %r12d
add    %eax,%r12d
lea    0x8(,%r12,8),%rdx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
lea    (%rbx,%r12,8),%rbx
add    $0x8,%rbx
mov    %ebp,%r12d
movapd 0x30(%rsp),%xmm1
movsd  0x8(%rsp),%xmm2
movsd  (%rsp),%xmm4
movsd  0x20(%rsp),%xmm3
ucomisd %xmm4,%xmm3
mov    %r14d,%r13d
ja     16a2 <ellipseangle+0x562>
cmp    %r13d,%r12d
jl     16cb <ellipseangle+0x58b>
cmp    %r14d,%r12d
jl     178a <ellipseangle+0x64a>
jmp    17a2 <ellipseangle+0x662>
movsd  0x10(%rsp),%xmm0
addsd  %xmm4,%xmm0
mov    %r15,%rdi
mov    %r14d,%esi
call   1050 <mybsearch@plt>
movsd  0x8(%rsp),%xmm2
movapd 0x30(%rsp),%xmm1
mov    %eax,%r13d
cmp    %r13d,%r12d
jge    1694 <ellipseangle+0x554>
movsd  0x20(%rsp),%xmm0
subsd  %xmm1,%xmm0
movapd %xmm1,%xmm3
divsd  %xmm0,%xmm3
mov    %r12d,%ebp
movapd 0x928(%rip),%xmm0
movapd %xmm1,%xmm4
xorpd  %xmm0,%xmm4
movapd %xmm4,0x40(%rsp)
movapd %xmm3,0x20(%rsp)
xorpd  %xmm3,%xmm0
movapd %xmm0,0x10(%rsp)
mov    %r13d,%r12d
jmp    1754 <ellipseangle+0x614>
nopl   0x0(%rax,%rax,1)
call   1060 <sqrt@plt>
movsd  (%rsp),%xmm1
subsd  %xmm1,%xmm0
divsd  0x20(%rsp),%xmm0
subsd  %xmm0,%xmm1
divsd  (%r15,%rbp,8),%xmm1
movapd %xmm1,%xmm0
call   1030 <acos@plt>
movsd  %xmm0,(%rbx)
add    $0x8,%rbx
add    $0x1,%rbp
cmp    %ebp,%r12d
movapd 0x30(%rsp),%xmm1
movsd  0x8(%rsp),%xmm2
je     1782 <ellipseangle+0x642>
movsd  (%r15,%rbp,8),%xmm0
mulsd  %xmm0,%xmm0
addsd  0x40(%rsp),%xmm0
subsd  %xmm2,%xmm0
mulsd  0x10(%rsp),%xmm0
addsd  %xmm1,%xmm0
ucomisd 0x88e(%rip),%xmm0
jb     1710 <ellipseangle+0x5d0>
sqrtsd %xmm0,%xmm0
jmp    1715 <ellipseangle+0x5d5>
mov    %r13d,%r12d
cmp    %r14d,%r12d
jge    17a2 <ellipseangle+0x662>
not    %r12d
add    %r14d,%r12d
lea    0x8(,%r12,8),%rdx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
ucomisd %xmm2,%xmm0
jae    128e <ellipseangle+0x14e>
call   1060 <sqrt@plt>
movsd  (%rsp),%xmm1
jmp    128e <ellipseangle+0x14e>

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define void @ellipseangle(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
%17 = alloca double
%18 = alloca i32
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
%19 = load double, double* %7
%20 = fcmp ole double %19, 0.000000e+00
br i1 %20, label %24, label %21
21: ; preds = %5
%22 = load double, double* %8
%23 = fcmp oge double %22, 1.000000e+00
br i1 %23, label %24, label %42
24: ; preds = %21, %5
store i32 0, i32* %11
br label %25
25: ; preds = %33, %24
%26 = load i32, i32* %11
%27 = load i32, i32* %9
%28 = icmp slt i32 %26, %27
br i1 %28, label %29, label %36
29: ; preds = %25
%30 = load double*, double** %10
store double 0.000000e+00, double* %30
%31 = load double*, double** %10
%32 = getelementptr inbounds double, double* %31, i32 1
store double* %32, double** %10
br label %33
33: ; preds = %29
%34 = load i32, i32* %11
%35 = add nsw i32 %34, 1
store i32 %35, i32* %11
br label %25
36: ; preds = %25
%37 = load i32, i32* %11
%38 = load double*, double** %10
%39 = sext i32 %37 to i64
%40 = sub i64 0, %39
%41 = getelementptr inbounds double, double* %38, i64 %40
store double* %41, double** %10
br label %290
42: ; preds = %21
%43 = load double, double* %8
%44 = fcmp ole double %43, 0.000000e+00
br i1 %44, label %45, label %80
45: ; preds = %42
%46 = load double*, double** %6
%47 = load double, double* %7
%48 = load i32, i32* %9
%49 = call i32 @mybsearch(double* %46, double %47, i32 %48)
store i32 %49, i32* %12
store i32 0, i32* %11
br label %50
50: ; preds = %59, %45
%51 = load i32, i32* %11
%52 = load i32, i32* %12
%53 = icmp slt i32 %51, %52
br i1 %53, label %54, label %62
54: ; preds = %50
%55 = load double, double* @M_PI
%56 = load double*, double** %10
store double %55, double* %56
%57 = load double*, double** %10
%58 = getelementptr inbounds double, double* %57, i32 1
store double* %58, double** %10
br label %59
59: ; preds = %54
%60 = load i32, i32* %11
%61 = add nsw i32 %60, 1
store i32 %61, i32* %11
br label %50
62: ; preds = %50
br label %63
63: ; preds = %71, %62
%64 = load i32, i32* %11
%65 = load i32, i32* %9
%66 = icmp slt i32 %64, %65
br i1 %66, label %67, label %74
67: ; preds = %63
%68 = load double*, double** %10
store double 0.000000e+00, double* %68
%69 = load double*, double** %10
%70 = getelementptr inbounds double, double* %69, i32 1
store double* %70, double** %10
br label %71
71: ; preds = %67
%72 = load i32, i32* %11
%73 = add nsw i32 %72, 1
store i32 %73, i32* %11
br label %63
74: ; preds = %63
%75 = load i32, i32* %11
%76 = load double*, double** %10
%77 = sext i32 %75 to i64
%78 = sub i64 0, %77
%79 = getelementptr inbounds double, double* %76, i64 %78
store double* %79, double** %10
br label %289
80: ; preds = %42
%81 = load double, double* %7
%82 = load double, double* %7
%83 = load double, double* %8
%84 = load double, double* %8
%85 = fmul double %83, %84
%86 = call double @llvm.fmuladd.f64(double %81, double %82, double %85)
%87 = fcmp oge double %86, 1.000000e+00
br i1 %87, label %88, label %143
88: ; preds = %80
%89 = load double, double* %8
%90 = load double, double* %8
%91 = fneg double %89
%92 = call double @llvm.fmuladd.f64(double %91, double %90, double 1.000000e+00)
%93 = call double @sqrt(double %92)
store double %93, double* %7
%94 = load double*, double** %6
%95 = load double, double* %8
%96 = load i32, i32* %9
%97 = call i32 @mybsearch(double* %94, double %95, i32 %96)
store i32 %97, i32* %13
store i32 0, i32* %11
br label %98
98: ; preds = %106, %88
%99 = load i32, i32* %11
%100 = load i32, i32* %13
%101 = icmp slt i32 %99, %100
br i1 %101, label %102, label %109
102: ; preds = %98
%103 = load double*, double** %10
store double 0.000000e+00, double* %103
%104 = load double*, double** %10
%105 = getelementptr inbounds double, double* %104, i32 1
store double* %105, double** %10
br label %106
106: ; preds = %102
%107 = load i32, i32* %11
%108 = add nsw i32 %107, 1
store i32 %108, i32* %11
br label %98
109: ; preds = %98
%110 = load i32, i32* %11
%111 = load double*, double** %6
%112 = sext i32 %110 to i64
%113 = getelementptr inbounds double, double* %111, i64 %112
store double* %113, double** %6
br label %114
114: ; preds = %129, %109
%115 = load i32, i32* %11
%116 = load i32, i32* %9
%117 = icmp slt i32 %115, %116
br i1 %117, label %118, label %132
118: ; preds = %114
%119 = load double, double* %8
%120 = load double*, double** %6
%121 = load double, double* %120
%122 = fdiv double %119, %121
%123 = call double @acos(double %122)
%124 = load double*, double** %10
store double %123, double* %124
%125 = load double*, double** %10
%126 = getelementptr inbounds double, double* %125, i32 1
store double* %126, double** %10
%127 = load double*, double** %6
%128 = getelementptr inbounds double, double* %127, i32 1
store double* %128, double** %6
br label %129
129: ; preds = %118
%130 = load i32, i32* %11
%131 = add nsw i32 %130, 1
store i32 %131, i32* %11
br label %114
132: ; preds = %114
%133 = load i32, i32* %11
%134 = load double*, double** %10
%135 = sext i32 %133 to i64
%136 = sub i64 0, %135
%137 = getelementptr inbounds double, double* %134, i64 %136
store double* %137, double** %10
%138 = load i32, i32* %11
%139 = load double*, double** %6
%140 = sext i32 %138 to i64
%141 = sub i64 0, %140
%142 = getelementptr inbounds double, double* %139, i64 %141
store double* %142, double** %6
br label %288
143: ; preds = %80
%144 = load double, double* %7
%145 = load double, double* %8
%146 = load double, double* %8
%147 = fmul double %145, %146
%148 = load double, double* %7
%149 = load double, double* %7
%150 = fneg double %148
%151 = call double @llvm.fmuladd.f64(double %150, double %149, double 1.000000e+00)
%152 = fdiv double %147, %151
%153 = fsub double 1.000000e+00, %152
%154 = call double @sqrt(double %153)
%155 = fmul double %144, %154
store double %155, double* %14
%156 = load double, double* %8
%157 = load double, double* %8
%158 = fmul double %156, %157
store double %158, double* %15
%159 = load double, double* %7
%160 = load double, double* %7
%161 = fmul double %159, %160
store double %161, double* %16
%162 = load double, double* %15
%163 = load double, double* %16
%164 = fsub double 1.000000e+00, %163
%165 = load double, double* %15
%166 = fsub double %164, %165
%167 = fdiv double %162, %166
store double %167, double* %17
%168 = load double*, double** %6
%169 = load double, double* %14
%170 = load double, double* %8
%171 = fsub double %169, %170
%172 = load i32, i32* %9
%173 = call i32 @mybsearch(double* %168, double %171, i32 %172)
store i32 %173, i32* %18
store i32 0, i32* %11
br label %174
174: ; preds = %183, %143
%175 = load i32, i32* %11
%176 = load i32, i32* %18
%177 = icmp slt i32 %175, %176
br i1 %177, label %178, label %186
178: ; preds = %174
%179 = load double, double* @M_PI
%180 = load double*, double** %10
store double %179, double* %180
%181 = load double*, double** %10
%182 = getelementptr inbounds double, double* %181, i32 1
store double* %182, double** %10
br label %183
183: ; preds = %178
%184 = load i32, i32* %11
%185 = add nsw i32 %184, 1
store i32 %185, i32* %11
br label %174
186: ; preds = %174
%187 = load double*, double** %6
%188 = load double, double* %8
%189 = load double, double* %14
%190 = fsub double %188, %189
%191 = load i32, i32* %9
%192 = call i32 @mybsearch(double* %187, double %190, i32 %191)
store i32 %192, i32* %18
br label %193
193: ; preds = %201, %186
%194 = load i32, i32* %11
%195 = load i32, i32* %18
%196 = icmp slt i32 %194, %195
br i1 %196, label %197, label %204
197: ; preds = %193
%198 = load double*, double** %10
store double 0.000000e+00, double* %198
%199 = load double*, double** %10
%200 = getelementptr inbounds double, double* %199, i32 1
store double* %200, double** %10
br label %201
201: ; preds = %197
%202 = load i32, i32* %11
%203 = add nsw i32 %202, 1
store i32 %203, i32* %11
br label %193
204: ; preds = %193
%205 = load double, double* %8
%206 = load double, double* %7
%207 = load double, double* %7
%208 = fneg double %206
%209 = call double @llvm.fmuladd.f64(double %208, double %207, double 1.000000e+00)
%210 = fcmp olt double %205, %209
br i1 %210, label %211, label %218
211: ; preds = %204
%212 = load double*, double** %6
%213 = load double, double* %8
%214 = load double, double* %14
%215 = fadd double %213, %214
%216 = load i32, i32* %9
%217 = call i32 @mybsearch(double* %212, double %215, i32 %216)
store i32 %217, i32* %18
br label %220
218: ; preds = %204
%219 = load i32, i32* %9
store i32 %219, i32* %18
br label %220
220: ; preds = %218, %211
%221 = load i32, i32* %11
%222 = load double*, double** %6
%223 = sext i32 %221 to i64
%224 = getelementptr inbounds double, double* %222, i64 %223
store double* %224, double** %6
br label %225
225: ; preds = %262, %220
%226 = load i32, i32* %11
%227 = load i32, i32* %18
%228 = icmp slt i32 %226, %227
br i1 %228, label %229, label %265
229: ; preds = %225
%230 = load double, double* %8
%231 = load double, double* %8
%232 = fneg double %231
%233 = load double, double* %8
%234 = load double, double* %8
%235 = load double, double* %17
%236 = load double*, double** %6
%237 = load double, double* %236
%238 = load double*, double** %6
%239 = load double, double* %238
%240 = load double, double* %15
%241 = fneg double %240
%242 = call double @llvm.fmuladd.f64(double %237, double %239, double %241)
%243 = load double, double* %16
%244 = fsub double %242, %243
%245 = fmul double %235, %244
%246 = fneg double %245
%247 = call double @llvm.fmuladd.f64(double %233, double %234, double %246)
%248 = call double @sqrt(double %247)
%249 = fadd double %232, %248
%250 = load double, double* %17
%251 = fdiv double %249, %250
%252 = fsub double %230, %251
%253 = load double*, double** %6
%254 = load double, double* %253
%255 = fdiv double %252, %254
%256 = call double @acos(double %255)
%257 = load double*, double** %10
store double %256, double* %257
%258 = load double*, double** %10
%259 = getelementptr inbounds double, double* %258, i32 1
store double* %259, double** %10
%260 = load double*, double** %6
%261 = getelementptr inbounds double, double* %260, i32 1
store double* %261, double** %6
br label %262
262: ; preds = %229
%263 = load i32, i32* %11
%264 = add nsw i32 %263, 1
store i32 %264, i32* %11
br label %225
265: ; preds = %225
%266 = load i32, i32* %11
%267 = load double*, double** %6
%268 = sext i32 %266 to i64
%269 = sub i64 0, %268
%270 = getelementptr inbounds double, double* %267, i64 %269
store double* %270, double** %6
br label %271
271: ; preds = %279, %265
%272 = load i32, i32* %11
%273 = load i32, i32* %9
%274 = icmp slt i32 %272, %273
br i1 %274, label %275, label %282
275: ; preds = %271
%276 = load double*, double** %10
store double 0.000000e+00, double* %276
%277 = load double*, double** %10
%278 = getelementptr inbounds double, double* %277, i32 1
store double* %278, double** %10
br label %279
279: ; preds = %275
%280 = load i32, i32* %11
%281 = add nsw i32 %280, 1
store i32 %281, i32* %11
br label %271
282: ; preds = %271
%283 = load i32, i32* %11
%284 = load double*, double** %10
%285 = sext i32 %283 to i64
%286 = sub i64 0, %285
%287 = getelementptr inbounds double, double* %284, i64 %286
store double* %287, double** %10
br label %288
288: ; preds = %282, %132
br label %289
289: ; preds = %288, %74
br label %290
290: ; preds = %289, %36
ret void
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define void @ellipseangle(double* %0, double %1, double %2, i32 %3, double* nocapture writeonly %4) {
%6 = bitcast double* %4 to i8*
%7 = fcmp ole double %1, 0.000000e+00
%8 = fcmp oge double %2, 1.000000e+00
%9 = or i1 %7, %8
br i1 %9, label %10, label %15
10: ; preds = %5
%11 = icmp sgt i32 %3, 0
br i1 %11, label %12, label %407
12: ; preds = %10
%13 = zext i32 %3 to i64
%14 = shl nuw nsw i64 %13, 3
br label %407
15: ; preds = %5
%16 = fcmp ugt double %2, 0.000000e+00
br i1 %16, label %162, label %17
17: ; preds = %15
%18 = tail call i32 @mybsearch(double* %0, double %1, i32 %3)
%19 = icmp sgt i32 %18, 0
br i1 %19, label %20, label %135
20: ; preds = %17
%21 = add i32 %18, -1
%22 = zext i32 %21 to i64
%23 = add nuw nsw i64 %22, 1
%24 = icmp ult i32 %21, 3
br i1 %24, label %110, label %25
25: ; preds = %20
%26 = add i32 %18, -1
%27 = zext i32 %26 to i64
%28 = add nuw nsw i64 %27, 1
%29 = getelementptr double, double* %4, i64 %28
%30 = icmp ult double* %4, getelementptr inbounds (double, double* @M_PI, i64 1)
%31 = icmp ugt double* %29, @M_PI
%32 = and i1 %30, %31
br i1 %32, label %110, label %33
33: ; preds = %25
%34 = and i64 %23, 8589934588
%35 = getelementptr double, double* %4, i64 %34
%36 = trunc i64 %34 to i32
%37 = add nsw i64 %34, -4
%38 = lshr exact i64 %37, 2
%39 = add nuw nsw i64 %38, 1
%40 = and i64 %39, 3
%41 = icmp ult i64 %37, 12
br i1 %41, label %89, label %42
42: ; preds = %33
%43 = and i64 %39, 9223372036854775804
%44 = load double, double* @M_PI
%45 = insertelement <2 x double> poison, double %44, i64 0
%46 = shufflevector <2 x double> %45, <2 x double> poison, <2 x i32> zeroinitializer
%47 = insertelement <2 x double> poison, double %44, i64 0
%48 = shufflevector <2 x double> %47, <2 x double> poison, <2 x i32> zeroinitializer
%49 = load double, double* @M_PI
%50 = insertelement <2 x double> poison, double %49, i64 0
%51 = shufflevector <2 x double> %50, <2 x double> poison, <2 x i32> zeroinitializer
%52 = insertelement <2 x double> poison, double %49, i64 0
%53 = shufflevector <2 x double> %52, <2 x double> poison, <2 x i32> zeroinitializer
%54 = load double, double* @M_PI
%55 = insertelement <2 x double> poison, double %54, i64 0
%56 = shufflevector <2 x double> %55, <2 x double> poison, <2 x i32> zeroinitializer
%57 = insertelement <2 x double> poison, double %54, i64 0
%58 = shufflevector <2 x double> %57, <2 x double> poison, <2 x i32> zeroinitializer
%59 = load double, double* @M_PI
%60 = insertelement <2 x double> poison, double %59, i64 0
%61 = shufflevector <2 x double> %60, <2 x double> poison, <2 x i32> zeroinitializer
%62 = insertelement <2 x double> poison, double %59, i64 0
%63 = shufflevector <2 x double> %62, <2 x double> poison, <2 x i32> zeroinitializer
br label %64
64: ; preds = %64, %42
%65 = phi i64 [ 0, %42 ], [ %86, %64 ]
%66 = phi i64 [ 0, %42 ], [ %87, %64 ]
%67 = getelementptr double, double* %4, i64 %65
%68 = bitcast double* %67 to <2 x double>*
store <2 x double> %46, <2 x double>* %68
%69 = getelementptr double, double* %67, i64 2
%70 = bitcast double* %69 to <2 x double>*
store <2 x double> %48, <2 x double>* %70
%71 = or i64 %65, 4
%72 = getelementptr double, double* %4, i64 %71
%73 = bitcast double* %72 to <2 x double>*
store <2 x double> %51, <2 x double>* %73
%74 = getelementptr double, double* %72, i64 2
%75 = bitcast double* %74 to <2 x double>*
store <2 x double> %53, <2 x double>* %75
%76 = or i64 %65, 8
%77 = getelementptr double, double* %4, i64 %76
%78 = bitcast double* %77 to <2 x double>*
store <2 x double> %56, <2 x double>* %78
%79 = getelementptr double, double* %77, i64 2
%80 = bitcast double* %79 to <2 x double>*
store <2 x double> %58, <2 x double>* %80
%81 = or i64 %65, 12
%82 = getelementptr double, double* %4, i64 %81
%83 = bitcast double* %82 to <2 x double>*
store <2 x double> %61, <2 x double>* %83
%84 = getelementptr double, double* %82, i64 2
%85 = bitcast double* %84 to <2 x double>*
store <2 x double> %63, <2 x double>* %85
%86 = add nuw i64 %65, 16
%87 = add nuw i64 %66, 4
%88 = icmp eq i64 %87, %43
br i1 %88, label %89, label %64
89: ; preds = %64, %33
%90 = phi i64 [ 0, %33 ], [ %86, %64 ]
%91 = icmp eq i64 %40, 0
br i1 %91, label %108, label %92
92: ; preds = %89
%93 = load double, double* @M_PI
%94 = insertelement <2 x double> poison, double %93, i64 0
%95 = shufflevector <2 x double> %94, <2 x double> poison, <2 x i32> zeroinitializer
%96 = insertelement <2 x double> poison, double %93, i64 0
%97 = shufflevector <2 x double> %96, <2 x double> poison, <2 x i32> zeroinitializer
br label %98
98: ; preds = %98, %92
%99 = phi i64 [ %90, %92 ], [ %105, %98 ]
%100 = phi i64 [ 0, %92 ], [ %106, %98 ]
%101 = getelementptr double, double* %4, i64 %99
%102 = bitcast double* %101 to <2 x double>*
store <2 x double> %95, <2 x double>* %102
%103 = getelementptr double, double* %101, i64 2
%104 = bitcast double* %103 to <2 x double>*
store <2 x double> %97, <2 x double>* %104
%105 = add nuw i64 %99, 4
%106 = add i64 %100, 1
%107 = icmp eq i64 %106, %40
br i1 %107, label %108, label %98
108: ; preds = %98, %89
%109 = icmp eq i64 %23, %34
br i1 %109, label %132, label %110
110: ; preds = %25, %20, %108
%111 = phi double* [ %4, %25 ], [ %4, %20 ], [ %35, %108 ]
%112 = phi i32 [ 0, %25 ], [ 0, %20 ], [ %36, %108 ]
%113 = sub i32 %18, %112
%114 = xor i32 %112, -1
%115 = add i32 %18, %114
%116 = and i32 %113, 7
%117 = icmp eq i32 %116, 0
br i1 %117, label %127, label %118
118: ; preds = %110, %118
%119 = phi double* [ %123, %118 ], [ %111, %110 ]
%120 = phi i32 [ %124, %118 ], [ %112, %110 ]
%121 = phi i32 [ %125, %118 ], [ 0, %110 ]
%122 = load double, double* @M_PI
store double %122, double* %119
%123 = getelementptr inbounds double, double* %119, i64 1
%124 = add nuw nsw i32 %120, 1
%125 = add i32 %121, 1
%126 = icmp eq i32 %125, %116
br i1 %126, label %127, label %118
127: ; preds = %118, %110
%128 = phi double* [ undef, %110 ], [ %123, %118 ]
%129 = phi double* [ %111, %110 ], [ %123, %118 ]
%130 = phi i32 [ %112, %110 ], [ %124, %118 ]
%131 = icmp ult i32 %115, 7
br i1 %131, label %132, label %145
132: ; preds = %127, %145, %108
%133 = phi double* [ %35, %108 ], [ %128, %127 ], [ %159, %145 ]
%134 = bitcast double* %133 to i8*
br label %135
135: ; preds = %132, %17
%136 = phi i8* [ %134, %132 ], [ %6, %17 ]
%137 = phi i32 [ %18, %132 ], [ 0, %17 ]
%138 = icmp slt i32 %137, %3
br i1 %138, label %139, label %407
139: ; preds = %135
%140 = xor i32 %137, -1
%141 = add i32 %140, %3
%142 = zext i32 %141 to i64
%143 = shl nuw nsw i64 %142, 3
%144 = add nuw nsw i64 %143, 8
br label %407
145: ; preds = %127, %145
%146 = phi double* [ %159, %145 ], [ %129, %127 ]
%147 = phi i32 [ %160, %145 ], [ %130, %127 ]
%148 = load double, double* @M_PI
store double %148, double* %146
%149 = getelementptr inbounds double, double* %146, i64 1
%150 = load double, double* @M_PI
store double %150, double* %149
%151 = getelementptr inbounds double, double* %146, i64 2
store double %150, double* %151
%152 = getelementptr inbounds double, double* %146, i64 3
store double %150, double* %152
%153 = getelementptr inbounds double, double* %146, i64 4
%154 = load double, double* @M_PI
store double %154, double* %153
%155 = getelementptr inbounds double, double* %146, i64 5
store double %154, double* %155
%156 = getelementptr inbounds double, double* %146, i64 6
store double %154, double* %156
%157 = getelementptr inbounds double, double* %146, i64 7
%158 = load double, double* @M_PI
store double %158, double* %157
%159 = getelementptr inbounds double, double* %146, i64 8
%160 = add nuw nsw i32 %147, 8
%161 = icmp eq i32 %160, %18
br i1 %161, label %132, label %145
162: ; preds = %15
%163 = fmul double %2, %2
%164 = tail call double @llvm.fmuladd.f64(double %1, double %1, double %163)
%165 = fcmp ult double %164, 1.000000e+00
br i1 %165, label %200, label %166
166: ; preds = %162
%167 = fneg double %2
%168 = tail call double @llvm.fmuladd.f64(double %167, double %2, double 1.000000e+00)
%169 = fcmp olt double %168, 0.000000e+00
br i1 %169, label %170, label %172
170: ; preds = %166
%171 = tail call double @sqrt(double %168)
br label %172
172: ; preds = %166, %170
%173 = tail call i32 @mybsearch(double* %0, double %2, i32 %3)
%174 = icmp sgt i32 %173, 0
br i1 %174, label %175, label %182
175: ; preds = %172
%176 = zext i32 %173 to i64
%177 = shl nuw nsw i64 %176, 3
%178 = add nsw i32 %173, -1
%179 = zext i32 %178 to i64
%180 = add nuw nsw i64 %179, 1
%181 = getelementptr double, double* %4, i64 %180
br label %182
182: ; preds = %172, %175
%183 = phi i32 [ %173, %175 ], [ 0, %172 ]
%184 = phi double* [ %181, %175 ], [ %4, %172 ]
%185 = icmp slt i32 %183, %3
br i1 %185, label %186, label %407
186: ; preds = %182
%187 = zext i32 %183 to i64
%188 = getelementptr inbounds double, double* %0, i64 %187
br label %189
189: ; preds = %186, %189
%190 = phi double* [ %197, %189 ], [ %188, %186 ]
%191 = phi double* [ %196, %189 ], [ %184, %186 ]
%192 = phi i32 [ %198, %189 ], [ %183, %186 ]
%193 = load double, double* %190
%194 = fdiv double %2, %193
%195 = tail call double @acos(double %194)
store double %195, double* %191
%196 = getelementptr inbounds double, double* %191, i64 1
%197 = getelementptr inbounds double, double* %190, i64 1
%198 = add nuw nsw i32 %192, 1
%199 = icmp eq i32 %198, %3
br i1 %199, label %407, label %189
200: ; preds = %162
%201 = fneg double %1
%202 = tail call double @llvm.fmuladd.f64(double %201, double %1, double 1.000000e+00)
%203 = fdiv double %163, %202
%204 = fsub double 1.000000e+00, %203
%205 = tail call double @sqrt(double %204)
%206 = fmul double %205, %1
%207 = fmul double %1, %1
%208 = fsub double 1.000000e+00, %207
%209 = fsub double %208, %163
%210 = fdiv double %163, %209
%211 = fsub double %206, %2
%212 = tail call i32 @mybsearch(double* %0, double %211, i32 %3)
%213 = icmp sgt i32 %212, 0
br i1 %213, label %214, label %346
214: ; preds = %200
%215 = add i32 %212, -1
%216 = zext i32 %215 to i64
%217 = add nuw nsw i64 %216, 1
%218 = icmp ult i32 %215, 3
br i1 %218, label %304, label %219
219: ; preds = %214
%220 = add i32 %212, -1
%221 = zext i32 %220 to i64
%222 = add nuw nsw i64 %221, 1
%223 = getelementptr double, double* %4, i64 %222
%224 = icmp ult double* %4, getelementptr inbounds (double, double* @M_PI, i64 1)
%225 = icmp ugt double* %223, @M_PI
%226 = and i1 %224, %225
br i1 %226, label %304, label %227
227: ; preds = %219
%228 = and i64 %217, 8589934588
%229 = getelementptr double, double* %4, i64 %228
%230 = trunc i64 %228 to i32
%231 = add nsw i64 %228, -4
%232 = lshr exact i64 %231, 2
%233 = add nuw nsw i64 %232, 1
%234 = and i64 %233, 3
%235 = icmp ult i64 %231, 12
br i1 %235, label %283, label %236
236: ; preds = %227
%237 = and i64 %233, 9223372036854775804
%238 = load double, double* @M_PI
%239 = insertelement <2 x double> poison, double %238, i64 0
%240 = shufflevector <2 x double> %239, <2 x double> poison, <2 x i32> zeroinitializer
%241 = insertelement <2 x double> poison, double %238, i64 0
%242 = shufflevector <2 x double> %241, <2 x double> poison, <2 x i32> zeroinitializer
%243 = load double, double* @M_PI
%244 = insertelement <2 x double> poison, double %243, i64 0
%245 = shufflevector <2 x double> %244, <2 x double> poison, <2 x i32> zeroinitializer
%246 = insertelement <2 x double> poison, double %243, i64 0
%247 = shufflevector <2 x double> %246, <2 x double> poison, <2 x i32> zeroinitializer
%248 = load double, double* @M_PI
%249 = insertelement <2 x double> poison, double %248, i64 0
%250 = shufflevector <2 x double> %249, <2 x double> poison, <2 x i32> zeroinitializer
%251 = insertelement <2 x double> poison, double %248, i64 0
%252 = shufflevector <2 x double> %251, <2 x double> poison, <2 x i32> zeroinitializer
%253 = load double, double* @M_PI
%254 = insertelement <2 x double> poison, double %253, i64 0
%255 = shufflevector <2 x double> %254, <2 x double> poison, <2 x i32> zeroinitializer
%256 = insertelement <2 x double> poison, double %253, i64 0
%257 = shufflevector <2 x double> %256, <2 x double> poison, <2 x i32> zeroinitializer
br label %258
258: ; preds = %258, %236
%259 = phi i64 [ 0, %236 ], [ %280, %258 ]
%260 = phi i64 [ 0, %236 ], [ %281, %258 ]
%261 = getelementptr double, double* %4, i64 %259
%262 = bitcast double* %261 to <2 x double>*
store <2 x double> %240, <2 x double>* %262
%263 = getelementptr double, double* %261, i64 2
%264 = bitcast double* %263 to <2 x double>*
store <2 x double> %242, <2 x double>* %264
%265 = or i64 %259, 4
%266 = getelementptr double, double* %4, i64 %265
%267 = bitcast double* %266 to <2 x double>*
store <2 x double> %245, <2 x double>* %267
%268 = getelementptr double, double* %266, i64 2
%269 = bitcast double* %268 to <2 x double>*
store <2 x double> %247, <2 x double>* %269
%270 = or i64 %259, 8
%271 = getelementptr double, double* %4, i64 %270
%272 = bitcast double* %271 to <2 x double>*
store <2 x double> %250, <2 x double>* %272
%273 = getelementptr double, double* %271, i64 2
%274 = bitcast double* %273 to <2 x double>*
store <2 x double> %252, <2 x double>* %274
%275 = or i64 %259, 12
%276 = getelementptr double, double* %4, i64 %275
%277 = bitcast double* %276 to <2 x double>*
store <2 x double> %255, <2 x double>* %277
%278 = getelementptr double, double* %276, i64 2
%279 = bitcast double* %278 to <2 x double>*
store <2 x double> %257, <2 x double>* %279
%280 = add nuw i64 %259, 16
%281 = add nuw i64 %260, 4
%282 = icmp eq i64 %281, %237
br i1 %282, label %283, label %258
283: ; preds = %258, %227
%284 = phi i64 [ 0, %227 ], [ %280, %258 ]
%285 = icmp eq i64 %234, 0
br i1 %285, label %302, label %286
286: ; preds = %283
%287 = load double, double* @M_PI
%288 = insertelement <2 x double> poison, double %287, i64 0
%289 = shufflevector <2 x double> %288, <2 x double> poison, <2 x i32> zeroinitializer
%290 = insertelement <2 x double> poison, double %287, i64 0
%291 = shufflevector <2 x double> %290, <2 x double> poison, <2 x i32> zeroinitializer
br label %292
292: ; preds = %292, %286
%293 = phi i64 [ %284, %286 ], [ %299, %292 ]
%294 = phi i64 [ 0, %286 ], [ %300, %292 ]
%295 = getelementptr double, double* %4, i64 %293
%296 = bitcast double* %295 to <2 x double>*
store <2 x double> %289, <2 x double>* %296
%297 = getelementptr double, double* %295, i64 2
%298 = bitcast double* %297 to <2 x double>*
store <2 x double> %291, <2 x double>* %298
%299 = add nuw i64 %293, 4
%300 = add i64 %294, 1
%301 = icmp eq i64 %300, %234
br i1 %301, label %302, label %292
302: ; preds = %292, %283
%303 = icmp eq i64 %217, %228
br i1 %303, label %343, label %304
304: ; preds = %219, %214, %302
%305 = phi double* [ %4, %219 ], [ %4, %214 ], [ %229, %302 ]
%306 = phi i32 [ 0, %219 ], [ 0, %214 ], [ %230, %302 ]
%307 = sub i32 %212, %306
%308 = xor i32 %306, -1
%309 = add i32 %212, %308
%310 = and i32 %307, 7
%311 = icmp eq i32 %310, 0
br i1 %311, label %321, label %312
312: ; preds = %304, %312
%313 = phi double* [ %317, %312 ], [ %305, %304 ]
%314 = phi i32 [ %318, %312 ], [ %306, %304 ]
%315 = phi i32 [ %319, %312 ], [ 0, %304 ]
%316 = load double, double* @M_PI
store double %316, double* %313
%317 = getelementptr inbounds double, double* %313, i64 1
%318 = add nuw nsw i32 %314, 1
%319 = add i32 %315, 1
%320 = icmp eq i32 %319, %310
br i1 %320, label %321, label %312
321: ; preds = %312, %304
%322 = phi double* [ undef, %304 ], [ %317, %312 ]
%323 = phi double* [ %305, %304 ], [ %317, %312 ]
%324 = phi i32 [ %306, %304 ], [ %318, %312 ]
%325 = icmp ult i32 %309, 7
br i1 %325, label %343, label %326
326: ; preds = %321, %326
%327 = phi double* [ %340, %326 ], [ %323, %321 ]
%328 = phi i32 [ %341, %326 ], [ %324, %321 ]
%329 = load double, double* @M_PI
store double %329, double* %327
%330 = getelementptr inbounds double, double* %327, i64 1
%331 = load double, double* @M_PI
store double %331, double* %330
%332 = getelementptr inbounds double, double* %327, i64 2
store double %331, double* %332
%333 = getelementptr inbounds double, double* %327, i64 3
store double %331, double* %333
%334 = getelementptr inbounds double, double* %327, i64 4
%335 = load double, double* @M_PI
store double %335, double* %334
%336 = getelementptr inbounds double, double* %327, i64 5
store double %335, double* %336
%337 = getelementptr inbounds double, double* %327, i64 6
store double %335, double* %337
%338 = getelementptr inbounds double, double* %327, i64 7
%339 = load double, double* @M_PI
store double %339, double* %338
%340 = getelementptr inbounds double, double* %327, i64 8
%341 = add nuw nsw i32 %328, 8
%342 = icmp eq i32 %341, %212
br i1 %342, label %343, label %326
343: ; preds = %321, %326, %302
%344 = phi double* [ %229, %302 ], [ %322, %321 ], [ %340, %326 ]
%345 = bitcast double* %344 to i8*
br label %346
346: ; preds = %343, %200
%347 = phi i8* [ %345, %343 ], [ %6, %200 ]
%348 = phi i32 [ %212, %343 ], [ 0, %200 ]
%349 = phi double* [ %344, %343 ], [ %4, %200 ]
%350 = fsub double %2, %206
%351 = tail call i32 @mybsearch(double* %0, double %350, i32 %3)
%352 = icmp slt i32 %348, %351
br i1 %352, label %353, label %361
353: ; preds = %346
%354 = xor i32 %348, -1
%355 = add i32 %351, %354
%356 = zext i32 %355 to i64
%357 = shl nuw nsw i64 %356, 3
%358 = add nuw nsw i64 %357, 8
%359 = add nuw nsw i64 %356, 1
%360 = getelementptr double, double* %349, i64 %359
br label %361
361: ; preds = %353, %346
%362 = phi i32 [ %348, %346 ], [ %351, %353 ]
%363 = phi double* [ %349, %346 ], [ %360, %353 ]
%364 = fcmp ogt double %202, %2
br i1 %364, label %365, label %368
365: ; preds = %361
%366 = fadd double %206, %2
%367 = tail call i32 @mybsearch(double* %0, double %366, i32 %3)
br label %368
368: ; preds = %361, %365
%369 = phi i32 [ %367, %365 ], [ %3, %361 ]
%370 = icmp slt i32 %362, %369
br i1 %370, label %371, label %376
371: ; preds = %368
%372 = zext i32 %362 to i64
%373 = getelementptr inbounds double, double* %0, i64 %372
%374 = fneg double %163
%375 = fneg double %210
br label %387
376: ; preds = %387, %368
%377 = phi i32 [ %362, %368 ], [ %369, %387 ]
%378 = phi double* [ %363, %368 ], [ %403, %387 ]
%379 = icmp slt i32 %377, %3
br i1 %379, label %380, label %407
380: ; preds = %376
%381 = bitcast double* %378 to i8*
%382 = xor i32 %377, -1
%383 = add i32 %382, %3
%384 = zext i32 %383 to i64
%385 = shl nuw nsw i64 %384, 3
%386 = add nuw nsw i64 %385, 8
br label %407
387: ; preds = %371, %387
%388 = phi double* [ %373, %371 ], [ %404, %387 ]
%389 = phi double* [ %363, %371 ], [ %403, %387 ]
%390 = phi i32 [ %362, %371 ], [ %405, %387 ]
%391 = load double, double* %388
%392 = tail call double @llvm.fmuladd.f64(double %391, double %391, double %374)
%393 = fsub double %392, %207
%394 = fmul double %393, %375
%395 = tail call double @llvm.fmuladd.f64(double %2, double %2, double %394)
%396 = tail call double @sqrt(double %395)
%397 = fsub double %396, %2
%398 = fdiv double %397, %210
%399 = fsub double %2, %398
%400 = load double, double* %388
%401 = fdiv double %399, %400
%402 = tail call double @acos(double %401)
store double %402, double* %389
%403 = getelementptr inbounds double, double* %389, i64 1
%404 = getelementptr inbounds double, double* %388, i64 1
%405 = add nuw nsw i32 %390, 1
%406 = icmp eq i32 %405, %369
br i1 %406, label %376, label %387
407: ; preds = %189, %139, %380, %12, %135, %182, %376, %10
ret void
}