// File: realuptime[P]PolyDetector/PolyDetector.cpp
// Function: PolyDetector::DetectAllIntersections()
uint32_t PolyDetector::DetectAllIntersections()
{
    uint32_t ret = 0;
    size_t counter = origLines.size();
    PointType intersection;
    
    intersectionPoints.clear();
    collinearLineMap.clear();
    
    for (auto &l : origLines)
    {
        l.calcCenter();
    }
    
    // sort to always have the same results
    std::sort(origLines.begin(), origLines.end(), PolyLine::bCompareLineOrder);
    
    uint32_t n = 0;
    for (auto &l : origLines)
    {
        l.id = n++;
        l.intersections.clear();
        l.intersectedLines.clear();
    }
    
    // intersected lines: remove lines with only one intersection
    for (uint32_t i = 0; i < counter; i++)
    {
        auto &l1 = origLines[i];
        for (uint32_t j = i + 1; j < counter; j++)
        {
            auto &l2 = origLines[j];
            if (doIntersect(l1.a, l1.b, l2.a, l2.b))
            {
                //if (verbose > 1)
                //    logoutf("line #%u intersects #%u", l1.id, l2.id);
                
                /*
                for (auto &l : {&l1, &l2})
                {
                    auto &otherLid = l->id == l1.id ? l2.id : l1.id;

                    if (l->intersectedLines.find(otherLid) != l->intersectedLines.end())
                    {
                        logoutf("WARN: origLine #%u already contains intersected origLine #%u", l->id, otherLid);
                    }
                    else
                    {
                        l->intersectedLines.insert(otherLid);
                    }
                }
                */
                
                //if (l1.intersectedLines.find(l2.id) != l1.intersectedLines.end())
                l1.intersectedLines.insert(l2.id);
                l2.intersectedLines.insert(l1.id);
            }
        }
    }
    
    for (uint32_t i = 0; i < counter; i++)
    {
        auto &l1 = origLines[i];
        if (l1.intersectedLines.size() == 1)
        {
            if (verbose)
                logoutf("line #%u has only %u intersectedLines", l1.id, uint32_t(l1.intersectedLines.size()));
            
            for (uint32_t j = 0; j < counter; j++)
            {
                if (i != j)
                {
                    auto &l2 = origLines[j];
                    
                    for (auto it = l2.intersectedLines.begin(); it != l2.intersectedLines.end(); )
                    {
                        if (*it == l1.id)
                        {
                            if (verbose)
                                logoutf("removed intersectedLine line #%u from line #%u", l1.id, l2.id);
                            it = l2.intersectedLines.erase(it);
                            i = 0; // recheck all lines
                        }
                        else
                            ++it;
                    }
                }
            }
            
            l1.intersectedLines.clear();
        }
    }
    
    if (verbose > 2)
    {
        for (auto &l : origLines)
        {
            //if (!l.intersectedLines.empty())
            {
                std::string str;
                for (auto &n : l.intersectedLines)
                    str += std::to_string(n) + " ";
                if (!str.empty())
                    str.pop_back();
                logoutf("line #%u has %u intersectedLines: [%s]", l.id, uint32_t(l.intersectedLines.size()), str.c_str());
            }
        }
    }
    
    // intersection points
    std::set<std::pair<uint32_t, uint32_t>> took;
    for (auto &l1 : origLines)
    {
        for (auto &lid2 : l1.intersectedLines)
        {
            auto &l2 = origLines[lid2];
            
            if (took.find(std::make_pair(l1.id, l2.id)) == took.end())
            {
                intersection = vec(0);
                if (l1.IntersectionPoint(l2, intersection)) // checks if not parallel
                {
                    uint32_t intersectionIdx = uint32_t(intersectionPoints.size());
                    
                    // Check if the same intersection point exists
                    bool dupPoint = false;
                    for (uint32_t pi = 0; pi < intersectionPoints.size(); ++pi)
                    {
                        auto &p = intersectionPoints[pi];
                        if (!pointsDiffer(p, intersection))
                        {
                            if (verbose > 3)
                            {
                                logoutf("WARN: origLine #%u intersects origLine #%u exactly in the same point P%u as:", l1.id, l2.id, pi);
                                for (auto &lDup : origLines)
                                {
                                    if (lDup.id != l1.id && lDup.id != l2.id)
                                    {
                                        for (auto &inters : lDup.intersections)
                                        {
                                            if (inters == pi)
                                            {
                                                logoutf("WARN:  origLine #%u", lDup.id);
                                            }
                                        }
                                    }
                                }
                            }
                            dupPoint = true;
                            intersectionIdx = pi;
                            intersection = p;
                            break;
                        }
                    }

                    if (!dupPoint)
                    {
                        intersectionPoints.push_back(intersection);
                    }
                    
                    if (verbose > 2)
                        logoutf("[P%u]: origLine #%u intersects origLine #%u. dup:%d", intersectionIdx, l1.id, l2.id, dupPoint);
                    
                    for (auto &l : {&l1, &l2})
                    {
                        if (std::find(l->intersections.begin(), l->intersections.end(), intersectionIdx) != l->intersections.end())
                        {
                            if (verbose > 1)
                                logoutf("WARN: duplicate intersectionIdx P%u in line #%u", intersectionIdx, l->id);
                        }
                        else
                        {
                            //auto d = obb::LineSegment(l->a, l->b).Distance(intersection);
                            //assert(d < .1f);
                            
                            //auto d1 = obb::LineSegment(l->a, l->b).Distance(intersectionPoints[intersectionIdx]);
                            //assert(d1 < .1f);
                            
                            l->intersections.push_back(intersectionIdx);
                        }
                    }
                    
                    //addPointToLine(intersectionIdx, l1.id);
                    //addPointToLine(intersectionIdx, l2.id);
                    
                    took.insert(std::make_pair(l1.id, l2.id));
                    took.insert(std::make_pair(l2.id, l1.id));
                    
                    ret++;
                }
            }
        }
    }
    if (verbose)
        logoutf("intersectionPoints:%u", uint32_t(intersectionPoints.size()));
    
    //return 0;
    
    if (verbose > 2)
    {
        for (auto &l : origLines)
        {
            //if (!l.intersections.empty())
            {
                std::string str;
                for (auto &n : l.intersections)
                    str += std::to_string(n) + " ";
                if (!str.empty())
                    str.pop_back();
                logoutf("line #%u has %u pts: [%s]", l.id, uint32_t(l.intersections.size()), str.c_str());
            }
        }
    }
    
#if 1
    
    uint32_t nCol = 0;
    std::vector<uint32_t> pids;
    
    uint32_t times = 0;
    bool ok = false;
    do
    {
        took.clear();
        //nCol = 0;
        
        ok = true;
        
        for (auto &l1 : origLines)
        {
            if (l1.ignore) continue;
            if (l1.intersections.size() < 2) continue;
            
            //if (times == 1)
            //    l1.SortIntersectionsList(*this);
            
            float a, b, c;
            vec::line(vec(l1.a.x, l1.a.y), vec(l1.b.x, l1.b.y), a, b, c);
            if (a + b == 0.0f)
            {
                logoutf("l1:#%u l1.a: [%f %f] l1.b: [%f %f]", l1.id, l1.a.x, l1.a.y, l1.b.x, l1.b.y);
                assert(0);
                continue;
            }
            
            //obb::Line line = obb::LineSegment(l1.a, l1.b).ToLine();
        
            for (auto &l2 : origLines)
            {
                if (l2.ignore) continue;
                if (l2.intersections.size() < 2) continue;
                
                //if (took.find(std::make_pair(l1.id, l2.id)) == took.end())
                {
                    //if (k == 1)
                    //    l2.SortIntersectionsList(*this);
                    
                    took.insert(std::make_pair(l1.id, l2.id));
                    took.insert(std::make_pair(l2.id, l1.id));
                    
                    if (l1.id == l2.id) continue;
                    if (l2.intersections.empty()) continue;
                    assert(&l1 != &l2);
                    
                    uint32_t nFound = 0;
                    float maxLineDist = 0;
                    pids.clear();
                    for (auto &pid1 : l1.intersections)
                    {
                        for (auto &pid2 : l2.intersections)
                        {
                            if (pid1 == pid2)
                            {
                                nFound++;
                                pids.push_back(pid1);
                            }
                            
                            //float d = line.Distance(intersectionPoints[pid2]);
                            float d = vec::lineDist(a, b, c, vec(intersectionPoints[pid2].x, intersectionPoints[pid2].y));
                            if (d > maxLineDist)
                                maxLineDist = d;
                        }
                    }
                    
                    if (nFound >= 2)
                    {
                        ok = false;
                        
#if 1
                        if (maxLineDist <= minPointDiff)
                        {
                            logoutf("[%u]: line #%u is collinear with line #%u! nFound:%u lineDist:%f merging ...", times, l1.id, l2.id, nFound, maxLineDist);
                            
                            // TODO: merge point of l2 into l1
                            uint32_t nMerged = 0;
                            for (auto &pid : l2.intersections)
                            {
                                //logoutf("add P%u to l#%u", pid, l1.id);
                                if (std::find(l1.intersections.begin(), l1.intersections.end(), pid) == l1.intersections.end())
                                {
                                    //logoutf("add P%u to l#%u", pid, l1.id);
                                    l1.intersections.push_back(pid);
                                    nMerged++;
                                }
                            }
                            if (nMerged > 0)
                            {
                                logoutf("[%u]: merged %u points from line #%u into line #%u! dist:%f", times, nMerged, l2.id, l1.id, maxLineDist);
                            }
                            
                            //logoutf("line #%u with %u intersections ignored", l2.id, uint32_t(l2.intersections.size()));
                            l2.intersections.clear();
                            l2.a = l2.b = l2.center = vec(0);
                            l2.ignore = true;
                            
                            nCol++;
                        }
                        else
                        {
                            // merge points?
                            
                            // remove them
                            uint32_t nRm1 = 0, nRm2 = 0;
                            for (auto &pid : pids)
                            {
                                logoutf("[%u]]: P%u", times, pid);
                                for (auto it = l1.intersections.begin(); it != l1.intersections.end();)
                                {
                                    if (*it == pid)
                                    {
                                        it = l1.intersections.erase(it);
                                        nRm1++;
                                    }
                                    else
                                        ++it;
                                }
                                for (auto it = l2.intersections.begin(); it != l2.intersections.end();)
                                {
                                    if (*it == pid)
                                    {
                                        it = l2.intersections.erase(it);
                                        nRm2++;
                                    }
                                    else
                                        ++it;
                                }
                            }
                            auto keepPid = pids[0];
                            l1.intersections.push_back(keepPid);
                            l2.intersections.push_back(keepPid);
                            
                            logoutf("[%u]]: line #%u has common points(%u) with line #%u keeping just P%u nRm1:%u nRm2:%u rem1:%u rem2:%u lineDist:%f",
                                    times, l1.id, uint32_t(pids.size()), l2.id, keepPid, nRm1, nRm2,
                                    uint32_t(l1.intersections.size()),
                                    uint32_t(l2.intersections.size()),
                                    maxLineDist);
                        }
#endif
                    
                    }
                }
            }
        }
        if (ok && verbose)
            logoutf("[%u] ok!", times);
        times++;
    }
    while (!ok);
    
    logoutf("Number of col lines using intersection points: %u", uint32_t(nCol));
#endif

    for (auto &l : origLines)
    {
        if (l.intersections.size() == 1)
        {
            logoutf("WARN: line #%u has only %u intersections!", l.id, uint32_t(l.intersections.size()));
            //assert(false);
        }
    }
    
    return ret;
}

