// File: BGI-Qingdao[P]metaSLR/classify.cpp
// Function: TestAll()
void TestAll(){
    assert(parseName("VSDSDS#XXX_xxx_s/1")=="XXX_xxx_s");
    Kmer::InitFilter(5);
    auto str1=BaseStr::str2BaseStr("AGCTC");
    int  t1[] = { '\000','\003','\001','\002','\001'};
    for( int i = 0 ; i <5 ; i++ ) assert(str1[i] == t1[i]);
    auto str2 = BaseStr::str2BaseStr("GAGCT");
    int  t2[] = {'\003','\000','\003','\001','\002'};
    for( int i = 0 ; i <5 ; i++ ) assert(str2[i] == t2[i]);
                         // 00 1101 1001
    assert(Kmer::str2Kmer(BaseStr::str2BaseStr("AGCTC")).low == 0xD9);
    assert(Kmer::str2Kmer(BaseStr::str2BaseStr("AGCTC")).high == 0);
    assert(Kmer::str2Kmer(BaseStr::str2BaseStr("GAGCT")).low == 0xD9);
    assert(Kmer::str2Kmer(BaseStr::str2BaseStr("GAGCT")).high == 0);
    auto kmers = Kmer::chopRead2Kmer(BaseStr::str2BaseStr("GAGCTA"));
    assert(kmers.size() == 2 );
    // GAGCT->AGCTC 00 1101 1001 -> 0xD9
    // AGCTA        00 1101 1000 -> 0xD8
    assert(kmers[0].high == 0 );
    assert(kmers[0].low == 0xD9 );
    assert(kmers[1].high == 0 );
    assert(kmers[1].low == 0xD8 );
    std::string k1 = BaseStr::BaseStr2Str(Kmer::ToBaseStr(kmers[0]));
    std::string k2 = BaseStr::BaseStr2Str(Kmer::ToBaseStr(kmers[1]));
    assert(k1 == "AGCTC");
    assert(k2 == "AGCTA");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3b0, %rsp            # imm = 0x3B0
leaq -0x41(%rbp), %rdi
movq %rdi, -0x328(%rbp)
callq 0x4560
movq -0x328(%rbp), %rdx
leaq 0x1166c(%rip), %rsi     # 0x172d5
leaq -0x40(%rbp), %rdi
callq 0x43b0
jmp 0x5c74
leaq -0x20(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x5060
jmp 0x5c83
leaq 0x1165e(%rip), %rsi     # 0x172e8
leaq -0x20(%rbp), %rdi
callq 0x7310
movb %al, -0x329(%rbp)
jmp 0x5c9b
movb -0x329(%rbp), %al
testb $0x1, %al
jne 0x5ca7
jmp 0x5ca9
jmp 0x5d04
leaq 0x11642(%rip), %rdi     # 0x172f2
leaq 0x113ed(%rip), %rsi     # 0x170a4
movl $0x14d, %edx            # imm = 0x14D
leaq 0x1165c(%rip), %rcx     # 0x1731f
callq 0x41e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x5e0e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x5e05
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x41d0
jmp 0x5e05
leaq -0x20(%rbp), %rdi
callq 0x41d0
leaq -0x40(%rbp), %rdi
callq 0x41d0
leaq -0x41(%rbp), %rdi
callq 0x4320
movl $0x5, %edi
callq 0x7040
leaq -0x91(%rbp), %rdi
movq %rdi, -0x338(%rbp)
callq 0x4560
movq -0x338(%rbp), %rdx
leaq 0x115e4(%rip), %rsi     # 0x1732e
leaq -0x90(%rbp), %rdi
callq 0x43b0
jmp 0x5d58
leaq -0x70(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x71c0
jmp 0x5d6a
leaq -0x90(%rbp), %rdi
callq 0x41d0
leaq -0x91(%rbp), %rdi
callq 0x4320
movq 0x112c7(%rip), %rax     # 0x17050
movq %rax, -0xb0(%rbp)
movq 0x112c1(%rip), %rax     # 0x17058
movq %rax, -0xa8(%rbp)
movl 0x112bc(%rip), %eax     # 0x17060
movl %eax, -0xa0(%rbp)
movl $0x0, -0xb4(%rbp)
cmpl $0x5, -0xb4(%rbp)
jge 0x5e69
movslq -0xb4(%rbp), %rsi
leaq -0x70(%rbp), %rdi
callq 0x83c0
movsbl (%rax), %eax
movslq -0xb4(%rbp), %rcx
cmpl -0xb0(%rbp,%rcx,4), %eax
jne 0x5de6
jmp 0x5e53
leaq 0x11547(%rip), %rdi     # 0x17334
leaq 0x112b0(%rip), %rsi     # 0x170a4
movl $0x151, %edx            # imm = 0x151
leaq 0x1151f(%rip), %rcx     # 0x1731f
callq 0x41e0
leaq -0x40(%rbp), %rdi
callq 0x41d0
leaq -0x41(%rbp), %rdi
callq 0x4320
jmp 0x6824
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x5e42
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x41d0
leaq -0x91(%rbp), %rdi
callq 0x4320
jmp 0x6824
jmp 0x5e55
movl -0xb4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb4(%rbp)
jmp 0x5db4
leaq -0xf1(%rbp), %rdi
movq %rdi, -0x340(%rbp)
callq 0x4560
movq -0x340(%rbp), %rdx
leaq 0x114bb(%rip), %rsi     # 0x17345
leaq -0xf0(%rbp), %rdi
callq 0x43b0
jmp 0x5e98
leaq -0xd0(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x71c0
jmp 0x5ead
leaq -0xf0(%rbp), %rdi
callq 0x41d0
leaq -0xf1(%rbp), %rdi
callq 0x4320
movq 0x111a4(%rip), %rax     # 0x17070
movq %rax, -0x110(%rbp)
movq 0x1119e(%rip), %rax     # 0x17078
movq %rax, -0x108(%rbp)
movl 0x11199(%rip), %eax     # 0x17080
movl %eax, -0x100(%rbp)
movl $0x0, -0x114(%rbp)
cmpl $0x5, -0x114(%rbp)
jge 0x5f98
movslq -0x114(%rbp), %rsi
leaq -0xd0(%rbp), %rdi
callq 0x83c0
movsbl (%rax), %eax
movslq -0x114(%rbp), %rcx
cmpl -0x110(%rbp,%rcx,4), %eax
jne 0x5f2c
jmp 0x5f82
leaq 0x11418(%rip), %rdi     # 0x1734b
leaq 0x1116a(%rip), %rsi     # 0x170a4
movl $0x154, %edx            # imm = 0x154
leaq 0x113d9(%rip), %rcx     # 0x1731f
callq 0x41e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x5f71
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x41d0
leaq -0xf1(%rbp), %rdi
callq 0x4320
jmp 0x681b
jmp 0x5f84
movl -0x114(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x114(%rbp)
jmp 0x5ef7
leaq -0x161(%rbp), %rdi
movq %rdi, -0x348(%rbp)
callq 0x4560
movq -0x348(%rbp), %rdx
leaq 0x11375(%rip), %rsi     # 0x1732e
leaq -0x160(%rbp), %rdi
callq 0x43b0
jmp 0x5fc7
leaq -0x140(%rbp), %rdi
leaq -0x160(%rbp), %rsi
callq 0x71c0
jmp 0x5fdc
leaq -0x140(%rbp), %rdi
callq 0x70e0
movq %rdx, -0x358(%rbp)
movq %rax, -0x350(%rbp)
jmp 0x5ff8
movq -0x358(%rbp), %rax
movq -0x350(%rbp), %rcx
movq %rcx, -0x128(%rbp)
movq %rax, -0x120(%rbp)
cmpq $0xd9, -0x120(%rbp)
jne 0x6023
jmp 0x6081
leaq 0x11332(%rip), %rdi     # 0x1735c
leaq 0x11073(%rip), %rsi     # 0x170a4
movl $0x156, %edx            # imm = 0x156
leaq 0x112e2(%rip), %rcx     # 0x1731f
callq 0x41e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x6158
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x614c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x140(%rbp), %rdi
callq 0x72b0
jmp 0x614c
leaq -0x140(%rbp), %rdi
callq 0x72b0
leaq -0x160(%rbp), %rdi
callq 0x41d0
leaq -0x161(%rbp), %rdi
callq 0x4320
leaq -0x1b1(%rbp), %rdi
movq %rdi, -0x360(%rbp)
callq 0x4560
movq -0x360(%rbp), %rdx
leaq 0x11268(%rip), %rsi     # 0x1732e
leaq -0x1b0(%rbp), %rdi
callq 0x43b0
jmp 0x60d4
leaq -0x190(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
callq 0x71c0
jmp 0x60e9
leaq -0x190(%rbp), %rdi
callq 0x70e0
movq %rdx, -0x370(%rbp)
movq %rax, -0x368(%rbp)
jmp 0x6105
movq -0x370(%rbp), %rax
movq -0x368(%rbp), %rcx
movq %rcx, -0x178(%rbp)
movq %rax, -0x170(%rbp)
cmpq $0x0, -0x178(%rbp)
jne 0x612d
jmp 0x61a8
leaq 0x11262(%rip), %rdi     # 0x17396
leaq 0x10f69(%rip), %rsi     # 0x170a4
movl $0x157, %edx            # imm = 0x157
leaq 0x111d8(%rip), %rcx     # 0x1731f
callq 0x41e0
leaq -0x160(%rbp), %rdi
callq 0x41d0
leaq -0x161(%rbp), %rdi
callq 0x4320
jmp 0x680f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x6282
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x6276
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x72b0
jmp 0x6276
leaq -0x190(%rbp), %rdi
callq 0x72b0
leaq -0x1b0(%rbp), %rdi
callq 0x41d0
leaq -0x1b1(%rbp), %rdi
callq 0x4320
leaq -0x201(%rbp), %rdi
movq %rdi, -0x378(%rbp)
callq 0x4560
movq -0x378(%rbp), %rdx
leaq 0x11158(%rip), %rsi     # 0x17345
leaq -0x200(%rbp), %rdi
callq 0x43b0
jmp 0x61fb
leaq -0x1e0(%rbp), %rdi
leaq -0x200(%rbp), %rsi
callq 0x71c0
jmp 0x6210
leaq -0x1e0(%rbp), %rdi
callq 0x70e0
movq %rdx, -0x388(%rbp)
movq %rax, -0x380(%rbp)
jmp 0x622c
movq -0x388(%rbp), %rax
movq -0x380(%rbp), %rcx
movq %rcx, -0x1c8(%rbp)
movq %rax, -0x1c0(%rbp)
cmpq $0xd9, -0x1c0(%rbp)
jne 0x6257
jmp 0x62d2
leaq 0x11170(%rip), %rdi     # 0x173ce
leaq 0x10e3f(%rip), %rsi     # 0x170a4
movl $0x158, %edx            # imm = 0x158
leaq 0x110ae(%rip), %rcx     # 0x1731f
callq 0x41e0
leaq -0x1b0(%rbp), %rdi
callq 0x41d0
leaq -0x1b1(%rbp), %rdi
callq 0x4320
jmp 0x680f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x63a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x639d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x1e0(%rbp), %rdi
callq 0x72b0
jmp 0x639d
leaq -0x1e0(%rbp), %rdi
callq 0x72b0
leaq -0x200(%rbp), %rdi
callq 0x41d0
leaq -0x201(%rbp), %rdi
callq 0x4320
leaq -0x251(%rbp), %rdi
movq %rdi, -0x390(%rbp)
callq 0x4560
movq -0x390(%rbp), %rdx
leaq 0x1102e(%rip), %rsi     # 0x17345
leaq -0x250(%rbp), %rdi
callq 0x43b0
jmp 0x6325
leaq -0x230(%rbp), %rdi
leaq -0x250(%rbp), %rsi
callq 0x71c0
jmp 0x633a
leaq -0x230(%rbp), %rdi
callq 0x70e0
movq %rdx, -0x3a0(%rbp)
movq %rax, -0x398(%rbp)
jmp 0x6356
movq -0x3a0(%rbp), %rax
movq -0x398(%rbp), %rcx
movq %rcx, -0x218(%rbp)
movq %rax, -0x210(%rbp)
cmpq $0x0, -0x218(%rbp)
jne 0x637e
jmp 0x63f9
leaq 0x11083(%rip), %rdi     # 0x17408
leaq 0x10d18(%rip), %rsi     # 0x170a4
movl $0x159, %edx            # imm = 0x159
leaq 0x10f87(%rip), %rcx     # 0x1731f
callq 0x41e0
leaq -0x200(%rbp), %rdi
callq 0x41d0
leaq -0x201(%rbp), %rdi
callq 0x4320
jmp 0x680f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x64dc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x64d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x230(%rbp), %rdi
callq 0x72b0
jmp 0x64d0
leaq -0x230(%rbp), %rdi
callq 0x72b0
leaq -0x250(%rbp), %rdi
callq 0x41d0
leaq -0x251(%rbp), %rdi
callq 0x4320
leaq -0x2a9(%rbp), %rdi
movq %rdi, -0x3a8(%rbp)
callq 0x4560
movq -0x3a8(%rbp), %rdx
leaq 0x11002(%rip), %rsi     # 0x17440
leaq -0x2a8(%rbp), %rdi
callq 0x43b0
jmp 0x644c
leaq -0x288(%rbp), %rdi
leaq -0x2a8(%rbp), %rsi
callq 0x71c0
jmp 0x6461
leaq -0x270(%rbp), %rdi
leaq -0x288(%rbp), %rsi
callq 0x7e00
jmp 0x6476
leaq -0x288(%rbp), %rdi
callq 0x72b0
leaq -0x2a8(%rbp), %rdi
callq 0x41d0
leaq -0x2a9(%rbp), %rdi
callq 0x4320
leaq -0x270(%rbp), %rdi
callq 0x8060
cmpq $0x2, %rax
jne 0x64b1
jmp 0x653e
leaq 0x10f8f(%rip), %rdi     # 0x17447
leaq 0x10be5(%rip), %rsi     # 0x170a4
movl $0x15b, %edx            # imm = 0x15B
leaq 0x10e54(%rip), %rcx     # 0x1731f
callq 0x41e0
leaq -0x250(%rbp), %rdi
callq 0x41d0
leaq -0x251(%rbp), %rdi
callq 0x4320
jmp 0x680f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x652d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x6521
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x288(%rbp), %rdi
callq 0x72b0
leaq -0x2a8(%rbp), %rdi
callq 0x41d0
leaq -0x2a9(%rbp), %rdi
callq 0x4320
jmp 0x680f
leaq -0x270(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x83e0
cmpq $0x0, (%rax)
jne 0x6556
jmp 0x6575
leaq 0x10efc(%rip), %rdi     # 0x17459
leaq 0x10b40(%rip), %rsi     # 0x170a4
movl $0x15e, %edx            # imm = 0x15E
leaq 0x10daf(%rip), %rcx     # 0x1731f
callq 0x41e0
leaq -0x270(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x83e0
cmpq $0xd9, 0x8(%rax)
jne 0x6591
jmp 0x65b0
leaq 0x10ed4(%rip), %rdi     # 0x1746c
leaq 0x10b05(%rip), %rsi     # 0x170a4
movl $0x15f, %edx            # imm = 0x15F
leaq 0x10d74(%rip), %rcx     # 0x1731f
callq 0x41e0
leaq -0x270(%rbp), %rdi
movl $0x1, %esi
callq 0x83e0
cmpq $0x0, (%rax)
jne 0x65c9
jmp 0x65e8
leaq 0x10eb1(%rip), %rdi     # 0x17481
leaq 0x10acd(%rip), %rsi     # 0x170a4
movl $0x160, %edx            # imm = 0x160
leaq 0x10d3c(%rip), %rcx     # 0x1731f
callq 0x41e0
leaq -0x270(%rbp), %rdi
movl $0x1, %esi
callq 0x83e0
cmpq $0xd8, 0x8(%rax)
jne 0x6605
jmp 0x6624
leaq 0x10e88(%rip), %rdi     # 0x17494
leaq 0x10a91(%rip), %rsi     # 0x170a4
movl $0x161, %edx            # imm = 0x161
leaq 0x10d00(%rip), %rcx     # 0x1731f
callq 0x41e0
xorl %eax, %eax
movl %eax, %esi
leaq -0x270(%rbp), %rdi
callq 0x83e0
movq %rax, %rsi
leaq -0x2e8(%rbp), %rdi
callq 0x8280
jmp 0x6645
leaq -0x2d0(%rbp), %rdi
leaq -0x2e8(%rbp), %rsi
callq 0x8180
jmp 0x665a
leaq -0x2e8(%rbp), %rdi
callq 0x72b0
leaq -0x270(%rbp), %rdi
movl $0x1, %esi
callq 0x83e0
movq %rax, %rsi
leaq -0x320(%rbp), %rdi
callq 0x8280
jmp 0x6688
leaq -0x308(%rbp), %rdi
leaq -0x320(%rbp), %rsi
callq 0x8180
jmp 0x669d
leaq -0x320(%rbp), %rdi
callq 0x72b0
leaq 0x10c7e(%rip), %rsi     # 0x1732e
leaq -0x2d0(%rbp), %rdi
callq 0x7310
movb %al, -0x3a9(%rbp)
jmp 0x66c4
movb -0x3a9(%rbp), %al
testb $0x1, %al
jne 0x66d0
jmp 0x66d5
jmp 0x676d
leaq 0x10dcd(%rip), %rdi     # 0x174a9
leaq 0x109c1(%rip), %rsi     # 0x170a4
movl $0x164, %edx            # imm = 0x164
leaq 0x10c30(%rip), %rcx     # 0x1731f
callq 0x41e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x6803
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x2e8(%rbp), %rdi
callq 0x72b0
jmp 0x6803
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x67f7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x320(%rbp), %rdi
callq 0x72b0
jmp 0x67f7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x308(%rbp), %rdi
callq 0x41d0
jmp 0x67f7
leaq 0x10ccd(%rip), %rsi     # 0x17441
leaq -0x308(%rbp), %rdi
callq 0x7310
movb %al, -0x3aa(%rbp)
jmp 0x6788
movb -0x3aa(%rbp), %al
testb $0x1, %al
jne 0x6794
jmp 0x6796
jmp 0x67b5
leaq 0x10d1a(%rip), %rdi     # 0x174b7
leaq 0x10900(%rip), %rsi     # 0x170a4
movl $0x165, %edx            # imm = 0x165
leaq 0x10b6f(%rip), %rcx     # 0x1731f
callq 0x41e0
leaq -0x308(%rbp), %rdi
callq 0x41d0
leaq -0x2d0(%rbp), %rdi
callq 0x41d0
leaq -0x270(%rbp), %rdi
callq 0x8360
leaq -0xd0(%rbp), %rdi
callq 0x72b0
leaq -0x70(%rbp), %rdi
callq 0x72b0
addq $0x3b0, %rsp            # imm = 0x3B0
popq %rbp
retq
leaq -0x2d0(%rbp), %rdi
callq 0x41d0
leaq -0x270(%rbp), %rdi
callq 0x8360
leaq -0xd0(%rbp), %rdi
callq 0x72b0
leaq -0x70(%rbp), %rdi
callq 0x72b0
movq -0x50(%rbp), %rdi
callq 0x4550
nopl (%rax)