// File: /workspace/github_cpp_makefile_star2_O3/millanek[P]evo/evo_DNA_to_Protein.cpp
// Function: DNAtoProtein(int, char**)
int DNAtoProtein(int argc, char** argv) {
    parseDNAtoProteinOptions(argc, argv);
    std::vector<string> allAligmentFiles; string AAFileName;
    std::vector<string> allNewLabels;
    
    std::cerr << "Translate multiple aligments from DNA to protein" << std::endl;
    
    if (opt::alignmentFile != "") {
        allAligmentFiles.push_back(opt::alignmentFile);
        // look at suffix
        size_t suffixPos = opt::alignmentFile.find_last_of('.');
        if (suffixPos !=  std::string::npos) {
            if (opt::alignmentFile.substr(suffixPos) == ".fa" || opt::alignmentFile.substr(suffixPos) == ".fasta")
                std::cerr << "for the gene: " << stripExtension(opt::alignmentFile) << std::endl;
            else
                std::cerr << "for the gene: " << opt::alignmentFile << std::endl;
        } else {
            std::cerr << "for the gene: " << opt::alignmentFile << std::endl;
        }
    } else {
        std::ifstream* alignmentList = new std::ifstream(opt::alignmentListFile.c_str());
        std::cerr << "for the genes in: " << opt::alignmentListFile << std::endl;
        std::string line;
        while (getline(*alignmentList, line)) {
            allAligmentFiles.push_back(line);
        }
    }
    if (opt::newLabelFile != "") {
        std::cerr << "using labels from: " << opt::newLabelFile << std::endl;
        std::ifstream* newLabels = new std::ifstream(opt::newLabelFile.c_str());
        std::string line;
        while (getline(*newLabels, line)) {
            allNewLabels.push_back(line);
        }
    }
    
    // Loop over the mutiple alignment files:
    for (std::vector<std::string>::size_type i = 0; i != allAligmentFiles.size(); i++) {
        std::ifstream* alignment = new std::ifstream(allAligmentFiles[i].c_str());
        std::vector<string> allSeqs; std::vector<string> allSeqsAA;
        // Load the DNA alignment
        std::string line; int lineNum = 1;
        while (getline(*alignment, line)) {
            if (lineNum % 2 == 1) assert(line[0] == '>');
            lineNum++;
            if (line[0] == '>' && opt::newLabelFile != "") continue;
            if (line[0] == '>' && opt::newLabelFile == "") { allNewLabels.push_back(line); continue; }
            allSeqs.push_back(line);
        } alignment->close();
        
       // std::cerr << "loaded seqs for: " << allAligmentFiles[i] << std::endl;
        //std::cerr << "allSeqs.size(): " << allSeqs.size() << std::endl;
        // Translate to Amino Acid sequences:
        std::string::size_type geneLengthNt = allSeqs[0].length();
        int numSamples = (int)allSeqs.size();
        std::vector<string> altCodons; altCodons.resize(numSamples);
        allSeqsAA.resize(numSamples);
        if (numSamples > 0) {
            assert(geneLengthNt % 3 == 0); // The gene length must be divisible by three
            for (std::vector<std::string>::size_type j = 0; j != numSamples; j++) {
                allSeqsAA[j].reserve(geneLengthNt/3);
            }
            for (string::size_type k = 0; k != geneLengthNt; k++) {
                for (std::vector<std::string>::size_type j = 0; j != numSamples; j++) {
                    altCodons[j] += allSeqs[j][k];
                }
                // Find the types of mutation we are dealing with
                if ((k+1)%3 == 0) {
                    for (std::vector<std::string>::size_type j = 0; j != numSamples; j++) {
                        assert(allSeqs[j].substr(k-2,3) == altCodons[j]);
                        allSeqsAA[j] += getAminoAcidOneLetterCode(altCodons[j]);
                    }
                    for (std::vector<std::string>::size_type j = 0; j != numSamples; j++) {
                        altCodons[j] = "";
                    }
                }
            }
        } else{
            std::cerr << allAligmentFiles[i] << "has no alignment.." << std::endl;
        }
        //std::cerr << "processed seqs for: " << allAligmentFiles[i] << std::endl;
        //std::cerr << "going to output: " << allAligmentFiles[i] << std::endl;
        size_t suffixPos = allAligmentFiles[i].find_last_of('.');
        if (suffixPos != std::string::npos) {
            if (allAligmentFiles[i].substr(suffixPos) == ".fa" || allAligmentFiles[i].substr(suffixPos) == ".fasta")
                AAFileName = opt::outFolder + stripExtension(allAligmentFiles[i]) + "_AA.fasta";
            else
                AAFileName = opt::outFolder + allAligmentFiles[i] + "_AA.fasta";
        } else {
            AAFileName = opt::outFolder + allAligmentFiles[i] + "_AA.fasta";
        }
        //std::cerr << "into: " << AAFileName << std::endl;
        std::ofstream* AAalignment = new std::ofstream(AAFileName.c_str());
        for (std::vector<std::string>::size_type j = 0; j != numSamples; j++) {
            *AAalignment << allNewLabels[j] << std::endl;
            *AAalignment << allSeqsAA[j] << std::endl;
        } AAalignment->close();
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
callq 0x3fb20
xorl %eax, %eax
movq %rax, 0x90(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x80(%rsp)
leaq 0x120(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb $0x0, (%rcx)
movq %rax, 0x160(%rsp)
movaps %xmm0, 0x150(%rsp)
movq 0xc345f(%rip), %rbx     # 0x101fe8
leaq 0x8f15a(%rip), %rsi     # 0xcdcea
movl $0x30, %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 0xc342d(%rip), %rdi     # 0x101fe8
callq 0x8040
movq %rax, %rdi
callq 0x8300
leaq 0xc4209(%rip), %rdi     # 0x102dd8
leaq 0x8edf5(%rip), %rsi     # 0xcd9cb
callq 0x8160
testl %eax, %eax
je 0x3eca8
leaq 0xc41ee(%rip), %rsi     # 0x102dd8
leaq 0x80(%rsp), %rdi
callq 0x3133c
leaq 0xc41da(%rip), %rdi     # 0x102dd8
movl $0x2e, %esi
movq $-0x1, %rdx
callq 0x88f0
cmpq $-0x1, %rax
je 0x3ed9a
movq %rax, %rbx
leaq 0xc41b5(%rip), %rsi     # 0x102dd8
leaq 0x8(%rsp), %rdi
movq %rax, %rdx
movq $-0x1, %rcx
callq 0x84a0
leaq 0x9a95c(%rip), %rsi     # 0xd959a
leaq 0x8(%rsp), %rdi
callq 0x8160
testl %eax, %eax
je 0x3ede8
leaq 0xc4181(%rip), %rsi     # 0x102dd8
leaq 0x28(%rsp), %rdi
movq %rbx, %rdx
movq $-0x1, %rcx
callq 0x84a0
leaq 0x8f121(%rip), %rsi     # 0xcdd93
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
callq 0x8160
testl %eax, %eax
sete %bpl
movq (%rbx), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x3edeb
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x3edeb
movl $0x208, %edi            # imm = 0x208
callq 0x8470
movq %rax, %r14
movq 0xc413c(%rip), %rsi     # 0x102df8
movq %rax, %rdi
movl $0x8, %edx
callq 0x8860
movq 0xc3318(%rip), %rdi     # 0x101fe8
leaq 0x8d549(%rip), %rsi     # 0xcc220
movl $0x12, %edx
callq 0x84e0
movq 0xc4110(%rip), %rsi     # 0x102df8
movq 0xc4111(%rip), %rdx     # 0x102e00
movq 0xc32f2(%rip), %rdi     # 0x101fe8
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
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
leaq 0x8(%rsp), %rbx
leaq 0x80(%rsp), %r15
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8870
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x3ed87
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3133c
jmp 0x3ed4a
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
jne 0x3ee82
jmp 0x3eeed
movq 0xc3247(%rip), %rdi     # 0x101fe8
leaq 0x8eba1(%rip), %rsi     # 0xcd949
movl $0xe, %edx
callq 0x84e0
movq 0xc401f(%rip), %rsi     # 0x102dd8
movq 0xc4020(%rip), %rdx     # 0x102de0
movq 0xc3221(%rip), %rdi     # 0x101fe8
callq 0x84e0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x8450
jmp 0x3eeda
movb $0x1, %bpl
leaq 0x18(%rsp), %r14
movq -0x10(%r14), %rdi
cmpq %r14, %rdi
je 0x3ee06
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
testb %bpl, %bpl
je 0x3ee91
movq 0xc31d2(%rip), %rdi     # 0x101fe8
leaq 0x8eb2c(%rip), %rsi     # 0xcd949
movl $0xe, %edx
callq 0x84e0
leaq 0xc3faa(%rip), %rsi     # 0x102dd8
leaq 0x8(%rsp), %rdi
callq 0x4d82f
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0xc319f(%rip), %rdi     # 0x101fe8
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 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x3eeed
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x3eeed
movq 0xc3150(%rip), %rdi     # 0x101fe8
leaq 0x8eaaa(%rip), %rsi     # 0xcd949
movl $0xe, %edx
callq 0x84e0
movq 0xc3f28(%rip), %rsi     # 0x102dd8
movq 0xc3f29(%rip), %rdx     # 0x102de0
movq 0xc312a(%rip), %rdi     # 0x101fe8
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
leaq 0xc3f24(%rip), %rdi     # 0x102e18
leaq 0x8ead0(%rip), %rsi     # 0xcd9cb
callq 0x8160
testl %eax, %eax
je 0x3effe
movq 0xc30d9(%rip), %rdi     # 0x101fe8
leaq 0x8e5c0(%rip), %rsi     # 0xcd4d6
movl $0x13, %edx
callq 0x84e0
movq 0xc3ef1(%rip), %rsi     # 0x102e18
movq 0xc3ef2(%rip), %rdx     # 0x102e20
movq 0xc30b3(%rip), %rdi     # 0x101fe8
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
movl $0x208, %edi            # imm = 0x208
callq 0x8470
movq %rax, %r14
movq 0xc3ea0(%rip), %rsi     # 0x102e18
movq %rax, %rdi
movl $0x8, %edx
callq 0x8860
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
leaq 0x8(%rsp), %rbx
leaq 0x150(%rsp), %r15
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8870
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x3efe7
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3133c
jmp 0x3efaa
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x3effe
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x80(%rsp), %rbx
cmpq %rbx, 0x88(%rsp)
je 0x3f8ae
leaq 0x38(%rsp), %r12
leaq 0x8(%rsp), %r13
leaq 0xc3df3(%rip), %rbp     # 0x102e18
leaq 0xb0(%rsp), %r15
movq $0x0, 0xa0(%rsp)
movl $0x208, %edi            # imm = 0x208
callq 0x8470
movq %rax, %r14
movq 0xa0(%rsp), %rax
shlq $0x5, %rax
movq %rax, 0x78(%rsp)
movq (%rbx,%rax), %rsi
movq %r14, %rdi
movl $0x8, %edx
callq 0x8860
xorps %xmm0, %xmm0
movaps %xmm0, 0xf0(%rsp)
xorl %ecx, %ecx
movq %rcx, 0x100(%rsp)
movq %rcx, 0x140(%rsp)
movaps %xmm0, 0x130(%rsp)
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rcx, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
movl $0x1, %ebx
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %edx
movq %r14, %rdi
movq %r13, %rsi
callq 0x8870
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x3f14f
movq 0x8(%rsp), %rax
movb (%rax), %al
testb $0x1, %bl
jne 0x3f0eb
orl $0x1, %ebx
cmpb $0x3e, %al
je 0x3f0f5
jmp 0x3f125
cmpb $0x3e, %al
jne 0x3f920
incl %ebx
movq %rbp, %rdi
leaq 0x8e8cc(%rip), %rsi     # 0xcd9cb
callq 0x8160
testl %eax, %eax
jne 0x3f0a6
movq 0x8(%rsp), %rax
cmpb $0x3e, (%rax)
jne 0x3f125
movq %rbp, %rdi
leaq 0x8e8af(%rip), %rsi     # 0xcd9cb
callq 0x8160
testl %eax, %eax
je 0x3f13a
leaq 0xf0(%rsp), %rdi
movq %r13, %rsi
callq 0x3133c
jmp 0x3f0a6
leaq 0x150(%rsp), %rdi
movq %r13, %rsi
callq 0x3133c
jmp 0x3f0a6
movq %r14, %rdi
callq 0x80f0
movq 0xf0(%rsp), %rax
movq 0xf8(%rsp), %rbx
movq 0x8(%rax), %rcx
movq %rcx, 0xa8(%rsp)
subq %rax, %rbx
movq %rbx, 0x48(%rsp)
shrq $0x5, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0xd0(%rsp)
movq $0x0, 0xe0(%rsp)
movslq %ebx, %rsi
leaq 0xd0(%rsp), %rdi
movq %rsi, 0x50(%rsp)
callq 0x3e6a2
leaq 0x130(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0x3e6a2
shlq $0x1b, 0x48(%rsp)
testl %ebx, %ebx
jle 0x3f3ff
movq 0xa8(%rsp), %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rcx
movabsq $0x5555555555555555, %rcx # imm = 0x5555555555555555
cmpq %rcx, %rax
ja 0x3f93f
cmpq $0x0, 0x48(%rsp)
je 0x3f225
movq %rdx, %rbx
shrq %rbx
xorl %r14d, %r14d
movq 0x50(%rsp), %r15
movq 0x130(%rsp), %rdi
addq %r14, %rdi
movq %rbx, %rsi
callq 0x86f0
addq $0x20, %r14
decq %r15
jne 0x3f209
cmpq $0x0, 0xa8(%rsp)
leaq 0xb0(%rsp), %r15
je 0x3f45f
xorl %ebx, %ebx
cmpq $0x0, 0x48(%rsp)
je 0x3f3c3
xorl %r14d, %r14d
movq 0x50(%rsp), %r15
movq 0xf0(%rsp), %rax
movq (%rax,%r14), %rax
movsbl (%rax,%rbx), %esi
movq 0xd0(%rsp), %rdi
addq %r14, %rdi
callq 0x83d0
addq $0x20, %r14
decq %r15
jne 0x3f252
leaq 0x1(%rbx), %rdx
movq %rdx, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
movabsq $0x5555555555555555, %rcx # imm = 0x5555555555555555
cmpq %rcx, %rax
ja 0x3f3cb
cmpq $0x0, 0x48(%rsp)
leaq 0xb0(%rsp), %r15
je 0x3f3ec
movq %rdx, 0x108(%rsp)
movq %r12, %r14
addq $-0x2, %rbx
xorl %ebp, %ebp
movq 0x50(%rsp), %r12
movq 0xf0(%rsp), %rsi
addq %rbp, %rsi
movl $0x3, %ecx
leaq 0x28(%rsp), %rdi
movq %rbx, %rdx
callq 0x84a0
movq 0xd0(%rsp), %r13
movq 0x30(%rsp), %rdx
cmpq 0x8(%r13,%rbp), %rdx
jne 0x3f901
movq 0x28(%rsp), %r15
testq %rdx, %rdx
je 0x3f321
movq (%r13,%rbp), %rsi
movq %r15, %rdi
callq 0x8490
testl %eax, %eax
jne 0x3f901
cmpq %r14, %r15
je 0x3f33e
movq 0x38(%rsp), %rsi
incq %rsi
movq %r15, %rdi
callq 0x8480
movq 0xd0(%rsp), %r13
addq %rbp, %r13
movq %r13, %rdi
callq 0x3fe0a
movq 0x130(%rsp), %rdi
addq %rbp, %rdi
movsbl %al, %esi
callq 0x83d0
addq $0x20, %rbp
decq %r12
leaq 0xb0(%rsp), %r15
jne 0x3f2cd
cmpq $0x0, 0x48(%rsp)
je 0x3f3d5
xorl %ebx, %ebx
movq 0x50(%rsp), %r15
movq %r14, %r12
leaq 0x8(%rsp), %r13
leaq 0xc3a89(%rip), %rbp     # 0x102e18
movq 0xd0(%rsp), %rdi
movq 0x8(%rdi,%rbx), %rdx
addq %rbx, %rdi
xorl %esi, %esi
leaq 0x8e623(%rip), %rcx     # 0xcd9cb
xorl %r8d, %r8d
callq 0x86c0
addq $0x20, %rbx
decq %r15
jne 0x3f38f
leaq 0xb0(%rsp), %r15
jmp 0x3f3e4
incq %rbx
movq %rbx, %rdx
jmp 0x3f3ec
leaq 0xb0(%rsp), %r15
jmp 0x3f3ec
movq %r14, %r12
leaq 0x8(%rsp), %r13
leaq 0xc3a34(%rip), %rbp     # 0x102e18
movq 0x108(%rsp), %rdx
movq %rdx, %rbx
cmpq 0xa8(%rsp), %rdx
jne 0x3f23e
jmp 0x3f45f
movq 0x80(%rsp), %rax
movq 0x78(%rsp), %rcx
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
movq 0xc2bcc(%rip), %rdi     # 0x101fe8
callq 0x84e0
movq %rax, %rbx
movl $0x12, %edx
movq %rax, %rdi
leaq 0x8e562(%rip), %rsi     # 0xcd995
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 0x80(%rsp), %rdi
movq 0x78(%rsp), %r14
addq %r14, %rdi
movl $0x2e, %esi
movq $-0x1, %rdx
callq 0x88f0
cmpq $-0x1, %rax
je 0x3f51c
movq %rax, %rbx
movq 0x80(%rsp), %rsi
addq %r14, %rsi
leaq 0x28(%rsp), %r14
movq %r14, %rdi
movq %rax, %rdx
movq $-0x1, %rcx
callq 0x84a0
movq %r14, %rdi
leaq 0x9a0e1(%rip), %rsi     # 0xd959a
callq 0x8160
testl %eax, %eax
je 0x3f554
movq 0x80(%rsp), %rsi
addq 0x78(%rsp), %rsi
leaq 0x58(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rdx
movq $-0x1, %rcx
callq 0x84a0
movq %r14, %rdi
leaq 0x8e89f(%rip), %rsi     # 0xcdd93
callq 0x8160
testl %eax, %eax
sete %bl
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x3f556
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x3f556
addq 0x80(%rsp), %r14
leaq 0x58(%rsp), %rbx
movq %rbx, %rdi
leaq 0xc3905(%rip), %rsi     # 0x102e38
movq %r14, %rdx
callq 0x2e8c4
movq %rbx, %rdi
leaq 0x8e84b(%rip), %rsi     # 0xcdd90
leaq 0x68(%rsp), %rbx
callq 0x88c0
jmp 0x3f604
movb $0x1, %bl
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x3f56d
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x8480
testb %bl, %bl
je 0x3f5cf
movq 0x78(%rsp), %rsi
addq 0x80(%rsp), %rsi
movq %r15, %rdi
callq 0x4d82f
leaq 0x68(%rsp), %rbx
movq 0xc38a6(%rip), %rcx     # 0x102e38
movq 0xc38a7(%rip), %r8      # 0x102e40
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x84d0
movq %rbx, 0x58(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3f688
movq %rdx, 0x58(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x68(%rsp)
jmp 0x3f68e
movq 0x78(%rsp), %rdx
addq 0x80(%rsp), %rdx
leaq 0x58(%rsp), %r14
movq %r14, %rdi
leaq 0xc384d(%rip), %rsi     # 0x102e38
callq 0x2e8c4
leaq 0x68(%rsp), %rbx
movq %r14, %rdi
leaq 0x8e791(%rip), %rsi     # 0xcdd90
callq 0x88c0
movq %r12, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3f627
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x3f62f
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x110(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x8540
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x3f670
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x58(%rsp), %rdi
cmpq %rbx, %rdi
je 0x3f75f
movq 0x68(%rsp), %rsi
jmp 0x3f757
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
movq %rdx, 0x60(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x58(%rsp), %rdi
leaq 0x8e6de(%rip), %rsi     # 0xcdd90
callq 0x88c0
movq %r12, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3f6da
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x3f6e2
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x110(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x8540
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x3f723
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x58(%rsp), %rdi
cmpq %rbx, %rdi
je 0x3f73a
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0xb0(%rsp), %rdi
leaq 0xc0(%rsp), %rax
cmpq %rax, %rdi
je 0x3f75f
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x8480
movl $0x200, %edi            # imm = 0x200
callq 0x8470
movq %rax, %r14
movq 0x110(%rsp), %rsi
movq %rax, %rdi
movl $0x10, %edx
callq 0x84c0
cmpq $0x0, 0x48(%rsp)
je 0x3f828
movl $0x8, %r15d
movq 0x150(%rsp), %rax
movq -0x8(%rax,%r15), %rsi
movq (%rax,%r15), %rdx
movq %r14, %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 0x130(%rsp), %rax
movq -0x8(%rax,%r15), %rsi
movq (%rax,%r15), %rdx
movq %r14, %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
addq $0x20, %r15
decq 0x50(%rsp)
jne 0x3f793
movq %r14, %rdi
callq 0x8600
leaq 0xb0(%rsp), %r15
leaq 0xd0(%rsp), %rdi
callq 0x2e784
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x3f861
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x130(%rsp), %rdi
callq 0x2e784
leaq 0xf0(%rsp), %rdi
callq 0x2e784
movq 0xa0(%rsp), %rdx
incq %rdx
movq 0x80(%rsp), %rbx
movq 0x88(%rsp), %rax
subq %rbx, %rax
sarq $0x5, %rax
movq %rdx, 0xa0(%rsp)
cmpq %rax, %rdx
jne 0x3f039
leaq 0x150(%rsp), %rdi
callq 0x2e784
movq 0x110(%rsp), %rdi
leaq 0x120(%rsp), %rax
cmpq %rax, %rdi
je 0x3f8e0
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x80(%rsp), %rdi
callq 0x2e784
xorl %eax, %eax
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8e45f(%rip), %rdi     # 0xcdd67
leaq 0x8e40c(%rip), %rsi     # 0xcdd1b
leaq 0x8e41c(%rip), %rcx     # 0xcdd32
movl $0x77, %edx
callq 0x82c0
leaq 0x8c90c(%rip), %rdi     # 0xcc233
leaq 0x8e3ed(%rip), %rsi     # 0xcdd1b
leaq 0x8e3fd(%rip), %rcx     # 0xcdd32
movl $0x5d, %edx
callq 0x82c0
leaq 0x8e40b(%rip), %rdi     # 0xcdd51
leaq 0x8e3ce(%rip), %rsi     # 0xcdd1b
leaq 0x8e3de(%rip), %rcx     # 0xcdd32
movl $0x6c, %edx
callq 0x82c0
jmp 0x3fa4d
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x3fa73
jmp 0x3fad9
jmp 0x3fa55
jmp 0x3fa4d
jmp 0x3fa55
jmp 0x3fa4d
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
jne 0x3fa73
jmp 0x3fad9
jmp 0x3fa4d
jmp 0x3fa4d
jmp 0x3fa93
jmp 0x3fa07
jmp 0x3fa93
movq %rbx, %rcx
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %rcx, %rdi
je 0x3f9df
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x3f9df
movq %rax, %rbx
movq 0xb0(%rsp), %rdi
leaq 0xc0(%rsp), %rax
cmpq %rax, %rdi
je 0x3fa96
movq 0xc0(%rsp), %rsi
jmp 0x3fa30
jmp 0x3fa93
movq %rbx, %rcx
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %rcx, %rdi
je 0x3fa96
movq 0x68(%rsp), %rsi
jmp 0x3fa30
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x3fa96
movq 0x38(%rsp), %rsi
incq %rsi
jmp 0x3fa44
jmp 0x3fa4d
jmp 0x3fa93
movq %rax, %rbx
movl $0x200, %esi            # imm = 0x200
movq %r14, %rdi
callq 0x8480
jmp 0x3fa96
jmp 0x3fa88
movq %rax, %rbx
jmp 0x3fad9
movq %rax, %rbx
movl $0x208, %esi            # imm = 0x208
movq %r14, %rdi
jmp 0x3fa7b
jmp 0x3fa66
jmp 0x3fa93
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x3fad9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x3fad9
jmp 0x3fa93
jmp 0x3fa93
jmp 0x3fa93
movq %rax, %rbx
jmp 0x3faa3
jmp 0x3fa93
jmp 0x3fa93
jmp 0x3fa93
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
callq 0x2e784
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x3fabf
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x130(%rsp), %rdi
callq 0x2e784
leaq 0xf0(%rsp), %rdi
callq 0x2e784
leaq 0x150(%rsp), %rdi
callq 0x2e784
movq 0x110(%rsp), %rdi
leaq 0x120(%rsp), %rax
cmpq %rax, %rdi
je 0x3fb0b
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x8480
leaq 0x80(%rsp), %rdi
callq 0x2e784
movq %rbx, %rdi
callq 0x8840