// File: schneebergerlab[P]GameteBinning/asPollinator_1.0.cpp
// Function: get_break_pos(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, unsigned long*, double*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::map<unsigned long, ALLELE, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, ALLELE>>>)
string get_break_pos(string           poPat, 
                     string          pmflag,
                     int           pollenid,
                     unsigned long*   leftp, 
                     double*          score,
                     string                     contigname,
                     map<unsigned long, ALLELE> contigmarker)
{
    // used after 20191101
    // poPat: is the pollen PM pattern sequence
    // leftp : would be the i-th   marker position along the contig
    // rightp: would be the i+1-th marker position along the contig
    // score : would be score for the reported co
    // minimum number of markers hard-coded: at least 3
    //
    string pmstring = "";
    string poPatbk  = poPat;
    poPatbk.erase(std::remove(poPatbk.begin(), poPatbk.end(), 'u'), poPatbk.end()); // remove non-effective marekers with value: 'u'
    if(poPatbk.size()==0) 
    {
        pmstring = "UU";                // not sure on co
        *leftp   = 0;
        *score   = 0;
        cout << "   Check2rm: " << poPat << " ---- determined as "  << pmstring << " for pollen " << pollenid << "_x\t0_" << pmflag 
             << " (no effective markers) "                          << endl; 
        return pmstring;
    }
    if(poPatbk.size()==1)
    {
        if(poPatbk.compare("M")==0)
        {
            pmstring = "MM";
        }else
        if(poPatbk.compare("P")==0)
        {
            pmstring = "PP";
        }else ;
        *leftp   = 0; // no co
        *score   = 0; // no co     
        cout << "   Check2rm: " << poPat  << " ---- determined as "  << pmstring << " for pollen " << pollenid << "_x\t0_" << pmflag 
             << " ( 1 effective marker) "                            << endl; 
        return pmstring;  
    }
    //
    *score        = 0.0;
    size_t c1Lef  = 0;   // Left  P cnt for highest score
    size_t c2Lef  = 0;   // Left  M cnt for highest score
    size_t c1Rig  = 0;   // right P cnt for highest score
    size_t c2Rig  = 0;   // right M cnt for highest score
    for(size_t mi = 1; mi <= poPat.size()-1; mi ++) // later control on number of markers, and no need checking all pos.
    {
        string strLef = poPat.substr(0, mi); // val @ pos of 0,...,mi-1
        string strRig = poPat.substr(mi);    // val @ pos of mi,mi+1,...
        // current break point: note: 'u' excluded from consideration
        size_t c1Leftmp  = std::count(strLef.begin(), strLef.end(), 'P'); // Left  P
        size_t c2Leftmp  = std::count(strLef.begin(), strLef.end(), 'M'); // Left  M
        size_t c1Rigtmp  = std::count(strRig.begin(), strRig.end(), 'P'); // Right P
        size_t c2Rigtmp  = std::count(strRig.begin(), strRig.end(), 'M'); // Right M
        //
        double af1Leftmp = (double)c1Leftmp*1.0/(c1Leftmp+c2Leftmp);
        double af2Leftmp = (double)c2Leftmp*1.0/(c1Leftmp+c2Leftmp);        
        double af1Rigtmp = (double)c1Rigtmp*1.0/(c1Rigtmp+c2Rigtmp);
        double af2Rigtmp = (double)c2Rigtmp*1.0/(c1Rigtmp+c2Rigtmp);
        //
        double score1 = af1Leftmp * af2Rigtmp; // left as P right as M
        double score2 = af2Leftmp * af1Rigtmp; // left as M right as P
        double scotmp = score1>score2?score1:score2;   
        if(scotmp >= *score)
        {
            *score  = scotmp;
            *leftp  = mi;  // (*leftp)-th marker is the left break marker, (*leftp+1) is the right break marker; 1-based positioning
            if(score1>score2)
            { 
                pmstring  = "PM";
            }else
            {
                pmstring  = "MP";
            }  
            //
            c1Lef  = c1Leftmp;
            c2Lef  = c2Leftmp;
            c1Rig  = c1Rigtmp;
            c2Rig  = c2Rigtmp;                     
        }
    }
    // 
    string checkfrom = "";
    // control on marker number: MuMMMMuuuuuuPuPPPu
    if(*score > 0 && poPatbk.size()<10)
    {
        // from cluster "M"; 
        if(pmflag.compare("M")    == 0)
        {
            // found "P" on left end;            
            if(pmstring.compare("PM") == 0)
            { 
               // at least 1 effective "P"; at least 1/3 "P"; first position was "P"
               if((poPatbk.substr(0, 1)).compare("P") == 0 && 
                  c1Lef > 0 && c1Lef >= poPatbk.size()/3.0)
                {
                    checkfrom = "1";
                }else
                {
                    pmstring  = "MM";
                    *leftp    = 0; // no co    
                    //*score  = 0; // no co   
                    checkfrom = "2";
                }
            }
            // found "P" on right end
            if(pmstring.compare("MP") == 0)
            {
               // at least 1 effective "P"; at least 1/3 "P"; last position was "P"                
                if((poPatbk.substr(poPatbk.size()-1, 1)).compare("P") == 0 && 
                   c1Rig > 0 && c1Rig >= poPatbk.size()/3.0)
                {
                    checkfrom = "3";
                }else
                {
                    pmstring = "MM";
                    *leftp   = 0; // no co
                    //*score  = 0; // no co 
                    checkfrom = "4";
                }
            }
        }
        // from cluster "P" 
        if(pmflag.compare("P")    == 0)
        {
            // but found "M" on left end
            if(pmstring.compare("MP") == 0 )
            {            
               // at least 1 effective "M"; at least 1/3 "M"; first position was "M"
                if((poPatbk.substr(0, 1)).compare("M") == 0 && 
                   c2Lef > 0 && c2Lef >= poPatbk.size()/3.0)
                {
                    checkfrom = "5";
                }else
                {
                    pmstring = "PP";
                    *leftp   = 0; // no co
                    //*score  = 0; // no co    
                    checkfrom = "6";
                }
            }
            // but found "M" on right end
            if(pmstring.compare("PM") == 0)
            {            
               // at least 1 effective "M"; at least 1/3 "M"; last position was "M"
                if((poPatbk.substr(poPatbk.size()-1, 1)).compare("M") == 0 &&     
                   c2Rig > 0 && c2Rig >= poPatbk.size()/3.0)
                {
                    checkfrom = "7";
                }else
                {
                    pmstring = "PP";
                    *leftp   = 0; // no co
                    //*score  = 0; // no co 
                    checkfrom = "8";
                }
            }
        }                
        //
    }else
    if(*score>=minCOscore && poPatbk.size()>10)
    {
        // from cluster "M" 
        if(pmflag.compare("M")    == 0)
        {        
            // but found "P" on left end 
            if(pmstring.compare("PM") == 0)
            {            
                // and at least 5 effective "P" and first position was "P"
                if((poPatbk.substr(0, 1)).compare("P") == 0 && c1Lef >= 5 )
                {
                    checkfrom = "9";
                }else
                {
                    pmstring = "MM";
                    *leftp   = 0;  // no co
                    //*score  = 0; // no co
                    checkfrom = "10";
                }
            }
            // but found "P" on right end
            if(pmstring.compare("MP") == 0)
            {
                // and at least 5 effective "P" and last position was "P"
                if((poPatbk.substr(poPatbk.size()-1, 1)).compare("P") == 0 && c1Rig >= 5 )
                {
                    checkfrom = "11";
                }else
                {
                    pmstring = "MM";
                    *leftp   = 0;  // no co
                    //*score  = 0; // no co 
                    checkfrom = "12";
                }
            }
        }
        // from cluster "P"
        if(pmflag.compare("P")    == 0)
        {        
            // but found "M" on left end 
            if(pmstring.compare("MP") == 0)
            {            
                // and at least 5 effective "M" and first position was "M"
                if((poPatbk.substr(0, 1)).compare("M") == 0 && c2Lef >= 5)
                {
                    checkfrom = "13";
                }else
                {
                    pmstring = "PP";
                    *leftp   = 0; // no co
                    //*score  = 0; // no co
                    checkfrom = "14";
                }
            }
            // from cluster "P" but found "M" on left end and effective last  position was "M"
            if(pmstring.compare("PM") == 0)
            {            
                if((poPatbk.substr(poPatbk.size()-1, 1)).compare("M") == 0 && c2Rig >= 5)
                {
                    ;
                }else
                {
                    pmstring = "PP";
                    *leftp   = 0; // no co
                    //*score  = 0; // no co
                    checkfrom = "15";
                }
            }
        }       
    }else
    {
        if(pmflag.compare("M") == 0)
        {
            pmstring     = "MM";
            checkfrom = "16";
        }else
        if(pmflag.compare("P") == 0)
        {
            pmstring     = "PP";
            checkfrom = "17";
        }
        *leftp   = 0; // no co
        //*score = 0; // no co  
    }
    //
    cout << "   Check2rm: " << poPat  << " ---- determined as "  << pmstring << " for pollen " << pollenid << "_x\t0_" << pmflag 
         << " (CO after "   << *leftp << "th marker: score "     << *score   << " - case "     << checkfrom << " ) "; // *** 
    // output co interval
    if(*leftp != 0)
    {
        int leftindex  = *leftp-1;
        while(leftindex>0)
        {
            if(poPat.substr(leftindex, 1).compare("u") == 0)
            {
                leftindex --;
            }else
            {
                break;
            }
        }
        int rightindex = *leftp;
        while(rightindex<poPat.size()-1)
        {
            if(poPat.substr(rightindex, 1).compare("u") == 0)
            {
                rightindex ++;
            }else
            {
                break;
            }
        }
        // output CO real positions of markers: increase to 1-based positioning <= leftindex+1; real position in poPat
        unsigned long leftmarker  = recover_real_marker_pos(leftindex+1,  contigmarker);
        unsigned long rightmarker = recover_real_marker_pos(rightindex+1, contigmarker);
        cout << " (CO interval " 
             << contigname 
             << " "
             << leftindex+1  << "th.mkr=" << leftmarker 
             << "-"
             << rightindex+1 << "th.mkr=" << rightmarker
             << ", size="
             << rightmarker - leftmarker + 1 << ")"
             << endl;
    }else
    {
        cout <<  endl; // to end ***
    }
    return pmstring;
}

