// File: /workspace/github_cpp_makefile_star2_O3/millanek[P]evo/evo_findDiscordantPairs.cpp
// Function: DiscordPairsMain(int, char**)
int DiscordPairsMain(int argc, char** argv) {
    parseDiscordPairsOptions(argc, argv);
    string line; // for reading the input files
    
    std::istream* hetsFile = createReader(opt::hetsFile.c_str());
    std::ifstream* pairtoolsFile = new std::ifstream(opt::pairtoolsFile.c_str());
    std::ifstream* samFile = new std::ifstream(opt::samFile.c_str());
    
    std::ofstream* phaseSwitchFile = new std::ofstream("switches" + opt::runName + ".txt");
    std::ofstream* goodReadPairsFile = new std::ofstream("goodReadPairs" + opt::runName + ".txt");
    
    std::map<int,PhaseInfo*> positionToPhase;
    std::map<string,std::vector<int>> infoPairNameToPos;
    std::map<string,std::vector<string>> infoPairNameToStrands;
    
    std::map<string,std::vector<RecombRead*>> samNameToReads;
    int numHetPairs = 0;
    std::unordered_map<string, ReadLinkSNPpair*> SNPpairs;
    
    if (opt::hapcutFormat) {
        int blockNum = 0;
        // Parse the Hapcut blocks file
        while (getline(*hetsFile, line)) {
            if (line[0] == '*') {
            
            } else if (line[0] == 'B' && line[1] == 'L') { // New block - should in the future separate the hets by blocks
                blockNum++;
            } else {
                std::vector<string> phasedSNPdetails = split(line, '\t');
                int snpPos = atoi(phasedSNPdetails[4].c_str());
                int H1phase = atoi(phasedSNPdetails[1].c_str());
                int H2phase = atoi(phasedSNPdetails[2].c_str());
                //std::cout << "line: " << line << std::endl;
                // std::cout << "phasedSNPdetails[5]: " << phasedSNPdetails[5] << std::endl;
                assert(phasedSNPdetails[5].length() == 1); assert(phasedSNPdetails[6].length() == 1);
                char refBase = phasedSNPdetails[5][0];
                char altBase = phasedSNPdetails[6][0];
                double phaseQual = stringToDouble(phasedSNPdetails[10].c_str());
                int snpCoverage = atoi(phasedSNPdetails[11].c_str());
                std::vector<char> phasedVars;
                if (H1phase == 0 && H2phase == 1) {
                    phasedVars.push_back(refBase); phasedVars.push_back(altBase);
                } else if (H1phase == 1 && H2phase == 0) {
                    phasedVars.push_back(altBase); phasedVars.push_back(refBase);
                } else{
                    continue;
                }
                PhaseInfo* thisPhase = new PhaseInfo(snpPos,phaseQual,snpCoverage, phasedVars,blockNum);
                positionToPhase[snpPos] = thisPhase;
            }
        }
    } else {
        while (getline(*hetsFile, line)) {
            std::vector<string> phasedSNPdetails = split(line, '\t');
            int snpPos = atoi(phasedSNPdetails[1].c_str());
            assert(phasedSNPdetails[2].length() == 1); assert(phasedSNPdetails[3].length() == 1);
            char refBase = phasedSNPdetails[2][0];
            char altBase = phasedSNPdetails[3][0];
            
            std::vector<char> phasedVars;
            phasedVars.push_back(refBase); phasedVars.push_back(altBase);
            double phaseQual = 0; int snpCoverage = 0;
            PhaseInfo* thisPhase = new PhaseInfo(snpPos,phaseQual,snpCoverage, phasedVars,1);
            positionToPhase[snpPos] = thisPhase;
        }
        numHetPairs = nChoosek((int)positionToPhase.size(),2);
    }
    
    
    
    // Now parse the pairtools file to record the exact readpairs
    while (getline(*pairtoolsFile,line)) {
        // std::cerr << line << std::endl;
        std::vector<string> pairVec = split(line, '\t'); assert(pairVec.size() == 8);
        
        string pairName = pairVec[0];
        int pair1pos = atoi(pairVec[2].c_str());
        int pair2pos = atoi(pairVec[4].c_str());
        std::vector<int> bothPos; bothPos.push_back(pair1pos); bothPos.push_back(pair2pos);
        infoPairNameToPos[pairName] = bothPos;
        
        string pair1strand = pairVec[5];
        string pair2strand = pairVec[6];
        std::vector<string> bothStrands; bothStrands.push_back(pair1strand); bothStrands.push_back(pair1strand);
        infoPairNameToStrands[pairName] = bothStrands;
    }
    
    
    // Now parse the samtools file to find reads that match records from the pairstools file
    // and therefore  can be informative about the phasing and recombination
    while (getline(*samFile,line)) {
        // std::cerr << line << std::endl;
        std::vector<string> samRecVec = split(line, '\t'); //assert(pairVec.size() == 8);
        int flag = atoi(samRecVec[1].c_str());
        if (flag > 2000) continue;
        
        RecombRead* thisRead = new RecombRead(samRecVec);
        
        int CIGARlengthTotal = vector_sum(thisRead->GIGARnumsNoSI);
        //std::cout << "thisRead->CIGAR: " << thisRead->CIGAR << std::endl;
        // print_vector(thisRead->GIGARnums, std::cout);
        //std::cout << "CIGARlengthTotal: " << CIGARlengthTotal << std::endl;
        
        
        int adjusted5pReadPos;
        if (thisRead->readStrand == "-") {
            adjusted5pReadPos = thisRead->readPos + CIGARlengthTotal - 1;
        } else {
            adjusted5pReadPos = thisRead->readPos;
        }
        thisRead->adjustedReadPos = adjusted5pReadPos;
        
        string readSeq; string readQual;
        if(infoPairNameToPos.count(thisRead->readName) != 1) {
            std::cerr << "Not in info pair file: " << thisRead->readName << std::endl;
        } else {
            if (thisRead->MQ > opt::minMQ) {
                std::vector<int> pairPosVec = infoPairNameToPos.at(thisRead->readName);
                if (adjusted5pReadPos == pairPosVec[0] || adjusted5pReadPos == pairPosVec[1]) {
                    samNameToReads[thisRead->readName].push_back(thisRead);
                   // std::cout << "Good" << std::endl;
                } else {
                   /* std::cout << "Bad" << "\t" << adjusted5pReadPos << "\t" << pairPosVec[0] << "\t" << pairPosVec[1] << std::endl;
                    std::cout << "CIGAR: " << thisRead->CIGAR << std::endl;
                    print_vector(thisRead->GIGARnums, std::cout);
                    std::cout << "CIGARlengthTotal: " << CIGARlengthTotal << std::endl;
                    std::cout << "readStrand: " << thisRead->readStrand << std::endl; */
                }
            }
        }
    }
    
    int goodPairs = 0;
    std::vector<RecombReadPair*> goodReadPairs; goodReadPairs.reserve(samNameToReads.size());
    for (std::map<string,std::vector<RecombRead*>>::iterator it = samNameToReads.begin(); it != samNameToReads.end(); it++) {
        if (it->second.size() == 2) {
            goodPairs++;
            RecombReadPair* thisReadPair = new RecombReadPair(it->second[0], it->second[1]);
            goodReadPairs.push_back(thisReadPair);
        } else {
            // std::cout << "it->second.size(): " << it->second.size() << std::endl;
        }
    }
    std::sort(goodReadPairs.begin(), goodReadPairs.end());
    
    
    
    int numConcordant = 0; int numDiscordant = 0;
    int numMatch = 0; int numMismatch = 0;
    std::vector<double> matchBaseScores; std::vector<double> mismatchBaseScores;
    std::vector<double> concordantBaseScores; std::vector<double> discordantBaseScores;
    std::vector<PhaseSwitch*> phaseSwitches;
    
    int numFullLenghtReadPairs = 0;
    int totalUsedLength = 0;
    std::vector<int> numHets;
    int num0het = 0; int num1het = 0; int num2plusHets = 0;
    
    for (int r = 0; r < goodReadPairs.size(); r++) {
        
        goodReadPairs[r]->findAndCombinePairHets(positionToPhase);
        goodReadPairs[r]->filterHetsByQuality(opt::minBQ);
        
        if (goodReadPairs[r]->hetSites.size() == 0) {
            num0het++;
           /* std::cout << "goodReadPairs[r]->hetSites.size(): " << goodReadPairs[r]->hetSites.size() << std::endl;
            std::cout << "goodReadPairs[r]->read1->readPos: " << goodReadPairs[r]->read1->readPos << std::endl;
            std::cout << "goodReadPairs[r]->read1->readStrand: " << goodReadPairs[r]->read1->readStrand << std::endl;
            std::cout << "goodReadPairs[r]->read1->usedLength: " << goodReadPairs[r]->read1->usedLength << std::endl;
            std::cout << "goodReadPairs[r]->read1->adjustedReadPos: " << goodReadPairs[r]->read1->adjustedReadPos << std::endl;
            std::cout << "goodReadPairs[r]->read1->CIGAR: " << goodReadPairs[r]->read1->CIGAR << std::endl;
            std::cout << "goodReadPairs[r]->read2->readPos: " << goodReadPairs[r]->read2->readPos << std::endl;
            std::cout << "goodReadPairs[r]->read2->readStrand: " << goodReadPairs[r]->read2->readStrand << std::endl;
            std::cout << "goodReadPairs[r]->read2->usedLength: " << goodReadPairs[r]->read2->usedLength << std::endl;
            std::cout << "goodReadPairs[r]->read2->adjustedReadPos: " << goodReadPairs[r]->read2->adjustedReadPos << std::endl;
            std::cout << "goodReadPairs[r]->read2->CIGAR: " << goodReadPairs[r]->read2->CIGAR << std::endl;
            std::cout <<  std::endl;
            //std::cout << "goodReadPairs[r]->read2->readStrand: " << goodReadPairs[r]->read1-> << std::endl; */
        } else if (goodReadPairs[r]->hetSites.size() == 1) {
            num1het++;
        } else {
            num2plusHets++;
            if(goodReadPairs[r]->read1->hetSites.size() >= 1 && goodReadPairs[r]->read2->hetSites.size() >= 1) {
                *goodReadPairsFile << goodReadPairs[r]->read1->readPos << "\t" << goodReadPairs[r]->read2->readPos << std::endl;
            }
        }
        
        /* Just debug
         if (goodReadPairs[r]->read1->CIGAR == "151M" && goodReadPairs[r]->read2->CIGAR == "151M") {
            numFullLenghtReadPairs++;
        } */
        
        totalUsedLength = totalUsedLength + goodReadPairs[r]->read1->usedLength;
        totalUsedLength = totalUsedLength + goodReadPairs[r]->read2->usedLength;
        
    }
    
    std::cout << "goodReadPairs.size(): " << goodReadPairs.size() << std::endl;
    std::cout << "num0het: " << num0het << std::endl;
    std::cout << "num1het: " << num1het << std::endl;
    std::cout << "num2plusHets: " << num2plusHets << std::endl;
    
    if (opt::hapcutFormat) {
        
        for (int r = 0; r < goodReadPairs.size(); r++) {
           for (int i = 0; i < goodReadPairs[r]->hetSites.size(); i++) {
                HetInfo* thisHet = goodReadPairs[r]->hetSites[i];
                if (thisHet->readPhaseBaseMismatch) {
                    /*  std::cout << "Bases don't match" << std::endl;
                      std::cout << "sequence: " << thisRead->readSeq << std::endl;
                      std::cout << "readBase: " << thisRead->readSeq[i-1] << "[" << readBase << "]" << thisRead->readSeq[i+1] << std::endl;
                      std::cout << "readQual[i]: " << thisRead->readQual[i] << "; score: " << int(thisRead->readQual[i])-33 << std::endl;
                      std::cout << "readPos: " << thisRead->readPos << std::endl;
                      std::cout << "i: " << i << std::endl;
                      std::cout << "readPos + i: " << thisRead->readPos + i << std::endl;
                      std::cout << "phasedSNPbases[0]: " << phasedSNPbases[0] << std::endl;
                      std::cout << "phasedSNPbases[1]: " << phasedSNPbases[1] << std::endl; */
                    numMismatch++;
                    mismatchBaseScores.push_back(thisHet->thisBaseQuality);
                } else {
                    // std::cout << "Fine: " << std::endl;
                     matchBaseScores.push_back(thisHet->thisBaseQuality);
                     numMatch++;
                }
            }
            
            // Now consider all HiC pairs i that map to the chromosome and cover a het at each end - lets call the physical locations of the hets x_i, y_i ( x < y) and let Z_i = 1 if they are in phase, 0 if out of phase (recombined)
            
            // Prod_i ((1-Z_i)(G(y_i)-G(x_i)) + Z_i*(1 -(G(y_i)-G(x_i))
            
            
            
            if (goodReadPairs[r]->hetSites.size() > 1) {
                int phaseOfPrevious; int posOfPrevious; bool allConcordant = true;
                if (goodReadPairs[r]->hetSites[0]->thisBase == goodReadPairs[r]->hetSites[0]->thisHetPhase0) phaseOfPrevious = 0;
                if (goodReadPairs[r]->hetSites[0]->thisBase == goodReadPairs[r]->hetSites[0]->thisHetPhase1) phaseOfPrevious = 1;
                for (int i = 1; i < goodReadPairs[r]->hetSites.size(); i++) {
                    int phaseThis;
                    if (goodReadPairs[r]->hetSites[i]->thisBase == goodReadPairs[r]->hetSites[i]->thisHetPhase0) phaseThis = 0;
                    if (goodReadPairs[r]->hetSites[i]->thisBase == goodReadPairs[r]->hetSites[i]->thisHetPhase1) phaseThis = 1;
                    
                    if (phaseThis != phaseOfPrevious) {
                        allConcordant = false;
                        PhaseSwitch* thisSwitch = new PhaseSwitch(goodReadPairs[r]->hetSites[i-1]->pos, goodReadPairs[r]->hetSites[i]->pos, goodReadPairs[r]->hetSites[i-1]->thisPhaseQuality, goodReadPairs[r]->hetSites[i]->thisPhaseQuality);
                        phaseSwitches.push_back(thisSwitch);
                    }
                    posOfPrevious = goodReadPairs[r]->hetSites[i]->pos;
                    phaseOfPrevious = phaseThis;
                }
                if (allConcordant == false) numDiscordant++;
                else numConcordant++;
            }
        }
        std::cout << "numConcordant: " << numConcordant << std::endl;
        std::cout << "numDiscordant: " << numDiscordant << std::endl;
        
        std::cout << "numMatch: " << numMatch << std::endl;
        std::cout << "numMismatch: " << numMismatch << std::endl;
        std::cout << "Mean mismatchBaseScores: " << vector_average(mismatchBaseScores) << std::endl;
        std::cout << "Mean matchBaseScores: " << vector_average(matchBaseScores) << std::endl;
        
        for (int i = 0; i != phaseSwitches.size(); i++) {
            *phaseSwitchFile << phaseSwitches[i]->posLeft << "\t" << phaseSwitches[i]->posRight << "\t" << phaseSwitches[i]->dist << "\t" << phaseSwitches[i]->phaseQualLeft << "\t" << phaseSwitches[i]->phaseQualRight << std::endl;
        }
        
    } else {
        for (int r = 0; r < goodReadPairs.size(); r++) {
            if (goodReadPairs[r]->hetSites.size() > 1) {
                for (int i = 0; i < goodReadPairs[r]->hetSites.size() - 1; i++) {
                    for (int j = 1; j < goodReadPairs[r]->hetSites.size(); j++) {
                        char readBase1 = goodReadPairs[r]->hetSites[i]->thisBase;
                        char readBase2 = goodReadPairs[r]->hetSites[j]->thisBase;
                        int pos1 = goodReadPairs[r]->hetSites[i]->pos;
                        int pos2 = goodReadPairs[r]->hetSites[j]->pos;
                        string pairIndex = numToString(pos1)+"_"+numToString(pos2);
                        if (!SNPpairs.count(pairIndex)) {
                            SNPpairs[pairIndex] = new ReadLinkSNPpair(pos1,pos2,readBase1,readBase2);
                        } else {
                            SNPpairs[pairIndex]->base1.push_back(readBase1);
                            SNPpairs[pairIndex]->base1.push_back(readBase2);
                        }
                    }
                }
            }
        }
        std::cout << "SNPpairs.size(): " << SNPpairs.size() << std::endl;
        std::cout << "numFullLenghtReadPairs: " << numFullLenghtReadPairs << std::endl;
        std::cout << "totalUsedLength: " << totalUsedLength << std::endl;
        std::cout << "totalUsedLength/(goodReadPairs.size()*300): " << (double)totalUsedLength/(double)(goodReadPairs.size()*300) << std::endl;
    }
    
    return 0;
    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2d8, %rsp            # imm = 0x2D8
callq 0xc2071
leaq 0x1b8(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0x4444c(%rip), %rsi     # 0x1042f0
leaq 0x120(%rsp), %rdi
leaq 0x178(%rsp), %rdx
callq 0x287de
leaq 0x120(%rsp), %rdi
movl $0x8, %esi
callq 0x500af
movq %rax, %r13
leaq 0x130(%rsp), %rbx
movq -0x10(%rbx), %rdi
cmpq %rbx, %rdi
je 0xbfeef
movq 0x130(%rsp), %rsi
incq %rsi
callq 0x8480
movl $0x208, %edi            # imm = 0x208
callq 0x8470
movq %rax, %r15
movq 0x4442d(%rip), %rsi     # 0x104330
movq %rax, %rdi
movl $0x8, %edx
callq 0x8860
movl $0x208, %edi            # imm = 0x208
callq 0x8470
movq %rax, %r14
movq 0x443ec(%rip), %rsi     # 0x104310
movq %rax, %rdi
movl $0x8, %edx
callq 0x8860
movl $0x200, %edi            # imm = 0x200
callq 0x8470
movq %rax, 0x168(%rsp)
leaq 0x20a28(%rip), %rsi     # 0xe0972
leaq 0x443ff(%rip), %rdx     # 0x104350
leaq 0x178(%rsp), %rdi
callq 0x77736
leaq 0x1d1e0(%rip), %rsi     # 0xdd145
leaq 0x178(%rsp), %rdi
callq 0x88c0
movq %rbx, 0x120(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xbff9e
movq %rdx, 0x120(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x130(%rsp)
jmp 0xbffa6
movupd (%rcx), %xmm0
movupd %xmm0, (%rbx)
movq 0x8(%rax), %rdx
leaq 0x120(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x168(%rsp), %rdi
movl $0x10, %edx
callq 0x88d0
movq %r14, 0x70(%rsp)
movq 0x120(%rsp), %rdi
cmpq %rbx, %rdi
je 0xbfff9
movq 0x130(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x188(%rsp), %r14
movq -0x10(%r14), %rdi
cmpq %r14, %rdi
je 0xc001a
movq 0x188(%rsp), %rsi
incq %rsi
callq 0x8480
movl $0x200, %edi            # imm = 0x200
callq 0x8470
movq %rax, 0x160(%rsp)
leaq 0x20948(%rip), %rsi     # 0xe097b
leaq 0x44316(%rip), %rdx     # 0x104350
leaq 0x178(%rsp), %rdi
callq 0x77736
leaq 0x1d0f7(%rip), %rsi     # 0xdd145
leaq 0x178(%rsp), %rdi
callq 0x88c0
movq %rbx, 0x120(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xc0087
movq %rdx, 0x120(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x130(%rsp)
jmp 0xc008f
movupd (%rcx), %xmm0
movupd %xmm0, (%rbx)
movq 0x8(%rax), %rdx
leaq 0x120(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x160(%rsp), %rdi
movl $0x10, %edx
callq 0x88d0
movq 0x120(%rsp), %rdi
cmpq %rbx, %rdi
je 0xc00dd
movq 0x130(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x178(%rsp), %rdi
cmpq %r14, %rdi
je 0xc00fa
movq 0x188(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x180(%rsp), %rax
xorl %ecx, %ecx
movl %ecx, (%rax)
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
leaq 0x268(%rsp), %rax
movl %ecx, (%rax)
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
leaq 0x2b0(%rsp), %rax
movl %ecx, (%rax)
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
leaq 0x238(%rsp), %rax
movl %ecx, (%rax)
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq $0x0, 0x158(%rsp)
movq %rcx, 0x20(%rax)
leaq 0x150(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorpd %xmm0, %xmm0
movupd %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movupd %xmm0, -0x8(%rax)
cmpb $0x0, 0x441d0(%rip)     # 0x104370
movq %r15, 0x78(%rsp)
je 0xc041f
leaq 0x1a8(%rsp), %r14
leaq 0x50(%rsp), %rbp
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %edx
movq %r13, %rdi
movq %r14, %rsi
callq 0x8870
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0xc056d
movq 0x1a8(%rsp), %rax
movzbl (%rax), %ecx
cmpl $0x42, %ecx
je 0xc0204
cmpl $0x2a, %ecx
jne 0xc020e
jmp 0xc01b8
cmpb $0x4c, 0x1(%rax)
je 0xc037e
movq %rbp, %rbx
movq %rbp, %rdi
movq %r14, %rsi
movl $0x9, %edx
callq 0x4d650
movq 0x50(%rsp), %r15
movq 0x80(%r15), %rdi
callq 0x86e0
movl %eax, 0xc0(%rsp)
movq 0x20(%r15), %rdi
callq 0x86e0
movl %eax, %r12d
movq 0x40(%r15), %rdi
callq 0x86e0
cmpq $0x1, 0xa8(%r15)
jne 0xc1b59
cmpq $0x1, 0xc8(%r15)
jne 0xc1b62
movl %eax, %ebp
movq 0xa0(%r15), %rax
movb (%rax), %al
movb %al, 0x80(%rsp)
movq 0xc0(%r15), %rax
movb (%rax), %al
movb %al, 0x10(%rsp)
movq 0x140(%r15), %rsi
leaq 0x1f8(%rsp), %r15
movq %r15, %rdi
leaq 0x30(%rsp), %rdx
callq 0x287de
movq %r15, %rdi
callq 0x4d578
movsd %xmm0, 0x170(%rsp)
movq 0x1f8(%rsp), %rdi
leaq 0x208(%rsp), %rax
cmpq %rax, %rdi
je 0xc02db
movq 0x208(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x50(%rsp), %rax
movq 0x160(%rax), %rdi
callq 0x86e0
movl %eax, %r15d
xorpd %xmm0, %xmm0
movapd %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
movl %ebp, %eax
xorl $0x1, %eax
orl %r12d, %eax
je 0xc0325
xorl $0x1, %r12d
orl %ebp, %r12d
je 0xc034e
movq %rbx, %rbp
movq %rbx, %rdi
callq 0x2e784
jmp 0xc01b8
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
leaq 0x80(%rsp), %rdx
callq 0x6ea22
movq %rbx, %rbp
movq 0x38(%rsp), %rsi
cmpq 0x40(%rsp), %rsi
je 0xc0395
movb 0x10(%rsp), %al
jmp 0xc0375
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
leaq 0x10(%rsp), %rdx
callq 0x6ea22
movq %rbx, %rbp
movq 0x38(%rsp), %rsi
cmpq 0x40(%rsp), %rsi
je 0xc039c
movb 0x80(%rsp), %al
movb %al, (%rsi)
incq 0x38(%rsp)
jmp 0xc03ae
movq 0x158(%rsp), %rax
incl %eax
movq %rax, 0x158(%rsp)
jmp 0xc01b8
leaq 0x10(%rsp), %rdx
jmp 0xc03a4
leaq 0x80(%rsp), %rdx
leaq 0x30(%rsp), %rdi
callq 0x6ea22
movl $0x30, %edi
callq 0x8470
movq %rax, %r12
movl 0xc0(%rsp), %esi
movq %rax, %rdi
movsd 0x170(%rsp), %xmm0
movl %r15d, %edx
leaq 0x30(%rsp), %rcx
movq 0x158(%rsp), %r8
callq 0xc237e
leaq 0x178(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0xc23e0
movq %r12, (%rax)
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xc0412
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq %rbp, %rdi
callq 0x2e784
jmp 0xc01b8
leaq 0x1a8(%rsp), %rbx
leaq 0x50(%rsp), %r14
leaq 0x30(%rsp), %r15
leaq 0xc0(%rsp), %r12
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %edx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x8870
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0xc056d
movq %r14, %rdi
movq %rbx, %rsi
movl $0x9, %edx
callq 0x4d650
movq 0x50(%rsp), %rbp
movq 0x20(%rbp), %rdi
callq 0x86e0
movl %eax, 0xc0(%rsp)
cmpq $0x1, 0x48(%rbp)
jne 0xc1b3a
cmpq $0x1, 0x68(%rbp)
jne 0xc1b31
movq 0x40(%rbp), %rax
movb (%rax), %al
movb %al, 0x80(%rsp)
movq 0x60(%rbp), %rax
movb (%rax), %al
movb %al, 0x10(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
movq %r15, %rdi
xorl %esi, %esi
leaq 0x80(%rsp), %rdx
callq 0x6ea22
movq 0x38(%rsp), %rsi
cmpq 0x40(%rsp), %rsi
je 0xc04fe
movb 0x10(%rsp), %al
movb %al, (%rsi)
incq 0x38(%rsp)
jmp 0xc050b
movq %r15, %rdi
leaq 0x10(%rsp), %rdx
callq 0x6ea22
movl $0x30, %edi
callq 0x8470
movq %rax, %rbp
movl 0xc0(%rsp), %esi
xorpd %xmm0, %xmm0
movq %rax, %rdi
xorl %edx, %edx
movq %r15, %rcx
movl $0x1, %r8d
callq 0xc237e
leaq 0x178(%rsp), %rdi
movq %r12, %rsi
callq 0xc23e0
movq %rbp, (%rax)
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xc0560
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq %r14, %rdi
callq 0x2e784
jmp 0xc0439
leaq 0x1a8(%rsp), %rbx
leaq 0x50(%rsp), %r13
leaq 0x10(%rsp), %rbp
leaq 0x30(%rsp), %r15
leaq 0xe0(%rsp), %r12
movq 0x78(%rsp), %r14
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8870
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0xc07ea
leaq 0x80(%rsp), %rdi
movq %rbx, %rsi
movl $0x9, %edx
callq 0x4d650
movq 0x80(%rsp), %rax
movq 0x88(%rsp), %rcx
subq %rax, %rcx
cmpq $0x100, %rcx            # imm = 0x100
jne 0xc1b12
leaq 0x60(%rsp), %rcx
movq %rcx, 0x50(%rsp)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x2ba06
movq 0x80(%rsp), %r14
movq 0x40(%r14), %rdi
callq 0x86e0
movl %eax, 0x100(%rsp)
movq 0x80(%r14), %rdi
callq 0x86e0
movl %eax, 0xa0(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq %rbp, %rdi
xorl %esi, %esi
leaq 0x100(%rsp), %rdx
callq 0x48c2e
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0xc0686
movl 0xa0(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0xc0696
movq %rbp, %rdi
leaq 0xa0(%rsp), %rdx
callq 0x48c2e
leaq 0x260(%rsp), %rdi
movq %r13, %rsi
callq 0x46ebc
movq %rax, %rdi
movq %rbp, %rsi
callq 0x30ee4
movq 0x80(%rsp), %rax
leaq 0x40(%rsp), %rcx
movq %rcx, 0x30(%rsp)
movq 0xa0(%rax), %rsi
movq 0xa8(%rax), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x2ba06
movq 0x80(%rsp), %rax
leaq 0xd0(%rsp), %rcx
movq %rcx, 0xc0(%rsp)
movq 0xc0(%rax), %rsi
movq 0xc8(%rax), %rdx
addq %rsi, %rdx
leaq 0xc0(%rsp), %rdi
callq 0x2ba06
xorpd %xmm0, %xmm0
movapd %xmm0, 0xe0(%rsp)
movq $0x0, 0xf0(%rsp)
movq %r12, %rdi
movq %r15, %rsi
callq 0x3133c
movq %r12, %rdi
movq %r15, %rsi
callq 0x3133c
leaq 0x2a8(%rsp), %rdi
movq %r13, %rsi
callq 0x46fb4
movq %rax, %rdi
movq %r12, %rsi
callq 0x30550
movq %r12, %rdi
callq 0x2e784
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0xc0789
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0xc07a5
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xc07bc
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0xc07d8
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x80(%rsp), %rdi
callq 0x2e784
jmp 0xc058c
leaq 0x1a8(%rsp), %r12
leaq 0xc0(%rsp), %r13
leaq 0x290(%rsp), %rbp
xorl %ebx, %ebx
leaq 0x260(%rsp), %r14
movq 0x70(%rsp), %r15
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x8870
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0xc0ac7
movq %r13, %rdi
movq %r12, %rsi
movl $0x9, %edx
callq 0x4d650
movq 0xc0(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x86e0
cmpl $0x7d0, %eax            # imm = 0x7D0
jg 0xc0aba
movl $0x150, %edi            # imm = 0x150
callq 0x8470
movq %rax, %r15
movq %rbp, %rdi
movq %r13, %rsi
callq 0x2fc8e
movq %r15, %rdi
movq %rbp, %rsi
callq 0xc2446
movq %rbp, %rdi
callq 0x2e784
movq %r15, 0x10(%rsp)
addq $0xe8, %r15
leaq 0x218(%rsp), %rdi
movq %r15, %rsi
callq 0x32ee6
movq 0x218(%rsp), %rdi
movq 0x220(%rsp), %rcx
movq %rcx, %rax
subq %rdi, %rax
je 0xc0900
sarq $0x2, %rax
cmpq $0x1, %rax
adcq $0x0, %rax
xorpd %xmm0, %xmm0
xorl %ecx, %ecx
xorps %xmm1, %xmm1
cvtsi2sdl (%rdi,%rcx,4), %xmm1
addsd %xmm1, %xmm0
incq %rcx
cmpq %rcx, %rax
jne 0xc08e2
cvttsd2si %xmm0, %r15d
decl %r15d
jmp 0xc090b
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
testq %rcx, %rcx
je 0xc091b
movq 0x228(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0x10(%rsp), %rdi
addq $0x8, %rdi
leaq 0xc78d(%rip), %rsi      # 0xcd0b8
callq 0x8160
testl %eax, %eax
movq 0x10(%rsp), %rsi
cmovnel %ebx, %r15d
addl 0x48(%rsi), %r15d
movl %r15d, 0x4c(%rsi)
leaq 0x60(%rsp), %rax
movq %rax, 0x50(%rsp)
movq %rbx, 0x58(%rsp)
movb %bl, 0x60(%rsp)
leaq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
movq %rbx, 0x38(%rsp)
movb %bl, 0x40(%rsp)
addq $0x28, %rsi
movq %r14, %rdi
callq 0xc2dd2
leaq 0x268(%rsp), %rcx
cmpq %rcx, %rax
je 0xc09fb
movq 0x10(%rsp), %rsi
movl 0x90(%rsi), %eax
cmpl 0x41c5d(%rip), %eax     # 0x1025f0
jle 0xc0a82
addq $0x28, %rsi
movq %r14, %rdi
callq 0xc2738
leaq 0x80(%rsp), %rdi
movq %rax, %rsi
callq 0x32ee6
movq 0x80(%rsp), %rax
cmpl (%rax), %r15d
je 0xc09cc
cmpl 0x4(%rax), %r15d
jne 0xc0a65
movq 0x10(%rsp), %rsi
addq $0x28, %rsi
leaq 0x230(%rsp), %rdi
callq 0xc278c
movq 0x8(%rax), %rsi
cmpq 0x10(%rax), %rsi
je 0xc0a58
movq 0x10(%rsp), %rcx
movq %rcx, (%rsi)
addq $0x8, 0x8(%rax)
jmp 0xc0a65
movl $0x17, %edx
movq 0x415e1(%rip), %rdi     # 0x101fe8
leaq 0x20042(%rip), %rsi     # 0xe0a50
callq 0x84e0
movq 0x10(%rsp), %rax
movq 0x28(%rax), %rsi
movq 0x30(%rax), %rdx
movq 0x415c1(%rip), %rdi     # 0x101fe8
callq 0x84e0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %r15, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
jmp 0xc0a82
movq %rax, %rdi
leaq 0x10(%rsp), %rdx
callq 0xc31d6
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0xc0a82
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0xc0a9e
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0xc0aba
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x8480
movq %r13, %rdi
callq 0x2e784
jmp 0xc080c
xorpd %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
movapd %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x258(%rsp), %rsi
callq 0xc2808
movq 0x248(%rsp), %rbx
leaq 0x238(%rsp), %rax
cmpq %rax, %rbx
je 0xc0b98
leaq 0x10(%rsp), %r14
leaq 0x50(%rsp), %r15
movq 0x48(%rbx), %rax
subq 0x40(%rbx), %rax
cmpq $0x10, %rax
jne 0xc0b7c
movl $0x30, %edi
callq 0x8470
movq 0x40(%rbx), %rcx
movq (%rcx), %rdx
movq 0x8(%rcx), %rcx
xorpd %xmm0, %xmm0
movupd %xmm0, 0x18(%rax)
movq $0x0, 0x28(%rax)
cmpq %rcx, %rdx
movq %rcx, %rsi
cmovbq %rdx, %rsi
cmovbq %rcx, %rdx
movq %rsi, (%rax)
movq %rdx, 0x8(%rax)
movq %rax, 0x50(%rsp)
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0xc0b71
movq %rax, (%rsi)
addq $0x8, 0x18(%rsp)
jmp 0xc0b7c
movq %r14, %rdi
movq %r15, %rdx
callq 0xc332e
movq %rbx, %rdi
callq 0x8310
movq %rax, %rbx
leaq 0x238(%rsp), %rax
cmpq %rax, %rbx
jne 0xc0b0c
movq 0x10(%rsp), %r13
movq 0x18(%rsp), %rbx
cmpq %rbx, %r13
je 0xc0be0
movq %rbx, %rax
subq %r13, %rax
sarq $0x3, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r13, %rdi
movq %rbx, %rsi
callq 0xc344d
movq %r13, %rdi
movq %rbx, %rsi
callq 0xc3536
movq 0x10(%rsp), %r13
movq 0x18(%rsp), %rax
jmp 0xc0be3
movq %r13, %rax
xorpd %xmm0, %xmm0
movapd %xmm0, 0xe0(%rsp)
xorl %ecx, %ecx
movq %rcx, 0xf0(%rsp)
movq %rcx, 0x110(%rsp)
movapd %xmm0, 0x100(%rsp)
movq $0x0, 0x70(%rsp)
movq %rcx, 0xb0(%rsp)
movapd %xmm0, 0xa0(%rsp)
movl $0x0, %r14d
movl $0x0, %ebx
movl $0x0, %ebp
cmpq %r13, %rax
je 0xc0d7f
xorl %r12d, %r12d
leaq 0x178(%rsp), %r15
xorl %ebp, %ebp
xorl %ebx, %ebx
xorl %r14d, %r14d
movq $0x0, 0x70(%rsp)
movq (%r13,%r12,8), %rdi
movq %r15, %rsi
callq 0xc5078
movq 0x10(%rsp), %rax
movq (%rax,%r12,8), %rdi
movl 0x4197f(%rip), %esi     # 0x1025f4
callq 0xc5108
movq 0x10(%rsp), %r13
movq (%r13,%r12,8), %rax
movq 0x20(%rax), %rcx
subq 0x18(%rax), %rcx
sarq $0x3, %rcx
cmpq $0x1, %rcx
je 0xc0ca3
testq %rcx, %rcx
jne 0xc0caa
incl %r14d
jmp 0xc0d4a
incl %ebx
jmp 0xc0d4a
incl %ebp
movq (%rax), %rcx
movq 0x110(%rcx), %rdx
cmpq 0x108(%rcx), %rdx
je 0xc0d4a
movq 0x8(%rax), %rdx
movq 0x110(%rdx), %rsi
cmpq 0x108(%rdx), %rsi
je 0xc0d4a
movl 0x48(%rcx), %esi
movq 0x160(%rsp), %rdi
callq 0x8810
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
leaq 0xccd1(%rip), %rsi      # 0xcd9ca
callq 0x84e0
movq 0x10(%rsp), %rax
movq (%rax,%r12,8), %rax
movq 0x8(%rax), %rax
movl 0x48(%rax), %esi
movq %r13, %rdi
callq 0x8810
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %r13, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
movq 0x10(%rsp), %r13
movq (%r13,%r12,8), %rax
movq (%rax), %rcx
movq 0x70(%rsp), %rdx
addl 0x100(%rcx), %edx
movq 0x8(%rax), %rax
addl 0x100(%rax), %edx
movq %rdx, 0x70(%rsp)
incq %r12
movq 0x18(%rsp), %rax
subq %r13, %rax
sarq $0x3, %rax
cmpq %r12, %rax
ja 0xc0c59
movq 0x41232(%rip), %rdi     # 0x101fb8
leaq 0x1fcdb(%rip), %rsi     # 0xe0a68
movl $0x16, %edx
callq 0x84e0
movq 0x18(%rsp), %rsi
subq 0x10(%rsp), %rsi
sarq $0x3, %rsi
movq 0x4120c(%rip), %rdi     # 0x101fb8
callq 0x82f0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %r15, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
movq 0x411d6(%rip), %rdi     # 0x101fb8
leaq 0x1fc96(%rip), %rsi     # 0xe0a7f
movl $0x9, %edx
callq 0x84e0
movq 0x411be(%rip), %rdi     # 0x101fb8
movl %r14d, %esi
callq 0x8810
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %r14, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
movq 0x41185(%rip), %rdi     # 0x101fb8
leaq 0x1fc4f(%rip), %rsi     # 0xe0a89
movl $0x9, %edx
callq 0x84e0
movq 0x4116d(%rip), %rdi     # 0x101fb8
movl %ebx, %esi
callq 0x8810
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
movq 0x41135(%rip), %rdi     # 0x101fb8
leaq 0x1fc09(%rip), %rsi     # 0xe0a93
movl $0xe, %edx
callq 0x84e0
movq 0x4111d(%rip), %rdi     # 0x101fb8
movl %ebp, %esi
callq 0x8810
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rdx
cmpb $0x0, 0x43493(%rip)     # 0x104370
je 0xc1140
cmpq %rax, %rdx
je 0xc1611
xorl %ebx, %ebx
xorl %ebp, %ebp
xorl %r14d, %r14d
movl $0x0, 0x70(%rsp)
movl $0x0, 0x78(%rsp)
movq (%rax,%rbx,8), %rdx
movq 0x18(%rdx), %rcx
movq 0x20(%rdx), %rsi
movq %rsi, %rdx
subq %rcx, %rdx
je 0xc0fe0
xorl %r13d, %r13d
movq (%rcx,%r13,8), %rax
cmpb $0x1, 0x24(%rax)
jne 0xc0f5a
xorps %xmm0, %xmm0
cvtsi2sdl 0xc(%rax), %xmm0
movsd %xmm0, 0x50(%rsp)
movq 0x108(%rsp), %rsi
cmpq 0x110(%rsp), %rsi
je 0xc0f8c
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x108(%rsp)
jmp 0xc0f9e
xorps %xmm0, %xmm0
cvtsi2sdl 0xc(%rax), %xmm0
movsd %xmm0, 0x50(%rsp)
movq 0xe8(%rsp), %rsi
cmpq 0xf0(%rsp), %rsi
je 0xc0fa2
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0xe8(%rsp)
jmp 0xc0fb4
leaq 0x100(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x311fc
incl %ebp
jmp 0xc0fb7
leaq 0xe0(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x311fc
incl %r14d
incq %r13
movq 0x10(%rsp), %rax
movq (%rax,%rbx,8), %rdx
movq 0x18(%rdx), %rcx
movq 0x20(%rdx), %rsi
movq %rsi, %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
cmpq %r13, %rdx
ja 0xc0f1e
jmp 0xc0fe4
sarq $0x3, %rdx
cmpq $0x1, %rdx
jbe 0xc1123
movq (%rcx), %rdx
movb 0x8(%rdx), %dil
cmpb 0x10(%rdx), %dil
movl $0x0, %r8d
cmovel %r8d, %r12d
cmpb 0x11(%rdx), %dil
movl $0x1, %edx
cmovel %edx, %r12d
subq %rcx, %rsi
movb $0x1, %dl
cmpq $0x9, %rsi
jb 0xc1112
movl %ebp, 0x170(%rsp)
leaq (%rax,%rbx,8), %rbp
movb $0x1, %dl
movl $0x1, %r13d
movq (%rcx,%r13,8), %rsi
movb 0x8(%rsi), %dil
xorl %ecx, %ecx
cmpb 0x10(%rsi), %dil
je 0xc1045
movl %r15d, %ecx
movl $0x1, %r15d
cmpb 0x11(%rsi), %dil
je 0xc1054
movl %ecx, %r15d
cmpl %r12d, %r15d
je 0xc10df
movl $0x20, %edi
callq 0x8470
movq (%rbp), %rcx
movq 0x18(%rcx), %rcx
movq -0x8(%rcx,%r13,8), %rdx
movq (%rcx,%r13,8), %rcx
movl (%rdx), %esi
movl (%rcx), %edi
movsd 0x18(%rdx), %xmm0
movsd 0x18(%rcx), %xmm1
movl %esi, (%rax)
movl %edi, 0x4(%rax)
movsd %xmm0, 0x8(%rax)
movsd %xmm1, 0x10(%rax)
subl %esi, %edi
movl %edi, %ecx
negl %ecx
cmovsl %edi, %ecx
movl %ecx, 0x18(%rax)
movq %rax, 0x50(%rsp)
movq 0xa8(%rsp), %rsi
cmpq 0xb0(%rsp), %rsi
je 0xc10c6
movq %rax, (%rsi)
addq $0x8, 0xa8(%rsp)
jmp 0xc10d8
leaq 0xa0(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0xc37a8
movq 0x10(%rsp), %rax
xorl %edx, %edx
incq %r13
leaq (%rax,%rbx,8), %rbp
movq (%rbp), %rsi
movq 0x18(%rsi), %rcx
movq 0x20(%rsi), %rsi
subq %rcx, %rsi
sarq $0x3, %rsi
movl %r15d, %r12d
cmpq %r13, %rsi
ja 0xc1032
andb $0x1, %dl
movl %r15d, %r12d
movl 0x170(%rsp), %ebp
movzbl %dl, %ecx
addl %ecx, 0x78(%rsp)
xorb $0x1, %cl
movzbl %cl, %ecx
addl %ecx, 0x70(%rsp)
incq %rbx
movq 0x18(%rsp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rbx, %rcx
ja 0xc0f03
jmp 0xc1626
cmpq %rax, %rdx
je 0xc147d
xorl %r8d, %r8d
leaq 0x50(%rsp), %r15
movq (%rax,%r8,8), %rsi
movq 0x18(%rsi), %rcx
movq 0x20(%rsi), %rsi
movq %rsi, %rdi
subq %rcx, %rdi
cmpq $0x9, %rdi
jb 0xc1467
movq %r8, 0x78(%rsp)
xorl %ebx, %ebx
movq %rsi, %rdx
subq %rcx, %rdx
cmpq $0x9, %rdx
jb 0xc144a
movl $0x1, %ebp
movq (%rcx,%rbx,8), %rax
movb 0x8(%rax), %dl
movb %dl, 0xf(%rsp)
movq (%rcx,%rbp,8), %rcx
movb 0x8(%rcx), %dl
movb %dl, 0xe(%rsp)
movl (%rax), %r13d
movl (%rcx), %r14d
leaq 0xc0(%rsp), %r12
movq %r12, %rdi
movl %r13d, %esi
callq 0x2e7e2
movq %r12, %rdi
leaq 0x13eba(%rip), %rsi     # 0xd507c
callq 0x88c0
leaq 0x40(%rsp), %rsi
movq %rsi, 0x30(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xc11ef
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0xc11f7
movupd (%rcx), %xmm0
movupd %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x38(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x80(%rsp), %rdi
movl %r14d, %esi
callq 0x2e7e2
movq 0x30(%rsp), %rcx
movl $0xf, %edi
leaq 0x40(%rsp), %rax
cmpq %rax, %rcx
je 0xc1238
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %r8
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rdi, %rax
jbe 0xc1275
movl $0xf, %edi
leaq 0x90(%rsp), %r9
cmpq %r9, %rsi
je 0xc1270
movq 0x90(%rsp), %rdi
cmpq %rdi, %rax
jbe 0xc1281
leaq 0x30(%rsp), %rdi
callq 0x8180
jmp 0xc1292
leaq 0x80(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x84d0
leaq 0x60(%rsp), %rsi
movq %rsi, 0x50(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0xc12b7
movq %rdx, 0x50(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x60(%rsp)
jmp 0xc12bf
movupd (%rcx), %xmm0
movupd %xmm0, (%rsi)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x58(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0xc1301
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0xc131d
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0xc1342
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x120(%rsp), %rdi
movq %r15, %rsi
callq 0xc38e4
testq %rax, %rax
je 0xc1380
leaq 0x120(%rsp), %rdi
movq %r15, %rsi
callq 0xc39e0
movq (%rax), %rdi
movq 0x10(%rdi), %rsi
cmpq 0x18(%rdi), %rsi
je 0xc13bb
movb 0xf(%rsp), %al
movb %al, (%rsi)
incq 0x10(%rdi)
jmp 0xc13c9
movl $0x38, %edi
callq 0x8470
movq %rax, %r12
movsbl 0xf(%rsp), %ecx
movsbl 0xe(%rsp), %r8d
movq %rax, %rdi
movl %r13d, %esi
movl %r14d, %edx
callq 0xc28a4
leaq 0x120(%rsp), %rdi
movq %r15, %rsi
callq 0xc39e0
movq %r12, (%rax)
jmp 0xc1400
addq $0x8, %rdi
leaq 0xf(%rsp), %rdx
callq 0x6ea22
leaq 0x120(%rsp), %rdi
movq %r15, %rsi
callq 0xc39e0
movq (%rax), %rdi
movq 0x10(%rdi), %rsi
cmpq 0x18(%rdi), %rsi
je 0xc13f2
movb 0xe(%rsp), %al
movb %al, (%rsi)
incq 0x10(%rdi)
jmp 0xc1400
addq $0x8, %rdi
leaq 0xe(%rsp), %rdx
callq 0x6ea22
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0xc141c
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x8480
incq %rbp
movq 0x10(%rsp), %rax
movq 0x78(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x18(%rdx), %rcx
movq 0x20(%rdx), %rsi
movq %rsi, %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
cmpq %rbp, %rdx
ja 0xc1189
jmp 0xc144e
shrq $0x3, %rdx
incq %rbx
decq %rdx
cmpq %rbx, %rdx
ja 0xc1174
movq 0x18(%rsp), %rdx
movq 0x78(%rsp), %r8
incq %r8
movq %rdx, %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r8, %rcx
ja 0xc1151
movq 0x40b34(%rip), %rdi     # 0x101fb8
leaq 0x1f681(%rip), %rsi     # 0xe0b0c
movl $0x11, %edx
callq 0x84e0
movq 0x138(%rsp), %rsi
movq 0x40b14(%rip), %rdi     # 0x101fb8
callq 0x82f0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
movq 0x40ade(%rip), %rdi     # 0x101fb8
leaq 0x1f63d(%rip), %rsi     # 0xe0b1e
movl $0x18, %edx
callq 0x84e0
movq 0x40ac6(%rip), %rdi     # 0x101fb8
xorl %esi, %esi
callq 0x8810
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
movq 0x40a8e(%rip), %rdi     # 0x101fb8
leaq 0x1f606(%rip), %rsi     # 0xe0b37
movl $0x11, %edx
callq 0x84e0
movq 0x40a76(%rip), %rdi     # 0x101fb8
movq 0x70(%rsp), %rsi
callq 0x8810
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
movq 0x40a3b(%rip), %rdi     # 0x101fb8
leaq 0x1f5c5(%rip), %rsi     # 0xe0b49
movl $0x2c, %edx
callq 0x84e0
cvtsi2sdl 0x70(%rsp), %xmm0
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
sarq $0x3, %rax
imulq $0x12c, %rax, %rax      # imm = 0x12C
movq %rax, %xmm1
punpckldq 0x7afa(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x7b02(%rip), %xmm1     # 0xc90c0
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
divsd %xmm2, %xmm0
movq 0x409e3(%rip), %rdi     # 0x101fb8
callq 0x8730
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
movq 0xa0(%rsp), %rdi
jmp 0xc1a32
movl $0x0, 0x78(%rsp)
movl $0x0, 0x70(%rsp)
xorl %r14d, %r14d
xorl %ebp, %ebp
movq 0x4098b(%rip), %rdi     # 0x101fb8
leaq 0x1f46e(%rip), %rsi     # 0xe0aa2
movl $0xf, %edx
callq 0x84e0
movq 0x40973(%rip), %rdi     # 0x101fb8
movl 0x78(%rsp), %esi
callq 0x8810
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
movq 0x40939(%rip), %rdi     # 0x101fb8
leaq 0x1f42c(%rip), %rsi     # 0xe0ab2
movl $0xf, %edx
callq 0x84e0
movq 0x40921(%rip), %rdi     # 0x101fb8
movl 0x70(%rsp), %esi
callq 0x8810
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
movq 0x408e7(%rip), %rdi     # 0x101fb8
leaq 0x1f3ea(%rip), %rsi     # 0xe0ac2
movl $0xa, %edx
callq 0x84e0
movq 0x408cf(%rip), %rdi     # 0x101fb8
movl %r14d, %esi
callq 0x8810
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
movq 0x40896(%rip), %rdi     # 0x101fb8
leaq 0x1f3a4(%rip), %rsi     # 0xe0acd
movl $0xd, %edx
callq 0x84e0
movq 0x4087e(%rip), %rdi     # 0x101fb8
movl %ebp, %esi
callq 0x8810
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
movq 0x40846(%rip), %rdi     # 0x101fb8
leaq 0x1f362(%rip), %rsi     # 0xe0adb
movl $0x19, %edx
callq 0x84e0
leaq 0x1e0(%rsp), %rdi
leaq 0x100(%rsp), %rsi
callq 0x37978
movq 0x1e0(%rsp), %rcx
movq 0x1e8(%rsp), %rdx
movq %rdx, %rax
subq %rcx, %rax
sarq $0x3, %rax
cmpq %rcx, %rdx
je 0xc17d7
cmpq $0x1, %rax
movq %rax, %rdx
adcq $0x0, %rdx
xorpd %xmm0, %xmm0
xorl %esi, %esi
addsd (%rcx,%rsi,8), %xmm0
incq %rsi
cmpq %rsi, %rdx
jne 0xc17c8
jmp 0xc17db
xorpd %xmm0, %xmm0
cvtsi2sd %rax, %xmm1
divsd %xmm1, %xmm0
movq 0x407cd(%rip), %rdi     # 0x101fb8
callq 0x8730
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
movq 0x1e0(%rsp), %rdi
testq %rdi, %rdi
je 0xc1837
movq 0x1f0(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0x4077a(%rip), %rdi     # 0x101fb8
leaq 0x1f2b0(%rip), %rsi     # 0xe0af5
movl $0x16, %edx
callq 0x84e0
leaq 0x1c8(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0x37978
movq 0x1c8(%rsp), %rcx
movq 0x1d0(%rsp), %rdx
movq %rdx, %rax
subq %rcx, %rax
sarq $0x3, %rax
cmpq %rcx, %rdx
je 0xc18a3
cmpq $0x1, %rax
movq %rax, %rdx
adcq $0x0, %rdx
xorpd %xmm0, %xmm0
xorl %esi, %esi
addsd (%rcx,%rsi,8), %xmm0
incq %rsi
cmpq %rsi, %rdx
jne 0xc1894
jmp 0xc18a7
xorpd %xmm0, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
divsd %xmm1, %xmm0
movq 0x406fe(%rip), %rdi     # 0x101fb8
callq 0x8730
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
movq 0x1c8(%rsp), %rdi
testq %rdi, %rdi
je 0xc1906
movq 0x1d8(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0xa0(%rsp), %rdi
cmpq %rdi, 0xa8(%rsp)
je 0xc1a32
xorl %r15d, %r15d
leaq 0xc0a4(%rip), %rbx      # 0xcd9ca
movq (%rdi,%r15,8), %rax
movl (%rax), %esi
movq 0x168(%rsp), %rdi
callq 0x8810
movq %rax, %r14
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x84e0
movq 0xa0(%rsp), %rax
movq (%rax,%r15,8), %rax
movl 0x4(%rax), %esi
movq %r14, %rdi
callq 0x8810
movq %rax, %r14
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x84e0
movq 0xa0(%rsp), %rax
movq (%rax,%r15,8), %rax
movl 0x18(%rax), %esi
movq %r14, %rdi
callq 0x8810
movq %rax, %r14
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x84e0
movq 0xa0(%rsp), %rax
movq (%rax,%r15,8), %rax
movsd 0x8(%rax), %xmm0
movq %r14, %rdi
callq 0x8730
movq %rax, %r14
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x84e0
movq 0xa0(%rsp), %rax
movq (%rax,%r15,8), %rax
movsd 0x10(%rax), %xmm0
movq %r14, %rdi
callq 0x8730
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %r14, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
incq %r15
movq 0xa0(%rsp), %rdi
movq 0xa8(%rsp), %rax
subq %rdi, %rax
sarq $0x3, %rax
cmpq %rax, %r15
jne 0xc1926
testq %rdi, %rdi
je 0xc1a47
movq 0xb0(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0x100(%rsp), %rdi
testq %rdi, %rdi
je 0xc1a64
movq 0x110(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0xe0(%rsp), %rdi
testq %rdi, %rdi
je 0xc1a81
movq 0xf0(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xc1a98
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
leaq 0x120(%rsp), %rdi
callq 0xc2a50
leaq 0x230(%rsp), %rdi
callq 0xc2aee
leaq 0x2a8(%rsp), %rdi
callq 0x3c602
leaq 0x260(%rsp), %rdi
callq 0x48b9e
leaq 0x178(%rsp), %rdi
callq 0xc2b7e
movq 0x1a8(%rsp), %rdi
leaq 0x1b8(%rsp), %rax
cmpq %rax, %rdi
je 0xc1afe
movq 0x1b8(%rsp), %rsi
incq %rsi
callq 0x8480
xorl %eax, %eax
addq $0x2d8, %rsp            # imm = 0x2D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1ec37(%rip), %rdi     # 0xe0750
leaq 0x1ee8b(%rip), %rsi     # 0xe09ab
leaq 0x1eea0(%rip), %rcx     # 0xe09c7
movl $0x8f, %edx
callq 0x82c0
leaq 0x1eef6(%rip), %rdi     # 0xe0a2e
jmp 0xc1b41
leaq 0x1eecb(%rip), %rdi     # 0xe0a0c
leaq 0x1ee63(%rip), %rsi     # 0xe09ab
leaq 0x1ee78(%rip), %rcx     # 0xe09c7
movl $0x7d, %edx
callq 0x82c0
leaq 0x1ee29(%rip), %rdi     # 0xe0989
jmp 0xc1b69
leaq 0x1ee81(%rip), %rdi     # 0xe09ea
leaq 0x1ee3b(%rip), %rsi     # 0xe09ab
leaq 0x1ee50(%rip), %rcx     # 0xe09c7
movl $0x68, %edx
callq 0x82c0
movq %rax, %r13
movl $0x30, %esi
movq %r12, %rdi
jmp 0xc1d92
movq %rax, %r13
movq 0x120(%rsp), %rdi
cmpq %rbx, %rdi
je 0xc1bb6
movq 0x130(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0xc1bb6
movq %rax, %r13
movq 0x178(%rsp), %rdi
cmpq %r14, %rdi
je 0xc1bd8
movq 0x188(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0xc1bd8
movq %rax, %r13
movl $0x200, %esi            # imm = 0x200
movq 0x160(%rsp), %rdi
jmp 0xc1c8c
jmp 0xc1c96
movq %rax, %r13
movq 0x120(%rsp), %rdi
cmpq %rbx, %rdi
je 0xc1c14
movq 0x130(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0xc1c14
movq %rax, %r13
leaq 0x188(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc1c3a
movq 0x188(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0xc1c3a
movq %rax, %r13
movl $0x200, %esi            # imm = 0x200
movq 0x168(%rsp), %rdi
jmp 0xc1c8c
jmp 0xc1c96
movq %rax, %r13
movl $0x208, %esi            # imm = 0x208
movq %r14, %rdi
jmp 0xc1c8c
jmp 0xc1c96
movq %rax, %r13
movl $0x208, %esi            # imm = 0x208
movq %r15, %rdi
jmp 0xc1c8c
jmp 0xc1c96
movq %rax, %r13
leaq 0x130(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc2044
movq 0x130(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0xc2044
movq %rax, %r13
jmp 0xc2044
jmp 0xc1dbf
jmp 0xc1dbf
movq %rax, %r13
movq 0x1c8(%rsp), %rdi
testq %rdi, %rdi
je 0xc1f95
movq 0x1d8(%rsp), %rsi
jmp 0xc1ce2
movq %rax, %r13
movq 0x1e0(%rsp), %rdi
testq %rdi, %rdi
je 0xc1f95
movq 0x1f0(%rsp), %rsi
subq %rdi, %rsi
jmp 0xc1f90
jmp 0xc1d1a
movq %rax, %r13
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0xc1df9
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
jmp 0xc1df9
jmp 0xc1df6
movq %rax, %r13
jmp 0xc1fec
movq %rax, %r13
movq 0x1f8(%rsp), %rdi
leaq 0x208(%rsp), %rax
cmpq %rax, %rdi
je 0xc1dd9
movq 0x208(%rsp), %rsi
incq %rsi
jmp 0xc1dd4
movq %rax, %r13
jmp 0xc1dd9
jmp 0xc1e4a
jmp 0xc1d7f
movq %rax, %r13
leaq 0x290(%rsp), %rdi
callq 0x2e784
jmp 0xc1d72
movq %rax, %r13
movl $0x150, %esi            # imm = 0x150
movq %r15, %rdi
jmp 0xc1e2c
movq %rax, %r13
jmp 0xc1e31
movq %rax, %r13
movl $0x30, %esi
movq %rbp, %rdi
callq 0x8480
jmp 0xc1dc2
jmp 0xc1e4a
jmp 0xc1dbf
jmp 0xc1e4a
movq %rax, %r13
jmp 0xc1e91
jmp 0xc1e52
movq %rax, %r13
jmp 0xc1ee0
jmp 0xc1e4a
movq %rax, %r13
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xc1dd9
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
leaq 0x50(%rsp), %rdi
jmp 0xc1ee8
jmp 0xc1e4a
jmp 0xc1e4a
jmp 0xc1f33
jmp 0xc1f33
jmp 0xc1f33
movq %rax, %r13
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0xc1e15
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0xc1e31
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0xc0(%rsp), %rdi
jmp 0xc1ee8
jmp 0xc1f33
jmp 0xc1f33
jmp 0xc1e4a
movq %rax, %r13
jmp 0xc2003
movq %rax, %r13
jmp 0xc1ead
jmp 0xc1f33
movq %rax, %r13
leaq 0xe0(%rsp), %rdi
callq 0x2e784
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0xc1e91
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0xc1ead
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xc1ec4
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0xc1ee0
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x80(%rsp), %rdi
callq 0x2e784
jmp 0xc2003
movq %rax, %r13
movl $0x38, %esi
movq %r12, %rdi
callq 0x8480
jmp 0xc1f79
movq %rax, %r13
jmp 0xc1f57
movq %rax, %r13
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0xc1f3b
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0xc1f3b
movq %rax, %r13
jmp 0xc1f95
movq %rax, %r13
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0xc1f57
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0xc1f95
movq 0xd0(%rsp), %rsi
jmp 0xc1f8d
movq %rax, %r13
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0xc1f95
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0xc1fb2
movq 0xb0(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0x100(%rsp), %rdi
testq %rdi, %rdi
je 0xc1fcf
movq 0x110(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0xe0(%rsp), %rdi
testq %rdi, %rdi
je 0xc1fec
movq 0xf0(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xc2003
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
leaq 0x120(%rsp), %rdi
callq 0xc2a50
leaq 0x230(%rsp), %rdi
callq 0xc2aee
leaq 0x2a8(%rsp), %rdi
callq 0x3c602
leaq 0x260(%rsp), %rdi
callq 0x48b9e
leaq 0x178(%rsp), %rdi
callq 0xc2b7e
movq 0x1a8(%rsp), %rdi
leaq 0x1b8(%rsp), %rax
cmpq %rax, %rdi
je 0xc2069
movq 0x1b8(%rsp), %rsi
incq %rsi
callq 0x8480
movq %r13, %rdi
callq 0x8840