// File: /workspace/github_cpp_makefile_star2_O2/millanek[P]evo/evo_shared_variation.cpp
// Function: sharedVarMain(int, char**)
int sharedVarMain(int argc, char** argv) {
    parseSharedVarOptions(argc, argv);
    string line; // for reading the input files
    
    std::istream* vcfFile = createReader(opt::vcfFile.c_str());
    std::ifstream* setsFile = new std::ifstream(opt::setsFile.c_str());
    string fileRoot = stripExtension(opt::setsFile);
    std::cerr << "Looking shared variation between samples in: " << opt::vcfFile << std::endl;
    std::cerr << "The groups are defined in: " << opt::setsFile << std::endl;
    
    std::map<string, std::vector<string>> speciesToIDsMap;
    std::map<string, string> IDsToSpeciesMap;
    std::map<string, std::vector<size_t>> speciesToPosMap;
    std::map<size_t, string> posToSpeciesMap;
    
    // Get the sample sets
    while (getline(*setsFile, line)) {
        std::vector<string> ID_Species = split(line, '\t');
        speciesToIDsMap[ID_Species[1]].push_back(ID_Species[0]);
        IDsToSpeciesMap[ID_Species[0]] = ID_Species[1];
    }
    
    // Get a vector of set names (usually species)
    std::vector<string> species;
    for(std::map<string,std::vector<string>>::iterator it = speciesToIDsMap.begin(); it != speciesToIDsMap.end(); ++it) {
        if ((it->first) != "Outgroup" && it->first != "xxx") {
            species.push_back(it->first);
            // std::cerr << it->first << std::endl;
        }
    } std::cerr << "There are " << species.size() << " sets (excluding the Outgroup)" << std::endl;
    
    std::ofstream* sharedLocsFile;
    if (opt::getLocsFor.size() == 2) {
        sharedLocsFile = new std::ofstream(opt::runName+"sharedVariationLocation_" + opt::getLocsFor[0] + "_" + opt::getLocsFor[1] + ".txt");
    }

    string sharedPerIndividualN = opt::runName + "sharedHets_perIndividual.txt";
    string sharedBetweenGroupsN = "sharedVariationBetween_" + fileRoot + "_" + opt::runName + ".txt";
    string sharedPerIndividualNscaled = opt::runName + "sharedHets_perIndividual_scaled.txt";
    string sharedBetweenGroupsNscaled = "sharedVariationBetween_" + fileRoot + "_" + opt::runName + "_scaled.txt";
    std::ofstream* sharedPerIndividual = new std::ofstream(sharedPerIndividualN.c_str());
    std::ofstream* sharedBetweenGroups = new std::ofstream(sharedBetweenGroupsN.c_str());
    std::ofstream* sharedPerIndividualScaled = new std::ofstream(sharedPerIndividualNscaled.c_str());
    std::ofstream* sharedBetweenGroupsScaled = new std::ofstream(sharedBetweenGroupsNscaled.c_str());
    std::vector<std::vector<double> > hetMatrix; std::vector<std::vector<double> > hetMatrixMissing;
    std::vector<std::vector<double> > sharedBetweenGroupsMatrix; std::vector<std::vector<double> > sharedBetweenGroupsMatrixMissing;
    
    int totalVariantNumber = 0; int reportProgressEvery = 10000;
    std::vector<string> sampleNames; int numSamples = 0;
    std::vector<string> fields;
    std::map<std::string, double> loc_pval;
    std::clock_t start; double durationOverall;
    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> sN(fields.begin()+NUM_NON_GENOTYPE_COLUMNS,fields.end());
            sampleNames = sN;
            for (std::vector<std::string>::size_type i = 0; i != sampleNames.size(); i++) {
                posToSpeciesMap[i] = IDsToSpeciesMap[sampleNames[i]];
            }
            numSamples = (int)sampleNames.size();
            
            // 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 = speciesToIDsMap.begin(); it != speciesToIDsMap.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());
                }
                speciesToPosMap[sp] = spPos;
            }
            
            initialize_matrix_double(hetMatrix, numSamples); initialize_matrix_double(hetMatrixMissing, numSamples);
            initialize_matrix_double(sharedBetweenGroupsMatrix, (int)species.size());
            initialize_matrix_double(sharedBetweenGroupsMatrixMissing, (int)species.size());
            start = std::clock();
        } else {
            totalVariantNumber++;
            if (totalVariantNumber % reportProgressEvery == 0) {
                durationOverall = ( std::clock() - start ) / (double) CLOCKS_PER_SEC;
                std::cerr << "Processed " << totalVariantNumber << " variants in " << durationOverall << "secs" << std::endl;
            }
            fields = split(line, '\t');
            std::vector<std::string> genotypes(fields.begin()+NUM_NON_GENOTYPE_COLUMNS,fields.end());

            // Only consider biallelic SNPs
            string refAllele = fields[3]; string altAllele = fields[4];
            if (refAllele.length() > 1 || altAllele.length() > 1) {
                refAllele.clear(); refAllele.shrink_to_fit(); altAllele.clear(); altAllele.shrink_to_fit();
                genotypes.clear(); genotypes.shrink_to_fit(); continue;
            }
            
            GeneralSetCounts* c = new GeneralSetCounts(speciesToPosMap, (int)genotypes.size());
            c->getSetVariantCounts(genotypes, posToSpeciesMap);
            genotypes.clear(); genotypes.shrink_to_fit();
            
            // Put the number of hets in each sample on the diagonal
            for (int i = 0; i < numSamples; i++) {
                if (c->individualsWithVariant[i] == 1)
                    hetMatrix[i][i]++;
                else if (c->individualsWithVariant[i] == -1) // Missing data for this individual
                    hetMatrixMissing[i][i]++;
            }
            // Now look if the het is shared between individuals
            for (int i = 0; i < (numSamples-1); i++) {
                int iAllele = c->individualsWithVariant[i];
                if (iAllele == 1) {
                    for (int j = i+1; j != numSamples; j++) {
                        if (c->individualsWithVariant[j] == 1)
                            hetMatrix[j][i]++;
                        else if (c->individualsWithVariant[j] == -1)
                            hetMatrixMissing[j][i]++;
                    }
                } else if (iAllele == -1) {
                    for (int j = i+1; j != numSamples; j++) {
                        hetMatrixMissing[j][i]++;
                    }
                }
            }
            
            // Now look at the numbers a polymorphic sites in groups and shared between groups:
            std::vector<double> allPs;
            for (int i = 0; i < (int)species.size(); i++) {
                allPs.push_back(c->setAAFs.at(species[i]));
                double p_Si = allPs[i];
                if (p_Si > 0 && p_Si < 1)
                    sharedBetweenGroupsMatrix[i][i]++;
                else if (p_Si == -1)
                    sharedBetweenGroupsMatrixMissing[i][i]++;
            }
            for (int i = 0; i < ((int)species.size()-1); i++) {
                double p_Si = allPs[i];
                if (p_Si > 0 && p_Si < 1) {
                    for (int j = i+1; j != (int)species.size(); j++) {
                        double p_Sj = allPs[j];
                        if (p_Sj > 0 && p_Sj < 1) {
                            sharedBetweenGroupsMatrix[j][i]++;
                            if (opt::getLocsFor.size() == 2) {
                                if ((species[i] == opt::getLocsFor[0] && species[j] == opt::getLocsFor[1]) || (species[i] == opt::getLocsFor[1] && species[j] == opt::getLocsFor[0]))
                                    *sharedLocsFile << fields[0] << "\t" << fields[1] << std::endl;
                            }
                        }
                        else if (p_Sj == -1)
                            sharedBetweenGroupsMatrixMissing[j][i]++;
                    }
                } else if (p_Si == -1) { // Entirely missing data for this species/population
                    for (int j = i+1; j != (int)species.size(); j++) {
                        sharedBetweenGroupsMatrixMissing[j][i]++;
                    }
                }
            }
            delete c;
        }
    }
    
    // print het sharing per individual
    print_vector(sampleNames, *sharedPerIndividual);
    print_matrix<const std::vector<std::vector<double> >&>(hetMatrix, *sharedPerIndividual);
    for (int i = 0; i < numSamples; i++) {
        for (int j = 0; j < numSamples; j++) {
            double proportionUsed = 1 - (hetMatrixMissing[j][i]/totalVariantNumber);
            hetMatrix[j][i] = hetMatrix[j][i]/proportionUsed;
        }
    }
    print_vector(sampleNames, *sharedPerIndividualScaled);
    print_matrix<const std::vector<std::vector<double> >&>(hetMatrix, *sharedPerIndividualScaled);
    
    // Print variant sharing between groups
    print_vector(species, *sharedBetweenGroups);
    print_matrix<const std::vector<std::vector<double> >&>(sharedBetweenGroupsMatrix, *sharedBetweenGroups);
    for (int i = 0; i < (int)species.size(); i++) {
        for (int j = 0; j < (int)species.size(); j++) {
            double proportionUsed = 1 - (sharedBetweenGroupsMatrixMissing[j][i]/totalVariantNumber);
            sharedBetweenGroupsMatrix[j][i] = sharedBetweenGroupsMatrix[j][i]/proportionUsed;
        }
    }
    print_vector(species, *sharedBetweenGroupsScaled);
    print_matrix<const std::vector<std::vector<double> >&>(sharedBetweenGroupsMatrix, *sharedBetweenGroupsScaled);
    
    
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3d8, %rsp            # imm = 0x3D8
callq 0x611f2
leaq 0xe0(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0x7ebbb(%rip), %rsi     # 0xde738
leaq 0x298(%rsp), %rdi
leaq 0x348(%rsp), %rdx
callq 0x21904
leaq 0x298(%rsp), %rdi
pushq $0x8
popq %rsi
callq 0x42587
movq %rax, %rbx
leaq 0x298(%rsp), %rdi
callq 0x8978
movl $0x208, %edi            # imm = 0x208
callq 0x8490
movq %rax, %rbp
movq 0x7eb92(%rip), %rsi     # 0xde758
pushq $0x8
popq %rdx
movq %rax, %rdi
callq 0x8890
leaq 0x7eb80(%rip), %rsi     # 0xde758
leaq 0x328(%rsp), %rdi
callq 0x404d7
movq %rbx, 0x148(%rsp)
movq 0x7d3f4(%rip), %rdi     # 0xdcfe8
leaq 0x468e7(%rip), %rsi     # 0xa64e2
callq 0x8480
leaq 0x7eb31(%rip), %rsi     # 0xde738
movq %rax, %rdi
callq 0x8430
movq %rax, %rdi
callq 0x8230
movq 0x7d3ca(%rip), %rdi     # 0xdcfe8
leaq 0x468eb(%rip), %rsi     # 0xa6510
callq 0x8480
leaq 0x7eb27(%rip), %rsi     # 0xde758
movq %rax, %rdi
callq 0x8430
movq %rax, %rdi
callq 0x8230
leaq 0x2a0(%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 0x3b0(%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 0xd0(%rsp), %r14
leaq 0xa0(%rsp), %r15
leaq 0x298(%rsp), %r12
leaq 0x348(%rsp), %r13
movq %rbp, %rdi
movq %r14, %rsi
callq 0x80a0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x5fd4c
movq %r15, %rdi
movq %r14, %rsi
pushq $0x9
popq %rdx
callq 0x40349
movq 0xa0(%rsp), %rsi
addq $0x20, %rsi
movq %r12, %rdi
callq 0x3abd8
movq 0xa0(%rsp), %rsi
movq %rax, %rdi
callq 0x2b0a4
movq 0xa0(%rsp), %rbx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x3210e
addq $0x20, %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x82a0
movq %r15, %rdi
callq 0x28a08
jmp 0x5fcd5
xorpd %xmm0, %xmm0
leaq 0x10(%rsp), %rbx
andq $0x0, 0x10(%rbx)
movapd %xmm0, (%rbx)
movq 0x2b0(%rsp), %r12
leaq 0x3f40d(%rip), %r14     # 0x9f17a
leaq 0x4075c(%rip), %r15     # 0xa04d0
leaq 0x2a0(%rsp), %rax
cmpq %rax, %r12
je 0x5fdbc
leaq 0x20(%r12), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x2ea9b
testb %al, %al
je 0x5fdaf
movq %r13, %rdi
movq %r15, %rsi
callq 0x2ea9b
testb %al, %al
je 0x5fdaf
movq %rbx, %rdi
movq %r13, %rsi
callq 0x2b0a4
movq %r12, %rdi
callq 0x8340
movq %rax, %r12
jmp 0x5fd74
movq 0x7d225(%rip), %rdi     # 0xdcfe8
leaq 0x523f7(%rip), %rsi     # 0xb21c1
callq 0x8480
movq 0x18(%rsp), %rsi
subq 0x10(%rsp), %rsi
sarq $0x5, %rsi
movq %rax, %rdi
callq 0x8320
leaq 0x46740(%rip), %rsi     # 0xa652c
movq %rax, %rdi
callq 0x8480
movq %rax, %rdi
callq 0x8230
movq 0x7e97d(%rip), %rax     # 0xde780
subq 0x7e96e(%rip), %rax     # 0xde778
cmpq $0x40, %rax
movq 0x148(%rsp), %r14
jne 0x5ff10
movl $0x200, %edi            # imm = 0x200
callq 0x8490
movq %rax, 0x8(%rsp)
leaq 0x7e95e(%rip), %rsi     # 0xde790
leaq 0x46712(%rip), %rdx     # 0xa654b
leaq 0x170(%rsp), %rdi
callq 0x28806
movq 0x7e92b(%rip), %rdx     # 0xde778
leaq 0x190(%rsp), %rdi
leaq 0x170(%rsp), %rsi
callq 0x287e7
leaq 0x43953(%rip), %rdx     # 0xa37bc
leaq 0x258(%rsp), %rdi
leaq 0x190(%rsp), %rsi
callq 0x28a29
movq 0x7e8f3(%rip), %rdx     # 0xde778
addq $0x20, %rdx
leaq 0x278(%rsp), %rdi
leaq 0x258(%rsp), %rsi
callq 0x287e7
leaq 0x4cf80(%rip), %rdx     # 0xace25
leaq 0xa0(%rsp), %rdi
leaq 0x278(%rsp), %rsi
callq 0x28a29
leaq 0xa0(%rsp), %rsi
pushq $0x10
popq %rdx
movq 0x8(%rsp), %rdi
callq 0x8900
leaq 0xa0(%rsp), %rdi
callq 0x8978
leaq 0x278(%rsp), %rdi
callq 0x8978
leaq 0x258(%rsp), %rdi
callq 0x8978
leaq 0x190(%rsp), %rdi
callq 0x8978
leaq 0x170(%rsp), %rdi
callq 0x8978
leaq 0x7e879(%rip), %rsi     # 0xde790
leaq 0x46646(%rip), %rdx     # 0xa6564
leaq 0x278(%rsp), %rdi
callq 0x28806
leaq 0x4664f(%rip), %rsi     # 0xa6581
leaq 0x170(%rsp), %rdi
leaq 0x328(%rsp), %rdx
callq 0x5b784
leaq 0x4386e(%rip), %rdx     # 0xa37bc
leaq 0x190(%rsp), %rdi
leaq 0x170(%rsp), %rsi
callq 0x28a29
leaq 0x7e826(%rip), %rdx     # 0xde790
leaq 0xa0(%rsp), %rdi
leaq 0x190(%rsp), %rsi
callq 0x287e7
leaq 0x4ce9f(%rip), %rdx     # 0xace25
leaq 0x258(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x28a29
leaq 0xa0(%rsp), %rdi
callq 0x8978
leaq 0x190(%rsp), %rdi
callq 0x8978
leaq 0x170(%rsp), %rdi
callq 0x8978
leaq 0x7e7c7(%rip), %rsi     # 0xde790
leaq 0x465c9(%rip), %rdx     # 0xa6599
leaq 0x190(%rsp), %rdi
callq 0x28806
leaq 0x4659d(%rip), %rsi     # 0xa6581
leaq 0x150(%rsp), %rdi
leaq 0x328(%rsp), %rdx
callq 0x5b784
leaq 0x437bc(%rip), %rdx     # 0xa37bc
leaq 0x50(%rsp), %rdi
leaq 0x150(%rsp), %rsi
callq 0x28a29
leaq 0x7e777(%rip), %rdx     # 0xde790
leaq 0xa0(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x287e7
leaq 0x4657f(%rip), %rdx     # 0xa65b1
leaq 0x170(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x28a29
leaq 0xa0(%rsp), %rdi
callq 0x8978
leaq 0x50(%rsp), %rdi
callq 0x8978
leaq 0x150(%rsp), %rdi
callq 0x8978
movl $0x200, %edi            # imm = 0x200
callq 0x8490
movq 0x278(%rsp), %rsi
pushq $0x10
popq %rdx
movq %rax, 0x140(%rsp)
movq %rax, %rdi
callq 0x84e0
movl $0x200, %edi            # imm = 0x200
callq 0x8490
movq 0x258(%rsp), %rsi
pushq $0x10
popq %rdx
movq %rax, 0x128(%rsp)
movq %rax, %rdi
callq 0x84e0
movl $0x200, %edi            # imm = 0x200
callq 0x8490
movq 0x190(%rsp), %rsi
pushq $0x10
popq %rdx
movq %rax, 0x130(%rsp)
movq %rax, %rdi
callq 0x84e0
movl $0x200, %edi            # imm = 0x200
callq 0x8490
movq 0x170(%rsp), %rsi
pushq $0x10
popq %rdx
movq %rax, 0x138(%rsp)
movq %rax, %rdi
callq 0x84e0
leaq 0x110(%rsp), %rax
andq $0x0, 0x10(%rax)
xorpd %xmm0, %xmm0
movapd %xmm0, (%rax)
leaq 0x1f0(%rsp), %rax
movapd %xmm0, (%rax)
andq $0x0, 0x10(%rax)
leaq 0xf0(%rsp), %rax
movapd %xmm0, (%rax)
andq $0x0, 0x10(%rax)
leaq 0x1d0(%rsp), %rcx
andq $0x0, 0x10(%rcx)
leaq 0x1b0(%rsp), %r13
andq $0x0, 0x10(%r13)
leaq 0x70(%rsp), %rdx
andq $0x0, 0x10(%rdx)
leaq 0xa8(%rsp), %rax
andl $0x0, (%rax)
movapd %xmm0, (%rcx)
andq $0x0, 0x8(%rax)
movapd %xmm0, (%r13)
movapd %xmm0, (%rdx)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
xorl %r15d, %r15d
leaq 0x50(%rsp), %rbp
xorl %ebx, %ebx
movl $0x0, 0x4(%rsp)
leal -0x1(%rbx), %ecx
testl %ebx, %ebx
movl $0x0, %r12d
cmovgl %ebx, %r12d
movl %ebx, %eax
testl %ecx, %ecx
cmovlel %r15d, %ecx
movq %rcx, 0x220(%rsp)
movq %rax, 0x228(%rsp)
decq %rax
movq %rax, 0x218(%rsp)
leaq 0x150(%rsp), %rbx
movq %r14, %rdi
leaq 0xd0(%rsp), %rsi
callq 0x80a0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x60b22
movq 0xd0(%rsp), %rdi
movq 0xd8(%rsp), %rsi
addq %rdi, %rsi
movb $0xd, 0x50(%rsp)
movq %rbp, %rdx
callq 0x61a56
movq 0xd0(%rsp), %rdx
addq 0xd8(%rsp), %rdx
leaq 0xd0(%rsp), %rdi
movq %rax, %rsi
callq 0x80f0
movq 0xd0(%rsp), %rax
cmpb $0x23, (%rax)
jne 0x60252
movzbl 0x1(%rax), %eax
cmpl $0x23, %eax
je 0x601d1
cmpl $0x43, %eax
je 0x60905
movl 0x4(%rsp), %eax
incl %eax
movl %eax, 0x4(%rsp)
cltd
movl $0x2710, %ecx           # imm = 0x2710
idivl %ecx
testl %edx, %edx
jne 0x602db
callq 0x8310
subq 0x210(%rsp), %rax
cvtsi2sd %rax, %xmm0
divsd 0x3d106(%rip), %xmm0    # 0x9d388
movsd %xmm0, 0x48(%rsp)
movq 0x7cd59(%rip), %rdi     # 0xdcfe8
leaq 0x40410(%rip), %rsi     # 0xa06a6
callq 0x8480
movq %rax, %rdi
movl 0x4(%rsp), %esi
callq 0x8840
movq %rax, %rdi
leaq 0x432fd(%rip), %rsi     # 0xa35ae
callq 0x8480
movq %rax, %rdi
movsd 0x48(%rsp), %xmm0
callq 0x8750
movq %rax, %rdi
leaq 0x46328(%rip), %rsi     # 0xa65f6
callq 0x8480
movq %rax, %rdi
callq 0x8230
movq %rbp, %rdi
leaq 0xd0(%rsp), %rsi
pushq $0x9
popq %rdx
callq 0x40349
leaq 0x70(%rsp), %rdi
movq %rbp, %rsi
callq 0x2f6c0
movq %rbp, %rdi
callq 0x28a08
movq 0x70(%rsp), %rsi
movl $0x120, %eax            # imm = 0x120
addq %rax, %rsi
movq 0x78(%rsp), %rdx
leaq 0x88(%rsp), %rdi
movq %rbp, %rcx
callq 0x613fe
movq 0x70(%rsp), %rsi
addq $0x60, %rsi
movq %rbp, %rdi
callq 0x8600
movq 0x70(%rsp), %rsi
subq $-0x80, %rsi
movq %rbx, %rdi
callq 0x8600
cmpq $0x2, 0x58(%rsp)
setb %al
cmpq $0x2, 0x158(%rsp)
setb %cl
andb %al, %cl
movb %cl, 0x3(%rsp)
movq %r12, 0x230(%rsp)
je 0x6042a
movl $0x240, %edi            # imm = 0x240
callq 0x8490
leaq 0x88(%rsp), %rbx
movq 0x220(%rsp), %r15
movq %rax, %rbp
movq 0x90(%rsp), %rdx
subq 0x88(%rsp), %rdx
shrq $0x5, %rdx
movq %rax, %rdi
leaq 0x3a8(%rsp), %rsi
callq 0x61430
movq %rbp, %rdi
movq %rbx, %rsi
leaq 0x378(%rsp), %rdx
callq 0x3fbce
movq %rbx, %rdi
callq 0x32680
movq %rbx, %rdi
callq 0x61b78
movq 0x1f0(%rsp), %rax
movq 0x110(%rsp), %rcx
xorl %edx, %edx
xorl %esi, %esi
cmpq %rsi, %r12
je 0x60479
movq 0x1c0(%rbp), %rdi
movl (%rdi,%rsi,4), %edi
movq %rcx, %r8
cmpl $0x1, %edi
je 0x6040b
cmpl $-0x1, %edi
jne 0x60421
movq %rax, %r8
movq (%r8,%rdx,2), %rdi
movsd (%rdi,%rsi,8), %xmm0
addsd 0x371d4(%rip), %xmm0    # 0x975f0
movsd %xmm0, (%rdi,%rsi,8)
incq %rsi
addq $0xc, %rdx
jmp 0x603e8
andq $0x0, 0x58(%rsp)
movq 0x50(%rsp), %rax
movb %r15b, (%rax)
movq %rbp, %rdi
callq 0x8930
andq $0x0, 0x158(%rsp)
movq 0x150(%rsp), %rax
movb %r15b, (%rax)
movq %rbx, %rdi
callq 0x8930
leaq 0x88(%rsp), %r12
movq %r12, %rdi
callq 0x32680
movq %r12, %rdi
callq 0x61b78
jmp 0x608db
pushq $0x4
popq %rax
pushq $0x6
popq %rcx
movq 0x218(%rsp), %rdx
pushq $0x18
popq %rsi
xorl %edi, %edi
movq %rbp, 0x48(%rsp)
cmpq %r15, %rdi
je 0x60555
movq 0x1c0(%rbp), %r8
movl (%r8,%rdi,4), %r9d
cmpl $0x1, %r9d
je 0x604e6
cmpl $-0x1, %r9d
jne 0x60539
movq 0x1f0(%rsp), %r8
addq %rsi, %r8
movq %rdx, %r9
subq $0x1, %r9
jb 0x60539
movq (%r8), %r10
movsd (%r10,%rdi,8), %xmm0
addsd 0x37116(%rip), %xmm0    # 0x975f0
movsd %xmm0, (%r10,%rdi,8)
addq $0x18, %r8
jmp 0x604c3
movq 0x1f0(%rsp), %r9
movq 0x110(%rsp), %r10
addq %rax, %r8
xorl %r11d, %r11d
movq %rcx, %rbx
cmpq %r11, %rdx
je 0x60539
movl (%r8,%r11,4), %ebp
movq %r10, %r14
cmpl $0x1, %ebp
je 0x60518
cmpl $-0x1, %ebp
jne 0x60530
movq %r9, %r14
movq (%r14,%rbx,4), %r14
movsd (%r14,%rdi,8), %xmm0
addsd 0x370c6(%rip), %xmm0    # 0x975f0
movsd %xmm0, (%r14,%rdi,8)
addq $0x6, %rbx
incq %r11
jmp 0x604ff
incq %rdi
addq $0x18, %rsi
decq %rdx
addq $0x6, %rcx
addq $0x4, %rax
movq 0x48(%rsp), %rbp
jmp 0x60491
xorpd %xmm0, %xmm0
movapd %xmm0, 0x30(%rsp)
andq $0x0, 0x40(%rsp)
addq $0xe0, %rbp
xorl %ebx, %ebx
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
movq %rcx, %rdx
subq %rax, %rdx
shrq $0x5, %rdx
movslq %edx, %rdx
cmpq %rdx, %r15
jge 0x60619
addq %rbx, %rax
movq %rbp, %rdi
movq %rax, %rsi
callq 0x43f2a
leaq 0x30(%rsp), %rdi
movq %rax, %rsi
callq 0x5a406
movq 0x30(%rsp), %rax
movsd (%rax,%r15,8), %xmm0
ucomisd 0x35bd6(%rip), %xmm0    # 0x96198
jbe 0x605da
movsd 0x37024(%rip), %xmm1    # 0x975f0
ucomisd %xmm0, %xmm1
leaq 0xf0(%rsp), %rax
ja 0x605ee
ucomisd 0x37016(%rip), %xmm0    # 0x975f8
leaq 0x1d0(%rsp), %rax
jne 0x60609
jp 0x60609
movq (%rax), %rax
movq (%rax,%r14), %rax
movsd (%rax,%r15,8), %xmm0
addsd 0x36fed(%rip), %xmm0    # 0x975f0
movsd %xmm0, (%rax,%r15,8)
incq %r15
addq $0x18, %r14
addq $0x20, %rbx
jmp 0x60574
pushq $0x20
popq %r8
pushq $0x3
popq %r9
pushq $0x1
popq %rbx
pushq $-0x1
popq %r10
pushq $0x18
popq %r11
xorl %r12d, %r12d
xorl %r15d, %r15d
leaq 0x50(%rsp), %rbp
movq %rcx, %rdx
subq %rax, %rdx
movq %rdx, %rsi
shlq $0x1b, %rsi
movabsq $-0x100000000, %rdi     # imm = 0xFFFFFFFF00000000
addq %rdi, %rsi
sarq $0x20, %rsi
cmpq %rsi, %r12
jge 0x6089f
movq 0x30(%rsp), %rsi
movsd (%rsi,%r12,8), %xmm0
ucomisd 0x35b27(%rip), %xmm0    # 0x96198
jbe 0x60817
movsd 0x36f71(%rip), %xmm1    # 0x975f0
ucomisd %xmm0, %xmm1
jbe 0x60817
movq %r11, 0x238(%rsp)
movq %r10, 0x240(%rsp)
movq %r8, 0x250(%rsp)
movq %r8, %r15
movq %r9, 0x248(%rsp)
movq %r9, %r13
movq %rbx, %r14
movq %rcx, %rdx
subq %rax, %rdx
shrq $0x5, %rdx
movl %edx, %edx
cmpq %rdx, %r14
je 0x6085a
movq 0x30(%rsp), %rcx
movsd (%rcx,%r14,8), %xmm0
ucomisd 0x35abe(%rip), %xmm0    # 0x96198
jbe 0x607cc
movsd 0x36f08(%rip), %xmm1    # 0x975f0
ucomisd %xmm0, %xmm1
jbe 0x607cc
movq 0xf0(%rsp), %rcx
movq (%rcx,%r13,8), %rcx
movsd (%rcx,%r12,8), %xmm0
addsd 0x36ee4(%rip), %xmm0    # 0x975f0
movsd %xmm0, (%rcx,%r12,8)
movq 0x7e067(%rip), %rcx     # 0xde780
movq 0x7e058(%rip), %rsi     # 0xde778
subq %rsi, %rcx
cmpq $0x40, %rcx
jne 0x607f8
movq %r12, %rbp
shlq $0x5, %rbp
addq %rbp, %rax
movq %rax, %rdi
callq 0x26b06
testb %al, %al
je 0x6075f
movq 0x10(%rsp), %rdi
addq %r15, %rdi
movq 0x7e026(%rip), %rsi     # 0xde778
addq $0x20, %rsi
callq 0x26b06
testb %al, %al
jne 0x60793
addq 0x10(%rsp), %rbp
movq 0x7e00d(%rip), %rsi     # 0xde778
addq $0x20, %rsi
movq %rbp, %rdi
callq 0x26b06
testb %al, %al
je 0x607f8
movq 0x10(%rsp), %rdi
addq %r15, %rdi
movq 0x7dfee(%rip), %rsi     # 0xde778
callq 0x26b06
testb %al, %al
je 0x607f8
movq 0x70(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x8430
movq %rax, %rdi
leaq 0x39672(%rip), %rsi     # 0x99e1e
callq 0x8480
movq 0x70(%rsp), %rsi
addq $0x20, %rsi
movq %rax, %rdi
callq 0x8430
movq %rax, %rdi
callq 0x8230
jmp 0x607f8
ucomisd 0x36e24(%rip), %xmm0    # 0x975f8
jne 0x607f8
jp 0x607f8
movq 0x1d0(%rsp), %rax
movq (%rax,%r13,8), %rax
movsd (%rax,%r12,8), %xmm0
addsd 0x36dfe(%rip), %xmm0    # 0x975f0
movsd %xmm0, (%rax,%r12,8)
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
incq %r14
addq $0x3, %r13
addq $0x20, %r15
leaq 0x50(%rsp), %rbp
jmp 0x606b2
ucomisd 0x36dd9(%rip), %xmm0    # 0x975f8
jne 0x60885
jp 0x60885
shrq $0x5, %rdx
movl %edx, %edx
movq 0x1d0(%rsp), %rsi
addq %r11, %rsi
addq %r10, %rdx
subq $0x1, %rdx
jb 0x60885
movq (%rsi), %rdi
movsd (%rdi,%r12,8), %xmm0
addsd 0x36da2(%rip), %xmm0    # 0x975f0
movsd %xmm0, (%rdi,%r12,8)
addq $0x18, %rsi
jmp 0x60837
leaq 0x1b0(%rsp), %r13
xorl %r15d, %r15d
movq 0x250(%rsp), %r8
movq 0x248(%rsp), %r9
movq 0x240(%rsp), %r10
movq 0x238(%rsp), %r11
incq %r12
addq $0x18, %r11
decq %r10
incq %rbx
addq $0x3, %r9
addq $0x20, %r8
jmp 0x60637
movq 0x48(%rsp), %rbx
movq %rbx, %rdi
callq 0x61838
movl $0x240, %esi            # imm = 0x240
movq %rbx, %rdi
callq 0x84a0
leaq 0x30(%rsp), %rdi
callq 0x2b43c
movq 0x148(%rsp), %r14
leaq 0x150(%rsp), %rbx
leaq 0x88(%rsp), %r12
movq %rbx, %rdi
callq 0x8978
movq %rbp, %rdi
callq 0x8978
movq %r12, %rdi
callq 0x28a08
cmpb $0x0, 0x3(%rsp)
movq 0x230(%rsp), %r12
jmp 0x601d1
movq %rbp, %rdi
leaq 0xd0(%rsp), %rsi
pushq $0x9
popq %rdx
callq 0x40349
leaq 0x70(%rsp), %rdi
movq %rbp, %rsi
callq 0x2f6c0
movq %rbp, %rdi
callq 0x28a08
movq 0x70(%rsp), %rsi
movl $0x120, %eax            # imm = 0x120
addq %rax, %rsi
movq 0x78(%rsp), %rdx
movq %rbx, %rdi
movq %rbp, %rcx
callq 0x613fe
movq %r13, %rdi
movq %rbx, %rsi
callq 0x2a25e
xorl %ebx, %ebx
movq %rbx, 0x50(%rsp)
movq 0x1b0(%rsp), %rsi
movq 0x1b8(%rsp), %rax
subq %rsi, %rax
sarq $0x5, %rax
cmpq %rax, %rbx
je 0x609b4
shlq $0x5, %rbx
addq %rbx, %rsi
leaq 0x348(%rsp), %rdi
callq 0x3210e
movq %rax, %rbx
leaq 0x378(%rsp), %rdi
movq %rbp, %rsi
callq 0x4a546
movq %rax, %rdi
movq %rbx, %rsi
callq 0x82a0
movq 0x50(%rsp), %rbx
incq %rbx
jmp 0x60957
movq 0x2b0(%rsp), %rbp
leaq 0x2a0(%rsp), %rax
cmpq %rax, %rbp
je 0x60aa2
leaq 0x20(%rbp), %rsi
leaq 0x50(%rsp), %rdi
callq 0x8600
leaq 0x40(%rbp), %rsi
leaq 0x88(%rsp), %r12
movq %r12, %rdi
callq 0x297dc
leaq 0x30(%rsp), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x427bd
movq 0x30(%rsp), %rax
cmpq 0x38(%rsp), %rax
jne 0x60a52
movq 0x7c5d6(%rip), %rdi     # 0xdcfe8
leaq 0x3fc22(%rip), %rsi     # 0xa063b
callq 0x8480
movq %rax, %rdi
leaq 0x50(%rsp), %rsi
callq 0x8430
movq %rax, %rdi
leaq 0x3e8fa(%rip), %rsi     # 0x9f32f
callq 0x8480
movq %rax, %rdi
callq 0x8230
movq 0x30(%rsp), %rax
cmpq 0x38(%rsp), %rax
je 0x60e3a
leaq 0x3a8(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x4a596
movq %rax, %rdi
leaq 0x30(%rsp), %rsi
callq 0x4a5fc
leaq 0x30(%rsp), %rdi
callq 0x2f68c
leaq 0x88(%rsp), %rdi
callq 0x28a08
leaq 0x50(%rsp), %rdi
callq 0x8978
movq %rbp, %rdi
callq 0x8340
movq %rax, %rbp
jmp 0x609bc
leaq 0x110(%rsp), %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x40386
leaq 0x50(%rsp), %rbp
leaq 0x1f0(%rsp), %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x40386
movq 0x18(%rsp), %rsi
subq 0x10(%rsp), %rsi
shrq $0x5, %rsi
leaq 0xf0(%rsp), %rdi
xorl %edx, %edx
callq 0x40386
movq 0x18(%rsp), %rsi
subq 0x10(%rsp), %rsi
shrq $0x5, %rsi
leaq 0x1d0(%rsp), %rdi
xorl %edx, %edx
callq 0x40386
callq 0x8310
movq %rax, 0x210(%rsp)
leaq 0x150(%rsp), %rdi
callq 0x28a08
jmp 0x60197
leaq 0x310(%rsp), %rdi
leaq 0x1b0(%rsp), %rsi
callq 0x297dc
movq 0x138(%rsp), %r14
leaq 0x310(%rsp), %rdi
pushq $0x9
popq %rdx
pushq $0x1
popq %rcx
movq 0x140(%rsp), %rbx
movq %rbx, %rsi
callq 0x2ea24
leaq 0x310(%rsp), %rdi
callq 0x28a08
leaq 0x110(%rsp), %rdi
movq %rbx, %rsi
callq 0x4892d
cvtsi2sdl 0x4(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
imulq $0x18, 0x228(%rsp), %rax
xorl %ecx, %ecx
cmpq %r12, %rcx
je 0x60be8
movq 0x1f0(%rsp), %rdx
movq 0x110(%rsp), %rsi
xorl %edi, %edi
cmpq %rdi, %rax
je 0x60be3
movq (%rdx,%rdi), %r8
movsd (%r8,%rcx,8), %xmm0
divsd 0x8(%rsp), %xmm0
movsd 0x36a2b(%rip), %xmm1    # 0x975f0
subsd %xmm0, %xmm1
movq (%rsi,%rdi), %r8
movsd (%r8,%rcx,8), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, (%r8,%rcx,8)
addq $0x18, %rdi
jmp 0x60ba8
incq %rcx
jmp 0x60b91
leaq 0x2f8(%rsp), %rdi
leaq 0x1b0(%rsp), %rsi
callq 0x297dc
leaq 0x2f8(%rsp), %rdi
pushq $0x9
popq %rdx
pushq $0x1
popq %rcx
movq 0x130(%rsp), %rbx
movq %rbx, %rsi
callq 0x2ea24
leaq 0x2f8(%rsp), %rdi
callq 0x28a08
leaq 0x110(%rsp), %rdi
movq %rbx, %rsi
callq 0x4892d
leaq 0x2e0(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x297dc
leaq 0x2e0(%rsp), %rdi
pushq $0x9
popq %rdx
pushq $0x1
popq %rcx
movq 0x128(%rsp), %rbx
movq %rbx, %rsi
callq 0x2ea24
leaq 0x2e0(%rsp), %rdi
callq 0x28a08
leaq 0xf0(%rsp), %rdi
movq %rbx, %rsi
callq 0x4892d
movq 0x18(%rsp), %rdx
subq 0x10(%rsp), %rdx
shrq $0x5, %rdx
xorl %eax, %eax
testl %edx, %edx
movl $0x0, %ecx
cmovgl %edx, %ecx
movl %edx, %edx
imulq $0x18, %rdx, %rdx
cmpq %rcx, %rax
je 0x60cfd
movq 0x1d0(%rsp), %rsi
movq 0xf0(%rsp), %rdi
xorl %r8d, %r8d
cmpq %r8, %rdx
je 0x60cf8
movq (%rsi,%r8), %r9
movsd (%r9,%rax,8), %xmm0
divsd 0x8(%rsp), %xmm0
movsd 0x36916(%rip), %xmm1    # 0x975f0
subsd %xmm0, %xmm1
movq (%rdi,%r8), %r9
movsd (%r9,%rax,8), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, (%r9,%rax,8)
addq $0x18, %r8
jmp 0x60cbd
incq %rax
jmp 0x60ca5
leaq 0x2c8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x297dc
leaq 0x2c8(%rsp), %rdi
pushq $0x9
popq %rdx
pushq $0x1
popq %rcx
movq %r14, %rsi
callq 0x2ea24
leaq 0x2c8(%rsp), %rdi
callq 0x28a08
leaq 0xf0(%rsp), %rdi
movq %r14, %rsi
callq 0x4892d
leaq 0xa0(%rsp), %rdi
callq 0x61a0c
leaq 0x70(%rsp), %rdi
callq 0x28a08
leaq 0x1b0(%rsp), %rdi
callq 0x28a08
leaq 0x1d0(%rsp), %rdi
callq 0x37c74
leaq 0xf0(%rsp), %rdi
callq 0x37c74
leaq 0x1f0(%rsp), %rdi
callq 0x37c74
leaq 0x110(%rsp), %rdi
callq 0x37c74
leaq 0x170(%rsp), %rdi
callq 0x8978
leaq 0x190(%rsp), %rdi
callq 0x8978
leaq 0x258(%rsp), %rdi
callq 0x8978
leaq 0x278(%rsp), %rdi
callq 0x8978
leaq 0x10(%rsp), %rdi
callq 0x28a08
leaq 0x378(%rsp), %rdi
callq 0x4a9bc
leaq 0x3a8(%rsp), %rdi
callq 0x4aa20
leaq 0x348(%rsp), %rdi
callq 0x33008
leaq 0x298(%rsp), %rdi
callq 0x32f44
leaq 0x328(%rsp), %rdi
callq 0x8978
leaq 0xd0(%rsp), %rdi
callq 0x8978
xorl %eax, %eax
addq $0x3d8, %rsp            # imm = 0x3D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3f824(%rip), %rdi     # 0xa0665
leaq 0x45775(%rip), %rsi     # 0xa65bd
leaq 0x45787(%rip), %rcx     # 0xa65d6
pushq $0x77
popq %rdx
callq 0x82f0
movq %rax, %r15
leaq 0xa0(%rsp), %rdi
callq 0x8978
jmp 0x60e6c
movq %rax, %r15
leaq 0x278(%rsp), %rdi
callq 0x8978
jmp 0x60e7e
movq %rax, %r15
leaq 0x258(%rsp), %rdi
callq 0x8978
jmp 0x60e90
movq %rax, %r15
leaq 0x190(%rsp), %rdi
callq 0x8978
jmp 0x60ea2
movq %rax, %r15
leaq 0x170(%rsp), %rdi
callq 0x8978
movl $0x200, %esi            # imm = 0x200
movq 0x8(%rsp), %rdi
callq 0x84a0
jmp 0x61192
movq %rax, %r15
jmp 0x60eaf
jmp 0x61088
jmp 0x61078
jmp 0x61078
movq %rax, %r15
movl $0x240, %esi            # imm = 0x240
movq %rbp, %rdi
callq 0x84a0
jmp 0x610e2
movq %rax, %r15
leaq 0x2c8(%rsp), %rdi
jmp 0x61101
movq %rax, %r15
leaq 0x2e0(%rsp), %rdi
jmp 0x61101
movq %rax, %r15
leaq 0x2f8(%rsp), %rdi
jmp 0x61101
movq %rax, %r15
leaq 0x310(%rsp), %rdi
jmp 0x61101
movq %rax, %r15
movl $0x200, %esi            # imm = 0x200
movq 0x138(%rsp), %rdi
jmp 0x60f78
jmp 0x60f82
movq %rax, %r15
movl $0x200, %esi            # imm = 0x200
movq 0x130(%rsp), %rdi
jmp 0x60f78
jmp 0x60f82
movq %rax, %r15
movl $0x200, %esi            # imm = 0x200
movq 0x128(%rsp), %rdi
jmp 0x60f78
jmp 0x60f82
movq %rax, %r15
movl $0x200, %esi            # imm = 0x200
movq 0x140(%rsp), %rdi
callq 0x84a0
jmp 0x6115e
movq %rax, %r15
jmp 0x6115e
movq %rax, %r15
leaq 0xa0(%rsp), %rdi
callq 0x8978
jmp 0x60f9f
movq %rax, %r15
leaq 0x50(%rsp), %rdi
callq 0x8978
jmp 0x60fae
movq %rax, %r15
leaq 0x150(%rsp), %rdi
jmp 0x61166
movq %rax, %r15
jmp 0x6116b
movq %rax, %r15
jmp 0x61178
movq %rax, %r15
leaq 0xa0(%rsp), %rdi
callq 0x8978
jmp 0x60fe0
movq %rax, %r15
leaq 0x190(%rsp), %rdi
callq 0x8978
jmp 0x60ff2
movq %rax, %r15
leaq 0x170(%rsp), %rdi
jmp 0x61180
movq %rax, %r15
jmp 0x61185
jmp 0x61088
jmp 0x61032
movq %rax, %r15
movl $0x208, %esi            # imm = 0x208
movq %rbp, %rdi
callq 0x84a0
jmp 0x611dd
jmp 0x61032
movq %rax, %r15
leaq 0x298(%rsp), %rdi
jmp 0x611d8
movq %rax, %r15
jmp 0x611dd
movq %rax, %r15
jmp 0x610f9
jmp 0x61078
movq %rax, %r15
jmp 0x610ef
movq %rax, %r15
jmp 0x610e2
jmp 0x61078
jmp 0x61088
jmp 0x61078
jmp 0x61092
movq %rax, %r15
jmp 0x611d0
jmp 0x61078
movq %rax, %r15
jmp 0x610b1
jmp 0x61092
movq %rax, %r15
jmp 0x610a4
jmp 0x61078
jmp 0x61078
jmp 0x61080
movq %rax, %r15
jmp 0x61106
movq %rax, %r15
jmp 0x6119c
movq %rax, %r15
jmp 0x61192
jmp 0x610d5
movq %rax, %r15
jmp 0x610bb
movq %rax, %r15
leaq 0x30(%rsp), %rdi
callq 0x2f68c
leaq 0x88(%rsp), %rdi
callq 0x28a08
leaq 0x50(%rsp), %rdi
callq 0x8978
leaq 0x150(%rsp), %rdi
jmp 0x61101
movq %rax, %r15
leaq 0xa0(%rsp), %rdi
jmp 0x61197
movq %rax, %r15
leaq 0x30(%rsp), %rdi
callq 0x2b43c
leaq 0x150(%rsp), %rdi
callq 0x8978
leaq 0x50(%rsp), %rdi
callq 0x8978
leaq 0x88(%rsp), %rdi
callq 0x28a08
leaq 0xa0(%rsp), %rdi
callq 0x61a0c
leaq 0x70(%rsp), %rdi
callq 0x28a08
leaq 0x1b0(%rsp), %rdi
callq 0x28a08
leaq 0x1d0(%rsp), %rdi
callq 0x37c74
leaq 0xf0(%rsp), %rdi
callq 0x37c74
leaq 0x1f0(%rsp), %rdi
callq 0x37c74
leaq 0x110(%rsp), %rdi
callq 0x37c74
leaq 0x170(%rsp), %rdi
callq 0x8978
leaq 0x190(%rsp), %rdi
callq 0x8978
leaq 0x258(%rsp), %rdi
callq 0x8978
leaq 0x278(%rsp), %rdi
callq 0x8978
leaq 0x10(%rsp), %rdi
callq 0x28a08
leaq 0x378(%rsp), %rdi
callq 0x4a9bc
leaq 0x3a8(%rsp), %rdi
callq 0x4aa20
leaq 0x348(%rsp), %rdi
callq 0x33008
leaq 0x298(%rsp), %rdi
callq 0x32f44
leaq 0x328(%rsp), %rdi
callq 0x8978
leaq 0xd0(%rsp), %rdi
callq 0x8978
movq %r15, %rdi
callq 0x8870