// File: /workspace/github_cpp_makefile_star2_O2/millanek[P]evo/process_vcf_stats.cpp
// Function: statsMain(int, char**)
int statsMain(int argc, char** argv) {
    parseStatsOptions(argc, argv);
    string line; // for reading the input files
    
    string fileName = opt::vcfFile;
    string fileRoot = stripExtension(fileName);
    std::ifstream* setsFile;
    std::ifstream* accessibleGenomeBed;
    
    // Data structures to hold individual and population identifiers
    std::vector<std::string> sampleNames;
    std::map<string, std::vector<string>> popToIDsMap;
    std::map<string, string> IDsToPopMap;
    std::map<string, std::vector<size_t>> popToPosMap;
    std::map<size_t, string> posToPopMap;
    std::vector<string> populations; std::vector<string> populationsToUse;
    // Read in the POPULATIONS_FILE if supplied
    if (!opt::populationsFile.empty()) {
        std::ifstream* setsFile = new std::ifstream(opt::populationsFile.c_str());
    
        // Get the sample sets
        while (getline(*setsFile, line)) {
            // std::cerr << line << std::endl;
            std::vector<string> ID_Pop = split(line, '\t');
            popToIDsMap[ID_Pop[1]].push_back(ID_Pop[0]);
            IDsToPopMap[ID_Pop[0]] = ID_Pop[1];
            //std::cerr << ID_Species[1] << "\t" << ID_Species[0] << std::endl;
        }
        // Get a vector of set names (usually populations/species)
        for(std::map<string,std::vector<string>>::iterator it = popToIDsMap.begin(); it != popToIDsMap.end(); ++it) {
            populations.push_back(it->first);
            if (it->first != "Outgroup" && it->first != "xxx") {
                populationsToUse.push_back(it->first);
            }
            // std::cerr << it->first << std::endl;
        } std::cerr << "There are " << populations.size() << " populations " << std::endl;
    }
    
    // Data structures to hold the results
    std::vector<int> hetCounts; std::vector<int> hetsSharedWithOthers; std::vector<int> privateVarCounts;
    int_matrix doubletons; double_matrix diffMatrixHetsVsHomDiff;
    double_matrix diffMatrix; double_matrix diffMatrixMe; double_matrix diffMatrixH1; double_matrix diffMatrixAllH;
    int_matrix pairwiseMissingness;
    double_matrix thisBootstrapBlock; int_matrix thisBootstrapBlockMissingness;
    std::unordered_map<int, double_matrix>  bootstrapBlockDiffMe;
    std::unordered_map<int , int_matrix >  bootstrapBlockMissingnessMe;
    
    AccessibleGenome* ag;
    if (!opt::accesibleGenBedFile.empty()) {
        accessibleGenomeBed = new std::ifstream(opt::accesibleGenBedFile);
        std::cerr << "Loading the accessible genome annotation" << std::endl;
        ag = new AccessibleGenome(accessibleGenomeBed);
        std::cerr << "Done" << std::endl;
        std::istream* inFile = createReader(fileName.c_str());
        string line;
        while (getline(*inFile, line)) {
            std::vector<std::string> fields = split(line, '\t');
            string sc = fields[0];
            int len = atoi(fields[1].c_str());
            for (int i=0; i < len; i=i+opt::accessibleGenBedWindow ) {
                int numAccessibleBP = ag->getAccessibleBPinRegion(sc, i, i+opt::accessibleGenBedWindow);
                std::cout << sc << "\t" << i << "\t" << i+opt::accessibleGenBedWindow << "\t" << numAccessibleBP << std::endl;
            }
        }
        return 0;
    }
    
    std::cerr << "Calculating statistics from: " << fileName << std::endl;
    if (opt::countHets) {
        std::cerr << "Het count per individual are going to be output to: " << fileRoot + ".hets.txt" << std::endl;
        std::cerr << "Counts of hets (per individual) shared with others are going to be output to: " << fileRoot + ".sharedHets.txt" << std::endl;
    }
    if (opt::bDoubleton) {
        std::cerr << "The distribution of doubletons is going to be output to: " <<  fileRoot + ".doubletons.txt" << std::endl;
        //pop_unique = initializeDoubletons(doubletons, indPopVector,fieldsPopMap);
    }
    if (opt::countPrivateVars) {
        std::cerr << "The numbers of private variants fixed in groups defined in " << opt::populationsFile << " are going to be output to: " <<  fileRoot + "_" + stripExtension(opt::populationsFile) + ".privateFixedVars.txt" << std::endl;
        //pop_unique = initializeDoubletons(doubletons, indPopVector,fieldsPopMap);
        
    }
    
    // Start reading from the vcf file
    std::istream* inFile = createReader(fileName.c_str());
    int numSamples; int numChromosomes; int totalVariantNumber = 0;
    int bootstrapBlockNum = 0; std::vector<std::string> fields;
    while (getline(*inFile, line)) {
        if (line[0] == '#' && line[1] == '#')
            continue;
        else if (line[0] == '#' && line[1] == 'C') {
            // Read the sample names, initialise output variables, and (if supplied) locate populations
            fields = split(line, '\t');
            if (opt::sampleNameFile.empty()) {
                for (std::vector<std::string>::size_type i = NUM_NON_GENOTYPE_COLUMNS; i != fields.size(); i++) {
                    sampleNames.push_back(fields[i]);
                }
            } else {
                sampleNames = readSampleNamesFromTextFile(opt::sampleNameFile);
            } numSamples = (int)sampleNames.size(); numChromosomes = (int)numSamples * 2;
            std::cerr << "Number of chromosomes: " << numChromosomes << std::endl;
            
           // print_vector_stream(sampleNames, std::cerr);
           for (std::vector<std::string>::size_type i = 0; i != sampleNames.size(); i++) {
               posToPopMap[i] = IDsToPopMap[sampleNames[i]];
           }
           // Iterate over all the keys in the map to find the samples in the VCF:
           // Give an error if no sample is found for a species:
           for(std::map<string, std::vector<string>>::iterator it = popToIDsMap.begin(); it != popToIDsMap.end(); ++it) {
               string sp =  it->first;
               //std::cerr << "sp " << sp << std::endl;
               std::vector<string> IDs = it->second;
               std::vector<size_t> spPos = locateSet(sampleNames, IDs);
               if (spPos.empty()) {
                   std::cerr << "Did not find any samples in the VCF for \"" << sp << "\"" << std::endl;
                   assert(!spPos.empty());
               }
               popToPosMap[sp] = spPos;
           }
            
            initialize_matrix_double(diffMatrix, numSamples); initialize_matrix_double(diffMatrixMe, numSamples);
            initialize_matrix_double(diffMatrixHetsVsHomDiff, numSamples);
            initialize_matrix_double(diffMatrixH1, numSamples); initialize_matrix_double(diffMatrixAllH, numSamples);
            initialize_matrix_double(thisBootstrapBlock, numSamples);
            initialize_matrix_int(pairwiseMissingness, numSamples);
            initialize_matrix_int(thisBootstrapBlockMissingness, numSamples);
            hetCounts.assign(numSamples, 0); hetsSharedWithOthers.assign(numSamples, 0);
            
            if (!opt::populationsFile.empty()) {
                privateVarCounts.assign(populationsToUse.size(), 0);
            }
            
        } else {
            totalVariantNumber++;
            fields = split(line, '\t');
            
            FilterResult* result = new FilterResult();
            Counts* c = new Counts(); getThisVariantCountsSimple(fields, c);
            result->counts = *c;
            
            // Only do these calculations if none of the genotypes are missing:
            if (result->counts.bAnyMissingGenotypes == false) {
                if (opt::countHets) {
                    het_analysis(hetCounts, hetsSharedWithOthers, *result);
                }
                if (opt::countPrivateVars) {
                    // This needs updating 
                    //privateVars_analysis(privateVarCounts,*result,populationsIndices, populationsIndicesComplements);
                }
                if (opt::bDoubleton) {
                //    doubleton_analysis(doubletons,result,numChromosomes,indPopVector, fieldsPopMap);
                }
                if (opt::bDiffH1) {
                    diffs_between_H1(diffMatrixH1, *result);
                }
                if (opt::bDiffAllH) {
                    diffs_between_AllH(diffMatrixAllH, *result);
                }
            }
            if (opt::bDiffs) {
                if (!result->counts.bIsMultiallelic) {
                diffs_between_individuals(diffMatrix,diffMatrixMe,thisBootstrapBlock,diffMatrixHetsVsHomDiff,pairwiseMissingness,thisBootstrapBlockMissingness,*result);
                } else {
                diffs_between_individuals_with_multialleleics(diffMatrixMe,pairwiseMissingness,thisBootstrapBlock,thisBootstrapBlockMissingness,*result);
                }
            }
            
            if (opt::bDoBootstrap) {
                if (totalVariantNumber % opt::bootstrapBlockSize == 0) {
                    bootstrapBlockDiffMe[bootstrapBlockNum] = thisBootstrapBlock;
                    bootstrapBlockMissingnessMe[bootstrapBlockNum] = thisBootstrapBlockMissingness;
                    reset_matrix_to_zero(thisBootstrapBlock); reset_matrix_to_zero(thisBootstrapBlockMissingness);
                    //thisBootstrapBlock.clear(); thisBootstrapBlockMissingness.clear();
                    //initialize_matrix_double(thisBootstrapBlock, numSamples);
                    //initialize_matrix_int(thisBootstrapBlockMissingness, numSamples);
                    bootstrapBlockNum++;
                }
            }
            delete c;
            delete result;
                
            if (totalVariantNumber % 100000 == 0)
                std::cerr << "Processed " << totalVariantNumber << " variants" << std::endl;
            
        }
    }
    
    if (opt::numAccessibleBP > -1) {
        std::cerr << "opt::numAccessibleBP " << opt::numAccessibleBP << std::endl;
        for (int i = 0; i < diffMatrixMe.size(); i++) {
            for (int j = 0; j < diffMatrixMe[i].size(); j++) {
                diffMatrixMe[i][j] =  (double)diffMatrixMe[i][j]/opt::numAccessibleBP;
            }    
        }
    }
    
    // Bootstrap:
    if (opt::bDoBootstrap) {
        for (int n = 0; n < opt::n_bootstrap_replicates; n++) {
            string bootFileName = fileRoot + "boot." + numToString(n) + ".txt";
            std::ofstream* pBootOutFile = new std::ofstream(bootFileName.c_str());
            std::vector<std::vector<double> > bootReplicateMatrix; initialize_matrix_double(bootReplicateMatrix, numSamples);
            std::vector<std::vector<double> > bootReplicateMatrixMissingness; initialize_matrix_double(bootReplicateMatrixMissingness, numSamples);
            for (int b = 0; b < (int)bootstrapBlockDiffMe.size(); b++) {
                int block = rand() % bootstrapBlockDiffMe.size();
                for (int i = 0; i < (int)diffMatrixMe.size(); i++) {
                    for (int j = 0; j < (int)diffMatrixMe.size(); j++) {
                        bootReplicateMatrix[i][j] = bootReplicateMatrix[i][j] + bootstrapBlockDiffMe[block][i][j];
                        bootReplicateMatrixMissingness[i][j] = bootReplicateMatrixMissingness[i][j] + bootstrapBlockMissingnessMe[block][i][j];
                    }
                }
            }
            
            // Normalise the bootstrap diff matrix based on pairwise missingness
            std::vector<std::vector<double> > proportionUsed; initialize_matrix_double(proportionUsed, numSamples);
            std::vector<std::vector<double> > normalisedBootstrap; initialize_matrix_double(normalisedBootstrap, numSamples);
            int totalSitesBootstrap = (int)bootstrapBlockDiffMe.size() * opt::bootstrapBlockSize;
            for (int i = 0; i < (int)diffMatrixMe.size(); i++) {
                for (int j = 0; j < (int)diffMatrixMe.size(); j++) {
                    proportionUsed[i][j] = 1 - (bootReplicateMatrixMissingness[i][j]/totalSitesBootstrap);
                    normalisedBootstrap[i][j] = bootReplicateMatrix[i][j]/proportionUsed[i][j];
                }
            }
            
            print_vector(sampleNames,*pBootOutFile);
            print_matrix<const std::vector<std::vector<double> >&>(normalisedBootstrap, *pBootOutFile);
            pBootOutFile->close();
        }
    }
    
    
    string fileNoPath = stripPath(fileRoot);
    
    // Printing doubletons
//    if (opt::bDoubleton)
//        print_doubleton_distribution(fileRoot, pop_unique, doubletons);
    
    // Printing het counts
    if (opt::countHets) 
        print_het_counts(fileRoot, sampleNames, hetCounts, hetsSharedWithOthers);
    
    // Printing statistics for private variants
    if (opt::countPrivateVars)
        print_privateFixedVarsSummary(fileRoot, populationsToUse, opt::populationsFile, privateVarCounts);
    
    // Printing pairwise difference statistics
    if (opt::bDiffs) {
        finalize_diffs_Hets_vs_Homs_proportions(diffMatrixHetsVsHomDiff);
        print_pairwise_diff_stats(fileNoPath, sampleNames, totalVariantNumber, diffMatrix, diffMatrixMe, diffMatrixHetsVsHomDiff,pairwiseMissingness);
    }
    if (opt::bDiffH1) {
        print_H1_pairwise_diff_stats(fileRoot, sampleNames, totalVariantNumber, diffMatrixH1);
    }
    if (opt::bDiffAllH) {
        print_AllH_pairwise_diff_stats(fileRoot, sampleNames, totalVariantNumber, diffMatrixAllH);
    }
    
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x488, %rsp            # imm = 0x488
callq 0x4a29d
leaq 0x2f8(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x957a7(%rip), %rsi     # 0xde238
leaq 0x340(%rsp), %rdi
callq 0x8600
leaq 0xe0(%rsp), %rdi
leaq 0x340(%rsp), %rsi
callq 0x404d7
xorpd %xmm0, %xmm0
andq $0x0, 0xa0(%rsp)
leaq 0x380(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x3c8(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x460(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x430(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
movapd %xmm0, 0x90(%rsp)
andq $0x0, 0x2b0(%rsp)
movapd %xmm0, 0x2a0(%rsp)
andq $0x0, 0x1d0(%rsp)
movapd %xmm0, 0x1c0(%rsp)
xorl %eax, %eax
cmpq %rax, 0x95716(%rip)     # 0xde280
je 0x48ce4
movl $0x208, %edi            # imm = 0x208
callq 0x8490
movq %rax, %r14
movq 0x956f4(%rip), %rsi     # 0xde278
pushq $0x8
popq %rdx
movq %rax, %rdi
callq 0x8890
leaq 0x2e8(%rsp), %rbx
leaq 0x308(%rsp), %r15
leaq 0x378(%rsp), %r12
leaq 0x3c0(%rsp), %r13
movq %r14, %rdi
movq %rbx, %rsi
callq 0x80a0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x48c26
movq %r15, %rdi
movq %rbx, %rsi
pushq $0x9
popq %rdx
callq 0x40349
movq 0x308(%rsp), %rsi
addq $0x20, %rsi
movq %r12, %rdi
callq 0x3abd8
movq 0x308(%rsp), %rsi
movq %rax, %rdi
callq 0x2b0a4
movq 0x308(%rsp), %rbp
movq %r13, %rdi
movq %rbp, %rsi
callq 0x3210e
addq $0x20, %rbp
movq %rax, %rdi
movq %rbp, %rsi
callq 0x82a0
movq %r15, %rdi
callq 0x28a08
jmp 0x48baf
movq 0x390(%rsp), %r15
leaq 0x2a0(%rsp), %rbx
leaq 0x5653d(%rip), %r14     # 0x9f17a
leaq 0x5788c(%rip), %r12     # 0xa04d0
leaq 0x1c0(%rsp), %r13
leaq 0x380(%rsp), %rax
cmpq %rax, %r15
je 0x48c9e
leaq 0x20(%r15), %rbp
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x2b0a4
movq %rbp, %rdi
movq %r14, %rsi
callq 0x2ea9b
testb %al, %al
je 0x48c91
movq %rbp, %rdi
movq %r12, %rsi
callq 0x2ea9b
testb %al, %al
je 0x48c91
movq %r13, %rdi
movq %rbp, %rsi
callq 0x2b0a4
movq %r15, %rdi
callq 0x8340
movq %rax, %r15
jmp 0x48c4c
movq 0x94343(%rip), %rdi     # 0xdcfe8
leaq 0x69515(%rip), %rsi     # 0xb21c1
callq 0x8480
movq 0x2a8(%rsp), %rsi
subq 0x2a0(%rsp), %rsi
sarq $0x5, %rsi
movq %rax, %rdi
callq 0x8320
leaq 0x57800(%rip), %rsi     # 0xa04d4
movq %rax, %rdi
callq 0x8480
movq %rax, %rdi
callq 0x8230
xorpd %xmm0, %xmm0
movapd %xmm0, 0x280(%rsp)
andq $0x0, 0x290(%rsp)
movapd %xmm0, 0x260(%rsp)
andq $0x0, 0x270(%rsp)
movapd %xmm0, 0x2c0(%rsp)
andq $0x0, 0x2d0(%rsp)
movapd %xmm0, 0x360(%rsp)
andq $0x0, 0x370(%rsp)
movapd %xmm0, 0x1a0(%rsp)
andq $0x0, 0x1b0(%rsp)
movapd %xmm0, 0x240(%rsp)
andq $0x0, 0x250(%rsp)
movapd %xmm0, 0x70(%rsp)
andq $0x0, 0x80(%rsp)
movapd %xmm0, 0x220(%rsp)
andq $0x0, 0x230(%rsp)
movapd %xmm0, 0x200(%rsp)
andq $0x0, 0x210(%rsp)
movapd %xmm0, 0x180(%rsp)
andq $0x0, 0x190(%rsp)
movapd %xmm0, 0x120(%rsp)
andq $0x0, 0x130(%rsp)
movapd %xmm0, 0x100(%rsp)
andq $0x0, 0x110(%rsp)
leaq 0x338(%rsp), %rax
movq %rax, -0x30(%rax)
pushq $0x1
popq %rcx
movq %rcx, -0x28(%rax)
movupd %xmm0, -0x20(%rax)
movl $0x3f800000, %edx       # imm = 0x3F800000
movl %edx, -0x10(%rax)
movupd %xmm0, -0x8(%rax)
leaq 0x420(%rsp), %rax
movq %rax, -0x30(%rax)
movq %rcx, -0x28(%rax)
movupd %xmm0, -0x20(%rax)
movl %edx, -0x10(%rax)
movupd %xmm0, -0x8(%rax)
xorl %eax, %eax
cmpq %rax, 0x95498(%rip)     # 0xde2a0
je 0x48fec
movl $0x208, %edi            # imm = 0x208
callq 0x8490
movq %rax, %r14
leaq 0x95476(%rip), %rsi     # 0xde298
pushq $0x8
popq %rdx
movq %rax, %rdi
callq 0x8760
movq %r14, 0x2e0(%rsp)
movq 0x941ac(%rip), %rdi     # 0xdcfe8
leaq 0x5769f(%rip), %rsi     # 0xa04e2
callq 0x8480
movq %rax, %rdi
callq 0x8230
pushq $0x38
popq %rdi
callq 0x8490
movq %rax, %r14
leaq 0x2e0(%rsp), %rsi
movq %rax, %rdi
callq 0x3a63a
movq 0x94176(%rip), %rdi     # 0xdcfe8
leaq 0x4d36e(%rip), %rsi     # 0x961e7
callq 0x8480
movq %rax, %rdi
callq 0x8230
movq 0x340(%rsp), %rsi
leaq 0x8(%rsp), %rdi
leaq 0xb0(%rsp), %rdx
callq 0x21904
leaq 0x8(%rsp), %rdi
pushq $0x8
popq %rsi
callq 0x42587
movq %rax, 0x30(%rsp)
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x8978
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x40(%rsp), %r12
leaq 0xb0(%rsp), %r13
leaq 0x50f3a(%rip), %rbx     # 0x99e1e
movq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0x80a0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x48fdd
movq %r12, %rdi
movq %r15, %rsi
pushq $0x9
popq %rdx
callq 0x40349
movq 0x40(%rsp), %rsi
movq %r13, %rdi
callq 0x8600
movq 0x40(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x86f0
movl %eax, %r15d
xorl %r12d, %r12d
cmpl %r15d, %r12d
jge 0x48fbe
movl 0x945f7(%rip), %ecx     # 0xdd538
addl %r12d, %ecx
movq %r14, %rdi
movq %r13, %rsi
movl %r12d, %edx
callq 0x3ace4
movl %eax, %ebp
movq 0x9405d(%rip), %rdi     # 0xdcfb8
movq %r13, %rsi
callq 0x8430
movq %rax, %rdi
movq %rbx, %rsi
callq 0x8480
movq %rax, %rdi
movl %r12d, %esi
callq 0x8840
movq %rax, %rdi
movq %rbx, %rsi
callq 0x8480
movl 0x945ae(%rip), %esi     # 0xdd538
addl %r12d, %esi
movq %rax, %rdi
callq 0x8840
movq %rax, %rdi
movq %rbx, %rsi
callq 0x8480
movq %rax, %rdi
movl %ebp, %esi
callq 0x8840
movq %rax, %rdi
callq 0x8230
addl 0x9457f(%rip), %r12d    # 0xdd538
jmp 0x48f32
movq %r13, %rdi
callq 0x8978
leaq 0x40(%rsp), %r12
movq %r12, %rdi
callq 0x28a08
leaq 0x8(%rsp), %r15
jmp 0x48ee4
leaq 0x8(%rsp), %rdi
callq 0x8978
jmp 0x49d8f
movq 0x93ff5(%rip), %rdi     # 0xdcfe8
leaq 0x57511(%rip), %rsi     # 0xa050b
callq 0x8480
leaq 0x340(%rsp), %rsi
movq %rax, %rdi
callq 0x8430
movq %rax, %rdi
callq 0x8230
cmpb $0x1, 0x9529a(%rip)     # 0xde2b8
jne 0x490c0
movq 0x93fbd(%rip), %rdi     # 0xdcfe8
leaq 0x574f7(%rip), %rsi     # 0xa0529
callq 0x8480
movq %rax, %rbx
leaq 0x570ee(%rip), %rdx     # 0xa012f
leaq 0x8(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0x28806
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x8430
movq %rax, %rdi
callq 0x8230
leaq 0x8(%rsp), %rdi
callq 0x8978
movq 0x93f6f(%rip), %rdi     # 0xdcfe8
leaq 0x574de(%rip), %rsi     # 0xa055e
callq 0x8480
movq %rax, %rbx
leaq 0x570aa(%rip), %rdx     # 0xa0139
leaq 0x8(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0x28806
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x8430
movq %rax, %rdi
callq 0x8230
leaq 0x8(%rsp), %rdi
callq 0x8978
cmpb $0x1, 0x951f2(%rip)     # 0xde2b9
jne 0x49117
movq 0x93f18(%rip), %rdi     # 0xdcfe8
leaq 0x574d6(%rip), %rsi     # 0xa05ad
callq 0x8480
movq %rax, %rbx
leaq 0x56f4b(%rip), %rdx     # 0xa0031
leaq 0x8(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0x28806
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x8430
movq %rax, %rdi
callq 0x8230
leaq 0x8(%rsp), %rdi
callq 0x8978
cmpb $0x1, 0x9519c(%rip)     # 0xde2ba
jne 0x491fb
movq 0x93ebd(%rip), %rdi     # 0xdcfe8
leaq 0x574b5(%rip), %rsi     # 0xa05e7
callq 0x8480
leaq 0x9513a(%rip), %rsi     # 0xde278
movq %rax, %rdi
callq 0x8430
leaq 0x573f4(%rip), %rsi     # 0xa0541
movq %rax, %rdi
callq 0x8480
movq %rax, %rbx
leaq 0x5a65d(%rip), %rdx     # 0xa37bc
leaq 0x40(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0x28806
leaq 0x95100(%rip), %rsi     # 0xde278
leaq 0x140(%rsp), %rdi
callq 0x404d7
leaq 0xb0(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x140(%rsp), %rdx
callq 0x28a48
leaq 0x56fe5(%rip), %rdx     # 0xa018b
leaq 0x8(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x28a29
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x8430
movq %rax, %rdi
callq 0x8230
leaq 0x8(%rsp), %rdi
callq 0x8978
leaq 0xb0(%rsp), %rdi
callq 0x8978
leaq 0x140(%rsp), %rdi
callq 0x8978
leaq 0x40(%rsp), %rdi
callq 0x8978
movq 0x340(%rsp), %rsi
leaq 0x8(%rsp), %rdi
leaq 0xb0(%rsp), %rdx
callq 0x21904
leaq 0x8(%rsp), %rdi
pushq $0x8
popq %rsi
callq 0x42587
movq %rax, 0x30(%rsp)
leaq 0x8(%rsp), %r13
movq %r13, %rdi
callq 0x8978
leaq 0x3c(%rsp), %rax
andl $0x0, (%rax)
xorpd %xmm0, %xmm0
leaq 0x160(%rsp), %rax
andq $0x0, 0x10(%rax)
movapd %xmm0, (%rax)
xorl %ebx, %ebx
leaq 0x40(%rsp), %rbp
movq %rax, 0x68(%rsp)
movq %rbx, 0x28(%rsp)
movq 0x30(%rsp), %rdi
leaq 0x2e8(%rsp), %rsi
callq 0x80a0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x4980b
movq 0x2e8(%rsp), %rax
cmpb $0x23, (%rax)
jne 0x492a5
movzbl 0x1(%rax), %eax
cmpl $0x23, %eax
je 0x49262
cmpl $0x43, %eax
je 0x494e7
movq %r13, %rdi
leaq 0x2e8(%rsp), %rsi
pushq $0x9
popq %rdx
callq 0x40349
leaq 0x160(%rsp), %rdi
movq %r13, %rsi
callq 0x2f6c0
movq %r13, %rdi
callq 0x28a08
movl $0x110, %edi            # imm = 0x110
callq 0x8490
movq %rax, %r12
movq %rax, %rdi
callq 0x4a6c6
movl $0x100, %edi            # imm = 0x100
callq 0x8490
movq %rax, %r15
movq %rax, %rdi
callq 0x28746
leaq 0x160(%rsp), %rdi
movq %r15, %rsi
callq 0x40b39
movq %r12, %r14
addq $0x8, %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x2883e
cmpb $0x0, 0x100(%r12)
jne 0x4937a
cmpb $0x1, 0x94f8a(%rip)     # 0xde2b8
jne 0x49348
leaq 0x280(%rsp), %rdi
leaq 0x260(%rsp), %rsi
movq %r12, %rdx
callq 0x4b9ac
cmpb $0x1, 0x94f6c(%rip)     # 0xde2bb
jne 0x49361
leaq 0x220(%rsp), %rdi
movq %r12, %rsi
callq 0x4c580
cmpb $0x1, 0x94f54(%rip)     # 0xde2bc
jne 0x4937a
leaq 0x200(%rsp), %rdi
movq %r12, %rsi
callq 0x4c6cd
cmpb $0x1, 0x94f3c(%rip)     # 0xde2bd
jne 0x493eb
cmpb $0x0, 0x101(%r12)
je 0x493b5
leaq 0x70(%rsp), %rdi
leaq 0x180(%rsp), %rsi
leaq 0x120(%rsp), %rdx
leaq 0x100(%rsp), %rcx
movq %r12, %r8
callq 0x4c2ae
jmp 0x493eb
movq %r12, (%rsp)
leaq 0x240(%rsp), %rdi
leaq 0x70(%rsp), %rsi
leaq 0x120(%rsp), %rdx
leaq 0x1a0(%rsp), %rcx
leaq 0x180(%rsp), %r8
leaq 0x100(%rsp), %r9
callq 0x4bfc8
movq 0x28(%rsp), %rbx
incl %ebx
cmpb $0x1, 0x94ec5(%rip)     # 0xde2be
jne 0x4946a
movl %ebx, %eax
cltd
idivl 0x94138(%rip)           # 0xdd53c
testl %edx, %edx
jne 0x4946a
leaq 0x308(%rsp), %rdi
leaq 0x3c(%rsp), %rsi
callq 0x4b106
movq %rax, %rdi
leaq 0x120(%rsp), %rsi
callq 0x4a6ec
leaq 0x3f0(%rsp), %rdi
leaq 0x3c(%rsp), %rsi
callq 0x4b656
movq %rax, %rdi
leaq 0x100(%rsp), %rsi
callq 0x3b656
leaq 0x120(%rsp), %rdi
callq 0x4a7ca
leaq 0x100(%rsp), %rdi
callq 0x4a805
incl 0x3c(%rsp)
movq %r15, %rdi
callq 0x289b4
movl $0x100, %esi            # imm = 0x100
movq %r15, %rdi
callq 0x84a0
movq %r14, %rdi
callq 0x289b4
movl $0x110, %esi            # imm = 0x110
movq %r12, %rdi
callq 0x84a0
movq %rbx, 0x28(%rsp)
movl %ebx, %eax
cltd
movl $0x186a0, %ecx          # imm = 0x186A0
idivl %ecx
testl %edx, %edx
jne 0x49262
movq 0x93b36(%rip), %rdi     # 0xdcfe8
leaq 0x571ed(%rip), %rsi     # 0xa06a6
callq 0x8480
movq %rax, %rdi
movq 0x28(%rsp), %rsi
callq 0x8840
movq %rax, %rdi
leaq 0x5dffa(%rip), %rsi     # 0xa74cf
callq 0x8480
movq %rax, %rdi
callq 0x8230
jmp 0x49262
movq %r13, %rdi
leaq 0x2e8(%rsp), %rsi
pushq $0x9
popq %rdx
callq 0x40349
leaq 0x160(%rsp), %rdi
movq %r13, %rsi
callq 0x2f6c0
movq %r13, %rdi
callq 0x28a08
cmpq $0x0, 0x94d46(%rip)     # 0xde260
je 0x497c8
movq %r13, %rdi
leaq 0x94d2e(%rip), %rsi     # 0xde258
callq 0x4237c
leaq 0x90(%rsp), %rdi
movq %r13, %rsi
callq 0x2f6c0
movq %r13, %rdi
callq 0x28a08
movq 0x98(%rsp), %rbx
subq 0x90(%rsp), %rbx
movq 0x93a8a(%rip), %rdi     # 0xdcfe8
leaq 0x570be(%rip), %rsi     # 0xa0623
callq 0x8480
shrq $0x5, %rbx
leal (%rbx,%rbx), %esi
movq %rax, %rdi
callq 0x8840
movq %rax, %rdi
callq 0x8230
movq %rbx, 0x68(%rsp)
xorl %eax, %eax
movq %rax, 0x8(%rsp)
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rcx
subq %rsi, %rcx
sarq $0x5, %rcx
cmpq %rcx, %rax
je 0x495e5
shlq $0x5, %rax
addq %rax, %rsi
leaq 0x3c0(%rsp), %rdi
callq 0x3210e
movq %rax, %r14
leaq 0x428(%rsp), %rdi
movq %r13, %rsi
callq 0x4a546
movq %rax, %rdi
movq %r14, %rsi
callq 0x82a0
movq 0x8(%rsp), %rax
incq %rax
jmp 0x49588
movq 0x390(%rsp), %r14
leaq 0x380(%rsp), %rax
cmpq %rax, %r14
je 0x496ca
leaq 0x20(%r14), %rsi
movq %r13, %rdi
callq 0x8600
leaq 0x40(%r14), %rsi
leaq 0xb0(%rsp), %rbx
movq %rbx, %rdi
callq 0x297dc
movq %rbp, %rdi
leaq 0x90(%rsp), %rsi
movq %rbx, %rdx
callq 0x427bd
movq 0x40(%rsp), %rax
cmpq 0x48(%rsp), %rax
jne 0x49682
movq 0x939a4(%rip), %rdi     # 0xdcfe8
leaq 0x56ff0(%rip), %rsi     # 0xa063b
callq 0x8480
movq %rax, %rdi
movq %r13, %rsi
callq 0x8430
movq %rax, %rdi
leaq 0x55cca(%rip), %rsi     # 0x9f32f
callq 0x8480
movq %rax, %rdi
callq 0x8230
movq 0x40(%rsp), %rax
cmpq 0x48(%rsp), %rax
je 0x49ed8
leaq 0x458(%rsp), %rdi
movq %r13, %rsi
callq 0x4a596
movq %rax, %rdi
movq %rbp, %rsi
callq 0x4a5fc
movq %rbp, %rdi
callq 0x2f68c
leaq 0xb0(%rsp), %rdi
callq 0x28a08
movq %r13, %rdi
callq 0x8978
movq %r14, %rdi
callq 0x8340
movq %rax, %r14
jmp 0x495ed
leaq 0x240(%rsp), %rdi
movq 0x68(%rsp), %rbx
movl %ebx, %esi
xorl %edx, %edx
callq 0x40386
leaq 0x70(%rsp), %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x40386
leaq 0x1a0(%rsp), %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x40386
leaq 0x220(%rsp), %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x40386
leaq 0x200(%rsp), %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x40386
leaq 0x120(%rsp), %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x40386
leaq 0x180(%rsp), %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x4040a
leaq 0x100(%rsp), %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x4040a
movslq %ebx, %r14
andl $0x0, 0x8(%rsp)
leaq 0x280(%rsp), %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x44dfe
andl $0x0, 0x8(%rsp)
leaq 0x260(%rsp), %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x44dfe
cmpq $0x0, 0x94af1(%rip)     # 0xde280
movq 0x28(%rsp), %rbx
je 0x4925d
movq 0x1c8(%rsp), %rsi
subq 0x1c0(%rsp), %rsi
sarq $0x5, %rsi
andl $0x0, 0x8(%rsp)
leaq 0x2c0(%rsp), %rdi
movq %r13, %rdx
callq 0x44dfe
jmp 0x4925d
movl $0x120, %r14d           # imm = 0x120
pushq $0x9
popq %r15
movq 0x160(%rsp), %rsi
movq 0x168(%rsp), %rax
subq %rsi, %rax
sarq $0x5, %rax
cmpq %rax, %r15
je 0x49547
addq %r14, %rsi
leaq 0x90(%rsp), %rdi
callq 0x2b0a4
incq %r15
addq $0x20, %r14
jmp 0x497d2
cmpl $0x0, 0x93d2e(%rip)     # 0xdd540
js 0x4989b
movq 0x937c9(%rip), %rdi     # 0xdcfe8
leaq 0x56e8b(%rip), %rsi     # 0xa06b1
callq 0x8480
movl 0x93d0f(%rip), %esi     # 0xdd540
movq %rax, %rdi
callq 0x8840
movq %rax, %rdi
callq 0x8230
movq 0x70(%rsp), %rcx
movq 0x78(%rsp), %rax
subq %rcx, %rax
cqto
pushq $0x18
popq %rsi
idivq %rsi
cvtsi2sdl 0x93ce2(%rip), %xmm0 # 0xdd540
xorl %edx, %edx
cmpq %rax, %rdx
je 0x4989b
imulq $0x18, %rdx, %rdi
movq (%rcx,%rdi), %rsi
movq 0x8(%rcx,%rdi), %rdi
subq %rsi, %rdi
sarq $0x3, %rdi
xorl %r8d, %r8d
cmpq %r8, %rdi
je 0x49896
movsd (%rsi,%r8,8), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%rsi,%r8,8)
incq %r8
jmp 0x4987c
incq %rdx
jmp 0x49860
cmpb $0x1, 0x94a1c(%rip)     # 0xde2be
jne 0x49c67
xorl %eax, %eax
leaq 0x140(%rsp), %rbp
leaq 0xb0(%rsp), %r15
leaq 0x308(%rsp), %r13
leaq 0x3f0(%rsp), %r12
cmpl $0x64, %eax
je 0x49c67
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
leaq 0x56ddd(%rip), %rdx     # 0xa06c7
callq 0x28806
movq %rbp, %rdi
movl %ebx, %esi
callq 0x28ad3
movq %r15, %rdi
leaq 0x40(%rsp), %rsi
movq %rbp, %rdx
callq 0x28a48
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
leaq 0x6350d(%rip), %rdx     # 0xace25
callq 0x28a29
movq %r15, %rdi
callq 0x8978
movq %rbp, %rdi
callq 0x8978
leaq 0x40(%rsp), %rdi
callq 0x8978
movl $0x200, %edi            # imm = 0x200
callq 0x8490
movq %rbx, 0x2d8(%rsp)
movq 0x8(%rsp), %rsi
movq %rax, 0x138(%rsp)
movq %rax, %rdi
pushq $0x10
popq %rdx
callq 0x84e0
xorpd %xmm0, %xmm0
movapd %xmm0, 0xb0(%rsp)
andq $0x0, 0xc0(%rsp)
movq %r15, %rdi
movq 0x68(%rsp), %rbx
movl %ebx, %esi
xorl %edx, %edx
callq 0x40386
xorpd %xmm0, %xmm0
movapd %xmm0, 0x40(%rsp)
andq $0x0, 0x50(%rsp)
leaq 0x40(%rsp), %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x40386
xorl %eax, %eax
movq 0x68(%rsp), %rbx
cmpl 0x320(%rsp), %eax
jge 0x49add
movl %eax, 0xdc(%rsp)
callq 0x8160
cltq
xorl %edx, %edx
divq 0x320(%rsp)
movl %edx, 0x140(%rsp)
movq 0x70(%rsp), %rcx
movq 0x78(%rsp), %rsi
xorl %r14d, %r14d
movq %rsi, %rax
subq %rcx, %rax
cqto
pushq $0x18
popq %rdi
idivq %rdi
cltq
cmpq %rax, %r14
jge 0x49acf
imulq $0x18, %r14, %rbx
xorl %r15d, %r15d
movq %rsi, %rax
subq %rcx, %rax
cqto
pushq $0x18
popq %rdi
idivq %rdi
cltq
cmpq %rax, %r15
jge 0x49abf
movq 0xb0(%rsp), %rax
movq (%rax,%rbx), %rax
movsd (%rax,%r15,8), %xmm0
movsd %xmm0, 0x30(%rsp)
movq %r13, %rdi
movq %rbp, %rsi
callq 0x4b106
movq (%rax), %rax
movq (%rax,%rbx), %rax
movsd 0x30(%rsp), %xmm0
addsd (%rax,%r15,8), %xmm0
movq 0xb0(%rsp), %rax
movq (%rax,%rbx), %rax
movsd %xmm0, (%rax,%r15,8)
movq 0x40(%rsp), %rax
movq (%rax,%rbx), %rax
movsd (%rax,%r15,8), %xmm0
movsd %xmm0, 0x30(%rsp)
movq %r12, %rdi
movq %rbp, %rsi
callq 0x4b656
movq (%rax), %rax
movq (%rax,%rbx), %rax
cvtsi2sdl (%rax,%r15,4), %xmm0
movsd 0x30(%rsp), %xmm1
addsd %xmm0, %xmm1
movq 0x40(%rsp), %rax
movq (%rax,%rbx), %rax
movsd %xmm1, (%rax,%r15,8)
incq %r15
movq 0x70(%rsp), %rcx
movq 0x78(%rsp), %rsi
jmp 0x49a06
incq %r14
leaq 0xb0(%rsp), %r15
jmp 0x499e6
movl 0xdc(%rsp), %eax
incl %eax
jmp 0x499a8
xorpd %xmm0, %xmm0
movapd %xmm0, 0x140(%rsp)
andq $0x0, 0x150(%rsp)
movq %rbp, %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x40386
xorpd %xmm0, %xmm0
movapd %xmm0, 0x1e0(%rsp)
andq $0x0, 0x1f0(%rsp)
leaq 0x1e0(%rsp), %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x40386
movl 0x93a10(%rip), %ecx     # 0xdd53c
imull 0x320(%rsp), %ecx
movq 0x78(%rsp), %rax
subq 0x70(%rsp), %rax
cqto
cvtsi2sd %ecx, %xmm0
pushq $0x18
popq %rcx
idivq %rcx
testl %eax, %eax
movl $0x0, %ecx
cmovgl %eax, %ecx
movl %eax, %eax
xorl %edx, %edx
cmpq %rcx, %rdx
je 0x49bd1
imulq $0x18, %rdx, %rsi
movq 0x40(%rsp), %rdi
addq %rsi, %rdi
movq 0x140(%rsp), %r8
addq %rsi, %r8
movq 0xb0(%rsp), %r9
addq %rsi, %r9
addq 0x1e0(%rsp), %rsi
xorl %r10d, %r10d
cmpq %r10, %rax
je 0x49bcc
movq (%rdi), %r11
movsd (%r11,%r10,8), %xmm1
divsd %xmm0, %xmm1
movsd 0x4da4c(%rip), %xmm2    # 0x975f0
subsd %xmm1, %xmm2
movq (%r8), %r11
movsd %xmm2, (%r11,%r10,8)
movq (%r9), %r11
movsd (%r11,%r10,8), %xmm1
divsd %xmm2, %xmm1
movq (%rsi), %r11
movsd %xmm1, (%r11,%r10,8)
incq %r10
jmp 0x49b8a
incq %rdx
jmp 0x49b58
leaq 0x3a8(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x297dc
movq 0x138(%rsp), %r14
leaq 0x3a8(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
pushq $0x9
popq %rdx
pushq $0x1
popq %rcx
callq 0x2ea24
movq %rbx, %rdi
callq 0x28a08
leaq 0x1e0(%rsp), %rdi
movq %r14, %rsi
callq 0x4892d
movq %r14, %rdi
callq 0x8620
leaq 0x1e0(%rsp), %rdi
callq 0x37c74
movq %rbp, %rdi
callq 0x37c74
leaq 0x40(%rsp), %rdi
callq 0x37c74
movq %r15, %rdi
callq 0x37c74
leaq 0x8(%rsp), %rdi
callq 0x8978
movq 0x2d8(%rsp), %rax
incl %eax
jmp 0x498ca
leaq 0x8(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0x4048d
cmpb $0x1, 0x94638(%rip)     # 0xde2b8
jne 0x49ca7
leaq 0xe0(%rsp), %rdi
leaq 0x90(%rsp), %rsi
leaq 0x280(%rsp), %rdx
leaq 0x260(%rsp), %rcx
callq 0x47934
cmpb $0x1, 0x9460c(%rip)     # 0xde2ba
jne 0x49cd4
leaq 0x945c1(%rip), %rdx     # 0xde278
leaq 0xe0(%rsp), %rdi
leaq 0x1c0(%rsp), %rsi
leaq 0x2c0(%rsp), %rcx
callq 0x47cb3
cmpb $0x1, 0x945e2(%rip)     # 0xde2bd
jne 0x49d22
leaq 0x1a0(%rsp), %rdi
callq 0x436e1
leaq 0x180(%rsp), %rax
movq %rax, (%rsp)
leaq 0x8(%rsp), %rdi
leaq 0x90(%rsp), %rsi
leaq 0x240(%rsp), %rcx
leaq 0x70(%rsp), %r8
leaq 0x1a0(%rsp), %r9
movq 0x28(%rsp), %rdx
callq 0x47e9f
cmpb $0x1, 0x94592(%rip)     # 0xde2bb
jne 0x49d4d
leaq 0xe0(%rsp), %rdi
leaq 0x90(%rsp), %rsi
leaq 0x220(%rsp), %rcx
movq 0x28(%rsp), %rdx
callq 0x4848c
cmpb $0x1, 0x94568(%rip)     # 0xde2bc
jne 0x49d78
leaq 0xe0(%rsp), %rdi
leaq 0x90(%rsp), %rsi
leaq 0x200(%rsp), %rcx
movq 0x28(%rsp), %rdx
callq 0x4861f
leaq 0x8(%rsp), %rdi
callq 0x8978
leaq 0x160(%rsp), %rdi
callq 0x28a08
leaq 0x3f0(%rsp), %rdi
callq 0x4a840
leaq 0x308(%rsp), %rdi
callq 0x4a8fe
leaq 0x100(%rsp), %rdi
callq 0x3b73c
leaq 0x120(%rsp), %rdi
callq 0x37c74
leaq 0x180(%rsp), %rdi
callq 0x3b73c
leaq 0x200(%rsp), %rdi
callq 0x37c74
leaq 0x220(%rsp), %rdi
callq 0x37c74
leaq 0x70(%rsp), %rdi
callq 0x37c74
leaq 0x240(%rsp), %rdi
callq 0x37c74
leaq 0x1a0(%rsp), %rdi
callq 0x37c74
leaq 0x360(%rsp), %rdi
callq 0x3b73c
leaq 0x2c0(%rsp), %rdi
callq 0x2aef2
leaq 0x260(%rsp), %rdi
callq 0x2aef2
leaq 0x280(%rsp), %rdi
callq 0x2aef2
leaq 0x1c0(%rsp), %rdi
callq 0x28a08
leaq 0x2a0(%rsp), %rdi
callq 0x28a08
leaq 0x428(%rsp), %rdi
callq 0x4a9bc
leaq 0x458(%rsp), %rdi
callq 0x4aa20
leaq 0x3c0(%rsp), %rdi
callq 0x33008
leaq 0x378(%rsp), %rdi
callq 0x32f44
leaq 0x90(%rsp), %rdi
callq 0x28a08
leaq 0xe0(%rsp), %rdi
callq 0x8978
leaq 0x340(%rsp), %rdi
callq 0x8978
leaq 0x2e8(%rsp), %rdi
callq 0x8978
xorl %eax, %eax
addq $0x488, %rsp            # imm = 0x488
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x56786(%rip), %rdi     # 0xa0665
leaq 0x5678e(%rip), %rsi     # 0xa0674
leaq 0x5679d(%rip), %rcx     # 0xa068a
movl $0xd5, %edx
callq 0x82f0
movq %rax, %rbx
jmp 0x49f4f
movq %rax, %rbx
jmp 0x49f5c
movq %rax, %rbx
jmp 0x49f69
jmp 0x4a080
jmp 0x4a080
jmp 0x4a080
jmp 0x4a080
jmp 0x4a0d3
jmp 0x4a0d3
jmp 0x4a0d3
jmp 0x4a0d3
jmp 0x4a0d3
jmp 0x4a0d3
jmp 0x4a0c4
jmp 0x4a080
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x8978
leaq 0xb0(%rsp), %rdi
callq 0x8978
leaq 0x140(%rsp), %rdi
callq 0x8978
leaq 0x40(%rsp), %rdi
jmp 0x4a128
jmp 0x4a0c4
jmp 0x4a0c4
jmp 0x4a0c4
jmp 0x4a0c4
jmp 0x4a080
movq %rax, %rbx
pushq $0x38
popq %rsi
jmp 0x49f9c
movq %rax, %rbx
movl $0x208, %esi            # imm = 0x208
movq %r14, %rdi
callq 0x84a0
jmp 0x4a160
movq %rax, %rbx
movl $0x208, %esi            # imm = 0x208
movq %r14, %rdi
callq 0x84a0
jmp 0x4a213
jmp 0x4a0d3
movq %rax, %rbx
movl $0x110, %esi            # imm = 0x110
movq %r12, %rdi
callq 0x84a0
jmp 0x4a153
jmp 0x4a0d3
jmp 0x4a0d3
jmp 0x4a0af
movq %rax, %rbx
jmp 0x4a27b
movq %rax, %rbx
jmp 0x4a288
jmp 0x4a088
movq %rax, %rbx
jmp 0x4a098
movq %rax, %rbx
leaq 0x3a8(%rsp), %rdi
callq 0x28a08
jmp 0x4a08b
jmp 0x4a0af
jmp 0x4a0d3
jmp 0x4a12f
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0x8978
jmp 0x4a042
movq %rax, %rbx
jmp 0x4a13c
movq %rax, %rbx
leaq 0x140(%rsp), %rdi
callq 0x8978
jmp 0x4a06e
movq %rax, %rbx
movl $0x200, %esi            # imm = 0x200
movq 0x138(%rsp), %rdi
callq 0x84a0
jmp 0x4a149
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
jmp 0x4a14e
jmp 0x4a0cb
jmp 0x4a0d3
jmp 0x4a0d3
jmp 0x4a0d3
movq %rax, %rbx
jmp 0x4a160
movq %rax, %rbx
leaq 0x1e0(%rsp), %rdi
callq 0x37c74
leaq 0x140(%rsp), %rdi
callq 0x37c74
jmp 0x4a132
movq %rax, %rbx
jmp 0x4a0e5
movq %rax, %rbx
jmp 0x4a149
jmp 0x4a0d3
jmp 0x4a0d3
movq %rax, %rbx
jmp 0x4a119
jmp 0x4a0c4
jmp 0x4a0cb
movq %rax, %rbx
jmp 0x4a123
jmp 0x4a0cb
movq %rax, %rbx
jmp 0x4a213
movq %rax, %rbx
jmp 0x4a153
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x2f68c
leaq 0xb0(%rsp), %rdi
callq 0x28a08
jmp 0x4a149
movq %rax, %rbx
leaq 0x308(%rsp), %rdi
callq 0x28a08
jmp 0x4a213
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0x8978
leaq 0x40(%rsp), %rdi
callq 0x28a08
leaq 0x8(%rsp), %rdi
callq 0x8978
jmp 0x4a160
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x37c74
leaq 0xb0(%rsp), %rdi
callq 0x37c74
leaq 0x8(%rsp), %rdi
callq 0x8978
leaq 0x160(%rsp), %rdi
callq 0x28a08
leaq 0x3f0(%rsp), %rdi
callq 0x4a840
leaq 0x308(%rsp), %rdi
callq 0x4a8fe
leaq 0x100(%rsp), %rdi
callq 0x3b73c
leaq 0x120(%rsp), %rdi
callq 0x37c74
leaq 0x180(%rsp), %rdi
callq 0x3b73c
leaq 0x200(%rsp), %rdi
callq 0x37c74
leaq 0x220(%rsp), %rdi
callq 0x37c74
leaq 0x70(%rsp), %rdi
callq 0x37c74
leaq 0x240(%rsp), %rdi
callq 0x37c74
leaq 0x1a0(%rsp), %rdi
callq 0x37c74
leaq 0x360(%rsp), %rdi
callq 0x3b73c
leaq 0x2c0(%rsp), %rdi
callq 0x2aef2
leaq 0x260(%rsp), %rdi
callq 0x2aef2
leaq 0x280(%rsp), %rdi
callq 0x2aef2
leaq 0x1c0(%rsp), %rdi
callq 0x28a08
leaq 0x2a0(%rsp), %rdi
callq 0x28a08
leaq 0x428(%rsp), %rdi
callq 0x4a9bc
leaq 0x458(%rsp), %rdi
callq 0x4aa20
leaq 0x3c0(%rsp), %rdi
callq 0x33008
leaq 0x378(%rsp), %rdi
callq 0x32f44
leaq 0x90(%rsp), %rdi
callq 0x28a08
leaq 0xe0(%rsp), %rdi
callq 0x8978
leaq 0x340(%rsp), %rdi
callq 0x8978
leaq 0x2e8(%rsp), %rdi
callq 0x8978
movq %rbx, %rdi
callq 0x8870