// File: schneebergerlab[P]GameteBinning/asPollinator_1.0.cpp
// Function: get_crossover(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string get_crossover(string poPat, string pmflag)
{
    /*
       not used after 20191101
       poPat  : 'P'/'M' pattern at markers along a contig: PPuPPMMuMMuuuMMMuuuuuMMuM
       pmflag : 'P' or 'M' to indicate cluster of current contig       
    */
    //
    // initialization
    string pmstring = "";
    //    
    string poPatbk = poPat;
    poPat.erase(std::remove(poPat.begin(), poPat.end(), 'u'), poPat.end()); // remove non-effective marekers with value: 'u'
    if(poPat.size()==0) 
    {
        pmstring = "UU";
        return pmstring;
    }
    //
    if(pmflag.compare("P") == 0)
    {
        // get count of 'M' in the beginning of poPat: to check whether it is MP-type pattern
        int Mcnt = 0;
        int Pcnt = 0;
        for(int li=0; li<poPat.size(); li++)
        {
            if(poPat.substr(li, 1).compare("M")==0)
            {
                Mcnt ++;
            }
            if(poPat.substr(li, 1).compare("P")==0)
            {
                Pcnt ++;
            }
            //            
            if(poPat.substr(li, 1).compare("P")==0 &&
               li >= poPat.size()/4) // caution on 1/4 cutoff
            {
                // only check the 1st 1/4 letters
                break;
            }
        }
        // first bit of pmstring
        if( poPat.substr(0, 1).compare("M")==0 && 
            Pcnt<Mcnt                          &&
           (Mcnt>=5 || ( poPat.size()<5 && Mcnt>0 && Mcnt>=poPat.size()/2) ) )// caution on 5   cutoff
        {
            pmstring += "M";
        }else
        {
            pmstring += "P";
        }
        // get count of 'M' in the end of poPat: to check whether it is PM-type pattern
        Mcnt = 0;
        Pcnt = 0;        
        for(int li=poPat.size()-1; li>=0; li--)
        {
            if(poPat.substr(li, 1).compare("M")==0)
            {
                Mcnt ++;
            }
            if(poPat.substr(li, 1).compare("P")==0)
            {
                Pcnt ++;
            } 
            if(poPat.substr(li, 1).compare("P")==0 &&
               li <= poPat.size()*3/4) // caution on 3/4 cutoff
            {
                // only check the last 1/4 letters
                break;
            }
        }
        // second bit of pmstring         
        if(poPat.substr(poPat.size()-1, 1).compare("M")==0 && 
           Pcnt<Mcnt                                       &&           
           ( Mcnt>=5 || (poPat.size()<5 && Mcnt>0 && Mcnt>=poPat.size()/2) ) ) // caution on 5   cutoff
        {
            pmstring += "M";
        }else
        {
            pmstring += "P";
        }     
        //
        cout << "   Check2rm: " << poPatbk << " ---- determined as " << pmstring << " for pollen in cluster P" << endl;
    }
    //
    if(pmflag.compare("M") == 0)
    {
        // get count of 'P' in the beginning of poPat: to check whether it is xM-type pattern
        int Pcnt = 0;
        int Mcnt = 0;
        for(int li=0; li<poPat.size(); li++)
        {
            if(poPat.substr(li, 1).compare("P")==0)
            {
                Pcnt ++;
            }
            if(poPat.substr(li, 1).compare("M")==0)
            {
                Mcnt ++;
            }
            if(poPat.substr(li, 1).compare("M")==0 &&
               li >= poPat.size()/4) // caution on 1/4 cutoff
            {
                // only check the 1st 1/4 letters
                break;
            }
        }
        // first bit of pmstring: if number of markers too small, the left-most must be "P" to determine it as "P"
        if(poPat.substr(0, 1).compare("P")==0 && 
           Mcnt<Pcnt                          &&                      
           ( Pcnt>=5 || ( poPat.size()<5 && Pcnt>0 && Pcnt>=poPat.size()/2) ) )// caution on 5   cutoff
        {
            pmstring += "P";
        }else
        {
            pmstring += "M";
        }
        // get count of 'P' in the end of poPat: to check whether it is xP-type pattern
        Pcnt = 0;
        Mcnt = 0;        
        for(int li=poPat.size()-1; li>=0; li--)
        {
            if(poPat.substr(li, 1).compare("P")==0)
            {
                Pcnt ++;
            }
            if(poPat.substr(li, 1).compare("M")==0)
            {
                Mcnt ++;
            }            
            if(poPat.substr(li, 1).compare("M")==0 &&
               li <= poPat.size()*3/4) // caution on 3/4 cutoff
            {
                // only check the last 1/4 letters
                break;
            }
        }  
        // second bit of pmstring: if number of markers too small, the right-most must be "P" to determine it as "P"
        if(poPat.substr(poPat.size()-1, 1).compare("P")==0 && 
           Mcnt<Pcnt                                       &&        
           ( Pcnt>=5 || (poPat.size()<5 && Pcnt>0 && Pcnt>=poPat.size()/2) ) )// caution on 5   cutoff
        {
            pmstring += "P";
        }else
        {
            pmstring += "M";
        }
        //
        cout << "   Check2rm: " << poPatbk << " ---- determined as " << pmstring << " for pollen in cluster M" << endl;
    }
    //
    return pmstring;
}

