// File: /workspace/github_cpp_makefile_star2_O1/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 $0x408, %rsp            # imm = 0x408
movq %rsi, %rbx
movq %rdi, %rsi
leaq 0x1c8(%rsp), %rdi
movq %rsi, %r14
callq 0x2075a
leaq 0x1f8(%rsp), %rdi
callq 0x43c0
movq (%rbx), %rsi
leaq 0x1f8(%rsp), %rdi
movl $0x10, %edx
callq 0x42d0
movq 0x1f8(%rsp), %rax
movq -0x18(%rax), %rax
movl 0x218(%rsp,%rax), %eax
movl %eax, 0x16c(%rsp)
testl %eax, %eax
je 0x378c9
movq 0x14766(%rip), %rdi     # 0x4bfc8
leaq 0x3305(%rip), %rsi      # 0x3ab6e
movl $0x1b, %edx
callq 0x43a0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0x14747(%rip), %rdi     # 0x4bfc8
callq 0x43a0
movq %rax, %rbx
leaq 0x76c8(%rip), %rsi      # 0x3ef58
movl $0x2f, %edx
movq %rax, %rdi
callq 0x43a0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4310
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4220
jmp 0x387a2
leaq 0x208(%rsp), %r12
leaq 0x4390(%rip), %rsi      # 0x3bc68
movl $0x5, %edx
movq %r12, %rdi
callq 0x43a0
leaq 0x4382(%rip), %rsi      # 0x3bc6e
movl $0x9, %edx
movq %r12, %rdi
callq 0x43a0
leaq 0x4378(%rip), %rsi      # 0x3bc78
movl $0xa, %edx
movq %r12, %rdi
callq 0x43a0
leaq 0x436f(%rip), %rsi      # 0x3bc83
movl $0x6, %edx
movq %r12, %rdi
callq 0x43a0
leaq 0x4362(%rip), %rsi      # 0x3bc8a
movl $0xd, %edx
movq %r12, %rdi
callq 0x43a0
leaq 0x435c(%rip), %rsi      # 0x3bc98
movl $0xe, %edx
movq %r12, %rdi
callq 0x43a0
leaq 0x4357(%rip), %rsi      # 0x3bca7
movl $0x8, %edx
movq %r12, %rdi
callq 0x43a0
leaq 0x7624(%rip), %rsi      # 0x3ef88
movl $0xd, %edx
movq %r12, %rdi
callq 0x43a0
leaq 0x4346(%rip), %rsi      # 0x3bcbe
movl $0xa, %edx
movq %r12, %rdi
callq 0x43a0
leaq 0x433d(%rip), %rsi      # 0x3bcc9
movl $0xb, %edx
movq %r12, %rdi
callq 0x43a0
leaq 0x75f6(%rip), %rsi      # 0x3ef96
movl $0x12, %edx
movq %r12, %rdi
callq 0x43a0
leaq 0x75f5(%rip), %rsi      # 0x3efa9
movl $0x12, %edx
movq %r12, %rdi
callq 0x43a0
leaq 0x75f4(%rip), %rsi      # 0x3efbc
movl $0x8, %edx
movq %r12, %rdi
callq 0x43a0
movq 0x18(%r14), %rbx
addq $0x8, %r14
movq %r14, 0x188(%rsp)
cmpq %r14, %rbx
je 0x38795
xorl %ecx, %ecx
leaq 0x198(%rsp), %r14
leaq 0x7122(%rip), %rbp      # 0x3eb21
movl $0x0, 0xbc(%rsp)
movl $0x0, 0x1a0(%rsp)
movq %rcx, 0x1a8(%rsp)
leaq 0x1a0(%rsp), %rax
movq %rax, 0x1b0(%rsp)
movq %rax, 0x1b8(%rsp)
movq %rcx, 0x1c0(%rsp)
leaq 0x40(%rbx), %rsi
movq %r14, %rdi
xorl %r15d, %r15d
callq 0x389f2
movq 0x1b0(%rsp), %r14
movq %r15, 0x130(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x120(%rsp)
movq %r15, 0x180(%rsp)
movapd %xmm0, 0x170(%rsp)
movq %r15, 0x110(%rsp)
movapd %xmm0, 0x100(%rsp)
movq %r15, 0xf0(%rsp)
movapd %xmm0, 0xe0(%rsp)
movq %r15, 0x50(%rsp)
movapd %xmm0, 0x40(%rsp)
movq %r15, 0x10(%rsp)
movapd %xmm0, (%rsp)
movq %r15, 0x30(%rsp)
movapd %xmm0, 0x20(%rsp)
movq %r15, 0xb0(%rsp)
movapd %xmm0, 0xa0(%rsp)
movq %r15, 0xd0(%rsp)
movapd %xmm0, 0xc0(%rsp)
movq %r15, 0x150(%rsp)
movapd %xmm0, 0x140(%rsp)
leaq 0x28(%r14), %rsi
leaq 0x170(%rsp), %rdi
callq 0x36c80
leaq 0x90(%r14), %rsi
leaq 0x120(%rsp), %rdi
callq 0x36c80
leaq 0x48(%r14), %r13
movq 0x108(%rsp), %rsi
cmpq 0x110(%rsp), %rsi
je 0x37b3f
movq (%r13), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x108(%rsp)
jmp 0x37b4f
leaq 0x100(%rsp), %rdi
movq %r13, %rdx
callq 0x22290
leaq 0x50(%r14), %r15
movq 0xe8(%rsp), %rsi
cmpq 0xf0(%rsp), %rsi
je 0x37b79
movq (%r15), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0xe8(%rsp)
jmp 0x37b89
leaq 0xe0(%rsp), %rdi
movq %r15, %rdx
callq 0x22290
leaq 0x68(%r14), %rdx
movq 0xc8(%rsp), %rsi
cmpq 0xd0(%rsp), %rsi
je 0x37bb5
movsd (%rdx), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0xc8(%rsp)
jmp 0x37bc2
leaq 0xc0(%rsp), %rdi
callq 0x2b596
leaq 0x70(%r14), %rsi
leaq 0x140(%rsp), %rdi
callq 0x36c80
movq 0x48(%rsp), %rsi
cmpq 0x50(%rsp), %rsi
je 0x37bf0
movq (%r15), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x48(%rsp)
jmp 0x37bfd
leaq 0x40(%rsp), %rdi
movq %r15, %rdx
callq 0x22290
movq 0x8(%rsp), %rsi
cmpq 0x10(%rsp), %rsi
je 0x37c1a
movq (%r15), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rsp)
jmp 0x37c25
movq %rsp, %rdi
movq %r15, %rdx
callq 0x22290
movq 0x28(%rsp), %rsi
cmpq 0x30(%rsp), %rsi
je 0x37c43
movq (%r13), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x28(%rsp)
jmp 0x37c50
leaq 0x20(%rsp), %rdi
movq %r13, %rdx
callq 0x22290
movq 0xa8(%rsp), %rsi
cmpq 0xb0(%rsp), %rsi
je 0x37c77
movq (%r13), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0xa8(%rsp)
jmp 0x37c87
leaq 0xa0(%rsp), %rdi
movq %r13, %rdx
callq 0x22290
movq %rbx, 0x190(%rsp)
movq %r14, %rdi
callq 0x4230
movq %rax, %r14
leaq 0x1a0(%rsp), %rax
cmpq %rax, %r14
je 0x37fe6
movq 0x48(%r14), %rbx
movq 0x50(%r14), %r13
leaq 0x70(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x70(%r14), %rsi
movq 0x78(%r14), %rdx
addq %rsi, %rdx
leaq 0x60(%rsp), %rdi
callq 0xda32
movq 0x128(%rsp), %rax
cmpq 0x120(%rsp), %rax
je 0x37e21
leaq 0x90(%r14), %rax
movq %rax, 0x160(%rsp)
xorl %r12d, %r12d
xorl %ebp, %ebp
xorl %r15d, %r15d
movq 0x140(%rsp), %rsi
addq %r12, %rsi
leaq 0x60(%rsp), %rdi
callq 0x4040
testl %eax, %eax
jne 0x37de4
movq (%rsp), %rax
cmpq (%rax,%rbp,8), %rbx
jae 0x37de4
leaq 0x80(%rsp), %rdi
leaq 0x72b8(%rip), %rsi      # 0x3eff1
movq 0x160(%rsp), %rdx
callq 0x38969
movq 0x120(%rsp), %rdi
addq %r12, %rdi
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
callq 0x4120
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x37d8b
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x4340
movq 0x40(%rsp), %rax
cmpq (%rax,%rbp,8), %r13
jbe 0x37d9a
movq %r13, (%rax,%rbp,8)
movq (%rsp), %rax
cmpq (%rax,%rbp,8), %r13
jae 0x37da8
movq %r13, (%rax,%rbp,8)
movq 0x20(%rsp), %rax
cmpq (%rax,%rbp,8), %rbx
jbe 0x37db7
movq %rbx, (%rax,%rbp,8)
movq 0xa0(%rsp), %rax
cmpq (%rax,%rbp,8), %rbx
jae 0x37dc9
movq %rbx, (%rax,%rbp,8)
movsd 0x68(%r14), %xmm0
movq 0xc0(%rsp), %rax
addsd (%rax,%rbp,8), %xmm0
movsd %xmm0, (%rax,%rbp,8)
movb $0x1, %r15b
movq 0x128(%rsp), %rax
subq 0x120(%rsp), %rax
incq %rbp
sarq $0x5, %rax
addq $0x20, %r12
cmpq %rbp, %rax
ja 0x37cff
testb $0x1, %r15b
leaq 0x208(%rsp), %r12
leaq 0x6d06(%rip), %rbp      # 0x3eb21
jne 0x37fb6
leaq 0x28(%r14), %rsi
leaq 0x170(%rsp), %rdi
callq 0x36c80
leaq 0x90(%r14), %rsi
leaq 0x120(%rsp), %rdi
callq 0x36c80
leaq 0x48(%r14), %r15
movq 0x108(%rsp), %rsi
cmpq 0x110(%rsp), %rsi
je 0x37e70
movq (%r15), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x108(%rsp)
jmp 0x37e80
leaq 0x100(%rsp), %rdi
movq %r15, %rdx
callq 0x22290
leaq 0x50(%r14), %rbx
movq 0xe8(%rsp), %rsi
cmpq 0xf0(%rsp), %rsi
je 0x37eaa
movq (%rbx), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0xe8(%rsp)
jmp 0x37eba
leaq 0xe0(%rsp), %rdi
movq %rbx, %rdx
callq 0x22290
leaq 0x68(%r14), %rdx
movq 0xc8(%rsp), %rsi
cmpq 0xd0(%rsp), %rsi
je 0x37ee6
movsd (%rdx), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0xc8(%rsp)
jmp 0x37ef3
leaq 0xc0(%rsp), %rdi
callq 0x2b596
leaq 0x70(%r14), %rsi
leaq 0x140(%rsp), %rdi
callq 0x36c80
movq 0x48(%rsp), %rsi
cmpq 0x50(%rsp), %rsi
je 0x37f21
movq (%rbx), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x48(%rsp)
jmp 0x37f2e
leaq 0x40(%rsp), %rdi
movq %rbx, %rdx
callq 0x22290
movq 0x8(%rsp), %rsi
cmpq 0x10(%rsp), %rsi
je 0x37f4b
movq (%rbx), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rsp)
jmp 0x37f56
movq %rsp, %rdi
movq %rbx, %rdx
callq 0x22290
movq 0x28(%rsp), %rsi
cmpq 0x30(%rsp), %rsi
je 0x37f73
movq (%r15), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x28(%rsp)
jmp 0x37f80
leaq 0x20(%rsp), %rdi
movq %r15, %rdx
callq 0x22290
movq 0xa8(%rsp), %rsi
cmpq 0xb0(%rsp), %rsi
je 0x37fa6
movq (%r15), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0xa8(%rsp)
jmp 0x37fb6
leaq 0xa0(%rsp), %rdi
movq %r15, %rdx
callq 0x22290
movq %r14, %rdi
callq 0x4230
movq %rax, %r14
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x37c9a
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x4340
jmp 0x37c9a
movq 0x120(%rsp), %rbx
movq 0x128(%rsp), %r15
cmpq %rbx, %r15
je 0x385a3
xorl %r14d, %r14d
movq %r14, %r13
shlq $0x5, %r13
movq 0x8(%rbx,%r13), %rax
testq %rax, %rax
je 0x38036
movq (%rbx,%r13), %rcx
xorl %edx, %edx
xorl %r15d, %r15d
xorl %esi, %esi
cmpb $0x23, (%rcx,%rdx)
sete %sil
addq %rsi, %r15
incq %rdx
cmpq %rdx, %rax
jne 0x3801c
incl %r15d
jmp 0x3803c
movl $0x1, %r15d
movl $0x2, %edx
movq %r12, %rdi
leaq 0x6f7a(%rip), %rsi      # 0x3efc5
callq 0x43a0
movl 0xbc(%rsp), %esi
incl %esi
movq %r12, %rdi
movl %esi, 0xbc(%rsp)
callq 0x4580
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x5e21(%rip), %rsi      # 0x3de9b
callq 0x43a0
movq 0x170(%rsp), %rax
movq (%rax,%r13), %rsi
movq 0x8(%rax,%r13), %rdx
movq %rbx, %rdi
callq 0x43a0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x43a0
movq 0x20(%rsp), %rax
movq (%rax,%r14,8), %rsi
movq %rbx, %rdi
callq 0x4210
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x43a0
movq (%rsp), %rax
movq (%rax,%r14,8), %rsi
movq %rbx, %rdi
callq 0x4210
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x43a0
movq (%rbx), %rax
movq -0x18(%rax), %rcx
movl 0x18(%rbx,%rcx), %edx
movl $0xfffffefb, %esi       # imm = 0xFFFFFEFB
andl %esi, %edx
orl $0x4, %edx
movl %edx, 0x18(%rbx,%rcx)
movq -0x18(%rax), %rax
movq $0x2, 0x8(%rbx,%rax)
movq 0xc0(%rsp), %rax
movsd (%rax,%r14,8), %xmm0
cvtsi2sd %r15d, %xmm1
movsd %xmm1, 0x160(%rsp)
divsd %xmm1, %xmm0
movq %rbx, %rdi
callq 0x4510
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x43a0
movq 0x140(%rsp), %rsi
addq %r13, %rsi
movl $0x1, %ecx
leaq 0x60(%rsp), %rdi
xorl %edx, %edx
callq 0x4360
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
movq %rbx, %rdi
callq 0x43a0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x43a0
movq 0x140(%rsp), %rsi
addq %r13, %rsi
movl $0x1, %edx
movl $0x1, %ecx
leaq 0x80(%rsp), %rdi
callq 0x4360
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
movq %rbx, %rdi
callq 0x43a0
movq %rax, %rbx
movl $0x15, %edx
movq %rax, %rdi
leaq 0x6de8(%rip), %rsi      # 0x3efc8
callq 0x43a0
movq 0x40(%rsp), %rax
movq (%rax,%r14,8), %rsi
movq 0xa0(%rsp), %rax
subq (%rax,%r14,8), %rsi
movq %rbx, %rdi
callq 0x4210
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x43a0
movq (%rsp), %rax
movq (%rax,%r14,8), %rsi
movq 0x20(%rsp), %rax
subq (%rax,%r14,8), %rsi
movq %rbx, %rdi
callq 0x4210
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x43a0
movq %rbx, %rdi
movl %r15d, %esi
callq 0x4580
movq %rax, %rbx
movl $0x9, %edx
movq %rax, %rdi
leaq 0x6d80(%rip), %rsi      # 0x3efde
callq 0x43a0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4310
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4220
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x382af
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x4340
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x382cb
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x4340
movl $0x1, %edx
movq %r12, %rdi
leaq 0x6d18(%rip), %rsi      # 0x3eff2
callq 0x43a0
movq 0x120(%rsp), %rax
movq (%rax,%r13), %rsi
movq 0x8(%rax,%r13), %rdx
movq %r12, %rdi
callq 0x43a0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4310
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4220
movl $0x2, %edx
movq %r12, %rdi
leaq 0x6cb7(%rip), %rsi      # 0x3efe8
callq 0x43a0
movq 0x170(%rsp), %rax
movq (%rax,%r13), %rsi
movq 0x8(%rax,%r13), %rdx
movq %r12, %rdi
callq 0x43a0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x43a0
movq 0xa0(%rsp), %rax
movq (%rax,%r14,8), %rsi
movq %rbx, %rdi
callq 0x4210
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x43a0
movq 0x40(%rsp), %rax
movq (%rax,%r14,8), %rsi
movq %rbx, %rdi
callq 0x4210
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x43a0
movq (%rbx), %rax
movq -0x18(%rax), %rcx
movl 0x18(%rbx,%rcx), %edx
movl $0xfffffefb, %esi       # imm = 0xFFFFFEFB
andl %esi, %edx
orl $0x4, %edx
movl %edx, 0x18(%rbx,%rcx)
movq -0x18(%rax), %rax
movq $0x2, 0x8(%rbx,%rax)
movq 0xc0(%rsp), %rax
movsd (%rax,%r14,8), %xmm0
divsd 0x160(%rsp), %xmm0
movq %rbx, %rdi
callq 0x4510
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x43a0
movq 0x140(%rsp), %rsi
addq %r13, %rsi
movl $0x1, %ecx
leaq 0x60(%rsp), %rdi
xorl %edx, %edx
callq 0x4360
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
movq %rbx, %rdi
callq 0x43a0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x43a0
addq 0x140(%rsp), %r13
movl $0x1, %edx
movl $0x1, %ecx
leaq 0x80(%rsp), %rdi
movq %r13, %rsi
callq 0x4360
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
movq %rbx, %rdi
callq 0x43a0
movq %rax, %rbx
movl $0x15, %edx
movq %rax, %rdi
leaq 0x6b36(%rip), %rsi      # 0x3efc8
callq 0x43a0
movq 0x40(%rsp), %rax
movq (%rax,%r14,8), %rsi
movq 0xa0(%rsp), %rax
subq (%rax,%r14,8), %rsi
movq %rbx, %rdi
callq 0x4210
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x43a0
movq (%rsp), %rax
movq (%rax,%r14,8), %rsi
movq 0x20(%rsp), %rax
subq (%rax,%r14,8), %rsi
movq %rbx, %rdi
callq 0x4210
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x43a0
movq %rbx, %rdi
movl %r15d, %esi
callq 0x4580
movq %rax, %rbx
movl $0x8, %edx
movq %rax, %rdi
leaq 0x6adb(%rip), %rsi      # 0x3efeb
callq 0x43a0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4310
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4220
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x38561
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x4340
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x3857d
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x4340
incq %r14
movq 0x120(%rsp), %rbx
movq 0x128(%rsp), %r15
movq %r15, %rax
subq %rbx, %rax
sarq $0x5, %rax
cmpq %r14, %rax
ja 0x38002
cmpq %rbx, %r15
je 0x385d8
leaq 0x10(%rbx), %r14
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x385c0
movq (%r14), %rsi
incq %rsi
callq 0x4340
leaq 0x20(%r14), %rax
addq $0x10, %r14
cmpq %r15, %r14
movq %rax, %r14
jne 0x385ac
movq %rbx, 0x128(%rsp)
movq 0x100(%rsp), %rax
cmpq %rax, 0x108(%rsp)
je 0x385f2
movq %rax, 0x108(%rsp)
movq 0xe0(%rsp), %rax
cmpq %rax, 0xe8(%rsp)
je 0x3860c
movq %rax, 0xe8(%rsp)
movq 0x140(%rsp), %rbx
movq 0x148(%rsp), %r14
cmpq %rbx, %r14
je 0x38651
leaq 0x10(%rbx), %r15
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x38639
movq (%r15), %rsi
incq %rsi
callq 0x4340
leaq 0x20(%r15), %rax
addq $0x10, %r15
cmpq %r14, %r15
movq %rax, %r15
jne 0x38625
movq %rbx, 0x148(%rsp)
movq 0x40(%rsp), %rax
cmpq %rax, 0x48(%rsp)
je 0x38662
movq %rax, 0x48(%rsp)
movq (%rsp), %rax
cmpq %rax, 0x8(%rsp)
movq 0x190(%rsp), %rdi
leaq 0x198(%rsp), %r14
je 0x38682
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rax
cmpq %rax, 0x28(%rsp)
je 0x38693
movq %rax, 0x28(%rsp)
callq 0x4230
movq %rax, %rbx
leaq 0x140(%rsp), %rdi
callq 0x6aa2
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0x386c5
movq 0xd0(%rsp), %rsi
subq %rdi, %rsi
callq 0x4340
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0x386e2
movq 0xb0(%rsp), %rsi
subq %rdi, %rsi
callq 0x4340
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x386f9
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x4340
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x3870f
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x4340
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x38726
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x4340
movq 0xe0(%rsp), %rdi
testq %rdi, %rdi
je 0x38743
movq 0xf0(%rsp), %rsi
subq %rdi, %rsi
callq 0x4340
movq 0x100(%rsp), %rdi
testq %rdi, %rdi
je 0x38760
movq 0x110(%rsp), %rsi
subq %rdi, %rsi
callq 0x4340
leaq 0x170(%rsp), %rdi
callq 0x6aa2
leaq 0x120(%rsp), %rdi
callq 0x6aa2
movq %r14, %rdi
callq 0x20dfc
cmpq 0x188(%rsp), %rbx
movl $0x0, %ecx
jne 0x37a0a
leaq 0x1f8(%rsp), %rdi
callq 0x4070
cmpl $0x0, 0x16c(%rsp)
sete %bl
leaq 0x1f8(%rsp), %rdi
callq 0x40b0
leaq 0x1c8(%rsp), %rdi
callq 0x20e10
movl %ebx, %eax
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x387ed
movq %rax, %rbx
jmp 0x38954
movq %rax, %rbx
jmp 0x3893a
movq %rax, %rbx
jmp 0x38947
jmp 0x38858
jmp 0x38837
jmp 0x38858
jmp 0x38858
jmp 0x38837
jmp 0x38858
jmp 0x38837
jmp 0x38837
jmp 0x3880d
jmp 0x38837
jmp 0x38837
jmp 0x3880d
movq %rax, %rbx
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x3883a
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x4340
jmp 0x3883a
movq %rax, %rbx
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x3885b
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x4340
jmp 0x3885b
movq %rax, %rbx
leaq 0x140(%rsp), %rdi
callq 0x6aa2
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0x38885
movq 0xd0(%rsp), %rsi
subq %rdi, %rsi
callq 0x4340
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0x388a2
movq 0xb0(%rsp), %rsi
subq %rdi, %rsi
callq 0x4340
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x388b9
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x4340
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x388cf
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x4340
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x388e6
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x4340
movq 0xe0(%rsp), %rdi
testq %rdi, %rdi
je 0x38903
movq 0xf0(%rsp), %rsi
subq %rdi, %rsi
callq 0x4340
movq 0x100(%rsp), %rdi
testq %rdi, %rdi
je 0x38920
movq 0x110(%rsp), %rsi
subq %rdi, %rsi
callq 0x4340
leaq 0x170(%rsp), %rdi
callq 0x6aa2
leaq 0x120(%rsp), %rdi
callq 0x6aa2
leaq 0x198(%rsp), %rdi
callq 0x20dfc
leaq 0x1f8(%rsp), %rdi
callq 0x40b0
leaq 0x1c8(%rsp), %rdi
callq 0x20e10
movq %rbx, %rdi
callq 0x45a0