// File: /workspace/github_cpp_makefile_star2_O3/millanek[P]evo/process_vcf_coding_sequences.cpp
// Function: codingSequenceErrorChecks(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>> const&, std::vector<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>>>>, std::allocator<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&, int, std::basic_ofstream<char, std::char_traits<char>>*&)
bool codingSequenceErrorChecks(const string& geneSeq, const string& transcriptName, const std::vector<std::vector<string> >& annotation, const int k, std::ofstream*& badStartStopCodonFile) {
    string::size_type l = geneSeq.length();
    bool divisibleByThree = true;
    if (l % 3 != 0) {
#ifdef DEBUG2
        std::cerr << "Error!!! The length of the gene: " << transcriptName << " is not divisible by three (" << l << ") composed of " << annotation[k].size() << " coding sequences" << std::endl;
        for (std::vector<std::string>::size_type j = 0; j != annotation[k].size(); j++) {
            std::cerr << annotation[k][j] << std::endl;
        }
#endif
        divisibleByThree = false;
    }
    if (!(geneSeq[0] == 'A' && geneSeq[1] == 'T' && geneSeq[2] == 'G')) {
        std::cerr << "Possible error!!! The coding sequence of the gene: " << transcriptName << " does not start with ATG (start codon). Maybe a SNP? Or an annotation error..." << std::endl;
        *badStartStopCodonFile << transcriptName << "\t" << "start" << "\t" << geneSeq.substr(0,3) << std::endl;
    }
    if (geneSeq[l-3] != 'T' && ((geneSeq[l-2] == 'A' && geneSeq[l-1] == 'G') || (geneSeq[l-2] == 'A' && geneSeq[l-1] == 'A') || (geneSeq[l-2] == 'G' && geneSeq[l-1] == 'A'))) {
        std::cerr << "Possible error!!! The coding sequence of the gene: " << transcriptName << " does not end with TAG,TAA, or TGA (stop codons). Maybe a SNP? Or an annotation error..." << std::endl;
        *badStartStopCodonFile << transcriptName << "\t" << "stop" << "\t" << geneSeq.substr(l-3,3) << std::endl;
    }
    return divisibleByThree;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x8(%rdi), %rbp
cmpb $0x41, (%rax)
jne 0x71d9a
cmpb $0x54, 0x1(%rax)
jne 0x71d9a
cmpb $0x47, 0x2(%rax)
je 0x71ebf
movq 0x90247(%rip), %r12     # 0x101fe8
leaq 0x6438b(%rip), %rsi     # 0xd6133
movl $0x33, %edx
movq %r12, %rdi
callq 0x84e0
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r12, %rdi
callq 0x84e0
movq %rax, %r12
leaq 0x64399(%rip), %rsi     # 0xd6167
movl $0x4e, %edx
movq %rax, %rdi
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
movq (%r15), %rdi
movq (%r14), %rsi
movq 0x8(%r14), %rdx
callq 0x84e0
movq %rax, %r12
leaq 0x5bbae(%rip), %r13     # 0xcd9ca
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x84e0
leaq 0x64383(%rip), %rsi     # 0xd61b6
movl $0x5, %edx
movq %r12, %rdi
callq 0x84e0
movl $0x1, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x84e0
leaq 0x8(%rsp), %r13
movl $0x3, %ecx
movq %r13, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x84a0
movq (%r13), %rsi
movq 0x8(%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
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x71ebc
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
movq (%rbx), %rax
cmpb $0x54, -0x3(%rax,%rbp)
je 0x72022
movzbl -0x2(%rax,%rbp), %ecx
cmpl $0x47, %ecx
je 0x71ef1
cmpl $0x41, %ecx
jne 0x72022
movzbl -0x1(%rax,%rbp), %eax
cmpl $0x41, %eax
je 0x71efc
cmpl $0x47, %eax
je 0x71efc
jmp 0x72022
cmpb $0x41, -0x1(%rax,%rbp)
jne 0x72022
leaq -0x3(%rbp), %r12
movq 0x900e1(%rip), %r13     # 0x101fe8
leaq 0x64225(%rip), %rsi     # 0xd6133
movl $0x33, %edx
movq %r13, %rdi
callq 0x84e0
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r13, %rdi
callq 0x84e0
movq %rax, %r13
leaq 0x64288(%rip), %rsi     # 0xd61bc
movl $0x58, %edx
movq %rax, %rdi
callq 0x84e0
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x8450
movsbl %al, %esi
movq %r13, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8300
movq (%r15), %rdi
movq (%r14), %rsi
movq 0x8(%r14), %rdx
callq 0x84e0
movq %rax, %r14
leaq 0x5ba48(%rip), %r15     # 0xcd9ca
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x84e0
leaq 0x63ff1(%rip), %rsi     # 0xd5f8a
movl $0x4, %edx
movq %r14, %rdi
callq 0x84e0
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x84e0
leaq 0x8(%rsp), %r15
movl $0x3, %ecx
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x84a0
movq (%r15), %rsi
movq 0x8(%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
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x72022
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rbp
movabsq $0x5555555555555556, %rax # imm = 0x5555555555555556
cmpq %rax, %rbp
setb %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x72051
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7206f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
movq %rbx, %rdi
callq 0x8840