// File: /workspace/github_cpp_makefile_star2_O3/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 0x812c
movq %rsi, %r15
movq %rdi, %r14
movq 0xce43(%rip), %rbx      # 0x13ff0
leaq 0x8394(%rip), %rsi      # 0xf548
movl $0x1d, %edx
movq %rbx, %rdi
callq 0x3270
movss 0x24(%r15), %xmm0
subss 0x28(%r15), %xmm0
cvtss2sd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x3320
movq %r15, %r13
movq %rax, %r15
leaq 0x8380(%rip), %rsi      # 0xf566
movl $0x7, %edx
movq %rax, %rdi
callq 0x3270
movq (%r13), %rsi
movq %r15, %rdi
callq 0x31b0
movq %rax, %r12
leaq 0x8365(%rip), %r15      # 0xf56e
movl $0x4, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x3270
movq 0x8(%r13), %rsi
movq %r12, %rdi
callq 0x31b0
movq %rax, %r12
leaq 0x8344(%rip), %rsi      # 0xf573
movl $0x4, %edx
movq %rax, %rdi
callq 0x3270
movq 0x10(%r13), %rsi
movq %r12, %rdi
callq 0x31b0
movq %rax, %r12
movl $0x4, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x3270
movq %r13, -0x80(%rbp)
movq 0x18(%r13), %rsi
movq %r12, %rdi
callq 0x31b0
leaq 0x8306(%rip), %rsi      # 0xf578
movl $0x2, %edx
movq %rax, %rdi
callq 0x3270
movq 0x28(%r14), %r12
movq %r14, -0x88(%rbp)
addq $0x18, %r14
cmpq %r14, %r12
je 0x72d7
movq -0x88(%rbp), %rax
leaq 0x8(%rax), %r13
movq %r12, %rdi
callq 0x3280
cmpq %r14, %rax
je 0x72c7
movq %rax, %r15
leaq 0x20(%r12), %rsi
leaq 0x20(%rax), %rdx
movq %r13, %rdi
callq 0xa876
testb %al, %al
je 0x8092
movq %r12, %rdi
callq 0x3280
movq %rax, %r12
cmpq %r14, %rax
jne 0x729e
movq -0x88(%rbp), %r12
leaq 0x10(%r12), %r13
leaq 0x82b4(%rip), %rsi      # 0xf59e
movl $0x19, %edx
movq %rbx, %rdi
callq 0x3270
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3220
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3160
movq %r13, %rdi
movq -0x80(%rbp), %rsi
callq 0xbc90
cmpq 0x28(%r12), %rax
je 0x814b
movq %rax, %r15
cmpq %r14, %rax
je 0x816a
leaq 0x829a(%rip), %rsi      # 0xf5e2
movl $0xb, %edx
movq %rbx, %rdi
callq 0x3270
movq 0x20(%r15), %rsi
movq %rbx, %rdi
callq 0x6f7e
leaq 0x8206(%rip), %rsi      # 0xf56e
movl $0x4, %edx
movq %rbx, %rdi
callq 0x3270
movq 0x28(%r15), %rsi
movq %rbx, %rdi
callq 0x6f7e
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3220
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 0x3280
movq %rax, %r14
movq 0x28(%rax), %rax
movq -0x80(%rbp), %r15
cmpq 0x8(%r15), %rax
jne 0x8189
movq %r13, -0xb0(%rbp)
movq 0x20(%r14), %rax
cmpq (%r15), %rax
jne 0x81a8
leaq 0x18(%r15), %r12
movq %r14, %rdi
callq 0x3280
movq %rax, %r13
movq 0x28(%rax), %rax
cmpq (%r12), %rax
jne 0x81c7
leaq 0x10(%r15), %rcx
movq 0x20(%r13), %rax
movq %rcx, -0xd0(%rbp)
cmpq (%rcx), %rax
jne 0x81e6
leaq 0x827a(%rip), %rsi      # 0xf6a2
movl $0xc, %edx
movq %rbx, %rdi
callq 0x3270
movq 0x20(%r13), %rsi
movq %rbx, %rdi
callq 0x6f7e
leaq 0x8126(%rip), %rsi      # 0xf56e
movl $0x4, %edx
movq %rbx, %rdi
callq 0x3270
movq 0x28(%r13), %rsi
movq %rbx, %rdi
callq 0x6f7e
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3220
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3160
movq %r13, %rdi
callq 0x3280
movups 0x20(%rax), %xmm0
movaps %xmm0, -0xe0(%rbp)
movq (%r15), %rax
movq %rax, -0x30(%rbp)
cmpq %rax, -0xe8(%rbp)
jne 0x8205
movq %r14, -0x90(%rbp)
movq (%r12), %rax
movq %rax, -0xa0(%rbp)
cmpq %rax, -0xe0(%rbp)
movq %r12, -0x1f8(%rbp)
jne 0x8224
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 0xad1a
leaq -0xe0(%rbp), %rdx
movq %r14, -0xb8(%rbp)
movq %r14, %rdi
movq -0xd0(%rbp), %rsi
callq 0xad1a
leaq 0x81ed(%rip), %rsi      # 0xf713
movl $0x12, %edx
movq %rbx, %rdi
callq 0x3270
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3220
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 0xbd04
movq %r14, %rdi
movq %r13, %rsi
callq 0xbd04
movss 0x24(%r15), %xmm0
subss 0x28(%r15), %xmm0
movq 0x8(%r12), %rax
movss %xmm0, (%rax)
leaq 0x818f(%rip), %rsi      # 0xf726
movl $0x18, %edx
movq %rbx, %rdi
callq 0x3270
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3220
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3160
movq %r14, %rdi
movq %r15, %rsi
movq -0x1f8(%rbp), %rdx
callq 0xbd46
testb $0x1, %dl
je 0x8243
movq %rax, %rbx
movq -0xf0(%rbp), %rax
testq %rax, %rax
movq -0xa0(%rbp), %r14
movq -0x98(%rbp), %r15
je 0x765f
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 0x64d0
testb %al, %al
jne 0x765f
leaq 0x20(%rbx), %rdx
movq 0x8(%r12), %rax
xorps %xmm0, %xmm0
cvtss2sd (%rax), %xmm0
leaq -0xf0(%rbp), %rsi
movq -0xb8(%rbp), %rdi
callq 0xae36
movq -0xd8(%rbp), %rax
testq %rax, %rax
je 0x76ca
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 0x64d0
testb %al, %al
jne 0x76ca
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 0xae36
movq 0xa0(%r12), %r14
testq %r14, %r14
je 0x775e
movq 0xc90e(%rip), %rbx      # 0x13ff0
leaq 0x7952(%rip), %r15      # 0xf03b
movq 0x20(%r14), %rax
testq %rax, %rax
je 0x8073
xorps %xmm0, %xmm0
cvtss2sd (%rax), %xmm0
movq %rbx, %rdi
callq 0x3320
movq %rax, %r12
movl $0x2, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x3270
movq 0x20(%r14), %rax
xorps %xmm0, %xmm0
cvtss2sd 0x4(%rax), %xmm0
movq %r12, %rdi
callq 0x3320
movq %rax, %r12
movq (%rax), %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), %r14
testq %r14, %r14
jne 0x76e9
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 0x843c
leaq -0x60(%rbp), %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %r15, %rcx
callq 0x867c
leaq -0x50(%rbp), %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x867c
leaq -0x40(%rbp), %rdi
movq %r14, %rsi
movq -0x30(%rbp), %rdx
movq %rbx, %rcx
callq 0x867c
movq -0x80(%rbp), %rax
cmpq $0x0, -0x70(%rbp)
je 0x8262
cmpq $0x0, -0x60(%rbp)
je 0x8281
cmpq $0x0, -0x50(%rbp)
je 0x82a0
cmpq $0x0, -0x40(%rbp)
je 0x82bf
addq $0x20, %rax
movq %rax, -0x90(%rbp)
leaq 0xa0(%r14), %rbx
movq 0xc7e4(%rip), %r15      # 0x13ff0
leaq 0x7828(%rip), %r12      # 0xf03b
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x788a
movq 0x20(%rbx), %rax
testq %rax, %rax
je 0x8054
xorps %xmm0, %xmm0
cvtss2sd (%rax), %xmm0
movq %r15, %rdi
callq 0x3320
movq %rax, %r13
movl $0x2, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x3270
movq 0x20(%rbx), %rax
xorps %xmm0, %xmm0
cvtss2sd 0x4(%rax), %xmm0
movq %r13, %rdi
callq 0x3320
movq %rax, %r13
movq (%rax), %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
jmp 0x7813
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 0x7966
ucomiss -0x80(%rbp), %xmm0
jb 0x7966
xorps %xmm1, %xmm1
ucomiss -0xb0(%rbp), %xmm1
jae 0x7987
movaps -0xd0(%rbp), %xmm1
ucomiss %xmm0, %xmm1
jb 0x79be
movaps -0x80(%rbp), %xmm1
ucomiss %xmm0, %xmm1
jb 0x79be
movaps -0xb0(%rbp), %xmm1
ucomiss %xmm0, %xmm1
jb 0x79be
movq -0x70(%rbp), %rcx
movq -0x68(%rbp), %rax
movq %rcx, -0x1f0(%rbp)
movq %rax, -0x1e8(%rbp)
testq %rax, %rax
je 0x7bca
movq 0xc623(%rip), %rcx      # 0x13fd0
cmpb $0x0, (%rcx)
je 0x7bc6
incl 0x8(%rax)
jmp 0x7bca
movq 0xc62b(%rip), %rdi      # 0x13ff0
leaq 0x7de2(%rip), %rsi      # 0xf7ae
movl $0xa, %edx
callq 0x3270
movq 0xc613(%rip), %rdi      # 0x13ff0
movq -0x90(%rbp), %rsi
callq 0x6f7e
movq 0xc600(%rip), %rdi      # 0x13ff0
leaq 0x7dc2(%rip), %rsi      # 0xf7b9
movl $0x1, %edx
callq 0x3270
movq 0xc5e8(%rip), %rdi      # 0x13ff0
leaq 0x7dac(%rip), %rsi      # 0xf7bb
movl $0xe, %edx
callq 0x3270
movq 0xc5d0(%rip), %rdi      # 0x13ff0
movq -0x30(%rbp), %rsi
callq 0x6f7e
movq 0xc5c0(%rip), %rdi      # 0x13ff0
leaq 0x7d93(%rip), %rsi      # 0xf7ca
movl $0x1, %edx
callq 0x3270
movq 0xc5a8(%rip), %rdi      # 0x13ff0
leaq 0x7d7d(%rip), %rsi      # 0xf7cc
movl $0x2, %edx
callq 0x3270
movq 0xc590(%rip), %rdi      # 0x13ff0
movq %r15, %rsi
callq 0x6f7e
movq 0xc581(%rip), %rdi      # 0x13ff0
leaq 0x7d54(%rip), %rsi      # 0xf7ca
movl $0x1, %edx
callq 0x3270
movq 0xc569(%rip), %rdi      # 0x13ff0
leaq 0x7d3e(%rip), %rsi      # 0xf7cc
movl $0x2, %edx
callq 0x3270
movq 0xc551(%rip), %rdi      # 0x13ff0
movq %rbx, %rsi
callq 0x6f7e
movq 0xc542(%rip), %rbx      # 0x13ff0
leaq 0x7d04(%rip), %rsi      # 0xf7b9
movl $0x1, %edx
movq %rbx, %rdi
callq 0x3270
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x3220
movsbl %al, %esi
movq 0xc510(%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 0x7d0c
movaps %xmm4, %xmm1
cmpleps %xmm0, %xmm1
movaps %xmm3, %xmm2
cmpleps %xmm0, %xmm2
andps %xmm1, %xmm2
movd %xmm2, %ecx
andb %al, %cl
jne 0x7d0c
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 0x7d38
cmpleps %xmm0, %xmm3
cmpleps %xmm0, %xmm4
andps %xmm3, %xmm4
movd %xmm4, %ecx
andb %al, %cl
jne 0x7d38
movq -0x60(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rcx, -0x130(%rbp)
movq %rax, -0x128(%rbp)
testq %rax, %rax
je 0x7f61
movq 0xc41b(%rip), %rcx      # 0x13fd0
cmpb $0x0, (%rcx)
je 0x7f5d
incl 0x8(%rax)
jmp 0x7f61
lock
incl 0x8(%rax)
movq -0x60(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rcx, -0x1e0(%rbp)
movq %rax, -0x1d8(%rbp)
testq %rax, %rax
je 0x7bfa
movq 0xc3e4(%rip), %rcx      # 0x13fd0
cmpb $0x0, (%rcx)
je 0x7bf6
incl 0x8(%rax)
jmp 0x7bfa
lock
incl 0x8(%rax)
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, -0x1d0(%rbp)
movq %rax, -0x1c8(%rbp)
testq %rax, %rax
je 0x7c2a
movq 0xc3b4(%rip), %rcx      # 0x13fd0
cmpb $0x0, (%rcx)
je 0x7c26
incl 0x8(%rax)
jmp 0x7c2a
lock
incl 0x8(%rax)
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, -0x1c0(%rbp)
movq %rax, -0x1b8(%rbp)
testq %rax, %rax
je 0x7c5a
movq 0xc384(%rip), %rcx      # 0x13fd0
cmpb $0x0, (%rcx)
je 0x7c56
incl 0x8(%rax)
jmp 0x7c5a
lock
incl 0x8(%rax)
leaq -0x1f0(%rbp), %rsi
leaq -0x1e0(%rbp), %rdx
leaq -0x1d0(%rbp), %rcx
leaq -0x1c0(%rbp), %r8
movq %r14, %rdi
callq 0x887e
movq -0x1b8(%rbp), %rdi
testq %rdi, %rdi
je 0x7c8f
callq 0x4f9a
movq -0x1c8(%rbp), %rdi
testq %rdi, %rdi
je 0x7ca0
callq 0x4f9a
movq -0x1d8(%rbp), %rdi
testq %rdi, %rdi
je 0x7cb1
callq 0x4f9a
movq -0x1e8(%rbp), %rdi
testq %rdi, %rdi
je 0x7cc2
callq 0x4f9a
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x7cd0
callq 0x4f9a
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0x7cde
callq 0x4f9a
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x7cec
callq 0x4f9a
movq -0x68(%rbp), %rdi
testq %rdi, %rdi
je 0x7cfa
callq 0x4f9a
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 0x7d73
movq 0xc2a2(%rip), %rcx      # 0x13fd0
cmpb $0x0, (%rcx)
je 0x7d6f
incl 0x8(%rax)
jmp 0x7d73
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, -0x170(%rbp)
movq %rax, -0x168(%rbp)
testq %rax, %rax
je 0x7e6a
movq 0xc272(%rip), %rcx      # 0x13fd0
cmpb $0x0, (%rcx)
je 0x7e66
incl 0x8(%rax)
jmp 0x7e6a
lock
incl 0x8(%rax)
movq -0x70(%rbp), %rcx
movq -0x68(%rbp), %rax
movq %rcx, -0x1a0(%rbp)
movq %rax, -0x198(%rbp)
testq %rax, %rax
je 0x7da3
movq 0xc23b(%rip), %rcx      # 0x13fd0
cmpb $0x0, (%rcx)
je 0x7d9f
incl 0x8(%rax)
jmp 0x7da3
lock
incl 0x8(%rax)
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, -0x190(%rbp)
movq %rax, -0x188(%rbp)
testq %rax, %rax
je 0x7dd3
movq 0xc20b(%rip), %rcx      # 0x13fd0
cmpb $0x0, (%rcx)
je 0x7dcf
incl 0x8(%rax)
jmp 0x7dd3
lock
incl 0x8(%rax)
movq -0x60(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rcx, -0x180(%rbp)
movq %rax, -0x178(%rbp)
testq %rax, %rax
je 0x7e03
movq 0xc1db(%rip), %rcx      # 0x13fd0
cmpb $0x0, (%rcx)
je 0x7dff
incl 0x8(%rax)
jmp 0x7e03
lock
incl 0x8(%rax)
leaq -0x1b0(%rbp), %rsi
leaq -0x1a0(%rbp), %rdx
leaq -0x190(%rbp), %rcx
leaq -0x180(%rbp), %r8
movq %r14, %rdi
callq 0x887e
movq -0x178(%rbp), %rdi
testq %rdi, %rdi
je 0x7e38
callq 0x4f9a
movq -0x188(%rbp), %rdi
testq %rdi, %rdi
je 0x7e49
callq 0x4f9a
movq -0x198(%rbp), %rdi
testq %rdi, %rdi
je 0x7e5a
callq 0x4f9a
movq -0x1a8(%rbp), %rdi
jmp 0x7cb8
lock
incl 0x8(%rax)
movq -0x70(%rbp), %rcx
movq -0x68(%rbp), %rax
movq %rcx, -0x160(%rbp)
movq %rax, -0x158(%rbp)
testq %rax, %rax
je 0x7e9a
movq 0xc144(%rip), %rcx      # 0x13fd0
cmpb $0x0, (%rcx)
je 0x7e96
incl 0x8(%rax)
jmp 0x7e9a
lock
incl 0x8(%rax)
movq -0x60(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rcx, -0x150(%rbp)
movq %rax, -0x148(%rbp)
testq %rax, %rax
je 0x7eca
movq 0xc114(%rip), %rcx      # 0x13fd0
cmpb $0x0, (%rcx)
je 0x7ec6
incl 0x8(%rax)
jmp 0x7eca
lock
incl 0x8(%rax)
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, -0x140(%rbp)
movq %rax, -0x138(%rbp)
testq %rax, %rax
je 0x7efa
movq 0xc0e4(%rip), %rcx      # 0x13fd0
cmpb $0x0, (%rcx)
je 0x7ef6
incl 0x8(%rax)
jmp 0x7efa
lock
incl 0x8(%rax)
leaq -0x170(%rbp), %rsi
leaq -0x160(%rbp), %rdx
leaq -0x150(%rbp), %rcx
leaq -0x140(%rbp), %r8
movq %r14, %rdi
callq 0x887e
movq -0x138(%rbp), %rdi
testq %rdi, %rdi
je 0x7f2f
callq 0x4f9a
movq -0x148(%rbp), %rdi
testq %rdi, %rdi
je 0x7f40
callq 0x4f9a
movq -0x158(%rbp), %rdi
testq %rdi, %rdi
je 0x7f51
callq 0x4f9a
movq -0x168(%rbp), %rdi
jmp 0x7cb8
lock
incl 0x8(%rax)
movq -0x70(%rbp), %rcx
movq -0x68(%rbp), %rax
movq %rcx, -0x120(%rbp)
movq %rax, -0x118(%rbp)
testq %rax, %rax
je 0x7f91
movq 0xc04d(%rip), %rcx      # 0x13fd0
cmpb $0x0, (%rcx)
je 0x7f8d
incl 0x8(%rax)
jmp 0x7f91
lock
incl 0x8(%rax)
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, -0x110(%rbp)
movq %rax, -0x108(%rbp)
testq %rax, %rax
je 0x7fc1
movq 0xc01d(%rip), %rcx      # 0x13fd0
cmpb $0x0, (%rcx)
je 0x7fbd
incl 0x8(%rax)
jmp 0x7fc1
lock
incl 0x8(%rax)
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, -0x100(%rbp)
movq %rax, -0xf8(%rbp)
testq %rax, %rax
je 0x7ff1
movq 0xbfed(%rip), %rcx      # 0x13fd0
cmpb $0x0, (%rcx)
je 0x7fed
incl 0x8(%rax)
jmp 0x7ff1
lock
incl 0x8(%rax)
leaq -0x130(%rbp), %rsi
leaq -0x120(%rbp), %rdx
leaq -0x110(%rbp), %rcx
leaq -0x100(%rbp), %r8
movq %r14, %rdi
callq 0x887e
movq -0xf8(%rbp), %rdi
testq %rdi, %rdi
je 0x8026
callq 0x4f9a
movq -0x108(%rbp), %rdi
testq %rdi, %rdi
je 0x8037
callq 0x4f9a
movq -0x118(%rbp), %rdi
testq %rdi, %rdi
je 0x8048
callq 0x4f9a
movq -0x128(%rbp), %rdi
jmp 0x7cb8
leaq 0x76ec(%rip), %rdi      # 0xf747
leaq 0x7298(%rip), %rsi      # 0xf2fa
leaq 0x749f(%rip), %rcx      # 0xf508
movl $0x2f8, %edx            # imm = 0x2F8
callq 0x3140
leaq 0x76cd(%rip), %rdi      # 0xf747
leaq 0x7279(%rip), %rsi      # 0xf2fa
leaq 0x7480(%rip), %rcx      # 0xf508
movl $0x2e5, %edx            # imm = 0x2E5
callq 0x3140
movq 0x20(%r12), %rsi
movq 0xbf52(%rip), %rdi      # 0x13ff0
callq 0x31d0
leaq 0x6f91(%rip), %rbx      # 0xf03b
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3230
movq 0x28(%r12), %rsi
movq %rax, %rdi
callq 0x31d0
leaq 0x74b2(%rip), %rsi      # 0xf57b
movq %rax, %rdi
callq 0x3230
movq 0x20(%r15), %rsi
movq %rax, %rdi
callq 0x31d0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3230
movq 0x28(%r15), %rsi
movq %rax, %rdi
callq 0x31d0
leaq 0x748f(%rip), %rsi      # 0xf58a
movq %rax, %rdi
callq 0x3230
movq %rax, %rdi
callq 0x30d0
movl $0x4, %edi
callq 0x30e0
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq 0xbe7e(%rip), %rsi      # 0x13fa0
movq %rax, %rdi
xorl %edx, %edx
callq 0x3360
leaq 0x73a2(%rip), %rdi      # 0xf4d5
leaq 0x71c0(%rip), %rsi      # 0xf2fa
leaq 0x73c7(%rip), %rcx      # 0xf508
movl $0x254, %edx            # imm = 0x254
callq 0x3140
leaq 0x7466(%rip), %rdi      # 0xf5b8
leaq 0x71a1(%rip), %rsi      # 0xf2fa
leaq 0x73a8(%rip), %rcx      # 0xf508
movl $0x290, %edx            # imm = 0x290
callq 0x3140
leaq 0x745d(%rip), %rdi      # 0xf5ce
leaq 0x7182(%rip), %rsi      # 0xf2fa
leaq 0x7389(%rip), %rcx      # 0xf508
movl $0x291, %edx            # imm = 0x291
callq 0x3140
leaq 0x745e(%rip), %rdi      # 0xf5ee
leaq 0x7163(%rip), %rsi      # 0xf2fa
leaq 0x736a(%rip), %rcx      # 0xf508
movl $0x298, %edx            # imm = 0x298
callq 0x3140
leaq 0x746c(%rip), %rdi      # 0xf61b
leaq 0x7144(%rip), %rsi      # 0xf2fa
leaq 0x734b(%rip), %rcx      # 0xf508
movl $0x299, %edx            # imm = 0x299
callq 0x3140
leaq 0x7478(%rip), %rdi      # 0xf646
leaq 0x7125(%rip), %rsi      # 0xf2fa
leaq 0x732c(%rip), %rcx      # 0xf508
movl $0x29c, %edx            # imm = 0x29C
callq 0x3140
leaq 0x7488(%rip), %rdi      # 0xf675
leaq 0x7106(%rip), %rsi      # 0xf2fa
leaq 0x730d(%rip), %rcx      # 0xf508
movl $0x29d, %edx            # imm = 0x29D
callq 0x3140
leaq 0x74a3(%rip), %rdi      # 0xf6af
leaq 0x70e7(%rip), %rsi      # 0xf2fa
leaq 0x72ee(%rip), %rcx      # 0xf508
movl $0x2a1, %edx            # imm = 0x2A1
callq 0x3140
leaq 0x74b5(%rip), %rdi      # 0xf6e0
leaq 0x70c8(%rip), %rsi      # 0xf2fa
leaq 0x72cf(%rip), %rcx      # 0xf508
movl $0x2a2, %edx            # imm = 0x2A2
callq 0x3140
leaq 0x74f5(%rip), %rdi      # 0xf73f
leaq 0x70a9(%rip), %rsi      # 0xf2fa
leaq 0x72b0(%rip), %rcx      # 0xf508
movl $0x2bf, %edx            # imm = 0x2BF
callq 0x3140
leaq 0x74f9(%rip), %rdi      # 0xf762
leaq 0x708a(%rip), %rsi      # 0xf2fa
leaq 0x7291(%rip), %rcx      # 0xf508
movl $0x2f2, %edx            # imm = 0x2F2
callq 0x3140
leaq 0x74f0(%rip), %rdi      # 0xf778
leaq 0x706b(%rip), %rsi      # 0xf2fa
leaq 0x7272(%rip), %rcx      # 0xf508
movl $0x2f3, %edx            # imm = 0x2F3
callq 0x3140
leaq 0x74e3(%rip), %rdi      # 0xf78a
leaq 0x704c(%rip), %rsi      # 0xf2fa
leaq 0x7253(%rip), %rcx      # 0xf508
movl $0x2f4, %edx            # imm = 0x2F4
callq 0x3140
leaq 0x74d6(%rip), %rdi      # 0xf79c
leaq 0x702d(%rip), %rsi      # 0xf2fa
leaq 0x7234(%rip), %rcx      # 0xf508
movl $0x2f5, %edx            # imm = 0x2F5
callq 0x3140
movq %rax, %rbx
movq -0xf8(%rbp), %rdi
testq %rdi, %rdi
je 0x82f2
callq 0x4f9a
movq -0x108(%rbp), %rdi
testq %rdi, %rdi
je 0x8303
callq 0x4f9a
movq -0x118(%rbp), %rdi
testq %rdi, %rdi
je 0x8314
callq 0x4f9a
movq -0x128(%rbp), %rdi
jmp 0x83db
movq %rax, %rbx
movq -0x138(%rbp), %rdi
testq %rdi, %rdi
je 0x8334
callq 0x4f9a
movq -0x148(%rbp), %rdi
testq %rdi, %rdi
je 0x8345
callq 0x4f9a
movq -0x158(%rbp), %rdi
testq %rdi, %rdi
je 0x8356
callq 0x4f9a
movq -0x168(%rbp), %rdi
jmp 0x83db
movq %rax, %rbx
movq -0x178(%rbp), %rdi
testq %rdi, %rdi
je 0x8373
callq 0x4f9a
movq -0x188(%rbp), %rdi
testq %rdi, %rdi
je 0x8384
callq 0x4f9a
movq -0x198(%rbp), %rdi
testq %rdi, %rdi
je 0x8395
callq 0x4f9a
movq -0x1a8(%rbp), %rdi
jmp 0x83db
movq %rax, %rbx
movq -0x1b8(%rbp), %rdi
testq %rdi, %rdi
je 0x83b2
callq 0x4f9a
movq -0x1c8(%rbp), %rdi
testq %rdi, %rdi
je 0x83c3
callq 0x4f9a
movq -0x1d8(%rbp), %rdi
testq %rdi, %rdi
je 0x83d4
callq 0x4f9a
movq -0x1e8(%rbp), %rdi
testq %rdi, %rdi
je 0x83fb
callq 0x4f9a
jmp 0x83fb
movq %rax, %rbx
jmp 0x8409
movq %rax, %rbx
jmp 0x8417
movq %rax, %rbx
jmp 0x8425
jmp 0x83f8
movq %rax, %rbx
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x8409
callq 0x4f9a
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0x8417
callq 0x4f9a
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x8425
callq 0x4f9a
movq -0x68(%rbp), %rdi
testq %rdi, %rdi
je 0x8433
callq 0x4f9a
movq %rbx, %rdi
callq 0x3380
nop