// File: 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
movq %rsp, %rbp
subq $0x600, %rsp            # imm = 0x600
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0xa1f50
movl $0x8, -0x14(%rbp)
leaq 0xf954c(%rip), %rsi     # 0x19a7b8
leaq -0x38(%rbp), %rdi
movq %rdi, -0x460(%rbp)
callq 0xa250
movq -0x460(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x7be70
jmp 0xa128e
leaq 0xf9583(%rip), %rdi     # 0x19a818
callq 0xaa70
xorb $0x1, %al
movb %al, -0x65(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0xa2250
leaq -0x110(%rbp), %rdi
callq 0x48da0
leaq -0x128(%rbp), %rdi
callq 0x48da0
leaq -0x158(%rbp), %rdi
callq 0x58900
movq 0xf7d1a(%rip), %rdi     # 0x198ff0
leaq 0x9d55d(%rip), %rsi     # 0x13e83a
callq 0xa5c0
movq %rax, -0x468(%rbp)
jmp 0xa12eb
movq -0x468(%rbp), %rdi
movq 0xf7c8f(%rip), %rsi     # 0x198f88
callq 0xa610
jmp 0xa1300
movq 0xf7ce9(%rip), %rdi     # 0x198ff0
leaq 0x9d570(%rip), %rsi     # 0x13e87e
callq 0xa5c0
movq %rax, -0x470(%rbp)
jmp 0xa131c
movq -0x470(%rbp), %rdi
movq 0xf7c5e(%rip), %rsi     # 0x198f88
callq 0xa610
jmp 0xa1331
movl $0x208, %edi            # imm = 0x208
callq 0xa5d0
movq %rax, -0x478(%rbp)
jmp 0xa1344
leaq 0xf94cd(%rip), %rdi     # 0x19a818
callq 0xa220
movq -0x478(%rbp), %rdi
movq %rax, %rsi
movl -0x14(%rbp), %edx
callq 0xab90
jmp 0xa1364
movq -0x478(%rbp), %rax
movq %rax, -0x160(%rbp)
leaq -0x180(%rbp), %rdi
callq 0xa820
movq -0x160(%rbp), %rdi
leaq -0x180(%rbp), %rsi
callq 0xa0d0
movq %rax, -0x480(%rbp)
jmp 0xa139a
movq -0x480(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0xa740
movb %al, -0x481(%rbp)
jmp 0xa13b8
movb -0x481(%rbp), %al
testb $0x1, %al
jne 0xa13c4
jmp 0xa1430
leaq -0x110(%rbp), %rdi
leaq -0x180(%rbp), %rsi
callq 0x48dc0
jmp 0xa13d9
jmp 0xa137e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xa1f38
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xa1eff
movq -0x478(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
movl $0x208, %esi            # imm = 0x208
callq 0xa5e0
jmp 0xa1eff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xa1ef3
leaq -0x110(%rbp), %rdi
callq 0x3ffd0
cmpq $0x2e, %rax
je 0xa147d
movq 0xf7ba7(%rip), %rdi     # 0x198ff0
leaq 0x9d461(%rip), %rsi     # 0x13e8b1
callq 0xa5c0
movq %rax, -0x490(%rbp)
jmp 0xa145e
movq -0x490(%rbp), %rdi
movq 0xf7b1c(%rip), %rsi     # 0x198f88
callq 0xa610
jmp 0xa1473
movl $0x1, %edi
callq 0xa700
leaq -0x110(%rbp), %rdi
movq %rdi, -0x4a0(%rbp)
callq 0x44030
movq %rax, -0x190(%rbp)
leaq -0x188(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x6b2e0
movq -0x4a0(%rbp), %rdi
callq 0x44030
movq %rax, -0x1a8(%rbp)
leaq -0x1a8(%rbp), %rdi
movl $0xc, %esi
callq 0x44390
movq %rax, -0x1a0(%rbp)
leaq -0x198(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
callq 0x6b2e0
movq -0x4a0(%rbp), %rdi
movq -0x188(%rbp), %rsi
movq -0x198(%rbp), %rdx
callq 0xa22b0
movq %rax, -0x498(%rbp)
jmp 0xa150b
movq -0x498(%rbp), %rax
movq %rax, -0x1b0(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x3ffd0
movq %rax, %rsi
leaq -0xf8(%rbp), %rdi
callq 0xa2340
jmp 0xa1536
movl $0x208, %edi            # imm = 0x208
callq 0xa5d0
movq %rax, -0x4a8(%rbp)
jmp 0xa1549
leaq -0x38(%rbp), %rdi
callq 0xa220
movq -0x4a8(%rbp), %rdi
movq %rax, %rsi
movl -0x14(%rbp), %edx
callq 0xab90
jmp 0xa1566
movq -0x4a8(%rbp), %rax
movq %rax, -0x1b8(%rbp)
movb $0x0, -0x1b9(%rbp)
leaq -0x1e0(%rbp), %rdi
callq 0xa820
movl $0x0, -0x1e4(%rbp)
movq -0x1b8(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
callq 0xa0d0
movq %rax, -0x4b0(%rbp)
jmp 0xa15ad
movq -0x4b0(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0xa740
movb %al, -0x4b1(%rbp)
jmp 0xa15cb
movb -0x4b1(%rbp), %al
testb $0x1, %al
jne 0xa15da
jmp 0xa17d7
xorl %eax, %eax
movl %eax, %esi
leaq -0x1e0(%rbp), %rdi
callq 0xac60
movq %rax, -0x4c0(%rbp)
jmp 0xa15f3
movq -0x4c0(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x23, %eax
je 0xa17d2
movl -0x1e4(%rbp), %eax
incl %eax
movl %eax, -0x1e4(%rbp)
leaq -0x2f8(%rbp), %rdi
callq 0x956b0
jmp 0xa1622
leaq -0x310(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
movl $0x9, %edx
callq 0x7bbe0
jmp 0xa163c
testb $0x1, -0x1b9(%rbp)
jne 0xa1724
leaq -0x310(%rbp), %rdi
callq 0x3ffd0
addq $-0x9, %rax
movq %rax, -0x318(%rbp)
movl -0x318(%rbp), %eax
addl %eax, %eax
movl %eax, -0x1c0(%rbp)
movq 0xf797b(%rip), %rdi     # 0x198ff0
leaq 0x9b247(%rip), %rsi     # 0x13c8c3
callq 0xa5c0
movq %rax, -0x4c8(%rbp)
jmp 0xa168a
movq -0x4c8(%rbp), %rdi
movl -0x1c0(%rbp), %esi
callq 0xab20
movq %rax, -0x4d0(%rbp)
jmp 0xa16a5
movq -0x4d0(%rbp), %rdi
movq 0xf78d5(%rip), %rsi     # 0x198f88
callq 0xa610
jmp 0xa16ba
movb $0x1, -0x1b9(%rbp)
jmp 0xa1724
movq -0x4a8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
movl $0x208, %esi            # imm = 0x208
callq 0xa5e0
jmp 0xa1ef3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xa1ee7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xa17c1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x310(%rbp), %rdi
callq 0x3dfa0
jmp 0xa17c1
leaq -0x310(%rbp), %rdi
movq %rdi, -0x4d8(%rbp)
movl $0x5, %esi
callq 0x3d940
movq %rax, %rdi
callq 0xa220
movq %rax, %rdi
callq 0xa970
movq -0x4d8(%rbp), %rsi
movl %eax, -0x2f8(%rbp)
leaq -0x418(%rbp), %rdi
callq 0x7d310
jmp 0xa1767
leaq -0x2f8(%rbp), %rdi
addq $0x8, %rdi
leaq -0x418(%rbp), %rsi
callq 0xa1130
leaq -0x418(%rbp), %rdi
callq 0x3df20
testb $0x1, -0x65(%rbp)
je 0xa17a7
leaq -0x2f8(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0x806e0
jmp 0xa17a5
jmp 0xa17a7
leaq -0x310(%rbp), %rdi
callq 0x3dfa0
leaq -0x2f8(%rbp), %rdi
callq 0x95ad0
jmp 0xa17d2
leaq -0x2f8(%rbp), %rdi
callq 0x95ad0
jmp 0xa1ee7
jmp 0xa1591
movq 0xf7812(%rip), %rdi     # 0x198ff0
leaq 0x9d11a(%rip), %rsi     # 0x13e8ff
callq 0xa5c0
movq %rax, -0x4e0(%rbp)
jmp 0xa17f3
movq -0x4e0(%rbp), %rdi
movq 0xf7787(%rip), %rsi     # 0x198f88
callq 0xa610
jmp 0xa1808
movl $0x10, -0x41c(%rbp)
leaq 0x9d0fd(%rip), %rdx     # 0x13e916
leaq -0x440(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x3da80
jmp 0xa182b
movl $0x200, %edi            # imm = 0x200
callq 0xa5d0
movq %rax, -0x4e8(%rbp)
jmp 0xa183e
leaq -0x440(%rbp), %rdi
callq 0xa220
movq -0x4e8(%rbp), %rdi
movq %rax, %rsi
movl -0x41c(%rbp), %edx
callq 0xa650
jmp 0xa1861
movq -0x4e8(%rbp), %rax
movq %rax, -0x448(%rbp)
movq -0x448(%rbp), %rdi
leaq 0x94661(%rip), %rsi     # 0x135ede
callq 0xa5c0
jmp 0xa1884
movl $0x0, -0x44c(%rbp)
movslq -0x44c(%rbp), %rax
movq %rax, -0x4f0(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x3ffd0
movq %rax, %rcx
movq -0x4f0(%rbp), %rax
cmpq %rcx, %rax
jae 0xa19d8
movslq -0x44c(%rbp), %rax
movq %rax, -0x4f8(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x3ffd0
movq %rax, %rcx
movq -0x4f8(%rbp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
jne 0xa1972
movq -0x448(%rbp), %rax
movq %rax, -0x508(%rbp)
movslq -0x44c(%rbp), %rsi
leaq -0x110(%rbp), %rdi
callq 0x3d940
movq -0x508(%rbp), %rdi
movq %rax, %rsi
callq 0xa520
movq %rax, -0x500(%rbp)
jmp 0xa1925
movq -0x500(%rbp), %rdi
movq 0xf7655(%rip), %rsi     # 0x198f88
callq 0xa610
jmp 0xa193a
jmp 0xa19c2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xa1edb
movq -0x4e8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
movl $0x200, %esi            # imm = 0x200
callq 0xa5e0
jmp 0xa1edb
movq -0x448(%rbp), %rax
movq %rax, -0x518(%rbp)
movslq -0x44c(%rbp), %rsi
leaq -0x110(%rbp), %rdi
callq 0x3d940
movq -0x518(%rbp), %rdi
movq %rax, %rsi
callq 0xa520
movq %rax, -0x510(%rbp)
jmp 0xa19ab
movq -0x510(%rbp), %rdi
leaq 0x94525(%rip), %rsi     # 0x135ede
callq 0xa5c0
jmp 0xa19c0
jmp 0xa19c2
jmp 0xa19c4
movl -0x44c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44c(%rbp)
jmp 0xa188e
movq -0x448(%rbp), %rdi
leaq 0x9cf3d(%rip), %rsi     # 0x13e923
callq 0xa5c0
jmp 0xa19ed
movl $0x0, -0x450(%rbp)
movslq -0x450(%rbp), %rax
movq %rax, -0x520(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x3ffd0
movq %rax, %rcx
movq -0x520(%rbp), %rax
cmpq %rcx, %rax
jae 0xa1c24
movslq -0x450(%rbp), %rax
movq %rax, -0x528(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x3ffd0
movq %rax, %rcx
movq -0x528(%rbp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
jne 0xa1b33
movq -0x448(%rbp), %rax
movq %rax, -0x538(%rbp)
leaq -0xc8(%rbp), %rdi
movslq -0x450(%rbp), %rsi
callq 0x4d100
movq -0x538(%rbp), %rdi
movl (%rax), %esi
callq 0xab20
movq %rax, -0x530(%rbp)
jmp 0xa1a8d
movq -0x530(%rbp), %rdi
leaq 0x9ceab(%rip), %rsi     # 0x13e946
callq 0xa5c0
movq %rax, -0x540(%rbp)
jmp 0xa1aa9
leaq -0xe0(%rbp), %rdi
movslq -0x450(%rbp), %rsi
callq 0x4d100
movq -0x540(%rbp), %rdi
movl (%rax), %esi
callq 0xab20
movq %rax, -0x548(%rbp)
jmp 0xa1ad3
movq -0x548(%rbp), %rdi
leaq 0x9ce65(%rip), %rsi     # 0x13e946
callq 0xa5c0
movq %rax, -0x550(%rbp)
jmp 0xa1aef
movslq -0x450(%rbp), %rsi
leaq -0xf8(%rbp), %rdi
callq 0x4d100
movq -0x550(%rbp), %rdi
movl (%rax), %esi
callq 0xab20
movq %rax, -0x558(%rbp)
jmp 0xa1b19
movq -0x558(%rbp), %rdi
movq 0xf7461(%rip), %rsi     # 0x198f88
callq 0xa610
jmp 0xa1b2e
jmp 0xa1c0e
movq -0x448(%rbp), %rax
movq %rax, -0x568(%rbp)
leaq -0xc8(%rbp), %rdi
movslq -0x450(%rbp), %rsi
callq 0x4d100
movq -0x568(%rbp), %rdi
movl (%rax), %esi
callq 0xab20
movq %rax, -0x560(%rbp)
jmp 0xa1b6b
movq -0x560(%rbp), %rdi
leaq 0x9cdcd(%rip), %rsi     # 0x13e946
callq 0xa5c0
movq %rax, -0x570(%rbp)
jmp 0xa1b87
leaq -0xe0(%rbp), %rdi
movslq -0x450(%rbp), %rsi
callq 0x4d100
movq -0x570(%rbp), %rdi
movl (%rax), %esi
callq 0xab20
movq %rax, -0x578(%rbp)
jmp 0xa1bb1
movq -0x578(%rbp), %rdi
leaq 0x9cd87(%rip), %rsi     # 0x13e946
callq 0xa5c0
movq %rax, -0x580(%rbp)
jmp 0xa1bcd
movslq -0x450(%rbp), %rsi
leaq -0xf8(%rbp), %rdi
callq 0x4d100
movq -0x580(%rbp), %rdi
movl (%rax), %esi
callq 0xab20
movq %rax, -0x588(%rbp)
jmp 0xa1bf7
movq -0x588(%rbp), %rdi
leaq 0x942d9(%rip), %rsi     # 0x135ede
callq 0xa5c0
jmp 0xa1c0c
jmp 0xa1c0e
jmp 0xa1c10
movl -0x450(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x450(%rbp)
jmp 0xa19f7
movq -0x448(%rbp), %rdi
leaq 0x9cd16(%rip), %rsi     # 0x13e948
callq 0xa5c0
jmp 0xa1c39
movl $0x0, -0x454(%rbp)
movslq -0x454(%rbp), %rax
movq %rax, -0x590(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x3ffd0
movq %rax, %rcx
movq -0x590(%rbp), %rax
cmpq %rcx, %rax
jae 0xa1e6a
movslq -0x454(%rbp), %rax
movq %rax, -0x598(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x3ffd0
movq %rax, %rcx
movq -0x598(%rbp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
jne 0xa1d7c
movq -0x448(%rbp), %rax
movq %rax, -0x5a8(%rbp)
leaq -0x80(%rbp), %rdi
movslq -0x454(%rbp), %rsi
callq 0x4d100
movq -0x5a8(%rbp), %rdi
movl (%rax), %esi
callq 0xab20
movq %rax, -0x5a0(%rbp)
jmp 0xa1cd6
movq -0x5a0(%rbp), %rdi
leaq 0x9cc62(%rip), %rsi     # 0x13e946
callq 0xa5c0
movq %rax, -0x5b0(%rbp)
jmp 0xa1cf2
leaq -0x98(%rbp), %rdi
movslq -0x454(%rbp), %rsi
callq 0x4d100
movq -0x5b0(%rbp), %rdi
movl (%rax), %esi
callq 0xab20
movq %rax, -0x5b8(%rbp)
jmp 0xa1d1c
movq -0x5b8(%rbp), %rdi
leaq 0x9cc1c(%rip), %rsi     # 0x13e946
callq 0xa5c0
movq %rax, -0x5c0(%rbp)
jmp 0xa1d38
leaq -0xb0(%rbp), %rdi
movslq -0x454(%rbp), %rsi
callq 0x4d100
movq -0x5c0(%rbp), %rdi
movl (%rax), %esi
callq 0xab20
movq %rax, -0x5c8(%rbp)
jmp 0xa1d62
movq -0x5c8(%rbp), %rdi
movq 0xf7218(%rip), %rsi     # 0x198f88
callq 0xa610
jmp 0xa1d77
jmp 0xa1e54
movq -0x448(%rbp), %rax
movq %rax, -0x5d8(%rbp)
leaq -0x80(%rbp), %rdi
movslq -0x454(%rbp), %rsi
callq 0x4d100
movq -0x5d8(%rbp), %rdi
movl (%rax), %esi
callq 0xab20
movq %rax, -0x5d0(%rbp)
jmp 0xa1db1
movq -0x5d0(%rbp), %rdi
leaq 0x9cb87(%rip), %rsi     # 0x13e946
callq 0xa5c0
movq %rax, -0x5e0(%rbp)
jmp 0xa1dcd
leaq -0x98(%rbp), %rdi
movslq -0x454(%rbp), %rsi
callq 0x4d100
movq -0x5e0(%rbp), %rdi
movl (%rax), %esi
callq 0xab20
movq %rax, -0x5e8(%rbp)
jmp 0xa1df7
movq -0x5e8(%rbp), %rdi
leaq 0x9cb41(%rip), %rsi     # 0x13e946
callq 0xa5c0
movq %rax, -0x5f0(%rbp)
jmp 0xa1e13
leaq -0xb0(%rbp), %rdi
movslq -0x454(%rbp), %rsi
callq 0x4d100
movq -0x5f0(%rbp), %rdi
movl (%rax), %esi
callq 0xab20
movq %rax, -0x5f8(%rbp)
jmp 0xa1e3d
movq -0x5f8(%rbp), %rdi
leaq 0x94093(%rip), %rsi     # 0x135ede
callq 0xa5c0
jmp 0xa1e52
jmp 0xa1e54
jmp 0xa1e56
movl -0x454(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x454(%rbp)
jmp 0xa1c43
leaq -0x440(%rbp), %rdi
callq 0xac88
leaq -0x1e0(%rbp), %rdi
callq 0xac88
leaq -0x180(%rbp), %rdi
callq 0xac88
leaq -0x158(%rbp), %rdi
callq 0x58f20
leaq -0x128(%rbp), %rdi
callq 0x3dfa0
leaq -0x110(%rbp), %rdi
callq 0x3dfa0
leaq -0xf8(%rbp), %rdi
callq 0xa2400
leaq -0x58(%rbp), %rdi
callq 0xac88
leaq -0x38(%rbp), %rdi
callq 0xac88
xorl %eax, %eax
addq $0x600, %rsp            # imm = 0x600
popq %rbp
retq
leaq -0x440(%rbp), %rdi
callq 0xac88
leaq -0x1e0(%rbp), %rdi
callq 0xac88
leaq -0x180(%rbp), %rdi
callq 0xac88
leaq -0x158(%rbp), %rdi
callq 0x58f20
leaq -0x128(%rbp), %rdi
callq 0x3dfa0
leaq -0x110(%rbp), %rdi
callq 0x3dfa0
leaq -0xf8(%rbp), %rdi
callq 0xa2400
leaq -0x58(%rbp), %rdi
callq 0xac88
leaq -0x38(%rbp), %rdi
callq 0xac88
movq -0x60(%rbp), %rdi
callq 0xab50
nopw (%rax,%rax)