// File: /workspace/github_cpp_makefile_star2_O3/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, %r14
movl %edi, %r15d
callq 0x497a
leaq -0xf0(%rbp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq -0xd0(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
movq %rax, -0x40(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
movq %rax, -0x60(%rbp)
movaps %xmm0, -0x70(%rbp)
leaq 0x9246(%rip), %rdx      # 0xe2e0
leaq 0x919f(%rip), %rcx      # 0xe240
movl %r15d, %edi
movq %r14, %rsi
xorl %r8d, %r8d
callq 0x33b0
testl %eax, %eax
js 0x51a1
movl $0x1, -0x2c(%rbp)
leaq 0x921b(%rip), %r12      # 0xe2e0
leaq 0x9174(%rip), %r13      # 0xe240
leaq -0xc0(%rbp), %rbx
cmpl $0x74, %eax
je 0x514c
cmpl $0x72, %eax
je 0x510d
cmpl $0x6b, %eax
jne 0x5201
movq 0x8ecb(%rip), %rax      # 0xdfb8
movq (%rax), %rsi
movq %rbx, %rdi
leaq -0x90(%rbp), %rdx
callq 0x3110
leaq -0x50(%rbp), %rdi
movq %rbx, %rsi
callq 0x9076
jmp 0x5132
movq 0x8ea4(%rip), %rax      # 0xdfb8
movq (%rax), %rsi
movq %rbx, %rdi
leaq -0x90(%rbp), %rdx
callq 0x3110
leaq -0x70(%rbp), %rdi
movq %rbx, %rsi
callq 0x9076
movq -0xc0(%rbp), %rdi
leaq -0xb0(%rbp), %rax
cmpq %rax, %rdi
je 0x515e
callq 0x3230
jmp 0x515e
movq 0x8e65(%rip), %rax      # 0xdfb8
movq (%rax), %rdi
callq 0x3370
movl %eax, -0x2c(%rbp)
movl %r15d, %edi
movq %r14, %rsi
movq %r12, %rdx
movq %r13, %rcx
xorl %r8d, %r8d
callq 0x33b0
testl %eax, %eax
jns 0x50d3
movq -0x48(%rbp), %rax
subq -0x50(%rbp), %rax
cmpq $0x21, %rax
jb 0x51a1
movq -0x70(%rbp), %rax
cmpq -0x68(%rbp), %rax
sete %al
cmpl $0x0, -0x2c(%rbp)
setle %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x520d
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
callq 0x48b6
leaq -0x70(%rbp), %rdi
callq 0x6114
leaq -0x50(%rbp), %rdi
callq 0x6114
movq -0xe0(%rbp), %rdi
leaq -0xd0(%rbp), %rax
cmpq %rax, %rdi
je 0x51d5
callq 0x3230
movq -0x100(%rbp), %rdi
leaq -0xf0(%rbp), %rax
cmpq %rax, %rdi
je 0x51ed
callq 0x3230
movl %ebx, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
callq 0x48b6
jmp 0x51ab
movq 0x8ddc(%rip), %rbx      # 0xdff0
leaq 0x5232(%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 0x8daa(%rip), %r14      # 0xdff0
movq %r14, %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 0x531e
xorl %r13d, %r13d
movq 0x8d77(%rip), %r15      # 0xdff0
xorl %r12d, %r12d
movl $0xb, %edx
movq %r15, %rdi
leaq 0x51cc(%rip), %rsi      # 0xa457
callq 0x3290
movq %r15, %rdi
movl %r12d, %esi
callq 0x33f0
movq %rax, %rbx
movl $0x11, %edx
movq %rax, %rdi
leaq 0x51b6(%rip), %rsi      # 0xa463
callq 0x3290
movq -0x50(%rbp), %rax
movq (%rax,%r13), %rsi
movq 0x8(%rax,%r13), %rdx
movq %rbx, %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 -0x50(%rbp), %rdi
addq %r13, %rdi
movl %r12d, %esi
callq 0x370c
incq %r12
movq -0x48(%rbp), %rax
subq -0x50(%rbp), %rax
shrq $0x5, %rax
cltq
addq $0x20, %r13
cmpq %rax, %r12
jl 0x527c
callq 0x4368
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 -0x70(%rbp), %r13
movq -0x68(%rbp), %r12
cmpq %r12, %r13
je 0x5445
leaq -0x90(%rbp), %r15
leaq -0x80(%rbp), %rax
movq %rax, -0x90(%rbp)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x8900
movl $0x10, %edx
movq %r14, %rdi
leaq 0x50e9(%rip), %rsi      # 0xa475
callq 0x3290
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
movq %r14, %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 %r15, %rdi
movl -0x2c(%rbp), %esi
leaq -0xc0(%rbp), %rdx
callq 0x3f46
callq 0x367c
movl $0x15, %edx
movq %r14, %rdi
leaq 0x508f(%rip), %rsi      # 0xa486
callq 0x3290
movq (%r14), %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 -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x5438
callq 0x3230
addq $0x20, %r13
cmpq %r12, %r13
jne 0x535f
movq 0x8ba4(%rip), %rbx      # 0xdff0
leaq 0x5049(%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 0x8b72(%rip), %rdi      # 0xdff0
callq 0x3040
movq %rax, %rdi
callq 0x31a0
leaq -0xc0(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x3ca3
callq 0x367c
movq 0x8b49(%rip), %rbx      # 0xdff0
leaq 0x4fff(%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 0x8b17(%rip), %rdi      # 0xdff0
callq 0x3040
movq %rax, %rdi
callq 0x31a0
leaq -0xc0(%rbp), %rdi
callq 0x88a4
xorl %ebx, %ebx
jmp 0x51ab
jmp 0x5527
jmp 0x54ff
jmp 0x5527
movq %rax, %rbx
jmp 0x5544
jmp 0x5508
jmp 0x5527
movq %rax, %rbx
movq -0xc0(%rbp), %rdi
leaq -0xb0(%rbp), %rax
cmpq %rax, %rdi
je 0x5550
callq 0x3230
jmp 0x5550
jmp 0x5527
movq %rax, %rbx
jmp 0x5550
movq %rax, %rbx
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x5544
callq 0x3230
leaq -0xc0(%rbp), %rdi
callq 0x88a4
leaq -0x70(%rbp), %rdi
callq 0x6114
leaq -0x50(%rbp), %rdi
callq 0x6114
movq -0xe0(%rbp), %rdi
leaq -0xd0(%rbp), %rax
cmpq %rax, %rdi
je 0x557a
callq 0x3230
movq -0x100(%rbp), %rdi
leaq -0xf0(%rbp), %rax
cmpq %rax, %rdi
je 0x5592
callq 0x3230
movq %rbx, %rdi
callq 0x3400