// File: BGI-Qingdao[P]metaSLR/classify.cpp
// Function: MultiThread::Worker(int)
void Worker(int index){
        std::pair<std::string,std::string> job;
        Buffer buffer;
        while(true){
            locks[index].lock();
            if( caches[index].empty() ){
                busy = false ;
                locks[index].unlock();
                if(end) return ;
                std::this_thread::sleep_for(std::chrono::microseconds(10));
                continue;
            }
            if( ! caches[index].empty() ){
                //job=caches[index].top();
                if( caches[index].size() > 300 ) busy = true ;
                else if ( caches[index].size() < 50 ) busy = false ;
                std::swap(buffer,caches[index].top());
                caches[index].pop();
                locks[index].unlock();
                for( int i = 0 ; i < buffer.size ; i ++ )
                    process_reads(buffer.heads.at(i),buffer.seqs.at(i),index);
            } else 
                locks[index].unlock();
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100b0, %rsp          # imm = 0x100B0
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10080(%rbp)
leaq -0x50(%rbp), %rdi
callq 0xcd20
leaq -0x10058(%rbp), %rdi
callq 0x79e0
jmp 0xca44
movq -0x10080(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
leaq (%rcx,%rcx,4), %rcx
leaq (%rax,%rcx,8), %rdi
callq 0xcd50
jmp 0xca62
movq -0x10080(%rbp), %rdi
addq $0x8, %rdi
movslq -0xc(%rbp), %rsi
callq 0xcd80
movq %rax, %rdi
callq 0xcda0
movb %al, -0x10081(%rbp)
jmp 0xca86
movb -0x10081(%rbp), %al
testb $0x1, %al
jne 0xca95
jmp 0xcb40
movq -0x10080(%rbp), %rax
movb $0x0, 0x5(%rax)
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
leaq (%rcx,%rcx,4), %rcx
leaq (%rax,%rcx,8), %rdi
callq 0xcdc0
jmp 0xcab7
movq -0x10080(%rbp), %rax
testb $0x1, 0x4(%rax)
je 0xcb0e
leaq -0x10058(%rbp), %rdi
callq 0x7d00
leaq -0x50(%rbp), %rdi
callq 0xd370
addq $0x100b0, %rsp          # imm = 0x100B0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10060(%rbp)
movl %eax, -0x10064(%rbp)
leaq -0x10058(%rbp), %rdi
callq 0x7d00
leaq -0x50(%rbp), %rdi
callq 0xd370
jmp 0xcd0e
movl $0xa, -0x10074(%rbp)
leaq -0x10070(%rbp), %rdi
leaq -0x10074(%rbp), %rsi
callq 0xce90
jmp 0xcb2d
leaq -0x10070(%rbp), %rdi
callq 0xcde0
jmp 0xcb3b
jmp 0xca42
movq -0x10080(%rbp), %rdi
addq $0x8, %rdi
movslq -0xc(%rbp), %rsi
callq 0xcd80
movq %rax, %rdi
callq 0xcda0
movb %al, -0x10082(%rbp)
jmp 0xcb64
movb -0x10082(%rbp), %al
testb $0x1, %al
jne 0xcce9
jmp 0xcb74
movq -0x10080(%rbp), %rdi
addq $0x8, %rdi
movslq -0xc(%rbp), %rsi
callq 0xcd80
movq %rax, %rdi
callq 0xceb0
movq %rax, -0x10090(%rbp)
jmp 0xcb99
movq -0x10090(%rbp), %rax
cmpq $0x12c, %rax            # imm = 0x12C
jbe 0xcbb5
movq -0x10080(%rbp), %rax
movb $0x1, 0x5(%rax)
jmp 0xcbf4
movq -0x10080(%rbp), %rdi
addq $0x8, %rdi
movslq -0xc(%rbp), %rsi
callq 0xcd80
movq %rax, %rdi
callq 0xceb0
movq %rax, -0x10098(%rbp)
jmp 0xcbda
movq -0x10098(%rbp), %rax
cmpq $0x32, %rax
jae 0xcbf2
movq -0x10080(%rbp), %rax
movb $0x0, 0x5(%rax)
jmp 0xcbf4
movq -0x10080(%rbp), %rdi
addq $0x8, %rdi
movslq -0xc(%rbp), %rsi
callq 0xcd80
movq %rax, %rdi
callq 0xcf30
movq %rax, -0x100a0(%rbp)
jmp 0xcc19
movq -0x100a0(%rbp), %rsi
leaq -0x10058(%rbp), %rdi
callq 0xced0
movq -0x10080(%rbp), %rdi
addq $0x8, %rdi
movslq -0xc(%rbp), %rsi
callq 0xcd80
movq %rax, %rdi
callq 0xcf50
jmp 0xcc4a
movq -0x10080(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
leaq (%rcx,%rcx,4), %rcx
leaq (%rax,%rcx,8), %rdi
callq 0xcdc0
jmp 0xcc68
movl $0x0, -0x10078(%rbp)
movl -0x10078(%rbp), %eax
cmpl -0x58(%rbp), %eax
jge 0xcce7
movslq -0x10078(%rbp), %rsi
leaq -0x10058(%rbp), %rdi
callq 0x7a30
movq %rax, -0x100a8(%rbp)
jmp 0xcc99
leaq -0x8058(%rbp), %rdi
movslq -0x10078(%rbp), %rsi
callq 0x7a30
movq %rax, -0x100b0(%rbp)
jmp 0xccb5
movq -0x100b0(%rbp), %rdx
movq -0x100a8(%rbp), %rsi
movq -0x10080(%rbp), %rdi
movl -0xc(%rbp), %ecx
callq 0xcf70
jmp 0xccd4
jmp 0xccd6
movl -0x10078(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10078(%rbp)
jmp 0xcc72
jmp 0xcd09
movq -0x10080(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
leaq (%rcx,%rcx,4), %rcx
leaq (%rax,%rcx,8), %rdi
callq 0xcdc0
jmp 0xcd07
jmp 0xcd09
jmp 0xca42
movq -0x10060(%rbp), %rdi
callq 0x4550
nopw (%rax,%rax)