// File: /workspace/github_cpp_makefile_star2_O2/millanek[P]evo/evo_ABS.cpp
// Function: ABSmain(int, char**)
int ABSmain(int argc, char** argv) {
    parseABSoptions(argc, argv);
    string line; // for reading the input files
    
    // Load up the annotation file
    Annotation wgAnnotation; std::ifstream* annotFile;
    if (!opt::annotFile.empty()) {
        annotFile = new std::ifstream(opt::annotFile.c_str());
        Annotation Annot(annotFile, false); // Does not use transcripts annotated as 5' or 3' partial
        wgAnnotation = Annot;
    }
    
    std::istream* vcfFile = createReader(opt::vcfFile.c_str());
    std::ifstream* setsFile = new std::ifstream(opt::setsFile.c_str());
    std::ifstream* ABSquartetFile = new std::ifstream(opt::ABSquartetFile.c_str());
    
    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;
    
    // 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)
    std::vector<string> populations;
    for(std::map<string,std::vector<string>>::iterator it = popToIDsMap.begin(); it != popToIDsMap.end(); ++it) {
        populations.push_back(it->first);
        // std::cerr << it->first << std::endl;
    } std::cerr << "There are " << populations.size() << " populations " << std::endl;
    
    // Get the ABS quartets
    std::vector<std::ofstream*> outFiles;
    //std::vector<std::ofstream*> outFileGenes;
    std::vector<std::vector<string> > ABSquartets;
    while (getline(*ABSquartetFile,line)) {
        // std::cerr << line << std::endl;
        std::vector<string> fourPops = split(line, '\t'); assert(fourPops.size() == 4);
        ABSquartets.push_back(fourPops);
        std::ofstream* outFile = new std::ofstream(fourPops[0] + "_" + fourPops[1] + "_" + fourPops[2] + "_" + fourPops[3] + "_ABS_" + opt::runName + "_" + numToString(opt::windowSize) + "_" + numToString(opt::windowStep) + ".txt");
        *outFile << "chr\tpos1\tpos2\tABS\tABSalt" << std::endl;
        outFiles.push_back(outFile);
    }
    
    // And need to prepare the vectors to hold the ABS values and the coordinates:
    std::deque<double> initDeq(opt::windowSize,0.0); // deque to initialise per-site ABS values
    std::vector<std::deque<double>> initABSdeques(3,initDeq); // vector of per-site ABS deques - two for each quartet plus one for the coordinates
    std::vector<std::vector<std::deque<double>>> ABSresults(ABSquartets.size(),initABSdeques); // one set of deques for each quartet
    
    // if (!opt::annotFile.empty()) {
    //std::vector<std::vector<double>> initGeneVectors(9); // For the nine PBS columns in the _PBSGenes_ files
    //std::vector<std::vector<std::vector<double>>> PBSgeneResults(PBStrios.size(),initGeneVectors);
    //std::string currentGene = "";
    //}
    //std::deque<std::vector<double>> regionPBSnums; regionPBSnums.assign(opt::windowSize,init);
    //std::deque<std::vector<double>> regionPBSdenoms; regionPBSdenoms.assign(opt::windowSize,init);
    //std::vector<double> allPs(populations.size(),0.0);
    int totalVariantNumber = 0;
    std::vector<int> usedVars(ABSquartets.size(),0); // Will count the number of used variants for each quartet
    std::vector<string> sampleNames; std::vector<std::string> fields;
    int reportProgressEvery = 1000; string chr; string coord;
    std::clock_t start; std::clock_t startGettingCounts; std::clock_t startCalculation;
    double durationOverall; double durationGettingCounts; double durationCalculation;
    
    while (getline(*vcfFile, line)) {
        line.erase(std::remove(line.begin(), line.end(), '\r'), line.end()); // Deal with any left over \r from files prepared on Windows
        if (line[0] == '#' && line[1] == '#')
            continue;
        else if (line[0] == '#' && line[1] == 'C') {
            fields = split(line, '\t');
            std::vector<std::string> sampleNames(fields.begin()+NUM_NON_GENOTYPE_COLUMNS,fields.end());
            // 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;
            }
            start = std::clock();
            //  std::cerr << " " << std::endl;
            //  std::cerr << "Outgroup at pos: "; print_vector_stream(speciesToPosMap["Outgroup"], std::cerr);
            //  std::cerr << "telvit at pos: "; print_vector_stream(speciesToPosMap["telvit"], std::cerr);
        } else {
            totalVariantNumber++;
            if (totalVariantNumber % reportProgressEvery == 0) {
                durationOverall = ( std::clock() - start ) / (double) CLOCKS_PER_SEC;
                std::cerr << "Processed " << totalVariantNumber << " variants in " << durationOverall << "secs" << std::endl;
                std::cerr << "GettingCounts " << durationGettingCounts << " calculation " << durationCalculation << "secs" << std::endl;
            }
            fields = split(line, '\t'); chr = fields[0]; coord = fields[1];
            std::vector<std::string> genotypes(fields.begin()+NUM_NON_GENOTYPE_COLUMNS,fields.end());
            //std::vector<std::string> info = split(fields[7], ';');
            // Only consider biallelic SNPs
            string refAllele = fields[3]; string altAllele = fields[4];
            if (refAllele.length() > 1 || altAllele.length() > 1 || altAllele == "*") {
                refAllele.clear(); refAllele.shrink_to_fit(); altAllele.clear(); altAllele.shrink_to_fit();
                genotypes.clear(); genotypes.shrink_to_fit(); continue;
            }
            startGettingCounts = std::clock();
            GeneralSetCounts* c = new GeneralSetCounts(popToPosMap, (int)genotypes.size());
            c->getSetVariantCountsSimple(genotypes, posToPopMap);
            genotypes.clear(); genotypes.shrink_to_fit();
            durationGettingCounts = ( std::clock() - startGettingCounts ) / (double) CLOCKS_PER_SEC;
            // std::cerr << "Here:" << totalVariantNumber << std::endl;
            
            startCalculation = std::clock();
            
            
            // for (std::vector<std::string>::size_type i = 0; i != populations.size(); i++) {
            //     allPs[i] = c->setAAFs.at(populations[i]);
            // }
            // durationFirstLoop = ( std::clock() - startCalculation ) / (double) CLOCKS_PER_SEC;
            
            // find if we are in a gene:
            std::vector<string> SNPgeneDetails = wgAnnotation.getSNPgeneDetails(chr, atoi(coord.c_str()));
            
            // std::cerr << coord << "\t";
            // print_vector_stream(SNPgeneDetails, std::cerr);
            // Now calculate the PBS stats:
            double pW; double pX; double pY; double pZ;
            for (int i = 0; i != ABSquartets.size(); i++) {
                pW = c->setAAFs.at(ABSquartets[i][0]);
                if (pW == -1) continue;  // If any member of the trio has entirely missing data, just move on to the next trio
                pX = c->setAAFs.at(ABSquartets[i][1]);
                if (pX == -1) continue;
                pY = c->setAAFs.at(ABSquartets[i][2]);
                if (pY == -1) continue;
                pZ = c->setAAFs.at(ABSquartets[i][3]);
                if (pZ == -1) continue;
                
                if (pW == 0 && pX == 0 && pY == 0 && pZ == 0) { continue; }
                if (pW == 1 && pX == 1 && pY == 1 && pZ == 1) { continue; }
                usedVars[i]++;
                
                std::vector<double> thisSNP_ABS = calculateABSfromAFs(pW,pX,pY,pZ,
                                                                      c->setAlleleCounts.at(ABSquartets[i][0]),
                                                                      c->setAlleleCounts.at(ABSquartets[i][1]),
                                                                      c->setAlleleCounts.at(ABSquartets[i][2]),
                                                                      c->setAlleleCounts.at(ABSquartets[i][3]));
                
                ABSresults[i][0].push_back(thisSNP_ABS[0]); ABSresults[i][1].push_back(thisSNP_ABS[1]); ABSresults[i][2].push_back(stringToDouble(coord));
                ABSresults[i][0].pop_front(); ABSresults[i][1].pop_front(); ABSresults[i][2].pop_front();
                
                /*if (!opt::annotFile.empty()) { if (SNPgeneDetails[0] != "") {
                    if (SNPgeneDetails[1] == "exon") {
                        PBSgeneResults[i][0].push_back(thisSNP_PBS[0]); PBSgeneResults[i][1].push_back(thisSNP_PBS[1]); PBSgeneResults[i][2].push_back(thisSNP_PBS[2]);
                    } PBSgeneResults[i][3].push_back(thisSNP_PBS[0]); PBSgeneResults[i][4].push_back(thisSNP_PBS[1]); PBSgeneResults[i][5].push_back(thisSNP_PBS[2]);
                    currentGene = SNPgeneDetails[0];
                }} */
                if (usedVars[i] > opt::windowSize && (usedVars[i] % opt::windowStep == 0)) {
                    // std::cerr << PBSresults[i][0][0] << std::endl;
                    *outFiles[i] << chr << "\t" << ABSresults[i][2][0] << "\t" << coord << "\t" << vector_average(ABSresults[i][0]) << "\t" << vector_average(ABSresults[i][1]) << std::endl;
                }
                // }
            }
            /*if (!opt::annotFile.empty()) { if (SNPgeneDetails[0] == "" && currentGene != "") {
                for (int i = 0; i != ABStrios.size(); i++) {
                    *outFilesGenes[i] << currentGene << "\t" << ABSgeneResults[i][0].size() << "\t" << PBSgeneResults[i][3].size() << "\t" << vector_average(PBSgeneResults[i][0]) << "\t" << vector_average(PBSgeneResults[i][1]) << "\t" << vector_average(PBSgeneResults[i][2]) << "\t" << vector_average(PBSgeneResults[i][3]) << "\t" << vector_average(PBSgeneResults[i][4]) << "\t" << vector_average(PBSgeneResults[i][5]) << std::endl;
                    for (int j = 0; j <= 5; j++) { PBSgeneResults[i][j].clear(); }
                }
                currentGene = "";
            }} */
            durationCalculation = ( std::clock() - startCalculation ) / (double) CLOCKS_PER_SEC;
            delete c;
        }
    }
    
    return 0;
    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x5e8, %rsp            # imm = 0x5E8
