// File: /workspace/github_cpp_makefile_star2_O2/thierry7100[P]CutOptim/src/SvgDoc.cpp
// Function: SvgDoc::OptimizeLevelFreeRot(Polygon*, std::__cxx11::list<NSVGpath*, std::allocator<NSVGpath*>>, std::__cxx11::list<NSVGpath*, std::allocator<NSVGpath*>>, double, double&, double, int, int, int)
NSVGpath *SvgDoc::OptimizeLevelFreeRot(Polygon *FixedPolyHull, std::list<NSVGpath *> FixedList, std::list<NSVGpath *> CurFloating, double FixedArea,
                                double &Cost, double InBestCost, int FloatPolygon, int nbFixedPoly, int LevelOptimize)
{
Polygon *rot_p = NULL;
Polygon *trans_rot_p = NULL;
vector<Point> FixedHull;
vector<Point> tmpFixedHull;
double BestCost = 1e100;
int Best_i = -1, Best_j = -1;
int Best_Poly = -1;
double BestAngle;
Point BestTranslation;
Point OverAllCentroid;
Rectangle OverAll;
int Reason;
int FixedPolygon = 0;
Point RefPoint;

    if ( debug_level > 1 )
    {
        OutDebug << "Entering OptimizeLevel(" << LevelOptimize <<  "): FixedHullArea " <<  FixedPolyHull->area() << " Fixed area " << FixedArea;
        OutDebug << " InBestCost=" << InBestCost << "\n";
        OutDebug << "Elements in list:" << CurFloating.size() << " first is " << CurFloating.front()->id << "\n";
    }
    FixedHull = FixedPolyHull->GetVertices();
    OverAllCentroid = FixedPolyHull->getCentroid();
    OverAll = FixedPolyHull->GetBoundingBox();

    NSVGpath *WorkingFloatingEntry = CurFloating.front();
    //  And remove element from temporary floating list
    CurFloating.pop_front();
    BestCost = 1e100;          //  Very large, each try should be better
    BestAngle = -500;            //   Impossible value
    if ( debug_level > 1 )
    {
        OutDebug << "Polygon to be placed : " << WorkingFloatingEntry->id << "  has " << WorkingFloatingEntry->LargePolygon->nVertices << " vertices.\n";
    }
    double tmpPolygonArea = FixedArea + WorkingFloatingEntry->LargePolygon->area();
    int nPreviousVertices = getFixedNbVertex(FixedList);            //  Number of vertices of all polygons before this one
    //  Build a cache object which will speed up computation if not yet present
    if ( UseCache && WorkingFloatingEntry->CachePoly == NULL )
    {
        //  Use 4 for num_rot because 4 possibilities will be tested, even if 2 at most are possible.
        WorkingFloatingEntry->CachePoly = new CachePosition(WorkingFloatingEntry->LargePolygon->nVertices, 4, nPreviousVertices);
    }
    //  Precomputing of segments and angle to save time
    WorkingFloatingEntry->LargePolygon->ComputeAngles();     //  Compute angles to be more efficient later
    WorkingFloatingEntry->LargePolygon->CalcSegments();

    //  Try all vertices of all placed polygons
    FixedPolygon = 0;
    int iFixedVertex = 0;
    for (std::list<NSVGpath *>::iterator it=FixedList.begin(); it != FixedList.end(); ++it, FixedPolygon++)
    {
        //  Get next placed polygon
        NSVGpath *path = *it;
        Polygon  *curFixed = path->PlacedPolygon;
        if ( debug_level > 2 )
        {
            OutDebug << "\n\n-------    Trying matching polygon " << FloatPolygon << " with Polygon " << FixedPolygon << "\n";
        }
        // For each vertex of this placed polygon
        for ( int iVFixed = 0; iVFixed < curFixed->nVertices-1; iFixedVertex++, iVFixed++)
        {
            double angle = 0;
            if ( debug_level > 2 )
            {
                OutDebug << "\nTrying on vertex " << iVFixed << " of fixed polygon\n";
            }
            //  Try all vertices of the floating polygon, and select the best
            for (int iVFloat = 0; iVFloat < WorkingFloatingEntry->LargePolygon->nVertices-1; iVFloat++)
            {
                if ( debug_level > 3 )
                {
                    OutDebug << "\nTrying with vertex " << iVFloat << " on vertex " << iVFixed << "\n";
                }
                //  For each case, try 4 angles. Angles are computed such as edge of flaot polygon are aligned to edge of fixed polygon with matching vertex.
                //  As there is 2 edges for each vertex, there are 4 possible angles, even if at most 2 will be possible
                for ( int iRot = 0; iRot < 4; iRot++)
                {
                    //  Use cache if available

                    trans_rot_p = NULL;
                    int Cached = 0;
                    if ( UseCache && path->isFixed )
                        WorkingFloatingEntry->CachePoly->isOKPlacedFreeRot(iVFloat, iRot, iFixedVertex, &trans_rot_p);
                    if ( Cached < 0 )       //  Cache says impossible !
                    {
                        CacheHit_KO++;
                        if ( debug_level > 2 )
                            OutDebug << "Cache says placement polygon " << FloatPolygon << " vertex " << iVFloat << " on vertex " << iVFixed << " of Polygon " << FixedPolygon << "(" << iFixedVertex << ")" << "impossible " << *curFixed->GetVertex(iVFixed) << "\n";
                        continue;           //  Goto next vertex...
                    }
                    else if ( Cached == 0 )
                    {
                        CacheMiss++;        // Not yet in cache, check angles first
                        nbCheckAngles++;
                        angle = 0;
                        //  Compute angle associated with floating polygon vertex j placed on vertex i of fixed polygon curFixed polygon (index i_rot)
                        //  If not possible, invalidate cache
                        int Res = ComputeFreeRotAngle(WorkingFloatingEntry->LargePolygon, iVFloat, curFixed, iVFixed, iRot, angle);
                        if ( debug_level > 3 )
                        {
                            OutDebug << "iRot =" << iRot << " angle=" << round(angle * 180 / M_PI);
                            OutDebug << "  ComputeFreeRotAngle: Res=" << Res << "\n";
                        }
                        if ( Res == 0)
                        {
                            //  Impossible, invalid cache entry
                            if ( UseCache && path->isFixed )
                                WorkingFloatingEntry->CachePoly->addOKPlacedFreeRot(iVFloat, iRot, iFixedVertex, NULL);
                            if ( debug_level > 2 )
                                OutDebug << "ComputeFreeRotAngle: Placement polygon " << FloatPolygon << " vertex " << iVFloat << " with rotation " << angle << "(" << iRot << ")" << " on vertex " << iVFixed << " of Polygon " << FixedPolygon << " impossible " << *curFixed->GetVertex(iVFixed) << ", reason angle mismatch\n";
                            continue;    //  Not possible goto next without further processing
                        }
                        //  Compute polygon translated and rotated...
                        if ( rot_p ) delete rot_p;
                        rot_p = WorkingFloatingEntry->LargePolygon->Rotate(angle);
                        nbRotation++;
                        rot_p->ComputeAngles();     //  Compute angles to be more efficient later
                        rot_p->CalcSegments();
                        trans_rot_p = rot_p->Translate(curFixed->GetVertex(iVFixed), iVFloat);
                        nbTranslation++;
                        trans_rot_p->CalcSegments();
                    }
                    else
                    {
                        CacheHit_OK++;
                        angle = trans_rot_p->getRotation();
                    }

                    RefPoint = Point(WorkingFloatingEntry->StartX, WorkingFloatingEntry->StartY);
                    RefPoint.Transform(angle, WorkingFloatingEntry->LargePolygon->getCentroid(), trans_rot_p->getTranslation());
                    if ( (Reason = PlacementNotPossible(trans_rot_p, FixedList, &OverAll, &RefPoint, Cached)) )
                    {
                        if ( debug_level > 2 )
                            OutDebug << "Placement polygon " << FloatPolygon << " vertex " << iVFloat << " on vertex " << iVFixed << " of Polygon " << FixedPolygon << " impossible " << *curFixed->GetVertex(iVFixed) << ", reason " << Reason << "\n";
                        //  If impossible due to conflict with fixed polygon, invalidate cache entry
                        if ( path->isFixed && (Reason & FIXED_BIT) != 0 )
                        {
                            if ( UseCache )
                                WorkingFloatingEntry->CachePoly->addOKPlacedFreeRot(iVFloat, iRot, iFixedVertex, NULL);
                            delete trans_rot_p;
                            trans_rot_p = NULL;
                        }
                        //  Free memory associated with polygon
                        if ( Cached == 0 && trans_rot_p != NULL )
                        {
                            delete trans_rot_p;
                            trans_rot_p = NULL;
                        }

                        nbPlacementImpossible++;
                        continue;
                    }
                    if ( path->isFixed && Cached == 0)        //  If current vertex belongs to a fixed path, cache value
                    {
                        if ( UseCache )
                        {
                            WorkingFloatingEntry->CachePoly->addOKPlacedFreeRot(iVFloat, iRot, iFixedVertex, trans_rot_p);
                            Cached = 1;
                        }
                    }
                    //  Compute cost function
                    //  We will use only the Hull area.
                    //  As the Hull will only grow with subsequent calls, if a temp value is greater than the best one, no need to process further polygons
                    vector<Point> tmpHull = CombineHull(FixedHull, trans_rot_p->GetVertices());
                    double tmpHullArea = HullArea(tmpHull);
                    if ( debug_level > 1)
                        OutDebug << "  Vertex " << iVFloat << " on " << iVFixed << " of polygon " << FixedPolygon << " Hull area " << tmpHullArea << "--> DiffArea=" << tmpHullArea - tmpPolygonArea << "\n";
                    //  In this case, call again this function but with a list without the first element
                    //  First copy the list, the first element has already been removed
                    std::list<NSVGpath *> tmpFloatList = CurFloating;
                    //  Then add this element, as placed to the fixed list.
                    std::list<NSVGpath *> tmpFixedList = FixedList;
                    tmpFixedList.push_back(WorkingFloatingEntry);
                    //  Move Polygon at its place, but before delete existing polygon to save memory
                    if ( WorkingFloatingEntry->PlacedPolygon ) delete WorkingFloatingEntry->PlacedPolygon;
                    if ( WorkingFloatingEntry->LargeConvexHull ) delete WorkingFloatingEntry->LargeConvexHull;
                    Point temp_pT = trans_rot_p->getTranslation();
                    WorkingFloatingEntry->PlacedPolygon = WorkingFloatingEntry->LargePolygon->Transform(angle, &temp_pT);
                    WorkingFloatingEntry->PlacedPolygon->ComputeAngles();
                    WorkingFloatingEntry->PlacedPolygon->CalcSegments();
                    //  Update variables for Fixed polygons lists
                    double tmpFixedArea = FixedArea + WorkingFloatingEntry->LargePolygon->area();
                    tmpFixedHull = CombineHull(FixedHull, WorkingFloatingEntry->PlacedPolygon->GetVertices());
                    WorkingFloatingEntry->LargeConvexHull = new Polygon(tmpFixedHull);
                    WorkingFloatingEntry->LargeConvexHull->ReCalcArea();
                    if ( debug_level > 1 && !tmpFloatList.empty() && tmpHullArea >= InBestCost )
                    {
                        OutDebug << " TmpHullarea (" << tmpHullArea << ") larger than input best values (" << InBestCost << ") no need to process other polygons in list\n";
                    }
                    if ( debug_level > 1 && !tmpFloatList.empty() && tmpHullArea >= BestCost )
                    {
                        OutDebug << " TmpHullarea (" << tmpHullArea << ") larger than current best values (" << BestCost << ") no need to process other polygons in list\n";
                    }
                    if ( !tmpFloatList.empty() && (tmpHullArea <= InBestCost && tmpHullArea <= BestCost) ) //  No need to go deeper, if nothing in list or cost already too high
                    {
                        if ( debug_level > 1 )
                        {
                            OutDebug << "  Applying current translation : " << temp_pT << " to polygon " << FloatPolygon << "\n";
                            OutDebug << "  new hull with " << FixedHull.size() << " vertices, area " << HullArea(FixedHull) << " Fixed polygon area " << tmpFixedArea <<"\n";
                            OutDebug << "  LargeConvexHull area :" << WorkingFloatingEntry->LargeConvexHull->area() << "\n";
                            OutDebug << "  Then call Optimize level again...\n";
                        }
                        OverAll = Hull2BoundingBox(FixedHull);
                        //  Then call Optimize level if the floating list is non empty
                        NSVGpath *Res = OptimizeLevelFreeRot(WorkingFloatingEntry->LargeConvexHull, tmpFixedList, tmpFloatList, tmpFixedArea, tmpHullArea, BestCost, FloatPolygon+1, nbFixedPoly, LevelOptimize - 1);
                        if ( Res == NULL )
                        {
                            //  Not possible, make sure that tmpHullArea will be greater than BestCost
                            tmpHullArea = BestCost + 10;
                        }
                        //  After return, the tmpHullArea is updated
                        if ( debug_level > 1 )
                        {
                            OutDebug << "-----   Returning at level " << LevelOptimize << ",  Cost is " << tmpHullArea << "\n";
                        }
                    }
                    if ( tmpHullArea < BestCost  )
                    {   //  Yes record new best value and corresponding position
                        BestCost = tmpHullArea;
                        BestAngle = angle;
                        BestTranslation = trans_rot_p->getTranslation();
                        Best_i = iVFixed;
                        Best_j = iVFloat;
                        Best_Poly = FixedPolygon;
                        if ( debug_level > 1 )
                        {
                            OutDebug << "New best found placing polygon " << FloatPolygon << "\n";
                            OutDebug << "  Vertex " << iVFloat << " on vertex " << iVFixed << " of polygon " <<  FixedPolygon << "\n";
                            OutDebug << " Rotation=" << round(angle*180/M_PI) << " Translation " << BestTranslation << " from " << *(rot_p->GetVertex(iVFloat)) << " to " <<  *(curFixed->GetVertex(iVFixed)) << "\n";
                            OutDebug << "  Hull area:" << tmpHullArea << " Polygon area:" << tmpPolygonArea << "\n";

                        }
                    }
                    if ( Cached == 0 )
                    {
                        delete trans_rot_p;     //  No need to keep, free memory
                        if ( rot_p->nVertices == 0 )
                        {
                            cerr << " rot_p (" << rot_p << ") invalid with 0 vertices, level =" << LevelOptimize << " Float poly = " << FloatPolygon << "\n";
                        }
                    }
               }
            }
         }
    }
    //  Do some cleaning...
    if ( rot_p != NULL ) delete rot_p;
    rot_p = NULL;
    //  Place polygon at BestAngle and Best Translation
    if ( BestAngle < -100 )
    {
        Cost = 1.0e50;        //      Return a large cost, all possible solutions will be better than this one
        return NULL;
    }
    if ( BestCost > InBestCost )    //  Not better at this level
    {
        Cost = BestCost;
        if ( debug_level > 1 )
        {
            OutDebug << "Level " << LevelOptimize << " No better move than " <<  InBestCost << " found, return at upper level\n";
        }
        return WorkingFloatingEntry;
    }
    if ( WorkingFloatingEntry->PlacedPolygon ) delete WorkingFloatingEntry->PlacedPolygon;
    if ( WorkingFloatingEntry->LargeConvexHull ) delete WorkingFloatingEntry->LargeConvexHull;
    WorkingFloatingEntry->PlacedPolygon = WorkingFloatingEntry->LargePolygon->Transform(BestAngle, &BestTranslation);
    WorkingFloatingEntry->PlacedPolygon->ComputeAngles();
    WorkingFloatingEntry->PlacedPolygon->CalcSegments();
    FixedArea += WorkingFloatingEntry->PlacedPolygon->area();
    FixedHull = CombineHull(FixedHull, WorkingFloatingEntry->PlacedPolygon->GetVertices());
    WorkingFloatingEntry->LargeConvexHull = new Polygon(FixedHull);
    WorkingFloatingEntry->LargeConvexHull->ReCalcArea();
    WorkingFloatingEntry->LargeConvexHull->getCentroid();
    Cost = BestCost;
    if ( debug_level > 0 )
    {
        OutDebug << "Level " << LevelOptimize << ": Applying best move : " << BestTranslation << "/" << round(BestAngle*180/M_PI) << "° to polygon " << FloatPolygon << " will place vertex " << Best_j << " on vertex " << Best_i << " of polygon " << Best_Poly << "\n";
        OutDebug << "  new hull with " << FixedHull.size() << " vertices, area " << HullArea(FixedHull) << " Fixed polygon area " << FixedArea <<"\n";
        OutDebug << "  LargeConvexHull area :" << WorkingFloatingEntry->LargeConvexHull->area() << " Cost= " << Cost << "\n";
        OutDebug << "  CurFloating.Size=" << CurFloating.size() << "\n";
        int idx_list = 1;
        for (std::list<NSVGpath *>::iterator it=CurFloating.begin(); it != CurFloating.end() ; ++it, idx_list++)
        {
            NSVGpath  *lPath = *it;
            if ( lPath->PlacedPolygon == NULL )
            {
                OutDebug << "Element " << idx_list << "Not placed\n";
            }
            else
            {
                OutDebug << " Element " << idx_list << ": Translation=" << lPath->PlacedPolygon->getTranslation() << " rot=" << round(lPath->PlacedPolygon->getRotation()*180/M_PI) ;
                OutDebug << " Hull area=" << lPath->LargeConvexHull->area() << "\n";
            }
        }
    }
    return WorkingFloatingEntry;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x278, %rsp            # imm = 0x278
movq %r9, 0x58(%rsp)
movsd %xmm1, 0x78(%rsp)
movq %r8, %r12
movsd %xmm0, 0xc0(%rsp)
movq %rcx, 0x60(%rsp)
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %rbp
andq $0x0, 0x38(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0xa0(%rsp)
andq $0x0, 0xb0(%rsp)
movapd %xmm0, 0x180(%rsp)
andq $0x0, 0x190(%rsp)
movapd %xmm0, 0x140(%rsp)
movapd %xmm0, 0x170(%rsp)
cmpl $0x2, 0x60(%rdi)
jl 0x2e937
leaq 0x68(%rbp), %r14
leaq 0x8d54(%rip), %rsi      # 0x375af
movq %r14, %rdi
callq 0x8420
movq %rax, %rdi
movl 0x2b8(%rsp), %esi
callq 0x8740
leaq 0x8d4e(%rip), %rsi      # 0x375c7
movq %rax, %rdi
callq 0x8420
movq %rax, %r15
movq %rbx, %rdi
callq 0x22296
movq %r15, %rdi
callq 0x86b0
leaq 0x8d3e(%rip), %rsi      # 0x375d9
movq %rax, %rdi
callq 0x8420
movq %rax, %rdi
movsd 0xc0(%rsp), %xmm0
callq 0x86b0
leaq 0x8d37(%rip), %rsi      # 0x375f2
movq %r14, %rdi
callq 0x8420
movq %rax, %rdi
movsd 0x78(%rsp), %xmm0
callq 0x86b0
leaq 0x89b4(%rip), %rsi      # 0x3728c
movq %rax, %rdi
callq 0x8420
leaq 0x8d18(%rip), %rsi      # 0x375ff
movq %r14, %rdi
callq 0x8420
movq 0x60(%rsp), %rcx
movq 0x10(%rcx), %rsi
movq %rax, %rdi
callq 0x8310
leaq 0x8d0a(%rip), %rsi      # 0x37611
movq %rax, %rdi
callq 0x8420
movq 0x60(%rsp), %rcx
movq (%rcx), %rcx
movl $0x90, %esi
addq 0x10(%rcx), %rsi
movq %rax, %rdi
callq 0x8420
leaq 0x895d(%rip), %rsi      # 0x3728c
movq %rax, %rdi
callq 0x8420
leaq 0x10(%rbx), %rsi
leaq 0x100(%rsp), %rdi
callq 0x21456
leaq 0xa0(%rsp), %rdi
leaq 0x100(%rsp), %r14
movq %r14, %rsi
callq 0x24bf4
movq %r14, %rdi
callq 0x2150c
movq %rbx, %rdi
callq 0x233aa
leaq 0x100(%rsp), %rdi
movq %rbx, %rsi
callq 0x2329a
movupd 0x100(%rsp), %xmm0
movupd 0x110(%rsp), %xmm1
movapd %xmm1, 0x1f0(%rsp)
movapd %xmm0, 0x1e0(%rsp)
movq 0x60(%rsp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
movq %rax, 0x8(%rsp)
callq 0x333de
cmpl $0x2, 0x60(%rbp)
jl 0x2ea14
leaq 0x68(%rbp), %rdi
leaq 0x8c51(%rip), %rsi      # 0x3761c
callq 0x8420
movl $0x90, %esi
addq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x8420
leaq 0x8c4b(%rip), %rsi      # 0x37634
movq %rax, %rdi
callq 0x8420
movq 0x8(%rsp), %rcx
movq 0x68(%rcx), %rcx
movl 0x8(%rcx), %esi
movq %rax, %rdi
callq 0x8740
leaq 0x8c2f(%rip), %rsi      # 0x3763b
movq %rax, %rdi
callq 0x8420
movq 0x8(%rsp), %rax
movq 0x68(%rax), %rdi
callq 0x22296
movsd %xmm0, 0xc8(%rsp)
leaq 0x260(%rsp), %rdi
movq %r13, %rsi
callq 0x333a4
leaq 0x260(%rsp), %r14
movq %r14, %rsi
callq 0x2d754
movl %eax, %ebx
movq %r14, %rdi
callq 0x33458
cmpl $0x0, 0x64(%rbp)
movq 0x8(%rsp), %r15
je 0x2ea95
cmpq $0x0, 0x88(%r15)
jne 0x2ea95
pushq $0x38
popq %rdi
callq 0x8440
movq %rax, %r14
movq 0x68(%r15), %rax
movl 0x8(%rax), %esi
pushq $0x4
popq %rdx
movq %r14, %rdi
movl %ebx, %ecx
callq 0x20eb4
movq 0x8(%rsp), %r15
movq %r14, 0x88(%r15)
movq 0x68(%r15), %rdi
callq 0x23c0c
movq 0x8(%rsp), %rax
movq 0x68(%rax), %rdi
callq 0x2404a
movq %r12, 0x138(%rsp)
movsd 0xc8(%rsp), %xmm0
addsd 0xc0(%rsp), %xmm0
movsd %xmm0, 0xc8(%rsp)
leaq 0x68(%rbp), %rax
movq %rax, 0x10(%rsp)
movq 0x58(%rsp), %rax
incl %eax
movl %eax, 0xfc(%rsp)
movl 0x2b8(%rsp), %eax
leal -0x1(%rax), %eax
movq %rax, 0x1a8(%rsp)
movsd 0x7738(%rip), %xmm0     # 0x36238
movsd %xmm0, 0x40(%rsp)
pushq $-0x1
popq %rax
movsd 0x773f(%rip), %xmm0     # 0x36250
movsd %xmm0, 0x90(%rsp)
movq $0x0, 0x80(%rsp)
movq %r13, %rbx
movl $0x0, 0x24(%rsp)
movl %eax, 0x6c(%rsp)
movl %eax, 0x74(%rsp)
movl %eax, 0x70(%rsp)
xorl %r14d, %r14d
movq %r13, 0xf0(%rsp)
movq (%rbx), %rbx
cmpq %r13, %rbx
je 0x2fb09
movq 0x10(%rbx), %rax
movq %rax, 0xd8(%rsp)
movq 0x78(%rax), %rax
movq %rax, 0x88(%rsp)
cmpl $0x3, 0x60(%rbp)
jl 0x2ebba
movq 0x10(%rsp), %rdi
leaq 0x8fb7(%rip), %rsi      # 0x37b35
callq 0x8420
movq %rax, %rdi
movq 0x58(%rsp), %rsi
callq 0x8740
movq %rax, %rdi
leaq 0x8fc1(%rip), %rsi      # 0x37b5b
callq 0x8420
movq %rax, %rdi
movl 0x24(%rsp), %esi
callq 0x8740
movq %rax, %rdi
leaq 0x86d7(%rip), %rsi      # 0x3728c
callq 0x8420
xorl %r15d, %r15d
movq %rbx, 0x1a0(%rsp)
movq 0x88(%rsp), %rax
movslq 0x8(%rax), %rax
decq %rax
cmpq %rax, %r15
jge 0x2faf8
cmpl $0x2, 0x60(%rbp)
jle 0x2ec0e
movq 0x10(%rsp), %rdi
leaq 0x8f7b(%rip), %rsi      # 0x37b6a
callq 0x8420
movq %rax, %rdi
movl %r15d, %esi
callq 0x8740
movq %rax, %rdi
leaq 0x8f74(%rip), %rsi      # 0x37b7d
callq 0x8420
xorl %ecx, %ecx
movq %r15, 0x48(%rsp)
movq 0x8(%rsp), %rax
movq 0x68(%rax), %rax
movslq 0x8(%rax), %rax
decq %rax
movq %rcx, 0x18(%rsp)
cmpq %rax, %rcx
jge 0x2fade
cmpl $0x3, 0x60(%rbp)
jle 0x2ec80
movq 0x10(%rsp), %rdi
leaq 0x8f4b(%rip), %rsi      # 0x37b90
callq 0x8420
movq %rax, %rdi
movq 0x18(%rsp), %rsi
callq 0x8740
movq %rax, %rdi
leaq 0x8f10(%rip), %rsi      # 0x37b71
callq 0x8420
movq %rax, %rdi
movl %r15d, %esi
callq 0x8740
movq %rax, %rdi
leaq 0x8611(%rip), %rsi      # 0x3728c
callq 0x8420
movq %r14, 0x50(%rsp)
xorl %r15d, %r15d
cmpl $0x4, %r15d
je 0x2fabf
andq $0x0, 0x38(%rsp)
cmpl $0x0, 0x64(%rbp)
je 0x2ecd5
movq 0xd8(%rsp), %rax
cmpl $0x0, 0x80(%rax)
je 0x2ecd5
movq 0x8(%rsp), %rax
movq 0x88(%rax), %rdi
movq 0x18(%rsp), %rsi
movl %r15d, %edx
movq 0x80(%rsp), %rcx
leaq 0x38(%rsp), %r8
callq 0x2107e
incq 0x2a0(%rbp)
incq 0x280(%rbp)
andq $0x0, 0xe8(%rsp)
movq 0x8(%rsp), %rax
movq 0x68(%rax), %rdi
movq 0x18(%rsp), %rsi
movq 0x88(%rsp), %rdx
movq 0x48(%rsp), %rcx
movl %r15d, %r8d
leaq 0xe8(%rsp), %r9
callq 0x2aa8d
movzbl %al, %r14d
cmpl $0x4, 0x60(%rbp)
jl 0x2eda0
movq 0x10(%rsp), %rdi
leaq 0x8e78(%rip), %rsi      # 0x37ba5
callq 0x8420
movq %rax, %rdi
movl %r15d, %esi
callq 0x8740
movq %rax, %rdi
leaq 0x8e65(%rip), %rsi      # 0x37bac
callq 0x8420
movq %rax, %r12
movsd 0xe8(%rsp), %xmm0
mulsd 0x7470(%rip), %xmm0     # 0x361d0
divsd 0x52b8(%rip), %xmm0     # 0x34020
callq 0x81a0
movq %r12, %rdi
callq 0x86b0
movq 0x10(%rsp), %rdi
leaq 0x8e33(%rip), %rsi      # 0x37bb4
callq 0x8420
movq %rax, %rdi
movl %r14d, %esi
callq 0x8740
movq %rax, %rdi
leaq 0x84f1(%rip), %rsi      # 0x3728c
callq 0x8420
testl %r14d, %r14d
je 0x2f007
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x2edb9
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x8(%rsp), %rax
movq 0x68(%rax), %rdi
movsd 0xe8(%rsp), %xmm0
movsd %xmm0, 0x98(%rsp)
callq 0x23738
movq %rax, 0x50(%rsp)
incq 0x278(%rbp)
movq 0x50(%rsp), %rdi
callq 0x23c0c
movq 0x50(%rsp), %rdi
callq 0x2404a
movq 0x48(%rsp), %r12
shlq $0x4, %r12
movq 0x88(%rsp), %rax
movq 0x10(%rax), %rsi
addq %r12, %rsi
movq 0x50(%rsp), %rdi
movq 0x18(%rsp), %rdx
callq 0x235aa
movq %rax, 0x38(%rsp)
incq 0x270(%rbp)
movq %rax, %rdi
callq 0x2404a
movq 0x8(%rsp), %rax
movupd (%rax), %xmm0
movapd %xmm0, 0x170(%rsp)
movq 0x68(%rax), %rdi
callq 0x233aa
movapd %xmm0, %xmm2
movapd %xmm1, %xmm5
movq 0x38(%rsp), %rax
movsd 0xb0(%rax), %xmm3
movsd 0xb8(%rax), %xmm4
leaq 0x170(%rsp), %rdi
movsd 0x98(%rsp), %xmm0
movapd %xmm2, %xmm1
movapd %xmm5, %xmm2
callq 0x33062
movq 0x38(%rsp), %r14
leaq 0x218(%rsp), %rdi
movq 0xf0(%rsp), %rsi
callq 0x333a4
movq %rbp, %rdi
movq %r14, %rsi
leaq 0x218(%rsp), %rbx
movq %rbx, %rdx
leaq 0x1e0(%rsp), %rcx
leaq 0x170(%rsp), %r8
xorl %r9d, %r9d
callq 0x2d770
movl %eax, %r14d
movq %rbx, %rdi
callq 0x33458
testl %r14d, %r14d
je 0x2f146
cmpl $0x3, 0x60(%rbp)
jl 0x2efab
movq 0x10(%rsp), %rdi
leaq 0x8cee(%rip), %rsi      # 0x37be5
callq 0x8420
movq %rax, %rdi
movq 0x58(%rsp), %rsi
callq 0x8740
movq %rax, %rdi
leaq 0x8adc(%rip), %rsi      # 0x379ef
callq 0x8420
movq %rax, %rdi
movq 0x18(%rsp), %rsi
callq 0x8740
movq %rax, %rdi
leaq 0x8c42(%rip), %rsi      # 0x37b71
callq 0x8420
movq %rax, %rdi
movq 0x48(%rsp), %rsi
callq 0x8740
movq %rax, %rdi
leaq 0x8792(%rip), %rsi      # 0x376dd
callq 0x8420
movq %rax, %rdi
movl 0x24(%rsp), %esi
callq 0x8740
movq %rax, %rdi
leaq 0x87bf(%rip), %rsi      # 0x37725
callq 0x8420
movq 0x88(%rsp), %rcx
addq 0x10(%rcx), %r12
movq %rax, %rdi
movq %r12, %rsi
callq 0x333fd
movq %rax, %rdi
leaq 0x87bf(%rip), %rsi      # 0x3774b
callq 0x8420
movq %rax, %rdi
movl %r14d, %esi
callq 0x8740
movq %rax, %rdi
leaq 0x82e6(%rip), %rsi      # 0x3728c
callq 0x8420
testb $0x10, %r14b
je 0x2f796
movq 0xd8(%rsp), %rax
cmpl $0x0, 0x80(%rax)
je 0x2f796
cmpl $0x0, 0x64(%rbp)
je 0x2eff4
movq 0x8(%rsp), %rax
movq 0x88(%rax), %rdi
movq 0x18(%rsp), %rsi
movl %r15d, %edx
movq 0x80(%rsp), %rcx
xorl %r8d, %r8d
callq 0x210aa
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
jne 0x2f7a0
jmp 0x2f7a6
cmpl $0x0, 0x64(%rbp)
je 0x2f042
movq 0xd8(%rsp), %rax
cmpl $0x0, 0x80(%rax)
je 0x2f042
movq 0x8(%rsp), %rax
movq 0x88(%rax), %rdi
movq 0x18(%rsp), %rsi
movl %r15d, %edx
movq 0x80(%rsp), %rcx
xorl %r8d, %r8d
callq 0x210aa
cmpl $0x3, 0x60(%rbp)
jl 0x2fab7
movq 0x10(%rsp), %rdi
leaq 0x8b78(%rip), %rsi      # 0x37bd0
callq 0x8420
movq %rax, %rdi
movq 0x58(%rsp), %rsi
callq 0x8740
movq %rax, %rdi
leaq 0x897b(%rip), %rsi      # 0x379ef
callq 0x8420
movq %rax, %rdi
movq 0x18(%rsp), %rsi
callq 0x8740
movq %rax, %rdi
leaq 0x89db(%rip), %rsi      # 0x37a6b
callq 0x8420
movsd 0xe8(%rsp), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
leaq 0x74e2(%rip), %rsi      # 0x36592
callq 0x8420
movq %rax, %rdi
movl %r15d, %esi
callq 0x8740
movq %rax, %rdi
leaq 0x602e(%rip), %rsi      # 0x350f8
callq 0x8420
movq %rax, %rdi
leaq 0x8a98(%rip), %rsi      # 0x37b71
callq 0x8420
movq %rax, %rdi
movq 0x48(%rsp), %rsi
callq 0x8740
movq %rax, %rdi
leaq 0x85e8(%rip), %rsi      # 0x376dd
callq 0x8420
movq %rax, %rdi
movl 0x24(%rsp), %esi
callq 0x8740
movq %rax, %rdi
leaq 0x8615(%rip), %rsi      # 0x37725
callq 0x8420
movq 0x48(%rsp), %rsi
shlq $0x4, %rsi
movq 0x88(%rsp), %rcx
addq 0x10(%rcx), %rsi
movq %rax, %rdi
callq 0x333fd
movq %rax, %rdi
leaq 0x85f6(%rip), %rsi      # 0x37732
callq 0x8420
jmp 0x2fab7
movq 0xd8(%rsp), %rax
cmpl $0x0, 0x80(%rax)
sete %al
cmpl $0x0, 0x64(%rbp)
sete %cl
orb %al, %cl
movb %cl, 0x37(%rsp)
jne 0x2f18d
movq 0x8(%rsp), %rax
movq 0x88(%rax), %rdi
movq 0x38(%rsp), %r8
movq 0x18(%rsp), %rsi
movl %r15d, %edx
movq 0x80(%rsp), %rcx
callq 0x210aa
movq 0x38(%rsp), %rsi
addq $0x10, %rsi
leaq 0x100(%rsp), %rbx
movq %rbx, %rdi
callq 0x21456
leaq 0x158(%rsp), %r14
movq %r14, %rdi
leaq 0xa0(%rsp), %rsi
movq %rbx, %rdx
callq 0x212e4
movq %rbx, %rdi
callq 0x2150c
movq %r14, %rdi
callq 0x2135d
movsd %xmm0, 0x28(%rsp)
movsd 0x28(%rsp), %xmm0
movsd %xmm0, 0xe0(%rsp)
cmpl $0x2, 0x60(%rbp)
jl 0x2f297
movq 0x10(%rsp), %rdi
leaq 0x872b(%rip), %rsi      # 0x37927
callq 0x8420
movq %rax, %rdi
movq 0x18(%rsp), %rsi
callq 0x8740
movq %rax, %rdi
leaq 0x853d(%rip), %rsi      # 0x37755
callq 0x8420
movq %rax, %rdi
movq 0x48(%rsp), %rsi
callq 0x8740
movq %rax, %rdi
leaq 0x8526(%rip), %rsi      # 0x3775a
callq 0x8420
movq %rax, %rdi
movl 0x24(%rsp), %esi
callq 0x8740
movq %rax, %rdi
leaq 0x8518(%rip), %rsi      # 0x37767
callq 0x8420
movq %rax, %rdi
movsd 0x28(%rsp), %xmm0
callq 0x86b0
movq %rax, %rdi
leaq 0x850e(%rip), %rsi      # 0x3777a
callq 0x8420
movsd 0x28(%rsp), %xmm0
subsd 0xc8(%rsp), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
leaq 0x7ffa(%rip), %rsi      # 0x3728c
callq 0x8420
leaq 0x120(%rsp), %rdi
movq 0x60(%rsp), %rsi
callq 0x333a4
leaq 0x1c8(%rsp), %rbx
movq %rbx, %rdi
movq 0xf0(%rsp), %rsi
callq 0x333a4
movq %rbx, %rdi
leaq 0x8(%rsp), %rsi
callq 0x3314c
movq 0x8(%rsp), %rax
movq 0x78(%rax), %rdi
testq %rdi, %rdi
je 0x2f2e7
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x8(%rsp), %rax
movq 0x70(%rax), %rdi
testq %rdi, %rdi
je 0x2f2fb
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x8(%rsp), %rax
movq 0x38(%rsp), %rcx
movups 0xb0(%rcx), %xmm0
movaps %xmm0, 0x1b0(%rsp)
movq 0x68(%rax), %rdi
movsd 0x98(%rsp), %xmm0
leaq 0x1b0(%rsp), %rsi
callq 0x2399a
movq 0x8(%rsp), %rcx
movq %rax, 0x78(%rcx)
movq %rax, %rdi
callq 0x23c0c
movq 0x8(%rsp), %rax
movq 0x78(%rax), %rdi
callq 0x2404a
movq 0x8(%rsp), %rax
movq 0x68(%rax), %rdi
callq 0x22296
movsd %xmm0, 0xd0(%rsp)
movq 0x8(%rsp), %rax
movq 0x78(%rax), %rsi
addq $0x10, %rsi
leaq 0x248(%rsp), %r14
movq %r14, %rdi
callq 0x21456
leaq 0x100(%rsp), %rbx
movq %rbx, %rdi
leaq 0xa0(%rsp), %rsi
movq %r14, %rdx
callq 0x212e4
leaq 0x180(%rsp), %rdi
movq %rbx, %rsi
callq 0x24bf4
movq %rbx, %rdi
callq 0x2150c
movq %r14, %rdi
callq 0x2150c
movl $0xc0, %edi
callq 0x8440
movq %rax, %r14
movq %rax, %rdi
leaq 0x180(%rsp), %rsi
callq 0x21f86
movq 0x8(%rsp), %rax
movq %r14, 0x70(%rax)
movq %r14, %rdi
callq 0x2328a
cmpl $0x2, 0x60(%rbp)
movq 0x120(%rsp), %rax
jl 0x2f4df
leaq 0x120(%rsp), %rcx
cmpq %rcx, %rax
sete %cl
movsd 0x28(%rsp), %xmm0
ucomisd 0x78(%rsp), %xmm0
setb %dl
orb %cl, %dl
jne 0x2f471
movq 0x10(%rsp), %rdi
leaq 0x87d4(%rip), %rsi      # 0x37bf8
callq 0x8420
movq %rax, %rdi
movsd 0x28(%rsp), %xmm0
callq 0x86b0
movq %rax, %rdi
leaq 0x8357(%rip), %rsi      # 0x37798
callq 0x8420
movq %rax, %rdi
movsd 0x78(%rsp), %xmm0
callq 0x86b0
movq %rax, %rdi
leaq 0x835c(%rip), %rsi      # 0x377ba
callq 0x8420
movq 0x120(%rsp), %rax
cmpl $0x2, 0x60(%rbp)
jl 0x2f4df
leaq 0x120(%rsp), %rcx
cmpq %rcx, %rax
je 0x2f4df
movsd 0x28(%rsp), %xmm0
ucomisd 0x40(%rsp), %xmm0
jb 0x2f4df
movq 0x10(%rsp), %rdi
leaq 0x8760(%rip), %rsi      # 0x37bf8
callq 0x8420
movq %rax, %rdi
movsd 0x28(%rsp), %xmm0
callq 0x86b0
movq %rax, %rdi
leaq 0x8332(%rip), %rsi      # 0x377e7
callq 0x8420
movq %rax, %rdi
movsd 0x40(%rsp), %xmm0
callq 0x86b0
movq %rax, %rdi
leaq 0x82e8(%rip), %rsi      # 0x377ba
callq 0x8420
movq 0x120(%rsp), %rax
leaq 0x120(%rsp), %rcx
cmpq %rcx, %rax
je 0x2f7c7
movsd 0x78(%rsp), %xmm0
ucomisd 0x28(%rsp), %xmm0
jb 0x2f7c7
movsd 0x40(%rsp), %xmm0
ucomisd 0x28(%rsp), %xmm0
jb 0x2f7c7
movsd 0xd0(%rsp), %xmm0
addsd 0xc0(%rsp), %xmm0
movsd %xmm0, 0xd0(%rsp)
cmpl $0x2, 0x60(%rbp)
jl 0x2f652
movq 0x10(%rsp), %rdi
leaq 0x82c6(%rip), %rsi      # 0x3780b
callq 0x8420
movq %rax, %rdi
leaq 0x1b0(%rsp), %rsi
callq 0x333fd
movq %rax, %rdi
leaq 0x8472(%rip), %rsi      # 0x379d6
callq 0x8420
movq %rax, %rdi
movq 0x58(%rsp), %rsi
callq 0x8740
movq %rax, %rdi
leaq 0x7d0c(%rip), %rsi      # 0x3728c
callq 0x8420
movq 0x10(%rsp), %rdi
leaq 0x829c(%rip), %rsi      # 0x3782d
callq 0x8420
movq 0xa8(%rsp), %rsi
subq 0xa0(%rsp), %rsi
sarq $0x4, %rsi
movq %rax, %rdi
callq 0x8310
movq %rax, %rdi
leaq 0x8282(%rip), %rsi      # 0x3783e
callq 0x8420
movq %rax, %r14
leaq 0xa0(%rsp), %rdi
callq 0x2135d
movq %r14, %rdi
callq 0x86b0
movq %rax, %rdi
leaq 0x826c(%rip), %rsi      # 0x3784f
callq 0x8420
movq %rax, %rdi
movsd 0xd0(%rsp), %xmm0
callq 0x86b0
movq %rax, %rdi
leaq 0x7c89(%rip), %rsi      # 0x3728c
callq 0x8420
movq 0x10(%rsp), %rdi
leaq 0x8250(%rip), %rsi      # 0x37864
callq 0x8420
movq %rax, %r14
movq 0x8(%rsp), %rax
movq 0x70(%rax), %rdi
callq 0x22296
movq %r14, %rdi
callq 0x86b0
movq %rax, %rdi
leaq 0x7c50(%rip), %rsi      # 0x3728c
callq 0x8420
movq 0x10(%rsp), %rdi
leaq 0x8230(%rip), %rsi      # 0x3787d
callq 0x8420
leaq 0x100(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x213d3
movupd 0x100(%rsp), %xmm0
movupd 0x110(%rsp), %xmm1
movapd %xmm1, 0x1f0(%rsp)
movapd %xmm0, 0x1e0(%rsp)
movq 0x8(%rsp), %rax
movq 0x70(%rax), %r14
leaq 0x200(%rsp), %rdi
leaq 0x1c8(%rsp), %rsi
callq 0x333a4
leaq 0x230(%rsp), %r13
movq %r13, %rdi
leaq 0x120(%rsp), %rsi
callq 0x333a4
movq %rbp, %rdi
movq %r14, %rsi
leaq 0x200(%rsp), %rbx
movq %rbx, %rdx
movq %r13, %rcx
movsd 0xd0(%rsp), %xmm0
leaq 0xe0(%rsp), %r8
movsd 0x40(%rsp), %xmm1
movl 0xfc(%rsp), %r9d
pushq 0x1a8(%rsp)
movl 0x2b8(%rsp), %eax
pushq %rax
callq 0x2e7d0
popq %rcx
popq %rdx
movq %rax, %r14
movq %r13, %rdi
callq 0x33458
movq %rbx, %rdi
callq 0x33458
testq %r14, %r14
jne 0x2f739
movsd 0x40(%rsp), %xmm0
addsd 0x48e8(%rip), %xmm0     # 0x34018
movsd %xmm0, 0xe0(%rsp)
cmpl $0x1, 0x60(%rbp)
jle 0x2f7b8
movq 0x10(%rsp), %rdi
leaq 0x8157(%rip), %rsi      # 0x378a2
callq 0x8420
movq %rax, %rdi
movl 0x2b8(%rsp), %esi
callq 0x8740
movq %rax, %rdi
leaq 0x8155(%rip), %rsi      # 0x378be
callq 0x8420
movsd 0xe0(%rsp), %xmm0
movq %rax, %rdi
movsd %xmm0, 0x28(%rsp)
callq 0x86b0
movq %rax, %rdi
leaq 0x7afd(%rip), %rsi      # 0x3728c
callq 0x8420
jmp 0x2f7c7
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x2f7ac
movq (%rdi), %rax
callq *0x8(%rax)
andq $0x0, 0x38(%rsp)
incq 0x298(%rbp)
jmp 0x2fab7
movsd 0xe0(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
movsd 0x40(%rsp), %xmm0
ucomisd 0x28(%rsp), %xmm0
jbe 0x2fa01
movq 0x38(%rsp), %rax
movupd 0xb0(%rax), %xmm0
movapd %xmm0, 0x140(%rsp)
cmpl $0x2, 0x60(%rbp)
jl 0x2f9c9
movq 0x10(%rsp), %rdi
leaq 0x8402(%rip), %rsi      # 0x37c07
callq 0x8420
movq %rax, %rdi
movq 0x58(%rsp), %rsi
callq 0x8740
movq %rax, %rdi
leaq 0x7a6b(%rip), %rsi      # 0x3728c
callq 0x8420
movq 0x10(%rsp), %rdi
leaq 0x80f5(%rip), %rsi      # 0x37927
callq 0x8420
movq %rax, %rdi
movq 0x18(%rsp), %rsi
callq 0x8740
movq %rax, %rdi
leaq 0x8323(%rip), %rsi      # 0x37b71
callq 0x8420
movq %rax, %rdi
movq 0x48(%rsp), %rsi
callq 0x8740
movq %rax, %rdi
leaq 0x7ef0(%rip), %rsi      # 0x3775a
callq 0x8420
movq %rax, %rdi
movl 0x24(%rsp), %esi
callq 0x8740
movq %rax, %rdi
leaq 0x7a07(%rip), %rsi      # 0x3728c
callq 0x8420
movq 0x10(%rsp), %rdi
leaq 0x80a0(%rip), %rsi      # 0x37936
callq 0x8420
movq %rax, %r14
movsd 0x98(%rsp), %xmm0
mulsd 0x6921(%rip), %xmm0     # 0x361d0
divsd 0x4769(%rip), %xmm0     # 0x34020
callq 0x81a0
movq %r14, %rdi
callq 0x86b0
movq %rax, %rdi
leaq 0x8073(%rip), %rsi      # 0x37941
callq 0x8420
movq %rax, %rdi
leaq 0x140(%rsp), %rsi
callq 0x333fd
movq %rax, %rdi
leaq 0x8062(%rip), %rsi      # 0x3794f
callq 0x8420
movq 0x18(%rsp), %rsi
shlq $0x4, %rsi
movq 0x50(%rsp), %rcx
addq 0x10(%rcx), %rsi
movq %rax, %rdi
callq 0x333fd
movq %rax, %rdi
leaq 0x79aa(%rip), %rsi      # 0x372c0
callq 0x8420
movq 0x88(%rsp), %rcx
addq 0x10(%rcx), %r12
movq %rax, %rdi
movq %r12, %rsi
callq 0x333fd
movq %rax, %rdi
leaq 0x7950(%rip), %rsi      # 0x3728c
callq 0x8420
movq 0x10(%rsp), %rdi
leaq 0x800d(%rip), %rsi      # 0x3795a
callq 0x8420
movq %rax, %rdi
movsd 0x28(%rsp), %xmm0
callq 0x86b0
movq %rax, %rdi
leaq 0x8005(%rip), %rsi      # 0x3796f
callq 0x8420
movq %rax, %rdi
movsd 0xc8(%rsp), %xmm0
callq 0x86b0
movq %rax, %rdi
leaq 0x7902(%rip), %rsi      # 0x3728c
callq 0x8420
movsd 0x98(%rsp), %xmm0
movsd %xmm0, 0x90(%rsp)
movl 0x24(%rsp), %eax
movl %eax, 0x74(%rsp)
movq 0x18(%rsp), %rax
movl %eax, 0x6c(%rsp)
movq 0x48(%rsp), %rax
movl %eax, 0x70(%rsp)
movsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x40(%rsp)
jmp 0x2fa01
movsd 0x98(%rsp), %xmm0
movsd %xmm0, 0x90(%rsp)
movl 0x24(%rsp), %eax
movl %eax, 0x74(%rsp)
movq 0x18(%rsp), %rax
movl %eax, 0x6c(%rsp)
movq 0x48(%rsp), %rax
movl %eax, 0x70(%rsp)
movsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x40(%rsp)
cmpb $0x0, 0x37(%rsp)
je 0x2fa90
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x2fa1c
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x50(%rsp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x2fa90
movq 0x1d5ba(%rip), %rdi     # 0x4cfe8
leaq 0x7cb5(%rip), %rsi      # 0x376ea
callq 0x8420
movq %rax, %rdi
movq 0x50(%rsp), %rsi
callq 0x8370
movq %rax, %rdi
leaq 0x7ca2(%rip), %rsi      # 0x376f3
callq 0x8420
movq %rax, %rdi
movl 0x2b8(%rsp), %esi
callq 0x8740
movq %rax, %rdi
leaq 0x7ca7(%rip), %rsi      # 0x37716
callq 0x8420
movq %rax, %rdi
movq 0x58(%rsp), %rsi
callq 0x8740
movq %rax, %rdi
leaq 0x7801(%rip), %rsi      # 0x3728c
callq 0x8420
leaq 0x1c8(%rsp), %rdi
callq 0x33458
leaq 0x120(%rsp), %rdi
callq 0x33458
leaq 0x158(%rsp), %rdi
callq 0x2150c
incl %r15d
jmp 0x2ec88
movq 0x18(%rsp), %rcx
incq %rcx
movq 0x1a0(%rsp), %rbx
movq 0x50(%rsp), %r14
movq 0x48(%rsp), %r15
jmp 0x2ec15
movq 0x80(%rsp), %rax
incl %eax
movq %rax, 0x80(%rsp)
incq %r15
jmp 0x2ebc5
incl 0x24(%rsp)
movq 0xf0(%rsp), %r13
jmp 0x2eb48
testq %r14, %r14
je 0x2fb17
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
movsd 0x6739(%rip), %xmm0     # 0x36258
ucomisd 0x90(%rsp), %xmm0
jbe 0x2fb46
movabsq $0x4a511b0ec57e649a, %rax # imm = 0x4A511B0EC57E649A
movq 0x138(%rsp), %rcx
movq %rax, (%rcx)
xorl %ebx, %ebx
jmp 0x30008
movsd 0x40(%rsp), %xmm0
ucomisd 0x78(%rsp), %xmm0
movq 0x138(%rsp), %r15
jbe 0x2fbbc
movsd %xmm0, (%r15)
cmpl $0x2, 0x60(%rbp)
jl 0x30003
leaq 0x7e0c(%rip), %rsi      # 0x3797e
movq 0x10(%rsp), %rdi
callq 0x8420
movq %rax, %rdi
movl 0x2b8(%rsp), %esi
callq 0x8740
leaq 0x7df3(%rip), %rsi      # 0x37985
movq %rax, %rdi
callq 0x8420
movq %rax, %rdi
movsd 0x78(%rsp), %xmm0
callq 0x86b0
leaq 0x7dec(%rip), %rsi      # 0x3799b
movq %rax, %rdi
callq 0x8420
jmp 0x30003
movq 0x8(%rsp), %rax
movq 0x78(%rax), %rdi
testq %rdi, %rdi
je 0x2fbd5
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x8(%rsp), %rax
movq 0x70(%rax), %rdi
testq %rdi, %rdi
je 0x2fbe9
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x8(%rsp), %rax
movq 0x68(%rax), %rdi
leaq 0x140(%rsp), %rsi
movsd 0x90(%rsp), %xmm0
callq 0x2399a
movq 0x8(%rsp), %rcx
movq %rax, 0x78(%rcx)
movq %rax, %rdi
callq 0x23c0c
movq 0x8(%rsp), %rax
movq 0x78(%rax), %rdi
callq 0x2404a
movq 0x8(%rsp), %rax
movq 0x78(%rax), %rdi
callq 0x22296
movsd %xmm0, 0x18(%rsp)
movq 0x8(%rsp), %rax
movq 0x78(%rax), %rsi
addq $0x10, %rsi
leaq 0x158(%rsp), %rdi
callq 0x21456
leaq 0x100(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
leaq 0x158(%rsp), %rdx
callq 0x212e4
leaq 0xa0(%rsp), %rdi
leaq 0x100(%rsp), %rbx
movq %rbx, %rsi
callq 0x24bf4
movq %rbx, %rdi
callq 0x2150c
leaq 0x158(%rsp), %rdi
callq 0x2150c
movl $0xc0, %edi
callq 0x8440
movq %rax, %r14
leaq 0xa0(%rsp), %rsi
movq %rax, %rdi
callq 0x21f86
movq 0x8(%rsp), %rax
movq %r14, 0x70(%rax)
movq %r14, %rdi
callq 0x2328a
movq 0x8(%rsp), %rax
movq 0x70(%rax), %rdi
callq 0x233aa
movsd 0x40(%rsp), %xmm0
movsd %xmm0, (%r15)
cmpl $0x0, 0x60(%rbp)
jle 0x30003
leaq 0x7c8c(%rip), %rsi      # 0x3797e
movq 0x10(%rsp), %rdi
callq 0x8420
movq %rax, %rdi
movl 0x2b8(%rsp), %esi
callq 0x8740
leaq 0x7ca8(%rip), %rsi      # 0x379ba
movq %rax, %rdi
callq 0x8420
leaq 0x140(%rsp), %rsi
movq %rax, %rdi
callq 0x333fd
leaq 0x7ca1(%rip), %rsi      # 0x379d2
movq %rax, %rdi
callq 0x8420
movq %rax, %rbx
movsd 0x90(%rsp), %xmm0
mulsd 0x6483(%rip), %xmm0     # 0x361d0
divsd 0x42cb(%rip), %xmm0     # 0x34020
callq 0x81a0
movq %rbx, %rdi
callq 0x86b0
leaq 0x7c6b(%rip), %rsi      # 0x379d4
movq %rax, %rdi
callq 0x8420
movq %rax, %rdi
movq 0x58(%rsp), %rsi
callq 0x8740
leaq 0x7c5f(%rip), %rsi      # 0x379e4
movq %rax, %rdi
callq 0x8420
movq %rax, %rdi
movl 0x6c(%rsp), %esi
callq 0x8740
leaq 0x7dd1(%rip), %rsi      # 0x37b71
movq %rax, %rdi
callq 0x8420
movq %rax, %rdi
movl 0x70(%rsp), %esi
callq 0x8740
leaq 0x799f(%rip), %rsi      # 0x3775a
movq %rax, %rdi
callq 0x8420
movq %rax, %rdi
movl 0x74(%rsp), %esi
callq 0x8740
leaq 0x74b6(%rip), %rsi      # 0x3728c
movq %rax, %rdi
callq 0x8420
leaq 0x7a48(%rip), %rsi      # 0x3782d
movq 0x10(%rsp), %rdi
callq 0x8420
movq 0xa8(%rsp), %rsi
subq 0xa0(%rsp), %rsi
sarq $0x4, %rsi
movq %rax, %rdi
callq 0x8310
leaq 0x7a2c(%rip), %rsi      # 0x3783e
movq %rax, %rdi
callq 0x8420
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x2135d
movq %rbx, %rdi
callq 0x86b0
leaq 0x7a16(%rip), %rsi      # 0x3784f
movq %rax, %rdi
callq 0x8420
movsd 0x18(%rsp), %xmm0
addsd 0xc0(%rsp), %xmm0
movq %rax, %rdi
callq 0x86b0
leaq 0x742d(%rip), %rsi      # 0x3728c
movq %rax, %rdi
callq 0x8420
leaq 0x79f6(%rip), %rsi      # 0x37864
movq 0x10(%rsp), %rdi
callq 0x8420
movq %rax, %rbx
movq 0x8(%rsp), %rax
movq 0x70(%rax), %rdi
callq 0x22296
movq %rbx, %rdi
callq 0x86b0
leaq 0x7b60(%rip), %rsi      # 0x379f8
movq %rax, %rdi
callq 0x8420
movsd (%r15), %xmm0
movq %rax, %rdi
callq 0x86b0
leaq 0x73d8(%rip), %rsi      # 0x3728c
movq %rax, %rdi
callq 0x8420
leaq 0x7b3d(%rip), %rsi      # 0x37a00
movq 0x10(%rsp), %rdi
callq 0x8420
movq 0x60(%rsp), %rcx
movq 0x10(%rcx), %rsi
movq %rax, %rdi
callq 0x8310
leaq 0x73a7(%rip), %rsi      # 0x3728c
movq %rax, %rdi
callq 0x8420
pushq $0x1
popq %rbp
leaq 0x7b36(%rip), %r14      # 0x37a2d
leaq 0x7b35(%rip), %rbx      # 0x37a33
movq 0x60(%rsp), %r12
movq (%r12), %r12
cmpq 0x60(%rsp), %r12
je 0x30003
movq 0x10(%r12), %r13
cmpq $0x0, 0x78(%r13)
je 0x2ffd2
movq 0x10(%rsp), %rdi
leaq 0x7ae6(%rip), %rsi      # 0x37a14
callq 0x8420
movq %rax, %rdi
movl %ebp, %esi
callq 0x8740
movq %rax, %rdi
leaq 0x7ad7(%rip), %rsi      # 0x37a1e
callq 0x8420
movq 0x78(%r13), %rcx
movupd 0xb0(%rcx), %xmm0
movapd %xmm0, 0x100(%rsp)
movq %rax, %rdi
leaq 0x100(%rsp), %rsi
callq 0x333fd
movq %rax, %rdi
movq %r14, %rsi
callq 0x8420
movq %rax, %r15
movq 0x78(%r13), %rax
movsd 0xa8(%rax), %xmm0
mulsd 0x623d(%rip), %xmm0     # 0x361d0
divsd 0x4085(%rip), %xmm0     # 0x34020
callq 0x81a0
movq %r15, %rdi
callq 0x86b0
movq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x8420
movq %rax, %r15
movq 0x70(%r13), %rdi
callq 0x22296
movq %r15, %rdi
callq 0x86b0
leaq 0x72bc(%rip), %rsi      # 0x3728c
jmp 0x2fff4
movq 0x10(%rsp), %rdi
leaq 0x7a37(%rip), %rsi      # 0x37a15
callq 0x8420
movq %rax, %rdi
movl %ebp, %esi
callq 0x8740
leaq 0x7c33(%rip), %rsi      # 0x37c27
movq %rax, %rdi
callq 0x8420
incl %ebp
jmp 0x2ff03
movq 0x8(%rsp), %rbx
leaq 0x180(%rsp), %rdi
callq 0x2150c
leaq 0xa0(%rsp), %rdi
callq 0x2150c
movq %rbx, %rax
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0xc0, %esi
jmp 0x30054
movq %rax, %rbx
jmp 0x3013e
jmp 0x3014f
movq %rax, %rbx
pushq $0x38
popq %rsi
movq %r14, %rdi
callq 0x8450
jmp 0x30152
jmp 0x3014f
jmp 0x3014f
jmp 0x3014f
jmp 0x3014f
jmp 0x3014f
jmp 0x3014f
jmp 0x3014f
jmp 0x3014f
jmp 0x3014f
jmp 0x3014f
jmp 0x3014f
jmp 0x3014f
movq %rax, %rbx
jmp 0x300b4
jmp 0x30121
movq %rax, %rbx
leaq 0x230(%rsp), %rdi
callq 0x33458
leaq 0x200(%rsp), %rdi
callq 0x33458
jmp 0x30124
jmp 0x3014f
movq %rax, %rbx
leaq 0x100(%rsp), %rdi
jmp 0x30146
jmp 0x3014f
movq %rax, %rbx
leaq 0x248(%rsp), %rdi
callq 0x2150c
jmp 0x30124
movq %rax, %rbx
movl $0xc0, %esi
movq %r14, %rdi
callq 0x8450
jmp 0x30124
jmp 0x30121
movq %rax, %rbx
jmp 0x30131
jmp 0x3011c
jmp 0x30121
jmp 0x30121
movq %rax, %rbx
leaq 0x218(%rsp), %rdi
callq 0x33458
jmp 0x30152
jmp 0x30121
movq %rax, %rbx
jmp 0x3013e
movq %rax, %rbx
leaq 0x1c8(%rsp), %rdi
callq 0x33458
leaq 0x120(%rsp), %rdi
callq 0x33458
leaq 0x158(%rsp), %rdi
callq 0x2150c
jmp 0x30152
jmp 0x3014f
movq %rax, %rbx
leaq 0x180(%rsp), %rdi
callq 0x2150c
leaq 0xa0(%rsp), %rdi
callq 0x2150c
movq %rbx, %rdi
callq 0x8770