// File: /workspace/github_cpp_makefile_star2_O2/schneebergerlab[P]DrLink/postprocess_bpPrediction.cpp
// Function: postprocess_bpPrediction(std::multimap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::multimap<unsigned long, BPINFO, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, BPINFO>>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::multimap<unsigned long, BPINFO, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, BPINFO>>>>>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool postprocess_bpPrediction(multimap<string, multimap<unsigned long, BPINFO> > rawbpmap, string finalbpfile)
{
    multimap<string, multimap<unsigned long, BPINFO> > tmpmap = rawbpmap;
    // output final clusters
    fstream finfp;
    finfp.open(finalbpfile.c_str(), ios::out);
    if(!finfp.good())
    {
        cout << "   Error: cannot open file " << finalbpfile 
             << " for collecting final break point predictions. " << endl;
        return false;
    }    
    finfp << "#chr\t"
          << "left_pos\t"
          << "right_pos\t"
          << "score\t"
          << "left_alleles\t"
          << "right_alleles\t"
          << "barcode\t"
          << "molecule_len\t"
          << "left_span\t"
          << "right_span\t"
          << "Max_interval_size\t"
          << "Min_interval_size\t"
          << "support\n";
    int groupNum = 0;
    // this function overlaps predicted breakpoints
    multimap<string, multimap<unsigned long, BPINFO> >::iterator chritr;
    multimap<string, multimap<unsigned long, BPINFO> >::iterator chritr_end;
    chritr = rawbpmap.begin();
    chritr_end = rawbpmap.end();
    while(chritr != chritr_end)
    {
        multimap<unsigned long, BPINFO> tmp;
        tmp = (*chritr).second;
        multimap<unsigned long, BPINFO>::iterator litr;
        multimap<unsigned long, BPINFO>::iterator litr_end;
        litr = tmp.begin();
        litr_end = tmp.end();
        // get first break point of current chr
        vector<string>        targcluster;
        vector<string>        targchr;
        vector<unsigned long> targleftp;
        vector<unsigned long> targrightp;
        vector<unsigned long> targrightMax;
        vector<unsigned long> targrightMin;
        vector<unsigned long> targleftMax;
        vector<unsigned long> targleftMin;
        vector<double>        targscore;
        vector<string>        targorder;
        targchr.push_back(((*litr).second).chr);
        targcluster.push_back(((*litr).second).bpline);
        targleftp.push_back(((*litr).second).leftp);
        targrightp.push_back(((*litr).second).rightp);
        targscore.push_back(((*litr).second).score);
        targorder.push_back(((*litr).second).order);        
        targrightMax.push_back(((*litr).second).rightp);
        targrightMin.push_back(((*litr).second).rightp);
        targleftMax.push_back(((*litr).second).leftp);
        targleftMin.push_back(((*litr).second).leftp);
        // next break point
        litr ++;
        while(litr != litr_end)
        {
            // processing here
            unsigned long ileftp  = ((*litr).second).leftp;
            unsigned long irightp = ((*litr).second).rightp; 
            string        iorder  = ((*litr).second).order;     
            
            bool grouped = false;
            for(int vi = 0; vi < targcluster.size(); vi ++)
            {
                if(iorder.compare(targorder[vi])==0 && ileftp < targrightMin[vi])
                {
                    targcluster[vi] += "\n#"+ ( (*litr).second ).bpline;
                    // right max
                    if(irightp > targrightMax[vi])
                    {
                        targrightMax[vi] = irightp;
                    }
                    // right min
                    if(irightp < targrightMin[vi])
                    {
                        targrightMin[vi] = irightp;
                    }
                    // left max
                    if(ileftp > targleftMax[vi])
                    {
                        targleftMax[vi] = ileftp;
                    }  
                    // left min
                    if(ileftp < targleftMin[vi])
                    {
                        targleftMin[vi] = ileftp;
                    }     
                    // sum of score
                    targscore[vi] += ( (*litr).second ).score;                      
                    //
                    grouped = true;
                }
            }
            if(!grouped)
            {
                targchr.push_back(((*litr).second).chr);
                targcluster.push_back(((*litr).second).bpline);
                targleftp.push_back(((*litr).second).leftp);
                targrightp.push_back(((*litr).second).rightp);
                targscore.push_back(((*litr).second).score);
                targorder.push_back(((*litr).second).order);        
                targrightMax.push_back(((*litr).second).rightp);
                targrightMin.push_back(((*litr).second).rightp);
                targleftMax.push_back(((*litr).second).leftp);
                targleftMin.push_back(((*litr).second).leftp);
            }
            
            litr ++;
        }
        // output current chr
        for(int vi = 0; vi < targcluster.size(); vi ++)
        {
            int support = std::count(targcluster[vi].begin(), targcluster[vi].end(), '#') + 1;
            // using intersection (targleftMin, targrightMax) of overlapped predictions as final interval
            finfp << "#." << ++groupNum         << "\n" 
                  << targchr[vi]                << "\t" 
                  << targleftMax[vi]            << "\t" 
                  << targrightMin[vi]           << "\t" << fixed << std::setprecision(2) 
                  << targscore[vi]/support      << "\t"
                  << targorder[vi].substr(0, 1) << "\t" 
                  << targorder[vi].substr(1, 1) << "\tBC\tmLen\tLspan\tRspan\t"
                  << targrightMax[vi] - targleftMin[vi] << "\t"
                  << targrightMin[vi] - targleftMax[vi] << "\t"
                  << support                            << "\tInterSec" << endl;
            // details of predictions      
            finfp << "#" << targcluster[vi] << endl;
            // using union (targleftMax, targrightMin) of overlapped predictions as final interval (backup)
            finfp << "##" 
                  << targchr[vi]                << "\t" 
                  << targleftMin[vi]            << "\t" 
                  << targrightMax[vi]           << "\t" << fixed << std::setprecision(2)                   
                  << targscore[vi]/support      << "\t"
                  << targorder[vi].substr(0, 1) << "\t" 
                  << targorder[vi].substr(1, 1) << "\tBC\tmLen\tLspan\tRspan\t"
                  << targrightMax[vi] - targleftMin[vi] << "\t"
                  << targrightMin[vi] - targleftMax[vi] << "\t"
                  << support                            << "\tUnion\n#" << endl;
        }
        // clear current chr
        targcluster.clear();
        targleftp.clear();
        targrightp.clear();
        targorder.clear();
        targrightMax.clear();
        targrightMin.clear();
        targleftMax.clear();
        
        chritr ++;
    }
    finfp.close();  
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x428, %rsp            # imm = 0x428
movq %rsi, %rbx
movq %rdi, %rsi
leaq 0x1e8(%rsp), %rdi
movq %rsi, %r14
callq 0x15fec
leaq 0x218(%rsp), %rdi
callq 0x43a0
movq (%rbx), %rsi
leaq 0x218(%rsp), %rdi
pushq $0x10
popq %rdx
callq 0x42f0
movq 0x218(%rsp), %rax
movq -0x18(%rax), %rax
movl 0x238(%rsp,%rax), %eax
movl %eax, 0xac(%rsp)
testl %eax, %eax
je 0x269df
movq 0x1661c(%rip), %rdi     # 0x3cfc8
leaq 0x31a3(%rip), %rsi      # 0x29b56
callq 0x4330
movq %rax, %rdi
movq %rbx, %rsi
callq 0x42e0
leaq 0x757e(%rip), %rsi      # 0x2df48
movq %rax, %rdi
callq 0x4330
movq %rax, %rdi
callq 0x41c0
jmp 0x2741a
leaq 0x228(%rsp), %rdi
leaq 0x425a(%rip), %rsi      # 0x2ac48
callq 0x4330
leaq 0x4254(%rip), %rsi      # 0x2ac4e
movq %rax, %rdi
callq 0x4330
leaq 0x424f(%rip), %rsi      # 0x2ac58
movq %rax, %rdi
callq 0x4330
leaq 0x424b(%rip), %rsi      # 0x2ac63
movq %rax, %rdi
callq 0x4330
leaq 0x4243(%rip), %rsi      # 0x2ac6a
movq %rax, %rdi
callq 0x4330
leaq 0x4242(%rip), %rsi      # 0x2ac78
movq %rax, %rdi
callq 0x4330
leaq 0x4242(%rip), %rsi      # 0x2ac87
movq %rax, %rdi
callq 0x4330
leaq 0x7524(%rip), %rsi      # 0x2df78
movq %rax, %rdi
callq 0x4330
leaq 0x423b(%rip), %rsi      # 0x2ac9e
movq %rax, %rdi
callq 0x4330
leaq 0x4237(%rip), %rsi      # 0x2aca9
movq %rax, %rdi
callq 0x4330
leaq 0x7505(%rip), %rsi      # 0x2df86
movq %rax, %rdi
callq 0x4330
leaq 0x7509(%rip), %rsi      # 0x2df99
movq %rax, %rdi
callq 0x4330
leaq 0x750d(%rip), %rsi      # 0x2dfac
movq %rax, %rdi
callq 0x4330
movq 0x18(%r14), %r15
addq $0x8, %r14
movq %r14, 0x148(%rsp)
movq $0x0, (%rsp)
leaq 0x198(%rsp), %r13
leaq 0x1c8(%rsp), %rbp
cmpq 0x148(%rsp), %r15
je 0x2740d
andl $0x0, 0x1a0(%rsp)
andq $0x0, 0x1a8(%rsp)
leaq 0x1a0(%rsp), %rax
movq %rax, 0x1b0(%rsp)
movq %rax, 0x1b8(%rsp)
andq $0x0, 0x1c0(%rsp)
leaq 0x40(%r15), %rsi
movq %r13, %rdi
callq 0x275ca
movq %r15, 0x150(%rsp)
movq 0x1b0(%rsp), %r14
xorpd %xmm0, %xmm0
movapd %xmm0, 0x70(%rsp)
andq $0x0, 0x80(%rsp)
movapd %xmm0, 0x130(%rsp)
andq $0x0, 0x140(%rsp)
movapd %xmm0, 0x110(%rsp)
andq $0x0, 0x120(%rsp)
movapd %xmm0, 0xf0(%rsp)
andq $0x0, 0x100(%rsp)
movapd %xmm0, 0x50(%rsp)
andq $0x0, 0x60(%rsp)
movapd %xmm0, 0x10(%rsp)
andq $0x0, 0x20(%rsp)
movapd %xmm0, 0x30(%rsp)
andq $0x0, 0x40(%rsp)
movapd %xmm0, 0xb0(%rsp)
andq $0x0, 0xc0(%rsp)
movapd %xmm0, 0xd0(%rsp)
andq $0x0, 0xe0(%rsp)
movapd %xmm0, 0x90(%rsp)
andq $0x0, 0xa0(%rsp)
leaq 0x28(%r14), %rsi
leaq 0x130(%rsp), %rdi
callq 0x261f8
leaq 0x90(%r14), %rsi
leaq 0x70(%rsp), %rdi
callq 0x261f8
leaq 0x48(%r14), %r15
leaq 0x110(%rsp), %rdi
movq %r15, %rsi
callq 0x158c2
leaq 0x50(%r14), %r12
leaq 0xf0(%rsp), %rdi
movq %r12, %rsi
callq 0x158c2
leaq 0x68(%r14), %rsi
leaq 0xd0(%rsp), %rdi
callq 0x1d5cc
leaq 0x70(%r14), %rsi
leaq 0x90(%rsp), %rdi
callq 0x261f8
leaq 0x50(%rsp), %rdi
movq %r12, %rsi
callq 0x158c2
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x158c2
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0x158c2
leaq 0xb0(%rsp), %rdi
movq %r15, %rsi
callq 0x158c2
movq %r14, %rdi
callq 0x4240
movq %rax, %r14
leaq 0x1a0(%rsp), %rax
cmpq %rax, %r14
je 0x26eb0
movq 0x48(%r14), %r13
movq 0x50(%r14), %rbx
leaq 0x70(%r14), %r15
movq %rbp, %rdi
movq %r15, %rsi
callq 0x4400
movq %r15, 0x158(%rsp)
movq %rbp, %r12
leaq 0x48(%r14), %rax
movq %rax, 0x168(%rsp)
leaq 0x50(%r14), %rax
movq %rax, 0x160(%rsp)
leaq 0x90(%r14), %rax
movq %rax, 0x8(%rsp)
movq %r14, 0x170(%rsp)
leaq 0x68(%r14), %rax
movq %rax, 0x128(%rsp)
xorl %ebp, %ebp
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x78(%rsp), %rax
subq 0x70(%rsp), %rax
sarq $0x5, %rax
cmpq %r14, %rax
jbe 0x26dd2
movq 0x90(%rsp), %rsi
addq %rbp, %rsi
movq %r12, %rdi
callq 0x4030
testl %eax, %eax
jne 0x26dc6
movq 0x10(%rsp), %rax
cmpq (%rax,%r14,8), %r13
jae 0x26dc6
leaq 0x178(%rsp), %r15
movq %r15, %rdi
leaq 0x729f(%rip), %rsi      # 0x2dfe1
movq 0x8(%rsp), %rdx
callq 0x27553
movq 0x70(%rsp), %rdi
addq %rbp, %rdi
movq %r15, %rsi
callq 0x45f0
movq %r15, %rdi
callq 0x4638
movq 0x50(%rsp), %rax
cmpq (%rax,%r14,8), %rbx
jbe 0x26d73
movq %rbx, (%rax,%r14,8)
movq 0x10(%rsp), %rax
cmpq (%rax,%r14,8), %rbx
jae 0x26d82
movq %rbx, (%rax,%r14,8)
movq 0x30(%rsp), %rax
cmpq (%rax,%r14,8), %r13
jbe 0x26d91
movq %r13, (%rax,%r14,8)
movq 0xb0(%rsp), %rax
cmpq (%rax,%r14,8), %r13
jae 0x26da3
movq %r13, (%rax,%r14,8)
movq 0x128(%rsp), %rax
movsd (%rax), %xmm0
movq 0xd0(%rsp), %rax
addsd (%rax,%r14,8), %xmm0
movsd %xmm0, (%rax,%r14,8)
movb $0x1, %r15b
incq %r14
addq $0x20, %rbp
jmp 0x26cef
testb $0x1, %r15b
movq 0x170(%rsp), %rbx
movq 0x168(%rsp), %r14
movq 0x160(%rsp), %r15
jne 0x26e95
leaq 0x28(%rbx), %rsi
leaq 0x130(%rsp), %rdi
callq 0x261f8
leaq 0x70(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x261f8
leaq 0x110(%rsp), %rdi
movq %r14, %rsi
callq 0x158c2
leaq 0xf0(%rsp), %rdi
movq %r15, %rsi
callq 0x158c2
leaq 0xd0(%rsp), %rdi
movq 0x128(%rsp), %rsi
callq 0x1d5cc
leaq 0x90(%rsp), %rdi
movq 0x158(%rsp), %rsi
callq 0x261f8
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0x158c2
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x158c2
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
callq 0x158c2
leaq 0xb0(%rsp), %rdi
movq %r14, %rsi
callq 0x158c2
movq %rbx, %rdi
callq 0x4240
movq %rax, %r14
movq %r12, %rbp
movq %r12, %rdi
callq 0x4638
jmp 0x26c7c
movq (%rsp), %rax
movl %eax, %eax
movq %rax, (%rsp)
xorl %r13d, %r13d
xorl %r12d, %r12d
movq 0x70(%rsp), %rax
movq 0x78(%rsp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
cmpq %r12, %rcx
jbe 0x272ed
movq (%rax,%r13), %rdi
movq 0x8(%rax,%r13), %rsi
addq %rdi, %rsi
movb $0x23, 0x1c8(%rsp)
movq %rbp, %rdx
callq 0x17516
movq %rax, %r14
leaq 0x228(%rsp), %rdi
leaq 0x70ad(%rip), %rsi      # 0x2dfb5
callq 0x4330
movq (%rsp), %rcx
leal (%rcx,%r12), %esi
incl %esi
movq %rax, %rdi
callq 0x4580
movq %rax, %rdi
leaq 0x5f6a(%rip), %rsi      # 0x2ce93
callq 0x4330
movq 0x130(%rsp), %rsi
addq %r13, %rsi
movq %rax, %rdi
callq 0x42e0
movq %rax, %rdi
leaq 0x6bce(%rip), %rsi      # 0x2db19
callq 0x4330
movq 0x30(%rsp), %rcx
movq (%rcx,%r12,8), %rsi
movq %rax, %rdi
callq 0x4230
movq %rax, %rdi
leaq 0x6bae(%rip), %rsi      # 0x2db19
callq 0x4330
movq 0x10(%rsp), %rcx
movq (%rcx,%r12,8), %rsi
movq %rax, %rdi
callq 0x4230
movq %rax, %rdi
leaq 0x6b8e(%rip), %rsi      # 0x2db19
callq 0x4330
incl %r14d
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movl 0x18(%rax,%rdx), %esi
movl $0xfffffefb, %edi       # imm = 0xFFFFFEFB
andl %edi, %esi
orl $0x4, %esi
movl %esi, 0x18(%rax,%rdx)
movq -0x18(%rcx), %rcx
movq $0x2, 0x8(%rax,%rcx)
movq 0xd0(%rsp), %rcx
movsd (%rcx,%r12,8), %xmm0
cvtsi2sd %r14d, %xmm1
movsd %xmm1, 0x8(%rsp)
divsd %xmm1, %xmm0
movq %rax, %rdi
callq 0x4510
movq %rax, %rdi
leaq 0x6b31(%rip), %rsi      # 0x2db19
callq 0x4330
movq %rax, %r15
movq 0x90(%rsp), %rsi
addq %r13, %rsi
movq %rbp, %rdi
xorl %edx, %edx
pushq $0x1
popq %rcx
callq 0x4360
movq %r15, %rdi
movq %rbp, %rsi
callq 0x42e0
movq %rax, %rdi
leaq 0x6afc(%rip), %rsi      # 0x2db19
callq 0x4330
movq %rax, %r15
movq 0x90(%rsp), %rsi
addq %r13, %rsi
leaq 0x178(%rsp), %rbx
movq %rbx, %rdi
pushq $0x1
popq %rcx
movq %rcx, %rdx
callq 0x4360
movq %r15, %rdi
movq %rbx, %rsi
callq 0x42e0
movq %rax, %rdi
leaq 0x6f5d(%rip), %rsi      # 0x2dfb8
callq 0x4330
movq 0x50(%rsp), %rcx
movq (%rcx,%r12,8), %rsi
movq 0xb0(%rsp), %rcx
subq (%rcx,%r12,8), %rsi
movq %rax, %rdi
callq 0x4230
movq %rax, %rdi
leaq 0x6a92(%rip), %rsi      # 0x2db19
callq 0x4330
movq 0x10(%rsp), %rcx
movq (%rcx,%r12,8), %rsi
movq 0x30(%rsp), %rcx
subq (%rcx,%r12,8), %rsi
movq %rax, %rdi
callq 0x4230
movq %rax, %rdi
leaq 0x6a69(%rip), %rsi      # 0x2db19
callq 0x4330
movq %rax, %rdi
movl %r14d, %esi
callq 0x4580
movq %rax, %rdi
leaq 0x6f04(%rip), %rsi      # 0x2dfce
callq 0x4330
movq %rax, %rdi
callq 0x41c0
leaq 0x178(%rsp), %rdi
callq 0x4638
movq %rbp, %rdi
callq 0x4638
leaq 0x228(%rsp), %rdi
leaq 0x6ee7(%rip), %rsi      # 0x2dfe2
callq 0x4330
movq 0x70(%rsp), %rsi
addq %r13, %rsi
movq %rax, %rdi
callq 0x42e0
movq %rax, %rdi
callq 0x41c0
leaq 0x228(%rsp), %rdi
leaq 0x6eb1(%rip), %rsi      # 0x2dfd8
callq 0x4330
movq 0x130(%rsp), %rsi
addq %r13, %rsi
movq %rax, %rdi
callq 0x42e0
movq %rax, %rdi
leaq 0x69d0(%rip), %rsi      # 0x2db19
callq 0x4330
movq 0xb0(%rsp), %rcx
movq (%rcx,%r12,8), %rsi
movq %rax, %rdi
callq 0x4230
movq %rax, %rdi
leaq 0x69ad(%rip), %rsi      # 0x2db19
callq 0x4330
movq 0x50(%rsp), %rcx
movq (%rcx,%r12,8), %rsi
movq %rax, %rdi
callq 0x4230
movq %rax, %rdi
leaq 0x698d(%rip), %rsi      # 0x2db19
callq 0x4330
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movl 0x18(%rax,%rdx), %esi
movl $0xfffffefb, %edi       # imm = 0xFFFFFEFB
andl %edi, %esi
orl $0x4, %esi
movl %esi, 0x18(%rax,%rdx)
movq -0x18(%rcx), %rcx
movq $0x2, 0x8(%rax,%rcx)
movq 0xd0(%rsp), %rcx
movsd (%rcx,%r12,8), %xmm0
divsd 0x8(%rsp), %xmm0
movq %rax, %rdi
callq 0x4510
movq %rax, %rdi
leaq 0x693c(%rip), %rsi      # 0x2db19
callq 0x4330
movq %rax, %r15
movq 0x90(%rsp), %rsi
addq %r13, %rsi
movq %rbp, %rdi
xorl %edx, %edx
pushq $0x1
popq %rcx
callq 0x4360
movq %r15, %rdi
movq %rbp, %rsi
callq 0x42e0
movq %rax, %rdi
leaq 0x6907(%rip), %rsi      # 0x2db19
callq 0x4330
movq %rax, %r15
movq 0x90(%rsp), %rsi
addq %r13, %rsi
leaq 0x178(%rsp), %rbx
movq %rbx, %rdi
pushq $0x1
popq %rcx
movq %rcx, %rdx
callq 0x4360
movq %r15, %rdi
movq %rbx, %rsi
callq 0x42e0
movq %rax, %rdi
leaq 0x6d68(%rip), %rsi      # 0x2dfb8
callq 0x4330
movq 0x50(%rsp), %rcx
movq (%rcx,%r12,8), %rsi
movq 0xb0(%rsp), %rcx
subq (%rcx,%r12,8), %rsi
movq %rax, %rdi
callq 0x4230
movq %rax, %rdi
leaq 0x689d(%rip), %rsi      # 0x2db19
callq 0x4330
movq 0x10(%rsp), %rcx
movq (%rcx,%r12,8), %rsi
movq 0x30(%rsp), %rcx
subq (%rcx,%r12,8), %rsi
movq %rax, %rdi
callq 0x4230
movq %rax, %rdi
leaq 0x6874(%rip), %rsi      # 0x2db19
callq 0x4330
movq %rax, %rdi
movl %r14d, %esi
callq 0x4580
movq %rax, %rdi
leaq 0x6d1c(%rip), %rsi      # 0x2dfdb
callq 0x4330
movq %rax, %rdi
callq 0x41c0
leaq 0x178(%rsp), %rdi
callq 0x4638
movq %rbp, %rdi
callq 0x4638
incq %r12
addq $0x20, %r13
jmp 0x26ec0
leaq 0x70(%rsp), %rdi
callq 0x158e2
movq 0x110(%rsp), %rax
cmpq %rax, 0x118(%rsp)
je 0x27311
movq %rax, 0x118(%rsp)
movq 0xf0(%rsp), %rax
cmpq %rax, 0xf8(%rsp)
movq 0x150(%rsp), %r14
leaq 0x198(%rsp), %r13
je 0x2733b
movq %rax, 0xf8(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x158e2
movq 0x50(%rsp), %rax
cmpq %rax, 0x58(%rsp)
je 0x27359
movq %rax, 0x58(%rsp)
movq 0x10(%rsp), %rax
cmpq %rax, 0x18(%rsp)
je 0x2736a
movq %rax, 0x18(%rsp)
movq 0x30(%rsp), %rax
cmpq %rax, 0x38(%rsp)
je 0x2737b
movq %rax, 0x38(%rsp)
addq %r12, (%rsp)
movq %r14, %rdi
callq 0x4240
movq %rax, %r15
leaq 0x90(%rsp), %rdi
callq 0x5d02
leaq 0xd0(%rsp), %rdi
callq 0x1e1ae
leaq 0xb0(%rsp), %rdi
callq 0x17b7e
leaq 0x30(%rsp), %rdi
callq 0x17b7e
leaq 0x10(%rsp), %rdi
callq 0x17b7e
leaq 0x50(%rsp), %rdi
callq 0x17b7e
leaq 0xf0(%rsp), %rdi
callq 0x17b7e
leaq 0x110(%rsp), %rdi
callq 0x17b7e
leaq 0x130(%rsp), %rdi
callq 0x5d02
leaq 0x70(%rsp), %rdi
callq 0x5d02
movq %r13, %rdi
callq 0x16624
jmp 0x26acf
leaq 0x218(%rsp), %rdi
callq 0x4060
cmpl $0x0, 0xac(%rsp)
sete %bl
leaq 0x218(%rsp), %rdi
callq 0x40b0
leaq 0x1e8(%rsp), %rdi
callq 0x16638
movl %ebx, %eax
addq $0x428, %rsp            # imm = 0x428
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2745d
movq %rax, %rbx
jmp 0x2753e
movq %rax, %rbx
jmp 0x27531
movq %rax, %rbx
jmp 0x27524
jmp 0x27499
jmp 0x2749e
jmp 0x27499
jmp 0x27499
jmp 0x27499
jmp 0x2749e
jmp 0x27499
jmp 0x2749e
jmp 0x2749e
jmp 0x2749e
jmp 0x2749e
jmp 0x27487
jmp 0x27487
movq %rax, %rbx
leaq 0x178(%rsp), %rdi
callq 0x4638
jmp 0x274a1
movq %rax, %rbx
jmp 0x274ae
movq %rax, %rbx
leaq 0x1c8(%rsp), %rdi
callq 0x4638
leaq 0x90(%rsp), %rdi
callq 0x5d02
leaq 0xd0(%rsp), %rdi
callq 0x1e1ae
leaq 0xb0(%rsp), %rdi
callq 0x17b7e
leaq 0x30(%rsp), %rdi
callq 0x17b7e
leaq 0x10(%rsp), %rdi
callq 0x17b7e
leaq 0x50(%rsp), %rdi
callq 0x17b7e
leaq 0xf0(%rsp), %rdi
callq 0x17b7e
leaq 0x110(%rsp), %rdi
callq 0x17b7e
leaq 0x130(%rsp), %rdi
callq 0x5d02
leaq 0x70(%rsp), %rdi
callq 0x5d02
leaq 0x198(%rsp), %rdi
callq 0x16624
leaq 0x218(%rsp), %rdi
callq 0x40b0
leaq 0x1e8(%rsp), %rdi
callq 0x16638
movq %rbx, %rdi
callq 0x45a0