// File: BGI-Qingdao[P]metaSLR/classify.cpp
// Function: InitAdaptor()
void InitAdaptor(){
    //std::string r1("CTGTCTCTTATACACATCTTAGGAAGACAAGCACTGACGACATGATCACCAAGGATCGCCATAGTCCATGCTAAAGGACGTCAGGAAGGGCGATCTCAGG");
    //std::string r2("TCTGCTGAGTCGAGAACGTCTCTGTGAGCCAAGGAGTTGCTCTGGCGACGGCCACGAAGCTAACAGCCAATCTGCGTAACAGCCAAACCTGAGATCGCCC");
    std::string r1("CTGTCTCTTATACACATCTTAGGAAGACAAGCACTGACGACATGA");
    std::string r2("TCTGCTGAGTCGAGAACGTCTCTGTGAGCCAAGGAGTTGCTCTGG");

    std::vector<Kmer> kmers = Kmer::chopRead2Kmer(BaseStr::str2BaseStr(r1));
    for(int i = 0 ; i <(int)kmers.size();i++){
    //for(int i = 0 ; i <(int)r1.size()-g_K+1;i++){
        const Kmer & kmer = kmers.at(i);
        //std::string kmer = get_cannonical(r1.substr(i,g_K));
        for ( int j = 0 ; j < (int)g_kmers.size() ; j ++ ){
            if( g_kmers[j].find(kmer) != g_kmers[j].end() ){
                g_kmers[j].erase(kmer);
                std::cerr<<" INFO : erase adaptor kmer from hap "<<j<<" ; kmer="<<BaseStr::BaseStr2Str(Kmer::ToBaseStr(kmer))<<std::endl;
            }
        }
    }
    std::vector<Kmer> kmers2 = Kmer::chopRead2Kmer(BaseStr::str2BaseStr(r2));
    for(int i = 0 ; i <(int)kmers2.size();i++){
    //for(int i = 0 ; i <(int)r1.size()-g_K+1;i++){
        const Kmer & kmer = kmers2.at(i);
        //std::string kmer = get_cannonical(r1.substr(i,g_K));
        for ( int j = 0 ; j < (int)g_kmers.size() ; j ++ ){
            if( g_kmers[j].find(kmer) != g_kmers[j].end() ){
                g_kmers[j].erase(kmer);
                std::cerr<<" INFO : erase adaptor kmer from hap "<<j<<" ; kmer="<<BaseStr::BaseStr2Str(Kmer::ToBaseStr(kmer))<<std::endl;
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x210, %rsp            # imm = 0x210
leaq -0x21(%rbp), %rdi
movq %rdi, -0x188(%rbp)
callq 0x4560
movq -0x188(%rbp), %rdx
leaq 0x11ba7(%rip), %rsi     # 0x17120
leaq -0x20(%rbp), %rdi
callq 0x43b0
jmp 0x5584
leaq -0x21(%rbp), %rdi
callq 0x4320
leaq -0x59(%rbp), %rdi
movq %rdi, -0x190(%rbp)
callq 0x4560
movq -0x190(%rbp), %rdx
leaq 0x11ba3(%rip), %rsi     # 0x1714e
leaq -0x58(%rbp), %rdi
callq 0x43b0
jmp 0x55b6
leaq -0x59(%rbp), %rdi
callq 0x4320
leaq -0x90(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x71c0
jmp 0x55d1
leaq -0x78(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x7e00
jmp 0x55e3
leaq -0x90(%rbp), %rdi
callq 0x72b0
movl $0x0, -0x94(%rbp)
movl -0x94(%rbp), %eax
movl %eax, -0x194(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x8060
movq %rax, %rcx
movl -0x194(%rbp), %eax
cmpl %ecx, %eax
jge 0x58b5
movslq -0x94(%rbp), %rsi
leaq -0x78(%rbp), %rdi
callq 0x8080
movq %rax, -0x1a0(%rbp)
jmp 0x5638
movq -0x1a0(%rbp), %rax
movq %rax, -0xa0(%rbp)
movl $0x0, -0xa4(%rbp)
movl -0xa4(%rbp), %eax
movl %eax, -0x1a4(%rbp)
leaq 0x1dd75(%rip), %rdi     # 0x233d8
callq 0x6fa0
movq %rax, %rcx
movl -0x1a4(%rbp), %eax
cmpl %ecx, %eax
jge 0x589f
movslq -0xa4(%rbp), %rsi
leaq 0x1dd51(%rip), %rdi     # 0x233d8
callq 0x7080
movq %rax, %rdi
movq -0xa0(%rbp), %rsi
callq 0x80f0
movq %rax, -0x1b0(%rbp)
jmp 0x56a4
movq -0x1b0(%rbp), %rax
movq %rax, -0xb0(%rbp)
movslq -0xa4(%rbp), %rsi
leaq 0x1dd18(%rip), %rdi     # 0x233d8
callq 0x7080
movq %rax, %rdi
callq 0x8120
movq %rax, -0xb8(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x80c0
testb $0x1, %al
jne 0x56f0
jmp 0x5889
movslq -0xa4(%rbp), %rsi
leaq 0x1dcda(%rip), %rdi     # 0x233d8
callq 0x7080
movq %rax, %rdi
movq -0xa0(%rbp), %rsi
callq 0x8150
jmp 0x5714
movq 0x1d8d5(%rip), %rdi     # 0x22ff0
leaq 0x11a5a(%rip), %rsi     # 0x1717c
callq 0x42c0
movq %rax, -0x1b8(%rbp)
jmp 0x5730
movq -0x1b8(%rbp), %rdi
movl -0xa4(%rbp), %esi
callq 0x4530
movq %rax, -0x1c0(%rbp)
jmp 0x574b
movq -0x1c0(%rbp), %rdi
leaq 0x11a48(%rip), %rsi     # 0x171a1
callq 0x42c0
movq %rax, -0x1c8(%rbp)
jmp 0x5767
movq -0xa0(%rbp), %rsi
leaq -0xf0(%rbp), %rdi
callq 0x8280
jmp 0x577c
leaq -0xd8(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x8180
jmp 0x5791
movq -0x1c8(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x4270
movq %rax, -0x1d0(%rbp)
jmp 0x57ad
movq -0x1d0(%rbp), %rdi
movq 0x1d7f5(%rip), %rsi     # 0x22fb0
callq 0x4310
jmp 0x57c2
leaq -0xd8(%rbp), %rdi
callq 0x41d0
leaq -0xf0(%rbp), %rdi
callq 0x72b0
jmp 0x5889
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x21(%rbp), %rdi
callq 0x4320
jmp 0x5bc0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x59(%rbp), %rdi
callq 0x4320
jmp 0x5bb7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x5bae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x72b0
jmp 0x5bae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x5ba5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x5878
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x41d0
leaq -0xf0(%rbp), %rdi
callq 0x72b0
jmp 0x5ba5
jmp 0x588b
movl -0xa4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa4(%rbp)
jmp 0x5650
jmp 0x58a1
movl -0x94(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x94(%rbp)
jmp 0x55f9
leaq -0x120(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x71c0
jmp 0x58c7
leaq -0x108(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x7e00
jmp 0x58dc
leaq -0x120(%rbp), %rdi
callq 0x72b0
movl $0x0, -0x124(%rbp)
movl -0x124(%rbp), %eax
movl %eax, -0x1d4(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x8060
movq %rax, %rcx
movl -0x1d4(%rbp), %eax
cmpl %ecx, %eax
jge 0x5b69
movslq -0x124(%rbp), %rsi
leaq -0x108(%rbp), %rdi
callq 0x8080
movq %rax, -0x1e0(%rbp)
jmp 0x5937
movq -0x1e0(%rbp), %rax
movq %rax, -0x130(%rbp)
movl $0x0, -0x134(%rbp)
movl -0x134(%rbp), %eax
movl %eax, -0x1e4(%rbp)
leaq 0x1da76(%rip), %rdi     # 0x233d8
callq 0x6fa0
movq %rax, %rcx
movl -0x1e4(%rbp), %eax
cmpl %ecx, %eax
jge 0x5b53
movslq -0x134(%rbp), %rsi
leaq 0x1da52(%rip), %rdi     # 0x233d8
callq 0x7080
movq %rax, %rdi
movq -0x130(%rbp), %rsi
callq 0x80f0
movq %rax, -0x1f0(%rbp)
jmp 0x59a3
movq -0x1f0(%rbp), %rax
movq %rax, -0x140(%rbp)
movslq -0x134(%rbp), %rsi
leaq 0x1da19(%rip), %rdi     # 0x233d8
callq 0x7080
movq %rax, %rdi
callq 0x8120
movq %rax, -0x148(%rbp)
leaq -0x140(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0x80c0
testb $0x1, %al
jne 0x59ef
jmp 0x5b3d
movslq -0x134(%rbp), %rsi
leaq 0x1d9db(%rip), %rdi     # 0x233d8
callq 0x7080
movq %rax, %rdi
movq -0x130(%rbp), %rsi
callq 0x8150
jmp 0x5a13
movq 0x1d5d6(%rip), %rdi     # 0x22ff0
leaq 0x1175b(%rip), %rsi     # 0x1717c
callq 0x42c0
movq %rax, -0x1f8(%rbp)
jmp 0x5a2f
movq -0x1f8(%rbp), %rdi
movl -0x134(%rbp), %esi
callq 0x4530
movq %rax, -0x200(%rbp)
jmp 0x5a4a
movq -0x200(%rbp), %rdi
leaq 0x11749(%rip), %rsi     # 0x171a1
callq 0x42c0
movq %rax, -0x208(%rbp)
jmp 0x5a66
movq -0x130(%rbp), %rsi
leaq -0x180(%rbp), %rdi
callq 0x8280
jmp 0x5a7b
leaq -0x168(%rbp), %rdi
leaq -0x180(%rbp), %rsi
callq 0x8180
jmp 0x5a90
movq -0x208(%rbp), %rdi
leaq -0x168(%rbp), %rsi
callq 0x4270
movq %rax, -0x210(%rbp)
jmp 0x5aac
movq -0x210(%rbp), %rdi
movq 0x1d4f6(%rip), %rsi     # 0x22fb0
callq 0x4310
jmp 0x5ac1
leaq -0x168(%rbp), %rdi
callq 0x41d0
leaq -0x180(%rbp), %rdi
callq 0x72b0
jmp 0x5b3d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x120(%rbp), %rdi
callq 0x72b0
jmp 0x5ba5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x5b99
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x5b2f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x168(%rbp), %rdi
callq 0x41d0
leaq -0x180(%rbp), %rdi
callq 0x72b0
jmp 0x5b99
jmp 0x5b3f
movl -0x134(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x134(%rbp)
jmp 0x594f
jmp 0x5b55
movl -0x124(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x124(%rbp)
jmp 0x58f2
leaq -0x108(%rbp), %rdi
callq 0x8360
leaq -0x78(%rbp), %rdi
callq 0x8360
leaq -0x58(%rbp), %rdi
callq 0x41d0
leaq -0x20(%rbp), %rdi
callq 0x41d0
addq $0x210, %rsp            # imm = 0x210
popq %rbp
retq
leaq -0x108(%rbp), %rdi
callq 0x8360
leaq -0x78(%rbp), %rdi
callq 0x8360
leaq -0x58(%rbp), %rdi
callq 0x41d0
leaq -0x20(%rbp), %rdi
callq 0x41d0
movq -0x30(%rbp), %rdi
callq 0x4550
nopl (%rax)