// File: /workspace/github_cpp_makefile_star2_O1/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 $0x48, %rsp
movq (%rsi), %rax
testq %rax, %rax
je 0xb0f7
movq %rdx, %r15
movq 0x8(%rdx), %rcx
testq %rcx, %rcx
je 0xb0f7
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 0xb0f7
xorq %rcx, %rax
xorq %rdx, %rsi
orq %rax, %rsi
je 0xb0f7
movsd %xmm0, -0x40(%rbp)
movq 0x921e(%rip), %r12      # 0x13ff0
leaq 0x4e97(%rip), %rsi      # 0xfc70
movl $0x15, %edx
movq %r12, %rdi
callq 0x3280
movq (%r14), %rsi
movq %r12, %rdi
callq 0x31b0
movq %rax, %r13
leaq 0x4240(%rip), %rsi      # 0xf03b
movl $0x2, %edx
movq %rax, %rdi
callq 0x3280
movq 0x8(%r14), %rsi
movq %r13, %rdi
callq 0x31b0
movq %rax, %r13
leaq 0x4e68(%rip), %rsi      # 0xfc86
movl $0x7, %edx
movq %rax, %rdi
callq 0x3280
movq (%r15), %rsi
movq %r13, %rdi
callq 0x31b0
movq %rax, %r13
movl $0x2, %edx
movq %rax, %rdi
leaq 0x41f3(%rip), %rsi      # 0xf03b
callq 0x3280
movq 0x8(%r15), %rsi
movq %r13, %rdi
callq 0x31b0
movq %rax, %r13
leaq 0x4b92(%rip), %rsi      # 0xf9f5
movl $0x1, %edx
movq %rax, %rdi
callq 0x3280
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r13, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3160
cmpq $0x0, (%r14)
je 0xb106
cmpq $0x0, 0x8(%r14)
je 0xb125
cmpq $0x0, (%r15)
je 0xb144
cmpq $0x0, 0x8(%r15)
je 0xb163
leaq 0x4c71(%rip), %rsi      # 0xfb3a
movl $0x11, %edx
movq %r12, %rdi
callq 0x3280
movq (%r14), %rsi
movq %r12, %rdi
callq 0x6fc0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3160
leaq 0x4c3c(%rip), %rsi      # 0xfb4c
movl $0x11, %edx
movq %r12, %rdi
callq 0x3280
movq 0x8(%r14), %rsi
movq %r12, %rdi
callq 0x6fc0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3160
leaq 0x4c06(%rip), %rsi      # 0xfb5e
movl $0x12, %edx
movq %r12, %rdi
callq 0x3280
movq (%r15), %rsi
movq %r12, %rdi
callq 0x6fc0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3160
leaq 0x4bd2(%rip), %rsi      # 0xfb71
movl $0x12, %edx
movq %r12, %rdi
callq 0x3280
movq 0x8(%r15), %rsi
movq %r12, %rdi
callq 0x6fc0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3160
movq (%r14), %rdi
movq 0x8(%r14), %rsi
movq 0x8(%r15), %rdx
xorps %xmm0, %xmm0
movaps %xmm0, -0x60(%rbp)
movaps %xmm0, -0x70(%rbp)
movq $0x0, -0x50(%rbp)
callq 0x700e
movlps %xmm0, -0x50(%rbp)
movss %xmm1, -0x48(%rbp)
movups (%r14), %xmm0
movaps %xmm0, -0x70(%rbp)
movups (%r15), %xmm0
movaps %xmm0, -0x60(%rbp)
movss -0x4c(%rbp), %xmm0
subss %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtss2sd %xmm0, %xmm1
ucomisd -0x40(%rbp), %xmm1
ja 0xb0f7
movq %r14, %rdi
callq 0x65c8
movaps %xmm0, -0x40(%rbp)
movss -0x4c(%rbp), %xmm0
subss -0x48(%rbp), %xmm0
movq %r14, %rdi
callq 0x65c8
movaps %xmm0, %xmm2
movss -0x50(%rbp), %xmm1
movaps -0x40(%rbp), %xmm3
movaps %xmm3, %xmm0
subss %xmm1, %xmm0
shufps $0x55, %xmm3, %xmm3     # xmm3 = xmm3[1,1,1,1]
subss -0x4c(%rbp), %xmm3
mulss %xmm3, %xmm3
mulss %xmm0, %xmm0
addss %xmm3, %xmm0
xorps %xmm4, %xmm4
ucomiss %xmm4, %xmm0
jb 0xb08e
xorps %xmm3, %xmm3
sqrtss %xmm0, %xmm3
jmp 0xb0a1
movaps %xmm2, -0x40(%rbp)
callq 0x33b0
xorps %xmm4, %xmm4
movaps -0x40(%rbp), %xmm2
movaps %xmm0, %xmm3
movss -0x50(%rbp), %xmm1
movaps %xmm2, %xmm0
subss %xmm1, %xmm0
shufps $0x55, %xmm2, %xmm2     # xmm2 = xmm2[1,1,1,1]
subss -0x4c(%rbp), %xmm2
mulss %xmm2, %xmm2
mulss %xmm0, %xmm0
addss %xmm2, %xmm0
ucomiss %xmm4, %xmm0
jb 0xb0cd
sqrtss %xmm0, %xmm0
jmp 0xb0dc
movss %xmm3, -0x40(%rbp)
callq 0x33b0
movss -0x40(%rbp), %xmm3
movss -0x48(%rbp), %xmm1
ucomiss %xmm1, %xmm3
ja 0xb0f7
ucomiss %xmm1, %xmm0
ja 0xb0f7
leaq -0x70(%rbp), %rsi
movq %rbx, %rdi
callq 0xb5fe
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4538(%rip), %rdi      # 0xf645
leaq 0x41f6(%rip), %rsi      # 0xf30a
leaq 0x4b73(%rip), %rcx      # 0xfc8e
movl $0xf3, %edx
callq 0x3140
leaq 0x44ed(%rip), %rdi      # 0xf619
leaq 0x41d7(%rip), %rsi      # 0xf30a
leaq 0x4b54(%rip), %rcx      # 0xfc8e
movl $0xf4, %edx
callq 0x3140
leaq 0x4555(%rip), %rdi      # 0xf6a0
leaq 0x41b8(%rip), %rsi      # 0xf30a
leaq 0x4b35(%rip), %rcx      # 0xfc8e
movl $0xf5, %edx
callq 0x3140
leaq 0x45a6(%rip), %rdi      # 0xf710
leaq 0x4199(%rip), %rsi      # 0xf30a
leaq 0x4b16(%rip), %rcx      # 0xfc8e
movl $0xf6, %edx
callq 0x3140