double intersection_area_circle_triangle(double radius, const double tri_org[2],
                                         const double tri_u[2],
                                         const double tri_v[2]) {
  const double origin[2] = {0, 0};
  int i, j;
  const double iradius = 1. / radius;
  const double iradius2 = 1. / (radius * radius);
  int inside = 0;
  double vert[6];
  vert[2 * 0 + 0] = tri_org[0];
  vert[2 * 0 + 1] = tri_org[1];
  vert[2 * 1 + 0] = (tri_org[0] + tri_u[0]);
  vert[2 * 1 + 1] = (tri_org[1] + tri_u[1]);
  vert[2 * 2 + 0] = (tri_org[0] + tri_v[0]);
  vert[2 * 2 + 1] = (tri_org[1] + tri_v[1]);
  double vert_org[6];
  vert_org[2 * 0 + 0] = 0;
  vert_org[2 * 0 + 1] = 0;
  vert_org[2 * 1 + 0] = tri_u[0];
  vert_org[2 * 1 + 1] = tri_u[1];
  vert_org[2 * 2 + 0] = tri_v[0];
  vert_org[2 * 2 + 1] = tri_v[1];
  double tri_r[3];
  for (i = 0; i < 3; ++i) {
    tri_r[i] = hypot(vert[2 * i + 0], vert[2 * i + 1]) * iradius;
    if (tri_r[i] <= 1.0) {
      inside |= (1 << i);
    }
  }
  if (TriangleContainsPoint(tri_org, tri_u, tri_v, origin)) {
    inside |= (1 << 3);
  }
  if ((inside & 0x7) == 0x7) {
    return 0.5 * fabs(LeftTurn(origin, tri_u, tri_v));
  }
  double seg[6];
  seg[2 * 0 + 0] = tri_u[0];
  seg[2 * 0 + 1] = tri_u[1];
  seg[2 * 1 + 0] = (tri_v[0] - tri_u[0]);
  seg[2 * 1 + 1] = (tri_v[1] - tri_u[1]);
  seg[2 * 2 + 0] = -tri_v[0];
  seg[2 * 2 + 1] = -tri_v[1];
  double side_length[3];
  for (i = 0; i < 3; ++i) {
    side_length[i] = hypot(seg[2 * i + 0], seg[2 * i + 1]) * iradius;
  }
  double seg_dot[3];
  for (i = 0; i < 3; ++i) {
    seg_dot[i] =
        (vert[2 * i + 0] * seg[2 * i + 0] + vert[2 * i + 1] * seg[2 * i + 1]) *
        iradius2;
  }
  double xp[12];
  int nxp[3];
  int nx = 0;
  for (i = 0; i < 3; ++i) {
    int ip1 = (i + 1) % 3;
    int in0 = (inside & (1 << i)) ? 1 : 0;
    int in1 = (inside & (1 << ip1)) ? 1 : 0;
    if (in0 && in1) {
      nxp[i] = 0;
    } else {
      double isl2 = 1. / (side_length[i] * side_length[i]);
      double disc =
          (seg_dot[i] * seg_dot[i] * isl2 - (tri_r[i] * tri_r[i] - 1)) * isl2;
      double t0 = -seg_dot[i] * isl2;
      double t, t2, tdist, t2dist;
      if (in0 != in1) {
        nxp[i] = 1;
        nx += 1;
        if (disc < 0) {
          disc = 0;
        }
        disc = sqrt(disc);
        t = t0 + disc;
        t2 = t0 - disc;
        if (t > 0.5) {
          tdist = fabs(t - 1.);
        } else {
          tdist = fabs(t);
        }
        if (t2 > 0.5) {
          t2dist = fabs(t2 - 1.);
        } else {
          t2dist = fabs(t2);
        }
        if (t2dist < tdist) {
          t = t2;
        }
        if (t < 0) {
          t = 0;
        }
        if (t > 1) {
          t = 1;
        }
        xp[2 * 2 * i + 0] = vert_org[2 * i + 0] + t * seg[2 * i + 0];
        xp[2 * 2 * i + 1] = vert_org[2 * i + 1] + t * seg[2 * i + 1];
      } else {
        if (disc <= 0) {
          nxp[i] = 0;
        } else {
          disc = sqrt(disc);
          nxp[i] = 0;
          t = t0 - disc;
          t2 = t0 + disc;
          if (0 < t && t < 1 && 0 < t2 && t2 < 1) {
            xp[2 * (2 * i + 0) + 0] = vert_org[2 * i + 0] + t * seg[2 * i + 0];
            xp[2 * (2 * i + 0) + 1] = vert_org[2 * i + 1] + t * seg[2 * i + 1];
            xp[2 * (2 * i + 1) + 0] = vert_org[2 * i + 0] + t * seg[2 * i + 0];
            xp[2 * (2 * i + 1) + 1] = vert_org[2 * i + 1] + t * seg[2 * i + 1];
            nxp[i] += 2;
            nx += 2;
          }
        }
      }
    }
  }
  if (0 == nx) {
    if ((inside & 0x7) == 0x7) {
      return -1;
    } else {
      if (inside & 0x8) {
        return 3.14159265358979323846 * radius * radius;
      } else {
        return 0;
      }
    }
  } else if (2 == nx) {
    if (nxp[0] < 2 && nxp[1] < 2 && nxp[2] < 2) {
    } else {
      for (i = 0; i < 3; ++i) {
        if (nxp[i] > 1) {
          break;
        }
      }
      double sector_area = CircularSectorArea(
          radius, hypot(xp[2 * (2 * i + 1) + 0] - xp[2 * 2 * i + 0],
                        xp[2 * (2 * i + 1) + 1] - xp[2 * 2 * i + 1]));
      if (inside & (1 << 3)) {
        return 3.14159265358979323846 * radius * radius - sector_area;
      } else {
        return sector_area;
      }
    }
  } else if (4 == nx) {
  } else if (6 == nx) {
  } else {
    return -1;
  }
  int vtype[6];
  double vp[12];
  int nv = 0;
  for (i = 0; i < 3; ++i) {
    if (inside & (1 << i)) {
      vp[2 * nv + 0] = vert_org[2 * i + 0];
      vp[2 * nv + 1] = vert_org[2 * i + 1];
      vtype[nv++] = 1;
    }
    for (j = 0; j < nxp[i]; ++j) {
      vp[2 * nv + 0] = xp[2 * (2 * i + j) + 0];
      vp[2 * nv + 1] = xp[2 * (2 * i + j) + 1];
      vtype[nv++] = 0;
    }
  }
  if (nv < 3) {
    return -1;
  }
  double area = polygon_area(nv, vp);
  for (i = 0; i < nv; ++i) {
    int im1 = i - 1;
    if (im1 < 0) {
      im1 = nv - 1;
    }
    if ((0 == vtype[im1]) && (0 == vtype[i])) {
      area +=
          CircularSectorArea(radius, hypot(vp[2 * i + 0] - vp[2 * im1 + 0],
                                           vp[2 * i + 1] - vp[2 * im1 + 1]));
    }
  }
  return area;
}


