// File: schneebergerlab[P]GameteBinning/asPollinator_1.0.cpp
// Function: find_bed(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, bool*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>*)
bool find_bed(string poPat, string pmflag, int pollenid, bool* out, vector<string>* bedregions)
{
    /*
      PPuPPMMuMMuuuMMPuuuPuuMuM
      =>
      PPuPP:1:5
           MMuMMuuuMM:6:15
                     PuuuPuu:16:22
                            MuM:23:25
    */
    if(poPat.size()==0) return false; // should never happen
    //
    size_t posp = poPat.find("P");
    size_t posm = poPat.find("M");
    //
    if(posp==std::string::npos && posm==std::string::npos)
    {
        // only "U"
        *out = false;
    }else
    if(posp==std::string::npos && posm!=std::string::npos)
    {
        // only "M"
        std::stringstream ss;
        ss.str("");        
        ss << "M:" << "1:" << poPat.size(); // real position index now
        (*bedregions).push_back(ss.str());
        *out = true;
    }else
    if(posp!=std::string::npos && posm==std::string::npos)
    {
        // only "P"
        std::stringstream ss;
        ss.str("");               
        ss << "P:" << "1:" << poPat.size(); // real position index now
        (*bedregions).push_back(ss.str());      
        *out = true;
    }else
    {    
        // posp!=std::string::npos && posm!=std::string::npos
        // mixture of PMu
        string thisGT            = ""; // starting with P or M?
        size_t thisbegin         = 0;  // 0 based system - this needs to be increased by 1 to get real position index
        size_t thisend           = 0;  // 0 based system - this needs to be increased by 1 to get real position index
        size_t thisend_exclude_u = 0;
        if(posp < posm)
        {
            thisend            = posp;
            thisGT             = "P";
            thisend_exclude_u  = posp;
        }else
        {
            thisend            = posm;
            thisGT             = "M";
            thisend_exclude_u  = posm;
        }
        for(int jj=thisend+1; jj<poPat.size(); jj ++)
        {
            if(poPat.substr(jj, 1).compare("u")==0) 
            {
                thisend           += 1; // extending 
                // reach end of pattern
                if(thisend==poPat.size()-1)
                {
                    // collect current region
                    std::stringstream ss;
                    ss.str("");  
                    ss << thisGT << ":" << thisbegin+1 << ":" << thisend+1; // real position index now        
                    (*bedregions).push_back(ss.str());
                    ss.str().clear();                       
                }
                continue;
            }else
            if(poPat.substr(jj, 1).compare(thisGT)==0)
            {
                thisend           += 1; // extending
                thisend_exclude_u  = jj;
                // reach end of pattern
                if(thisend==poPat.size()-1)
                {
                    // collect current region
                    std::stringstream ss;
                    ss.str("");  
                    ss << thisGT << ":" << thisbegin+1 << ":" << thisend+1; // real position index now        
                    (*bedregions).push_back(ss.str());
                    ss.str().clear();
                }
            }else
            {   // find a switch from thisGT to anotherGT (P->M or M->P)
                // collect current region
                std::stringstream ss;
                ss.str("");
                size_t left_marker_pos = floor((thisend_exclude_u+jj)/2);           // select the middle-left of the ambiguity region
                ss << thisGT << ":" << thisbegin+1 << ":" << left_marker_pos+1;     // real position index now
                (*bedregions).push_back(ss.str());
                ss.str().clear();
                // next region
                if(thisGT.compare("M") == 0) 
                {
                    thisGT = "P";
                }else
                if(thisGT.compare("P") == 0) 
                {
                    thisGT = "M";
                }else ;       
                /* 0-based marker sequence index, left_marker_pos+1 =< jj
                   theoretically, thisbegin is the middle marker position where PuuM or MuuuP happens. 
                      e.g, MuMuuuPuP
                           123456789
                      thisend_exclude_u = 3
                      jj                = 7
                      left_marker_pos = (3+7)/2 = 5 
                      next begin would be left_marker_pos+1 = 6 with new thisend_exclude_u = 6+1
                */
                thisbegin         = left_marker_pos+1;      
                thisend           = jj;
                thisend_exclude_u = jj;
            }
        }
        *out = true;
    }
    //
    return true;
}

