// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
leaq -0xb0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x5d0a(%rip), %rsi      # 0xa098
leaq 0x5d30(%rip), %rdx      # 0xa0c5
leaq -0xc0(%rbp), %rdi
callq 0x8ef4
leaq -0x90(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x5d13(%rip), %rsi      # 0xa0c6
leaq 0x5d39(%rip), %rdx      # 0xa0f3
leaq -0xa0(%rbp), %rdi
callq 0x8ef4
leaq -0x48(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x56ac
leaq -0x80(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x5d1e
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0x43f1
callq 0x3230
movq -0x80(%rbp), %rbx
movq -0x78(%rbp), %rax
movq %rax, %rdx
subq %rbx, %rdx
sarq $0x4, %rdx
testl %edx, %edx
jle 0x459b
xorl %esi, %esi
cmpq %rsi, %rdx
jbe 0x47d3
movq 0x9f03(%rip), %rcx      # 0xe320
movq 0x9ef4(%rip), %r8       # 0xe318
subq %r8, %rcx
shrq $0x3, %rcx
imull $0xb6db6db7, %ecx, %ecx # imm = 0xB6DB6DB7
testl %ecx, %ecx
jle 0x457b
movq %rsi, -0x50(%rbp)
movq %rsi, %rax
shlq $0x4, %rax
addq %rax, %rbx
xorl %r12d, %r12d
xorl %r13d, %r13d
leaq (%r8,%r12), %rdi
movq 0x8(%rbx), %rcx
movq %rcx, %rax
xorl %edx, %edx
divq 0x8(%r8,%r12)
movq %rdx, %rsi
movq %rbx, %rdx
callq 0x8d0a
testq %rax, %rax
je 0x4542
cmpq $0x0, (%rax)
je 0x4542
movq 0x9e94(%rip), %rdi      # 0xe318
addq %r12, %rdi
movq %rbx, %rsi
callq 0x8f92
movl $0x24, %edx
movq 0x9b55(%rip), %rdi      # 0xdff0
leaq 0x5c52(%rip), %rsi      # 0xa0f4
callq 0x3290
movq 0x9b42(%rip), %rdi      # 0xdff0
movl %r13d, %esi
callq 0x33f0
movq %rax, %r15
movl $0x8, %edx
movq %rax, %rdi
leaq 0x5c51(%rip), %rsi      # 0xa119
callq 0x3290
leaq -0x68(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x607e
leaq -0x48(%rbp), %rdi
movq %r14, %rsi
callq 0x5fd2
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %r15, %rdi
callq 0x3290
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3240
movsbl %al, %esi
movq %r15, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31a0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x4534
callq 0x3230
movq -0x68(%rbp), %rdi
testq %rdi, %rdi
je 0x4542
callq 0x3230
incq %r13
movq 0x9dd4(%rip), %rax      # 0xe320
movq 0x9dc5(%rip), %r8       # 0xe318
subq %r8, %rax
shrq $0x3, %rax
imull $0xb6db6db7, %eax, %eax # imm = 0xB6DB6DB7
cltq
addq $0x38, %r12
cmpq %rax, %r13
jl 0x444d
movq -0x80(%rbp), %rbx
movq -0x78(%rbp), %rax
movq -0x50(%rbp), %rsi
incq %rsi
movq %rax, %rcx
subq %rbx, %rcx
movq %rcx, %rdx
sarq $0x4, %rdx
shrq $0x4, %rcx
movslq %ecx, %rcx
cmpq %rcx, %rsi
jl 0x440d
leaq -0x48(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x56ac
leaq -0x68(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x5d1e
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0x45c6
callq 0x3230
movq -0x68(%rbp), %rbx
movq -0x60(%rbp), %rax
movq %rax, %rdx
subq %rbx, %rdx
sarq $0x4, %rdx
testl %edx, %edx
jle 0x4776
xorl %esi, %esi
cmpq %rsi, %rdx
jbe 0x47e1
movq 0x9d2e(%rip), %rcx      # 0xe320
movq 0x9d1f(%rip), %r8       # 0xe318
subq %r8, %rcx
shrq $0x3, %rcx
imull $0xb6db6db7, %ecx, %ecx # imm = 0xB6DB6DB7
testl %ecx, %ecx
jle 0x4756
movq %rsi, -0x50(%rbp)
movq %rsi, %rax
shlq $0x4, %rax
addq %rax, %rbx
xorl %r12d, %r12d
xorl %r13d, %r13d
leaq (%r8,%r12), %rdi
movq 0x8(%rbx), %rcx
movq %rcx, %rax
xorl %edx, %edx
divq 0x8(%r8,%r12)
movq %rdx, %rsi
movq %rbx, %rdx
callq 0x8d0a
testq %rax, %rax
je 0x471d
cmpq $0x0, (%rax)
je 0x471d
movq 0x9cbf(%rip), %rdi      # 0xe318
addq %r12, %rdi
movq %rbx, %rsi
callq 0x8f92
movl $0x24, %edx
movq 0x9980(%rip), %rdi      # 0xdff0
leaq 0x5a7d(%rip), %rsi      # 0xa0f4
callq 0x3290
movq 0x996d(%rip), %rdi      # 0xdff0
movl %r13d, %esi
callq 0x33f0
movq %rax, %r15
movl $0x8, %edx
movq %rax, %rdi
leaq 0x5a7c(%rip), %rsi      # 0xa119
callq 0x3290
leaq -0xd8(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x607e
leaq -0x48(%rbp), %rdi
movq %r14, %rsi
callq 0x5fd2
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %r15, %rdi
callq 0x3290
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3240
movsbl %al, %esi
movq %r15, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31a0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x470c
callq 0x3230
movq -0xd8(%rbp), %rdi
testq %rdi, %rdi
je 0x471d
callq 0x3230
incq %r13
movq 0x9bf9(%rip), %rax      # 0xe320
movq 0x9bea(%rip), %r8       # 0xe318
subq %r8, %rax
shrq $0x3, %rax
imull $0xb6db6db7, %eax, %eax # imm = 0xB6DB6DB7
cltq
addq $0x38, %r12
cmpq %rax, %r13
jl 0x4622
movq -0x68(%rbp), %rbx
movq -0x60(%rbp), %rax
movq -0x50(%rbp), %rsi
incq %rsi
movq %rax, %rcx
subq %rbx, %rcx
movq %rcx, %rdx
sarq $0x4, %rdx
shrq $0x4, %rcx
movslq %ecx, %rcx
cmpq %rcx, %rsi
jl 0x45e2
testq %rbx, %rbx
je 0x4783
movq %rbx, %rdi
callq 0x3230
movq -0x80(%rbp), %rdi
testq %rdi, %rdi
je 0x4791
callq 0x3230
movq -0xa0(%rbp), %rdi
leaq -0x90(%rbp), %rax
cmpq %rax, %rdi
je 0x47a9
callq 0x3230
movq -0xc0(%rbp), %rdi
leaq -0xb0(%rbp), %rax
cmpq %rax, %rdi
je 0x47c1
callq 0x3230
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5d35(%rip), %rdi      # 0xa50f
xorl %eax, %eax
callq 0x3350
leaq 0x5d27(%rip), %rdi      # 0xa50f
xorl %eax, %eax
callq 0x3350
movq %rax, %rbx
movq -0x48(%rbp), %rdi
jmp 0x484f
jmp 0x485b
movq %rax, %rbx
movq -0x48(%rbp), %rdi
jmp 0x4862
movq %rax, %rbx
jmp 0x486c
movq %rax, %rbx
jmp 0x4884
jmp 0x4820
jmp 0x485b
jmp 0x4820
movq %rax, %rbx
jmp 0x483a
jmp 0x485b
jmp 0x4820
jmp 0x4820
jmp 0x485b
movq %rax, %rbx
jmp 0x484b
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x483a
callq 0x3230
movq -0xd8(%rbp), %rdi
testq %rdi, %rdi
je 0x484b
callq 0x3230
movq -0x68(%rbp), %rdi
testq %rdi, %rdi
je 0x485e
callq 0x3230
jmp 0x485e
movq %rax, %rbx
movq -0x80(%rbp), %rdi
testq %rdi, %rdi
je 0x486c
callq 0x3230
leaq -0x90(%rbp), %rax
movq -0xa0(%rbp), %rdi
cmpq %rax, %rdi
je 0x4884
callq 0x3230
movq -0xc0(%rbp), %rdi
leaq -0xb0(%rbp), %rax
cmpq %rax, %rdi
je 0x489c
callq 0x3230
movq %rbx, %rdi
callq 0x3400
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
jne 0x4846
jmp 0x484b