// File: /workspace/github_cpp_makefile_star2_O1/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 $0x288, %rsp            # imm = 0x288
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x2a8(%rbp), %r15
movq %r15, %rdi
movl $0x8, %edx
callq 0x3360
movq (%r15), %rax
movq -0x18(%rax), %rcx
testb $0x5, -0x288(%rbp,%rcx)
jne 0x54cf
leaq -0x70(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq $0x0, -0x8(%rcx)
movb $0x0, (%rcx)
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %edx
leaq -0x2a8(%rbp), %r14
leaq -0x80(%rbp), %rsi
movq %r14, %rdi
callq 0x3370
leaq -0x80(%rbp), %r15
leaq -0xa0(%rbp), %r13
movq -0x2a8(%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 0x548c
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
movq $0x0, -0x30(%rbp)
movq %r15, %rdi
movl $0x9, %esi
leaq -0x40(%rbp), %rdx
xorl %ecx, %ecx
callq 0xb466
movq -0x40(%rbp), %rdi
addq $0x60, %rdi
leaq 0x73b5(%rip), %rsi      # 0xc64c
callq 0x30b0
testl %eax, %eax
jne 0x547e
movq -0x40(%rbp), %rax
leaq -0x50(%rbp), %rcx
movq %rcx, -0x60(%rbp)
movq 0x120(%rax), %rsi
movq 0x128(%rax), %rdx
addq %rsi, %rdx
leaq -0x60(%rbp), %r12
movq %r12, %rdi
callq 0x41f8
movq %r13, %rdi
movq %r12, %rdx
callq 0x4cf2
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x52f1
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x3200
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rax
subq %rcx, %rax
cmpq $0x21, %rax
jb 0x5314
addq $0x20, %rcx
movq %rbx, %rdi
movq %r13, %rsi
movq %rcx, %rdx
callq 0x4e42
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rax
subq %rcx, %rax
cmpq $0xa1, %rax
jb 0x533d
leaq 0xa0(%rcx), %rdx
addq $0x20, %rcx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4e42
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rax
subq %rcx, %rax
cmpq $0xe1, %rax
jb 0x5366
leaq 0xe0(%rcx), %rdx
addq $0x20, %rcx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4e42
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rax
subq %rcx, %rax
cmpq $0x1c1, %rax            # imm = 0x1C1
jb 0x538f
leaq 0x1c0(%rcx), %rdx
addq $0x20, %rcx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4e42
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rax
subq %rcx, %rax
cmpq $0x2a1, %rax            # imm = 0x2A1
jb 0x53b8
leaq 0x2a0(%rcx), %rdx
addq $0x20, %rcx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4e42
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rax
subq %rcx, %rax
cmpq $0x321, %rax            # imm = 0x321
jb 0x53e1
leaq 0x320(%rcx), %rdx
addq $0x20, %rcx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4e42
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rax
subq %rcx, %rax
cmpq $0x3c1, %rax            # imm = 0x3C1
jb 0x540a
leaq 0x3c0(%rcx), %rdx
addq $0x20, %rcx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4e42
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rax
subq %rcx, %rax
cmpq $0x401, %rax            # imm = 0x401
jb 0x5433
leaq 0x400(%rcx), %rdx
addq $0x20, %rcx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4e42
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rax
subq %rcx, %rax
cmpq $0x421, %rax            # imm = 0x421
jb 0x545c
leaq 0x420(%rcx), %rdx
addq $0x20, %rcx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4e42
movq -0xa0(%rbp), %rdi
leaq -0x90(%rbp), %rax
cmpq %rax, %rdi
je 0x547e
movq -0x90(%rbp), %rsi
incq %rsi
callq 0x3200
leaq -0x40(%rbp), %rdi
callq 0x581a
jmp 0x522e
leaq -0x2a8(%rbp), %rdi
callq 0x3080
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0x54b1
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x3200
leaq -0x2a8(%rbp), %rdi
callq 0x3090
addq $0x288, %rsp            # imm = 0x288
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xbb1a(%rip), %rdi      # 0x10ff0
leaq 0x714f(%rip), %rsi      # 0xc62c
movl $0x1f, %edx
callq 0x3250
movq 0xbb02(%rip), %rdi      # 0x10ff0
movq %r14, %rsi
callq 0x31e0
movq %rax, %rdi
callq 0x3110
movl $0x1, %edi
callq 0x3260
movq %rax, %rbx
jmp 0x5578
jmp 0x555c
movq %rax, %rbx
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x5551
movq -0x50(%rbp), %rsi
jmp 0x5549
jmp 0x5527
movq %rax, %rbx
jmp 0x5551
movq %rax, %rbx
movq -0xa0(%rbp), %rdi
leaq -0x90(%rbp), %rax
cmpq %rax, %rdi
je 0x5551
movq -0x90(%rbp), %rsi
incq %rsi
callq 0x3200
leaq -0x40(%rbp), %rdi
callq 0x581a
jmp 0x555f
movq %rax, %rbx
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0x5578
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x3200
leaq -0x2a8(%rbp), %rdi
callq 0x3090
movq %rbx, %rdi
callq 0x3340