// File: /workspace/github_cpp_makefile_star2_O1/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 0x720fd
cmpb $0x54, 0x1(%rax)
jne 0x720fd
cmpb $0x47, 0x2(%rax)
je 0x7221f
movq 0x98ee4(%rip), %r12     # 0x10afe8
leaq 0x6af98(%rip), %rsi     # 0xdd0a3
movl $0x33, %edx
movq %r12, %rdi
callq 0x84e0
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r12, %rdi
callq 0x84e0
movq %rax, %r12
leaq 0x6afa6(%rip), %rsi     # 0xdd0d7
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 0x5faff(%rip), %r13     # 0xd1c7e
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x84e0
leaq 0x6af90(%rip), %rsi     # 0xdd126
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 0x7221f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
movq (%rbx), %rax
cmpb $0x54, -0x3(%rax,%rbp)
je 0x72383
movb -0x2(%rax,%rbp), %cl
cmpb $0x41, %cl
jne 0x72249
cmpb $0x47, -0x1(%rax,%rbp)
je 0x7225d
cmpb $0x41, %cl
jne 0x72249
cmpb $0x41, -0x1(%rax,%rbp)
je 0x7225d
cmpb $0x47, %cl
jne 0x72383
cmpb $0x41, -0x1(%rax,%rbp)
jne 0x72383
leaq -0x3(%rbp), %r12
movq 0x98d80(%rip), %r13     # 0x10afe8
leaq 0x6ae34(%rip), %rsi     # 0xdd0a3
movl $0x33, %edx
movq %r13, %rdi
callq 0x84e0
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r13, %rdi
callq 0x84e0
movq %rax, %r13
leaq 0x6ae97(%rip), %rsi     # 0xdd12c
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 0x5f99b(%rip), %r15     # 0xd1c7e
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x84e0
leaq 0x6ac00(%rip), %rsi     # 0xdcefa
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 0x72383
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 0x723b2
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x723d0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
movq %rbx, %rdi
callq 0x8840