// File: /workspace/github_cpp_makefile_star2_O1/micahcc[P]polygon_skeleton/voronoi.cpp
// Function: Voronoi::Implementation::processEvent(CircleEvent const&)
void Voronoi::Implementation::processEvent(const CircleEvent& event)
{
    assert(event.left_int.pt_right == event.right_int.pt_left);
    assert(event.left_int.pt_right == event.right_int.pt_left);
    std::cerr << "--------\nProcessing Event at "
        << (event.circle.center.y - event.circle.radius)
        << " for: [" << event.left_int.pt_left << " -- "
        << event.left_int.pt_right << "], [" << event.right_int.pt_left << " -- "
        << event.right_int.pt_right << "]\n";

    // This essentially locks in the results of a single point (the middle part
    // of the two intersections, that means we must remove all events related to
    // this point


    // Suppose that intersections A and B meet (when the middle peak is beat out
    // by the side peaks):
    // l |   |     | r
    //   \  A/ |   |
    //    \ / v\B  /
    //     v    \ /
    //           v

    // |     |
    // |     |      |
    // \    C/      |
    //  \   / \     /
    //   \ /   \   /
    //    v     \ /
    //           v
    //
    // First we will remove the intersections A and B from the beach line
    //
    // Now if there are other intersections to the left of A, there would be an
    // event associated with A and that (l), same for an event to the right of
    // B (r). Those events can no longer occur because the intersections A (of
    // the left and center peak) and B (of the center and right peaks) will no
    // longer exist when the center peak has been hidden. Therefore we must
    // remove those events.
    //
    // We then have a new intersection on the beach line (C) which can have
    // events with l and r (when they exist)

    // find intersections to the left and right on the beach line, so we can
    // create a new event for when they meet
    {
    for(auto it1 = m_beach.begin(); it1 != m_beach.end(); ++it1) {
        auto it2 = it1;
        it2++;
        if(it2 != m_beach.end() && !m_beach_compare(*it1, *it2)) {
            std::cerr << it1->pt_left << ", " << it1->pt_right
                << " comes before " << it2->pt_left << ", " << it2->pt_right
                << "but it is not less!" << std::endl;
            throw -1;
        }
    }
    }

    bool success;
    BeachLineT::iterator it_new;
    std::cerr << "Looking up event location" << std::endl;
    auto it = m_beach.find(event.left_int);
    assert(it != m_beach.begin());
    assert(it != m_beach.end());

    std::cerr << "Left Int: [" << *(*it).pt_left << " -- " << *(*it).pt_right << std::endl;
    it--;
    auto left_neighbor = *it;
    it++;
    auto left_it = it;
    assert(left_it->pt_right == event.left_int.pt_right);
    assert(left_it->pt_left == event.left_int.pt_left);
    it++;
    auto right_it = it;
    assert(right_it->pt_right == event.right_int.pt_right);
    assert(right_it->pt_left == event.right_int.pt_left);
    std::cerr << "Right Int: [" << *(*it).pt_left << " -- " << *(*it).pt_right << std::endl;
    it++;
    auto right_neighbor = *it;
    assert(left_neighbor.pt_right == event.left_int.pt_left);
    assert(right_neighbor.pt_left == event.right_int.pt_right);

    // Find the 3 unique points so that we can create the necessary boundary
    // lines
    const Point* ptA = event.left_int.pt_left;
    const Point* ptB = event.left_int.pt_right;
    const Point* ptC = event.right_int.pt_right;

    // erase any other meetings with these two events
    m_events.erase(left_neighbor, event.left_int);
    m_events.erase(event.right_int, right_neighbor);

    // delete arc (i.e. erase both intersections related to the current event)
    std::cerr << "Erasing from beach" << std::endl;
    m_beach.erase(left_it);
    m_beach.erase(right_it);

    // Update sweep location so that our beach inserts go in the correct
    // location. Note we do this after the beach erase because technically at
    // this event the left and right intersections meet so there might be a
    // little strangeness with the ordering at sweep_y. Therefore just erase the
    // points first (above)
    *m_beach_compare.sweep_y = event.circle.center.y - event.circle.radius;

    // create new intersection of the outtermost arcs (left point of left
    // intersection and right point of right intersection)
    std::cerr << "Creating new beach point" << std::endl;
    std::tie(it_new, success) = m_beach.emplace(event.left_int.pt_left,
            event.right_int.pt_right);
    assert(success);

    // create new event(s) for the meeting of the new intersection and its
    // neighors, excepting the cases where 1) there is no neighboring
    // intersection because the neighbor is a special endpoint (nullptr for one
    // of its points) or 2) the neighboring intersection and new intersection
    // have the same three points that we just processed
    if(left_neighbor.pt_left != nullptr) {
        // Make sure that we aren't creating a new event for the points we just
        // processed
        auto event_points = std::make_tuple(left_neighbor.pt_left,
                it_new->pt_left, it_new->pt_right);
        if(!points_match(event_points, std::make_tuple(ptA, ptB, ptC)))
            m_events.insert(*m_beach_compare.sweep_y, left_neighbor, *it_new);
    }
    if(right_neighbor.pt_right != nullptr) {
        // Make sure that we aren't creating a new event for the points we just
        // processed
        auto event_points = std::make_tuple(it_new->pt_left, it_new->pt_right,
                right_neighbor.pt_right);
        if(!points_match(event_points, std::make_tuple(ptA, ptB, ptC)))
            m_events.insert(*m_beach_compare.sweep_y, *it_new, right_neighbor);
    }

//    Line line0{*event.left_int.pt_left, *event.left_int.pt_right};
//    Line line1{*event.right_int.pt_left, *event.right_int.pt_right};
//    lines.push_back(line0);
//    lines.push_back(line1);
//
//    // finish off boundaries related to the middle point
//    auto itb = m_bounds.find(left_neighbor.pt_left, left_neighbor.pt_right);
//    assert(itb != m_bounds.end());
//    itb->circle_pt = right_neighbor.pt_right;
//
//    itb = m_bounds.find(right_neighbor.pt_left, right_neighbor.pt_right);
//    assert(itb != m_bounds.end());
//    itb->circle_pt = left_neighbor.pt_left;
        for(const auto& tup_node: m_nodes) {
            assert(tup_node.second != nullptr);
            std::cerr << tup_node.second->x << ", "
                << tup_node.second->y << std::endl;
        }

    // The new center point connects to bisectors of each of the individual
    // pairs of points, these are rays from the center of the event circle to
    // each of the bisectors. Note that the first two points define the line
    // beginning, so all 3 possible pairs of the 3 points must show up
    Node::Ptr nodeCenter = getNode(ptA, ptB, ptC);
    Node::Ptr nodeAB = getNode(ptA, ptB);
    Node::Ptr nodeBC = getNode(ptB, ptC);
    Node::Ptr nodeCA = getNode(ptA, ptC);
    assert(nodeCenter != nullptr);
    assert(nodeAB != nullptr);
    assert(nodeBC != nullptr);
    assert(nodeCA != nullptr);

        for(const auto& tup_node: m_nodes) {
            assert(tup_node.second != nullptr);
            std::cerr << tup_node.second->x << ", "
                << tup_node.second->y << std::endl;
        }
    float distAB = perp(event.circle.center, *ptA, *ptB);
    float distBC = perp(event.circle.center, *ptB, *ptC);
    float distCA = perp(event.circle.center, *ptC, *ptA);
    if((distAB <= 0 && distBC <= 0 && distCA <= 0) ||
            (distAB >= 0 && distBC >= 0 && distCA >= 0)) {
        // point inside triangle
        addTriplet(nodeCenter, nodeAB, nodeBC, nodeCA);
    } else {
        // Whichever ever side of the triangle had the opposite sign as the
        // other two, is the one that we need to connect with
        std::cerr << "center = ["<< event.circle.center << "]"
            << "\n\ttriangle = [" << *ptA << ";"
            << "\n\t" << *ptB << ";"
            << "\n\t" << *ptC << "]"
            << std::endl;
        if((distBC <= 0 && (distCA >= 0 && distAB >=0)) ||
                (distBC >= 0 && (distCA <= 0 && distAB <=0))) {
            // distBC is the odd man out, move ptC into ptA so that A, B are
            // nearest
            addTriplet(nodeBC, nodeCenter, nodeCA, nodeAB);
        } else if((distCA <= 0 && (distAB >= 0 && distBC >=0)) ||
                (distCA >= 0 && (distAB <= 0 && distBC <=0))) {
            // distCA is the odd man out, swap nodeAB and nodeCA
            addTriplet(nodeCA, nodeCenter, nodeAB, nodeBC);
        } else {
            addTriplet(nodeAB, nodeCenter, nodeBC, nodeCA);
        }

    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movq 0x8(%rsi), %rax
cmpq 0x10(%rsi), %rax
jne 0x8198
movq %rsi, %r15
movq %rdi, %r14
movq 0xcdd7(%rip), %rbx      # 0x13ff0
leaq 0x8338(%rip), %rsi      # 0xf558
movl $0x1d, %edx
movq %rbx, %rdi
callq 0x3280
movss 0x24(%r15), %xmm0
subss 0x28(%r15), %xmm0
cvtss2sd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x3330
movq %r15, %r13
movq %rax, %r15
leaq 0x8324(%rip), %rsi      # 0xf576
movl $0x7, %edx
movq %rax, %rdi
callq 0x3280
movq (%r13), %rsi
movq %r15, %rdi
callq 0x31b0
movq %rax, %r12
leaq 0x8309(%rip), %r15      # 0xf57e
movl $0x4, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x3280
movq 0x8(%r13), %rsi
movq %r12, %rdi
callq 0x31b0
movq %rax, %r12
leaq 0x82e8(%rip), %rsi      # 0xf583
movl $0x4, %edx
movq %rax, %rdi
callq 0x3280
movq 0x10(%r13), %rsi
movq %r12, %rdi
callq 0x31b0
movq %rax, %r12
movl $0x4, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x3280
movq %r13, -0x80(%rbp)
movq 0x18(%r13), %rsi
movq %r12, %rdi
callq 0x31b0
leaq 0x82aa(%rip), %rsi      # 0xf588
movl $0x2, %edx
movq %rax, %rdi
callq 0x3280
movq 0x28(%r14), %r12
movq %r14, -0x88(%rbp)
addq $0x18, %r14
cmpq %r14, %r12
je 0x7343
movq -0x88(%rbp), %rax
leaq 0x8(%rax), %r13
movq %r12, %rdi
callq 0x3290
cmpq %r14, %rax
je 0x7333
movq %rax, %r15
leaq 0x20(%r12), %rsi
leaq 0x20(%rax), %rdx
movq %r13, %rdi
callq 0xa7a6
testb %al, %al
je 0x80fe
movq %r12, %rdi
callq 0x3290
movq %rax, %r12
cmpq %r14, %rax
jne 0x730a
movq -0x88(%rbp), %r12
leaq 0x10(%r12), %r13
leaq 0x8258(%rip), %rsi      # 0xf5ae
movl $0x19, %edx
movq %rbx, %rdi
callq 0x3280
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3160
movq %r13, %rdi
movq -0x80(%rbp), %rsi
callq 0xbc04
cmpq 0x28(%r12), %rax
je 0x81b7
movq %rax, %r15
cmpq %r14, %rax
je 0x81d6
leaq 0x823e(%rip), %rsi      # 0xf5f2
movl $0xb, %edx
movq %rbx, %rdi
callq 0x3280
movq 0x20(%r15), %rsi
movq %rbx, %rdi
callq 0x6fc0
leaq 0x81aa(%rip), %rsi      # 0xf57e
movl $0x4, %edx
movq %rbx, %rdi
callq 0x3280
movq 0x28(%r15), %rsi
movq %rbx, %rdi
callq 0x6fc0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3160
movq %r15, %rdi
callq 0x3130
movups 0x20(%rax), %xmm0
movaps %xmm0, -0xf0(%rbp)
movq %rax, %rdi
callq 0x3290
movq %rax, %r14
movq 0x28(%rax), %rax
movq -0x80(%rbp), %r15
cmpq 0x8(%r15), %rax
jne 0x81f5
movq %r13, -0xb0(%rbp)
movq 0x20(%r14), %rax
cmpq (%r15), %rax
jne 0x8214
leaq 0x18(%r15), %r12
movq %r14, %rdi
callq 0x3290
movq %rax, %r13
movq 0x28(%rax), %rax
cmpq (%r12), %rax
jne 0x8233
leaq 0x10(%r15), %rcx
movq 0x20(%r13), %rax
movq %rcx, -0xd0(%rbp)
cmpq (%rcx), %rax
jne 0x8252
leaq 0x821e(%rip), %rsi      # 0xf6b2
movl $0xc, %edx
movq %rbx, %rdi
callq 0x3280
movq 0x20(%r13), %rsi
movq %rbx, %rdi
callq 0x6fc0
leaq 0x80ca(%rip), %rsi      # 0xf57e
movl $0x4, %edx
movq %rbx, %rdi
callq 0x3280
movq 0x28(%r13), %rsi
movq %rbx, %rdi
callq 0x6fc0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3160
movq %r13, %rdi
callq 0x3290
movups 0x20(%rax), %xmm0
movaps %xmm0, -0xe0(%rbp)
movq (%r15), %rax
movq %rax, -0x30(%rbp)
cmpq %rax, -0xe8(%rbp)
jne 0x8271
movq %r14, -0x90(%rbp)
movq (%r12), %rax
movq %rax, -0xa0(%rbp)
cmpq %rax, -0xe0(%rbp)
movq %r12, -0x1f8(%rbp)
jne 0x8290
movq -0x80(%rbp), %r15
movq 0x8(%r15), %rax
movq %rax, -0x98(%rbp)
movq -0x88(%rbp), %r12
leaq 0x40(%r12), %r14
leaq -0xf0(%rbp), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0xac4a
leaq -0xe0(%rbp), %rdx
movq %r14, -0xb8(%rbp)
movq %r14, %rdi
movq -0xd0(%rbp), %rsi
callq 0xac4a
leaq 0x8191(%rip), %rsi      # 0xf723
movl $0x12, %edx
movq %rbx, %rdi
callq 0x3280
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3160
movq -0xb0(%rbp), %r14
movq %r14, %rdi
movq -0x90(%rbp), %rsi
callq 0xbc7a
movq %r14, %rdi
movq %r13, %rsi
callq 0xbc7a
movss 0x24(%r15), %xmm0
subss 0x28(%r15), %xmm0
movq 0x8(%r12), %rax
movss %xmm0, (%rax)
leaq 0x8133(%rip), %rsi      # 0xf736
movl $0x18, %edx
movq %rbx, %rdi
callq 0x3280
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3160
movq %r14, %rdi
movq %r15, %rsi
movq -0x1f8(%rbp), %rdx
callq 0xbcbc
testb $0x1, %dl
je 0x82af
movq %rax, %rbx
movq -0xf0(%rbp), %rax
testq %rax, %rax
movq -0xa0(%rbp), %r14
movq -0x98(%rbp), %r15
je 0x76cb
movq 0x20(%rbx), %rcx
movq 0x28(%rbx), %rdx
leaq -0x258(%rbp), %rdi
movq %rdx, (%rdi)
movq %rcx, 0x8(%rdi)
movq %rax, 0x10(%rdi)
leaq -0x240(%rbp), %rsi
movq %r14, (%rsi)
movq %r15, 0x8(%rsi)
movq -0x30(%rbp), %rax
movq %rax, 0x10(%rsi)
callq 0x64d8
testb %al, %al
jne 0x76cb
leaq 0x20(%rbx), %rdx
movq 0x8(%r12), %rax
xorps %xmm0, %xmm0
cvtss2sd (%rax), %xmm0
leaq -0xf0(%rbp), %rsi
movq -0xb8(%rbp), %rdi
callq 0xad68
movq -0xd8(%rbp), %rax
testq %rax, %rax
je 0x7736
movq 0x20(%rbx), %rcx
movq 0x28(%rbx), %rdx
leaq -0x228(%rbp), %rdi
movq %rax, (%rdi)
movq %rdx, 0x8(%rdi)
movq %rcx, 0x10(%rdi)
leaq -0x210(%rbp), %rsi
movq %r14, (%rsi)
movq %r15, 0x8(%rsi)
movq -0x30(%rbp), %rax
movq %rax, 0x10(%rsi)
callq 0x64d8
testb %al, %al
jne 0x7736
addq $0x20, %rbx
movq 0x8(%r12), %rax
xorps %xmm0, %xmm0
cvtss2sd (%rax), %xmm0
leaq -0xe0(%rbp), %rdx
movq -0xb8(%rbp), %rdi
movq %rbx, %rsi
callq 0xad68
movq 0xa0(%r12), %r14
testq %r14, %r14
je 0x77ca
movq 0xc8a2(%rip), %rbx      # 0x13ff0
leaq 0x78e6(%rip), %r15      # 0xf03b
movq 0x20(%r14), %rax
testq %rax, %rax
je 0x80df
xorps %xmm0, %xmm0
cvtss2sd (%rax), %xmm0
movq %rbx, %rdi
callq 0x3330
movq %rax, %r12
movl $0x2, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x3280
movq 0x20(%r14), %rax
xorps %xmm0, %xmm0
cvtss2sd 0x4(%rax), %xmm0
movq %r12, %rdi
callq 0x3330
movq %rax, %r12
movq (%rax), %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), %r14
testq %r14, %r14
jne 0x7755
leaq -0x70(%rbp), %rdi
movq -0x88(%rbp), %r14
movq %r14, %rsi
movq -0x30(%rbp), %r12
movq %r12, %rdx
movq -0x98(%rbp), %r15
movq %r15, %rcx
movq -0xa0(%rbp), %rbx
movq %rbx, %r8
callq 0x84a8
leaq -0x60(%rbp), %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %r15, %rcx
callq 0x8678
leaq -0x50(%rbp), %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x8678
leaq -0x40(%rbp), %rdi
movq %r14, %rsi
movq -0x30(%rbp), %rdx
movq %rbx, %rcx
callq 0x8678
movq -0x80(%rbp), %rax
cmpq $0x0, -0x70(%rbp)
je 0x82ce
cmpq $0x0, -0x60(%rbp)
je 0x82ed
cmpq $0x0, -0x50(%rbp)
je 0x830c
cmpq $0x0, -0x40(%rbp)
je 0x832b
addq $0x20, %rax
movq %rax, -0x90(%rbp)
leaq 0xa0(%r14), %rbx
movq 0xc778(%rip), %r15      # 0x13ff0
leaq 0x77bc(%rip), %r12      # 0xf03b
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x78f6
movq 0x20(%rbx), %rax
testq %rax, %rax
je 0x80c0
xorps %xmm0, %xmm0
cvtss2sd (%rax), %xmm0
movq %r15, %rdi
callq 0x3330
movq %rax, %r13
movl $0x2, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x3280
movq 0x20(%rbx), %rax
xorps %xmm0, %xmm0
cvtss2sd 0x4(%rax), %xmm0
movq %r13, %rdi
callq 0x3330
movq %rax, %r13
movq (%rax), %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
jmp 0x787f
movq -0x98(%rbp), %r15
movss (%r15), %xmm4
movss 0x4(%r15), %xmm7
movq -0x80(%rbp), %rax
movss 0x20(%rax), %xmm2
movss 0x24(%rax), %xmm0
movaps %xmm2, %xmm5
subss %xmm4, %xmm5
movq -0x30(%rbp), %rax
movss (%rax), %xmm1
movss 0x4(%rax), %xmm3
movaps %xmm3, %xmm8
subss %xmm7, %xmm8
mulss %xmm5, %xmm8
movaps %xmm0, %xmm5
subss %xmm7, %xmm5
movaps %xmm1, %xmm6
subss %xmm4, %xmm6
mulss %xmm5, %xmm6
subss %xmm6, %xmm8
movaps %xmm8, -0x80(%rbp)
movq -0xa0(%rbp), %rbx
movss (%rbx), %xmm5
movss 0x4(%rbx), %xmm8
movaps %xmm2, %xmm6
subss %xmm5, %xmm6
subss %xmm8, %xmm7
mulss %xmm6, %xmm7
movaps %xmm0, %xmm6
subss %xmm8, %xmm6
subss %xmm5, %xmm4
mulss %xmm6, %xmm4
subss %xmm4, %xmm7
movaps %xmm7, -0xb0(%rbp)
subss %xmm1, %xmm2
subss %xmm3, %xmm8
mulss %xmm2, %xmm8
subss %xmm3, %xmm0
subss %xmm1, %xmm5
mulss %xmm0, %xmm5
subss %xmm5, %xmm8
xorps %xmm0, %xmm0
movaps %xmm8, -0xd0(%rbp)
ucomiss %xmm8, %xmm0
jb 0x79d2
ucomiss -0x80(%rbp), %xmm0
jb 0x79d2
xorps %xmm1, %xmm1
ucomiss -0xb0(%rbp), %xmm1
jae 0x79f3
movaps -0xd0(%rbp), %xmm1
ucomiss %xmm0, %xmm1
jb 0x7a2a
movaps -0x80(%rbp), %xmm1
ucomiss %xmm0, %xmm1
jb 0x7a2a
movaps -0xb0(%rbp), %xmm1
ucomiss %xmm0, %xmm1
jb 0x7a2a
movq -0x70(%rbp), %rcx
movq -0x68(%rbp), %rax
movq %rcx, -0x1f0(%rbp)
movq %rax, -0x1e8(%rbp)
testq %rax, %rax
je 0x7c36
movq 0xc5b7(%rip), %rcx      # 0x13fd0
cmpb $0x0, (%rcx)
je 0x7c32
incl 0x8(%rax)
jmp 0x7c36
movq 0xc5bf(%rip), %rdi      # 0x13ff0
leaq 0x7d86(%rip), %rsi      # 0xf7be
movl $0xa, %edx
callq 0x3280
movq 0xc5a7(%rip), %rdi      # 0x13ff0
movq -0x90(%rbp), %rsi
callq 0x6fc0
movq 0xc594(%rip), %rdi      # 0x13ff0
leaq 0x7d66(%rip), %rsi      # 0xf7c9
movl $0x1, %edx
callq 0x3280
movq 0xc57c(%rip), %rdi      # 0x13ff0
leaq 0x7d50(%rip), %rsi      # 0xf7cb
movl $0xe, %edx
callq 0x3280
movq 0xc564(%rip), %rdi      # 0x13ff0
movq -0x30(%rbp), %rsi
callq 0x6fc0
movq 0xc554(%rip), %rdi      # 0x13ff0
leaq 0x7d37(%rip), %rsi      # 0xf7da
movl $0x1, %edx
callq 0x3280
movq 0xc53c(%rip), %rdi      # 0x13ff0
leaq 0x7d21(%rip), %rsi      # 0xf7dc
movl $0x2, %edx
callq 0x3280
movq 0xc524(%rip), %rdi      # 0x13ff0
movq %r15, %rsi
callq 0x6fc0
movq 0xc515(%rip), %rdi      # 0x13ff0
leaq 0x7cf8(%rip), %rsi      # 0xf7da
movl $0x1, %edx
callq 0x3280
movq 0xc4fd(%rip), %rdi      # 0x13ff0
leaq 0x7ce2(%rip), %rsi      # 0xf7dc
movl $0x2, %edx
callq 0x3280
movq 0xc4e5(%rip), %rdi      # 0x13ff0
movq %rbx, %rsi
callq 0x6fc0
movq 0xc4d6(%rip), %rbx      # 0x13ff0
leaq 0x7ca8(%rip), %rsi      # 0xf7c9
movl $0x1, %edx
movq %rbx, %rdi
callq 0x3280
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq 0xc4a4(%rip), %rdi      # 0x13ff0
callq 0x3030
movq %rax, %rdi
callq 0x3160
xorps %xmm0, %xmm0
movaps -0xb0(%rbp), %xmm1
ucomiss %xmm0, %xmm1
setae %al
ucomiss %xmm1, %xmm0
setae %cl
xorps %xmm1, %xmm1
movaps -0x80(%rbp), %xmm4
cmpleps %xmm4, %xmm1
xorps %xmm2, %xmm2
movaps -0xd0(%rbp), %xmm3
cmpleps %xmm3, %xmm2
andps %xmm1, %xmm2
movd %xmm2, %edx
testb %cl, %dl
jne 0x7d78
movaps %xmm4, %xmm1
cmpleps %xmm0, %xmm1
movaps %xmm3, %xmm2
cmpleps %xmm0, %xmm2
andps %xmm1, %xmm2
movd %xmm2, %ecx
andb %al, %cl
jne 0x7d78
ucomiss %xmm0, %xmm3
setae %al
ucomiss %xmm3, %xmm0
setae %cl
xorps %xmm1, %xmm1
movaps -0xb0(%rbp), %xmm3
cmpleps %xmm3, %xmm1
xorps %xmm2, %xmm2
cmpleps %xmm4, %xmm2
andps %xmm1, %xmm2
movd %xmm2, %edx
testb %cl, %dl
jne 0x7da4
cmpleps %xmm0, %xmm3
cmpleps %xmm0, %xmm4
andps %xmm3, %xmm4
movd %xmm4, %ecx
andb %al, %cl
jne 0x7da4
movq -0x60(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rcx, -0x130(%rbp)
movq %rax, -0x128(%rbp)
testq %rax, %rax
je 0x7fcd
movq 0xc3af(%rip), %rcx      # 0x13fd0
cmpb $0x0, (%rcx)
je 0x7fc9
incl 0x8(%rax)
jmp 0x7fcd
lock
incl 0x8(%rax)
movq -0x60(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rcx, -0x1e0(%rbp)
movq %rax, -0x1d8(%rbp)
testq %rax, %rax
je 0x7c66
movq 0xc378(%rip), %rcx      # 0x13fd0
cmpb $0x0, (%rcx)
je 0x7c62
incl 0x8(%rax)
jmp 0x7c66
lock
incl 0x8(%rax)
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, -0x1d0(%rbp)
movq %rax, -0x1c8(%rbp)
testq %rax, %rax
je 0x7c96
movq 0xc348(%rip), %rcx      # 0x13fd0
cmpb $0x0, (%rcx)
je 0x7c92
incl 0x8(%rax)
jmp 0x7c96
lock
incl 0x8(%rax)
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, -0x1c0(%rbp)
movq %rax, -0x1b8(%rbp)
testq %rax, %rax
je 0x7cc6
movq 0xc318(%rip), %rcx      # 0x13fd0
cmpb $0x0, (%rcx)
je 0x7cc2
incl 0x8(%rax)
jmp 0x7cc6
lock
incl 0x8(%rax)
leaq -0x1f0(%rbp), %rsi
leaq -0x1e0(%rbp), %rdx
leaq -0x1d0(%rbp), %rcx
leaq -0x1c0(%rbp), %r8
movq %r14, %rdi
callq 0x8810
movq -0x1b8(%rbp), %rdi
testq %rdi, %rdi
je 0x7cfb
callq 0x4fba
movq -0x1c8(%rbp), %rdi
testq %rdi, %rdi
je 0x7d0c
callq 0x4fba
movq -0x1d8(%rbp), %rdi
testq %rdi, %rdi
je 0x7d1d
callq 0x4fba
movq -0x1e8(%rbp), %rdi
testq %rdi, %rdi
je 0x7d2e
callq 0x4fba
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x7d3c
callq 0x4fba
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0x7d4a
callq 0x4fba
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x7d58
callq 0x4fba
movq -0x68(%rbp), %rdi
testq %rdi, %rdi
je 0x7d66
callq 0x4fba
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, -0x1b0(%rbp)
movq %rax, -0x1a8(%rbp)
testq %rax, %rax
je 0x7ddf
movq 0xc236(%rip), %rcx      # 0x13fd0
cmpb $0x0, (%rcx)
je 0x7ddb
incl 0x8(%rax)
jmp 0x7ddf
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, -0x170(%rbp)
movq %rax, -0x168(%rbp)
testq %rax, %rax
je 0x7ed6
movq 0xc206(%rip), %rcx      # 0x13fd0
cmpb $0x0, (%rcx)
je 0x7ed2
incl 0x8(%rax)
jmp 0x7ed6
lock
incl 0x8(%rax)
movq -0x70(%rbp), %rcx
movq -0x68(%rbp), %rax
movq %rcx, -0x1a0(%rbp)
movq %rax, -0x198(%rbp)
testq %rax, %rax
je 0x7e0f
movq 0xc1cf(%rip), %rcx      # 0x13fd0
cmpb $0x0, (%rcx)
je 0x7e0b
incl 0x8(%rax)
jmp 0x7e0f
lock
incl 0x8(%rax)
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, -0x190(%rbp)
movq %rax, -0x188(%rbp)
testq %rax, %rax
je 0x7e3f
movq 0xc19f(%rip), %rcx      # 0x13fd0
cmpb $0x0, (%rcx)
je 0x7e3b
incl 0x8(%rax)
jmp 0x7e3f
lock
incl 0x8(%rax)
movq -0x60(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rcx, -0x180(%rbp)
movq %rax, -0x178(%rbp)
testq %rax, %rax
je 0x7e6f
movq 0xc16f(%rip), %rcx      # 0x13fd0
cmpb $0x0, (%rcx)
je 0x7e6b
incl 0x8(%rax)
jmp 0x7e6f
lock
incl 0x8(%rax)
leaq -0x1b0(%rbp), %rsi
leaq -0x1a0(%rbp), %rdx
leaq -0x190(%rbp), %rcx
leaq -0x180(%rbp), %r8
movq %r14, %rdi
callq 0x8810
movq -0x178(%rbp), %rdi
testq %rdi, %rdi
je 0x7ea4
callq 0x4fba
movq -0x188(%rbp), %rdi
testq %rdi, %rdi
je 0x7eb5
callq 0x4fba
movq -0x198(%rbp), %rdi
testq %rdi, %rdi
je 0x7ec6
callq 0x4fba
movq -0x1a8(%rbp), %rdi
jmp 0x7d24
lock
incl 0x8(%rax)
movq -0x70(%rbp), %rcx
movq -0x68(%rbp), %rax
movq %rcx, -0x160(%rbp)
movq %rax, -0x158(%rbp)
testq %rax, %rax
je 0x7f06
movq 0xc0d8(%rip), %rcx      # 0x13fd0
cmpb $0x0, (%rcx)
je 0x7f02
incl 0x8(%rax)
jmp 0x7f06
lock
incl 0x8(%rax)
movq -0x60(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rcx, -0x150(%rbp)
movq %rax, -0x148(%rbp)
testq %rax, %rax
je 0x7f36
movq 0xc0a8(%rip), %rcx      # 0x13fd0
cmpb $0x0, (%rcx)
je 0x7f32
incl 0x8(%rax)
jmp 0x7f36
lock
incl 0x8(%rax)
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, -0x140(%rbp)
movq %rax, -0x138(%rbp)
testq %rax, %rax
je 0x7f66
movq 0xc078(%rip), %rcx      # 0x13fd0
cmpb $0x0, (%rcx)
je 0x7f62
incl 0x8(%rax)
jmp 0x7f66
lock
incl 0x8(%rax)
leaq -0x170(%rbp), %rsi
leaq -0x160(%rbp), %rdx
leaq -0x150(%rbp), %rcx
leaq -0x140(%rbp), %r8
movq %r14, %rdi
callq 0x8810
movq -0x138(%rbp), %rdi
testq %rdi, %rdi
je 0x7f9b
callq 0x4fba
movq -0x148(%rbp), %rdi
testq %rdi, %rdi
je 0x7fac
callq 0x4fba
movq -0x158(%rbp), %rdi
testq %rdi, %rdi
je 0x7fbd
callq 0x4fba
movq -0x168(%rbp), %rdi
jmp 0x7d24
lock
incl 0x8(%rax)
movq -0x70(%rbp), %rcx
movq -0x68(%rbp), %rax
movq %rcx, -0x120(%rbp)
movq %rax, -0x118(%rbp)
testq %rax, %rax
je 0x7ffd
movq 0xbfe1(%rip), %rcx      # 0x13fd0
cmpb $0x0, (%rcx)
je 0x7ff9
incl 0x8(%rax)
jmp 0x7ffd
lock
incl 0x8(%rax)
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, -0x110(%rbp)
movq %rax, -0x108(%rbp)
testq %rax, %rax
je 0x802d
movq 0xbfb1(%rip), %rcx      # 0x13fd0
cmpb $0x0, (%rcx)
je 0x8029
incl 0x8(%rax)
jmp 0x802d
lock
incl 0x8(%rax)
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, -0x100(%rbp)
movq %rax, -0xf8(%rbp)
testq %rax, %rax
je 0x805d
movq 0xbf81(%rip), %rcx      # 0x13fd0
cmpb $0x0, (%rcx)
je 0x8059
incl 0x8(%rax)
jmp 0x805d
lock
incl 0x8(%rax)
leaq -0x130(%rbp), %rsi
leaq -0x120(%rbp), %rdx
leaq -0x110(%rbp), %rcx
leaq -0x100(%rbp), %r8
movq %r14, %rdi
callq 0x8810
movq -0xf8(%rbp), %rdi
testq %rdi, %rdi
je 0x8092
callq 0x4fba
movq -0x108(%rbp), %rdi
testq %rdi, %rdi
je 0x80a3
callq 0x4fba
movq -0x118(%rbp), %rdi
testq %rdi, %rdi
je 0x80b4
callq 0x4fba
movq -0x128(%rbp), %rdi
jmp 0x7d24
leaq 0x7690(%rip), %rdi      # 0xf757
leaq 0x723c(%rip), %rsi      # 0xf30a
leaq 0x7443(%rip), %rcx      # 0xf518
movl $0x2f8, %edx            # imm = 0x2F8
callq 0x3140
leaq 0x7671(%rip), %rdi      # 0xf757
leaq 0x721d(%rip), %rsi      # 0xf30a
leaq 0x7424(%rip), %rcx      # 0xf518
movl $0x2e5, %edx            # imm = 0x2E5
callq 0x3140
movq 0x20(%r12), %rsi
movq 0xbee6(%rip), %rdi      # 0x13ff0
callq 0x31d0
leaq 0x6f25(%rip), %rbx      # 0xf03b
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3240
movq 0x28(%r12), %rsi
movq %rax, %rdi
callq 0x31d0
leaq 0x7456(%rip), %rsi      # 0xf58b
movq %rax, %rdi
callq 0x3240
movq 0x20(%r15), %rsi
movq %rax, %rdi
callq 0x31d0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3240
movq 0x28(%r15), %rsi
movq %rax, %rdi
callq 0x31d0
leaq 0x7433(%rip), %rsi      # 0xf59a
movq %rax, %rdi
callq 0x3240
movq %rax, %rdi
callq 0x30d0
movl $0x4, %edi
callq 0x30e0
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq 0xbe12(%rip), %rsi      # 0x13fa0
movq %rax, %rdi
xorl %edx, %edx
callq 0x3370
leaq 0x7346(%rip), %rdi      # 0xf4e5
leaq 0x7164(%rip), %rsi      # 0xf30a
leaq 0x736b(%rip), %rcx      # 0xf518
movl $0x254, %edx            # imm = 0x254
callq 0x3140
leaq 0x740a(%rip), %rdi      # 0xf5c8
leaq 0x7145(%rip), %rsi      # 0xf30a
leaq 0x734c(%rip), %rcx      # 0xf518
movl $0x290, %edx            # imm = 0x290
callq 0x3140
leaq 0x7401(%rip), %rdi      # 0xf5de
leaq 0x7126(%rip), %rsi      # 0xf30a
leaq 0x732d(%rip), %rcx      # 0xf518
movl $0x291, %edx            # imm = 0x291
callq 0x3140
leaq 0x7402(%rip), %rdi      # 0xf5fe
leaq 0x7107(%rip), %rsi      # 0xf30a
leaq 0x730e(%rip), %rcx      # 0xf518
movl $0x298, %edx            # imm = 0x298
callq 0x3140
leaq 0x7410(%rip), %rdi      # 0xf62b
leaq 0x70e8(%rip), %rsi      # 0xf30a
leaq 0x72ef(%rip), %rcx      # 0xf518
movl $0x299, %edx            # imm = 0x299
callq 0x3140
leaq 0x741c(%rip), %rdi      # 0xf656
leaq 0x70c9(%rip), %rsi      # 0xf30a
leaq 0x72d0(%rip), %rcx      # 0xf518
movl $0x29c, %edx            # imm = 0x29C
callq 0x3140
leaq 0x742c(%rip), %rdi      # 0xf685
leaq 0x70aa(%rip), %rsi      # 0xf30a
leaq 0x72b1(%rip), %rcx      # 0xf518
movl $0x29d, %edx            # imm = 0x29D
callq 0x3140
leaq 0x7447(%rip), %rdi      # 0xf6bf
leaq 0x708b(%rip), %rsi      # 0xf30a
leaq 0x7292(%rip), %rcx      # 0xf518
movl $0x2a1, %edx            # imm = 0x2A1
callq 0x3140
leaq 0x7459(%rip), %rdi      # 0xf6f0
leaq 0x706c(%rip), %rsi      # 0xf30a
leaq 0x7273(%rip), %rcx      # 0xf518
movl $0x2a2, %edx            # imm = 0x2A2
callq 0x3140
leaq 0x7499(%rip), %rdi      # 0xf74f
leaq 0x704d(%rip), %rsi      # 0xf30a
leaq 0x7254(%rip), %rcx      # 0xf518
movl $0x2bf, %edx            # imm = 0x2BF
callq 0x3140
leaq 0x749d(%rip), %rdi      # 0xf772
leaq 0x702e(%rip), %rsi      # 0xf30a
leaq 0x7235(%rip), %rcx      # 0xf518
movl $0x2f2, %edx            # imm = 0x2F2
callq 0x3140
leaq 0x7494(%rip), %rdi      # 0xf788
leaq 0x700f(%rip), %rsi      # 0xf30a
leaq 0x7216(%rip), %rcx      # 0xf518
movl $0x2f3, %edx            # imm = 0x2F3
callq 0x3140
leaq 0x7487(%rip), %rdi      # 0xf79a
leaq 0x6ff0(%rip), %rsi      # 0xf30a
leaq 0x71f7(%rip), %rcx      # 0xf518
movl $0x2f4, %edx            # imm = 0x2F4
callq 0x3140
leaq 0x747a(%rip), %rdi      # 0xf7ac
leaq 0x6fd1(%rip), %rsi      # 0xf30a
leaq 0x71d8(%rip), %rcx      # 0xf518
movl $0x2f5, %edx            # imm = 0x2F5
callq 0x3140
movq %rax, %rbx
movq -0xf8(%rbp), %rdi
testq %rdi, %rdi
je 0x835e
callq 0x4fba
movq -0x108(%rbp), %rdi
testq %rdi, %rdi
je 0x836f
callq 0x4fba
movq -0x118(%rbp), %rdi
testq %rdi, %rdi
je 0x8380
callq 0x4fba
movq -0x128(%rbp), %rdi
jmp 0x8447
movq %rax, %rbx
movq -0x138(%rbp), %rdi
testq %rdi, %rdi
je 0x83a0
callq 0x4fba
movq -0x148(%rbp), %rdi
testq %rdi, %rdi
je 0x83b1
callq 0x4fba
movq -0x158(%rbp), %rdi
testq %rdi, %rdi
je 0x83c2
callq 0x4fba
movq -0x168(%rbp), %rdi
jmp 0x8447
movq %rax, %rbx
movq -0x178(%rbp), %rdi
testq %rdi, %rdi
je 0x83df
callq 0x4fba
movq -0x188(%rbp), %rdi
testq %rdi, %rdi
je 0x83f0
callq 0x4fba
movq -0x198(%rbp), %rdi
testq %rdi, %rdi
je 0x8401
callq 0x4fba
movq -0x1a8(%rbp), %rdi
jmp 0x8447
movq %rax, %rbx
movq -0x1b8(%rbp), %rdi
testq %rdi, %rdi
je 0x841e
callq 0x4fba
movq -0x1c8(%rbp), %rdi
testq %rdi, %rdi
je 0x842f
callq 0x4fba
movq -0x1d8(%rbp), %rdi
testq %rdi, %rdi
je 0x8440
callq 0x4fba
movq -0x1e8(%rbp), %rdi
testq %rdi, %rdi
je 0x8467
callq 0x4fba
jmp 0x8467
movq %rax, %rbx
jmp 0x8475
movq %rax, %rbx
jmp 0x8483
movq %rax, %rbx
jmp 0x8491
jmp 0x8464
movq %rax, %rbx
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x8475
callq 0x4fba
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0x8483
callq 0x4fba
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x8491
callq 0x4fba
movq -0x68(%rbp), %rdi
testq %rdi, %rdi
je 0x849f
callq 0x4fba
movq %rbx, %rdi
callq 0x3390
nop