// File: millanek[P]evo/process_vcf_get_sequences.cpp
// Function: print_split_incl_outgroup(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<unsigned long, std::allocator<unsigned long>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, unsigned long, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, unsigned int, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<unsigned long, std::allocator<unsigned long>> const&, int)
void print_split_incl_outgroup(const std::string& currentScaffoldNum, const std::vector<string::size_type>& splits, const std::vector<std::string>& sampleNames, const size_t numSamples, std::vector<std::string>& scaffoldStrings, const unsigned int totalProcessedVariants, std::map<string, string>& outgroupSeqs, const std::string& outgroupName,const std::vector<string::size_type>& scaledSplits, const int fullScLength) {
    //for (std::vector<int>::size_type j = 0; j != splits.size(); j++) {
    
    std::cerr << "There are: " << splits.size() << " splits of size " << opt::splitNum << std::endl;
    
    std::ofstream* scaffoldFile;
    if (splits.size() == 0) {
        // Only print the whole scaffold if it contains a rasonble number of variants
        if (totalProcessedVariants % opt::splitNum > (opt::splitNum * 0.8)) {
            scaffoldFile = new std::ofstream(currentScaffoldNum.c_str());
            if (opt::bLDhat)
                *scaffoldFile << numSamples << "\t" << scaffoldStrings[0].length() << "\t" << "2" << std::endl;
            for (std::vector<std::string>::size_type i = 0; i != numSamples; i++) {
                *scaffoldFile << ">" << sampleNames[i] << std::endl;
                print80bpPerLineFile(scaffoldFile, scaffoldStrings[i]);
                scaffoldStrings[i] = "";
            }
            *scaffoldFile << ">" << outgroupName << std::endl;
            print80bpPerLineFile(scaffoldFile, outgroupSeqs[currentScaffoldNum]);
            scaffoldFile->close();
        } else {
            for (std::vector<std::string>::size_type i = 0; i != numSamples; i++) {
                scaffoldStrings[i] = "";
            }
            
        }
    } else {
        string firstSplitFileName = currentScaffoldNum + "_1_" + numToString(splits[0]);
        scaffoldFile = new std::ofstream(firstSplitFileName.c_str());
        if (opt::bLDhat)
            *scaffoldFile << numSamples << "\t" << splits[0] << "\t" << "2" << std::endl;
        for (std::vector<std::string>::size_type i = 0; i != numSamples; i++) {
            *scaffoldFile << ">" << sampleNames[i] << std::endl;
            print80bpPerLineFile(scaffoldFile, scaffoldStrings[i].substr(0,scaledSplits[0]));
        }
        *scaffoldFile << ">" << outgroupName << std::endl;
        print80bpPerLineFile(scaffoldFile, outgroupSeqs[currentScaffoldNum].substr(0,scaledSplits[0]));
        scaffoldFile->close();
        
        for (std::vector<int>::size_type j = 1; j != splits.size(); j++) {
            string splitFileName = currentScaffoldNum + "_" + numToString(splits[j-1]+1) + "_" + numToString(splits[j]);
            scaffoldFile = new std::ofstream(splitFileName.c_str());
            if (opt::bLDhat)
                *scaffoldFile << numSamples << "\t" << (splits[j] - splits[j-1]) << "\t" << "2" << std::endl;
            for (std::vector<std::string>::size_type i = 0; i != numSamples; i++) {
                *scaffoldFile << ">" << sampleNames[i] << std::endl;
                print80bpPerLineFile(scaffoldFile, scaffoldStrings[i].substr(scaledSplits[j-1], scaledSplits[j] - scaledSplits[j-1]));
            }
            *scaffoldFile << ">" << outgroupName << std::endl;
            print80bpPerLineFile(scaffoldFile, outgroupSeqs[currentScaffoldNum].substr(scaledSplits[j-1], scaledSplits[j] - scaledSplits[j-1]));
            scaffoldFile->close();
        }
        
        // Print the last part of the scaffold only if there are a reasonble number of variants
        if (totalProcessedVariants % opt::splitNum > (opt::splitNum * 0.8)) {
            string lastSplitFileName = currentScaffoldNum + "_" + numToString(splits[splits.size()-1]+1) + "_" + numToString(fullScLength);
            
            scaffoldFile = new std::ofstream(lastSplitFileName.c_str());
            if (opt::bLDhat)
                *scaffoldFile << numSamples << "\t" << (scaffoldStrings[0].length() - splits[splits.size()-1]) << "\t" << "2" << std::endl;
            for (std::vector<std::string>::size_type i = 0; i != numSamples; i++) {
                *scaffoldFile << ">" << sampleNames[i] << std::endl;
                print80bpPerLineFile(scaffoldFile, scaffoldStrings[i].substr(scaledSplits[splits.size()-1],std::string::npos));
                scaffoldStrings[i] = "";
            }
            *scaffoldFile << ">" << outgroupName << std::endl;
            print80bpPerLineFile(scaffoldFile, outgroupSeqs[currentScaffoldNum].substr(scaledSplits[scaledSplits.size()-1],std::string::npos));
            scaffoldFile->close();
        } else {
            for (std::vector<std::string>::size_type i = 0; i != numSamples; i++) {
                scaffoldStrings[i] = "";
            }
        }
    }
    
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x520, %rsp            # imm = 0x520
movl 0x28(%rbp), %eax
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movq 0xeddc7(%rip), %rdi     # 0x198ff0
leaq 0x94b41(%rip), %rsi     # 0x13fd71
callq 0xa5c0
movq %rax, -0x368(%rbp)
movq -0x10(%rbp), %rdi
callq 0x83b90
movq -0x368(%rbp), %rdi
movq %rax, %rsi
callq 0xa140
movq %rax, %rdi
leaq 0x94b1f(%rip), %rsi     # 0x13fd7d
callq 0xa5c0
movq %rax, %rdi
movl 0xef6f4(%rip), %esi     # 0x19a960
callq 0xab20
movq %rax, %rdi
movq 0xedd0d(%rip), %rsi     # 0x198f88
callq 0xa610
movq -0x10(%rbp), %rdi
callq 0x83b90
cmpq $0x0, %rax
jne 0xab56c
movl -0x2c(%rbp), %eax
movl 0xef6c4(%rip), %ecx     # 0x19a960
xorl %edx, %edx
divl %ecx
movl %edx, %eax
cvtsi2sd %rax, %xmm0
cvtsi2sdl 0xef6b1(%rip), %xmm1 # 0x19a960
movsd 0x94719(%rip), %xmm2    # 0x13f9d0
mulsd %xmm2, %xmm1
ucomisd %xmm1, %xmm0
jbe 0xab51a
movl $0x200, %edi            # imm = 0x200
callq 0xa5d0
movq %rax, -0x370(%rbp)
movq %rax, -0x378(%rbp)
movq -0x8(%rbp), %rdi
callq 0xa220
movq -0x370(%rbp), %rdi
movq %rax, %rsi
movl $0x10, %edx
callq 0xa650
jmp 0xab2fc
movq -0x378(%rbp), %rax
movq %rax, -0x38(%rbp)
testb $0x1, 0xef658(%rip)     # 0x19a966
je 0xab3ac
movq -0x38(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xa140
movq %rax, %rdi
leaq 0x8abb3(%rip), %rsi     # 0x135ede
callq 0xa5c0
movq %rax, -0x380(%rbp)
movq -0x28(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3d940
movq %rax, %rdi
callq 0xa930
movq -0x380(%rbp), %rdi
movq %rax, %rsi
callq 0xa140
movq %rax, %rdi
leaq 0x8ab79(%rip), %rsi     # 0x135ede
callq 0xa5c0
movq %rax, %rdi
leaq 0x91255(%rip), %rsi     # 0x13c5c9
callq 0xa5c0
movq %rax, %rdi
movq 0xedc05(%rip), %rsi     # 0x198f88
callq 0xa610
jmp 0xab3ac
movq -0x378(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0x200, %esi            # imm = 0x200
callq 0xa5e0
jmp 0xac466
movq $0x0, -0x50(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0xab486
movq -0x38(%rbp), %rdi
leaq 0x8f859(%rip), %rsi     # 0x13ac26
callq 0xa5c0
movq %rax, -0x390(%rbp)
movq -0x18(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x52960
movq -0x390(%rbp), %rdi
movq %rax, %rsi
callq 0xa520
movq %rax, %rdi
movq 0xedb89(%rip), %rsi     # 0x198f88
callq 0xa610
movq -0x28(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x3d940
movq %rax, %rsi
leaq -0x70(%rbp), %rdi
movq %rdi, -0x388(%rbp)
callq 0xa250
movq -0x388(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x81170
jmp 0xab436
leaq -0x70(%rbp), %rdi
callq 0xac88
movq -0x28(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x3d940
movq %rax, %rdi
leaq 0x8aa89(%rip), %rsi     # 0x135edf
callq 0xa810
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0xab3b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x70(%rbp), %rdi
callq 0xac88
jmp 0xac466
movq -0x38(%rbp), %rdi
leaq 0x8f795(%rip), %rsi     # 0x13ac26
callq 0xa5c0
movq %rax, %rdi
movq 0x18(%rbp), %rsi
callq 0xa520
movq %rax, %rdi
movq 0xedadc(%rip), %rsi     # 0x198f88
callq 0xa610
movq 0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x584d0
movq %rax, %rsi
leaq -0x90(%rbp), %rdi
movq %rdi, -0x398(%rbp)
callq 0xa250
movq -0x398(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x81170
jmp 0xab4e6
leaq -0x90(%rbp), %rdi
callq 0xac88
movq -0x38(%rbp), %rdi
callq 0xa840
jmp 0xab567
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x90(%rbp), %rdi
callq 0xac88
jmp 0xac466
movq $0x0, -0x98(%rbp)
movq -0x98(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0xab565
movq -0x28(%rbp), %rdi
movq -0x98(%rbp), %rsi
callq 0x3d940
movq %rax, %rdi
leaq 0x8a993(%rip), %rsi     # 0x135edf
callq 0xa810
movq -0x98(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x98(%rbp)
jmp 0xab525
jmp 0xab567
jmp 0xac45d
movq -0x8(%rbp), %rsi
leaq 0x94817(%rip), %rdx     # 0x13fd8e
leaq -0xd8(%rbp), %rdi
callq 0x3da80
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x9d770
movq (%rax), %rsi
leaq -0xf8(%rbp), %rdi
callq 0xae5d0
jmp 0xab5a1
leaq -0xb8(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
leaq -0xf8(%rbp), %rdx
callq 0x3e070
jmp 0xab5bd
leaq -0xf8(%rbp), %rdi
callq 0xac88
leaq -0xd8(%rbp), %rdi
callq 0xac88
movl $0x200, %edi            # imm = 0x200
callq 0xa5d0
movq %rax, -0x3a0(%rbp)
jmp 0xab5e8
leaq -0xb8(%rbp), %rdi
callq 0xa220
movq -0x3a0(%rbp), %rdi
movq %rax, %rsi
movl $0x10, %edx
callq 0xa650
jmp 0xab60a
movq -0x3a0(%rbp), %rax
movq %rax, -0x38(%rbp)
testb $0x1, 0xef34a(%rip)     # 0x19a966
je 0xab732
movq -0x38(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xa140
movq %rax, -0x3a8(%rbp)
jmp 0xab638
movq -0x3a8(%rbp), %rdi
leaq 0x8a898(%rip), %rsi     # 0x135ede
callq 0xa5c0
movq %rax, -0x3b0(%rbp)
jmp 0xab654
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x9d770
movq -0x3b0(%rbp), %rdi
movq (%rax), %rsi
callq 0xa140
movq %rax, -0x3b8(%rbp)
jmp 0xab679
movq -0x3b8(%rbp), %rdi
leaq 0x8a857(%rip), %rsi     # 0x135ede
callq 0xa5c0
movq %rax, -0x3c0(%rbp)
jmp 0xab695
movq -0x3c0(%rbp), %rdi
leaq 0x90f26(%rip), %rsi     # 0x13c5c9
callq 0xa5c0
movq %rax, -0x3c8(%rbp)
jmp 0xab6b1
movq -0x3c8(%rbp), %rdi
movq 0xed8c9(%rip), %rsi     # 0x198f88
callq 0xa610
jmp 0xab6c6
jmp 0xab732
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xab6ee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0xac88
leaq -0xd8(%rbp), %rdi
callq 0xac88
jmp 0xac466
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xac44f
movq -0x3a0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0x200, %esi            # imm = 0x200
callq 0xa5e0
jmp 0xac44f
movq $0x0, -0x100(%rbp)
movq -0x100(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0xab840
movq -0x38(%rbp), %rdi
leaq 0x8f4cd(%rip), %rsi     # 0x13ac26
callq 0xa5c0
movq %rax, -0x3d0(%rbp)
jmp 0xab767
movq -0x18(%rbp), %rdi
movq -0x100(%rbp), %rsi
callq 0x52960
movq -0x3d0(%rbp), %rdi
movq %rax, %rsi
callq 0xa520
movq %rax, -0x3d8(%rbp)
jmp 0xab78f
movq -0x3d8(%rbp), %rdi
movq 0xed7eb(%rip), %rsi     # 0x198f88
callq 0xa610
jmp 0xab7a4
movq -0x28(%rbp), %rdi
movq -0x100(%rbp), %rsi
callq 0x3d940
movq %rax, -0x3e8(%rbp)
movq 0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movq %rsi, -0x3e0(%rbp)
callq 0x9d770
movq -0x3e8(%rbp), %rsi
movq -0x3e0(%rbp), %rdx
movq (%rax), %rcx
leaq -0x120(%rbp), %rdi
callq 0xa5f0
jmp 0xab7ee
leaq -0x38(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x81170
jmp 0xab800
leaq -0x120(%rbp), %rdi
callq 0xac88
movq -0x100(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x100(%rbp)
jmp 0xab73d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x120(%rbp), %rdi
callq 0xac88
jmp 0xac44f
movq -0x38(%rbp), %rdi
leaq 0x8f3db(%rip), %rsi     # 0x13ac26
callq 0xa5c0
movq %rax, -0x3f0(%rbp)
jmp 0xab859
movq -0x3f0(%rbp), %rdi
movq 0x18(%rbp), %rsi
callq 0xa520
movq %rax, -0x3f8(%rbp)
jmp 0xab872
movq -0x3f8(%rbp), %rdi
movq 0xed708(%rip), %rsi     # 0x198f88
callq 0xa610
jmp 0xab887
movq 0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x584d0
movq %rax, -0x400(%rbp)
jmp 0xab89d
movq 0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movq %rsi, -0x408(%rbp)
callq 0x9d770
movq -0x400(%rbp), %rsi
movq -0x408(%rbp), %rdx
movq (%rax), %rcx
leaq -0x140(%rbp), %rdi
callq 0xa5f0
jmp 0xab8d0
leaq -0x38(%rbp), %rdi
leaq -0x140(%rbp), %rsi
callq 0x81170
jmp 0xab8e2
leaq -0x140(%rbp), %rdi
callq 0xac88
movq -0x38(%rbp), %rdi
callq 0xa840
jmp 0xab8f9
movq $0x1, -0x148(%rbp)
movq -0x148(%rbp), %rax
movq %rax, -0x410(%rbp)
movq -0x10(%rbp), %rdi
callq 0x83b90
movq %rax, %rcx
movq -0x410(%rbp), %rax
cmpq %rcx, %rax
je 0xabea7
movq -0x8(%rbp), %rsi
leaq 0x94457(%rip), %rdx     # 0x13fd90
leaq -0x1c8(%rbp), %rdi
callq 0x3da80
jmp 0xab947
movq -0x10(%rbp), %rdi
movq -0x148(%rbp), %rsi
decq %rsi
callq 0x9d770
movq (%rax), %rsi
incq %rsi
leaq -0x1e8(%rbp), %rdi
callq 0xae5d0
jmp 0xab96e
leaq -0x1a8(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
leaq -0x1e8(%rbp), %rdx
callq 0x3e070
jmp 0xab98a
leaq 0x943ff(%rip), %rdx     # 0x13fd90
leaq -0x188(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
callq 0x3e020
jmp 0xab9a6
movq -0x10(%rbp), %rdi
movq -0x148(%rbp), %rsi
callq 0x9d770
movq (%rax), %rsi
leaq -0x208(%rbp), %rdi
callq 0xae5d0
jmp 0xab9c7
leaq -0x168(%rbp), %rdi
leaq -0x188(%rbp), %rsi
leaq -0x208(%rbp), %rdx
callq 0x3e070
jmp 0xab9e3
leaq -0x208(%rbp), %rdi
callq 0xac88
leaq -0x188(%rbp), %rdi
callq 0xac88
leaq -0x1a8(%rbp), %rdi
callq 0xac88
leaq -0x1e8(%rbp), %rdi
callq 0xac88
leaq -0x1c8(%rbp), %rdi
callq 0xac88
movl $0x200, %edi            # imm = 0x200
callq 0xa5d0
movq %rax, -0x418(%rbp)
jmp 0xaba32
leaq -0x168(%rbp), %rdi
callq 0xa220
movq -0x418(%rbp), %rdi
movq %rax, %rsi
movl $0x10, %edx
callq 0xa650
jmp 0xaba54
movq -0x418(%rbp), %rax
movq %rax, -0x38(%rbp)
testb $0x1, 0xeef00(%rip)     # 0x19a966
je 0xabc14
movq -0x38(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xa140
movq %rax, -0x420(%rbp)
jmp 0xaba82
movq -0x420(%rbp), %rdi
leaq 0x8a44e(%rip), %rsi     # 0x135ede
callq 0xa5c0
movq %rax, -0x428(%rbp)
jmp 0xaba9e
movq -0x10(%rbp), %rdi
movq -0x148(%rbp), %rsi
callq 0x9d770
movq (%rax), %rax
movq %rax, -0x438(%rbp)
movq -0x10(%rbp), %rdi
movq -0x148(%rbp), %rsi
decq %rsi
callq 0x9d770
movq -0x438(%rbp), %rsi
movq -0x428(%rbp), %rdi
movq (%rax), %rax
subq %rax, %rsi
callq 0xa140
movq %rax, -0x430(%rbp)
jmp 0xabaed
movq -0x430(%rbp), %rdi
leaq 0x8a3e3(%rip), %rsi     # 0x135ede
callq 0xa5c0
movq %rax, -0x440(%rbp)
jmp 0xabb09
movq -0x440(%rbp), %rdi
leaq 0x90ab2(%rip), %rsi     # 0x13c5c9
callq 0xa5c0
movq %rax, -0x448(%rbp)
jmp 0xabb25
movq -0x448(%rbp), %rdi
movq 0xed455(%rip), %rsi     # 0x198f88
callq 0xa610
jmp 0xabb3a
jmp 0xabc14
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x140(%rbp), %rdi
callq 0xac88
jmp 0xac44f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xabbd0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xabbc4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xabbb8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xabbac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x208(%rbp), %rdi
callq 0xac88
leaq -0x188(%rbp), %rdi
callq 0xac88
leaq -0x1a8(%rbp), %rdi
callq 0xac88
leaq -0x1e8(%rbp), %rdi
callq 0xac88
leaq -0x1c8(%rbp), %rdi
callq 0xac88
jmp 0xac44f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xabe96
movq -0x418(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0x200, %esi            # imm = 0x200
callq 0xa5e0
jmp 0xabe96
movq $0x0, -0x210(%rbp)
movq -0x210(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0xabd62
movq -0x38(%rbp), %rdi
leaq 0x8efeb(%rip), %rsi     # 0x13ac26
callq 0xa5c0
movq %rax, -0x450(%rbp)
jmp 0xabc49
movq -0x18(%rbp), %rdi
movq -0x210(%rbp), %rsi
callq 0x52960
movq -0x450(%rbp), %rdi
movq %rax, %rsi
callq 0xa520
movq %rax, -0x458(%rbp)
jmp 0xabc71
movq -0x458(%rbp), %rdi
movq 0xed309(%rip), %rsi     # 0x198f88
callq 0xa610
jmp 0xabc86
movq -0x28(%rbp), %rdi
movq -0x210(%rbp), %rsi
callq 0x3d940
movq %rax, -0x468(%rbp)
movq 0x20(%rbp), %rdi
movq -0x148(%rbp), %rsi
decq %rsi
callq 0x9d770
movq (%rax), %rax
movq %rax, -0x460(%rbp)
movq 0x20(%rbp), %rdi
movq -0x148(%rbp), %rsi
callq 0x9d770
movq (%rax), %rax
movq %rax, -0x470(%rbp)
movq 0x20(%rbp), %rdi
movq -0x148(%rbp), %rsi
decq %rsi
callq 0x9d770
movq -0x470(%rbp), %rcx
movq -0x468(%rbp), %rsi
movq -0x460(%rbp), %rdx
movq (%rax), %rax
subq %rax, %rcx
leaq -0x230(%rbp), %rdi
callq 0xa5f0
jmp 0xabd10
leaq -0x38(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq 0x81170
jmp 0xabd22
leaq -0x230(%rbp), %rdi
callq 0xac88
movq -0x210(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x210(%rbp)
jmp 0xabc1f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x230(%rbp), %rdi
callq 0xac88
jmp 0xabe96
movq -0x38(%rbp), %rdi
leaq 0x8eeb9(%rip), %rsi     # 0x13ac26
callq 0xa5c0
movq %rax, -0x478(%rbp)
jmp 0xabd7b
movq -0x478(%rbp), %rdi
movq 0x18(%rbp), %rsi
callq 0xa520
movq %rax, -0x480(%rbp)
jmp 0xabd94
movq -0x480(%rbp), %rdi
movq 0xed1e6(%rip), %rsi     # 0x198f88
callq 0xa610
jmp 0xabda9
movq 0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x584d0
movq %rax, -0x488(%rbp)
jmp 0xabdbf
movq 0x20(%rbp), %rdi
movq -0x148(%rbp), %rsi
decq %rsi
callq 0x9d770
movq (%rax), %rax
movq %rax, -0x490(%rbp)
movq 0x20(%rbp), %rdi
movq -0x148(%rbp), %rsi
callq 0x9d770
movq (%rax), %rax
movq %rax, -0x498(%rbp)
movq 0x20(%rbp), %rdi
movq -0x148(%rbp), %rsi
decq %rsi
callq 0x9d770
movq -0x498(%rbp), %rcx
movq -0x488(%rbp), %rsi
movq -0x490(%rbp), %rdx
movq (%rax), %rax
subq %rax, %rcx
leaq -0x250(%rbp), %rdi
callq 0xa5f0
jmp 0xabe32
leaq -0x38(%rbp), %rdi
leaq -0x250(%rbp), %rsi
callq 0x81170
jmp 0xabe44
leaq -0x250(%rbp), %rdi
callq 0xac88
movq -0x38(%rbp), %rdi
callq 0xa840
jmp 0xabe5b
leaq -0x168(%rbp), %rdi
callq 0xac88
movq -0x148(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x148(%rbp)
jmp 0xab904
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x250(%rbp), %rdi
callq 0xac88
leaq -0x168(%rbp), %rdi
callq 0xac88
jmp 0xac44f
movl -0x2c(%rbp), %eax
movl 0xeeab0(%rip), %ecx     # 0x19a960
xorl %edx, %edx
divl %ecx
movl %edx, %eax
cvtsi2sd %rax, %xmm0
cvtsi2sdl 0xeea9d(%rip), %xmm1 # 0x19a960
movsd 0x93b05(%rip), %xmm2    # 0x13f9d0
mulsd %xmm2, %xmm1
ucomisd %xmm1, %xmm0
jbe 0xac3f0
movq -0x8(%rbp), %rsi
leaq 0x93eac(%rip), %rdx     # 0x13fd90
leaq -0x2d0(%rbp), %rdi
callq 0x3da80
jmp 0xabef2
movq -0x10(%rbp), %rdi
movq %rdi, -0x4a0(%rbp)
callq 0x83b90
movq -0x4a0(%rbp), %rdi
movq %rax, %rsi
decq %rsi
callq 0x9d770
movq (%rax), %rsi
incq %rsi
leaq -0x2f0(%rbp), %rdi
callq 0xae5d0
jmp 0xabf28
leaq -0x2b0(%rbp), %rdi
leaq -0x2d0(%rbp), %rsi
leaq -0x2f0(%rbp), %rdx
callq 0x3e070
jmp 0xabf44
leaq 0x93e45(%rip), %rdx     # 0x13fd90
leaq -0x290(%rbp), %rdi
leaq -0x2b0(%rbp), %rsi
callq 0x3e020
jmp 0xabf60
movl 0x28(%rbp), %esi
leaq -0x310(%rbp), %rdi
callq 0x3e190
jmp 0xabf71
leaq -0x270(%rbp), %rdi
leaq -0x290(%rbp), %rsi
leaq -0x310(%rbp), %rdx
callq 0x3e070
jmp 0xabf8d
leaq -0x310(%rbp), %rdi
callq 0xac88
leaq -0x290(%rbp), %rdi
callq 0xac88
leaq -0x2b0(%rbp), %rdi
callq 0xac88
leaq -0x2f0(%rbp), %rdi
callq 0xac88
leaq -0x2d0(%rbp), %rdi
callq 0xac88
movl $0x200, %edi            # imm = 0x200
callq 0xa5d0
movq %rax, -0x4a8(%rbp)
jmp 0xabfdc
leaq -0x270(%rbp), %rdi
callq 0xa220
movq -0x4a8(%rbp), %rdi
movq %rax, %rsi
movl $0x10, %edx
callq 0xa650
jmp 0xabffe
movq -0x4a8(%rbp), %rax
movq %rax, -0x38(%rbp)
testb $0x1, 0xee956(%rip)     # 0x19a966
je 0xac1b2
movq -0x38(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xa140
movq %rax, -0x4b0(%rbp)
jmp 0xac02c
movq -0x4b0(%rbp), %rdi
leaq 0x89ea4(%rip), %rsi     # 0x135ede
callq 0xa5c0
movq %rax, -0x4b8(%rbp)
jmp 0xac048
movq -0x28(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3d940
movq %rax, %rdi
callq 0xa930
movq %rax, -0x4c8(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x4d0(%rbp)
callq 0x83b90
movq -0x4d0(%rbp), %rdi
movq %rax, %rsi
decq %rsi
callq 0x9d770
movq -0x4c8(%rbp), %rsi
movq -0x4b8(%rbp), %rdi
movq (%rax), %rax
subq %rax, %rsi
callq 0xa140
movq %rax, -0x4c0(%rbp)
jmp 0xac0a8
movq -0x4c0(%rbp), %rdi
leaq 0x89e28(%rip), %rsi     # 0x135ede
callq 0xa5c0
movq %rax, -0x4d8(%rbp)
jmp 0xac0c4
movq -0x4d8(%rbp), %rdi
leaq 0x904f7(%rip), %rsi     # 0x13c5c9
callq 0xa5c0
movq %rax, -0x4e0(%rbp)
jmp 0xac0e0
movq -0x4e0(%rbp), %rdi
movq 0xece9a(%rip), %rsi     # 0x198f88
callq 0xa610
jmp 0xac0f5
jmp 0xac1b2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xac16e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xac162
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xac156
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xac14a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x310(%rbp), %rdi
callq 0xac88
leaq -0x290(%rbp), %rdi
callq 0xac88
leaq -0x2b0(%rbp), %rdi
callq 0xac88
leaq -0x2f0(%rbp), %rdi
callq 0xac88
leaq -0x2d0(%rbp), %rdi
callq 0xac88
jmp 0xac44f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xac3e2
movq -0x4a8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0x200, %esi            # imm = 0x200
callq 0xa5e0
jmp 0xac3e2
movq $0x0, -0x318(%rbp)
movq -0x318(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0xac2f5
movq -0x38(%rbp), %rdi
leaq 0x8ea4d(%rip), %rsi     # 0x13ac26
callq 0xa5c0
movq %rax, -0x4e8(%rbp)
jmp 0xac1e7
movq -0x18(%rbp), %rdi
movq -0x318(%rbp), %rsi
callq 0x52960
movq -0x4e8(%rbp), %rdi
movq %rax, %rsi
callq 0xa520
movq %rax, -0x4f0(%rbp)
jmp 0xac20f
movq -0x4f0(%rbp), %rdi
movq 0xecd6b(%rip), %rsi     # 0x198f88
callq 0xa610
jmp 0xac224
movq -0x28(%rbp), %rdi
movq -0x318(%rbp), %rsi
callq 0x3d940
movq %rax, -0x4f8(%rbp)
movq 0x20(%rbp), %rax
movq %rax, -0x500(%rbp)
movq -0x10(%rbp), %rdi
callq 0x83b90
movq -0x500(%rbp), %rdi
movq %rax, %rsi
decq %rsi
callq 0x9d770
movq -0x4f8(%rbp), %rsi
movq (%rax), %rdx
leaq -0x338(%rbp), %rdi
movq $-0x1, %rcx
callq 0xa5f0
jmp 0xac280
leaq -0x38(%rbp), %rdi
leaq -0x338(%rbp), %rsi
callq 0x81170
jmp 0xac292
leaq -0x338(%rbp), %rdi
callq 0xac88
movq -0x28(%rbp), %rdi
movq -0x318(%rbp), %rsi
callq 0x3d940
movq %rax, %rdi
leaq 0x89c27(%rip), %rsi     # 0x135edf
callq 0xa810
jmp 0xac2bf
jmp 0xac2c1
movq -0x318(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x318(%rbp)
jmp 0xac1bd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x338(%rbp), %rdi
callq 0xac88
jmp 0xac3e2
movq -0x38(%rbp), %rdi
leaq 0x8e926(%rip), %rsi     # 0x13ac26
callq 0xa5c0
movq %rax, -0x508(%rbp)
jmp 0xac30e
movq -0x508(%rbp), %rdi
movq 0x18(%rbp), %rsi
callq 0xa520
movq %rax, -0x510(%rbp)
jmp 0xac327
movq -0x510(%rbp), %rdi
movq 0xecc53(%rip), %rsi     # 0x198f88
callq 0xa610
jmp 0xac33c
movq 0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x584d0
movq %rax, -0x518(%rbp)
jmp 0xac352
movq 0x20(%rbp), %rdi
movq %rdi, -0x520(%rbp)
callq 0x83b90
movq -0x520(%rbp), %rdi
movq %rax, %rsi
decq %rsi
callq 0x9d770
movq -0x518(%rbp), %rsi
movq (%rax), %rdx
leaq -0x358(%rbp), %rdi
movq $-0x1, %rcx
callq 0xa5f0
jmp 0xac393
leaq -0x38(%rbp), %rdi
leaq -0x358(%rbp), %rsi
callq 0x81170
jmp 0xac3a5
leaq -0x358(%rbp), %rdi
callq 0xac88
movq -0x38(%rbp), %rdi
callq 0xa840
jmp 0xac3bc
leaq -0x270(%rbp), %rdi
callq 0xac88
jmp 0xac441
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x358(%rbp), %rdi
callq 0xac88
leaq -0x270(%rbp), %rdi
callq 0xac88
jmp 0xac44f
movq $0x0, -0x360(%rbp)
movq -0x360(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0xac43f
movq -0x28(%rbp), %rdi
movq -0x360(%rbp), %rsi
callq 0x3d940
movq %rax, %rdi
leaq 0x89abd(%rip), %rsi     # 0x135edf
callq 0xa810
jmp 0xac429
jmp 0xac42b
movq -0x360(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x360(%rbp)
jmp 0xac3fb
jmp 0xac441
leaq -0xb8(%rbp), %rdi
callq 0xac88
jmp 0xac45d
leaq -0xb8(%rbp), %rdi
callq 0xac88
jmp 0xac466
addq $0x520, %rsp            # imm = 0x520
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0xab50
nop