// File: schneebergerlab[P]DrLink/convert_bam.cpp
// Function: convertBam(int, char**)
bool convertBam(int argc, char* argv[])
{
    if(argc < 4)
    {
        cout << "\n   DrLink preprocess\t"
             << "Usage: samtools view longranger_wgs.bam | DrLink preprocess - out_prefix_str " << endl;  
        return false;
    }
    clock_t tbeg;
    tbeg = clock();
    bool verbose = true; // to add future option    
    //
    cout << "   Info: converting streaming bam info started..." << endl;
    // prepare output gzipped file
    string ofilename = (string)argv[3] + "_bamInfo_trashme.gz";
    ogzstream  ofp;
    ofp.open(ofilename.c_str());
    if ( ! ofp.good()) {
        std::cerr << "ERROR: Opening file `" << ofilename << "' failed.\n";
	return 1;
    }
    ofp << "#chr\tpos\tbamCIGAR\tbarcode\tlrMI\tread-order:bamFLAG\treversed-align\tread-id\tpnext" << endl;
    // pnext: where its pair is aligned: must be the same-chr-position - only concordant alignments kept.
    //
    unsigned long numraw  = 0;
    unsigned long numcov  = 0;
    unsigned long numNoBX = 0;
    unsigned long numNoCG = 0; // no cigar string    
    unsigned long numNoMI = 0;
    unsigned long numNoMA = 0; // number of reads showing multiple alignment: only one kept.    
    unsigned long numDiscordant = 0; // read pairs aligned not in the same chr-region.
    string exampleNoBX("");
    string exampleNoCG("");    
    string exampleNoMI("");
    string exampleNoMA("");
    string exampleDiscordant("");
    bool out = false;
    std::string line;
    while (std::getline(std::cin, line)) 
    {
        if(line.compare("quit")==0 || line.compare("q")==0 || line.compare("exit")==0) break;
        if(line.size()==0 || line[0]=='#') continue;
        numraw ++;
        if(numraw%10000000 == 0)
        {
            cout << "   info: " << numraw << "th aligm..." << endl;
        }
        //
        vector<string> lineinfo = split_string(line, '\t');
        
        // cigar string
        if(lineinfo[5].compare("*") == 0) 
        {
            if(exampleNoCG.size()==0)
            {
                exampleNoCG = line;
                cout << "   Warning: there are alignments without explicit CIGAR string, skipped., e.g.: " 
                     << line 
                     << endl;
                cout << "   Info: you will get a total number of such alignments in the end of program. " 
                     << endl;
            }
            numNoCG ++;
            continue;
        }
        // discordant read pairs
        if(lineinfo[6].compare("=") != 0)
        {
            // case 1: not on the same chr
            if(exampleDiscordant.size()==0)
            {
                exampleDiscordant = line;
                cout << "   Warning: there are discordant alignments, skipped., e.g.: " 
                     << line 
                     << endl;
                cout << "   Info: you will get a total number of such alignments in the end of program. " 
                     << endl;
            }  
            numDiscordant ++;
            continue;                      
        }
        else
        {
            // case 2: on the same read, but unexpected template length 
            string tmplen;
            if(lineinfo[8].find("-") != std::string::npos)
            {
                tmplen = lineinfo[8].substr(1);
            }
            else
            {
                tmplen = lineinfo[8].substr(0);
            }
            unsigned long templateLen = strtoul(tmplen.c_str(), NULL, 0);
            if(templateLen==0 || templateLen>2000) // caution: fragment size
            {
                if(exampleDiscordant.size()==0)
                {
                    exampleDiscordant = line;
                    cout << "   Warning: there are discordant alignments, skipped., e.g.: " 
                         << line 
                         << endl;
                    cout << "   Info: you will get a total number of such alignments in the end of program. " 
                         << endl;
                }
                numDiscordant ++;
                continue;    
            }
        }
        //
        /* BX: Chromium barcode sequence that is error-corrected and confirmed against 
           a list of known-good barcode sequences. Use this for analysis, e.g., '\tBX:Z:TTTGTGTGTATGACTC-1' */        
        size_t pos1  = line.find("\tBX:");
        if(pos1 == std::string::npos) 
        {
            if(exampleNoBX.size()==0)
            {
                exampleNoBX = line;
                cout << "   Warning: there are alignments without BX info, skipped., e.g.: " 
                     << line 
                     << endl;
                cout << "   Info: you will get a total number of such alignments in the end of program. " 
                     << endl;                
            }
            numNoBX ++;
            continue;
        }
        pos1 += 1; // from 'BX:Z:...'
        size_t pos2  = line.find("\t", pos1);
        if(pos2 == std::string::npos)
        {
            pos2 = line.size();
        }        
        string rawbx = line.substr(pos1, pos2-pos1);
        //
        /* MI: Global molecule identifier for molecule that generated this read,
           e.g.,  '\tMI:i:29' */
        size_t pos3  = line.find("\tMI:");
        bool foundmi = true;
        if(pos3 == std::string::npos)
        {
            if(exampleNoMI.size()==0)
            {
                exampleNoMI = line;
                cout << "   Warning: there are alignments without MI info, but kept, e.g.: " 
                     << line 
                     << endl;
                cout << "   Info: you will get a total number of such alignments in the end of program. " 
                     << endl;                
            }
            numNoMI ++;
            foundmi = false;
        }
        pos3 += 1; // from 'MI:i:...'
        size_t pos4;
        string rawmi("-1");
        if(foundmi)
        {
            pos4 = line.find("\t", pos3);
            if(pos4 == std::string::npos)
            {
                pos4 = line.size();
            }
            rawmi = line.substr(pos3+5, pos4-pos3-5); // without "MI:i:"
        }
        //
        // check if it is read 1 or read 2
        int hexflag = strtol(lineinfo[1].c_str(), NULL, 0);
        if(hexflag > 255) 
        {
            numNoMA ++;
            if(exampleNoMA.size()==0)
            {
                exampleNoMA = line;
                cout << "   Warning: there are alignments being secondary/supplementary or not passing filters, skipped, e.g.: " 
                     << line 
                     << endl;
                cout << "   Info: you will get a total number of such alignments in the end of program. " 
                     << endl;                
            }
            continue;
        }

        string readflag = "U";
        
        if((hexflag & 0x40) == 0x40 && (hexflag & 0x80) == 0)
        {
            readflag = "R1";
        }
        else
        if((hexflag & 0x40) == 0    && (hexflag & 0x80) == 0x80)
        {
            readflag = "R2";
        }
        else
        {
            readflag = "U0";
            cout << "   hexflag=" << hexflag << endl;
            cout << "   hexflag & 0x40 == 0x40= " << (hexflag & 0x40) << endl;
            cout << "   hexflag & 0x80 == 0   = " << (hexflag & 0x80) << endl;            
        }
        string reversed = "nrc";
        if((hexflag & 0x10) == 0x10) reversed = "rc";
        // chr	pos	CIGAR	barcode	MI	read-ordering:R1/R2	reversed	read-id	pnext
        // caution!!! code below also works for reversed-cases of alignment!
        // in bam/sam, it is always pos + CIGAR"M" ==> spanning of a read!!!
        ofp << lineinfo[2]                     << "\t" 
            << lineinfo[3]                     << "\t" 
            << lineinfo[5]                     << "\t" 
            << rawbx.substr(5, rawbx.size()-7) << "\t"
            << rawmi                           << "\t"
            << readflag  << ":" << lineinfo[1] << "\t" 
            << reversed                        << "\t"
            << lineinfo[0]                     << "\t"
            << lineinfo[7]                     << endl; // with read id and pnext
        //
        numcov ++;            
        if(!out) out = true;
        line.clear();
    }    
    //
    ofp.close();

    if(numNoBX > 0)
    {
        cout << "   Warning: there are "<< numNoBX 
             << " alignments without BX info, skipped. "              
             << endl;
    }
    if(numNoCG > 0)
    {
        cout << "   Warning: there are "<< numNoCG 
             << " alignments without explicit CIAGR info, skipped."   
             << endl;     
    }    
    if(numNoMI > 0)
    {
        cout << "   Warning: there are "<< numNoMI 
             << " alignments without MI info, but kept."              
             << endl;     
    }
    if(numNoMA > 0)
    {
        cout << "   Warning: there are "<< numNoMA 
             << " alignments being secondary/supplementary alignment"
             << " or not passing filters, skipped." 
             << endl;     
    }  
    if(numDiscordant > 0)
    {
        cout << "   Warning: there are "<< numDiscordant 
             << " alignments being discordant (pairs not on same chr or distance>2kb), skipped." 
             << endl;         
    }  
    cout << "   Info: in total " 
         << numraw  
         << " alignment lines, of which " 
         << numcov               
         << " with barcode info converted." 
         <<  endl;
    cout << "   Info: time on converting streaming bam info: " 
         << (float)(clock()-tbeg)/CLOCKS_PER_SEC 
         << " seconds.\n" 
         << endl;
    if(!out) return false;
    else return true;
}

