// File: /workspace/github_cpp_makefile_star2_O3/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 0x5d5e3
leaq 0x150(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x170(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0xa7fb0(%rip), %rsi     # 0x103208
movq 0xa7fb1(%rip), %rdx     # 0x103210
addq %rsi, %rdx
leaq 0x160(%rsp), %rdi
callq 0x2ba06
leaq 0x110(%rsp), %rdi
leaq 0x160(%rsp), %rsi
callq 0x4d82f
xorl %eax, %eax
movq %rax, 0x90(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x80(%rsp)
leaq 0x368(%rsp), %rcx
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq 0x3c8(%rsp), %rcx
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq 0x460(%rsp), %rcx
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq 0x430(%rsp), %rcx
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
movq %rax, 0x310(%rsp)
movapd %xmm0, 0x300(%rsp)
movq %rax, 0x270(%rsp)
movapd %xmm0, 0x260(%rsp)
cmpq %rax, 0xa7f24(%rip)     # 0x103250
je 0x5b4ff
movl $0x208, %edi            # imm = 0x208
callq 0x8470
movq %rax, %r14
movq 0xa7f02(%rip), %rsi     # 0x103248
movq %rax, %rdi
movl $0x8, %edx
callq 0x8860
leaq 0x140(%rsp), %rbx
leaq 0x320(%rsp), %r15
leaq 0x360(%rsp), %r12
leaq 0x3c0(%rsp), %r13
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 0x5b406
movq %r15, %rdi
movq %rbx, %rsi
movl $0x9, %edx
callq 0x4d650
movq 0x320(%rsp), %rsi
addq $0x20, %rsi
movq %r12, %rdi
callq 0x46fb4
movq 0x320(%rsp), %rsi
movq %rax, %rdi
callq 0x3133c
movq 0x320(%rsp), %rbp
movq %r13, %rdi
movq %rbp, %rsi
callq 0x3b46e
addq $0x20, %rbp
movq %rax, %rdi
movq %rbp, %rsi
callq 0x8270
movq %r15, %rdi
callq 0x2e784
jmp 0x5b373
movq 0x378(%rsp), %rbx
leaq 0x368(%rsp), %rax
cmpq %rax, %rbx
je 0x5b489
leaq 0x300(%rsp), %r14
leaq 0x7506c(%rip), %r15     # 0xd0496
leaq 0x7695f(%rip), %r12     # 0xd1d90
leaq 0x260(%rsp), %r13
leaq 0x20(%rbx), %rbp
movq %r14, %rdi
movq %rbp, %rsi
callq 0x3133c
movq %rbp, %rdi
movq %r15, %rsi
callq 0x8160
testl %eax, %eax
je 0x5b471
movq %rbp, %rdi
movq %r12, %rsi
callq 0x8160
testl %eax, %eax
je 0x5b471
movq %r13, %rdi
movq %rbp, %rsi
callq 0x3133c
movq %rbx, %rdi
callq 0x8310
movq %rax, %rbx
leaq 0x368(%rsp), %rax
cmpq %rax, %rbx
jne 0x5b439
movq 0xa6b58(%rip), %rdi     # 0x101fe8
leaq 0x85ad2(%rip), %rsi     # 0xe0f69
movl $0xa, %edx
callq 0x84e0
movq 0x308(%rsp), %rsi
subq 0x300(%rsp), %rsi
sarq $0x5, %rsi
movq 0xa6b2c(%rip), %rdi     # 0x101fe8
callq 0x82f0
movq %rax, %rbx
leaq 0x768c9(%rip), %rsi     # 0xd1d94
movl $0xd, %edx
movq %rax, %rdi
callq 0x84e0
movq (%rbx), %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
xorpd %xmm0, %xmm0
movapd %xmm0, 0x1e0(%rsp)
xorl %eax, %eax
movq %rax, 0x1f0(%rsp)
movq %rax, 0x1d0(%rsp)
movapd %xmm0, 0x1c0(%rsp)
movq %rax, 0x250(%rsp)
movapd %xmm0, 0x240(%rsp)
movq %rax, 0x3a0(%rsp)
movapd %xmm0, 0x390(%rsp)
movq %rax, 0x230(%rsp)
movapd %xmm0, 0x220(%rsp)
movq %rax, 0x2f0(%rsp)
movapd %xmm0, 0x2e0(%rsp)
movq %rax, 0x100(%rsp)
movapd %xmm0, 0xf0(%rsp)
movq %rax, 0x2d0(%rsp)
movapd %xmm0, 0x2c0(%rsp)
movq %rax, 0x2b0(%rsp)
movapd %xmm0, 0x2a0(%rsp)
movq %rax, 0x210(%rsp)
movapd %xmm0, 0x200(%rsp)
movq %rax, 0x1b0(%rsp)
movapd %xmm0, 0x1a0(%rsp)
movq %rax, 0x190(%rsp)
movapd %xmm0, 0x180(%rsp)
leaq 0x350(%rsp), %rcx
movq %rcx, -0x30(%rcx)
movl $0x1, %edx
movq %rdx, -0x28(%rcx)
movupd %xmm0, -0x20(%rcx)
movl $0x3f800000, %esi       # imm = 0x3F800000
movl %esi, -0x10(%rcx)
movupd %xmm0, -0x8(%rcx)
leaq 0x420(%rsp), %rcx
movq %rcx, -0x30(%rcx)
movq %rdx, -0x28(%rcx)
movupd %xmm0, -0x20(%rcx)
movl %esi, -0x10(%rcx)
movupd %xmm0, -0x8(%rcx)
cmpq %rax, 0xa7c54(%rip)     # 0x103270
je 0x5b90f
movl $0x208, %edi            # imm = 0x208
callq 0x8470
movq %rax, %r14
leaq 0xa7c32(%rip), %rsi     # 0x103268
movq %rax, %rdi
movl $0x8, %edx
callq 0x8740
movq %r14, 0x358(%rsp)
movq 0xa6996(%rip), %rbx     # 0x101fe8
leaq 0x76749(%rip), %rsi     # 0xd1da2
movl $0x28, %edx
movq %rbx, %rdi
callq 0x84e0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq 0xa6964(%rip), %rdi     # 0x101fe8
callq 0x8040
movq %rax, %rdi
callq 0x8300
movl $0x38, %edi
callq 0x8470
movq %rax, %r14
leaq 0x358(%rsp), %rsi
movq %rax, %rdi
callq 0x4675a
movq 0xa6933(%rip), %rbx     # 0x101fe8
leaq 0x706eb(%rip), %rsi     # 0xcbda7
movl $0x4, %edx
movq %rbx, %rdi
callq 0x84e0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq 0xa6901(%rip), %rdi     # 0x101fe8
callq 0x8040
movq %rax, %rdi
callq 0x8300
movq 0x160(%rsp), %rsi
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x287de
leaq 0x10(%rsp), %rdi
movl $0x8, %esi
callq 0x500af
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5b738
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x10(%rsp), %r15
leaq 0x20(%rsp), %rax
movq %rax, (%r15)
movq $0x0, 0x8(%r15)
movb $0x0, 0x10(%r15)
leaq 0x50(%rsp), %r13
leaq 0x7226c(%rip), %r12     # 0xcd9ca
movq %rbx, 0xc8(%rsp)
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x8870
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x5b8ea
movq %r13, %rdi
movq %r15, %rsi
movl $0x9, %edx
callq 0x4d650
movq 0x50(%rsp), %rax
leaq 0x40(%rsp), %rcx
movq %rcx, 0x30(%rsp)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x30(%rsp), %rdi
callq 0x2ba06
movq 0x50(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x86e0
testl %eax, %eax
jle 0x5b8af
movl %eax, %r15d
xorl %ebx, %ebx
movl 0xa6d1a(%rip), %ecx     # 0x102508
addl %ebx, %ecx
movq %r14, %rdi
leaq 0x30(%rsp), %rsi
movl %ebx, %edx
callq 0x470ac
movl %eax, %ebp
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0xa67a6(%rip), %rdi     # 0x101fb8
callq 0x84e0
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x84e0
movq %r13, %rdi
movl %ebx, %esi
callq 0x8810
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x84e0
movl 0xa6cbb(%rip), %esi     # 0x102508
addl %ebx, %esi
movq %r13, %rdi
callq 0x8810
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x84e0
movq %r13, %rdi
movl %ebp, %esi
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
movl 0xa6c64(%rip), %ecx     # 0x102508
addl %ecx, %ebx
cmpl %r15d, %ebx
jl 0x5b7ee
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
leaq 0x10(%rsp), %r15
je 0x5b8d0
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x50(%rsp), %r13
movq %r13, %rdi
callq 0x2e784
movq 0xc8(%rsp), %rbx
jmp 0x5b766
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x5ceee
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x5ceee
movq 0xa66d2(%rip), %rdi     # 0x101fe8
leaq 0x764ae(%rip), %rsi     # 0xd1dcb
movl $0x1d, %edx
callq 0x84e0
movq 0x160(%rsp), %rsi
movq 0x168(%rsp), %rdx
movq 0xa66aa(%rip), %rdi     # 0x101fe8
callq 0x84e0
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
cmpb $0x1, 0xa7914(%rip)     # 0x103288
jne 0x5bac0
movq 0xa6667(%rip), %rdi     # 0x101fe8
leaq 0x76461(%rip), %rsi     # 0xd1de9
movl $0x34, %edx
callq 0x84e0
leaq 0x20(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x110(%rsp), %rsi
movq 0x118(%rsp), %rdx
addq %rsi, %rdx
leaq 0x10(%rsp), %rdi
callq 0x2ba06
leaq 0x7601e(%rip), %rsi     # 0xd19dd
leaq 0x10(%rsp), %rdi
callq 0x88c0
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0xa660e(%rip), %rdi     # 0x101fe8
callq 0x84e0
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), %rdi
cmpq %r14, %rdi
je 0x5ba20
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0xa65c1(%rip), %rdi     # 0x101fe8
leaq 0x763f0(%rip), %rsi     # 0xd1e1e
movl $0x4e, %edx
callq 0x84e0
leaq 0x10(%rsp), %rdi
movq %r14, (%rdi)
movq 0x110(%rsp), %rsi
movq 0x118(%rsp), %rdx
addq %rsi, %rdx
callq 0x2ba06
leaq 0x75f88(%rip), %rsi     # 0xd19e7
leaq 0x10(%rsp), %rdi
callq 0x88c0
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0xa656e(%rip), %rdi     # 0x101fe8
callq 0x84e0
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), %rdi
cmpq %r14, %rdi
je 0x5bac0
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x8480
cmpb $0x1, 0xa77c2(%rip)     # 0x103289
jne 0x5bb73
movq 0xa6514(%rip), %rdi     # 0x101fe8
leaq 0x76392(%rip), %rsi     # 0xd1e6d
movl $0x39, %edx
callq 0x84e0
leaq 0x20(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x110(%rsp), %rsi
movq 0x118(%rsp), %rdx
addq %rsi, %rdx
leaq 0x10(%rsp), %rdi
callq 0x2ba06
leaq 0x75dcd(%rip), %rsi     # 0xd18df
leaq 0x10(%rsp), %rdi
callq 0x88c0
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0xa64bb(%rip), %rdi     # 0x101fe8
callq 0x84e0
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), %rdi
cmpq %r14, %rdi
je 0x5bb73
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x8480
cmpb $0x1, 0xa7710(%rip)     # 0x10328a
jne 0x5bdca
movq 0xa6461(%rip), %rdi     # 0x101fe8
leaq 0x76319(%rip), %rsi     # 0xd1ea7
movl $0x3b, %edx
callq 0x84e0
movq 0xa76a9(%rip), %rsi     # 0x103248
movq 0xa76aa(%rip), %rdx     # 0x103250
movq 0xa643b(%rip), %rdi     # 0x101fe8
callq 0x84e0
movq %rax, %rbx
leaq 0x76245(%rip), %rsi     # 0xd1e01
movl $0x1c, %edx
movq %rax, %rdi
callq 0x84e0
leaq 0x60(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x110(%rsp), %rsi
movq 0x118(%rsp), %rdx
addq %rsi, %rdx
leaq 0x50(%rsp), %rdi
callq 0x2ba06
leaq 0x79486(%rip), %rsi     # 0xd507c
leaq 0x50(%rsp), %rdi
callq 0x88c0
leaq 0xa7641(%rip), %rsi     # 0x103248
leaq 0xa0(%rsp), %rdi
callq 0x4d82f
movq 0x50(%rsp), %rcx
movq 0x58(%rsp), %r8
movq 0xa8(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r14, %rcx
je 0x5bc39
movq 0x60(%rsp), %rdi
movq 0xa0(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x5bc65
leaq 0xb0(%rsp), %r9
movl $0xf, %edi
cmpq %r9, %rsi
je 0x5bc60
movq 0xb0(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x5bc71
leaq 0x50(%rsp), %rdi
callq 0x8180
jmp 0x5bc82
leaq 0xa0(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x84d0
leaq 0x40(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x5bca6
movq %rsi, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0x5bcae
movupd (%rcx), %xmm0
movupd %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x38(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x75d67(%rip), %rsi     # 0xd1a39
leaq 0x30(%rsp), %rdi
callq 0x88c0
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5bd03
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0x5bd0c
movupd (%rcx), %xmm0
movupd %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %rbx, %rdi
callq 0x84e0
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), %rdi
cmpq %r15, %rdi
je 0x5bd77
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5bd92
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0xb0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5bdb3
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x5bdca
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x160(%rsp), %rsi
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x287de
leaq 0x10(%rsp), %rdi
movl $0x8, %esi
callq 0x500af
movq %rax, %r12
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5be0e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x7c(%rsp), %rax
movl $0x0, (%rax)
xorpd %xmm0, %xmm0
leaq 0xd0(%rsp), %rax
movapd %xmm0, (%rax)
movq $0x0, 0x10(%rax)
leaq 0x30(%rsp), %r13
movq %rax, 0x108(%rsp)
movl $0x0, 0x78(%rsp)
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %edx
movq %r12, %rdi
leaq 0x140(%rsp), %rsi
callq 0x8870
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x5c731
movq 0x140(%rsp), %rax
cmpb $0x23, (%rax)
jne 0x5bf94
movzbl 0x1(%rax), %eax
cmpl $0x23, %eax
je 0x5be46
cmpl $0x43, %eax
jne 0x5bf94
movq %r13, %rdi
leaq 0x140(%rsp), %rsi
movl $0x9, %edx
callq 0x4d650
movq 0xe0(%rsp), %rax
movapd 0x30(%rsp), %xmm0
movq 0x40(%rsp), %rcx
movq %rcx, 0xe0(%rsp)
movapd 0xd0(%rsp), %xmm1
movapd %xmm0, 0xd0(%rsp)
movapd %xmm1, 0x10(%rsp)
movq %rax, 0x20(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x2e784
movq %r13, %rdi
callq 0x2e784
cmpq $0x0, 0xa7313(%rip)     # 0x103230
je 0x5c397
movq %r13, %rdi
leaq 0xa72fb(%rip), %rsi     # 0x103228
callq 0x4fe41
movq 0x90(%rsp), %rax
movapd 0x30(%rsp), %xmm0
movq 0x40(%rsp), %rcx
movq %rcx, 0x90(%rsp)
movapd 0x80(%rsp), %xmm1
movapd %xmm0, 0x80(%rsp)
movapd %xmm1, 0x10(%rsp)
movq %rax, 0x20(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x2e784
movq %r13, %rdi
callq 0x2e784
jmp 0x5c3f0
movq %r13, %rdi
leaq 0x140(%rsp), %rsi
movl $0x9, %edx
callq 0x4d650
movq 0xe0(%rsp), %rax
movapd 0x30(%rsp), %xmm0
movq 0x40(%rsp), %rcx
movq %rcx, 0xe0(%rsp)
movapd 0xd0(%rsp), %xmm1
movapd %xmm0, 0xd0(%rsp)
movapd %xmm1, 0x10(%rsp)
movq %rax, 0x20(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x2e784
movq %r13, %rdi
callq 0x2e784
movl $0x110, %edi            # imm = 0x110
callq 0x8470
movq %rax, %rbx
movq %rax, %rdi
callq 0x5db1e
movl $0x100, %edi            # imm = 0x100
callq 0x8470
movq %rax, %r15
movabsq $0x7fffffff00000000, %rax # imm = 0x7FFFFFFF00000000
movq %rax, (%r15)
xorl %ecx, %ecx
movl %ecx, 0x8(%r15)
leaq 0x20(%r15), %rax
movq %rax, 0x10(%r15)
movq %rcx, 0x18(%r15)
movb %cl, 0x20(%r15)
leaq 0x40(%r15), %rax
movq %rax, 0x30(%r15)
movq %rcx, 0x38(%r15)
movb %cl, 0x40(%r15)
movsd 0x6fcbd(%rip), %xmm0    # 0xcbd20
movupd %xmm0, 0x50(%r15)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x60(%r15)
movb %cl, 0x68(%r15)
movq %rcx, 0xe0(%r15)
movl %ecx, 0xe8(%r15)
movq %rcx, 0xf0(%r15)
movw $0x0, 0xf8(%r15)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x70(%r15)
movupd %xmm0, 0x80(%r15)
movupd %xmm0, 0x90(%r15)
movupd %xmm0, 0xa0(%r15)
movupd %xmm0, 0xb0(%r15)
movupd %xmm0, 0xc0(%r15)
movupd %xmm0, 0xcc(%r15)
leaq 0xd0(%rsp), %rdi
movq %r15, %rsi
callq 0x4e13c
leaq 0x10(%r15), %rsi
movl 0x8(%r15), %eax
movl %eax, 0x10(%rbx)
movq (%r15), %rax
movq %rax, 0x8(%rbx)
leaq 0x18(%rbx), %rdi
callq 0x8270
leaq 0x30(%r15), %rsi
leaq 0x38(%rbx), %rdi
callq 0x8270
leaq 0x50(%r15), %rax
leaq 0x70(%r15), %rsi
movupd (%rax), %xmm0
movupd 0x9(%rax), %xmm1
movupd %xmm1, 0x61(%rbx)
movupd %xmm0, 0x58(%rbx)
leaq 0x78(%rbx), %rdi
callq 0x30ee4
leaq 0x90(%rbx), %rdi
leaq 0x88(%r15), %rsi
callq 0x30ee4
leaq 0xa8(%rbx), %rdi
leaq 0xa0(%r15), %rsi
callq 0x30ee4
leaq 0xc0(%rbx), %rdi
leaq 0xb8(%r15), %rsi
callq 0x30ee4
leaq 0xd8(%rbx), %rdi
movq %r15, %rsi
addq $0xd0, %rsi
callq 0x30fc8
movzwl 0xf8(%r15), %eax
movw %ax, 0x100(%rbx)
testb %al, %al
jne 0x5c1eb
cmpb $0x1, 0xa70e9(%rip)     # 0x103288
jne 0x5c1b9
leaq 0x1e0(%rsp), %rdi
leaq 0x1c0(%rsp), %rsi
movq %rbx, %rdx
callq 0x5ed3c
cmpb $0x1, 0xa70cb(%rip)     # 0x10328b
jne 0x5c1d2
leaq 0x2c0(%rsp), %rdi
movq %rbx, %rsi
callq 0x5fad3
cmpb $0x1, 0xa70b3(%rip)     # 0x10328c
jne 0x5c1eb
leaq 0x2a0(%rsp), %rdi
movq %rbx, %rsi
callq 0x5fc3a
cmpb $0x1, 0xa709b(%rip)     # 0x10328d
jne 0x5c260
cmpb $0x0, 0x101(%rbx)
je 0x5c227
leaq 0xf0(%rsp), %rdi
leaq 0x200(%rsp), %rsi
leaq 0x1a0(%rsp), %rdx
leaq 0x180(%rsp), %rcx
movq %rbx, %r8
callq 0x5f6f2
jmp 0x5c260
movq %rbx, (%rsp)
leaq 0x2e0(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
leaq 0x1a0(%rsp), %rdx
leaq 0x220(%rsp), %rcx
leaq 0x200(%rsp), %r8
leaq 0x180(%rsp), %r9
callq 0x5f466
movl 0x78(%rsp), %ebp
incl %ebp
cmpb $0x1, 0xa7021(%rip)     # 0x10328e
jne 0x5c2de
movl %ebp, %eax
cltd
idivl 0xa6294(%rip)           # 0x10250c
testl %edx, %edx
jne 0x5c2de
leaq 0x320(%rsp), %rdi
leaq 0x7c(%rsp), %rsi
callq 0x5e628
movq %rax, %rdi
leaq 0x1a0(%rsp), %rsi
callq 0x5dbc0
leaq 0x3f0(%rsp), %rdi
leaq 0x7c(%rsp), %rsi
callq 0x5ea68
movq %rax, %rdi
leaq 0x180(%rsp), %rsi
callq 0x47f12
leaq 0x1a0(%rsp), %rdi
callq 0x5dd5d
leaq 0x180(%rsp), %rdi
callq 0x5ddbe
incl 0x7c(%rsp)
movq %rbx, %r14
addq $0x8, %r14
movq %r15, %rdi
callq 0x2e6d0
movl $0x100, %esi            # imm = 0x100
movq %r15, %rdi
callq 0x8480
movq %r14, %rdi
callq 0x2e6d0
movl $0x110, %esi            # imm = 0x110
movq %rbx, %rdi
callq 0x8480
movl %ebp, 0x78(%rsp)
imull $0xbcbe61d, %ebp, %eax  # imm = 0xBCBE61D
addl $0xa7c40, %eax          # imm = 0xA7C40
rorl $0x5, %eax
cmpl $0xa7c4, %eax           # imm = 0xA7C4
ja 0x5be46
movl $0xa, %edx
movq 0xa5cb0(%rip), %rdi     # 0x101fe8
leaq 0x75c27(%rip), %rsi     # 0xd1f66
callq 0x84e0
movq 0xa5c9d(%rip), %rdi     # 0x101fe8
movl 0x78(%rsp), %esi
callq 0x8810
movq %rax, %r14
movl $0x9, %edx
movq %rax, %rdi
leaq 0x7b769(%rip), %rsi     # 0xd7acf
callq 0x84e0
movq (%r14), %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
jmp 0x5be46
movq 0xd0(%rsp), %rsi
movq 0xd8(%rsp), %rax
subq %rsi, %rax
cmpq $0x120, %rax            # imm = 0x120
je 0x5c3f0
movl $0x9, %ebx
movl $0x120, %r14d           # imm = 0x120
addq %r14, %rsi
leaq 0x80(%rsp), %rdi
callq 0x3133c
incq %rbx
movq 0xd0(%rsp), %rsi
movq 0xd8(%rsp), %rax
subq %rsi, %rax
sarq $0x5, %rax
addq $0x20, %r14
cmpq %rax, %rbx
jne 0x5c3bd
movq 0x88(%rsp), %rbx
subq 0x80(%rsp), %rbx
movl $0x17, %edx
movq 0xa5bdc(%rip), %rdi     # 0x101fe8
leaq 0x75ad0(%rip), %rsi     # 0xd1ee3
callq 0x84e0
shrq $0x5, %rbx
leal (%rbx,%rbx), %esi
movq 0xa5bc2(%rip), %rdi     # 0x101fe8
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 %rbx, 0x108(%rsp)
movq $0x0, 0x10(%rsp)
movq 0x80(%rsp), %rax
cmpq %rax, 0x88(%rsp)
je 0x5c4d7
xorl %esi, %esi
shlq $0x5, %rsi
addq %rax, %rsi
leaq 0x3c0(%rsp), %rdi
callq 0x3b46e
movq %rax, %r14
leaq 0x428(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x5d958
movq %rax, %rdi
movq %r14, %rsi
callq 0x8270
movq 0x10(%rsp), %rsi
incq %rsi
movq %rsi, 0x10(%rsp)
movq 0x80(%rsp), %rax
movq 0x88(%rsp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
cmpq %rcx, %rsi
jne 0x5c47a
movq 0x378(%rsp), %r14
leaq 0x368(%rsp), %rax
cmpq %rax, %r14
je 0x5c622
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
addq %rsi, %rdx
leaq 0x10(%rsp), %rdi
callq 0x2ba06
leaq 0x40(%r14), %rsi
movq %r13, %rdi
callq 0x2fc8e
leaq 0x50(%rsp), %rdi
leaq 0x80(%rsp), %rsi
movq %r13, %rdx
callq 0x5038c
movq 0x50(%rsp), %rax
cmpq 0x58(%rsp), %rax
jne 0x5c5b8
movl $0x29, %edx
movq 0xa5aa0(%rip), %rdi     # 0x101fe8
leaq 0x759ac(%rip), %rsi     # 0xd1efb
callq 0x84e0
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0xa5a83(%rip), %rdi     # 0x101fe8
callq 0x84e0
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
leaq 0x740cf(%rip), %rsi     # 0xd064b
callq 0x84e0
movq (%r15), %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 0x50(%rsp), %rax
cmpq 0x58(%rsp), %rax
je 0x5d0ae
leaq 0x458(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x5d9be
movq %rax, %rdi
leaq 0x50(%rsp), %rsi
callq 0x5da3a
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x5c5ee
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq %r13, %rdi
callq 0x2e784
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x5c612
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x8480
movq %r14, %rdi
callq 0x8310
movq %rax, %r14
jmp 0x5c4df
leaq 0x2e0(%rsp), %rdi
movq 0x108(%rsp), %rbx
movl %ebx, %esi
xorl %edx, %edx
callq 0x4d690
leaq 0xf0(%rsp), %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x4d690
leaq 0x220(%rsp), %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x4d690
leaq 0x2c0(%rsp), %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x4d690
leaq 0x2a0(%rsp), %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x4d690
leaq 0x1a0(%rsp), %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x4d690
leaq 0x200(%rsp), %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x4d72f
leaq 0x180(%rsp), %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x4d72f
movslq %ebx, %r14
movl $0x0, 0x10(%rsp)
leaq 0x1e0(%rsp), %rdi
movq %r14, %rsi
leaq 0x10(%rsp), %rbx
movq %rbx, %rdx
callq 0x56106
movl $0x0, 0x10(%rsp)
leaq 0x1c0(%rsp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x56106
cmpq $0x0, 0xa6b58(%rip)     # 0x103250
je 0x5be46
movq 0x268(%rsp), %rsi
subq 0x260(%rsp), %rsi
sarq $0x5, %rsi
movl $0x0, 0x10(%rsp)
leaq 0x240(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x56106
jmp 0x5be46
cmpl $0x0, 0xa5dd8(%rip)     # 0x102510
js 0x5c80f
movq 0xa58a3(%rip), %rdi     # 0x101fe8
leaq 0x75825(%rip), %rsi     # 0xd1f71
movl $0x15, %edx
callq 0x84e0
movl 0xa5db4(%rip), %esi     # 0x102510
movq 0xa5885(%rip), %rdi     # 0x101fe8
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 0xf0(%rsp), %rax
movq 0xf8(%rsp), %rdx
subq %rax, %rdx
je 0x5c80f
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
xorps %xmm0, %xmm0
cvtsi2sdl 0xa5d4c(%rip), %xmm0 # 0x102510
cmpq $0x1, %rcx
adcq $0x0, %rcx
xorl %edx, %edx
leaq (%rdx,%rdx,2), %rdi
movq (%rax,%rdi,8), %rsi
movq 0x8(%rax,%rdi,8), %rdi
subq %rsi, %rdi
je 0x5c807
sarq $0x3, %rdi
cmpq $0x1, %rdi
adcq $0x0, %rdi
xorl %r8d, %r8d
movsd (%rsi,%r8,8), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%rsi,%r8,8)
incq %r8
cmpq %r8, %rdi
jne 0x5c7ef
incq %rdx
cmpq %rcx, %rdx
jne 0x5c7ce
cmpb $0x1, 0xa6a78(%rip)     # 0x10328e
jne 0x5cdb6
leaq 0x40(%rsp), %r15
movq $0x0, 0x130(%rsp)
leaq 0x50(%rsp), %r14
leaq 0xa0(%rsp), %r13
leaq 0x320(%rsp), %rbp
leaq 0x3f0(%rsp), %r12
leaq 0x60(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x110(%rsp), %rsi
movq 0x118(%rsp), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x2ba06
movq %r14, %rdi
leaq 0x7570e(%rip), %rsi     # 0xd1f87
callq 0x88c0
movq %r13, %rdi
movq 0x130(%rsp), %rsi
callq 0x2e7e2
movq 0x50(%rsp), %rcx
movl $0xf, %edi
leaq 0x60(%rsp), %rax
cmpq %rax, %rcx
je 0x5c8a7
movq 0x60(%rsp), %rdi
movq 0x58(%rsp), %r8
movq 0xa0(%rsp), %rsi
movq 0xa8(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rdi, %rax
jbe 0x5c8e4
movl $0xf, %edi
leaq 0xb0(%rsp), %r9
cmpq %r9, %rsi
je 0x5c8df
movq 0xb0(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x5c8ee
movq %r14, %rdi
callq 0x8180
jmp 0x5c8fa
movq %r13, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x84d0
movq %r15, 0x30(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x5c91a
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0x5c923
movupd (%rcx), %xmm0
movupd %xmm0, (%r15)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x38(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x30(%rsp), %rdi
leaq 0x807f9(%rip), %rsi     # 0xdd145
callq 0x88c0
leaq 0x20(%rsp), %rsi
movq %rsi, 0x10(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5c979
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0x5c981
movupd (%rcx), %xmm0
movupd %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x5c9b0
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x5c9d5
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x5c9f1
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x8480
movl $0x200, %edi            # imm = 0x200
callq 0x8470
movq 0x10(%rsp), %rsi
movq %rax, 0x1f8(%rsp)
movq %rax, %rdi
movl $0x10, %edx
callq 0x84c0
xorpd %xmm0, %xmm0
movapd %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
leaq 0x30(%rsp), %rdi
movq 0x108(%rsp), %rbx
movl %ebx, %esi
xorl %edx, %edx
callq 0x4d690
xorpd %xmm0, %xmm0
movapd %xmm0, 0x50(%rsp)
movq $0x0, 0x60(%rsp)
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x4d690
cmpl $0x0, 0x338(%rsp)
jle 0x5cbe2
xorl %ebx, %ebx
callq 0x8140
cltq
movq 0x338(%rsp), %rsi
xorl %edx, %edx
divq %rsi
movl %edx, 0xa0(%rsp)
movq 0xf0(%rsp), %rax
movq 0xf8(%rsp), %rcx
movq %rcx, %rdx
subq %rax, %rdx
shrq $0x3, %rdx
imull $0xaaaaaaab, %edx, %edx # imm = 0xAAAAAAAB
testl %edx, %edx
jle 0x5cbd8
movl %ebx, 0x13c(%rsp)
xorl %r15d, %r15d
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rsi, %rdx
testl %edx, %edx
jle 0x5cbb5
xorl %r14d, %r14d
movq 0x30(%rsp), %rax
leaq (%r15,%r15,2), %rcx
movq (%rax,%rcx,8), %rax
movsd (%rax,%r14,8), %xmm0
movsd %xmm0, 0xc8(%rsp)
movq %rbp, %rdi
movq %r13, %rsi
callq 0x5e628
movq (%rax), %rax
leaq (,%r15,8), %rcx
leaq (%rcx,%rcx,2), %rbx
movq (%rax,%rbx), %rax
movsd 0xc8(%rsp), %xmm0
addsd (%rax,%r14,8), %xmm0
movq 0x30(%rsp), %rax
movq (%rax,%rbx), %rax
movsd %xmm0, (%rax,%r14,8)
movq 0x50(%rsp), %rax
movq (%rax,%rbx), %rax
movsd (%rax,%r14,8), %xmm0
movsd %xmm0, 0xc8(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x5ea68
movq (%rax), %rax
movq (%rax,%rbx), %rax
xorps %xmm0, %xmm0
cvtsi2sdl (%rax,%r14,4), %xmm0
movsd 0xc8(%rsp), %xmm1
addsd %xmm0, %xmm1
movq 0x50(%rsp), %rax
movq (%rax,%rbx), %rax
movsd %xmm1, (%rax,%r14,8)
incq %r14
movq 0xf0(%rsp), %rax
movq 0xf8(%rsp), %rcx
movq %rcx, %rdx
subq %rax, %rdx
shrq $0x3, %rdx
imull $0xaaaaaaab, %edx, %edx # imm = 0xAAAAAAAB
movslq %edx, %rdx
cmpq %rdx, %r14
jl 0x5cadd
jmp 0x5cbb8
movslq %edx, %rdx
incq %r15
cmpq %rdx, %r15
jl 0x5caba
movq 0x338(%rsp), %rsi
leaq 0x40(%rsp), %r15
movl 0x13c(%rsp), %ebx
incl %ebx
cmpl %esi, %ebx
jl 0x5ca6d
xorpd %xmm0, %xmm0
movapd %xmm0, 0xa0(%rsp)
movq $0x0, 0xb0(%rsp)
movq %r13, %rdi
movq 0x108(%rsp), %rbx
movl %ebx, %esi
xorl %edx, %edx
callq 0x4d690
xorpd %xmm0, %xmm0
movapd %xmm0, 0x280(%rsp)
movq $0x0, 0x290(%rsp)
leaq 0x280(%rsp), %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x4d690
movq 0xf8(%rsp), %rax
subq 0xf0(%rsp), %rax
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
testl %eax, %eax
jle 0x5ccf9
movl 0xa58a3(%rip), %edx     # 0x10250c
imull 0x338(%rsp), %edx
movq 0x50(%rsp), %rcx
xorps %xmm0, %xmm0
cvtsi2sd %edx, %xmm0
movq 0xa0(%rsp), %rdx
movq 0x30(%rsp), %rsi
movq 0x280(%rsp), %rdi
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
xorl %r8d, %r8d
leaq (,%r8,8), %r9
leaq (%r9,%r9,2), %rbx
movq (%rcx,%rbx), %r9
movq (%rdx,%rbx), %r10
movq (%rsi,%rbx), %r11
movq (%rdi,%rbx), %rbx
xorl %r14d, %r14d
movsd 0x6fa4f(%rip), %xmm3    # 0xcc710
movsd (%r9,%r14,8), %xmm1
divsd %xmm0, %xmm1
movapd %xmm3, %xmm2
subsd %xmm1, %xmm2
movsd %xmm2, (%r10,%r14,8)
movsd (%r11,%r14,8), %xmm1
divsd %xmm2, %xmm1
movsd %xmm1, (%rbx,%r14,8)
incq %r14
cmpq %r14, %rax
jne 0x5ccc1
incq %r8
cmpq %rax, %r8
jne 0x5cc9a
leaq 0x3a8(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x2fc8e
movq 0x1f8(%rsp), %r14
leaq 0x3a8(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
movl $0x9, %edx
movl $0x1, %ecx
callq 0x36ba0
movq %rbx, %rdi
callq 0x2e784
leaq 0x280(%rsp), %rdi
movq %r14, %rsi
callq 0x5b035
movq %r14, %rdi
callq 0x8600
leaq 0x280(%rsp), %rdi
callq 0x42ffa
movq %r13, %rdi
callq 0x42ffa
leaq 0x50(%rsp), %r14
movq %r14, %rdi
callq 0x42ffa
leaq 0x30(%rsp), %rdi
callq 0x42ffa
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x5cd9b
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x130(%rsp), %rax
incl %eax
movq %rax, 0x130(%rsp)
cmpl $0x64, %eax
jne 0x5c84a
leaq 0x10(%rsp), %rdi
leaq 0x110(%rsp), %rsi
callq 0x4d7cd
cmpb $0x1, 0xa64b9(%rip)     # 0x103288
leaq 0x20(%rsp), %rbx
movl 0x78(%rsp), %ebp
jne 0x5cdff
leaq 0x110(%rsp), %rdi
leaq 0x80(%rsp), %rsi
leaq 0x1e0(%rsp), %rdx
leaq 0x1c0(%rsp), %rcx
callq 0x59582
cmpb $0x1, 0xa6484(%rip)     # 0x10328a
jne 0x5ce2c
leaq 0xa6439(%rip), %rdx     # 0x103248
leaq 0x110(%rsp), %rdi
leaq 0x260(%rsp), %rsi
leaq 0x240(%rsp), %rcx
callq 0x59ae9
cmpb $0x1, 0xa645a(%rip)     # 0x10328d
jne 0x5ce7a
leaq 0x220(%rsp), %rdi
callq 0x51885
leaq 0x200(%rsp), %rax
movq %rax, (%rsp)
leaq 0x10(%rsp), %rdi
leaq 0x80(%rsp), %rsi
leaq 0x2e0(%rsp), %rcx
leaq 0xf0(%rsp), %r8
leaq 0x220(%rsp), %r9
movl %ebp, %edx
callq 0x59f05
cmpb $0x1, 0xa640a(%rip)     # 0x10328b
jne 0x5cea2
leaq 0x110(%rsp), %rdi
leaq 0x80(%rsp), %rsi
leaq 0x2c0(%rsp), %rcx
movl %ebp, %edx
callq 0x5a8b4
cmpb $0x1, 0xa63e3(%rip)     # 0x10328c
jne 0x5ceca
leaq 0x110(%rsp), %rdi
leaq 0x80(%rsp), %rsi
leaq 0x2a0(%rsp), %rcx
movl %ebp, %edx
callq 0x5ab5a
movq 0x10(%rsp), %rdi
cmpq %rbx, %rdi
je 0x5cee1
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0xd0(%rsp), %rdi
callq 0x2e784
leaq 0x3f0(%rsp), %rdi
callq 0x5de20
leaq 0x320(%rsp), %rdi
callq 0x5deba
leaq 0x180(%rsp), %rdi
callq 0x480b0
leaq 0x1a0(%rsp), %rdi
callq 0x42ffa
leaq 0x200(%rsp), %rdi
callq 0x480b0
leaq 0x2a0(%rsp), %rdi
callq 0x42ffa
leaq 0x2c0(%rsp), %rdi
callq 0x42ffa
leaq 0xf0(%rsp), %rdi
callq 0x42ffa
leaq 0x2e0(%rsp), %rdi
callq 0x42ffa
leaq 0x220(%rsp), %rdi
callq 0x42ffa
leaq 0x390(%rsp), %rdi
callq 0x480b0
movq 0x240(%rsp), %rdi
testq %rdi, %rdi
je 0x5cf9a
movq 0x250(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0x1c0(%rsp), %rdi
testq %rdi, %rdi
je 0x5cfb7
movq 0x1d0(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0x1e0(%rsp), %rdi
testq %rdi, %rdi
je 0x5cfd4
movq 0x1f0(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
leaq 0x260(%rsp), %rdi
callq 0x2e784
leaq 0x300(%rsp), %rdi
callq 0x2e784
leaq 0x428(%rsp), %rdi
callq 0x5df54
leaq 0x458(%rsp), %rdi
callq 0x5dfcc
leaq 0x3c0(%rsp), %rdi
callq 0x3c6d4
leaq 0x360(%rsp), %rdi
callq 0x3c602
leaq 0x80(%rsp), %rdi
callq 0x2e784
leaq 0x120(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5d050
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x160(%rsp), %rdi
leaq 0x170(%rsp), %rax
cmpq %rax, %rdi
je 0x5d075
movq 0x170(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x140(%rsp), %rdi
leaq 0x150(%rsp), %rax
cmpq %rax, %rdi
je 0x5d09a
movq 0x150(%rsp), %rsi
incq %rsi
callq 0x8480
xorl %eax, %eax
addq $0x488, %rsp            # imm = 0x488
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x74e70(%rip), %rdi     # 0xd1f25
leaq 0x74e78(%rip), %rsi     # 0xd1f34
leaq 0x74e87(%rip), %rcx     # 0xd1f4a
movl $0xd5, %edx
callq 0x82c0
movq %rax, %r12
jmp 0x5d1a3
movq %rax, %r12
jmp 0x5d1be
jmp 0x5d0df
movq %rax, %r12
jmp 0x5d1df
jmp 0x5d306
jmp 0x5d1fb
jmp 0x5d306
jmp 0x5d1fb
jmp 0x5d306
jmp 0x5d1fb
jmp 0x5d306
jmp 0x5d342
jmp 0x5d342
jmp 0x5d342
jmp 0x5d342
jmp 0x5d342
jmp 0x5d342
jmp 0x5d12f
jmp 0x5d306
movq %rax, %r12
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0x5d3db
jmp 0x5d306
movq %rax, %r12
movl $0x38, %esi
jmp 0x5d157
movq %rax, %r12
movl $0x208, %esi            # imm = 0x208
movq %r14, %rdi
jmp 0x5d3e8
movq %rax, %r12
movl $0x208, %esi            # imm = 0x208
movq %r14, %rdi
jmp 0x5d510
movq %rax, %r12
movl $0x110, %esi            # imm = 0x110
movq %rbx, %rdi
jmp 0x5d41d
jmp 0x5d342
jmp 0x5d342
movq %rax, %r12
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x5d1a3
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5d1be
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0xb0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5d1df
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x5d42f
movq 0x60(%rsp), %rsi
jmp 0x5d3e5
jmp 0x5d1fb
jmp 0x5d1fb
movq %rax, %r12
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
jne 0x5d3e0
jmp 0x5d42f
movq %rax, %r12
jmp 0x5d40b
movq %rax, %r12
jmp 0x5d591
movq %rax, %r12
jmp 0x5d5b6
jmp 0x5d342
jmp 0x5d342
movq %rax, %r12
leaq 0x3a8(%rsp), %rdi
callq 0x2e784
jmp 0x5d313
jmp 0x5d310
movq %rax, %r12
jmp 0x5d320
jmp 0x5d342
jmp 0x5d25c
movq %rax, %r12
jmp 0x5d2a5
movq %rax, %r12
jmp 0x5d280
movq %rax, %r12
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x5d280
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x5d2a5
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x5d422
movq 0x60(%rsp), %rsi
jmp 0x5d41a
movq %rax, %r12
jmp 0x5d2dc
movq %rax, %r12
movl $0x200, %esi            # imm = 0x200
movq 0x1f8(%rsp), %rdi
callq 0x8480
leaq 0x20(%rsp), %rbx
jmp 0x5d40b
movq %rax, %r12
jmp 0x5d3fc
jmp 0x5d3ef
jmp 0x5d38b
jmp 0x5d342
movq %rax, %r12
jmp 0x5d364
movq %rax, %r12
jmp 0x5d36e
jmp 0x5d342
movq %rax, %r12
jmp 0x5d42f
jmp 0x5d342
movq %rax, %r12
leaq 0x280(%rsp), %rdi
callq 0x42ffa
leaq 0xa0(%rsp), %rdi
callq 0x42ffa
jmp 0x5d3f2
jmp 0x5d38b
jmp 0x5d386
movq %rax, %r12
jmp 0x5d3c7
jmp 0x5d38b
jmp 0x5d342
movq %rax, %r12
jmp 0x5d422
movq %rax, %r12
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x5d364
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
leaq 0x30(%rsp), %rdi
callq 0x2e784
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
jne 0x5d415
jmp 0x5d422
movq %rax, %r12
jmp 0x5d3d1
movq %rax, %r12
jmp 0x5d515
movq %rax, %r12
leaq 0x320(%rsp), %rdi
callq 0x2e784
jmp 0x5d515
movq %rax, %r12
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x5d3c7
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x50(%rsp), %rdi
callq 0x2e784
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x5d42f
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x5d42f
movq %rax, %r12
leaq 0x50(%rsp), %rdi
callq 0x42ffa
leaq 0x20(%rsp), %rbx
leaq 0x30(%rsp), %rdi
callq 0x42ffa
movq 0x10(%rsp), %rdi
cmpq %rbx, %rdi
je 0x5d422
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0xd0(%rsp), %rdi
callq 0x2e784
leaq 0x3f0(%rsp), %rdi
callq 0x5de20
leaq 0x320(%rsp), %rdi
callq 0x5deba
leaq 0x180(%rsp), %rdi
callq 0x480b0
leaq 0x1a0(%rsp), %rdi
callq 0x42ffa
leaq 0x200(%rsp), %rdi
callq 0x480b0
leaq 0x2a0(%rsp), %rdi
callq 0x42ffa
leaq 0x2c0(%rsp), %rdi
callq 0x42ffa
leaq 0xf0(%rsp), %rdi
callq 0x42ffa
leaq 0x2e0(%rsp), %rdi
callq 0x42ffa
leaq 0x220(%rsp), %rdi
callq 0x42ffa
leaq 0x390(%rsp), %rdi
callq 0x480b0
movq 0x240(%rsp), %rdi
testq %rdi, %rdi
je 0x5d4db
movq 0x250(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0x1c0(%rsp), %rdi
testq %rdi, %rdi
je 0x5d4f8
movq 0x1d0(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0x1e0(%rsp), %rdi
testq %rdi, %rdi
je 0x5d515
movq 0x1f0(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
leaq 0x260(%rsp), %rdi
callq 0x2e784
leaq 0x300(%rsp), %rdi
callq 0x2e784
leaq 0x428(%rsp), %rdi
callq 0x5df54
leaq 0x458(%rsp), %rdi
callq 0x5dfcc
leaq 0x3c0(%rsp), %rdi
callq 0x3c6d4
leaq 0x360(%rsp), %rdi
callq 0x3c602
leaq 0x80(%rsp), %rdi
callq 0x2e784
leaq 0x120(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5d591
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x160(%rsp), %rdi
leaq 0x170(%rsp), %rax
cmpq %rax, %rdi
je 0x5d5b6
movq 0x170(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x150(%rsp), %rax
movq 0x140(%rsp), %rdi
cmpq %rax, %rdi
je 0x5d5db
movq 0x150(%rsp), %rsi
incq %rsi
callq 0x8480
movq %r12, %rdi
callq 0x8840