// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/process_vcf_testing.cpp
// Function: testMain(int, char**)
int testMain(int argc, char** argv) {
    parseTestOptions(argc, argv);
    std::ios_base::openmode mode = std::ios_base::in;
    string fileName = opt::vcfFile;
    string fileRoot = stripExtension(fileName);
    std::vector<int> depthsHetFailed;
    std::vector<int> depthsHetPassed;
    std::vector<int> numVariantsPerHetCount;
    std::vector<std::vector<int> > num_indiv_het_vs_depth;
    
    
    std::cerr << "Filtering variants from: " << fileName << std::endl;
    std::cerr << "Maximum read depth (overall) set to: " << opt::max_overall_depth << std::endl;
    std::cerr << "Minimum copies for a variant (e.g. 1 for allowing singletons): " << opt::min_copies << std::endl;
    std::cerr << "Minimum read depth at the variant position: " << opt::min_depth_in_any_individual << std::endl;
    std::cerr << "Filter out sites where more than " << opt::max_het_indiv << " individuals are heterozygous"  << std::endl;
    
    // Open connection to read from the vcf file
    std::ifstream* inFile = new std::ifstream(fileName.c_str(), mode);
    
    
    bool gotChromosomeNumber = false;
    int numChromosomes;
    string line;
    int totalVariantNumber = 0;
    while (getline(*inFile, line)) {
        if (line[0] == '#') 
            std::cout << line << std::endl;  
        else {
            totalVariantNumber++;
            FilterResult result;
            std::vector<std::string> fields = split(line, '\t');
            if (!gotChromosomeNumber) {
                const std::vector<std::string>::size_type numSamples = fields.size() - NUM_NON_GENOTYPE_COLUMNS;
                numVariantsPerHetCount.assign(numSamples + 1, 0);
                numChromosomes = (int)numSamples * 2;
                std::cerr << "Number of chromosomes: " << numChromosomes << std::endl;
                gotChromosomeNumber = true;
            }
            result.overallQuality = atoi(fields[5].c_str());
            
            
            if (result.overallQuality >= MIN_OVERALL_VARIANT_PHRED_QUAL) {
                result.overallDepthPassed = testOverallReadDepth(opt::max_overall_depth,opt::min_overall_depth,fields[7]);
                result.biallelicPassed = testBiallelic(fields[4]);
            }
                
            if (result.biallelicPassed) 
                result.counts = getThisVariantCounts(fields);
            
            
            if (result.biallelicPassed && result.counts.overall <= (numChromosomes - opt::min_copies) && result.counts.overall >= opt::min_copies) {
                if (result.counts.minimumDepthInAnIndividual >= opt::min_depth_in_any_individual) {
                    // filter out sites where more than MAX_NUM_HET individuals are heterozygous
                    bool mnhPassed = testMaxNumHet(result, depthsHetFailed, depthsHetPassed, numVariantsPerHetCount, opt::max_het_indiv,num_indiv_het_vs_depth);
                    if (result.overallDepthPassed && mnhPassed) {
                        std::cout << line << std::endl;
                    }
                }
            }  
        }
    }
    
    std::cerr << "Finished filtering; tabulating depths\n" << std::endl;
    // Does the same as R function table
    std::map<int, int> tableHetFailed = tabulateVector(depthsHetFailed);
    std::map<int, int> tableHetPassed = tabulateVector(depthsHetPassed);
    
    std::ios_base::openmode mode_out = std::ios_base::out;
    string hetFailedFileName = fileRoot + ".het_filter.failed_max" + numToString<int>(opt::max_het_indiv);
    std::ofstream* pHetFailOutFile = new std::ofstream(hetFailedFileName.c_str(), mode_out);
    *pHetFailOutFile << "# Failed HetFilter:" << fileName << std::endl;
    *pHetFailOutFile << "Depth\tNum_variants" << std::endl;
    for (std::map<int, int>::const_iterator iter = tableHetFailed.begin(); iter != tableHetFailed.end(); ++iter) {
        *pHetFailOutFile << iter->first << "\t" << iter->second << std::endl;
    }


    string hetPassedFileName = fileRoot + ".het_filter.passed_max" + numToString<int>(opt::max_het_indiv);
    std::ofstream* pHetPassOutFile = new std::ofstream(hetPassedFileName.c_str(), mode_out);
    *pHetPassOutFile << "# Passed HetFilter:" << fileName << std::endl;
    *pHetPassOutFile << "Depth\tNum_variants" << std::endl;
    for (std::map<int, int>::const_iterator iter = tableHetPassed.begin(); iter != tableHetPassed.end(); ++iter) {
        *pHetPassOutFile << iter->first << "\t" << iter->second << std::endl;
    }
    
    string hetVarCountName = fileRoot + ".het_filter.variants_per_het_count_max" + numToString<int>(opt::max_het_indiv);;
    std::ofstream* pHetVarCountFile = new std::ofstream(hetVarCountName.c_str(), mode_out);
    *pHetVarCountFile << "# Number of variants per each het count: " << fileName << std::endl;
    *pHetVarCountFile << "Num_hets\tNum_variants" << std::endl;
    for (std::vector<int>::size_type i = 0; i != numVariantsPerHetCount.size(); i++) {
        *pHetVarCountFile << i << "\t" << numVariantsPerHetCount[i] << std::endl;
    }
    
    string hetDepthScatterplotName = fileRoot + ".het_filter.depth_scatterplot" + numToString<int>(opt::max_het_indiv);;
    std::ofstream* pHetDepthScatterplotFile = new std::ofstream(hetDepthScatterplotName.c_str(), mode_out);
    *pHetDepthScatterplotFile << "# Number of hets and depth for individual variants for a scatterplot: " << fileName << std::endl;
    *pHetDepthScatterplotFile << "Num_hets\tDepth" << std::endl;
    print_matrix<std::vector<std::vector<int> >&>(num_indiv_het_vs_depth, *pHetDepthScatterplotFile);
    
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3b8, %rsp            # imm = 0x3B8
callq 0x65577
leaq 0xb0(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0xa84ff(%rip), %rsi     # 0x10c358
movq 0xa8500(%rip), %rdx     # 0x10c360
addq %rsi, %rdx
leaq 0xa0(%rsp), %rbx
movq %rbx, %rdi
callq 0x2e45c
leaq 0xe8(%rsp), %rdi
movq %rbx, %rsi
callq 0x50803
xorps %xmm0, %xmm0
movaps %xmm0, 0x150(%rsp)
xorl %eax, %eax
movq %rax, 0x160(%rsp)
movq %rax, 0x140(%rsp)
movaps %xmm0, 0x130(%rsp)
movq %rax, 0xd0(%rsp)
movaps %xmm0, 0xc0(%rsp)
movq %rax, 0x1a0(%rsp)
movaps %xmm0, 0x190(%rsp)
movq 0xa7119(%rip), %rdi     # 0x10afe8
leaq 0x75452(%rip), %rsi     # 0xd9328
movl $0x19, %edx
callq 0x84e0
movq 0xa0(%rsp), %rsi
movq 0xa8(%rsp), %rdx
movq 0xa70f1(%rip), %rdi     # 0x10afe8
callq 0x84e0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
movq 0xa70bb(%rip), %rdi     # 0x10afe8
leaq 0x7543f(%rip), %rsi     # 0xd9373
movl $0x25, %edx
callq 0x84e0
movl 0xa7604(%rip), %esi     # 0x10b548
movq 0xa709d(%rip), %rdi     # 0x10afe8
callq 0x8810
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
movq 0xa7067(%rip), %rdi     # 0x10afe8
leaq 0x75437(%rip), %rsi     # 0xd93bf
movl $0x3f, %edx
callq 0x84e0
movl 0xa75b4(%rip), %esi     # 0x10b54c
movq 0xa7049(%rip), %rdi     # 0x10afe8
callq 0x8810
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
movq 0xa7013(%rip), %rdi     # 0x10afe8
leaq 0x75423(%rip), %rsi     # 0xd93ff
movl $0x2c, %edx
callq 0x84e0
movl 0xa7564(%rip), %esi     # 0x10b550
movq 0xa6ff5(%rip), %rdi     # 0x10afe8
callq 0x8810
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
movq 0xa6fbf(%rip), %rdi     # 0x10afe8
leaq 0x75461(%rip), %rsi     # 0xd9491
movl $0x21, %edx
callq 0x84e0
movl 0xa7514(%rip), %esi     # 0x10b554
movq 0xa6fa1(%rip), %rdi     # 0x10afe8
callq 0x8810
movq %rax, %rbx
leaq 0x7545d(%rip), %rsi     # 0xd94b3
movl $0x1d, %edx
movq %rax, %rdi
callq 0x84e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
movl $0x208, %edi            # imm = 0x208
callq 0x8470
movq %rax, %r15
movq 0xa0(%rsp), %rsi
movq %rax, %rdi
movl $0x8, %edx
callq 0x8860
leaq 0x120(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x1b0(%rsp), %rbx
xorl %r12d, %r12d
leaq 0x110(%rsp), %r14
movq 0xa6edb(%rip), %r13     # 0x10afb8
movq $0x0, 0x108(%rsp)
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x8870
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x6474f
movq 0x110(%rsp), %rsi
cmpb $0x23, (%rsi)
jne 0x64166
movq 0x118(%rsp), %rdx
movq %r13, %rdi
callq 0x84e0
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %rbp, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
jmp 0x640e9
movaps 0x740a3(%rip), %xmm0    # 0xd8210
movups %xmm0, 0x1a8(%rsp)
movl %r12d, 0x1b8(%rsp)
leaq 0x1d0(%rsp), %rax
movq %rax, 0x1c0(%rsp)
movq %r12, 0x1c8(%rsp)
movb %r12b, 0x1d0(%rsp)
leaq 0x1f0(%rsp), %rax
movq %rax, 0x1e0(%rsp)
movq %r12, 0x1e8(%rsp)
movb %r12b, 0x1f0(%rsp)
movabsq $0x7fefffffffffffff, %rax # imm = 0x7FEFFFFFFFFFFFFF
movq %rax, 0x200(%rsp)
movq %r12, 0x208(%rsp)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x210(%rsp)
movb %r12b, 0x218(%rsp)
movq %r12, 0x290(%rsp)
movl %r12d, 0x298(%rsp)
movq %r12, 0x2a0(%rsp)
movw $0x0, 0x2a8(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0xcc(%rbx)
movups %xmm0, 0xc0(%rbx)
movups %xmm0, 0xb0(%rbx)
movups %xmm0, 0xa0(%rbx)
movups %xmm0, 0x90(%rbx)
movups %xmm0, 0x80(%rbx)
movups %xmm0, 0x70(%rbx)
movw $0x101, 0x2b0(%rsp)     # imm = 0x101
leaq 0x80(%rsp), %rdi
movq %r14, %rsi
movl $0x9, %edx
callq 0x50624
testb $0x1, 0x108(%rsp)
jne 0x6430f
movq 0x88(%rsp), %rbp
subq 0x80(%rsp), %rbp
sarq $0x5, %rbp
leaq -0x8(%rbp), %rsi
movl $0x0, 0x2b8(%rsp)
leaq 0xc0(%rsp), %rdi
leaq 0x2b8(%rsp), %rdx
callq 0x561e6
movl $0x17, %edx
movq 0xa6d33(%rip), %rdi     # 0x10afe8
leaq 0x740e7(%rip), %rsi     # 0xd83a3
callq 0x84e0
leal -0x12(,%rbp,2), %esi
movq 0xa6d19(%rip), %rdi     # 0x10afe8
movl %esi, 0xe4(%rsp)
callq 0x8810
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %rbp, %rdi
callq 0x8040
movb $0x1, %cl
movq %rcx, 0x108(%rsp)
movq %rax, %rdi
callq 0x8300
movq 0x80(%rsp), %rbp
movq 0xa0(%rbp), %rdi
callq 0x86e0
movl %eax, 0x1a8(%rsp)
cmpl $0x1e, %eax
jl 0x64365
movl 0xa7213(%rip), %edi     # 0x10b548
addq $0xe0, %rbp
xorl %esi, %esi
movq %rbp, %rdx
callq 0x52a77
movb %al, 0x1ad(%rsp)
movq 0x80(%rsp), %rdi
subq $-0x80, %rdi
callq 0x52a3e
movb %al, 0x2b0(%rsp)
cmpb $0x1, 0x2b0(%rsp)
jne 0x6466d
leaq 0x2b8(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x51473
movl 0x2c0(%rsp), %eax
movl %eax, 0x8(%rbx)
movq 0x2b8(%rsp), %rax
movq %rax, (%rbx)
leaq 0x1c0(%rsp), %rdi
leaq 0x2c8(%rsp), %rbp
movq %rbp, %rsi
callq 0x8540
leaq 0x1e0(%rsp), %rdi
leaq 0x2e8(%rsp), %rsi
callq 0x8540
movups 0x40(%rbp), %xmm0
movups 0x49(%rbp), %xmm1
movups %xmm0, 0x50(%rbx)
movups %xmm1, 0x59(%rbx)
movq 0x220(%rsp), %rdi
movq 0x228(%rsp), %rax
movq 0x230(%rsp), %rsi
movq 0x328(%rsp), %rcx
movq %rcx, 0x220(%rsp)
movups 0x330(%rsp), %xmm0
movups %xmm0, 0x228(%rsp)
movq %rdi, 0x328(%rsp)
movq %rax, 0x330(%rsp)
movq %rsi, 0x338(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rbp)
movq $0x0, 0x70(%rbp)
testq %rdi, %rdi
je 0x64446
subq %rdi, %rsi
callq 0x8480
movq 0x238(%rsp), %rdi
movq 0x240(%rsp), %rax
movq 0x248(%rsp), %rsi
movq 0x340(%rsp), %rcx
movq %rcx, 0x238(%rsp)
movups 0x348(%rsp), %xmm0
movups %xmm0, 0x240(%rsp)
movq %rdi, 0x340(%rsp)
movq %rax, 0x348(%rsp)
movq %rsi, 0x350(%rsp)
leaq 0x2c8(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x78(%rax)
movq $0x0, 0x88(%rax)
testq %rdi, %rdi
je 0x644bd
subq %rdi, %rsi
callq 0x8480
movq 0x250(%rsp), %rdi
movq 0x258(%rsp), %rax
movq 0x260(%rsp), %rsi
movq 0x358(%rsp), %rcx
movq %rcx, 0x250(%rsp)
movups 0x360(%rsp), %xmm0
movups %xmm0, 0x258(%rsp)
movq %rdi, 0x358(%rsp)
movq %rax, 0x360(%rsp)
movq %rsi, 0x368(%rsp)
leaq 0x2c8(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x90(%rax)
movq $0x0, 0xa0(%rax)
testq %rdi, %rdi
je 0x64537
subq %rdi, %rsi
callq 0x8480
movq 0x268(%rsp), %rdi
movq 0x270(%rsp), %rax
movq 0x278(%rsp), %rsi
movq 0x370(%rsp), %rcx
movq %rcx, 0x268(%rsp)
movups 0x378(%rsp), %xmm0
movups %xmm0, 0x270(%rsp)
movq %rdi, 0x370(%rsp)
movq %rax, 0x378(%rsp)
movq %rsi, 0x380(%rsp)
leaq 0x2c8(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0xa8(%rax)
movq $0x0, 0xb8(%rax)
testq %rdi, %rdi
je 0x645b1
subq %rdi, %rsi
callq 0x8480
movq 0x280(%rsp), %rdi
testq %rdi, %rdi
je 0x645f6
movq 0x2a0(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq %r12, 0x280(%rsp)
movl %r12d, 0x288(%rsp)
movq %r12, 0x290(%rsp)
movl %r12d, 0x298(%rsp)
movq %r12, 0x2a0(%rsp)
leaq 0x2c8(%rsp), %rcx
movq 0xe0(%rcx), %rax
movq %rax, 0xf0(%rbx)
movups 0xc0(%rcx), %xmm0
movups 0xd0(%rcx), %xmm1
movups %xmm1, 0xe0(%rbx)
movups %xmm0, 0xd0(%rbx)
movq %r12, 0x388(%rsp)
movl %r12d, 0x390(%rsp)
movq %r12, 0x398(%rsp)
movl %r12d, 0x3a0(%rsp)
movq %r12, 0x3a8(%rsp)
movzwl 0x3b0(%rsp), %eax
movw %ax, 0x2a8(%rsp)
leaq 0x2b8(%rsp), %rdi
callq 0x31188
cmpb $0x1, 0x2b0(%rsp)
jne 0x64735
movl 0x1b0(%rsp), %eax
movl 0xa6ec4(%rip), %ecx     # 0x10b54c
cmpl %ecx, %eax
jl 0x64735
movl 0xe4(%rsp), %edx
subl %ecx, %edx
cmpl %edx, %eax
jg 0x64735
movl 0x1b4(%rsp), %eax
cmpl 0xa6ea2(%rip), %eax     # 0x10b550
jl 0x64735
movl 0xa6e99(%rip), %r8d     # 0x10b554
leaq 0x1a8(%rsp), %rdi
leaq 0x150(%rsp), %rsi
leaq 0x130(%rsp), %rdx
leaq 0xc0(%rsp), %rcx
leaq 0x190(%rsp), %r9
callq 0x52b08
andb 0x1ad(%rsp), %al
cmpb $0x1, %al
jne 0x64735
movq 0x110(%rsp), %rsi
movq 0x118(%rsp), %rdx
movq %r13, %rdi
callq 0x84e0
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %rbp, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
leaq 0x80(%rsp), %rdi
callq 0x3123c
movq %rbx, %rdi
callq 0x31188
jmp 0x640e9
movq 0xa6892(%rip), %r14     # 0x10afe8
leaq 0x75e23(%rip), %rsi     # 0xda580
movl $0x26, %edx
movq %r14, %rdi
callq 0x84e0
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq 0xa6860(%rip), %rdi     # 0x10afe8
callq 0x8040
movq %rax, %rdi
callq 0x8300
leaq 0x1a8(%rsp), %rdi
leaq 0x150(%rsp), %rsi
callq 0x52ca2
leaq 0x2b8(%rsp), %rdi
leaq 0x130(%rsp), %rsi
callq 0x52ca2
leaq 0x50(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq 0xe8(%rsp), %rsi
movq 0xf0(%rsp), %rdx
addq %rsi, %rdx
leaq 0x40(%rsp), %rdi
callq 0x2e45c
leaq 0x75dbb(%rip), %rsi     # 0xda5a7
leaq 0x40(%rsp), %rdi
callq 0x88c0
movl 0xa6d58(%rip), %esi     # 0x10b554
movq %rsp, %rdi
callq 0x31297
movq 0x40(%rsp), %rcx
movq 0x48(%rsp), %r8
movq 0x8(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %rbp, %rcx
je 0x64826
movq 0x50(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x64845
leaq 0x10(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x64840
movq 0x10(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x64855
movq (%rsp), %rsi
leaq 0x40(%rsp), %rdi
callq 0x8180
jmp 0x64861
movq %rsp, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x84d0
leaq 0x90(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x6488e
movq %rsi, 0x80(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x90(%rsp)
jmp 0x64894
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x88(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x648cf
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x40(%rsp), %rdi
cmpq %rbp, %rdi
je 0x648e6
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x8480
movl $0x200, %edi            # imm = 0x200
callq 0x8470
movq %rax, %r15
movq 0x80(%rsp), %rsi
movq %rax, %rdi
movl $0x10, %edx
callq 0x84c0
leaq 0x75caf(%rip), %rsi     # 0xda5be
movl $0x13, %edx
movq %r15, %rdi
callq 0x84e0
movq 0xa0(%rsp), %rsi
movq 0xa8(%rsp), %rdx
movq %r15, %rdi
callq 0x84e0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %r14, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
leaq 0x75c6d(%rip), %rsi     # 0xda5d2
movl $0x12, %edx
movq %r15, %rdi
callq 0x84e0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %r15, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
movq 0x1c0(%rsp), %r14
cmpq %rbx, %r14
je 0x64a12
leaq 0x6d2d1(%rip), %r12     # 0xd1c7e
movl 0x20(%r14), %esi
movq %r15, %rdi
callq 0x8810
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x84e0
movl 0x24(%r14), %esi
movq %r13, %rdi
callq 0x8810
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %r13, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
movq %r14, %rdi
callq 0x84f0
movq %rax, %r14
cmpq %rbx, %rax
jne 0x649ad
movq %rsp, %rdi
leaq 0x10(%rsp), %rbx
movq %rbx, (%rdi)
movq 0xe8(%rsp), %rsi
movq 0xf0(%rsp), %rdx
addq %rsi, %rdx
callq 0x2e45c
leaq 0x75ba9(%rip), %rsi     # 0xda5e5
movq %rsp, %rdi
callq 0x88c0
movl 0xa6b0a(%rip), %esi     # 0x10b554
leaq 0x20(%rsp), %rdi
callq 0x31297
movq (%rsp), %rcx
movq 0x8(%rsp), %r8
movq 0x28(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %rbx, %rcx
je 0x64a75
movq 0x10(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x64a94
leaq 0x30(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x64a8f
movq 0x30(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x64aa3
movq 0x20(%rsp), %rsi
movq %rsp, %rdi
callq 0x8180
jmp 0x64ab1
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x84d0
movq %rbp, 0x40(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x64ad1
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
jmp 0x64ad8
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x48(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x30(%rsp), %r13
movq -0x10(%r13), %rdi
cmpq %r13, %rdi
je 0x64b10
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x8480
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x64b2b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x8480
movl $0x200, %edi            # imm = 0x200
callq 0x8470
movq %rax, %rbx
movq 0x40(%rsp), %rsi
movq %rax, %rdi
movl $0x10, %edx
callq 0x84c0
leaq 0x75aab(%rip), %rsi     # 0xda5fc
movl $0x13, %edx
movq %rbx, %rdi
callq 0x84e0
movq 0xa0(%rsp), %rsi
movq 0xa8(%rsp), %rdx
movq %rbx, %rdi
callq 0x84e0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %r14, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
leaq 0x75a2b(%rip), %rsi     # 0xda5d2
movl $0x12, %edx
movq %rbx, %rdi
callq 0x84e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
leaq 0x2c0(%rsp), %rbp
movq 0x10(%rbp), %r14
cmpq %rbp, %r14
je 0x64c58
leaq 0x6d08b(%rip), %r15     # 0xd1c7e
movl 0x20(%r14), %esi
movq %rbx, %rdi
callq 0x8810
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x84e0
movl 0x24(%r14), %esi
movq %r12, %rdi
callq 0x8810
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %r12, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
movq %r14, %rdi
callq 0x84f0
movq %rax, %r14
cmpq %rbp, %rax
jne 0x64bf3
leaq 0x20(%rsp), %rdi
movq %r13, (%rdi)
movq 0xe8(%rsp), %rsi
movq 0xf0(%rsp), %rdx
addq %rsi, %rdx
callq 0x2e45c
leaq 0x75991(%rip), %rsi     # 0xda610
leaq 0x20(%rsp), %rdi
callq 0x88c0
movl 0xa68c5(%rip), %esi     # 0x10b554
leaq 0x60(%rsp), %rdi
callq 0x31297
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %r8
movq 0x68(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r13, %rcx
je 0x64cbb
movq 0x30(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x64cda
leaq 0x70(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x64cd5
movq 0x70(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x64ceb
movq 0x60(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x8180
jmp 0x64cf9
leaq 0x60(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x84d0
leaq 0x10(%rsp), %rsi
movq %rsi, (%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x64d1c
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x64d22
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x70(%rsp), %rbp
movq -0x10(%rbp), %rdi
cmpq %rbp, %rdi
je 0x64d5a
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x64d71
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x8480
movl $0x200, %edi            # imm = 0x200
callq 0x8470
movq %rax, %rbx
movq (%rsp), %rsi
movq %rax, %rdi
movl $0x10, %edx
callq 0x84c0
leaq 0x758a1(%rip), %rsi     # 0xda637
movl $0x29, %edx
movq %rbx, %rdi
callq 0x84e0
movq 0xa0(%rsp), %rsi
movq 0xa8(%rsp), %rdx
movq %rbx, %rdi
callq 0x84e0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %r14, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
leaq 0x75875(%rip), %rsi     # 0xda661
movl $0x15, %edx
movq %rbx, %rdi
callq 0x84e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
movq 0xc8(%rsp), %rax
cmpq 0xc0(%rsp), %rax
je 0x64eb8
xorl %r14d, %r14d
leaq 0x6ce3e(%rip), %r15     # 0xd1c7e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x82f0
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x84e0
movq 0xc0(%rsp), %rax
movl (%rax,%r14,4), %esi
movq %r12, %rdi
callq 0x8810
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %r12, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
incq %r14
movq 0xc8(%rsp), %rax
subq 0xc0(%rsp), %rax
sarq $0x2, %rax
cmpq %rax, %r14
jne 0x64e40
leaq 0x60(%rsp), %rdi
movq %rbp, (%rdi)
movq 0xe8(%rsp), %rsi
movq 0xf0(%rsp), %rdx
addq %rsi, %rdx
callq 0x2e45c
leaq 0x75798(%rip), %rsi     # 0xda677
leaq 0x60(%rsp), %rdi
callq 0x88c0
movl 0xa6665(%rip), %esi     # 0x10b554
leaq 0x170(%rsp), %rdi
callq 0x31297
movq 0x60(%rsp), %rcx
movq 0x68(%rsp), %r8
movq 0x178(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %rbp, %rcx
je 0x64f21
movq 0x70(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x64f46
leaq 0x180(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x64f41
movq 0x180(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x64f5a
movq 0x170(%rsp), %rsi
leaq 0x60(%rsp), %rdi
callq 0x8180
jmp 0x64f6b
leaq 0x170(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x84d0
movq %r13, 0x20(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x64f8b
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x64f93
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x28(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x180(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x64fd1
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x60(%rsp), %rdi
cmpq %rbp, %rdi
je 0x64fe8
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x8480
movl $0x200, %edi            # imm = 0x200
leaq 0x50(%rsp), %r15
callq 0x8470
movq %rax, %rbx
movq 0x20(%rsp), %rsi
movq %rax, %rdi
movl $0x10, %edx
callq 0x84c0
leaq 0x75682(%rip), %rsi     # 0xda695
movl $0x46, %edx
movq %rbx, %rdi
callq 0x84e0
movq 0xa0(%rsp), %rsi
movq 0xa8(%rsp), %rdx
movq %rbx, %rdi
callq 0x84e0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %r14, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
leaq 0x75673(%rip), %rsi     # 0xda6dc
movl $0xe, %edx
movq %rbx, %rdi
callq 0x84e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
leaq 0x190(%rsp), %rdi
movq %rbx, %rsi
callq 0x5ad2e
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x650c4
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x8480
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x650df
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x650f6
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x65117
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x2b8(%rsp), %rdi
callq 0x55666
leaq 0x1a8(%rsp), %rdi
callq 0x55666
movq 0x110(%rsp), %rdi
leaq 0x120(%rsp), %rax
cmpq %rax, %rdi
je 0x65156
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x190(%rsp), %rdi
callq 0x4b0a4
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0x65180
movq 0xd0(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0x130(%rsp), %rdi
testq %rdi, %rdi
je 0x6519d
movq 0x140(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0x150(%rsp), %rdi
testq %rdi, %rdi
je 0x651ba
movq 0x160(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
leaq 0xf8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x651db
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x65200
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x8480
xorl %eax, %eax
addq $0x3b8, %rsp            # imm = 0x3B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x653c8
jmp 0x653c8
jmp 0x653c8
movq %rax, %r14
jmp 0x653d8
jmp 0x653c8
movq %rax, %r14
movl $0x200, %esi            # imm = 0x200
movq %rbx, %rdi
callq 0x8480
jmp 0x653f6
movq %rax, %r14
leaq 0x180(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x65270
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x65270
jmp 0x6526d
movq %rax, %r14
movq 0x60(%rsp), %rdi
cmpq %rbp, %rdi
je 0x6541a
movq 0x70(%rsp), %rsi
jmp 0x65405
jmp 0x65417
movq %rax, %r14
movl $0x200, %esi            # imm = 0x200
movq %rbx, %rdi
jmp 0x65408
movq %rax, %r14
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x652c2
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x652c2
jmp 0x652bf
movq %rax, %r14
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x6543f
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x6543f
jmp 0x6543c
movq %rax, %r14
movl $0x200, %esi            # imm = 0x200
movq %rbx, %rdi
jmp 0x65435
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6531a
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x6531a
movq %rax, %r14
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
jne 0x6533d
jmp 0x65460
movq %rax, %r14
movq (%rsp), %rdi
cmpq %rbx, %rdi
je 0x65460
movq 0x10(%rsp), %rsi
jmp 0x65453
jmp 0x6545d
movq %rax, %r14
movl $0x200, %esi            # imm = 0x200
movq %r15, %rdi
jmp 0x65456
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x65381
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x65381
jmp 0x6537e
movq %rax, %r14
movq 0x40(%rsp), %rdi
cmpq %rbp, %rdi
je 0x65481
movq 0x50(%rsp), %rsi
jmp 0x65479
movq %rax, %r14
jmp 0x65481
movq %rax, %r14
jmp 0x6548e
jmp 0x6549d
movq %rax, %r14
movl $0x208, %esi            # imm = 0x208
movq %r15, %rdi
jmp 0x654c0
jmp 0x6540f
movq %rax, %r14
jmp 0x6554a
movq %rax, %r14
leaq 0x80(%rsp), %rdi
callq 0x3123c
movq %rbx, %rdi
callq 0x31188
jmp 0x654a0
jmp 0x6549d
jmp 0x65417
movq %rax, %r14
jmp 0x65444
jmp 0x6545d
movq %rax, %r14
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x6541a
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x6541a
movq %rax, %r14
jmp 0x654c5
movq %rax, %r14
leaq 0x50(%rsp), %rbp
leaq 0x10(%rsp), %rax
movq (%rsp), %rdi
cmpq %rax, %rdi
je 0x65444
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x65444
movq %rax, %r14
leaq 0x50(%rsp), %rbp
movq 0x40(%rsp), %rdi
cmpq %rbp, %rdi
je 0x65460
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x65460
movq %rax, %r14
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x65481
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x2b8(%rsp), %rdi
callq 0x55666
leaq 0x1a8(%rsp), %rdi
callq 0x55666
jmp 0x654a0
movq %rax, %r14
movq 0x110(%rsp), %rdi
leaq 0x120(%rsp), %rax
cmpq %rax, %rdi
je 0x654c5
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x190(%rsp), %rdi
callq 0x4b0a4
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0x654ef
movq 0xd0(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0x130(%rsp), %rdi
testq %rdi, %rdi
je 0x6550c
movq 0x140(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0x150(%rsp), %rdi
testq %rdi, %rdi
je 0x65529
movq 0x160(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
leaq 0xf8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6554a
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0xb0(%rsp), %rax
movq 0xa0(%rsp), %rdi
cmpq %rax, %rdi
je 0x6556f
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x8480
movq %r14, %rdi
callq 0x8840