// File: /workspace/github_cpp_makefile_star2_O3/schneebergerlab[P]DrLink/analyze_molecule.cpp
// Function: write_chr_alignment(ogzstream&, std::multimap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ALIGNINFO, 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, ALIGNINFO>>>*, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, unsigned long, 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, unsigned long>>>*, std::map<int, unsigned long, std::less<int>, std::allocator<std::pair<int const, unsigned long>>>*, std::map<int, unsigned long, std::less<int>, std::allocator<std::pair<int const, unsigned long>>>*, std::map<int, unsigned long, std::less<int>, std::allocator<std::pair<int const, unsigned long>>>*, std::map<int, unsigned long, std::less<int>, std::allocator<std::pair<int const, unsigned long>>>*, std::map<int, unsigned long, std::less<int>, std::allocator<std::pair<int const, unsigned long>>>*, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, 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, int>>>*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, unsigned long, int)
bool write_chr_alignment(ogzstream& moutfp,
                         multimap<string, ALIGNINFO>* bcPosQueue, 
                         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<int,    unsigned long>* molecule_read_interval,
                         map<string, int>*           barcode_molecule_cnt,
                         string lastChr,
                         unsigned long winsize,
                         int minMoleSize)
{
    // bcPosQueue: multimap<chr#barcode, <read.align.start, read.align.end> >
    multimap<string, ALIGNINFO>::iterator mitr; 
    multimap<string, ALIGNINFO>::iterator mitr_end;
    mitr     = (*bcPosQueue).begin();
    mitr_end = (*bcPosQueue).end();
    long moleNum  = 0;
    long alignNum = 0;
    while(mitr != mitr_end)
    {
        string key = (*mitr).first;
        vector<string> chrbc = split_string(key, '#'); // get [0]:chr, [1]:barcode/partition
        std::pair <multimap<string, ALIGNINFO>::iterator, 
                   multimap<string, ALIGNINFO>::iterator> clitr_region;
        clitr_region = (*bcPosQueue).equal_range(key);
        multimap<string, ALIGNINFO>::iterator clitr;
        unsigned long firstAlignSta  = 0; // for calculating molecule length; molecule first alignment       
        unsigned long firstAlignEnd  = 0; // not really used
        unsigned long lastAlignSta   = 0; // molecule last alignment       
        unsigned long lastAlignEnd   = 0; // for calculating molecule length; for breaking molecule
        unsigned long lastR1AlignSta = 0; // for calculating R1 distance
        unsigned long lastR1AlignEnd = 0; // ..
        unsigned long lastR2AlignSta = 0; // for calculating R2 distance
        unsigned long lastR2AlignEnd = 0; // ..     
        int     readNum = 0;
        int     covleng = 0;
        int moleculeLen = 0;
        std::stringstream alignedPos;     // aligned positions of reads of a molecule
        alignedPos.str("");
        //
        std::stringstream readids; // id of reads
        readids.str("");
        std::stringstream rcigars; // cigar of reads
        rcigars.str("");
        std::stringstream rpairids;// id of R1/R2
        rpairids.str("");
        //
        map<int, unsigned long> im_read_interval;
        for (clitr=clitr_region.first; clitr!=clitr_region.second; ++clitr) // span of reads within chr#barcode
        {
            ALIGNINFO span         = (*clitr).second;       
            if(clitr==clitr_region.first || (span.first>lastAlignEnd && span.first-lastAlignEnd+1>winsize)) // new molecule
            {
                // summary last cluster with the same barcode
                if(firstAlignSta != 0)
                {
                   assert(lastAlignEnd>firstAlignSta);
                   moleculeLen = lastAlignEnd-firstAlignSta+1; // in bp
                   if(moleculeLen==0) moleculeLen = 1; // caution: avoid potential dividing 0
                   moutfp << lastAlignSta     << "\t" 
                          << moleculeLen      << "\t" 
                          << setprecision(2)  << fixed << (float)covleng/moleculeLen << "\t" 
                          << readNum          << "\tR\t" 
                          << lastAlignEnd << "\t"
                          << alignedPos.str() << "\t" 
                          << rpairids.str()   << "\t" 
                          << readids.str()    << "\t"
                          << rcigars.str()    << endl;                          
                   if(moleculeLen >= minMoleSize)
                   {
                       // molecule cov
                       std::stringstream mckey;
                       mckey.str("");
                       mckey << setprecision(2) << fixed << (float)covleng/moleculeLen;
                       map<string, unsigned long>::iterator mcitr = (*molecule_cov).find(mckey.str());
                       if(mcitr == (*molecule_cov).end())
                       {
                           (*molecule_cov).insert(std::pair<string, unsigned long>(mckey.str(), 1));
                       }
                       else
                       {
                           (*mcitr).second += 1;
                       }
                       // molecule len
                       int mlkey = (int)round((double)moleculeLen/1000); 
                       map<int, unsigned long>::iterator mlitr = (*molecule_len).find(mlkey);
                       if(mlitr == (*molecule_len).end())
                       {
                           (*molecule_len).insert(std::pair<int, unsigned long>(mlkey, 1));
                           (*molecule_len_sum).insert(std::pair<int, unsigned long>(mlkey, moleculeLen));
                       }
                       else
                       {
                           (*mlitr).second += 1;
                           (*molecule_len_sum)[mlkey] += moleculeLen;
                       }
                       // molecules per barcode
                       map<string, int>::iterator bcitr;
                       bcitr = (*barcode_molecule_cnt).find(chrbc[1]);
                       if(bcitr == (*barcode_molecule_cnt).end())
                       {
                           (*barcode_molecule_cnt).insert(std::pair<string, int>(chrbc[1], 1));
                       }
                       else
                       {
                           (*barcode_molecule_cnt)[chrbc[1]] +=1;
                       }
                       // molecule read number
                       map<int,    unsigned long>::iterator readitr;
                       readitr = (*molecule_read_num).find(readNum);
                       if(readitr == (*molecule_read_num).end())
                       {
                           (*molecule_read_num).insert(std::pair<int, unsigned long>(readNum, 1));
                           (*molecule_read_num_sum).insert(std::pair<int, unsigned long>(readNum, span.second - span.first + 1));
                       }
                       else
                       {
                           (*molecule_read_num)[readNum] += 1;
                           (*molecule_read_num_sum)[readNum] += span.second - span.first + 1;
                       }
                       // molecule read distances:
                       map<int, unsigned long>::iterator imrditr;
                       map<int, unsigned long>::iterator imrditr_end;
                       map<int, unsigned long>::iterator imrditr_final;
                       imrditr     = im_read_interval.begin();
                       imrditr_end = im_read_interval.end();
                       while(imrditr != imrditr_end)
                       {
                           //if(abs((*imrditr).first) > 500) // note: with 0.1x of 50kb molecule, dist between 18 readpairs is 2777bp
                           if(true)
                           {
                               imrditr_final = (*molecule_read_interval).find((*imrditr).first);
                               if(imrditr_final == (*molecule_read_interval).end())
                               {
                                   (*molecule_read_interval).insert(std::pair<int, unsigned long>((*imrditr).first, (*imrditr).second));
                               }
                               else
                               {
                                   (*imrditr_final).second += (*imrditr).second;
                               }
                           }
                           imrditr ++;
                       }        
                   }
                   //
                   readNum = 0;
                   // aligned positions of reads of a molecule
                   alignedPos.str("");
                   // read id and order of pair info
                   readids.str("");
                   rcigars.str("");
                   rpairids.str("");                   
                   covleng = 0;
                }
                // start new/next cluster
                moleNum ++;
                firstAlignSta = span.first;
                firstAlignEnd = span.second;
                moutfp << (*clitr).first << "\t" << firstAlignSta << "\t";
                // read dist info: if do following, then distance of reads between inter-molecules is ignored.
                lastR1AlignSta = 0; // initializing
                lastR1AlignEnd = 0;  
                lastR2AlignSta = 0; // initializing
                lastR2AlignEnd = 0;    
                im_read_interval.clear();             
            }
            // get covered length and read number
            covleng += span.second - span.first + 1;        
            readNum ++;
            // aligned positions of reads of a molecule: each item is a spanning range of a read
            if(alignedPos.str().size()>0)
            {
                alignedPos  << ";" << span.first << "," << span.second;
            }
            else
            {
                alignedPos  << span.first << "," << span.second;
            }
            // read id and order of pair info
            if(readids.str().size()>0)
            {
                readids  << "," << span.readid;
                rcigars  << "," << span.rcigar;
                rpairids << "," << span.rorder; 
            }
            else
            {
                readids  << span.readid;
                rcigars  << span.rcigar;
                rpairids << span.rorder; 
            }            
            alignNum ++;
            // get R1.vs.R1-/R2.vs.R2-read distances within the chr#barcode
            if(span.rorder.compare("1")==0)
            {
                if(lastR1AlignEnd != 0)// if there is one R1-read before current R1-read
                {
                    map<int, unsigned long>::iterator mritr;
                    int distSize = 0;
                    if(span.first>=lastR1AlignEnd)
                    {
                        distSize = span.first-lastR1AlignEnd+1;
                    }
                    else
                    {
                        distSize = -1*(lastR1AlignEnd - span.first+1); // in case overlapping
                    }
                    mritr = im_read_interval.find(distSize);
                    if(mritr == im_read_interval.end())
                    {
                        im_read_interval.insert(std::pair<int, unsigned long>(distSize, 1));
                    }
                    else
                    {
                        (*mritr).second += 1;
                    }
                    //cout << "   check: " << (*clitr).first << ": span.first-lastR1AlignEnd=abs(" << span.first << "-" << lastR1AlignEnd << ")=" << distSize << endl;
                }
                lastR1AlignSta = span.first; // updating
                lastR1AlignEnd = span.second;
            }
            else
            if(span.rorder.compare("2")==0)
            {
                if(lastR2AlignEnd != 0) // if there is one R2-read before current R2-read
                {
                    map<int, unsigned long>::iterator mritr;
                    int distSize = 0;
                    if(span.first>=lastR2AlignEnd)
                    {
                        distSize = span.first-lastR2AlignEnd+1;
                    }
                    else
                    {
                        distSize = -1*(lastR2AlignEnd - span.first+1); // in case overlapping
                    }
                    mritr = im_read_interval.find(distSize);
                    if(mritr == im_read_interval.end())
                    {
                        im_read_interval.insert(std::pair<int, unsigned long>(distSize, 1));
                    }
                    else
                    {
                        (*mritr).second += 1;
                    }
                    //cout << "   check: " << (*clitr).first << ": span.first-lastR2AlignEnd=abs(" << span.first << "-" << lastR2AlignEnd << ")=" << distSize << endl;
                }
                lastR2AlignSta = span.first; // updating
                lastR2AlignEnd = span.second;                 
            }
            else ;            
            // update current as last
            lastAlignSta = span.first;
            lastAlignEnd = span.second;
        }
        // summary last cluster: first_alignment_start all_alignment_cov_len	base_cov	read_num
        assert(lastAlignEnd>firstAlignSta);
        moleculeLen = lastAlignEnd-firstAlignSta+1;
        if(moleculeLen==0) moleculeLen = 1; // caution: avoid potential dividing 0
        moutfp << lastAlignSta     << "\t" 
               << moleculeLen      << "\t" 
               << setprecision(2)  << fixed << (float)covleng/moleculeLen << "\t" 
               << readNum          << "\tU\t" 
               << lastAlignEnd     << "\t"
               << alignedPos.str() << "\t"
               << rpairids.str()   << "\t" 
               << readids.str()    << "\t"
               << rcigars.str()    << endl;
        if(moleculeLen >= minMoleSize)
        {
            // molecule cov
            std::stringstream mckey;
            mckey.str("");
            mckey << setprecision(2) << fixed << (float)covleng/moleculeLen;
            map<string, unsigned long>::iterator mcitr = (*molecule_cov).find(mckey.str());
            if(mcitr == (*molecule_cov).end())
            {
                (*molecule_cov).insert(std::pair<string, unsigned long>(mckey.str(), 1));
            }
            else
            {
                (*mcitr).second += 1;
            }
            // molecule len
            int mlkey = (int)round((double)moleculeLen/1000); 
            map<int, unsigned long>::iterator mlitr = (*molecule_len).find(mlkey);
            if(mlitr == (*molecule_len).end())
            {
                (*molecule_len).insert(std::pair<int, unsigned long>(mlkey, 1));
                (*molecule_len_sum).insert(std::pair<int, unsigned long>(mlkey, moleculeLen));            
            }
            else
            {
                (*mlitr).second += 1;
                (*molecule_len_sum)[mlkey] += moleculeLen;            
            }
            // molecules per barcode
            map<string, int>::iterator bcitr;
            bcitr = (*barcode_molecule_cnt).find(chrbc[1]);
            if(bcitr == (*barcode_molecule_cnt).end())
            {
                (*barcode_molecule_cnt).insert(std::pair<string, int>(chrbc[1], 1));
            }
            else
            {
                (*barcode_molecule_cnt)[chrbc[1]] +=1;
            } 
            // molecule read number
            map<int,    unsigned long>::iterator readitr;
            readitr = (*molecule_read_num).find(readNum);
            if(readitr == (*molecule_read_num).end())
            {
                (*molecule_read_num).insert(std::pair<int, unsigned long>(readNum, 1));
                (*molecule_read_num_sum).insert(std::pair<int, unsigned long>(readNum, lastAlignEnd-lastAlignSta+1));                
            }
            else
            {
                (*molecule_read_num)[readNum] += 1;
                (*molecule_read_num_sum)[readNum] += lastAlignEnd-lastAlignSta+1;
            }
            // molecule read distances:
            map<int, unsigned long>::iterator imrditr;
            map<int, unsigned long>::iterator imrditr_end;
            map<int, unsigned long>::iterator imrditr_final;
            imrditr     = im_read_interval.begin();
            imrditr_end = im_read_interval.end();
            while(imrditr != imrditr_end)
            {
                //if(abs((*imrditr).first) > 500) // note: with 0.1x of 50kb molecule, dist between 18 readpairs is 2777bp
                if(true)
                {
                    imrditr_final = (*molecule_read_interval).find((*imrditr).first);
                    if(imrditr_final == (*molecule_read_interval).end())
                    {
                        (*molecule_read_interval).insert(std::pair<int, unsigned long>((*imrditr).first, (*imrditr).second));
                    }
                    else
                    {
                        (*imrditr_final).second += (*imrditr).second;
                    }
                }
                imrditr ++;
            }
        }
        //
        im_read_interval.clear();    
        readNum = 0;
        //
        alignedPos.str("");
        // read id and order of pair info
        readids.str("");
        rcigars.str("");
        rpairids.str("");        
        mitr = clitr;     
    }
    cout << "   Info: " << lastChr << " has " << alignNum << " alignments analyzed." << endl;
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x9a8, %rsp            # imm = 0x9A8
movq %r8, 0xe0(%rsp)
movq 0x18(%rsi), %r14
movq %rsi, 0x380(%rsp)
leaq 0x8(%rsi), %rax
movq %rax, 0x378(%rsp)
cmpq %rax, %r14
je 0xaa74
movq %rcx, %r8
movq 0x9f0(%rsp), %rsi
movq 0x9e8(%rsp), %r10
addq $0x188, %rdi            # imm = 0x188
movq %rdi, 0x110(%rsp)
movl $0x80, %eax
leaq 0x1b0(%rsp), %rcx
addq %rax, %rcx
movq %rcx, 0xd8(%rsp)
leaq 0x698(%rsp), %r13
leaq (%r13,%rax), %rcx
movq %rcx, 0x158(%rsp)
leaq 0x510(%rsp), %rbp
leaq (%rbp,%rax), %rcx
movq %rcx, 0x160(%rsp)
leaq 0x388(%rsp), %rcx
addq %rax, %rcx
movq %rcx, 0x168(%rsp)
leaq 0x820(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x170(%rsp)
leaq 0x60(%rsp), %r15
movq %rdx, 0xf8(%rsp)
leaq 0x8(%rdx), %rax
movq %rax, 0x188(%rsp)
movq %r8, 0x180(%rsp)
leaq 0x8(%r8), %rax
movq %rax, 0xf0(%rsp)
leaq 0x8(%rsi), %rax
movq %rax, 0x178(%rsp)
movq %r9, 0xd0(%rsp)
leaq 0x8(%r9), %rax
movq %rax, 0xe8(%rsp)
leaq 0x8(%r10), %rax
movq %rax, 0x108(%rsp)
movq $0x0, 0x118(%rsp)
leaq 0x368(%rsp), %rax
movq %rax, 0x358(%rsp)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
addq %rsi, %rdx
leaq 0x358(%rsp), %rbx
movq %rbx, %rdi
callq 0xd940
movb $0x23, 0x820(%rsp)
leaq 0x198(%rsp), %rdi
movq %rbx, %rsi
leaq 0x820(%rsp), %rdx
callq 0x367c0
movq 0x380(%rsp), %rdi
movq %rbx, %rsi
callq 0xdc54
movq %rax, 0x100(%rsp)
movq %rdx, 0x190(%rsp)
leaq 0x388(%rsp), %rbx
leaq 0x398(%rsp), %r14
movl $0x0, 0x4(%rsp)
leaq 0x820(%rsp), %rdi
callq 0x4240
movq %r14, 0x388(%rsp)
movq %rbx, %rdi
leaq 0x359bc(%rip), %rdx     # 0x3eb0a
movq %rdx, %rsi
callq 0x5384
leaq 0x838(%rsp), %rdi
movq %rbx, %rsi
callq 0x4490
movq 0x388(%rsp), %rdi
cmpq %r14, %rdi
je 0x9183
movq 0x398(%rsp), %rsi
incq %rsi
callq 0x4340
movq %rbx, %rdi
callq 0x4240
leaq 0x520(%rsp), %r14
movq %r14, 0x510(%rsp)
movq %rbp, %rdi
leaq 0x35965(%rip), %rdx     # 0x3eb0a
movq %rdx, %rsi
callq 0x5384
leaq 0x3a0(%rsp), %rdi
movq %rbp, %rsi
callq 0x4490
movq 0x510(%rsp), %rdi
cmpq %r14, %rdi
je 0x91da
movq 0x520(%rsp), %rsi
incq %rsi
callq 0x4340
movq %rbp, %rdi
callq 0x4240
leaq 0x6a8(%rsp), %r14
movq %r14, 0x698(%rsp)
movq %r13, %rdi
leaq 0x3590e(%rip), %rdx     # 0x3eb0a
movq %rdx, %rsi
callq 0x5384
leaq 0x528(%rsp), %rdi
movq %r13, %rsi
callq 0x4490
movq 0x698(%rsp), %rdi
cmpq %r14, %rdi
je 0x9231
movq 0x6a8(%rsp), %rsi
incq %rsi
callq 0x4340
movq %r13, %rdi
callq 0x4240
leaq 0x1c0(%rsp), %rax
movq %rax, 0x1b0(%rsp)
leaq 0x1b0(%rsp), %rbx
movq %rbx, %rdi
leaq 0x358af(%rip), %rdx     # 0x3eb0a
movq %rdx, %rsi
callq 0x5384
leaq 0x6b0(%rsp), %rdi
movq %rbx, %rsi
callq 0x4490
movq 0x1b0(%rsp), %rdi
leaq 0x1c0(%rsp), %rax
cmpq %rax, %rdi
je 0x9298
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x4340
movl $0x0, 0x130(%rsp)
xorl %ecx, %ecx
movq %rcx, 0x138(%rsp)
leaq 0x130(%rsp), %rax
movq %rax, 0x140(%rsp)
movq %rax, 0x148(%rsp)
movq %rcx, 0x150(%rsp)
movq 0x100(%rsp), %r14
cmpq 0x190(%rsp), %r14
je 0xab4a
xorl %ebx, %ebx
movq $0x0, 0xc8(%rsp)
xorl %r12d, %r12d
movq $0x0, 0xc0(%rsp)
movq $0x0, 0x120(%rsp)
xorl %ebp, %ebp
movups 0x40(%r14), %xmm0
movaps %xmm0, 0x50(%rsp)
leaq 0x70(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x50(%r14), %rsi
movq 0x58(%r14), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0xd940
leaq 0x90(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x70(%r14), %rsi
movq 0x78(%r14), %rdx
addq %rsi, %rdx
leaq 0x80(%rsp), %rdi
callq 0xd940
leaq 0xb0(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0x90(%r14), %rsi
movq 0x98(%r14), %rdx
addq %rsi, %rdx
leaq 0xa0(%rsp), %rdi
callq 0xd940
cmpq 0x100(%rsp), %r14
je 0x93b7
movq 0x50(%rsp), %r15
movq %r15, %rax
subq %r12, %rax
jbe 0x9c6b
incq %rax
cmpq 0xa00(%rsp), %rax
jbe 0x9c6b
testq %rbx, %rbx
je 0x9bf1
cmpq %rbx, %r12
jbe 0xab2b
movq %r12, %r15
subl %ebx, %r12d
leal 0x1(%r12), %eax
cmpl $0x1, %eax
adcl $0x1, %r12d
movq 0x110(%rsp), %rdi
movq 0xc8(%rsp), %rsi
callq 0x4210
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x35707(%rip), %rsi     # 0x3eb09
callq 0x43a0
movq %rbx, %rdi
movl %r12d, %esi
callq 0x4580
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x356e5(%rip), %rsi     # 0x3eb09
callq 0x43a0
movq (%rbx), %rax
movq -0x18(%rax), %rcx
movq $0x2, 0x8(%rbx,%rcx)
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ecx
cvtsi2ss %ebp, %xmm0
movl $0xfffffefb, %edx       # imm = 0xFFFFFEFB
andl %edx, %ecx
cvtsi2ss %r12d, %xmm1
orl $0x4, %ecx
movl %ecx, 0x18(%rbx,%rax)
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movq %rbx, %rdi
movsd %xmm0, 0xc8(%rsp)
callq 0x4510
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x35686(%rip), %rsi     # 0x3eb09
callq 0x43a0
movl 0x4(%rsp), %esi
movq %rbx, %rdi
callq 0x4580
movq %rax, %rbx
movl $0x3, %edx
movq %rax, %rdi
leaq 0x31a0e(%rip), %rsi     # 0x3aeb4
callq 0x43a0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4210
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x35641(%rip), %rsi     # 0x3eb09
callq 0x43a0
leaq 0x1b0(%rsp), %r15
movq %r15, %rdi
leaq 0x838(%rsp), %rsi
callq 0x44f0
movq 0x1b0(%rsp), %rsi
movq 0x1b8(%rsp), %rdx
movq %rbx, %rdi
callq 0x43a0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x355fa(%rip), %rsi     # 0x3eb09
callq 0x43a0
leaq 0x8(%rsp), %rdi
leaq 0x6b0(%rsp), %rsi
callq 0x44f0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x43a0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x355bf(%rip), %rsi     # 0x3eb09
callq 0x43a0
leaq 0x30(%rsp), %rdi
leaq 0x3a0(%rsp), %rsi
callq 0x44f0
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq %rbx, %rdi
callq 0x43a0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x35584(%rip), %rsi     # 0x3eb09
callq 0x43a0
leaq 0x338(%rsp), %rdi
leaq 0x528(%rsp), %rsi
callq 0x44f0
movq 0x338(%rsp), %rsi
movq 0x340(%rsp), %rdx
movq %rbx, %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
movq 0x338(%rsp), %rdi
leaq 0x348(%rsp), %rax
cmpq %rax, %rdi
je 0x9606
movq 0x348(%rsp), %rsi
incq %rsi
callq 0x4340
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x9622
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x4340
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x963e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4340
movq 0x1b0(%rsp), %rdi
leaq 0x1c0(%rsp), %rax
cmpq %rax, %rdi
je 0x9663
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x4340
cmpl 0xa08(%rsp), %r12d
jl 0x9a8b
movq %r15, %rdi
callq 0x4240
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
leaq 0x35478(%rip), %rdx     # 0x3eb0a
movq %rdx, %rsi
callq 0x5384
leaq 0x1c8(%rsp), %rdi
movq %rbx, %rsi
callq 0x4490
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x96c6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4340
movq 0x1c0(%rsp), %rax
movq -0x18(%rax), %rcx
movq $0x2, 0x1c8(%rsp,%rcx)
movq -0x18(%rax), %rax
movl 0x1d8(%rsp,%rax), %ecx
movl $0xfffffefb, %edx       # imm = 0xFFFFFEFB
andl %edx, %ecx
orl $0x4, %ecx
movl %ecx, 0x1d8(%rsp,%rax)
leaq 0x1c0(%rsp), %rdi
movsd 0xc8(%rsp), %xmm0
callq 0x4510
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
leaq 0x1c8(%rsp), %rsi
callq 0x44f0
movq 0xf8(%rsp), %rdi
movq %rbx, %rsi
callq 0xdd92
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x9754
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4340
cmpq 0x188(%rsp), %rbx
je 0x9767
incq 0x40(%rbx)
jmp 0x9819
leaq 0x30(%rsp), %rdi
leaq 0x1c8(%rsp), %rsi
callq 0x44f0
leaq 0x18(%rsp), %rcx
movq %rcx, 0x8(%rsp)
movq 0x30(%rsp), %rax
leaq 0x40(%rsp), %rdx
cmpq %rdx, %rax
je 0x97a3
movq %rax, 0x8(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x18(%rsp)
jmp 0x97a9
movups (%rdx), %xmm0
movups %xmm0, (%rcx)
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x30(%rsp)
movq $0x0, 0x38(%rsp)
movb $0x0, 0x40(%rsp)
movq $0x1, 0x28(%rsp)
movq 0xf8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xde1c
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x97fd
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4340
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x9819
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x4340
xorps %xmm0, %xmm0
cvtsi2sd %r12d, %xmm0
divsd 0x310a7(%rip), %xmm0    # 0x3a8d0
callq 0x4170
cvttsd2si %xmm0, %eax
movl %eax, 0x30(%rsp)
movq 0x180(%rsp), %rdi
movq 0x10(%rdi), %rdx
testq %rdx, %rdx
je 0x9879
movq 0xf0(%rsp), %rcx
xorl %esi, %esi
cmpl %eax, 0x20(%rdx)
setl %sil
cmovgeq %rdx, %rcx
movq 0x10(%rdx,%rsi,8), %rdx
testq %rdx, %rdx
jne 0x984f
cmpq 0xf0(%rsp), %rcx
je 0x9879
cmpl %eax, 0x20(%rcx)
jle 0xa0aa
movl %eax, 0x8(%rsp)
movq $0x1, 0x10(%rsp)
leaq 0x8(%rsp), %rbx
movq %rbx, %rsi
callq 0xdfe8
movl 0x30(%rsp), %eax
movl %eax, 0x8(%rsp)
movslq %r12d, %rax
movq %rax, 0x10(%rsp)
movq 0xe0(%rsp), %rdi
movq %rbx, %rsi
callq 0xdfe8
movq 0x198(%rsp), %rsi
addq $0x20, %rsi
movq 0x9f0(%rsp), %rdi
callq 0xe288
cmpq 0x178(%rsp), %rax
je 0x98f3
movq 0x198(%rsp), %rsi
addq $0x20, %rsi
movq 0x9f0(%rsp), %rdi
callq 0xce80
incl (%rax)
jmp 0x9951
movq 0x198(%rsp), %rax
leaq 0x18(%rsp), %rcx
movq %rcx, 0x8(%rsp)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xd940
movl $0x1, 0x28(%rsp)
movq 0x9f0(%rsp), %rdi
movq %rbx, %rsi
callq 0xe312
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x9951
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4340
movq 0xd0(%rsp), %rdi
leaq 0x4(%rsp), %rsi
movq 0x10(%rdi), %rcx
movl 0x4(%rsp), %eax
testq %rcx, %rcx
je 0x999e
movq 0xe8(%rsp), %rdx
xorl %r8d, %r8d
cmpl %eax, 0x20(%rcx)
setl %r8b
cmovgeq %rcx, %rdx
movq 0x10(%rcx,%r8,8), %rcx
testq %rcx, %rcx
jne 0x9973
cmpq 0xe8(%rsp), %rdx
je 0x999e
cmpl 0x20(%rdx), %eax
jge 0xa0cb
movl %eax, 0x8(%rsp)
movq $0x1, 0x10(%rsp)
leaq 0x8(%rsp), %rbx
movq %rbx, %rsi
callq 0xdfe8
movq 0x58(%rsp), %rax
subq 0x50(%rsp), %rax
incq %rax
movl 0x4(%rsp), %ecx
movl %ecx, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movq 0x9e0(%rsp), %rdi
movq %rbx, %rsi
callq 0xdfe8
movq 0x140(%rsp), %rbx
leaq 0x130(%rsp), %rax
cmpq %rax, %rbx
je 0x9a6f
movq 0x9e8(%rsp), %rax
movq 0x10(%rax), %rdx
movl 0x20(%rbx), %eax
testq %rdx, %rdx
je 0x9a39
movq 0x108(%rsp), %rcx
xorl %esi, %esi
cmpl %eax, 0x20(%rdx)
setl %sil
cmovgeq %rdx, %rcx
movq 0x10(%rdx,%rsi,8), %rdx
testq %rdx, %rdx
jne 0x9a13
cmpq 0x108(%rsp), %rcx
je 0x9a39
cmpl 0x20(%rcx), %eax
jge 0x9a65
movl %eax, 0x8(%rsp)
movq 0x28(%rbx), %rax
movq %rax, 0x10(%rsp)
movq 0x9e8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xdfe8
movq %rbx, %rdi
callq 0x4230
movq %rax, %rbx
jmp 0x99ea
movq 0x28(%rbx), %rax
addq %rax, 0x28(%rcx)
jmp 0x9a58
movq %r15, %rdi
movq 0x4251f(%rip), %rsi     # 0x4bf98
callq 0x4260
movq 0xd8(%rsp), %rdi
callq 0x4140
movl $0x0, 0x4(%rsp)
leaq 0x1c0(%rsp), %rax
movq %rax, 0x1b0(%rsp)
movq %r15, %rdi
leaq 0x3505d(%rip), %rdx     # 0x3eb0a
movq %rdx, %rsi
callq 0x5384
leaq 0x838(%rsp), %rdi
movq %r15, %rsi
callq 0x4490
movq 0x1b0(%rsp), %rdi
leaq 0x1c0(%rsp), %rax
cmpq %rax, %rdi
je 0x9aea
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x4340
leaq 0x1c0(%rsp), %rax
movq %rax, 0x1b0(%rsp)
movq %r15, %rdi
leaq 0x35006(%rip), %rdx     # 0x3eb0a
movq %rdx, %rsi
callq 0x5384
leaq 0x3a0(%rsp), %rdi
movq %r15, %rsi
callq 0x4490
movq 0x1b0(%rsp), %rdi
leaq 0x1c0(%rsp), %rax
cmpq %rax, %rdi
je 0x9b41
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x4340
leaq 0x1c0(%rsp), %rax
movq %rax, 0x1b0(%rsp)
movq %r15, %rdi
leaq 0x34faf(%rip), %rdx     # 0x3eb0a
movq %rdx, %rsi
callq 0x5384
leaq 0x528(%rsp), %rdi
movq %r15, %rsi
callq 0x4490
movq 0x1b0(%rsp), %rdi
leaq 0x1c0(%rsp), %rax
cmpq %rax, %rdi
je 0x9b98
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x4340
leaq 0x1c0(%rsp), %rax
movq %rax, 0x1b0(%rsp)
movq %r15, %rdi
leaq 0x34f58(%rip), %rdx     # 0x3eb0a
movq %rdx, %rsi
callq 0x5384
leaq 0x6b0(%rsp), %rdi
movq %r15, %rsi
callq 0x4490
movq 0x1b0(%rsp), %rdi
leaq 0x1c0(%rsp), %rax
cmpq %rax, %rdi
je 0x9bef
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x4340
xorl %ebp, %ebp
movq 0x50(%rsp), %rbx
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
movq 0x110(%rsp), %rdi
callq 0x43a0
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
leaq 0x34eec(%rip), %rsi     # 0x3eb09
callq 0x43a0
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4210
movl $0x1, %edx
movq %rax, %rdi
leaq 0x34ecd(%rip), %rsi     # 0x3eb09
callq 0x43a0
leaq 0x128(%rsp), %rdi
callq 0xe6fa
movq 0x50(%rsp), %r15
movq $0x0, 0x120(%rsp)
movq $0x0, 0xc0(%rsp)
movl 0x58(%rsp), %r13d
incl 0x4(%rsp)
leaq 0x1b0(%rsp), %rdi
leaq 0x838(%rsp), %rsi
callq 0x44f0
movq 0x1b0(%rsp), %rdi
movq 0x1b8(%rsp), %r12
leaq 0x1c0(%rsp), %rax
cmpq %rax, %rdi
je 0x9cb6
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x4340
testq %r12, %r12
je 0x9cff
movl $0x1, %edx
leaq 0x830(%rsp), %rdi
leaq 0x3270b(%rip), %rsi     # 0x3c3da
callq 0x43a0
movq 0x50(%rsp), %rsi
leaq 0x830(%rsp), %rdi
callq 0x4210
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
leaq 0x311c0(%rip), %rsi     # 0x3aeb8
callq 0x43a0
jmp 0x9d28
movq 0x50(%rsp), %rsi
leaq 0x830(%rsp), %rdi
callq 0x4210
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
leaq 0x31195(%rip), %rsi     # 0x3aeb8
callq 0x43a0
movq 0x58(%rsp), %rsi
movq %r12, %rdi
callq 0x4210
leaq 0x1b0(%rsp), %rdi
leaq 0x3a0(%rsp), %rsi
callq 0x44f0
movq 0x1b0(%rsp), %rdi
movq 0x1b8(%rsp), %r12
leaq 0x1c0(%rsp), %rax
cmpq %rax, %rdi
je 0x9d77
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x4340
testq %r12, %r12
je 0x9e07
movl $0x1, %edx
leaq 0x398(%rsp), %rdi
leaq 0x31124(%rip), %rsi     # 0x3aeb8
callq 0x43a0
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
leaq 0x398(%rsp), %rdi
callq 0x43a0
movl $0x1, %edx
leaq 0x520(%rsp), %rdi
leaq 0x310ee(%rip), %rsi     # 0x3aeb8
callq 0x43a0
movq 0xa0(%rsp), %rsi
movq 0xa8(%rsp), %rdx
leaq 0x520(%rsp), %rdi
callq 0x43a0
movl $0x1, %edx
leaq 0x6a8(%rsp), %rdi
leaq 0x310b8(%rip), %rsi     # 0x3aeb8
callq 0x43a0
jmp 0x9e41
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
leaq 0x398(%rsp), %rdi
callq 0x43a0
movq 0xa0(%rsp), %rsi
movq 0xa8(%rsp), %rdx
leaq 0x520(%rsp), %rdi
callq 0x43a0
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
leaq 0x6a8(%rsp), %rdi
callq 0x43a0
leaq 0x60(%rsp), %r12
movq %r12, %rdi
leaq 0x307da(%rip), %rsi     # 0x3a641
callq 0x4100
testl %eax, %eax
je 0x9e91
movq %r12, %rdi
leaq 0x35083(%rip), %rsi     # 0x3eefd
callq 0x4100
testl %eax, %eax
je 0x9f4a
movq 0x58(%rsp), %r12
jmp 0x9ffe
movq 0xc0(%rsp), %rsi
testq %rsi, %rsi
je 0x9f38
movq 0x50(%rsp), %rcx
movq %rcx, %rax
subq %rsi, %rax
movl %esi, %edx
notl %edx
addl %ecx, %edx
incl %eax
cmpq %rsi, %rcx
cmovbl %edx, %eax
movq 0x138(%rsp), %r8
testq %r8, %r8
je 0x9f10
leaq 0x130(%rsp), %rcx
movq %rcx, %rdx
movq %r8, %rsi
movl 0x20(%r8), %edi
xorl %r8d, %r8d
cmpl %eax, %edi
setl %r8b
movq %rsi, %rcx
cmovlq %rdx, %rcx
movq 0x10(%rsi,%r8,8), %r8
testq %r8, %r8
jne 0x9ed0
leaq 0x130(%rsp), %r8
cmpq %r8, %rcx
je 0x9f10
cmpl %eax, %edi
cmovlq %rdx, %rsi
cmpl %eax, 0x20(%rsi)
jle 0xa0a1
movl %eax, 0x1b0(%rsp)
movq $0x1, 0x1b8(%rsp)
leaq 0x128(%rsp), %rdi
leaq 0x1b0(%rsp), %rsi
callq 0xdfe8
movq 0x58(%rsp), %r12
movq %r12, 0xc0(%rsp)
jmp 0x9ffe
movq 0x120(%rsp), %rsi
testq %rsi, %rsi
je 0x9ff1
movq 0x50(%rsp), %rcx
movq %rcx, %rax
subq %rsi, %rax
movl %esi, %edx
notl %edx
addl %ecx, %edx
incl %eax
cmpq %rsi, %rcx
cmovbl %edx, %eax
movq 0x138(%rsp), %r8
testq %r8, %r8
je 0x9fc9
leaq 0x130(%rsp), %rcx
movq %rcx, %rdx
movq %r8, %rsi
movl 0x20(%r8), %edi
xorl %r8d, %r8d
cmpl %eax, %edi
setl %r8b
movq %rsi, %rcx
cmovlq %rdx, %rcx
movq 0x10(%rsi,%r8,8), %r8
testq %r8, %r8
jne 0x9f89
leaq 0x130(%rsp), %r8
cmpq %r8, %rcx
je 0x9fc9
cmpl %eax, %edi
cmovlq %rdx, %rsi
cmpl %eax, 0x20(%rsi)
jle 0xa10c
movl %eax, 0x1b0(%rsp)
movq $0x1, 0x1b8(%rsp)
leaq 0x128(%rsp), %rdi
leaq 0x1b0(%rsp), %rsi
callq 0xdfe8
movq 0x58(%rsp), %r12
movq %r12, 0x120(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0xc8(%rsp)
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0xa030
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x4340
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0xa055
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x4340
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0xa071
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x4340
subl %r15d, %r13d
addl %r13d, %ebp
incl %ebp
incq 0x118(%rsp)
movq %r14, %rdi
callq 0x4230
movq %rax, %r14
cmpq 0x190(%rsp), %rax
leaq 0x60(%rsp), %r15
jne 0x930e
jmp 0xa115
incq 0x28(%rcx)
jmp 0x9f38
incq 0x28(%rcx)
movq 0xe0(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xce1a
movslq %r12d, %rcx
addq %rcx, (%rax)
jmp 0x98b3
movq %rsi, %r12
callq 0xce1a
incq (%rax)
movq 0x50(%rsp), %rbx
movq 0x58(%rsp), %r15
movq 0x9e0(%rsp), %rdi
movq %r12, %rsi
callq 0xce1a
movq (%rax), %rcx
subq %rbx, %r15
addq %r15, %rcx
incq %rcx
movq %rcx, (%rax)
leaq 0x1b0(%rsp), %r15
jmp 0x99e2
incq 0x28(%rcx)
jmp 0x9ff1
cmpq %rbx, %r12
jbe 0xab4a
movq %r12, 0xc0(%rsp)
subl %ebx, %r12d
leal 0x1(%r12), %eax
cmpl $0x1, %eax
adcl $0x1, %r12d
movq 0x110(%rsp), %rdi
movq 0xc8(%rsp), %rsi
callq 0x4210
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x349ad(%rip), %rsi     # 0x3eb09
callq 0x43a0
movq %rbx, %rdi
movl %r12d, %esi
callq 0x4580
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x3498b(%rip), %rsi     # 0x3eb09
callq 0x43a0
cvtsi2ss %ebp, %xmm0
movq (%rbx), %rax
movq -0x18(%rax), %rcx
movq $0x2, 0x8(%rbx,%rcx)
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ecx
movl $0xfffffefb, %edx       # imm = 0xFFFFFEFB
andl %edx, %ecx
cvtsi2ss %r12d, %xmm1
orl $0x4, %ecx
movl %ecx, 0x18(%rbx,%rax)
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movq %rbx, %rdi
movsd %xmm0, 0x100(%rsp)
callq 0x4510
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x3492c(%rip), %rsi     # 0x3eb09
callq 0x43a0
movl 0x4(%rsp), %esi
movq %rbx, %rdi
callq 0x4580
movq %rax, %rbx
movl $0x3, %edx
movq %rax, %rdi
leaq 0x30cba(%rip), %rsi     # 0x3aeba
callq 0x43a0
movq %rbx, %rdi
movq 0xc0(%rsp), %rsi
callq 0x4210
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x348e2(%rip), %rsi     # 0x3eb09
callq 0x43a0
leaq 0x1b0(%rsp), %rdi
leaq 0x838(%rsp), %rsi
callq 0x44f0
movq 0x1b0(%rsp), %rsi
movq 0x1b8(%rsp), %rdx
movq %rbx, %rdi
callq 0x43a0
leaq 0x698(%rsp), %r13
leaq 0x510(%rsp), %rbp
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x3488e(%rip), %rsi     # 0x3eb09
callq 0x43a0
leaq 0x50(%rsp), %rdi
leaq 0x6b0(%rsp), %rsi
callq 0x44f0
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
movq %rbx, %rdi
callq 0x43a0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x34853(%rip), %rsi     # 0x3eb09
callq 0x43a0
leaq 0x8(%rsp), %rdi
leaq 0x3a0(%rsp), %rsi
callq 0x44f0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x43a0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x34818(%rip), %rsi     # 0x3eb09
callq 0x43a0
leaq 0x30(%rsp), %rdi
leaq 0x528(%rsp), %rsi
callq 0x44f0
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq %rbx, %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
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0xa360
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x4340
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xa37c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4340
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0xa393
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x4340
movq 0x1b0(%rsp), %rdi
leaq 0x1c0(%rsp), %rax
cmpq %rax, %rdi
je 0xa3b8
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x4340
cmpl 0xa08(%rsp), %r12d
jl 0xa7ce
leaq 0x1b0(%rsp), %rdi
callq 0x4240
movq %r15, 0x50(%rsp)
leaq 0x50(%rsp), %rbx
movq %rbx, %rdi
leaq 0x34723(%rip), %rdx     # 0x3eb0a
movq %rdx, %rsi
callq 0x5384
leaq 0x1c8(%rsp), %rdi
movq %rbx, %rsi
callq 0x4490
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0xa416
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x4340
movq 0x1c0(%rsp), %rax
movq -0x18(%rax), %rcx
movq $0x2, 0x1c8(%rsp,%rcx)
movq -0x18(%rax), %rax
movl 0x1d8(%rsp,%rax), %ecx
movl $0xfffffefb, %edx       # imm = 0xFFFFFEFB
andl %edx, %ecx
orl $0x4, %ecx
movl %ecx, 0x1d8(%rsp,%rax)
leaq 0x1c0(%rsp), %rdi
movsd 0x100(%rsp), %xmm0
callq 0x4510
leaq 0x50(%rsp), %rbx
movq %rbx, %rdi
leaq 0x1c8(%rsp), %rsi
callq 0x44f0
movq 0xf8(%rsp), %rdi
movq %rbx, %rsi
callq 0xdd92
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0xa49f
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x4340
cmpq 0x188(%rsp), %rbx
je 0xa4b2
incq 0x40(%rbx)
jmp 0xa55b
leaq 0x8(%rsp), %rdi
leaq 0x1c8(%rsp), %rsi
callq 0x44f0
movq %r15, 0x50(%rsp)
movq 0x8(%rsp), %rax
leaq 0x18(%rsp), %rcx
cmpq %rcx, %rax
je 0xa4e9
movq %rax, 0x50(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x60(%rsp)
jmp 0xa4f0
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x10(%rsp), %rax
movq %rax, 0x58(%rsp)
movq %rcx, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
movq $0x1, 0x70(%rsp)
movq 0xf8(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0xde1c
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0xa53f
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x4340
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xa55b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4340
xorps %xmm0, %xmm0
cvtsi2sd %r12d, %xmm0
divsd 0x30365(%rip), %xmm0    # 0x3a8d0
callq 0x4170
cvttsd2si %xmm0, %eax
movl %eax, 0x8(%rsp)
movq 0x180(%rsp), %rdi
movq 0x10(%rdi), %rdx
testq %rdx, %rdx
je 0xa5bb
movq 0xf0(%rsp), %rcx
xorl %esi, %esi
cmpl %eax, 0x20(%rdx)
setl %sil
cmovgeq %rdx, %rcx
movq 0x10(%rdx,%rsi,8), %rdx
testq %rdx, %rdx
jne 0xa591
cmpq 0xf0(%rsp), %rcx
je 0xa5bb
cmpl %eax, 0x20(%rcx)
jle 0xaa1f
movl %eax, 0x50(%rsp)
movq $0x1, 0x58(%rsp)
leaq 0x50(%rsp), %rbx
movq %rbx, %rsi
callq 0xdfe8
movl 0x8(%rsp), %eax
movl %eax, 0x50(%rsp)
movslq %r12d, %rax
movq %rax, 0x58(%rsp)
movq 0xe0(%rsp), %rdi
movq %rbx, %rsi
callq 0xdfe8
movq 0xc0(%rsp), %r12
movq 0x198(%rsp), %rsi
addq $0x20, %rsi
movq 0x9f0(%rsp), %rdi
callq 0xe288
cmpq 0x178(%rsp), %rax
je 0xa63d
movq 0x198(%rsp), %rsi
addq $0x20, %rsi
movq 0x9f0(%rsp), %rdi
callq 0xce80
incl (%rax)
jmp 0xa691
movq 0x198(%rsp), %rax
movq %r15, 0x50(%rsp)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq 0x50(%rsp), %rbx
movq %rbx, %rdi
callq 0xd940
movl $0x1, 0x70(%rsp)
movq 0x9f0(%rsp), %rdi
movq %rbx, %rsi
callq 0xe312
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0xa691
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x4340
movq 0xd0(%rsp), %rdi
leaq 0x4(%rsp), %rsi
movq 0x10(%rdi), %rcx
movl 0x4(%rsp), %eax
testq %rcx, %rcx
je 0xa6de
movq 0xe8(%rsp), %rdx
xorl %r8d, %r8d
cmpl %eax, 0x20(%rcx)
setl %r8b
cmovgeq %rcx, %rdx
movq 0x10(%rcx,%r8,8), %rcx
testq %rcx, %rcx
jne 0xa6b3
cmpq 0xe8(%rsp), %rdx
je 0xa6de
cmpl 0x20(%rdx), %eax
jge 0xaa40
movl %eax, 0x50(%rsp)
movq $0x1, 0x58(%rsp)
leaq 0x50(%rsp), %rbx
movq %rbx, %rsi
callq 0xdfe8
subq 0xc8(%rsp), %r12
incq %r12
movl 0x4(%rsp), %eax
movl %eax, 0x50(%rsp)
movq %r12, 0x58(%rsp)
movq 0x9e0(%rsp), %rdi
movq %rbx, %rsi
callq 0xdfe8
movq 0x140(%rsp), %rbx
leaq 0x130(%rsp), %rax
cmpq %rax, %rbx
je 0xa7ad
movq 0x9e8(%rsp), %rax
movq 0x10(%rax), %rdx
movl 0x20(%rbx), %eax
testq %rdx, %rdx
je 0xa777
movq 0x108(%rsp), %rcx
xorl %esi, %esi
cmpl %eax, 0x20(%rdx)
setl %sil
cmovgeq %rdx, %rcx
movq 0x10(%rdx,%rsi,8), %rdx
testq %rdx, %rdx
jne 0xa751
cmpq 0x108(%rsp), %rcx
je 0xa777
cmpl 0x20(%rcx), %eax
jge 0xa7a3
movl %eax, 0x50(%rsp)
movq 0x28(%rbx), %rax
movq %rax, 0x58(%rsp)
movq 0x9e8(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0xdfe8
movq %rbx, %rdi
callq 0x4230
movq %rax, %rbx
jmp 0xa728
movq 0x28(%rbx), %rax
addq %rax, 0x28(%rcx)
jmp 0xa796
leaq 0x1b0(%rsp), %rdi
movq 0x417dc(%rip), %rsi     # 0x4bf98
callq 0x4260
movq 0xd8(%rsp), %rdi
callq 0x4140
leaq 0x128(%rsp), %rdi
callq 0xe6fa
movl $0x0, 0x4(%rsp)
leaq 0x1c0(%rsp), %rax
movq %rax, 0x1b0(%rsp)
leaq 0x1b0(%rsp), %rbx
movq %rbx, %rdi
leaq 0x34305(%rip), %rdx     # 0x3eb0a
movq %rdx, %rsi
callq 0x5384
leaq 0x838(%rsp), %rdi
movq %rbx, %rsi
callq 0x4490
movq 0x1b0(%rsp), %rdi
leaq 0x1c0(%rsp), %rax
cmpq %rax, %rdi
je 0xa842
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x4340
leaq 0x1c0(%rsp), %rax
movq %rax, 0x1b0(%rsp)
leaq 0x1b0(%rsp), %rbx
movq %rbx, %rdi
leaq 0x342a6(%rip), %rdx     # 0x3eb0a
movq %rdx, %rsi
callq 0x5384
leaq 0x3a0(%rsp), %rdi
movq %rbx, %rsi
callq 0x4490
movq 0x1b0(%rsp), %rdi
leaq 0x1c0(%rsp), %rax
cmpq %rax, %rdi
je 0xa8a1
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x4340
leaq 0x1c0(%rsp), %rax
movq %rax, 0x1b0(%rsp)
leaq 0x1b0(%rsp), %rbx
movq %rbx, %rdi
leaq 0x34247(%rip), %rdx     # 0x3eb0a
movq %rdx, %rsi
callq 0x5384
leaq 0x528(%rsp), %rdi
movq %rbx, %rsi
callq 0x4490
movq 0x1b0(%rsp), %rdi
leaq 0x1c0(%rsp), %rax
cmpq %rax, %rdi
je 0xa900
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x4340
leaq 0x1c0(%rsp), %rax
movq %rax, 0x1b0(%rsp)
leaq 0x1b0(%rsp), %rbx
movq %rbx, %rdi
leaq 0x341e8(%rip), %rdx     # 0x3eb0a
movq %rdx, %rsi
callq 0x5384
leaq 0x6b0(%rsp), %rdi
movq %rbx, %rsi
callq 0x4490
movq 0x1b0(%rsp), %rdi
leaq 0x1c0(%rsp), %rax
cmpq %rax, %rdi
je 0xa95f
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x4340
leaq 0x128(%rsp), %rdi
callq 0xd802
movq %r13, %rdi
movq 0x41622(%rip), %rbx     # 0x4bf98
movq %rbx, %rsi
callq 0x4260
movq 0x158(%rsp), %rdi
callq 0x4140
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x4260
movq 0x160(%rsp), %rdi
callq 0x4140
leaq 0x388(%rsp), %rdi
movq %rbx, %rsi
callq 0x4260
movq 0x168(%rsp), %rdi
callq 0x4140
leaq 0x820(%rsp), %rdi
movq %rbx, %rsi
callq 0x4260
movq 0x170(%rsp), %rdi
callq 0x4140
leaq 0x198(%rsp), %rdi
callq 0x6aac
movq 0x358(%rsp), %rdi
leaq 0x368(%rsp), %rax
cmpq %rax, %rdi
je 0xaa0f
movq 0x368(%rsp), %rsi
incq %rsi
callq 0x4340
cmpq 0x378(%rsp), %r14
jne 0x90ac
jmp 0xaa80
incq 0x28(%rcx)
movq 0xe0(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xce1a
movslq %r12d, %rcx
addq %rcx, (%rax)
jmp 0xa5f5
movq %rsi, %rbx
callq 0xce1a
incq (%rax)
movq 0x9e0(%rsp), %rdi
movq %rbx, %rsi
callq 0xce1a
movq (%rax), %rcx
subq 0xc8(%rsp), %r12
addq %r12, %rcx
incq %rcx
movq %rcx, (%rax)
jmp 0xa720
movq $0x0, 0x118(%rsp)
movq 0x9f8(%rsp), %r14
movq 0x41539(%rip), %rbx     # 0x4bfc8
leaq 0x30428(%rip), %rsi     # 0x3aebe
movl $0x9, %edx
movq %rbx, %rdi
callq 0x43a0
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x43a0
movq %rax, %rbx
leaq 0x3040c(%rip), %rsi     # 0x3aec8
movl $0x5, %edx
movq %rax, %rdi
callq 0x43a0
movq %rbx, %rdi
movq 0x118(%rsp), %rsi
callq 0x42f0
movq %rax, %rbx
leaq 0x303eb(%rip), %rsi     # 0x3aece
movl $0x15, %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
movb $0x1, %al
addq $0x9a8, %rsp            # imm = 0x9A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x30238(%rip), %rdi     # 0x3ad6a
leaq 0x3024c(%rip), %rsi     # 0x3ad85
leaq 0x3025a(%rip), %rcx     # 0x3ad9a
movl $0x137, %edx            # imm = 0x137
callq 0x41f0
leaq 0x30219(%rip), %rdi     # 0x3ad6a
leaq 0x3022d(%rip), %rsi     # 0x3ad85
leaq 0x3023b(%rip), %rcx     # 0x3ad9a
movl $0x1ff, %edx            # imm = 0x1FF
callq 0x41f0
jmp 0xae77
jmp 0xabdd
jmp 0xae77
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0xab8f
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x4340
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xae7a
movq 0x18(%rsp), %rsi
jmp 0xabf3
jmp 0xae77
jmp 0xae77
jmp 0xae77
jmp 0xae77
jmp 0xae77
jmp 0xae77
jmp 0xae77
jmp 0xae77
jmp 0xae77
jmp 0xabdd
jmp 0xae77
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0xae7a
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x4340
jmp 0xae7a
jmp 0xaef5
jmp 0xae77
jmp 0xaef5
jmp 0xad80
jmp 0xaef5
jmp 0xad80
jmp 0xad80
jmp 0xad85
movq %rax, %rbx
jmp 0xadbd
jmp 0xad80
jmp 0xaef5
jmp 0xad80
jmp 0xaef5
jmp 0xaef5
jmp 0xacff
movq %rax, %rbx
jmp 0xb0b1
jmp 0xac8b
jmp 0xac83
movq %rax, %rbx
movq 0x698(%rsp), %rdi
cmpq %r14, %rdi
je 0xb041
movq 0x6a8(%rsp), %rsi
incq %rsi
callq 0x4340
jmp 0xb041
movq %rax, %rbx
jmp 0xb0a4
movq %rax, %rbx
jmp 0xb041
jmp 0xacf7
movq %rax, %rbx
jmp 0xb020
movq %rax, %rbx
movq 0x388(%rsp), %rdi
cmpq %r14, %rdi
je 0xb083
movq 0x398(%rsp), %rsi
incq %rsi
callq 0x4340
jmp 0xb083
movq %rax, %rbx
movq 0x1b0(%rsp), %rdi
leaq 0x1c0(%rsp), %rax
cmpq %rax, %rdi
je 0xb020
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x4340
jmp 0xb020
movq %rax, %rbx
jmp 0xb083
movq %rax, %rbx
jmp 0xb062
movq %rax, %rbx
movq 0x510(%rsp), %rdi
cmpq %r14, %rdi
je 0xb062
movq 0x520(%rsp), %rsi
incq %rsi
callq 0x4340
jmp 0xb062
jmp 0xaf84
jmp 0xaf84
jmp 0xae45
jmp 0xaf84
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xad63
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4340
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0xaf87
movq 0x40(%rsp), %rsi
jmp 0xae60
movq %rax, %rbx
jmp 0xadf5
movq %rax, %rbx
jmp 0xadde
movq %rax, %rbx
jmp 0xadc2
jmp 0xaf84
jmp 0xaf84
jmp 0xafaa
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0xadbd
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x4340
leaq 0x60(%rsp), %r15
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xadde
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4340
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0xadf5
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x4340
movq 0x1b0(%rsp), %rdi
leaq 0x1c0(%rsp), %rax
cmpq %rax, %rdi
je 0xb013
movq 0x1c0(%rsp), %rsi
jmp 0xb00b
jmp 0xaf84
jmp 0xaf84
jmp 0xaf84
jmp 0xaf84
jmp 0xafaa
jmp 0xaf84
jmp 0xae45
jmp 0xaf84
jmp 0xaf84
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xaf87
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4340
jmp 0xaf87
jmp 0xaf84
jmp 0xafaa
movq %rax, %rbx
movq 0x41117(%rip), %rsi     # 0x4bf98
leaq 0x1b0(%rsp), %rdi
callq 0x4260
movq 0xd8(%rsp), %rdi
callq 0x4140
jmp 0xb013
jmp 0xaef5
jmp 0xafaa
jmp 0xaece
jmp 0xaece
jmp 0xaece
jmp 0xaece
jmp 0xafaa
jmp 0xaec9
jmp 0xafaa
jmp 0xaed6
jmp 0xafaa
jmp 0xaece
jmp 0xafaa
movq %rax, %rbx
jmp 0xaf41
movq %rax, %rbx
jmp 0xaf5d
movq %rax, %rbx
jmp 0xaf25
jmp 0xafaa
jmp 0xafaa
movq %rax, %rbx
jmp 0xafd2
movq %rax, %rbx
jmp 0xaff7
movq %rax, %rbx
jmp 0xb013
movq %rax, %rbx
movq 0x338(%rsp), %rdi
leaq 0x348(%rsp), %rax
cmpq %rax, %rdi
je 0xaf25
movq 0x348(%rsp), %rsi
incq %rsi
callq 0x4340
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0xaf41
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x4340
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xaf5d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4340
movq 0x1b0(%rsp), %rdi
leaq 0x1c0(%rsp), %rax
cmpq %rax, %rdi
je 0xafad
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x4340
jmp 0xafad
movq %rax, %rbx
movq 0x4100a(%rip), %rsi     # 0x4bf98
leaq 0x1b0(%rsp), %rdi
callq 0x4260
movq 0xd8(%rsp), %rdi
callq 0x4140
jmp 0xafad
movq %rax, %rbx
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0xafd2
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x4340
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0xaff7
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x4340
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0xb013
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x4340
leaq 0x128(%rsp), %rdi
callq 0xd802
movq 0x40f71(%rip), %rsi     # 0x4bf98
leaq 0x698(%rsp), %rdi
callq 0x4260
movq 0x158(%rsp), %rdi
callq 0x4140
movq 0x40f50(%rip), %rsi     # 0x4bf98
leaq 0x510(%rsp), %rdi
callq 0x4260
movq 0x160(%rsp), %rdi
callq 0x4140
movq 0x40f2f(%rip), %rsi     # 0x4bf98
leaq 0x388(%rsp), %rdi
callq 0x4260
movq 0x168(%rsp), %rdi
callq 0x4140
movq 0x40f0e(%rip), %rsi     # 0x4bf98
leaq 0x820(%rsp), %rdi
callq 0x4260
movq 0x170(%rsp), %rdi
callq 0x4140
leaq 0x198(%rsp), %rdi
callq 0x6aac
movq 0x358(%rsp), %rdi
leaq 0x368(%rsp), %rax
cmpq %rax, %rdi
je 0xb0d6
movq 0x368(%rsp), %rsi
incq %rsi
callq 0x4340
movq %rbx, %rdi
callq 0x45a0