// File: /workspace/github_cpp_makefile_star2_O3/soccin[P]BIC-RNAseq/tools/MergeFusion/Merger.cpp
// Function: Merger::loadHugoFile(char const*)
void Merger::loadHugoFile(const char* filename)
{
    int approved_symbol_index = 1;
    int approved_status_index = 3;
    int previous_symbol_index = 5;
    int synonyms_index = 7;
    int locus_index = 9;
    int accesion_index = 14;
    int refseq_id_index = 21;
    int vega_id_index = 25;
    
    // int entrez_id_ncbi_index = 28;
    // in omim_id_ncbi_index = 29;
    int refseq_id_ncbi_index = 30;
    //int uniprot_id_ncbi_index = 31;
    int ensembl_id_index = 32;
    int uscs_id_index = 33;
    ifstream input_fs(filename);
    if(!input_fs)
    {
        cerr << "Error: fail to open Hugo file: " << filename << endl;
        exit(1);
    }
    string line;
    getline(input_fs, line);
    while(getline(input_fs, line))
    {
        vector<string> parsed_item;
        split(line, '\t', parsed_item);
        if(parsed_item[approved_status_index] != "Approved")
            continue;
        string chr_key = locusToChr(parsed_item[locus_index]);
        if(parsed_item.size() >= 2)
            loadHugoWorker(chr_key, parsed_item[approved_symbol_index], parsed_item[approved_symbol_index]);
        if(parsed_item.size() >= 6)
            loadHugoWorker(chr_key, parsed_item[previous_symbol_index], parsed_item[approved_symbol_index]);
        if(parsed_item.size() >= 8)
            loadHugoWorker(chr_key, parsed_item[synonyms_index], parsed_item[approved_symbol_index]);
        if(parsed_item.size() >= 15)
            loadHugoWorker(chr_key, parsed_item[accesion_index], parsed_item[approved_symbol_index]);
        if(parsed_item.size() >= 22)
            loadHugoWorker(chr_key, parsed_item[refseq_id_index], parsed_item[approved_symbol_index]);
        if(parsed_item.size() >= 26)
            loadHugoWorker(chr_key, parsed_item[vega_id_index], parsed_item[approved_symbol_index]);
        if(parsed_item.size() >= 31)
            loadHugoWorker(chr_key, parsed_item[refseq_id_ncbi_index], parsed_item[approved_symbol_index]);
        if(parsed_item.size() >= 33)
            loadHugoWorker(chr_key, parsed_item[ensembl_id_index], parsed_item[approved_symbol_index]);
        if(parsed_item.size() >= 34)
            loadHugoWorker(chr_key, parsed_item[uscs_id_index], parsed_item[approved_symbol_index]);
    }
    input_fs.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x298, %rsp            # imm = 0x298
movq %rsi, %rbx
movq %rdi, -0x30(%rbp)
leaq -0x2b8(%rbp), %r14
movq %r14, %rdi
movl $0x8, %edx
callq 0x3360
movq (%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x298(%rbp,%rax)
jne 0x550e
leaq (%rax,%rbp), %rdi
addq $-0x2b8, %rdi           # imm = 0xFD48
leaq -0x80(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movl $0xa, %esi
callq 0x31d0
movsbl %al, %edx
leaq -0x90(%rbp), %rsi
movq %r14, %rdi
callq 0x3370
leaq -0x90(%rbp), %r15
leaq -0x50(%rbp), %r12
leaq 0x7410(%rip), %r13      # 0xc64c
movq -0x2b8(%rbp), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x3370
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x54c8
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
movq $0x0, -0x40(%rbp)
movq %r15, %rdi
movl $0x9, %esi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0xb49b
movq -0x50(%rbp), %rdi
addq $0x60, %rdi
movq %r13, %rsi
callq 0x30b0
testl %eax, %eax
jne 0x54bb
movq -0x50(%rbp), %rax
leaq -0xa0(%rbp), %rcx
movq %rcx, -0xb0(%rbp)
movq 0x120(%rax), %rsi
movq 0x128(%rax), %rdx
addq %rsi, %rdx
leaq -0xb0(%rbp), %rbx
movq %rbx, %rdi
callq 0x41d6
leaq -0x70(%rbp), %rdi
movq %rbx, %rdx
callq 0x4cf8
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x530d
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x3200
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %rax
subq %rcx, %rax
cmpq $0x21, %rax
jb 0x54a2
addq $0x20, %rcx
movq -0x30(%rbp), %rdi
leaq -0x70(%rbp), %rsi
movq %rcx, %rdx
callq 0x4e48
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %rax
subq %rcx, %rax
cmpq $0xa1, %rax
jb 0x54a2
leaq 0xa0(%rcx), %rdx
addq $0x20, %rcx
movq -0x30(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x4e48
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %rax
subq %rcx, %rax
cmpq $0xe1, %rax
jb 0x54a2
leaq 0xe0(%rcx), %rdx
addq $0x20, %rcx
movq -0x30(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x4e48
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %rax
subq %rcx, %rax
cmpq $0x1c1, %rax            # imm = 0x1C1
jb 0x54a2
leaq 0x1c0(%rcx), %rdx
addq $0x20, %rcx
movq -0x30(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x4e48
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %rax
subq %rcx, %rax
cmpq $0x2a1, %rax            # imm = 0x2A1
jb 0x54a2
leaq 0x2a0(%rcx), %rdx
addq $0x20, %rcx
movq -0x30(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x4e48
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %rax
subq %rcx, %rax
cmpq $0x321, %rax            # imm = 0x321
jb 0x54a2
leaq 0x320(%rcx), %rdx
addq $0x20, %rcx
movq -0x30(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x4e48
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %rax
subq %rcx, %rax
cmpq $0x3c1, %rax            # imm = 0x3C1
jb 0x54a2
leaq 0x3c0(%rcx), %rdx
addq $0x20, %rcx
movq -0x30(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x4e48
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %rax
subq %rcx, %rax
cmpq $0x401, %rax            # imm = 0x401
jb 0x54a2
leaq 0x400(%rcx), %rdx
addq $0x20, %rcx
movq -0x30(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x4e48
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %rax
subq %rcx, %rax
cmpq $0x421, %rax            # imm = 0x421
jb 0x54a2
leaq 0x420(%rcx), %rdx
addq $0x20, %rcx
movq -0x30(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x4e48
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x54bb
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x3200
movq %r12, %rdi
callq 0x5864
jmp 0x523c
leaq -0x2b8(%rbp), %rdi
callq 0x3080
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x54f0
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x3200
leaq -0x2b8(%rbp), %rdi
callq 0x3090
addq $0x298, %rsp            # imm = 0x298
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xbadb(%rip), %rdi      # 0x10ff0
leaq 0x7110(%rip), %rsi      # 0xc62c
movl $0x1f, %edx
callq 0x3250
movq 0xbac3(%rip), %rdi      # 0x10ff0
movq %rbx, %rsi
callq 0x31e0
movq %rax, %rdi
callq 0x3110
movl $0x1, %edi
callq 0x3260
movq %rax, %rbx
jmp 0x55ba
jmp 0x559b
movq %rax, %rbx
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x5590
movq -0x60(%rbp), %rsi
jmp 0x5583
jmp 0x558d
movq %rax, %rbx
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x5590
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x3200
jmp 0x5590
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x5864
jmp 0x559e
movq %rax, %rbx
leaq -0x80(%rbp), %rax
movq -0x90(%rbp), %rdi
cmpq %rax, %rdi
je 0x55ba
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x3200
leaq -0x2b8(%rbp), %rdi
callq 0x3090
movq %rbx, %rdi
callq 0x3340