x86 assembly (clang, -O0):
<intersection_area_circle_triangle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2c0,%rsp
movsd  %xmm0,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
movsd  0x1e5c(%rip),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x10(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
movsd  0x1e40(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movl   $0x0,-0x5c(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x20(%rbp),%rax
addsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x28(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x28(%rbp),%rax
addsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movl   $0x0,-0x44(%rbp)
cmpl   $0x3,-0x44(%rbp)
jge    132f <intersection_area_circle_triangle+0x1bf>
mov    -0x44(%rbp),%eax
shl    $0x1,%eax
add    $0x0,%eax
cltq
movsd  -0x90(%rbp,%rax,8),%xmm0
ff ff
mov    -0x44(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
cltq
movsd  -0x90(%rbp,%rax,8),%xmm1
ff ff
call   1060 <hypot@plt>
mulsd  -0x50(%rbp),%xmm0
movslq -0x44(%rbp),%rax
movsd  %xmm0,-0xe0(%rbp,%rax,8)
ff ff
movslq -0x44(%rbp),%rax
movsd  0x1d03(%rip),%xmm0
ucomisd -0xe0(%rbp,%rax,8),%xmm0
ff ff
jb     131c <intersection_area_circle_triangle+0x1ac>
mov    -0x44(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
or     -0x5c(%rbp),%eax
mov    %eax,-0x5c(%rbp)
jmp    1321 <intersection_area_circle_triangle+0x1b1>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    12a8 <intersection_area_circle_triangle+0x138>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
lea    -0x40(%rbp),%rcx
mov    $0x0,%al
call   1030 <TriangleContainsPoint@plt>
cmp    $0x0,%eax
je     1358 <intersection_area_circle_triangle+0x1e8>
mov    -0x5c(%rbp),%eax
or     $0x8,%eax
mov    %eax,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
and    $0x7,%eax
cmp    $0x7,%eax
jne    139f <intersection_area_circle_triangle+0x22f>
lea    -0x40(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    $0x0,%al
call   1050 <LeftTurn@plt>
cvtsi2sd %eax,%xmm1
movaps 0x1c9b(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0x1c87(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    2040 <intersection_area_circle_triangle+0xed0>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
subsd  (%rax),%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x20(%rbp),%rax
subsd  0x8(%rax),%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movl   $0x0,-0x44(%rbp)
cmpl   $0x3,-0x44(%rbp)
jge    149f <intersection_area_circle_triangle+0x32f>
mov    -0x44(%rbp),%eax
shl    $0x1,%eax
add    $0x0,%eax
cltq
movsd  -0x110(%rbp,%rax,8),%xmm0
ff ff
mov    -0x44(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
cltq
movsd  -0x110(%rbp,%rax,8),%xmm1
ff ff
call   1060 <hypot@plt>
mulsd  -0x50(%rbp),%xmm0
movslq -0x44(%rbp),%rax
movsd  %xmm0,-0x130(%rbp,%rax,8)
ff ff
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1448 <intersection_area_circle_triangle+0x2d8>
movl   $0x0,-0x44(%rbp)
cmpl   $0x3,-0x44(%rbp)
jge    1528 <intersection_area_circle_triangle+0x3b8>
mov    -0x44(%rbp),%eax
shl    $0x1,%eax
add    $0x0,%eax
cltq
movsd  -0x90(%rbp,%rax,8),%xmm0
ff ff
mov    -0x44(%rbp),%eax
shl    $0x1,%eax
add    $0x0,%eax
cltq
movsd  -0x110(%rbp,%rax,8),%xmm2
ff ff
mov    -0x44(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
cltq
movsd  -0x90(%rbp,%rax,8),%xmm1
ff ff
mov    -0x44(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
cltq
mulsd  -0x110(%rbp,%rax,8),%xmm1
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mulsd  -0x58(%rbp),%xmm0
movslq -0x44(%rbp),%rax
movsd  %xmm0,-0x150(%rbp,%rax,8)
ff ff
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    14a6 <intersection_area_circle_triangle+0x336>
movl   $0x0,-0x1c0(%rbp)
movl   $0x0,-0x44(%rbp)
cmpl   $0x3,-0x44(%rbp)
jge    1b66 <intersection_area_circle_triangle+0x9f6>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %edx,-0x1c4(%rbp)
mov    -0x5c(%rbp),%edx
mov    -0x44(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
and    %eax,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %eax,-0x1c8(%rbp)
mov    -0x5c(%rbp),%edx
mov    -0x1c4(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
and    %eax,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %eax,-0x1cc(%rbp)
cmpl   $0x0,-0x1c8(%rbp)
je     15cc <intersection_area_circle_triangle+0x45c>
cmpl   $0x0,-0x1cc(%rbp)
je     15cc <intersection_area_circle_triangle+0x45c>
movslq -0x44(%rbp),%rax
movl   $0x0,-0x1bc(%rbp,%rax,4)
jmp    1b53 <intersection_area_circle_triangle+0x9e3>
movslq -0x44(%rbp),%rax
movsd  -0x130(%rbp,%rax,8),%xmm1
ff ff
movslq -0x44(%rbp),%rax
mulsd  -0x130(%rbp,%rax,8),%xmm1
ff ff
movsd  0x1a12(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x1d8(%rbp)
ff
movslq -0x44(%rbp),%rax
movsd  -0x150(%rbp,%rax,8),%xmm0
ff ff
movslq -0x44(%rbp),%rax
mulsd  -0x150(%rbp,%rax,8),%xmm0
ff ff
movsd  -0x1d8(%rbp),%xmm2
ff
movslq -0x44(%rbp),%rax
movsd  -0xe0(%rbp,%rax,8),%xmm1
ff ff
movslq -0x44(%rbp),%rax
movsd  -0xe0(%rbp,%rax,8),%xmm3
ff ff
mulsd  %xmm3,%xmm1
movsd  0x19c6(%rip),%xmm3
addsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mulsd  -0x1d8(%rbp),%xmm0
ff
movsd  %xmm0,-0x1e0(%rbp)
ff
movslq -0x44(%rbp),%rax
movsd  -0x150(%rbp,%rax,8),%xmm0
ff ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x1d8(%rbp),%xmm0
ff
movsd  %xmm0,-0x1e8(%rbp)
ff
mov    -0x1c8(%rbp),%eax
cmp    -0x1cc(%rbp),%eax
je     1909 <intersection_area_circle_triangle+0x799>
movslq -0x44(%rbp),%rax
movl   $0x1,-0x1bc(%rbp,%rax,4)
mov    -0x1c0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c0(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x1e0(%rbp),%xmm0
ff
jbe    16f5 <intersection_area_circle_triangle+0x585>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x1e0(%rbp)
ff
movsd  -0x1e0(%rbp),%xmm0
ff
call   1090 <sqrt@plt>
movsd  %xmm0,-0x1e0(%rbp)
ff
movsd  -0x1e8(%rbp),%xmm0
ff
addsd  -0x1e0(%rbp),%xmm0
ff
movsd  %xmm0,-0x1f0(%rbp)
ff
movsd  -0x1e8(%rbp),%xmm0
ff
subsd  -0x1e0(%rbp),%xmm0
ff
movsd  %xmm0,-0x1f8(%rbp)
ff
movsd  -0x1f0(%rbp),%xmm0
ff
movsd  0x18ce(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1780 <intersection_area_circle_triangle+0x610>
movsd  -0x1f0(%rbp),%xmm0
ff
movsd  0x189c(%rip),%xmm1
subsd  %xmm1,%xmm0
movaps 0x18b1(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x200(%rbp)
ff
jmp    179b <intersection_area_circle_triangle+0x62b>
movsd  -0x1f0(%rbp),%xmm0
ff
movaps 0x1891(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x200(%rbp)
ff
movsd  -0x1f8(%rbp),%xmm0
ff
movsd  0x186d(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    17e1 <intersection_area_circle_triangle+0x671>
movsd  -0x1f8(%rbp),%xmm0
ff
movsd  0x183b(%rip),%xmm1
subsd  %xmm1,%xmm0
movaps 0x1850(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x208(%rbp)
ff
jmp    17fc <intersection_area_circle_triangle+0x68c>
movsd  -0x1f8(%rbp),%xmm0
ff
movaps 0x1830(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x208(%rbp)
ff
movsd  -0x208(%rbp),%xmm1
ff
movsd  -0x200(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    1826 <intersection_area_circle_triangle+0x6b6>
movsd  -0x1f8(%rbp),%xmm0
ff
movsd  %xmm0,-0x1f0(%rbp)
ff
xorps  %xmm0,%xmm0
ucomisd -0x1f0(%rbp),%xmm0
ff
jbe    1842 <intersection_area_circle_triangle+0x6d2>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x1f0(%rbp)
ff
movsd  -0x1f0(%rbp),%xmm0
ff
movsd  0x17ae(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    186c <intersection_area_circle_triangle+0x6fc>
movsd  0x179c(%rip),%xmm0
movsd  %xmm0,-0x1f0(%rbp)
ff
mov    -0x44(%rbp),%eax
shl    $0x1,%eax
add    $0x0,%eax
cltq
movsd  -0xc0(%rbp,%rax,8),%xmm1
ff ff
movsd  -0x1f0(%rbp),%xmm0
ff
mov    -0x44(%rbp),%eax
shl    $0x1,%eax
add    $0x0,%eax
cltq
movsd  -0x110(%rbp,%rax,8),%xmm2
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x44(%rbp),%eax
shl    $0x2,%eax
add    $0x0,%eax
cltq
movsd  %xmm0,-0x1b0(%rbp,%rax,8)
ff ff
mov    -0x44(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
cltq
movsd  -0xc0(%rbp,%rax,8),%xmm1
ff ff
movsd  -0x1f0(%rbp),%xmm0
ff
mov    -0x44(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
cltq
movsd  -0x110(%rbp,%rax,8),%xmm2
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x44(%rbp),%eax
shl    $0x2,%eax
add    $0x1,%eax
cltq
movsd  %xmm0,-0x1b0(%rbp,%rax,8)
ff ff
jmp    1b4e <intersection_area_circle_triangle+0x9de>
xorps  %xmm0,%xmm0
ucomisd -0x1e0(%rbp),%xmm0
ff
jb     192e <intersection_area_circle_triangle+0x7be>
movslq -0x44(%rbp),%rax
movl   $0x0,-0x1bc(%rbp,%rax,4)
jmp    1b49 <intersection_area_circle_triangle+0x9d9>
movsd  -0x1e0(%rbp),%xmm0
ff
call   1090 <sqrt@plt>
movsd  %xmm0,-0x1e0(%rbp)
ff
movslq -0x44(%rbp),%rax
movl   $0x0,-0x1bc(%rbp,%rax,4)
movsd  -0x1e8(%rbp),%xmm0
ff
subsd  -0x1e0(%rbp),%xmm0
ff
movsd  %xmm0,-0x1f0(%rbp)
ff
movsd  -0x1e8(%rbp),%xmm0
ff
addsd  -0x1e0(%rbp),%xmm0
ff
movsd  %xmm0,-0x1f8(%rbp)
ff
movsd  -0x1f0(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1b44 <intersection_area_circle_triangle+0x9d4>
movsd  0x1661(%rip),%xmm0
ucomisd -0x1f0(%rbp),%xmm0
ff
jbe    1b44 <intersection_area_circle_triangle+0x9d4>
movsd  -0x1f8(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1b44 <intersection_area_circle_triangle+0x9d4>
movsd  0x1636(%rip),%xmm0
ucomisd -0x1f8(%rbp),%xmm0
ff
jbe    1b44 <intersection_area_circle_triangle+0x9d4>
mov    -0x44(%rbp),%eax
shl    $0x1,%eax
add    $0x0,%eax
cltq
movsd  -0xc0(%rbp,%rax,8),%xmm1
ff ff
movsd  -0x1f0(%rbp),%xmm0
ff
mov    -0x44(%rbp),%eax
shl    $0x1,%eax
add    $0x0,%eax
cltq
movsd  -0x110(%rbp,%rax,8),%xmm2
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x44(%rbp),%eax
shl    $0x1,%eax
add    $0x0,%eax
shl    $0x1,%eax
add    $0x0,%eax
cltq
movsd  %xmm0,-0x1b0(%rbp,%rax,8)
ff ff
mov    -0x44(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
cltq
movsd  -0xc0(%rbp,%rax,8),%xmm1
ff ff
movsd  -0x1f0(%rbp),%xmm0
ff
mov    -0x44(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
cltq
movsd  -0x110(%rbp,%rax,8),%xmm2
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x44(%rbp),%eax
shl    $0x1,%eax
add    $0x0,%eax
shl    $0x1,%eax
add    $0x1,%eax
cltq
movsd  %xmm0,-0x1b0(%rbp,%rax,8)
ff ff
mov    -0x44(%rbp),%eax
shl    $0x1,%eax
add    $0x0,%eax
cltq
movsd  -0xc0(%rbp,%rax,8),%xmm1
ff ff
movsd  -0x1f0(%rbp),%xmm0
ff
mov    -0x44(%rbp),%eax
shl    $0x1,%eax
add    $0x0,%eax
cltq
movsd  -0x110(%rbp,%rax,8),%xmm2
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x44(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
shl    $0x1,%eax
add    $0x0,%eax
cltq
movsd  %xmm0,-0x1b0(%rbp,%rax,8)
ff ff
mov    -0x44(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
cltq
movsd  -0xc0(%rbp,%rax,8),%xmm1
ff ff
movsd  -0x1f0(%rbp),%xmm0
ff
mov    -0x44(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
cltq
movsd  -0x110(%rbp,%rax,8),%xmm2
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x44(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
shl    $0x1,%eax
add    $0x1,%eax
cltq
movsd  %xmm0,-0x1b0(%rbp,%rax,8)
ff ff
movslq -0x44(%rbp),%rax
mov    -0x1bc(%rbp,%rax,4),%ecx
add    $0x2,%ecx
mov    %ecx,-0x1bc(%rbp,%rax,4)
mov    -0x1c0(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x1c0(%rbp)
jmp    1b49 <intersection_area_circle_triangle+0x9d9>
jmp    1b4e <intersection_area_circle_triangle+0x9de>
jmp    1b53 <intersection_area_circle_triangle+0x9e3>
jmp    1b58 <intersection_area_circle_triangle+0x9e8>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1539 <intersection_area_circle_triangle+0x3c9>
xor    %eax,%eax
cmp    -0x1c0(%rbp),%eax
jne    1bcd <intersection_area_circle_triangle+0xa5d>
mov    -0x5c(%rbp),%eax
and    $0x7,%eax
cmp    $0x7,%eax
jne    1b95 <intersection_area_circle_triangle+0xa25>
movsd  0x147d(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    2040 <intersection_area_circle_triangle+0xed0>
mov    -0x5c(%rbp),%eax
and    $0x8,%eax
cmp    $0x0,%eax
je     1bc0 <intersection_area_circle_triangle+0xa50>
movsd  0x1464(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    2040 <intersection_area_circle_triangle+0xed0>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    2040 <intersection_area_circle_triangle+0xed0>
mov    $0x2,%eax
cmp    -0x1c0(%rbp),%eax
jne    1d3a <intersection_area_circle_triangle+0xbca>
cmpl   $0x2,-0x1bc(%rbp)
jge    1c0a <intersection_area_circle_triangle+0xa9a>
cmpl   $0x2,-0x1b8(%rbp)
jge    1c0a <intersection_area_circle_triangle+0xa9a>
cmpl   $0x2,-0x1b4(%rbp)
jge    1c0a <intersection_area_circle_triangle+0xa9a>
jmp    1d35 <intersection_area_circle_triangle+0xbc5>
movl   $0x0,-0x44(%rbp)
cmpl   $0x3,-0x44(%rbp)
jge    1c45 <intersection_area_circle_triangle+0xad5>
movslq -0x44(%rbp),%rax
cmpl   $0x1,-0x1bc(%rbp,%rax,4)
01
jle    1c32 <intersection_area_circle_triangle+0xac2>
jmp    1c45 <intersection_area_circle_triangle+0xad5>
jmp    1c37 <intersection_area_circle_triangle+0xac7>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1c11 <intersection_area_circle_triangle+0xaa1>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x2b0(%rbp)
ff
mov    -0x44(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
shl    $0x1,%eax
add    $0x0,%eax
cltq
movsd  -0x1b0(%rbp,%rax,8),%xmm0
ff ff
mov    -0x44(%rbp),%eax
shl    $0x2,%eax
add    $0x0,%eax
cltq
subsd  -0x1b0(%rbp,%rax,8),%xmm0
ff ff
mov    -0x44(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
shl    $0x1,%eax
add    $0x1,%eax
cltq
movsd  -0x1b0(%rbp,%rax,8),%xmm1
ff ff
mov    -0x44(%rbp),%eax
shl    $0x2,%eax
add    $0x1,%eax
cltq
subsd  -0x1b0(%rbp,%rax,8),%xmm1
ff ff
call   1060 <hypot@plt>
movaps %xmm0,%xmm1
movsd  -0x2b0(%rbp),%xmm0
ff
mov    $0x2,%al
call   1070 <CircularSectorArea@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x210(%rbp)
ff
mov    -0x5c(%rbp),%eax
and    $0x8,%eax
cmp    $0x0,%eax
je     1d23 <intersection_area_circle_triangle+0xbb3>
movsd  0x1328(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movsd  -0x210(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    2040 <intersection_area_circle_triangle+0xed0>
movsd  -0x210(%rbp),%xmm0
ff
movsd  %xmm0,-0x8(%rbp)
jmp    2040 <intersection_area_circle_triangle+0xed0>
jmp    1d82 <intersection_area_circle_triangle+0xc12>
mov    $0x4,%eax
cmp    -0x1c0(%rbp),%eax
jne    1d50 <intersection_area_circle_triangle+0xbe0>
jmp    1d7d <intersection_area_circle_triangle+0xc0d>
mov    $0x6,%eax
cmp    -0x1c0(%rbp),%eax
jne    1d66 <intersection_area_circle_triangle+0xbf6>
jmp    1d78 <intersection_area_circle_triangle+0xc08>
movsd  0x129a(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    2040 <intersection_area_circle_triangle+0xed0>
jmp    1d7d <intersection_area_circle_triangle+0xc0d>
jmp    1d82 <intersection_area_circle_triangle+0xc12>
jmp    1d87 <intersection_area_circle_triangle+0xc17>
movl   $0x0,-0x294(%rbp)
movl   $0x0,-0x44(%rbp)
cmpl   $0x3,-0x44(%rbp)
jge    1eec <intersection_area_circle_triangle+0xd7c>
mov    -0x5c(%rbp),%eax
mov    -0x44(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1e30 <intersection_area_circle_triangle+0xcc0>
mov    -0x44(%rbp),%eax
shl    $0x1,%eax
add    $0x0,%eax
cltq
movsd  -0xc0(%rbp,%rax,8),%xmm0
ff ff
mov    -0x294(%rbp),%eax
shl    $0x1,%eax
add    $0x0,%eax
cltq
movsd  %xmm0,-0x290(%rbp,%rax,8)
ff ff
mov    -0x44(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
cltq
movsd  -0xc0(%rbp,%rax,8),%xmm0
ff ff
mov    -0x294(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
cltq
movsd  %xmm0,-0x290(%rbp,%rax,8)
ff ff
mov    -0x294(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x294(%rbp)
cltq
movl   $0x1,-0x230(%rbp,%rax,4)
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
movslq -0x44(%rbp),%rcx
cmp    -0x1bc(%rbp,%rcx,4),%eax
jge    1ed9 <intersection_area_circle_triangle+0xd69>
mov    -0x44(%rbp),%eax
shl    $0x1,%eax
add    -0x48(%rbp),%eax
shl    $0x1,%eax
add    $0x0,%eax
cltq
movsd  -0x1b0(%rbp,%rax,8),%xmm0
ff ff
mov    -0x294(%rbp),%eax
shl    $0x1,%eax
add    $0x0,%eax
cltq
movsd  %xmm0,-0x290(%rbp,%rax,8)
ff ff
mov    -0x44(%rbp),%eax
shl    $0x1,%eax
add    -0x48(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
cltq
movsd  -0x1b0(%rbp,%rax,8),%xmm0
ff ff
mov    -0x294(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
cltq
movsd  %xmm0,-0x290(%rbp,%rax,8)
ff ff
mov    -0x294(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x294(%rbp)
cltq
movl   $0x0,-0x230(%rbp,%rax,4)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1e37 <intersection_area_circle_triangle+0xcc7>
jmp    1ede <intersection_area_circle_triangle+0xd6e>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1d98 <intersection_area_circle_triangle+0xc28>
cmpl   $0x3,-0x294(%rbp)
jge    1f0b <intersection_area_circle_triangle+0xd9b>
movsd  0x1107(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    2040 <intersection_area_circle_triangle+0xed0>
mov    -0x294(%rbp),%edi
lea    -0x290(%rbp),%rsi
mov    $0x0,%al
call   1080 <polygon_area@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x2a0(%rbp)
ff
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x294(%rbp),%eax
jge    2033 <intersection_area_circle_triangle+0xec3>
mov    -0x44(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x2a4(%rbp)
cmpl   $0x0,-0x2a4(%rbp)
jge    1f69 <intersection_area_circle_triangle+0xdf9>
mov    -0x294(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x2a4(%rbp)
movslq -0x2a4(%rbp),%rcx
xor    %eax,%eax
cmp    -0x230(%rbp,%rcx,4),%eax
jne    2020 <intersection_area_circle_triangle+0xeb0>
movslq -0x44(%rbp),%rcx
xor    %eax,%eax
cmp    -0x230(%rbp,%rcx,4),%eax
jne    2020 <intersection_area_circle_triangle+0xeb0>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x2b8(%rbp)
ff
mov    -0x44(%rbp),%eax
shl    $0x1,%eax
add    $0x0,%eax
cltq
movsd  -0x290(%rbp,%rax,8),%xmm0
ff ff
mov    -0x2a4(%rbp),%eax
shl    $0x1,%eax
add    $0x0,%eax
cltq
subsd  -0x290(%rbp,%rax,8),%xmm0
ff ff
mov    -0x44(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
cltq
movsd  -0x290(%rbp,%rax,8),%xmm1
ff ff
mov    -0x2a4(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
cltq
subsd  -0x290(%rbp,%rax,8),%xmm1
ff ff
call   1060 <hypot@plt>
movaps %xmm0,%xmm1
movsd  -0x2b8(%rbp),%xmm0
mov    $0x2,%al
call   1070 <CircularSectorArea@plt>
cvtsi2sd %eax,%xmm0
addsd  -0x2a0(%rbp),%xmm0
ff
movsd  %xmm0,-0x2a0(%rbp)
ff
jmp    2025 <intersection_area_circle_triangle+0xeb5>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1f32 <intersection_area_circle_triangle+0xdc2>
movsd  -0x2a0(%rbp),%xmm0
ff
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x2c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intersection_area_circle_triangle>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x2a8,%rsp
mov    %rdx,(%rsp)
mov    %rsi,%r15
mov    %rdi,%r12
xorps  %xmm3,%xmm3
movaps %xmm3,0xb0(%rsp)
movsd  0xe62(%rip),%xmm1
movsd  %xmm0,0x38(%rsp)
divsd  %xmm0,%xmm1
movapd %xmm1,0x20(%rsp)
movsd  (%rdi),%xmm0
movsd  0x8(%rdi),%xmm1
movupd (%rsi),%xmm4
movapd %xmm0,%xmm2
addsd  %xmm4,%xmm2
movapd %xmm2,0xa0(%rsp)
movupd (%rdx),%xmm2
movaps %xmm3,0x240(%rsp)
movapd %xmm4,0x250(%rsp)
unpckhpd %xmm4,%xmm4
addsd  %xmm1,%xmm4
movapd %xmm4,0x80(%rsp)
movapd %xmm0,%xmm3
addsd  %xmm2,%xmm3
movapd %xmm3,0x10(%rsp)
movapd %xmm2,0x260(%rsp)
unpckhpd %xmm2,%xmm2
addsd  %xmm1,%xmm2
movapd %xmm2,0x90(%rsp)
movapd %xmm0,0x190(%rsp)
movapd %xmm1,0x180(%rsp)
call   1060 <hypot@plt>
mulsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x140(%rsp)
xor    %ebx,%ebx
movsd  0xdb6(%rip),%xmm1
ucomisd %xmm0,%xmm1
setae  %bl
movapd 0xa0(%rsp),%xmm0
movaps 0x80(%rsp),%xmm1
call   1060 <hypot@plt>
mulsd  0x20(%rsp),%xmm0
xor    %eax,%eax
movsd  0xd89(%rip),%xmm1
ucomisd %xmm0,%xmm1
setae  %al
movsd  %xmm0,0x148(%rsp)
lea    (%rbx,%rax,2),%ebx
movapd 0x10(%rsp),%xmm0
movaps 0x90(%rsp),%xmm1
call   1060 <hypot@plt>
mulsd  0x20(%rsp),%xmm0
xor    %ebp,%ebp
movsd  0xd53(%rip),%xmm1
ucomisd %xmm0,%xmm1
setae  %bpl
movsd  %xmm0,0x150(%rsp)
lea    (%rbx,%rbp,4),%r14d
xor    %r13d,%r13d
lea    0xb0(%rsp),%rcx
mov    %r12,%rdi
mov    %r15,0x50(%rsp)
mov    %r15,%rsi
mov    (%rsp),%rdx
xor    %eax,%eax
call   1030 <TriangleContainsPoint@plt>
test   %eax,%eax
lea    0x8(%rbx,%rbp,4),%eax
cmove  %r14d,%eax
mov    %eax,%r12d
not    %r12d
test   $0x7,%r12b
jne    133b <intersection_area_circle_triangle+0x1cb>
lea    0xb0(%rsp),%rdi
mov    0x50(%rsp),%rsi
mov    (%rsp),%rdx
xor    %eax,%eax
call   1050 <LeftTurn@plt>
cvtsi2sd %eax,%xmm5
andpd  0xd13(%rip),%xmm5
mulsd  0xceb(%rip),%xmm5
movapd %xmm5,%xmm0
add    $0x2a8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
movsd  0x38(%rsp),%xmm0
mulsd  %xmm0,%xmm0
movsd  0xcb3(%rip),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,0x170(%rsp)
mov    0x50(%rsp),%rcx
movupd (%rcx),%xmm0
movapd %xmm0,0x160(%rsp)
movapd %xmm0,0x270(%rsp)
mov    (%rsp),%rcx
movupd (%rcx),%xmm2
movapd %xmm2,%xmm1
subpd  %xmm0,%xmm1
movapd %xmm1,0x70(%rsp)
movapd %xmm1,0x280(%rsp)
xorpd  0xc84(%rip),%xmm2
movapd %xmm2,0x50(%rsp)
movapd %xmm2,0x290(%rsp)
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
mov    %eax,(%rsp)
call   1060 <hypot@plt>
movapd %xmm0,0x60(%rsp)
movapd 0x70(%rsp),%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
call   1060 <hypot@plt>
movapd 0x20(%rsp),%xmm1
unpcklpd %xmm1,%xmm1
movapd 0x60(%rsp),%xmm2
unpcklpd %xmm0,%xmm2
mulpd  %xmm1,%xmm2
movapd %xmm2,0x220(%rsp)
movdqa 0x50(%rsp),%xmm0
pshufd $0xee,%xmm0,%xmm1
movdqa %xmm1,0x60(%rsp)
call   1060 <hypot@plt>
mov    (%rsp),%r9d
mulsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x230(%rsp)
movapd 0x180(%rsp),%xmm1
unpcklpd 0x80(%rsp),%xmm1
movapd 0x160(%rsp),%xmm2
movapd %xmm2,%xmm0
movapd 0x70(%rsp),%xmm3
unpckhpd %xmm3,%xmm0
mulpd  %xmm1,%xmm0
movapd 0x190(%rsp),%xmm1
unpcklpd 0xa0(%rsp),%xmm1
unpcklpd %xmm3,%xmm2
mulpd  %xmm1,%xmm2
addpd  %xmm0,%xmm2
movapd %xmm2,%xmm1
movapd 0x170(%rsp),%xmm2
movapd %xmm2,%xmm0
unpcklpd %xmm2,%xmm0
mulpd  %xmm1,%xmm0
movapd %xmm0,0x200(%rsp)
movapd 0x90(%rsp),%xmm1
mulsd  0x60(%rsp),%xmm1
movapd 0x10(%rsp),%xmm0
mulsd  0x50(%rsp),%xmm0
addsd  %xmm1,%xmm0
mulsd  %xmm2,%xmm0
movsd  %xmm0,0x210(%rsp)
mov    $0x1,%ebp
mov    $0xaaaaaaab,%r15d
movsd  0xb3e(%rip),%xmm5
movapd 0xb4d(%rip),%xmm8
xorpd  %xmm9,%xmm9
xor    %ebx,%ebx
xor    %r14d,%r14d
jmp    14fd <intersection_area_circle_triangle+0x38d>
nop
movl   $0x0,0x44(%rsp,%rbx,1)
add    $0x4,%rbx
add    $0x1,%r13d
add    $0x1,%ebp
cmp    $0xc,%rbx
je     1764 <intersection_area_circle_triangle+0x5f4>
mov    %ebp,%eax
imul   %r15,%rax
shr    $0x21,%rax
lea    (%rax,%rax,2),%ecx
mov    %r13d,%eax
sub    %ecx,%eax
mov    $0x1,%edx
mov    %r13d,%ecx
shl    %cl,%edx
add    $0x1,%al
mov    $0x1,%esi
mov    %eax,%ecx
shl    %cl,%esi
mov    %esi,%eax
bts    %r13d,%eax
test   %r12d,%eax
je     14e0 <intersection_area_circle_triangle+0x370>
test   %r9d,%esi
setne  %al
test   %r9d,%edx
sete   %cl
movsd  0x220(%rsp,%rbx,2),%xmm0
mulsd  %xmm0,%xmm0
movsd  0xab0(%rip),%xmm4
movapd %xmm4,%xmm1
divsd  %xmm0,%xmm1
movsd  0x200(%rsp,%rbx,2),%xmm7
movapd %xmm7,%xmm0
mulsd  %xmm7,%xmm0
movsd  0x140(%rsp,%rbx,2),%xmm2
mulsd  %xmm2,%xmm2
addsd  %xmm5,%xmm2
mulsd  %xmm1,%xmm0
subsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
xorpd  %xmm8,%xmm7
mulsd  %xmm1,%xmm7
xor    %al,%cl
je     15c0 <intersection_area_circle_triangle+0x450>
ucomisd %xmm0,%xmm9
jae    14e0 <intersection_area_circle_triangle+0x370>
ucomisd %xmm9,%xmm0
jb     16ba <intersection_area_circle_triangle+0x54a>
sqrtsd %xmm0,%xmm0
jmp    16ed <intersection_area_circle_triangle+0x57d>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movl   $0x1,0x44(%rsp,%rbx,1)
xorpd  %xmm1,%xmm1
maxsd  %xmm0,%xmm1
ucomisd %xmm9,%xmm1
jb     15e0 <intersection_area_circle_triangle+0x470>
xorps  %xmm0,%xmm0
sqrtsd %xmm1,%xmm0
jmp    1617 <intersection_area_circle_triangle+0x4a7>
movapd %xmm1,%xmm0
movapd %xmm7,0x20(%rsp)
call   1090 <sqrt@plt>
movapd 0x20(%rsp),%xmm7
xorpd  %xmm9,%xmm9
movapd 0xa1d(%rip),%xmm8
movsd  0x9fd(%rip),%xmm5
movsd  0x9ed(%rip),%xmm4
mov    (%rsp),%r9d
movapd %xmm7,%xmm1
addsd  %xmm0,%xmm1
subsd  %xmm0,%xmm7
movapd %xmm1,%xmm0
addsd  %xmm5,%xmm0
movsd  0x9dd(%rip),%xmm3
movapd %xmm3,%xmm2
cmpltsd %xmm1,%xmm2
andpd  %xmm2,%xmm0
andnpd %xmm1,%xmm2
orpd   %xmm0,%xmm2
movapd 0x9e0(%rip),%xmm6
andpd  %xmm6,%xmm2
movapd %xmm7,%xmm0
addsd  %xmm5,%xmm0
cmpltsd %xmm7,%xmm3
andpd  %xmm3,%xmm0
andnpd %xmm7,%xmm3
orpd   %xmm0,%xmm3
andpd  %xmm6,%xmm3
cmpltsd %xmm2,%xmm3
andpd  %xmm3,%xmm7
andnpd %xmm1,%xmm3
orpd   %xmm7,%xmm3
xorpd  %xmm0,%xmm0
maxsd  %xmm3,%xmm0
movapd %xmm4,%xmm1
minsd  %xmm0,%xmm1
unpcklpd %xmm1,%xmm1
mulpd  0x270(%rsp,%rbx,4),%xmm1
add    $0x1,%r14d
addpd  0x240(%rsp,%rbx,4),%xmm1
movapd %xmm1,0x1a0(%rsp,%rbx,8)
jmp    14e8 <intersection_area_circle_triangle+0x378>
movapd %xmm7,0x20(%rsp)
call   1090 <sqrt@plt>
movapd 0x20(%rsp),%xmm7
xorpd  %xmm9,%xmm9
movapd 0x947(%rip),%xmm8
movsd  0x927(%rip),%xmm5
movsd  0x917(%rip),%xmm4
mov    (%rsp),%r9d
movl   $0x0,0x44(%rsp,%rbx,1)
movapd %xmm7,%xmm1
subsd  %xmm0,%xmm1
ucomisd %xmm9,%xmm1
jbe    14e8 <intersection_area_circle_triangle+0x378>
ucomisd %xmm1,%xmm4
jbe    14e8 <intersection_area_circle_triangle+0x378>
addsd  %xmm0,%xmm7
ucomisd %xmm9,%xmm7
jbe    14e8 <intersection_area_circle_triangle+0x378>
ucomisd %xmm7,%xmm4
jbe    14e8 <intersection_area_circle_triangle+0x378>
unpcklpd %xmm1,%xmm1
mulpd  0x270(%rsp,%rbx,4),%xmm1
addpd  0x240(%rsp,%rbx,4),%xmm1
movapd %xmm1,0x1a0(%rsp,%rbx,8)
movapd %xmm1,0x1b0(%rsp,%rbx,8)
movl   $0x2,0x44(%rsp,%rbx,1)
add    $0x2,%r14d
jmp    14e8 <intersection_area_circle_triangle+0x378>
cmp    $0x2,%r14d
je     179c <intersection_area_circle_triangle+0x62c>
test   %r14d,%r14d
jne    1858 <intersection_area_circle_triangle+0x6e8>
xorpd  %xmm5,%xmm5
test   $0x8,%r9b
movsd  0x38(%rsp),%xmm0
je     1325 <intersection_area_circle_triangle+0x1b5>
movsd  0x889(%rip),%xmm5
mulsd  %xmm0,%xmm5
mulsd  %xmm0,%xmm5
jmp    1325 <intersection_area_circle_triangle+0x1b5>
mov    0x44(%rsp),%esi
mov    0x48(%rsp),%edx
mov    0x4c(%rsp),%ecx
cmp    $0x1,%esi
jg     17bb <intersection_area_circle_triangle+0x64b>
cmp    $0x1,%edx
jg     17bb <intersection_area_circle_triangle+0x64b>
cmp    $0x2,%ecx
jl     1866 <intersection_area_circle_triangle+0x6f6>
xor    %eax,%eax
cmp    $0x1,%esi
jg     17db <intersection_area_circle_triangle+0x66b>
mov    $0x4,%eax
cmp    $0x1,%edx
jg     17db <intersection_area_circle_triangle+0x66b>
xor    %eax,%eax
cmp    $0x2,%ecx
setl   %al
lea    0x8(,%rax,4),%eax
mov    %eax,%ecx
or     $0x2,%ecx
movsd  0x1a0(%rsp,%rcx,8),%xmm0
mov    %eax,%ecx
subsd  0x1a0(%rsp,%rcx,8),%xmm0
mov    %eax,%ecx
or     $0x3,%ecx
movsd  0x1a0(%rsp,%rcx,8),%xmm1
or     $0x1,%eax
subsd  0x1a0(%rsp,%rax,8),%xmm1
call   1060 <hypot@plt>
movapd %xmm0,%xmm1
movsd  0x38(%rsp),%xmm0
mov    $0x2,%al
call   1070 <CircularSectorArea@plt>
xorps  %xmm5,%xmm5
cvtsi2sd %eax,%xmm5
testb  $0x8,(%rsp)
je     1325 <intersection_area_circle_triangle+0x1b5>
movsd  0x7db(%rip),%xmm0
movsd  0x38(%rsp),%xmm1
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
subsd  %xmm5,%xmm0
movapd %xmm0,%xmm5
jmp    1325 <intersection_area_circle_triangle+0x1b5>
and    $0xfffffffd,%r14d
cmp    $0x4,%r14d
jne    1325 <intersection_area_circle_triangle+0x1b5>
lea    0x1c0(%rsp),%rbp
xor    %ebx,%ebx
mov    $0x1,%r15d
xor    %r13d,%r13d
jmp    1899 <intersection_area_circle_triangle+0x729>
nopl   0x0(%rax,%rax,1)
add    %r12d,%r13d
add    $0x1,%rbx
add    $0x20,%rbp
add    $0x2,%r15
cmp    $0x3,%rbx
je     1b85 <intersection_area_circle_triangle+0xa15>
bt     %ebx,%r9d
jae    18d2 <intersection_area_circle_triangle+0x762>
mov    %rbx,%rax
shl    $0x4,%rax
lea    0x0(%r13,%r13,1),%ecx
movslq %ecx,%rcx
movapd 0x240(%rsp,%rax,1),%xmm0
movapd %xmm0,0xc0(%rsp,%rcx,8)
movslq %r13d,%rax
add    $0x1,%r13d
movl   $0x1,0x120(%rsp,%rax,4)
mov    0x44(%rsp,%rbx,4),%r12d
test   %r12d,%r12d
jle    1883 <intersection_area_circle_triangle+0x713>
lea    (%rbx,%rbx,1),%rax
mov    %rax,0x20(%rsp)
movslq %r13d,%r14
lea    (%rsp,%r14,4),%rdi
add    $0x120,%rdi
lea    0x0(,%r12,4),%rdx
xor    %esi,%esi
call   1040 <memset@plt>
cmp    $0x1,%r12d
mov    %r13,%r11
jne    1920 <intersection_area_circle_triangle+0x7b0>
xor    %eax,%eax
test   $0x1,%r12b
jne    1ac0 <intersection_area_circle_triangle+0x950>
mov    %rax,%rcx
jmp    1af0 <intersection_area_circle_triangle+0x980>
nop
mov    %rbp,0x10(%rsp)
lea    -0x1(%r12),%rbp
lea    0x0(%r13,%r13,1),%esi
mov    %ebp,%ecx
add    %ecx,%ecx
setb   %r8b
lea    (%rcx,%r13,2),%edi
mov    %rbp,%rax
mov    $0x10,%edx
mul    %rdx
seto   %dl
cmp    %esi,%edi
jl     1b57 <intersection_area_circle_triangle+0x9e7>
test   %r8b,%r8b
jne    1b57 <intersection_area_circle_triangle+0x9e7>
shr    $0x20,%rbp
jne    1b57 <intersection_area_circle_triangle+0x9e7>
lea    0x1(%r13,%r13,1),%edi
lea    (%rcx,%r13,2),%ecx
add    $0x1,%ecx
cmp    %edi,%ecx
jl     1b57 <intersection_area_circle_triangle+0x9e7>
test   %r8b,%r8b
jne    1b57 <intersection_area_circle_triangle+0x9e7>
test   %rbp,%rbp
jne    1b57 <intersection_area_circle_triangle+0x9e7>
movslq %esi,%rcx
lea    (%rsp,%rcx,8),%rdi
add    $0xc0,%rdi
lea    (%rdi,%rax,1),%rbp
cmp    %rdi,%rbp
jb     1b57 <intersection_area_circle_triangle+0x9e7>
test   %dl,%dl
jne    1b57 <intersection_area_circle_triangle+0x9e7>
lea    0xc8(%rsp),%rdi
lea    (%rdi,%rcx,8),%rcx
add    %rcx,%rax
cmp    %rcx,%rax
mov    0x10(%rsp),%rbp
jb     190b <intersection_area_circle_triangle+0x79b>
test   %dl,%dl
jne    190b <intersection_area_circle_triangle+0x79b>
mov    %r12d,%eax
and    $0xfffffffe,%eax
lea    -0x2(%rax),%rcx
mov    %rcx,%r8
shr    %r8
add    $0x1,%r8
test   %rcx,%rcx
je     1b6d <intersection_area_circle_triangle+0x9fd>
mov    %r8,%rdi
and    $0xfffffffffffffffe,%rdi
add    $0x5,%esi
mov    %rbp,%rcx
xor    %edx,%edx
mov    (%rsp),%r9d
mov    %r11,%r13
cs nopw 0x0(%rax,%rax,1)
nop
movaps -0x20(%rcx),%xmm0
movaps -0x10(%rcx),%xmm1
lea    -0x4(%rsi),%ebp
movslq %ebp,%rbp
movaps %xmm1,0xc8(%rsp,%rbp,8)
movaps %xmm0,0xb8(%rsp,%rbp,8)
movapd (%rcx),%xmm0
movapd 0x10(%rcx),%xmm1
movslq %esi,%rsi
movapd %xmm1,0xc8(%rsp,%rsi,8)
movapd %xmm0,0xb8(%rsp,%rsi,8)
add    $0x4,%rdx
add    $0x8,%esi
add    $0x40,%rcx
add    $0xfffffffffffffffe,%rdi
jne    1a10 <intersection_area_circle_triangle+0x8a0>
test   $0x1,%r8b
je     1a9c <intersection_area_circle_triangle+0x92c>
lea    (%rdx,%r13,1),%ecx
add    0x20(%rsp),%rdx
shl    $0x4,%rdx
movapd 0x1a0(%rsp,%rdx,1),%xmm0
movapd 0x1b0(%rsp,%rdx,1),%xmm1
add    %ecx,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movapd %xmm1,0xc8(%rsp,%rcx,8)
movapd %xmm0,0xb8(%rsp,%rcx,8)
cmp    %r12,%rax
mov    0x10(%rsp),%rbp
je     1880 <intersection_area_circle_triangle+0x710>
add    %rax,%r14
test   $0x1,%r12b
je     1917 <intersection_area_circle_triangle+0x7a7>
nopw   0x0(%rax,%rax,1)
mov    0x20(%rsp),%rdx
add    %rax,%rdx
shl    $0x4,%rdx
lea    (%r14,%r14,1),%ecx
movslq %ecx,%rcx
movapd 0x1a0(%rsp,%rdx,1),%xmm0
movapd %xmm0,0xc0(%rsp,%rcx,8)
add    $0x1,%r14
mov    %rax,%rcx
or     $0x1,%rcx
mov    (%rsp),%r9d
mov    %r11,%r13
not    %rax
add    %r12,%rax
je     1880 <intersection_area_circle_triangle+0x710>
mov    %r12,%rax
sub    %rcx,%rax
add    %r14d,%r14d
add    %r15,%rcx
shl    $0x4,%rcx
add    %rsp,%rcx
add    $0x1a0,%rcx
nopl   (%rax)
movslq %r14d,%r14
movaps -0x10(%rcx),%xmm0
movaps %xmm0,0xc0(%rsp,%r14,8)
lea    0x2(%r14),%edx
movslq %edx,%rdx
movapd (%rcx),%xmm0
movapd %xmm0,0xc0(%rsp,%rdx,8)
add    $0x4,%r14d
add    $0x20,%rcx
add    $0xfffffffffffffffe,%rax
jne    1b20 <intersection_area_circle_triangle+0x9b0>
jmp    1880 <intersection_area_circle_triangle+0x710>
xor    %eax,%eax
mov    0x10(%rsp),%rbp
test   $0x1,%r12b
jne    1ac0 <intersection_area_circle_triangle+0x950>
jmp    1917 <intersection_area_circle_triangle+0x7a7>
xor    %edx,%edx
mov    (%rsp),%r9d
mov    %r11,%r13
test   $0x1,%r8b
jne    1a63 <intersection_area_circle_triangle+0x8f3>
jmp    1a9c <intersection_area_circle_triangle+0x92c>
cmp    $0x3,%r13d
jge    1b98 <intersection_area_circle_triangle+0xa28>
movsd  0x475(%rip),%xmm5
jmp    1325 <intersection_area_circle_triangle+0x1b5>
xor    %ebx,%ebx
lea    0xc0(%rsp),%rsi
mov    %r13d,%edi
xor    %eax,%eax
call   1080 <polygon_area@plt>
mov    %r13,%rdx
xorps  %xmm5,%xmm5
cvtsi2sd %eax,%xmm5
mov    %edx,%r14d
lea    0xc8(%rsp),%rbp
jmp    1be1 <intersection_area_circle_triangle+0xa71>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%rbx
add    $0x10,%rbp
cmp    %rbx,%r14
je     1325 <intersection_area_circle_triangle+0x1b5>
test   %rbx,%rbx
mov    %ebx,%eax
cmove  %edx,%eax
movslq %eax,%rcx
cmpl   $0x0,0x11c(%rsp,%rcx,4)
jne    1bd0 <intersection_area_circle_triangle+0xa60>
cmpl   $0x0,0x120(%rsp,%rbx,4)
jne    1bd0 <intersection_area_circle_triangle+0xa60>
add    $0xffffffff,%eax
lea    (%rax,%rax,1),%ecx
movslq %ecx,%rcx
movsd  -0x8(%rbp),%xmm0
movsd  0x0(%rbp),%xmm1
subsd  0xc0(%rsp,%rcx,8),%xmm0
lea    0x1(%rax,%rax,1),%eax
cltq
subsd  0xc0(%rsp,%rax,8),%xmm1
movapd %xmm5,(%rsp)
call   1060 <hypot@plt>
movapd %xmm0,%xmm1
movsd  0x38(%rsp),%xmm0
mov    $0x2,%al
call   1070 <CircularSectorArea@plt>
movapd (%rsp),%xmm5
mov    %r13,%rdx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  %xmm0,%xmm5
jmp    1bd0 <intersection_area_circle_triangle+0xa60>

LLVM IR (-O0):
define double @intersection_area_circle_triangle(double %0, double* %1, double* %2, double* %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double*
%8 = alloca double*
%9 = alloca double*
%10 = alloca [2 x double]
%11 = alloca i32
%12 = alloca i32
%13 = alloca double
%14 = alloca double
%15 = alloca i32
%16 = alloca [6 x double]
%17 = alloca [6 x double]
%18 = alloca [3 x double]
%19 = alloca [6 x double]
%20 = alloca [3 x double]
%21 = alloca [3 x double]
%22 = alloca [12 x double]
%23 = alloca [3 x i32]
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca double
%29 = alloca double
%30 = alloca double
%31 = alloca double
%32 = alloca double
%33 = alloca double
%34 = alloca double
%35 = alloca double
%36 = alloca [6 x i32]
%37 = alloca [12 x double]
%38 = alloca i32
%39 = alloca double
%40 = alloca i32
store double %0, double* %6
store double* %1, double** %7
store double* %2, double** %8
store double* %3, double** %9
%41 = bitcast [2 x double]* %10 to i8*
%42 = load double, double* %6
%43 = fdiv double 1.000000e+00, %42
store double %43, double* %13
%44 = load double, double* %6
%45 = load double, double* %6
%46 = fmul double %44, %45
%47 = fdiv double 1.000000e+00, %46
store double %47, double* %14
store i32 0, i32* %15
%48 = load double*, double** %7
%49 = getelementptr inbounds double, double* %48, i64 0
%50 = load double, double* %49
%51 = getelementptr inbounds [6 x double], [6 x double]* %16, i64 0, i64 0
store double %50, double* %51
%52 = load double*, double** %7
%53 = getelementptr inbounds double, double* %52, i64 1
%54 = load double, double* %53
%55 = getelementptr inbounds [6 x double], [6 x double]* %16, i64 0, i64 1
store double %54, double* %55
%56 = load double*, double** %7
%57 = getelementptr inbounds double, double* %56, i64 0
%58 = load double, double* %57
%59 = load double*, double** %8
%60 = getelementptr inbounds double, double* %59, i64 0
%61 = load double, double* %60
%62 = fadd double %58, %61
%63 = getelementptr inbounds [6 x double], [6 x double]* %16, i64 0, i64 2
store double %62, double* %63
%64 = load double*, double** %7
%65 = getelementptr inbounds double, double* %64, i64 1
%66 = load double, double* %65
%67 = load double*, double** %8
%68 = getelementptr inbounds double, double* %67, i64 1
%69 = load double, double* %68
%70 = fadd double %66, %69
%71 = getelementptr inbounds [6 x double], [6 x double]* %16, i64 0, i64 3
store double %70, double* %71
%72 = load double*, double** %7
%73 = getelementptr inbounds double, double* %72, i64 0
%74 = load double, double* %73
%75 = load double*, double** %9
%76 = getelementptr inbounds double, double* %75, i64 0
%77 = load double, double* %76
%78 = fadd double %74, %77
%79 = getelementptr inbounds [6 x double], [6 x double]* %16, i64 0, i64 4
store double %78, double* %79
%80 = load double*, double** %7
%81 = getelementptr inbounds double, double* %80, i64 1
%82 = load double, double* %81
%83 = load double*, double** %9
%84 = getelementptr inbounds double, double* %83, i64 1
%85 = load double, double* %84
%86 = fadd double %82, %85
%87 = getelementptr inbounds [6 x double], [6 x double]* %16, i64 0, i64 5
store double %86, double* %87
%88 = getelementptr inbounds [6 x double], [6 x double]* %17, i64 0, i64 0
store double 0.000000e+00, double* %88
%89 = getelementptr inbounds [6 x double], [6 x double]* %17, i64 0, i64 1
store double 0.000000e+00, double* %89
%90 = load double*, double** %8
%91 = getelementptr inbounds double, double* %90, i64 0
%92 = load double, double* %91
%93 = getelementptr inbounds [6 x double], [6 x double]* %17, i64 0, i64 2
store double %92, double* %93
%94 = load double*, double** %8
%95 = getelementptr inbounds double, double* %94, i64 1
%96 = load double, double* %95
%97 = getelementptr inbounds [6 x double], [6 x double]* %17, i64 0, i64 3
store double %96, double* %97
%98 = load double*, double** %9
%99 = getelementptr inbounds double, double* %98, i64 0
%100 = load double, double* %99
%101 = getelementptr inbounds [6 x double], [6 x double]* %17, i64 0, i64 4
store double %100, double* %101
%102 = load double*, double** %9
%103 = getelementptr inbounds double, double* %102, i64 1
%104 = load double, double* %103
%105 = getelementptr inbounds [6 x double], [6 x double]* %17, i64 0, i64 5
store double %104, double* %105
store i32 0, i32* %11
br label %106
106: ; preds = %139, %4
%107 = load i32, i32* %11
%108 = icmp slt i32 %107, 3
br i1 %108, label %109, label %142
109: ; preds = %106
%110 = load i32, i32* %11
%111 = mul nsw i32 2, %110
%112 = add nsw i32 %111, 0
%113 = sext i32 %112 to i64
%114 = getelementptr inbounds [6 x double], [6 x double]* %16, i64 0, i64 %113
%115 = load double, double* %114
%116 = load i32, i32* %11
%117 = mul nsw i32 2, %116
%118 = add nsw i32 %117, 1
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds [6 x double], [6 x double]* %16, i64 0, i64 %119
%121 = load double, double* %120
%122 = call double @hypot(double %115, double %121)
%123 = load double, double* %13
%124 = fmul double %122, %123
%125 = load i32, i32* %11
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds [3 x double], [3 x double]* %18, i64 0, i64 %126
store double %124, double* %127
%128 = load i32, i32* %11
%129 = sext i32 %128 to i64
%130 = getelementptr inbounds [3 x double], [3 x double]* %18, i64 0, i64 %129
%131 = load double, double* %130
%132 = fcmp ole double %131, 1.000000e+00
br i1 %132, label %133, label %138
133: ; preds = %109
%134 = load i32, i32* %11
%135 = shl i32 1, %134
%136 = load i32, i32* %15
%137 = or i32 %136, %135
store i32 %137, i32* %15
br label %138
138: ; preds = %133, %109
br label %139
139: ; preds = %138
%140 = load i32, i32* %11
%141 = add nsw i32 %140, 1
store i32 %141, i32* %11
br label %106
142: ; preds = %106
%143 = load double*, double** %7
%144 = load double*, double** %8
%145 = load double*, double** %9
%146 = getelementptr inbounds [2 x double], [2 x double]* %10, i64 0, i64 0
%147 = call i32 (double*, double*, double*, double*, ...) bitcast (i32 (...)* @TriangleContainsPoint to i32 (double*, double*, double*, double*, ...)*)(double* %143, double* %144, double* %145, double* %146)
%148 = icmp ne i32 %147, 0
br i1 %148, label %149, label %152
149: ; preds = %142
%150 = load i32, i32* %15
%151 = or i32 %150, 8
store i32 %151, i32* %15
br label %152
152: ; preds = %149, %142
%153 = load i32, i32* %15
%154 = and i32 %153, 7
%155 = icmp eq i32 %154, 7
br i1 %155, label %156, label %164
156: ; preds = %152
%157 = getelementptr inbounds [2 x double], [2 x double]* %10, i64 0, i64 0
%158 = load double*, double** %8
%159 = load double*, double** %9
%160 = call i32 (double*, double*, double*, ...) bitcast (i32 (...)* @LeftTurn to i32 (double*, double*, double*, ...)*)(double* %157, double* %158, double* %159)
%161 = sitofp i32 %160 to double
%162 = call double @llvm.fabs.f64(double %161)
%163 = fmul double 5.000000e-01, %162
store double %163, double* %5
br label %823
164: ; preds = %152
%165 = load double*, double** %8
%166 = getelementptr inbounds double, double* %165, i64 0
%167 = load double, double* %166
%168 = getelementptr inbounds [6 x double], [6 x double]* %19, i64 0, i64 0
store double %167, double* %168
%169 = load double*, double** %8
%170 = getelementptr inbounds double, double* %169, i64 1
%171 = load double, double* %170
%172 = getelementptr inbounds [6 x double], [6 x double]* %19, i64 0, i64 1
store double %171, double* %172
%173 = load double*, double** %9
%174 = getelementptr inbounds double, double* %173, i64 0
%175 = load double, double* %174
%176 = load double*, double** %8
%177 = getelementptr inbounds double, double* %176, i64 0
%178 = load double, double* %177
%179 = fsub double %175, %178
%180 = getelementptr inbounds [6 x double], [6 x double]* %19, i64 0, i64 2
store double %179, double* %180
%181 = load double*, double** %9
%182 = getelementptr inbounds double, double* %181, i64 1
%183 = load double, double* %182
%184 = load double*, double** %8
%185 = getelementptr inbounds double, double* %184, i64 1
%186 = load double, double* %185
%187 = fsub double %183, %186
%188 = getelementptr inbounds [6 x double], [6 x double]* %19, i64 0, i64 3
store double %187, double* %188
%189 = load double*, double** %9
%190 = getelementptr inbounds double, double* %189, i64 0
%191 = load double, double* %190
%192 = fneg double %191
%193 = getelementptr inbounds [6 x double], [6 x double]* %19, i64 0, i64 4
store double %192, double* %193
%194 = load double*, double** %9
%195 = getelementptr inbounds double, double* %194, i64 1
%196 = load double, double* %195
%197 = fneg double %196
%198 = getelementptr inbounds [6 x double], [6 x double]* %19, i64 0, i64 5
store double %197, double* %198
store i32 0, i32* %11
br label %199
199: ; preds = %221, %164
%200 = load i32, i32* %11
%201 = icmp slt i32 %200, 3
br i1 %201, label %202, label %224
202: ; preds = %199
%203 = load i32, i32* %11
%204 = mul nsw i32 2, %203
%205 = add nsw i32 %204, 0
%206 = sext i32 %205 to i64
%207 = getelementptr inbounds [6 x double], [6 x double]* %19, i64 0, i64 %206
%208 = load double, double* %207
%209 = load i32, i32* %11
%210 = mul nsw i32 2, %209
%211 = add nsw i32 %210, 1
%212 = sext i32 %211 to i64
%213 = getelementptr inbounds [6 x double], [6 x double]* %19, i64 0, i64 %212
%214 = load double, double* %213
%215 = call double @hypot(double %208, double %214)
%216 = load double, double* %13
%217 = fmul double %215, %216
%218 = load i32, i32* %11
%219 = sext i32 %218 to i64
%220 = getelementptr inbounds [3 x double], [3 x double]* %20, i64 0, i64 %219
store double %217, double* %220
br label %221
221: ; preds = %202
%222 = load i32, i32* %11
%223 = add nsw i32 %222, 1
store i32 %223, i32* %11
br label %199
224: ; preds = %199
store i32 0, i32* %11
br label %225
225: ; preds = %260, %224
%226 = load i32, i32* %11
%227 = icmp slt i32 %226, 3
br i1 %227, label %228, label %263
228: ; preds = %225
%229 = load i32, i32* %11
%230 = mul nsw i32 2, %229
%231 = add nsw i32 %230, 0
%232 = sext i32 %231 to i64
%233 = getelementptr inbounds [6 x double], [6 x double]* %16, i64 0, i64 %232
%234 = load double, double* %233
%235 = load i32, i32* %11
%236 = mul nsw i32 2, %235
%237 = add nsw i32 %236, 0
%238 = sext i32 %237 to i64
%239 = getelementptr inbounds [6 x double], [6 x double]* %19, i64 0, i64 %238
%240 = load double, double* %239
%241 = load i32, i32* %11
%242 = mul nsw i32 2, %241
%243 = add nsw i32 %242, 1
%244 = sext i32 %243 to i64
%245 = getelementptr inbounds [6 x double], [6 x double]* %16, i64 0, i64 %244
%246 = load double, double* %245
%247 = load i32, i32* %11
%248 = mul nsw i32 2, %247
%249 = add nsw i32 %248, 1
%250 = sext i32 %249 to i64
%251 = getelementptr inbounds [6 x double], [6 x double]* %19, i64 0, i64 %250
%252 = load double, double* %251
%253 = fmul double %246, %252
%254 = call double @llvm.fmuladd.f64(double %234, double %240, double %253)
%255 = load double, double* %14
%256 = fmul double %254, %255
%257 = load i32, i32* %11
%258 = sext i32 %257 to i64
%259 = getelementptr inbounds [3 x double], [3 x double]* %21, i64 0, i64 %258
store double %256, double* %259
br label %260
260: ; preds = %228
%261 = load i32, i32* %11
%262 = add nsw i32 %261, 1
store i32 %262, i32* %11
br label %225
263: ; preds = %225
store i32 0, i32* %24
store i32 0, i32* %11
br label %264
264: ; preds = %554, %263
%265 = load i32, i32* %11
%266 = icmp slt i32 %265, 3
br i1 %266, label %267, label %557
267: ; preds = %264
%268 = load i32, i32* %11
%269 = add nsw i32 %268, 1
%270 = srem i32 %269, 3
store i32 %270, i32* %25
%271 = load i32, i32* %15
%272 = load i32, i32* %11
%273 = shl i32 1, %272
%274 = and i32 %271, %273
%275 = icmp ne i32 %274, 0
%276 = zext i1 %275 to i64
%277 = select i1 %275, i32 1, i32 0
store i32 %277, i32* %26
%278 = load i32, i32* %15
%279 = load i32, i32* %25
%280 = shl i32 1, %279
%281 = and i32 %278, %280
%282 = icmp ne i32 %281, 0
%283 = zext i1 %282 to i64
%284 = select i1 %282, i32 1, i32 0
store i32 %284, i32* %27
%285 = load i32, i32* %26
%286 = icmp ne i32 %285, 0
br i1 %286, label %287, label %294
287: ; preds = %267
%288 = load i32, i32* %27
%289 = icmp ne i32 %288, 0
br i1 %289, label %290, label %294
290: ; preds = %287
%291 = load i32, i32* %11
%292 = sext i32 %291 to i64
%293 = getelementptr inbounds [3 x i32], [3 x i32]* %23, i64 0, i64 %292
store i32 0, i32* %293
br label %553
294: ; preds = %287, %267
%295 = load i32, i32* %11
%296 = sext i32 %295 to i64
%297 = getelementptr inbounds [3 x double], [3 x double]* %20, i64 0, i64 %296
%298 = load double, double* %297
%299 = load i32, i32* %11
%300 = sext i32 %299 to i64
%301 = getelementptr inbounds [3 x double], [3 x double]* %20, i64 0, i64 %300
%302 = load double, double* %301
%303 = fmul double %298, %302
%304 = fdiv double 1.000000e+00, %303
store double %304, double* %28
%305 = load i32, i32* %11
%306 = sext i32 %305 to i64
%307 = getelementptr inbounds [3 x double], [3 x double]* %21, i64 0, i64 %306
%308 = load double, double* %307
%309 = load i32, i32* %11
%310 = sext i32 %309 to i64
%311 = getelementptr inbounds [3 x double], [3 x double]* %21, i64 0, i64 %310
%312 = load double, double* %311
%313 = fmul double %308, %312
%314 = load double, double* %28
%315 = load i32, i32* %11
%316 = sext i32 %315 to i64
%317 = getelementptr inbounds [3 x double], [3 x double]* %18, i64 0, i64 %316
%318 = load double, double* %317
%319 = load i32, i32* %11
%320 = sext i32 %319 to i64
%321 = getelementptr inbounds [3 x double], [3 x double]* %18, i64 0, i64 %320
%322 = load double, double* %321
%323 = call double @llvm.fmuladd.f64(double %318, double %322, double -1.000000e+00)
%324 = fneg double %323
%325 = call double @llvm.fmuladd.f64(double %313, double %314, double %324)
%326 = load double, double* %28
%327 = fmul double %325, %326
store double %327, double* %29
%328 = load i32, i32* %11
%329 = sext i32 %328 to i64
%330 = getelementptr inbounds [3 x double], [3 x double]* %21, i64 0, i64 %329
%331 = load double, double* %330
%332 = fneg double %331
%333 = load double, double* %28
%334 = fmul double %332, %333
store double %334, double* %30
%335 = load i32, i32* %26
%336 = load i32, i32* %27
%337 = icmp ne i32 %335, %336
br i1 %337, label %338, label %428
338: ; preds = %294
%339 = load i32, i32* %11
%340 = sext i32 %339 to i64
%341 = getelementptr inbounds [3 x i32], [3 x i32]* %23, i64 0, i64 %340
store i32 1, i32* %341
%342 = load i32, i32* %24
%343 = add nsw i32 %342, 1
store i32 %343, i32* %24
%344 = load double, double* %29
%345 = fcmp olt double %344, 0.000000e+00
br i1 %345, label %346, label %347
346: ; preds = %338
store double 0.000000e+00, double* %29
br label %347
347: ; preds = %346, %338
%348 = load double, double* %29
%349 = call double @sqrt(double %348)
store double %349, double* %29
%350 = load double, double* %30
%351 = load double, double* %29
%352 = fadd double %350, %351
store double %352, double* %31
%353 = load double, double* %30
%354 = load double, double* %29
%355 = fsub double %353, %354
store double %355, double* %32
%356 = load double, double* %31
%357 = fcmp ogt double %356, 5.000000e-01
br i1 %357, label %358, label %362
358: ; preds = %347
%359 = load double, double* %31
%360 = fsub double %359, 1.000000e+00
%361 = call double @llvm.fabs.f64(double %360)
store double %361, double* %33
br label %365
362: ; preds = %347
%363 = load double, double* %31
%364 = call double @llvm.fabs.f64(double %363)
store double %364, double* %33
br label %365
365: ; preds = %362, %358
%366 = load double, double* %32
%367 = fcmp ogt double %366, 5.000000e-01
br i1 %367, label %368, label %372
368: ; preds = %365
%369 = load double, double* %32
%370 = fsub double %369, 1.000000e+00
%371 = call double @llvm.fabs.f64(double %370)
store double %371, double* %34
br label %375
372: ; preds = %365
%373 = load double, double* %32
%374 = call double @llvm.fabs.f64(double %373)
store double %374, double* %34
br label %375
375: ; preds = %372, %368
%376 = load double, double* %34
%377 = load double, double* %33
%378 = fcmp olt double %376, %377
br i1 %378, label %379, label %381
379: ; preds = %375
%380 = load double, double* %32
store double %380, double* %31
br label %381
381: ; preds = %379, %375
%382 = load double, double* %31
%383 = fcmp olt double %382, 0.000000e+00
br i1 %383, label %384, label %385
384: ; preds = %381
store double 0.000000e+00, double* %31
br label %385
385: ; preds = %384, %381
%386 = load double, double* %31
%387 = fcmp ogt double %386, 1.000000e+00
br i1 %387, label %388, label %389
388: ; preds = %385
store double 1.000000e+00, double* %31
br label %389
389: ; preds = %388, %385
%390 = load i32, i32* %11
%391 = mul nsw i32 2, %390
%392 = add nsw i32 %391, 0
%393 = sext i32 %392 to i64
%394 = getelementptr inbounds [6 x double], [6 x double]* %17, i64 0, i64 %393
%395 = load double, double* %394
%396 = load double, double* %31
%397 = load i32, i32* %11
%398 = mul nsw i32 2, %397
%399 = add nsw i32 %398, 0
%400 = sext i32 %399 to i64
%401 = getelementptr inbounds [6 x double], [6 x double]* %19, i64 0, i64 %400
%402 = load double, double* %401
%403 = call double @llvm.fmuladd.f64(double %396, double %402, double %395)
%404 = load i32, i32* %11
%405 = mul nsw i32 4, %404
%406 = add nsw i32 %405, 0
%407 = sext i32 %406 to i64
%408 = getelementptr inbounds [12 x double], [12 x double]* %22, i64 0, i64 %407
store double %403, double* %408
%409 = load i32, i32* %11
%410 = mul nsw i32 2, %409
%411 = add nsw i32 %410, 1
%412 = sext i32 %411 to i64
%413 = getelementptr inbounds [6 x double], [6 x double]* %17, i64 0, i64 %412
%414 = load double, double* %413
%415 = load double, double* %31
%416 = load i32, i32* %11
%417 = mul nsw i32 2, %416
%418 = add nsw i32 %417, 1
%419 = sext i32 %418 to i64
%420 = getelementptr inbounds [6 x double], [6 x double]* %19, i64 0, i64 %419
%421 = load double, double* %420
%422 = call double @llvm.fmuladd.f64(double %415, double %421, double %414)
%423 = load i32, i32* %11
%424 = mul nsw i32 4, %423
%425 = add nsw i32 %424, 1
%426 = sext i32 %425 to i64
%427 = getelementptr inbounds [12 x double], [12 x double]* %22, i64 0, i64 %426
store double %422, double* %427
br label %552
428: ; preds = %294
%429 = load double, double* %29
%430 = fcmp ole double %429, 0.000000e+00
br i1 %430, label %431, label %435
431: ; preds = %428
%432 = load i32, i32* %11
%433 = sext i32 %432 to i64
%434 = getelementptr inbounds [3 x i32], [3 x i32]* %23, i64 0, i64 %433
store i32 0, i32* %434
br label %551
435: ; preds = %428
%436 = load double, double* %29
%437 = call double @sqrt(double %436)
store double %437, double* %29
%438 = load i32, i32* %11
%439 = sext i32 %438 to i64
%440 = getelementptr inbounds [3 x i32], [3 x i32]* %23, i64 0, i64 %439
store i32 0, i32* %440
%441 = load double, double* %30
%442 = load double, double* %29
%443 = fsub double %441, %442
store double %443, double* %31
%444 = load double, double* %30
%445 = load double, double* %29
%446 = fadd double %444, %445
store double %446, double* %32
%447 = load double, double* %31
%448 = fcmp olt double 0.000000e+00, %447
br i1 %448, label %449, label %550
449: ; preds = %435
%450 = load double, double* %31
%451 = fcmp olt double %450, 1.000000e+00
br i1 %451, label %452, label %550
452: ; preds = %449
%453 = load double, double* %32
%454 = fcmp olt double 0.000000e+00, %453
br i1 %454, label %455, label %550
455: ; preds = %452
%456 = load double, double* %32
%457 = fcmp olt double %456, 1.000000e+00
br i1 %457, label %458, label %550
458: ; preds = %455
%459 = load i32, i32* %11
%460 = mul nsw i32 2, %459
%461 = add nsw i32 %460, 0
%462 = sext i32 %461 to i64
%463 = getelementptr inbounds [6 x double], [6 x double]* %17, i64 0, i64 %462
%464 = load double, double* %463
%465 = load double, double* %31
%466 = load i32, i32* %11
%467 = mul nsw i32 2, %466
%468 = add nsw i32 %467, 0
%469 = sext i32 %468 to i64
%470 = getelementptr inbounds [6 x double], [6 x double]* %19, i64 0, i64 %469
%471 = load double, double* %470
%472 = call double @llvm.fmuladd.f64(double %465, double %471, double %464)
%473 = load i32, i32* %11
%474 = mul nsw i32 2, %473
%475 = add nsw i32 %474, 0
%476 = mul nsw i32 2, %475
%477 = add nsw i32 %476, 0
%478 = sext i32 %477 to i64
%479 = getelementptr inbounds [12 x double], [12 x double]* %22, i64 0, i64 %478
store double %472, double* %479
%480 = load i32, i32* %11
%481 = mul nsw i32 2, %480
%482 = add nsw i32 %481, 1
%483 = sext i32 %482 to i64
%484 = getelementptr inbounds [6 x double], [6 x double]* %17, i64 0, i64 %483
%485 = load double, double* %484
%486 = load double, double* %31
%487 = load i32, i32* %11
%488 = mul nsw i32 2, %487
%489 = add nsw i32 %488, 1
%490 = sext i32 %489 to i64
%491 = getelementptr inbounds [6 x double], [6 x double]* %19, i64 0, i64 %490
%492 = load double, double* %491
%493 = call double @llvm.fmuladd.f64(double %486, double %492, double %485)
%494 = load i32, i32* %11
%495 = mul nsw i32 2, %494
%496 = add nsw i32 %495, 0
%497 = mul nsw i32 2, %496
%498 = add nsw i32 %497, 1
%499 = sext i32 %498 to i64
%500 = getelementptr inbounds [12 x double], [12 x double]* %22, i64 0, i64 %499
store double %493, double* %500
%501 = load i32, i32* %11
%502 = mul nsw i32 2, %501
%503 = add nsw i32 %502, 0
%504 = sext i32 %503 to i64
%505 = getelementptr inbounds [6 x double], [6 x double]* %17, i64 0, i64 %504
%506 = load double, double* %505
%507 = load double, double* %31
%508 = load i32, i32* %11
%509 = mul nsw i32 2, %508
%510 = add nsw i32 %509, 0
%511 = sext i32 %510 to i64
%512 = getelementptr inbounds [6 x double], [6 x double]* %19, i64 0, i64 %511
%513 = load double, double* %512
%514 = call double @llvm.fmuladd.f64(double %507, double %513, double %506)
%515 = load i32, i32* %11
%516 = mul nsw i32 2, %515
%517 = add nsw i32 %516, 1
%518 = mul nsw i32 2, %517
%519 = add nsw i32 %518, 0
%520 = sext i32 %519 to i64
%521 = getelementptr inbounds [12 x double], [12 x double]* %22, i64 0, i64 %520
store double %514, double* %521
%522 = load i32, i32* %11
%523 = mul nsw i32 2, %522
%524 = add nsw i32 %523, 1
%525 = sext i32 %524 to i64
%526 = getelementptr inbounds [6 x double], [6 x double]* %17, i64 0, i64 %525
%527 = load double, double* %526
%528 = load double, double* %31
%529 = load i32, i32* %11
%530 = mul nsw i32 2, %529
%531 = add nsw i32 %530, 1
%532 = sext i32 %531 to i64
%533 = getelementptr inbounds [6 x double], [6 x double]* %19, i64 0, i64 %532
%534 = load double, double* %533
%535 = call double @llvm.fmuladd.f64(double %528, double %534, double %527)
%536 = load i32, i32* %11
%537 = mul nsw i32 2, %536
%538 = add nsw i32 %537, 1
%539 = mul nsw i32 2, %538
%540 = add nsw i32 %539, 1
%541 = sext i32 %540 to i64
%542 = getelementptr inbounds [12 x double], [12 x double]* %22, i64 0, i64 %541
store double %535, double* %542
%543 = load i32, i32* %11
%544 = sext i32 %543 to i64
%545 = getelementptr inbounds [3 x i32], [3 x i32]* %23, i64 0, i64 %544
%546 = load i32, i32* %545
%547 = add nsw i32 %546, 2
store i32 %547, i32* %545
%548 = load i32, i32* %24
%549 = add nsw i32 %548, 2
store i32 %549, i32* %24
br label %550
550: ; preds = %458, %455, %452, %449, %435
br label %551
551: ; preds = %550, %431
br label %552
552: ; preds = %551, %389
br label %553
553: ; preds = %552, %290
br label %554
554: ; preds = %553
%555 = load i32, i32* %11
%556 = add nsw i32 %555, 1
store i32 %556, i32* %11
br label %264
557: ; preds = %264
%558 = load i32, i32* %24
%559 = icmp eq i32 0, %558
br i1 %559, label %560, label %575
560: ; preds = %557
%561 = load i32, i32* %15
%562 = and i32 %561, 7
%563 = icmp eq i32 %562, 7
br i1 %563, label %564, label %565
564: ; preds = %560
store double -1.000000e+00, double* %5
br label %823
565: ; preds = %560
%566 = load i32, i32* %15
%567 = and i32 %566, 8
%568 = icmp ne i32 %567, 0
br i1 %568, label %569, label %574
569: ; preds = %565
%570 = load double, double* %6
%571 = fmul double 0x400921FB54442D18, %570
%572 = load double, double* %6
%573 = fmul double %571, %572
store double %573, double* %5
br label %823
574: ; preds = %565
store double 0.000000e+00, double* %5
br label %823
575: ; preds = %557
%576 = load i32, i32* %24
%577 = icmp eq i32 2, %576
br i1 %577, label %578, label %654
578: ; preds = %575
%579 = getelementptr inbounds [3 x i32], [3 x i32]* %23, i64 0, i64 0
%580 = load i32, i32* %579
%581 = icmp slt i32 %580, 2
br i1 %581, label %582, label %591
582: ; preds = %578
%583 = getelementptr inbounds [3 x i32], [3 x i32]* %23, i64 0, i64 1
%584 = load i32, i32* %583
%585 = icmp slt i32 %584, 2
br i1 %585, label %586, label %591
586: ; preds = %582
%587 = getelementptr inbounds [3 x i32], [3 x i32]* %23, i64 0, i64 2
%588 = load i32, i32* %587
%589 = icmp slt i32 %588, 2
br i1 %589, label %590, label %591
590: ; preds = %586
br label %653
591: ; preds = %586, %582, %578
store i32 0, i32* %11
br label %592
592: ; preds = %603, %591
%593 = load i32, i32* %11
%594 = icmp slt i32 %593, 3
br i1 %594, label %595, label %606
595: ; preds = %592
%596 = load i32, i32* %11
%597 = sext i32 %596 to i64
%598 = getelementptr inbounds [3 x i32], [3 x i32]* %23, i64 0, i64 %597
%599 = load i32, i32* %598
%600 = icmp sgt i32 %599, 1
br i1 %600, label %601, label %602
601: ; preds = %595
br label %606
602: ; preds = %595
br label %603
603: ; preds = %602
%604 = load i32, i32* %11
%605 = add nsw i32 %604, 1
store i32 %605, i32* %11
br label %592
606: ; preds = %601, %592
%607 = load double, double* %6
%608 = load i32, i32* %11
%609 = mul nsw i32 2, %608
%610 = add nsw i32 %609, 1
%611 = mul nsw i32 2, %610
%612 = add nsw i32 %611, 0
%613 = sext i32 %612 to i64
%614 = getelementptr inbounds [12 x double], [12 x double]* %22, i64 0, i64 %613
%615 = load double, double* %614
%616 = load i32, i32* %11
%617 = mul nsw i32 4, %616
%618 = add nsw i32 %617, 0
%619 = sext i32 %618 to i64
%620 = getelementptr inbounds [12 x double], [12 x double]* %22, i64 0, i64 %619
%621 = load double, double* %620
%622 = fsub double %615, %621
%623 = load i32, i32* %11
%624 = mul nsw i32 2, %623
%625 = add nsw i32 %624, 1
%626 = mul nsw i32 2, %625
%627 = add nsw i32 %626, 1
%628 = sext i32 %627 to i64
%629 = getelementptr inbounds [12 x double], [12 x double]* %22, i64 0, i64 %628
%630 = load double, double* %629
%631 = load i32, i32* %11
%632 = mul nsw i32 4, %631
%633 = add nsw i32 %632, 1
%634 = sext i32 %633 to i64
%635 = getelementptr inbounds [12 x double], [12 x double]* %22, i64 0, i64 %634
%636 = load double, double* %635
%637 = fsub double %630, %636
%638 = call double @hypot(double %622, double %637)
%639 = call i32 (double, double, ...) bitcast (i32 (...)* @CircularSectorArea to i32 (double, double, ...)*)(double %607, double %638)
%640 = sitofp i32 %639 to double
store double %640, double* %35
%641 = load i32, i32* %15
%642 = and i32 %641, 8
%643 = icmp ne i32 %642, 0
br i1 %643, label %644, label %651
644: ; preds = %606
%645 = load double, double* %6
%646 = fmul double 0x400921FB54442D18, %645
%647 = load double, double* %6
%648 = load double, double* %35
%649 = fneg double %648
%650 = call double @llvm.fmuladd.f64(double %646, double %647, double %649)
store double %650, double* %5
br label %823
651: ; preds = %606
%652 = load double, double* %35
store double %652, double* %5
br label %823
653: ; preds = %590
br label %665
654: ; preds = %575
%655 = load i32, i32* %24
%656 = icmp eq i32 4, %655
br i1 %656, label %657, label %658
657: ; preds = %654
br label %664
658: ; preds = %654
%659 = load i32, i32* %24
%660 = icmp eq i32 6, %659
br i1 %660, label %661, label %662
661: ; preds = %658
br label %663
662: ; preds = %658
store double -1.000000e+00, double* %5
br label %823
663: ; preds = %661
br label %664
664: ; preds = %663, %657
br label %665
665: ; preds = %664, %653
br label %666
666: ; preds = %665
store i32 0, i32* %38
store i32 0, i32* %11
br label %667
667: ; preds = %748, %666
%668 = load i32, i32* %11
%669 = icmp slt i32 %668, 3
br i1 %669, label %670, label %751
670: ; preds = %667
%671 = load i32, i32* %15
%672 = load i32, i32* %11
%673 = shl i32 1, %672
%674 = and i32 %671, %673
%675 = icmp ne i32 %674, 0
br i1 %675, label %676, label %703
676: ; preds = %670
%677 = load i32, i32* %11
%678 = mul nsw i32 2, %677
%679 = add nsw i32 %678, 0
%680 = sext i32 %679 to i64
%681 = getelementptr inbounds [6 x double], [6 x double]* %17, i64 0, i64 %680
%682 = load double, double* %681
%683 = load i32, i32* %38
%684 = mul nsw i32 2, %683
%685 = add nsw i32 %684, 0
%686 = sext i32 %685 to i64
%687 = getelementptr inbounds [12 x double], [12 x double]* %37, i64 0, i64 %686
store double %682, double* %687
%688 = load i32, i32* %11
%689 = mul nsw i32 2, %688
%690 = add nsw i32 %689, 1
%691 = sext i32 %690 to i64
%692 = getelementptr inbounds [6 x double], [6 x double]* %17, i64 0, i64 %691
%693 = load double, double* %692
%694 = load i32, i32* %38
%695 = mul nsw i32 2, %694
%696 = add nsw i32 %695, 1
%697 = sext i32 %696 to i64
%698 = getelementptr inbounds [12 x double], [12 x double]* %37, i64 0, i64 %697
store double %693, double* %698
%699 = load i32, i32* %38
%700 = add nsw i32 %699, 1
store i32 %700, i32* %38
%701 = sext i32 %699 to i64
%702 = getelementptr inbounds [6 x i32], [6 x i32]* %36, i64 0, i64 %701
store i32 1, i32* %702
br label %703
703: ; preds = %676, %670
store i32 0, i32* %12
br label %704
704: ; preds = %744, %703
%705 = load i32, i32* %12
%706 = load i32, i32* %11
%707 = sext i32 %706 to i64
%708 = getelementptr inbounds [3 x i32], [3 x i32]* %23, i64 0, i64 %707
%709 = load i32, i32* %708
%710 = icmp slt i32 %705, %709
br i1 %710, label %711, label %747
711: ; preds = %704
%712 = load i32, i32* %11
%713 = mul nsw i32 2, %712
%714 = load i32, i32* %12
%715 = add nsw i32 %713, %714
%716 = mul nsw i32 2, %715
%717 = add nsw i32 %716, 0
%718 = sext i32 %717 to i64
%719 = getelementptr inbounds [12 x double], [12 x double]* %22, i64 0, i64 %718
%720 = load double, double* %719
%721 = load i32, i32* %38
%722 = mul nsw i32 2, %721
%723 = add nsw i32 %722, 0
%724 = sext i32 %723 to i64
%725 = getelementptr inbounds [12 x double], [12 x double]* %37, i64 0, i64 %724
store double %720, double* %725
%726 = load i32, i32* %11
%727 = mul nsw i32 2, %726
%728 = load i32, i32* %12
%729 = add nsw i32 %727, %728
%730 = mul nsw i32 2, %729
%731 = add nsw i32 %730, 1
%732 = sext i32 %731 to i64
%733 = getelementptr inbounds [12 x double], [12 x double]* %22, i64 0, i64 %732
%734 = load double, double* %733
%735 = load i32, i32* %38
%736 = mul nsw i32 2, %735
%737 = add nsw i32 %736, 1
%738 = sext i32 %737 to i64
%739 = getelementptr inbounds [12 x double], [12 x double]* %37, i64 0, i64 %738
store double %734, double* %739
%740 = load i32, i32* %38
%741 = add nsw i32 %740, 1
store i32 %741, i32* %38
%742 = sext i32 %740 to i64
%743 = getelementptr inbounds [6 x i32], [6 x i32]* %36, i64 0, i64 %742
store i32 0, i32* %743
br label %744
744: ; preds = %711
%745 = load i32, i32* %12
%746 = add nsw i32 %745, 1
store i32 %746, i32* %12
br label %704
747: ; preds = %704
br label %748
748: ; preds = %747
%749 = load i32, i32* %11
%750 = add nsw i32 %749, 1
store i32 %750, i32* %11
br label %667
751: ; preds = %667
%752 = load i32, i32* %38
%753 = icmp slt i32 %752, 3
br i1 %753, label %754, label %755
754: ; preds = %751
store double -1.000000e+00, double* %5
br label %823
755: ; preds = %751
%756 = load i32, i32* %38
%757 = getelementptr inbounds [12 x double], [12 x double]* %37, i64 0, i64 0
%758 = call i32 (i32, double*, ...) bitcast (i32 (...)* @polygon_area to i32 (i32, double*, ...)*)(i32 %756, double* %757)
%759 = sitofp i32 %758 to double
store double %759, double* %39
store i32 0, i32* %11
br label %760
760: ; preds = %818, %755
%761 = load i32, i32* %11
%762 = load i32, i32* %38
%763 = icmp slt i32 %761, %762
br i1 %763, label %764, label %821
764: ; preds = %760
%765 = load i32, i32* %11
%766 = sub nsw i32 %765, 1
store i32 %766, i32* %40
%767 = load i32, i32* %40
%768 = icmp slt i32 %767, 0
br i1 %768, label %769, label %772
769: ; preds = %764
%770 = load i32, i32* %38
%771 = sub nsw i32 %770, 1
store i32 %771, i32* %40
br label %772
772: ; preds = %769, %764
%773 = load i32, i32* %40
%774 = sext i32 %773 to i64
%775 = getelementptr inbounds [6 x i32], [6 x i32]* %36, i64 0, i64 %774
%776 = load i32, i32* %775
%777 = icmp eq i32 0, %776
br i1 %777, label %778, label %817
778: ; preds = %772
%779 = load i32, i32* %11
%780 = sext i32 %779 to i64
%781 = getelementptr inbounds [6 x i32], [6 x i32]* %36, i64 0, i64 %780
%782 = load i32, i32* %781
%783 = icmp eq i32 0, %782
br i1 %783, label %784, label %817
784: ; preds = %778
%785 = load double, double* %6
%786 = load i32, i32* %11
%787 = mul nsw i32 2, %786
%788 = add nsw i32 %787, 0
%789 = sext i32 %788 to i64
%790 = getelementptr inbounds [12 x double], [12 x double]* %37, i64 0, i64 %789
%791 = load double, double* %790
%792 = load i32, i32* %40
%793 = mul nsw i32 2, %792
%794 = add nsw i32 %793, 0
%795 = sext i32 %794 to i64
%796 = getelementptr inbounds [12 x double], [12 x double]* %37, i64 0, i64 %795
%797 = load double, double* %796
%798 = fsub double %791, %797
%799 = load i32, i32* %11
%800 = mul nsw i32 2, %799
%801 = add nsw i32 %800, 1
%802 = sext i32 %801 to i64
%803 = getelementptr inbounds [12 x double], [12 x double]* %37, i64 0, i64 %802
%804 = load double, double* %803
%805 = load i32, i32* %40
%806 = mul nsw i32 2, %805
%807 = add nsw i32 %806, 1
%808 = sext i32 %807 to i64
%809 = getelementptr inbounds [12 x double], [12 x double]* %37, i64 0, i64 %808
%810 = load double, double* %809
%811 = fsub double %804, %810
%812 = call double @hypot(double %798, double %811)
%813 = call i32 (double, double, ...) bitcast (i32 (...)* @CircularSectorArea to i32 (double, double, ...)*)(double %785, double %812)
%814 = sitofp i32 %813 to double
%815 = load double, double* %39
%816 = fadd double %815, %814
store double %816, double* %39
br label %817
817: ; preds = %784, %778, %772
br label %818
818: ; preds = %817
%819 = load i32, i32* %11
%820 = add nsw i32 %819, 1
store i32 %820, i32* %11
br label %760
821: ; preds = %760
%822 = load double, double* %39
store double %822, double* %5
br label %823
823: ; preds = %821, %754, %662, %651, %644, %574, %569, %564, %156
%824 = load double, double* %5
ret double %824
}

LLVM IR (-O2):
define double @intersection_area_circle_triangle(double %0, double* %1, double* %2, double* %3) {
%5 = alloca [2 x double]
%6 = alloca [6 x double]
%7 = alloca [3 x double]
%8 = alloca [6 x double]
%9 = alloca [3 x double]
%10 = alloca [3 x double]
%11 = alloca [12 x double]
%12 = alloca [3 x i32]
%13 = alloca [6 x i32]
%14 = alloca [12 x double]
%15 = bitcast [2 x double]* %5 to i8*
%16 = fdiv double 1.000000e+00, %0
%17 = fmul double %0, %0
%18 = load double, double* %1
%19 = getelementptr inbounds double, double* %1, i64 1
%20 = load double, double* %19
%21 = bitcast double* %2 to <2 x double>*
%22 = load <2 x double>, <2 x double>* %21
%23 = extractelement <2 x double> %22, i64 0
%24 = fadd double %18, %23
%25 = extractelement <2 x double> %22, i64 1
%26 = fadd double %20, %25
%27 = bitcast double* %3 to <2 x double>*
%28 = load <2 x double>, <2 x double>* %27
%29 = extractelement <2 x double> %28, i64 0
%30 = fadd double %18, %29
%31 = extractelement <2 x double> %28, i64 1
%32 = fadd double %20, %31
%33 = bitcast [6 x double]* %6 to i8*
%34 = getelementptr inbounds [6 x double], [6 x double]* %6, i64 0, i64 2
%35 = bitcast [6 x double]* %6 to i8*
%36 = bitcast double* %34 to <2 x double>*
store <2 x double> %22, <2 x double>* %36
%37 = getelementptr inbounds [6 x double], [6 x double]* %6, i64 0, i64 4
%38 = bitcast double* %37 to <2 x double>*
store <2 x double> %28, <2 x double>* %38
%39 = bitcast [3 x double]* %7 to i8*
%40 = tail call double @hypot(double %18, double %20)
%41 = fmul double %16, %40
%42 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 0
store double %41, double* %42
%43 = fcmp ole double %41, 1.000000e+00
%44 = zext i1 %43 to i32
%45 = tail call double @hypot(double %24, double %26)
%46 = fmul double %16, %45
%47 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 1
store double %46, double* %47
%48 = fcmp ugt double %46, 1.000000e+00
%49 = select i1 %48, i32 0, i32 2
%50 = or i32 %49, %44
%51 = tail call double @hypot(double %30, double %32)
%52 = fmul double %16, %51
%53 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 2
store double %52, double* %53
%54 = fcmp ugt double %52, 1.000000e+00
%55 = select i1 %54, i32 0, i32 4
%56 = or i32 %55, %50
%57 = fdiv double 1.000000e+00, %17
%58 = getelementptr inbounds [2 x double], [2 x double]* %5, i64 0, i64 0
%59 = call i32 (double*, double*, double*, double*, ...) bitcast (i32 (...)* @TriangleContainsPoint to i32 (double*, double*, double*, double*, ...)*)(double* %1, double* %2, double* %3, double* %58)
%60 = icmp eq i32 %59, 0
%61 = or i32 %56, 8
%62 = select i1 %60, i32 %56, i32 %61
%63 = and i32 %62, 7
%64 = icmp eq i32 %63, 7
br i1 %64, label %65, label %70
65: ; preds = %4
%66 = call i32 (double*, double*, double*, ...) bitcast (i32 (...)* @LeftTurn to i32 (double*, double*, double*, ...)*)(double* %58, double* %2, double* %3)
%67 = sitofp i32 %66 to double
%68 = call double @llvm.fabs.f64(double %67)
%69 = fmul double %68, 5.000000e-01
br label %536
70: ; preds = %4
%71 = bitcast [6 x double]* %8 to i8*
%72 = bitcast double* %2 to <2 x double>*
%73 = load <2 x double>, <2 x double>* %72
%74 = bitcast [6 x double]* %8 to <2 x double>*
store <2 x double> %73, <2 x double>* %74
%75 = bitcast double* %3 to <2 x double>*
%76 = load <2 x double>, <2 x double>* %75
%77 = getelementptr inbounds [6 x double], [6 x double]* %8, i64 0, i64 2
%78 = fsub <2 x double> %76, %73
%79 = bitcast double* %77 to <2 x double>*
store <2 x double> %78, <2 x double>* %79
%80 = getelementptr inbounds [6 x double], [6 x double]* %8, i64 0, i64 4
%81 = fneg <2 x double> %76
%82 = bitcast double* %80 to <2 x double>*
store <2 x double> %81, <2 x double>* %82
%83 = bitcast [3 x double]* %9 to i8*
%84 = extractelement <2 x double> %73, i64 0
%85 = extractelement <2 x double> %73, i64 1
%86 = call double @hypot(double %84, double %85)
%87 = extractelement <2 x double> %78, i64 0
%88 = extractelement <2 x double> %78, i64 1
%89 = call double @hypot(double %87, double %88)
%90 = insertelement <2 x double> poison, double %16, i64 0
%91 = shufflevector <2 x double> %90, <2 x double> poison, <2 x i32> zeroinitializer
%92 = insertelement <2 x double> poison, double %86, i64 0
%93 = insertelement <2 x double> %92, double %89, i64 1
%94 = fmul <2 x double> %91, %93
%95 = bitcast [3 x double]* %9 to <2 x double>*
store <2 x double> %94, <2 x double>* %95
%96 = extractelement <2 x double> %81, i64 0
%97 = extractelement <2 x double> %81, i64 1
%98 = call double @hypot(double %96, double %97)
%99 = fmul double %16, %98
%100 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 2
store double %99, double* %100
%101 = bitcast [3 x double]* %10 to i8*
%102 = insertelement <2 x double> poison, double %20, i64 0
%103 = insertelement <2 x double> %102, double %26, i64 1
%104 = shufflevector <2 x double> %73, <2 x double> %78, <2 x i32> <i32 1, i32 3>
%105 = fmul <2 x double> %103, %104
%106 = insertelement <2 x double> poison, double %18, i64 0
%107 = insertelement <2 x double> %106, double %24, i64 1
%108 = shufflevector <2 x double> %73, <2 x double> %78, <2 x i32> <i32 0, i32 2>
%109 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %107, <2 x double> %108, <2 x double> %105)
%110 = insertelement <2 x double> poison, double %57, i64 0
%111 = shufflevector <2 x double> %110, <2 x double> poison, <2 x i32> zeroinitializer
%112 = fmul <2 x double> %111, %109
%113 = bitcast [3 x double]* %10 to <2 x double>*
store <2 x double> %112, <2 x double>* %113
%114 = fmul double %32, %97
%115 = call double @llvm.fmuladd.f64(double %30, double %96, double %114)
%116 = fmul double %57, %115
%117 = getelementptr inbounds [3 x double], [3 x double]* %10, i64 0, i64 2
store double %116, double* %117
%118 = bitcast [12 x double]* %11 to i8*
%119 = bitcast [3 x i32]* %12 to i8*
br label %120
120: ; preds = %70, %227
%121 = phi i64 [ 0, %70 ], [ %123, %227 ]
%122 = phi i32 [ 0, %70 ], [ %228, %227 ]
%123 = add nuw nsw i64 %121, 1
%124 = trunc i64 %123 to i8
%125 = urem i8 %124, 3
%126 = zext i8 %125 to i32
%127 = trunc i64 %121 to i32
%128 = shl nuw nsw i32 1, %127
%129 = shl nuw nsw i32 1, %126
%130 = freeze i32 %129
%131 = or i32 %130, %128
%132 = and i32 %131, %62
%133 = icmp eq i32 %132, %131
br i1 %133, label %134, label %136
134: ; preds = %120
%135 = getelementptr inbounds [3 x i32], [3 x i32]* %12, i64 0, i64 %121
store i32 0, i32* %135
br label %227
136: ; preds = %120
%137 = and i32 %130, %62
%138 = icmp ne i32 %137, 0
%139 = and i32 %128, %62
%140 = icmp eq i32 %139, 0
%141 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 %121
%142 = load double, double* %141
%143 = fmul double %142, %142
%144 = fdiv double 1.000000e+00, %143
%145 = getelementptr inbounds [3 x double], [3 x double]* %10, i64 0, i64 %121
%146 = load double, double* %145
%147 = fmul double %146, %146
%148 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 %121
%149 = load double, double* %148
%150 = call double @llvm.fmuladd.f64(double %149, double %149, double -1.000000e+00)
%151 = fneg double %150
%152 = call double @llvm.fmuladd.f64(double %147, double %144, double %151)
%153 = fmul double %144, %152
%154 = fneg double %146
%155 = fmul double %144, %154
%156 = xor i1 %140, %138
br i1 %156, label %192, label %157
157: ; preds = %136
%158 = getelementptr inbounds [3 x i32], [3 x i32]* %12, i64 0, i64 %121
store i32 1, i32* %158
%159 = add nsw i32 %122, 1
%160 = fcmp olt double %153, 0.000000e+00
%161 = select i1 %160, double 0.000000e+00, double %153
%162 = call double @sqrt(double %161)
%163 = fadd double %155, %162
%164 = fsub double %155, %162
%165 = fcmp ogt double %163, 5.000000e-01
%166 = fadd double %163, -1.000000e+00
%167 = select i1 %165, double %166, double %163
%168 = call double @llvm.fabs.f64(double %167)
%169 = fcmp ogt double %164, 5.000000e-01
%170 = fadd double %164, -1.000000e+00
%171 = select i1 %169, double %170, double %164
%172 = call double @llvm.fabs.f64(double %171)
%173 = fcmp olt double %172, %168
%174 = select i1 %173, double %164, double %163
%175 = fcmp olt double %174, 0.000000e+00
%176 = select i1 %175, double 0.000000e+00, double %174
%177 = fcmp ogt double %176, 1.000000e+00
%178 = select i1 %177, double 1.000000e+00, double %176
%179 = shl nuw nsw i64 %121, 1
%180 = getelementptr inbounds [6 x double], [6 x double]* %6, i64 0, i64 %179
%181 = getelementptr inbounds [6 x double], [6 x double]* %8, i64 0, i64 %179
%182 = shl nuw nsw i64 %121, 2
%183 = getelementptr inbounds [12 x double], [12 x double]* %11, i64 0, i64 %182
%184 = bitcast double* %180 to <2 x double>*
%185 = load <2 x double>, <2 x double>* %184
%186 = bitcast double* %181 to <2 x double>*
%187 = load <2 x double>, <2 x double>* %186
%188 = insertelement <2 x double> poison, double %178, i64 0
%189 = shufflevector <2 x double> %188, <2 x double> poison, <2 x i32> zeroinitializer
%190 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %189, <2 x double> %187, <2 x double> %185)
%191 = bitcast double* %183 to <2 x double>*
store <2 x double> %190, <2 x double>* %191
br label %227
192: ; preds = %136
%193 = fcmp ugt double %153, 0.000000e+00
br i1 %193, label %196, label %194
194: ; preds = %192
%195 = getelementptr inbounds [3 x i32], [3 x i32]* %12, i64 0, i64 %121
store i32 0, i32* %195
br label %227
196: ; preds = %192
%197 = call double @sqrt(double %153)
%198 = getelementptr inbounds [3 x i32], [3 x i32]* %12, i64 0, i64 %121
store i32 0, i32* %198
%199 = fsub double %155, %197
%200 = fadd double %155, %197
%201 = fcmp ogt double %199, 0.000000e+00
%202 = fcmp olt double %199, 1.000000e+00
%203 = and i1 %201, %202
%204 = fcmp ogt double %200, 0.000000e+00
%205 = select i1 %203, i1 %204, i1 false
%206 = fcmp olt double %200, 1.000000e+00
%207 = select i1 %205, i1 %206, i1 false
br i1 %207, label %208, label %227
208: ; preds = %196
%209 = shl nuw nsw i64 %121, 1
%210 = getelementptr inbounds [6 x double], [6 x double]* %6, i64 0, i64 %209
%211 = getelementptr inbounds [6 x double], [6 x double]* %8, i64 0, i64 %209
%212 = shl nuw nsw i64 %121, 2
%213 = getelementptr inbounds [12 x double], [12 x double]* %11, i64 0, i64 %212
%214 = bitcast double* %210 to <2 x double>*
%215 = load <2 x double>, <2 x double>* %214
%216 = bitcast double* %211 to <2 x double>*
%217 = load <2 x double>, <2 x double>* %216
%218 = insertelement <2 x double> poison, double %199, i64 0
%219 = shufflevector <2 x double> %218, <2 x double> poison, <2 x i32> zeroinitializer
%220 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %219, <2 x double> %217, <2 x double> %215)
%221 = bitcast double* %213 to <2 x double>*
store <2 x double> %220, <2 x double>* %221
%222 = shl i64 %121, 2
%223 = or i64 %222, 2
%224 = getelementptr inbounds [12 x double], [12 x double]* %11, i64 0, i64 %223
%225 = bitcast double* %224 to <2 x double>*
store <2 x double> %220, <2 x double>* %225
store i32 2, i32* %198
%226 = add nsw i32 %122, 2
br label %227
227: ; preds = %157, %196, %208, %194, %134
%228 = phi i32 [ %122, %134 ], [ %159, %157 ], [ %122, %194 ], [ %226, %208 ], [ %122, %196 ]
%229 = icmp eq i64 %123, 3
br i1 %229, label %230, label %120
230: ; preds = %227
switch i32 %228, label %284 [
i32 0, label %231
i32 2, label %237
]
231: ; preds = %230
%232 = and i32 %62, 8
%233 = icmp eq i32 %232, 0
br i1 %233, label %534, label %234
234: ; preds = %231
%235 = fmul double %0, 0x400921FB54442D18
%236 = fmul double %235, %0
br label %534
237: ; preds = %230
%238 = getelementptr inbounds [3 x i32], [3 x i32]* %12, i64 0, i64 0
%239 = load i32, i32* %238
%240 = icmp slt i32 %239, 2
%241 = getelementptr inbounds [3 x i32], [3 x i32]* %12, i64 0, i64 1
%242 = load i32, i32* %241
%243 = icmp slt i32 %242, 2
%244 = select i1 %240, i1 %243, i1 false
%245 = getelementptr inbounds [3 x i32], [3 x i32]* %12, i64 0, i64 2
%246 = load i32, i32* %245
%247 = icmp slt i32 %246, 2
%248 = select i1 %244, i1 %247, i1 false
br i1 %248, label %287, label %249
249: ; preds = %237
%250 = icmp sgt i32 %239, 1
br i1 %250, label %256, label %251
251: ; preds = %249
%252 = icmp sgt i32 %242, 1
br i1 %252, label %256, label %253
253: ; preds = %251
%254 = icmp sgt i32 %246, 1
%255 = select i1 %254, i32 8, i32 12
br label %256
256: ; preds = %253, %251, %249
%257 = phi i32 [ 0, %249 ], [ 4, %251 ], [ %255, %253 ]
%258 = or i32 %257, 2
%259 = zext i32 %258 to i64
%260 = getelementptr inbounds [12 x double], [12 x double]* %11, i64 0, i64 %259
%261 = load double, double* %260
%262 = zext i32 %257 to i64
%263 = getelementptr inbounds [12 x double], [12 x double]* %11, i64 0, i64 %262
%264 = load double, double* %263
%265 = fsub double %261, %264
%266 = or i32 %257, 3
%267 = zext i32 %266 to i64
%268 = getelementptr inbounds [12 x double], [12 x double]* %11, i64 0, i64 %267
%269 = load double, double* %268
%270 = or i32 %257, 1
%271 = zext i32 %270 to i64
%272 = getelementptr inbounds [12 x double], [12 x double]* %11, i64 0, i64 %271
%273 = load double, double* %272
%274 = fsub double %269, %273
%275 = call double @hypot(double %265, double %274)
%276 = call i32 (double, double, ...) bitcast (i32 (...)* @CircularSectorArea to i32 (double, double, ...)*)(double %0, double %275)
%277 = sitofp i32 %276 to double
%278 = and i32 %62, 8
%279 = icmp eq i32 %278, 0
%280 = fmul double %0, 0x400921FB54442D18
%281 = fneg double %277
%282 = call double @llvm.fmuladd.f64(double %280, double %0, double %281)
%283 = select i1 %279, double %277, double %282
br label %534
284: ; preds = %230
%285 = and i32 %228, -3
%286 = icmp eq i32 %285, 4
br i1 %286, label %287, label %534
287: ; preds = %237, %284
%288 = bitcast [6 x i32]* %13 to i8*
%289 = bitcast [12 x double]* %14 to i8*
%290 = getelementptr inbounds [12 x double], [12 x double]* %14, i64 0, i64 1
br label %291
291: ; preds = %287, %481
%292 = phi i64 [ 0, %287 ], [ %483, %481 ]
%293 = phi i32 [ 0, %287 ], [ %482, %481 ]
%294 = trunc i64 %292 to i32
%295 = shl nuw nsw i32 1, %294
%296 = and i32 %295, %62
%297 = icmp eq i32 %296, 0
br i1 %297, label %310, label %298
298: ; preds = %291
%299 = shl nuw nsw i64 %292, 1
%300 = getelementptr inbounds [6 x double], [6 x double]* %6, i64 0, i64 %299
%301 = shl nsw i32 %293, 1
%302 = sext i32 %301 to i64
%303 = getelementptr inbounds [12 x double], [12 x double]* %14, i64 0, i64 %302
%304 = bitcast double* %300 to <2 x double>*
%305 = load <2 x double>, <2 x double>* %304
%306 = bitcast double* %303 to <2 x double>*
store <2 x double> %305, <2 x double>* %306
%307 = add nsw i32 %293, 1
%308 = sext i32 %293 to i64
%309 = getelementptr inbounds [6 x i32], [6 x i32]* %13, i64 0, i64 %308
store i32 1, i32* %309
br label %310
310: ; preds = %298, %291
%311 = phi i32 [ %307, %298 ], [ %293, %291 ]
%312 = getelementptr inbounds [3 x i32], [3 x i32]* %12, i64 0, i64 %292
%313 = load i32, i32* %312
%314 = icmp sgt i32 %313, 0
br i1 %314, label %315, label %481
315: ; preds = %310
%316 = shl nuw nsw i64 %292, 1
%317 = sext i32 %311 to i64
%318 = getelementptr [6 x i32], [6 x i32]* %13, i64 0, i64 %317
%319 = bitcast i32* %318 to i8*
%320 = zext i32 %313 to i64
%321 = shl nuw nsw i64 %320, 2
%322 = icmp eq i32 %313, 1
br i1 %322, label %427, label %323
323: ; preds = %315
%324 = add nsw i64 %320, -1
%325 = shl i32 %311, 1
%326 = trunc i64 %324 to i32
%327 = call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %326, i32 2)
%328 = extractvalue { i32, i1 } %327, 0
%329 = extractvalue { i32, i1 } %327, 1
%330 = add i32 %325, %328
%331 = icmp slt i32 %330, %325
%332 = or i1 %331, %329
%333 = icmp ugt i64 %324, 4294967295
%334 = or i1 %332, %333
%335 = or i32 %325, 1
%336 = trunc i64 %324 to i32
%337 = call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %336, i32 2)
%338 = extractvalue { i32, i1 } %337, 0
%339 = extractvalue { i32, i1 } %337, 1
%340 = add i32 %335, %338
%341 = icmp slt i32 %340, %335
%342 = or i1 %341, %339
%343 = icmp ugt i64 %324, 4294967295
%344 = or i1 %342, %343
%345 = sext i32 %325 to i64
%346 = getelementptr [12 x double], [12 x double]* %14, i64 0, i64 %345
%347 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %324, i64 16)
%348 = extractvalue { i64, i1 } %347, 0
%349 = extractvalue { i64, i1 } %347, 1
%350 = bitcast double* %346 to i8*
%351 = getelementptr i8, i8* %350, i64 %348
%352 = icmp ult i8* %351, %350
%353 = or i1 %352, %349
%354 = getelementptr double, double* %290, i64 %345
%355 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %324, i64 16)
%356 = extractvalue { i64, i1 } %355, 0
%357 = extractvalue { i64, i1 } %355, 1
%358 = bitcast double* %354 to i8*
%359 = getelementptr i8, i8* %358, i64 %356
%360 = icmp ult i8* %359, %358
%361 = or i1 %360, %357
%362 = or i1 %334, %344
%363 = or i1 %362, %353
%364 = or i1 %363, %361
br i1 %364, label %427, label %365
365: ; preds = %323
%366 = and i64 %320, 4294967294
%367 = add nsw i64 %366, %317
%368 = add nsw i64 %366, -2
%369 = lshr exact i64 %368, 1
%370 = add nuw i64 %369, 1
%371 = and i64 %370, 1
%372 = icmp eq i64 %368, 0
br i1 %372, label %408, label %373
373: ; preds = %365
%374 = and i64 %370, -2
br label %375
375: ; preds = %375, %373
%376 = phi i64 [ 0, %373 ], [ %405, %375 ]
%377 = phi i64 [ 0, %373 ], [ %406, %375 ]
%378 = trunc i64 %376 to i32
%379 = add i32 %311, %378
%380 = add nuw nsw i64 %376, %316
%381 = shl nuw nsw i64 %380, 1
%382 = getelementptr inbounds [12 x double], [12 x double]* %11, i64 0, i64 %381
%383 = bitcast double* %382 to <4 x double>*
%384 = load <4 x double>, <4 x double>* %383
%385 = shl nsw i32 %379, 1
%386 = or i32 %385, 1
%387 = sext i32 %386 to i64
%388 = getelementptr inbounds [12 x double], [12 x double]* %14, i64 0, i64 %387
%389 = getelementptr inbounds double, double* %388, i64 -1
%390 = bitcast double* %389 to <4 x double>*
store <4 x double> %384, <4 x double>* %390
%391 = or i64 %376, 2
%392 = trunc i64 %391 to i32
%393 = add i32 %311, %392
%394 = add nuw nsw i64 %391, %316
%395 = shl nuw nsw i64 %394, 1
%396 = getelementptr inbounds [12 x double], [12 x double]* %11, i64 0, i64 %395
%397 = bitcast double* %396 to <4 x double>*
%398 = load <4 x double>, <4 x double>* %397
%399 = shl nsw i32 %393, 1
%400 = or i32 %399, 1
%401 = sext i32 %400 to i64
%402 = getelementptr inbounds [12 x double], [12 x double]* %14, i64 0, i64 %401
%403 = getelementptr inbounds double, double* %402, i64 -1
%404 = bitcast double* %403 to <4 x double>*
store <4 x double> %398, <4 x double>* %404
%405 = add nuw i64 %376, 4
%406 = add nuw i64 %377, 2
%407 = icmp eq i64 %406, %374
br i1 %407, label %408, label %375
408: ; preds = %375, %365
%409 = phi i64 [ 0, %365 ], [ %405, %375 ]
%410 = icmp eq i64 %371, 0
br i1 %410, label %425, label %411
411: ; preds = %408
%412 = trunc i64 %409 to i32
%413 = add i32 %311, %412
%414 = add nuw nsw i64 %409, %316
%415 = shl nuw nsw i64 %414, 1
%416 = getelementptr inbounds [12 x double], [12 x double]* %11, i64 0, i64 %415
%417 = bitcast double* %416 to <4 x double>*
%418 = load <4 x double>, <4 x double>* %417
%419 = shl nsw i32 %413, 1
%420 = or i32 %419, 1
%421 = sext i32 %420 to i64
%422 = getelementptr inbounds [12 x double], [12 x double]* %14, i64 0, i64 %421
%423 = getelementptr inbounds double, double* %422, i64 -1
%424 = bitcast double* %423 to <4 x double>*
store <4 x double> %418, <4 x double>* %424
br label %425
425: ; preds = %408, %411
%426 = icmp eq i64 %366, %320
br i1 %426, label %479, label %427
427: ; preds = %323, %315, %425
%428 = phi i64 [ 0, %323 ], [ 0, %315 ], [ %366, %425 ]
%429 = phi i64 [ %317, %323 ], [ %317, %315 ], [ %367, %425 ]
%430 = xor i64 %428, -1
%431 = and i64 %320, 1
%432 = icmp eq i64 %431, 0
br i1 %432, label %446, label %433
433: ; preds = %427
%434 = trunc i64 %429 to i32
%435 = add nuw nsw i64 %428, %316
%436 = shl nuw nsw i64 %435, 1
%437 = getelementptr inbounds [12 x double], [12 x double]* %11, i64 0, i64 %436
%438 = shl nsw i32 %434, 1
%439 = sext i32 %438 to i64
%440 = getelementptr inbounds [12 x double], [12 x double]* %14, i64 0, i64 %439
%441 = bitcast double* %437 to <2 x double>*
%442 = load <2 x double>, <2 x double>* %441
%443 = bitcast double* %440 to <2 x double>*
store <2 x double> %442, <2 x double>* %443
%444 = add nsw i64 %429, 1
%445 = or i64 %428, 1
br label %446
446: ; preds = %433, %427
%447 = phi i64 [ %428, %427 ], [ %445, %433 ]
%448 = phi i64 [ %429, %427 ], [ %444, %433 ]
%449 = sub nsw i64 0, %320
%450 = icmp eq i64 %430, %449
br i1 %450, label %479, label %451
451: ; preds = %446, %451
%452 = phi i64 [ %477, %451 ], [ %447, %446 ]
%453 = phi i64 [ %476, %451 ], [ %448, %446 ]
%454 = trunc i64 %453 to i32
%455 = add nuw nsw i64 %452, %316
%456 = shl nuw nsw i64 %455, 1
%457 = getelementptr inbounds [12 x double], [12 x double]* %11, i64 0, i64 %456
%458 = shl nsw i32 %454, 1
%459 = sext i32 %458 to i64
%460 = getelementptr inbounds [12 x double], [12 x double]* %14, i64 0, i64 %459
%461 = bitcast double* %457 to <2 x double>*
%462 = load <2 x double>, <2 x double>* %461
%463 = bitcast double* %460 to <2 x double>*
store <2 x double> %462, <2 x double>* %463
%464 = add nuw nsw i64 %452, 1
%465 = trunc i64 %453 to i32
%466 = add nuw nsw i64 %464, %316
%467 = shl nuw nsw i64 %466, 1
%468 = getelementptr inbounds [12 x double], [12 x double]* %11, i64 0, i64 %467
%469 = shl i32 %465, 1
%470 = add i32 %469, 2
%471 = sext i32 %470 to i64
%472 = getelementptr inbounds [12 x double], [12 x double]* %14, i64 0, i64 %471
%473 = bitcast double* %468 to <2 x double>*
%474 = load <2 x double>, <2 x double>* %473
%475 = bitcast double* %472 to <2 x double>*
store <2 x double> %474, <2 x double>* %475
%476 = add nsw i64 %453, 2
%477 = add nuw nsw i64 %452, 2
%478 = icmp eq i64 %477, %320
br i1 %478, label %479, label %451
479: ; preds = %446, %451, %425
%480 = add i32 %311, %313
br label %481
481: ; preds = %479, %310
%482 = phi i32 [ %311, %310 ], [ %480, %479 ]
%483 = add nuw nsw i64 %292, 1
%484 = icmp eq i64 %483, 3
br i1 %484, label %485, label %291
485: ; preds = %481
%486 = icmp slt i32 %482, 3
br i1 %486, label %532, label %487
487: ; preds = %485
%488 = getelementptr inbounds [12 x double], [12 x double]* %14, i64 0, i64 0
%489 = call i32 (i32, double*, ...) bitcast (i32 (...)* @polygon_area to i32 (i32, double*, ...)*)(i32 %482, double* %488)
%490 = sitofp i32 %489 to double
%491 = zext i32 %482 to i64
br label %492
492: ; preds = %487, %528
%493 = phi i64 [ 0, %487 ], [ %530, %528 ]
%494 = phi double [ %490, %487 ], [ %529, %528 ]
%495 = icmp eq i64 %493, 0
%496 = trunc i64 %493 to i32
%497 = select i1 %495, i32 %482, i32 %496
%498 = add nsw i32 %497, -1
%499 = sext i32 %498 to i64
%500 = getelementptr inbounds [6 x i32], [6 x i32]* %13, i64 0, i64 %499
%501 = load i32, i32* %500
%502 = icmp eq i32 %501, 0
br i1 %502, label %503, label %528
503: ; preds = %492
%504 = getelementptr inbounds [6 x i32], [6 x i32]* %13, i64 0, i64 %493
%505 = load i32, i32* %504
%506 = icmp eq i32 %505, 0
br i1 %506, label %507, label %528
507: ; preds = %503
%508 = shl nuw nsw i64 %493, 1
%509 = getelementptr inbounds [12 x double], [12 x double]* %14, i64 0, i64 %508
%510 = load double, double* %509
%511 = shl nsw i32 %498, 1
%512 = sext i32 %511 to i64
%513 = getelementptr inbounds [12 x double], [12 x double]* %14, i64 0, i64 %512
%514 = load double, double* %513
%515 = fsub double %510, %514
%516 = or i64 %508, 1
%517 = getelementptr inbounds [12 x double], [12 x double]* %14, i64 0, i64 %516
%518 = load double, double* %517
%519 = or i32 %511, 1
%520 = sext i32 %519 to i64
%521 = getelementptr inbounds [12 x double], [12 x double]* %14, i64 0, i64 %520
%522 = load double, double* %521
%523 = fsub double %518, %522
%524 = call double @hypot(double %515, double %523)
%525 = call i32 (double, double, ...) bitcast (i32 (...)* @CircularSectorArea to i32 (double, double, ...)*)(double %0, double %524)
%526 = sitofp i32 %525 to double
%527 = fadd double %494, %526
br label %528
528: ; preds = %507, %503, %492
%529 = phi double [ %527, %507 ], [ %494, %503 ], [ %494, %492 ]
%530 = add nuw nsw i64 %493, 1
%531 = icmp eq i64 %530, %491
br i1 %531, label %532, label %492
532: ; preds = %528, %485
%533 = phi double [ -1.000000e+00, %485 ], [ %529, %528 ]
br label %534
534: ; preds = %284, %231, %532, %256, %234
%535 = phi double [ %236, %234 ], [ %533, %532 ], [ %283, %256 ], [ 0.000000e+00, %231 ], [ -1.000000e+00, %284 ]
br label %536
536: ; preds = %534, %65
%537 = phi double [ %69, %65 ], [ %535, %534 ]
ret double %537
}