// File: /workspace/github_cpp_makefile_star2_O1/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 0xb466
movq %rbx, -0xb8(%rbp)
movq -0xb0(%rbp), %rax
cmpq %rax, -0xa8(%rbp)
je 0xa834
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 0x41f8
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 0x41f8
movq %rbx, %r14
movq %rbx, %rdi
callq 0xb324
movq -0x68(%rbp), %r12
testq %r12, %r12
je 0xa663
movq -0x70(%rbp), %rbx
xorl %r13d, %r13d
movsbl (%rbx,%r13), %edi
callq 0x3380
movb %al, (%rbx,%r13)
incq %r13
cmpq %r13, %r12
jne 0xa64d
movq %r15, %r12
movq %r15, %rdi
movq -0xc8(%rbp), %rsi
movq %r14, %rbx
movq %r14, %rdx
callq 0x5e5e
leaq -0x40(%rbp), %r14
movq %r14, -0x50(%rbp)
movq $0x0, -0x48(%rbp)
movb $0x0, -0x40(%rbp)
movq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x7b7e
cmpq -0xc0(%rbp), %rax
leaq -0x80(%rbp), %r13
je 0xa6dd
movq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x58d2
cmpq $0x1, 0x28(%rax)
jne 0xa6dd
movq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x58d2
leaq -0x50(%rbp), %r15
movq 0x18(%rax), %rsi
addq $0x20, %rsi
movq %r15, %rdi
callq 0x3130
jmp 0xa6f0
leaq -0x50(%rbp), %r15
movq %r15, %rdi
leaq -0x90(%rbp), %rsi
callq 0x3130
leaq -0x168(%rbp), %rdi
movq %r15, %rsi
callq 0x8178
leaq -0x160(%rbp), %rcx
cmpq %rcx, %rax
je 0xa71f
leaq -0x168(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x596e
incl (%rax)
jmp 0xa782
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 0x41f8
movl $0x1, -0xd8(%rbp)
leaq -0x168(%rbp), %rdi
movq %r15, %rsi
callq 0x8216
movq -0xf8(%rbp), %rdi
leaq -0xe8(%rbp), %rax
cmpq %rax, %rdi
je 0xa782
movq -0xe8(%rbp), %rsi
incq %rsi
callq 0x3200
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0xa797
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x3200
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0xa7b9
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x3200
movq -0x138(%rbp), %rdi
leaq -0x128(%rbp), %rax
cmpq %rax, %rdi
je 0xa7db
movq -0x128(%rbp), %rsi
incq %rsi
callq 0x3200
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0xa7f4
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x3200
movq -0x90(%rbp), %rdi
cmpq %r13, %rdi
je 0xa80c
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 0xa5df
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 0xa8a4
leaq -0x138(%rbp), %r14
leaq 0x2421(%rip), %r15      # 0xcc90
cmpq $0x0, -0x130(%rbp)
je 0xa884
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
movq %rax, %rbx
cmpq %r13, %rax
jne 0xa86f
leaq -0x138(%rbp), %rsi
movq -0xb8(%rbp), %rdi
callq 0x3130
movq -0x138(%rbp), %rdi
cmpq %r12, %rdi
je 0xa8d2
movq -0x128(%rbp), %rsi
incq %rsi
callq 0x3200
leaq -0xb0(%rbp), %rdi
callq 0x581a
leaq -0x168(%rbp), %rdi
callq 0x620e
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xa9c5
jmp 0xa939
movq %rax, %rbx
movq -0xf8(%rbp), %rdi
leaq -0xe8(%rbp), %rax
cmpq %rax, %rdi
je 0xa92d
movq -0xe8(%rbp), %rsi
incq %rsi
callq 0x3200
jmp 0xa92d
movq %rax, %rbx
leaq -0x40(%rbp), %r14
jmp 0xa94f
jmp 0xa94c
jmp 0xa94c
jmp 0xa94c
movq %rax, %rbx
jmp 0xa9a5
movq %rax, %rbx
jmp 0xa98d
jmp 0xa945
movq %rax, %rbx
jmp 0xa970
jmp 0xa94c
movq %rax, %rbx
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0xa964
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x3200
leaq -0x138(%rbp), %rdi
callq 0x59ee
leaq -0x80(%rbp), %r13
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0xa98d
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x3200
movq -0x90(%rbp), %rdi
cmpq %r13, %rdi
je 0xa9a5
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x3200
leaq -0xb0(%rbp), %rdi
callq 0x581a
leaq -0x168(%rbp), %rdi
callq 0x620e
movq %rbx, %rdi
callq 0x3340
movq %rax, %rbx
movq -0x138(%rbp), %rdi
cmpq %r12, %rdi
je 0xa9a5
movq -0x128(%rbp), %rsi
jmp 0xa99d
nop