// File: /workspace/github_cpp_makefile_star2_O3/afinit[P]afin/process.cpp
// Function: Process::run_manager()
void Process::run_manager(){
  // create thread array with max_thread entries
  vector<thread> t;
  Queue<int> qu;

  // loop max search loops
  for( int j=0; j<max_search_loops; j++ ){
    Log::Inst()->log_it( "Begin Extensions" );
      
    // initialize threads
    for( int i=0; i<max_threads; i++ ){
      t.push_back(thread( &Process::thread_worker, this, ref(qu), i ));
    }

    if( test_run ){
      Log::Inst()->log_it( "contigs.size(): " + to_string(contigs->get_list_size()) + " max_threads: " + to_string(max_threads) );
    }

    // push each thread onto queue
    for( int i=0; i<contigs->get_list_size(); i++ ){
      qu.push( i );
    }

    // push stop signals onto queue for each thread
    for( int i=0; i<max_threads; i++ ){
      qu.push( -1 );
    }

    // join threads
    for( int i=0; i<max_threads; i++ ){
      t[i].join();
    }

    // remove threads from vector
    t.erase( t.begin(), t.begin()+max_threads );

    // removed for master branch until algorithm can be adjusted
    if( ! no_fusion )
      fuse->run_fusion( false );
    
    if( test_run ){
      contigs->output_contigs( 0, outfile + ".fus" + to_string(j), "mid" );
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1d8, %rsp            # imm = 0x1D8
movq %rdi, %r14
xorps %xmm0, %xmm0
movaps %xmm0, -0x110(%rbp)
movq $0x0, -0x100(%rbp)
leaq -0x200(%rbp), %rdi
movaps %xmm0, 0x40(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
xorl %esi, %esi
callq 0x8c92
leaq -0x188(%rbp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, -0x18(%rdi)
movaps %xmm0, -0x28(%rdi)
movq $0x0, -0x8(%rdi)
callq 0x4440
cmpl $0x0, 0x1562f(%rip)     # 0x1d608
jle 0x86af
movq $0x0, -0x78(%rbp)
leaq -0x50(%rbp), %r13
callq 0x9692
movq %rax, %rbx
leaq -0x148(%rbp), %r12
movq %r12, -0x158(%rbp)
leaq -0x158(%rbp), %r15
movq %r15, %rdi
leaq 0xdcf7(%rip), %rsi      # 0x15d09
leaq 0xdd00(%rip), %rdx      # 0x15d19
callq 0x6be0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x98ba
movq -0x158(%rbp), %rdi
cmpq %r12, %rdi
je 0x803a
callq 0x42f0
movl $0x0, -0x2c(%rbp)
cmpl $0x0, 0x155d8(%rip)     # 0x1d620
leaq -0x200(%rbp), %r15
leaq 0x7dc(%rip), %rbx       # 0x8832
leaq -0x70(%rbp), %r12
jle 0x80bd
movq %rbx, -0x50(%rbp)
movq $0x0, -0x48(%rbp)
movq %r14, -0xf8(%rbp)
movq %r15, -0xb8(%rbp)
movq %r12, %rdi
movq %r13, %rsi
leaq -0xf8(%rbp), %rdx
leaq -0xb8(%rbp), %rcx
leaq -0x2c(%rbp), %r8
callq 0x889c
leaq -0x110(%rbp), %rdi
movq %r12, %rsi
callq 0x8eac
cmpq $0x0, -0x70(%rbp)
jne 0x87fd
movl -0x2c(%rbp), %eax
incl %eax
movl %eax, -0x2c(%rbp)
cmpl 0x15565(%rip), %eax     # 0x1d620
jl 0x805c
cmpb $0x0, 0x15574(%rip)     # 0x1d638
je 0x83fc
callq 0x9692
movq %rax, -0x118(%rbp)
movq 0x8(%r14), %rdi
callq 0x13ddc
movl %eax, %ebx
movl %eax, %r15d
negl %r15d
cmovsl %eax, %r15d
movl $0x1, %r12d
cmpl $0xa, %r15d
jb 0x813e
movl $0x4, %r12d
movl %r15d, %eax
movl $0xd1b71759, %edx       # imm = 0xD1B71759
cmpl $0x63, %eax
jbe 0x8135
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x813b
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x813e
movl %eax, %ecx
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %r12d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x8105
addl $-0x3, %r12d
jmp 0x813e
addl $-0x2, %r12d
jmp 0x813e
decl %r12d
shrl $0x1f, %ebx
leal (%r12,%rbx), %esi
leaq -0xe8(%rbp), %rax
movq %rax, -0xf8(%rbp)
leaq -0xf8(%rbp), %rdi
movl $0x2d, %edx
callq 0x4370
movl %ebx, %edi
addq -0xf8(%rbp), %rdi
movl %r12d, %esi
movl %r15d, %edx
callq 0x8b6f
movl $0x10, %r8d
leaq -0xf8(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0xdb8a(%rip), %rcx      # 0x15d1a
callq 0x4350
leaq -0x60(%rbp), %rsi
movq %rsi, -0x70(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
leaq -0x40(%rbp), %rbx
leaq -0x70(%rbp), %rdi
je 0x81c1
movq %rdx, -0x70(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x60(%rbp)
jmp 0x81c7
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, -0x68(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xdb46(%rip), %rsi      # 0x15d2b
callq 0x45f0
movq %rbx, -0x50(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x820a
movq %rdx, -0x50(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x40(%rbp)
jmp 0x8210
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
movq %rdx, -0x48(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl 0x153f2(%rip), %r12d    # 0x1d620
movl %r12d, %r15d
negl %r15d
cmovsl %r12d, %r15d
movl $0x1, %ebx
cmpl $0xa, %r15d
jb 0x8285
movl $0x4, %ebx
movl %r15d, %eax
movl $0xd1b71759, %edx       # imm = 0xD1B71759
cmpl $0x63, %eax
jbe 0x827e
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x8283
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x8285
movl %eax, %ecx
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %ebx
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x8250
addl $-0x3, %ebx
jmp 0x8285
addl $-0x2, %ebx
jmp 0x8285
decl %ebx
shrl $0x1f, %r12d
leal (%rbx,%r12), %esi
leaq -0xa8(%rbp), %rax
movq %rax, -0xb8(%rbp)
leaq -0xb8(%rbp), %rdi
movl $0x2d, %edx
callq 0x4370
addq -0xb8(%rbp), %r12
movq %r12, %rdi
movl %ebx, %esi
movl %r15d, %edx
callq 0x8b6f
movq -0x50(%rbp), %rcx
movl $0xf, %edi
leaq -0x40(%rbp), %rbx
cmpq %rbx, %rcx
je 0x82d6
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %r8
movq -0xb8(%rbp), %rsi
movq -0xb0(%rbp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rdi, %rax
leaq -0x60(%rbp), %r12
jbe 0x8312
movl $0xf, %edi
leaq -0xa8(%rbp), %r9
cmpq %r9, %rsi
je 0x830d
movq -0xa8(%rbp), %rdi
cmpq %rdi, %rax
jbe 0x831c
movq %r13, %rdi
callq 0x40f0
jmp 0x832c
leaq -0xb8(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4350
leaq -0xc8(%rbp), %rsi
movq %rsi, -0xd8(%rbp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x8359
movq %rdx, -0xd8(%rbp)
movq (%rcx), %rdx
movq %rdx, -0xc8(%rbp)
jmp 0x835f
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, -0xd0(%rbp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq -0x118(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x98ba
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x83a9
callq 0x42f0
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x83c1
callq 0x42f0
movq -0x50(%rbp), %rdi
cmpq %rbx, %rdi
je 0x83cf
callq 0x42f0
movq -0x70(%rbp), %rdi
cmpq %r12, %rdi
je 0x83dd
callq 0x42f0
movq -0xf8(%rbp), %rdi
leaq -0xe8(%rbp), %rax
cmpq %rax, %rdi
leaq -0x200(%rbp), %r15
je 0x83fc
callq 0x42f0
xorl %ebx, %ebx
movl %ebx, -0x50(%rbp)
movq 0x8(%r14), %rdi
callq 0x13ddc
cmpl %eax, %ebx
jge 0x8420
movq %r15, %rdi
movq %r13, %rsi
callq 0x893a
movl -0x50(%rbp), %ebx
incl %ebx
jmp 0x83fe
movl 0x151fa(%rip), %eax     # 0x1d620
testl %eax, %eax
jle 0x847d
xorl %ebx, %ebx
movl $0xffffffff, -0x50(%rbp) # imm = 0xFFFFFFFF
movq %r15, %rdi
movq %r13, %rsi
callq 0x893a
incl %ebx
movl 0x151da(%rip), %eax     # 0x1d620
cmpl %eax, %ebx
jl 0x842c
testl %eax, %eax
jle 0x847d
xorl %ebx, %ebx
xorl %r12d, %r12d
movl $0xd1b71759, %r15d      # imm = 0xD1B71759
movq -0x110(%rbp), %rdi
addq %rbx, %rdi
callq 0x4560
incq %r12
movslq 0x151ae(%rip), %rax     # 0x1d620
addq $0x8, %rbx
cmpq %rax, %r12
jl 0x8459
jmp 0x8485
cltq
movl $0xd1b71759, %r15d      # imm = 0xD1B71759
movq -0x110(%rbp), %rsi
leaq (%rsi,%rax,8), %rdx
leaq -0x110(%rbp), %rdi
callq 0x92ca
cmpl $0x0, 0x151a9(%rip)     # 0x1d64c
jne 0x84b0
movq 0x10(%r14), %rdi
xorl %esi, %esi
callq 0xd184
cmpb $0x1, 0x15181(%rip)     # 0x1d638
jne 0x8699
movq 0x8(%r14), %r12
leaq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq 0x18(%r14), %rsi
movq 0x20(%r14), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x68f6
movq %r13, %rdi
leaq 0xd81a(%rip), %rsi      # 0x15d00
callq 0x45f0
movl $0x1, %ebx
cmpl $0xa, -0x78(%rbp)
jb 0x8534
movl $0x4, %ebx
movq -0x78(%rbp), %rax
cmpl $0x63, %eax
jbe 0x852d
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x8532
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x8534
movl %eax, %ecx
imulq %r15, %rcx
shrq $0x2d, %rcx
addl $0x4, %ebx
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x84ff
addl $-0x3, %ebx
jmp 0x8534
addl $-0x2, %ebx
jmp 0x8534
decl %ebx
movl %ebx, %esi
leaq -0x60(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq -0x70(%rbp), %rdi
movl $0x2d, %edx
callq 0x4370
movq -0x70(%rbp), %rdi
movl %ebx, %esi
movq -0x78(%rbp), %rdx
callq 0x8b6f
movq -0x50(%rbp), %rcx
movl $0xf, %edi
leaq -0x40(%rbp), %rax
cmpq %rax, %rcx
je 0x8571
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %r8
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rdi, %rax
jbe 0x859d
movl $0xf, %edi
leaq -0x60(%rbp), %r9
cmpq %r9, %rsi
je 0x8598
movq -0x60(%rbp), %rdi
cmpq %rdi, %rax
jbe 0x85a7
movq %r13, %rdi
callq 0x40f0
jmp 0x85b4
leaq -0x70(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4350
leaq -0x88(%rbp), %rsi
movq %rsi, -0x98(%rbp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x85e1
movq %rdx, -0x98(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x88(%rbp)
jmp 0x85e7
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, -0x90(%rbp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq -0x128(%rbp), %rax
movq %rax, -0x138(%rbp)
leaq -0x138(%rbp), %rbx
movq %rbx, %rdi
leaq 0xd6e0(%rip), %rsi      # 0x15d05
leaq 0xd6dc(%rip), %rdx      # 0x15d08
callq 0x6be0
movq %r12, %rdi
xorl %esi, %esi
leaq -0x98(%rbp), %rdx
movq %rbx, %rcx
callq 0x13f20
movq -0x138(%rbp), %rdi
leaq -0x128(%rbp), %rax
cmpq %rax, %rdi
je 0x865d
callq 0x42f0
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x8675
callq 0x42f0
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x8687
callq 0x42f0
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x8699
callq 0x42f0
movq -0x78(%rbp), %rax
incl %eax
movq %rax, -0x78(%rbp)
cmpl 0x14f5f(%rip), %eax     # 0x1d608
jl 0x7feb
leaq -0x188(%rbp), %rdi
callq 0x45c0
leaq -0x200(%rbp), %rdi
callq 0x8e0c
leaq -0x110(%rbp), %rdi
callq 0x89d2
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x881d
jmp 0x8802
jmp 0x86f9
movq %rax, %rbx
jmp 0x871e
movq %rax, %rbx
jmp 0x8748
movq %rax, %rbx
jmp 0x8736
movq %rax, %rbx
movq -0x138(%rbp), %rdi
leaq -0x128(%rbp), %rax
cmpq %rax, %rdi
je 0x871e
callq 0x42f0
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x8736
callq 0x42f0
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x8748
callq 0x42f0
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
jmp 0x87cb
movq %rax, %rbx
jmp 0x87ab
movq %rax, %rbx
jmp 0x8781
movq %rax, %rbx
jmp 0x87bd
movq %rax, %rbx
jmp 0x8799
movq %rax, %rbx
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x8781
callq 0x42f0
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x8799
callq 0x42f0
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x87ab
callq 0x42f0
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x87bd
callq 0x42f0
movq -0xf8(%rbp), %rdi
leaq -0xe8(%rbp), %rax
cmpq %rax, %rdi
je 0x8805
callq 0x42f0
jmp 0x8805
jmp 0x8802
jmp 0x8802
jmp 0x8802
movq %rax, %rbx
movq -0x158(%rbp), %rdi
cmpq %r12, %rdi
jne 0x87d0
jmp 0x8805
jmp 0x8802
jmp 0x8802
jmp 0x8802
jmp 0x8802
cmpq $0x0, -0x70(%rbp)
je 0x8802
callq 0x40c0
movq %rax, %rbx
leaq -0x188(%rbp), %rdi
callq 0x45c0
leaq -0x200(%rbp), %rdi
callq 0x8e0c
leaq -0x110(%rbp), %rdi
callq 0x89d2
movq %rbx, %rdi
callq 0x4590
nop