// File: schneebergerlab[P]DrLink/sample_molecule.cpp
// Function: sample_molecule(int, char**)
bool sample_molecule(int argc, char* argv[])
{
    std::stringstream usage;
    usage.str("");
    if(argc < 8)
    {
        usage << endl;
        usage << "   Given sets of molecule size distributions and molecule info, "                         
              << endl;
        usage << "   this function samples molecules according to intersection of molecule sizes"           
              << endl;        
        const char *buildString = __DATE__", " __TIME__;
        usage << "   (compiled on " << buildString << ")"                                                   
              << endl << endl;
        usage << "   Usage: DrLink resample msize1.txt,msize2.txt[,...] mole1.gz,mole2.gz[,...] read1,read2[,...] labels outprefix srand-sleep-int" 
              << endl << endl;
        usage << "\twhere "                                                         << endl;
        usage << "\tmsize*.txt:   molecule size distribution of pools"              << endl;
        usage << "\tmole*.gz  :   molecule meta info corresponding to molecule size of pools from DrLink molecule"  
              << endl;
        usage << "\tread*     :   mean molecule read coverage in raw data"          << endl;
        usage << "\tlabels    :   sample-specific label of output files"            << endl;
        usage << "\toutprefix :   general label of output files"                    << endl;
        cout  << usage.str() << endl;
        return false;
    }
    double startT   = clock(); 
    int srandsleep  = atoi(argv[7]); 
    cout << "   Info: sleeping " << srandsleep << " seconds to get various srand seeds. " << endl;
    sleep(srandsleep);
    string lenfiles = (string)argv[2];
    vector<string> lenfileinfo = split_string(lenfiles, ',');
    if(lenfileinfo.size()<2)
    {
        cout << "   Error: only one file given. No need to sample!" << endl;
        return false;
    }
    string molfiles = (string)argv[3];
    vector<string> molfileinfo = split_string(molfiles, ',');
    if(molfileinfo.size()<2)
    {
        cout << "   Error: only one file given. No need to sample!" << endl;
        return false;
    }    
    if(lenfileinfo.size() != molfileinfo.size())
    {
        cout << "   Error: molecule-size file-number does not matach molecule-meta-info file-number. " << endl;
        return false;
    }
    //
    vector<string> labels = split_string((string)argv[5], ',');
    string out_prefix     = string(argv[6]);       
    // 1. read number of molecule-size distributions in pools
    map<int, unsigned long> mNum_intersec;
    map<int, map<int, unsigned long> > mNum_individ;
    vector<string>::iterator lfitr;
    vector<string>::iterator lfitr_end;
    lfitr     = lenfileinfo.begin();
    lfitr_end = lenfileinfo.end();
    int i = -1;
    while(lfitr != lfitr_end)
    {
        string msfile = *lfitr;
        map<int, unsigned long> mNum;
        if(!(read_msize_dist(msfile, &mNum, &mNum_intersec)))
        {
            cout << "   Error: failed in reading molecule size distribution. " << endl;
            return false;
        }
        i ++;
        //
        mNum_individ.insert(std::pair<int, map<int, unsigned long> >(i, mNum) );
        //
        lfitr ++;
    }
    // 2. get sampling ratio with respecitve to a specific molecule size for each pool
    map<int, map<int, double> > mNum_individ_sratio;
    lfitr     = lenfileinfo.begin();
    lfitr_end = lenfileinfo.end();
    i = -1;
    while(lfitr != lfitr_end)
    {
        map<int, double> msratio;
        //
        i ++;
        map<int, unsigned long> mNum = mNum_individ[i];
        map<int, unsigned long>::iterator lenitr;
        map<int, unsigned long>::iterator lenitr_end;
        lenitr     = mNum.begin();
        lenitr_end = mNum.end();
        while(lenitr != lenitr_end)
        {
            int key           = (*lenitr).first;
            unsigned long num = (*lenitr).second;
            assert( mNum_intersec.find(key) != mNum_intersec.end() );
            if(num == 0) num  = 1;
            double sratio     = mNum_intersec[key]*1.0/num;
            sratio = sratio*0.96;
            
            // scaling - 2018-09-25: to get C substantially sampled while keeping around 6 million molecules
            if(labels[i].compare("B") == 0) 
            {
                sratio = sratio*(6000000.0/7016664.0);
            }else
            if(labels[i].compare("C") == 0)
            {
                sratio = sratio*(6000000.0/6949772.0);
            }else
            if(labels[i].compare("D") == 0) 
            {
                sratio = sratio*(6000000.0/7273738.0);
            }else
            if(labels[i].compare("E") == 0) 
            {
                sratio = sratio*(6000000.0/7101105.0);
            }else
            if(labels[i].compare("P") == 0) 
            {
                sratio = sratio*(6000000.0/6682080.0); // 6882080
            }else ;
            //
               
            msratio.insert(std::pair<int, double>(key, sratio)); // to make D sampled
            lenitr ++;
        }
        //
        mNum_individ_sratio.insert(std::pair<int, map<int, double> >(i, msratio));      
        //
        lfitr ++; 
    }
    // check
    if(true)
    {
        lfitr     = lenfileinfo.begin();
        lfitr_end = lenfileinfo.end();
        i = -1;   
        while(lfitr != lfitr_end)     
        {
            i ++;
            map<int, unsigned long> mNum = mNum_individ[i];
            map<int, double>     msratio = mNum_individ_sratio[i];
            cout << "   Check: file " << lenfileinfo[i] << endl << endl;
            if(labels[i].compare("D") == 0) 
            {
                cout << "   Info: all length ratio decreased by 0.04 to get D a random molecule number. " << endl;
            }
            map<int, double>::iterator sritr;
            map<int, double>::iterator sritr_end;
            sritr     = msratio.begin();
            sritr_end = msratio.end();
            while(sritr != sritr_end)
            {
                int key = (*sritr).first;
                cout << "      " 
                     << (*sritr).first 
                     << "\t" << (*sritr).second 
                     << " from " 
                     << mNum_intersec[key] 
                     << "/" 
                     << mNum[key] 
                     << endl;
                sritr ++;
            }
            lfitr ++;
        }
    }
    // 3. get sampling ratio with respecitve to a specific molecule base coverage for each pool
    
    // 4. sample molecules
    // read ratio
    vector<string> readratiostr = split_string((string)argv[4], ',');
    vector<double> readratio; // ratio of reads to keep
    double minmrc = 1;
    vector<string>::iterator rritr;
    vector<string>::iterator rritr_end;
    rritr     = readratiostr.begin();
    rritr_end = readratiostr.end();
    while(rritr != rritr_end)
    {
        double rr = atof((*rritr).c_str());
        readratio.push_back(rr);
        if(minmrc > rr) minmrc = rr;
        rritr ++;
    }
    vector<double>::iterator rr2itr     = readratio.begin();
    vector<double>::iterator rr2itr_end = readratio.end();
    while(rr2itr != rr2itr_end)
    {
        (*rr2itr) = 1.0 - ((*rr2itr) - minmrc)/(*rr2itr);
        rr2itr ++;
    }
    // molecule
    vector<string>::iterator mfitr;
    vector<string>::iterator mfitr_end;
    mfitr     = molfileinfo.begin();
    mfitr_end = molfileinfo.end();
    i = -1;
    while(mfitr != mfitr_end)
    {
        i ++;
        double this_readratio       = readratio[i];
            // special - caution!
            if(labels[i].compare("B") == 0) 
            {
                this_readratio = this_readratio*0.95*0.83643;
            }else
            if(labels[i].compare("C") == 0)
            {
                this_readratio = this_readratio*1.00*0.788091;
            }else
            if(labels[i].compare("D") == 0) 
            {
                this_readratio = this_readratio*0.92*44.0/49.0;
            }else
            if(labels[i].compare("E") == 0) 
            {
                this_readratio = this_readratio*1.00;
            }else
            if(labels[i].compare("P") == 0) 
            {
                this_readratio = this_readratio*0.92*44.0/49.0;
            }else ;
        string molfile              = molfileinfo[i];
        string ilabel               = labels[i];
        map<int,    double> msratio = mNum_individ_sratio[i];    
        //    
        map<string, unsigned long> molecule_cov;
        map<int,    unsigned long> molecule_len;
        map<int,    unsigned long> molecule_len_sum;                 
        map<int,    unsigned long> molecule_read_num;
        map<int,    unsigned long> molecule_read_num_sum;
        map<string,           int> barcode_molecule_cnt;
        if(molfile.compare("skip") != 0)
        {
            if(!sampling_molecule(molfile, 
                                this_readratio,
                                out_prefix + "_" + ilabel, 
                                msratio, 
                                &molecule_cov,
                                &molecule_len,
                                &molecule_len_sum,                      
                                &molecule_read_num,
                                &molecule_read_num_sum,
                                &barcode_molecule_cnt))
            {
                return false;
            }  
            if(!write_sampled_molecule_stat(molecule_cov, 
                                            molecule_len, 
                                            molecule_len_sum, 
                                            molecule_read_num,
                                            molecule_read_num_sum,
                                            barcode_molecule_cnt,
                                            out_prefix + "_" + ilabel))
            {
                return false;
            }
        }
        mfitr ++;  
    }  
        
    double finishT= clock();
    cout << "   Time consumed: " << (finishT-startT)/1000000 << " seconds" << endl << endl;    
    return true;
}

