// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movl %r9d, %ebp
movq %r8, %r12
movq %rcx, %r13
movq %rdx, 0xe8(%rsp)
movq %rsi, %r14
movq %rdi, %r15
movq 0x9f62f(%rip), %rbx     # 0x10afe8
leaq 0x6fb5d(%rip), %rsi     # 0xdb51d
movl $0xb, %edx
movq %rbx, %rdi
callq 0x84e0
movq 0x8(%r14), %rsi
subq (%r14), %rsi
sarq $0x3, %rsi
movq %rbx, %rdi
callq 0x82f0
movq %rax, %rbx
leaq 0x6fb3f(%rip), %rsi     # 0xdb529
movl $0x10, %edx
movq %rax, %rdi
callq 0x84e0
movl 0xa0a6b(%rip), %esi     # 0x10c468
movq %rbx, %rdi
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 0x8(%r14), %rax
cmpq (%r14), %rax
movq %r15, 0xe0(%rsp)
movq %r13, 0x48(%rsp)
je 0x6baf6
movq %r14, 0x90(%rsp)
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x2e45c
leaq 0x6fac2(%rip), %rsi     # 0xdb53a
movq %rbx, %rdi
callq 0x88c0
movq 0x90(%rsp), %rax
movq (%rax), %rax
movq (%rax), %rsi
leaq 0x28(%rsp), %rdi
callq 0x6ec27
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %r8
movq 0x30(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
leaq 0x18(%rsp), %rdi
cmpq %rdi, %rcx
je 0x6babf
movq 0x18(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x6bae2
leaq 0x38(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x6bad9
movq 0x38(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x6bdce
movq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x8180
jmp 0x6bddc
movl 0xa096c(%rip), %ecx     # 0x10c468
movl %ebp, %eax
xorl %edx, %edx
divl %ecx
cvtsi2sd %rdx, %xmm0
cvtsi2sd %ecx, %xmm1
mulsd 0x6f645(%rip), %xmm1    # 0xdb158
ucomisd %xmm1, %xmm0
jbe 0x6bd94
movl $0x200, %edi            # imm = 0x200
callq 0x8470
movq %rax, %r14
movq (%r15), %rsi
movq %rax, %rdi
movl $0x10, %edx
callq 0x84c0
movq %r14, (%rsp)
cmpb $0x1, 0xa0929(%rip)     # 0x10c46e
jne 0x6bbce
movq %r14, %rdi
movq %r13, %rsi
callq 0x82f0
movq %rax, %rbx
leaq 0x6611e(%rip), %r14     # 0xd1c7e
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x84e0
movq (%r12), %rax
movq 0x8(%rax), %rsi
movq %rbx, %rdi
callq 0x82f0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x84e0
leaq 0x6c672(%rip), %rsi     # 0xd820c
movl $0x1, %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
testq %r13, %r13
je 0x6bcc8
movq %r12, %rbp
leaq 0x188(%rsp), %r15
xorl %r13d, %r13d
leaq 0x178(%rsp), %r14
leaq 0x6608b(%rip), %rbx     # 0xd1c7f
movq (%rsp), %r12
movl $0x1, %edx
movq %r12, %rdi
leaq 0x6ad6b(%rip), %rsi     # 0xd6972
callq 0x84e0
movq 0xe8(%rsp), %rax
movq (%rax), %rax
movq (%rax,%r13), %rsi
movq 0x8(%rax,%r13), %rdx
movq %r12, %rdi
callq 0x84e0
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 %rbp, %r12
movq (%rbp), %rax
movq %r15, 0x178(%rsp)
movq (%rax,%r13), %rsi
movq 0x8(%rax,%r13), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x2e45c
movq %rsp, %rdi
movq %r14, %rsi
callq 0x53420
movq 0x178(%rsp), %rdi
cmpq %r15, %rdi
je 0x6bc9d
movq 0x188(%rsp), %rsi
incq %rsi
callq 0x8480
movq %r12, %rbp
movq (%r12), %rdi
movq 0x8(%rdi,%r13), %rdx
addq %r13, %rdi
xorl %esi, %esi
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0x86c0
addq $0x20, %r13
decq 0x48(%rsp)
jne 0x6bbf4
movq %rsp, %rbx
movq (%rbx), %r14
leaq 0x6ac9d(%rip), %rsi     # 0xd6972
movl $0x1, %edx
movq %r14, %rdi
callq 0x84e0
movq 0x258(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r14, %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
movq 0x250(%rsp), %rdi
movq 0xe0(%rsp), %rsi
callq 0x3e394
leaq 0x208(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x1f8(%rsp), %r14
movq %r14, %rdi
callq 0x2e45c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x53420
movq 0x1f8(%rsp), %rdi
cmpq %r15, %rdi
je 0x6bd86
movq 0x208(%rsp), %rsi
incq %rsi
callq 0x8480
movq (%rsp), %rdi
callq 0x8600
jmp 0x6ccb9
testq %r13, %r13
je 0x6ccb9
xorl %r14d, %r14d
leaq 0x65ed8(%rip), %rbx     # 0xd1c7f
movq (%r12), %rdi
movq 0x8(%rdi,%r14), %rdx
addq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0x86c0
addq $0x20, %r14
decq %r13
jne 0x6bda7
jmp 0x6ccb9
leaq 0x28(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x84d0
leaq 0x108(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x6be09
movq %rsi, 0xf8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x108(%rsp)
jmp 0x6be11
movupd (%rcx), %xmm0
movupd %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x100(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6be4c
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x8480
movl %ebp, 0xf4(%rsp)
movq %r12, 0x98(%rsp)
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x6be77
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
movl $0x200, %edi            # imm = 0x200
callq 0x8470
movq %rax, %r14
movq 0xf8(%rsp), %rsi
movq %rax, %rdi
movl $0x10, %edx
callq 0x84c0
movq %r14, (%rsp)
cmpb $0x1, 0xa05ca(%rip)     # 0x10c46e
jne 0x6bf34
movq %r14, %rdi
movq %r13, %rsi
callq 0x82f0
movq %rax, %rbx
leaq 0x65dbf(%rip), %rsi     # 0xd1c7e
movl $0x1, %edx
movq %rax, %rdi
callq 0x84e0
movq 0x90(%rsp), %rax
movq (%rax), %rax
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x82f0
movq %rax, %rbx
leaq 0x65d92(%rip), %rsi     # 0xd1c7e
movl $0x1, %edx
movq %rax, %rdi
callq 0x84e0
leaq 0x6c30c(%rip), %rsi     # 0xd820c
movl $0x1, %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
testq %r13, %r13
je 0x6c014
xorl %r13d, %r13d
leaq 0x6aa2b(%rip), %rbx     # 0xd6972
leaq 0x158(%rsp), %r14
movq %rsp, %rbp
movq 0x48(%rsp), %r15
movq (%rsp), %r12
movl $0x1, %edx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x84e0
movq 0xe8(%rsp), %rax
movq (%rax), %rax
movq (%rax,%r13), %rsi
movq 0x8(%rax,%r13), %rdx
movq %r12, %rdi
callq 0x84e0
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 0x98(%rsp), %rax
movq (%rax), %rsi
addq %r13, %rsi
movq 0x260(%rsp), %rax
movq (%rax), %rax
movq (%rax), %rcx
movq %r14, %rdi
xorl %edx, %edx
callq 0x84a0
movq %rbp, %rdi
movq %r14, %rsi
callq 0x53420
movq 0x158(%rsp), %rdi
leaq 0x168(%rsp), %rax
cmpq %rax, %rdi
je 0x6c007
movq 0x168(%rsp), %rsi
incq %rsi
callq 0x8480
addq $0x20, %r13
decq %r15
jne 0x6bf57
movq (%rsp), %rbx
leaq 0x6a953(%rip), %rsi     # 0xd6972
movl $0x1, %edx
movq %rbx, %rdi
callq 0x84e0
movq 0xe0(%rsp), %r13
movq 0x258(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
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 0x250(%rsp), %rdi
movq %r13, %rsi
callq 0x3e394
movq 0x260(%rsp), %rcx
movq (%rcx), %rcx
movq (%rcx), %rcx
leaq 0x1d8(%rsp), %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x84a0
movq %rsp, %rdi
leaq 0x1d8(%rsp), %rsi
callq 0x53420
leaq 0x1e8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6c0d6
movq 0x1e8(%rsp), %rsi
incq %rsi
callq 0x8480
movq (%rsp), %rdi
callq 0x8600
movq 0x90(%rsp), %rbx
movq 0x8(%rbx), %rax
subq (%rbx), %rax
cmpq $0x8, %rax
je 0x6c695
movl $0x1, %r15d
movq %rsp, %r14
leaq 0x138(%rsp), %rbp
leaq 0x60(%rsp), %rax
movq %rax, 0x50(%rsp)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
addq %rsi, %rdx
leaq 0x50(%rsp), %r12
movq %r12, %rdi
callq 0x2e45c
movq %r12, %rdi
leaq 0x6f407(%rip), %rsi     # 0xdb53c
callq 0x88c0
movq (%rbx), %rax
movq -0x8(%rax,%r15,8), %rsi
incq %rsi
leaq 0xc0(%rsp), %rdi
callq 0x6ec27
movq 0x50(%rsp), %rcx
movl $0xf, %esi
leaq 0x60(%rsp), %rax
cmpq %rax, %rcx
je 0x6c16b
movq 0x60(%rsp), %rsi
movq 0x58(%rsp), %r8
movq 0xc8(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rsi, %rax
jbe 0x6c1a5
movl $0xf, %esi
leaq 0xd0(%rsp), %rdi
cmpq %rdi, 0xc0(%rsp)
je 0x6c1a0
movq 0xd0(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x6c1b9
movq 0xc0(%rsp), %rsi
leaq 0x50(%rsp), %rdi
callq 0x8180
jmp 0x6c1ca
leaq 0xc0(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x84d0
leaq 0x80(%rsp), %rsi
movq %rsi, 0x70(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x6c1f5
movq %rdx, 0x70(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x80(%rsp)
jmp 0x6c1fd
movupd (%rcx), %xmm0
movupd %xmm0, (%rsi)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x78(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x70(%rsp), %rdi
leaq 0x6f316(%rip), %rsi     # 0xdb53c
callq 0x88c0
leaq 0x38(%rsp), %rsi
movq %rsi, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x6c253
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x6c25b
movupd (%rcx), %xmm0
movupd %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%rbx), %rax
movq (%rax,%r15,8), %rsi
leaq 0xa0(%rsp), %rdi
callq 0x6ec27
movq 0x28(%rsp), %rcx
movl $0xf, %esi
leaq 0x38(%rsp), %rax
cmpq %rax, %rcx
je 0x6c2a0
movq 0x38(%rsp), %rsi
movq 0x30(%rsp), %r8
movq 0xa8(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rsi, %rax
jbe 0x6c2da
movl $0xf, %esi
leaq 0xb0(%rsp), %rdi
cmpq %rdi, 0xa0(%rsp)
je 0x6c2d5
movq 0xb0(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x6c2ee
movq 0xa0(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x8180
jmp 0x6c2ff
leaq 0xa0(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x84d0
leaq 0x18(%rsp), %rsi
movq %rsi, 0x8(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x6c324
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x6c32c
movupd (%rcx), %xmm0
movupd %xmm0, (%rsi)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x6c36e
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x6c38a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x6c3ac
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x6c3d1
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x6c3ed
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x8480
movl $0x200, %edi            # imm = 0x200
callq 0x8470
movq %rax, %r12
movq 0x8(%rsp), %rsi
movq %rax, %rdi
movl $0x10, %edx
callq 0x84c0
movq %r12, (%rsp)
cmpb $0x1, 0xa0057(%rip)     # 0x10c46e
jne 0x6c4a8
movq %r12, %rdi
movq 0x48(%rsp), %rsi
callq 0x82f0
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
leaq 0x65842(%rip), %rsi     # 0xd1c7e
callq 0x84e0
movq (%rbx), %rax
movq (%rax,%r15,8), %rsi
subq -0x8(%rax,%r15,8), %rsi
movq %r12, %rdi
callq 0x82f0
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
leaq 0x65817(%rip), %rsi     # 0xd1c7e
callq 0x84e0
movl $0x1, %edx
movq %r12, %rdi
leaq 0x6bd91(%rip), %rsi     # 0xd820c
callq 0x84e0
movq (%r12), %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
cmpq $0x0, 0x48(%rsp)
je 0x6c584
xorl %r13d, %r13d
movq 0x48(%rsp), %rbx
movq (%rsp), %r12
movl $0x1, %edx
movq %r12, %rdi
leaq 0x6a4a3(%rip), %rsi     # 0xd6972
callq 0x84e0
movq 0xe8(%rsp), %rax
movq (%rax), %rax
movq (%rax,%r13), %rsi
movq 0x8(%rax,%r13), %rdx
movq %r12, %rdi
callq 0x84e0
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 0x98(%rsp), %rax
movq (%rax), %rsi
addq %r13, %rsi
movq 0x260(%rsp), %rax
movq (%rax), %rax
movq -0x8(%rax,%r15,8), %rdx
movq (%rax,%r15,8), %rcx
subq %rdx, %rcx
movq %rbp, %rdi
callq 0x84a0
movq %r14, %rdi
movq %rbp, %rsi
callq 0x53420
movq 0x138(%rsp), %rdi
leaq 0x148(%rsp), %rax
cmpq %rax, %rdi
je 0x6c577
movq 0x148(%rsp), %rsi
incq %rsi
callq 0x8480
addq $0x20, %r13
decq %rbx
jne 0x6c4bc
movq (%rsp), %r12
movl $0x1, %edx
movq %r12, %rdi
leaq 0x6a3db(%rip), %rsi     # 0xd6972
callq 0x84e0
movq 0xe0(%rsp), %r13
movq 0x90(%rsp), %rbx
movq 0x258(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r12, %rdi
callq 0x84e0
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 0x250(%rsp), %rdi
movq %r13, %rsi
callq 0x3e394
movq 0x260(%rsp), %rcx
movq (%rcx), %rcx
movq -0x8(%rcx,%r15,8), %rdx
movq (%rcx,%r15,8), %rcx
subq %rdx, %rcx
leaq 0x118(%rsp), %rdi
movq %rax, %rsi
callq 0x84a0
movq %r14, %rdi
leaq 0x118(%rsp), %rsi
callq 0x53420
movq 0x118(%rsp), %rdi
leaq 0x128(%rsp), %rax
cmpq %rax, %rdi
je 0x6c659
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x8480
movq (%rsp), %rdi
callq 0x8600
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x6c67e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
incq %r15
movq 0x8(%rbx), %rax
subq (%rbx), %rax
sarq $0x3, %rax
cmpq %rax, %r15
jne 0x6c109
movl 0x9fdcd(%rip), %ecx     # 0x10c468
movl 0xf4(%rsp), %eax
xorl %edx, %edx
divl %ecx
cvtsi2sd %rdx, %xmm0
cvtsi2sd %ecx, %xmm1
mulsd 0x6eaa1(%rip), %xmm1    # 0xdb158
ucomisd %xmm1, %xmm0
jbe 0x6c778
leaq 0x60(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
addq %rsi, %rdx
leaq 0x50(%rsp), %rdi
callq 0x2e45c
movq 0x98(%rsp), %r15
movq 0x48(%rsp), %r12
leaq 0x6ee49(%rip), %rsi     # 0xdb53c
leaq 0x50(%rsp), %rdi
callq 0x88c0
movq 0x8(%rbx), %rax
movq -0x8(%rax), %rsi
incq %rsi
leaq 0xc0(%rsp), %rdi
callq 0x6ec27
leaq 0x38(%rsp), %rbx
movq 0x50(%rsp), %rcx
movq 0x58(%rsp), %r8
movq 0xc8(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r14, %rcx
je 0x6c73f
movq 0x60(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x6c764
leaq 0xd0(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x6c75f
movq 0xd0(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x6c7be
movq 0xc0(%rsp), %rsi
leaq 0x50(%rsp), %rdi
callq 0x8180
jmp 0x6c7cf
movq 0x48(%rsp), %r12
testq %r12, %r12
movq 0x98(%rsp), %r15
je 0x6cc98
xorl %r14d, %r14d
leaq 0x654e7(%rip), %rbx     # 0xd1c7f
movq (%r15), %rdi
movq 0x8(%rdi,%r14), %rdx
addq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0x86c0
addq $0x20, %r14
decq %r12
jne 0x6c798
jmp 0x6cc98
leaq 0xc0(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x84d0
leaq 0x80(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x6c7f9
movq %rsi, 0x70(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x80(%rsp)
jmp 0x6c801
movupd (%rcx), %xmm0
movupd %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x78(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x6ed17(%rip), %rsi     # 0xdb53c
leaq 0x70(%rsp), %rdi
callq 0x88c0
movl 0x268(%rsp), %esi
movq %rbx, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x6c859
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x6c861
movupd (%rcx), %xmm0
movupd %xmm0, (%rbx)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xa0(%rsp), %rdi
callq 0x31297
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %r8
movq 0xa8(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %rbx, %rcx
je 0x6c8ab
movq 0x38(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x6c8d0
leaq 0xb0(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x6c8cb
movq 0xb0(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x6c8e4
movq 0xa0(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x8180
jmp 0x6c8f5
leaq 0xa0(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x84d0
leaq 0x18(%rsp), %rsi
movq %rsi, 0x8(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x6c91a
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x6c922
movupd (%rcx), %xmm0
movupd %xmm0, (%rsi)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0xb0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6c960
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x28(%rsp), %rdi
cmpq %rbx, %rdi
je 0x6c977
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6c998
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0xd0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6c9b9
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x6c9d0
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x8480
movl $0x200, %edi            # imm = 0x200
callq 0x8470
movq %rax, %r14
movq 0x8(%rsp), %rsi
movq %rax, %rdi
movl $0x10, %edx
callq 0x84c0
movq %r14, (%rsp)
cmpb $0x1, 0x9fa74(%rip)     # 0x10c46e
jne 0x6ca93
movq %r14, %rdi
movq %r12, %rsi
callq 0x82f0
movq %rax, %rbx
leaq 0x65269(%rip), %rsi     # 0xd1c7e
movl $0x1, %edx
movq %rax, %rdi
callq 0x84e0
movq (%r15), %rax
movq 0x8(%rax), %rsi
movq 0x90(%rsp), %rax
movq 0x8(%rax), %rax
subq -0x8(%rax), %rsi
movq %rbx, %rdi
callq 0x82f0
movq %rax, %rbx
leaq 0x65233(%rip), %rsi     # 0xd1c7e
movl $0x1, %edx
movq %rax, %rdi
callq 0x84e0
leaq 0x6b7ad(%rip), %rsi     # 0xd820c
movl $0x1, %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
testq %r12, %r12
je 0x6cbaa
leaq 0x1c8(%rsp), %r15
xorl %r13d, %r13d
leaq 0x1b8(%rsp), %r14
movq %rsp, %rbp
leaq 0x651c6(%rip), %rbx     # 0xd1c7f
movq (%rsp), %r12
movl $0x1, %edx
movq %r12, %rdi
leaq 0x69ea6(%rip), %rsi     # 0xd6972
callq 0x84e0
movq 0xe8(%rsp), %rax
movq (%rax), %rax
movq (%rax,%r13), %rsi
movq 0x8(%rax,%r13), %rdx
movq %r12, %rdi
callq 0x84e0
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 0x98(%rsp), %rax
movq (%rax), %rsi
addq %r13, %rsi
movq 0x90(%rsp), %rcx
movq 0x8(%rcx), %rax
subq (%rcx), %rax
movq 0x260(%rsp), %rcx
movq (%rcx), %rcx
movq -0x8(%rcx,%rax), %rdx
movq %r14, %rdi
movq $-0x1, %rcx
callq 0x84a0
movq %rbp, %rdi
movq %r14, %rsi
callq 0x53420
movq 0x1b8(%rsp), %rdi
cmpq %r15, %rdi
je 0x6cb7b
movq 0x1c8(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x98(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rdi,%r13), %rdx
addq %r13, %rdi
xorl %esi, %esi
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0x86c0
addq $0x20, %r13
decq 0x48(%rsp)
jne 0x6cab9
movq (%rsp), %rbx
leaq 0x69dbd(%rip), %rsi     # 0xd6972
movl $0x1, %edx
movq %rbx, %rdi
callq 0x84e0
movq 0xe0(%rsp), %r14
movq 0x258(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
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 0x250(%rsp), %rdi
movq %r14, %rsi
callq 0x3e394
movq 0x260(%rsp), %rcx
movq 0x8(%rcx), %rcx
movq -0x8(%rcx), %rdx
leaq 0x198(%rsp), %rdi
movq %rax, %rsi
movq $-0x1, %rcx
callq 0x84a0
movq %rsp, %rdi
leaq 0x198(%rsp), %rsi
callq 0x53420
leaq 0x1a8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6cc73
movq 0x1a8(%rsp), %rsi
incq %rsi
callq 0x8480
movq (%rsp), %rdi
callq 0x8600
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x6cc98
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x108(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6ccb9
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x8480
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x1f8(%rsp), %rdi
cmpq %r15, %rdi
je 0x6d037
movq 0x208(%rsp), %rsi
jmp 0x6d02f
movq %rax, %rbx
movl $0x200, %esi            # imm = 0x200
movq %r14, %rdi
jmp 0x6d032
movq %rax, %rbx
leaq 0x1a8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6cffa
movq 0x1a8(%rsp), %rsi
jmp 0x6cfed
movq %rax, %rbx
movl $0x200, %esi            # imm = 0x200
movq %r14, %rdi
jmp 0x6cff0
movq %rax, %rbx
leaq 0xb0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6cd5a
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x6cd5a
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x6cd7b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x6cd7b
movq %rax, %rbx
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6cda1
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x6cda1
movq %rax, %rbx
leaq 0xd0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6cdc9
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x6cdc9
jmp 0x6cdc6
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
jne 0x6cf8e
jmp 0x6d016
jmp 0x6cfc6
movq %rax, %rbx
leaq 0x1e8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6d016
movq 0x1e8(%rsp), %rsi
jmp 0x6d00e
movq %rax, %rbx
movl $0x200, %esi            # imm = 0x200
movq %r14, %rdi
jmp 0x6d011
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6ce3b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x6ce3b
jmp 0x6ce38
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x6d037
movq 0x18(%rsp), %rsi
jmp 0x6d02f
movq %rax, %rbx
movq 0x178(%rsp), %rdi
cmpq %r15, %rdi
je 0x6d037
movq 0x188(%rsp), %rsi
jmp 0x6d02f
jmp 0x6cff7
movq %rax, %rbx
movq 0x1b8(%rsp), %rdi
cmpq %r15, %rdi
je 0x6cffa
movq 0x1c8(%rsp), %rsi
jmp 0x6cfed
jmp 0x6cfc6
jmp 0x6cfc6
movq %rax, %rbx
movq 0x118(%rsp), %rdi
leaq 0x128(%rsp), %rax
cmpq %rax, %rdi
je 0x6cffa
movq 0x128(%rsp), %rsi
jmp 0x6cfed
jmp 0x6cfc6
jmp 0x6ced9
movq %rax, %rbx
jmp 0x6cf7b
movq %rax, %rbx
jmp 0x6cf56
movq %rax, %rbx
jmp 0x6cf34
movq %rax, %rbx
jmp 0x6cf18
movq %rax, %rbx
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x6cf18
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x6cf34
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x6cf56
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x6cf7b
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x6d016
movq 0x60(%rsp), %rsi
jmp 0x6d00e
movq %rax, %rbx
movl $0x200, %esi            # imm = 0x200
movq %r12, %rdi
jmp 0x6cff0
movq %rax, %rbx
movq 0x158(%rsp), %rdi
leaq 0x168(%rsp), %rax
cmpq %rax, %rdi
je 0x6d016
movq 0x168(%rsp), %rsi
jmp 0x6d00e
jmp 0x6cff7
movq %rax, %rbx
jmp 0x6d016
jmp 0x6cff7
movq %rax, %rbx
movq 0x138(%rsp), %rdi
leaq 0x148(%rsp), %rax
cmpq %rax, %rdi
je 0x6cffa
movq 0x148(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x6cffa
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x6d016
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x108(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6d037
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x8480
movq %rbx, %rdi
callq 0x8840