// File: /workspace/github_cpp_makefile_star2_O2/millanek[P]evo/evo_AlleleFeq.cpp
// Function: AFmain(int, char**)
int AFmain(int argc, char** argv) {
    parseAFoptions(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());
    
    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;

    int totalVariantNumber = 0;
    std::vector<string> sampleNames; std::vector<std::string> fields;
    int reportProgressEvery = 10000; string chr; string coord; double coordDouble;
    std::clock_t start; std::clock_t startGettingCounts;
    double durationOverall; double durationGettingCounts; 
    //std::ofstream* outFileAF = new std::ofstream(stripExtension(opt::setsFile) + "_" + opt::runName + "_AF" + ".txt");
    std::ostream* outFileAF = createWriter(stripExtension(opt::setsFile) + "_" + opt::runName + "_AF" + ".txt");
    
    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 == 1) {
                *outFileAF << "chr" << "\t" << "coord" << "\t" << "ref" << "\t" << "alt";
                for(std::map<string,std::vector<size_t>>::iterator iter =  popToPosMap.begin(); iter != popToPosMap.end(); ++iter) {
                    *outFileAF << "\t" << iter->first;
                }
                *outFileAF << "\n";
            }
            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'); chr = fields[0]; coord = fields[1]; coordDouble = stringToDouble(coord);
            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 || 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);
            durationGettingCounts = ( std::clock() - startGettingCounts ) / (double) CLOCKS_PER_SEC;
            // std::cerr << "Here:" << totalVariantNumber << std::endl;

            
            *outFileAF << chr << "\t" << coord << "\t" << refAllele << "\t" << altAllele;
            if (opt::useGenotypeProbabilities) {
                int likelihoodsOrProbabilitiesTagPosition = c->checkForGenotypeLikelihoodsOrProbabilities(fields);
                if (likelihoodsOrProbabilitiesTagPosition == LikelihoodsProbabilitiesAbsent) {
                    printMissingLikelihoodsWarning(fields[0], fields[1]);
                    opt::useGenotypeProbabilities = false;
                } else c->getAFsFromGenotypeLikelihoodsOrProbabilities(genotypes,posToPopMap,likelihoodsOrProbabilitiesTagPosition);
                for(std::map<string,double>::iterator iter =  c->setAAFsFromLikelihoods.begin(); iter != c->setAAFsFromLikelihoods.end(); ++iter) {
                    *outFileAF << "\t" << iter->second;
                }
            
            } else {
                for(std::map<string,double>::iterator iter =  c->setAAFs.begin(); iter != c->setAAFs.end(); ++iter) {
                    *outFileAF << "\t" << iter->second;
                }
            }
            *outFileAF << "\n";

            genotypes.clear(); genotypes.shrink_to_fit();
            
            delete c;
        }
    }
    
    outFileAF->flush();
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x268, %rsp            # imm = 0x268
callq 0x8745b
leaq 0xb0(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0x58873(%rip), %rsi     # 0xdf098
leaq 0x110(%rsp), %rdi
leaq 0x218(%rsp), %rdx
callq 0x21904
leaq 0x110(%rsp), %rdi
pushq $0x8
popq %rsi
callq 0x42587
movq %rax, 0xe8(%rsp)
leaq 0x110(%rsp), %rdi
callq 0x8978
movl $0x208, %edi            # imm = 0x208
callq 0x8490
movq %rax, %r14
movq 0x58845(%rip), %rsi     # 0xdf0b8
pushq $0x8
popq %rdx
movq %rax, %rdi
callq 0x8890
leaq 0x118(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x220(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x1a0(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x1f0(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0xa0(%rsp), %rbx
leaq 0x80(%rsp), %r15
leaq 0x110(%rsp), %r12
leaq 0x218(%rsp), %r13
movq %r14, %rdi
movq %rbx, %rsi
callq 0x80a0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x86989
movq %r15, %rdi
movq %rbx, %rsi
pushq $0x9
popq %rdx
callq 0x40349
movq 0x80(%rsp), %rsi
addq $0x20, %rsi
movq %r12, %rdi
callq 0x3abd8
movq 0x80(%rsp), %rsi
movq %rax, %rdi
callq 0x2b0a4
movq 0x80(%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 0x86912
xorpd %xmm0, %xmm0
leaq 0x140(%rsp), %rbx
movapd %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
movq 0x128(%rsp), %r14
leaq 0x118(%rsp), %rax
cmpq %rax, %r14
je 0x869cc
leaq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0x2b0a4
movq %r14, %rdi
callq 0x8340
movq %rax, %r14
jmp 0x869a6
movq 0x56615(%rip), %rdi     # 0xdcfe8
leaq 0x2b7e7(%rip), %rsi     # 0xb21c1
callq 0x8480
movq 0x148(%rsp), %rsi
subq 0x140(%rsp), %rsi
sarq $0x5, %rsi
movq %rax, %rdi
callq 0x8320
leaq 0x19ad2(%rip), %rsi     # 0xa04d4
movq %rax, %rdi
callq 0x8480
movq %rax, %rdi
callq 0x8230
xorpd %xmm0, %xmm0
movapd %xmm0, 0x180(%rsp)
andq $0x0, 0x190(%rsp)
movapd %xmm0, 0x20(%rsp)
andq $0x0, 0x30(%rsp)
leaq 0x90(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x170(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
leaq 0x58655(%rip), %rsi     # 0xdf0b8
leaq 0x1c8(%rsp), %rdi
callq 0x404d7
leaq 0x1cd45(%rip), %rdx     # 0xa37bc
leaq 0xc0(%rsp), %rdi
leaq 0x1c8(%rsp), %rsi
callq 0x28a29
leaq 0x58645(%rip), %rdx     # 0xdf0d8
leaq 0xf0(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x287e7
leaq 0x28a2c(%rip), %rdx     # 0xaf4db
leaq 0x40(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x28a29
leaq 0x2635d(%rip), %rdx     # 0xace25
leaq 0x60(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x28a29
leaq 0x60(%rsp), %rdi
pushq $0x10
popq %rsi
callq 0x42616
movq %rax, %r14
leaq 0x60(%rsp), %r15
movq %r15, %rdi
callq 0x8978
leaq 0x40(%rsp), %rdi
callq 0x8978
leaq 0xf0(%rsp), %r13
movq %r13, %rdi
callq 0x8978
leaq 0xc0(%rsp), %rbp
movq %rbp, %rdi
callq 0x8978
leaq 0x1c8(%rsp), %rdi
callq 0x8978
leaq 0xa0(%rsp), %r12
movl $0x0, 0xc(%rsp)
movq 0xe8(%rsp), %rdi
movq %r12, %rsi
callq 0x80a0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x871b9
movq 0xa0(%rsp), %rdi
movq 0xa8(%rsp), %rsi
addq %rdi, %rsi
movb $0xd, 0x60(%rsp)
movq %r15, %rdx
callq 0x61a56
movq 0xa0(%rsp), %rdx
addq 0xa8(%rsp), %rdx
movq %r12, %rdi
movq %rax, %rsi
callq 0x80f0
movq 0xa0(%rsp), %rax
cmpb $0x23, (%rax)
jne 0x86c5a
movzbl 0x1(%rax), %eax
cmpl $0x23, %eax
je 0x86b3b
cmpl $0x43, %eax
jne 0x86c5a
movq %r15, %rdi
movq %r12, %rsi
pushq $0x9
popq %rdx
callq 0x40349
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x2f6c0
movq %r15, %rdi
callq 0x28a08
movq 0x20(%rsp), %rsi
movl $0x120, %eax            # imm = 0x120
addq %rax, %rsi
movq 0x28(%rsp), %rdx
leaq 0x40(%rsp), %rdi
movq %r15, %rcx
callq 0x613fe
xorl %eax, %eax
movq %rax, 0x60(%rsp)
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rcx
subq %rsi, %rcx
sarq $0x5, %rcx
cmpq %rcx, %rax
je 0x86d0f
shlq $0x5, %rax
addq %rax, %rsi
leaq 0x218(%rsp), %rdi
callq 0x3210e
movq %rax, %rbx
leaq 0x1e8(%rsp), %rdi
movq %r15, %rsi
callq 0x4a546
movq %rax, %rdi
movq %rbx, %rsi
callq 0x82a0
movq 0x60(%rsp), %rax
incq %rax
jmp 0x86bff
cmpl $0x0, 0xc(%rsp)
jne 0x86e1b
movq %r14, %rdi
leaq 0x29e64(%rip), %rsi     # 0xb0ad3
callq 0x8480
movq %rax, %rdi
leaq 0x131a0(%rip), %rsi     # 0x99e1e
callq 0x8480
movq %rax, %rdi
leaq 0x29e4a(%rip), %rsi     # 0xb0ad7
callq 0x8480
movq %rax, %rdi
leaq 0x13182(%rip), %rsi     # 0x99e1e
callq 0x8480
movq %rax, %rdi
leaq 0x10a15(%rip), %rsi     # 0x976c0
callq 0x8480
movq %rax, %rdi
leaq 0x13164(%rip), %rsi     # 0x99e1e
callq 0x8480
movq %rax, %rdi
leaq 0x294fe(%rip), %rsi     # 0xb01c7
callq 0x8480
movq 0x1b0(%rsp), %rbx
leaq 0x1a0(%rsp), %rax
cmpq %rax, %rbx
je 0x86e0c
movq %r14, %rdi
leaq 0x1312d(%rip), %rsi     # 0x99e1e
callq 0x8480
leaq 0x20(%rbx), %rsi
movq %rax, %rdi
callq 0x8430
movq %rbx, %rdi
callq 0x8340
movq %rax, %rbx
jmp 0x86cd6
movq 0x128(%rsp), %rbx
leaq 0x118(%rsp), %rax
cmpq %rax, %rbx
je 0x86df0
leaq 0x20(%rbx), %rsi
movq %r15, %rdi
callq 0x8600
leaq 0x40(%rbx), %rsi
movq %r13, %rdi
callq 0x297dc
movq %rbp, %rdi
leaq 0x40(%rsp), %rsi
movq %r13, %rdx
callq 0x427bd
movq 0xc0(%rsp), %rax
cmpq 0xc8(%rsp), %rax
jne 0x86dad
movq 0x5627f(%rip), %rdi     # 0xdcfe8
leaq 0x198cb(%rip), %rsi     # 0xa063b
callq 0x8480
movq %rax, %rdi
movq %r15, %rsi
callq 0x8430
movq %rax, %rdi
leaq 0x185a5(%rip), %rsi     # 0x9f32f
callq 0x8480
movq %rax, %rdi
callq 0x8230
movq 0xc0(%rsp), %rax
cmpq 0xc8(%rsp), %rax
je 0x87254
leaq 0x198(%rsp), %rdi
movq %r15, %rsi
callq 0x4a596
movq %rax, %rdi
movq %rbp, %rsi
callq 0x4a5fc
movq %rbp, %rdi
callq 0x2f68c
movq %r13, %rdi
callq 0x28a08
movq %r15, %rdi
callq 0x8978
movq %rbx, %rdi
callq 0x8340
movq %rax, %rbx
jmp 0x86d17
callq 0x8310
movq %rax, 0xe0(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x28a08
jmp 0x86b3b
movq %r14, %rdi
leaq 0xcb37(%rip), %rsi      # 0x9394d
callq 0x8480
movl 0xc(%rsp), %eax
incl %eax
movl %eax, 0xc(%rsp)
cltd
movl $0x2710, %ecx           # imm = 0x2710
idivl %ecx
testl %edx, %edx
jne 0x86ea4
callq 0x8310
subq 0xe0(%rsp), %rax
cvtsi2sd %rax, %xmm0
divsd 0x1653d(%rip), %xmm0    # 0x9d388
movsd %xmm0, 0x18(%rsp)
movq 0x56190(%rip), %rdi     # 0xdcfe8
leaq 0x19847(%rip), %rsi     # 0xa06a6
callq 0x8480
movq %rax, %rdi
movl 0xc(%rsp), %esi
callq 0x8840
movq %rax, %rdi
leaq 0x1c734(%rip), %rsi     # 0xa35ae
callq 0x8480
movq %rax, %rdi
movsd 0x18(%rsp), %xmm0
callq 0x8750
movq %rax, %rdi
leaq 0x1f75f(%rip), %rsi     # 0xa65f6
callq 0x8480
movq %rax, %rdi
callq 0x8230
movq %r15, %rdi
movq %r12, %rsi
pushq $0x9
popq %rdx
callq 0x40349
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x2f6c0
movq %r15, %rdi
callq 0x28a08
movq 0x20(%rsp), %rsi
leaq 0x80(%rsp), %rdi
callq 0x82a0
movq 0x20(%rsp), %rsi
addq $0x20, %rsi
leaq 0x160(%rsp), %rdi
callq 0x82a0
leaq 0x248(%rsp), %rdi
leaq 0x160(%rsp), %rsi
callq 0x8600
leaq 0x248(%rsp), %rbx
movq %rbx, %rdi
callq 0x402aa
movq %rbx, %rdi
callq 0x8978
movq 0x20(%rsp), %rsi
movl $0x120, %eax            # imm = 0x120
addq %rax, %rsi
movq 0x28(%rsp), %rdx
movq %r13, %rdi
movq %r15, %rcx
callq 0x613fe
movq 0x20(%rsp), %rsi
addq $0x60, %rsi
movq %r15, %rdi
callq 0x8600
movq 0x20(%rsp), %rsi
subq $-0x80, %rsi
leaq 0x40(%rsp), %rdi
callq 0x8600
cmpq $0x1, 0x68(%rsp)
ja 0x86f82
cmpq $0x1, 0x48(%rsp)
ja 0x86f82
leaq 0x40(%rsp), %rdi
leaq 0x2aa2d(%rip), %rsi     # 0xb19a6
callq 0x2193f
testb %al, %al
je 0x86fe0
andq $0x0, 0x68(%rsp)
movq 0x60(%rsp), %rax
xorl %ebx, %ebx
movb %bl, (%rax)
movq %r15, %rdi
callq 0x8930
andq $0x0, 0x48(%rsp)
movq 0x40(%rsp), %rax
movb %bl, (%rax)
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
callq 0x8930
movq %r13, %rdi
callq 0x32680
movq %r13, %rdi
callq 0x61b78
movq %rbx, %rdi
callq 0x8978
movq %r15, %rdi
callq 0x8978
movq %r13, %rdi
callq 0x28a08
jmp 0x86b3b
callq 0x8310
movl $0x240, %edi            # imm = 0x240
callq 0x8490
movq %rax, 0x10(%rsp)
movq 0xf8(%rsp), %rdx
subq 0xf0(%rsp), %rdx
shrq $0x5, %rdx
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
leaq 0x198(%rsp), %rsi
callq 0x61430
movq %rbx, %rdi
movq %r13, %rsi
leaq 0x1e8(%rsp), %rdx
callq 0x3ff64
callq 0x8310
movq %r14, %rdi
leaq 0x80(%rsp), %rsi
callq 0x8430
movq %rax, %rdi
leaq 0x12dcf(%rip), %rsi     # 0x99e1e
callq 0x8480
movq %rax, %rdi
leaq 0x160(%rsp), %rsi
callq 0x8430
movq %rax, %rdi
leaq 0x12db0(%rip), %rsi     # 0x99e1e
callq 0x8480
movq %rax, %rdi
movq %r15, %rsi
callq 0x8430
movq %rax, %rdi
leaq 0x12d96(%rip), %rsi     # 0x99e1e
callq 0x8480
movq %rax, %rdi
leaq 0x40(%rsp), %rsi
callq 0x8430
cmpb $0x1, 0x58057(%rip)     # 0xdf0f8
jne 0x870cf
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x435a6
testl %eax, %eax
je 0x8711a
movq 0x10(%rsp), %rdi
movq %r13, %rsi
leaq 0x1e8(%rsp), %rdx
movl %eax, %ecx
callq 0x431ce
jmp 0x8712f
movq 0x10(%rsp), %rax
movq 0xf8(%rax), %rbx
addq $0xe8, %rax
movq %rax, 0x18(%rsp)
cmpq 0x18(%rsp), %rbx
je 0x87176
movq %r14, %rdi
leaq 0x12d23(%rip), %rsi     # 0x99e1e
callq 0x8480
movsd 0x40(%rbx), %xmm0
movq %rax, %rdi
callq 0x8750
movq %rbx, %rdi
callq 0x8340
movq %rax, %rbx
jmp 0x870e6
movq 0x20(%rsp), %rdi
leaq 0x20(%rdi), %rsi
callq 0x3fb64
movb $0x0, 0x57fc9(%rip)     # 0xdf0f8
movq 0x10(%rsp), %rax
movq 0x168(%rax), %rbx
addq $0x158, %rax            # imm = 0x158
movq %rax, 0x18(%rsp)
cmpq 0x18(%rsp), %rbx
je 0x87176
movq %r14, %rdi
leaq 0x12cc7(%rip), %rsi     # 0x99e1e
callq 0x8480
movsd 0x40(%rbx), %xmm0
movq %rax, %rdi
callq 0x8750
movq %rbx, %rdi
callq 0x8340
movq %rax, %rbx
jmp 0x87146
movq %r14, %rdi
leaq 0xc7cd(%rip), %rsi      # 0x9394d
callq 0x8480
movq %r13, %rdi
callq 0x32680
movq %r13, %rdi
callq 0x61b78
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x61838
movl $0x240, %esi            # imm = 0x240
movq %rbx, %rdi
callq 0x84a0
leaq 0x40(%rsp), %rdi
jmp 0x86fc6
movq %r14, %rdi
callq 0x8330
leaq 0x160(%rsp), %rdi
callq 0x8978
leaq 0x80(%rsp), %rdi
callq 0x8978
leaq 0x20(%rsp), %rdi
callq 0x28a08
leaq 0x180(%rsp), %rdi
callq 0x28a08
leaq 0x140(%rsp), %rdi
callq 0x28a08
leaq 0x1e8(%rsp), %rdi
callq 0x4a9bc
leaq 0x198(%rsp), %rdi
callq 0x4aa20
leaq 0x218(%rsp), %rdi
callq 0x33008
leaq 0x110(%rsp), %rdi
callq 0x32f44
leaq 0xa0(%rsp), %rdi
callq 0x8978
xorl %eax, %eax
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1940a(%rip), %rdi     # 0xa0665
leaq 0x29846(%rip), %rsi     # 0xb0aa8
leaq 0x29851(%rip), %rcx     # 0xb0aba
pushq $0x68
popq %rdx
callq 0x82f0
jmp 0x87289
movq %rax, %r15
movl $0x240, %esi            # imm = 0x240
movq %rbx, %rdi
callq 0x84a0
jmp 0x8728c
jmp 0x87289
jmp 0x87289
movq %rax, %r15
leaq 0x40(%rsp), %rdi
callq 0x8978
jmp 0x8734c
jmp 0x8738c
jmp 0x8738c
jmp 0x8738c
movq %rax, %r15
leaq 0x60(%rsp), %rdi
callq 0x8978
jmp 0x872bc
movq %rax, %r15
leaq 0x40(%rsp), %rdi
callq 0x8978
jmp 0x872cb
movq %rax, %r15
leaq 0xf0(%rsp), %rdi
callq 0x8978
jmp 0x872dd
movq %rax, %r15
leaq 0xc0(%rsp), %rdi
callq 0x8978
jmp 0x872ef
movq %rax, %r15
leaq 0x1c8(%rsp), %rdi
jmp 0x8733d
jmp 0x8738c
movq %rax, %r15
movl $0x208, %esi            # imm = 0x208
movq %r14, %rdi
callq 0x84a0
jmp 0x87446
jmp 0x8732a
movq %rax, %r15
leaq 0x110(%rsp), %rdi
callq 0x8978
jmp 0x87446
movq %rax, %r15
jmp 0x87446
movq %rax, %r15
leaq 0x248(%rsp), %rdi
callq 0x8978
jmp 0x873c7
jmp 0x8738c
movq %rax, %r15
leaq 0x60(%rsp), %rdi
callq 0x8978
jmp 0x8735b
movq %rax, %r15
leaq 0xf0(%rsp), %rdi
jmp 0x873c2
jmp 0x8738c
jmp 0x8737b
jmp 0x8738c
jmp 0x87391
movq %rax, %r15
jmp 0x873b3
movq %rax, %r15
jmp 0x873a6
jmp 0x8738c
jmp 0x8738c
movq %rax, %r15
jmp 0x873f8
jmp 0x87384
jmp 0x8738c
movq %rax, %r15
jmp 0x87412
movq %rax, %r15
jmp 0x873c7
movq %rax, %r15
jmp 0x873bd
movq %rax, %r15
leaq 0xc0(%rsp), %rdi
callq 0x2f68c
leaq 0xf0(%rsp), %rdi
callq 0x28a08
leaq 0x60(%rsp), %rdi
callq 0x8978
leaq 0x40(%rsp), %rdi
callq 0x28a08
leaq 0x160(%rsp), %rdi
callq 0x8978
leaq 0x80(%rsp), %rdi
callq 0x8978
leaq 0x20(%rsp), %rdi
callq 0x28a08
leaq 0x180(%rsp), %rdi
callq 0x28a08
leaq 0x140(%rsp), %rdi
jmp 0x8740d
movq %rax, %r15
leaq 0x80(%rsp), %rdi
callq 0x28a08
leaq 0x1e8(%rsp), %rdi
callq 0x4a9bc
leaq 0x198(%rsp), %rdi
callq 0x4aa20
leaq 0x218(%rsp), %rdi
callq 0x33008
leaq 0x110(%rsp), %rdi
callq 0x32f44
leaq 0xa0(%rsp), %rdi
callq 0x8978
movq %r15, %rdi
callq 0x8870