// Assembly:
subq $0x408, %rsp            # imm = 0x408
movq %rdx, 0x120(%rsp)
movq %rsi, 0x128(%rsp)
movq %rdi, 0x138(%rsp)
movq %rdi, %rax
movq %rax, 0x130(%rsp)
movq %rdi, 0x400(%rsp)
movq %rsi, 0x3f8(%rsp)
movq %rdx, 0x3f0(%rsp)
movb $0x0, 0x3ef(%rsp)
leaq 0x3ee(%rsp), %rdi
movq %rdi, 0x140(%rsp)
callq 0x3570
movq 0x138(%rsp), %rdi
movq 0x140(%rsp), %rdx
leaq 0x1513b(%rip), %rsi     # 0x2be61
callq 0x185e0
jmp 0x16d2d
leaq 0x3ee(%rsp), %rdi
callq 0x3390
movq 0x128(%rsp), %rsi
leaq 0x3b8(%rsp), %rdi
callq 0x3160
jmp 0x16d51
movq 0x128(%rsp), %rdi
callq 0x32c0
movq 0x128(%rsp), %rdi
movq %rax, 0x3a0(%rsp)
callq 0x31c0
movq %rax, 0x398(%rsp)
movb $0x75, 0x397(%rsp)
movq 0x3a0(%rsp), %rdi
movq 0x398(%rsp), %rsi
leaq 0x397(%rsp), %rdx
callq 0x19e00
movq %rax, 0x118(%rsp)
jmp 0x16daa
movq 0x118(%rsp), %rax
movq %rax, 0x3a8(%rsp)
leaq 0x3b0(%rsp), %rdi
leaq 0x3a8(%rsp), %rsi
callq 0x19e60
movq 0x128(%rsp), %rdi
callq 0x31c0
movq %rax, 0x380(%rsp)
leaq 0x388(%rsp), %rdi
leaq 0x380(%rsp), %rsi
callq 0x19e60
movq 0x128(%rsp), %rdi
movq 0x3b0(%rsp), %rsi
movq 0x388(%rsp), %rdx
callq 0x30c0
movq %rax, 0x110(%rsp)
jmp 0x16e20
movq 0x128(%rsp), %rdi
movq 0x110(%rsp), %rax
movq %rax, 0x378(%rsp)
callq 0x3250
cmpq $0x0, %rax
jne 0x16eda
movq 0x138(%rsp), %rdi
leaq 0x14bf7(%rip), %rsi     # 0x2ba4d
callq 0x3440
jmp 0x16e5d
movb $0x1, 0x3ef(%rsp)
movl $0x1, 0x374(%rsp)
jmp 0x17caf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3e0(%rsp)
movl %eax, 0x3dc(%rsp)
leaq 0x3ee(%rsp), %rdi
callq 0x3390
jmp 0x17cf0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3e0(%rsp)
movl %eax, 0x3dc(%rsp)
jmp 0x17ce3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3e0(%rsp)
movl %eax, 0x3dc(%rsp)
leaq 0x3b8(%rsp), %rdi
callq 0x31e0
jmp 0x17ce3
movq 0x120(%rsp), %rdi
leaq 0x14c31(%rip), %rsi     # 0x2bb1a
callq 0x3100
cmpl $0x0, %eax
jne 0x1761d
movl $0x0, 0x370(%rsp)
movl $0x0, 0x36c(%rsp)
movl $0x0, 0x368(%rsp)
movq 0x128(%rsp), %rdi
movslq 0x368(%rsp), %rax
movq %rax, 0x108(%rsp)
callq 0x3250
movq %rax, %rcx
movq 0x108(%rsp), %rax
cmpq %rcx, %rax
jae 0x170de
movq 0x128(%rsp), %rsi
movslq 0x368(%rsp), %rdx
leaq 0x348(%rsp), %rdi
movl $0x1, %ecx
callq 0x3350
jmp 0x16f6d
leaq 0x348(%rsp), %rdi
leaq 0x14bb7(%rip), %rsi     # 0x2bb33
callq 0x3100
movl %eax, 0x104(%rsp)
leaq 0x348(%rsp), %rdi
callq 0x31e0
movl 0x104(%rsp), %eax
cmpl $0x0, %eax
jne 0x16fb2
movl 0x370(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x370(%rsp)
movq 0x128(%rsp), %rsi
movslq 0x368(%rsp), %rdx
leaq 0x328(%rsp), %rdi
movl $0x1, %ecx
callq 0x3350
jmp 0x16fd6
leaq 0x328(%rsp), %rdi
leaq 0x14b35(%rip), %rsi     # 0x2bb1a
callq 0x3100
movl %eax, 0x100(%rsp)
leaq 0x328(%rsp), %rdi
callq 0x31e0
movl 0x100(%rsp), %eax
cmpl $0x0, %eax
jne 0x1701b
movl 0x36c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x36c(%rsp)
movq 0x128(%rsp), %rsi
movslq 0x368(%rsp), %rdx
leaq 0x308(%rsp), %rdi
movl $0x1, %ecx
callq 0x3350
jmp 0x1703f
leaq 0x308(%rsp), %rdi
leaq 0x14acc(%rip), %rsi     # 0x2bb1a
callq 0x3100
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0xff(%rsp)
jne 0x1709c
movq 0x128(%rsp), %rdi
movslq 0x368(%rsp), %rax
movq %rax, 0xf0(%rsp)
callq 0x3250
movq %rax, %rcx
movq 0xf0(%rsp), %rax
shrq $0x2, %rcx
cmpq %rcx, %rax
setae %al
movb %al, 0xff(%rsp)
movb 0xff(%rsp), %al
movb %al, 0xef(%rsp)
leaq 0x308(%rsp), %rdi
callq 0x31e0
movb 0xef(%rsp), %al
testb $0x1, %al
jne 0x170c4
jmp 0x170c6
jmp 0x170de
jmp 0x170c8
movl 0x368(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x368(%rsp)
jmp 0x16f18
movq 0x128(%rsp), %rsi
xorl %eax, %eax
movl %eax, %edx
leaq 0x2e8(%rsp), %rdi
movl $0x1, %ecx
callq 0x3350
jmp 0x170fe
leaq 0x2e8(%rsp), %rdi
leaq 0x14a26(%rip), %rsi     # 0x2bb33
callq 0x3100
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0xee(%rsp)
jne 0x171dc
movl 0x36c(%rsp), %ecx
xorl %eax, %eax
cmpl 0x370(%rsp), %ecx
movb %al, 0xee(%rsp)
jge 0x171dc
movb $0x1, %al
cmpl $0x5, 0x370(%rsp)
movb %al, 0xed(%rsp)
jge 0x171ce
movq 0x128(%rsp), %rdi
callq 0x3250
movq %rax, %rcx
xorl %eax, %eax
cmpq $0x5, %rcx
movb %al, 0xec(%rsp)
jae 0x171c0
xorl %eax, %eax
cmpl $0x0, 0x370(%rsp)
movb %al, 0xec(%rsp)
jle 0x171c0
movq 0x128(%rsp), %rdi
movslq 0x370(%rsp), %rax
movq %rax, 0xe0(%rsp)
callq 0x3250
movq %rax, %rcx
movq 0xe0(%rsp), %rax
shrq %rcx
cmpq %rcx, %rax
setae %al
movb %al, 0xec(%rsp)
movb 0xec(%rsp), %al
movb %al, 0xed(%rsp)
movb 0xed(%rsp), %al
movb %al, 0xee(%rsp)
movb 0xee(%rsp), %al
movb %al, 0xdf(%rsp)
leaq 0x2e8(%rsp), %rdi
callq 0x31e0
movb 0xdf(%rsp), %al
testb $0x1, %al
jne 0x17204
jmp 0x1721c
movq 0x138(%rsp), %rdi
leaq 0x14920(%rip), %rsi     # 0x2bb33
callq 0x3300
jmp 0x1721a
jmp 0x17234
movq 0x138(%rsp), %rdi
leaq 0x148ef(%rip), %rsi     # 0x2bb1a
callq 0x3300
jmp 0x17232
jmp 0x17234
movq 0x128(%rsp), %rdi
movl $0x0, 0x370(%rsp)
movl $0x0, 0x36c(%rsp)
callq 0x3250
subq $0x1, %rax
movl %eax, 0x2e4(%rsp)
cmpl $0x0, 0x2e4(%rsp)
jl 0x17409
movq 0x128(%rsp), %rsi
movslq 0x2e4(%rsp), %rdx
leaq 0x2c0(%rsp), %rdi
movl $0x1, %ecx
callq 0x3350
jmp 0x17294
leaq 0x2c0(%rsp), %rdi
leaq 0x14890(%rip), %rsi     # 0x2bb33
callq 0x3100
movl %eax, 0xd8(%rsp)
leaq 0x2c0(%rsp), %rdi
callq 0x31e0
movl 0xd8(%rsp), %eax
cmpl $0x0, %eax
jne 0x172d9
movl 0x370(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x370(%rsp)
movq 0x128(%rsp), %rsi
movslq 0x2e4(%rsp), %rdx
leaq 0x2a0(%rsp), %rdi
movl $0x1, %ecx
callq 0x3350
jmp 0x172fd
leaq 0x2a0(%rsp), %rdi
leaq 0x1480e(%rip), %rsi     # 0x2bb1a
callq 0x3100
movl %eax, 0xd4(%rsp)
leaq 0x2a0(%rsp), %rdi
callq 0x31e0
movl 0xd4(%rsp), %eax
cmpl $0x0, %eax
jne 0x17342
movl 0x36c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x36c(%rsp)
movq 0x128(%rsp), %rsi
movslq 0x2e4(%rsp), %rdx
leaq 0x280(%rsp), %rdi
movl $0x1, %ecx
callq 0x3350
jmp 0x17366
leaq 0x280(%rsp), %rdi
leaq 0x147a5(%rip), %rsi     # 0x2bb1a
callq 0x3100
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0xd3(%rsp)
jne 0x173c7
movq 0x128(%rsp), %rdi
movslq 0x2e4(%rsp), %rax
movq %rax, 0xc8(%rsp)
callq 0x3250
movq %rax, %rcx
movq 0xc8(%rsp), %rax
imulq $0x3, %rcx, %rcx
shrq $0x2, %rcx
cmpq %rcx, %rax
setbe %al
movb %al, 0xd3(%rsp)
movb 0xd3(%rsp), %al
movb %al, 0xc7(%rsp)
leaq 0x280(%rsp), %rdi
callq 0x31e0
movb 0xc7(%rsp), %al
testb $0x1, %al
jne 0x173ef
jmp 0x173f1
jmp 0x17409
jmp 0x173f3
movl 0x2e4(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x2e4(%rsp)
jmp 0x17262
movq 0x128(%rsp), %rdi
callq 0x3250
movq 0x128(%rsp), %rsi
movq %rax, %rdx
decq %rdx
leaq 0x260(%rsp), %rdi
movl $0x1, %ecx
callq 0x3350
jmp 0x17438
leaq 0x260(%rsp), %rdi
leaq 0x146ec(%rip), %rsi     # 0x2bb33
callq 0x3100
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0xc6(%rsp)
jne 0x17516
movl 0x36c(%rsp), %ecx
xorl %eax, %eax
cmpl 0x370(%rsp), %ecx
movb %al, 0xc6(%rsp)
jge 0x17516
movb $0x1, %al
cmpl $0x5, 0x370(%rsp)
movb %al, 0xc5(%rsp)
jge 0x17508
movq 0x128(%rsp), %rdi
callq 0x3250
movq %rax, %rcx
xorl %eax, %eax
cmpq $0x5, %rcx
movb %al, 0xc4(%rsp)
jae 0x174fa
xorl %eax, %eax
cmpl $0x0, 0x370(%rsp)
movb %al, 0xc4(%rsp)
jle 0x174fa
movq 0x128(%rsp), %rdi
movslq 0x370(%rsp), %rax
movq %rax, 0xb8(%rsp)
callq 0x3250
movq %rax, %rcx
movq 0xb8(%rsp), %rax
shrq %rcx
cmpq %rcx, %rax
setae %al
movb %al, 0xc4(%rsp)
movb 0xc4(%rsp), %al
movb %al, 0xc5(%rsp)
movb 0xc5(%rsp), %al
movb %al, 0xc6(%rsp)
movb 0xc6(%rsp), %al
movb %al, 0xb7(%rsp)
leaq 0x260(%rsp), %rdi
callq 0x31e0
movb 0xb7(%rsp), %al
testb $0x1, %al
jne 0x1753e
jmp 0x17556
movq 0x138(%rsp), %rdi
leaq 0x145e6(%rip), %rsi     # 0x2bb33
callq 0x3300
jmp 0x17554
jmp 0x1756e
movq 0x138(%rsp), %rdi
leaq 0x145b5(%rip), %rsi     # 0x2bb1a
callq 0x3300
jmp 0x1756c
jmp 0x1756e
movq 0x21a63(%rip), %rdi     # 0x38fd8
leaq 0x14564(%rip), %rsi     # 0x2bae0
callq 0x3320
movq %rax, 0xa8(%rsp)
jmp 0x1758b
movq 0xa8(%rsp), %rdi
leaq 0x3b8(%rsp), %rsi
callq 0x32e0
movq %rax, 0xa0(%rsp)
jmp 0x175aa
movq 0xa0(%rsp), %rdi
leaq 0x14535(%rip), %rsi     # 0x2baee
callq 0x3320
movq %rax, 0x98(%rsp)
jmp 0x175c8
movq 0x138(%rsp), %rsi
movq 0x98(%rsp), %rdi
callq 0x32e0
movq %rax, 0x90(%rsp)
jmp 0x175e7
movq 0x90(%rsp), %rdi
leaq 0x1450d(%rip), %rsi     # 0x2bb03
callq 0x3320
movq %rax, 0x88(%rsp)
jmp 0x17605
movq 0x88(%rsp), %rdi
movq 0x219b4(%rip), %rsi     # 0x38fc8
callq 0x3370
jmp 0x1761b
jmp 0x1761d
movq 0x120(%rsp), %rdi
leaq 0x14507(%rip), %rsi     # 0x2bb33
callq 0x3100
cmpl $0x0, %eax
jne 0x17c9c
movl $0x0, 0x25c(%rsp)
movl $0x0, 0x258(%rsp)
movl $0x0, 0x254(%rsp)
movq 0x128(%rsp), %rdi
movslq 0x254(%rsp), %rax
movq %rax, 0x80(%rsp)
callq 0x3250
movq %rax, %rcx
movq 0x80(%rsp), %rax
cmpq %rcx, %rax
jae 0x17800
movq 0x128(%rsp), %rsi
movslq 0x254(%rsp), %rdx
leaq 0x230(%rsp), %rdi
movl $0x1, %ecx
callq 0x3350
jmp 0x176b0
leaq 0x230(%rsp), %rdi
leaq 0x1445b(%rip), %rsi     # 0x2bb1a
callq 0x3100
movl %eax, 0x7c(%rsp)
leaq 0x230(%rsp), %rdi
callq 0x31e0
movl 0x7c(%rsp), %eax
cmpl $0x0, %eax
jne 0x176ef
movl 0x25c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x25c(%rsp)
movq 0x128(%rsp), %rsi
movslq 0x254(%rsp), %rdx
leaq 0x210(%rsp), %rdi
movl $0x1, %ecx
callq 0x3350
jmp 0x17713
leaq 0x210(%rsp), %rdi
leaq 0x14411(%rip), %rsi     # 0x2bb33
callq 0x3100
movl %eax, 0x78(%rsp)
leaq 0x210(%rsp), %rdi
callq 0x31e0
movl 0x78(%rsp), %eax
cmpl $0x0, %eax
jne 0x17752
movl 0x258(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x258(%rsp)
movq 0x128(%rsp), %rsi
movslq 0x254(%rsp), %rdx
leaq 0x1f0(%rsp), %rdi
movl $0x1, %ecx
callq 0x3350
jmp 0x17776
leaq 0x1f0(%rsp), %rdi
leaq 0x143ae(%rip), %rsi     # 0x2bb33
callq 0x3100
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0x77(%rsp)
jne 0x177c7
movq 0x128(%rsp), %rdi
movslq 0x254(%rsp), %rax
movq %rax, 0x68(%rsp)
callq 0x3250
movq %rax, %rcx
movq 0x68(%rsp), %rax
shrq $0x2, %rcx
cmpq %rcx, %rax
setae %al
movb %al, 0x77(%rsp)
movb 0x77(%rsp), %al
movb %al, 0x67(%rsp)
leaq 0x1f0(%rsp), %rdi
callq 0x31e0
movb 0x67(%rsp), %al
testb $0x1, %al
jne 0x177e6
jmp 0x177e8
jmp 0x17800
jmp 0x177ea
movl 0x254(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x254(%rsp)
jmp 0x1765b
movq 0x128(%rsp), %rsi
xorl %eax, %eax
movl %eax, %edx
leaq 0x1d0(%rsp), %rdi
movl $0x1, %ecx
callq 0x3350
jmp 0x17820
leaq 0x1d0(%rsp), %rdi
leaq 0x142eb(%rip), %rsi     # 0x2bb1a
callq 0x3100
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0x66(%rsp)
jne 0x178d6
movl 0x258(%rsp), %ecx
xorl %eax, %eax
cmpl 0x25c(%rsp), %ecx
movb %al, 0x66(%rsp)
jge 0x178d6
movb $0x1, %al
cmpl $0x5, 0x25c(%rsp)
movb %al, 0x65(%rsp)
jge 0x178ce
movq 0x128(%rsp), %rdi
callq 0x3250
movq %rax, %rcx
xorl %eax, %eax
cmpq $0x5, %rcx
movb %al, 0x64(%rsp)
jae 0x178c6
xorl %eax, %eax
cmpl $0x0, 0x25c(%rsp)
movb %al, 0x64(%rsp)
jle 0x178c6
movq 0x128(%rsp), %rdi
movslq 0x25c(%rsp), %rax
movq %rax, 0x58(%rsp)
callq 0x3250
movq %rax, %rcx
movq 0x58(%rsp), %rax
shrq %rcx
cmpq %rcx, %rax
setae %al
movb %al, 0x64(%rsp)
movb 0x64(%rsp), %al
movb %al, 0x65(%rsp)
movb 0x65(%rsp), %al
movb %al, 0x66(%rsp)
movb 0x66(%rsp), %al
movb %al, 0x57(%rsp)
leaq 0x1d0(%rsp), %rdi
callq 0x31e0
movb 0x57(%rsp), %al
testb $0x1, %al
jne 0x178f5
jmp 0x1790d
movq 0x138(%rsp), %rdi
leaq 0x14216(%rip), %rsi     # 0x2bb1a
callq 0x3300
jmp 0x1790b
jmp 0x17925
movq 0x138(%rsp), %rdi
leaq 0x14217(%rip), %rsi     # 0x2bb33
callq 0x3300
jmp 0x17923
jmp 0x17925
movq 0x128(%rsp), %rdi
movl $0x0, 0x25c(%rsp)
movl $0x0, 0x258(%rsp)
callq 0x3250
subq $0x1, %rax
movl %eax, 0x1cc(%rsp)
cmpl $0x0, 0x1cc(%rsp)
jl 0x17ad9
movq 0x128(%rsp), %rsi
movslq 0x1cc(%rsp), %rdx
leaq 0x1a8(%rsp), %rdi
movl $0x1, %ecx
callq 0x3350
jmp 0x17985
leaq 0x1a8(%rsp), %rdi
leaq 0x14186(%rip), %rsi     # 0x2bb1a
callq 0x3100
movl %eax, 0x50(%rsp)
leaq 0x1a8(%rsp), %rdi
callq 0x31e0
movl 0x50(%rsp), %eax
cmpl $0x0, %eax
jne 0x179c4
movl 0x25c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x25c(%rsp)
movq 0x128(%rsp), %rsi
movslq 0x1cc(%rsp), %rdx
leaq 0x188(%rsp), %rdi
movl $0x1, %ecx
callq 0x3350
jmp 0x179e8
leaq 0x188(%rsp), %rdi
leaq 0x1413c(%rip), %rsi     # 0x2bb33
callq 0x3100
movl %eax, 0x4c(%rsp)
leaq 0x188(%rsp), %rdi
callq 0x31e0
movl 0x4c(%rsp), %eax
cmpl $0x0, %eax
jne 0x17a27
movl 0x258(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x258(%rsp)
movq 0x128(%rsp), %rsi
movslq 0x1cc(%rsp), %rdx
leaq 0x168(%rsp), %rdi
movl $0x1, %ecx
callq 0x3350
jmp 0x17a4b
leaq 0x168(%rsp), %rdi
leaq 0x140d9(%rip), %rsi     # 0x2bb33
callq 0x3100
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0x4b(%rsp)
jne 0x17aa0
movq 0x128(%rsp), %rdi
movslq 0x1cc(%rsp), %rax
movq %rax, 0x40(%rsp)
callq 0x3250
movq %rax, %rcx
movq 0x40(%rsp), %rax
imulq $0x3, %rcx, %rcx
shrq $0x2, %rcx
cmpq %rcx, %rax
setbe %al
movb %al, 0x4b(%rsp)
movb 0x4b(%rsp), %al
movb %al, 0x3f(%rsp)
leaq 0x168(%rsp), %rdi
callq 0x31e0
movb 0x3f(%rsp), %al
testb $0x1, %al
jne 0x17abf
jmp 0x17ac1
jmp 0x17ad9
jmp 0x17ac3
movl 0x1cc(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x1cc(%rsp)
jmp 0x17953
movq 0x128(%rsp), %rdi
callq 0x3250
movq 0x128(%rsp), %rsi
movq %rax, %rdx
decq %rdx
leaq 0x148(%rsp), %rdi
movl $0x1, %ecx
callq 0x3350
jmp 0x17b08
leaq 0x148(%rsp), %rdi
leaq 0x14003(%rip), %rsi     # 0x2bb1a
callq 0x3100
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0x3e(%rsp)
jne 0x17bbe
movl 0x258(%rsp), %ecx
xorl %eax, %eax
cmpl 0x25c(%rsp), %ecx
movb %al, 0x3e(%rsp)
jge 0x17bbe
movb $0x1, %al
cmpl $0x5, 0x25c(%rsp)
movb %al, 0x3d(%rsp)
jge 0x17bb6
movq 0x128(%rsp), %rdi
callq 0x3250
movq %rax, %rcx
xorl %eax, %eax
cmpq $0x5, %rcx
movb %al, 0x3c(%rsp)
jae 0x17bae
xorl %eax, %eax
cmpl $0x0, 0x25c(%rsp)
movb %al, 0x3c(%rsp)
jle 0x17bae
movq 0x128(%rsp), %rdi
movslq 0x25c(%rsp), %rax
movq %rax, 0x30(%rsp)
callq 0x3250
movq %rax, %rcx
movq 0x30(%rsp), %rax
shrq %rcx
cmpq %rcx, %rax
setae %al
movb %al, 0x3c(%rsp)
movb 0x3c(%rsp), %al
movb %al, 0x3d(%rsp)
movb 0x3d(%rsp), %al
movb %al, 0x3e(%rsp)
movb 0x3e(%rsp), %al
movb %al, 0x2f(%rsp)
leaq 0x148(%rsp), %rdi
callq 0x31e0
movb 0x2f(%rsp), %al
testb $0x1, %al
jne 0x17bdd
jmp 0x17bf5
movq 0x138(%rsp), %rdi
leaq 0x13f2e(%rip), %rsi     # 0x2bb1a
callq 0x3300
jmp 0x17bf3
jmp 0x17c0d
movq 0x138(%rsp), %rdi
leaq 0x13f2f(%rip), %rsi     # 0x2bb33
callq 0x3300
jmp 0x17c0b
jmp 0x17c0d
movq 0x213c4(%rip), %rdi     # 0x38fd8
leaq 0x13ec5(%rip), %rsi     # 0x2bae0
callq 0x3320
movq %rax, 0x20(%rsp)
jmp 0x17c27
movq 0x20(%rsp), %rdi
leaq 0x3b8(%rsp), %rsi
callq 0x32e0
movq %rax, 0x18(%rsp)
jmp 0x17c40
movq 0x18(%rsp), %rdi
leaq 0x13ea2(%rip), %rsi     # 0x2baee
callq 0x3320
movq %rax, 0x10(%rsp)
jmp 0x17c58
movq 0x138(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x32e0
movq %rax, 0x8(%rsp)
jmp 0x17c71
movq 0x8(%rsp), %rdi
leaq 0x13e9f(%rip), %rsi     # 0x2bb1c
callq 0x3320
movq %rax, (%rsp)
jmp 0x17c88
movq (%rsp), %rdi
movq 0x21335(%rip), %rsi     # 0x38fc8
callq 0x3370
jmp 0x17c9a
jmp 0x17c9c
movb $0x1, 0x3ef(%rsp)
movl $0x1, 0x374(%rsp)
leaq 0x3b8(%rsp), %rdi
callq 0x31e0
testb $0x1, 0x3ef(%rsp)
jne 0x17cd3
movq 0x138(%rsp), %rdi
callq 0x31e0
movq 0x130(%rsp), %rax
addq $0x408, %rsp            # imm = 0x408
retq
movq 0x138(%rsp), %rdi
callq 0x31e0
movq 0x3e0(%rsp), %rdi
callq 0x3560
nopl (%rax)