// Assembly:
subq $0xb68, %rsp            # imm = 0xB68
movq %rdi, 0x110(%rsp)
movq %rdi, 0xb58(%rsp)
movq %rsi, 0xb50(%rsp)
movl %edx, 0xb4c(%rsp)
movq %rcx, 0xb40(%rsp)
movq %r8, 0xb38(%rsp)
callq 0x3250
cmpq $0x0, %rax
jne 0x14ade
movb $0x0, 0xb67(%rsp)
jmp 0x15964
movq 0x110(%rsp), %rdi
leaq 0x1702d(%rip), %rsi     # 0x2bb1a
xorl %eax, %eax
movl %eax, %edx
callq 0x35e0
movq 0x110(%rsp), %rdi
movq %rax, 0xb30(%rsp)
leaq 0x17026(%rip), %rsi     # 0x2bb33
xorl %eax, %eax
movl %eax, %edx
callq 0x35e0
movq %rax, 0xb28(%rsp)
cmpq $-0x1, 0xb30(%rsp)
jne 0x14b44
cmpq $-0x1, 0xb28(%rsp)
jne 0x14b44
movq 0xb40(%rsp), %rax
movb $0x0, (%rax)
jmp 0x1595c
cmpq $-0x1, 0xb30(%rsp)
jne 0x14d25
cmpq $-0x1, 0xb28(%rsp)
je 0x14d25
leaq 0x9a0(%rsp), %rdi
callq 0x3260
leaq 0x97f(%rsp), %rdi
movq %rdi, 0x108(%rsp)
callq 0x3570
movq 0x108(%rsp), %rdx
leaq 0x172ce(%rip), %rsi     # 0x2be61
leaq 0x980(%rsp), %rdi
callq 0x185e0
jmp 0x14ba2
leaq 0x9a0(%rsp), %rdi
leaq 0x980(%rsp), %rsi
callq 0x33d0
jmp 0x14bb9
leaq 0x980(%rsp), %rdi
callq 0x31e0
leaq 0x97f(%rsp), %rdi
callq 0x3390
leaq 0x9b0(%rsp), %rdi
leaq 0x16ef5(%rip), %rsi     # 0x2bad7
callq 0x3320
movq %rax, 0x100(%rsp)
jmp 0x14bf1
movq 0x100(%rsp), %rdi
leaq 0x16eda(%rip), %rsi     # 0x2bada
callq 0x3320
movq %rax, 0xf8(%rsp)
jmp 0x14c0f
movq 0x110(%rsp), %rdi
callq 0x3250
movq 0xf8(%rsp), %rdi
movq %rax, %rsi
callq 0x30d0
jmp 0x14c2e
movq 0xb38(%rsp), %rax
movq %rax, 0xf0(%rsp)
leaq 0x948(%rsp), %rdi
leaq 0x9a0(%rsp), %rsi
callq 0x3310
jmp 0x14c55
movq 0xf0(%rsp), %rdi
leaq 0x948(%rsp), %rsi
callq 0x19d90
jmp 0x14c6c
leaq 0x948(%rsp), %rdi
callq 0x31e0
movq 0xb40(%rsp), %rax
movb $0x1, (%rax)
leaq 0x9a0(%rsp), %rdi
callq 0x3280
jmp 0x1595a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x970(%rsp)
movl %eax, 0x96c(%rsp)
jmp 0x14ccd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x970(%rsp)
movl %eax, 0x96c(%rsp)
leaq 0x980(%rsp), %rdi
callq 0x31e0
leaq 0x97f(%rsp), %rdi
callq 0x3390
jmp 0x14d13
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x970(%rsp)
movl %eax, 0x96c(%rsp)
jmp 0x14d13
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x970(%rsp)
movl %eax, 0x96c(%rsp)
leaq 0x948(%rsp), %rdi
callq 0x31e0
leaq 0x9a0(%rsp), %rdi
callq 0x3280
jmp 0x15975
cmpq $-0x1, 0xb30(%rsp)
je 0x14f06
cmpq $-0x1, 0xb28(%rsp)
jne 0x14f06
leaq 0x7c0(%rsp), %rdi
callq 0x3260
leaq 0x79f(%rsp), %rdi
movq %rdi, 0xe8(%rsp)
callq 0x3570
movq 0xe8(%rsp), %rdx
leaq 0x170ed(%rip), %rsi     # 0x2be61
leaq 0x7a0(%rsp), %rdi
callq 0x185e0
jmp 0x14d83
leaq 0x7c0(%rsp), %rdi
leaq 0x7a0(%rsp), %rsi
callq 0x33d0
jmp 0x14d9a
leaq 0x7a0(%rsp), %rdi
callq 0x31e0
leaq 0x79f(%rsp), %rdi
callq 0x3390
leaq 0x7d0(%rsp), %rdi
leaq 0x16d1a(%rip), %rsi     # 0x2badd
callq 0x3320
movq %rax, 0xe0(%rsp)
jmp 0x14dd2
movq 0xe0(%rsp), %rdi
leaq 0x16cf9(%rip), %rsi     # 0x2bada
callq 0x3320
movq %rax, 0xd8(%rsp)
jmp 0x14df0
movq 0x110(%rsp), %rdi
callq 0x3250
movq 0xd8(%rsp), %rdi
movq %rax, %rsi
callq 0x30d0
jmp 0x14e0f
movq 0xb38(%rsp), %rax
movq %rax, 0xd0(%rsp)
leaq 0x778(%rsp), %rdi
leaq 0x7c0(%rsp), %rsi
callq 0x3310
jmp 0x14e36
movq 0xd0(%rsp), %rdi
leaq 0x778(%rsp), %rsi
callq 0x19d90
jmp 0x14e4d
leaq 0x778(%rsp), %rdi
callq 0x31e0
movq 0xb40(%rsp), %rax
movb $0x1, (%rax)
leaq 0x7c0(%rsp), %rdi
callq 0x3280
jmp 0x15958
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x970(%rsp)
movl %eax, 0x96c(%rsp)
jmp 0x14eae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x970(%rsp)
movl %eax, 0x96c(%rsp)
leaq 0x7a0(%rsp), %rdi
callq 0x31e0
leaq 0x79f(%rsp), %rdi
callq 0x3390
jmp 0x14ef4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x970(%rsp)
movl %eax, 0x96c(%rsp)
jmp 0x14ef4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x970(%rsp)
movl %eax, 0x96c(%rsp)
leaq 0x778(%rsp), %rdi
callq 0x31e0
leaq 0x7c0(%rsp), %rdi
callq 0x3280
jmp 0x15975
leaq 0x757(%rsp), %rdi
movq %rdi, 0xc8(%rsp)
callq 0x3570
movq 0xc8(%rsp), %rdx
leaq 0x16f37(%rip), %rsi     # 0x2be61
leaq 0x758(%rsp), %rdi
callq 0x185e0
jmp 0x14f39
leaq 0x757(%rsp), %rdi
callq 0x3390
movq $0x0, 0x748(%rsp)
movq $0x0, 0x740(%rsp)
movq $0x0, 0x738(%rsp)
movq 0xb30(%rsp), %rax
cmpq 0xb28(%rsp), %rax
jae 0x14ff3
movq 0xb30(%rsp), %rax
movq %rax, 0x740(%rsp)
leaq 0x16b87(%rip), %rsi     # 0x2bb1a
leaq 0x758(%rsp), %rdi
callq 0x3440
jmp 0x14fa2
movq 0xb30(%rsp), %rax
movq %rax, 0x738(%rsp)
jmp 0x15029
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x970(%rsp)
movl %eax, 0x96c(%rsp)
leaq 0x757(%rsp), %rdi
callq 0x3390
jmp 0x15975
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x970(%rsp)
movl %eax, 0x96c(%rsp)
jmp 0x15949
movq 0xb28(%rsp), %rax
movq %rax, 0x740(%rsp)
leaq 0x16b29(%rip), %rsi     # 0x2bb33
leaq 0x758(%rsp), %rdi
callq 0x3440
jmp 0x15019
movq 0xb28(%rsp), %rax
movq %rax, 0x738(%rsp)
movq 0x740(%rsp), %rax
addq $0x1, %rax
movl %eax, 0x734(%rsp)
movq 0x110(%rsp), %rdi
movslq 0x734(%rsp), %rax
movq %rax, 0xc0(%rsp)
callq 0x3250
movq %rax, %rcx
movq 0xc0(%rsp), %rax
cmpq %rcx, %rax
jae 0x1592f
movq 0x110(%rsp), %rsi
movslq 0x734(%rsp), %rdx
leaq 0x710(%rsp), %rdi
movl $0x1, %ecx
callq 0x3350
jmp 0x15091
leaq 0x710(%rsp), %rdi
leaq 0x169ab(%rip), %rsi     # 0x2ba4b
callq 0x3100
movl %eax, 0xbc(%rsp)
leaq 0x710(%rsp), %rdi
callq 0x31e0
movl 0xbc(%rsp), %eax
cmpl $0x0, %eax
jne 0x1533e
movq 0x110(%rsp), %rdi
movq 0x740(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x740(%rsp)
movq 0x740(%rsp), %rax
movq %rax, 0xb0(%rsp)
callq 0x3250
movq %rax, %rcx
movq 0xb0(%rsp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
jne 0x15339
leaq 0x588(%rsp), %rdi
callq 0x3260
jmp 0x15121
leaq 0x567(%rsp), %rdi
movq %rdi, 0xa8(%rsp)
callq 0x3570
movq 0xa8(%rsp), %rdx
leaq 0x16d1c(%rip), %rsi     # 0x2be61
leaq 0x568(%rsp), %rdi
callq 0x185e0
jmp 0x15154
leaq 0x588(%rsp), %rdi
leaq 0x568(%rsp), %rsi
callq 0x33d0
jmp 0x1516b
leaq 0x568(%rsp), %rdi
callq 0x31e0
leaq 0x567(%rsp), %rdi
callq 0x3390
leaq 0x598(%rsp), %rdi
leaq 0x758(%rsp), %rsi
callq 0x32e0
movq %rax, 0xa0(%rsp)
jmp 0x151a4
movq 0xa0(%rsp), %rdi
leaq 0x16928(%rip), %rsi     # 0x2badb
callq 0x3320
movq %rax, 0x98(%rsp)
jmp 0x151c2
movq 0x98(%rsp), %rdi
movq 0x748(%rsp), %rsi
incq %rsi
callq 0x30d0
movq %rax, 0x90(%rsp)
jmp 0x151e4
movq 0x90(%rsp), %rdi
leaq 0x168e8(%rip), %rsi     # 0x2badb
callq 0x3320
movq %rax, 0x88(%rsp)
jmp 0x15202
movq 0x88(%rsp), %rdi
movq 0x740(%rsp), %rsi
incq %rsi
callq 0x30d0
jmp 0x1521c
movq 0xb38(%rsp), %rax
movq %rax, 0x80(%rsp)
leaq 0x540(%rsp), %rdi
leaq 0x588(%rsp), %rsi
callq 0x3310
jmp 0x15243
movq 0x80(%rsp), %rdi
leaq 0x540(%rsp), %rsi
callq 0x19d90
jmp 0x1525a
leaq 0x540(%rsp), %rdi
callq 0x31e0
leaq 0x520(%rsp), %rdi
leaq 0x588(%rsp), %rsi
callq 0x3310
jmp 0x1527e
leaq 0x520(%rsp), %rdi
callq 0x3430
leaq 0x520(%rsp), %rdi
callq 0x31e0
leaq 0x588(%rsp), %rdi
callq 0x3280
jmp 0x15339
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x970(%rsp)
movl %eax, 0x96c(%rsp)
jmp 0x152e1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x970(%rsp)
movl %eax, 0x96c(%rsp)
leaq 0x568(%rsp), %rdi
callq 0x31e0
leaq 0x567(%rsp), %rdi
callq 0x3390
jmp 0x15327
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x970(%rsp)
movl %eax, 0x96c(%rsp)
jmp 0x15327
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x970(%rsp)
movl %eax, 0x96c(%rsp)
leaq 0x540(%rsp), %rdi
callq 0x31e0
leaq 0x588(%rsp), %rdi
callq 0x3280
jmp 0x15949
jmp 0x15919
movq 0x110(%rsp), %rsi
movslq 0x734(%rsp), %rdx
leaq 0x500(%rsp), %rdi
movl $0x1, %ecx
callq 0x3350
jmp 0x15362
leaq 0x500(%rsp), %rdi
leaq 0x758(%rsp), %rsi
callq 0x3040
movl %eax, 0x7c(%rsp)
jmp 0x1537d
leaq 0x500(%rsp), %rdi
callq 0x31e0
movl 0x7c(%rsp), %eax
cmpl $0x0, %eax
jne 0x15618
movq 0x110(%rsp), %rdi
movq 0x740(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x740(%rsp)
movslq 0x734(%rsp), %rax
movq %rax, 0x738(%rsp)
movq 0x740(%rsp), %rax
movq %rax, 0x70(%rsp)
callq 0x3250
movq %rax, %rcx
movq 0x70(%rsp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
jne 0x15613
leaq 0x378(%rsp), %rdi
callq 0x3260
jmp 0x153f9
leaq 0x357(%rsp), %rdi
movq %rdi, 0x68(%rsp)
callq 0x3570
movq 0x68(%rsp), %rdx
leaq 0x16a4a(%rip), %rsi     # 0x2be61
leaq 0x358(%rsp), %rdi
callq 0x185e0
jmp 0x15426
leaq 0x378(%rsp), %rdi
leaq 0x358(%rsp), %rsi
callq 0x33d0
jmp 0x1543d
leaq 0x358(%rsp), %rdi
callq 0x31e0
leaq 0x357(%rsp), %rdi
callq 0x3390
leaq 0x388(%rsp), %rdi
leaq 0x758(%rsp), %rsi
callq 0x32e0
movq %rax, 0x60(%rsp)
jmp 0x15473
movq 0x60(%rsp), %rdi
leaq 0x1665c(%rip), %rsi     # 0x2badb
callq 0x3320
movq %rax, 0x58(%rsp)
jmp 0x1548b
movq 0x58(%rsp), %rdi
movq 0x748(%rsp), %rsi
incq %rsi
callq 0x30d0
movq %rax, 0x50(%rsp)
jmp 0x154a7
movq 0x50(%rsp), %rdi
leaq 0x16628(%rip), %rsi     # 0x2badb
callq 0x3320
movq %rax, 0x48(%rsp)
jmp 0x154bf
movq 0x48(%rsp), %rdi
movq 0x740(%rsp), %rsi
incq %rsi
callq 0x30d0
jmp 0x154d6
movq 0xb38(%rsp), %rax
movq %rax, 0x40(%rsp)
leaq 0x330(%rsp), %rdi
leaq 0x378(%rsp), %rsi
callq 0x3310
jmp 0x154fa
movq 0x40(%rsp), %rdi
leaq 0x330(%rsp), %rsi
callq 0x19d90
jmp 0x1550e
leaq 0x330(%rsp), %rdi
callq 0x31e0
leaq 0x310(%rsp), %rdi
leaq 0x378(%rsp), %rsi
callq 0x3310
jmp 0x15532
leaq 0x310(%rsp), %rdi
callq 0x3430
leaq 0x310(%rsp), %rdi
callq 0x31e0
leaq 0x378(%rsp), %rdi
callq 0x3280
jmp 0x15613
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x970(%rsp)
movl %eax, 0x96c(%rsp)
leaq 0x500(%rsp), %rdi
callq 0x31e0
jmp 0x15949
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x970(%rsp)
movl %eax, 0x96c(%rsp)
jmp 0x155bb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x970(%rsp)
movl %eax, 0x96c(%rsp)
leaq 0x358(%rsp), %rdi
callq 0x31e0
leaq 0x357(%rsp), %rdi
callq 0x3390
jmp 0x15601
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x970(%rsp)
movl %eax, 0x96c(%rsp)
jmp 0x15601
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x970(%rsp)
movl %eax, 0x96c(%rsp)
leaq 0x330(%rsp), %rdi
callq 0x31e0
leaq 0x378(%rsp), %rdi
callq 0x3280
jmp 0x15949
jmp 0x15915
leaq 0x188(%rsp), %rdi
callq 0x3260
jmp 0x15627
leaq 0x167(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x3570
movq 0x38(%rsp), %rdx
leaq 0x1681c(%rip), %rsi     # 0x2be61
leaq 0x168(%rsp), %rdi
callq 0x185e0
jmp 0x15654
leaq 0x188(%rsp), %rdi
leaq 0x168(%rsp), %rsi
callq 0x33d0
jmp 0x1566b
leaq 0x168(%rsp), %rdi
callq 0x31e0
leaq 0x167(%rsp), %rdi
callq 0x3390
movq 0x738(%rsp), %rdi
movslq 0x734(%rsp), %rax
addq %rax, %rdi
shrq %rdi
callq 0x19dc0
movsd %xmm0, 0x30(%rsp)
jmp 0x156a8
movsd 0x30(%rsp), %xmm0
movsd 0x1596a(%rip), %xmm2    # 0x2b020
movaps %xmm0, %xmm1
subsd %xmm2, %xmm1
cvttsd2si %xmm1, %rcx
cvttsd2si %xmm0, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, 0x158(%rsp)
leaq 0x198(%rsp), %rdi
leaq 0x758(%rsp), %rsi
callq 0x32e0
movq %rax, 0x28(%rsp)
jmp 0x156f8
movq 0x28(%rsp), %rdi
leaq 0x163d7(%rip), %rsi     # 0x2badb
callq 0x3320
movq %rax, 0x20(%rsp)
jmp 0x15710
movq 0x20(%rsp), %rdi
movq 0x748(%rsp), %rsi
incq %rsi
callq 0x30d0
movq %rax, 0x18(%rsp)
jmp 0x1572c
movq 0x18(%rsp), %rdi
leaq 0x163a3(%rip), %rsi     # 0x2badb
callq 0x3320
movq %rax, 0x10(%rsp)
jmp 0x15744
movq 0x10(%rsp), %rdi
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x30d0
jmp 0x1575b
movq 0xb38(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x138(%rsp), %rdi
leaq 0x188(%rsp), %rsi
callq 0x3310
jmp 0x1577f
movq 0x8(%rsp), %rdi
leaq 0x138(%rsp), %rsi
callq 0x19d90
jmp 0x15793
leaq 0x138(%rsp), %rdi
callq 0x31e0
leaq 0x118(%rsp), %rdi
leaq 0x188(%rsp), %rsi
callq 0x3310
jmp 0x157b7
leaq 0x118(%rsp), %rdi
callq 0x3430
leaq 0x118(%rsp), %rdi
callq 0x31e0
leaq 0x758(%rsp), %rdi
leaq 0x16353(%rip), %rsi     # 0x2bb33
callq 0x3100
cmpl $0x0, %eax
jne 0x1588e
leaq 0x16325(%rip), %rsi     # 0x2bb1a
leaq 0x758(%rsp), %rdi
callq 0x3440
jmp 0x15804
jmp 0x158c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x970(%rsp)
movl %eax, 0x96c(%rsp)
jmp 0x15840
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x970(%rsp)
movl %eax, 0x96c(%rsp)
leaq 0x168(%rsp), %rdi
callq 0x31e0
leaq 0x167(%rsp), %rdi
callq 0x3390
jmp 0x15906
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x970(%rsp)
movl %eax, 0x96c(%rsp)
jmp 0x15906
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x970(%rsp)
movl %eax, 0x96c(%rsp)
leaq 0x138(%rsp), %rdi
callq 0x31e0
jmp 0x15906
leaq 0x758(%rsp), %rdi
leaq 0x1627d(%rip), %rsi     # 0x2bb1a
callq 0x3100
cmpl $0x0, %eax
jne 0x158bf
leaq 0x16285(%rip), %rsi     # 0x2bb33
leaq 0x758(%rsp), %rdi
callq 0x3440
jmp 0x158bd
jmp 0x158c1
jmp 0x158c1
jmp 0x158c3
movq 0x158(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x748(%rsp)
movslq 0x734(%rsp), %rax
movq %rax, 0x740(%rsp)
movslq 0x734(%rsp), %rax
movq %rax, 0x738(%rsp)
leaq 0x188(%rsp), %rdi
callq 0x3280
jmp 0x15915
leaq 0x188(%rsp), %rdi
callq 0x3280
jmp 0x15949
jmp 0x15917
jmp 0x15919
movl 0x734(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x734(%rsp)
jmp 0x1503c
movq 0xb40(%rsp), %rax
movb $0x1, (%rax)
leaq 0x758(%rsp), %rdi
callq 0x31e0
jmp 0x15958
leaq 0x758(%rsp), %rdi
callq 0x31e0
jmp 0x15975
jmp 0x1595a
jmp 0x1595c
movb $0x1, 0xb67(%rsp)
movb 0xb67(%rsp), %al
andb $0x1, %al
addq $0xb68, %rsp            # imm = 0xB68
retq
movq 0x970(%rsp), %rdi
callq 0x3560
nopw %cs:(%rax,%rax)