// File: /workspace/github_cpp_makefile_star2_O2/schneebergerlab[P]DrLink/find_intersection.cpp
// Function: find_intersection(int, char**)
bool find_intersection(int argc, char* argv[])
{
    std::stringstream usage;
    usage.str("");
    if(argc < 7)
    {
        usage << endl;
        usage << "   Given two sets of CO predictions using parents, this function finds out the intersection." << endl;
        const char *buildString = __DATE__", " __TIME__;
        usage << "   (compiled on " << buildString << ")"                                               << endl << endl;
        usage << "   Usage: DrLink intersec pa-CO.txt pb-CO.txt pa-co-reads pb-co-reads outfolder "     << endl << endl;
        usage << "\twhere "                                                         << endl;
        usage << "\tpa-CO.txt:    CO prediction using parent a/Col as reference"    << endl;
        usage << "\tpb-CO.txt:    CO prediction using parent b/Ler as reference"    << endl;
        usage << "\tpa-co-reads:  CO-read path given  by recombis for parent a/Col" << endl;
        usage << "\tpb-co-reads:  CO-read path given  by recombis for parent b/Ler" << endl;        
        usage << "\toutfolder:    output folder"                                    << endl;
        cout << usage.str() << endl;
        return false;
    }
    double startT= clock();   
    string outfolder = (string)argv[6]+"_intersection";
    if(outfolder.size()==0)   
    outfolder = "enjo_intersection";
    // create an intermediate folder for collecting details about a CO-molecule
    DIR* dir = opendir(outfolder.c_str());
    if (dir)
    {
        /* Directory exists. */
        closedir(dir);
    }
    else if (ENOENT == errno)
    {
        /* Directory does not exist. */
        const int dir_err = mkdir(outfolder.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
        if (dir_err == -1)
        {
            cout << "   Error: cannot create directory " << outfolder << endl;
            return false;
        }        
    }
    else ;
    // 1.read parent-referenced COs   
    string acofile     = argv[2];
    string bcofile     = argv[3];
    string acoreadpath = argv[4];
    string bcoreadpath = argv[5];
    multimap<string, BPINFO> aco; // <chr#barcode, BPINFO>
    if(!get_CO(acofile, &aco))
    {
       return false;
    }
    multimap<string, BPINFO> bco;
    if(!get_CO(bcofile, &bco))
    {
       return false;
    }    
    // 2. find common COs in both findings
    multimap<string, BPINFO>::iterator cbitr;
    multimap<string, BPINFO>::iterator cbitr_end;
    cbitr     = aco.begin();
    cbitr_end = aco.end();
    while(cbitr != cbitr_end)
    {
        string key   = (*cbitr).first;
        BPINFO tmpbp = (*cbitr).second;
        // get "a" reads: filename like: path/to/1_1132082_1145010_12_CGGCTAGTCGCCGTGA.txt
        vector<string> keyinfo = split_string(key, '#');
        std::stringstream acoreadfile;
        acoreadfile.str("");
        acoreadfile << acoreadpath  << "/" 
                    << keyinfo[0]   << "_" 
                    << tmpbp.leftp  << "_"
                    << tmpbp.rightp << "_"
                    << tmpbp.order  << "_"
                    << keyinfo[1]   << ".txt\0";
        map<string, int> aReads;
        if(!get_CO_reads(acoreadfile.str(), &aReads))
        {
            return false;
        }
        //
        std::pair <std::multimap<string, BPINFO>::iterator, std::multimap<string, BPINFO>::iterator> ret;
        ret = bco.equal_range(key);
        multimap<string, BPINFO>::iterator tmpitr; 
        for(tmpitr = ret.first; tmpitr != ret.second; tmpitr ++)
        {
            // get "b" reads
            string         key2     = (*tmpitr).first;
            BPINFO         tmpbp2   = (*tmpitr).second;
            vector<string> keyinfo2 = split_string(key2, '#');
            std::stringstream bcoreadfile;
            bcoreadfile.str("");
            bcoreadfile << bcoreadpath   << "/" 
                        << keyinfo2[0]   << "_" 
                        << tmpbp2.leftp  << "_"
                        << tmpbp2.rightp << "_"
                        << tmpbp2.order  << "_"
                        << keyinfo2[1]   << ".txt\0";
            map<string, int> bReads;
            if(!get_CO_reads(bcoreadfile.str(), &bReads))
            {
                return false;
            }
            // check if "a" reads match "b" reads
            map<string, int>::iterator ritr;
            map<string, int>::iterator ritr_end;
            ritr      = aReads.begin();
            ritr_end  = aReads.end();
            int found = 0;
            while(ritr != ritr_end)
            {
                if(bReads.find((*ritr).first) != bReads.end())
                {
                    found ++;
                }
                ritr ++;
            }
            if(found>=3)
            {
                //
                if( (*cbitr).second.ovline.size() > 0)
                {
                    (*cbitr).second.ovline += "\n";
                }
                (*cbitr).second.ovline += tmpbp2.bpline;
                //
                if( (*tmpitr).second.ovline.size() > 0)
                {
                    (*tmpitr).second.ovline += "\n";
                }
                (*tmpitr).second.ovline += tmpbp.bpline;
            }
        }
        cbitr ++;
    }    
    // 3. output files
    // collect "a/Col" CO predictions for sorting and overlapping
    multimap<string, multimap<unsigned long, BPINFO> > commonbpraw_acoord;
    // file with commonly found co in both predictions => both coordinates for checking.
    string ofilename2 = outfolder + "/ref_CL_common_bp.txt";
    ofstream ofp2;
    ofp2.open(ofilename2.c_str(), ios::out);
    if(!ofp2.is_open())
    {
        cout << "   Error: cannot open file " << ofilename2 << endl;
        return false;
    }  
    // file with co specific to a/Col
    string ofilename3 = outfolder + "/ref_C__specific_bp.txt";
    ofstream ofp3;
    ofp3.open(ofilename3.c_str(), ios::out);
    if(!ofp3.is_open())
    {
        cout << "   Error: cannot open file " << ofilename3 << endl;
        return false;
    }  
    // collecting
    cbitr     = aco.begin();
    cbitr_end = aco.end();
    while(cbitr != cbitr_end)
    {
        string key   = (*cbitr).first;
        BPINFO tmpbp = (*cbitr).second;
        if(tmpbp.ovline.size() > 0)
        {
            insert_raw_bp(&commonbpraw_acoord, 
                          tmpbp.chr, 
                          tmpbp.leftp, 
                          tmpbp.rightp, 
                          tmpbp.score,
                          tmpbp.order, 
                          tmpbp.bpline);            
            ofp2 << tmpbp.bpline   << "\tref.C\n";   // "a/Col"
            ofp2 << tmpbp.ovline   << "\tref.L\n\n"; // "b/Ler"
        }   
        else
        {
            ofp3 << tmpbp.bpline   << endl;
        }     
        cbitr ++;
    }
    // file with co specific to b/Ler
    string ofilename4 = outfolder + "/ref_L__specific_bp.txt";
    ofstream ofp4;
    ofp4.open(ofilename4.c_str(), ios::out);
    if(!ofp4.is_open())
    {
        cout << "   Error: cannot open file " << ofilename4 << endl;
        return false;
    } 
    cbitr     = bco.begin();
    cbitr_end = bco.end();
    while(cbitr != cbitr_end)
    {
        string key   = (*cbitr).first;
        BPINFO tmpbp = (*cbitr).second;
        if(tmpbp.ovline.size() <= 0)
        {
            ofp4 << tmpbp.bpline << endl;           
        } 
        cbitr ++;
    }        
    // close files
    ofp2.close();
    ofp3.close();
    ofp4.close();
    // raw non-overlapped bp - left-coordinate sorted raw break points
    string ofilename1 = outfolder + "/ref_C__common_bp_sorted.txt";
    ofstream ofp1;
    ofp1.open(ofilename1.c_str(), ios::out);
    if(!ofp1.is_open())
    {
        cout << "   Error: cannot open file " << ofilename1 << endl;
        return false;
    }    
    if(!output_co(commonbpraw_acoord, ofilename1))
    {
        return false;
    }
    // post-process predicated break points: final bp file
    string finalbpfile = outfolder +"/ref_C__common_bp_overlapped_final.txt";
    if(!postprocess_bpPrediction(commonbpraw_acoord, finalbpfile))
    {
        cout << "   Error: processing raw break points failed. " << endl;
        return false;
    }
    double finishT= clock();
    cout << "   Time consumed: " << (finishT-startT)/1000000 << " seconds" << endl << endl;    
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd18, %rsp            # imm = 0xD18
movq %rsi, %r14
movl %edi, %ebp
leaq 0xb90(%rsp), %rdi
callq 0x4250
leaq 0x153a4(%rip), %rsi     # 0x2db1a
leaq 0x370(%rsp), %rdi
leaq 0x990(%rsp), %rdx
callq 0x4d3e
leaq 0xba8(%rsp), %rbx
leaq 0x370(%rsp), %rsi
movq %rbx, %rdi
callq 0x4490
leaq 0x370(%rsp), %rdi
callq 0x4638
cmpl $0x6, %ebp
jg 0x18906
leaq 0xba0(%rsp), %r14
movq %r14, %rdi
callq 0x41c0
leaq 0x14480(%rip), %rsi     # 0x2cc50
movq %r14, %rdi
callq 0x4330
movq %rax, %rdi
callq 0x41c0
leaq 0x144dc(%rip), %rsi     # 0x2ccc3
movq %r14, %rdi
callq 0x4330
leaq 0x144b7(%rip), %rsi     # 0x2ccad
movq %rax, %rdi
callq 0x4330
leaq 0x14b33(%rip), %rsi     # 0x2d338
movq %rax, %rdi
callq 0x4330
movq %rax, %rdi
callq 0x41c0
movq %rax, %rdi
callq 0x41c0
leaq 0x144b0(%rip), %rsi     # 0x2ccd4
movq %r14, %rdi
callq 0x4330
movq %rax, %rdi
callq 0x41c0
movq %rax, %rdi
callq 0x41c0
leaq 0x144e2(%rip), %rsi     # 0x2cd25
movq %r14, %rdi
callq 0x4330
movq %rax, %rdi
callq 0x41c0
leaq 0x144d3(%rip), %rsi     # 0x2cd2d
movq %r14, %rdi
callq 0x4330
movq %rax, %rdi
callq 0x41c0
leaq 0x144f9(%rip), %rsi     # 0x2cd6a
movq %r14, %rdi
callq 0x4330
movq %rax, %rdi
callq 0x41c0
leaq 0x1451f(%rip), %rsi     # 0x2cda7
movq %r14, %rdi
callq 0x4330
movq %rax, %rdi
callq 0x41c0
leaq 0x14548(%rip), %rsi     # 0x2cde7
movq %r14, %rdi
callq 0x4330
movq %rax, %rdi
callq 0x41c0
leaq 0x14571(%rip), %rsi     # 0x2ce27
movq %r14, %rdi
callq 0x4330
movq %rax, %rdi
callq 0x41c0
leaq 0x370(%rsp), %rdi
movq %rbx, %rsi
callq 0x44e0
movq 0x246eb(%rip), %rdi     # 0x3cfc8
leaq 0x370(%rsp), %rsi
callq 0x42e0
movq %rax, %rdi
callq 0x41c0
leaq 0x370(%rsp), %rdi
callq 0x4638
xorl %ebx, %ebx
jmp 0x192e5
callq 0x4220
movq %rax, %rbx
movq 0x30(%r14), %rsi
leaq 0x370(%rsp), %rdi
leaq 0x990(%rsp), %rdx
callq 0x4d3e
leaq 0x1451a(%rip), %rdx     # 0x2ce48
leaq 0x70(%rsp), %rdi
leaq 0x370(%rsp), %rsi
callq 0x5c38
leaq 0x370(%rsp), %rdi
callq 0x4638
cmpq $0x0, 0x78(%rsp)
jne 0x18966
leaq 0x144e8(%rip), %rsi     # 0x2ce44
leaq 0x70(%rsp), %rdi
callq 0x45e0
movq 0x70(%rsp), %rdi
callq 0x44a0
testq %rax, %rax
je 0x1897f
movq %rax, %rdi
callq 0x4500
jmp 0x189a1
callq 0x4040
cmpl $0x2, (%rax)
jne 0x189a1
movq 0x70(%rsp), %rdi
movl $0x1fd, %esi            # imm = 0x1FD
callq 0x41b0
cmpl $-0x1, %eax
je 0x19306
movq 0x10(%r14), %rsi
leaq 0x290(%rsp), %rdi
leaq 0x370(%rsp), %rdx
callq 0x4d3e
movq 0x18(%r14), %rsi
leaq 0x270(%rsp), %rdi
leaq 0x370(%rsp), %rdx
callq 0x4d3e
movq 0x20(%r14), %rsi
leaq 0x250(%rsp), %rdi
leaq 0x370(%rsp), %rdx
callq 0x4d3e
movq 0x28(%r14), %rsi
leaq 0x230(%rsp), %rdi
leaq 0x370(%rsp), %rdx
callq 0x4d3e
leaq 0x138(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x210(%rsp), %rdi
leaq 0x290(%rsp), %rsi
callq 0x4400
leaq 0x210(%rsp), %rdi
leaq 0x130(%rsp), %rsi
callq 0x19aa8
movl %eax, %ebp
leaq 0x210(%rsp), %rdi
callq 0x4638
testb %bpl, %bpl
je 0x1900d
leaq 0x188(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x1f0(%rsp), %rdi
leaq 0x270(%rsp), %rsi
callq 0x4400
leaq 0x1f0(%rsp), %rdi
leaq 0x180(%rsp), %rsi
callq 0x19aa8
movl %eax, %ebp
leaq 0x1f0(%rsp), %rdi
callq 0x4638
testb %bpl, %bpl
je 0x1928b
cvtsi2sd %rbx, %xmm0
movsd %xmm0, 0x128(%rsp)
movq 0x148(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x48(%rsp), %rbx
leaq 0x100(%rsp), %r15
leaq 0x160(%rsp), %rbp
leaq 0xf8(%rsp), %r13
leaq 0x138(%rsp), %rax
movq 0x10(%rsp), %r14
cmpq %rax, %r14
je 0x19014
leaq 0x20(%r14), %rsi
leaq 0x98(%rsp), %rdi
callq 0x4400
leaq 0x40(%r14), %rsi
leaq 0x590(%rsp), %rdi
callq 0x16512
movb $0x23, 0x370(%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0x370(%rsp), %r14
movq %r14, %rdx
callq 0x26120
movq %r14, %rdi
callq 0x4250
leaq 0x990(%rsp), %r14
movq %r14, %rdi
leaq 0x14fa8(%rip), %rsi     # 0x2db1a
leaq 0x790(%rsp), %rdx
callq 0x4d3e
leaq 0x388(%rsp), %rdi
movq %r14, %rsi
callq 0x4490
movq %r14, %rdi
callq 0x4638
leaq 0x380(%rsp), %rdi
leaq 0x250(%rsp), %rsi
callq 0x42e0
movq %rax, %rdi
leaq 0x151b4(%rip), %rsi     # 0x2dd6a
callq 0x4330
movq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x42e0
movq %rax, %rdi
leaq 0x11ee5(%rip), %rsi     # 0x2aab7
callq 0x4330
movq 0x5b0(%rsp), %rsi
movq %rax, %rdi
callq 0x4230
movq %rax, %rdi
leaq 0x11ec6(%rip), %rsi     # 0x2aab7
callq 0x4330
movq 0x5b8(%rsp), %rsi
movq %rax, %rdi
callq 0x4230
movq %rax, %rdi
leaq 0x11ea7(%rip), %rsi     # 0x2aab7
callq 0x4330
movq %rax, %rdi
leaq 0x5d8(%rsp), %rsi
callq 0x42e0
movq %rax, %rdi
leaq 0x11e88(%rip), %rsi     # 0x2aab7
callq 0x4330
movq 0x20(%rsp), %rsi
addq $0x20, %rsi
movq %rax, %rdi
callq 0x42e0
movq %rax, %rdi
leaq 0x142fa(%rip), %rsi     # 0x2cf49
callq 0x4330
andl $0x0, 0x48(%rsp)
andq $0x0, 0x50(%rsp)
movq %rbx, 0x58(%rsp)
movq %rbx, 0x60(%rsp)
andq $0x0, 0x68(%rsp)
movq %rbp, %rdi
leaq 0x388(%rsp), %rsi
callq 0x44e0
movq %rbp, %rdi
leaq 0x40(%rsp), %rsi
callq 0x19ebb
movq %rbp, %rdi
movl %eax, %ebp
callq 0x4638
testb %bpl, %bpl
je 0x19250
leaq 0x180(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x1a11c
movq %rdx, 0x18(%rsp)
movq %rax, %r14
movq 0x10(%rsp), %rax
addq $0xc8, %rax
movq %rax, 0x90(%rsp)
leaq 0x160(%rsp), %rbp
cmpq 0x18(%rsp), %r14
je 0x18f6d
leaq 0x20(%r14), %rsi
leaq 0xd8(%rsp), %rdi
callq 0x4400
leaq 0x40(%r14), %rsi
leaq 0x790(%rsp), %rdi
callq 0x16512
movb $0x23, 0x990(%rsp)
leaq 0xb8(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
leaq 0x990(%rsp), %r12
movq %r12, %rdx
callq 0x26120
movq %r12, %rdi
callq 0x4250
movq %r13, %rdi
leaq 0x14ddc(%rip), %rsi     # 0x2db1a
leaq 0xf(%rsp), %rdx
callq 0x4d3e
leaq 0x9a8(%rsp), %rdi
movq %r13, %rsi
callq 0x4490
movq %r13, %rdi
callq 0x4638
leaq 0x9a0(%rsp), %rdi
leaq 0x230(%rsp), %rsi
callq 0x42e0
movq %rax, %rdi
leaq 0x14feb(%rip), %rsi     # 0x2dd6a
callq 0x4330
movq 0xb8(%rsp), %rsi
movq %rax, %rdi
callq 0x42e0
movq %rax, %rdi
leaq 0x11d19(%rip), %rsi     # 0x2aab7
callq 0x4330
movq 0x7b0(%rsp), %rsi
movq %rax, %rdi
callq 0x4230
movq %rax, %rdi
leaq 0x11cfa(%rip), %rsi     # 0x2aab7
callq 0x4330
movq 0x7b8(%rsp), %rsi
movq %rax, %rdi
callq 0x4230
movq %rax, %rdi
leaq 0x11cdb(%rip), %rsi     # 0x2aab7
callq 0x4330
movq %rax, %rdi
leaq 0x7d8(%rsp), %rsi
callq 0x42e0
movq %rax, %rdi
leaq 0x11cbc(%rip), %rsi     # 0x2aab7
callq 0x4330
movq 0xb8(%rsp), %rsi
addq $0x20, %rsi
movq %rax, %rdi
callq 0x42e0
movq %rax, %rdi
leaq 0x1412b(%rip), %rsi     # 0x2cf49
callq 0x4330
andl $0x0, 0x100(%rsp)
andq $0x0, 0x108(%rsp)
movq %r15, 0x110(%rsp)
movq %r15, 0x118(%rsp)
andq $0x0, 0x120(%rsp)
leaq 0x570(%rsp), %rbp
movq %rbp, %rdi
leaq 0x9a8(%rsp), %rsi
callq 0x44e0
movq %rbp, %rdi
movq %r13, %rsi
callq 0x19ebb
movl %eax, %r12d
movq %rbp, %rdi
callq 0x4638
testb %r12b, %r12b
je 0x18f7e
xorl %ebp, %ebp
movq 0x58(%rsp), %r12
cmpq %rbx, %r12
je 0x18eb4
leaq 0x20(%r12), %rsi
movq %r13, %rdi
callq 0xa992
xorl %ecx, %ecx
cmpq %r15, %rax
setne %cl
addl %ecx, %ebp
movq %r12, %rdi
callq 0x4240
movq %rax, %r12
jmp 0x18e8b
cmpl $0x3, %ebp
jb 0x18f21
movq 0x10(%rsp), %rax
cmpq $0x0, 0xd0(%rax)
je 0x18edc
movq 0x90(%rsp), %rdi
leaq 0x13fbc(%rip), %rsi     # 0x2ce93
callq 0x45d0
movq 0x90(%rsp), %rdi
leaq 0x7f8(%rsp), %rsi
callq 0x45f0
leaq 0xc8(%r14), %r12
cmpq $0x0, 0xd0(%r14)
je 0x18f11
movq %r12, %rdi
leaq 0x13f87(%rip), %rsi     # 0x2ce93
callq 0x45d0
movq %r12, %rdi
leaq 0x5f8(%rsp), %rsi
callq 0x45f0
movq %r13, %rdi
callq 0xa004
leaq 0x990(%rsp), %rdi
callq 0x4280
leaq 0xb8(%rsp), %rdi
callq 0x5d02
leaq 0x790(%rsp), %rdi
callq 0x165c8
leaq 0xd8(%rsp), %rdi
callq 0x4638
movq %r14, %rdi
callq 0x4240
movq %rax, %r14
jmp 0x18ccf
movq 0x10(%rsp), %rdi
callq 0x4240
movq %rax, 0x10(%rsp)
jmp 0x18fc2
movq %r13, %rdi
callq 0xa004
leaq 0x990(%rsp), %rdi
callq 0x4280
leaq 0xb8(%rsp), %rdi
callq 0x5d02
leaq 0x790(%rsp), %rdi
callq 0x165c8
leaq 0xd8(%rsp), %rdi
callq 0x4638
leaq 0x160(%rsp), %rbp
leaq 0x40(%rsp), %rdi
callq 0xa004
leaq 0x370(%rsp), %rdi
callq 0x4280
leaq 0x20(%rsp), %rdi
callq 0x5d02
leaq 0x590(%rsp), %rdi
callq 0x165c8
leaq 0x98(%rsp), %rdi
callq 0x4638
cmpq 0x18(%rsp), %r14
je 0x18afb
jmp 0x1928b
xorl %ebx, %ebx
jmp 0x1929a
andl $0x0, 0x48(%rsp)
andq $0x0, 0x50(%rsp)
movq %rbx, 0x58(%rsp)
movq %rbx, 0x60(%rsp)
andq $0x0, 0x68(%rsp)
leaq 0x13e20(%rip), %rdx     # 0x2ce56
leaq 0xf8(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x95e2
leaq 0x370(%rsp), %rdi
callq 0x4570
movq 0xf8(%rsp), %rsi
leaq 0x370(%rsp), %rdi
pushq $0x10
popq %rdx
callq 0x4050
leaq 0x3e0(%rsp), %rdi
callq 0x40c0
testb %al, %al
je 0x19332
leaq 0x13de3(%rip), %rdx     # 0x2ce6c
leaq 0x98(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x95e2
leaq 0x990(%rsp), %rdi
callq 0x4570
movq 0x98(%rsp), %rsi
leaq 0x990(%rsp), %rdi
pushq $0x10
popq %rdx
callq 0x4050
leaq 0xa00(%rsp), %rdi
callq 0x40c0
testb %al, %al
je 0x19364
movq 0x148(%rsp), %r12
leaq 0x350(%rsp), %rbx
leaq 0x330(%rsp), %r14
leaq 0x310(%rsp), %r15
leaq 0x138(%rsp), %rax
cmpq %rax, %r12
je 0x19396
leaq 0x20(%r12), %rsi
leaq 0x790(%rsp), %rdi
callq 0x4400
leaq 0x40(%r12), %rsi
leaq 0x590(%rsp), %rdi
callq 0x16512
cmpq $0x0, 0x620(%rsp)
je 0x19209
movq %rbx, %rdi
leaq 0x590(%rsp), %rsi
callq 0x4400
movq 0x5b0(%rsp), %rbp
movq %r14, %rdi
movq 0x5b8(%rsp), %r13
movsd 0x5d0(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
leaq 0x5d8(%rsp), %rsi
callq 0x4400
movq %r15, %rdi
leaq 0x5f8(%rsp), %rsi
callq 0x4400
leaq 0x40(%rsp), %rdi
movq %rbx, %rsi
movq %rbp, %rdx
movq %r13, %rcx
movsd 0x18(%rsp), %xmm0
movq %r14, %r8
movq %r15, %r9
callq 0x26400
movq %r15, %rdi
callq 0x4638
movq %r14, %rdi
callq 0x4638
movq %rbx, %rdi
callq 0x4638
leaq 0x370(%rsp), %rdi
leaq 0x5f8(%rsp), %rsi
callq 0x42e0
movq %rax, %rdi
leaq 0x13ca6(%rip), %rsi     # 0x2ce84
callq 0x4330
leaq 0x370(%rsp), %rdi
leaq 0x618(%rsp), %rsi
callq 0x42e0
movq %rax, %rdi
leaq 0x13c8a(%rip), %rsi     # 0x2ce8c
callq 0x4330
jmp 0x19226
leaq 0x990(%rsp), %rdi
leaq 0x5f8(%rsp), %rsi
callq 0x42e0
movq %rax, %rdi
callq 0x41c0
movq %r12, %rdi
callq 0x4240
movq %rax, %r12
leaq 0x590(%rsp), %rdi
callq 0x165c8
leaq 0x790(%rsp), %rdi
callq 0x4638
jmp 0x190f5
leaq 0x40(%rsp), %rdi
callq 0xa004
leaq 0x370(%rsp), %rdi
callq 0x4280
leaq 0x20(%rsp), %rdi
callq 0x5d02
leaq 0x590(%rsp), %rdi
callq 0x165c8
leaq 0x98(%rsp), %rdi
callq 0x4638
xorl %ebx, %ebx
leaq 0x180(%rsp), %rdi
callq 0x1a0a0
leaq 0x130(%rsp), %rdi
callq 0x1a0a0
leaq 0x230(%rsp), %rdi
callq 0x4638
leaq 0x250(%rsp), %rdi
callq 0x4638
leaq 0x270(%rsp), %rdi
callq 0x4638
leaq 0x290(%rsp), %rdi
callq 0x4638
leaq 0x70(%rsp), %rdi
callq 0x4638
leaq 0xb90(%rsp), %rdi
callq 0x4280
movl %ebx, %eax
addq $0xd18, %rsp            # imm = 0xD18
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x23cbb(%rip), %rdi     # 0x3cfc8
leaq 0x118d7(%rip), %rsi     # 0x2abeb
callq 0x4330
leaq 0x70(%rsp), %rsi
movq %rax, %rdi
callq 0x42e0
movq %rax, %rdi
callq 0x41c0
xorl %ebx, %ebx
jmp 0x192db
movq 0x23c8f(%rip), %rdi     # 0x3cfc8
leaq 0x10816(%rip), %rsi     # 0x29b56
callq 0x4330
leaq 0xf8(%rsp), %rsi
movq %rax, %rdi
callq 0x42e0
movq %rax, %rdi
callq 0x41c0
xorl %ebx, %ebx
jmp 0x196e9
movq 0x23c5d(%rip), %rdi     # 0x3cfc8
leaq 0x107e4(%rip), %rsi     # 0x29b56
callq 0x4330
leaq 0x98(%rsp), %rsi
movq %rax, %rdi
callq 0x42e0
movq %rax, %rdi
callq 0x41c0
xorl %ebx, %ebx
jmp 0x196cf
leaq 0x13af8(%rip), %rdx     # 0x2ce95
leaq 0xd8(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x95e2
leaq 0x590(%rsp), %rdi
callq 0x4570
movq 0xd8(%rsp), %rsi
leaq 0x590(%rsp), %rdi
pushq $0x10
popq %rdx
callq 0x4050
leaq 0x600(%rsp), %rdi
callq 0x40c0
testb %al, %al
je 0x19474
movq 0x198(%rsp), %r12
leaq 0x7f8(%rsp), %rbx
leaq 0x20(%rsp), %r14
leaq 0x790(%rsp), %r15
leaq 0x590(%rsp), %r13
leaq 0x188(%rsp), %rax
cmpq %rax, %r12
je 0x194a6
leaq 0x20(%r12), %rsi
movq %r14, %rdi
callq 0x4400
leaq 0x40(%r12), %rsi
movq %r15, %rdi
callq 0x16512
cmpq $0x0, 0x820(%rsp)
jne 0x19457
movq %r13, %rdi
movq %rbx, %rsi
callq 0x42e0
movq %rax, %rdi
callq 0x41c0
movq %r12, %rdi
callq 0x4240
movq %rax, %r12
movq %r15, %rdi
callq 0x165c8
movq %r14, %rdi
callq 0x4638
jmp 0x1940e
movq 0x23b4d(%rip), %rdi     # 0x3cfc8
leaq 0x106d4(%rip), %rsi     # 0x29b56
callq 0x4330
leaq 0xd8(%rsp), %rsi
movq %rax, %rdi
callq 0x42e0
movq %rax, %rdi
callq 0x41c0
xorl %ebx, %ebx
jmp 0x196b5
leaq 0x370(%rsp), %rdi
callq 0x4430
leaq 0x990(%rsp), %rdi
callq 0x4430
leaq 0x590(%rsp), %rdi
callq 0x4430
leaq 0x139d9(%rip), %rdx     # 0x2cead
leaq 0x20(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x95e2
leaq 0x790(%rsp), %rdi
callq 0x4570
movq 0x20(%rsp), %rsi
leaq 0x790(%rsp), %rdi
pushq $0x10
popq %rdx
callq 0x4050
leaq 0x800(%rsp), %rdi
callq 0x40c0
testb %al, %al
je 0x1964a
leaq 0x2e0(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x15fec
leaq 0x1d0(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x4400
leaq 0x2e0(%rsp), %rdi
leaq 0x1d0(%rsp), %rsi
callq 0x27858
movl %eax, %ebx
leaq 0x1d0(%rsp), %rdi
callq 0x4638
leaq 0x2e0(%rsp), %rdi
callq 0x16638
testb %bl, %bl
je 0x19672
leaq 0x1394c(%rip), %rdx     # 0x2ceca
leaq 0xb8(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x95e2
leaq 0x2b0(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x15fec
leaq 0x1b0(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x4400
leaq 0x2b0(%rsp), %rdi
leaq 0x1b0(%rsp), %rsi
callq 0x26940
movl %eax, %ebx
leaq 0x1b0(%rsp), %rdi
callq 0x4638
leaq 0x2b0(%rsp), %rdi
callq 0x16638
testb %bl, %bl
je 0x19676
callq 0x4220
movq %rax, %r14
movq 0x239c9(%rip), %rdi     # 0x3cfc8
leaq 0xfd3f(%rip), %rsi      # 0x29345
callq 0x4330
cvtsi2sd %r14, %xmm0
subsd 0x128(%rsp), %xmm0
divsd 0xf9e7(%rip), %xmm0     # 0x29008
movq %rax, %rdi
callq 0x4510
leaq 0xfd28(%rip), %rsi      # 0x29358
movq %rax, %rdi
callq 0x4330
movq %rax, %rdi
callq 0x41c0
movq %rax, %rdi
callq 0x41c0
jmp 0x19691
movq 0x23977(%rip), %rdi     # 0x3cfc8
leaq 0x104fe(%rip), %rsi     # 0x29b56
callq 0x4330
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x42e0
movq %rax, %rdi
callq 0x41c0
xorl %ebx, %ebx
jmp 0x1969e
movq 0x2394b(%rip), %rdi     # 0x3cfc8
leaq 0x11e7e(%rip), %rsi     # 0x2b502
callq 0x4330
movq %rax, %rdi
callq 0x41c0
leaq 0xb8(%rsp), %rdi
callq 0x4638
leaq 0x790(%rsp), %rdi
callq 0x4480
leaq 0x20(%rsp), %rdi
callq 0x4638
leaq 0x590(%rsp), %rdi
callq 0x4480
leaq 0xd8(%rsp), %rdi
callq 0x4638
leaq 0x990(%rsp), %rdi
callq 0x4480
leaq 0x98(%rsp), %rdi
callq 0x4638
leaq 0x370(%rsp), %rdi
callq 0x4480
leaq 0xf8(%rsp), %rdi
callq 0x4638
leaq 0x40(%rsp), %rdi
callq 0x16638
jmp 0x1928d
movq %rax, %rbx
leaq 0x1b0(%rsp), %rdi
callq 0x4638
jmp 0x19727
movq %rax, %rbx
leaq 0x2b0(%rsp), %rdi
callq 0x16638
jmp 0x19761
jmp 0x1977e
jmp 0x1975e
movq %rax, %rbx
leaq 0x1d0(%rsp), %rdi
callq 0x4638
jmp 0x1974f
movq %rax, %rbx
leaq 0x2e0(%rsp), %rdi
callq 0x16638
jmp 0x19781
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
callq 0x4638
jmp 0x19781
jmp 0x197d5
jmp 0x197d0
movq %rax, %rbx
jmp 0x197ef
jmp 0x1984f
movq %rax, %rbx
leaq 0x790(%rsp), %rdi
callq 0x4480
jmp 0x197d8
movq %rax, %rbx
jmp 0x198e6
jmp 0x197b1
jmp 0x197d0
movq %rax, %rbx
jmp 0x19900
movq %rax, %rbx
jmp 0x1990d
jmp 0x1984f
movq %rax, %rbx
jmp 0x198f3
jmp 0x19891
movq %rax, %rbx
leaq 0x790(%rsp), %rdi
callq 0x165c8
jmp 0x197d8
movq %rax, %rbx
jmp 0x197e2
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x4638
leaq 0x590(%rsp), %rdi
callq 0x4480
leaq 0xd8(%rsp), %rdi
jmp 0x198d4
jmp 0x19891
movq %rax, %rbx
jmp 0x19828
movq %rax, %rbx
jmp 0x1981b
movq %rax, %rbx
leaq 0x310(%rsp), %rdi
callq 0x4638
leaq 0x330(%rsp), %rdi
callq 0x4638
leaq 0x350(%rsp), %rdi
callq 0x4638
jmp 0x198bf
movq %rax, %rbx
leaq 0x1f0(%rsp), %rdi
jmp 0x19a36
jmp 0x1995b
movq %rax, %rbx
jmp 0x198d9
movq %rax, %rbx
jmp 0x198cc
movq %rax, %rbx
leaq 0x210(%rsp), %rdi
callq 0x4638
jmp 0x19a48
movq %rax, %rbx
jmp 0x19a48
movq %rax, %rbx
jmp 0x19a62
movq %rax, %rbx
jmp 0x19a6f
movq %rax, %rbx
jmp 0x19a7c
movq %rax, %rbx
jmp 0x19a89
jmp 0x19969
jmp 0x198a7
jmp 0x19969
jmp 0x198a7
movq %rax, %rbx
leaq 0x370(%rsp), %rdi
jmp 0x19a8e
jmp 0x19969
movq %rax, %rbx
leaq 0x590(%rsp), %rdi
callq 0x165c8
leaq 0x790(%rsp), %rdi
callq 0x4638
leaq 0x990(%rsp), %rdi
callq 0x4480
leaq 0x98(%rsp), %rdi
callq 0x4638
leaq 0x370(%rsp), %rdi
callq 0x4480
leaq 0xf8(%rsp), %rdi
callq 0x4638
leaq 0x40(%rsp), %rdi
callq 0x16638
jmp 0x19a3b
jmp 0x1998d
movq %rax, %rbx
jmp 0x19a17
movq %rax, %rbx
jmp 0x19a21
movq %rax, %rbx
jmp 0x19a2e
movq %rax, %rbx
leaq 0x160(%rsp), %rdi
jmp 0x199fb
movq %rax, %rbx
leaq 0x990(%rsp), %rdi
callq 0x4638
jmp 0x19a0a
movq %rax, %rbx
jmp 0x19a3b
jmp 0x1998d
jmp 0x19971
jmp 0x19969
movq %rax, %rbx
jmp 0x19a93
movq %rax, %rbx
jmp 0x19a0a
movq %rax, %rbx
leaq 0x570(%rsp), %rdi
callq 0x4638
jmp 0x199bf
jmp 0x199bc
movq %rax, %rbx
jmp 0x19a00
jmp 0x199b7
movq %rax, %rbx
jmp 0x199e6
movq %rax, %rbx
jmp 0x199f3
movq %rax, %rbx
leaq 0xf8(%rsp), %rdi
callq 0x4638
jmp 0x199cc
movq %rax, %rbx
jmp 0x199d9
jmp 0x199bc
movq %rax, %rbx
jmp 0x199cc
movq %rax, %rbx
leaq 0xf8(%rsp), %rdi
callq 0xa004
leaq 0x990(%rsp), %rdi
callq 0x4280
leaq 0xb8(%rsp), %rdi
callq 0x5d02
leaq 0x790(%rsp), %rdi
callq 0x165c8
leaq 0xd8(%rsp), %rdi
callq 0x4638
leaq 0x40(%rsp), %rdi
callq 0xa004
leaq 0x370(%rsp), %rdi
callq 0x4280
leaq 0x20(%rsp), %rdi
callq 0x5d02
leaq 0x590(%rsp), %rdi
callq 0x165c8
leaq 0x98(%rsp), %rdi
callq 0x4638
leaq 0x180(%rsp), %rdi
callq 0x1a0a0
leaq 0x130(%rsp), %rdi
callq 0x1a0a0
leaq 0x230(%rsp), %rdi
callq 0x4638
leaq 0x250(%rsp), %rdi
callq 0x4638
leaq 0x270(%rsp), %rdi
callq 0x4638
leaq 0x290(%rsp), %rdi
callq 0x4638
leaq 0x70(%rsp), %rdi
callq 0x4638
leaq 0xb90(%rsp), %rdi
callq 0x4280
movq %rbx, %rdi
callq 0x45a0