// Assembly:
subq $0xd08, %rsp            # imm = 0xD08
movl %edi, 0xd00(%rsp)
movq %rsi, 0xcf8(%rsp)
leaq 0xb70(%rsp), %rdi
callq 0x5320
leaq 0xb4f(%rsp), %rdi
movq %rdi, 0x248(%rsp)
callq 0x57c0
movq 0x248(%rsp), %rdx
leaq 0x2bbbd(%rip), %rsi     # 0x6ab94
leaq 0xb50(%rsp), %rdi
callq 0x6880
jmp 0x3efe6
leaq 0xb70(%rsp), %rdi
leaq 0xb50(%rsp), %rsi
callq 0x5510
jmp 0x3effd
leaq 0xb50(%rsp), %rdi
callq 0x58b8
leaq 0xb4f(%rsp), %rdi
callq 0x54d0
cmpl $0x8, 0xd00(%rsp)
jge 0x3f3c3
leaq 0xb80(%rsp), %rdi
movq 0x45f7c(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x3f03b
leaq 0xb80(%rsp), %rdi
leaq 0x2b00e(%rip), %rsi     # 0x6a058
callq 0x5460
movq %rax, 0x240(%rsp)
jmp 0x3f059
movq 0x240(%rsp), %rdi
movq 0x45f48(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x3f06f
leaq 0xb80(%rsp), %rdi
leaq 0x2b01b(%rip), %rsi     # 0x6a099
callq 0x5460
movq %rax, 0x238(%rsp)
jmp 0x3f08d
movq 0x238(%rsp), %rdi
movq 0x45f14(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x3f0a3
leaq 0x2b03e(%rip), %rax     # 0x6a0e8
movq %rax, 0xb30(%rsp)
leaq 0xb80(%rsp), %rdi
leaq 0x2aca1(%rip), %rsi     # 0x69d62
callq 0x5460
movq %rax, 0x230(%rsp)
jmp 0x3f0d0
movq 0x230(%rsp), %rdi
movq 0xb30(%rsp), %rsi
callq 0x5460
movq %rax, 0x228(%rsp)
jmp 0x3f0ef
movq 0x228(%rsp), %rdi
leaq 0x2b2d2(%rip), %rsi     # 0x6a3d0
callq 0x5460
movq %rax, 0x220(%rsp)
jmp 0x3f10d
movq 0x220(%rsp), %rdi
movq 0x45e94(%rip), %rsi     # 0x84fb0
callq 0x54b0
movq %rax, 0x218(%rsp)
jmp 0x3f12b
movq 0x218(%rsp), %rdi
movq 0x45e76(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x3f141
leaq 0xb80(%rsp), %rdi
leaq 0x2afae(%rip), %rsi     # 0x6a0fe
callq 0x5460
movq %rax, 0x210(%rsp)
jmp 0x3f15f
movq 0x210(%rsp), %rdi
movq 0x45e42(%rip), %rsi     # 0x84fb0
callq 0x54b0
movq %rax, 0x208(%rsp)
jmp 0x3f17d
movq 0x208(%rsp), %rdi
movq 0x45e24(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x3f193
leaq 0xb80(%rsp), %rdi
leaq 0x2ac22(%rip), %rsi     # 0x69dc4
callq 0x5460
movq %rax, 0x200(%rsp)
jmp 0x3f1b1
movq 0x200(%rsp), %rdi
movq 0x45df0(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x3f1c7
leaq 0xb80(%rsp), %rdi
leaq 0x2afa9(%rip), %rsi     # 0x6a17f
callq 0x5460
movq %rax, 0x1f8(%rsp)
jmp 0x3f1e5
movq 0x1f8(%rsp), %rdi
movq 0x45dbc(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x3f1fb
leaq 0xb80(%rsp), %rdi
leaq 0x2afa8(%rip), %rsi     # 0x6a1b2
callq 0x5460
movq %rax, 0x1f0(%rsp)
jmp 0x3f219
movq 0x1f0(%rsp), %rdi
movq 0x45d88(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x3f22f
leaq 0xb80(%rsp), %rdi
leaq 0x2afd3(%rip), %rsi     # 0x6a211
callq 0x5460
movq %rax, 0x1e8(%rsp)
jmp 0x3f24d
movq 0x1e8(%rsp), %rdi
movq 0x45d54(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x3f263
leaq 0xb80(%rsp), %rdi
leaq 0x2afd6(%rip), %rsi     # 0x6a248
callq 0x5460
movq %rax, 0x1e0(%rsp)
jmp 0x3f281
movq 0x1e0(%rsp), %rdi
movq 0x45d20(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x3f297
leaq 0xb80(%rsp), %rdi
leaq 0x2afd7(%rip), %rsi     # 0x6a27d
callq 0x5460
movq %rax, 0x1d8(%rsp)
jmp 0x3f2b5
movq 0x1d8(%rsp), %rdi
movq 0x45cec(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x3f2cb
leaq 0xb10(%rsp), %rdi
leaq 0xb70(%rsp), %rsi
callq 0x5440
jmp 0x3f2e2
movq 0x45cdf(%rip), %rdi     # 0x84fc8
leaq 0xb10(%rsp), %rsi
callq 0x53e0
movq %rax, 0x1d0(%rsp)
jmp 0x3f300
movq 0x1d0(%rsp), %rdi
movq 0x45ca1(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x3f316
leaq 0xb10(%rsp), %rdi
callq 0x58b8
movb $0x0, 0xd07(%rsp)
movl $0x1, 0xb0c(%rsp)
jmp 0x413dd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
jmp 0x3f372
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
leaq 0xb50(%rsp), %rdi
callq 0x58b8
leaq 0xb4f(%rsp), %rdi
callq 0x54d0
jmp 0x413fb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
jmp 0x413fb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
leaq 0xb10(%rsp), %rdi
callq 0x58b8
jmp 0x413fb
callq 0x52e0
cvtsi2sd %rax, %xmm0
movsd %xmm0, 0xb00(%rsp)
movq 0xcf8(%rsp), %rax
movq 0x38(%rax), %rdi
callq 0x56a0
movl %eax, 0xafc(%rsp)
movq 0x45bd3(%rip), %rdi     # 0x84fc8
leaq 0x2aeae(%rip), %rsi     # 0x6a2aa
callq 0x5460
movq %rax, 0x1c8(%rsp)
jmp 0x3f40b
movq 0x1c8(%rsp), %rdi
movl 0xafc(%rsp), %esi
callq 0x5790
movq %rax, 0x1c0(%rsp)
jmp 0x3f429
movq 0x1c0(%rsp), %rdi
leaq 0x2ae85(%rip), %rsi     # 0x6a2bd
callq 0x5460
movq %rax, 0x1b8(%rsp)
jmp 0x3f447
movq 0x1b8(%rsp), %rdi
movq 0x45b5a(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x3f45d
movl 0xafc(%rsp), %edi
callq 0x5360
jmp 0x3f46b
movq 0xcf8(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x1a8(%rsp)
leaq 0xad7(%rsp), %rdi
movq %rdi, 0x1b0(%rsp)
callq 0x57c0
movq 0x1a8(%rsp), %rsi
movq 0x1b0(%rsp), %rdx
leaq 0xad8(%rsp), %rdi
callq 0x6880
jmp 0x3f4b3
leaq 0xad7(%rsp), %rdi
callq 0x54d0
movb $0x2c, 0xab7(%rsp)
leaq 0xab8(%rsp), %rdi
leaq 0xad8(%rsp), %rsi
leaq 0xab7(%rsp), %rdx
callq 0x60790
jmp 0x3f4e7
leaq 0xab8(%rsp), %rdi
callq 0xfbb0
cmpq $0x2, %rax
jae 0x3f5a1
movq 0x45ac3(%rip), %rdi     # 0x84fc8
leaq 0x2add7(%rip), %rsi     # 0x6a2e3
callq 0x5460
movq %rax, 0x1a0(%rsp)
jmp 0x3f51b
movq 0x1a0(%rsp), %rdi
movq 0x45a86(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x3f531
movb $0x0, 0xd07(%rsp)
movl $0x1, 0xb0c(%rsp)
jmp 0x413a5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
leaq 0xad7(%rsp), %rdi
callq 0x54d0
jmp 0x413fb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
jmp 0x413ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
jmp 0x413c1
movq 0xcf8(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x190(%rsp)
leaq 0xa8f(%rsp), %rdi
movq %rdi, 0x198(%rsp)
callq 0x57c0
movq 0x190(%rsp), %rsi
movq 0x198(%rsp), %rdx
leaq 0xa90(%rsp), %rdi
callq 0x6880
jmp 0x3f5e9
leaq 0xa8f(%rsp), %rdi
callq 0x54d0
movb $0x2c, 0xa6f(%rsp)
leaq 0xa70(%rsp), %rdi
leaq 0xa90(%rsp), %rsi
leaq 0xa6f(%rsp), %rdx
callq 0x60790
jmp 0x3f61d
leaq 0xa70(%rsp), %rdi
callq 0xfbb0
cmpq $0x2, %rax
jae 0x3f6d7
movq 0x4598d(%rip), %rdi     # 0x84fc8
leaq 0x2aca1(%rip), %rsi     # 0x6a2e3
callq 0x5460
movq %rax, 0x188(%rsp)
jmp 0x3f651
movq 0x188(%rsp), %rdi
movq 0x45950(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x3f667
movb $0x0, 0xd07(%rsp)
movl $0x1, 0xb0c(%rsp)
jmp 0x4136d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
leaq 0xa8f(%rsp), %rdi
callq 0x54d0
jmp 0x413c1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
jmp 0x41396
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
jmp 0x41389
leaq 0xab8(%rsp), %rdi
callq 0xfbb0
movq %rax, 0x180(%rsp)
leaq 0xa70(%rsp), %rdi
callq 0xfbb0
movq %rax, %rcx
movq 0x180(%rsp), %rax
cmpq %rcx, %rax
je 0x3f754
movq 0x458b8(%rip), %rdi     # 0x84fc8
leaq 0x2abfe(%rip), %rsi     # 0x6a315
callq 0x5460
movq %rax, 0x178(%rsp)
jmp 0x3f726
movq 0x178(%rsp), %rdi
movq 0x4587b(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x3f73c
movb $0x0, 0xd07(%rsp)
movl $0x1, 0xb0c(%rsp)
jmp 0x4136d
movq 0xcf8(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, 0x168(%rsp)
leaq 0xa2f(%rsp), %rdi
movq %rdi, 0x170(%rsp)
callq 0x57c0
movq 0x168(%rsp), %rsi
movq 0x170(%rsp), %rdx
leaq 0xa30(%rsp), %rdi
callq 0x6880
jmp 0x3f79c
movb $0x2c, 0xa2e(%rsp)
leaq 0xa50(%rsp), %rdi
leaq 0xa30(%rsp), %rsi
leaq 0xa2e(%rsp), %rdx
callq 0x60790
jmp 0x3f7c3
leaq 0xa30(%rsp), %rdi
callq 0x58b8
leaq 0xa2f(%rsp), %rdi
callq 0x54d0
movq 0xcf8(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x158(%rsp)
leaq 0xa07(%rsp), %rdi
movq %rdi, 0x160(%rsp)
callq 0x57c0
movq 0x158(%rsp), %rsi
movq 0x160(%rsp), %rdx
leaq 0xa08(%rsp), %rdi
callq 0x6880
jmp 0x3f825
leaq 0xa07(%rsp), %rdi
callq 0x54d0
leaq 0x9d0(%rsp), %rdi
callq 0xfb80
leaq 0x9a0(%rsp), %rdi
callq 0x450a0
leaq 0x998(%rsp), %rdi
callq 0x2de30
leaq 0x990(%rsp), %rdi
callq 0x2de30
leaq 0xab8(%rsp), %rdi
callq 0x2d110
movq %rax, 0x988(%rsp)
movq 0x988(%rsp), %rax
movq %rax, 0x998(%rsp)
leaq 0xab8(%rsp), %rdi
callq 0x2d140
movq %rax, 0x980(%rsp)
movq 0x980(%rsp), %rax
movq %rax, 0x990(%rsp)
movl $0xffffffff, 0x97c(%rsp) # imm = 0xFFFFFFFF
leaq 0x998(%rsp), %rdi
leaq 0x990(%rsp), %rsi
callq 0x2d170
testb $0x1, %al
jne 0x3f8d9
jmp 0x3fb93
leaq 0x998(%rsp), %rdi
callq 0x2d1b0
movq %rax, %rsi
leaq 0x958(%rsp), %rdi
callq 0x51f0
jmp 0x3f8f8
leaq 0x928(%rsp), %rdi
callq 0xfb80
leaq 0x908(%rsp), %rdi
leaq 0x958(%rsp), %rsi
callq 0x51f0
jmp 0x3f91c
leaq 0x908(%rsp), %rdi
leaq 0x928(%rsp), %rsi
leaq 0x9d0(%rsp), %rdx
callq 0x41420
movb %al, 0x157(%rsp)
jmp 0x3f942
movb 0x157(%rsp), %al
xorb $-0x1, %al
movb %al, 0x156(%rsp)
leaq 0x908(%rsp), %rdi
callq 0x58b8
movb 0x156(%rsp), %al
testb $0x1, %al
jne 0x3f96f
jmp 0x3fa81
movq 0x45652(%rip), %rdi     # 0x84fc8
leaq 0x2a9ed(%rip), %rsi     # 0x6a36a
callq 0x5460
movq %rax, 0x148(%rsp)
jmp 0x3f98c
movq 0x148(%rsp), %rdi
movq 0x45615(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x3f9a2
movb $0x0, 0xd07(%rsp)
movl $0x1, 0xb0c(%rsp)
jmp 0x3fb23
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
jmp 0x3f9f1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
leaq 0xa30(%rsp), %rdi
callq 0x58b8
leaq 0xa2f(%rsp), %rdi
callq 0x54d0
jmp 0x41389
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
leaq 0xa07(%rsp), %rdi
callq 0x54d0
jmp 0x4135e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
jmp 0x41337
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
jmp 0x3fb74
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
leaq 0x908(%rsp), %rdi
callq 0x58b8
jmp 0x3fb74
movl 0x97c(%rsp), %eax
incl %eax
movl %eax, 0x97c(%rsp)
leaq 0x8d0(%rsp), %rdi
leaq 0x97c(%rsp), %rsi
leaq 0x928(%rsp), %rdx
callq 0x45100
jmp 0x3fab0
leaq 0x9a0(%rsp), %rdi
leaq 0x8d0(%rsp), %rsi
callq 0x450b0
movb %dl, 0x13f(%rsp)
movq %rax, 0x140(%rsp)
jmp 0x3fad6
movb 0x13f(%rsp), %al
movq 0x140(%rsp), %rcx
movq %rcx, 0x8c0(%rsp)
movb %al, 0x8c8(%rsp)
leaq 0x8d0(%rsp), %rdi
callq 0x45140
leaq 0x998(%rsp), %rdi
xorl %esi, %esi
callq 0x2d340
movq %rax, 0x8b8(%rsp)
movl $0x0, 0xb0c(%rsp)
leaq 0x928(%rsp), %rdi
callq 0xfe30
leaq 0x958(%rsp), %rdi
callq 0x58b8
movl 0xb0c(%rsp), %eax
testl %eax, %eax
jne 0x41301
jmp 0x3fb4e
jmp 0x3f8bb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
leaq 0x8d0(%rsp), %rdi
callq 0x45140
leaq 0x928(%rsp), %rdi
callq 0xfe30
leaq 0x958(%rsp), %rdi
callq 0x58b8
jmp 0x41337
leaq 0x888(%rsp), %rdi
callq 0x45160
leaq 0xab8(%rsp), %rdi
callq 0x2d110
movq %rax, 0x880(%rsp)
movq 0x880(%rsp), %rax
movq %rax, 0x998(%rsp)
leaq 0xab8(%rsp), %rdi
callq 0x2d140
movq %rax, 0x878(%rsp)
movq 0x878(%rsp), %rax
movq %rax, 0x990(%rsp)
movl $0xffffffff, 0x97c(%rsp) # imm = 0xFFFFFFFF
leaq 0x998(%rsp), %rdi
leaq 0x990(%rsp), %rsi
callq 0x2d170
testb $0x1, %al
jne 0x3fc13
jmp 0x40149
leaq 0x848(%rsp), %rdi
callq 0x45170
movl 0x97c(%rsp), %eax
incl %eax
movl %eax, 0x97c(%rsp)
leaq 0x9a0(%rsp), %rdi
leaq 0x97c(%rsp), %rsi
callq 0x45180
movq %rax, 0x130(%rsp)
jmp 0x3fc4f
movq 0x130(%rsp), %rsi
leaq 0x818(%rsp), %rdi
callq 0xfdc0
jmp 0x3fc66
leaq 0x810(%rsp), %rdi
callq 0x106c0
leaq 0x808(%rsp), %rdi
callq 0x106c0
leaq 0x818(%rsp), %rdi
callq 0x10710
movq %rax, 0x800(%rsp)
movq 0x800(%rsp), %rax
movq %rax, 0x810(%rsp)
leaq 0x818(%rsp), %rdi
callq 0x102a0
movq %rax, 0x7f8(%rsp)
movq 0x7f8(%rsp), %rax
movq %rax, 0x808(%rsp)
leaq 0x810(%rsp), %rdi
leaq 0x808(%rsp), %rsi
callq 0x10740
testb $0x1, %al
jne 0x3fce8
jmp 0x40063
leaq 0x810(%rsp), %rdi
movq %rdi, 0x120(%rsp)
callq 0x10380
movq 0x120(%rsp), %rdi
movl (%rax), %eax
movl %eax, 0x7f4(%rsp)
callq 0x10380
movq 0x8(%rax), %rax
movq %rax, 0x7e8(%rsp)
leaq 0x9d0(%rsp), %rdi
leaq 0x7f4(%rsp), %rsi
callq 0x10250
movq %rax, 0x128(%rsp)
jmp 0x3fd3e
movq 0x128(%rsp), %rax
movq %rax, 0x7e0(%rsp)
leaq 0x9d0(%rsp), %rdi
callq 0x102a0
movq %rax, 0x7d8(%rsp)
leaq 0x7e0(%rsp), %rdi
leaq 0x7d8(%rsp), %rsi
callq 0x10740
testb $0x1, %al
jne 0x3fd7e
jmp 0x3fd80
jmp 0x3fdd1
leaq 0x2a61c(%rip), %rdi     # 0x6a3a3
leaq 0x2a644(%rip), %rsi     # 0x6a3d2
movl $0xa1, %edx
leaq 0x2a64c(%rip), %rcx     # 0x6a3e6
callq 0x52d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
jmp 0x40137
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
jmp 0x4012a
cmpq $0x0, 0x7e8(%rsp)
jne 0x3fde8
movq $0x1, 0x7e8(%rsp)
leaq 0x9d0(%rsp), %rdi
leaq 0x7f4(%rsp), %rsi
callq 0x103a0
movq %rax, 0x118(%rsp)
jmp 0x3fe07
movq 0x118(%rsp), %rax
movq (%rax), %xmm0
movaps 0x272b6(%rip), %xmm3    # 0x670d0
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movapd 0x272ba(%rip), %xmm2    # 0x670e0
subpd %xmm2, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movq 0x7e8(%rsp), %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x7d0(%rsp)
movsd 0x2a1ba(%rip), %xmm0    # 0x6a020
mulsd 0x7d0(%rsp), %xmm0
movsd %xmm0, 0x7d0(%rsp)
movslq 0x97c(%rsp), %rsi
leaq 0xa50(%rsp), %rdi
callq 0x88f0
movq %rax, %rdi
leaq 0x2a572(%rip), %rsi     # 0x6a409
callq 0x5140
cmpl $0x0, %eax
jne 0x3fec0
movsd 0x2a19f(%rip), %xmm0    # 0x6a048
mulsd 0x7d0(%rsp), %xmm0
movsd %xmm0, 0x7d0(%rsp)
jmp 0x3ffe4
movslq 0x97c(%rsp), %rsi
leaq 0xa50(%rsp), %rdi
callq 0x88f0
movq %rax, %rdi
leaq 0x27cc7(%rip), %rsi     # 0x67ba6
callq 0x5140
cmpl $0x0, %eax
jne 0x3ff08
movsd 0x2a14f(%rip), %xmm0    # 0x6a040
mulsd 0x7d0(%rsp), %xmm0
movsd %xmm0, 0x7d0(%rsp)
jmp 0x3ffe2
movslq 0x97c(%rsp), %rsi
leaq 0xa50(%rsp), %rdi
callq 0x88f0
movq %rax, %rdi
leaq 0x2a4e4(%rip), %rsi     # 0x6a40b
callq 0x5140
cmpl $0x0, %eax
jne 0x3ff50
movsd 0x2a0ff(%rip), %xmm0    # 0x6a038
mulsd 0x7d0(%rsp), %xmm0
movsd %xmm0, 0x7d0(%rsp)
jmp 0x3ffe0
movslq 0x97c(%rsp), %rsi
leaq 0xa50(%rsp), %rdi
callq 0x88f0
movq %rax, %rdi
leaq 0x2a49e(%rip), %rsi     # 0x6a40d
callq 0x5140
cmpl $0x0, %eax
jne 0x3ff95
movsd 0x2a0af(%rip), %xmm0    # 0x6a030
mulsd 0x7d0(%rsp), %xmm0
movsd %xmm0, 0x7d0(%rsp)
jmp 0x3ffde
movslq 0x97c(%rsp), %rsi
leaq 0xa50(%rsp), %rdi
callq 0x88f0
movq %rax, %rdi
leaq 0x2a8c9(%rip), %rsi     # 0x6a87d
callq 0x5140
cmpl $0x0, %eax
jne 0x3ffda
movsd 0x2a062(%rip), %xmm0    # 0x6a028
mulsd 0x7d0(%rsp), %xmm0
movsd %xmm0, 0x7d0(%rsp)
jmp 0x3ffdc
jmp 0x3ffdc
jmp 0x3ffde
jmp 0x3ffe0
jmp 0x3ffe2
jmp 0x3ffe4
leaq 0x7c0(%rsp), %rdi
leaq 0x7f4(%rsp), %rsi
leaq 0x7d0(%rsp), %rdx
callq 0x452c0
jmp 0x40003
leaq 0x848(%rsp), %rdi
leaq 0x7c0(%rsp), %rsi
callq 0x45270
movb %dl, 0x10f(%rsp)
movq %rax, 0x110(%rsp)
jmp 0x40029
movb 0x10f(%rsp), %al
movq 0x110(%rsp), %rcx
movq %rcx, 0x7b0(%rsp)
movb %al, 0x7b8(%rsp)
leaq 0x810(%rsp), %rdi
xorl %esi, %esi
callq 0x10790
movq %rax, 0x7a8(%rsp)
jmp 0x3fcca
leaq 0x770(%rsp), %rdi
leaq 0x97c(%rsp), %rsi
leaq 0x848(%rsp), %rdx
callq 0x45340
jmp 0x40082
leaq 0x888(%rsp), %rdi
leaq 0x770(%rsp), %rsi
callq 0x452f0
movb %dl, 0xff(%rsp)
movq %rax, 0x100(%rsp)
jmp 0x400a8
movb 0xff(%rsp), %al
movq 0x100(%rsp), %rcx
movq %rcx, 0x760(%rsp)
movb %al, 0x768(%rsp)
leaq 0x770(%rsp), %rdi
callq 0x45380
leaq 0x998(%rsp), %rdi
xorl %esi, %esi
callq 0x2d340
movq %rax, 0x758(%rsp)
leaq 0x818(%rsp), %rdi
callq 0xfe30
leaq 0x848(%rsp), %rdi
callq 0x453a0
jmp 0x3fbf5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
leaq 0x770(%rsp), %rdi
callq 0x45380
leaq 0x818(%rsp), %rdi
callq 0xfe30
leaq 0x848(%rsp), %rdi
callq 0x453a0
jmp 0x412f2
leaq 0xab8(%rsp), %rdi
callq 0x2d110
movq %rax, 0x750(%rsp)
movq 0x750(%rsp), %rax
movq %rax, 0x998(%rsp)
leaq 0xab8(%rsp), %rdi
callq 0x2d140
movq %rax, 0x748(%rsp)
movq 0x748(%rsp), %rax
movq %rax, 0x990(%rsp)
movl $0xffffffff, 0x97c(%rsp) # imm = 0xFFFFFFFF
leaq 0x998(%rsp), %rdi
leaq 0x990(%rsp), %rsi
callq 0x2d170
testb $0x1, %al
jne 0x401bc
jmp 0x405c6
movl 0x97c(%rsp), %eax
incl %eax
movl %eax, 0x97c(%rsp)
leaq 0x9a0(%rsp), %rdi
leaq 0x97c(%rsp), %rsi
callq 0x45180
movq %rax, 0xf0(%rsp)
jmp 0x401eb
movq 0xf0(%rsp), %rsi
leaq 0x718(%rsp), %rdi
callq 0xfdc0
jmp 0x40202
leaq 0x888(%rsp), %rdi
leaq 0x97c(%rsp), %rsi
callq 0x453b0
movq %rax, 0xe8(%rsp)
jmp 0x40221
movq 0xe8(%rsp), %rsi
leaq 0x6e8(%rsp), %rdi
callq 0x454a0
jmp 0x40238
movq 0x44d89(%rip), %rdi     # 0x84fc8
leaq 0x2a1c9(%rip), %rsi     # 0x6a40f
callq 0x5460
movq %rax, 0xe0(%rsp)
jmp 0x40255
movslq 0x97c(%rsp), %rsi
leaq 0xab8(%rsp), %rdi
callq 0x88f0
movq 0xe0(%rsp), %rdi
movq %rax, %rsi
callq 0x53e0
movq %rax, 0xd8(%rsp)
jmp 0x40284
movq 0xd8(%rsp), %rdi
movq 0x44d1d(%rip), %rsi     # 0x84fb0
callq 0x54b0
movq %rax, 0xd0(%rsp)
jmp 0x402a2
movq 0xd0(%rsp), %rdi
movq 0x44cff(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x402b8
movslq 0x97c(%rsp), %rsi
leaq 0xa50(%rsp), %rdi
callq 0x88f0
movq %rax, %rdi
leaq 0x2a134(%rip), %rsi     # 0x6a40b
callq 0x5140
cmpl $0x0, %eax
jne 0x40372
movq 0x44cdc(%rip), %rdi     # 0x84fc8
leaq 0x2a12c(%rip), %rsi     # 0x6a41f
callq 0x5460
movq %rax, 0xc8(%rsp)
jmp 0x40302
movq 0xc8(%rsp), %rdi
movq 0x44c9f(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x40318
jmp 0x40372
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
jmp 0x412f2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
jmp 0x405b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
leaq 0x6e8(%rsp), %rdi
callq 0x453a0
jmp 0x405b4
leaq 0x6e0(%rsp), %rdi
callq 0x454d0
leaq 0x6d8(%rsp), %rdi
callq 0x454d0
leaq 0x6e8(%rsp), %rdi
callq 0x454f0
movq %rax, 0x6d0(%rsp)
movq 0x6d0(%rsp), %rax
movq %rax, 0x6e0(%rsp)
leaq 0x6e8(%rsp), %rdi
callq 0x45520
movq %rax, 0x6c8(%rsp)
movq 0x6c8(%rsp), %rax
movq %rax, 0x6d8(%rsp)
leaq 0x6e0(%rsp), %rdi
leaq 0x6d8(%rsp), %rsi
callq 0x45550
testb $0x1, %al
jne 0x403f4
jmp 0x4057e
leaq 0x6e0(%rsp), %rdi
callq 0x45570
movl (%rax), %eax
movl %eax, 0x6c4(%rsp)
movq 0x44bb7(%rip), %rdi     # 0x84fc8
leaq 0x28006(%rip), %rsi     # 0x6841e
callq 0x5460
movq %rax, 0xc0(%rsp)
jmp 0x40427
leaq 0x6e0(%rsp), %rdi
callq 0x45570
movq 0xc0(%rsp), %rdi
movl (%rax), %esi
callq 0x5790
movq %rax, 0xb8(%rsp)
jmp 0x4044d
movq 0xb8(%rsp), %rdi
leaq 0x2a737(%rip), %rsi     # 0x6ab93
callq 0x5460
movq %rax, 0xb0(%rsp)
jmp 0x4046b
leaq 0x6e0(%rsp), %rdi
callq 0x45570
movq 0xb0(%rsp), %rdi
movsd 0x8(%rax), %xmm0
callq 0x5830
movq %rax, 0xa8(%rsp)
jmp 0x40494
movq 0xa8(%rsp), %rdi
leaq 0x2a1d3(%rip), %rsi     # 0x6a676
callq 0x5460
movq %rax, 0xa0(%rsp)
jmp 0x404b2
leaq 0x9d0(%rsp), %rdi
leaq 0x6c4(%rsp), %rsi
callq 0x103a0
movq %rax, 0x98(%rsp)
jmp 0x404d1
movq 0xa0(%rsp), %rdi
movq 0x98(%rsp), %rax
movq (%rax), %rsi
callq 0x50f0
movq %rax, 0x90(%rsp)
jmp 0x404f3
movq 0x90(%rsp), %rdi
leaq 0x2a8e2(%rip), %rsi     # 0x6ade4
callq 0x5460
movq %rax, 0x88(%rsp)
jmp 0x40511
leaq 0x718(%rsp), %rdi
leaq 0x6c4(%rsp), %rsi
callq 0x103a0
movq %rax, 0x80(%rsp)
jmp 0x40530
movq 0x88(%rsp), %rdi
movq 0x80(%rsp), %rax
movq (%rax), %rsi
callq 0x50f0
movq %rax, 0x78(%rsp)
jmp 0x4054f
movq 0x78(%rsp), %rdi
movq 0x44a55(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x40562
leaq 0x6e0(%rsp), %rdi
xorl %esi, %esi
callq 0x45590
movq %rax, 0x6b8(%rsp)
jmp 0x403d6
leaq 0x998(%rsp), %rdi
xorl %esi, %esi
callq 0x2d340
movq %rax, 0x6b0(%rsp)
leaq 0x6e8(%rsp), %rdi
callq 0x453a0
leaq 0x718(%rsp), %rdi
callq 0xfe30
jmp 0x4019e
leaq 0x718(%rsp), %rdi
callq 0xfe30
jmp 0x412f2
movq 0xcf8(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x68(%rsp)
leaq 0x677(%rsp), %rdi
movq %rdi, 0x70(%rsp)
callq 0x57c0
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
leaq 0x678(%rsp), %rdi
callq 0x6880
jmp 0x40602
movb $0x2c, 0x676(%rsp)
leaq 0x698(%rsp), %rdi
leaq 0x678(%rsp), %rsi
leaq 0x676(%rsp), %rdx
callq 0x60790
jmp 0x40629
leaq 0x678(%rsp), %rdi
callq 0x58b8
leaq 0x677(%rsp), %rdi
callq 0x54d0
leaq 0x658(%rsp), %rdi
callq 0x455d0
movsd 0x26a58(%rip), %xmm0    # 0x670b0
movsd %xmm0, 0x650(%rsp)
leaq 0x648(%rsp), %rdi
callq 0x2de30
leaq 0x640(%rsp), %rdi
callq 0x2de30
leaq 0x698(%rsp), %rdi
callq 0x2d110
movq %rax, 0x638(%rsp)
movq 0x638(%rsp), %rax
movq %rax, 0x648(%rsp)
leaq 0x698(%rsp), %rdi
callq 0x2d140
movq %rax, 0x630(%rsp)
movq 0x630(%rsp), %rax
movq %rax, 0x640(%rsp)
leaq 0x648(%rsp), %rdi
leaq 0x640(%rsp), %rsi
callq 0x2d170
testb $0x1, %al
jne 0x406e3
jmp 0x407c6
leaq 0x648(%rsp), %rdi
callq 0x2d1b0
movq %rax, %rdi
callq 0x51d0
movq %rax, %rdi
callq 0x5570
movsd %xmm0, 0x628(%rsp)
leaq 0x658(%rsp), %rdi
leaq 0x628(%rsp), %rsi
callq 0x455e0
jmp 0x40720
movsd 0x650(%rsp), %xmm0
ucomisd 0x628(%rsp), %xmm0
jbe 0x407aa
movsd 0x628(%rsp), %xmm0
movsd %xmm0, 0x650(%rsp)
jmp 0x407aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
jmp 0x4077f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
leaq 0x678(%rsp), %rdi
callq 0x58b8
leaq 0x677(%rsp), %rdi
callq 0x54d0
jmp 0x412f2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
jmp 0x412d8
leaq 0x648(%rsp), %rdi
xorl %esi, %esi
callq 0x2d340
movq %rax, 0x620(%rsp)
jmp 0x406c5
leaq 0x658(%rsp), %rdi
callq 0x45650
movq %rax, 0x618(%rsp)
leaq 0x658(%rsp), %rdi
callq 0x45680
movq %rax, 0x610(%rsp)
leaq 0x618(%rsp), %rdi
leaq 0x610(%rsp), %rsi
callq 0x456b0
testb $0x1, %al
jne 0x4080b
jmp 0x40887
leaq 0x618(%rsp), %rdi
callq 0x456f0
movsd (%rax), %xmm0
subsd 0x650(%rsp), %xmm0
movsd %xmm0, 0x58(%rsp)
leaq 0x618(%rsp), %rdi
callq 0x456f0
movsd 0x58(%rsp), %xmm1
divsd (%rax), %xmm1
movsd 0x26866(%rip), %xmm0    # 0x670b0
subsd %xmm1, %xmm0
movsd %xmm0, 0x60(%rsp)
leaq 0x618(%rsp), %rdi
callq 0x456f0
movsd 0x60(%rsp), %xmm0
movsd %xmm0, (%rax)
leaq 0x618(%rsp), %rdi
xorl %esi, %esi
callq 0x45700
movq %rax, 0x608(%rsp)
jmp 0x407f0
leaq 0x600(%rsp), %rdi
callq 0x2de30
leaq 0x5f8(%rsp), %rdi
callq 0x2de30
leaq 0xa70(%rsp), %rdi
callq 0x2d110
movq %rax, 0x5f0(%rsp)
movq 0x5f0(%rsp), %rax
movq %rax, 0x600(%rsp)
leaq 0xa70(%rsp), %rdi
callq 0x2d140
movq %rax, 0x5e8(%rsp)
movq 0x5e8(%rsp), %rax
movq %rax, 0x5f8(%rsp)
movl $0xffffffff, 0x97c(%rsp) # imm = 0xFFFFFFFF
leaq 0x600(%rsp), %rdi
leaq 0x5f8(%rsp), %rsi
callq 0x2d170
testb $0x1, %al
jne 0x40914
jmp 0x411f9
movl 0x97c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x97c(%rsp)
movslq 0x97c(%rsp), %rsi
leaq 0x658(%rsp), %rdi
callq 0x45740
movsd (%rax), %xmm0
movsd %xmm0, 0x5e0(%rsp)
movslq 0x97c(%rsp), %rsi
leaq 0xa50(%rsp), %rdi
callq 0x88f0
movq %rax, %rdi
leaq 0x29aa3(%rip), %rsi     # 0x6a409
callq 0x5140
cmpl $0x0, %eax
jne 0x4099b
movsd 0x296a0(%rip), %xmm0    # 0x6a018
mulsd 0x5e0(%rsp), %xmm0
movsd 0x29687(%rip), %xmm1    # 0x6a010
mulsd %xmm1, %xmm0
movsd %xmm0, 0x5e0(%rsp)
jmp 0x40afb
movslq 0x97c(%rsp), %rsi
leaq 0xa50(%rsp), %rdi
callq 0x88f0
movq %rax, %rdi
leaq 0x271ec(%rip), %rsi     # 0x67ba6
callq 0x5140
cmpl $0x0, %eax
jne 0x409ef
movsd 0x266e4(%rip), %xmm0    # 0x670b0
mulsd 0x5e0(%rsp), %xmm0
movsd 0x2962b(%rip), %xmm1    # 0x6a008
mulsd %xmm1, %xmm0
movsd %xmm0, 0x5e0(%rsp)
jmp 0x40af9
movslq 0x97c(%rsp), %rsi
leaq 0xa50(%rsp), %rdi
callq 0x88f0
movq %rax, %rdi
leaq 0x299fd(%rip), %rsi     # 0x6a40b
callq 0x5140
cmpl $0x0, %eax
jne 0x40a4f
movsd 0x295e0(%rip), %xmm0    # 0x6a000
mulsd 0x5e0(%rsp), %xmm0
movsd 0x295c7(%rip), %xmm1    # 0x69ff8
mulsd %xmm1, %xmm0
movsd 0x295b3(%rip), %xmm1    # 0x69ff0
divsd %xmm1, %xmm0
movsd %xmm0, 0x5e0(%rsp)
jmp 0x40af7
movslq 0x97c(%rsp), %rsi
leaq 0xa50(%rsp), %rdi
callq 0x88f0
movq %rax, %rdi
leaq 0x2999f(%rip), %rsi     # 0x6a40d
callq 0x5140
cmpl $0x0, %eax
jne 0x40a94
movsd 0x26630(%rip), %xmm0    # 0x670b0
mulsd 0x5e0(%rsp), %xmm0
movsd %xmm0, 0x5e0(%rsp)
jmp 0x40af5
movslq 0x97c(%rsp), %rsi
leaq 0xa50(%rsp), %rdi
callq 0x88f0
movq %rax, %rdi
leaq 0x29dca(%rip), %rsi     # 0x6a87d
callq 0x5140
cmpl $0x0, %eax
jne 0x40af1
movsd 0x2953b(%rip), %xmm0    # 0x6a000
mulsd 0x5e0(%rsp), %xmm0
movsd 0x29522(%rip), %xmm1    # 0x69ff8
mulsd %xmm1, %xmm0
movsd 0x2950e(%rip), %xmm1    # 0x69ff0
divsd %xmm1, %xmm0
movsd %xmm0, 0x5e0(%rsp)
jmp 0x40af3
jmp 0x40af3
jmp 0x40af5
jmp 0x40af7
jmp 0x40af9
jmp 0x40afb
movslq 0x97c(%rsp), %rsi
leaq 0xa70(%rsp), %rdi
callq 0x88f0
movq %rax, %rsi
leaq 0x5c0(%rsp), %rdi
callq 0x51f0
jmp 0x40b22
movslq 0x97c(%rsp), %rsi
leaq 0xa50(%rsp), %rdi
callq 0x88f0
movq %rax, %rsi
leaq 0x5a0(%rsp), %rdi
callq 0x51f0
jmp 0x40b49
leaq 0x888(%rsp), %rdi
leaq 0x97c(%rsp), %rsi
callq 0x453b0
movq %rax, 0x50(%rsp)
jmp 0x40b65
movq 0x50(%rsp), %rsi
leaq 0x570(%rsp), %rdi
callq 0x454a0
jmp 0x40b79
leaq 0x540(%rsp), %rdi
callq 0xfb70
leaq 0x510(%rsp), %rdi
callq 0xfb80
leaq 0x4e0(%rsp), %rdi
callq 0xfb80
leaq 0x4b0(%rsp), %rdi
callq 0xfb80
leaq 0x480(%rsp), %rdi
callq 0xfb80
leaq 0x450(%rsp), %rdi
callq 0xfb90
leaq 0x5c0(%rsp), %rdi
leaq 0x29899(%rip), %rsi     # 0x6a46f
callq 0x5140
cmpl $0x0, %eax
je 0x410d2
leaq 0x430(%rsp), %rdi
leaq 0x5c0(%rsp), %rsi
callq 0x51f0
jmp 0x40bfb
movsd 0x5e0(%rsp), %xmm0
movsd %xmm0, 0x48(%rsp)
leaq 0x26e86(%rip), %rdx     # 0x67a97
leaq 0x3f0(%rsp), %rdi
leaq 0xa08(%rsp), %rsi
callq 0xfae0
jmp 0x40c28
leaq 0x410(%rsp), %rdi
leaq 0x3f0(%rsp), %rsi
leaq 0x5a0(%rsp), %rdx
callq 0xfbf0
jmp 0x40c47
leaq 0x3c0(%rsp), %rdi
leaq 0x570(%rsp), %rsi
callq 0x454a0
jmp 0x40c5e
movsd 0x48(%rsp), %xmm0
movq %rsp, %rax
leaq 0x450(%rsp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x480(%rsp), %rcx
movq %rcx, 0x8(%rax)
leaq 0x4b0(%rsp), %rcx
movq %rcx, (%rax)
leaq 0x430(%rsp), %rdi
leaq 0x410(%rsp), %rsi
leaq 0x3c0(%rsp), %rdx
leaq 0x540(%rsp), %rcx
leaq 0x510(%rsp), %r8
leaq 0x4e0(%rsp), %r9
callq 0x41a80
movb %al, 0x47(%rsp)
jmp 0x40cc5
movb 0x47(%rsp), %al
xorb $-0x1, %al
movb %al, 0x46(%rsp)
leaq 0x3c0(%rsp), %rdi
callq 0x453a0
leaq 0x410(%rsp), %rdi
callq 0x58b8
leaq 0x3f0(%rsp), %rdi
callq 0x58b8
leaq 0x430(%rsp), %rdi
callq 0x58b8
movb 0x46(%rsp), %al
testb $0x1, %al
jne 0x40d10
jmp 0x40e02
movb $0x0, 0xd07(%rsp)
movl $0x1, 0xb0c(%rsp)
jmp 0x410f4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
jmp 0x411e7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
jmp 0x411da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
jmp 0x4117f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
jmp 0x40df0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
jmp 0x40de3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
jmp 0x40dd6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
leaq 0x3c0(%rsp), %rdi
callq 0x453a0
leaq 0x410(%rsp), %rdi
callq 0x58b8
leaq 0x3f0(%rsp), %rdi
callq 0x58b8
leaq 0x430(%rsp), %rdi
callq 0x58b8
jmp 0x4117f
leaq 0x390(%rsp), %rdi
leaq 0x540(%rsp), %rsi
callq 0xfd90
jmp 0x40e19
leaq 0x360(%rsp), %rdi
leaq 0x510(%rsp), %rsi
callq 0xfdc0
jmp 0x40e30
leaq 0x330(%rsp), %rdi
leaq 0x4e0(%rsp), %rsi
callq 0xfdc0
jmp 0x40e47
leaq 0x300(%rsp), %rdi
leaq 0x4b0(%rsp), %rsi
callq 0xfdc0
jmp 0x40e5e
leaq 0x2d0(%rsp), %rdi
leaq 0x480(%rsp), %rsi
callq 0xfdc0
jmp 0x40e75
leaq 0x2a0(%rsp), %rdi
leaq 0x450(%rsp), %rsi
callq 0xfdf0
jmp 0x40e8c
leaq 0x26c04(%rip), %rdx     # 0x67a97
leaq 0x260(%rsp), %rdi
leaq 0xa08(%rsp), %rsi
callq 0xfae0
jmp 0x40eaa
leaq 0x280(%rsp), %rdi
leaq 0x260(%rsp), %rsi
leaq 0x5a0(%rsp), %rdx
callq 0xfbf0
jmp 0x40ec9
movq %rsp, %rax
leaq 0x280(%rsp), %rcx
movq %rcx, (%rax)
leaq 0x390(%rsp), %rdi
leaq 0x360(%rsp), %rsi
leaq 0x330(%rsp), %rdx
leaq 0x300(%rsp), %rcx
leaq 0x2d0(%rsp), %r8
leaq 0x2a0(%rsp), %r9
callq 0x43a00
movb %al, 0x45(%rsp)
jmp 0x40f12
movb 0x45(%rsp), %al
xorb $-0x1, %al
movb %al, 0x44(%rsp)
leaq 0x280(%rsp), %rdi
callq 0x58b8
leaq 0x260(%rsp), %rdi
callq 0x58b8
leaq 0x2a0(%rsp), %rdi
callq 0xfe20
leaq 0x2d0(%rsp), %rdi
callq 0xfe30
leaq 0x300(%rsp), %rdi
callq 0xfe30
leaq 0x330(%rsp), %rdi
callq 0xfe30
leaq 0x360(%rsp), %rdi
callq 0xfe30
leaq 0x390(%rsp), %rdi
callq 0xfe40
movb 0x44(%rsp), %al
testb $0x1, %al
jne 0x40f91
jmp 0x410d0
movb $0x0, 0xd07(%rsp)
movl $0x1, 0xb0c(%rsp)
jmp 0x410f4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
jmp 0x410be
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
jmp 0x410b1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
jmp 0x410a4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
jmp 0x41097
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
jmp 0x4108a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
jmp 0x4107d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
jmp 0x41070
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb40(%rsp)
movl %eax, 0xb3c(%rsp)
leaq 0x280(%rsp), %rdi
callq 0x58b8
leaq 0x260(%rsp), %rdi
callq 0x58b8
leaq 0x2a0(%rsp), %rdi
callq 0xfe20
leaq 0x2d0(%rsp), %rdi
callq 0xfe30
leaq 0x300(%rsp), %rdi
callq 0xfe30
leaq 0x330(%rsp), %rdi
callq 0xfe30
leaq 0x360(%rsp), %rdi
callq 0xfe30
leaq 0x390(%rsp), %rdi
callq 0xfe40
jmp 0x4117f
jmp 0x410d2
leaq 0x600(%rsp), %rdi
xorl %esi, %esi
callq 0x2d340
movq %rax, 0x258(%rsp)
movl $0x0, 0xb0c(%rsp)
leaq 0x450(%rsp), %rdi
callq 0xfe20
leaq 0x480(%rsp), %rdi
callq 0xfe30
leaq 0x4b0(%rsp), %rdi
callq 0xfe30
leaq 0x4e0(%rsp), %rdi
callq 0xfe30
leaq 0x510(%rsp), %rdi
callq 0xfe30
leaq 0x540(%rsp), %rdi
callq 0xfe40
leaq 0x570(%rsp), %rdi
callq 0x453a0
leaq 0x5a0(%rsp), %rdi
callq 0x58b8
leaq 0x5c0(%rsp), %rdi
callq 0x58b8
movl 0xb0c(%rsp), %eax
testl %eax, %eax
jne 0x412af
jmp 0x4117a
jmp 0x408f6
leaq 0x450(%rsp), %rdi
callq 0xfe20
leaq 0x480(%rsp), %rdi
callq 0xfe30
leaq 0x4b0(%rsp), %rdi
callq 0xfe30
leaq 0x4e0(%rsp), %rdi
callq 0xfe30
leaq 0x510(%rsp), %rdi
callq 0xfe30
leaq 0x540(%rsp), %rdi
callq 0xfe40
leaq 0x570(%rsp), %rdi
callq 0x453a0
leaq 0x5a0(%rsp), %rdi
callq 0x58b8
leaq 0x5c0(%rsp), %rdi
callq 0x58b8
jmp 0x412d8
callq 0x52e0
cvtsi2sd %rax, %xmm0
movsd %xmm0, 0x250(%rsp)
movq 0x43db5(%rip), %rdi     # 0x84fc8
leaq 0x2512b(%rip), %rsi     # 0x66345
callq 0x5460
movq %rax, 0x38(%rsp)
jmp 0x41226
movq 0x38(%rsp), %rdi
movsd 0x250(%rsp), %xmm0
movsd 0xb00(%rsp), %xmm1
subsd %xmm1, %xmm0
movsd 0x24dbf(%rip), %xmm1    # 0x66008
divsd %xmm1, %xmm0
callq 0x5830
movq %rax, 0x30(%rsp)
jmp 0x41259
movq 0x30(%rsp), %rdi
leaq 0x250f3(%rip), %rsi     # 0x66358
callq 0x5460
movq %rax, 0x28(%rsp)
jmp 0x41271
movq 0x28(%rsp), %rdi
movq 0x43d33(%rip), %rsi     # 0x84fb0
callq 0x54b0
movq %rax, 0x20(%rsp)
jmp 0x41289
movq 0x20(%rsp), %rdi
movq 0x43d1b(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x4129c
movb $0x1, 0xd07(%rsp)
movl $0x1, 0xb0c(%rsp)
leaq 0x658(%rsp), %rdi
callq 0x45760
leaq 0x698(%rsp), %rdi
callq 0x8910
leaq 0x888(%rsp), %rdi
callq 0x457c0
jmp 0x41301
leaq 0x658(%rsp), %rdi
callq 0x45760
leaq 0x698(%rsp), %rdi
callq 0x8910
leaq 0x888(%rsp), %rdi
callq 0x457c0
jmp 0x41337
leaq 0x9a0(%rsp), %rdi
callq 0x457d0
leaq 0x9d0(%rsp), %rdi
callq 0xfe30
leaq 0xa08(%rsp), %rdi
callq 0x58b8
leaq 0xa50(%rsp), %rdi
callq 0x8910
jmp 0x4136d
leaq 0x9a0(%rsp), %rdi
callq 0x457d0
leaq 0x9d0(%rsp), %rdi
callq 0xfe30
leaq 0xa08(%rsp), %rdi
callq 0x58b8
leaq 0xa50(%rsp), %rdi
callq 0x8910
jmp 0x41389
leaq 0xa70(%rsp), %rdi
callq 0x8910
leaq 0xa90(%rsp), %rdi
callq 0x58b8
jmp 0x413a5
leaq 0xa70(%rsp), %rdi
callq 0x8910
leaq 0xa90(%rsp), %rdi
callq 0x58b8
jmp 0x413c1
leaq 0xab8(%rsp), %rdi
callq 0x8910
leaq 0xad8(%rsp), %rdi
callq 0x58b8
jmp 0x413dd
leaq 0xab8(%rsp), %rdi
callq 0x8910
leaq 0xad8(%rsp), %rdi
callq 0x58b8
jmp 0x413fb
leaq 0xb70(%rsp), %rdi
callq 0x5350
movb 0xd07(%rsp), %al
andb $0x1, %al
addq $0xd08, %rsp            # imm = 0xD08
retq
leaq 0xb70(%rsp), %rdi
callq 0x5350
movq 0xb40(%rsp), %rdi
callq 0x57b0
nopw %cs:(%rax,%rax)