// Assembly:
subq $0x738, %rsp            # imm = 0x738
movq %rdx, 0x348(%rsp)
movq %rsi, 0x350(%rsp)
movq %rdi, 0x370(%rsp)
movq %rdi, %rax
movq %rax, 0x358(%rsp)
movq 0x748(%rsp), %rax
movq %rax, 0x360(%rsp)
movq 0x740(%rsp), %rax
movq %rax, 0x368(%rsp)
movq %rdi, 0x730(%rsp)
movq %rsi, 0x728(%rsp)
movq %rdx, 0x720(%rsp)
movl %ecx, 0x71c(%rsp)
movq %r8, 0x710(%rsp)
movq %r9, 0x708(%rsp)
movb $0x0, 0x707(%rsp)
leaq 0x706(%rsp), %rdi
movq %rdi, 0x378(%rsp)
callq 0x3570
movq 0x370(%rsp), %rdi
movq 0x378(%rsp), %rdx
leaq 0x190c4(%rip), %rsi     # 0x2be61
callq 0x185e0
jmp 0x12da4
leaq 0x706(%rsp), %rdi
callq 0x3390
movq 0x350(%rsp), %rsi
leaq 0x6d0(%rsp), %rdi
callq 0x3160
jmp 0x12dc8
leaq 0x6d0(%rsp), %rdi
movq %rdi, 0x338(%rsp)
callq 0x32c0
movq 0x338(%rsp), %rdi
movq %rax, 0x6b8(%rsp)
callq 0x31c0
movq %rax, 0x6b0(%rsp)
movb $0x75, 0x6af(%rsp)
movq 0x6b8(%rsp), %rdi
movq 0x6b0(%rsp), %rsi
leaq 0x6af(%rsp), %rdx
callq 0x19e00
movq %rax, 0x340(%rsp)
jmp 0x12e29
movq 0x340(%rsp), %rax
movq %rax, 0x6c0(%rsp)
leaq 0x6c8(%rsp), %rdi
leaq 0x6c0(%rsp), %rsi
callq 0x19e60
leaq 0x6d0(%rsp), %rdi
movq %rdi, 0x328(%rsp)
callq 0x31c0
movq %rax, 0x698(%rsp)
leaq 0x6a0(%rsp), %rdi
leaq 0x698(%rsp), %rsi
callq 0x19e60
movq 0x328(%rsp), %rdi
movq 0x6c8(%rsp), %rsi
movq 0x6a0(%rsp), %rdx
callq 0x30c0
movq %rax, 0x330(%rsp)
jmp 0x12ea7
movq 0x330(%rsp), %rax
movq %rax, 0x690(%rsp)
leaq 0x6d0(%rsp), %rdi
callq 0x3250
cmpq $0x0, %rax
jne 0x13098
movq 0x370(%rsp), %rdi
leaq 0x18b70(%rip), %rsi     # 0x2ba4d
callq 0x3440
jmp 0x12ee4
movq 0x710(%rsp), %rax
movq $0x0, (%rax)
movq 0x708(%rsp), %rax
movq $0x0, (%rax)
movq 0x260cf(%rip), %rdi     # 0x38fd8
leaq 0x18bd0(%rip), %rsi     # 0x2bae0
callq 0x3320
movq %rax, 0x320(%rsp)
jmp 0x12f1f
movq 0x350(%rsp), %rsi
movq 0x320(%rsp), %rdi
callq 0x32e0
movq %rax, 0x318(%rsp)
jmp 0x12f3e
movq 0x318(%rsp), %rdi
leaq 0x18ba1(%rip), %rsi     # 0x2baee
callq 0x3320
movq %rax, 0x310(%rsp)
jmp 0x12f5c
movq 0x370(%rsp), %rsi
movq 0x310(%rsp), %rdi
callq 0x32e0
movq %rax, 0x308(%rsp)
jmp 0x12f7b
movq 0x308(%rsp), %rdi
leaq 0x18bab(%rip), %rsi     # 0x2bb35
callq 0x3320
movq %rax, 0x300(%rsp)
jmp 0x12f99
movq 0x300(%rsp), %rdi
movl 0x71c(%rsp), %esi
callq 0x3540
movq %rax, 0x2f8(%rsp)
jmp 0x12fb7
movq 0x2f8(%rsp), %rdi
leaq 0x18b7c(%rip), %rsi     # 0x2bb42
callq 0x3320
movq %rax, 0x2f0(%rsp)
jmp 0x12fd5
movq 0x348(%rsp), %rsi
movq 0x2f0(%rsp), %rdi
callq 0x32e0
movq %rax, 0x2e8(%rsp)
jmp 0x12ff4
movq 0x2e8(%rsp), %rdi
leaq 0x18b45(%rip), %rsi     # 0x2bb48
callq 0x3320
movq %rax, 0x2e0(%rsp)
jmp 0x13012
movq 0x2e0(%rsp), %rdi
movq 0x25fa7(%rip), %rsi     # 0x38fc8
callq 0x3370
jmp 0x13028
movb $0x1, 0x707(%rsp)
movl $0x1, 0x68c(%rsp)
jmp 0x14a27
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x6f8(%rsp)
movl %eax, 0x6f4(%rsp)
leaq 0x706(%rsp), %rdi
callq 0x3390
jmp 0x14a79
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x6f8(%rsp)
movl %eax, 0x6f4(%rsp)
jmp 0x14a6c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x6f8(%rsp)
movl %eax, 0x6f4(%rsp)
jmp 0x14a40
leaq 0x6d0(%rsp), %rdi
callq 0x3250
cmpq $0x1, %rax
jne 0x13271
leaq 0x6d0(%rsp), %rdi
leaq 0x18a75(%rip), %rsi     # 0x2bb33
callq 0x3100
cmpl $0x0, %eax
jne 0x130e0
movq 0x370(%rsp), %rdi
leaq 0x18a8a(%rip), %rsi     # 0x2bb61
callq 0x3440
jmp 0x130de
jmp 0x13115
leaq 0x6d0(%rsp), %rdi
leaq 0x18a2b(%rip), %rsi     # 0x2bb1a
callq 0x3100
cmpl $0x0, %eax
jne 0x13111
movq 0x370(%rsp), %rdi
leaq 0x18a5c(%rip), %rsi     # 0x2bb64
callq 0x3440
jmp 0x1310f
jmp 0x13113
jmp 0x13113
jmp 0x13115
movq 0x710(%rsp), %rax
movq $0x0, (%rax)
movq 0x708(%rsp), %rax
movq $0x0, (%rax)
movq 0x25e9e(%rip), %rdi     # 0x38fd8
leaq 0x1899f(%rip), %rsi     # 0x2bae0
callq 0x3320
movq %rax, 0x2d8(%rsp)
jmp 0x13150
movq 0x350(%rsp), %rsi
movq 0x2d8(%rsp), %rdi
callq 0x32e0
movq %rax, 0x2d0(%rsp)
jmp 0x1316f
movq 0x2d0(%rsp), %rdi
leaq 0x18970(%rip), %rsi     # 0x2baee
callq 0x3320
movq %rax, 0x2c8(%rsp)
jmp 0x1318d
movq 0x370(%rsp), %rsi
movq 0x2c8(%rsp), %rdi
callq 0x32e0
movq %rax, 0x2c0(%rsp)
jmp 0x131ac
movq 0x2c0(%rsp), %rdi
leaq 0x1897a(%rip), %rsi     # 0x2bb35
callq 0x3320
movq %rax, 0x2b8(%rsp)
jmp 0x131ca
movq 0x2b8(%rsp), %rdi
movl 0x71c(%rsp), %esi
callq 0x3540
movq %rax, 0x2b0(%rsp)
jmp 0x131e8
movq 0x2b0(%rsp), %rdi
leaq 0x1894b(%rip), %rsi     # 0x2bb42
callq 0x3320
movq %rax, 0x2a8(%rsp)
jmp 0x13206
movq 0x348(%rsp), %rsi
movq 0x2a8(%rsp), %rdi
callq 0x32e0
movq %rax, 0x2a0(%rsp)
jmp 0x13225
movq 0x2a0(%rsp), %rdi
leaq 0x18933(%rip), %rsi     # 0x2bb67
callq 0x3320
movq %rax, 0x298(%rsp)
jmp 0x13243
movq 0x298(%rsp), %rdi
movq 0x25d76(%rip), %rsi     # 0x38fc8
callq 0x3370
jmp 0x13259
movb $0x1, 0x707(%rsp)
movl $0x1, 0x68c(%rsp)
jmp 0x14a27
movq 0x708(%rsp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
movq $0x0, 0x680(%rsp)
movq $0x0, 0x678(%rsp)
movq $0x0, 0x670(%rsp)
movq $0x0, 0x668(%rsp)
movq $0x1, 0x660(%rsp)
movq 0x350(%rsp), %rdi
movq 0x660(%rsp), %rax
movq %rax, 0x290(%rsp)
callq 0x3250
movq %rax, %rcx
movq 0x290(%rsp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
ja 0x1382a
movq 0x350(%rsp), %rsi
movq 0x660(%rsp), %rcx
xorl %eax, %eax
movl %eax, %edx
leaq 0x640(%rsp), %rdi
callq 0x3350
jmp 0x13314
movq 0x350(%rsp), %rsi
movq 0x660(%rsp), %rdx
leaq 0x620(%rsp), %rdi
movq $-0x1, %rcx
callq 0x3350
jmp 0x1333a
leaq 0x640(%rsp), %rdi
movq %rdi, 0x280(%rsp)
callq 0x32c0
movq 0x280(%rsp), %rdi
movq %rax, 0x610(%rsp)
callq 0x31c0
movq %rax, 0x608(%rsp)
movb $0x50, 0x607(%rsp)
movq 0x610(%rsp), %rdi
movq 0x608(%rsp), %rsi
leaq 0x607(%rsp), %rdx
callq 0x19520
movq %rax, 0x288(%rsp)
jmp 0x1339b
movq 0x288(%rsp), %rax
movq %rax, 0x618(%rsp)
leaq 0x640(%rsp), %rdi
movq %rdi, 0x270(%rsp)
callq 0x32c0
movq 0x270(%rsp), %rdi
movq %rax, 0x5f0(%rsp)
callq 0x31c0
movq %rax, 0x5e8(%rsp)
movb $0x4d, 0x5e7(%rsp)
movq 0x5f0(%rsp), %rdi
movq 0x5e8(%rsp), %rsi
leaq 0x5e7(%rsp), %rdx
callq 0x19520
movq %rax, 0x278(%rsp)
jmp 0x1340c
movq 0x278(%rsp), %rax
movq %rax, 0x5f8(%rsp)
leaq 0x620(%rsp), %rdi
movq %rdi, 0x260(%rsp)
callq 0x32c0
movq 0x260(%rsp), %rdi
movq %rax, 0x5d0(%rsp)
callq 0x31c0
movq %rax, 0x5c8(%rsp)
movb $0x50, 0x5c7(%rsp)
movq 0x5d0(%rsp), %rdi
movq 0x5c8(%rsp), %rsi
leaq 0x5c7(%rsp), %rdx
callq 0x19520
movq %rax, 0x268(%rsp)
jmp 0x1347d
movq 0x268(%rsp), %rax
movq %rax, 0x5d8(%rsp)
leaq 0x620(%rsp), %rdi
movq %rdi, 0x250(%rsp)
callq 0x32c0
movq 0x250(%rsp), %rdi
movq %rax, 0x5b0(%rsp)
callq 0x31c0
movq %rax, 0x5a8(%rsp)
movb $0x4d, 0x5a7(%rsp)
movq 0x5b0(%rsp), %rdi
movq 0x5a8(%rsp), %rsi
leaq 0x5a7(%rsp), %rdx
callq 0x19520
movq %rax, 0x258(%rsp)
jmp 0x134ee
movq 0x258(%rsp), %rax
movq %rax, 0x5b8(%rsp)
movq 0x618(%rsp), %rax
movq %rax, %xmm0
movaps 0x17b2e(%rip), %xmm3    # 0x2b040
movaps %xmm3, 0x230(%rsp)
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movapd 0x17b2a(%rip), %xmm2    # 0x2b050
movaps %xmm2, 0x240(%rsp)
subpd %xmm2, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movq 0x5f8(%rsp), %rcx
addq %rcx, %rax
movq %rax, %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm4
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm4, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x598(%rsp)
movq 0x5f8(%rsp), %rcx
movq %rcx, %xmm0
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
subpd %xmm2, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movq 0x618(%rsp), %rax
addq %rcx, %rax
movq %rax, %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm4
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm4, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x590(%rsp)
movq 0x5d8(%rsp), %rax
movq %rax, %xmm0
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
subpd %xmm2, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movq 0x5b8(%rsp), %rcx
addq %rcx, %rax
movq %rax, %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm4
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm4, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x588(%rsp)
movq 0x5b8(%rsp), %rcx
movq %rcx, %xmm0
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
subpd %xmm2, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movq 0x5d8(%rsp), %rax
addq %rcx, %rax
movq %rax, %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x580(%rsp)
movsd 0x598(%rsp), %xmm0
mulsd 0x580(%rsp), %xmm0
movsd %xmm0, 0x578(%rsp)
movsd 0x590(%rsp), %xmm0
mulsd 0x588(%rsp), %xmm0
movsd %xmm0, 0x570(%rsp)
movsd 0x578(%rsp), %xmm0
ucomisd 0x570(%rsp), %xmm0
jbe 0x136bb
movsd 0x578(%rsp), %xmm0
movsd %xmm0, 0x228(%rsp)
jmp 0x136cd
movsd 0x570(%rsp), %xmm0
movsd %xmm0, 0x228(%rsp)
movsd 0x228(%rsp), %xmm0
movsd %xmm0, 0x568(%rsp)
movsd 0x568(%rsp), %xmm0
movq 0x708(%rsp), %rax
ucomisd (%rax), %xmm0
jb 0x137e5
movsd 0x568(%rsp), %xmm0
movq 0x708(%rsp), %rax
movsd %xmm0, (%rax)
movq 0x660(%rsp), %rcx
movq 0x710(%rsp), %rax
movq %rcx, (%rax)
movsd 0x578(%rsp), %xmm0
ucomisd 0x570(%rsp), %xmm0
jbe 0x1378d
movq 0x370(%rsp), %rdi
leaq 0x1843a(%rip), %rsi     # 0x2bb7f
callq 0x3440
jmp 0x1374c
jmp 0x137a5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x6f8(%rsp)
movl %eax, 0x6f4(%rsp)
jmp 0x13818
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x6f8(%rsp)
movl %eax, 0x6f4(%rsp)
leaq 0x620(%rsp), %rdi
callq 0x31e0
jmp 0x13818
movq 0x370(%rsp), %rdi
leaq 0x183e6(%rip), %rsi     # 0x2bb82
callq 0x3440
jmp 0x137a3
jmp 0x137a5
movq 0x618(%rsp), %rax
movq %rax, 0x680(%rsp)
movq 0x5f8(%rsp), %rax
movq %rax, 0x678(%rsp)
movq 0x5d8(%rsp), %rax
movq %rax, 0x670(%rsp)
movq 0x5b8(%rsp), %rax
movq %rax, 0x668(%rsp)
leaq 0x620(%rsp), %rdi
callq 0x31e0
leaq 0x640(%rsp), %rdi
callq 0x31e0
movq 0x660(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x660(%rsp)
jmp 0x132bc
leaq 0x640(%rsp), %rdi
callq 0x31e0
jmp 0x14a40
leaq 0x547(%rsp), %rdi
movq %rdi, 0x220(%rsp)
callq 0x3570
movq 0x220(%rsp), %rdx
leaq 0x18613(%rip), %rsi     # 0x2be61
leaq 0x548(%rsp), %rdi
callq 0x185e0
jmp 0x1385d
leaq 0x547(%rsp), %rdi
callq 0x3390
movq 0x708(%rsp), %rax
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x13fba
leaq 0x6d0(%rsp), %rdi
callq 0x3250
cmpq $0xa, %rax
jae 0x13fba
movq 0x348(%rsp), %rdi
leaq 0x1828a(%rip), %rsi     # 0x2bb33
callq 0x3100
cmpl $0x0, %eax
jne 0x13c4f
movq 0x370(%rsp), %rdi
leaq 0x182b9(%rip), %rsi     # 0x2bb7f
callq 0x3100
cmpl $0x0, %eax
jne 0x13a9e
xorl %eax, %eax
movl %eax, %edx
leaq 0x520(%rsp), %rdi
leaq 0x6d0(%rsp), %rsi
movl $0x1, %ecx
callq 0x3350
jmp 0x138f4
leaq 0x520(%rsp), %rdi
leaq 0x18217(%rip), %rsi     # 0x2bb1a
callq 0x3100
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0x21f(%rsp)
jne 0x139d0
xorl %eax, %eax
cmpq $0x0, 0x680(%rsp)
movb %al, 0x21f(%rsp)
jbe 0x139d0
movq 0x680(%rsp), %xmm0
movaps 0x176fc(%rip), %xmm1    # 0x2b040
movaps %xmm1, 0x1f0(%rsp)
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x176f8(%rip), %xmm1    # 0x2b050
movaps %xmm1, 0x200(%rsp)
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd %xmm0, 0x210(%rsp)
leaq 0x6d0(%rsp), %rdi
callq 0x3250
movaps 0x1f0(%rsp), %xmm3
movaps 0x200(%rsp), %xmm2
movsd 0x210(%rsp), %xmm0
movq %rax, %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
movsd 0x1765a(%rip), %xmm2    # 0x2b018
divsd %xmm2, %xmm1
ucomisd %xmm1, %xmm0
setae %al
movb %al, 0x21f(%rsp)
movb 0x21f(%rsp), %al
movb %al, 0x1ef(%rsp)
leaq 0x520(%rsp), %rdi
callq 0x31e0
movb 0x1ef(%rsp), %al
testb $0x1, %al
jne 0x139f8
jmp 0x13a5f
leaq 0x1818e(%rip), %rsi     # 0x2bb8d
leaq 0x548(%rsp), %rdi
callq 0x3440
jmp 0x13a0e
jmp 0x13a9c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x6f8(%rsp)
movl %eax, 0x6f4(%rsp)
leaq 0x547(%rsp), %rdi
callq 0x3390
jmp 0x14a40
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x6f8(%rsp)
movl %eax, 0x6f4(%rsp)
leaq 0x548(%rsp), %rdi
callq 0x31e0
jmp 0x14a40
movq 0x370(%rsp), %rdi
leaq 0x180f3(%rip), %rsi     # 0x2bb61
callq 0x3440
jmp 0x13a75
movq 0x710(%rsp), %rax
movq $0x0, (%rax)
leaq 0x18105(%rip), %rsi     # 0x2bb90
leaq 0x548(%rsp), %rdi
callq 0x3440
jmp 0x13a9a
jmp 0x13a9c
jmp 0x13a9e
movq 0x370(%rsp), %rdi
leaq 0x180d5(%rip), %rsi     # 0x2bb82
callq 0x3100
cmpl $0x0, %eax
jne 0x13c4d
leaq 0x6d0(%rsp), %rdi
movq %rdi, 0x1e0(%rsp)
callq 0x3250
movq 0x1e0(%rsp), %rsi
movq %rax, %rdx
decq %rdx
leaq 0x500(%rsp), %rdi
movl $0x1, %ecx
callq 0x3350
jmp 0x13af2
leaq 0x500(%rsp), %rdi
leaq 0x18019(%rip), %rsi     # 0x2bb1a
callq 0x3100
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0x1df(%rsp)
jne 0x13bce
xorl %eax, %eax
cmpq $0x0, 0x670(%rsp)
movb %al, 0x1df(%rsp)
jbe 0x13bce
movq 0x670(%rsp), %xmm0
movaps 0x174fe(%rip), %xmm1    # 0x2b040
movaps %xmm1, 0x1b0(%rsp)
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x174fa(%rip), %xmm1    # 0x2b050
movaps %xmm1, 0x1c0(%rsp)
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd %xmm0, 0x1d0(%rsp)
leaq 0x6d0(%rsp), %rdi
callq 0x3250
movaps 0x1b0(%rsp), %xmm3
movaps 0x1c0(%rsp), %xmm2
movsd 0x1d0(%rsp), %xmm0
movq %rax, %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
movsd 0x1745c(%rip), %xmm2    # 0x2b018
divsd %xmm2, %xmm1
ucomisd %xmm1, %xmm0
setae %al
movb %al, 0x1df(%rsp)
movb 0x1df(%rsp), %al
movb %al, 0x1af(%rsp)
leaq 0x500(%rsp), %rdi
callq 0x31e0
movb 0x1af(%rsp), %al
testb $0x1, %al
jne 0x13bf6
jmp 0x13c0e
leaq 0x17f96(%rip), %rsi     # 0x2bb93
leaq 0x548(%rsp), %rdi
callq 0x3440
jmp 0x13c0c
jmp 0x13c4b
movq 0x370(%rsp), %rdi
leaq 0x17f44(%rip), %rsi     # 0x2bb61
callq 0x3440
jmp 0x13c24
movq 0x710(%rsp), %rax
movq $0x0, (%rax)
leaq 0x17f5c(%rip), %rsi     # 0x2bb96
leaq 0x548(%rsp), %rdi
callq 0x3440
jmp 0x13c49
jmp 0x13c4b
jmp 0x13c4d
jmp 0x13c4f
movq 0x348(%rsp), %rdi
leaq 0x17ebc(%rip), %rsi     # 0x2bb1a
callq 0x3100
cmpl $0x0, %eax
jne 0x13fb5
movq 0x370(%rsp), %rdi
leaq 0x17f07(%rip), %rsi     # 0x2bb82
callq 0x3100
cmpl $0x0, %eax
jne 0x13e04
xorl %eax, %eax
movl %eax, %edx
leaq 0x4e0(%rsp), %rdi
leaq 0x6d0(%rsp), %rsi
movl $0x1, %ecx
callq 0x3350
jmp 0x13ca9
leaq 0x4e0(%rsp), %rdi
leaq 0x17e7b(%rip), %rsi     # 0x2bb33
callq 0x3100
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0x1ae(%rsp)
jne 0x13d85
xorl %eax, %eax
cmpq $0x0, 0x678(%rsp)
movb %al, 0x1ae(%rsp)
jbe 0x13d85
movq 0x678(%rsp), %xmm0
movaps 0x17347(%rip), %xmm1    # 0x2b040
movaps %xmm1, 0x180(%rsp)
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x17343(%rip), %xmm1    # 0x2b050
movaps %xmm1, 0x190(%rsp)
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd %xmm0, 0x1a0(%rsp)
leaq 0x6d0(%rsp), %rdi
callq 0x3250
movaps 0x180(%rsp), %xmm3
movaps 0x190(%rsp), %xmm2
movsd 0x1a0(%rsp), %xmm0
movq %rax, %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
movsd 0x172a5(%rip), %xmm2    # 0x2b018
divsd %xmm2, %xmm1
ucomisd %xmm1, %xmm0
setae %al
movb %al, 0x1ae(%rsp)
movb 0x1ae(%rsp), %al
movb %al, 0x17f(%rsp)
leaq 0x4e0(%rsp), %rdi
callq 0x31e0
movb 0x17f(%rsp), %al
testb $0x1, %al
jne 0x13dad
jmp 0x13dc5
leaq 0x17de5(%rip), %rsi     # 0x2bb99
leaq 0x548(%rsp), %rdi
callq 0x3440
jmp 0x13dc3
jmp 0x13e02
movq 0x370(%rsp), %rdi
leaq 0x17d90(%rip), %rsi     # 0x2bb64
callq 0x3440
jmp 0x13ddb
movq 0x710(%rsp), %rax
movq $0x0, (%rax)
leaq 0x17dab(%rip), %rsi     # 0x2bb9c
leaq 0x548(%rsp), %rdi
callq 0x3440
jmp 0x13e00
jmp 0x13e02
jmp 0x13e04
movq 0x370(%rsp), %rdi
leaq 0x17d6c(%rip), %rsi     # 0x2bb7f
callq 0x3100
cmpl $0x0, %eax
jne 0x13fb3
leaq 0x6d0(%rsp), %rdi
movq %rdi, 0x170(%rsp)
callq 0x3250
movq 0x170(%rsp), %rsi
movq %rax, %rdx
decq %rdx
leaq 0x4c0(%rsp), %rdi
movl $0x1, %ecx
callq 0x3350
jmp 0x13e58
leaq 0x4c0(%rsp), %rdi
leaq 0x17ccc(%rip), %rsi     # 0x2bb33
callq 0x3100
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0x16f(%rsp)
jne 0x13f34
xorl %eax, %eax
cmpq $0x0, 0x668(%rsp)
movb %al, 0x16f(%rsp)
jbe 0x13f34
movq 0x668(%rsp), %xmm0
movaps 0x17198(%rip), %xmm1    # 0x2b040
movaps %xmm1, 0x140(%rsp)
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x17194(%rip), %xmm1    # 0x2b050
movaps %xmm1, 0x150(%rsp)
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd %xmm0, 0x160(%rsp)
leaq 0x6d0(%rsp), %rdi
callq 0x3250
movaps 0x140(%rsp), %xmm3
movaps 0x150(%rsp), %xmm2
movsd 0x160(%rsp), %xmm0
movq %rax, %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
movsd 0x170f6(%rip), %xmm2    # 0x2b018
divsd %xmm2, %xmm1
ucomisd %xmm1, %xmm0
setae %al
movb %al, 0x16f(%rsp)
movb 0x16f(%rsp), %al
movb %al, 0x13f(%rsp)
leaq 0x4c0(%rsp), %rdi
callq 0x31e0
movb 0x13f(%rsp), %al
testb $0x1, %al
jne 0x13f5c
jmp 0x13f74
leaq 0x17c3c(%rip), %rsi     # 0x2bb9f
leaq 0x548(%rsp), %rdi
callq 0x3440
jmp 0x13f72
jmp 0x13fb1
movq 0x370(%rsp), %rdi
leaq 0x17be1(%rip), %rsi     # 0x2bb64
callq 0x3440
jmp 0x13f8a
movq 0x710(%rsp), %rax
movq $0x0, (%rax)
leaq 0x17be5(%rip), %rsi     # 0x2bb85
leaq 0x548(%rsp), %rdi
callq 0x3440
jmp 0x13faf
jmp 0x13fb1
jmp 0x13fb3
jmp 0x13fb5
jmp 0x144b3
movq 0x708(%rsp), %rax
movsd (%rax), %xmm0
ucomisd 0x2534a(%rip), %xmm0    # 0x39318
jb 0x14412
leaq 0x6d0(%rsp), %rdi
callq 0x3250
cmpq $0xa, %rax
jbe 0x14412
movq 0x348(%rsp), %rdi
leaq 0x17b39(%rip), %rsi     # 0x2bb33
callq 0x3100
cmpl $0x0, %eax
jne 0x14207
movq 0x370(%rsp), %rdi
leaq 0x17b68(%rip), %rsi     # 0x2bb7f
callq 0x3100
cmpl $0x0, %eax
jne 0x140fb
xorl %eax, %eax
movl %eax, %edx
leaq 0x4a0(%rsp), %rdi
leaq 0x6d0(%rsp), %rsi
movl $0x1, %ecx
callq 0x3350
jmp 0x14045
leaq 0x4a0(%rsp), %rdi
leaq 0x17ac6(%rip), %rsi     # 0x2bb1a
callq 0x3100
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0x13e(%rsp)
jne 0x1407c
cmpq $0x5, 0x680(%rsp)
setae %al
movb %al, 0x13e(%rsp)
movb 0x13e(%rsp), %al
movb %al, 0x13d(%rsp)
leaq 0x4a0(%rsp), %rdi
callq 0x31e0
movb 0x13d(%rsp), %al
testb $0x1, %al
jne 0x140a4
jmp 0x140bc
leaq 0x17adc(%rip), %rsi     # 0x2bb87
leaq 0x548(%rsp), %rdi
callq 0x3440
jmp 0x140ba
jmp 0x140f9
movq 0x370(%rsp), %rdi
leaq 0x17a96(%rip), %rsi     # 0x2bb61
callq 0x3440
jmp 0x140d2
movq 0x710(%rsp), %rax
movq $0x0, (%rax)
leaq 0x17aa1(%rip), %rsi     # 0x2bb89
leaq 0x548(%rsp), %rdi
callq 0x3440
jmp 0x140f7
jmp 0x140f9
jmp 0x140fb
movq 0x370(%rsp), %rdi
leaq 0x17a78(%rip), %rsi     # 0x2bb82
callq 0x3100
cmpl $0x0, %eax
jne 0x14205
leaq 0x6d0(%rsp), %rdi
movq %rdi, 0x130(%rsp)
callq 0x3250
movq 0x130(%rsp), %rsi
movq %rax, %rdx
decq %rdx
leaq 0x480(%rsp), %rdi
movl $0x1, %ecx
callq 0x3350
jmp 0x1414f
leaq 0x480(%rsp), %rdi
leaq 0x179bc(%rip), %rsi     # 0x2bb1a
callq 0x3100
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0x12f(%rsp)
jne 0x14186
cmpq $0x5, 0x670(%rsp)
setae %al
movb %al, 0x12f(%rsp)
movb 0x12f(%rsp), %al
movb %al, 0x12e(%rsp)
leaq 0x480(%rsp), %rdi
callq 0x31e0
movb 0x12e(%rsp), %al
testb $0x1, %al
jne 0x141ae
jmp 0x141c6
leaq 0x179d7(%rip), %rsi     # 0x2bb8c
leaq 0x548(%rsp), %rdi
callq 0x3440
jmp 0x141c4
jmp 0x14203
movq 0x370(%rsp), %rdi
leaq 0x1798c(%rip), %rsi     # 0x2bb61
callq 0x3440
jmp 0x141dc
movq 0x710(%rsp), %rax
movq $0x0, (%rax)
leaq 0x1799d(%rip), %rsi     # 0x2bb8f
leaq 0x548(%rsp), %rdi
callq 0x3440
jmp 0x14201
jmp 0x14203
jmp 0x14205
jmp 0x14207
movq 0x348(%rsp), %rdi
leaq 0x17904(%rip), %rsi     # 0x2bb1a
callq 0x3100
cmpl $0x0, %eax
jne 0x1440d
movq 0x370(%rsp), %rdi
leaq 0x1794f(%rip), %rsi     # 0x2bb82
callq 0x3100
cmpl $0x0, %eax
jne 0x14317
xorl %eax, %eax
movl %eax, %edx
leaq 0x460(%rsp), %rdi
leaq 0x6d0(%rsp), %rsi
movl $0x1, %ecx
callq 0x3350
jmp 0x14261
leaq 0x460(%rsp), %rdi
leaq 0x178c3(%rip), %rsi     # 0x2bb33
callq 0x3100
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0x12d(%rsp)
jne 0x14298
cmpq $0x5, 0x678(%rsp)
setae %al
movb %al, 0x12d(%rsp)
movb 0x12d(%rsp), %al
movb %al, 0x12c(%rsp)
leaq 0x460(%rsp), %rdi
callq 0x31e0
movb 0x12c(%rsp), %al
testb $0x1, %al
jne 0x142c0
jmp 0x142d8
leaq 0x178cb(%rip), %rsi     # 0x2bb92
leaq 0x548(%rsp), %rdi
callq 0x3440
jmp 0x142d6
jmp 0x14315
movq 0x370(%rsp), %rdi
leaq 0x1787d(%rip), %rsi     # 0x2bb64
callq 0x3440
jmp 0x142ee
movq 0x710(%rsp), %rax
movq $0x0, (%rax)
leaq 0x17891(%rip), %rsi     # 0x2bb95
leaq 0x548(%rsp), %rdi
callq 0x3440
jmp 0x14313
jmp 0x14315
jmp 0x14317
movq 0x370(%rsp), %rdi
leaq 0x17859(%rip), %rsi     # 0x2bb7f
callq 0x3100
cmpl $0x0, %eax
jne 0x1440b
leaq 0x6d0(%rsp), %rdi
movq %rdi, 0x120(%rsp)
callq 0x3250
movq 0x120(%rsp), %rsi
movq %rax, %rdx
decq %rdx
leaq 0x440(%rsp), %rdi
movl $0x1, %ecx
callq 0x3350
jmp 0x1436b
leaq 0x440(%rsp), %rdi
leaq 0x177b9(%rip), %rsi     # 0x2bb33
callq 0x3100
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0x11f(%rsp)
jne 0x143a2
cmpq $0x5, 0x668(%rsp)
setae %al
movb %al, 0x11f(%rsp)
movb 0x11f(%rsp), %al
movb %al, 0x11e(%rsp)
leaq 0x440(%rsp), %rdi
callq 0x31e0
movb 0x11e(%rsp), %al
testb $0x1, %al
jne 0x143ca
jmp 0x143cc
jmp 0x14409
movq 0x370(%rsp), %rdi
leaq 0x17789(%rip), %rsi     # 0x2bb64
callq 0x3440
jmp 0x143e2
movq 0x710(%rsp), %rax
movq $0x0, (%rax)
leaq 0x177a0(%rip), %rsi     # 0x2bb98
leaq 0x548(%rsp), %rdi
callq 0x3440
jmp 0x14407
jmp 0x14409
jmp 0x1440b
jmp 0x1440d
jmp 0x144b1
movq 0x348(%rsp), %rdi
leaq 0x17712(%rip), %rsi     # 0x2bb33
callq 0x3100
cmpl $0x0, %eax
jne 0x14459
movq 0x370(%rsp), %rdi
leaq 0x17727(%rip), %rsi     # 0x2bb61
callq 0x3440
jmp 0x14441
leaq 0x17753(%rip), %rsi     # 0x2bb9b
leaq 0x548(%rsp), %rdi
callq 0x3440
jmp 0x14457
jmp 0x144a2
movq 0x348(%rsp), %rdi
leaq 0x176b2(%rip), %rsi     # 0x2bb1a
callq 0x3100
cmpl $0x0, %eax
jne 0x144a0
movq 0x370(%rsp), %rdi
leaq 0x176e3(%rip), %rsi     # 0x2bb64
callq 0x3440
jmp 0x14488
leaq 0x1770f(%rip), %rsi     # 0x2bb9e
leaq 0x548(%rsp), %rdi
callq 0x3440
jmp 0x1449e
jmp 0x144a0
jmp 0x144a2
movq 0x710(%rsp), %rax
movq $0x0, (%rax)
jmp 0x144b3
movq 0x24b1e(%rip), %rdi     # 0x38fd8
leaq 0x1761f(%rip), %rsi     # 0x2bae0
callq 0x3320
movq %rax, 0x110(%rsp)
jmp 0x144d0
movq 0x350(%rsp), %rsi
movq 0x110(%rsp), %rdi
callq 0x32e0
movq %rax, 0x108(%rsp)
jmp 0x144ef
movq 0x108(%rsp), %rdi
leaq 0x175f0(%rip), %rsi     # 0x2baee
callq 0x3320
movq %rax, 0x100(%rsp)
jmp 0x1450d
movq 0x370(%rsp), %rsi
movq 0x100(%rsp), %rdi
callq 0x32e0
movq %rax, 0xf8(%rsp)
jmp 0x1452c
movq 0xf8(%rsp), %rdi
leaq 0x175fa(%rip), %rsi     # 0x2bb35
callq 0x3320
movq %rax, 0xf0(%rsp)
jmp 0x1454a
movq 0xf0(%rsp), %rdi
movl 0x71c(%rsp), %esi
callq 0x3540
movq %rax, 0xe8(%rsp)
jmp 0x14568
movq 0xe8(%rsp), %rdi
leaq 0x175cb(%rip), %rsi     # 0x2bb42
callq 0x3320
movq %rax, 0xe0(%rsp)
jmp 0x14586
movq 0x348(%rsp), %rsi
movq 0xe0(%rsp), %rdi
callq 0x32e0
movq %rax, 0xd8(%rsp)
jmp 0x145a5
movq 0xd8(%rsp), %rdi
leaq 0x175ed(%rip), %rsi     # 0x2bba1
callq 0x3320
movq %rax, 0xd0(%rsp)
jmp 0x145c3
movq 0xd0(%rsp), %rdi
movq 0x710(%rsp), %rax
movq (%rax), %rsi
callq 0x30d0
movq %rax, 0xc8(%rsp)
jmp 0x145e5
movq 0xc8(%rsp), %rdi
leaq 0x175b9(%rip), %rsi     # 0x2bbad
callq 0x3320
movq %rax, 0xc0(%rsp)
jmp 0x14603
movq 0xc0(%rsp), %rdi
movq 0x708(%rsp), %rax
movsd (%rax), %xmm0
callq 0x35a0
movq %rax, 0xb8(%rsp)
jmp 0x14626
movq 0xb8(%rsp), %rdi
leaq 0x1758a(%rip), %rsi     # 0x2bbbf
callq 0x3320
movq %rax, 0xb0(%rsp)
jmp 0x14644
movq 0xb0(%rsp), %rdi
leaq 0x548(%rsp), %rsi
callq 0x32e0
movq %rax, 0xa8(%rsp)
jmp 0x14663
movq 0xa8(%rsp), %rdi
leaq 0x17556(%rip), %rsi     # 0x2bbc8
callq 0x3320
jmp 0x14679
movq 0x710(%rsp), %rax
cmpq $0x0, (%rax)
je 0x149f0
movq 0x710(%rsp), %rax
movq (%rax), %rax
subq $0x1, %rax
movl %eax, 0x43c(%rsp)
cmpl $0x0, 0x43c(%rsp)
jle 0x1471a
movq 0x350(%rsp), %rsi
movslq 0x43c(%rsp), %rdx
leaq 0x418(%rsp), %rdi
movl $0x1, %ecx
callq 0x3350
jmp 0x146cf
leaq 0x418(%rsp), %rdi
leaq 0x1736d(%rip), %rsi     # 0x2ba4b
callq 0x3100
movl %eax, 0xa4(%rsp)
leaq 0x418(%rsp), %rdi
callq 0x31e0
movl 0xa4(%rsp), %eax
cmpl $0x0, %eax
jne 0x14716
movl 0x43c(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x43c(%rsp)
jmp 0x14718
jmp 0x1471a
jmp 0x146a1
movq 0x710(%rsp), %rax
movq (%rax), %rax
movl %eax, 0x414(%rsp)
movq 0x350(%rsp), %rdi
movslq 0x414(%rsp), %rax
movq %rax, 0x98(%rsp)
callq 0x3250
movq %rax, %rcx
movq 0x98(%rsp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x147cf
movq 0x350(%rsp), %rsi
movslq 0x414(%rsp), %rdx
leaq 0x3f0(%rsp), %rdi
movl $0x1, %ecx
callq 0x3350
jmp 0x14781
leaq 0x3f0(%rsp), %rdi
leaq 0x172bb(%rip), %rsi     # 0x2ba4b
callq 0x3100
movl %eax, 0x94(%rsp)
leaq 0x3f0(%rsp), %rdi
callq 0x31e0
movl 0x94(%rsp), %eax
cmpl $0x0, %eax
jne 0x147c8
movl 0x414(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x414(%rsp)
jmp 0x147ca
jmp 0x147cf
jmp 0x1472c
movq 0x360(%rsp), %rsi
movl 0x43c(%rsp), %eax
incl %eax
movl %eax, 0x90(%rsp)
leaq 0x3b8(%rsp), %rdi
callq 0x18fb0
jmp 0x147f6
movl 0x90(%rsp), %edi
leaq 0x3b8(%rsp), %rsi
movq %rsi, 0x78(%rsp)
callq 0x15990
movq 0x78(%rsp), %rdi
movq %rax, 0x80(%rsp)
callq 0x19570
movq 0x80(%rsp), %rax
movq 0x360(%rsp), %rsi
movq %rax, 0x3e8(%rsp)
movl 0x414(%rsp), %eax
incl %eax
movl %eax, 0x8c(%rsp)
leaq 0x380(%rsp), %rdi
callq 0x18fb0
jmp 0x14858
movl 0x8c(%rsp), %edi
leaq 0x380(%rsp), %rsi
movq %rsi, 0x60(%rsp)
callq 0x15990
movq 0x60(%rsp), %rdi
movq %rax, 0x68(%rsp)
callq 0x19570
movq 0x68(%rsp), %rax
movq %rax, 0x3b0(%rsp)
movq 0x24744(%rip), %rdi     # 0x38fd8
leaq 0x17331(%rip), %rsi     # 0x2bbcc
callq 0x3320
movq %rax, 0x70(%rsp)
jmp 0x148a7
movq 0x368(%rsp), %rsi
movq 0x70(%rsp), %rdi
callq 0x32e0
movq %rax, 0x58(%rsp)
jmp 0x148c0
movq 0x58(%rsp), %rdi
leaq 0x172fe(%rip), %rsi     # 0x2bbca
callq 0x3320
movq %rax, 0x50(%rsp)
jmp 0x148d8
movq 0x50(%rsp), %rdi
movl 0x43c(%rsp), %esi
incl %esi
callq 0x3540
movq %rax, 0x48(%rsp)
jmp 0x148f2
movq 0x48(%rsp), %rdi
leaq 0x172dd(%rip), %rsi     # 0x2bbdb
callq 0x3320
movq %rax, 0x40(%rsp)
jmp 0x1490a
movq 0x40(%rsp), %rdi
movq 0x3e8(%rsp), %rsi
callq 0x30d0
movq %rax, 0x38(%rsp)
jmp 0x14923
movq 0x38(%rsp), %rdi
leaq 0x172b4(%rip), %rsi     # 0x2bbe3
callq 0x3320
movq %rax, 0x30(%rsp)
jmp 0x1493b
movq 0x30(%rsp), %rdi
movl 0x414(%rsp), %esi
incl %esi
callq 0x3540
movq %rax, 0x28(%rsp)
jmp 0x14955
movq 0x28(%rsp), %rdi
leaq 0x1727a(%rip), %rsi     # 0x2bbdb
callq 0x3320
movq %rax, 0x20(%rsp)
jmp 0x1496d
movq 0x20(%rsp), %rdi
movq 0x3b0(%rsp), %rsi
callq 0x30d0
movq %rax, 0x18(%rsp)
jmp 0x14986
movq 0x18(%rsp), %rdi
leaq 0x17253(%rip), %rsi     # 0x2bbe5
callq 0x3320
movq %rax, 0x10(%rsp)
jmp 0x1499e
movq 0x10(%rsp), %rdi
movq 0x3b0(%rsp), %rsi
movq 0x3e8(%rsp), %rax
subq %rax, %rsi
incq %rsi
callq 0x30d0
movq %rax, 0x8(%rsp)
jmp 0x149c5
movq 0x8(%rsp), %rdi
leaq 0x17624(%rip), %rsi     # 0x2bff5
callq 0x3320
movq %rax, (%rsp)
jmp 0x149dc
movq (%rsp), %rdi
movq 0x245e1(%rip), %rsi     # 0x38fc8
callq 0x3370
jmp 0x149ee
jmp 0x14a07
movq 0x245e1(%rip), %rdi     # 0x38fd8
movq 0x245ca(%rip), %rsi     # 0x38fc8
callq 0x3370
jmp 0x14a05
jmp 0x14a07
movb $0x1, 0x707(%rsp)
movl $0x1, 0x68c(%rsp)
leaq 0x548(%rsp), %rdi
callq 0x31e0
leaq 0x6d0(%rsp), %rdi
callq 0x31e0
testb $0x1, 0x707(%rsp)
jne 0x14a5c
jmp 0x14a4f
leaq 0x6d0(%rsp), %rdi
callq 0x31e0
jmp 0x14a6c
movq 0x370(%rsp), %rdi
callq 0x31e0
movq 0x358(%rsp), %rax
addq $0x738, %rsp            # imm = 0x738
retq
movq 0x370(%rsp), %rdi
callq 0x31e0
movq 0x6f8(%rsp), %rdi
callq 0x3560
nopw %cs:(%rax,%rax)