#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double acos(double);
double asin(double);
double cos(double);
double ellipse2tr(double, double, double, double, double, double, double,
                  double);
double fabs(double);
double sin(double);
double twointpts(double x[], double y[], double A1, double B1, double PHI_1,
                 double A2, double B2, double H2_TR, double K2_TR, double PHI_2,
                 double AA, double BB, double CC, double DD, double EE,
                 double FF, int *rtnCode) {
  double area1, area2;
  double xmid, ymid, xmid_rt, ymid_rt;
  double theta1, theta2;
  double tmp, trsign;
  double x1_tr, y1_tr, x2_tr, y2_tr;
  double discr;
  double cosphi, sinphi;
  if (fabs(x[1]) > A1)
    x[1] = (x[1] < 0) ? -A1 : A1;
  if (y[1] < 0.0)
    theta1 = (2.0 * (2.0 * asin(1.0))) - acos(x[1] / A1);
  else
    theta1 = acos(x[1] / A1);
  if (fabs(x[2]) > A1)
    x[2] = (x[2] < 0) ? -A1 : A1;
  if (y[2] < 0.0)
    theta2 = (2.0 * (2.0 * asin(1.0))) - acos(x[2] / A1);
  else
    theta2 = acos(x[2] / A1);
  if (theta1 > theta2) {
    tmp = theta1;
    theta1 = theta2;
    theta2 = tmp;
  }
  xmid = A1 * cos((theta1 + theta2) / 2.0);
  ymid = B1 * sin((theta1 + theta2) / 2.0);
  if (ellipse2tr(xmid, ymid, AA, BB, CC, DD, EE, FF) > 0.0) {
    tmp = theta1;
    theta1 = theta2;
    theta2 = tmp;
  }
  if (theta1 > theta2)
    theta1 -= (2.0 * (2.0 * asin(1.0)));
  if ((theta2 - theta1) > (2.0 * asin(1.0)))
    trsign = 1.0;
  else
    trsign = -1.0;
  area1 = 0.5 * (A1 * B1 * (theta2 - theta1) +
                 trsign * fabs(x[1] * y[2] - x[2] * y[1]));
  cosphi = cos(PHI_1 - PHI_2);
  sinphi = sin(PHI_1 - PHI_2);
  x1_tr = (x[1] - H2_TR) * cosphi + (y[1] - K2_TR) * -sinphi;
  y1_tr = (x[1] - H2_TR) * sinphi + (y[1] - K2_TR) * cosphi;
  x2_tr = (x[2] - H2_TR) * cosphi + (y[2] - K2_TR) * -sinphi;
  y2_tr = (x[2] - H2_TR) * sinphi + (y[2] - K2_TR) * cosphi;
  if (fabs(x1_tr) > A2)
    x1_tr = (x1_tr < 0) ? -A2 : A2;
  if (y1_tr < 0.0)
    theta1 = (2.0 * (2.0 * asin(1.0))) - acos(x1_tr / A2);
  else
    theta1 = acos(x1_tr / A2);
  if (fabs(x2_tr) > A2)
    x2_tr = (x2_tr < 0) ? -A2 : A2;
  if (y2_tr < 0.0)
    theta2 = (2.0 * (2.0 * asin(1.0))) - acos(x2_tr / A2);
  else
    theta2 = acos(x2_tr / A2);
  if (theta1 > theta2) {
    tmp = theta1;
    theta1 = theta2;
    theta2 = tmp;
  }
  xmid = A2 * cos((theta1 + theta2) / 2.0);
  ymid = B2 * sin((theta1 + theta2) / 2.0);
  cosphi = cos(PHI_2 - PHI_1);
  sinphi = sin(PHI_2 - PHI_1);
  xmid_rt = xmid * cosphi + ymid * -sinphi + H2_TR;
  ymid_rt = xmid * sinphi + ymid * cosphi + K2_TR;
  if (((xmid_rt * xmid_rt) / (A1 * A1) + (ymid_rt * ymid_rt) / (B1 * B1)) >
      1.0) {
    tmp = theta1;
    theta1 = theta2;
    theta2 = tmp;
  }
  if (theta1 > theta2)
    theta1 -= (2.0 * (2.0 * asin(1.0)));
  if ((theta2 - theta1) > (2.0 * asin(1.0)))
    trsign = 1.0;
  else
    trsign = -1.0;
  area2 = 0.5 * (A2 * B2 * (theta2 - theta1) +
                 trsign * fabs(x1_tr * y2_tr - x2_tr * y1_tr));
  (*rtnCode) = 107;
  return area1 + area2;
}


