// File: /workspace/github_cpp_makefile_star2_O2/thierry7100[P]CutOptim/src/SvgDoc.cpp
// Function: SvgDoc::OptimizeFreeRot(int, int, int)
double SvgDoc::OptimizeFreeRot(int OptimizingLevel, int FirstPos, int Flag_file)
{
std::list<NSVGpath *> FloatingPaths = listPath;          //  All path are floating
std::list<NSVGpath *> FixedPath;
std::list<NSVGpath *> CurFloating;
Polygon *FixedPolyHull;
double BestCost = 1e100;
clock_t StartOptimize;
clock_t StartLevel;
clock_t LastLevel;
int NotPlaced = 0;

    LastLevel = StartOptimize = clock();
    if ( debug_level > 0 )
    {
        OutDebug << "Time: " << fixed <<  ((double) 1000.0*(StartOptimize - StartClock))/CLOCKS_PER_SEC << "ms Enter Optimize with Optimizing level set to " << OptimizingLevel << endl;
    }
    //  First remove largest polygon from floating list
    NSVGpath *First = FloatingPaths.front();
    FloatingPaths.pop_front();
    //  Place first polygon, specific algorithm
    if ( debug_level > 0 )
    {
        OutDebug << "-----   Placing first polygon (" << First->id << ") -----------\n";
    }
    //  In this mode (free rotation), try first with rotation angles of 90°
    First->PlacedPolygon = PlaceFirst(First->LargePolygon, FirstPos, M_PI/2.0);
    if ( First->PlacedPolygon == NULL )     //  If not OK, try with 9°
        First->PlacedPolygon = PlaceFirst(First->LargePolygon, FirstPos, M_PI/20.0);
    //  Check placement OK ! Should stay in the sheet.
    if ( First->PlacedPolygon == NULL )
    {
        cerr << "Unable to place first polygon, too large for sheet\n";
        if ( debug_level > 0 )
        {
            OutDebug << "Optimize : Unable to place first polygon, too large for sheet\n";
        }
        if ( Flag_file )
        {
            cout << "Unable to complete optimization, Unable to place first polygon, too large for sheet\n";
        }
        return 0;
    }
    //  Compute slopes of all edges of first polygon
    //  Should be done after polygon is placed because rotation change angles
    First->PlacedPolygon->ComputeAngles();
    First->PlacedPolygon->CalcSegments();
    First->isFixed = true;                                  //  OK Now !
    double FixedArea = First->PlacedPolygon->area();

    FixedPolyHull = First->LargeConvexHull = First->PlacedPolygon->ConvexHull();
    FixedPath.push_back(First);
    int idxPoly = 1;
    while ( !FloatingPaths.empty() )
    {
        StartLevel = clock();
        if ( debug_level > 0 )
        {
            OutDebug << "--------------------   Placing Polygon (Free rotation)" << idxPoly << ": " << FloatingPaths.front()->id << "  ------------------------------\n";
            OutDebug << "Elapsed time " << ((double)1000.0*(StartLevel - StartOptimize))/CLOCKS_PER_SEC;
            OutDebug << "ms, for last polygon " << ((double)1000.0*(StartLevel - LastLevel))/CLOCKS_PER_SEC << "ms\n";
        }
        LastLevel = StartLevel;
        //  Prepare a list with at most OptimizingLevel elements which is a copy of the OptimizingLevel first elements
        int index = 0;
        for (std::list<NSVGpath *>::iterator it=FloatingPaths.begin(); it != FloatingPaths.end() && index < OptimizingLevel; ++it, index++)
        {
            CurFloating.push_back(*it);         //  Put OptimizingLevel elements in working list
        }
        //  Limit optimizing level when number of ploygon is low
        if ( OptimizingLevel > index ) OptimizingLevel = index ;

        NSVGpath *NewFixed = OptimizeLevelFreeRot(FixedPolyHull, FixedPath, CurFloating, FixedArea, BestCost, 1e100, idxPoly, idxPoly-1, OptimizingLevel);
        if ( NewFixed != NULL )                 //  If NULL, couldn't be placed, continue with next one.
        {
            NewFixed->isFixed = true;
            FixedPath.push_back(NewFixed);    //    Put it in fixed list
            //  Could (and should) free cache memory for this one
            if ( NewFixed->CachePoly != NULL )
                delete NewFixed->CachePoly;
            NewFixed->CachePoly = NULL;
            FixedArea += NewFixed->LargePolygon->area();
            FixedPolyHull = NewFixed->LargeConvexHull;
        }
        else
        {
            NotPlaced++;                    //  COunt not placed elements
            cerr << "Unable to place polygon " << idxPoly << "\n";
            if ( debug_level > 0)
            {
                OutDebug << "######   Unable to place polygon " << idxPoly << ", aborting\n";
            }
        }

        if ( Flag_file )
        {
            StartLevel = clock();
            cout << "FreeRotOptim : Polygon " << idxPoly << "(" << FloatingPaths.front()->id << ")" << "  Not placed " << NotPlaced << "  Elapsed time " << ((double)1000.0*(StartLevel - LastLevel))/CLOCKS_PER_SEC << "\n";
#if CHECK_MEM > 0
            cout << " mem Poly_empty=" << nbEmptyPoly << "/" << nbCreatedEmptyPoly <<  " mem Poly_Vector=" << nbVectorPoly << "/" << nbCreatedVectorPoly;
            cout <<  " Rot_Poly=" << nbRotatedPoly << "/" << nbCreatedRotatedPoly;
            cout <<  " Trans_Poly=" << nbTranslatedPoly << "/" << nbCreatedTranslatedPoly;
//            cout <<  " Transformed_Poly=" << nbTransformedPoly << "/" << nbCreatedTransformedPoly;
            cout <<  " Cached_Poly=" << nbCachedPoly << "/" << nbCreatedCachedPoly;
            cout << "\n";
#endif
        }
        FloatingPaths.pop_front();          //  Remove first in list
        CurFloating.clear();                //  Erase list before creating new one
        idxPoly++;
    }
    if ( debug_level > 0 )
    {
        OutDebug << "Optimization finished, elapsed time " << ((double) (clock() - StartOptimize)) / CLOCKS_PER_SEC << "s\n";
        OutDebug << "nbRotation: " << nbRotation << "\n";
        OutDebug << "nbTranslation: " << nbTranslation << "\n";
        OutDebug << "nbPointInPoly: " << nbPointInPoly << "\n";
        OutDebug << "nbIntersectPoly: " << nbIntersectPoly << "\n";
        OutDebug << "nbPlacementImpossible: " << nbPlacementImpossible << "\n";
        OutDebug << "nbCheckAngles=" << nbCheckAngles << "\n";
        OutDebug << "CacheMiss=" << CacheMiss << "\n";
        OutDebug << "CacheHit OK=" << CacheHit_OK<< "\n";
        OutDebug << "CacheHit KO=" << CacheHit_KO<< "\n";
    }
    if ( Flag_file )
    {
        cout << "Optimization finished, cost " << BestCost << " elapsed time " << ((double) (clock() - StartOptimize)) / CLOCKS_PER_SEC << "\n";
        cout << "Performance stats :\n";
        cout << "nbTranslation=" << nbTranslation << "\n";
        cout << "nbRotation=" << nbRotation << "\n";
        cout << "nbCheckAngles=" << nbCheckAngles << "\n";
        cout << "nbPointInPoly=" << nbPointInPoly << "\n";
        cout << "nbIntersectPoly=" << nbIntersectPoly << "\n";
        cout << "nbPlacementImpossible=" << nbPlacementImpossible << "\n";
        cout << "CacheMiss=" << CacheMiss << "\n";
        cout << "CacheHit OK=" << CacheHit_OK<< "\n";
        cout << "CacheHit KO=" << CacheHit_KO<< "\n";
        if ( NotPlaced == 0 )
        {
            cout << "All elements have been successfully placed \n";
        }
        else
        {
            cout << NotPlaced << " elements couldn't have been placed \n";
        }
    }
    return BestCost;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movl %ecx, 0x10(%rsp)
movl %edx, %ebx
movl %esi, %r13d
movq %rdi, %r14
leaq 0x20(%rdi), %rsi
leaq 0x48(%rsp), %rdi
callq 0x333a4
leaq 0x68(%rsp), %rax
movq %rax, 0x8(%rax)
movq %rax, (%rax)
andq $0x0, 0x10(%rax)
leaq 0x80(%rsp), %rax
movq %rax, 0x8(%rax)
movq %rax, (%rax)
andq $0x0, 0x10(%rax)
movabsq $0x54b249ad2594c37d, %rax # imm = 0x54B249AD2594C37D
movq %rax, 0x40(%rsp)
callq 0x8300
movq %rax, 0x18(%rsp)
cmpl $0x0, 0x60(%r14)
jle 0x2ddee
leaq 0x68(%r14), %rdi
leaq 0x9507(%rip), %rsi      # 0x3728e
callq 0x8420
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl $0xfffffefb, %edx       # imm = 0xFFFFFEFB
andl 0x18(%rax,%rcx), %edx
orl $0x4, %edx
movl %edx, 0x18(%rax,%rcx)
movq 0x18(%rsp), %rcx
subq 0x268(%r14), %rcx
cvtsi2sd %rcx, %xmm0
mulsd 0x6254(%rip), %xmm0     # 0x34010
divsd 0x8444(%rip), %xmm0     # 0x36208
movq %rax, %rdi
callq 0x86b0
leaq 0x94c2(%rip), %rsi      # 0x37295
movq %rax, %rdi
callq 0x8420
movq %rax, %rdi
movl %r13d, %esi
callq 0x8740
movq %rax, %rdi
callq 0x8200
leaq 0x48(%rsp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
movq %rax, 0x8(%rsp)
callq 0x333de
cmpl $0x0, 0x60(%r14)
jle 0x2de3c
leaq 0x68(%r14), %rdi
leaq 0x94af(%rip), %rsi      # 0x372c5
callq 0x8420
movl $0x90, %esi
addq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x8420
leaq 0x94b1(%rip), %rsi      # 0x372e5
movq %rax, %rdi
callq 0x8420
movq 0x8(%rsp), %rax
movq 0x68(%rax), %rsi
movsd 0x83f3(%rip), %xmm0     # 0x36240
movq %r14, %rdi
movl %ebx, %edx
callq 0x2b72c
movq 0x8(%rsp), %rcx
movq %rax, 0x78(%rcx)
testq %rax, %rax
jne 0x2de8d
movq 0x68(%rcx), %rsi
movsd 0x83d7(%rip), %xmm0     # 0x36248
movq %r14, %rdi
movl %ebx, %edx
callq 0x2b72c
movq 0x8(%rsp), %rcx
movq %rax, 0x78(%rcx)
testq %rax, %rax
je 0x2e71f
movq %rax, %rdi
callq 0x23c0c
movq 0x8(%rsp), %rax
movq 0x78(%rax), %rdi
callq 0x2404a
movq 0x8(%rsp), %rax
movl $0x1, 0x80(%rax)
movq 0x78(%rax), %rdi
callq 0x22296
movsd %xmm0, 0x38(%rsp)
movq 0x8(%rsp), %rax
movq 0x78(%rax), %rdi
callq 0x23318
movq %rax, %rbx
leaq 0x8(%rsp), %rsi
movq (%rsi), %rax
movq %rbx, 0x70(%rax)
leaq 0x68(%rsp), %rdi
callq 0x3314c
movq %rbx, 0x60(%rsp)
movq %r14, %rbx
leaq 0x68(%r14), %rax
movq %rax, 0x30(%rsp)
pushq $0x1
popq %rax
movq %rax, (%rsp)
xorl %r15d, %r15d
leaq 0x80(%rsp), %rbp
movq 0x18(%rsp), %r12
leaq 0x48(%rsp), %r14
cmpq %r14, 0x48(%rsp)
je 0x2e283
callq 0x8300
movq %rax, 0x20(%rsp)
cmpl $0x0, 0x60(%rbx)
movl %r15d, %r14d
movq 0x30(%rsp), %r15
jle 0x2e007
movq %r15, %rdi
leaq 0x9ba0(%rip), %rsi      # 0x37ae6
callq 0x8420
movq %rax, %rdi
movq (%rsp), %rsi
callq 0x8740
movq %rax, %rdi
leaq 0x96d0(%rip), %rsi      # 0x37631
callq 0x8420
movq 0x48(%rsp), %rcx
movq 0x10(%rcx), %rsi
movl $0x90, %ecx
addq %rcx, %rsi
movq %rax, %rdi
callq 0x8420
movq %rax, %rdi
leaq 0x9427(%rip), %rsi      # 0x373b0
callq 0x8420
movq %r15, %rdi
leaq 0x9482(%rip), %rsi      # 0x3741a
callq 0x8420
movq 0x20(%rsp), %rcx
subq 0x18(%rsp), %rcx
cvtsi2sd %rcx, %xmm0
mulsd 0x605c(%rip), %xmm0     # 0x34010
divsd 0x824c(%rip), %xmm0     # 0x36208
movq %rax, %rdi
callq 0x86b0
movq %r15, %rdi
leaq 0x9404(%rip), %rsi      # 0x373d2
callq 0x8420
movq 0x20(%rsp), %rcx
subq %r12, %rcx
cvtsi2sd %rcx, %xmm0
mulsd 0x6028(%rip), %xmm0     # 0x34010
divsd 0x8218(%rip), %xmm0     # 0x36208
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
leaq 0x87d8(%rip), %rsi      # 0x367da
callq 0x8420
movl %r14d, %r12d
movq %rbx, %r14
xorl %ebx, %ebx
leaq 0x48(%rsp), %r15
movq (%r15), %r15
leaq 0x48(%rsp), %rax
cmpq %rax, %r15
je 0x2e036
cmpl %r13d, %ebx
jge 0x2e036
leaq 0x10(%r15), %rsi
movq %rbp, %rdi
callq 0x3314c
incl %ebx
jmp 0x2e014
cmpl %r13d, %ebx
cmovll %ebx, %r13d
leaq 0x98(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x333a4
movl %r12d, 0x14(%rsp)
leaq 0xb0(%rsp), %r15
movq %r15, %rdi
movq %rbp, %rsi
callq 0x333a4
movq (%rsp), %r9
leal -0x1(%r9), %eax
movq %r14, %r12
movq %r14, %rdi
movq 0x60(%rsp), %rsi
leaq 0x98(%rsp), %r14
movq %r14, %rdx
movq %r15, %rcx
movsd 0x38(%rsp), %xmm0
leaq 0x40(%rsp), %r8
movsd 0x819d(%rip), %xmm1     # 0x36238
pushq %r13
pushq %rax
callq 0x2e7d0
popq %rcx
popq %rdx
movq %rax, %rbx
movq %r15, %rdi
callq 0x33458
movq %r14, %rdi
callq 0x33458
movq %rbx, 0x28(%rsp)
testq %rbx, %rbx
je 0x2e128
movl $0x1, 0x80(%rbx)
leaq 0x68(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x3314c
movq 0x28(%rsp), %rax
movq 0x88(%rax), %rdi
testq %rdi, %rdi
je 0x2e0f7
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x28(%rsp), %rax
andq $0x0, 0x88(%rax)
movq 0x68(%rax), %rdi
callq 0x22296
movsd 0x38(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x38(%rsp)
movq 0x28(%rsp), %rax
movq 0x70(%rax), %rax
movq %rax, 0x60(%rsp)
jmp 0x2e18e
movq 0x1eeb9(%rip), %rdi     # 0x4cfe8
leaq 0x92bb(%rip), %rsi      # 0x373f1
callq 0x8420
movq %rax, %rdi
movq (%rsp), %rsi
callq 0x8740
movq %rax, %rdi
leaq 0x913b(%rip), %rsi      # 0x3728c
callq 0x8420
incl 0x14(%rsp)
cmpl $0x0, 0x60(%r12)
jle 0x2e18e
movq 0x30(%rsp), %rdi
leaq 0x927a(%rip), %rsi      # 0x373e8
callq 0x8420
movq %rax, %rdi
movq (%rsp), %rsi
callq 0x8740
movq %rax, %rdi
leaq 0x8370(%rip), %rsi      # 0x364f9
callq 0x8420
cmpl $0x0, 0x10(%rsp)
je 0x2e252
callq 0x8300
movq %rax, %rbx
movq 0x1edf0(%rip), %rdi     # 0x4cf98
leaq 0x996e(%rip), %rsi      # 0x37b1d
callq 0x8420
movq %rax, %rdi
movq (%rsp), %rsi
callq 0x8740
movq %rax, %rdi
leaq 0x83c8(%rip), %rsi      # 0x36592
callq 0x8420
movq 0x48(%rsp), %rcx
movq 0x10(%rcx), %rsi
movl $0x90, %ecx
addq %rcx, %rsi
movq %rax, %rdi
callq 0x8420
movq %rax, %rdi
leaq 0x6f06(%rip), %rsi      # 0x350f8
callq 0x8420
movq %rax, %rdi
leaq 0x9209(%rip), %rsi      # 0x3740a
callq 0x8420
movq %rax, %rdi
movl 0x14(%rsp), %esi
callq 0x8740
movq %rax, %rdi
leaq 0x91fc(%rip), %rsi      # 0x37418
callq 0x8420
subq 0x20(%rsp), %rbx
cvtsi2sd %rbx, %xmm0
mulsd 0x5ddd(%rip), %xmm0     # 0x34010
divsd 0x7fcd(%rip), %xmm0     # 0x36208
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
leaq 0x903f(%rip), %rsi      # 0x3728c
callq 0x8420
movq %r12, %rbx
movl 0x14(%rsp), %r15d
leaq 0x48(%rsp), %r14
movq %r14, %rdi
callq 0x333de
movq %rbp, %rdi
callq 0x333e6
movq (%rsp), %rax
incl %eax
movq %rax, (%rsp)
movq 0x20(%rsp), %r12
jmp 0x2df15
cmpl $0x0, 0x60(%rbx)
movl %r15d, %ebp
movq %rbx, %r14
movq 0x30(%rsp), %r15
jle 0x2e46d
leaq 0x9189(%rip), %rsi      # 0x37428
movq %r15, %rdi
callq 0x8420
movq %rax, %rbx
callq 0x8300
subq 0x18(%rsp), %rax
cvtsi2sd %rax, %xmm0
divsd 0x7f47(%rip), %xmm0     # 0x36208
movq %rbx, %rdi
callq 0x86b0
leaq 0x840f(%rip), %rsi      # 0x366df
movq %rax, %rdi
callq 0x8420
leaq 0x916e(%rip), %rsi      # 0x3744d
movq %r15, %rdi
callq 0x8420
movq 0x278(%r14), %rsi
movq %rax, %rdi
callq 0x83f0
leaq 0x8f8f(%rip), %rsi      # 0x3728c
movq %rax, %rdi
callq 0x8420
leaq 0x914e(%rip), %rsi      # 0x3745a
movq %r15, %rdi
callq 0x8420
movq 0x270(%r14), %rsi
movq %rax, %rdi
callq 0x83f0
leaq 0x8f62(%rip), %rsi      # 0x3728c
movq %rax, %rdi
callq 0x8420
leaq 0x9131(%rip), %rsi      # 0x3746a
movq %r15, %rdi
callq 0x8420
movq 0x288(%r14), %rsi
movq %rax, %rdi
callq 0x83f0
leaq 0x8f35(%rip), %rsi      # 0x3728c
movq %rax, %rdi
callq 0x8420
leaq 0x9114(%rip), %rsi      # 0x3747a
movq %r15, %rdi
callq 0x8420
movq 0x290(%r14), %rsi
movq %rax, %rdi
callq 0x83f0
leaq 0x8f08(%rip), %rsi      # 0x3728c
movq %rax, %rdi
callq 0x8420
leaq 0x90f9(%rip), %rsi      # 0x3748c
movq %r15, %rdi
callq 0x8420
movq 0x298(%r14), %rsi
movq %rax, %rdi
callq 0x83f0
leaq 0x8edb(%rip), %rsi      # 0x3728c
movq %rax, %rdi
callq 0x8420
leaq 0x90e4(%rip), %rsi      # 0x374a4
movq %r15, %rdi
callq 0x8420
movq 0x280(%r14), %rsi
movq %rax, %rdi
callq 0x83f0
leaq 0x8eae(%rip), %rsi      # 0x3728c
movq %rax, %rdi
callq 0x8420
leaq 0x90c6(%rip), %rsi      # 0x374b3
movq %r15, %rdi
callq 0x8420
movq 0x2a0(%r14), %rsi
movq %rax, %rdi
callq 0x83f0
leaq 0x8e81(%rip), %rsi      # 0x3728c
movq %rax, %rdi
callq 0x8420
leaq 0x90a4(%rip), %rsi      # 0x374be
movq %r15, %rdi
callq 0x8420
movq 0x2a8(%r14), %rsi
movq %rax, %rdi
callq 0x83f0
leaq 0x8e54(%rip), %rsi      # 0x3728c
movq %rax, %rdi
callq 0x8420
leaq 0x9084(%rip), %rsi      # 0x374cb
movq %r15, %rdi
callq 0x8420
movq 0x2b0(%r14), %rsi
movq %rax, %rdi
callq 0x83f0
leaq 0x8e27(%rip), %rsi      # 0x3728c
movq %rax, %rdi
callq 0x8420
cmpl $0x0, 0x10(%rsp)
je 0x2e6cb
movq 0x1eb19(%rip), %rdi     # 0x4cf98
leaq 0x9052(%rip), %rsi      # 0x374d8
callq 0x8420
movsd 0x40(%rsp), %xmm0
movq %rax, %rdi
movsd %xmm0, (%rsp)
callq 0x86b0
leaq 0x8f99(%rip), %rsi      # 0x3743e
movq %rax, %rdi
callq 0x8420
movq %rax, %rbx
callq 0x8300
subq 0x18(%rsp), %rax
cvtsi2sd %rax, %xmm0
divsd 0x7d41(%rip), %xmm0     # 0x36208
movq %rbx, %rdi
callq 0x86b0
leaq 0x8db6(%rip), %rsi      # 0x3728c
movq %rax, %rdi
callq 0x8420
movq 0x1eab3(%rip), %rdi     # 0x4cf98
leaq 0x9009(%rip), %rsi      # 0x374f5
callq 0x8420
movq 0x1eaa0(%rip), %rdi     # 0x4cf98
leaq 0x900b(%rip), %rsi      # 0x3750a
callq 0x8420
movq 0x270(%r14), %rsi
movq %rax, %rdi
callq 0x83f0
leaq 0x8d72(%rip), %rsi      # 0x3728c
movq %rax, %rdi
callq 0x8420
movq 0x1ea6f(%rip), %rdi     # 0x4cf98
leaq 0x8fe9(%rip), %rsi      # 0x37519
callq 0x8420
movq 0x278(%r14), %rsi
movq %rax, %rdi
callq 0x83f0
leaq 0x8d41(%rip), %rsi      # 0x3728c
movq %rax, %rdi
callq 0x8420
movq 0x1ea3e(%rip), %rdi     # 0x4cf98
leaq 0x8f43(%rip), %rsi      # 0x374a4
callq 0x8420
movq 0x280(%r14), %rsi
movq %rax, %rdi
callq 0x83f0
leaq 0x8d10(%rip), %rsi      # 0x3728c
movq %rax, %rdi
callq 0x8420
movq 0x1ea0d(%rip), %rdi     # 0x4cf98
leaq 0x8f93(%rip), %rsi      # 0x37525
callq 0x8420
movq 0x288(%r14), %rsi
movq %rax, %rdi
callq 0x83f0
leaq 0x8cdf(%rip), %rsi      # 0x3728c
movq %rax, %rdi
callq 0x8420
movq 0x1e9dc(%rip), %rdi     # 0x4cf98
leaq 0x8f71(%rip), %rsi      # 0x37534
callq 0x8420
movq 0x290(%r14), %rsi
movq %rax, %rdi
callq 0x83f0
leaq 0x8cae(%rip), %rsi      # 0x3728c
movq %rax, %rdi
callq 0x8420
movq 0x1e9ab(%rip), %rdi     # 0x4cf98
leaq 0x8f51(%rip), %rsi      # 0x37545
callq 0x8420
movq 0x298(%r14), %rsi
movq %rax, %rdi
callq 0x83f0
leaq 0x8c7d(%rip), %rsi      # 0x3728c
movq %rax, %rdi
callq 0x8420
movq 0x1e97a(%rip), %rdi     # 0x4cf98
leaq 0x8e8e(%rip), %rsi      # 0x374b3
callq 0x8420
movq 0x2a0(%r14), %rsi
movq %rax, %rdi
callq 0x83f0
leaq 0x8c4c(%rip), %rsi      # 0x3728c
movq %rax, %rdi
callq 0x8420
movq 0x1e949(%rip), %rdi     # 0x4cf98
leaq 0x8e68(%rip), %rsi      # 0x374be
callq 0x8420
movq 0x2a8(%r14), %rsi
movq %rax, %rdi
callq 0x83f0
leaq 0x8c1b(%rip), %rsi      # 0x3728c
movq %rax, %rdi
callq 0x8420
movq 0x1e918(%rip), %rbx     # 0x4cf98
leaq 0x8e44(%rip), %rsi      # 0x374cb
movq %rbx, %rdi
callq 0x8420
movq 0x2b0(%r14), %rsi
movq %rax, %rdi
callq 0x83f0
leaq 0x8be7(%rip), %rsi      # 0x3728c
movq %rax, %rdi
callq 0x8420
testl %ebp, %ebp
je 0x2e6d8
movq 0x1e8e0(%rip), %rdi     # 0x4cf98
movl %ebp, %esi
callq 0x8740
movq %rax, %rbx
leaq 0x8ec0(%rip), %rsi      # 0x37589
jmp 0x2e6df
movsd 0x40(%rsp), %xmm0
movsd %xmm0, (%rsp)
jmp 0x2e6e7
leaq 0x8e7d(%rip), %rsi      # 0x3755c
movq %rbx, %rdi
callq 0x8420
leaq 0x80(%rsp), %rdi
callq 0x33458
leaq 0x68(%rsp), %rdi
callq 0x33458
leaq 0x48(%rsp), %rdi
callq 0x33458
movsd (%rsp), %xmm0
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x1e8c2(%rip), %rdi     # 0x4cfe8
leaq 0x8c27(%rip), %rsi      # 0x37354
callq 0x8420
cmpl $0x0, 0x60(%r14)
jle 0x2e74c
addq $0x68, %r14
leaq 0x8bb0(%rip), %rsi      # 0x372f4
movq %r14, %rdi
callq 0x8420
xorpd %xmm0, %xmm0
movsd %xmm0, (%rsp)
cmpl $0x0, 0x10(%rsp)
je 0x2e6e7
movq 0x1e835(%rip), %rdi     # 0x4cf98
leaq 0x8bc9(%rip), %rsi      # 0x37333
callq 0x8420
jmp 0x2e6e7
jmp 0x2e7a4
jmp 0x2e7a4
jmp 0x2e7a4
movq %rax, %rbx
jmp 0x2e78f
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0x33458
leaq 0x98(%rsp), %rdi
callq 0x33458
jmp 0x2e7a7
jmp 0x2e7a4
jmp 0x2e7a4
jmp 0x2e7a4
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x33458
leaq 0x68(%rsp), %rdi
callq 0x33458
leaq 0x48(%rsp), %rdi
callq 0x33458
movq %rbx, %rdi
callq 0x8770