// File: BGI-Qingdao[P]metaSLR/classify.cpp
// Function: load_kmers(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
void load_kmers(const std::string & file,int index){
    assert( g_kmers.size() == index );
    g_kmers.push_back(std::unordered_set<Kmer>());
    std::ifstream ifs(file);
    std::string line;
    int total_kmer = 0 ;
    if(index==0){
        std::getline(ifs,line);
        g_K = line.size();
        Kmer::InitFilter(g_K);
        g_kmers[index].insert(Kmer::str2Kmer(BaseStr::str2BaseStr(line)));
        total_kmer++;
    }
    while(!std::getline(ifs,line).eof()){
        g_kmers[index].insert(Kmer::str2Kmer(BaseStr::str2BaseStr(line)));
        total_kmer++;
    }
    std::cerr<<"Recorded "<<total_kmer<<" haplotype "<<index<<" specific "<<g_K<<"-mers\n"; 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3a0, %rsp            # imm = 0x3A0
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
leaq 0x1ebef(%rip), %rdi     # 0x233d8
callq 0x6fa0
movslq -0xc(%rbp), %rcx
cmpq %rcx, %rax
jne 0x47f9
jmp 0x4818
leaq 0x1288c(%rip), %rdi     # 0x1708c
leaq 0x1289d(%rip), %rsi     # 0x170a4
movl $0x1d, %edx
leaq 0x1289e(%rip), %rcx     # 0x170b1
callq 0x41e0
xorps %xmm0, %xmm0
movaps %xmm0, -0x30(%rbp)
movaps %xmm0, -0x40(%rbp)
movaps %xmm0, -0x50(%rbp)
movq $0x0, -0x20(%rbp)
leaq -0x50(%rbp), %rdi
movq %rdi, -0x308(%rbp)
callq 0x7000
movq -0x308(%rbp), %rsi
leaq 0x1eb8b(%rip), %rdi     # 0x233d8
callq 0x6fd0
jmp 0x4854
leaq -0x50(%rbp), %rdi
callq 0x7020
movq -0x8(%rbp), %rsi
leaq -0x268(%rbp), %rdi
movl $0x8, %edx
callq 0x44b0
leaq -0x288(%rbp), %rdi
callq 0x43d0
movl $0x0, -0x28c(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x49cb
leaq -0x268(%rbp), %rdi
leaq -0x288(%rbp), %rsi
callq 0x4090
jmp 0x48a7
leaq -0x288(%rbp), %rdi
callq 0x4210
movl %eax, 0x1eb37(%rip)     # 0x233f0
movl 0x1eb31(%rip), %edi     # 0x233f0
callq 0x7040
jmp 0x48c6
movslq -0xc(%rbp), %rsi
leaq 0x1eb07(%rip), %rdi     # 0x233d8
callq 0x7080
movq %rax, -0x310(%rbp)
leaq -0x2b8(%rbp), %rdi
leaq -0x288(%rbp), %rsi
callq 0x71c0
jmp 0x48f2
leaq -0x2b8(%rbp), %rdi
callq 0x70e0
movq %rdx, -0x320(%rbp)
movq %rax, -0x318(%rbp)
jmp 0x490e
movq -0x310(%rbp), %rdi
movq -0x320(%rbp), %rax
movq -0x318(%rbp), %rcx
movq %rcx, -0x2a0(%rbp)
movq %rax, -0x298(%rbp)
leaq -0x2a0(%rbp), %rsi
callq 0x70a0
movb %dl, -0x329(%rbp)
movq %rax, -0x328(%rbp)
jmp 0x494c
movb -0x329(%rbp), %al
movq -0x328(%rbp), %rcx
movq %rcx, -0x2c8(%rbp)
movb %al, -0x2c0(%rbp)
leaq -0x2b8(%rbp), %rdi
callq 0x72b0
movl -0x28c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28c(%rbp)
jmp 0x49cb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x7020
jmp 0x4be5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x4bcd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x2b8(%rbp), %rdi
callq 0x72b0
jmp 0x4bcd
jmp 0x49cd
leaq -0x268(%rbp), %rdi
leaq -0x288(%rbp), %rsi
callq 0x4090
movq %rax, -0x338(%rbp)
jmp 0x49e9
movq -0x338(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x4580
movb %al, -0x339(%rbp)
jmp 0x4a07
movb -0x339(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x4a18
jmp 0x4af5
movslq -0xc(%rbp), %rsi
leaq 0x1e9b5(%rip), %rdi     # 0x233d8
callq 0x7080
movq %rax, -0x348(%rbp)
leaq -0x2f0(%rbp), %rdi
leaq -0x288(%rbp), %rsi
callq 0x71c0
jmp 0x4a44
leaq -0x2f0(%rbp), %rdi
callq 0x70e0
movq %rdx, -0x358(%rbp)
movq %rax, -0x350(%rbp)
jmp 0x4a60
movq -0x348(%rbp), %rdi
movq -0x358(%rbp), %rax
movq -0x350(%rbp), %rcx
movq %rcx, -0x2d8(%rbp)
movq %rax, -0x2d0(%rbp)
leaq -0x2d8(%rbp), %rsi
callq 0x70a0
movb %dl, -0x361(%rbp)
movq %rax, -0x360(%rbp)
jmp 0x4a9e
movb -0x361(%rbp), %al
movq -0x360(%rbp), %rcx
movq %rcx, -0x300(%rbp)
movb %al, -0x2f8(%rbp)
leaq -0x2f0(%rbp), %rdi
callq 0x72b0
movl -0x28c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28c(%rbp)
jmp 0x49cd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x2f0(%rbp), %rdi
callq 0x72b0
jmp 0x4bcd
movq 0x1e4f4(%rip), %rdi     # 0x22ff0
leaq 0x125d8(%rip), %rsi     # 0x170db
callq 0x42c0
movq %rax, -0x370(%rbp)
jmp 0x4b11
movq -0x370(%rbp), %rdi
movl -0x28c(%rbp), %esi
callq 0x4530
movq %rax, -0x378(%rbp)
jmp 0x4b2c
movq -0x378(%rbp), %rdi
leaq 0x125ab(%rip), %rsi     # 0x170e5
callq 0x42c0
movq %rax, -0x380(%rbp)
jmp 0x4b48
movq -0x380(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x4530
movq %rax, -0x388(%rbp)
jmp 0x4b60
movq -0x388(%rbp), %rdi
leaq 0x12583(%rip), %rsi     # 0x170f1
callq 0x42c0
movq %rax, -0x390(%rbp)
jmp 0x4b7c
movq -0x390(%rbp), %rdi
movl 0x1e867(%rip), %esi     # 0x233f0
callq 0x4530
movq %rax, -0x398(%rbp)
jmp 0x4b97
movq -0x398(%rbp), %rdi
leaq 0x12557(%rip), %rsi     # 0x170fc
callq 0x42c0
jmp 0x4bac
leaq -0x288(%rbp), %rdi
callq 0x41d0
leaq -0x268(%rbp), %rdi
callq 0x40a0
addq $0x3a0, %rsp            # imm = 0x3A0
popq %rbp
retq
leaq -0x288(%rbp), %rdi
callq 0x41d0
leaq -0x268(%rbp), %rdi
callq 0x40a0
movq -0x58(%rbp), %rdi
callq 0x4550
nop