callq 0x8452c
leaq 0x530(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x560(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x590(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x5c0(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0xb8(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
xorl %eax, %eax
cmpq %rax, 0x5c055(%rip)     # 0xdef90
je 0x82f98
movl $0x208, %edi            # imm = 0x208
callq 0x8490
movq %rax, %r14
movq 0x5c037(%rip), %rsi     # 0xdef88
pushq $0x8
popq %rdx
movq %rax, %rdi
callq 0x8890
leaq 0x310(%rsp), %rsi
movq %r14, (%rsi)
leaq 0x3a8(%rsp), %rdi
xorl %edx, %edx
callq 0x32000
leaq 0x528(%rsp), %rdi
leaq 0x3a8(%rsp), %rsi
callq 0x70d3a
leaq 0x3a8(%rsp), %rdi
callq 0x32212
movq 0x5bf89(%rip), %rsi     # 0xdef28
leaq 0x3a8(%rsp), %rdi
leaq 0x2a0(%rsp), %rdx
callq 0x21904
leaq 0x3a8(%rsp), %rdi
pushq $0x8
popq %rsi
callq 0x42587
movq %rax, 0x1b0(%rsp)
leaq 0x3a8(%rsp), %rdi
callq 0x8978
movl $0x208, %edi            # imm = 0x208
callq 0x8490
movq %rax, %r14
movq 0x5bf5b(%rip), %rsi     # 0xdef48
pushq $0x8
popq %rdx
movq %rax, %rdi
callq 0x8890
movl $0x208, %edi            # imm = 0x208
callq 0x8490
movq 0x5bf5f(%rip), %rsi     # 0xdef68
pushq $0x8
popq %rdx
movq %rax, 0x8(%rsp)
movq %rax, %rdi
callq 0x8890
leaq 0x2a8(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x380(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x350(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x320(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0xa8(%rsp), %rbx
leaq 0x3a8(%rsp), %r15
leaq 0x2a0(%rsp), %r12
leaq 0x378(%rsp), %r13
movq %r14, %rdi
movq %rbx, %rsi
callq 0x80a0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x83124
movq %r15, %rdi
movq %rbx, %rsi
pushq $0x9
popq %rdx
callq 0x40349
movq 0x3a8(%rsp), %rsi
addq $0x20, %rsi
movq %r12, %rdi
callq 0x3abd8
movq 0x3a8(%rsp), %rsi
movq %rax, %rdi
callq 0x2b0a4
movq 0x3a8(%rsp), %rbp
movq %r13, %rdi
movq %rbp, %rsi
callq 0x3210e
addq $0x20, %rbp
movq %rax, %rdi
movq %rbp, %rsi
callq 0x82a0
movq %r15, %rdi
callq 0x28a08
jmp 0x830ad
xorpd %xmm0, %xmm0
leaq 0x280(%rsp), %rbx
movapd %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
movq 0x2b8(%rsp), %r14
leaq 0x2a8(%rsp), %rax
cmpq %rax, %r14
je 0x83167
leaq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0x2b0a4
movq %r14, %rdi
callq 0x8340
movq %rax, %r14
jmp 0x83141
movq 0x59e7a(%rip), %rdi     # 0xdcfe8
leaq 0x2f04c(%rip), %rsi     # 0xb21c1
callq 0x8480
movq 0x288(%rsp), %rsi
subq 0x280(%rsp), %rsi
sarq $0x5, %rsi
movq %rax, %rdi
callq 0x8320
leaq 0x1d337(%rip), %rsi     # 0xa04d4
movq %rax, %rdi
callq 0x8480
movq %rax, %rdi
callq 0x8230
leaq 0x260(%rsp), %rax
andq $0x0, 0x10(%rax)
xorpd %xmm0, %xmm0
movapd %xmm0, (%rax)
leaq 0x10(%rsp), %rax
movapd %xmm0, (%rax)
andq $0x0, 0x10(%rax)
leaq 0x205e5(%rip), %r12     # 0xa37bc
leaq 0x220(%rsp), %r14
leaq 0x60(%rsp), %r13
movq 0x8(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x80a0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x834d2
leaq 0xc8(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
pushq $0x9
popq %rdx
callq 0x40349
movq 0xd0(%rsp), %rax
subq 0xc8(%rsp), %rax
cmpq $0x80, %rax
jne 0x840c5
leaq 0x10(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x29502
movl $0x200, %edi            # imm = 0x200
callq 0x8490
movq %rax, (%rsp)
movq %r14, %rbp
leaq 0x150(%rsp), %r14
movq 0xc8(%rsp), %rsi
leaq 0x1b8(%rsp), %r15
movq %r12, %rdx
movq %r15, %rdi
callq 0x28806
movq 0xc8(%rsp), %rdx
addq $0x20, %rdx
movq %r14, %rbx
movq %r14, %rdi
movq %r15, %rsi
callq 0x287e7
movq %rbp, %r14
movq %rbp, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x28a29
movq 0xc8(%rsp), %rdx
addq $0x40, %rdx
movq %r13, %rdi
movq %r14, %rsi
callq 0x287e7
leaq 0x200(%rsp), %r15
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x28a29
movq 0xc8(%rsp), %rdx
addq $0x60, %rdx
leaq 0x1d8(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x287e7
leaq 0x88(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
leaq 0x2ce9e(%rip), %rdx     # 0xb01ac
callq 0x28a29
leaq 0x240(%rsp), %rbp
movq %rbp, %rdi
movq %r15, %rsi
leaq 0x5bc80(%rip), %rdx     # 0xdefa8
callq 0x287e7
leaq 0x30(%rsp), %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0x28a29
movl 0x5a2cd(%rip), %esi     # 0xdd610
leaq 0x2d0(%rsp), %r15
movq %r15, %rdi
callq 0x28ad3
leaq 0x130(%rsp), %rbp
movq %rbp, %rdi
leaq 0x30(%rsp), %rsi
movq %r15, %rdx
callq 0x28a48
leaq 0xe0(%rsp), %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0x28a29
movl 0x5a290(%rip), %esi     # 0xdd614
leaq 0x468(%rsp), %r15
movq %r15, %rdi
callq 0x28ad3
leaq 0x100(%rsp), %rbx
movq %rbx, %rdi
leaq 0xe0(%rsp), %rsi
movq %r15, %rdx
callq 0x28a48
leaq 0x3a8(%rsp), %rbp
movq %rbp, %rdi
movq %rbx, %rsi
leaq 0x29a61(%rip), %rdx     # 0xace25
callq 0x28a29
movq (%rsp), %r15
movq %r15, %rdi
movq %rbp, %rsi
pushq $0x10
popq %rdx
callq 0x8900
movq %rbp, %rdi
callq 0x8978
leaq 0x100(%rsp), %rdi
callq 0x8978
leaq 0x468(%rsp), %rdi
callq 0x8978
leaq 0xe0(%rsp), %rdi
callq 0x8978
leaq 0x130(%rsp), %rdi
callq 0x8978
leaq 0x2d0(%rsp), %rdi
callq 0x8978
leaq 0x30(%rsp), %rdi
callq 0x8978
leaq 0x240(%rsp), %rdi
callq 0x8978
leaq 0x88(%rsp), %rdi
callq 0x8978
leaq 0x1d8(%rsp), %rdi
callq 0x8978
leaq 0x200(%rsp), %rdi
callq 0x8978
movq %r13, %rdi
callq 0x8978
movq %r14, %rdi
callq 0x8978
leaq 0x150(%rsp), %rdi
callq 0x8978
leaq 0x1b8(%rsp), %rdi
callq 0x8978
movq %r15, 0x1f8(%rsp)
movq %r15, %rdi
leaq 0x2cd14(%rip), %rsi     # 0xb01b2
callq 0x8480
movq %rax, %rdi
callq 0x8230
leaq 0x260(%rsp), %rdi
leaq 0x1f8(%rsp), %rsi
callq 0x7e948
leaq 0xc8(%rsp), %rdi
callq 0x28a08
jmp 0x831e4
movslq 0x5a137(%rip), %rsi     # 0xdd610
leaq 0x100(%rsp), %rdx
andq $0x0, (%rdx)
leaq 0x3a8(%rsp), %rdi
leaq 0xe0(%rsp), %rcx
callq 0x7e966
leaq 0x240(%rsp), %rdi
pushq $0x3
popq %rsi
leaq 0x3a8(%rsp), %rdx
leaq 0x100(%rsp), %rcx
callq 0x7e9c2
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
pushq $0x18
popq %rbx
cqto
idivq %rbx
leaq 0x88(%rsp), %rdi
leaq 0x240(%rsp), %rdx
leaq 0x100(%rsp), %rcx
movq %rax, %rsi
callq 0x7ea18
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
cqto
idivq %rbx
leaq 0x100(%rsp), %rdx
andl $0x0, (%rdx)
leaq 0x1d8(%rsp), %rdi
leaq 0xe0(%rsp), %rcx
movq %rax, %rsi
callq 0x438a0
xorpd %xmm0, %xmm0
movapd %xmm0, 0x200(%rsp)
andq $0x0, 0x210(%rsp)
leaq 0x60(%rsp), %rcx
andq $0x0, 0x10(%rcx)
leaq 0x110(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movapd %xmm0, (%rcx)
xorl %ebp, %ebp
movb %bpl, (%rax)
leaq 0xf0(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %bpl, (%rax)
leaq 0x130(%rsp), %r13
leaq 0x220(%rsp), %r14
leaq 0x150(%rsp), %r15
movq 0x599fd(%rip), %r12     # 0xdcfe8
movq 0x1b0(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x80a0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x83fda
movq 0xa8(%rsp), %rdi
movq 0xb0(%rsp), %rsi
addq %rdi, %rsi
movb $0xd, 0x130(%rsp)
movq %r13, %rdx
callq 0x61a56
movq 0xa8(%rsp), %rdx
addq 0xb0(%rsp), %rdx
leaq 0xa8(%rsp), %rdi
movq %rax, %rsi
callq 0x80f0
movq 0xa8(%rsp), %rax
cmpb $0x23, (%rax)
jne 0x83726
movzbl 0x1(%rax), %eax
cmpl $0x23, %eax
je 0x835eb
cmpl $0x43, %eax
jne 0x83726
movq %r13, %rdi
leaq 0xa8(%rsp), %rsi
pushq $0x9
popq %rdx
callq 0x40349
leaq 0x60(%rsp), %rdi
movq %r13, %rsi
callq 0x2f6c0
movq %r13, %rdi
callq 0x28a08
movq 0x60(%rsp), %rsi
movl $0x120, %eax            # imm = 0x120
addq %rax, %rsi
movq 0x68(%rsp), %rdx
leaq 0x30(%rsp), %rdi
movq %r13, %rcx
callq 0x613fe
xorl %eax, %eax
movq %rax, 0x130(%rsp)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rcx
subq %rsi, %rcx
sarq $0x5, %rcx
cmpq %rcx, %rax
je 0x83902
shlq $0x5, %rax
addq %rax, %rsi
leaq 0x378(%rsp), %rdi
callq 0x3210e
movq %rax, %rbx
leaq 0x318(%rsp), %rdi
movq %r13, %rsi
callq 0x4a546
movq %rax, %rdi
movq %rbx, %rsi
callq 0x82a0
movq 0x130(%rsp), %rax
incq %rax
jmp 0x836c5
incl %ebp
movl %ebp, %eax
cltd
movl $0x3e8, %ecx            # imm = 0x3E8
idivl %ecx
testl %edx, %edx
jne 0x837f9
callq 0x8310
subq 0x1a8(%rsp), %rax
cvtsi2sd %rax, %xmm0
divsd 0x19c34(%rip), %xmm0    # 0x9d388
movsd %xmm0, (%rsp)
movq %r12, %rdi
leaq 0x1cf43(%rip), %rsi     # 0xa06a6
callq 0x8480
movq %rax, %rdi
movl %ebp, %esi
callq 0x8840
movq %rax, %rdi
leaq 0x1fe32(%rip), %rsi     # 0xa35ae
callq 0x8480
movq %rax, %rdi
movsd (%rsp), %xmm0
callq 0x8750
movq %rax, %rdi
leaq 0x22e5e(%rip), %rsi     # 0xa65f6
callq 0x8480
movq %rax, %rdi
callq 0x8230
movq %r12, %rdi
leaq 0x29ef0(%rip), %rsi     # 0xad69f
callq 0x8480
movq %rax, %rdi
movsd 0x1a0(%rsp), %xmm0
callq 0x8750
movq %rax, %rdi
leaq 0x29edf(%rip), %rsi     # 0xad6ae
callq 0x8480
movq %rax, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x8750
movq %rax, %rdi
leaq 0x22e0a(%rip), %rsi     # 0xa65f6
callq 0x8480
movq %rax, %rdi
callq 0x8230
movq %r13, %rdi
leaq 0xa8(%rsp), %rsi
pushq $0x9
popq %rdx
callq 0x40349
leaq 0x60(%rsp), %rdi
movq %r13, %rsi
callq 0x2f6c0
movq %r13, %rdi
callq 0x28a08
movq 0x60(%rsp), %rsi
leaq 0x100(%rsp), %rdi
callq 0x82a0
movq 0x60(%rsp), %rsi
addq $0x20, %rsi
leaq 0xe0(%rsp), %rdi
callq 0x82a0
movq 0x60(%rsp), %rsi
movl $0x120, %eax            # imm = 0x120
addq %rax, %rsi
movq 0x68(%rsp), %rdx
movq %r14, %rdi
movq %r13, %rcx
callq 0x613fe
movq 0x60(%rsp), %rsi
addq $0x60, %rsi
movq %r13, %rdi
callq 0x8600
movq 0x60(%rsp), %rsi
subq $-0x80, %rsi
leaq 0x30(%rsp), %rdi
callq 0x8600
cmpq $0x1, 0x138(%rsp)
ja 0x838b6
cmpq $0x1, 0x38(%rsp)
ja 0x838b6
leaq 0x30(%rsp), %rdi
leaq 0x2e0fd(%rip), %rsi     # 0xb19a6
callq 0x2193f
testb %al, %al
je 0x839fb
andq $0x0, 0x138(%rsp)
movq 0x130(%rsp), %rax
xorl %ebx, %ebx
movb %bl, (%rax)
movq %r13, %rdi
callq 0x8930
andq $0x0, 0x38(%rsp)
movq 0x30(%rsp), %rax
movb %bl, (%rax)
leaq 0x30(%rsp), %r12
movq %r12, %rdi
callq 0x8930
movq %r14, %rdi
callq 0x32680
movq %r14, %rdi
callq 0x61b78
jmp 0x83fb4
movq 0x2b8(%rsp), %rbx
leaq 0x2a8(%rsp), %rax
cmpq %rax, %rbx
je 0x839df
leaq 0x20(%rbx), %rsi
movq %r13, %rdi
callq 0x8600
leaq 0x40(%rbx), %rsi
movq %r14, %rdi
callq 0x297dc
movq %r15, %rdi
leaq 0x30(%rsp), %rsi
movq %r14, %rdx
callq 0x427bd
movq 0x150(%rsp), %rax
cmpq 0x158(%rsp), %rax
jne 0x8399c
movq %r12, %rdi
leaq 0x1ccdc(%rip), %rsi     # 0xa063b
callq 0x8480
movq %rax, %rdi
movq %r13, %rsi
callq 0x8430
movq %rax, %rdi
leaq 0x1b9b6(%rip), %rsi     # 0x9f32f
callq 0x8480
movq %rax, %rdi
callq 0x8230
movq 0x150(%rsp), %rax
cmpq 0x158(%rsp), %rax
je 0x840e4
leaq 0x348(%rsp), %rdi
movq %r13, %rsi
callq 0x4a596
movq %rax, %rdi
movq %r15, %rsi
callq 0x4a5fc
movq %r15, %rdi
callq 0x2f68c
movq %r14, %rdi
callq 0x28a08
movq %r13, %rdi
callq 0x8978
movq %rbx, %rdi
callq 0x8340
movq %rax, %rbx
jmp 0x8390a
callq 0x8310
movq %rax, 0x1a8(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x28a08
jmp 0x835eb
callq 0x8310
movq %rax, %rbx
movl $0x240, %edi            # imm = 0x240
callq 0x8490
movq %rax, %r12
movq 0x228(%rsp), %rdx
subq 0x220(%rsp), %rdx
shrq $0x5, %rdx
movq %rax, %rdi
leaq 0x348(%rsp), %rsi
callq 0x61430
movq %r12, %rdi
movq %r14, %rsi
leaq 0x318(%rsp), %rdx
callq 0x3ff64
movq %rbp, 0x198(%rsp)
movq %r14, %rdi
callq 0x32680
movq %r14, %rdi
callq 0x61b78
callq 0x8310
subq %rbx, %rax
cvtsi2sd %rax, %xmm0
divsd 0x19914(%rip), %xmm0    # 0x9d388
movsd %xmm0, 0x1a0(%rsp)
callq 0x8310
movq %rax, 0x190(%rsp)
movq 0xe0(%rsp), %rdi
callq 0x86f0
movq %r15, %rdi
leaq 0x528(%rsp), %rsi
leaq 0x100(%rsp), %rdx
movl %eax, %ecx
callq 0x46bec
leaq 0xe0(%r12), %rax
movq %rax, (%rsp)
movq %r12, 0x188(%rsp)
movq %r12, %rdi
addq $0x68, %rdi
xorl %ebx, %ebx
xorl %r12d, %r12d
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %rax
subq %rcx, %rax
cqto
pushq $0x18
popq %rsi
idivq %rsi
cmpq %rax, %r12
je 0x83f60
movq %r14, %rbp
movq %r15, %r14
movq %rdi, %r15
movq (%rcx,%rbx), %rsi
movq (%rsp), %rdi
callq 0x43f2a
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
ucomisd 0x13ae1(%rip), %xmm0    # 0x975f8
movq %r15, %rdi
jne 0x83b22
jnp 0x83f4e
movq 0x10(%rsp), %rax
movq (%rax,%rbx), %rsi
addq $0x20, %rsi
movq (%rsp), %rdi
callq 0x43f2a
movsd (%rax), %xmm0
ucomisd 0x13ab4(%rip), %xmm0    # 0x975f8
movq %r15, %rdi
jne 0x83b4f
jnp 0x83f4e
movsd %xmm0, 0x128(%rsp)
movq 0x10(%rsp), %rax
movq (%rax,%rbx), %rsi
addq $0x40, %rsi
movq (%rsp), %rdi
callq 0x43f2a
movsd (%rax), %xmm0
ucomisd 0x13a7e(%rip), %xmm0    # 0x975f8
movq %r15, %rdi
jne 0x83b85
jnp 0x83f4e
movsd %xmm0, 0x120(%rsp)
movq 0x10(%rsp), %rax
movq (%rax,%rbx), %rsi
addq $0x60, %rsi
movq (%rsp), %rdi
callq 0x43f2a
movsd (%rax), %xmm3
ucomisd 0x13a48(%rip), %xmm3    # 0x975f8
movq %r15, %rdi
movsd 0x128(%rsp), %xmm1
movsd 0x120(%rsp), %xmm2
jne 0x83bcd
jnp 0x83f4e
movsd 0x8(%rsp), %xmm0
ucomisd 0x125bd(%rip), %xmm0    # 0x96198
jne 0x83c07
jp 0x83c07
ucomisd 0x125b1(%rip), %xmm1    # 0x96198
jne 0x83c07
jp 0x83c07
ucomisd 0x125a5(%rip), %xmm2    # 0x96198
jne 0x83c07
jp 0x83c07
ucomisd 0x12599(%rip), %xmm3    # 0x96198
jne 0x83c07
jnp 0x83f4e
movsd 0x8(%rsp), %xmm0
ucomisd 0x139db(%rip), %xmm0    # 0x975f0
jne 0x83c41
jp 0x83c41
ucomisd 0x139cf(%rip), %xmm1    # 0x975f0
jne 0x83c41
jp 0x83c41
ucomisd 0x139c3(%rip), %xmm2    # 0x975f0
jne 0x83c41
jp 0x83c41
ucomisd 0x139b7(%rip), %xmm3    # 0x975f0
jne 0x83c41
jnp 0x83f4e
movsd %xmm3, 0x180(%rsp)
movq 0x1d8(%rsp), %rax
incl (%rax,%r12,4)
movq 0x10(%rsp), %rax
movq (%rax,%rbx), %rsi
movq %rdi, 0x50(%rsp)
callq 0x43738
cvtsi2sdl (%rax), %xmm0
movsd %xmm0, 0x178(%rsp)
movq 0x10(%rsp), %rax
movq (%rax,%rbx), %rsi
addq $0x20, %rsi
movq 0x50(%rsp), %rdi
callq 0x43738
cvtsi2sdl (%rax), %xmm0
movsd %xmm0, 0x170(%rsp)
movq 0x10(%rsp), %rax
movq (%rax,%rbx), %rsi
addq $0x40, %rsi
movq 0x50(%rsp), %rdi
callq 0x43738
movl (%rax), %eax
movl %eax, 0x5c(%rsp)
movq 0x10(%rsp), %rax
movq (%rax,%rbx), %rsi
addq $0x60, %rsi
movq 0x50(%rsp), %rdi
callq 0x43738
cvtsi2sdl 0x5c(%rsp), %xmm6
cvtsi2sdl (%rax), %xmm7
leaq 0x1b8(%rsp), %rdi
movsd 0x8(%rsp), %xmm0
movsd 0x128(%rsp), %xmm1
movsd 0x120(%rsp), %xmm2
movsd 0x180(%rsp), %xmm3
movsd 0x178(%rsp), %xmm4
movsd 0x170(%rsp), %xmm5
callq 0x84803
movq 0x88(%rsp), %rax
movq (%rax,%rbx), %rdi
movq 0x1b8(%rsp), %rsi
callq 0x7edca
movq 0x88(%rsp), %rax
movq (%rax,%rbx), %rdi
addq $0x50, %rdi
movq 0x1b8(%rsp), %rsi
addq $0x8, %rsi
callq 0x7edca
movq 0x88(%rsp), %rax
movq (%rax,%rbx), %rcx
movl $0xa0, %eax
addq %rax, %rcx
movq %rcx, 0x8(%rsp)
leaq 0x2f0(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0x8600
leaq 0x2f0(%rsp), %rdi
callq 0x402aa
movsd %xmm0, 0x2d0(%rsp)
movq 0x8(%rsp), %rdi
leaq 0x2d0(%rsp), %rsi
callq 0x7f902
leaq 0x2f0(%rsp), %rdi
callq 0x8978
movq 0x88(%rsp), %rax
movq (%rax,%rbx), %rdi
callq 0x7edf0
movq 0x88(%rsp), %rax
movq (%rax,%rbx), %rdi
addq $0x50, %rdi
callq 0x7edf0
movq 0x88(%rsp), %rax
movq (%rax,%rbx), %rdi
movl $0xa0, %eax
addq %rax, %rdi
callq 0x7edf0
movq 0x1d8(%rsp), %rax
movl (%rax,%r12,4), %eax
cmpl 0x5980a(%rip), %eax     # 0xdd610
jle 0x83f3e
cltd
idivl 0x59801(%rip)           # 0xdd614
testl %edx, %edx
jne 0x83f3e
movq 0x260(%rsp), %rax
movq (%rax,%r12,8), %rdi
leaq 0x100(%rsp), %rsi
callq 0x8430
movq %rax, %rdi
leaq 0x15fe0(%rip), %rsi     # 0x99e1e
callq 0x8480
movq %rax, 0x8(%rsp)
movq 0x88(%rsp), %rax
movq (%rax,%rbx), %rdi
movl $0xb0, %eax
addq %rax, %rdi
xorl %esi, %esi
callq 0x7fa04
movsd (%rax), %xmm0
movq 0x8(%rsp), %rdi
callq 0x8750
movq %rax, %rdi
leaq 0x15fa3(%rip), %rsi     # 0x99e1e
callq 0x8480
movq %rax, %rdi
leaq 0xe0(%rsp), %rsi
callq 0x8430
movq %rax, %rdi
leaq 0x15f84(%rip), %rsi     # 0x99e1e
callq 0x8480
movq %rax, 0x8(%rsp)
movq 0x88(%rsp), %rax
movq (%rax,%rbx), %rsi
leaq 0x4d8(%rsp), %rdi
callq 0x7ee96
leaq 0x4d8(%rsp), %rdi
callq 0x7ee0e
movq 0x8(%rsp), %rdi
callq 0x8750
movq %rax, %rdi
leaq 0x15f40(%rip), %rsi     # 0x99e1e
callq 0x8480
movq %rax, 0x8(%rsp)
movq 0x88(%rsp), %rax
movq (%rax,%rbx), %rsi
addq $0x50, %rsi
leaq 0x488(%rsp), %rdi
callq 0x7ee96
leaq 0x488(%rsp), %rdi
callq 0x7ee0e
movq 0x8(%rsp), %rdi
callq 0x8750
movq %rax, %rdi
callq 0x8230
leaq 0x488(%rsp), %rdi
callq 0x7f15c
leaq 0x4d8(%rsp), %rdi
callq 0x7f15c
leaq 0x1b8(%rsp), %rdi
callq 0x2b43c
movq %r15, %rdi
incq %r12
addq $0x18, %rbx
movq %r14, %r15
movq %rbp, %r14
jmp 0x83ad1
callq 0x8310
subq 0x190(%rsp), %rax
cvtsi2sd %rax, %xmm0
divsd 0x1940e(%rip), %xmm0    # 0x9d388
movsd %xmm0, 0x8(%rsp)
movq 0x188(%rsp), %rbx
movq %rbx, %rdi
callq 0x61838
movl $0x240, %esi            # imm = 0x240
movq %rbx, %rdi
callq 0x84a0
movq %r15, %rdi
callq 0x28a08
movb $0x1, %bl
movq 0x198(%rsp), %rbp
leaq 0x30(%rsp), %r12
movq %r12, %rdi
callq 0x8978
movq %r13, %rdi
callq 0x8978
movq %r14, %rdi
callq 0x28a08
testb %bl, %bl
movq 0x59013(%rip), %r12     # 0xdcfe8
jmp 0x835eb
leaq 0xe0(%rsp), %rdi
callq 0x8978
leaq 0x100(%rsp), %rdi
callq 0x8978
leaq 0x60(%rsp), %rdi
callq 0x28a08
leaq 0x200(%rsp), %rdi
callq 0x28a08
leaq 0x1d8(%rsp), %rdi
callq 0x2aef2
leaq 0x88(%rsp), %rdi
callq 0x7ef38
leaq 0x240(%rsp), %rdi
callq 0x7ef5a
leaq 0x3a8(%rsp), %rdi
callq 0x7f15c
leaq 0x10(%rsp), %rdi
callq 0x29054
leaq 0x260(%rsp), %rdi
callq 0x7ef7c
leaq 0x280(%rsp), %rdi
callq 0x28a08
leaq 0x318(%rsp), %rdi
callq 0x4a9bc
leaq 0x348(%rsp), %rdi
callq 0x4aa20
leaq 0x378(%rsp), %rdi
callq 0x33008
leaq 0x2a0(%rsp), %rdi
callq 0x32f44
leaq 0x528(%rsp), %rdi
callq 0x32212
leaq 0xa8(%rsp), %rdi
callq 0x8978
xorl %eax, %eax
addq $0x5e8, %rsp            # imm = 0x5E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2c0a5(%rip), %rdi     # 0xb0171
leaq 0x2c0b3(%rip), %rsi     # 0xb0186
leaq 0x2c0b8(%rip), %rcx     # 0xb0192
movl $0x97, %edx
callq 0x82f0
leaq 0x1c57a(%rip), %rdi     # 0xa0665
leaq 0x2c094(%rip), %rsi     # 0xb0186
leaq 0x2c099(%rip), %rcx     # 0xb0192
movl $0xc6, %edx
callq 0x82f0
movq %rax, %rbx
leaq 0x488(%rsp), %rdi
callq 0x7f15c
jmp 0x84118
movq %rax, %rbx
leaq 0x4d8(%rsp), %rdi
callq 0x7f15c
jmp 0x8413e
jmp 0x8413b
movq %rax, %rbx
leaq 0x2f0(%rsp), %rdi
callq 0x8978
jmp 0x8413e
movq %rax, %rbx
leaq 0x1b8(%rsp), %rdi
callq 0x2b43c
jmp 0x8421c
jmp 0x84219
jmp 0x84191
movq %rax, %rbx
movl $0x240, %esi            # imm = 0x240
movq %r12, %rdi
callq 0x84a0
jmp 0x84229
movq %rax, %rbx
leaq 0x3a8(%rsp), %rdi
callq 0x32212
jmp 0x844fd
jmp 0x841f3
jmp 0x841c7
jmp 0x841f3
jmp 0x843e0
jmp 0x843e0
movq %rax, %rbx
jmp 0x84229
movq %rax, %rbx
jmp 0x8446c
movq %rax, %rbx
jmp 0x84479
movq %rax, %rbx
jmp 0x84486
jmp 0x843e5
movq %rax, %rbx
movl $0x208, %esi            # imm = 0x208
movq 0x8(%rsp), %rdi
jmp 0x841d2
jmp 0x841f3
movq %rax, %rbx
movl $0x208, %esi            # imm = 0x208
movq %r14, %rdi
callq 0x84a0
jmp 0x844fd
jmp 0x841f3
movq %rax, %rbx
leaq 0x3a8(%rsp), %rdi
callq 0x8978
jmp 0x844fd
movq %rax, %rbx
jmp 0x844fd
movq %rax, %rbx
jmp 0x84233
jmp 0x843e0
movq %rax, %rbx
jmp 0x84240
jmp 0x843e0
jmp 0x843d6
jmp 0x843e0
movq %rax, %rbx
leaq 0x150(%rsp), %rdi
callq 0x28a08
leaq 0x30(%rsp), %rdi
callq 0x8978
leaq 0x130(%rsp), %rdi
callq 0x8978
leaq 0x220(%rsp), %rdi
jmp 0x84429
jmp 0x843f5
movq %rax, %rbx
jmp 0x84417
movq %rax, %rbx
jmp 0x8440a
jmp 0x843e0
jmp 0x843e0
movq %rax, %rbx
leaq 0x3a8(%rsp), %rdi
callq 0x8978
jmp 0x84286
movq %rax, %rbx
jmp 0x84293
movq %rax, %rbx
leaq 0x100(%rsp), %rdi
callq 0x8978
leaq 0x468(%rsp), %rdi
callq 0x8978
jmp 0x842a5
movq %rax, %rbx
movq (%rsp), %r14
leaq 0xe0(%rsp), %rdi
callq 0x8978
jmp 0x842c8
movq %rax, %rbx
movq (%rsp), %r14
jmp 0x842ec
movq %rax, %rbx
movq (%rsp), %r14
leaq 0x130(%rsp), %rdi
callq 0x8978
leaq 0x2d0(%rsp), %rdi
callq 0x8978
leaq 0x30(%rsp), %rdi
callq 0x8978
leaq 0x240(%rsp), %rdi
callq 0x8978
leaq 0x88(%rsp), %rdi
callq 0x8978
leaq 0x1d8(%rsp), %rdi
callq 0x8978
leaq 0x200(%rsp), %rdi
callq 0x8978
leaq 0x60(%rsp), %rdi
callq 0x8978
leaq 0x220(%rsp), %rdi
callq 0x8978
leaq 0x150(%rsp), %rdi
callq 0x8978
leaq 0x1b8(%rsp), %rdi
callq 0x8978
movl $0x200, %esi            # imm = 0x200
movq %r14, %rdi
callq 0x84a0
jmp 0x84498
movq %rax, %rbx
movq (%rsp), %r14
jmp 0x84351
movq %rax, %rbx
movq (%rsp), %r14
jmp 0x84306
movq %rax, %rbx
movq (%rsp), %r14
jmp 0x8432a
movq %rax, %rbx
movq (%rsp), %r14
jmp 0x842d5
movq %rax, %rbx
movq (%rsp), %r14
jmp 0x842e2
movq %rax, %rbx
movq (%rsp), %r14
jmp 0x84337
movq %rax, %rbx
movq (%rsp), %r14
jmp 0x842f9
movq %rax, %rbx
movq (%rsp), %r14
jmp 0x84313
movq %rax, %rbx
movq (%rsp), %r14
jmp 0x84320
movq %rax, %rbx
movq (%rsp), %r14
jmp 0x84344
jmp 0x84495
jmp 0x843e5
movq %rax, %rbx
jmp 0x844bc
jmp 0x843ed
movq %rax, %rbx
jmp 0x8442e
movq %rax, %rbx
jmp 0x844a5
movq %rax, %rbx
jmp 0x844c9
movq %rax, %rbx
jmp 0x84424
movq %rax, %rbx
leaq 0x150(%rsp), %rdi
callq 0x2f68c
leaq 0x220(%rsp), %rdi
callq 0x28a08
leaq 0x130(%rsp), %rdi
callq 0x8978
leaq 0x30(%rsp), %rdi
callq 0x28a08
leaq 0xe0(%rsp), %rdi
callq 0x8978
leaq 0x100(%rsp), %rdi
callq 0x8978
leaq 0x60(%rsp), %rdi
callq 0x28a08
leaq 0x200(%rsp), %rdi
callq 0x28a08
leaq 0x1d8(%rsp), %rdi
callq 0x2aef2
leaq 0x88(%rsp), %rdi
callq 0x7ef38
leaq 0x240(%rsp), %rdi
callq 0x7ef5a
leaq 0x3a8(%rsp), %rdi
callq 0x7f15c
jmp 0x844a5
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0x28a08
leaq 0x10(%rsp), %rdi
callq 0x29054
leaq 0x260(%rsp), %rdi
callq 0x7ef7c
leaq 0x280(%rsp), %rdi
callq 0x28a08
leaq 0x318(%rsp), %rdi
callq 0x4a9bc
leaq 0x348(%rsp), %rdi
callq 0x4aa20
leaq 0x378(%rsp), %rdi
callq 0x33008
leaq 0x2a0(%rsp), %rdi
callq 0x32f44
leaq 0x528(%rsp), %rdi
callq 0x32212
leaq 0xa8(%rsp), %rdi
callq 0x8978
movq %rbx, %rdi
callq 0x8870
movq %rax, %rbx
leaq 0x3a8(%rsp), %rdi
jmp 0x844c4