// File: /workspace/github_cpp_makefile_star2_O1/BGI-Qingdao[P]metaSLR/classify.cpp
// Function: main
int main(int argc ,char ** argv ){
    TestAll();
    static struct option long_options[] = {
        {"hap",  required_argument,  NULL, 'k'},
        {"read", required_argument,  NULL, 'r'},
        {"thread",required_argument, NULL, 't'},
        {"help",  no_argument,       NULL, 'h'},
        {0, 0, 0, 0}
    };
    static char optstring[] = "k:l:r:t:h";
    std::string hap0 , hap1 ;
    std::vector<std::string> haps;
    std::vector<std::string> read;
    int t_num=1;
    while(1){
        int c = getopt_long(argc, argv, optstring, long_options, NULL);
        if (c<0) break;
        switch (c){
            case 'k':
                haps.push_back(std::string(optarg));
                break;
            case 'r':
                read.push_back(std::string(optarg));
                break;
            case 't':
                t_num = atoi(optarg);
                break;
            case 'h':
            default :
                printUsage();
                return -1;
        }
    }
    if( haps.size() < 2 || read.empty() || t_num< 1) {
        printUsage();
        return -1;
    }
    std::cerr<<"__START__"<<std::endl;
    logtime();
    for( int i = 0 ; i < (int)haps.size() ; i++ ) {
        std::cerr<<"__load hap "<<i<<" kmers from file "<<haps[i]<<std::endl;
        load_kmers(haps[i],i);
    }
    InitAdaptor();
    logtime();
    BarcodeCache data;
    for(const auto r : read ){
        std::cerr<<"__process read: "<<r<<std::endl;
        processFastq(r,t_num,data);
        logtime();
        std::cerr<<"__process read done__"<<std::endl;
    }
    std::cerr<<"__print result__"<<std::endl;
    printBarcodeInfos(data,haps);
    logtime();
    std::cerr<<"__END__"<<std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %r15
movl %edi, %r12d
callq 0x49c8
leaq -0xf0(%rbp), %rax
movq %rax, -0x10(%rax)
xorl %ecx, %ecx
movq %rcx, -0x8(%rax)
movb %cl, (%rax)
leaq -0xd0(%rbp), %rax
movq %rax, -0x10(%rax)
movq %rcx, -0x8(%rax)
movb %cl, (%rax)
leaq -0x50(%rbp), %rax
movq %rcx, 0x10(%rax)
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
leaq -0x90(%rbp), %rax
movq $0x0, -0x58(%rbp)
movq %rcx, 0x10(%rax)
movaps %xmm0, (%rax)
movl $0x1, -0x2c(%rbp)
leaq 0x91e0(%rip), %rbx      # 0xe2e0
leaq 0x9139(%rip), %r13      # 0xe240
leaq -0xc0(%rbp), %r14
movl %r12d, %edi
movq %r15, %rsi
movq %rbx, %rdx
movq %r13, %rcx
xorl %r8d, %r8d
callq 0x33b0
testl %eax, %eax
js 0x515d
cmpl $0x74, %eax
je 0x51a3
cmpl $0x72, %eax
je 0x5164
cmpl $0x6b, %eax
jne 0x51b9
movq 0x8e78(%rip), %rax      # 0xdfb8
movq (%rax), %rsi
movq %r14, %rdi
leaq -0x78(%rbp), %rdx
callq 0x3110
leaq -0x50(%rbp), %rdi
movq %r14, %rsi
callq 0x90d4
jmp 0x5189
movl $0x3, %eax
jmp 0x51cc
movq 0x8e4d(%rip), %rax      # 0xdfb8
movq (%rax), %rsi
movq %r14, %rdi
leaq -0x78(%rbp), %rdx
callq 0x3110
leaq -0x90(%rbp), %rdi
movq %r14, %rsi
callq 0x90d4
movq -0xc0(%rbp), %rdi
leaq -0xb0(%rbp), %rax
cmpq %rax, %rdi
je 0x51b5
callq 0x3230
jmp 0x51b5
movq 0x8e0e(%rip), %rax      # 0xdfb8
movq (%rax), %rdi
callq 0x3370
movl %eax, -0x2c(%rbp)
xorl %eax, %eax
jmp 0x51cc
callq 0x4904
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, -0x58(%rbp)
movl $0x1, %eax
testl %eax, %eax
je 0x510e
cmpl $0x3, %eax
jne 0x54f8
movq -0x48(%rbp), %rax
subq -0x50(%rbp), %rax
cmpq $0x21, %rax
jb 0x520a
movq -0x90(%rbp), %rax
cmpq -0x88(%rbp), %rax
sete %al
cmpl $0x0, -0x2c(%rbp)
setle %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x521d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, -0x58(%rbp)
callq 0x4904
jmp 0x54f8
movq 0x8dcc(%rip), %rbx      # 0xdff0
leaq 0x5222(%rip), %rsi      # 0xa44d
movl $0x9, %edx
movq %rbx, %rdi
callq 0x3290
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x3240
movsbl %al, %esi
movq 0x8d9a(%rip), %r15      # 0xdff0
movq %r15, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31a0
callq 0x367c
movq -0x48(%rbp), %rax
subq -0x50(%rbp), %rax
shrq $0x5, %rax
testl %eax, %eax
jle 0x532e
xorl %r12d, %r12d
movq 0x8d67(%rip), %rbx      # 0xdff0
xorl %r13d, %r13d
movl $0xb, %edx
movq %rbx, %rdi
leaq 0x51bc(%rip), %rsi      # 0xa457
callq 0x3290
movq %rbx, %rdi
movl %r13d, %esi
callq 0x33f0
movq %rax, %r14
movl $0x11, %edx
movq %rax, %rdi
leaq 0x51a6(%rip), %rsi      # 0xa463
callq 0x3290
movq -0x50(%rbp), %rax
movq (%rax,%r12), %rsi
movq 0x8(%rax,%r12), %rdx
movq %r14, %rdi
callq 0x3290
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3240
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31a0
movq -0x50(%rbp), %rdi
addq %r12, %rdi
movl %r13d, %esi
callq 0x370c
incq %r13
movq -0x48(%rbp), %rax
subq -0x50(%rbp), %rax
shrq $0x5, %rax
cltq
addq $0x20, %r12
cmpq %rax, %r13
jl 0x528c
callq 0x43ba
callq 0x367c
leaq -0xb8(%rbp), %rax
movl $0x0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq -0x90(%rbp), %r14
movq -0x88(%rbp), %r13
cmpq %r13, %r14
je 0x544b
leaq -0x78(%rbp), %r12
leaq -0x68(%rbp), %rax
movq %rax, -0x78(%rbp)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x8954
movl $0x10, %edx
movq %r15, %rdi
leaq 0x50da(%rip), %rsi      # 0xa475
callq 0x3290
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
movq %r15, %rdi
callq 0x3290
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3240
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31a0
movq %r12, %rdi
movl -0x2c(%rbp), %esi
leaq -0xc0(%rbp), %rdx
callq 0x3f98
callq 0x367c
movl $0x15, %edx
movq %r15, %rdi
leaq 0x5086(%rip), %rsi      # 0xa486
callq 0x3290
movq (%r15), %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 -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x543e
callq 0x3230
addq $0x20, %r14
cmpq %r13, %r14
jne 0x5372
movq 0x8b9e(%rip), %rbx      # 0xdff0
leaq 0x5043(%rip), %rsi      # 0xa49c
movl $0x10, %edx
movq %rbx, %rdi
callq 0x3290
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x3240
movsbl %al, %esi
movq 0x8b6c(%rip), %rdi      # 0xdff0
callq 0x3040
movq %rax, %rdi
callq 0x31a0
leaq -0xc0(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x3cf5
callq 0x367c
movq 0x8b43(%rip), %rbx      # 0xdff0
leaq 0x4ff9(%rip), %rsi      # 0xa4ad
movl $0x7, %edx
movq %rbx, %rdi
callq 0x3290
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x3240
movsbl %al, %esi
movq 0x8b11(%rip), %rdi      # 0xdff0
callq 0x3040
movq %rax, %rdi
callq 0x31a0
leaq -0xc0(%rbp), %rdi
callq 0x88f8
leaq -0x90(%rbp), %rdi
callq 0x616a
leaq -0x50(%rbp), %rdi
callq 0x616a
movq -0xe0(%rbp), %rdi
leaq -0xd0(%rbp), %rax
cmpq %rax, %rdi
je 0x5525
callq 0x3230
movq -0x100(%rbp), %rdi
leaq -0xf0(%rbp), %rax
cmpq %rax, %rdi
je 0x553d
callq 0x3230
movq -0x58(%rbp), %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5557
jmp 0x5581
movq %rax, %rbx
jmp 0x559b
jmp 0x5560
jmp 0x5581
movq %rax, %rbx
movq -0xc0(%rbp), %rdi
leaq -0xb0(%rbp), %rax
cmpq %rax, %rdi
je 0x55a7
callq 0x3230
jmp 0x55a7
jmp 0x5581
jmp 0x5581
movq %rax, %rbx
jmp 0x55a7
movq %rax, %rbx
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x559b
callq 0x3230
leaq -0xc0(%rbp), %rdi
callq 0x88f8
leaq -0x90(%rbp), %rdi
callq 0x616a
leaq -0x50(%rbp), %rdi
callq 0x616a
movq -0xe0(%rbp), %rdi
leaq -0xd0(%rbp), %rax
cmpq %rax, %rdi
je 0x55d4
callq 0x3230
movq -0x100(%rbp), %rdi
leaq -0xf0(%rbp), %rax
cmpq %rax, %rdi
je 0x55ec
callq 0x3230
movq %rbx, %rdi
callq 0x3400