// Assembly:
pushq %rbx
subq $0x6f0, %rsp            # imm = 0x6F0
movq %rdi, 0x6e8(%rsp)
movq 0x6e8(%rsp), %rdi
movq %rdi, 0x138(%rsp)
movl $0x0, 0x6e4(%rsp)
addq $0x18, %rdi
callq 0x12b40
movq %rax, 0x6d8(%rsp)
leaq 0x6d0(%rsp), %rdi
callq 0x13010
movq 0x138(%rsp), %rdi
addq $0xc8, %rdi
callq 0x13020
movq 0x138(%rsp), %rdi
addq $0x98, %rdi
callq 0x13040
movq 0x138(%rsp), %rax
addq $0x18, %rax
movq %rax, 0x6c8(%rsp)
movq 0x6c8(%rsp), %rdi
callq 0x12a70
movq %rax, 0x6c0(%rsp)
movq 0x6c8(%rsp), %rdi
callq 0x12aa0
movq %rax, 0x6b8(%rsp)
leaq 0x6c0(%rsp), %rdi
leaq 0x6b8(%rsp), %rsi
callq 0x12ad0
testb $0x1, %al
jne 0x439a
jmp 0x43cb
leaq 0x6c0(%rsp), %rdi
callq 0x12b10
movq %rax, 0x6b0(%rsp)
movq 0x6b0(%rsp), %rdi
callq 0x2fb0
leaq 0x6c0(%rsp), %rdi
callq 0x12b20
jmp 0x437f
movq 0x138(%rsp), %rdi
addq $0x18, %rdi
callq 0x12a70
movq 0x138(%rsp), %rdi
movq %rax, 0x6a8(%rsp)
addq $0x18, %rdi
callq 0x12aa0
movq %rax, 0x6a0(%rsp)
movq 0x6a8(%rsp), %rdi
movq 0x6a0(%rsp), %rsi
leaq -0x19e4(%rip), %rdx     # 0x2a30
callq 0x13050
movq 0x138(%rsp), %rax
movl $0x0, 0x69c(%rsp)
addq $0x18, %rax
movq %rax, 0x690(%rsp)
movq 0x690(%rsp), %rdi
callq 0x12a70
movq %rax, 0x688(%rsp)
movq 0x690(%rsp), %rdi
callq 0x12aa0
movq %rax, 0x680(%rsp)
leaq 0x688(%rsp), %rdi
leaq 0x680(%rsp), %rsi
callq 0x12ad0
testb $0x1, %al
jne 0x447d
jmp 0x44e1
leaq 0x688(%rsp), %rdi
callq 0x12b10
movq %rax, 0x678(%rsp)
movl 0x69c(%rsp), %ecx
movl %ecx, %eax
addl $0x1, %eax
movl %eax, 0x69c(%rsp)
movq 0x678(%rsp), %rax
movl %ecx, 0x60(%rax)
movq 0x678(%rsp), %rdi
addq $0x10, %rdi
callq 0x130a0
movq 0x678(%rsp), %rdi
addq $0x28, %rdi
callq 0x130c0
leaq 0x688(%rsp), %rdi
callq 0x12b20
jmp 0x4462
movl $0x0, 0x674(%rsp)
movl 0x674(%rsp), %eax
cmpq 0x6d8(%rsp), %rax
jae 0x4626
movq 0x138(%rsp), %rdi
addq $0x18, %rdi
movl 0x674(%rsp), %eax
movl %eax, %esi
callq 0x12cf0
movq %rax, 0x668(%rsp)
movl 0x674(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x664(%rsp)
movl 0x664(%rsp), %eax
cmpq 0x6d8(%rsp), %rax
jae 0x460e
movq 0x138(%rsp), %rdi
addq $0x18, %rdi
movl 0x664(%rsp), %eax
movl %eax, %esi
callq 0x12cf0
movq %rax, 0x658(%rsp)
movq 0x668(%rsp), %rdi
movq 0x668(%rsp), %rsi
addq $0x8, %rsi
movq 0x658(%rsp), %rdx
movq 0x658(%rsp), %rcx
addq $0x8, %rcx
callq 0x2680
testb $0x1, %al
jne 0x459e
jmp 0x45f6
movq 0x668(%rsp), %rdi
addq $0x28, %rdi
movq 0x658(%rsp), %rsi
addq $0x60, %rsi
callq 0x130d0
movq %rax, 0x648(%rsp)
movb %dl, 0x650(%rsp)
movq 0x658(%rsp), %rdi
addq $0x28, %rdi
movq 0x668(%rsp), %rsi
addq $0x60, %rsi
callq 0x130d0
movq %rax, 0x638(%rsp)
movb %dl, 0x640(%rsp)
jmp 0x45f8
movl 0x664(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x664(%rsp)
jmp 0x4534
jmp 0x4610
movl 0x674(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x674(%rsp)
jmp 0x44ec
movl $0x0, 0x634(%rsp)
movl 0x634(%rsp), %eax
cmpq 0x6d8(%rsp), %rax
jae 0x4866
movq 0x138(%rsp), %rdi
addq $0x18, %rdi
movl 0x634(%rsp), %eax
movl %eax, %esi
callq 0x12cf0
movq %rax, 0x628(%rsp)
movq 0x628(%rsp), %rdi
addq $0x28, %rdi
callq 0x13130
cmpq $0x1, %rax
jne 0x484e
movq 0x138(%rsp), %rax
cmpl $0x0, 0x60(%rax)
je 0x46cb
movq 0x628(%rsp), %rax
movl 0x60(%rax), %eax
movl %eax, 0x134(%rsp)
movq 0x628(%rsp), %rdi
addq $0x28, %rdi
callq 0x13130
movl 0x134(%rsp), %esi
movl %eax, %edx
leaq 0x21cfc(%rip), %rdi     # 0x263c0
movb $0x0, %al
callq 0x2050
movl $0x0, 0x624(%rsp)
movl 0x624(%rsp), %eax
cmpq 0x6d8(%rsp), %rax
jae 0x483d
movl 0x634(%rsp), %eax
cmpl 0x624(%rsp), %eax
je 0x4825
movq 0x138(%rsp), %rdi
addq $0x18, %rdi
movl 0x624(%rsp), %eax
movl %eax, %esi
callq 0x12cf0
movq %rax, 0x618(%rsp)
movq 0x618(%rsp), %rdi
addq $0x28, %rdi
callq 0x13140
movq %rax, 0x610(%rsp)
movq 0x618(%rsp), %rdi
addq $0x28, %rdi
callq 0x13190
movq %rax, 0x608(%rsp)
leaq 0x610(%rsp), %rdi
leaq 0x608(%rsp), %rsi
callq 0x13170
testb $0x1, %al
jne 0x4771
jmp 0x4823
leaq 0x610(%rsp), %rdi
callq 0x131c0
movl (%rax), %eax
movq 0x628(%rsp), %rcx
cmpl 0x60(%rcx), %eax
jne 0x4811
movq 0x138(%rsp), %rax
cmpl $0x0, 0x60(%rax)
je 0x47c3
movq 0x628(%rsp), %rax
movl 0x60(%rax), %esi
movq 0x618(%rsp), %rax
movl 0x60(%rax), %edx
leaq 0x21c2b(%rip), %rdi     # 0x263e7
movb $0x0, %al
callq 0x2050
movq 0x618(%rsp), %rdi
addq $0x28, %rdi
movq 0x610(%rsp), %rax
movq %rax, 0x5f8(%rsp)
movq 0x5f8(%rsp), %rsi
callq 0x131f0
movq %rax, 0x600(%rsp)
movq 0x600(%rsp), %rax
movq %rax, 0x610(%rsp)
movl $0x0, 0x634(%rsp)
jmp 0x481e
leaq 0x610(%rsp), %rdi
callq 0x13240
jmp 0x473a
jmp 0x4825
jmp 0x4827
movl 0x624(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x624(%rsp)
jmp 0x46d6
movq 0x628(%rsp), %rdi
addq $0x28, %rdi
callq 0x130c0
jmp 0x4850
movl 0x634(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x634(%rsp)
jmp 0x4631
movq 0x138(%rsp), %rax
cmpl $0x2, 0x60(%rax)
jbe 0x4ae4
movq 0x138(%rsp), %rax
addq $0x18, %rax
movq %rax, 0x5f0(%rsp)
movq 0x5f0(%rsp), %rdi
callq 0x12a70
movq %rax, 0x5e8(%rsp)
movq 0x5f0(%rsp), %rdi
callq 0x12aa0
movq %rax, 0x5e0(%rsp)
leaq 0x5e8(%rsp), %rdi
leaq 0x5e0(%rsp), %rsi
callq 0x12ad0
testb $0x1, %al
jne 0x48d4
jmp 0x4ae2
leaq 0x5e8(%rsp), %rdi
callq 0x12b10
movq %rax, 0x5d8(%rsp)
leaq 0x5b8(%rsp), %rdi
callq 0x2220
movq 0x5d8(%rsp), %rax
addq $0x28, %rax
movq %rax, 0x5b0(%rsp)
movq 0x5b0(%rsp), %rdi
callq 0x13140
movq %rax, 0x5a8(%rsp)
movq 0x5b0(%rsp), %rdi
callq 0x13190
movq %rax, 0x5a0(%rsp)
leaq 0x5a8(%rsp), %rdi
leaq 0x5a0(%rsp), %rsi
callq 0x13170
testb $0x1, %al
jne 0x4952
jmp 0x4a43
leaq 0x5a8(%rsp), %rdi
callq 0x131c0
movq %rax, 0x598(%rsp)
movq 0x598(%rsp), %rax
movl (%rax), %esi
leaq 0x558(%rsp), %rdi
callq 0x132c0
jmp 0x4980
leaq 0x22107(%rip), %rdx     # 0x26a8e
leaq 0x578(%rsp), %rdi
leaq 0x558(%rsp), %rsi
callq 0x13270
jmp 0x499e
leaq 0x5b8(%rsp), %rdi
leaq 0x578(%rsp), %rsi
callq 0x21f0
jmp 0x49b5
leaq 0x578(%rsp), %rdi
callq 0x2100
leaq 0x558(%rsp), %rdi
callq 0x2100
leaq 0x5a8(%rsp), %rdi
callq 0x13240
jmp 0x4934
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x550(%rsp)
movl %eax, 0x54c(%rsp)
jmp 0x4ad0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x550(%rsp)
movl %eax, 0x54c(%rsp)
jmp 0x4a31
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x550(%rsp)
movl %eax, 0x54c(%rsp)
leaq 0x578(%rsp), %rdi
callq 0x2100
leaq 0x558(%rsp), %rdi
callq 0x2100
jmp 0x4ad0
leaq 0x5b8(%rsp), %rdi
callq 0x2270
testb $0x1, %al
jne 0x4a61
leaq 0x5b8(%rsp), %rdi
callq 0x21e0
movq 0x5d8(%rsp), %rdi
movl 0x60(%rdi), %eax
movl %eax, 0x12c(%rsp)
addq $0x28, %rdi
callq 0x13130
movl %eax, 0x130(%rsp)
leaq 0x5b8(%rsp), %rdi
callq 0x20b0
movl 0x12c(%rsp), %esi
movl 0x130(%rsp), %edx
movq %rax, %rcx
leaq 0x2196f(%rip), %rdi     # 0x26417
xorl %eax, %eax
callq 0x2050
jmp 0x4ab1
leaq 0x5b8(%rsp), %rdi
callq 0x2100
leaq 0x5e8(%rsp), %rdi
callq 0x12b20
jmp 0x48b6
leaq 0x5b8(%rsp), %rdi
callq 0x2100
jmp 0x6400
jmp 0x4ae4
leaq 0x518(%rsp), %rdi
callq 0x133c0
movq 0x138(%rsp), %rax
addq $0x18, %rax
movq %rax, 0x510(%rsp)
movq 0x510(%rsp), %rdi
callq 0x12a70
movq %rax, 0x508(%rsp)
movq 0x510(%rsp), %rdi
callq 0x12aa0
movq %rax, 0x500(%rsp)
leaq 0x508(%rsp), %rdi
leaq 0x500(%rsp), %rsi
callq 0x12ad0
testb $0x1, %al
jne 0x4b4d
jmp 0x530e
leaq 0x508(%rsp), %rdi
callq 0x12b10
movq %rax, 0x4f8(%rsp)
movq 0x4f8(%rsp), %rax
addq $0x28, %rax
movq %rax, 0x4f0(%rsp)
movq 0x4f0(%rsp), %rdi
callq 0x13140
movq %rax, 0x4e8(%rsp)
movq 0x4f0(%rsp), %rdi
callq 0x13190
movq %rax, 0x4e0(%rsp)
leaq 0x4e8(%rsp), %rdi
leaq 0x4e0(%rsp), %rsi
callq 0x13170
testb $0x1, %al
jne 0x4bbe
jmp 0x52fa
leaq 0x4e8(%rsp), %rdi
callq 0x131c0
movq 0x138(%rsp), %rdi
movq %rax, 0x4d8(%rsp)
addq $0x18, %rdi
movq 0x4d8(%rsp), %rax
movl (%rax), %eax
movl %eax, %esi
callq 0x12cf0
movq %rax, 0x4d0(%rsp)
movq 0x4f8(%rsp), %rdi
addq $0x60, %rdi
movq 0x4d0(%rsp), %rsi
addq $0x60, %rsi
callq 0x13430
movq %rax, 0x120(%rsp)
jmp 0x4c1f
movq 0x120(%rsp), %rax
movq %rax, 0x4c0(%rsp)
leaq 0x518(%rsp), %rdi
leaq 0x4c0(%rsp), %rsi
callq 0x133f0
movq %rax, 0x118(%rsp)
jmp 0x4c4e
movq 0x118(%rsp), %rax
movq %rax, 0x4c8(%rsp)
leaq 0x518(%rsp), %rdi
callq 0x13460
movq %rax, 0x4b8(%rsp)
leaq 0x4c8(%rsp), %rdi
leaq 0x4b8(%rsp), %rsi
callq 0x133d0
testb $0x1, %al
jne 0x4c91
jmp 0x52e6
leaq 0x4b0(%rsp), %rdi
xorps %xmm0, %xmm0
callq 0x13490
jmp 0x4ca3
movq 0x4b0(%rsp), %rax
movq %rax, 0x6d0(%rsp)
movq 0x4f8(%rsp), %rdi
movq 0x4d0(%rsp), %rsi
leaq 0x6d0(%rsp), %rdx
callq 0x27d0
movb %al, 0x117(%rsp)
jmp 0x4cd9
movb 0x117(%rsp), %al
testb $0x1, %al
jne 0x4ce9
jmp 0x52e4
movq 0x138(%rsp), %rdi
addq $0xc8, %rdi
callq 0x134c0
movl %eax, 0x4ac(%rsp)
movb $0x0, 0x4ab(%rsp)
movl $0x0, 0x4a4(%rsp)
movq 0x138(%rsp), %rdi
movl 0x4a4(%rsp), %eax
movq %rax, 0x108(%rsp)
addq $0xc8, %rdi
callq 0x134c0
movq %rax, %rcx
movq 0x108(%rsp), %rax
cmpq %rcx, %rax
jae 0x4fb5
movq 0x138(%rsp), %rdi
addq $0xc8, %rdi
movl 0x4a4(%rsp), %eax
movl %eax, %esi
callq 0x12a20
movq %rax, 0x498(%rsp)
movq 0x498(%rsp), %rdi
leaq 0x6d0(%rsp), %rsi
movl $0x1, %edx
callq 0x6410
movb %al, 0x107(%rsp)
jmp 0x4d96
movb 0x107(%rsp), %al
testb $0x1, %al
jne 0x4f9d
jmp 0x4da7
movq 0x138(%rsp), %rax
cmpl $0x3, 0x60(%rax)
jbe 0x4f72
movq 0x4f8(%rsp), %rax
movl 0x60(%rax), %esi
movq 0x4d0(%rsp), %rax
movl 0x60(%rax), %edx
movl 0x4a4(%rsp), %ecx
leaq 0x21662(%rip), %rdi     # 0x2643f
xorl %eax, %eax
callq 0x2050
jmp 0x4de6
movq 0x138(%rsp), %rax
addq $0x18, %rax
movq %rax, 0x490(%rsp)
movq 0x490(%rsp), %rdi
callq 0x12a70
movq %rax, 0x488(%rsp)
movq 0x490(%rsp), %rdi
callq 0x12aa0
movq %rax, 0x480(%rsp)
leaq 0x488(%rsp), %rdi
leaq 0x480(%rsp), %rsi
callq 0x12ad0
testb $0x1, %al
jne 0x4e42
jmp 0x4f70
leaq 0x488(%rsp), %rdi
callq 0x12b10
movq %rax, 0x478(%rsp)
movq 0x478(%rsp), %rax
movl 0x60(%rax), %eax
movq 0x4f8(%rsp), %rcx
cmpl 0x60(%rcx), %eax
je 0x4f5c
movq 0x478(%rsp), %rax
movl 0x60(%rax), %eax
movq 0x4d0(%rsp), %rcx
cmpl 0x60(%rcx), %eax
je 0x4f5c
movq 0x478(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x470(%rsp)
movq 0x470(%rsp), %rdi
callq 0x128b0
movq %rax, 0x468(%rsp)
movq 0x470(%rsp), %rdi
callq 0x128e0
movq %rax, 0x460(%rsp)
leaq 0x468(%rsp), %rdi
leaq 0x460(%rsp), %rsi
callq 0x134e0
testb $0x1, %al
jne 0x4ee8
jmp 0x4f5a
leaq 0x468(%rsp), %rdi
callq 0x13520
movq %rax, 0x458(%rsp)
movq 0x458(%rsp), %rax
movl (%rax), %eax
cmpl 0x4a4(%rsp), %eax
jne 0x4f46
movq 0x478(%rsp), %rax
movl 0x60(%rax), %esi
leaq 0x2156b(%rip), %rdi     # 0x2648d
xorl %eax, %eax
callq 0x2050
jmp 0x4f2b
jmp 0x4f46
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x550(%rsp)
movl %eax, 0x54c(%rsp)
jmp 0x63f3
jmp 0x4f48
leaq 0x468(%rsp), %rdi
callq 0x13530
jmp 0x4ecd
jmp 0x4f5c
jmp 0x4f5e
leaq 0x488(%rsp), %rdi
callq 0x12b20
jmp 0x4e24
jmp 0x4f72
movb $0x1, 0x4ab(%rsp)
movl 0x4a4(%rsp), %eax
movl %eax, 0x4ac(%rsp)
movq 0x498(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x6d0(%rsp)
jmp 0x4fb5
jmp 0x4f9f
movl 0x4a4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4a4(%rsp)
jmp 0x4d17
testb $0x1, 0x4ab(%rsp)
jne 0x4fdf
movq 0x138(%rsp), %rdi
addq $0xc8, %rdi
leaq 0x6d0(%rsp), %rsi
callq 0x13550
jmp 0x4fdd
jmp 0x4fdf
movq 0x138(%rsp), %rax
cmpl $0x2, 0x60(%rax)
jbe 0x5029
movl 0x4ac(%rsp), %esi
movq 0x4f8(%rsp), %rax
movl 0x60(%rax), %edx
movq 0x4d0(%rsp), %rax
movl 0x60(%rax), %ecx
movzbl 0x4ab(%rsp), %r8d
andl $0x1, %r8d
leaq 0x21484(%rip), %rdi     # 0x264a2
xorl %eax, %eax
callq 0x2050
jmp 0x5027
jmp 0x5029
movq 0x4f8(%rsp), %rax
movq %rax, 0x430(%rsp)
movq 0x4d0(%rsp), %rax
movq %rax, 0x438(%rsp)
leaq 0x430(%rsp), %rax
movq %rax, 0x440(%rsp)
movq $0x2, 0x448(%rsp)
leaq 0x440(%rsp), %rax
movq %rax, 0x450(%rsp)
movq 0x450(%rsp), %rdi
callq 0x135c0
movq %rax, 0x428(%rsp)
movq 0x450(%rsp), %rdi
callq 0x135d0
movq %rax, 0x420(%rsp)
movq 0x428(%rsp), %rax
cmpq 0x420(%rsp), %rax
je 0x51dd
movq 0x428(%rsp), %rax
movq %rax, 0x418(%rsp)
movq 0x418(%rsp), %rax
movq (%rax), %rdi
addq $0x10, %rdi
callq 0x128b0
movq %rax, 0x408(%rsp)
movq 0x418(%rsp), %rax
movq (%rax), %rdi
addq $0x10, %rdi
callq 0x128e0
movq %rax, 0x400(%rsp)
movq 0x408(%rsp), %rdi
movq 0x400(%rsp), %rsi
leaq 0x4ac(%rsp), %rdx
callq 0x12f00
movq %rax, 0xf8(%rsp)
jmp 0x5124
movq 0xf8(%rsp), %rax
movq %rax, 0x410(%rsp)
movq 0x418(%rsp), %rax
movq (%rax), %rdi
addq $0x10, %rdi
callq 0x128e0
movq %rax, 0x3f8(%rsp)
leaq 0x410(%rsp), %rdi
leaq 0x3f8(%rsp), %rsi
callq 0x134e0
testb $0x1, %al
jne 0x516b
jmp 0x51a2
movq 0x138(%rsp), %rax
cmpl $0x1, 0x60(%rax)
jbe 0x51a0
movl 0x4ac(%rsp), %esi
movq 0x418(%rsp), %rax
movq (%rax), %rax
movl 0x60(%rax), %edx
leaq 0x21342(%rip), %rdi     # 0x264d7
xorl %eax, %eax
callq 0x2050
jmp 0x519e
jmp 0x51a0
jmp 0x51c2
movq 0x418(%rsp), %rax
movq (%rax), %rdi
addq $0x10, %rdi
leaq 0x4ac(%rsp), %rsi
callq 0x12f60
jmp 0x51c0
jmp 0x51c2
jmp 0x51c4
movq 0x428(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x428(%rsp)
jmp 0x509f
movq 0x4f8(%rsp), %rdi
addq $0x60, %rdi
movq 0x4d0(%rsp), %rsi
addq $0x60, %rsi
callq 0x13430
movq %rax, 0xf0(%rsp)
jmp 0x5204
movq 0xf0(%rsp), %rax
movq %rax, 0x3f0(%rsp)
leaq 0x518(%rsp), %rdi
leaq 0x3f0(%rsp), %rsi
callq 0x13610
movb %dl, 0xe7(%rsp)
movq %rax, 0xe8(%rsp)
jmp 0x523a
movb 0xe7(%rsp), %al
movq 0xe8(%rsp), %rcx
movq %rcx, 0x3e0(%rsp)
movb %al, 0x3e8(%rsp)
movq 0x4d0(%rsp), %rdi
addq $0x60, %rdi
movq 0x4f8(%rsp), %rsi
addq $0x60, %rsi
callq 0x13430
movq %rax, 0xd8(%rsp)
jmp 0x527f
movq 0xd8(%rsp), %rax
movq %rax, 0x3d8(%rsp)
leaq 0x518(%rsp), %rdi
leaq 0x3d8(%rsp), %rsi
callq 0x13610
movb %dl, 0xcf(%rsp)
movq %rax, 0xd0(%rsp)
jmp 0x52b5
movb 0xcf(%rsp), %al
movq 0xd0(%rsp), %rcx
movq %rcx, 0x3c8(%rsp)
movb %al, 0x3d0(%rsp)
movl 0x6e4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6e4(%rsp)
jmp 0x52e6
jmp 0x52e8
leaq 0x4e8(%rsp), %rdi
callq 0x13240
jmp 0x4ba0
jmp 0x52fc
leaq 0x508(%rsp), %rdi
callq 0x12b20
jmp 0x4b2f
movq 0x138(%rsp), %rax
cmpl $0x0, 0x60(%rax)
je 0x5344
movq 0x138(%rsp), %rdi
addq $0xc8, %rdi
callq 0x134c0
movl %eax, %esi
leaq 0x211cf(%rip), %rdi     # 0x26508
xorl %eax, %eax
callq 0x2050
jmp 0x5342
jmp 0x5344
movq 0x138(%rsp), %rax
cmpl $0x2, 0x60(%rax)
jbe 0x55c2
movq 0x138(%rsp), %rax
addq $0x18, %rax
movq %rax, 0x3c0(%rsp)
movq 0x3c0(%rsp), %rdi
callq 0x12a70
movq %rax, 0x3b8(%rsp)
movq 0x3c0(%rsp), %rdi
callq 0x12aa0
movq %rax, 0x3b0(%rsp)
leaq 0x3b8(%rsp), %rdi
leaq 0x3b0(%rsp), %rsi
callq 0x12ad0
testb $0x1, %al
jne 0x53b2
jmp 0x55c0
leaq 0x3b8(%rsp), %rdi
callq 0x12b10
movq %rax, 0x3a8(%rsp)
leaq 0x388(%rsp), %rdi
callq 0x2220
movq 0x3a8(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x380(%rsp)
movq 0x380(%rsp), %rdi
callq 0x128b0
movq %rax, 0x378(%rsp)
movq 0x380(%rsp), %rdi
callq 0x128e0
movq %rax, 0x370(%rsp)
leaq 0x378(%rsp), %rdi
leaq 0x370(%rsp), %rsi
callq 0x134e0
testb $0x1, %al
jne 0x5430
jmp 0x5521
leaq 0x378(%rsp), %rdi
callq 0x13520
movq %rax, 0x368(%rsp)
movq 0x368(%rsp), %rax
movl (%rax), %esi
leaq 0x328(%rsp), %rdi
callq 0x132c0
jmp 0x545e
leaq 0x21629(%rip), %rdx     # 0x26a8e
leaq 0x348(%rsp), %rdi
leaq 0x328(%rsp), %rsi
callq 0x13270
jmp 0x547c
leaq 0x388(%rsp), %rdi
leaq 0x348(%rsp), %rsi
callq 0x21f0
jmp 0x5493
leaq 0x348(%rsp), %rdi
callq 0x2100
leaq 0x328(%rsp), %rdi
callq 0x2100
leaq 0x378(%rsp), %rdi
callq 0x13530
jmp 0x5412
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x550(%rsp)
movl %eax, 0x54c(%rsp)
jmp 0x55ae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x550(%rsp)
movl %eax, 0x54c(%rsp)
jmp 0x550f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x550(%rsp)
movl %eax, 0x54c(%rsp)
leaq 0x348(%rsp), %rdi
callq 0x2100
leaq 0x328(%rsp), %rdi
callq 0x2100
jmp 0x55ae
leaq 0x388(%rsp), %rdi
callq 0x2270
testb $0x1, %al
jne 0x553f
leaq 0x388(%rsp), %rdi
callq 0x21e0
movq 0x3a8(%rsp), %rdi
movl 0x60(%rdi), %eax
movl %eax, 0xc4(%rsp)
addq $0x10, %rdi
callq 0x12b80
movl %eax, 0xc8(%rsp)
leaq 0x388(%rsp), %rdi
callq 0x20b0
movl 0xc4(%rsp), %esi
movl 0xc8(%rsp), %edx
movq %rax, %rcx
leaq 0x20f99(%rip), %rdi     # 0x2651f
xorl %eax, %eax
callq 0x2050
jmp 0x558f
leaq 0x388(%rsp), %rdi
callq 0x2100
leaq 0x3b8(%rsp), %rdi
callq 0x12b20
jmp 0x5394
leaq 0x388(%rsp), %rdi
callq 0x2100
jmp 0x63f3
jmp 0x55c2
movl $0x0, 0x324(%rsp)
leaq 0x308(%rsp), %rdi
callq 0x13670
movl $0x0, 0x304(%rsp)
movb $0x0, 0x303(%rsp)
leaq 0x518(%rsp), %rdi
callq 0x13680
movq 0x138(%rsp), %rax
movb $0x1, 0x303(%rsp)
addq $0x18, %rax
movq %rax, 0x2f8(%rsp)
movq 0x2f8(%rsp), %rdi
callq 0x12a70
movq %rax, 0x2f0(%rsp)
movq 0x2f8(%rsp), %rdi
callq 0x12aa0
movq %rax, 0x2e8(%rsp)
leaq 0x2f0(%rsp), %rdi
leaq 0x2e8(%rsp), %rsi
callq 0x12ad0
testb $0x1, %al
jne 0x565e
jmp 0x628e
leaq 0x2f0(%rsp), %rdi
callq 0x12b10
movq %rax, 0x2e0(%rsp)
movq 0x2e0(%rsp), %rax
testb $0x1, 0x74(%rax)
je 0x5686
jmp 0x627c
movq 0x2e0(%rsp), %rdi
addq $0x10, %rdi
callq 0x12b80
cmpq $0x2, %rax
jae 0x56a2
jmp 0x627c
movq 0x2e0(%rsp), %rax
movss (%rax), %xmm0
movss 0x4(%rax), %xmm1
leaq 0x2cc(%rsp), %rdi
callq 0x13730
jmp 0x56c2
movq 0x2e0(%rsp), %rax
movss 0x8(%rax), %xmm0
movss 0xc(%rax), %xmm1
leaq 0x2c4(%rsp), %rdi
callq 0x13730
jmp 0x56e3
leaq 0x2cc(%rsp), %rdi
leaq 0x2c4(%rsp), %rsi
leaq 0x2dc(%rsp), %rdx
leaq 0x2d8(%rsp), %rcx
leaq 0x2d4(%rsp), %r8
callq 0x13690
jmp 0x5712
movss 0x2dc(%rsp), %xmm0
addss 0x2d8(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x57b9
jp 0x57b9
movq 0x2e0(%rsp), %rax
movl 0x60(%rax), %esi
movss (%rax), %xmm0
movss 0x4(%rax), %xmm1
cvtss2sd %xmm0, %xmm0
cvtss2sd %xmm1, %xmm1
movss 0x8(%rax), %xmm2
cvtss2sd %xmm2, %xmm2
movss 0xc(%rax), %xmm3
cvtss2sd %xmm3, %xmm3
leaq 0x20dcf(%rip), %rdi     # 0x2653a
movb $0x4, %al
callq 0x2050
jmp 0x5774
leaq 0x20de3(%rip), %rdi     # 0x2655e
leaq 0x20976(%rip), %rsi     # 0x260f8
movl $0x37e, %edx            # imm = 0x37E
leaq 0x20dd2(%rip), %rcx     # 0x26560
callq 0x2120
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x550(%rsp)
movl %eax, 0x54c(%rsp)
leaq 0x308(%rsp), %rdi
callq 0x13930
jmp 0x63f3
movq 0x138(%rsp), %rax
addq $0x18, %rax
movq %rax, 0x2b8(%rsp)
movq 0x2b8(%rsp), %rdi
callq 0x12a70
movq %rax, 0x2b0(%rsp)
movq 0x2b8(%rsp), %rdi
callq 0x12aa0
movq %rax, 0x2a8(%rsp)
leaq 0x2b0(%rsp), %rdi
leaq 0x2a8(%rsp), %rsi
callq 0x12ad0
testb $0x1, %al
jne 0x5815
jmp 0x627a
leaq 0x2b0(%rsp), %rdi
callq 0x12b10
movq %rax, 0x2a0(%rsp)
movq 0x2a0(%rsp), %rax
testb $0x1, 0x74(%rax)
je 0x583d
jmp 0x6268
movq 0x2a0(%rsp), %rdi
addq $0x10, %rdi
callq 0x12b80
cmpq $0x2, %rax
jae 0x5859
jmp 0x6268
movq 0x2e0(%rsp), %rdi
addq $0x60, %rdi
movq 0x2a0(%rsp), %rsi
addq $0x60, %rsi
callq 0x13430
movq %rax, 0xb8(%rsp)
jmp 0x5880
movq 0xb8(%rsp), %rax
movq %rax, 0x298(%rsp)
leaq 0x518(%rsp), %rdi
leaq 0x298(%rsp), %rsi
callq 0x13610
movb %dl, 0xaf(%rsp)
movq %rax, 0xb0(%rsp)
jmp 0x58b6
movb 0xaf(%rsp), %al
movq 0xb0(%rsp), %rcx
movq %rcx, 0x288(%rsp)
movb %al, 0x290(%rsp)
movq 0x2a0(%rsp), %rdi
addq $0x60, %rdi
movq 0x2e0(%rsp), %rsi
addq $0x60, %rsi
callq 0x13430
movq %rax, 0xa0(%rsp)
jmp 0x58fb
movq 0xa0(%rsp), %rax
movq %rax, 0x280(%rsp)
leaq 0x518(%rsp), %rdi
leaq 0x280(%rsp), %rsi
callq 0x13610
movb %dl, 0x97(%rsp)
movq %rax, 0x98(%rsp)
jmp 0x5931
movb 0x97(%rsp), %al
movq 0x98(%rsp), %rcx
movq %rcx, 0x270(%rsp)
movb %al, 0x278(%rsp)
movq 0x2e0(%rsp), %rax
movl 0x60(%rax), %eax
movq 0x2a0(%rsp), %rcx
cmpl 0x60(%rcx), %eax
jne 0x596c
jmp 0x6268
movq 0x2a0(%rsp), %rdi
addq $0x10, %rdi
callq 0x13760
testb $0x1, %al
jne 0x5983
jmp 0x5988
jmp 0x6268
movq 0x2e0(%rsp), %rax
cmpq 0x2a0(%rsp), %rax
je 0x599c
jmp 0x59bb
leaq 0x20bed(%rip), %rdi     # 0x26590
leaq 0x2074e(%rip), %rsi     # 0x260f8
movl $0x393, %edx            # imm = 0x393
leaq 0x20baa(%rip), %rcx     # 0x26560
callq 0x2120
movl $0x0, 0x26c(%rsp)
xorps %xmm0, %xmm0
movss %xmm0, 0x268(%rsp)
leaq 0x308(%rsp), %rdi
callq 0x130a0
movq 0x2e0(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x260(%rsp)
movq 0x260(%rsp), %rdi
callq 0x128b0
movq %rax, 0x258(%rsp)
movq 0x260(%rsp), %rdi
callq 0x128e0
movq %rax, 0x250(%rsp)
leaq 0x258(%rsp), %rdi
leaq 0x250(%rsp), %rsi
callq 0x134e0
testb $0x1, %al
jne 0x5a3b
jmp 0x5c27
leaq 0x258(%rsp), %rdi
callq 0x13520
movq %rax, 0x248(%rsp)
movq 0x2a0(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x240(%rsp)
movq 0x240(%rsp), %rdi
callq 0x128b0
movq %rax, 0x238(%rsp)
movq 0x240(%rsp), %rdi
callq 0x128e0
movq %rax, 0x230(%rsp)
leaq 0x238(%rsp), %rdi
leaq 0x230(%rsp), %rsi
callq 0x134e0
testb $0x1, %al
jne 0x5aac
jmp 0x5c13
leaq 0x238(%rsp), %rdi
callq 0x13520
movq %rax, 0x228(%rsp)
movq 0x248(%rsp), %rax
movl (%rax), %eax
movq 0x228(%rsp), %rcx
cmpl (%rcx), %eax
jne 0x5b00
movl 0x26c(%rsp), %eax
incl %eax
movl %eax, 0x26c(%rsp)
movq 0x248(%rsp), %rsi
leaq 0x308(%rsp), %rdi
callq 0x12f60
jmp 0x5afe
jmp 0x5b00
movq 0x138(%rsp), %rdi
movss 0x2dc(%rsp), %xmm0
movss %xmm0, 0x7c(%rsp)
movss 0x2d8(%rsp), %xmm0
movss %xmm0, 0x80(%rsp)
movss 0x2d4(%rsp), %xmm0
movss %xmm0, 0x84(%rsp)
addq $0xc8, %rdi
movq %rdi, 0x88(%rsp)
movq 0x228(%rsp), %rax
movl (%rax), %eax
movl %eax, %esi
callq 0x12a20
movq 0x88(%rsp), %rdi
movss (%rax), %xmm0
movss %xmm0, 0x90(%rsp)
movq 0x228(%rsp), %rax
movl (%rax), %eax
movl %eax, %esi
callq 0x12a20
movss 0x90(%rsp), %xmm0
movss 0x4(%rax), %xmm1
leaq 0x21c(%rsp), %rdi
callq 0x13730
jmp 0x5b9e
movss 0x84(%rsp), %xmm2
movss 0x80(%rsp), %xmm1
movss 0x7c(%rsp), %xmm0
leaq 0x21c(%rsp), %rdi
callq 0x137b0
movss %xmm0, 0x78(%rsp)
jmp 0x5bcb
movss 0x78(%rsp), %xmm0
movss %xmm0, 0x224(%rsp)
movss 0x224(%rsp), %xmm0
ucomiss 0x268(%rsp), %xmm0
jbe 0x5bff
movss 0x224(%rsp), %xmm0
movss %xmm0, 0x268(%rsp)
jmp 0x5c01
leaq 0x238(%rsp), %rdi
callq 0x13530
jmp 0x5a8e
jmp 0x5c15
leaq 0x258(%rsp), %rdi
callq 0x13530
jmp 0x5a1d
cmpl $0x2, 0x26c(%rsp)
jb 0x6266
movb $0x0, 0x303(%rsp)
movss 0x203d7(%rip), %xmm0    # 0x2601c
ucomiss 0x268(%rsp), %xmm0
jb 0x5eae
movl 0x304(%rsp), %esi
movq 0x2e0(%rsp), %rax
movl 0x60(%rax), %edx
movq 0x2a0(%rsp), %rax
movl 0x60(%rax), %ecx
movl 0x26c(%rsp), %r8d
movss 0x268(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x2090f(%rip), %rdi     # 0x2659b
movb $0x1, %al
callq 0x2050
jmp 0x5c95
movl $0x0, 0x218(%rsp)
movq 0x2a0(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x210(%rsp)
movq 0x210(%rsp), %rdi
callq 0x128b0
movq %rax, 0x208(%rsp)
movq 0x210(%rsp), %rdi
callq 0x128e0
movq %rax, 0x200(%rsp)
leaq 0x208(%rsp), %rdi
leaq 0x200(%rsp), %rsi
callq 0x134e0
testb $0x1, %al
jne 0x5cfc
jmp 0x5de8
leaq 0x208(%rsp), %rdi
callq 0x13520
movq %rax, 0x1f8(%rsp)
movq 0x2e0(%rsp), %rdi
addq $0x10, %rdi
callq 0x128b0
movq %rax, 0x1e8(%rsp)
movq 0x2e0(%rsp), %rdi
addq $0x10, %rdi
callq 0x128e0
movq %rax, 0x1e0(%rsp)
movq 0x1f8(%rsp), %rdx
movq 0x1e8(%rsp), %rdi
movq 0x1e0(%rsp), %rsi
callq 0x12f00
movq %rax, 0x70(%rsp)
jmp 0x5d67
movq 0x70(%rsp), %rax
movq %rax, 0x1f0(%rsp)
movq 0x2e0(%rsp), %rdi
addq $0x10, %rdi
callq 0x128e0
movq %rax, 0x1d8(%rsp)
leaq 0x1f0(%rsp), %rdi
leaq 0x1d8(%rsp), %rsi
callq 0x12ec0
testb $0x1, %al
jne 0x5da8
jmp 0x5dd4
movq 0x2e0(%rsp), %rdi
addq $0x10, %rdi
movq 0x1f8(%rsp), %rsi
callq 0x12f60
jmp 0x5dc3
movl 0x218(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x218(%rsp)
jmp 0x5dd6
leaq 0x208(%rsp), %rdi
callq 0x13530
jmp 0x5cde
cmpl $0x0, 0x218(%rsp)
jbe 0x5e36
movl 0x304(%rsp), %esi
movl 0x218(%rsp), %edx
movq 0x2a0(%rsp), %rax
movl 0x60(%rax), %ecx
movq 0x2e0(%rsp), %rax
movl 0x60(%rax), %r8d
movss 0x268(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x207be(%rip), %rdi     # 0x265e9
movb $0x1, %al
callq 0x2050
jmp 0x5e34
jmp 0x5e36
movq 0x2a0(%rsp), %rdi
addq $0x10, %rdi
callq 0x130a0
leaq 0x1d0(%rsp), %rdi
xorps %xmm0, %xmm0
callq 0x13490
jmp 0x5e59
movq 0x2a0(%rsp), %rax
movq 0x1d0(%rsp), %rcx
movq %rcx, 0x58(%rax)
movq 0x2a0(%rsp), %rcx
movq 0x58(%rax), %rax
movq %rax, 0x8(%rcx)
movq 0x2a0(%rsp), %rax
movq 0x8(%rcx), %rcx
movq %rcx, (%rax)
movq 0x2a0(%rsp), %rax
movb $0x1, 0x74(%rax)
movl 0x324(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x324(%rsp)
jmp 0x6264
movl $0x0, 0x1cc(%rsp)
movl $0x0, 0x1c8(%rsp)
leaq 0x308(%rsp), %rax
movq %rax, 0x1c0(%rsp)
movq 0x1c0(%rsp), %rdi
callq 0x128b0
movq %rax, 0x1b8(%rsp)
movq 0x1c0(%rsp), %rdi
callq 0x128e0
movq %rax, 0x1b0(%rsp)
leaq 0x1b8(%rsp), %rdi
leaq 0x1b0(%rsp), %rsi
callq 0x134e0
testb $0x1, %al
jne 0x5f1c
jmp 0x613e
leaq 0x1b8(%rsp), %rdi
callq 0x13520
movq %rax, 0x1a8(%rsp)
movl 0x304(%rsp), %esi
movq 0x1a8(%rsp), %rax
movl (%rax), %edx
leaq 0x206dd(%rip), %rdi     # 0x26626
xorl %eax, %eax
callq 0x2050
jmp 0x5f52
movq 0x2e0(%rsp), %rdi
addq $0x10, %rdi
callq 0x128b0
movq %rax, 0x1a0(%rsp)
movq 0x2e0(%rsp), %rdi
addq $0x10, %rdi
callq 0x128e0
movq %rax, 0x198(%rsp)
leaq 0x1a0(%rsp), %rdi
leaq 0x198(%rsp), %rsi
callq 0x134e0
testb $0x1, %al
jne 0x5fa2
jmp 0x603e
leaq 0x1a0(%rsp), %rdi
callq 0x13520
movl (%rax), %eax
movq 0x1a8(%rsp), %rcx
cmpl (%rcx), %eax
jne 0x602c
movq 0x2e0(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x60(%rsp)
leaq 0x188(%rsp), %rdi
leaq 0x1a0(%rsp), %rsi
callq 0x138f0
movq 0x60(%rsp), %rdi
movq 0x188(%rsp), %rsi
callq 0x13880
movq %rax, 0x68(%rsp)
jmp 0x5ffc
movq 0x68(%rsp), %rax
movq %rax, 0x190(%rsp)
movq 0x190(%rsp), %rax
movq %rax, 0x1a0(%rsp)
movl 0x1cc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1cc(%rsp)
jmp 0x6039
leaq 0x1a0(%rsp), %rdi
callq 0x13530
jmp 0x5f6b
movq 0x2a0(%rsp), %rdi
addq $0x10, %rdi
callq 0x128b0
movq %rax, 0x180(%rsp)
movq 0x2a0(%rsp), %rdi
addq $0x10, %rdi
callq 0x128e0
movq %rax, 0x178(%rsp)
leaq 0x180(%rsp), %rdi
leaq 0x178(%rsp), %rsi
callq 0x134e0
testb $0x1, %al
jne 0x608e
jmp 0x612a
leaq 0x180(%rsp), %rdi
callq 0x13520
movl (%rax), %eax
movq 0x1a8(%rsp), %rcx
cmpl (%rcx), %eax
jne 0x6118
movq 0x2a0(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x50(%rsp)
leaq 0x168(%rsp), %rdi
leaq 0x180(%rsp), %rsi
callq 0x138f0
movq 0x50(%rsp), %rdi
movq 0x168(%rsp), %rsi
callq 0x13880
movq %rax, 0x58(%rsp)
jmp 0x60e8
movq 0x58(%rsp), %rax
movq %rax, 0x170(%rsp)
movq 0x170(%rsp), %rax
movq %rax, 0x180(%rsp)
movl 0x1c8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c8(%rsp)
jmp 0x6125
leaq 0x180(%rsp), %rdi
callq 0x13530
jmp 0x6057
jmp 0x612c
leaq 0x1b8(%rsp), %rdi
callq 0x13530
jmp 0x5efe
xorl %eax, %eax
movl %eax, %esi
leaq 0x308(%rsp), %rdi
callq 0x12a00
movl (%rax), %eax
movl %eax, 0x164(%rsp)
movq 0x2e0(%rsp), %rdi
addq $0x10, %rdi
leaq 0x164(%rsp), %rsi
callq 0x12f60
jmp 0x6173
movq 0x2a0(%rsp), %rdi
addq $0x10, %rdi
leaq 0x164(%rsp), %rsi
callq 0x12f60
jmp 0x618e
movl 0x304(%rsp), %eax
movl %eax, 0x3c(%rsp)
movq 0x2e0(%rsp), %rax
movl 0x60(%rax), %eax
movl %eax, 0x40(%rsp)
leaq 0x308(%rsp), %rdi
callq 0x12b80
movl %eax, 0x44(%rsp)
movq 0x2a0(%rsp), %rax
movl 0x60(%rax), %eax
movl %eax, 0x48(%rsp)
movl 0x164(%rsp), %eax
movl %eax, 0x4c(%rsp)
movl 0x1cc(%rsp), %eax
movl %eax, 0x38(%rsp)
movl 0x1c8(%rsp), %eax
movl %eax, 0x34(%rsp)
movq 0x2e0(%rsp), %rdi
addq $0x10, %rdi
callq 0x12b80
movl %eax, 0x30(%rsp)
movq 0x2a0(%rsp), %rdi
addq $0x10, %rdi
callq 0x12b80
movl 0x30(%rsp), %r11d
movl 0x34(%rsp), %r10d
movl 0x38(%rsp), %edi
movl 0x3c(%rsp), %esi
movl 0x40(%rsp), %edx
movl 0x44(%rsp), %ecx
movl 0x48(%rsp), %r8d
movl 0x4c(%rsp), %r9d
movl %eax, %ebx
movss 0x268(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movq %rsp, %rax
movl %ebx, 0x18(%rax)
movl %r11d, 0x10(%rax)
movl %r10d, 0x8(%rax)
movl %edi, (%rax)
leaq 0x203d9(%rip), %rdi     # 0x26632
movb $0x1, %al
callq 0x2050
jmp 0x6262
jmp 0x6264
jmp 0x6266
jmp 0x6268
leaq 0x2b0(%rsp), %rdi
callq 0x12b20
jmp 0x57f7
jmp 0x627c
leaq 0x2f0(%rsp), %rdi
callq 0x12b20
jmp 0x5640
testb $0x1, 0x303(%rsp)
je 0x62bf
movq 0x138(%rsp), %rax
cmpl $0x0, 0x60(%rax)
je 0x62bf
movl 0x304(%rsp), %esi
leaq 0x203f0(%rip), %rdi     # 0x266a4
xorl %eax, %eax
callq 0x2050
jmp 0x62bd
jmp 0x62bf
movl 0x304(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x304(%rsp)
movb 0x303(%rsp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x55ed
movl 0x324(%rsp), %esi
leaq 0x203bf(%rip), %rdi     # 0x266ae
xorl %eax, %eax
callq 0x2050
jmp 0x62f8
movq 0x138(%rsp), %rax
addq $0x18, %rax
movq %rax, 0x158(%rsp)
movq 0x158(%rsp), %rdi
callq 0x12a70
movq %rax, 0x150(%rsp)
movq 0x158(%rsp), %rdi
callq 0x12aa0
movq %rax, 0x148(%rsp)
leaq 0x150(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0x12ad0
testb $0x1, %al
jne 0x6351
jmp 0x63c1
leaq 0x150(%rsp), %rdi
callq 0x12b10
movq %rax, 0x140(%rsp)
movq 0x140(%rsp), %rdi
addq $0x10, %rdi
callq 0x12b80
cmpq $0x1, %rax
jne 0x63ad
movq 0x140(%rsp), %rdi
movl 0x60(%rdi), %eax
movl %eax, 0x2c(%rsp)
addq $0x10, %rdi
callq 0x12b80
movl 0x2c(%rsp), %esi
movl %eax, %edx
leaq 0x2033f(%rip), %rdi     # 0x266e1
xorl %eax, %eax
callq 0x2050
jmp 0x63ab
jmp 0x63ad
jmp 0x63af
leaq 0x150(%rsp), %rdi
callq 0x12b20
jmp 0x6336
movl 0x6e4(%rsp), %eax
movl %eax, 0x28(%rsp)
leaq 0x308(%rsp), %rdi
callq 0x13930
leaq 0x518(%rsp), %rdi
callq 0x13990
movl 0x28(%rsp), %eax
addq $0x6f0, %rsp            # imm = 0x6F0
popq %rbx
retq
leaq 0x518(%rsp), %rdi
callq 0x13990
movq 0x550(%rsp), %rdi
callq 0x2280
nopl (%rax)