x86 assembly (clang, -O0):
<twointpts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x150,%rsp
movsd  0x38(%rbp),%xmm8
movsd  0x30(%rbp),%xmm8
movsd  0x28(%rbp),%xmm8
movsd  0x20(%rbp),%xmm8
movsd  0x18(%rbp),%xmm8
movsd  0x10(%rbp),%xmm8
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
movsd  %xmm2,-0x28(%rbp)
movsd  %xmm3,-0x30(%rbp)
movsd  %xmm4,-0x38(%rbp)
movsd  %xmm5,-0x40(%rbp)
movsd  %xmm6,-0x48(%rbp)
movsd  %xmm7,-0x50(%rbp)
mov    %rdx,-0x58(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movaps 0xe3d(%rip),%xmm1
pand   %xmm1,%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    122b <twointpts+0xdb>
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
ucomisd 0x8(%rax),%xmm0
jbe    120d <twointpts+0xbd>
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
jmp    121a <twointpts+0xca>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0xe8(%rbp),%xmm0
ff
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
ucomisd 0x8(%rax),%xmm0
jbe    12ab <twointpts+0x15b>
movsd  0xdd3(%rip),%xmm0
call   1050 <asin@plt>
movaps %xmm0,%xmm1
movsd  0xdbb(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
divsd  -0x18(%rbp),%xmm0
call   1030 <acos@plt>
movaps %xmm0,%xmm1
movsd  -0xf0(%rbp),%xmm0
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
jmp    12c6 <twointpts+0x176>
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
divsd  -0x18(%rbp),%xmm0
call   1030 <acos@plt>
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
movaps 0xd2a(%rip),%xmm1
pand   %xmm1,%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    133e <twointpts+0x1ee>
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
ucomisd 0x10(%rax),%xmm0
jbe    1320 <twointpts+0x1d0>
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
jmp    132d <twointpts+0x1dd>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0xf8(%rbp),%xmm0
ff
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
ucomisd 0x10(%rax),%xmm0
jbe    13be <twointpts+0x26e>
movsd  0xcc0(%rip),%xmm0
call   1050 <asin@plt>
movaps %xmm0,%xmm1
movsd  0xca8(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
divsd  -0x18(%rbp),%xmm0
call   1030 <acos@plt>
movaps %xmm0,%xmm1
movsd  -0x100(%rbp),%xmm0
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
jmp    13d9 <twointpts+0x289>
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
divsd  -0x18(%rbp),%xmm0
call   1030 <acos@plt>
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
ucomisd -0x98(%rbp),%xmm0
ff
jbe    141f <twointpts+0x2cf>
movsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
addsd  -0x98(%rbp),%xmm0
ff
movsd  0xbcc(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1070 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x110(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
addsd  -0x98(%rbp),%xmm0
ff
movsd  0xb8a(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x108(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm1
movsd  0x10(%rbp),%xmm2
movsd  0x18(%rbp),%xmm3
movsd  0x20(%rbp),%xmm4
movsd  0x28(%rbp),%xmm5
movsd  0x30(%rbp),%xmm6
movsd  0x38(%rbp),%xmm7
call   1060 <ellipse2tr@plt>
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    150d <twointpts+0x3bd>
movsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
ucomisd -0x98(%rbp),%xmm0
ff
jbe    1554 <twointpts+0x404>
movsd  0xaed(%rip),%xmm0
call   1050 <asin@plt>
movsd  0xad8(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  -0x90(%rbp),%xmm0
ff
addsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
subsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x118(%rbp)
ff
movsd  0xaa4(%rip),%xmm0
call   1050 <asin@plt>
movaps %xmm0,%xmm2
movsd  -0x118(%rbp),%xmm0
ff
movsd  0xa84(%rip),%xmm1
mulsd  %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jbe    15af <twointpts+0x45f>
movsd  0xa76(%rip),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
jmp    15bf <twointpts+0x46f>
movsd  0xa69(%rip),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x18(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
movsd  -0x98(%rbp),%xmm2
ff
subsd  -0x90(%rbp),%xmm2
ff
movsd  -0xa8(%rbp),%xmm0
ff
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm3
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm5
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm4
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm4
movq   %xmm4,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm4
mulsd  %xmm5,%xmm3
addsd  %xmm4,%xmm3
movaps 0x9d5(%rip),%xmm4
pand   %xmm4,%xmm3
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0x9e5(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x28(%rbp),%xmm0
subsd  -0x50(%rbp),%xmm0
call   1070 <cos@plt>
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
subsd  -0x50(%rbp),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,-0xe0(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
subsd  -0x40(%rbp),%xmm0
movsd  -0xd8(%rbp),%xmm2
ff
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
subsd  -0x48(%rbp),%xmm1
movsd  -0xe0(%rbp),%xmm3
ff
movq   %xmm3,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
subsd  -0x40(%rbp),%xmm0
movsd  -0xe0(%rbp),%xmm2
ff
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
subsd  -0x48(%rbp),%xmm1
mulsd  -0xd8(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
subsd  -0x40(%rbp),%xmm0
movsd  -0xd8(%rbp),%xmm2
ff
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm1
subsd  -0x48(%rbp),%xmm1
movsd  -0xe0(%rbp),%xmm3
ff
movq   %xmm3,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
subsd  -0x40(%rbp),%xmm0
movsd  -0xe0(%rbp),%xmm2
ff
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm1
subsd  -0x48(%rbp),%xmm1
mulsd  -0xd8(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
movaps 0x851(%rip),%xmm1
pand   %xmm1,%xmm0
ucomisd -0x30(%rbp),%xmm0
jbe    1815 <twointpts+0x6c5>
xorps  %xmm0,%xmm0
ucomisd -0xb0(%rbp),%xmm0
ff
jbe    17f8 <twointpts+0x6a8>
movsd  -0x30(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
jmp    1805 <twointpts+0x6b5>
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0x120(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
ff
xorps  %xmm0,%xmm0
ucomisd -0xb8(%rbp),%xmm0
ff
jbe    1893 <twointpts+0x743>
movsd  0x7ea(%rip),%xmm0
call   1050 <asin@plt>
movaps %xmm0,%xmm1
movsd  0x7d2(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
divsd  -0x30(%rbp),%xmm0
call   1030 <acos@plt>
movaps %xmm0,%xmm1
movsd  -0x128(%rbp),%xmm0
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
jmp    18ad <twointpts+0x75d>
movsd  -0xb0(%rbp),%xmm0
ff
divsd  -0x30(%rbp),%xmm0
call   1030 <acos@plt>
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
movaps 0x744(%rip),%xmm1
pand   %xmm1,%xmm0
ucomisd -0x30(%rbp),%xmm0
jbe    1922 <twointpts+0x7d2>
xorps  %xmm0,%xmm0
ucomisd -0xc0(%rbp),%xmm0
ff
jbe    1905 <twointpts+0x7b5>
movsd  -0x30(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x130(%rbp)
ff
jmp    1912 <twointpts+0x7c2>
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x130(%rbp)
ff
movsd  -0x130(%rbp),%xmm0
ff
movsd  %xmm0,-0xc0(%rbp)
ff
xorps  %xmm0,%xmm0
ucomisd -0xc8(%rbp),%xmm0
ff
jbe    19a0 <twointpts+0x850>
movsd  0x6dd(%rip),%xmm0
call   1050 <asin@plt>
movaps %xmm0,%xmm1
movsd  0x6c5(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x138(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
divsd  -0x30(%rbp),%xmm0
call   1030 <acos@plt>
movaps %xmm0,%xmm1
movsd  -0x138(%rbp),%xmm0
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
jmp    19ba <twointpts+0x86a>
movsd  -0xc0(%rbp),%xmm0
ff
divsd  -0x30(%rbp),%xmm0
call   1030 <acos@plt>
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
ucomisd -0x98(%rbp),%xmm0
ff
jbe    1a00 <twointpts+0x8b0>
movsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x148(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
addsd  -0x98(%rbp),%xmm0
ff
movsd  0x5eb(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1070 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x148(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x140(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
addsd  -0x98(%rbp),%xmm0
ff
movsd  0x5a9(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x140(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x50(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
call   1070 <cos@plt>
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
movsd  -0xd8(%rbp),%xmm2
ff
movsd  -0x78(%rbp),%xmm1
movsd  -0xe0(%rbp),%xmm3
ff
movq   %xmm3,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
addsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  -0xe0(%rbp),%xmm2
ff
movsd  -0x78(%rbp),%xmm1
mulsd  -0xd8(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
addsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
mulsd  -0x80(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  -0x88(%rbp),%xmm1
ff
mulsd  -0x88(%rbp),%xmm1
ff
movsd  -0x20(%rbp),%xmm2
mulsd  -0x20(%rbp),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  0x4ae(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1ba4 <twointpts+0xa54>
movsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
ucomisd -0x98(%rbp),%xmm0
ff
jbe    1beb <twointpts+0xa9b>
movsd  0x456(%rip),%xmm0
call   1050 <asin@plt>
movsd  0x441(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  -0x90(%rbp),%xmm0
ff
addsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
subsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x150(%rbp)
ff
movsd  0x40d(%rip),%xmm0
call   1050 <asin@plt>
movaps %xmm0,%xmm2
movsd  -0x150(%rbp),%xmm0
ff
movsd  0x3ed(%rip),%xmm1
mulsd  %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jbe    1c46 <twointpts+0xaf6>
movsd  0x3df(%rip),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
jmp    1c56 <twointpts+0xb06>
movsd  0x3d2(%rip),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x30(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
movsd  -0x98(%rbp),%xmm2
ff
subsd  -0x90(%rbp),%xmm2
ff
movsd  -0xa8(%rbp),%xmm0
ff
movsd  -0xb0(%rbp),%xmm3
ff
movsd  -0xc8(%rbp),%xmm5
ff
movsd  -0xc0(%rbp),%xmm4
ff
mulsd  -0xb8(%rbp),%xmm4
ff
movq   %xmm4,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm4
mulsd  %xmm5,%xmm3
addsd  %xmm4,%xmm3
movaps 0x342(%rip),%xmm4
pand   %xmm4,%xmm3
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0x352(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x58(%rbp),%rax
movl   $0x6b,(%rax)
movsd  -0x60(%rbp),%xmm0
addsd  -0x68(%rbp),%xmm0
add    $0x150,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<twointpts>:
push   %r15
push   %r14
push   %rbx
sub    $0x160,%rsp
mov    %rdx,%r14
movsd  %xmm7,0x18(%rsp)
movaps %xmm6,0xb0(%rsp)
movaps %xmm5,0xa0(%rsp)
movapd %xmm4,0xc0(%rsp)
movaps %xmm3,0x40(%rsp)
movsd  %xmm2,0x50(%rsp)
movaps %xmm1,0xd0(%rsp)
movapd %xmm0,%xmm3
mov    %rsi,%r15
mov    %rdi,%rbx
movsd  0x8(%rdi),%xmm0
movapd 0xe68(%rip),%xmm1
andpd  %xmm0,%xmm1
ucomisd %xmm3,%xmm1
jbe    11c8 <twointpts+0x88>
movapd 0xe66(%rip),%xmm1
xorpd  %xmm3,%xmm1
xorpd  %xmm2,%xmm2
cmpltsd %xmm2,%xmm0
andpd  %xmm0,%xmm1
andnpd %xmm3,%xmm0
orpd   %xmm1,%xmm0
movlpd %xmm0,0x8(%rbx)
movsd  0x8(%r15),%xmm1
movaps %xmm1,(%rsp)
divsd  %xmm3,%xmm0
movapd %xmm3,0x90(%rsp)
call   1030 <acos@plt>
movapd 0x90(%rsp),%xmm3
movsd  0xe6b(%rip),%xmm1
subsd  %xmm0,%xmm1
xorpd  %xmm4,%xmm4
movapd (%rsp),%xmm5
cmpltsd %xmm4,%xmm5
movapd %xmm5,%xmm2
andnpd %xmm0,%xmm2
andpd  %xmm1,%xmm5
orpd   %xmm2,%xmm5
movapd %xmm5,(%rsp)
movsd  0x10(%rbx),%xmm0
movapd 0xdd7(%rip),%xmm1
andpd  %xmm0,%xmm1
ucomisd %xmm3,%xmm1
jbe    1255 <twointpts+0x115>
movapd 0xdd5(%rip),%xmm1
xorpd  %xmm3,%xmm1
cmpltsd %xmm4,%xmm0
andpd  %xmm0,%xmm1
andnpd %xmm3,%xmm0
orpd   %xmm1,%xmm0
movlpd %xmm0,0x10(%rbx)
movsd  0x10(%r15),%xmm1
movaps %xmm1,0x80(%rsp)
divsd  %xmm3,%xmm0
call   1030 <acos@plt>
movsd  0xdec(%rip),%xmm2
subsd  %xmm0,%xmm2
movapd 0x80(%rsp),%xmm3
cmpltsd 0xdee(%rip),%xmm3
movapd %xmm3,%xmm1
andnpd %xmm0,%xmm1
andpd  %xmm2,%xmm3
orpd   %xmm1,%xmm3
movapd (%rsp),%xmm1
movapd %xmm1,%xmm0
maxsd  %xmm3,%xmm0
minsd  %xmm1,%xmm3
movapd %xmm3,0x80(%rsp)
movapd %xmm0,0x150(%rsp)
addsd  %xmm0,%xmm3
mulsd  0xd9f(%rip),%xmm3
movapd %xmm3,0x20(%rsp)
movapd %xmm3,%xmm0
call   1060 <cos@plt>
mulsd  0x90(%rsp),%xmm0
movsd  %xmm0,(%rsp)
movapd 0x20(%rsp),%xmm0
call   1040 <sin@plt>
movapd %xmm0,%xmm1
mulsd  0xd0(%rsp),%xmm1
movsd  (%rsp),%xmm0
movsd  0x180(%rsp),%xmm2
movsd  0x188(%rsp),%xmm3
movsd  0x190(%rsp),%xmm4
movsd  0x198(%rsp),%xmm5
movsd  0x1a0(%rsp),%xmm6
movsd  0x1a8(%rsp),%xmm7
call   1050 <ellipse2tr@plt>
movaps %xmm0,0x100(%rsp)
movsd  0x50(%rsp),%xmm1
subsd  0x18(%rsp),%xmm1
movsd  %xmm1,(%rsp)
movsd  0x8(%rbx),%xmm0
movaps %xmm0,0x120(%rsp)
movsd  0x10(%rbx),%xmm0
movaps %xmm0,0x110(%rsp)
movsd  0x8(%r15),%xmm0
movaps %xmm0,0x130(%rsp)
movsd  0x10(%r15),%xmm0
movaps %xmm0,0x140(%rsp)
movapd %xmm1,%xmm0
call   1060 <cos@plt>
movapd %xmm0,0x20(%rsp)
movsd  (%rsp),%xmm0
call   1040 <sin@plt>
movapd 0x20(%rsp),%xmm5
movapd %xmm0,%xmm3
movupd 0x8(%r15),%xmm0
movapd 0xb0(%rsp),%xmm1
unpcklpd %xmm1,%xmm1
subpd  %xmm1,%xmm0
movupd 0x8(%rbx),%xmm1
movapd 0xa0(%rsp),%xmm2
unpcklpd %xmm2,%xmm2
subpd  %xmm2,%xmm1
unpcklpd %xmm3,%xmm3
unpcklpd %xmm5,%xmm5
movapd %xmm1,%xmm4
mulpd  %xmm5,%xmm4
mulpd  %xmm0,%xmm5
mulpd  %xmm3,%xmm0
subpd  %xmm0,%xmm4
mulpd  %xmm1,%xmm3
movapd 0x40(%rsp),%xmm2
movapd %xmm2,%xmm6
xorpd  0xc01(%rip),%xmm6
movapd %xmm4,%xmm0
andpd  0xbe5(%rip),%xmm0
movapd %xmm2,%xmm1
unpcklpd %xmm2,%xmm1
cmpltpd %xmm0,%xmm1
movmskpd %xmm1,%ebx
test   $0x1,%bl
movapd %xmm6,0x30(%rsp)
movapd %xmm4,(%rsp)
movapd %xmm4,%xmm1
je     1459 <twointpts+0x319>
cmpltsd 0xc2f(%rip),%xmm1
movapd %xmm1,%xmm0
andpd  %xmm6,%xmm0
andnpd %xmm2,%xmm1
orpd   %xmm0,%xmm1
addpd  %xmm5,%xmm3
movapd %xmm3,0x20(%rsp)
movapd %xmm1,0xf0(%rsp)
movapd %xmm1,%xmm0
divsd  %xmm2,%xmm0
call   1030 <acos@plt>
movapd %xmm0,0x70(%rsp)
movapd (%rsp),%xmm0
unpckhpd %xmm0,%xmm0
test   $0x2,%bl
jne    1495 <twointpts+0x355>
movapd 0x40(%rsp),%xmm1
jmp    14ba <twointpts+0x37a>
cmpltsd 0xbda(%rip),%xmm0
movapd 0x30(%rsp),%xmm1
andpd  %xmm0,%xmm1
movapd 0x40(%rsp),%xmm2
andnpd %xmm2,%xmm0
orpd   %xmm1,%xmm0
movapd %xmm2,%xmm1
movapd %xmm0,(%rsp)
xorpd  %xmm2,%xmm2
movapd 0x20(%rsp),%xmm3
cmpltpd %xmm2,%xmm3
movapd %xmm3,0x30(%rsp)
divsd  %xmm1,%xmm0
call   1030 <acos@plt>
movapd 0x70(%rsp),%xmm1
unpcklpd %xmm0,%xmm1
movapd 0xb31(%rip),%xmm0
subpd  %xmm1,%xmm0
movapd 0x30(%rsp),%xmm2
andpd  %xmm2,%xmm0
andnpd %xmm1,%xmm2
orpd   %xmm0,%xmm2
pshufd $0xee,%xmm2,%xmm1
movapd %xmm2,%xmm0
maxsd  %xmm1,%xmm0
movapd %xmm0,0x70(%rsp)
minsd  %xmm2,%xmm1
movapd %xmm1,0x30(%rsp)
addsd  %xmm0,%xmm1
mulsd  0xb3a(%rip),%xmm1
movapd %xmm1,0x60(%rsp)
movapd %xmm1,%xmm0
call   1060 <cos@plt>
mulsd  0x40(%rsp),%xmm0
movapd %xmm0,0xe0(%rsp)
movapd 0x60(%rsp),%xmm0
call   1040 <sin@plt>
mulsd  0xc0(%rsp),%xmm0
movapd %xmm0,0x60(%rsp)
movsd  0x18(%rsp),%xmm0
subsd  0x50(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
call   1060 <cos@plt>
movapd %xmm0,0x50(%rsp)
movsd  0x18(%rsp),%xmm0
call   1040 <sin@plt>
movapd %xmm0,%xmm1
movapd 0xa76(%rip),%xmm6
xorpd  %xmm6,%xmm1
movapd 0x50(%rsp),%xmm2
unpcklpd %xmm2,%xmm0
unpcklpd %xmm1,%xmm2
movapd 0x60(%rsp),%xmm1
unpcklpd %xmm1,%xmm1
mulpd  %xmm1,%xmm2
movapd 0xe0(%rsp),%xmm1
unpcklpd %xmm1,%xmm1
mulpd  %xmm0,%xmm1
addpd  %xmm2,%xmm1
movapd %xmm1,%xmm0
movapd 0xb0(%rsp),%xmm1
unpcklpd 0xa0(%rsp),%xmm1
addpd  %xmm0,%xmm1
mulpd  %xmm1,%xmm1
movapd 0xd0(%rsp),%xmm2
movapd %xmm2,%xmm0
movapd 0x90(%rsp),%xmm3
unpcklpd %xmm3,%xmm0
mulpd  %xmm0,%xmm0
divpd  %xmm0,%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
addpd  %xmm1,%xmm0
movapd 0x100(%rsp),%xmm1
unpcklpd %xmm0,%xmm1
xorpd  %xmm7,%xmm7
movhpd 0xa3c(%rip),%xmm7
cmpltpd %xmm1,%xmm7
movapd 0x80(%rsp),%xmm4
unpcklpd 0x30(%rsp),%xmm4
movapd 0x150(%rsp),%xmm5
unpcklpd 0x70(%rsp),%xmm5
movapd %xmm7,%xmm0
andnpd %xmm5,%xmm0
movapd %xmm7,%xmm1
andnpd %xmm4,%xmm1
andpd  %xmm7,%xmm4
orpd   %xmm0,%xmm4
andpd  %xmm7,%xmm5
orpd   %xmm1,%xmm5
movapd %xmm4,%xmm0
cmpltpd %xmm5,%xmm0
movapd %xmm0,%xmm1
andnpd %xmm5,%xmm1
addpd  0x9a0(%rip),%xmm5
andpd  %xmm0,%xmm5
orpd   %xmm1,%xmm5
subpd  %xmm5,%xmm4
unpcklpd 0x40(%rsp),%xmm3
unpcklpd 0xc0(%rsp),%xmm2
mulpd  %xmm3,%xmm2
movapd 0x110(%rsp),%xmm1
unpcklpd (%rsp),%xmm1
movapd 0x130(%rsp),%xmm0
movapd 0x20(%rsp),%xmm5
unpcklpd %xmm5,%xmm0
mulpd  %xmm1,%xmm0
movapd 0x120(%rsp),%xmm3
unpcklpd 0xf0(%rsp),%xmm3
movapd 0x140(%rsp),%xmm1
shufpd $0x2,%xmm5,%xmm1
mulpd  %xmm3,%xmm1
subpd  %xmm0,%xmm1
movapd 0x8fc(%rip),%xmm3
andpd  %xmm1,%xmm3
orpd   %xmm6,%xmm1
movapd 0x92c(%rip),%xmm0
cmpltpd %xmm4,%xmm0
andpd  %xmm0,%xmm3
andnpd %xmm1,%xmm0
orpd   %xmm3,%xmm0
mulpd  %xmm4,%xmm2
addpd  %xmm0,%xmm2
mulpd  0x91b(%rip),%xmm2
movapd %xmm2,%xmm0
unpckhpd %xmm2,%xmm0
addsd  %xmm2,%xmm0
movl   $0x6b,(%r14)
add    $0x160,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

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