// File: /workspace/github_cpp_makefile_star2_O2/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 %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x321a0
testq %rax, %rax
je 0x7682d
movq %r15, %rdi
movq %r14, %rsi
callq 0x3210e
movq %rsp, %r12
pushq $0x6
popq %rcx
movq %r12, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x84b0
leaq 0x366fe(%rip), %rsi     # 0xacdb2
movq %r12, %rdi
callq 0x2193f
movl %eax, %ebp
movq %r12, %rdi
callq 0x8978
testb %bpl, %bpl
jne 0x76820
movq %rsp, %r12
pushq $0x6
popq %rcx
movq %r12, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x84b0
leaq 0x366c9(%rip), %rsi     # 0xacdb2
movq %r12, %rdi
callq 0x2193f
movl %eax, %ebp
movq %r12, %rdi
callq 0x8978
testb %bpl, %bpl
je 0x76716
movq %r15, %rdi
movq %r14, %rsi
callq 0x3210e
movq %rax, %rdi
movq %rbx, %rsi
callq 0x82a0
movq %r15, %rdi
movq %r14, %rsi
callq 0x3210e
movq %rsp, %r12
pushq $0x6
popq %rcx
movq %r12, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x84b0
leaq 0x36685(%rip), %rsi     # 0xacdc0
movq %r12, %rdi
callq 0x2193f
movl %eax, %ebp
movq %r12, %rdi
callq 0x8978
testb %bpl, %bpl
jne 0x76820
movq %rsp, %r12
pushq $0x6
popq %rcx
movq %r12, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x84b0
leaq 0x36650(%rip), %rsi     # 0xacdc0
movq %r12, %rdi
callq 0x2193f
movl %eax, %ebp
movq %r12, %rdi
callq 0x8978
testb %bpl, %bpl
je 0x7679d
movq %r15, %rdi
movq %r14, %rsi
callq 0x3210e
movq %rax, %rdi
movq %rbx, %rsi
callq 0x82a0
movq %r15, %rdi
movq %r14, %rsi
callq 0x3210e
movq %rsp, %r12
pushq $0x6
popq %rcx
movq %r12, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x84b0
leaq 0x365f7(%rip), %rsi     # 0xacdb9
movq %r12, %rdi
callq 0x2193f
movl %eax, %ebp
movq %r12, %rdi
callq 0x8978
testb %bpl, %bpl
jne 0x76820
movq %rsp, %r12
pushq $0x6
popq %rcx
movq %r12, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x84b0
leaq 0x365c6(%rip), %rsi     # 0xacdb9
movq %r12, %rdi
callq 0x2193f
movl %eax, %ebp
movq %r12, %rdi
callq 0x8978
testb %bpl, %bpl
je 0x76820
movq %r15, %rdi
movq %r14, %rsi
callq 0x3210e
movq %rax, %rdi
movq %rbx, %rsi
callq 0x82a0
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movq %r14, %rsi
callq 0x3210e
movq %rax, %rdi
movq %rbx, %rsi
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x82a0
nop