// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/process_vcf_linkGeneNames.cpp
// Function: attemptMappingUpdate(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::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
inline void attemptMappingUpdate(std::map<string,string>& cichlidHomologMap, const std::string& cichlidGene, const std::string& homologGene) {
    if (cichlidHomologMap.count(cichlidGene) == 0) {
        cichlidHomologMap[cichlidGene] = homologGene;
    } else {
        // Prefer zebrafish homologs as they have the best GO annotation
        if (cichlidHomologMap[cichlidGene].substr(0,6) == "ENSDAR") { return; }
        if (homologGene.substr(0,6) == "ENSDAR") { cichlidHomologMap[cichlidGene] = homologGene; }
        // Next best option is Medaka
        if (cichlidHomologMap[cichlidGene].substr(0,6) == "ENSORL") { return; }
        if (homologGene.substr(0,6) == "ENSORL") { cichlidHomologMap[cichlidGene] = homologGene; }
        // Next is stickleback:
        if (cichlidHomologMap[cichlidGene].substr(0,6) == "ENSGAC") { return; }
        if (homologGene.substr(0,6) == "ENSGAC") { cichlidHomologMap[cichlidGene] = homologGene; }
        // Tetraodon would be added only if there wasn't any other homolo before
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x3feb6
leaq 0x8(%r15), %rcx
cmpq %rcx, %rax
je 0xa106b
movq %r15, %rdi
movq %r14, %rsi
callq 0x3e394
leaq 0x8(%rsp), %r12
movl $0x6, %ecx
movq %r12, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x84a0
leaq 0x43c34(%rip), %rsi     # 0xe4ae2
movq %r12, %rdi
callq 0x8160
movl %eax, %ebp
movq (%r12), %rdi
leaq 0x18(%rsp), %r13
cmpq %r13, %rdi
je 0xa0ed3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
testl %ebp, %ebp
je 0xa1081
leaq 0x8(%rsp), %r12
movl $0x6, %ecx
movq %r12, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x84a0
leaq 0x43be9(%rip), %rsi     # 0xe4ae2
movq %r12, %rdi
callq 0x8160
movl %eax, %ebp
movq (%r12), %rdi
cmpq %r13, %rdi
je 0xa0f19
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
testl %ebp, %ebp
jne 0xa0f33
movq %r15, %rdi
movq %r14, %rsi
callq 0x3e394
movq %rax, %rdi
movq %rbx, %rsi
callq 0x8270
movq %r15, %rdi
movq %r14, %rsi
callq 0x3e394
leaq 0x8(%rsp), %r12
movl $0x6, %ecx
movq %r12, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x84a0
leaq 0x43b94(%rip), %rsi     # 0xe4af0
movq %r12, %rdi
callq 0x8160
movl %eax, %ebp
movq (%r12), %rdi
cmpq %r13, %rdi
je 0xa0f7c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
testl %ebp, %ebp
je 0xa1081
leaq 0x8(%rsp), %r12
movl $0x6, %ecx
movq %r12, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x84a0
leaq 0x43b4e(%rip), %rsi     # 0xe4af0
movq %r12, %rdi
callq 0x8160
movl %eax, %ebp
movq (%r12), %rdi
cmpq %r13, %rdi
je 0xa0fc2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
testl %ebp, %ebp
jne 0xa0fdc
movq %r15, %rdi
movq %r14, %rsi
callq 0x3e394
movq %rax, %rdi
movq %rbx, %rsi
callq 0x8270
movq %r15, %rdi
movq %r14, %rsi
callq 0x3e394
leaq 0x8(%rsp), %r12
movl $0x6, %ecx
movq %r12, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x84a0
leaq 0x43ae4(%rip), %rsi     # 0xe4ae9
movq %r12, %rdi
callq 0x8160
movl %eax, %ebp
movq (%r12), %rdi
cmpq %r13, %rdi
je 0xa1025
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
testl %ebp, %ebp
je 0xa1081
leaq 0x8(%rsp), %r12
movl $0x6, %ecx
movq %r12, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x84a0
leaq 0x43aa2(%rip), %rsi     # 0xe4ae9
movq %r12, %rdi
callq 0x8160
movl %eax, %ebp
movq (%r12), %rdi
cmpq %r13, %rdi
je 0xa1067
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
testl %ebp, %ebp
jne 0xa1081
movq %r15, %rdi
movq %r14, %rsi
callq 0x3e394
movq %rax, %rdi
movq %rbx, %rsi
callq 0x8270
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq