// File: /workspace/github_cpp_makefile_star2_O3/soccin[P]BIC-RNAseq/tools/MergeFusion/StandardFusion.cpp
// Function: StandardFusion::normalize_gene_name_worker(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::map<std::pair<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::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, 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, int>>>, std::less<std::pair<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::allocator<std::pair<std::pair<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::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, 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, int>>>>>>&)
void StandardFusion::normalize_gene_name_worker(string& chrom_name, string& gene_name, map<pair<string, string>, map<string, int> >& hugo_map)
{
    map<string, int> hugo_names;
    vector<string> parsed_item;
    split(gene_name, ',', parsed_item, true);
    for(size_t i = 0 ; i < parsed_item.size(); i++)
    {
        string ori_sub_gene_name = parsed_item[i];
        string sub_gene_name = parsed_item[i];
        removeSpace(sub_gene_name);
        transform(sub_gene_name.begin(), sub_gene_name.end(),sub_gene_name.begin(), ::toupper);
        pair<string, string> combined_key = make_pair(chrom_name, sub_gene_name);
        string new_hugo_name;
        if(hugo_map.find(combined_key) != hugo_map.end() && hugo_map[combined_key].size() == 1)
        {
            new_hugo_name = hugo_map[combined_key].begin()->first;
        }
        else
        {
            new_hugo_name = ori_sub_gene_name;
        }
        if(hugo_names.find(new_hugo_name) == hugo_names.end())
            hugo_names.insert(make_pair(new_hugo_name, 1));
        else
            hugo_names[new_hugo_name]++;
    }
    string final_name;
    for(map<string, int>::iterator it = hugo_names.begin(); it != hugo_names.end(); it ++)
    {
        if(!final_name.empty())
            final_name.append(",");
        final_name.append(it->first);
    }
    gene_name = final_name;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %rcx, -0x30(%rbp)
movq %rdx, %rbx
movq %rsi, -0xc8(%rbp)
leaq -0x160(%rbp), %rcx
movl $0x0, (%rcx)
xorl %eax, %eax
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq -0xb0(%rbp), %rdx
movq %rax, 0x10(%rdx)
xorps %xmm0, %xmm0
movaps %xmm0, (%rdx)
movq %rbx, %rdi
movl $0x2c, %esi
movl $0x1, %ecx
callq 0xb49b
movq %rbx, -0xb8(%rbp)
movq -0xb0(%rbp), %rax
cmpq %rax, -0xa8(%rbp)
je 0xa850
leaq -0x80(%rbp), %r13
movq -0x30(%rbp), %rcx
addq $0x8, %rcx
movq %rcx, -0xc0(%rbp)
xorl %edx, %edx
leaq -0x70(%rbp), %rbx
leaq -0x138(%rbp), %r12
movq %r12, %r15
movq %rdx, -0xd0(%rbp)
movq %rdx, %r12
shlq $0x5, %r12
movq %r13, -0x90(%rbp)
movq (%rax,%r12), %rsi
movq 0x8(%rax,%r12), %rdx
addq %rsi, %rdx
leaq -0x90(%rbp), %rdi
callq 0x41d6
movq -0xb0(%rbp), %rax
leaq -0x60(%rbp), %rcx
movq %rcx, -0x70(%rbp)
movq (%rax,%r12), %rsi
movq 0x8(%rax,%r12), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x41d6
movq %rbx, %r14
movq %rbx, %rdi
callq 0xb344
movq -0x68(%rbp), %r12
testq %r12, %r12
je 0xa67f
movq -0x70(%rbp), %rbx
xorl %r13d, %r13d
movsbl (%rbx,%r13), %edi
callq 0x3380
movb %al, (%rbx,%r13)
incq %r13
cmpq %r13, %r12
jne 0xa669
movq %r15, %r12
movq %r15, %rdi
movq -0xc8(%rbp), %rsi
movq %r14, %rbx
movq %r14, %rdx
callq 0x5eae
leaq -0x40(%rbp), %r14
movq %r14, -0x50(%rbp)
movq $0x0, -0x48(%rbp)
movb $0x0, -0x40(%rbp)
movq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x7bba
cmpq -0xc0(%rbp), %rax
leaq -0x80(%rbp), %r13
je 0xa6f9
movq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x5920
cmpq $0x1, 0x28(%rax)
jne 0xa6f9
movq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x5920
leaq -0x50(%rbp), %r15
movq 0x18(%rax), %rsi
addq $0x20, %rsi
movq %r15, %rdi
callq 0x3130
jmp 0xa70c
leaq -0x50(%rbp), %r15
movq %r15, %rdi
leaq -0x90(%rbp), %rsi
callq 0x3130
leaq -0x168(%rbp), %rdi
movq %r15, %rsi
callq 0x819a
leaq -0x160(%rbp), %rcx
cmpq %rcx, %rax
je 0xa73b
leaq -0x168(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x59be
incl (%rax)
jmp 0xa79e
leaq -0xe8(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
leaq -0xf8(%rbp), %r15
movq %r15, %rdi
callq 0x41d6
movl $0x1, -0xd8(%rbp)
leaq -0x168(%rbp), %rdi
movq %r15, %rsi
callq 0x8238
movq -0xf8(%rbp), %rdi
leaq -0xe8(%rbp), %rax
cmpq %rax, %rdi
je 0xa79e
movq -0xe8(%rbp), %rsi
incq %rsi
callq 0x3200
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0xa7b3
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x3200
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0xa7d5
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x3200
movq -0x138(%rbp), %rdi
leaq -0x128(%rbp), %rax
cmpq %rax, %rdi
je 0xa7f7
movq -0x128(%rbp), %rsi
incq %rsi
callq 0x3200
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0xa810
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x3200
movq -0x90(%rbp), %rdi
cmpq %r13, %rdi
je 0xa828
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x3200
movq -0xd0(%rbp), %rdx
incq %rdx
movq -0xb0(%rbp), %rax
movq -0xa8(%rbp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
cmpq %rcx, %rdx
jb 0xa5fb
leaq -0x128(%rbp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
movq -0x150(%rbp), %rbx
leaq -0x160(%rbp), %r13
cmpq %r13, %rbx
je 0xa8c6
xorl %eax, %eax
leaq -0x138(%rbp), %r14
leaq 0x2403(%rip), %r15      # 0xcc90
testq %rax, %rax
je 0xa89d
movq %r14, %rdi
movq %r15, %rsi
callq 0x33a0
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
movq %r14, %rdi
callq 0x30c0
movq %rbx, %rdi
callq 0x3160
cmpq %r13, %rax
je 0xa8c6
movq %rax, %rbx
movq -0x130(%rbp), %rax
jmp 0xa88d
leaq -0x138(%rbp), %rsi
movq -0xb8(%rbp), %rdi
callq 0x3130
movq -0x138(%rbp), %rdi
cmpq %r12, %rdi
je 0xa8f4
movq -0x128(%rbp), %rsi
incq %rsi
callq 0x3200
leaq -0xb0(%rbp), %rdi
callq 0x5864
leaq -0x168(%rbp), %rdi
callq 0x625e
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xa9e7
jmp 0xa95b
movq %rax, %rbx
movq -0xf8(%rbp), %rdi
leaq -0xe8(%rbp), %rax
cmpq %rax, %rdi
je 0xa94f
movq -0xe8(%rbp), %rsi
incq %rsi
callq 0x3200
jmp 0xa94f
movq %rax, %rbx
leaq -0x40(%rbp), %r14
jmp 0xa971
jmp 0xa96e
jmp 0xa96e
jmp 0xa96e
movq %rax, %rbx
jmp 0xa9c7
movq %rax, %rbx
jmp 0xa9af
jmp 0xa967
movq %rax, %rbx
jmp 0xa992
jmp 0xa96e
movq %rax, %rbx
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0xa986
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x3200
leaq -0x138(%rbp), %rdi
callq 0x5a3e
leaq -0x80(%rbp), %r13
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0xa9af
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x3200
movq -0x90(%rbp), %rdi
cmpq %r13, %rdi
je 0xa9c7
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x3200
leaq -0xb0(%rbp), %rdi
callq 0x5864
leaq -0x168(%rbp), %rdi
callq 0x625e
movq %rbx, %rdi
callq 0x3340
movq %rax, %rbx
movq -0x138(%rbp), %rdi
cmpq %r12, %rdi
je 0xa9c7
movq -0x128(%rbp), %rsi
jmp 0xa9bf
nop