// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $0x8
popq %rdx
movq %r14, %rdi
callq 0x2320
movq (%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x298(%rbp,%rax)
jne 0x3c06
leaq -0x60(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x2b8(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x2060
leaq -0x70(%rbp), %r15
leaq -0x50(%rbp), %r13
leaq -0x90(%rbp), %r12
leaq -0xb0(%rbp), %rbx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2060
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x3bd3
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
andq $0x0, -0x40(%rbp)
movq %r15, %rdi
pushq $0x9
popq %rsi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x865f
movq -0x50(%rbp), %rdi
addq $0x60, %rdi
leaq 0x5c4e(%rip), %rsi      # 0x964c
callq 0x2d53
testb %al, %al
jne 0x3bc6
movq -0x50(%rbp), %rsi
movl $0x120, %eax            # imm = 0x120
addq %rax, %rsi
movq %r12, %rdi
callq 0x2240
movq %rbx, %rdi
movq %r12, %rdx
callq 0x35c4
movq %r12, %rdi
callq 0x2388
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %rax
subq %rcx, %rax
cmpq $0x21, %rax
jb 0x3bbe
addq $0x20, %rcx
movq -0x30(%rbp), %rdi
movq %rbx, %rsi
movq %rcx, %rdx
callq 0x36e4
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %rax
subq %rcx, %rax
cmpq $0xa1, %rax
jb 0x3bbe
leaq 0xa0(%rcx), %rdx
addq $0x20, %rcx
movq -0x30(%rbp), %rdi
movq %rbx, %rsi
callq 0x36e4
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %rax
subq %rcx, %rax
cmpq $0xe1, %rax
jb 0x3bbe
leaq 0xe0(%rcx), %rdx
addq $0x20, %rcx
movq -0x30(%rbp), %rdi
movq %rbx, %rsi
callq 0x36e4
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %rax
subq %rcx, %rax
cmpq $0x1c1, %rax            # imm = 0x1C1
jb 0x3bbe
leaq 0x1c0(%rcx), %rdx
addq $0x20, %rcx
movq -0x30(%rbp), %rdi
movq %rbx, %rsi
callq 0x36e4
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %rax
subq %rcx, %rax
cmpq $0x2a1, %rax            # imm = 0x2A1
jb 0x3bbe
leaq 0x2a0(%rcx), %rdx
addq $0x20, %rcx
movq -0x30(%rbp), %rdi
movq %rbx, %rsi
callq 0x36e4
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %rax
subq %rcx, %rax
cmpq $0x321, %rax            # imm = 0x321
jb 0x3bbe
leaq 0x320(%rcx), %rdx
addq $0x20, %rcx
movq -0x30(%rbp), %rdi
movq %rbx, %rsi
callq 0x36e4
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %rax
subq %rcx, %rax
cmpq $0x3c1, %rax            # imm = 0x3C1
jb 0x3bbe
leaq 0x3c0(%rcx), %rdx
addq $0x20, %rcx
movq -0x30(%rbp), %rdi
movq %rbx, %rsi
callq 0x36e4
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %rax
subq %rcx, %rax
cmpq $0x401, %rax            # imm = 0x401
jb 0x3bbe
leaq 0x400(%rcx), %rdx
addq $0x20, %rcx
movq -0x30(%rbp), %rdi
movq %rbx, %rsi
callq 0x36e4
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %rax
subq %rcx, %rax
cmpq $0x421, %rax            # imm = 0x421
jb 0x3bbe
leaq 0x420(%rcx), %rdx
addq $0x20, %rcx
movq -0x30(%rbp), %rdi
movq %rbx, %rsi
callq 0x36e4
movq %rbx, %rdi
callq 0x2388
movq %r13, %rdi
callq 0x3e58
jmp 0x39b6
leaq -0x2b8(%rbp), %rdi
callq 0x2070
leaq -0x70(%rbp), %rdi
callq 0x2388
leaq -0x2b8(%rbp), %rdi
callq 0x2090
addq $0x298, %rsp            # imm = 0x298
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xa3e3(%rip), %rdi      # 0xdff0
leaq 0x5a18(%rip), %rsi      # 0x962c
callq 0x21b0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x21b0
movq %rax, %rdi
callq 0x2100
pushq $0x1
popq %rdi
callq 0x2210
movq %rax, %rbx
jmp 0x3c74
jmp 0x3c68
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
jmp 0x3c53
jmp 0x3c5a
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x2388
jmp 0x3c5d
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x3e58
jmp 0x3c6b
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x2388
leaq -0x2b8(%rbp), %rdi
callq 0x2090
movq %rbx, %rdi
callq 0x2300