// File: /workspace/github_cpp_makefile_star2_O2/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 $0x138, %rsp            # imm = 0x138
movq %rcx, %rbx
leaq -0xa8(%rbp), %r13
andl $0x0, (%r13)
andq $0x0, 0x8(%r13)
movq %r13, 0x10(%r13)
movq %r13, 0x18(%r13)
andq $0x0, 0x20(%r13)
movq %rdx, %rdi
movq %rsi, -0x78(%rbp)
xorps %xmm0, %xmm0
leaq -0x60(%rbp), %rdx
movaps %xmm0, (%rdx)
andq $0x0, 0x10(%rdx)
pushq $0x2c
popq %rsi
pushq $0x1
popq %rcx
movq %rdi, -0x68(%rbp)
callq 0x865f
leaq 0x8(%rbx), %rax
movq %rax, -0x70(%rbp)
xorl %r12d, %r12d
leaq -0x110(%rbp), %r14
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rax
subq %rsi, %rax
sarq $0x5, %rax
cmpq %rax, %r12
jae 0x7e53
movq %r12, -0x80(%rbp)
shlq $0x5, %r12
addq %r12, %rsi
leaq -0x130(%rbp), %rdi
callq 0x2240
addq -0x60(%rbp), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x2240
movq %r14, %rdi
movq %rbx, %r15
callq 0x8628
movq -0x110(%rbp), %r12
movq -0x108(%rbp), %rbx
xorl %r13d, %r13d
cmpq %r13, %rbx
je 0x7d3e
movsbl (%r12,%r13), %edi
callq 0x2340
movb %al, (%r12,%r13)
incq %r13
jmp 0x7d26
leaq -0xf0(%rbp), %r12
movq %r12, %rdi
movq -0x78(%rbp), %rsi
movq %r14, %rdx
callq 0x4236
leaq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
andq $0x0, -0x40(%rbp)
movb $0x0, -0x38(%rbp)
movq %r15, %rbx
movq %r15, %rdi
movq %r12, %rsi
callq 0x58c8
leaq -0xa8(%rbp), %r13
cmpq -0x70(%rbp), %rax
je 0x7db3
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3ea4
cmpq $0x1, 0x28(%rax)
jne 0x7db3
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3ea4
leaq -0x48(%rbp), %r15
movq 0x18(%rax), %rsi
addq $0x20, %rsi
movq %r15, %rdi
callq 0x2120
jmp 0x7dc6
leaq -0x48(%rbp), %r15
movq %r15, %rdi
leaq -0x130(%rbp), %rsi
callq 0x2120
leaq -0xb0(%rbp), %rdi
movq %r15, %rsi
callq 0x5eec
cmpq %r13, %rax
je 0x7dee
leaq -0xb0(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x3f0e
incl (%rax)
jmp 0x7e22
leaq -0x158(%rbp), %r15
movq %r15, %rdi
leaq -0x48(%rbp), %rsi
callq 0x2240
movl $0x1, -0x138(%rbp)
leaq -0xb0(%rbp), %rdi
movq %r15, %rsi
callq 0x5f76
movq %r15, %rdi
callq 0x2388
leaq -0x48(%rbp), %rdi
callq 0x2388
movq %r12, %rdi
callq 0x3f78
movq %r14, %rdi
callq 0x2388
leaq -0x130(%rbp), %rdi
callq 0x2388
movq -0x80(%rbp), %r12
incq %r12
jmp 0x7ccc
leaq -0xe0(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq -0x98(%rbp), %r15
leaq -0xf0(%rbp), %rbx
leaq 0x1e15(%rip), %r14      # 0x9c90
cmpq %r13, %r15
je 0x7eae
cmpq $0x0, -0xe8(%rbp)
je 0x7e95
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2350
leaq 0x20(%r15), %rsi
movq %rbx, %rdi
callq 0x2370
movq %r15, %rdi
callq 0x2140
movq %rax, %r15
jmp 0x7e7b
leaq -0xf0(%rbp), %rsi
movq -0x68(%rbp), %rdi
callq 0x2120
leaq -0xf0(%rbp), %rdi
callq 0x2388
leaq -0x60(%rbp), %rdi
callq 0x3e58
leaq -0xb0(%rbp), %rdi
callq 0x460c
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7f6e
jmp 0x7f12
movq %rax, %rbx
leaq -0x158(%rbp), %rdi
callq 0x2388
jmp 0x7f24
jmp 0x7f21
jmp 0x7f21
jmp 0x7f21
jmp 0x7f17
jmp 0x7f21
jmp 0x7f21
movq %rax, %rbx
jmp 0x7f51
movq %rax, %rbx
jmp 0x7f39
movq %rax, %rbx
jmp 0x7f45
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x2388
leaq -0xf0(%rbp), %rdi
callq 0x3f78
leaq -0x110(%rbp), %rdi
callq 0x2388
leaq -0x130(%rbp), %rdi
callq 0x2388
leaq -0x60(%rbp), %rdi
callq 0x3e58
leaq -0xb0(%rbp), %rdi
callq 0x460c
movq %rbx, %rdi
callq 0x2300
movq %rax, %rbx
leaq -0xf0(%rbp), %rdi
jmp 0x7f4c