// Assembly:
subq $0x898, %rsp            # imm = 0x898
movl %edi, 0x890(%rsp)
movq %rsi, 0x888(%rsp)
cmpl $0x4, 0x890(%rsp)
jge 0x6c3e
movq 0x7e3c1(%rip), %rdi     # 0x84fc8
leaq 0x5f782(%rip), %rsi     # 0x66390
callq 0x5460
movq %rax, %rdi
leaq 0x5f78a(%rip), %rsi     # 0x663a7
callq 0x5460
movq %rax, %rdi
movq 0x7e384(%rip), %rsi     # 0x84fb0
callq 0x54b0
movb $0x0, 0x897(%rsp)
jmp 0x8738
callq 0x52e0
movq %rax, 0x880(%rsp)
movb $0x1, 0x87f(%rsp)
movq 0x7e36e(%rip), %rdi     # 0x84fc8
leaq 0x5f794(%rip), %rsi     # 0x663f5
callq 0x5460
movq %rax, %rdi
movq 0x7e340(%rip), %rsi     # 0x84fb0
callq 0x54b0
movq 0x888(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x2c0(%rsp)
leaq 0x837(%rsp), %rdi
movq %rdi, 0x2c8(%rsp)
callq 0x57c0
movq 0x2c0(%rsp), %rsi
movq 0x2c8(%rsp), %rdx
leaq 0x838(%rsp), %rdi
callq 0x6880
jmp 0x6cbd
leaq 0x5f763(%rip), %rdx     # 0x66427
leaq 0x858(%rsp), %rdi
leaq 0x838(%rsp), %rsi
callq 0x8760
jmp 0x6cdb
leaq 0x838(%rsp), %rdi
callq 0x58b8
leaq 0x837(%rsp), %rdi
callq 0x54d0
leaq 0x588(%rsp), %rdi
callq 0x87b0
jmp 0x6d04
leaq 0x858(%rsp), %rdi
callq 0x51d0
movq %rax, %rsi
leaq 0x588(%rsp), %rdi
movl $0x10, %edx
callq 0x88c0
jmp 0x6d28
movq 0x588(%rsp), %rax
movq -0x18(%rax), %rax
leaq 0x588(%rsp,%rax), %rdi
callq 0x5760
movb %al, 0x2bf(%rsp)
jmp 0x6d4a
movb 0x2bf(%rsp), %al
testb $0x1, %al
jne 0x6e40
jmp 0x6d5b
movq 0x7e28e(%rip), %rdi     # 0x84ff0
leaq 0x5f6d2(%rip), %rsi     # 0x6643b
callq 0x5460
movq %rax, 0x2b0(%rsp)
jmp 0x6d78
movq 0x2b0(%rsp), %rdi
leaq 0x858(%rsp), %rsi
callq 0x53e0
movq %rax, 0x2a8(%rsp)
jmp 0x6d97
movq 0x2a8(%rsp), %rdi
leaq 0x5f6ab(%rip), %rsi     # 0x66451
callq 0x5460
jmp 0x6dad
movb $0x1, 0x897(%rsp)
movl $0x1, 0x584(%rsp)
jmp 0x8700
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x828(%rsp)
movl %eax, 0x824(%rsp)
jmp 0x6dfc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x828(%rsp)
movl %eax, 0x824(%rsp)
leaq 0x838(%rsp), %rdi
callq 0x58b8
leaq 0x837(%rsp), %rdi
callq 0x54d0
jmp 0x8749
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x828(%rsp)
movl %eax, 0x824(%rsp)
jmp 0x8729
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x828(%rsp)
movl %eax, 0x824(%rsp)
jmp 0x871c
leaq 0x710(%rsp), %rdi
leaq 0x5f60d(%rip), %rsi     # 0x6645c
callq 0x5460
movq %rax, 0x2a0(%rsp)
jmp 0x6e5e
movq 0x2a0(%rsp), %rdi
movq 0x7e143(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x6e74
movq $0x0, 0x578(%rsp)
movq $0x0, 0x570(%rsp)
movq $0x0, 0x568(%rsp)
movq $0x0, 0x560(%rsp)
movq $0x0, 0x558(%rsp)
movq $0x0, 0x550(%rsp)
movq $0x0, 0x548(%rsp)
leaq 0x527(%rsp), %rdi
movq %rdi, 0x298(%rsp)
callq 0x57c0
movq 0x298(%rsp), %rdx
leaq 0x63ca8(%rip), %rsi     # 0x6ab94
leaq 0x528(%rsp), %rdi
callq 0x6880
jmp 0x6efb
leaq 0x527(%rsp), %rdi
callq 0x54d0
leaq 0x4ff(%rsp), %rdi
movq %rdi, 0x290(%rsp)
callq 0x57c0
movq 0x290(%rsp), %rdx
leaq 0x63c68(%rip), %rsi     # 0x6ab94
leaq 0x500(%rsp), %rdi
callq 0x6880
jmp 0x6f3b
leaq 0x4ff(%rsp), %rdi
callq 0x54d0
leaq 0x4d7(%rsp), %rdi
movq %rdi, 0x288(%rsp)
callq 0x57c0
movq 0x288(%rsp), %rdx
leaq 0x63c28(%rip), %rsi     # 0x6ab94
leaq 0x4d8(%rsp), %rdi
callq 0x6880
jmp 0x6f7b
leaq 0x4d7(%rsp), %rdi
callq 0x54d0
leaq 0x4af(%rsp), %rdi
movq %rdi, 0x280(%rsp)
callq 0x57c0
movq 0x280(%rsp), %rdx
leaq 0x63be8(%rip), %rsi     # 0x6ab94
leaq 0x4b0(%rsp), %rdi
callq 0x6880
jmp 0x6fbb
leaq 0x4af(%rsp), %rdi
callq 0x54d0
leaq 0x487(%rsp), %rdi
movq %rdi, 0x278(%rsp)
callq 0x57c0
movq 0x278(%rsp), %rdx
leaq 0x63ba8(%rip), %rsi     # 0x6ab94
leaq 0x488(%rsp), %rdi
callq 0x6880
jmp 0x6ffb
leaq 0x487(%rsp), %rdi
callq 0x54d0
movb $0x0, 0x486(%rsp)
leaq 0x460(%rsp), %rdi
callq 0x55e0
movq 0x7dfb4(%rip), %rdi     # 0x84fd8
leaq 0x460(%rsp), %rsi
callq 0x50c0
movq %rax, 0x270(%rsp)
jmp 0x703b
movq 0x270(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x5580
movb %al, 0x26f(%rsp)
jmp 0x705b
movb 0x26f(%rsp), %al
testb $0x1, %al
jne 0x706b
jmp 0x82b4
leaq 0x460(%rsp), %rdi
leaq 0x5f431(%rip), %rsi     # 0x664ab
callq 0x5140
cmpl $0x0, %eax
je 0x70ba
leaq 0x460(%rsp), %rdi
leaq 0x5f41d(%rip), %rsi     # 0x664b0
callq 0x5140
cmpl $0x0, %eax
je 0x70ba
leaq 0x460(%rsp), %rdi
leaq 0x5f406(%rip), %rsi     # 0x664b2
callq 0x5140
cmpl $0x0, %eax
jne 0x7196
jmp 0x82b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x828(%rsp)
movl %eax, 0x824(%rsp)
leaq 0x527(%rsp), %rdi
callq 0x54d0
jmp 0x871c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x828(%rsp)
movl %eax, 0x824(%rsp)
leaq 0x4ff(%rsp), %rdi
callq 0x54d0
jmp 0x86f1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x828(%rsp)
movl %eax, 0x824(%rsp)
leaq 0x4d7(%rsp), %rdi
callq 0x54d0
jmp 0x86e4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x828(%rsp)
movl %eax, 0x824(%rsp)
leaq 0x4af(%rsp), %rdi
callq 0x54d0
jmp 0x86d7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x828(%rsp)
movl %eax, 0x824(%rsp)
leaq 0x487(%rsp), %rdi
callq 0x54d0
jmp 0x86ca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x828(%rsp)
movl %eax, 0x824(%rsp)
jmp 0x86b0
leaq 0x460(%rsp), %rdi
callq 0x5310
cmpq $0x0, %rax
je 0x71d4
xorl %eax, %eax
movl %eax, %esi
leaq 0x460(%rsp), %rdi
callq 0x5880
movq %rax, 0x260(%rsp)
jmp 0x71c4
movq 0x260(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x23, %eax
jne 0x71d9
jmp 0x701d
movq 0x578(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x578(%rsp)
movq 0x578(%rsp), %rax
movl $0x989680, %ecx         # imm = 0x989680
xorl %edx, %edx
divq %rcx
cmpq $0x0, %rdx
jne 0x7277
movq 0x7ddbc(%rip), %rdi     # 0x84fc8
leaq 0x5f2a4(%rip), %rsi     # 0x664b7
callq 0x5460
movq %rax, 0x258(%rsp)
jmp 0x7222
movq 0x258(%rsp), %rdi
movq 0x578(%rsp), %rsi
callq 0x50f0
movq %rax, 0x250(%rsp)
jmp 0x7241
movq 0x250(%rsp), %rdi
leaq 0x5f271(%rip), %rsi     # 0x664c1
callq 0x5460
movq %rax, 0x248(%rsp)
jmp 0x725f
movq 0x248(%rsp), %rdi
movq 0x7dd42(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x7275
jmp 0x7277
movb $0x9, 0x447(%rsp)
leaq 0x448(%rsp), %rdi
leaq 0x460(%rsp), %rsi
leaq 0x447(%rsp), %rdx
callq 0x60790
jmp 0x729e
leaq 0x448(%rsp), %rdi
movl $0x5, %esi
callq 0x88f0
movq %rax, %rdi
leaq 0x5f213(%rip), %rsi     # 0x664cd
callq 0x5140
cmpl $0x0, %eax
jne 0x73ba
leaq 0x500(%rsp), %rdi
callq 0x5310
cmpq $0x0, %rax
jne 0x7396
leaq 0x500(%rsp), %rdi
leaq 0x460(%rsp), %rsi
callq 0x5050
jmp 0x72f6
movq 0x7dccb(%rip), %rdi     # 0x84fc8
leaq 0x5f1cb(%rip), %rsi     # 0x664cf
callq 0x5460
movq %rax, 0x240(%rsp)
jmp 0x7313
movq 0x240(%rsp), %rdi
leaq 0x460(%rsp), %rsi
callq 0x53e0
movq %rax, 0x238(%rsp)
jmp 0x7332
movq 0x238(%rsp), %rdi
movq 0x7dc6f(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x7348
movq 0x7dc79(%rip), %rdi     # 0x84fc8
leaq 0x5f1ca(%rip), %rsi     # 0x66520
callq 0x5460
movq %rax, 0x230(%rsp)
jmp 0x7365
movq 0x230(%rsp), %rdi
movq 0x7dc3c(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x737b
jmp 0x7396
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x828(%rsp)
movl %eax, 0x824(%rsp)
jmp 0x82a2
movq 0x560(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x560(%rsp)
movl $0x2, 0x584(%rsp)
jmp 0x824a
leaq 0x448(%rsp), %rdi
movl $0x6, %esi
callq 0x88f0
movq %rax, %rdi
leaq 0x61761(%rip), %rsi     # 0x68b37
callq 0x5140
cmpl $0x0, %eax
je 0x74bd
leaq 0x488(%rsp), %rdi
callq 0x5310
cmpq $0x0, %rax
jne 0x7499
leaq 0x488(%rsp), %rdi
leaq 0x460(%rsp), %rsi
callq 0x5050
jmp 0x7412
movq 0x7dbaf(%rip), %rdi     # 0x84fc8
leaq 0x5f150(%rip), %rsi     # 0x66570
callq 0x5460
movq %rax, 0x228(%rsp)
jmp 0x742f
movq 0x228(%rsp), %rdi
leaq 0x460(%rsp), %rsi
callq 0x53e0
movq %rax, 0x220(%rsp)
jmp 0x744e
movq 0x220(%rsp), %rdi
movq 0x7db53(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x7464
movq 0x7db5d(%rip), %rdi     # 0x84fc8
leaq 0x5f0ae(%rip), %rsi     # 0x66520
callq 0x5460
movq %rax, 0x218(%rsp)
jmp 0x7481
movq 0x218(%rsp), %rdi
movq 0x7db20(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x7497
jmp 0x7499
movq 0x548(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x548(%rsp)
movl $0x2, 0x584(%rsp)
jmp 0x824a
leaq 0x420(%rsp), %rdi
callq 0x55e0
leaq 0x448(%rsp), %rdi
movl $0x8, %esi
callq 0x88f0
movq %rax, %rdi
leaq 0x5f0c8(%rip), %rsi     # 0x665ae
xorl %eax, %eax
movl %eax, %edx
callq 0x5870
cmpq $-0x1, %rax
je 0x756f
leaq 0x448(%rsp), %rdi
movl $0x8, %esi
callq 0x88f0
movq %rax, %rsi
leaq 0x400(%rsp), %rdi
movl $0x1, %edx
movq $-0x1, %rcx
callq 0x5490
jmp 0x7525
leaq 0x420(%rsp), %rdi
leaq 0x400(%rsp), %rsi
callq 0x5550
leaq 0x400(%rsp), %rdi
callq 0x58b8
jmp 0x75c0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x828(%rsp)
movl %eax, 0x824(%rsp)
leaq 0x420(%rsp), %rdi
callq 0x58b8
jmp 0x82a2
leaq 0x448(%rsp), %rdi
movl $0x8, %esi
callq 0x88f0
movq %rax, %rsi
xorl %eax, %eax
movl %eax, %edx
leaq 0x3e0(%rsp), %rdi
movq $-0x1, %rcx
callq 0x5490
jmp 0x759e
leaq 0x420(%rsp), %rdi
leaq 0x3e0(%rsp), %rsi
callq 0x5550
leaq 0x3e0(%rsp), %rdi
callq 0x58b8
leaq 0x420(%rsp), %rdi
callq 0x51d0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x5160
movq %rax, 0x3d8(%rsp)
cmpq $0x0, 0x3d8(%rsp)
je 0x7600
cmpq $0x7d0, 0x3d8(%rsp) # imm = 0x7D0
jbe 0x76d6
leaq 0x488(%rsp), %rdi
callq 0x5310
cmpq $0x0, %rax
jne 0x76b5
leaq 0x488(%rsp), %rdi
leaq 0x460(%rsp), %rsi
callq 0x5050
jmp 0x762e
movq 0x7d993(%rip), %rdi     # 0x84fc8
leaq 0x5ef34(%rip), %rsi     # 0x66570
callq 0x5460
movq %rax, 0x210(%rsp)
jmp 0x764b
movq 0x210(%rsp), %rdi
leaq 0x460(%rsp), %rsi
callq 0x53e0
movq %rax, 0x208(%rsp)
jmp 0x766a
movq 0x208(%rsp), %rdi
movq 0x7d937(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x7680
movq 0x7d941(%rip), %rdi     # 0x84fc8
leaq 0x5ee92(%rip), %rsi     # 0x66520
callq 0x5460
movq %rax, 0x200(%rsp)
jmp 0x769d
movq 0x200(%rsp), %rdi
movq 0x7d904(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x76b3
jmp 0x76b5
movq 0x548(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x548(%rsp)
movl $0x2, 0x584(%rsp)
jmp 0x76e1
movl $0x0, 0x584(%rsp)
leaq 0x420(%rsp), %rdi
callq 0x58b8
movl 0x584(%rsp), %eax
testl %eax, %eax
jne 0x824a
jmp 0x76ff
jmp 0x7701
leaq 0x460(%rsp), %rdi
leaq 0x5eea0(%rip), %rsi     # 0x665b0
xorl %eax, %eax
movl %eax, %edx
callq 0x5870
movq %rax, 0x3d0(%rsp)
cmpq $-0x1, 0x3d0(%rsp)
jne 0x7809
leaq 0x528(%rsp), %rdi
callq 0x5310
cmpq $0x0, %rax
jne 0x77e5
leaq 0x528(%rsp), %rdi
leaq 0x460(%rsp), %rsi
callq 0x5050
jmp 0x775e
movq 0x7d863(%rip), %rdi     # 0x84fc8
leaq 0x5ee49(%rip), %rsi     # 0x665b5
callq 0x5460
movq %rax, 0x1f8(%rsp)
jmp 0x777b
movq 0x1f8(%rsp), %rdi
leaq 0x460(%rsp), %rsi
callq 0x53e0
movq %rax, 0x1f0(%rsp)
jmp 0x779a
movq 0x1f0(%rsp), %rdi
movq 0x7d807(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x77b0
movq 0x7d811(%rip), %rdi     # 0x84fc8
leaq 0x5ed62(%rip), %rsi     # 0x66520
callq 0x5460
movq %rax, 0x1e8(%rsp)
jmp 0x77cd
movq 0x1e8(%rsp), %rdi
movq 0x7d7d4(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x77e3
jmp 0x77e5
movq 0x568(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x568(%rsp)
movl $0x2, 0x584(%rsp)
jmp 0x824a
movq 0x3d0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x3d0(%rsp)
movq 0x3d0(%rsp), %rdx
leaq 0x460(%rsp), %rdi
leaq 0x6335f(%rip), %rsi     # 0x6ab93
callq 0x5870
movq %rax, 0x3c8(%rsp)
cmpq $-0x1, 0x3c8(%rsp)
jne 0x7861
leaq 0x460(%rsp), %rdi
callq 0x5310
movq %rax, 0x3c8(%rsp)
movq 0x3d0(%rsp), %rdx
movq 0x3c8(%rsp), %rcx
subq %rdx, %rcx
leaq 0x3a8(%rsp), %rdi
leaq 0x460(%rsp), %rsi
callq 0x5490
jmp 0x788b
leaq 0x460(%rsp), %rdi
leaq 0x5ed5e(%rip), %rsi     # 0x665f8
xorl %eax, %eax
movl %eax, %edx
callq 0x5870
movq %rax, 0x3a0(%rsp)
movb $0x1, 0x39f(%rsp)
cmpq $-0x1, 0x3a0(%rsp)
jne 0x79ac
leaq 0x4d8(%rsp), %rdi
callq 0x5310
cmpq $0x0, %rax
jne 0x7990
leaq 0x4d8(%rsp), %rdi
leaq 0x460(%rsp), %rsi
callq 0x5050
jmp 0x78f0
movq 0x7d6d1(%rip), %rdi     # 0x84fc8
leaq 0x5ecff(%rip), %rsi     # 0x665fd
callq 0x5460
movq %rax, 0x1e0(%rsp)
jmp 0x790d
movq 0x1e0(%rsp), %rdi
leaq 0x460(%rsp), %rsi
callq 0x53e0
movq %rax, 0x1d8(%rsp)
jmp 0x792c
movq 0x1d8(%rsp), %rdi
movq 0x7d675(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x7942
movq 0x7d67f(%rip), %rdi     # 0x84fc8
leaq 0x5ebd0(%rip), %rsi     # 0x66520
callq 0x5460
movq %rax, 0x1d0(%rsp)
jmp 0x795f
movq 0x1d0(%rsp), %rdi
movq 0x7d642(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x7975
jmp 0x7990
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x828(%rsp)
movl %eax, 0x824(%rsp)
jmp 0x8295
movq 0x558(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x558(%rsp)
movb $0x0, 0x39f(%rsp)
movq 0x3a0(%rsp), %rax
incq %rax
movq %rax, 0x3a0(%rsp)
leaq 0x36f(%rsp), %rdi
movq %rdi, 0x1c8(%rsp)
callq 0x57c0
movq 0x1c8(%rsp), %rdx
leaq 0x5ec5d(%rip), %rsi     # 0x66640
leaq 0x370(%rsp), %rdi
callq 0x6880
jmp 0x79f2
leaq 0x36f(%rsp), %rdi
callq 0x54d0
testb $0x1, 0x39f(%rsp)
je 0x7aeb
movq 0x3a0(%rsp), %rdx
leaq 0x460(%rsp), %rdi
leaq 0x6316f(%rip), %rsi     # 0x6ab93
callq 0x5870
movq %rax, 0x390(%rsp)
cmpq $-0x1, 0x390(%rsp)
jne 0x7a79
leaq 0x460(%rsp), %rdi
callq 0x5310
movq %rax, 0x390(%rsp)
jmp 0x7a79
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x828(%rsp)
movl %eax, 0x824(%rsp)
leaq 0x36f(%rsp), %rdi
callq 0x54d0
jmp 0x8295
movq 0x3a0(%rsp), %rax
movq %rax, %rdx
addq $0x5, %rdx
movq 0x390(%rsp), %rcx
subq %rax, %rcx
addq $-0x5, %rcx
leaq 0x348(%rsp), %rdi
leaq 0x460(%rsp), %rsi
callq 0x5490
jmp 0x7aae
leaq 0x370(%rsp), %rdi
leaq 0x348(%rsp), %rsi
callq 0x5550
leaq 0x348(%rsp), %rdi
callq 0x58b8
jmp 0x7aeb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x828(%rsp)
movl %eax, 0x824(%rsp)
jmp 0x8288
leaq 0x448(%rsp), %rdi
movl $0x1, %esi
callq 0x88f0
movq %rax, %rdi
callq 0x51d0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x55f0
movl %eax, 0x344(%rsp)
cmpl $0xff, 0x344(%rsp)
jle 0x7c04
movq 0x550(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x550(%rsp)
leaq 0x4b0(%rsp), %rdi
callq 0x5310
cmpq $0x0, %rax
jne 0x7bf4
leaq 0x4b0(%rsp), %rdi
leaq 0x460(%rsp), %rsi
callq 0x5050
jmp 0x7b6d
movq 0x7d454(%rip), %rdi     # 0x84fc8
leaq 0x5eac8(%rip), %rsi     # 0x66643
callq 0x5460
movq %rax, 0x1c0(%rsp)
jmp 0x7b8a
movq 0x1c0(%rsp), %rdi
leaq 0x460(%rsp), %rsi
callq 0x53e0
movq %rax, 0x1b8(%rsp)
jmp 0x7ba9
movq 0x1b8(%rsp), %rdi
movq 0x7d3f8(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x7bbf
movq 0x7d402(%rip), %rdi     # 0x84fc8
leaq 0x5e953(%rip), %rsi     # 0x66520
callq 0x5460
movq %rax, 0x1b0(%rsp)
jmp 0x7bdc
movq 0x1b0(%rsp), %rdi
movq 0x7d3c5(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x7bf2
jmp 0x7bf4
movl $0x2, 0x584(%rsp)
jmp 0x8230
leaq 0x31f(%rsp), %rdi
movq %rdi, 0x1a8(%rsp)
callq 0x57c0
movq 0x1a8(%rsp), %rdx
leaq 0x5ea82(%rip), %rsi     # 0x666aa
leaq 0x320(%rsp), %rdi
callq 0x6880
jmp 0x7c37
leaq 0x31f(%rsp), %rdi
callq 0x54d0
movl 0x344(%rsp), %eax
andl $0x40, %eax
cmpl $0x40, %eax
jne 0x7cbe
movl 0x344(%rsp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
jne 0x7cbe
leaq 0x5ea41(%rip), %rsi     # 0x666ac
leaq 0x320(%rsp), %rdi
callq 0x55d0
jmp 0x7c7a
jmp 0x7e11
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x828(%rsp)
movl %eax, 0x824(%rsp)
leaq 0x31f(%rsp), %rdi
callq 0x54d0
jmp 0x8288
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x828(%rsp)
movl %eax, 0x824(%rsp)
jmp 0x827b
movl 0x344(%rsp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
jne 0x7cfb
movl 0x344(%rsp), %eax
andl $0x80, %eax
cmpl $0x80, %eax
jne 0x7cfb
leaq 0x5e9c8(%rip), %rsi     # 0x666af
leaq 0x320(%rsp), %rdi
callq 0x55d0
jmp 0x7cf6
jmp 0x7e0f
leaq 0x5e9b0(%rip), %rsi     # 0x666b2
leaq 0x320(%rsp), %rdi
callq 0x55d0
jmp 0x7d11
movq 0x7d2b0(%rip), %rdi     # 0x84fc8
leaq 0x5e996(%rip), %rsi     # 0x666b5
callq 0x5460
movq %rax, 0x1a0(%rsp)
jmp 0x7d2e
movq 0x1a0(%rsp), %rdi
movl 0x344(%rsp), %esi
callq 0x5790
movq %rax, 0x198(%rsp)
jmp 0x7d4c
movq 0x198(%rsp), %rdi
movq 0x7d255(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x7d62
movq 0x7d25f(%rip), %rdi     # 0x84fc8
leaq 0x5e951(%rip), %rsi     # 0x666c1
callq 0x5460
movq %rax, 0x190(%rsp)
jmp 0x7d7f
movq 0x190(%rsp), %rdi
movl 0x344(%rsp), %esi
andl $0x40, %esi
callq 0x5790
movq %rax, 0x188(%rsp)
jmp 0x7da0
movq 0x188(%rsp), %rdi
movq 0x7d201(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x7db6
movq 0x7d20b(%rip), %rdi     # 0x84fc8
leaq 0x5e919(%rip), %rsi     # 0x666dd
callq 0x5460
movq %rax, 0x180(%rsp)
jmp 0x7dd3
movq 0x180(%rsp), %rdi
movl 0x344(%rsp), %esi
andl $0x80, %esi
callq 0x5790
movq %rax, 0x178(%rsp)
jmp 0x7df7
movq 0x178(%rsp), %rdi
movq 0x7d1aa(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x7e0d
jmp 0x7e0f
jmp 0x7e11
leaq 0x2f7(%rsp), %rdi
movq %rdi, 0x170(%rsp)
callq 0x57c0
movq 0x170(%rsp), %rdx
leaq 0x5e8c4(%rip), %rsi     # 0x666f9
leaq 0x2f8(%rsp), %rdi
callq 0x6880
jmp 0x7e44
leaq 0x2f7(%rsp), %rdi
callq 0x54d0
movl 0x344(%rsp), %eax
andl $0x10, %eax
cmpl $0x10, %eax
jne 0x7eb7
leaq 0x5e893(%rip), %rsi     # 0x666fa
leaq 0x2f8(%rsp), %rdi
callq 0x55d0
jmp 0x7e76
jmp 0x7eb7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x828(%rsp)
movl %eax, 0x824(%rsp)
leaq 0x2f7(%rsp), %rdi
callq 0x54d0
jmp 0x827b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x828(%rsp)
movl %eax, 0x824(%rsp)
jmp 0x826e
leaq 0x710(%rsp), %rax
movq %rax, 0x160(%rsp)
leaq 0x448(%rsp), %rdi
movl $0x2, %esi
callq 0x88f0
movq 0x160(%rsp), %rdi
movq %rax, %rsi
callq 0x53e0
movq %rax, 0x168(%rsp)
jmp 0x7ef3
movq 0x168(%rsp), %rdi
leaq 0x62c91(%rip), %rsi     # 0x6ab93
callq 0x5460
movq %rax, 0x158(%rsp)
jmp 0x7f11
leaq 0x448(%rsp), %rdi
movl $0x3, %esi
callq 0x88f0
movq 0x158(%rsp), %rdi
movq %rax, %rsi
callq 0x53e0
movq %rax, 0x150(%rsp)
jmp 0x7f3d
movq 0x150(%rsp), %rdi
leaq 0x62c47(%rip), %rsi     # 0x6ab93
callq 0x5460
movq %rax, 0x148(%rsp)
jmp 0x7f5b
leaq 0x448(%rsp), %rdi
movl $0x5, %esi
callq 0x88f0
movq 0x148(%rsp), %rdi
movq %rax, %rsi
callq 0x53e0
movq %rax, 0x140(%rsp)
jmp 0x7f87
movq 0x140(%rsp), %rdi
leaq 0x62bfd(%rip), %rsi     # 0x6ab93
callq 0x5460
movq %rax, 0x138(%rsp)
jmp 0x7fa5
leaq 0x3a8(%rsp), %rdi
movq %rdi, 0x130(%rsp)
callq 0x5310
movq 0x130(%rsp), %rsi
movq %rax, %rcx
addq $-0x7, %rcx
leaq 0x2d0(%rsp), %rdi
movl $0x5, %edx
callq 0x5490
jmp 0x7fdd
movq 0x138(%rsp), %rdi
leaq 0x2d0(%rsp), %rsi
callq 0x53e0
movq %rax, 0x128(%rsp)
jmp 0x7ffc
movq 0x128(%rsp), %rdi
leaq 0x62b88(%rip), %rsi     # 0x6ab93
callq 0x5460
movq %rax, 0x120(%rsp)
jmp 0x801a
movq 0x120(%rsp), %rdi
leaq 0x370(%rsp), %rsi
callq 0x53e0
movq %rax, 0x118(%rsp)
jmp 0x8039
movq 0x118(%rsp), %rdi
leaq 0x62b4b(%rip), %rsi     # 0x6ab93
callq 0x5460
movq %rax, 0x110(%rsp)
jmp 0x8057
movq 0x110(%rsp), %rdi
leaq 0x320(%rsp), %rsi
callq 0x53e0
movq %rax, 0x108(%rsp)
jmp 0x8076
movq 0x108(%rsp), %rdi
leaq 0x5e576(%rip), %rsi     # 0x665fb
callq 0x5460
movq %rax, 0x100(%rsp)
jmp 0x8094
leaq 0x448(%rsp), %rdi
movl $0x1, %esi
callq 0x88f0
movq 0x100(%rsp), %rdi
movq %rax, %rsi
callq 0x53e0
movq %rax, 0xf8(%rsp)
jmp 0x80c0
movq 0xf8(%rsp), %rdi
leaq 0x62ac4(%rip), %rsi     # 0x6ab93
callq 0x5460
movq %rax, 0xf0(%rsp)
jmp 0x80de
movq 0xf0(%rsp), %rdi
leaq 0x2f8(%rsp), %rsi
callq 0x53e0
movq %rax, 0xe8(%rsp)
jmp 0x80fd
movq 0xe8(%rsp), %rdi
leaq 0x62a87(%rip), %rsi     # 0x6ab93
callq 0x5460
movq %rax, 0xe0(%rsp)
jmp 0x811b
xorl %eax, %eax
movl %eax, %esi
leaq 0x448(%rsp), %rdi
callq 0x88f0
movq 0xe0(%rsp), %rdi
movq %rax, %rsi
callq 0x53e0
movq %rax, 0xd8(%rsp)
jmp 0x8146
movq 0xd8(%rsp), %rdi
leaq 0x62a3e(%rip), %rsi     # 0x6ab93
callq 0x5460
movq %rax, 0xd0(%rsp)
jmp 0x8164
leaq 0x448(%rsp), %rdi
movl $0x7, %esi
callq 0x88f0
movq 0xd0(%rsp), %rdi
movq %rax, %rsi
callq 0x53e0
movq %rax, 0xc8(%rsp)
jmp 0x8190
movq 0xc8(%rsp), %rdi
movq 0x7ce11(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x81a6
leaq 0x2d0(%rsp), %rdi
callq 0x58b8
movq 0x570(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x570(%rsp)
testb $0x1, 0x486(%rsp)
jne 0x81fe
movb $0x1, 0x486(%rsp)
jmp 0x81fe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x828(%rsp)
movl %eax, 0x824(%rsp)
leaq 0x2d0(%rsp), %rdi
callq 0x58b8
jmp 0x826e
leaq 0x460(%rsp), %rdi
callq 0x55b0
leaq 0x2f8(%rsp), %rdi
callq 0x58b8
leaq 0x320(%rsp), %rdi
callq 0x58b8
movl $0x0, 0x584(%rsp)
leaq 0x370(%rsp), %rdi
callq 0x58b8
leaq 0x3a8(%rsp), %rdi
callq 0x58b8
leaq 0x448(%rsp), %rdi
callq 0x8910
movl 0x584(%rsp), %eax
testl %eax, %eax
je 0x8269
jmp 0x8264
jmp 0x701d
jmp 0x701d
leaq 0x2f8(%rsp), %rdi
callq 0x58b8
leaq 0x320(%rsp), %rdi
callq 0x58b8
leaq 0x370(%rsp), %rdi
callq 0x58b8
leaq 0x3a8(%rsp), %rdi
callq 0x58b8
leaq 0x448(%rsp), %rdi
callq 0x8910
jmp 0x86b0
leaq 0x588(%rsp), %rdi
callq 0x65264
jmp 0x82c3
cmpq $0x0, 0x568(%rsp)
jbe 0x8340
movq 0x7ccf3(%rip), %rdi     # 0x84fc8
leaq 0x5e421(%rip), %rsi     # 0x666fd
callq 0x5460
movq %rax, 0xc0(%rsp)
jmp 0x82eb
movq 0xc0(%rsp), %rdi
movq 0x568(%rsp), %rsi
callq 0x50f0
movq %rax, 0xb8(%rsp)
jmp 0x830a
movq 0xb8(%rsp), %rdi
leaq 0x5e3fb(%rip), %rsi     # 0x66714
callq 0x5460
movq %rax, 0xb0(%rsp)
jmp 0x8328
movq 0xb0(%rsp), %rdi
movq 0x7cc79(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x833e
jmp 0x8340
cmpq $0x0, 0x560(%rsp)
jbe 0x83bd
movq 0x7cc76(%rip), %rdi     # 0x84fc8
leaq 0x5e3a4(%rip), %rsi     # 0x666fd
callq 0x5460
movq %rax, 0xa8(%rsp)
jmp 0x8368
movq 0xa8(%rsp), %rdi
movq 0x560(%rsp), %rsi
callq 0x50f0
movq %rax, 0xa0(%rsp)
jmp 0x8387
movq 0xa0(%rsp), %rdi
leaq 0x5e3a5(%rip), %rsi     # 0x6673b
callq 0x5460
movq %rax, 0x98(%rsp)
jmp 0x83a5
movq 0x98(%rsp), %rdi
movq 0x7cbfc(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x83bb
jmp 0x83bd
cmpq $0x0, 0x558(%rsp)
jbe 0x843a
movq 0x7cbf9(%rip), %rdi     # 0x84fc8
leaq 0x5e327(%rip), %rsi     # 0x666fd
callq 0x5460
movq %rax, 0x90(%rsp)
jmp 0x83e5
movq 0x90(%rsp), %rdi
movq 0x558(%rsp), %rsi
callq 0x50f0
movq %rax, 0x88(%rsp)
jmp 0x8404
movq 0x88(%rsp), %rdi
leaq 0x5e35a(%rip), %rsi     # 0x6676d
callq 0x5460
movq %rax, 0x80(%rsp)
jmp 0x8422
movq 0x80(%rsp), %rdi
movq 0x7cb7f(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x8438
jmp 0x843a
cmpq $0x0, 0x550(%rsp)
jbe 0x84bd
movq 0x7cb7c(%rip), %rdi     # 0x84fc8
leaq 0x5e2aa(%rip), %rsi     # 0x666fd
callq 0x5460
movq %rax, 0x78(%rsp)
jmp 0x845f
movq 0x78(%rsp), %rdi
movq 0x550(%rsp), %rsi
callq 0x50f0
movq %rax, 0x70(%rsp)
jmp 0x8478
movq 0x70(%rsp), %rdi
leaq 0x5e310(%rip), %rsi     # 0x66794
callq 0x5460
movq %rax, 0x68(%rsp)
jmp 0x8490
movq 0x68(%rsp), %rdi
leaq 0x5e32c(%rip), %rsi     # 0x667c8
callq 0x5460
movq %rax, 0x60(%rsp)
jmp 0x84a8
movq 0x60(%rsp), %rdi
movq 0x7cafc(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x84bb
jmp 0x84bd
cmpq $0x0, 0x548(%rsp)
jbe 0x8528
movq 0x7caf9(%rip), %rdi     # 0x84fc8
leaq 0x5e227(%rip), %rsi     # 0x666fd
callq 0x5460
movq %rax, 0x58(%rsp)
jmp 0x84e2
movq 0x58(%rsp), %rdi
movq 0x548(%rsp), %rsi
callq 0x50f0
movq %rax, 0x50(%rsp)
jmp 0x84fb
movq 0x50(%rsp), %rdi
leaq 0x5e2e3(%rip), %rsi     # 0x667ea
callq 0x5460
movq %rax, 0x48(%rsp)
jmp 0x8513
movq 0x48(%rsp), %rdi
movq 0x7ca91(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x8526
jmp 0x8528
movq 0x7ca99(%rip), %rdi     # 0x84fc8
leaq 0x5e303(%rip), %rsi     # 0x66839
callq 0x5460
movq %rax, 0x40(%rsp)
jmp 0x8542
movq 0x40(%rsp), %rdi
movq 0x578(%rsp), %rsi
callq 0x50f0
movq %rax, 0x38(%rsp)
jmp 0x855b
movq 0x38(%rsp), %rdi
leaq 0x5e2e5(%rip), %rsi     # 0x6684c
callq 0x5460
movq %rax, 0x30(%rsp)
jmp 0x8573
movq 0x30(%rsp), %rdi
movq 0x570(%rsp), %rsi
callq 0x50f0
movq %rax, 0x28(%rsp)
jmp 0x858c
movq 0x28(%rsp), %rdi
leaq 0x5e2d0(%rip), %rsi     # 0x66868
callq 0x5460
movq %rax, 0x20(%rsp)
jmp 0x85a4
movq 0x20(%rsp), %rdi
movq 0x7ca00(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x85b7
movq 0x7ca0a(%rip), %rdi     # 0x84fc8
leaq 0x5e2c1(%rip), %rsi     # 0x66886
callq 0x5460
movq %rax, 0x18(%rsp)
jmp 0x85d1
callq 0x52e0
movq 0x18(%rsp), %rdi
movq 0x880(%rsp), %rcx
subq %rcx, %rax
cvtsi2ss %rax, %xmm0
movss 0x5dd99(%rip), %xmm1    # 0x6638c
divss %xmm1, %xmm0
callq 0x5340
movq %rax, 0x10(%rsp)
jmp 0x8603
movq 0x10(%rsp), %rdi
leaq 0x5e2a8(%rip), %rsi     # 0x668b7
callq 0x5460
movq %rax, 0x8(%rsp)
jmp 0x861b
movq 0x8(%rsp), %rdi
movq 0x7c989(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x862e
testb $0x1, 0x486(%rsp)
jne 0x864d
movb $0x0, 0x897(%rsp)
movl $0x1, 0x584(%rsp)
jmp 0x8660
movb $0x1, 0x897(%rsp)
movl $0x1, 0x584(%rsp)
leaq 0x460(%rsp), %rdi
callq 0x58b8
leaq 0x488(%rsp), %rdi
callq 0x58b8
leaq 0x4b0(%rsp), %rdi
callq 0x58b8
leaq 0x4d8(%rsp), %rdi
callq 0x58b8
leaq 0x500(%rsp), %rdi
callq 0x58b8
leaq 0x528(%rsp), %rdi
callq 0x58b8
jmp 0x8700
leaq 0x460(%rsp), %rdi
callq 0x58b8
leaq 0x488(%rsp), %rdi
callq 0x58b8
leaq 0x4b0(%rsp), %rdi
callq 0x58b8
leaq 0x4d8(%rsp), %rdi
callq 0x58b8
leaq 0x500(%rsp), %rdi
callq 0x58b8
leaq 0x528(%rsp), %rdi
callq 0x58b8
jmp 0x871c
leaq 0x588(%rsp), %rdi
callq 0x8970
leaq 0x858(%rsp), %rdi
callq 0x58b8
jmp 0x8738
leaq 0x588(%rsp), %rdi
callq 0x8970
leaq 0x858(%rsp), %rdi
callq 0x58b8
jmp 0x8749
movb 0x897(%rsp), %al
andb $0x1, %al
addq $0x898, %rsp            # imm = 0x898
retq
movq 0x828(%rsp), %rdi
callq 0x57b0
nopw %cs:(%rax,%rax)