// File: /workspace/github_cpp_makefile_star2_O1/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, 0x24(%rsp)
movl %edx, %ebp
movl %esi, %r13d
movq %rdi, %rbx
leaq 0x20(%rdi), %rsi
leaq 0x30(%rsp), %rdi
callq 0x3c91c
leaq 0x80(%rsp), %rcx
movq %rcx, 0x8(%rcx)
movq %rcx, (%rcx)
xorl %eax, %eax
movq %rax, 0x10(%rcx)
leaq 0x48(%rsp), %r12
movq %r12, 0x8(%r12)
movq %r12, (%r12)
movq %rax, 0x10(%r12)
movabsq $0x54b249ad2594c37d, %rax # imm = 0x54B249AD2594C37D
movq %rax, 0x70(%rsp)
callq 0x72e0
movq %rax, 0x28(%rsp)
movq %rbx, (%rsp)
cmpl $0x0, 0x60(%rbx)
jle 0x35ce1
movq (%rsp), %rax
leaq 0x68(%rax), %rbx
leaq 0xa5f5(%rip), %rsi      # 0x40232
movl $0x6, %edx
movq %rbx, %rdi
callq 0x74d0
movq (%rsp), %rdx
movq 0x68(%rdx), %rax
movq -0x18(%rax), %rax
movl $0xfffffefb, %ecx       # imm = 0xFFFFFEFB
andl 0x80(%rdx,%rax), %ecx
orl $0x4, %ecx
movl %ecx, 0x80(%rdx,%rax)
movq 0x28(%rsp), %rax
subq 0x268(%rdx), %rax
cvtsi2sd %rax, %xmm0
mulsd 0x738b(%rip), %xmm0     # 0x3d010
divsd 0x951b(%rip), %xmm0     # 0x3f1a8
movq %rbx, %rdi
callq 0x7680
movq %rax, %rbx
leaq 0xa59a(%rip), %rsi      # 0x40239
movl $0x2f, %edx
movq %rax, %rdi
callq 0x74d0
movq %rbx, %rdi
movl %r13d, %esi
callq 0x7710
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x73f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7050
movq %rax, %rdi
callq 0x7300
movq 0x30(%rsp), %rbx
movq 0x10(%rbx), %r14
decq 0x40(%rsp)
movq %rbx, %rdi
callq 0x76a0
movl $0x18, %esi
movq %rbx, %rdi
callq 0x7440
movq (%rsp), %rax
cmpl $0x0, 0x60(%rax)
jle 0x35d5b
movq (%rsp), %rax
leaq 0x68(%rax), %rbx
leaq 0xa54c(%rip), %rsi      # 0x40269
movl $0x1f, %edx
movq %rbx, %rdi
callq 0x74d0
leaq 0x90(%r14), %r15
movq %r15, %rdi
callq 0x71d0
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x74d0
leaq 0xa53b(%rip), %rsi      # 0x40289
movl $0xe, %edx
movq %rbx, %rdi
callq 0x74d0
movq 0x68(%r14), %rsi
movsd 0x9481(%rip), %xmm0     # 0x3f1e8
movq (%rsp), %rdi
movl %ebp, %edx
callq 0x32c50
movq %rax, 0x78(%r14)
testq %rax, %rax
jne 0x35d96
movq 0x68(%r14), %rsi
movsd 0x9469(%rip), %xmm0     # 0x3f1f0
movq (%rsp), %rdi
movl %ebp, %edx
callq 0x32c50
movq %rax, 0x78(%r14)
movq 0x78(%r14), %rdi
testq %rdi, %rdi
je 0x362ce
callq 0x28f26
movq 0x78(%r14), %rdi
callq 0x297a6
movl $0x1, 0x80(%r14)
movq 0x78(%r14), %rdi
callq 0x26926
movsd %xmm0, 0x68(%rsp)
movq 0x78(%r14), %rdi
callq 0x2827e
movq %rax, %r15
movq %rax, 0x70(%r14)
movl $0x18, %edi
callq 0x7430
movq %r14, 0x10(%rax)
leaq 0x80(%rsp), %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x7080
incq 0x10(%rbx)
leaq 0x30(%rsp), %rax
cmpq %rax, 0x30(%rsp)
je 0x3633b
movq %r15, 0x78(%rsp)
movq (%rsp), %rax
addq $0x68, %rax
movq %rax, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
movl $0x1, %eax
movq %rax, 0x8(%rsp)
leaq 0xb0(%rsp), %r12
leaq 0x98(%rsp), %rbp
movq 0x28(%rsp), %r14
callq 0x72e0
movq %rax, 0x60(%rsp)
movq (%rsp), %rax
cmpl $0x0, 0x60(%rax)
jle 0x35f6b
movl $0x36, %edx
movq 0x18(%rsp), %rdi
leaq 0xac18(%rip), %rsi      # 0x40a8a
callq 0x74d0
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x7710
movq %rax, %rbx
movl $0x2, %edx
movq %rax, %rdi
leaq 0xa73d(%rip), %rsi      # 0x405d5
callq 0x74d0
movq 0x30(%rsp), %rax
movq 0x10(%rax), %r15
movl $0x90, %eax
addq %rax, %r15
movq %r15, %rdi
callq 0x71d0
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x74d0
movl $0x21, %edx
movq %rbx, %rdi
leaq 0xa481(%rip), %rsi      # 0x40354
callq 0x74d0
movl $0xd, %edx
movq 0x18(%rsp), %rdi
leaq 0xa4d5(%rip), %rsi      # 0x403be
callq 0x74d0
movq 0x60(%rsp), %rax
subq 0x28(%rsp), %rax
cvtsi2sd %rax, %xmm0
mulsd 0x710b(%rip), %xmm0     # 0x3d010
divsd 0x929b(%rip), %xmm0     # 0x3f1a8
movq 0x18(%rsp), %rdi
callq 0x7680
movl $0x15, %edx
movq 0x18(%rsp), %rdi
leaq 0xa44e(%rip), %rsi      # 0x40376
callq 0x74d0
movq 0x60(%rsp), %rax
subq %r14, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0x70cb(%rip), %xmm0     # 0x3d010
divsd 0x925b(%rip), %xmm0     # 0x3f1a8
movq 0x18(%rsp), %rdi
callq 0x7680
movl $0x3, %edx
movq %rax, %rdi
leaq 0x9818(%rip), %rsi      # 0x3f77e
callq 0x74d0
movq 0x30(%rsp), %r14
xorl %ebx, %ebx
leaq 0x30(%rsp), %rax
cmpq %rax, %r14
je 0x35fbb
testl %r13d, %r13d
jle 0x35fbb
xorl %ebx, %ebx
movl $0x18, %edi
callq 0x7430
movq 0x10(%r14), %rcx
movq %rcx, 0x10(%rax)
movq %rax, %rdi
leaq 0x48(%rsp), %rsi
callq 0x7080
incq 0x58(%rsp)
incl %ebx
movq (%r14), %r14
leaq 0x30(%rsp), %rax
cmpq %rax, %r14
je 0x35fbb
cmpl %r13d, %ebx
jl 0x35f83
cmpl %r13d, %ebx
cmovll %ebx, %r13d
movq %r12, %rdi
leaq 0x80(%rsp), %rsi
callq 0x3c91c
movq %rbp, %rdi
leaq 0x48(%rsp), %rsi
callq 0x3c91c
movq 0x8(%rsp), %r9
leal -0x1(%r9), %eax
movq (%rsp), %rdi
movq 0x78(%rsp), %rsi
movq %r12, %rdx
movq %rbp, %rcx
movsd 0x68(%rsp), %xmm0
leaq 0x70(%rsp), %r8
movsd 0x91d6(%rip), %xmm1     # 0x3f1e0
pushq %r13
pushq %rax
callq 0x36a58
addq $0x10, %rsp
movq %rax, %rbx
movq 0x98(%rsp), %rdi
cmpq %rbp, %rdi
je 0x3603b
movq (%rdi), %r14
movl $0x18, %esi
callq 0x7440
movq %r14, %rdi
cmpq %rbp, %r14
jne 0x36026
movq 0xb0(%rsp), %rdi
cmpq %r12, %rdi
je 0x3605d
movq (%rdi), %r14
movl $0x18, %esi
callq 0x7440
movq %r14, %rdi
cmpq %r12, %r14
jne 0x36048
testq %rbx, %rbx
je 0x360d6
movl $0x1, 0x80(%rbx)
movl $0x18, %edi
callq 0x7430
movq %rbx, 0x10(%rax)
movq %rax, %rdi
leaq 0x80(%rsp), %rsi
callq 0x7080
incq 0x90(%rsp)
movq 0x88(%rbx), %rdi
testq %rdi, %rdi
je 0x360a4
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x88(%rbx)
movq 0x68(%rbx), %rdi
callq 0x26926
movsd 0x68(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x68(%rsp)
movq 0x70(%rbx), %rax
movq %rax, 0x78(%rsp)
jmp 0x3615a
movl $0x18, %edx
movq 0x1befe(%rip), %rdi     # 0x51fe0
leaq 0xa2ac(%rip), %rsi      # 0x40395
callq 0x74d0
movq 0x1beeb(%rip), %rdi     # 0x51fe0
movq 0x8(%rsp), %rsi
callq 0x7710
movl $0x1, %edx
movq %rax, %rdi
leaq 0xa122(%rip), %rsi      # 0x40230
callq 0x74d0
incl 0x14(%rsp)
movq (%rsp), %rax
cmpl $0x0, 0x60(%rax)
jle 0x3615a
movl $0x21, %edx
movq 0x18(%rsp), %rdi
leaq 0xa25a(%rip), %rsi      # 0x4038c
callq 0x74d0
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x7710
movl $0xb, %edx
movq %rax, %rdi
leaq 0x9348(%rip), %rsi      # 0x3f49d
callq 0x74d0
cmpl $0x0, 0x24(%rsp)
je 0x36255
callq 0x72e0
movq %rax, %rbx
movl $0x17, %edx
movq 0x1be17(%rip), %rdi     # 0x51f90
leaq 0xa941(%rip), %rsi      # 0x40ac1
callq 0x74d0
movq 0x1be04(%rip), %rdi     # 0x51f90
movq 0x8(%rsp), %rsi
callq 0x7710
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
leaq 0x938e(%rip), %rsi      # 0x3f536
callq 0x74d0
movq 0x30(%rsp), %rax
movq 0x10(%rax), %r14
movl $0x90, %eax
addq %rax, %r14
movq %r14, %rdi
callq 0x71d0
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x74d0
movl $0x1, %edx
movq %r15, %rdi
leaq 0x7f15(%rip), %rsi      # 0x3e0f8
callq 0x74d0
movl $0xd, %edx
movq %r15, %rdi
leaq 0xa1b7(%rip), %rsi      # 0x403ae
callq 0x74d0
movq %r15, %rdi
movl 0x14(%rsp), %esi
callq 0x7710
movq %rax, %r15
movl $0xf, %edx
movq %rax, %rdi
leaq 0xa1a2(%rip), %rsi      # 0x403bc
callq 0x74d0
subq 0x60(%rsp), %rbx
cvtsi2sd %rbx, %xmm0
mulsd 0x6ddf(%rip), %xmm0     # 0x3d010
divsd 0x8f6f(%rip), %xmm0     # 0x3f1a8
movq %r15, %rdi
callq 0x7680
movl $0x1, %edx
movq %rax, %rdi
leaq 0x9fe0(%rip), %rsi      # 0x40230
callq 0x74d0
movq 0x30(%rsp), %rbx
decq 0x40(%rsp)
movq %rbx, %rdi
callq 0x76a0
movl $0x18, %esi
movq %rbx, %rdi
callq 0x7440
movq 0x48(%rsp), %rdi
leaq 0x48(%rsp), %r14
cmpq %r14, %rdi
je 0x36298
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x7440
movq %rbx, %rdi
cmpq %r14, %rbx
jne 0x36283
movq %r14, 0x50(%rsp)
movq %r14, 0x48(%rsp)
movq $0x0, 0x58(%rsp)
movq 0x8(%rsp), %rax
incl %eax
movq %rax, 0x8(%rsp)
movq 0x60(%rsp), %r14
leaq 0x30(%rsp), %rax
cmpq %rax, 0x30(%rsp)
jne 0x35e49
jmp 0x36343
movq 0x1bd0b(%rip), %rdi     # 0x51fe0
leaq 0xa01c(%rip), %rsi      # 0x402f8
movl $0x33, %edx
callq 0x74d0
movq (%rsp), %rax
cmpl $0x0, 0x60(%rax)
jle 0x36309
movq (%rsp), %rdi
addq $0x68, %rdi
leaq 0x9f99(%rip), %rsi      # 0x40298
movl $0x3e, %edx
callq 0x74d0
xorpd %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
cmpl $0x0, 0x24(%rsp)
je 0x368f8
movq 0x1bc6b(%rip), %rdi     # 0x51f90
leaq 0x9fab(%rip), %rsi      # 0x402d7
movl $0x54, %edx
callq 0x74d0
jmp 0x368f8
movl $0x0, 0x14(%rsp)
movq (%rsp), %rax
cmpl $0x0, 0x60(%rax)
leaq 0x48(%rsp), %r12
jle 0x365bb
movq (%rsp), %rax
leaq 0x68(%rax), %r15
leaq 0xa067(%rip), %rsi      # 0x403cc
movl $0x24, %edx
movq %r15, %rdi
callq 0x74d0
callq 0x72e0
subq 0x28(%rsp), %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd 0x8e1c(%rip), %xmm0     # 0x3f1a8
movq %r15, %rdi
callq 0x7680
leaq 0x92e8(%rip), %rsi      # 0x3f683
movl $0x2, %edx
movq %rax, %rdi
callq 0x74d0
leaq 0xa042(%rip), %rsi      # 0x403f1
movl $0xc, %edx
movq %r15, %rdi
callq 0x74d0
movq (%rsp), %rax
movq 0x278(%rax), %rsi
movq %r15, %rdi
callq 0x73d0
leaq 0x9e5a(%rip), %rsi      # 0x40230
movl $0x1, %edx
movq %rax, %rdi
callq 0x74d0
leaq 0xa014(%rip), %rsi      # 0x403fe
movl $0xf, %edx
movq %r15, %rdi
callq 0x74d0
movq (%rsp), %rax
movq 0x270(%rax), %rsi
movq %r15, %rdi
callq 0x73d0
leaq 0x9e1f(%rip), %rsi      # 0x40230
movl $0x1, %edx
movq %rax, %rdi
callq 0x74d0
leaq 0x9fe9(%rip), %rsi      # 0x4040e
movl $0xf, %edx
movq %r15, %rdi
callq 0x74d0
movq (%rsp), %rax
movq 0x288(%rax), %rsi
movq %r15, %rdi
callq 0x73d0
leaq 0x9de4(%rip), %rsi      # 0x40230
movl $0x1, %edx
movq %rax, %rdi
callq 0x74d0
leaq 0x9fbe(%rip), %rsi      # 0x4041e
movl $0x11, %edx
movq %r15, %rdi
callq 0x74d0
movq (%rsp), %rax
movq 0x290(%rax), %rsi
movq %r15, %rdi
callq 0x73d0
leaq 0x9da9(%rip), %rsi      # 0x40230
movl $0x1, %edx
movq %rax, %rdi
callq 0x74d0
leaq 0x9f95(%rip), %rsi      # 0x40430
movl $0x17, %edx
movq %r15, %rdi
callq 0x74d0
movq (%rsp), %rax
movq 0x298(%rax), %rsi
movq %r15, %rdi
callq 0x73d0
leaq 0x9d6e(%rip), %rsi      # 0x40230
movl $0x1, %edx
movq %rax, %rdi
callq 0x74d0
leaq 0x9f72(%rip), %rsi      # 0x40448
movl $0xe, %edx
movq %r15, %rdi
callq 0x74d0
movq (%rsp), %rax
movq 0x280(%rax), %rsi
movq %r15, %rdi
callq 0x73d0
leaq 0x9d33(%rip), %rsi      # 0x40230
movl $0x1, %edx
movq %rax, %rdi
callq 0x74d0
leaq 0x9f46(%rip), %rsi      # 0x40457
movl $0xa, %edx
movq %r15, %rdi
callq 0x74d0
movq (%rsp), %rax
movq 0x2a0(%rax), %rsi
movq %r15, %rdi
callq 0x73d0
leaq 0x9cf8(%rip), %rsi      # 0x40230
movl $0x1, %edx
movq %rax, %rdi
callq 0x74d0
leaq 0x9f16(%rip), %rsi      # 0x40462
movl $0xc, %edx
movq %r15, %rdi
callq 0x74d0
movq (%rsp), %rax
movq 0x2a8(%rax), %rsi
movq %r15, %rdi
callq 0x73d0
leaq 0x9cbd(%rip), %rsi      # 0x40230
movl $0x1, %edx
movq %rax, %rdi
callq 0x74d0
leaq 0x9ee8(%rip), %rsi      # 0x4046f
movl $0xc, %edx
movq %r15, %rdi
callq 0x74d0
movq (%rsp), %rax
movq 0x2b0(%rax), %rsi
movq %r15, %rdi
callq 0x73d0
leaq 0x9c82(%rip), %rsi      # 0x40230
movl $0x1, %edx
movq %rax, %rdi
callq 0x74d0
cmpl $0x0, 0x24(%rsp)
je 0x368ec
movq 0x1b9c3(%rip), %rdi     # 0x51f90
leaq 0x9ea8(%rip), %rsi      # 0x4047c
movl $0x1c, %edx
callq 0x74d0
movsd 0x70(%rsp), %xmm0
movq 0x1b9a5(%rip), %rdi     # 0x51f90
callq 0x7680
movq %rax, %rbx
leaq 0x9de8(%rip), %rsi      # 0x403e2
movl $0xe, %edx
movq %rax, %rdi
callq 0x74d0
callq 0x72e0
subq 0x28(%rsp), %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd 0x8b87(%rip), %xmm0     # 0x3f1a8
movq %rbx, %rdi
callq 0x7680
leaq 0x9c00(%rip), %rsi      # 0x40230
movl $0x1, %edx
movq %rax, %rdi
callq 0x74d0
movq 0x1b94c(%rip), %rdi     # 0x51f90
leaq 0x9e4e(%rip), %rsi      # 0x40499
movl $0x14, %edx
callq 0x74d0
movq 0x1b934(%rip), %rdi     # 0x51f90
leaq 0x9e4b(%rip), %rsi      # 0x404ae
movl $0xe, %edx
callq 0x74d0
movq (%rsp), %rax
movq 0x270(%rax), %rsi
movq 0x1b911(%rip), %rdi     # 0x51f90
callq 0x73d0
leaq 0x9ba5(%rip), %rsi      # 0x40230
movl $0x1, %edx
movq %rax, %rdi
callq 0x74d0
movq 0x1b8f1(%rip), %rdi     # 0x51f90
leaq 0x9e17(%rip), %rsi      # 0x404bd
movl $0xb, %edx
callq 0x74d0
movq (%rsp), %rax
movq 0x278(%rax), %rsi
movq 0x1b8ce(%rip), %rdi     # 0x51f90
callq 0x73d0
leaq 0x9b62(%rip), %rsi      # 0x40230
movl $0x1, %edx
movq %rax, %rdi
callq 0x74d0
movq 0x1b8ae(%rip), %rdi     # 0x51f90
leaq 0x9d5f(%rip), %rsi      # 0x40448
movl $0xe, %edx
callq 0x74d0
movq (%rsp), %rax
movq 0x280(%rax), %rsi
movq 0x1b88b(%rip), %rdi     # 0x51f90
callq 0x73d0
leaq 0x9b1f(%rip), %rsi      # 0x40230
movl $0x1, %edx
movq %rax, %rdi
callq 0x74d0
movq 0x1b86b(%rip), %rdi     # 0x51f90
leaq 0x9d9d(%rip), %rsi      # 0x404c9
movl $0xe, %edx
callq 0x74d0
movq (%rsp), %rax
movq 0x288(%rax), %rsi
movq 0x1b848(%rip), %rdi     # 0x51f90
callq 0x73d0
leaq 0x9adc(%rip), %rsi      # 0x40230
movl $0x1, %edx
movq %rax, %rdi
callq 0x74d0
movq 0x1b828(%rip), %rdi     # 0x51f90
leaq 0x9d69(%rip), %rsi      # 0x404d8
movl $0x10, %edx
callq 0x74d0
movq (%rsp), %rax
movq 0x290(%rax), %rsi
movq 0x1b805(%rip), %rdi     # 0x51f90
callq 0x73d0
leaq 0x9a99(%rip), %rsi      # 0x40230
movl $0x1, %edx
movq %rax, %rdi
callq 0x74d0
movq 0x1b7e5(%rip), %rdi     # 0x51f90
leaq 0x9d37(%rip), %rsi      # 0x404e9
movl $0x16, %edx
callq 0x74d0
movq (%rsp), %rax
movq 0x298(%rax), %rsi
movq 0x1b7c2(%rip), %rdi     # 0x51f90
callq 0x73d0
leaq 0x9a56(%rip), %rsi      # 0x40230
movl $0x1, %edx
movq %rax, %rdi
callq 0x74d0
movq 0x1b7a2(%rip), %rdi     # 0x51f90
leaq 0x9c62(%rip), %rsi      # 0x40457
movl $0xa, %edx
callq 0x74d0
movq (%rsp), %rax
movq 0x2a0(%rax), %rsi
movq 0x1b77f(%rip), %rdi     # 0x51f90
callq 0x73d0
leaq 0x9a13(%rip), %rsi      # 0x40230
movl $0x1, %edx
movq %rax, %rdi
callq 0x74d0
movq 0x1b75f(%rip), %rdi     # 0x51f90
leaq 0x9c2a(%rip), %rsi      # 0x40462
movl $0xc, %edx
callq 0x74d0
movq (%rsp), %rax
movq 0x2a8(%rax), %rsi
movq 0x1b73c(%rip), %rdi     # 0x51f90
callq 0x73d0
leaq 0x99d0(%rip), %rsi      # 0x40230
movl $0x1, %edx
movq %rax, %rdi
callq 0x74d0
movq 0x1b71c(%rip), %rdi     # 0x51f90
leaq 0x9bf4(%rip), %rsi      # 0x4046f
movl $0xc, %edx
callq 0x74d0
movq (%rsp), %rax
movq 0x2b0(%rax), %rsi
movq 0x1b6f9(%rip), %rbx     # 0x51f90
movq %rbx, %rdi
callq 0x73d0
leaq 0x998a(%rip), %rsi      # 0x40230
movl $0x1, %edx
movq %rax, %rdi
callq 0x74d0
movl 0x14(%rsp), %esi
testl %esi, %esi
je 0x368d8
movq 0x1b6ce(%rip), %rdi     # 0x51f90
callq 0x7710
movq %rax, %rbx
movl $0x25, %edx
leaq 0x9c57(%rip), %rsi      # 0x4052d
jmp 0x368e4
movl $0x2c, %edx
leaq 0x9c1c(%rip), %rsi      # 0x40500
movq %rbx, %rdi
callq 0x74d0
movsd 0x70(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x36917
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x7440
movq %rbx, %rdi
cmpq %r12, %rbx
jne 0x36902
movq 0x80(%rsp), %rdi
leaq 0x80(%rsp), %r14
cmpq %r14, %rdi
je 0x36941
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x7440
movq %rbx, %rdi
cmpq %r14, %rbx
jne 0x3692c
movq 0x30(%rsp), %rdi
leaq 0x30(%rsp), %r14
cmpq %r14, %rdi
je 0x36965
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x7440
movq %rbx, %rdi
cmpq %r14, %rbx
jne 0x36950
movsd 0x8(%rsp), %xmm0
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x369d1
jmp 0x369d1
jmp 0x369d1
movq %rax, %r15
jmp 0x369ad
movq %rax, %r15
movq 0x98(%rsp), %rdi
cmpq %rbp, %rdi
je 0x369ad
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x7440
movq %rbx, %rdi
cmpq %rbp, %rbx
jne 0x36998
movq 0xb0(%rsp), %rdi
cmpq %r12, %rdi
je 0x369dd
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x7440
movq %rbx, %rdi
cmpq %r12, %rbx
jne 0x369ba
jmp 0x369dd
movq %rax, %r15
jmp 0x369e2
jmp 0x369da
jmp 0x369da
movq %rax, %r15
leaq 0x48(%rsp), %r12
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x36a01
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x7440
movq %rbx, %rdi
cmpq %r12, %rbx
jne 0x369ec
movq 0x80(%rsp), %rdi
leaq 0x80(%rsp), %r14
cmpq %r14, %rdi
je 0x36a2b
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x7440
movq %rbx, %rdi
cmpq %r14, %rbx
jne 0x36a16
movq 0x30(%rsp), %rdi
leaq 0x30(%rsp), %r14
cmpq %r14, %rdi
je 0x36a4f
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x7440
movq %rbx, %rdi
cmpq %r14, %rbx
jne 0x36a3a
movq %r15, %rdi
callq 0x7730
nop