// File: /workspace/github_cpp_makefile_star2_O3/micahcc[P]polygon_skeleton/voronoi.cpp
// Function: CircleQueue::insert(double, Intersection const&, Intersection const&)
void insert(double sweep_y, const Intersection& left_int, const Intersection& right_int)
    {
        if(left_int.pt_left == nullptr) return;
        if(right_int.pt_right == nullptr) return;
        if((left_int.pt_left == right_int.pt_left &&
                left_int.pt_right == right_int.pt_right) ||
                (left_int.pt_left == right_int.pt_right &&
                left_int.pt_right == right_int.pt_left)) {
            // if there are only 2 unique points, there should be no event
            return;
        }

        std::cerr << "<<<Inserting Event: ("
            << left_int.pt_left << ", " << left_int.pt_right << ") and ("
            << right_int.pt_left << ", " << right_int.pt_right << ")"
            << std::endl;
        assert(left_int.pt_left);
        assert(left_int.pt_right);
        assert(right_int.pt_left);
        assert(right_int.pt_right);
        std::cerr << "<<<Left Point 0: " << *left_int.pt_left << std::endl;
        std::cerr << "<<<Left Point 1: " << *left_int.pt_right << std::endl;
        std::cerr << "<<<Right Point 0: " << *right_int.pt_left << std::endl;
        std::cerr << "<<<Right Point 1: " << *right_int.pt_right << std::endl;

        //assert(left_int.pt_right == right_int.pt_left);
        auto ptA = left_int.pt_left;
        auto ptB = left_int.pt_right;
        auto ptC = right_int.pt_right;

        CircleEvent evt;
        evt.circle = solveCircle(*ptA, *ptB, *ptC);
        evt.left_int = left_int;
        evt.right_int = right_int;

        // if this is going to happen behind the current sweep, then don't
        // insert. This is effectively a new event behind the beach
        if(evt.circle.center.y - evt.circle.radius > sweep_y)
            return;

        // There can only be 1 circle point for 3 points, ensure that these two
        // intersection actually meet at the circle, othwise don't creat the
        // event
        auto left_int_pt = getIntersection(
                evt.circle.center.y - evt.circle.radius, left_int);
        auto right_int_pt = getIntersection(
                evt.circle.center.y - evt.circle.radius, left_int);
        double d1 = distance2d(left_int_pt, evt.circle.center);
        double d2 = distance2d(right_int_pt, evt.circle.center);
        if(d1 > evt.circle.radius|| d2 > evt.circle.radius) {
            // the intersections should essentially be at the center of the
            // center of the circle. In diverging intersections the distances
            // from the center to intersections will far exceed the radius of
            // the circle.
            return;
        }
        m_queue.insert(evt);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq (%rsi), %rax
testq %rax, %rax
je 0xb177
movq %rdx, %r15
movq 0x8(%rdx), %rcx
testq %rcx, %rcx
je 0xb177
movq %rsi, %r14
movq %rdi, %rbx
movq (%r15), %rdx
movq %rax, %rdi
xorq %rdx, %rdi
movq 0x8(%rsi), %rsi
movq %rsi, %r8
xorq %rcx, %r8
orq %rdi, %r8
je 0xb177
xorq %rcx, %rax
xorq %rdx, %rsi
orq %rax, %rsi
je 0xb177
movsd %xmm0, -0x30(%rbp)
movq 0x9150(%rip), %r12      # 0x13ff0
leaq 0x4db9(%rip), %rsi      # 0xfc60
movl $0x15, %edx
movq %r12, %rdi
callq 0x3270
movq (%r14), %rsi
movq %r12, %rdi
callq 0x31b0
movq %rax, %r13
leaq 0x4172(%rip), %rsi      # 0xf03b
movl $0x2, %edx
movq %rax, %rdi
callq 0x3270
movq 0x8(%r14), %rsi
movq %r13, %rdi
callq 0x31b0
movq %rax, %r13
leaq 0x4d8a(%rip), %rsi      # 0xfc76
movl $0x7, %edx
movq %rax, %rdi
callq 0x3270
movq (%r15), %rsi
movq %r13, %rdi
callq 0x31b0
movq %rax, %r13
movl $0x2, %edx
movq %rax, %rdi
leaq 0x4125(%rip), %rsi      # 0xf03b
callq 0x3270
movq 0x8(%r15), %rsi
movq %r13, %rdi
callq 0x31b0
movq %rax, %r13
leaq 0x4ab4(%rip), %rsi      # 0xf9e5
movl $0x1, %edx
movq %rax, %rdi
callq 0x3270
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x3220
movsbl %al, %esi
movq %r13, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3160
cmpq $0x0, (%r14)
je 0xb186
cmpq $0x0, 0x8(%r14)
je 0xb1a5
cmpq $0x0, (%r15)
je 0xb1c4
cmpq $0x0, 0x8(%r15)
je 0xb1e3
leaq 0x4b93(%rip), %rsi      # 0xfb2a
movl $0x11, %edx
movq %r12, %rdi
callq 0x3270
movq (%r14), %rsi
movq %r12, %rdi
callq 0x6f7e
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3220
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3160
leaq 0x4b5e(%rip), %rsi      # 0xfb3c
movl $0x11, %edx
movq %r12, %rdi
callq 0x3270
movq 0x8(%r14), %rsi
movq %r12, %rdi
callq 0x6f7e
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3220
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3160
leaq 0x4b28(%rip), %rsi      # 0xfb4e
movl $0x12, %edx
movq %r12, %rdi
callq 0x3270
movq (%r15), %rsi
movq %r12, %rdi
callq 0x6f7e
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3220
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3160
leaq 0x4af4(%rip), %rsi      # 0xfb61
movl $0x12, %edx
movq %r12, %rdi
callq 0x3270
movq 0x8(%r15), %rsi
movq %r12, %rdi
callq 0x6f7e
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3220
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3160
movq (%r14), %rdi
movq 0x8(%r14), %rsi
movq 0x8(%r15), %rdx
callq 0x6fcc
movaps %xmm0, %xmm2
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movlps %xmm2, -0x70(%rbp)
movss %xmm1, -0x68(%rbp)
movups (%r14), %xmm3
movaps %xmm3, -0x90(%rbp)
movups (%r15), %xmm3
movaps %xmm3, -0x80(%rbp)
subss %xmm1, %xmm0
xorps %xmm3, %xmm3
cvtss2sd %xmm0, %xmm3
ucomisd -0x30(%rbp), %xmm3
ja 0xb177
movq %r14, %rdi
movss %xmm1, -0x30(%rbp)
movaps %xmm2, -0x60(%rbp)
movaps %xmm0, -0x40(%rbp)
callq 0x65a2
movaps %xmm0, -0x50(%rbp)
movaps -0x40(%rbp), %xmm0
movq %r14, %rdi
callq 0x65a2
movaps -0x60(%rbp), %xmm3
movss -0x30(%rbp), %xmm2
movaps -0x50(%rbp), %xmm4
subps %xmm3, %xmm4
movaps %xmm4, %xmm1
mulps %xmm4, %xmm1
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
mulss %xmm4, %xmm4
addss %xmm1, %xmm4
xorps %xmm1, %xmm1
sqrtss %xmm4, %xmm1
ucomiss %xmm2, %xmm1
ja 0xb177
subps %xmm3, %xmm0
movaps %xmm0, %xmm1
mulps %xmm0, %xmm1
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
mulss %xmm0, %xmm0
addss %xmm1, %xmm0
sqrtss %xmm0, %xmm0
ucomiss %xmm2, %xmm0
ja 0xb177
leaq -0x90(%rbp), %rsi
movq %rbx, %rdi
callq 0xb69a
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x44a8(%rip), %rdi      # 0xf635
leaq 0x4166(%rip), %rsi      # 0xf2fa
leaq 0x4ae3(%rip), %rcx      # 0xfc7e
movl $0xf3, %edx
callq 0x3140
leaq 0x445d(%rip), %rdi      # 0xf609
leaq 0x4147(%rip), %rsi      # 0xf2fa
leaq 0x4ac4(%rip), %rcx      # 0xfc7e
movl $0xf4, %edx
callq 0x3140
leaq 0x44c5(%rip), %rdi      # 0xf690
leaq 0x4128(%rip), %rsi      # 0xf2fa
leaq 0x4aa5(%rip), %rcx      # 0xfc7e
movl $0xf5, %edx
callq 0x3140
leaq 0x4516(%rip), %rdi      # 0xf700
leaq 0x4109(%rip), %rsi      # 0xf2fa
leaq 0x4a86(%rip), %rcx      # 0xfc7e
movl $0xf6, %edx
callq 0x3140