// File: millanek[P]evo/process_vcf_cbs.cpp
// Function: calculateCbs()
void calculateCbs() {
    // Open a connection to read from the vcf file
    std::istream* vcfFile = createReader(opt::vcfFile.c_str());
    string vcfFileRoot = stripExtension(opt::vcfFile);
    string cbsFileName = vcfFileRoot + ".cbsTracts";
    std::ofstream* cbsFile = new std::ofstream(cbsFileName.c_str());
    string cbsM10000FileName = vcfFileRoot + ".cbsTractsMin10000";
    std::ofstream* cbsFileM10000 = new std::ofstream(cbsM10000FileName.c_str());
    string incompatibleSitesFileName = vcfFileRoot + ".incompatibleSites";
    std::ofstream* incompatibleSitesFile = new std::ofstream(incompatibleSitesFileName.c_str());
    
    
    std::ifstream* inaccessibleBed = new std::ifstream(opt::undeterminedLociFile.c_str());
    std::cerr << "Loading the inaaccesible site annotation" << std::endl;
    AccessibleGenome* inaccessible = new AccessibleGenome(inaccessibleBed);
    std::cerr << "Done" << std::endl;
    
    string line;
    std::map<std::string, int > scLengthMap;
    std::ifstream* chrSizesFile = new std::ifstream(opt::sizesFile.c_str());
    while (getline(*chrSizesFile, line)) {
        std::vector<std::string> fields = split(line, '\t');
        string thisScaffold = fields[0];
        string thisScaffoldlength = fields[1];
        scLengthMap[thisScaffold] = atoi(thisScaffoldlength.c_str());
    }
    
    std::ifstream* featuresBed;
    BedCoordinateFeatures* featureLoci;
    if (opt::featuresFile != "") {
        featuresBed = new std::ifstream(opt::featuresFile.c_str());
        featureLoci = new BedCoordinateFeatures(featuresBed);
    }
    
    cbsSets* sets;
    std::ofstream* cbsBetweenSets; std::ofstream* cbsBetweenSetsAtFeatures;
    if (opt::groupsFile != "") {
        std::ifstream* cbsGroupsF = new std::ifstream(opt::groupsFile);
        sets = new cbsSets(cbsGroupsF);
        string setsFileRoot = stripExtension(opt::groupsFile);
        string cbsBetweenSetsFN = setsFileRoot + ".cbsTracts";
        string cbsBetweenSetsAtFeaturesFN = setsFileRoot + ".cbsTractsAtFeatures";
        cbsBetweenSets = new std::ofstream(cbsBetweenSetsFN.c_str());
        if (featureLoci->initialised)
            cbsBetweenSetsAtFeatures = new std::ofstream(cbsBetweenSetsAtFeaturesFN.c_str());
    }

    clock_t begin = clock();
    // Now go through the VCF file
    std::vector<string> sampleNames;
    std::vector<string> fields;
    string currentScaffoldNum = "";
    int totalVariantNumber = 0;
    int numCombinations;
    std::map<string, std::map<string, std::vector<int> > > cbsTractLengths;
    std::map<string, std::map<string, std::vector<string> > > incompatibleSitesMap;
    std::vector<std::vector<string> > incompatibleSitesOneMatrix;
    std::vector<std::vector<string> > toPrint;
    std::vector<std::vector<string> > toPrintMin10000;
    
    std::deque<int> allCBSlengthsBetweenGroups;
    std::deque<int> CBSlengthsBetweenGroupsAtFeatures;
    
    int numSamples;
    while (getline(*vcfFile, line)) {
        if (line[0] == '#' && line[1] == '#') {
            
        } else if (line[0] == '#' && line[1] == 'C') {
            std::vector<std::string> fields = split(line, '\t');
            numSamples = (int)fields.size() - NUM_NON_GENOTYPE_COLUMNS;
            std::cerr << "Number of samples: " << numSamples << std::endl;
            
            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);
            }
            assert(numSamples == sampleNames.size());
            
            numCombinations = choose((int)numSamples, 2);
            toPrint.resize(numCombinations); toPrintMin10000.resize(numCombinations);
            std::cerr << "Number of combinations: " << numCombinations << std::endl;
        } else {
            totalVariantNumber++;
            
            std::vector<std::string> fields = split(line, '\t');
            std::vector<std::string> info = split(fields[7], ';');
            int previousSNPpos;
            
            if (fields[0] != currentScaffoldNum) {
                if (currentScaffoldNum != "") {
                    // Summarise results for a scaffold
                    if (scLengthMap[currentScaffoldNum] >= opt::minScLength) {
                        std::vector<string> thisPair;
                        std::vector<string> thisPairMin10000;
                        int k = 0;
                        for (int i = 0; i != numSamples; i++) {
                            for (int j = i+1; j != numSamples; j++) {
                                std::vector<string> thisPair(numToStringVector(cbsTractLengths[sampleNames[i]+"+"+sampleNames[j]][currentScaffoldNum]));
                                std::vector<string> thisPairMin10000(numToStringMinFilterVector(cbsTractLengths[sampleNames[i]+"+"+sampleNames[j]][currentScaffoldNum], 10000));
                                toPrint[k].insert(toPrint[k].end(), thisPair.begin(), thisPair.end());
                                toPrintMin10000[k].insert(toPrintMin10000[k].end(), thisPairMin10000.begin(), thisPairMin10000.end());
                                k++;
                                //*cbsFile << sampleNames[i]+"+"+sampleNames[j] << "\t";
                                //print_vector(cbsTractLengths[sampleNames[i]+"+"+sampleNames[j]][currentScaffoldNum], *cbsFile);
                            }
                        }
                    }
                }
                currentScaffoldNum = fields[0];
                previousSNPpos = 0;
                incompatibleSitesOneMatrix.resize(incompatibleSitesOneMatrix.size()+numCombinations);
                std::cerr << "Processing " << currentScaffoldNum << std::endl;
                if (currentScaffoldNum == "scafold_47") {
                    std::cerr << currentScaffoldNum << "\t" << fields[0] << std::endl;
                }
            }
              
            // Process variants
            if (info[0] != "INDEL") {  // Without indels
                Counts counts = getThisVariantCounts(fields);
                int thisSNPpos = atoi(fields[1].c_str());
                // Check compatibility for all pair of samples; 0 (hom_ref) is not compatible with 2 (hom_alt)
                for (int i = 0; i != numSamples; i++) {
                    for (int j = i+1; j != numSamples; j++) {
                        string thisCombination = sampleNames[i]+"+"+sampleNames[j];
                        if ((counts.individualsWithVariant[i] == 0 && counts.individualsWithVariant[j] == 2) ||
                            (counts.individualsWithVariant[i] == 2 && counts.individualsWithVariant[j] == 0)) {
                            int previousIncompatiblePos;
                            if (!incompatibleSitesMap[thisCombination][currentScaffoldNum].empty()) {
                                previousIncompatiblePos = atoi(incompatibleSitesMap[thisCombination][currentScaffoldNum].back().c_str());
                            } else {
                                previousIncompatiblePos = 0;
                            }
                            int numInaccessibleBP = 0;
                            //numInaccessibleBP = inaccessible->getAccessibleBPinRegion(currentScaffoldNum, previousIncompatiblePos, thisSNPpos);
                            incompatibleSitesMap[thisCombination][currentScaffoldNum].push_back(fields[1]);
                            int thisCBSlength = (thisSNPpos - previousIncompatiblePos) - numInaccessibleBP;
                            cbsTractLengths[thisCombination][currentScaffoldNum].push_back(thisCBSlength);
                            
                            if (sets->initialised) {
                            if ((sets->set1Loci.count(i) == 1 && sets->set2Loci.count(j) == 1) || (sets->set1Loci.count(j) == 1 && sets->set2Loci.count(i) == 1)) {
                                allCBSlengthsBetweenGroups.push_back(thisCBSlength);
                                
                                if (featureLoci->initialised) {
                                    int overlapWithFeature = featureLoci->getNumBPinRegion(currentScaffoldNum, previousIncompatiblePos, thisSNPpos);
                                    if (overlapWithFeature > 0) {
                                        //std::cerr << "currentScaffoldNum, previousIncompatiblePos, thisSNPpos, thisCombination, overlapWithFeature: " << currentScaffoldNum << ", " << previousIncompatiblePos << ", " << thisSNPpos << ", " << thisCombination << ", " << overlapWithFeature << std::endl;
                                        CBSlengthsBetweenGroupsAtFeatures.push_back(thisCBSlength);
                                    std::vector<std::vector <string> > thisFeatures = featureLoci->getFeaturesinRegion(currentScaffoldNum, previousIncompatiblePos, thisSNPpos);
                                    print_matrix(thisFeatures, std::cerr);
                                }}
                                
                            }}
                        } else {
                            // Just carry on until hitting an incompatible site
                        }
                    } 
                }
                previousSNPpos = thisSNPpos;
            }
            if (totalVariantNumber % 10000 == 0) {
                std::cerr << totalVariantNumber << " variants processed...; pos: " << previousSNPpos << std::endl;
                clock_t end = clock();
                double elapsed_secs = double(end - begin) / CLOCKS_PER_SEC;
                std::cerr << "Elapsed time 10000 vars: " << elapsed_secs << std::endl;
                std::cerr << "allCBSlengthsBetweenGroups.size(): " << allCBSlengthsBetweenGroups.size() << "; mean length: " << vector_average(allCBSlengthsBetweenGroups) << std::endl;
                std::cerr << "CBSlengthsBetweenGroupsAtFeatures.size(): " << CBSlengthsBetweenGroupsAtFeatures.size() << "; mean length: " << vector_average(CBSlengthsBetweenGroupsAtFeatures) << std::endl;
                std::cerr << std::endl;
            }
        }
    }
    
    // Finishing touches:
    std::cerr << "Sorting cbs tract length output... " << std::endl;
    std::sort(toPrint.begin(), toPrint.end(), compareVectorsByLength);
    std::sort(toPrintMin10000.begin(), toPrintMin10000.end(), compareVectorsByLength);
    print_matrix(toPrint, *cbsFile);
    print_matrix(toPrintMin10000, *cbsFileM10000);
    int i = 0;
    for (std::map<string, std::map<string, std::vector<string> > >::iterator it1 = incompatibleSitesMap.begin(); it1 != incompatibleSitesMap.end(); it1++) {
        // *incompatibleSitesFile << it1->first;
        for (std::map<string, std::vector<string> >::iterator it2 = it1->second.begin(); it2 != it1->second.end(); it2++) {
            incompatibleSitesOneMatrix[i].push_back(it1->first);
            incompatibleSitesOneMatrix[i].push_back(it2->first);
            incompatibleSitesOneMatrix[i].insert(incompatibleSitesOneMatrix[i].end(), it2->second.begin(), it2->second.end());
            i++;
            // *incompatibleSitesFile << it2->first;
            // print_vector(it2->second, *incompatibleSitesFile);
        }
    }
   // std::cerr << "Sorting incompatible sites output... " << std::endl;
   // std::sort(incompatibleSitesOneMatrix.begin(), incompatibleSitesOneMatrix.end(), compareVectorsByLength);
    print_matrix(incompatibleSitesOneMatrix, *incompatibleSitesFile);
    
    
    // output for sets and specific features
    if (sets->initialised) {
        if (allCBSlengthsBetweenGroups.size() < 1000000) {
            print_vector(allCBSlengthsBetweenGroups, *cbsBetweenSets, '\n');
        } else {
            print_vector(allCBSlengthsBetweenGroups, *cbsBetweenSets, '\n');
        }
        if (featureLoci->initialised) {
            print_vector(CBSlengthsBetweenGroupsAtFeatures, *cbsBetweenSetsAtFeatures, '\n');
        }
    }
    exit(EXIT_SUCCESS);

   
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xcc0, %rsp            # imm = 0xCC0
leaq 0x13258e(%rip), %rdi    # 0x19a520
callq 0xa220
movq %rax, -0x9c0(%rbp)
leaq -0x29(%rbp), %rdi
movq %rdi, -0x9b8(%rbp)
callq 0xab60
movq -0x9c0(%rbp), %rsi
movq -0x9b8(%rbp), %rdx
leaq -0x28(%rbp), %rdi
callq 0x2d6c0
jmp 0x67fc7
leaq -0x28(%rbp), %rdi
movl $0x8, %esi
callq 0x80e30
movq %rax, -0x9c8(%rbp)
jmp 0x67fde
leaq -0x28(%rbp), %rdi
callq 0xac88
leaq -0x29(%rbp), %rdi
callq 0xa640
movq -0x9c8(%rbp), %rax
movq %rax, -0x8(%rbp)
leaq 0x13251e(%rip), %rsi    # 0x19a520
leaq -0x60(%rbp), %rdi
movq %rdi, -0x9d0(%rbp)
callq 0x7be70
movq -0x9d0(%rbp), %rsi
leaq 0xd1414(%rip), %rdx     # 0x139434
leaq -0x80(%rbp), %rdi
callq 0x3da80
jmp 0x6802b
movl $0x200, %edi            # imm = 0x200
callq 0xa5d0
movq %rax, -0x9d8(%rbp)
jmp 0x6803e
leaq -0x80(%rbp), %rdi
callq 0xa220
movq -0x9d8(%rbp), %rdi
movq %rax, %rsi
movl $0x10, %edx
callq 0xa650
jmp 0x6805d
movq -0x9d8(%rbp), %rax
movq %rax, -0x88(%rbp)
leaq 0xd13cd(%rip), %rdx     # 0x13943f
leaq -0xa8(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x3da80
jmp 0x68084
movl $0x200, %edi            # imm = 0x200
callq 0xa5d0
movq %rax, -0x9e0(%rbp)
jmp 0x68097
leaq -0xa8(%rbp), %rdi
callq 0xa220
movq -0x9e0(%rbp), %rdi
movq %rax, %rsi
movl $0x10, %edx
callq 0xa650
jmp 0x680b9
movq -0x9e0(%rbp), %rax
movq %rax, -0xb0(%rbp)
leaq 0xd1384(%rip), %rdx     # 0x139452
leaq -0xd0(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x3da80
jmp 0x680e0
movl $0x200, %edi            # imm = 0x200
callq 0xa5d0
movq %rax, -0x9e8(%rbp)
jmp 0x680f3
leaq -0xd0(%rbp), %rdi
callq 0xa220
movq -0x9e8(%rbp), %rdi
movq %rax, %rsi
movl $0x10, %edx
callq 0xa650
jmp 0x68115
movq -0x9e8(%rbp), %rax
movq %rax, -0xd8(%rbp)
movl $0x208, %edi            # imm = 0x208
callq 0xa5d0
movq %rax, -0x9f0(%rbp)
jmp 0x68136
leaq 0x132483(%rip), %rdi    # 0x19a5c0
callq 0xa220
movq -0x9f0(%rbp), %rdi
movq %rax, %rsi
movl $0x8, %edx
callq 0xab90
jmp 0x68158
movq -0x9f0(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq 0x130e83(%rip), %rdi    # 0x198ff0
leaq 0xd12f1(%rip), %rsi     # 0x139465
callq 0xa5c0
movq %rax, -0x9f8(%rbp)
jmp 0x68182
movq -0x9f8(%rbp), %rdi
movq 0x130df8(%rip), %rsi    # 0x198f88
callq 0xa610
jmp 0x68197
movl $0x38, %edi
callq 0xa5d0
movq %rax, -0xa00(%rbp)
jmp 0x681aa
movq -0xa00(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x6aa00
jmp 0x681bf
movq -0xa00(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq 0x130e1c(%rip), %rdi    # 0x198ff0
leaq 0xca114(%rip), %rsi     # 0x1322ef
callq 0xa5c0
movq %rax, -0xa08(%rbp)
jmp 0x681e9
movq -0xa08(%rbp), %rdi
movq 0x130d91(%rip), %rsi    # 0x198f88
callq 0xa610
jmp 0x681fe
leaq -0x108(%rbp), %rdi
callq 0xa820
leaq -0x138(%rbp), %rdi
callq 0x58900
movl $0x208, %edi            # imm = 0x208
callq 0xa5d0
movq %rax, -0xa10(%rbp)
jmp 0x68229
leaq 0x132330(%rip), %rdi    # 0x19a560
callq 0xa220
movq -0xa10(%rbp), %rdi
movq %rax, %rsi
movl $0x8, %edx
callq 0xab90
jmp 0x6824b
movq -0xa10(%rbp), %rax
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0xa0d0
movq %rax, -0xa18(%rbp)
jmp 0x68275
movq -0xa18(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0xa740
movb %al, -0xa19(%rbp)
jmp 0x68293
movb -0xa19(%rbp), %al
testb $0x1, %al
jne 0x682a2
jmp 0x68510
leaq -0x158(%rbp), %rdi
leaq -0x108(%rbp), %rsi
movl $0x9, %edx
callq 0x7bbe0
jmp 0x682bc
xorl %eax, %eax
movl %eax, %esi
leaq -0x158(%rbp), %rdi
callq 0x3d940
movq %rax, %rsi
leaq -0x178(%rbp), %rdi
callq 0xa250
jmp 0x682dd
leaq -0x158(%rbp), %rdi
movl $0x1, %esi
callq 0x3d940
movq %rax, %rsi
leaq -0x198(%rbp), %rdi
callq 0xa250
jmp 0x682ff
leaq -0x198(%rbp), %rdi
callq 0xa220
movq %rax, %rdi
callq 0xa970
movl %eax, -0xa2c(%rbp)
leaq -0x138(%rbp), %rdi
leaq -0x178(%rbp), %rsi
callq 0x59b00
movq %rax, -0xa28(%rbp)
jmp 0x68335
movq -0xa28(%rbp), %rax
movl -0xa2c(%rbp), %ecx
movl %ecx, (%rax)
leaq -0x198(%rbp), %rdi
callq 0xac88
leaq -0x178(%rbp), %rdi
callq 0xac88
leaq -0x158(%rbp), %rdi
callq 0x3dfa0
jmp 0x68259
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x68390
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xac88
leaq -0x29(%rbp), %rdi
callq 0xa640
jmp 0x6a2a5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6a29c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6a293
movq -0x9d8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movl $0x200, %esi            # imm = 0x200
callq 0xa5e0
jmp 0x6a293
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6a287
movq -0x9e0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movl $0x200, %esi            # imm = 0x200
callq 0xa5e0
jmp 0x6a287
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6a27b
movq -0x9e8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movl $0x200, %esi            # imm = 0x200
callq 0xa5e0
jmp 0x6a27b
movq -0x9f0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movl $0x208, %esi            # imm = 0x208
callq 0xa5e0
jmp 0x6a27b
movq -0xa00(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movl $0x38, %esi
callq 0xa5e0
jmp 0x6a27b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6a263
movq -0xa10(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movl $0x208, %esi            # imm = 0x208
callq 0xa5e0
jmp 0x6a263
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x684ff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x684f3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x198(%rbp), %rdi
callq 0xac88
leaq -0x178(%rbp), %rdi
callq 0xac88
leaq -0x158(%rbp), %rdi
callq 0x3dfa0
jmp 0x6a263
leaq 0x132069(%rip), %rdi    # 0x19a580
leaq 0xcd9c1(%rip), %rsi     # 0x135edf
callq 0x50eb0
movb %al, -0xa2d(%rbp)
jmp 0x6852b
movb -0xa2d(%rbp), %al
testb $0x1, %al
jne 0x6853a
jmp 0x685fb
movl $0x208, %edi            # imm = 0x208
callq 0xa5d0
movq %rax, -0xa38(%rbp)
jmp 0x6854d
leaq 0x13202c(%rip), %rdi    # 0x19a580
callq 0xa220
movq -0xa38(%rbp), %rdi
movq %rax, %rsi
movl $0x8, %edx
callq 0xab90
jmp 0x6856f
movq -0xa38(%rbp), %rax
movq %rax, -0x1a0(%rbp)
movl $0x38, %edi
callq 0xa5d0
movq %rax, -0xa40(%rbp)
jmp 0x68590
movq -0xa40(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
xorl %edx, %edx
callq 0x6aa70
jmp 0x685a7
movq -0xa40(%rbp), %rax
movq %rax, -0x1a8(%rbp)
jmp 0x685fb
movq -0xa38(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movl $0x208, %esi            # imm = 0x208
callq 0xa5e0
jmp 0x6a263
movq -0xa40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movl $0x38, %esi
callq 0xa5e0
jmp 0x6a263
leaq 0x131f9e(%rip), %rdi    # 0x19a5a0
leaq 0xcd8d6(%rip), %rsi     # 0x135edf
callq 0x50eb0
movb %al, -0xa41(%rbp)
jmp 0x68616
movb -0xa41(%rbp), %al
testb $0x1, %al
jne 0x68625
jmp 0x6887c
movl $0x208, %edi            # imm = 0x208
callq 0xa5d0
movq %rax, -0xa50(%rbp)
jmp 0x68638
movq -0xa50(%rbp), %rdi
leaq 0x131f5a(%rip), %rsi    # 0x19a5a0
movl $0x8, %edx
callq 0xaa00
jmp 0x68652
movq -0xa50(%rbp), %rax
movq %rax, -0x1c8(%rbp)
movl $0x98, %edi
callq 0xa5d0
movq %rax, -0xa58(%rbp)
jmp 0x68673
movq -0xa58(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
callq 0x6ab00
jmp 0x68688
movq -0xa58(%rbp), %rax
movq %rax, -0x1b0(%rbp)
leaq 0x131f03(%rip), %rsi    # 0x19a5a0
leaq -0x1e8(%rbp), %rdi
callq 0x7be70
jmp 0x686ab
leaq 0xd0d82(%rip), %rdx     # 0x139434
leaq -0x208(%rbp), %rdi
leaq -0x1e8(%rbp), %rsi
callq 0x3da80
jmp 0x686c7
leaq 0xd0dc0(%rip), %rdx     # 0x13948e
leaq -0x228(%rbp), %rdi
leaq -0x1e8(%rbp), %rsi
callq 0x3da80
jmp 0x686e3
movl $0x200, %edi            # imm = 0x200
callq 0xa5d0
movq %rax, -0xa60(%rbp)
jmp 0x686f6
leaq -0x208(%rbp), %rdi
callq 0xa220
movq -0xa60(%rbp), %rdi
movq %rax, %rsi
movl $0x10, %edx
callq 0xa650
jmp 0x68718
movq -0xa60(%rbp), %rax
movq %rax, -0x1b8(%rbp)
movq -0x1a8(%rbp), %rax
testb $0x1, (%rax)
je 0x6882d
movl $0x200, %edi            # imm = 0x200
callq 0xa5d0
movq %rax, -0xa68(%rbp)
jmp 0x68749
leaq -0x228(%rbp), %rdi
callq 0xa220
movq -0xa68(%rbp), %rdi
movq %rax, %rsi
movl $0x10, %edx
callq 0xa650
jmp 0x6876b
movq -0xa68(%rbp), %rax
movq %rax, -0x1c0(%rbp)
jmp 0x6882d
movq -0xa50(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movl $0x208, %esi            # imm = 0x208
callq 0xa5e0
jmp 0x6a263
movq -0xa58(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movl $0x98, %esi
callq 0xa5e0
jmp 0x6a263
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6886b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6885f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x68853
movq -0xa60(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movl $0x200, %esi            # imm = 0x200
callq 0xa5e0
jmp 0x68853
movq -0xa68(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movl $0x200, %esi            # imm = 0x200
callq 0xa5e0
jmp 0x68853
leaq -0x228(%rbp), %rdi
callq 0xac88
leaq -0x208(%rbp), %rdi
callq 0xac88
leaq -0x1e8(%rbp), %rdi
callq 0xac88
jmp 0x6887c
leaq -0x228(%rbp), %rdi
callq 0xac88
leaq -0x208(%rbp), %rdi
callq 0xac88
leaq -0x1e8(%rbp), %rdi
callq 0xac88
jmp 0x6a263
callq 0xa3a0
movq %rax, -0x230(%rbp)
leaq -0x248(%rbp), %rdi
callq 0x48da0
leaq -0x260(%rbp), %rdi
callq 0x48da0
leaq -0x281(%rbp), %rdi
movq %rdi, -0xa70(%rbp)
callq 0xab60
movq -0xa70(%rbp), %rdx
leaq 0xcd61e(%rip), %rsi     # 0x135edf
leaq -0x280(%rbp), %rdi
callq 0x2d6c0
jmp 0x688cf
leaq -0x281(%rbp), %rdi
callq 0xa640
movl $0x0, -0x288(%rbp)
leaq -0x2c0(%rbp), %rdi
callq 0x6af30
leaq -0x2f0(%rbp), %rdi
callq 0x58940
leaq -0x308(%rbp), %rdi
callq 0x3f5f0
leaq -0x320(%rbp), %rdi
callq 0x3f5f0
leaq -0x338(%rbp), %rdi
callq 0x3f5f0
leaq -0x388(%rbp), %rdi
callq 0x6af50
jmp 0x6892f
leaq -0x3d8(%rbp), %rdi
callq 0x6af50
jmp 0x6893d
jmp 0x6893f
movq -0x8(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0xa0d0
movq %rax, -0xa78(%rbp)
jmp 0x68958
movq -0xa78(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0xa740
movb %al, -0xa79(%rbp)
jmp 0x68976
movb -0xa79(%rbp), %al
testb $0x1, %al
jne 0x68985
jmp 0x69cac
xorl %eax, %eax
movl %eax, %esi
leaq -0x108(%rbp), %rdi
callq 0xac60
movq %rax, -0xa88(%rbp)
jmp 0x6899e
movq -0xa88(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x23, %eax
jne 0x68a2b
leaq -0x108(%rbp), %rdi
movl $0x1, %esi
callq 0xac60
movq %rax, -0xa90(%rbp)
jmp 0x689c7
movq -0xa90(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x23, %eax
jne 0x68a2b
jmp 0x69ca7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x281(%rbp), %rdi
callq 0xa640
jmp 0x6a24b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6a203
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6a1f7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6a1eb
xorl %eax, %eax
movl %eax, %esi
leaq -0x108(%rbp), %rdi
callq 0xac60
movq %rax, -0xa98(%rbp)
jmp 0x68a44
movq -0xa98(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x23, %eax
jne 0x68cca
leaq -0x108(%rbp), %rdi
movl $0x1, %esi
callq 0xac60
movq %rax, -0xaa0(%rbp)
jmp 0x68a71
movq -0xaa0(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x43, %eax
jne 0x68cca
leaq -0x3f8(%rbp), %rdi
leaq -0x108(%rbp), %rsi
movl $0x9, %edx
callq 0x7bbe0
jmp 0x68a9e
leaq -0x3f8(%rbp), %rdi
callq 0x3ffd0
addl $-0x9, %eax
movl %eax, -0x3dc(%rbp)
movq 0x130536(%rip), %rdi    # 0x198ff0
leaq 0xd09e2(%rip), %rsi     # 0x1394a3
callq 0xa5c0
movq %rax, -0xaa8(%rbp)
jmp 0x68acf
movq -0xaa8(%rbp), %rdi
movl -0x3dc(%rbp), %esi
callq 0xab20
movq %rax, -0xab0(%rbp)
jmp 0x68aea
movq -0xab0(%rbp), %rdi
movq 0x130490(%rip), %rsi    # 0x198f88
callq 0xa610
jmp 0x68aff
leaq 0x131ada(%rip), %rdi    # 0x19a5e0
callq 0xaa70
testb $0x1, %al
jne 0x68b14
jmp 0x68ba1
movq $0x9, -0x400(%rbp)
movq -0x400(%rbp), %rax
movq %rax, -0xab8(%rbp)
leaq -0x3f8(%rbp), %rdi
callq 0x3ffd0
movq %rax, %rcx
movq -0xab8(%rbp), %rax
cmpq %rcx, %rax
je 0x68b9f
movq -0x400(%rbp), %rsi
leaq -0x3f8(%rbp), %rdi
callq 0x3d940
movq %rax, %rsi
leaq -0x248(%rbp), %rdi
callq 0x48dc0
jmp 0x68b6c
jmp 0x68b6e
movq -0x400(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x400(%rbp)
jmp 0x68b1f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x3f8(%rbp), %rdi
callq 0x3dfa0
jmp 0x6a1eb
jmp 0x68bd5
leaq 0x131a38(%rip), %rsi    # 0x19a5e0
leaq -0x418(%rbp), %rdi
callq 0x80aa0
jmp 0x68bb6
leaq -0x248(%rbp), %rdi
leaq -0x418(%rbp), %rsi
callq 0x50c30
leaq -0x418(%rbp), %rdi
callq 0x3dfa0
movslq -0x3dc(%rbp), %rax
movq %rax, -0xac0(%rbp)
leaq -0x248(%rbp), %rdi
callq 0x3ffd0
movq %rax, %rcx
movq -0xac0(%rbp), %rax
cmpq %rcx, %rax
jne 0x68c00
jmp 0x68c1f
leaq 0xd08b0(%rip), %rdi     # 0x1394b7
leaq 0xd08ca(%rip), %rsi     # 0x1394d8
movl $0xe2, %edx
leaq 0xd08d2(%rip), %rcx     # 0x1394ec
callq 0xa390
movl -0x3dc(%rbp), %edi
movl $0x2, %esi
callq 0x6af70
movl %eax, -0xac4(%rbp)
jmp 0x68c37
movl -0xac4(%rbp), %eax
movl %eax, -0x28c(%rbp)
movslq -0x28c(%rbp), %rsi
leaq -0x320(%rbp), %rdi
callq 0x6afe0
jmp 0x68c58
movslq -0x28c(%rbp), %rsi
leaq -0x338(%rbp), %rdi
callq 0x6afe0
jmp 0x68c6d
movq 0x13037c(%rip), %rdi    # 0x198ff0
leaq 0xd0885(%rip), %rsi     # 0x139500
callq 0xa5c0
movq %rax, -0xad0(%rbp)
jmp 0x68c89
movq -0xad0(%rbp), %rdi
movl -0x28c(%rbp), %esi
callq 0xab20
movq %rax, -0xad8(%rbp)
jmp 0x68ca4
movq -0xad8(%rbp), %rdi
movq 0x1302d6(%rip), %rsi    # 0x198f88
callq 0xa610
jmp 0x68cb9
leaq -0x3f8(%rbp), %rdi
callq 0x3dfa0
jmp 0x69ca5
movl -0x288(%rbp), %eax
incl %eax
movl %eax, -0x288(%rbp)
leaq -0x430(%rbp), %rdi
leaq -0x108(%rbp), %rsi
movl $0x9, %edx
callq 0x7bbe0
jmp 0x68cf2
leaq -0x430(%rbp), %rdi
movl $0x7, %esi
callq 0x3d940
movq %rax, %rsi
leaq -0x448(%rbp), %rdi
movl $0x3b, %edx
callq 0x7bbe0
jmp 0x68d19
leaq -0x430(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3d940
movq %rax, %rdi
leaq -0x280(%rbp), %rsi
callq 0x56980
testb $0x1, %al
jne 0x68d41
jmp 0x6938e
leaq 0xcd197(%rip), %rsi     # 0x135edf
leaq -0x280(%rbp), %rdi
callq 0x50eb0
movb %al, -0xad9(%rbp)
jmp 0x68d5c
movb -0xad9(%rbp), %al
testb $0x1, %al
jne 0x68d6b
jmp 0x69248
leaq -0x138(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0x59b00
movq %rax, -0xae8(%rbp)
jmp 0x68d87
movq -0xae8(%rbp), %rax
movl (%rax), %eax
cmpl 0x13186a(%rip), %eax    # 0x19a600
jl 0x69246
leaq -0x468(%rbp), %rdi
callq 0x48da0
leaq -0x480(%rbp), %rdi
callq 0x48da0
movl $0x0, -0x484(%rbp)
movl $0x0, -0x488(%rbp)
movl -0x488(%rbp), %eax
cmpl -0x3dc(%rbp), %eax
je 0x6920f
movl -0x488(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48c(%rbp)
movl -0x48c(%rbp), %eax
cmpl -0x3dc(%rbp), %eax
je 0x691f9
movslq -0x488(%rbp), %rsi
leaq -0x248(%rbp), %rdi
callq 0x3d940
movq %rax, %rsi
leaq 0xcbceb(%rip), %rdx     # 0x134b03
leaq -0x4e8(%rbp), %rdi
callq 0x3da80
jmp 0x68e26
movslq -0x48c(%rbp), %rsi
leaq -0x248(%rbp), %rdi
callq 0x3d940
movq %rax, %rdx
leaq -0x4c8(%rbp), %rdi
leaq -0x4e8(%rbp), %rsi
callq 0x3da30
jmp 0x68e51
leaq -0x2c0(%rbp), %rdi
leaq -0x4c8(%rbp), %rsi
callq 0x6b070
movq %rax, -0xaf0(%rbp)
jmp 0x68e6d
movq -0xaf0(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0x6b150
movq %rax, -0xaf8(%rbp)
jmp 0x68e89
movq -0xaf8(%rbp), %rsi
leaq -0x4a8(%rbp), %rdi
callq 0x67d50
jmp 0x68e9e
leaq -0x4c8(%rbp), %rdi
callq 0xac88
leaq -0x4e8(%rbp), %rdi
callq 0xac88
movslq -0x488(%rbp), %rsi
leaq -0x248(%rbp), %rdi
callq 0x3d940
movq %rax, %rsi
leaq 0xcbc30(%rip), %rdx     # 0x134b03
leaq -0x540(%rbp), %rdi
callq 0x3da80
jmp 0x68ee1
movslq -0x48c(%rbp), %rsi
leaq -0x248(%rbp), %rdi
callq 0x3d940
movq %rax, %rdx
leaq -0x520(%rbp), %rdi
leaq -0x540(%rbp), %rsi
callq 0x3da30
jmp 0x68f0c
leaq -0x2c0(%rbp), %rdi
leaq -0x520(%rbp), %rsi
callq 0x6b070
movq %rax, -0xb00(%rbp)
jmp 0x68f28
movq -0xb00(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0x6b150
movq %rax, -0xb08(%rbp)
jmp 0x68f44
movq -0xb08(%rbp), %rsi
leaq -0x500(%rbp), %rdi
movl $0x2710, %edx           # imm = 0x2710
callq 0x67e30
jmp 0x68f5e
leaq -0x520(%rbp), %rdi
callq 0xac88
leaq -0x540(%rbp), %rdi
callq 0xac88
movslq -0x484(%rbp), %rsi
leaq -0x320(%rbp), %rdi
movq %rdi, -0xb28(%rbp)
callq 0x3ec10
movq -0xb28(%rbp), %rdi
movq %rax, -0xb18(%rbp)
movslq -0x484(%rbp), %rsi
callq 0x3ec10
movq %rax, %rdi
callq 0x44060
movq %rax, -0x550(%rbp)
leaq -0x548(%rbp), %rdi
leaq -0x550(%rbp), %rsi
callq 0x6b2e0
leaq -0x4a8(%rbp), %rdi
movq %rdi, -0xb20(%rbp)
callq 0x44030
movq -0xb20(%rbp), %rdi
movq %rax, -0x558(%rbp)
callq 0x44060
movq -0xb18(%rbp), %rdi
movq %rax, -0x560(%rbp)
movq -0x548(%rbp), %rsi
movq -0x558(%rbp), %rdx
movq -0x560(%rbp), %rcx
callq 0x6b230
movq %rax, -0xb10(%rbp)
jmp 0x69023
movq -0xb10(%rbp), %rax
movq %rax, -0x568(%rbp)
movslq -0x484(%rbp), %rsi
leaq -0x338(%rbp), %rdi
movq %rdi, -0xb48(%rbp)
callq 0x3ec10
movq -0xb48(%rbp), %rdi
movq %rax, -0xb38(%rbp)
movslq -0x484(%rbp), %rsi
callq 0x3ec10
movq %rax, %rdi
callq 0x44060
movq %rax, -0x578(%rbp)
leaq -0x570(%rbp), %rdi
leaq -0x578(%rbp), %rsi
callq 0x6b2e0
leaq -0x500(%rbp), %rdi
movq %rdi, -0xb40(%rbp)
callq 0x44030
movq -0xb40(%rbp), %rdi
movq %rax, -0x580(%rbp)
callq 0x44060
movq -0xb38(%rbp), %rdi
movq %rax, -0x588(%rbp)
movq -0x570(%rbp), %rsi
movq -0x580(%rbp), %rdx
movq -0x588(%rbp), %rcx
callq 0x6b230
movq %rax, -0xb30(%rbp)
jmp 0x690de
movq -0xb30(%rbp), %rax
movq %rax, -0x590(%rbp)
movl -0x484(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x484(%rbp)
leaq -0x500(%rbp), %rdi
callq 0x3dfa0
leaq -0x4a8(%rbp), %rdi
callq 0x3dfa0
movl -0x48c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48c(%rbp)
jmp 0x68de9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x69c94
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x69c88
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x69229
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x69180
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x4c8(%rbp), %rdi
callq 0xac88
leaq -0x4e8(%rbp), %rdi
callq 0xac88
jmp 0x69229
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x691eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x691c5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x520(%rbp), %rdi
callq 0xac88
leaq -0x540(%rbp), %rdi
callq 0xac88
jmp 0x691eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x500(%rbp), %rdi
callq 0x3dfa0
leaq -0x4a8(%rbp), %rdi
callq 0x3dfa0
jmp 0x69229
jmp 0x691fb
movl -0x488(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x488(%rbp)
jmp 0x68dc8
leaq -0x480(%rbp), %rdi
callq 0x3dfa0
leaq -0x468(%rbp), %rdi
callq 0x3dfa0
jmp 0x69246
leaq -0x480(%rbp), %rdi
callq 0x3dfa0
leaq -0x468(%rbp), %rdi
callq 0x3dfa0
jmp 0x69c88
jmp 0x69248
xorl %eax, %eax
movl %eax, %esi
leaq -0x430(%rbp), %rdi
callq 0x3d940
movq %rax, %rsi
leaq -0x280(%rbp), %rdi
callq 0xa060
jmp 0x69269
movl $0x0, -0x44c(%rbp)
leaq -0x308(%rbp), %rdi
movq %rdi, -0xb50(%rbp)
callq 0x409f0
movq -0xb50(%rbp), %rdi
movq %rax, %rsi
movslq -0x28c(%rbp), %rax
addq %rax, %rsi
callq 0x6afe0
jmp 0x692a1
movq 0x12fd48(%rip), %rdi    # 0x198ff0
leaq 0xd026a(%rip), %rsi     # 0x139519
callq 0xa5c0
movq %rax, -0xb58(%rbp)
jmp 0x692bd
movq -0xb58(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0xa520
movq %rax, -0xb60(%rbp)
jmp 0x692d9
movq -0xb60(%rbp), %rdi
movq 0x12fca1(%rip), %rsi    # 0x198f88
callq 0xa610
jmp 0x692ee
leaq 0xd0230(%rip), %rsi     # 0x139525
leaq -0x280(%rbp), %rdi
callq 0x2d770
movb %al, -0xb61(%rbp)
jmp 0x69309
movb -0xb61(%rbp), %al
testb $0x1, %al
jne 0x69315
jmp 0x6938c
movq 0x12fcd4(%rip), %rdi    # 0x198ff0
leaq -0x280(%rbp), %rsi
callq 0xa520
movq %rax, -0xb70(%rbp)
jmp 0x69331
movq -0xb70(%rbp), %rdi
leaq 0xccb9f(%rip), %rsi     # 0x135ede
callq 0xa5c0
movq %rax, -0xb78(%rbp)
jmp 0x6934d
xorl %eax, %eax
movl %eax, %esi
leaq -0x430(%rbp), %rdi
callq 0x3d940
movq -0xb78(%rbp), %rdi
movq %rax, %rsi
callq 0xa520
movq %rax, -0xb80(%rbp)
jmp 0x69375
movq -0xb80(%rbp), %rdi
movq 0x12fc05(%rip), %rsi    # 0x198f88
callq 0xa610
jmp 0x6938a
jmp 0x6938c
jmp 0x6938e
xorl %eax, %eax
movl %eax, %esi
leaq -0x448(%rbp), %rdi
callq 0x3d940
movq %rax, %rdi
leaq 0xca3da(%rip), %rsi     # 0x133782
callq 0x50eb0
movb %al, -0xb81(%rbp)
jmp 0x693b5
movb -0xb81(%rbp), %al
testb $0x1, %al
jne 0x693c4
jmp 0x69997
leaq -0x690(%rbp), %rdi
leaq -0x430(%rbp), %rsi
callq 0x7d310
jmp 0x693d9
leaq -0x430(%rbp), %rdi
movl $0x1, %esi
callq 0x3d940
movq %rax, %rdi
callq 0xa220
movq %rax, %rdi
callq 0xa970
movl %eax, -0x694(%rbp)
movl $0x0, -0x698(%rbp)
movl -0x698(%rbp), %eax
cmpl -0x3dc(%rbp), %eax
je 0x6996c
movl -0x698(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x69c(%rbp)
movl -0x69c(%rbp), %eax
cmpl -0x3dc(%rbp), %eax
je 0x69956
movslq -0x698(%rbp), %rsi
leaq -0x248(%rbp), %rdi
callq 0x3d940
movq %rax, %rsi
leaq 0xcb6a9(%rip), %rdx     # 0x134b03
leaq -0x6e0(%rbp), %rdi
callq 0x3da80
jmp 0x69468
movslq -0x69c(%rbp), %rsi
leaq -0x248(%rbp), %rdi
callq 0x3d940
movq %rax, %rdx
leaq -0x6c0(%rbp), %rdi
leaq -0x6e0(%rbp), %rsi
callq 0x3da30
jmp 0x69493
leaq -0x6e0(%rbp), %rdi
callq 0xac88
leaq -0x690(%rbp), %rdi
addq $0x70, %rdi
movslq -0x698(%rbp), %rsi
callq 0x4d100
cmpl $0x0, (%rax)
jne 0x694d7
leaq -0x690(%rbp), %rdi
addq $0x70, %rdi
movslq -0x69c(%rbp), %rsi
callq 0x4d100
cmpl $0x2, (%rax)
je 0x69517
leaq -0x690(%rbp), %rdi
addq $0x70, %rdi
movslq -0x698(%rbp), %rsi
callq 0x4d100
cmpl $0x2, (%rax)
jne 0x69926
leaq -0x690(%rbp), %rdi
addq $0x70, %rdi
movslq -0x69c(%rbp), %rsi
callq 0x4d100
cmpl $0x0, (%rax)
jne 0x69926
leaq -0x2f0(%rbp), %rdi
leaq -0x6c0(%rbp), %rsi
callq 0x6b320
movq %rax, -0xb90(%rbp)
jmp 0x69533
movq -0xb90(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0x6b400
movq %rax, -0xb98(%rbp)
jmp 0x6954f
movq -0xb98(%rbp), %rdi
callq 0x6b4e0
testb $0x1, %al
jne 0x695fe
leaq -0x2f0(%rbp), %rdi
leaq -0x6c0(%rbp), %rsi
callq 0x6b320
movq %rax, -0xba0(%rbp)
jmp 0x6957f
movq -0xba0(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0x6b400
movq %rax, -0xba8(%rbp)
jmp 0x6959b
movq -0xba8(%rbp), %rdi
callq 0x5fcc0
movq %rax, %rdi
callq 0xa220
movq %rax, %rdi
callq 0xa970
movl %eax, -0x6e4(%rbp)
jmp 0x69608
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x69986
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x6e0(%rbp), %rdi
callq 0xac88
jmp 0x69986
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x69948
movl $0x0, -0x6e4(%rbp)
movl $0x0, -0x6e8(%rbp)
leaq -0x2f0(%rbp), %rdi
leaq -0x6c0(%rbp), %rsi
callq 0x6b320
movq %rax, -0xbb0(%rbp)
jmp 0x6962e
movq -0xbb0(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0x6b400
movq %rax, -0xbb8(%rbp)
jmp 0x6964a
leaq -0x430(%rbp), %rdi
movl $0x1, %esi
callq 0x3d940
movq -0xbb8(%rbp), %rdi
movq %rax, %rsi
callq 0x48dc0
jmp 0x6966c
movl -0x694(%rbp), %eax
movl -0x6e4(%rbp), %ecx
subl %ecx, %eax
movl -0x6e8(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x6ec(%rbp)
leaq -0x2c0(%rbp), %rdi
leaq -0x6c0(%rbp), %rsi
callq 0x6b520
movq %rax, -0xbc0(%rbp)
jmp 0x696a4
movq -0xbc0(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0x6b150
movq %rax, -0xbc8(%rbp)
jmp 0x696c0
movq -0xbc8(%rbp), %rdi
leaq -0x6ec(%rbp), %rsi
callq 0x6b600
jmp 0x696d5
movq -0x1b0(%rbp), %rax
testb $0x1, 0x90(%rax)
je 0x69924
movq -0x1b0(%rbp), %rdi
movslq -0x698(%rbp), %rax
movq %rax, -0x6f8(%rbp)
leaq -0x6f8(%rbp), %rsi
callq 0x6b670
movq %rax, -0xbd0(%rbp)
jmp 0x69713
movq -0xbd0(%rbp), %rax
cmpq $0x1, %rax
jne 0x69767
movq -0x1b0(%rbp), %rdi
addq $0x38, %rdi
movslq -0x69c(%rbp), %rax
movq %rax, -0x700(%rbp)
leaq -0x700(%rbp), %rsi
callq 0x6b670
movq %rax, -0xbd8(%rbp)
jmp 0x6974e
movq -0xbd8(%rbp), %rcx
movb $0x1, %al
cmpq $0x1, %rcx
movb %al, -0xbd9(%rbp)
je 0x697f4
movq -0x1b0(%rbp), %rdi
movslq -0x69c(%rbp), %rax
movq %rax, -0x708(%rbp)
leaq -0x708(%rbp), %rsi
callq 0x6b670
movq %rax, -0xbe8(%rbp)
jmp 0x69791
movq -0xbe8(%rbp), %rcx
xorl %eax, %eax
cmpq $0x1, %rcx
movb %al, -0xbe9(%rbp)
jne 0x697e8
movq -0x1b0(%rbp), %rdi
addq $0x38, %rdi
movslq -0x698(%rbp), %rax
movq %rax, -0x710(%rbp)
leaq -0x710(%rbp), %rsi
callq 0x6b670
movq %rax, -0xbf8(%rbp)
jmp 0x697d4
movq -0xbf8(%rbp), %rax
cmpq $0x1, %rax
sete %al
movb %al, -0xbe9(%rbp)
movb -0xbe9(%rbp), %al
movb %al, -0xbd9(%rbp)
movb -0xbd9(%rbp), %al
testb $0x1, %al
jne 0x69803
jmp 0x69922
leaq -0x388(%rbp), %rdi
leaq -0x6ec(%rbp), %rsi
callq 0x6b6a0
jmp 0x69818
movq -0x1a8(%rbp), %rax
testb $0x1, (%rax)
je 0x69920
movq -0x1a8(%rbp), %rdi
movl -0x6e4(%rbp), %edx
movl -0x694(%rbp), %ecx
leaq -0x280(%rbp), %rsi
callq 0x6b700
movl %eax, -0xbfc(%rbp)
jmp 0x6984f
movl -0xbfc(%rbp), %eax
movl %eax, -0x714(%rbp)
cmpl $0x0, -0x714(%rbp)
jle 0x6991e
leaq -0x3d8(%rbp), %rdi
leaq -0x6ec(%rbp), %rsi
callq 0x6b6a0
jmp 0x6987d
movq -0x1a8(%rbp), %rsi
movl -0x6e4(%rbp), %ecx
movl -0x694(%rbp), %r8d
leaq -0x730(%rbp), %rdi
leaq -0x280(%rbp), %rdx
callq 0x6bb70
jmp 0x698a6
leaq -0x748(%rbp), %rdi
leaq -0x730(%rbp), %rsi
callq 0x45190
jmp 0x698bb
movq 0x12f72e(%rip), %rsi    # 0x198ff0
leaq -0x748(%rbp), %rdi
callq 0x6bf10
jmp 0x698d0
leaq -0x748(%rbp), %rdi
callq 0x3ec50
leaq -0x730(%rbp), %rdi
callq 0x3ec50
jmp 0x6991e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x69910
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x748(%rbp), %rdi
callq 0x3ec50
leaq -0x730(%rbp), %rdi
callq 0x3ec50
jmp 0x69948
jmp 0x69920
jmp 0x69922
jmp 0x69924
jmp 0x69928
jmp 0x69928
leaq -0x6c0(%rbp), %rdi
callq 0xac88
movl -0x69c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x69c(%rbp)
jmp 0x6942b
leaq -0x6c0(%rbp), %rdi
callq 0xac88
jmp 0x69986
jmp 0x69958
movl -0x698(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x698(%rbp)
jmp 0x6940a
movl -0x694(%rbp), %eax
movl %eax, -0x44c(%rbp)
leaq -0x690(%rbp), %rdi
callq 0x3df20
jmp 0x69997
leaq -0x690(%rbp), %rdi
callq 0x3df20
jmp 0x69c88
movl -0x288(%rbp), %eax
movl $0x2710, %ecx           # imm = 0x2710
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x69c6e
movl -0x288(%rbp), %esi
movq 0x12f635(%rip), %rdi    # 0x198ff0
callq 0xab20
movq %rax, -0xc08(%rbp)
jmp 0x699c9
movq -0xc08(%rbp), %rdi
leaq 0xcfb59(%rip), %rsi     # 0x139530
callq 0xa5c0
movq %rax, -0xc10(%rbp)
jmp 0x699e5
movq -0xc10(%rbp), %rdi
movl -0x44c(%rbp), %esi
callq 0xab20
movq %rax, -0xc18(%rbp)
jmp 0x69a00
movq -0xc18(%rbp), %rdi
movq 0x12f57a(%rip), %rsi    # 0x198f88
callq 0xa610
jmp 0x69a15
callq 0xa3a0
movq %rax, -0x750(%rbp)
movq -0x750(%rbp), %rax
movq -0x230(%rbp), %rcx
subq %rcx, %rax
cvtsi2sd %rax, %xmm0
movsd 0xcf9e9(%rip), %xmm1    # 0x139428
divsd %xmm1, %xmm0
movsd %xmm0, -0x758(%rbp)
movq 0x12f59e(%rip), %rdi    # 0x198ff0
leaq 0xcfaf5(%rip), %rsi     # 0x13954e
callq 0xa5c0
movq %rax, -0xc20(%rbp)
jmp 0x69a67
movq -0xc20(%rbp), %rdi
movsd -0x758(%rbp), %xmm0
callq 0xabd0
movq %rax, -0xc28(%rbp)
jmp 0x69a84
movq -0xc28(%rbp), %rdi
movq 0x12f4f6(%rip), %rsi    # 0x198f88
callq 0xa610
jmp 0x69a99
movq 0x12f550(%rip), %rdi    # 0x198ff0
leaq 0xcfac1(%rip), %rsi     # 0x139568
callq 0xa5c0
movq %rax, -0xc30(%rbp)
jmp 0x69ab5
leaq -0x388(%rbp), %rdi
callq 0x6c050
movq -0xc30(%rbp), %rdi
movq %rax, %rsi
callq 0xa140
movq %rax, -0xc38(%rbp)
jmp 0x69ad9
movq -0xc38(%rbp), %rdi
leaq 0xcfaa5(%rip), %rsi     # 0x13958c
callq 0xa5c0
movq %rax, -0xc40(%rbp)
jmp 0x69af5
leaq -0x7a8(%rbp), %rdi
leaq -0x388(%rbp), %rsi
callq 0x6c140
jmp 0x69b0a
leaq -0x7a8(%rbp), %rdi
callq 0x6c080
movsd %xmm0, -0xc48(%rbp)
jmp 0x69b20
movsd -0xc48(%rbp), %xmm0
movq -0xc40(%rbp), %rdi
callq 0xabd0
movq %rax, -0xc50(%rbp)
jmp 0x69b3d
movq -0xc50(%rbp), %rdi
movq 0x12f43d(%rip), %rsi    # 0x198f88
callq 0xa610
jmp 0x69b52
leaq -0x7a8(%rbp), %rdi
callq 0x6c260
movq 0x12f48b(%rip), %rdi    # 0x198ff0
leaq 0xcfa30(%rip), %rsi     # 0x13959c
callq 0xa5c0
movq %rax, -0xc58(%rbp)
jmp 0x69b7a
leaq -0x3d8(%rbp), %rdi
callq 0x6c050
movq -0xc58(%rbp), %rdi
movq %rax, %rsi
callq 0xa140
movq %rax, -0xc60(%rbp)
jmp 0x69b9e
movq -0xc60(%rbp), %rdi
leaq 0xcf9e0(%rip), %rsi     # 0x13958c
callq 0xa5c0
movq %rax, -0xc68(%rbp)
jmp 0x69bba
leaq -0x7f8(%rbp), %rdi
leaq -0x3d8(%rbp), %rsi
callq 0x6c140
jmp 0x69bcf
leaq -0x7f8(%rbp), %rdi
callq 0x6c080
movsd %xmm0, -0xc70(%rbp)
jmp 0x69be5
movsd -0xc70(%rbp), %xmm0
movq -0xc68(%rbp), %rdi
callq 0xabd0
movq %rax, -0xc78(%rbp)
jmp 0x69c02
movq -0xc78(%rbp), %rdi
movq 0x12f378(%rip), %rsi    # 0x198f88
callq 0xa610
jmp 0x69c17
leaq -0x7f8(%rbp), %rdi
callq 0x6c260
movq 0x12f3c6(%rip), %rdi    # 0x198ff0
movq 0x12f357(%rip), %rsi    # 0x198f88
callq 0xa610
jmp 0x69c38
jmp 0x69c6e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x7a8(%rbp), %rdi
callq 0x6c260
jmp 0x69c88
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x7f8(%rbp), %rdi
callq 0x6c260
jmp 0x69c88
leaq -0x448(%rbp), %rdi
callq 0x3dfa0
leaq -0x430(%rbp), %rdi
callq 0x3dfa0
jmp 0x69ca5
leaq -0x448(%rbp), %rdi
callq 0x3dfa0
leaq -0x430(%rbp), %rdi
callq 0x3dfa0
jmp 0x6a1eb
jmp 0x69ca7
jmp 0x6893f
movq 0x12f33d(%rip), %rdi    # 0x198ff0
leaq 0xcf90d(%rip), %rsi     # 0x1395c7
callq 0xa5c0
movq %rax, -0xc80(%rbp)
jmp 0x69cc8
movq -0xc80(%rbp), %rdi
movq 0x12f2b2(%rip), %rsi    # 0x198f88
callq 0xa610
jmp 0x69cdd
leaq -0x320(%rbp), %rdi
movq %rdi, -0xc88(%rbp)
callq 0x40840
movq -0xc88(%rbp), %rdi
movq %rax, -0x800(%rbp)
callq 0x3fe80
movq %rax, -0x808(%rbp)
movq -0x800(%rbp), %rdi
movq -0x808(%rbp), %rsi
leaq -0x1def(%rip), %rdx     # 0x67f30
callq 0x6c2d0
jmp 0x69d26
leaq -0x338(%rbp), %rdi
movq %rdi, -0xc90(%rbp)
callq 0x40840
movq -0xc90(%rbp), %rdi
movq %rax, -0x810(%rbp)
callq 0x3fe80
movq %rax, -0x818(%rbp)
movq -0x810(%rbp), %rdi
movq -0x818(%rbp), %rsi
leaq -0x1e38(%rip), %rdx     # 0x67f30
callq 0x6c2d0
jmp 0x69d6f
leaq -0x830(%rbp), %rdi
leaq -0x320(%rbp), %rsi
callq 0x45190
jmp 0x69d84
movq -0x88(%rbp), %rsi
leaq -0x830(%rbp), %rdi
callq 0x6bf10
jmp 0x69d99
leaq -0x830(%rbp), %rdi
callq 0x3ec50
leaq -0x848(%rbp), %rdi
leaq -0x338(%rbp), %rsi
callq 0x45190
jmp 0x69dba
movq -0xb0(%rbp), %rsi
leaq -0x848(%rbp), %rdi
callq 0x6bf10
jmp 0x69dcf
leaq -0x848(%rbp), %rdi
callq 0x3ec50
movl $0x0, -0x84c(%rbp)
leaq -0x2f0(%rbp), %rdi
callq 0x6c320
movq %rax, -0x858(%rbp)
leaq -0x2f0(%rbp), %rdi
callq 0x6c380
movq %rax, -0x860(%rbp)
leaq -0x858(%rbp), %rdi
leaq -0x860(%rbp), %rsi
callq 0x6c350
testb $0x1, %al
jne 0x69e27
jmp 0x6a041
leaq -0x858(%rbp), %rdi
callq 0x6c3b0
movq %rax, %rdi
addq $0x20, %rdi
callq 0x6c3d0
movq %rax, -0x868(%rbp)
leaq -0x858(%rbp), %rdi
callq 0x6c3b0
movq %rax, %rdi
addq $0x20, %rdi
callq 0x6c430
movq %rax, -0x870(%rbp)
leaq -0x868(%rbp), %rdi
leaq -0x870(%rbp), %rsi
callq 0x6c400
testb $0x1, %al
jne 0x69e81
jmp 0x6a025
movslq -0x84c(%rbp), %rsi
leaq -0x308(%rbp), %rdi
callq 0x3ec10
movq %rax, -0xc98(%rbp)
leaq -0x858(%rbp), %rdi
callq 0x6c3b0
movq -0xc98(%rbp), %rdi
movq %rax, %rsi
callq 0x48dc0
jmp 0x69eb8
movslq -0x84c(%rbp), %rsi
leaq -0x308(%rbp), %rdi
callq 0x3ec10
movq %rax, -0xca0(%rbp)
leaq -0x868(%rbp), %rdi
callq 0x6c460
movq -0xca0(%rbp), %rdi
movq %rax, %rsi
callq 0x48dc0
jmp 0x69eef
movslq -0x84c(%rbp), %rsi
leaq -0x308(%rbp), %rdi
movq %rdi, -0xcc0(%rbp)
callq 0x3ec10
movq -0xcc0(%rbp), %rdi
movq %rax, -0xcb0(%rbp)
movslq -0x84c(%rbp), %rsi
callq 0x3ec10
movq %rax, %rdi
callq 0x44060
movq %rax, -0x880(%rbp)
leaq -0x878(%rbp), %rdi
leaq -0x880(%rbp), %rsi
callq 0x6b2e0
leaq -0x868(%rbp), %rdi
movq %rdi, -0xcb8(%rbp)
callq 0x6c460
movq %rax, %rdi
addq $0x20, %rdi
callq 0x44030
movq -0xcb8(%rbp), %rdi
movq %rax, -0x888(%rbp)
callq 0x6c460
movq %rax, %rdi
addq $0x20, %rdi
callq 0x44060
movq -0xcb0(%rbp), %rdi
movq %rax, -0x890(%rbp)
movq -0x878(%rbp), %rsi
movq -0x888(%rbp), %rdx
movq -0x890(%rbp), %rcx
callq 0x6b230
movq %rax, -0xca8(%rbp)
jmp 0x69fb4
movq -0xca8(%rbp), %rax
movq %rax, -0x898(%rbp)
movl -0x84c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x84c(%rbp)
leaq -0x868(%rbp), %rdi
xorl %esi, %esi
callq 0x6c480
movq %rax, -0x8a0(%rbp)
jmp 0x69e46
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x830(%rbp), %rdi
callq 0x3ec50
jmp 0x6a1eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x848(%rbp), %rdi
callq 0x3ec50
jmp 0x6a1eb
jmp 0x6a027
leaq -0x858(%rbp), %rdi
xorl %esi, %esi
callq 0x6c4c0
movq %rax, -0x8a8(%rbp)
jmp 0x69df8
leaq -0x8c0(%rbp), %rdi
leaq -0x308(%rbp), %rsi
callq 0x45190
jmp 0x6a056
movq -0xd8(%rbp), %rsi
leaq -0x8c0(%rbp), %rdi
callq 0x6bf10
jmp 0x6a06b
leaq -0x8c0(%rbp), %rdi
callq 0x3ec50
movq -0x1b0(%rbp), %rax
testb $0x1, 0x90(%rax)
je 0x6a1e4
leaq -0x388(%rbp), %rdi
callq 0x6c050
cmpq $0xf4240, %rax          # imm = 0xF4240
jae 0x6a11e
leaq -0x910(%rbp), %rdi
leaq -0x388(%rbp), %rsi
callq 0x6c140
jmp 0x6a0b4
movq -0x1b8(%rbp), %rsi
leaq -0x910(%rbp), %rdi
movl $0xa, %edx
movl $0x1, %ecx
callq 0x6c500
jmp 0x6a0d3
leaq -0x910(%rbp), %rdi
callq 0x6c260
jmp 0x6a17a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x8c0(%rbp), %rdi
callq 0x3ec50
jmp 0x6a1eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x910(%rbp), %rdi
callq 0x6c260
jmp 0x6a1eb
leaq -0x960(%rbp), %rdi
leaq -0x388(%rbp), %rsi
callq 0x6c140
jmp 0x6a133
movq -0x1b8(%rbp), %rsi
leaq -0x960(%rbp), %rdi
movl $0xa, %edx
movl $0x1, %ecx
callq 0x6c500
jmp 0x6a152
leaq -0x960(%rbp), %rdi
callq 0x6c260
jmp 0x6a17a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x960(%rbp), %rdi
callq 0x6c260
jmp 0x6a1eb
movq -0x1a8(%rbp), %rax
testb $0x1, (%rax)
je 0x6a1e2
leaq -0x9b0(%rbp), %rdi
leaq -0x3d8(%rbp), %rsi
callq 0x6c140
jmp 0x6a19b
movq -0x1c0(%rbp), %rsi
leaq -0x9b0(%rbp), %rdi
movl $0xa, %edx
movl $0x1, %ecx
callq 0x6c500
jmp 0x6a1ba
leaq -0x9b0(%rbp), %rdi
callq 0x6c260
jmp 0x6a1e2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x9b0(%rbp), %rdi
callq 0x6c260
jmp 0x6a1eb
jmp 0x6a1e4
xorl %edi, %edi
callq 0xa700
leaq -0x3d8(%rbp), %rdi
callq 0x6c260
leaq -0x388(%rbp), %rdi
callq 0x6c260
leaq -0x338(%rbp), %rdi
callq 0x3ec50
leaq -0x320(%rbp), %rdi
callq 0x3ec50
leaq -0x308(%rbp), %rdi
callq 0x3ec50
leaq -0x2f0(%rbp), %rdi
callq 0x58ee0
leaq -0x2c0(%rbp), %rdi
callq 0x6c610
leaq -0x280(%rbp), %rdi
callq 0xac88
leaq -0x260(%rbp), %rdi
callq 0x3dfa0
leaq -0x248(%rbp), %rdi
callq 0x3dfa0
leaq -0x138(%rbp), %rdi
callq 0x58f20
leaq -0x108(%rbp), %rdi
callq 0xac88
leaq -0xd0(%rbp), %rdi
callq 0xac88
leaq -0xa8(%rbp), %rdi
callq 0xac88
leaq -0x80(%rbp), %rdi
callq 0xac88
leaq -0x60(%rbp), %rdi
callq 0xac88
movq -0x38(%rbp), %rdi
callq 0xab50
nop