// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/process_vcf_variant_sharing.cpp
// Function: variantSharingMain(int, char**)
int variantSharingMain(int argc, char** argv) {
    parseVariantSharingOptions(argc, argv);
    std::ios_base::openmode mode = std::ios_base::in;
    string fileName = opt::vcfFile;
    string fileRoot = stripExtension(fileName);
    
    // For variant sharing between Massoko and Malawi
    bool bCountWithBlue = !opt::withBlueIndivFile.empty();
    MassokoMalawiResult sharingResult;
    
    // Data structures to hold individual or population identifiers (headers in the output file(s))
    std::vector<std::string> populations;
    std::vector<std::string> pop_unique;
    std::map<std::string,int> fieldsPopMap;
    
    std::cerr << "Analysing sharing of fixed variants between Massoko and Lake Malawi" << std::endl;
    std::cerr << "The ind file should be: sample_individuals_All.txt" << std::endl;
    std::ifstream* indFile = new std::ifstream(opt::withBlueIndivFile.c_str(), mode);
    string ind; 
    while (getline(*indFile, ind)) {
        populations.push_back(ind);
    }
    if (populations.size() != 46) {
        std::cerr << "It seems you supplied wrong file; the correct file should have 46 individuals" << std::endl;
        exit(EXIT_FAILURE);
    }
    populations.erase(populations.begin(), populations.begin()+12); // Remove the Massoko fish from this list of individuals
    sharingResult.init(populations.size());
    
    // Start reading 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] != '#') { 
            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;
                numChromosomes = numSamples * 2;
                std::cerr << "Number of chromosomes: " << numChromosomes << std::endl;
                gotChromosomeNumber = true;
            }
            result.overallQuality = atoi(fields[5].c_str());
            result.counts = getThisVariantCounts(fields);
            if (bCountWithBlue) {
                massokoMalawiSharing(result, sharingResult);
            }   
        }
    }
    
    // Print out the results
    std::cerr << "Getting ready to print" << std::endl;
    std::ios_base::openmode mode_out = std::ios_base::out;
    string shareFileName = fileRoot + ".sharing.txt";
    std::ofstream* pShareOutFile = new std::ofstream(shareFileName.c_str(), mode_out);
    *pShareOutFile << "\t";
    for (int i = 0; i < populations.size(); i++) {
        if (i == (populations.size()-1))
            *pShareOutFile << populations[i] << std::endl;
        else 
            *pShareOutFile << populations[i] << "\t";
    }
    *pShareOutFile << "MassokoFixedBlue(hom/het/absent):\t";
    for (int i = 0; i < populations.size(); i++) {
        if (i == (populations.size()-1))
            *pShareOutFile << sharingResult.homsWithBlue[i] << "/" << sharingResult.hetsWithBlue[i] << "/" << sharingResult.absentWithBlue[i] << std::endl;
        else 
            *pShareOutFile << sharingResult.homsWithBlue[i] << "/" << sharingResult.hetsWithBlue[i] << "/" << sharingResult.absentWithBlue[i] << "\t";
    }
    *pShareOutFile << "MassokoFixedYellow(hom/het/absent):\t";
    for (int i = 0; i < populations.size(); i++) {
        if (i == (populations.size()-1))
            *pShareOutFile << sharingResult.homsWithYellow[i] << "/" << sharingResult.hetsWithYellow[i] << "/" << sharingResult.absentWithYellow[i] << std::endl;
        else 
            *pShareOutFile << sharingResult.homsWithYellow[i] << "/" << sharingResult.hetsWithYellow[i] << "/" << sharingResult.absentWithYellow[i] << "\t";
    }
        
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3a8, %rsp            # imm = 0x3A8
callq 0x639f0
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0xa96f5(%rip), %rsi     # 0x10c2d0
movq 0xa96f6(%rip), %rdx     # 0x10c2d8
addq %rsi, %rdx
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
callq 0x2e45c
leaq 0x1b0(%rsp), %rdi
movq %rbx, %rsi
callq 0x50803
movq 0xa972f(%rip), %rax     # 0x10c338
movq %rax, 0x98(%rsp)
leaq 0x1d0(%rsp), %rdi
xorl %ebx, %ebx
movl $0x90, %edx
xorl %esi, %esi
callq 0x8280
movq %rbx, 0x10(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq %rbx, 0x270(%rsp)
movaps %xmm0, 0x260(%rsp)
leaq 0x380(%rsp), %rax
movl $0x0, (%rax)
movq %rbx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rbx, 0x20(%rax)
movq 0xa8380(%rip), %rbx     # 0x10afe8
leaq 0x7751f(%rip), %rsi     # 0xda18e
movl $0x43, %edx
movq %rbx, %rdi
callq 0x84e0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq 0xa834e(%rip), %rdi     # 0x10afe8
callq 0x8040
movq %rax, %rdi
callq 0x8300
movq 0xa833a(%rip), %rbx     # 0x10afe8
leaq 0x7751d(%rip), %rsi     # 0xda1d2
movl $0x32, %edx
movq %rbx, %rdi
callq 0x84e0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq 0xa8308(%rip), %rdi     # 0x10afe8
callq 0x8040
movq %rax, %rdi
callq 0x8300
movl $0x208, %edi            # imm = 0x208
callq 0x8470
movq %rax, %rbx
movq 0xa962f(%rip), %rsi     # 0x10c330
movq %rax, %rdi
movl $0x8, %edx
callq 0x8860
leaq 0x50(%rsp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
leaq 0x40(%rsp), %r14
movq %rsp, %r15
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8870
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x62d69
movq %r15, %rdi
movq %r14, %rsi
callq 0x33db0
jmp 0x62d2c
movq (%rsp), %rsi
movq 0x8(%rsp), %rax
subq %rsi, %rax
cmpq $0x5c0, %rax            # imm = 0x5C0
jne 0x6385f
leaq 0x180(%rsi), %rdx
movq %rsp, %rdi
callq 0x63dba
movq 0x8(%rsp), %rsi
subq (%rsp), %rsi
sarq $0x5, %rsi
leaq 0x1d0(%rsp), %rdi
callq 0x63c94
movl $0x208, %edi            # imm = 0x208
callq 0x8470
movq %rax, %r14
movq 0x20(%rsp), %rsi
movq %rax, %rdi
movl $0x8, %edx
callq 0x8860
leaq 0x88(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0xa8(%rsp), %rbx
leaq 0x288(%rsp), %r12
xorl %r13d, %r13d
leaq 0x78(%rsp), %r15
xorl %ebp, %ebp
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x8870
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x632dd
movq 0x78(%rsp), %rax
cmpb $0x23, (%rax)
je 0x62dfa
movaps 0x753d1(%rip), %xmm0    # 0xd8210
movups %xmm0, 0xa0(%rsp)
movl %r13d, 0xb0(%rsp)
leaq 0xc8(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq %r13, 0xc0(%rsp)
movb %r13b, 0xc8(%rsp)
leaq 0xe8(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq %r13, 0xe0(%rsp)
movb %r13b, 0xe8(%rsp)
movabsq $0x7fefffffffffffff, %rax # imm = 0x7FEFFFFFFFFFFFFF
movq %rax, 0xf8(%rsp)
movq %r13, 0x100(%rsp)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x108(%rsp)
movb %r13b, 0x110(%rsp)
movq %r13, 0x188(%rsp)
movl %r13d, 0x190(%rsp)
movq %r13, 0x198(%rsp)
movw $0x0, 0x1a0(%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, 0x1a8(%rsp)     # imm = 0x101
leaq 0x60(%rsp), %rdi
movq %r15, %rsi
movl $0x9, %edx
callq 0x50624
testb $0x1, %bpl
jne 0x62fa2
movq 0x60(%rsp), %rbx
movq 0x68(%rsp), %rbp
movl $0x17, %edx
movq 0xa809a(%rip), %rdi     # 0x10afe8
leaq 0x7544e(%rip), %rsi     # 0xd83a3
callq 0x84e0
subq %rbx, %rbp
shrq $0x4, %rbp
andl $-0x2, %ebp
addl $-0x12, %ebp
movq 0xa807a(%rip), %rdi     # 0x10afe8
movl %ebp, %esi
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, %bpl
movq %rax, %rdi
callq 0x8300
movq 0x60(%rsp), %rax
movq 0xa0(%rax), %rdi
callq 0x86e0
movl %eax, 0xa0(%rsp)
leaq 0x278(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x51473
movl 0x280(%rsp), %eax
leaq 0xa8(%rsp), %rbx
movl %eax, 0x8(%rbx)
movq 0x278(%rsp), %rax
movq %rax, (%rbx)
leaq 0xb8(%rsp), %rdi
movq %r12, %rsi
callq 0x8540
leaq 0xd8(%rsp), %rdi
leaq 0x2a8(%rsp), %rsi
callq 0x8540
movups 0x40(%r12), %xmm0
movups 0x49(%r12), %xmm1
movups %xmm0, 0x50(%rbx)
movups %xmm1, 0x59(%rbx)
movq 0x118(%rsp), %rdi
movq 0x120(%rsp), %rax
movq 0x128(%rsp), %rsi
movq 0x2e8(%rsp), %rcx
movq %rcx, 0x118(%rsp)
movups 0x2f0(%rsp), %xmm0
movups %xmm0, 0x120(%rsp)
movq %rdi, 0x2e8(%rsp)
movq %rax, 0x2f0(%rsp)
movq %rsi, 0x2f8(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%r12)
movq $0x0, 0x70(%r12)
testq %rdi, %rdi
je 0x63091
subq %rdi, %rsi
callq 0x8480
movq 0x130(%rsp), %rdi
movq 0x138(%rsp), %rax
movq 0x140(%rsp), %rsi
movq 0x300(%rsp), %rcx
movq %rcx, 0x130(%rsp)
movups 0x308(%rsp), %xmm0
movups %xmm0, 0x138(%rsp)
movq %rdi, 0x300(%rsp)
movq %rax, 0x308(%rsp)
movq %rsi, 0x310(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x78(%r12)
movq $0x0, 0x88(%r12)
testq %rdi, %rdi
je 0x63103
subq %rdi, %rsi
callq 0x8480
movq 0x148(%rsp), %rdi
movq 0x150(%rsp), %rax
movq 0x158(%rsp), %rsi
movq 0x318(%rsp), %rcx
movq %rcx, 0x148(%rsp)
movups 0x320(%rsp), %xmm0
movups %xmm0, 0x150(%rsp)
movq %rdi, 0x318(%rsp)
movq %rax, 0x320(%rsp)
movq %rsi, 0x328(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x90(%r12)
movq $0x0, 0xa0(%r12)
testq %rdi, %rdi
je 0x63178
subq %rdi, %rsi
callq 0x8480
movq 0x160(%rsp), %rdi
movq 0x168(%rsp), %rax
movq 0x170(%rsp), %rsi
movq 0x330(%rsp), %rcx
movq %rcx, 0x160(%rsp)
movups 0x338(%rsp), %xmm0
movups %xmm0, 0x168(%rsp)
movq %rdi, 0x330(%rsp)
movq %rax, 0x338(%rsp)
movq %rsi, 0x340(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0xa8(%r12)
movq $0x0, 0xb8(%r12)
testq %rdi, %rdi
je 0x631ed
subq %rdi, %rsi
callq 0x8480
movq 0x178(%rsp), %rdi
testq %rdi, %rdi
je 0x63232
movq 0x198(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq %r13, 0x178(%rsp)
movl %r13d, 0x180(%rsp)
movq %r13, 0x188(%rsp)
movl %r13d, 0x190(%rsp)
movq %r13, 0x198(%rsp)
movq 0xe0(%r12), %rax
movq %rax, 0xf0(%rbx)
movups 0xc0(%r12), %xmm0
movups 0xd0(%r12), %xmm1
movups %xmm1, 0xe0(%rbx)
movups %xmm0, 0xd0(%rbx)
movq %r13, 0x348(%rsp)
movl %r13d, 0x350(%rsp)
movq %r13, 0x358(%rsp)
movl %r13d, 0x360(%rsp)
movq %r13, 0x368(%rsp)
movzwl 0x370(%rsp), %eax
movw %ax, 0x1a0(%rsp)
leaq 0x278(%rsp), %rdi
callq 0x31188
cmpq $0x0, 0x98(%rsp)
je 0x632c6
leaq 0xa0(%rsp), %rdi
leaq 0x1d0(%rsp), %rsi
callq 0x52e4a
leaq 0x60(%rsp), %rdi
callq 0x3123c
movq %rbx, %rdi
callq 0x31188
jmp 0x62dfa
movq 0xa7d04(%rip), %rbx     # 0x10afe8
leaq 0x76f68(%rip), %rsi     # 0xda253
movl $0x16, %edx
movq %rbx, %rdi
callq 0x84e0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq 0xa7cd2(%rip), %rdi     # 0x10afe8
callq 0x8040
movq %rax, %rdi
callq 0x8300
leaq 0xb0(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x1b0(%rsp), %rsi
movq 0x1b8(%rsp), %rdx
addq %rsi, %rdx
leaq 0xa0(%rsp), %rdi
callq 0x2e45c
leaq 0x76f14(%rip), %rsi     # 0xda26a
leaq 0xa0(%rsp), %rdi
callq 0x88c0
movl $0x200, %edi            # imm = 0x200
callq 0x8470
movq %rax, %rbx
movq 0xa0(%rsp), %rsi
movq %rax, %rdi
movl $0x10, %edx
callq 0x84c0
leaq 0x6e8f2(%rip), %rsi     # 0xd1c7e
movl $0x1, %edx
movq %rbx, %rdi
callq 0x84e0
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
subq %rax, %rcx
je 0x63437
sarq $0x5, %rcx
movl $0x8, %r12d
xorl %ebp, %ebp
leaq 0x6e8c0(%rip), %r14     # 0xd1c7e
decq %rcx
movq -0x8(%rax,%r12), %rsi
movq (%rax,%r12), %rdx
cmpq %rcx, %rbp
jne 0x63403
movq %rbx, %rdi
callq 0x84e0
movq %rax, %r15
movq (%rax), %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
jmp 0x6341b
movq %rbx, %rdi
callq 0x84e0
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x84e0
incq %rbp
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
addq $0x20, %r12
cmpq %rbp, %rcx
ja 0x633be
leaq 0x76e39(%rip), %rsi     # 0xda277
movl $0x22, %edx
movq %rbx, %rdi
callq 0x84e0
movq 0x8(%rsp), %rax
subq (%rsp), %rax
je 0x6358d
sarq $0x5, %rax
xorl %ebp, %ebp
leaq 0x76e33(%rip), %r14     # 0xda29a
leaq 0x6e810(%rip), %r15     # 0xd1c7e
decq %rax
cmpq %rax, %rbp
jne 0x63505
movq 0x200(%rsp), %rax
movl (%rax,%rbp,4), %esi
movq %rbx, %rdi
callq 0x8810
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x84e0
movq 0x1e8(%rsp), %rax
movl (%rax,%rbp,4), %esi
movq %r12, %rdi
callq 0x8810
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x84e0
movq 0x1d0(%rsp), %rax
movl (%rax,%rbp,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
jmp 0x63574
movq 0x200(%rsp), %rax
movl (%rax,%rbp,4), %esi
movq %rbx, %rdi
callq 0x8810
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x84e0
movq 0x1e8(%rsp), %rax
movl (%rax,%rbp,4), %esi
movq %r12, %rdi
callq 0x8810
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x84e0
movq 0x1d0(%rsp), %rax
movl (%rax,%rbp,4), %esi
movq %r12, %rdi
callq 0x8810
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x84e0
incq %rbp
movq 0x8(%rsp), %rax
subq (%rsp), %rax
sarq $0x5, %rax
cmpq %rbp, %rax
ja 0x6346e
leaq 0x76d08(%rip), %rsi     # 0xda29c
movl $0x24, %edx
movq %rbx, %rdi
callq 0x84e0
movq 0x8(%rsp), %rax
subq (%rsp), %rax
je 0x636e3
sarq $0x5, %rax
xorl %ebp, %ebp
leaq 0x76cdd(%rip), %r14     # 0xda29a
leaq 0x6e6ba(%rip), %r15     # 0xd1c7e
decq %rax
cmpq %rax, %rbp
jne 0x6365b
movq 0x248(%rsp), %rax
movl (%rax,%rbp,4), %esi
movq %rbx, %rdi
callq 0x8810
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x84e0
movq 0x230(%rsp), %rax
movl (%rax,%rbp,4), %esi
movq %r12, %rdi
callq 0x8810
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x84e0
movq 0x218(%rsp), %rax
movl (%rax,%rbp,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
jmp 0x636ca
movq 0x248(%rsp), %rax
movl (%rax,%rbp,4), %esi
movq %rbx, %rdi
callq 0x8810
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x84e0
movq 0x230(%rsp), %rax
movl (%rax,%rbp,4), %esi
movq %r12, %rdi
callq 0x8810
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x84e0
movq 0x218(%rsp), %rax
movl (%rax,%rbp,4), %esi
movq %r12, %rdi
callq 0x8810
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x84e0
incq %rbp
movq 0x8(%rsp), %rax
subq (%rsp), %rax
sarq $0x5, %rax
cmpq %rbp, %rax
ja 0x635c4
movq 0xa0(%rsp), %rdi
cmpq %r13, %rdi
je 0x63700
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
leaq 0x30(%rsp), %rbx
leaq 0x50(%rsp), %r14
je 0x6372c
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x63743
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x378(%rsp), %rdi
callq 0x3f5a6
leaq 0x260(%rsp), %rdi
callq 0x3123c
movq %rsp, %rdi
callq 0x3123c
movq 0x248(%rsp), %rdi
testq %rdi, %rdi
je 0x63782
movq 0x258(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0x230(%rsp), %rdi
testq %rdi, %rdi
je 0x6379f
movq 0x240(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0x218(%rsp), %rdi
testq %rdi, %rdi
je 0x637bc
movq 0x228(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0x200(%rsp), %rdi
testq %rdi, %rdi
je 0x637d9
movq 0x210(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0x1e8(%rsp), %rdi
testq %rdi, %rdi
je 0x637f6
movq 0x1f8(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
movq 0x1d0(%rsp), %rdi
testq %rdi, %rdi
je 0x63813
movq 0x1e0(%rsp), %rsi
subq %rdi, %rsi
callq 0x8480
leaq 0x1c0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x63834
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x20(%rsp), %rdi
cmpq %rbx, %rdi
je 0x6384b
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x8480
xorl %eax, %eax
addq $0x3a8, %rsp            # imm = 0x3A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xa7782(%rip), %rdi     # 0x10afe8
leaq 0x76998(%rip), %rsi     # 0xda205
movl $0x4d, %edx
callq 0x84e0
movq 0xa776a(%rip), %rdi     # 0x10afe8
callq 0x8200
movl $0x1, %edi
callq 0x8530
jmp 0x638eb
jmp 0x638eb
movq %rax, %r15
jmp 0x638f8
movq %rax, %r15
movl $0x200, %esi            # imm = 0x200
movq %rbx, %rdi
callq 0x8480
jmp 0x63921
jmp 0x6391e
jmp 0x63912
movq %rax, %r15
movl $0x208, %esi            # imm = 0x208
movq %r14, %rdi
callq 0x8480
leaq 0x30(%rsp), %r12
leaq 0x50(%rsp), %r13
jmp 0x6396a
jmp 0x63917
jmp 0x63917
movq %rax, %r15
movl $0x208, %esi            # imm = 0x208
movq %rbx, %rdi
jmp 0x6397c
jmp 0x6390b
movq %rax, %r15
jmp 0x639d1
jmp 0x63917
movq %rax, %r15
leaq 0x60(%rsp), %rdi
callq 0x3123c
leaq 0xa8(%rsp), %rdi
callq 0x31188
jmp 0x6393e
jmp 0x6391e
jmp 0x63912
movq %rax, %r15
jmp 0x63981
jmp 0x6391e
movq %rax, %r15
jmp 0x6393e
movq %rax, %r15
jmp 0x6396a
jmp 0x6391e
movq %rax, %r15
movq 0xa0(%rsp), %rdi
cmpq %r13, %rdi
je 0x6393e
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x30(%rsp), %r12
leaq 0x50(%rsp), %r13
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x6396a
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x40(%rsp), %rdi
cmpq %r13, %rdi
je 0x63981
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x378(%rsp), %rdi
callq 0x3f5a6
leaq 0x260(%rsp), %rdi
callq 0x3123c
movq %rsp, %rdi
callq 0x3123c
leaq 0x1d0(%rsp), %rdi
callq 0x63d32
leaq 0x1c0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x639d1
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x639e8
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x8480
movq %r15, %rdi
callq 0x8840