// File: /workspace/github_cpp_makefile_star2_O3/thierry7100[P]CutOptim/src/SvgDoc.cpp
// Function: SvgDoc::Optimize(double, int, int, int)
double SvgDoc::Optimize(double StepAngle, 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;
int num_rot = int((2*M_PI-0.001) / StepAngle) + 1;

    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";
    }
    First->PlacedPolygon = PlaceFirst(First->LargePolygon, FirstPos, StepAngle);
    //  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 " << 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 = OptimizeLevel(FixedPolyHull, FixedPath, CurFloating, num_rot, StepAngle, 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";
            }
        }

        FloatingPaths.pop_front();          //  Remove first in list
        CurFloating.clear();                //  Erase list before creating new one
        idxPoly++;
        if ( Flag_file )
        {
            StartLevel = clock();
            cout << "Polygon " << idxPoly << "  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
        }
    }
    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 $0xd8, %rsp
movl %ecx, 0x24(%rsp)
movl %edx, %ebp
movl %esi, %r13d
movsd %xmm0, 0x68(%rsp)
movq %rdi, %rbx
leaq 0x20(%rdi), %rsi
leaq 0x30(%rsp), %r12
movq %r12, %rdi
callq 0x3b844
leaq 0x90(%rsp), %rcx
movq %rcx, 0x8(%rcx)
movq %rcx, (%rcx)
xorl %eax, %eax
movq %rax, 0x10(%rcx)
leaq 0x50(%rsp), %rcx
movq %rcx, 0x8(%rcx)
movq %rcx, (%rcx)
movq %rax, 0x10(%rcx)
movabsq $0x54b249ad2594c37d, %rax # imm = 0x54B249AD2594C37D
movq %rax, 0x78(%rsp)
callq 0x72f0
movq %rax, 0x28(%rsp)
movq %rbx, (%rsp)
cmpl $0x0, 0x60(%rbx)
jle 0x31289
movq (%rsp), %rax
leaq 0x68(%rax), %rbx
leaq 0xe0e9(%rip), %rsi      # 0x3f2ce
movl $0x6, %edx
movq %rbx, %rdi
callq 0x74e0
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 0xade3(%rip), %xmm0     # 0x3c010
divsd 0xd013(%rip), %xmm0     # 0x3e248
movq %rbx, %rdi
callq 0x7690
movq %rax, %rbx
leaq 0xe08e(%rip), %rsi      # 0x3f2d5
movl $0x2f, %edx
movq %rax, %rdi
callq 0x74e0
movq %rbx, %rdi
movl %r13d, %esi
callq 0x7720
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x7400
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7050
movq %rax, %rdi
callq 0x7310
movq 0x30(%rsp), %rbx
movq 0x10(%rbx), %r14
decq 0x40(%rsp)
movq %rbx, %rdi
callq 0x76b0
movl $0x18, %esi
movq %rbx, %rdi
callq 0x7450
movq (%rsp), %rax
cmpl $0x0, 0x60(%rax)
jle 0x31303
movq (%rsp), %rax
leaq 0x68(%rax), %rbx
leaq 0xe040(%rip), %rsi      # 0x3f305
movl $0x1f, %edx
movq %rbx, %rdi
callq 0x74e0
leaq 0x90(%r14), %r15
movq %r15, %rdi
callq 0x71d0
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x74e0
leaq 0xe02f(%rip), %rsi      # 0x3f325
movl $0xe, %edx
movq %rbx, %rdi
callq 0x74e0
movq 0x68(%r14), %rsi
movq (%rsp), %rdi
movl %ebp, %edx
movsd 0x68(%rsp), %xmm0
callq 0x31fcc
movq %rax, 0x78(%r14)
testq %rax, %rax
je 0x3183b
movq %rax, %rdi
callq 0x2870c
movq 0x78(%r14), %rdi
callq 0x28f40
movl $0x1, 0x80(%r14)
movq 0x78(%r14), %rdi
callq 0x266bc
movsd %xmm0, 0x70(%rsp)
movq 0x78(%r14), %rdi
callq 0x27c4e
movq %rax, %r15
movq %rax, 0x70(%r14)
movl $0x18, %edi
callq 0x7440
movq %r14, 0x10(%rax)
leaq 0x90(%rsp), %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x7080
incq 0x10(%rbx)
cmpq %r12, 0x30(%rsp)
je 0x318a8
movq %r15, 0x88(%rsp)
movsd 0xced0(%rip), %xmm0     # 0x3e270
divsd 0x68(%rsp), %xmm0
cvttsd2si %xmm0, %eax
incl %eax
movl %eax, 0x84(%rsp)
movq (%rsp), %rax
addq $0x68, %rax
movq %rax, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
movl $0x1, %eax
movq %rax, 0x8(%rsp)
leaq 0xc0(%rsp), %r12
leaq 0xa8(%rsp), %rbp
movq 0x28(%rsp), %r14
callq 0x72f0
movq %rax, 0x48(%rsp)
movq (%rsp), %rax
cmpl $0x0, 0x60(%rax)
jle 0x31509
movl $0x27, %edx
movq 0x18(%rsp), %rdi
leaq 0xdfb8(%rip), %rsi      # 0x3f3c8
callq 0x74e0
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x7720
movq %rax, %rbx
movl $0x2, %edx
movq %rax, %rdi
leaq 0xe23b(%rip), %rsi      # 0x3f671
callq 0x74e0
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 0x74e0
movl $0x21, %edx
movq %rbx, %rdi
leaq 0xdf7f(%rip), %rsi      # 0x3f3f0
callq 0x74e0
movl $0xd, %edx
movq 0x18(%rsp), %rdi
leaq 0xdfd3(%rip), %rsi      # 0x3f45a
callq 0x74e0
movq 0x48(%rsp), %rax
subq 0x28(%rsp), %rax
cvtsi2sd %rax, %xmm0
mulsd 0xab6d(%rip), %xmm0     # 0x3c010
divsd 0xcd9d(%rip), %xmm0     # 0x3e248
movq 0x18(%rsp), %rdi
callq 0x7690
movl $0x15, %edx
movq 0x18(%rsp), %rdi
leaq 0xdf4c(%rip), %rsi      # 0x3f412
callq 0x74e0
movq 0x48(%rsp), %rax
subq %r14, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0xab2d(%rip), %xmm0     # 0x3c010
divsd 0xcd5d(%rip), %xmm0     # 0x3e248
movq 0x18(%rsp), %rdi
callq 0x7690
movl $0x3, %edx
movq %rax, %rdi
leaq 0xd316(%rip), %rsi      # 0x3e81a
callq 0x74e0
movq 0x30(%rsp), %r14
xorl %ebx, %ebx
leaq 0x30(%rsp), %rax
cmpq %rax, %r14
je 0x31559
testl %r13d, %r13d
jle 0x31559
xorl %ebx, %ebx
movl $0x18, %edi
callq 0x7440
movq 0x10(%r14), %rcx
movq %rcx, 0x10(%rax)
movq %rax, %rdi
leaq 0x50(%rsp), %rsi
callq 0x7080
incq 0x60(%rsp)
incl %ebx
movq (%r14), %r14
leaq 0x30(%rsp), %rax
cmpq %rax, %r14
je 0x31559
cmpl %r13d, %ebx
jl 0x31521
cmpl %r13d, %ebx
cmovll %ebx, %r13d
movq %r12, %rdi
leaq 0x90(%rsp), %rsi
callq 0x3b844
movq %rbp, %rdi
leaq 0x50(%rsp), %rsi
callq 0x3b844
movq 0x8(%rsp), %r10
leal -0x1(%r10), %eax
subq $0x8, %rsp
movq 0x8(%rsp), %rdi
movq 0x90(%rsp), %rsi
movq %r12, %rdx
movq %rbp, %rcx
movl 0x8c(%rsp), %r8d
movsd 0x70(%rsp), %xmm0
movsd 0x78(%rsp), %xmm1
leaq 0x80(%rsp), %r9
movsd 0xccb7(%rip), %xmm2     # 0x3e278
pushq %r13
pushq %rax
pushq %r10
callq 0x321f2
addq $0x20, %rsp
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x315f4
movq (%rdi), %r14
movl $0x18, %esi
callq 0x7450
movq %r14, %rdi
cmpq %rbp, %r14
jne 0x315df
movq 0xc0(%rsp), %rdi
cmpq %r12, %rdi
je 0x31616
movq (%rdi), %r14
movl $0x18, %esi
callq 0x7450
movq %r14, %rdi
cmpq %r12, %r14
jne 0x31601
testq %rbx, %rbx
je 0x31692
movl $0x1, 0x80(%rbx)
movl $0x18, %edi
callq 0x7440
movq %rbx, 0x10(%rax)
movq %rax, %rdi
leaq 0x90(%rsp), %rsi
callq 0x7080
incq 0xa0(%rsp)
movq 0x88(%rbx), %rdi
testq %rdi, %rdi
je 0x3165d
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x88(%rbx)
movq 0x68(%rbx), %rdi
callq 0x266bc
movsd 0x70(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x70(%rsp)
movq 0x70(%rbx), %rax
movq %rax, 0x88(%rsp)
jmp 0x31716
movl $0x18, %edx
movq 0x1f942(%rip), %rdi     # 0x50fe0
leaq 0xdd8c(%rip), %rsi      # 0x3f431
callq 0x74e0
movq 0x1f92f(%rip), %rdi     # 0x50fe0
movq 0x8(%rsp), %rsi
callq 0x7720
movl $0x1, %edx
movq %rax, %rdi
leaq 0xdc02(%rip), %rsi      # 0x3f2cc
callq 0x74e0
incl 0x14(%rsp)
movq (%rsp), %rax
cmpl $0x0, 0x60(%rax)
jle 0x31716
movl $0x21, %edx
movq 0x18(%rsp), %rdi
leaq 0xdd3a(%rip), %rsi      # 0x3f428
callq 0x74e0
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x7720
movl $0xb, %edx
movq %rax, %rdi
leaq 0xce28(%rip), %rsi      # 0x3e539
callq 0x74e0
movq 0x30(%rsp), %rbx
decq 0x40(%rsp)
movq %rbx, %rdi
callq 0x76b0
movl $0x18, %esi
movq %rbx, %rdi
callq 0x7450
movq 0x50(%rsp), %rdi
leaq 0x50(%rsp), %r14
cmpq %r14, %rdi
je 0x31759
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x7450
movq %rbx, %rdi
cmpq %r14, %rbx
jne 0x31744
movq 0x8(%rsp), %rax
incl %eax
movq %rax, 0x8(%rsp)
movq %r14, 0x58(%rsp)
movq %r14, 0x50(%rsp)
movq $0x0, 0x60(%rsp)
cmpl $0x0, 0x24(%rsp)
je 0x31824
callq 0x72f0
movq %rax, %rbx
movl $0x8, %edx
movq 0x1f7f9(%rip), %rdi     # 0x50f90
leaq 0xe3ce(%rip), %rsi      # 0x3fb6c
callq 0x74e0
movq 0x1f7e6(%rip), %rdi     # 0x50f90
movq 0x8(%rsp), %rsi
callq 0x7720
movq %rax, %r15
movl $0xd, %edx
movq %rax, %rdi
leaq 0xdc84(%rip), %rsi      # 0x3f44a
callq 0x74e0
movq %r15, %rdi
movl 0x14(%rsp), %esi
callq 0x7720
movq %rax, %r15
movl $0xf, %edx
movq %rax, %rdi
leaq 0xdc6f(%rip), %rsi      # 0x3f458
callq 0x74e0
subq 0x48(%rsp), %rbx
cvtsi2sd %rbx, %xmm0
mulsd 0xa810(%rip), %xmm0     # 0x3c010
divsd 0xca40(%rip), %xmm0     # 0x3e248
movq %r15, %rdi
callq 0x7690
movl $0x1, %edx
movq %rax, %rdi
leaq 0xdaad(%rip), %rsi      # 0x3f2cc
callq 0x74e0
movq 0x48(%rsp), %r14
leaq 0x30(%rsp), %rax
cmpq %rax, 0x30(%rsp)
jne 0x313e7
jmp 0x318b0
movq 0x1f79e(%rip), %rdi     # 0x50fe0
leaq 0xdb4b(%rip), %rsi      # 0x3f394
movl $0x33, %edx
callq 0x74e0
movq (%rsp), %rax
cmpl $0x0, 0x60(%rax)
jle 0x31876
movq (%rsp), %rdi
addq $0x68, %rdi
leaq 0xdac8(%rip), %rsi      # 0x3f334
movl $0x3e, %edx
callq 0x74e0
xorpd %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
cmpl $0x0, 0x24(%rsp)
je 0x31e6f
movq 0x1f6fe(%rip), %rdi     # 0x50f90
leaq 0xdada(%rip), %rsi      # 0x3f373
movl $0x54, %edx
callq 0x74e0
jmp 0x31e6f
movl $0x0, 0x14(%rsp)
movq (%rsp), %rax
cmpl $0x0, 0x60(%rax)
leaq 0x30(%rsp), %r12
movl 0x14(%rsp), %ebp
jle 0x31b2c
movq (%rsp), %rax
leaq 0x68(%rax), %r15
leaq 0xdb92(%rip), %rsi      # 0x3f468
movl $0x24, %edx
movq %r15, %rdi
callq 0x74e0
callq 0x72f0
subq 0x28(%rsp), %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd 0xc94b(%rip), %xmm0     # 0x3e248
movq %r15, %rdi
callq 0x7690
leaq 0xce13(%rip), %rsi      # 0x3e71f
movl $0x2, %edx
movq %rax, %rdi
callq 0x74e0
leaq 0xdb6d(%rip), %rsi      # 0x3f48d
movl $0xc, %edx
movq %r15, %rdi
callq 0x74e0
movq (%rsp), %rax
movq 0x278(%rax), %rsi
movq %r15, %rdi
callq 0x73e0
leaq 0xd985(%rip), %rsi      # 0x3f2cc
movl $0x1, %edx
movq %rax, %rdi
callq 0x74e0
leaq 0xdb3f(%rip), %rsi      # 0x3f49a
movl $0xf, %edx
movq %r15, %rdi
callq 0x74e0
movq (%rsp), %rax
movq 0x270(%rax), %rsi
movq %r15, %rdi
callq 0x73e0
leaq 0xd94a(%rip), %rsi      # 0x3f2cc
movl $0x1, %edx
movq %rax, %rdi
callq 0x74e0
leaq 0xdb14(%rip), %rsi      # 0x3f4aa
movl $0xf, %edx
movq %r15, %rdi
callq 0x74e0
movq (%rsp), %rax
movq 0x288(%rax), %rsi
movq %r15, %rdi
callq 0x73e0
leaq 0xd90f(%rip), %rsi      # 0x3f2cc
movl $0x1, %edx
movq %rax, %rdi
callq 0x74e0
leaq 0xdae9(%rip), %rsi      # 0x3f4ba
movl $0x11, %edx
movq %r15, %rdi
callq 0x74e0
movq (%rsp), %rax
movq 0x290(%rax), %rsi
movq %r15, %rdi
callq 0x73e0
leaq 0xd8d4(%rip), %rsi      # 0x3f2cc
movl $0x1, %edx
movq %rax, %rdi
callq 0x74e0
leaq 0xdac0(%rip), %rsi      # 0x3f4cc
movl $0x17, %edx
movq %r15, %rdi
callq 0x74e0
movq (%rsp), %rax
movq 0x298(%rax), %rsi
movq %r15, %rdi
callq 0x73e0
leaq 0xd899(%rip), %rsi      # 0x3f2cc
movl $0x1, %edx
movq %rax, %rdi
callq 0x74e0
leaq 0xda9d(%rip), %rsi      # 0x3f4e4
movl $0xe, %edx
movq %r15, %rdi
callq 0x74e0
movq (%rsp), %rax
movq 0x280(%rax), %rsi
movq %r15, %rdi
callq 0x73e0
leaq 0xd85e(%rip), %rsi      # 0x3f2cc
movl $0x1, %edx
movq %rax, %rdi
callq 0x74e0
leaq 0xda71(%rip), %rsi      # 0x3f4f3
movl $0xa, %edx
movq %r15, %rdi
callq 0x74e0
movq (%rsp), %rax
movq 0x2a0(%rax), %rsi
movq %r15, %rdi
callq 0x73e0
leaq 0xd823(%rip), %rsi      # 0x3f2cc
movl $0x1, %edx
movq %rax, %rdi
callq 0x74e0
leaq 0xda41(%rip), %rsi      # 0x3f4fe
movl $0xc, %edx
movq %r15, %rdi
callq 0x74e0
movq (%rsp), %rax
movq 0x2a8(%rax), %rsi
movq %r15, %rdi
callq 0x73e0
leaq 0xd7e8(%rip), %rsi      # 0x3f2cc
movl $0x1, %edx
movq %rax, %rdi
callq 0x74e0
leaq 0xda13(%rip), %rsi      # 0x3f50b
movl $0xc, %edx
movq %r15, %rdi
callq 0x74e0
movq (%rsp), %rax
movq 0x2b0(%rax), %rsi
movq %r15, %rdi
callq 0x73e0
leaq 0xd7ad(%rip), %rsi      # 0x3f2cc
movl $0x1, %edx
movq %rax, %rdi
callq 0x74e0
cmpl $0x0, 0x24(%rsp)
je 0x31e4d
movq 0x1f452(%rip), %rdi     # 0x50f90
leaq 0xd9d3(%rip), %rsi      # 0x3f518
movl $0x1c, %edx
callq 0x74e0
movsd 0x78(%rsp), %xmm0
movq 0x1f434(%rip), %rdi     # 0x50f90
movsd %xmm0, 0x8(%rsp)
callq 0x7690
movq %rax, %rbx
leaq 0xd90d(%rip), %rsi      # 0x3f47e
movl $0xe, %edx
movq %rax, %rdi
callq 0x74e0
callq 0x72f0
subq 0x28(%rsp), %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd 0xc6b0(%rip), %xmm0     # 0x3e248
movq %rbx, %rdi
callq 0x7690
leaq 0xd725(%rip), %rsi      # 0x3f2cc
movl $0x1, %edx
movq %rax, %rdi
callq 0x74e0
movq 0x1f3d5(%rip), %rdi     # 0x50f90
leaq 0xd973(%rip), %rsi      # 0x3f535
movl $0x14, %edx
callq 0x74e0
movq 0x1f3bd(%rip), %rdi     # 0x50f90
leaq 0xd970(%rip), %rsi      # 0x3f54a
movl $0xe, %edx
callq 0x74e0
movq (%rsp), %rax
movq 0x270(%rax), %rsi
movq 0x1f39a(%rip), %rdi     # 0x50f90
callq 0x73e0
leaq 0xd6ca(%rip), %rsi      # 0x3f2cc
movl $0x1, %edx
movq %rax, %rdi
callq 0x74e0
movq 0x1f37a(%rip), %rdi     # 0x50f90
leaq 0xd93c(%rip), %rsi      # 0x3f559
movl $0xb, %edx
callq 0x74e0
movq (%rsp), %rax
movq 0x278(%rax), %rsi
movq 0x1f357(%rip), %rdi     # 0x50f90
callq 0x73e0
leaq 0xd687(%rip), %rsi      # 0x3f2cc
movl $0x1, %edx
movq %rax, %rdi
callq 0x74e0
movq 0x1f337(%rip), %rdi     # 0x50f90
leaq 0xd884(%rip), %rsi      # 0x3f4e4
movl $0xe, %edx
callq 0x74e0
movq (%rsp), %rax
movq 0x280(%rax), %rsi
movq 0x1f314(%rip), %rdi     # 0x50f90
callq 0x73e0
leaq 0xd644(%rip), %rsi      # 0x3f2cc
movl $0x1, %edx
movq %rax, %rdi
callq 0x74e0
movq 0x1f2f4(%rip), %rdi     # 0x50f90
leaq 0xd8c2(%rip), %rsi      # 0x3f565
movl $0xe, %edx
callq 0x74e0
movq (%rsp), %rax
movq 0x288(%rax), %rsi
movq 0x1f2d1(%rip), %rdi     # 0x50f90
callq 0x73e0
leaq 0xd601(%rip), %rsi      # 0x3f2cc
movl $0x1, %edx
movq %rax, %rdi
callq 0x74e0
movq 0x1f2b1(%rip), %rdi     # 0x50f90
leaq 0xd88e(%rip), %rsi      # 0x3f574
movl $0x10, %edx
callq 0x74e0
movq (%rsp), %rax
movq 0x290(%rax), %rsi
movq 0x1f28e(%rip), %rdi     # 0x50f90
callq 0x73e0
leaq 0xd5be(%rip), %rsi      # 0x3f2cc
movl $0x1, %edx
movq %rax, %rdi
callq 0x74e0
movq 0x1f26e(%rip), %rdi     # 0x50f90
leaq 0xd85c(%rip), %rsi      # 0x3f585
movl $0x16, %edx
callq 0x74e0
movq (%rsp), %rax
movq 0x298(%rax), %rsi
movq 0x1f24b(%rip), %rdi     # 0x50f90
callq 0x73e0
leaq 0xd57b(%rip), %rsi      # 0x3f2cc
movl $0x1, %edx
movq %rax, %rdi
callq 0x74e0
movq 0x1f22b(%rip), %rdi     # 0x50f90
leaq 0xd787(%rip), %rsi      # 0x3f4f3
movl $0xa, %edx
callq 0x74e0
movq (%rsp), %rax
movq 0x2a0(%rax), %rsi
movq 0x1f208(%rip), %rdi     # 0x50f90
callq 0x73e0
leaq 0xd538(%rip), %rsi      # 0x3f2cc
movl $0x1, %edx
movq %rax, %rdi
callq 0x74e0
movq 0x1f1e8(%rip), %rdi     # 0x50f90
leaq 0xd74f(%rip), %rsi      # 0x3f4fe
movl $0xc, %edx
callq 0x74e0
movq (%rsp), %rax
movq 0x2a8(%rax), %rsi
movq 0x1f1c5(%rip), %rdi     # 0x50f90
callq 0x73e0
leaq 0xd4f5(%rip), %rsi      # 0x3f2cc
movl $0x1, %edx
movq %rax, %rdi
callq 0x74e0
movq 0x1f1a5(%rip), %rdi     # 0x50f90
leaq 0xd719(%rip), %rsi      # 0x3f50b
movl $0xc, %edx
callq 0x74e0
movq (%rsp), %rax
movq 0x2b0(%rax), %rsi
movq 0x1f182(%rip), %rbx     # 0x50f90
movq %rbx, %rdi
callq 0x73e0
leaq 0xd4af(%rip), %rsi      # 0x3f2cc
movl $0x1, %edx
movq %rax, %rdi
callq 0x74e0
testl %ebp, %ebp
je 0x31e5b
movq 0x1f15b(%rip), %rdi     # 0x50f90
movl %ebp, %esi
callq 0x7720
movq %rax, %rbx
movl $0x25, %edx
leaq 0xd77e(%rip), %rsi      # 0x3f5c9
jmp 0x31e67
movsd 0x78(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
jmp 0x31e6f
movl $0x2c, %edx
leaq 0xd735(%rip), %rsi      # 0x3f59c
movq %rbx, %rdi
callq 0x74e0
movq 0x50(%rsp), %rdi
leaq 0x50(%rsp), %r14
cmpq %r14, %rdi
je 0x31e93
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x7450
movq %rbx, %rdi
cmpq %r14, %rbx
jne 0x31e7e
movq 0x90(%rsp), %rdi
leaq 0x90(%rsp), %r14
cmpq %r14, %rdi
je 0x31ebd
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x7450
movq %rbx, %rdi
cmpq %r14, %rbx
jne 0x31ea8
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x31edc
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x7450
movq %rbx, %rdi
cmpq %r12, %rbx
jne 0x31ec7
movsd 0x8(%rsp), %xmm0
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x31f4e
jmp 0x31f4e
jmp 0x31f4e
movq %rax, %r15
jmp 0x31f24
movq %rax, %r15
movq 0xa8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x31f24
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x7450
movq %rbx, %rdi
cmpq %rbp, %rbx
jne 0x31f0f
movq 0xc0(%rsp), %rdi
cmpq %r12, %rdi
je 0x31f51
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x7450
movq %rbx, %rdi
cmpq %r12, %rbx
jne 0x31f31
jmp 0x31f51
jmp 0x31f4e
jmp 0x31f4e
jmp 0x31f4e
movq %rax, %r15
movq 0x50(%rsp), %rdi
leaq 0x50(%rsp), %r12
cmpq %r12, %rdi
leaq 0x30(%rsp), %r14
je 0x31f7a
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x7450
movq %rbx, %rdi
cmpq %r12, %rbx
jne 0x31f65
movq 0x90(%rsp), %rdi
leaq 0x90(%rsp), %r12
cmpq %r12, %rdi
je 0x31fa4
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x7450
movq %rbx, %rdi
cmpq %r12, %rbx
jne 0x31f8f
movq 0x30(%rsp), %rdi
cmpq %r14, %rdi
je 0x31fc3
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x7450
movq %rbx, %rdi
cmpq %r14, %rbx
jne 0x31fae
movq %r15, %rdi
callq 0x7740
nop