// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/process_vcf_filter.cpp
// Function: filterMain(int, char**)
int filterMain(int argc, char** argv) {
    parseFilterOptions(argc, argv);
    //std::ios_base::openmode mode = std::ios_base::in;
    string fileName = opt::vcfFile;
    string fileRoot = stripExtension(fileName);
    std::vector<int> depthsHetFailed;
    std::vector<int> depthsHetPassed;
    std::vector<int> numVariantsPerHetCount;
    std::vector<std::vector<int> > num_indiv_het_vs_depth;
    
    std::ofstream* statsFFile;
    std::ofstream* statsVarDepthFile;
    std::ofstream* statsStrandBiasFile;
    std::ofstream* statsVariantQualityFile;
    std::ofstream* statsSegregationMetricFile;
    
    // Collect some numbers about why variants were filtered out:
    int numTotalFilteredOut = 0;
    int numMultiallelic = 0; int numInvariant = 0;
    // SB - strand bias; OD - overall depth; OQ - overall quality; F - inbreeding coefficient;
    int numSB = 0; int numOD = 0; int numOQ = 0; int numF = 0; int numOQ_OD = 0; int numOQ_SB = 0; int numOQ_F = 0; int numSB_F = 0; int numSB_OD = 0; int numF_OD = 0;
    int numOQ_OD_F = 0; int numOQ_OD_SB = 0; int numOQ_SB_F = 0; int numSB_F_OD = 0; int numOQ_OD_F_SB = 0;
    
    
    
    if (opt::bStats) {
        statsFFile = new std::ofstream(fileRoot + ".inbreeding");
        statsVarDepthFile = new std::ofstream(fileRoot + ".varDepth");
        statsStrandBiasFile = new std::ofstream(fileRoot + ".strandBias");
        statsVariantQualityFile = new std::ofstream(fileRoot + ".varQual");
        statsSegregationMetricFile = new std::ofstream(fileRoot + ".SGB");
        std::cerr << "Getting statistics for variants from: " << fileName << " to help with setting filtering criteria" << std::endl;
    } else {
        std::cerr << "Filtering variants from: " << fileName << std::endl;
        std::cerr << "Minimum variant quality score (overall) set to: " << opt::min_overall_quality << std::endl;
        std::cerr << "Maximum read depth (overall) set to: " << opt::max_overall_depth << std::endl;
        std::cerr << "Minimum read depth (overall) set to: " << opt::min_overall_depth << std::endl;
        std::cerr << "Minimum copies for a variant (e.g. 1 for allowing singletons): " << opt::min_copies << std::endl;
        std::cerr << "Minimum read depth at the variant position: " << opt::min_depth_in_any_individual << std::endl;
        if (opt::bAllowMissingGenotpyes)
            std::cerr << "Genotypes for individuals with lower read depth at the variant position will be set to missing (./.)" << std::endl;
        if (opt::max_het_indiv < std::numeric_limits<int>::max())
            std::cerr << "Filter out sites where more than " << opt::max_het_indiv << " individuals are heterozygous"  << std::endl;
    }
    // Open connection to read from the vcf file
    // std::ifstream* inFile = new std::ifstream(fileName.c_str(), mode);
    std::istream* inFile = createReader(fileName.c_str());
    
    
    bool gotChromosomeNumber = false;
    int numChromosomes;
    string line;
    int totalVariantNumber = 0;
    while (getline(*inFile, line)) {
        if (line[0] == '#') {
            if (!opt::bStats) std::cout << line << std::endl;
        } else {
            double r = ((double) rand() / (RAND_MAX));
            if (r > opt::subsample) {
                continue;
            }
            totalVariantNumber++;
            if (totalVariantNumber % 100000 == 0) std::cerr << "Filtered " << totalVariantNumber << " variants" << std::endl;
            FilterResult result;
            std::vector<std::string> fields = split(line, '\t');
            if (!gotChromosomeNumber) {
                const std::vector<std::string>::size_type numSamples = fields.size() - NUM_NON_GENOTYPE_COLUMNS;
                numChromosomes = (int)numSamples * 2;
                std::cerr << "Number of chromosomes: " << numChromosomes << std::endl;
                numVariantsPerHetCount.assign(numSamples + 1, 0);
                gotChromosomeNumber = true;
            }
            result.overallQuality = stringToDouble(fields[5]);
            
            result.counts = getThisVariantCounts(fields);
            
            if (opt::bStats) {
                
                *statsFFile << result.counts.inbreedingCoefficient << std::endl;
                *statsVarDepthFile << result.counts.overallDepth << std::endl;
                if (!result.counts.FSpval.empty()) {
                    *statsStrandBiasFile << result.counts.FSpval << std::endl;
                } else if (!result.counts.MQSBpval.empty()) {
                    *statsStrandBiasFile << result.counts.MQSBpval << std::endl;
                }
                if (result.counts.SGB < std::numeric_limits<double>::max()) {
                    *statsSegregationMetricFile << result.counts.SGB << std::endl;
                }
                *statsVariantQualityFile << result.overallQuality << std::endl;
                if (totalVariantNumber >= 1000000)
                    exit(EXIT_SUCCESS);
                else
                    continue;
            }
            
            
            // Start filtering
            // 1) Throw away stuff that is not bi-allelic
            if (opt::bBiallelicFilter) {
                result.biallelicPassed = testBiallelic(fields[4]);
                if (!result.biallelicPassed) { result.biallelicPassed = false; numTotalFilteredOut++; numMultiallelic++; continue; }
            } else
                result.biallelicPassed = true;
            
            // 2) Filtering on overall quality
            if (result.overallQuality < opt::min_overall_quality)
                result.overallQualityPassed = false;
            
            // 3) Filtering on overall depth
            if (result.counts.overallDepth >= opt::min_overall_depth && result.counts.overallDepth <= opt::max_overall_depth) {
                result.overallDepthPassed = true;
            } else
                result.overallDepthPassed = false;
            
            // 4) Filtering on strand bias
            if (!result.counts.FSpval.empty()) {
                if (stringToDouble(result.counts.FSpval) > opt::max_FS)
                    result.strandBiasPassed = false;
            }
            
            if (!result.counts.MQSBpval.empty()) {
                if (stringToDouble(result.counts.MQSBpval) < opt::min_MQSB)
                    result.strandBiasPassed = false;
            }
            
            // 5) Filter on inbreeding coefficinet
            if (result.counts.inbreedingCoefficient < opt::min_F) {
                result.inbreedingCoeffPassed = false;
            }
            
            // 6) Filtering on the number of copies/allele frequency
            if (result.counts.overall <= (numChromosomes - opt::min_copies) && result.counts.overall >= opt::min_copies) {
                
            } else {
                numInvariant++; continue;
            }
            
            if (result.inbreedingCoeffPassed && result.overallDepthPassed && result.overallQualityPassed && result.strandBiasPassed) {
                std::cout << line << std::endl;
            } else {
                numTotalFilteredOut++;
                if (!result.inbreedingCoeffPassed && result.overallDepthPassed && result.overallQualityPassed && result.strandBiasPassed) {
                    numF++;
                } else if (result.inbreedingCoeffPassed && !result.overallDepthPassed && result.overallQualityPassed && result.strandBiasPassed) {
                    numOD++;
                } else if (result.inbreedingCoeffPassed && result.overallDepthPassed && !result.overallQualityPassed && result.strandBiasPassed) {
                    numOQ++;
                } else if (result.inbreedingCoeffPassed && result.overallDepthPassed && result.overallQualityPassed && !result.strandBiasPassed) {
                    numSB++;
                } else if (!result.inbreedingCoeffPassed && result.overallDepthPassed && !result.overallQualityPassed && result.strandBiasPassed) {
                    numOQ_F++;
                } else if (result.inbreedingCoeffPassed && !result.overallDepthPassed && !result.overallQualityPassed && result.strandBiasPassed) {
                    numOQ_OD++;
                } else if (result.inbreedingCoeffPassed && result.overallDepthPassed && !result.overallQualityPassed && !result.strandBiasPassed) {
                    numOQ_SB++;
                } else if (!result.inbreedingCoeffPassed && result.overallDepthPassed && result.overallQualityPassed && !result.strandBiasPassed) {
                    numSB_F++;
                } else if (result.inbreedingCoeffPassed && !result.overallDepthPassed && result.overallQualityPassed && !result.strandBiasPassed) {
                    numSB_OD++;
                } else if (!result.inbreedingCoeffPassed && !result.overallDepthPassed && result.overallQualityPassed && result.strandBiasPassed) {
                    numF_OD++;
                } else if (!result.inbreedingCoeffPassed && !result.overallDepthPassed && !result.overallQualityPassed && result.strandBiasPassed) {
                    numOQ_OD_F++;
                } else if (result.inbreedingCoeffPassed && !result.overallDepthPassed && !result.overallQualityPassed && !result.strandBiasPassed) {
                    numOQ_OD_SB++;
                } else if (!result.inbreedingCoeffPassed && result.overallDepthPassed && !result.overallQualityPassed && !result.strandBiasPassed) {
                    numOQ_SB_F++;
                } else if (!result.inbreedingCoeffPassed && !result.overallDepthPassed && result.overallQualityPassed && !result.strandBiasPassed) {
                    numSB_F_OD++;
                } else if (!result.inbreedingCoeffPassed && !result.overallDepthPassed && !result.overallQualityPassed && !result.strandBiasPassed) {
                    numOQ_OD_F_SB++;
                }
            }
            
            // 7) Filtering on per-individual criteria
            
            /*if (result.counts.minimumDepthInAnIndividual >= opt::min_depth_in_any_individual) {
                
            } else if (opt::bAllowMissingGenotpyes) {
                // Set genotypes to missing for individuals with too low coverage
                for (int i = NUM_NON_GENOTYPE_COLUMNS; i != fields.size(); i++) {
                    if (result.counts.depthPerIndividual[i-NUM_NON_GENOTYPE_COLUMNS] < opt::min_depth_in_any_individual) {
                        fields[i][0] = '.'; fields[i][2] = '.';
                    }
                }
                print_vector_stream(fields, std::cout,'\t');
            }
            */
            
        }
    }
    std::cerr << "Total variants filtered out: " << numTotalFilteredOut << std::endl;
    std::cerr << "Reasons for filtering:" << std::endl;
    std::cerr << "Not biallelic: " << numMultiallelic << std::endl;
    std::cerr << "Invariant (not polymorphic in called samples): " << numInvariant << std::endl;
    std::cerr << "Other reasons:" << std::endl;
    std::cerr << "SB - strand bias; OD - overall depth; OQ - overall quality; F - inbreeding coefficient" << std::endl;
    std::cerr << "OQ+OD+F+SB:\t" << numOQ_OD_F_SB << " (" << ((double)numOQ_OD_F_SB/numTotalFilteredOut)*100 << "%)" << std::endl;
    std::cerr << "OQ+OD+F: \t" << numOQ_OD_F << " (" << ((double)numOQ_OD_F/numTotalFilteredOut)*100 << "%)" << std::endl;
    std::cerr << "OQ+OD+SB: \t" << numOQ_OD_SB << " (" << ((double)numOQ_OD_SB/numTotalFilteredOut)*100 << "%)" << std::endl;
    std::cerr << "OQ+SB+F: \t" << numOQ_SB_F << " (" << ((double)numOQ_SB_F/numTotalFilteredOut)*100 << "%)" << std::endl;
    std::cerr << "SB+F+OD: \t" << numSB_F_OD << " (" << ((double)numSB_F_OD/numTotalFilteredOut)*100 << "%)" << std::endl;
    std::cerr << "OQ+OD: \t" << numOQ_OD << " (" << ((double)numOQ_OD/numTotalFilteredOut)*100 << "%)" << std::endl;
    std::cerr << "OQ+F: \t" << numOQ_F << " (" << ((double)numOQ_F/numTotalFilteredOut)*100 << "%)" << std::endl;
    std::cerr << "OQ+SB: \t" << numOQ_SB << " (" << ((double)numOQ_SB/numTotalFilteredOut)*100 << "%)" << std::endl;
    std::cerr << "SB+F: \t" << numSB_F << " (" << ((double)numSB_F/numTotalFilteredOut)*100 << "%)" << std::endl;
    std::cerr << "SB+OD: \t" << numSB_OD << " (" << ((double)numSB_OD/numTotalFilteredOut)*100 << "%)" << std::endl;
    std::cerr << "F+OD: \t" << numF_OD << " (" << ((double)numF_OD/numTotalFilteredOut)*100 << "%)" << std::endl;
    std::cerr << "OQ: \t" << numOQ << " (" << ((double)numOQ/numTotalFilteredOut)*100 << "%)" << std::endl;
    std::cerr << "SB: \t" << numSB << " (" << ((double)numSB/numTotalFilteredOut)*100 << "%)" << std::endl;
    std::cerr << "OD: \t" << numOD << " (" << ((double)numOD/numTotalFilteredOut)*100 << "%)" << std::endl;
    std::cerr << "F: \t" << numF << " (" << ((double)numF/numTotalFilteredOut)*100 << "%)" << std::endl;
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3b8, %rsp            # imm = 0x3B8
callq 0x62842
leaq 0x1a0(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0xabbfb(%rip), %rsi     # 0x10c290
movq 0xabbfc(%rip), %rdx     # 0x10c298
addq %rsi, %rdx
leaq 0x190(%rsp), %rbx
movq %rbx, %rdi
callq 0x2e45c
leaq 0x1e8(%rsp), %rdi
movq %rbx, %rsi
callq 0x50803
xorpd %xmm0, %xmm0
movapd %xmm0, 0x280(%rsp)
xorl %eax, %eax
movq %rax, 0x290(%rsp)
movq %rax, 0x2b0(%rsp)
movapd %xmm0, 0x2a0(%rsp)
cmpb $0x1, 0xabbc2(%rip)     # 0x10c2b0
jne 0x609a6
movl $0x200, %edi            # imm = 0x200
callq 0x8470
movq %rax, 0x1d8(%rsp)
leaq 0x68(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x1e8(%rsp), %rsi
movq 0x1f0(%rsp), %rdx
addq %rsi, %rdx
leaq 0x58(%rsp), %rdi
callq 0x2e45c
leaq 0x78b75(%rip), %rsi     # 0xd92a8
leaq 0x58(%rsp), %rdi
callq 0x88c0
leaq 0x58(%rsp), %rsi
movq 0x1d8(%rsp), %rdi
movl $0x10, %edx
callq 0x88d0
movq 0x58(%rsp), %rdi
cmpq %r14, %rdi
je 0x6076b
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x8480
movl $0x200, %edi            # imm = 0x200
callq 0x8470
movq %rax, 0x1d0(%rsp)
leaq 0x58(%rsp), %rdi
movq %r14, (%rdi)
movq 0x1e8(%rsp), %rsi
movq 0x1f0(%rsp), %rdx
addq %rsi, %rdx
callq 0x2e45c
leaq 0x78b10(%rip), %rsi     # 0xd92b4
leaq 0x58(%rsp), %rdi
callq 0x88c0
leaq 0x58(%rsp), %rsi
movq 0x1d0(%rsp), %rdi
movl $0x10, %edx
callq 0x88d0
movq 0x58(%rsp), %rdi
cmpq %r14, %rdi
je 0x607dc
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x8480
movl $0x200, %edi            # imm = 0x200
callq 0x8470
movq %rax, 0x168(%rsp)
leaq 0x58(%rsp), %rdi
movq %r14, (%rdi)
movq 0x1e8(%rsp), %rsi
movq 0x1f0(%rsp), %rdx
addq %rsi, %rdx
callq 0x2e45c
leaq 0x78aa9(%rip), %rsi     # 0xd92be
leaq 0x58(%rsp), %rdi
callq 0x88c0
leaq 0x58(%rsp), %rsi
movq 0x168(%rsp), %rdi
movl $0x10, %edx
callq 0x88d0
movq 0x58(%rsp), %rdi
cmpq %r14, %rdi
je 0x6084d
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x8480
movl $0x200, %edi            # imm = 0x200
callq 0x8470
movq %rax, 0x1c8(%rsp)
leaq 0x58(%rsp), %rdi
movq %r14, (%rdi)
movq 0x1e8(%rsp), %rsi
movq 0x1f0(%rsp), %rdx
addq %rsi, %rdx
callq 0x2e45c
leaq 0x78a44(%rip), %rsi     # 0xd92ca
leaq 0x58(%rsp), %rdi
callq 0x88c0
leaq 0x58(%rsp), %rsi
movq 0x1c8(%rsp), %rdi
movl $0x10, %edx
callq 0x88d0
movq 0x58(%rsp), %rdi
cmpq %r14, %rdi
je 0x608be
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x8480
movl $0x200, %edi            # imm = 0x200
callq 0x8470
movq %rax, 0x1c0(%rsp)
leaq 0x58(%rsp), %rdi
movq %r14, (%rdi)
movq 0x1e8(%rsp), %rsi
movq 0x1f0(%rsp), %rdx
addq %rsi, %rdx
callq 0x2e45c
leaq 0x789dc(%rip), %rsi     # 0xd92d3
leaq 0x58(%rsp), %rdi
callq 0x88c0
leaq 0x58(%rsp), %rsi
movq 0x1c0(%rsp), %rdi
movl $0x10, %edx
callq 0x88d0
movq 0x58(%rsp), %rdi
cmpq %r14, %rdi
je 0x6092f
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0xaa6b2(%rip), %rdi     # 0x10afe8
leaq 0x7899b(%rip), %rsi     # 0xd92d8
movl $0x26, %edx
callq 0x84e0
movq 0x190(%rsp), %rsi
movq 0x198(%rsp), %rdx
movq 0xaa68a(%rip), %rdi     # 0x10afe8
callq 0x84e0
movq %rax, %rbx
leaq 0x78992(%rip), %rsi     # 0xd92ff
movl $0x28, %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
jmp 0x60c6b
movq 0xaa63b(%rip), %rdi     # 0x10afe8
leaq 0x78974(%rip), %rsi     # 0xd9328
movl $0x19, %edx
callq 0x84e0
movq 0x190(%rsp), %rsi
movq 0x198(%rsp), %rdx
movq 0xaa613(%rip), %rdi     # 0x10afe8
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 0xaa5dd(%rip), %rdi     # 0x10afe8
leaq 0x78930(%rip), %rsi     # 0xd9342
movl $0x30, %edx
callq 0x84e0
movl 0xaaafe(%rip), %esi     # 0x10b520
movq 0xaa5bf(%rip), %rdi     # 0x10afe8
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 0xaa589(%rip), %rdi     # 0x10afe8
leaq 0x7890d(%rip), %rsi     # 0xd9373
movl $0x25, %edx
callq 0x84e0
movl 0xaaaae(%rip), %esi     # 0x10b524
movq 0xaa56b(%rip), %rdi     # 0x10afe8
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 0xaa535(%rip), %rdi     # 0x10afe8
leaq 0x788df(%rip), %rsi     # 0xd9399
movl $0x25, %edx
callq 0x84e0
movl 0xab7ea(%rip), %esi     # 0x10c2b4
movq 0xaa517(%rip), %rdi     # 0x10afe8
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 0xaa4e1(%rip), %rdi     # 0x10afe8
leaq 0x788b1(%rip), %rsi     # 0xd93bf
movl $0x3f, %edx
callq 0x84e0
movl 0xaaa0a(%rip), %esi     # 0x10b528
movq 0xaa4c3(%rip), %rdi     # 0x10afe8
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 0xaa48d(%rip), %rdi     # 0x10afe8
leaq 0x7889d(%rip), %rsi     # 0xd93ff
movl $0x2c, %edx
callq 0x84e0
movl 0xab746(%rip), %esi     # 0x10c2b8
movq 0xaa46f(%rip), %rdi     # 0x10afe8
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
cmpb $0x1, 0xab70d(%rip)     # 0x10c2bc
jne 0x60bf7
movq 0xaa430(%rip), %rbx     # 0x10afe8
leaq 0x7886d(%rip), %rsi     # 0xd942c
movl $0x64, %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 0xaa3fe(%rip), %rdi     # 0x10afe8
callq 0x8040
movq %rax, %rdi
callq 0x8300
cmpl $0x7fffffff, 0xaa92b(%rip) # imm = 0x7FFFFFFF
je 0x60c6b
movq 0xaa3de(%rip), %rdi     # 0x10afe8
leaq 0x78880(%rip), %rsi     # 0xd9491
movl $0x21, %edx
callq 0x84e0
movl 0xaa90b(%rip), %esi     # 0x10b52c
movq 0xaa3c0(%rip), %rdi     # 0x10afe8
callq 0x8810
movq %rax, %rbx
leaq 0x7887c(%rip), %rsi     # 0xd94b3
movl $0x1d, %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
movq 0x190(%rsp), %rsi
leaq 0x58(%rsp), %rdi
leaq 0x2b8(%rsp), %rdx
callq 0x286de
leaq 0x58(%rsp), %rdi
movl $0x8, %esi
callq 0x53224
movq %rax, %rbx
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x60cb2
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x180(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
xorl %r14d, %r14d
movl $0x0, 0x10(%rsp)
movl $0x0, 0x50(%rsp)
movl $0x0, 0x54(%rsp)
movl $0x0, 0x3c(%rsp)
movl $0x0, 0x4c(%rsp)
movl $0x0, 0x40(%rsp)
movl $0x0, 0x48(%rsp)
movl $0x0, 0x2c(%rsp)
movl $0x0, 0x1c(%rsp)
movl $0x0, 0x38(%rsp)
movl $0x0, 0x34(%rsp)
movl $0x0, 0x28(%rsp)
movl $0x0, 0x44(%rsp)
movl $0x0, 0x20(%rsp)
movl $0x0, 0x30(%rsp)
movl $0x0, 0x24(%rsp)
movl $0x0, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
movq $0x0, 0x8(%rsp)
xorl %r13d, %r13d
movl %r13d, %r12d
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %edx
movq %rbx, %rdi
leaq 0x170(%rsp), %rsi
callq 0x8870
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x61a1a
movq 0x170(%rsp), %rsi
cmpb $0x23, (%rsi)
jne 0x60e03
cmpb $0x0, 0xab4f8(%rip)     # 0x10c2b0
movl %r12d, %r13d
jne 0x60d68
movq 0x178(%rsp), %rdx
movq 0xaa1ec(%rip), %rdi     # 0x10afb8
callq 0x84e0
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 %r12d, %r13d
jmp 0x60d68
callq 0x8140
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0x692f1(%rip), %xmm0    # 0xca108
ucomisd 0xaa711(%rip), %xmm0    # 0x10b530
movl %r12d, %r13d
ja 0x60d68
leal 0x1(%r12), %r13d
imull $0xbcbe61d, %r12d, %eax # imm = 0xBCBE61D
addl $0xbd6625d, %eax        # imm = 0xBD6625D
rorl $0x5, %eax
cmpl $0xa7c4, %eax           # imm = 0xA7C4
ja 0x60ea9
movl $0x9, %edx
movq 0xaa199(%rip), %rdi     # 0x10afe8
leaq 0x7867b(%rip), %rsi     # 0xd94d1
callq 0x84e0
movq 0xaa186(%rip), %rdi     # 0x10afe8
movl %r13d, %esi
callq 0x8810
movq %rax, %rbp
movl $0x9, %edx
movq %rax, %rdi
leaq 0x7e673(%rip), %rsi     # 0xdf4ef
callq 0x84e0
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %rbp, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
movapd 0x7735f(%rip), %xmm0    # 0xd8210
movupd %xmm0, 0x58(%rsp)
movl %r14d, 0x68(%rsp)
leaq 0x80(%rsp), %rax
movq %rax, 0x70(%rsp)
movq %r14, 0x78(%rsp)
movb %r14b, 0x80(%rsp)
leaq 0xa0(%rsp), %rax
movq %rax, 0x90(%rsp)
movq %r14, 0x98(%rsp)
movb %r14b, 0xa0(%rsp)
movabsq $0x7fefffffffffffff, %rax # imm = 0x7FEFFFFFFFFFFFFF
movq %rax, 0xb0(%rsp)
movq %r14, 0xb8(%rsp)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0xc0(%rsp)
movb %r14b, 0xc8(%rsp)
movq %r14, 0x140(%rsp)
movl %r14d, 0x148(%rsp)
movq %r14, 0x150(%rsp)
movw $0x0, 0x158(%rsp)
leaq 0x60(%rsp), %rax
xorpd %xmm0, %xmm0
movupd %xmm0, 0xcc(%rax)
movupd %xmm0, 0xc0(%rax)
movupd %xmm0, 0xb0(%rax)
movupd %xmm0, 0xa0(%rax)
movupd %xmm0, 0x90(%rax)
movupd %xmm0, 0x80(%rax)
movupd %xmm0, 0x70(%rax)
movw $0x101, 0x160(%rsp)     # imm = 0x101
leaq 0x208(%rsp), %rdi
leaq 0x170(%rsp), %rsi
movl $0x9, %edx
callq 0x50624
testb $0x1, 0x8(%rsp)
jne 0x61057
movq 0x210(%rsp), %rbp
subq 0x208(%rsp), %rbp
movl $0x17, %edx
movq 0xaa013(%rip), %rdi     # 0x10afe8
leaq 0x773c7(%rip), %rsi     # 0xd83a3
callq 0x84e0
sarq $0x5, %rbp
leal -0x12(,%rbp,2), %esi
movq 0xa9ff5(%rip), %rdi     # 0x10afe8
movl %esi, 0x1e4(%rsp)
callq 0x8810
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
addq $-0x8, %rbp
movl $0x0, 0x2b8(%rsp)
leaq 0x280(%rsp), %rdi
movq %rbp, %rsi
leaq 0x2b8(%rsp), %rdx
callq 0x561e6
movb $0x1, %al
movq %rax, 0x8(%rsp)
movq 0x208(%rsp), %rax
leaq 0x270(%rsp), %rcx
movq %rcx, 0x260(%rsp)
movq 0xa0(%rax), %rsi
movq 0xa8(%rax), %rdx
addq %rsi, %rdx
leaq 0x260(%rsp), %rdi
callq 0x2e45c
leaq 0x260(%rsp), %rdi
callq 0x5054c
cvttsd2si %xmm0, %eax
movl %eax, 0x58(%rsp)
movq 0x260(%rsp), %rdi
leaq 0x270(%rsp), %rax
cmpq %rax, %rdi
je 0x610c7
movq 0x270(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x2b8(%rsp), %rdi
leaq 0x208(%rsp), %rsi
callq 0x51473
movl 0x2c0(%rsp), %eax
leaq 0x60(%rsp), %r15
movl %eax, 0x8(%r15)
movq 0x2b8(%rsp), %rax
movq %rax, (%r15)
leaq 0x70(%rsp), %rdi
leaq 0x2c8(%rsp), %rbp
movq %rbp, %rsi
callq 0x8540
leaq 0x90(%rsp), %rdi
leaq 0x2e8(%rsp), %rsi
callq 0x8540
movups 0x40(%rbp), %xmm0
movups 0x49(%rbp), %xmm1
movups %xmm0, 0x50(%r15)
movups %xmm1, 0x59(%r15)
movq 0xd0(%rsp), %rdi
movq 0xd8(%rsp), %rax
movq 0xe0(%rsp), %rsi
movq 0x328(%rsp), %rcx
movq %rcx, 0xd0(%rsp)
movups 0x330(%rsp), %xmm0
movups %xmm0, 0xd8(%rsp)
movq %rdi, 0x328(%rsp)
movq %rax, 0x330(%rsp)
movq %rsi, 0x338(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rbp)
movq $0x0, 0x70(%rbp)
testq %rdi, %rdi
je 0x6119f
subq %rdi, %rsi
callq 0x8480
movq 0xe8(%rsp), %rdi
movq 0xf0(%rsp), %rax
movq 0xf8(%rsp), %rsi
movq 0x340(%rsp), %rcx
movq %rcx, 0xe8(%rsp)
movups 0x348(%rsp), %xmm0
movups %xmm0, 0xf0(%rsp)
movq %rdi, 0x340(%rsp)
movq %rax, 0x348(%rsp)
movq %rsi, 0x350(%rsp)
leaq 0x2c8(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x78(%rax)
movq $0x0, 0x88(%rax)
testq %rdi, %rdi
je 0x61216
subq %rdi, %rsi
callq 0x8480
movq 0x100(%rsp), %rdi
movq 0x108(%rsp), %rax
movq 0x110(%rsp), %rsi
movq 0x358(%rsp), %rcx
movq %rcx, 0x100(%rsp)
movups 0x360(%rsp), %xmm0
movups %xmm0, 0x108(%rsp)
movq %rdi, 0x358(%rsp)
movq %rax, 0x360(%rsp)
movq %rsi, 0x368(%rsp)
leaq 0x2c8(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x90(%rax)
movq $0x0, 0xa0(%rax)
testq %rdi, %rdi
je 0x61290
subq %rdi, %rsi
callq 0x8480
movq 0x118(%rsp), %rdi
movq 0x120(%rsp), %rax
movq 0x128(%rsp), %rsi
movq 0x370(%rsp), %rcx
movq %rcx, 0x118(%rsp)
movups 0x378(%rsp), %xmm0
movups %xmm0, 0x120(%rsp)
movq %rdi, 0x370(%rsp)
movq %rax, 0x378(%rsp)
movq %rsi, 0x380(%rsp)
leaq 0x2c8(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0xa8(%rax)
movq $0x0, 0xb8(%rax)
testq %rdi, %rdi
je 0x6130a
subq %rdi, %rsi
callq 0x8480
movq 0x130(%rsp), %rdi
testq %rdi, %rdi
je 0x6134f
movq 0x150(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq %r14, 0x130(%rsp)
movl %r14d, 0x138(%rsp)
movq %r14, 0x140(%rsp)
movl %r14d, 0x148(%rsp)
movq %r14, 0x150(%rsp)
leaq 0x2c8(%rsp), %rdx
movq 0xe0(%rdx), %rax
leaq 0x60(%rsp), %rcx
movq %rax, 0xf0(%rcx)
movupd 0xc0(%rdx), %xmm0
movupd 0xd0(%rdx), %xmm1
movupd %xmm1, 0xe0(%rcx)
movupd %xmm0, 0xd0(%rcx)
movq %r14, 0x388(%rsp)
movl %r14d, 0x390(%rsp)
movq %r14, 0x398(%rsp)
movl %r14d, 0x3a0(%rsp)
movq %r14, 0x3a8(%rsp)
movzwl 0x3b0(%rsp), %eax
movw %ax, 0x158(%rsp)
leaq 0x2b8(%rsp), %rdi
callq 0x31188
cmpb $0x1, 0xaaeda(%rip)     # 0x10c2b0
jne 0x61493
movsd 0xb8(%rsp), %xmm0
movq 0x1d8(%rsp), %rdi
callq 0x8730
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
movl 0x68(%rsp), %esi
movq 0x1d0(%rsp), %rdi
callq 0x8810
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 0x78(%rsp), %rdx
testq %rdx, %rdx
je 0x616ed
movq 0x70(%rsp), %rsi
movq 0x168(%rsp), %rdi
callq 0x84e0
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x8450
jmp 0x61726
cmpb $0x0, 0xaae23(%rip)     # 0x10c2bd
je 0x614a6
movb $0x1, 0x160(%rsp)
jmp 0x614c6
movq 0x208(%rsp), %rdi
subq $-0x80, %rdi
callq 0x52a3e
movb %al, 0x160(%rsp)
testb %al, %al
je 0x617f3
movl 0x58(%rsp), %eax
cmpl 0xaa050(%rip), %eax     # 0x10b520
jge 0x614d7
movb $0x0, 0x5c(%rsp)
movl 0x68(%rsp), %eax
cmpl 0xaadd3(%rip), %eax     # 0x10c2b4
jl 0x614f2
cmpl 0xaa03b(%rip), %eax     # 0x10b524
jg 0x614f2
movb $0x1, 0x5d(%rsp)
jmp 0x614f7
movb $0x0, 0x5d(%rsp)
movq 0x78(%rsp), %rdx
testq %rdx, %rdx
je 0x61593
leaq 0x250(%rsp), %rax
movq %rax, 0x240(%rsp)
movq 0x70(%rsp), %rsi
addq %rsi, %rdx
leaq 0x240(%rsp), %rdi
callq 0x2e45c
leaq 0x240(%rsp), %rdi
callq 0x5054c
movsd 0xa9ff9(%rip), %xmm1    # 0x10b538
movq 0x240(%rsp), %rdi
leaq 0x250(%rsp), %rax
cmpq %rax, %rdi
je 0x61588
movq 0x250(%rsp), %rsi
incq %rsi
movsd %xmm0, 0x1b8(%rsp)
movsd %xmm1, 0x1b0(%rsp)
callq 0x8480
movsd 0x1b0(%rsp), %xmm1
movsd 0x1b8(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x61593
movb $0x0, 0x5e(%rsp)
movq 0x98(%rsp), %rdx
testq %rdx, %rdx
je 0x61635
leaq 0x230(%rsp), %rax
movq %rax, 0x220(%rsp)
movq 0x90(%rsp), %rsi
addq %rsi, %rdx
leaq 0x220(%rsp), %rdi
callq 0x2e45c
leaq 0x220(%rsp), %rdi
callq 0x5054c
movsd 0xaacdf(%rip), %xmm1    # 0x10c2c0
movq 0x220(%rsp), %rdi
leaq 0x230(%rsp), %rax
cmpq %rax, %rdi
je 0x6162a
movq 0x230(%rsp), %rsi
incq %rsi
movsd %xmm0, 0x1b8(%rsp)
movsd %xmm1, 0x1b0(%rsp)
callq 0x8480
movsd 0x1b0(%rsp), %xmm1
movsd 0x1b8(%rsp), %xmm0
ucomisd %xmm0, %xmm1
jbe 0x61635
movb $0x0, 0x5e(%rsp)
movsd 0xa9f03(%rip), %xmm0    # 0x10b540
ucomisd 0xb8(%rsp), %xmm0
jbe 0x6164d
movb $0x0, 0x5f(%rsp)
movl 0x60(%rsp), %eax
movl 0xa9ed1(%rip), %ecx     # 0x10b528
cmpl %ecx, %eax
jl 0x616e4
movl 0x1e4(%rsp), %edx
subl %ecx, %edx
cmpl %edx, %eax
jg 0x616e4
movb 0x5f(%rsp), %al
cmpb $0x1, %al
jne 0x617d0
cmpb $0x1, 0x5d(%rsp)
jne 0x617d0
cmpb $0x1, 0x5c(%rsp)
jne 0x617d0
cmpb $0x1, 0x5e(%rsp)
jne 0x617d0
movq 0x170(%rsp), %rsi
movq 0x178(%rsp), %rdx
movq 0xa9908(%rip), %rdi     # 0x10afb8
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 0x61803
incl 0x54(%rsp)
jmp 0x61803
movq 0x98(%rsp), %rdx
testq %rdx, %rdx
je 0x61739
movq 0x90(%rsp), %rsi
movq 0x168(%rsp), %rdi
callq 0x84e0
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %rbp, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
movsd 0xb0(%rsp), %xmm0
movsd 0x75746(%rip), %xmm1    # 0xd6e90
ucomisd %xmm0, %xmm1
jbe 0x61787
movq 0x1c0(%rsp), %rdi
callq 0x8730
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
movl 0x58(%rsp), %esi
movq 0x1c8(%rsp), %rdi
callq 0x8810
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
cmpl $0xf423f, %r12d         # imm = 0xF423F
jl 0x61803
jmp 0x625c2
incl 0x10(%rsp)
testb %al, %al
jne 0x61823
cmpb $0x1, 0x5d(%rsp)
jne 0x6181f
cmpb $0x1, 0x5c(%rsp)
jne 0x6181f
cmpb $0x1, 0x5e(%rsp)
jne 0x6181f
incl 0x48(%rsp)
jmp 0x61803
movb $0x0, 0x160(%rsp)
incl 0x10(%rsp)
incl 0x50(%rsp)
leaq 0x208(%rsp), %rdi
callq 0x3123c
leaq 0x60(%rsp), %rdi
callq 0x31188
jmp 0x60d68
testb %al, %al
je 0x6187e
cmpb $0x0, 0x5d(%rsp)
jne 0x6183e
cmpb $0x1, 0x5c(%rsp)
jne 0x6183e
cmpb $0x1, 0x5e(%rsp)
jne 0x6183e
incl 0x4c(%rsp)
jmp 0x61803
testb %al, %al
je 0x6187e
cmpb $0x1, 0x5d(%rsp)
jne 0x6185d
cmpb $0x0, 0x5c(%rsp)
jne 0x6185d
cmpb $0x1, 0x5e(%rsp)
jne 0x6185d
incl 0x40(%rsp)
jmp 0x61803
testb %al, %al
je 0x6187e
cmpb $0x1, 0x5d(%rsp)
jne 0x6187a
cmpb $0x1, 0x5c(%rsp)
jne 0x6187a
cmpb $0x0, 0x5e(%rsp)
je 0x61a08
testb %al, %al
jne 0x618a0
cmpb $0x1, 0x5d(%rsp)
jne 0x6189c
cmpb $0x0, 0x5c(%rsp)
jne 0x6189c
cmpb $0x1, 0x5e(%rsp)
jne 0x6189c
incl 0x38(%rsp)
jmp 0x61803
testb %al, %al
je 0x618df
cmpb $0x0, 0x5d(%rsp)
jne 0x618be
cmpb $0x0, 0x5c(%rsp)
jne 0x618be
cmpb $0x1, 0x5e(%rsp)
jne 0x618be
incl 0x2c(%rsp)
jmp 0x61803
testb %al, %al
je 0x618df
cmpb $0x1, 0x5d(%rsp)
jne 0x618db
cmpb $0x0, 0x5c(%rsp)
jne 0x618db
cmpb $0x0, 0x5e(%rsp)
je 0x619ff
testb %al, %al
jne 0x618fc
cmpb $0x1, 0x5d(%rsp)
jne 0x618f8
cmpb $0x1, 0x5c(%rsp)
jne 0x618f8
cmpb $0x0, 0x5e(%rsp)
je 0x619db
testb %al, %al
je 0x61919
cmpb $0x0, 0x5d(%rsp)
jne 0x61915
cmpb $0x1, 0x5c(%rsp)
jne 0x61915
cmpb $0x0, 0x5e(%rsp)
je 0x619ed
testb %al, %al
jne 0x6195d
cmpb $0x0, 0x5d(%rsp)
jne 0x61937
cmpb $0x1, 0x5c(%rsp)
jne 0x61937
cmpb $0x1, 0x5e(%rsp)
jne 0x61937
incl 0x44(%rsp)
jmp 0x61803
testb %al, %al
jne 0x6195d
cmpb $0x0, 0x5d(%rsp)
jne 0x61959
cmpb $0x0, 0x5c(%rsp)
jne 0x61959
cmpb $0x1, 0x5e(%rsp)
jne 0x61959
incl 0x20(%rsp)
jmp 0x61803
testb %al, %al
je 0x6197a
cmpb $0x0, 0x5d(%rsp)
jne 0x61972
cmpb $0x0, 0x5c(%rsp)
jne 0x61972
cmpb $0x0, 0x5e(%rsp)
je 0x619e4
testb %al, %al
jne 0x61803
cmpb $0x1, 0x5d(%rsp)
jne 0x6198f
cmpb $0x0, 0x5c(%rsp)
jne 0x6198f
cmpb $0x0, 0x5e(%rsp)
je 0x619f6
testb %al, %al
jne 0x61803
cmpb $0x0, 0x5d(%rsp)
jne 0x619ac
cmpb $0x1, 0x5c(%rsp)
jne 0x619ac
cmpb $0x0, 0x5e(%rsp)
je 0x61a11
testb %al, %al
jne 0x61803
cmpb $0x0, 0x5d(%rsp)
jne 0x61803
cmpb $0x0, 0x5c(%rsp)
jne 0x61803
movzbl 0x5e(%rsp), %eax
xorl $0x1, %eax
addl %eax, 0x14(%rsp)
jmp 0x61803
incl 0x34(%rsp)
jmp 0x61803
incl 0x30(%rsp)
jmp 0x61803
incl 0x28(%rsp)
jmp 0x61803
incl 0x24(%rsp)
jmp 0x61803
incl 0x1c(%rsp)
jmp 0x61803
incl 0x3c(%rsp)
jmp 0x61803
incl 0x18(%rsp)
jmp 0x61803
movq 0xa95c7(%rip), %rdi     # 0x10afe8
leaq 0x77ab3(%rip), %rsi     # 0xd94db
movl $0x1d, %edx
callq 0x84e0
movl 0x48(%rsp), %ebp
movl 0x4c(%rsp), %r14d
movl 0x3c(%rsp), %r15d
movl 0x40(%rsp), %r12d
movl 0x44(%rsp), %r13d
movq 0xa9597(%rip), %rdi     # 0x10afe8
movl 0x10(%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 0xa955d(%rip), %rbx     # 0x10afe8
leaq 0x77a67(%rip), %rsi     # 0xd94f9
movl $0x16, %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 0xa952b(%rip), %rdi     # 0x10afe8
callq 0x8040
movq %rax, %rdi
callq 0x8300
movq 0xa9517(%rip), %rdi     # 0x10afe8
leaq 0x77a38(%rip), %rsi     # 0xd9510
movl $0xf, %edx
callq 0x84e0
movq 0xa94ff(%rip), %rdi     # 0x10afe8
movl 0x50(%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 0xa94c5(%rip), %rdi     # 0x10afe8
leaq 0x779f6(%rip), %rsi     # 0xd9520
movl $0x2f, %edx
callq 0x84e0
movq 0xa94ad(%rip), %rdi     # 0x10afe8
movl 0x54(%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 0xa9473(%rip), %rbx     # 0x10afe8
leaq 0x779d4(%rip), %rsi     # 0xd9550
movl $0xe, %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 0xa9441(%rip), %rdi     # 0x10afe8
callq 0x8040
movq %rax, %rdi
callq 0x8300
movq 0xa942d(%rip), %rbx     # 0x10afe8
leaq 0x7799d(%rip), %rsi     # 0xd955f
movl $0x56, %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 0xa93fb(%rip), %rdi     # 0x10afe8
callq 0x8040
movq %rax, %rdi
callq 0x8300
movq 0xa93e7(%rip), %rdi     # 0x10afe8
leaq 0x779ae(%rip), %rsi     # 0xd95b6
movl $0xc, %edx
callq 0x84e0
movq 0xa93cf(%rip), %rdi     # 0x10afe8
movl 0x14(%rsp), %esi
callq 0x8810
movq %rax, %rbx
leaq 0x77997(%rip), %rsi     # 0xd95c3
movl $0x2, %edx
movq %rax, %rdi
callq 0x84e0
cvtsi2sdl 0x14(%rsp), %xmm0
cvtsi2sdl 0x10(%rsp), %xmm1
movsd %xmm1, 0x8(%rsp)
divsd %xmm1, %xmm0
mulsd 0x74cc1(%rip), %xmm0    # 0xd6918
movq %rbx, %rdi
callq 0x8730
movq %rax, %rbx
leaq 0x7ddce(%rip), %rsi     # 0xdfa37
movl $0x2, %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
movq 0xa9344(%rip), %rdi     # 0x10afe8
leaq 0x7791b(%rip), %rsi     # 0xd95c6
movl $0xa, %edx
callq 0x84e0
movq 0xa932c(%rip), %rdi     # 0x10afe8
movl 0x20(%rsp), %esi
callq 0x8810
movq %rax, %rbx
leaq 0x778f4(%rip), %rsi     # 0xd95c3
movl $0x2, %edx
movq %rax, %rdi
callq 0x84e0
xorps %xmm0, %xmm0
cvtsi2sdl 0x20(%rsp), %xmm0
divsd 0x8(%rsp), %xmm0
mulsd 0x74c25(%rip), %xmm0    # 0xd6918
movq %rbx, %rdi
callq 0x8730
movq %rax, %rbx
leaq 0x7dd32(%rip), %rsi     # 0xdfa37
movl $0x2, %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
movq 0xa92a8(%rip), %rdi     # 0x10afe8
leaq 0x7788a(%rip), %rsi     # 0xd95d1
movl $0xb, %edx
callq 0x84e0
movq 0xa9290(%rip), %rdi     # 0x10afe8
movl 0x30(%rsp), %esi
callq 0x8810
movq %rax, %rbx
leaq 0x77858(%rip), %rsi     # 0xd95c3
movl $0x2, %edx
movq %rax, %rdi
callq 0x84e0
xorps %xmm0, %xmm0
cvtsi2sdl 0x30(%rsp), %xmm0
divsd 0x8(%rsp), %xmm0
mulsd 0x74b89(%rip), %xmm0    # 0xd6918
movq %rbx, %rdi
callq 0x8730
movq %rax, %rbx
leaq 0x7dc96(%rip), %rsi     # 0xdfa37
movl $0x2, %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
movq 0xa920c(%rip), %rdi     # 0x10afe8
leaq 0x777fa(%rip), %rsi     # 0xd95dd
movl $0xa, %edx
callq 0x84e0
movq 0xa91f4(%rip), %rdi     # 0x10afe8
movl 0x24(%rsp), %esi
callq 0x8810
movq %rax, %rbx
leaq 0x777bc(%rip), %rsi     # 0xd95c3
movl $0x2, %edx
movq %rax, %rdi
callq 0x84e0
xorps %xmm0, %xmm0
cvtsi2sdl 0x24(%rsp), %xmm0
divsd 0x8(%rsp), %xmm0
mulsd 0x74aed(%rip), %xmm0    # 0xd6918
movq %rbx, %rdi
callq 0x8730
movq %rax, %rbx
leaq 0x7dbfa(%rip), %rsi     # 0xdfa37
movl $0x2, %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
movq 0xa9170(%rip), %rdi     # 0x10afe8
leaq 0x77769(%rip), %rsi     # 0xd95e8
movl $0xa, %edx
callq 0x84e0
movq 0xa9158(%rip), %rdi     # 0x10afe8
movl 0x18(%rsp), %esi
callq 0x8810
movq %rax, %rbx
leaq 0x77720(%rip), %rsi     # 0xd95c3
movl $0x2, %edx
movq %rax, %rdi
callq 0x84e0
xorps %xmm0, %xmm0
cvtsi2sdl 0x18(%rsp), %xmm0
divsd 0x8(%rsp), %xmm0
mulsd 0x74a51(%rip), %xmm0    # 0xd6918
movq %rbx, %rdi
callq 0x8730
movq %rax, %rbx
leaq 0x7db5e(%rip), %rsi     # 0xdfa37
movl $0x2, %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
movq 0xa90d4(%rip), %rdi     # 0x10afe8
leaq 0x776d8(%rip), %rsi     # 0xd95f3
movl $0x8, %edx
callq 0x84e0
movq 0xa90bc(%rip), %rdi     # 0x10afe8
movl 0x2c(%rsp), %esi
callq 0x8810
movq %rax, %rbx
leaq 0x77684(%rip), %rsi     # 0xd95c3
movl $0x2, %edx
movq %rax, %rdi
callq 0x84e0
xorps %xmm0, %xmm0
cvtsi2sdl 0x2c(%rsp), %xmm0
divsd 0x8(%rsp), %xmm0
mulsd 0x749b5(%rip), %xmm0    # 0xd6918
movq %rbx, %rdi
callq 0x8730
movq %rax, %rbx
leaq 0x7dac2(%rip), %rsi     # 0xdfa37
movl $0x2, %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
movq 0xa9038(%rip), %rdi     # 0x10afe8
leaq 0x77645(%rip), %rsi     # 0xd95fc
movl $0x7, %edx
callq 0x84e0
movq 0xa9020(%rip), %rdi     # 0x10afe8
movl 0x38(%rsp), %esi
callq 0x8810
movq %rax, %rbx
leaq 0x775e8(%rip), %rsi     # 0xd95c3
movl $0x2, %edx
movq %rax, %rdi
callq 0x84e0
xorps %xmm0, %xmm0
cvtsi2sdl 0x38(%rsp), %xmm0
divsd 0x8(%rsp), %xmm0
mulsd 0x74919(%rip), %xmm0    # 0xd6918
movq %rbx, %rdi
callq 0x8730
movq %rax, %rbx
leaq 0x7da26(%rip), %rsi     # 0xdfa37
movl $0x2, %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
movq 0xa8f9c(%rip), %rdi     # 0x10afe8
leaq 0x775b1(%rip), %rsi     # 0xd9604
movl $0x8, %edx
callq 0x84e0
movq 0xa8f84(%rip), %rdi     # 0x10afe8
movl 0x1c(%rsp), %esi
callq 0x8810
movq %rax, %rbx
leaq 0x7754c(%rip), %rsi     # 0xd95c3
movl $0x2, %edx
movq %rax, %rdi
callq 0x84e0
xorps %xmm0, %xmm0
cvtsi2sdl 0x1c(%rsp), %xmm0
divsd 0x8(%rsp), %xmm0
mulsd 0x7487d(%rip), %xmm0    # 0xd6918
movq %rbx, %rdi
callq 0x8730
movq %rax, %rbx
leaq 0x7d98a(%rip), %rsi     # 0xdfa37
movl $0x2, %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
movq 0xa8f00(%rip), %rdi     # 0x10afe8
leaq 0x774f1(%rip), %rsi     # 0xd95e0
movl $0x7, %edx
callq 0x84e0
movq 0xa8ee8(%rip), %rdi     # 0x10afe8
movl 0x34(%rsp), %esi
callq 0x8810
movq %rax, %rbx
leaq 0x774b0(%rip), %rsi     # 0xd95c3
movl $0x2, %edx
movq %rax, %rdi
callq 0x84e0
xorps %xmm0, %xmm0
cvtsi2sdl 0x34(%rsp), %xmm0
divsd 0x8(%rsp), %xmm0
mulsd 0x747e1(%rip), %xmm0    # 0xd6918
movq %rbx, %rdi
callq 0x8730
movq %rax, %rbx
leaq 0x7d8ee(%rip), %rsi     # 0xdfa37
movl $0x2, %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
movq 0xa8e64(%rip), %rdi     # 0x10afe8
leaq 0x77482(%rip), %rsi     # 0xd960d
movl $0x8, %edx
callq 0x84e0
movq 0xa8e4c(%rip), %rdi     # 0x10afe8
movl 0x28(%rsp), %esi
callq 0x8810
movq %rax, %rbx
leaq 0x77414(%rip), %rsi     # 0xd95c3
movl $0x2, %edx
movq %rax, %rdi
callq 0x84e0
xorps %xmm0, %xmm0
cvtsi2sdl 0x28(%rsp), %xmm0
divsd 0x8(%rsp), %xmm0
mulsd 0x74745(%rip), %xmm0    # 0xd6918
movq %rbx, %rdi
callq 0x8730
movq %rax, %rbx
leaq 0x7d852(%rip), %rsi     # 0xdfa37
movl $0x2, %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
movq 0xa8dc8(%rip), %rdi     # 0x10afe8
leaq 0x773c4(%rip), %rsi     # 0xd95eb
movl $0x7, %edx
callq 0x84e0
movq 0xa8db0(%rip), %rdi     # 0x10afe8
movl %r13d, %esi
callq 0x8810
movq %rax, %rbx
leaq 0x77379(%rip), %rsi     # 0xd95c3
movl $0x2, %edx
movq %rax, %rdi
callq 0x84e0
xorps %xmm0, %xmm0
cvtsi2sd %r13d, %xmm0
divsd 0x8(%rsp), %xmm0
mulsd 0x746ab(%rip), %xmm0    # 0xd6918
movq %rbx, %rdi
callq 0x8730
movq %rax, %rbx
leaq 0x7d7b8(%rip), %rsi     # 0xdfa37
movl $0x2, %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
movq 0xa8d2e(%rip), %rdi     # 0x10afe8
leaq 0x77355(%rip), %rsi     # 0xd9616
movl $0x5, %edx
callq 0x84e0
movq 0xa8d16(%rip), %rdi     # 0x10afe8
movl %r12d, %esi
callq 0x8810
movq %rax, %rbx
leaq 0x772df(%rip), %rsi     # 0xd95c3
movl $0x2, %edx
movq %rax, %rdi
callq 0x84e0
xorps %xmm0, %xmm0
cvtsi2sd %r12d, %xmm0
divsd 0x8(%rsp), %xmm0
mulsd 0x74611(%rip), %xmm0    # 0xd6918
movq %rbx, %rdi
callq 0x8730
movq %rax, %rbx
leaq 0x7d71e(%rip), %rsi     # 0xdfa37
movl $0x2, %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
movq 0xa8c94(%rip), %rdi     # 0x10afe8
leaq 0x7727c(%rip), %rsi     # 0xd95d7
movl $0x5, %edx
callq 0x84e0
movq 0xa8c7c(%rip), %rdi     # 0x10afe8
movl %r15d, %esi
callq 0x8810
movq %rax, %rbx
leaq 0x77245(%rip), %rsi     # 0xd95c3
movl $0x2, %edx
movq %rax, %rdi
callq 0x84e0
xorps %xmm0, %xmm0
cvtsi2sd %r15d, %xmm0
divsd 0x8(%rsp), %xmm0
mulsd 0x74577(%rip), %xmm0    # 0xd6918
movq %rbx, %rdi
callq 0x8730
movq %rax, %rbx
leaq 0x7d684(%rip), %rsi     # 0xdfa37
movl $0x2, %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
movq 0xa8bfa(%rip), %rdi     # 0x10afe8
leaq 0x7721b(%rip), %rsi     # 0xd9610
movl $0x5, %edx
callq 0x84e0
movq 0xa8be2(%rip), %rdi     # 0x10afe8
movl %r14d, %esi
callq 0x8810
movq %rax, %rbx
leaq 0x771ab(%rip), %rsi     # 0xd95c3
movl $0x2, %edx
movq %rax, %rdi
callq 0x84e0
xorps %xmm0, %xmm0
cvtsi2sd %r14d, %xmm0
divsd 0x8(%rsp), %xmm0
mulsd 0x744dd(%rip), %xmm0    # 0xd6918
movq %rbx, %rdi
callq 0x8730
movq %rax, %rbx
leaq 0x7d5ea(%rip), %rsi     # 0xdfa37
movl $0x2, %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
movq 0xa8b60(%rip), %rdi     # 0x10afe8
leaq 0x77154(%rip), %rsi     # 0xd95e3
movl $0x4, %edx
callq 0x84e0
movq 0xa8b48(%rip), %rdi     # 0x10afe8
movl %ebp, %esi
callq 0x8810
movq %rax, %rbx
leaq 0x77112(%rip), %rsi     # 0xd95c3
movl $0x2, %edx
movq %rax, %rdi
callq 0x84e0
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
divsd 0x8(%rsp), %xmm0
mulsd 0x74445(%rip), %xmm0    # 0xd6918
movq %rbx, %rdi
callq 0x8730
movq %rax, %rbx
leaq 0x7d552(%rip), %rsi     # 0xdfa37
movl $0x2, %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
movq 0x170(%rsp), %rdi
leaq 0x180(%rsp), %rax
cmpq %rax, %rdi
je 0x6253e
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x2a0(%rsp), %rdi
callq 0x4b0a4
movq 0x280(%rsp), %rdi
testq %rdi, %rdi
leaq 0x1a0(%rsp), %rbx
je 0x62570
movq 0x290(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
leaq 0x1f8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x62591
movq 0x1f8(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x190(%rsp), %rdi
cmpq %rbx, %rdi
je 0x625ae
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x8480
xorl %eax, %eax
addq $0x3b8, %rsp            # imm = 0x3B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %edi, %edi
callq 0x8530
jmp 0x625cb
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r14, %rdi
je 0x625ea
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x625ea
movq %rax, %rbx
movl $0x200, %esi            # imm = 0x200
movq 0x1c0(%rsp), %rdi
jmp 0x627cd
jmp 0x625fe
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r14, %rdi
je 0x6261d
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x6261d
movq %rax, %rbx
movl $0x200, %esi            # imm = 0x200
movq 0x1c8(%rsp), %rdi
jmp 0x627cd
jmp 0x62631
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r14, %rdi
je 0x62650
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x62650
movq %rax, %rbx
movl $0x200, %esi            # imm = 0x200
movq 0x168(%rsp), %rdi
jmp 0x627cd
jmp 0x62664
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r14, %rdi
je 0x62683
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x62683
movq %rax, %rbx
movl $0x200, %esi            # imm = 0x200
movq 0x1d0(%rsp), %rdi
jmp 0x627cd
jmp 0x62697
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r14, %rdi
je 0x626b6
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x626b6
movq %rax, %rbx
movl $0x200, %esi            # imm = 0x200
movq 0x1d8(%rsp), %rdi
jmp 0x627cd
movq %rax, %rbx
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x627d2
movq 0x68(%rsp), %rsi
jmp 0x627ca
jmp 0x6276f
movq %rax, %rbx
jmp 0x6281d
movq %rax, %rbx
movq 0x240(%rsp), %rdi
leaq 0x250(%rsp), %rax
cmpq %rax, %rdi
je 0x62777
movq 0x250(%rsp), %rsi
jmp 0x62761
movq %rax, %rbx
movq 0x220(%rsp), %rdi
leaq 0x230(%rsp), %rax
cmpq %rax, %rdi
je 0x62777
movq 0x230(%rsp), %rsi
jmp 0x62761
jmp 0x62774
jmp 0x62774
movq %rax, %rbx
jmp 0x62784
movq %rax, %rbx
movq 0x260(%rsp), %rdi
leaq 0x270(%rsp), %rax
cmpq %rax, %rdi
je 0x62777
movq 0x270(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x62777
jmp 0x627a2
jmp 0x62774
movq %rax, %rbx
jmp 0x627d2
movq %rax, %rbx
leaq 0x208(%rsp), %rdi
callq 0x3123c
leaq 0x1a0(%rsp), %r15
leaq 0x180(%rsp), %r14
leaq 0x60(%rsp), %rdi
callq 0x31188
jmp 0x627b5
jmp 0x627a2
movq %rax, %rbx
leaq 0x1a0(%rsp), %r15
leaq 0x180(%rsp), %r14
movq 0x170(%rsp), %rdi
cmpq %r14, %rdi
je 0x627d2
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x2a0(%rsp), %rdi
callq 0x4b0a4
movq 0x280(%rsp), %rdi
testq %rdi, %rdi
je 0x627fc
movq 0x290(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
leaq 0x1f8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6281d
movq 0x1f8(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x190(%rsp), %rdi
cmpq %r15, %rdi
je 0x6283a
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x8480
movq %rbx, %rdi
callq 0x8840