// File: /workspace/github_cpp_makefile_star2_O1/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), %r15
movaps %xmm0, 0x40(%r15)
movaps %xmm0, 0x30(%r15)
movaps %xmm0, 0x20(%r15)
movaps %xmm0, 0x10(%r15)
movaps %xmm0, (%r15)
movq %r15, %rdi
xorl %esi, %esi
callq 0x8c18
leaq -0x188(%rbp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, -0x18(%rdi)
movaps %xmm0, -0x28(%rdi)
movq $0x0, -0x8(%rdi)
callq 0x4440
cmpl $0x0, 0x156bb(%rip)     # 0x1d608
jle 0x862a
movq $0x0, -0x78(%rbp)
leaq -0x48(%rbp), %r13
callq 0x9626
movq %rax, %rbx
leaq -0x148(%rbp), %rax
movq %rax, -0x158(%rbp)
leaq -0x158(%rbp), %r12
movq %r12, %rdi
leaq 0xdd83(%rip), %rsi      # 0x15d09
leaq 0xdd8c(%rip), %rdx      # 0x15d19
callq 0x6b5c
movq %rbx, %rdi
movq %r12, %rsi
callq 0x9846
movq -0x158(%rbp), %rdi
leaq -0x148(%rbp), %rax
cmpq %rax, %rdi
je 0x7fb5
callq 0x42f0
movl $0x0, -0x4c(%rbp)
cmpl $0x0, 0x1565d(%rip)     # 0x1d620
jle 0x8031
leaq 0x7e6(%rip), %rax       # 0x87b2
movq %rax, -0x48(%rbp)
movq $0x0, -0x40(%rbp)
movq %r14, -0xf8(%rbp)
movq %r15, -0x98(%rbp)
leaq -0x70(%rbp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
leaq -0xf8(%rbp), %rdx
leaq -0x98(%rbp), %rcx
leaq -0x4c(%rbp), %r8
callq 0x881c
leaq -0x110(%rbp), %rdi
movq %rbx, %rsi
callq 0x8e26
cmpq $0x0, -0x70(%rbp)
jne 0x877b
movl -0x4c(%rbp), %eax
incl %eax
movl %eax, -0x4c(%rbp)
cmpl 0x155f1(%rip), %eax     # 0x1d620
jl 0x7fc5
cmpb $0x0, 0x15600(%rip)     # 0x1d638
je 0x837c
callq 0x9626
movq %rax, -0x118(%rbp)
movq 0x8(%r14), %rdi
callq 0x13c88
movl %eax, %ebx
movl %eax, %r15d
negl %r15d
cmovsl %eax, %r15d
movl $0x1, %r12d
cmpl $0xa, %r15d
jb 0x80b2
movl $0x4, %r12d
movl %r15d, %eax
cmpl $0x63, %eax
jbe 0x80a9
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x80af
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x80b2
movl %eax, %ecx
movl $0xd1b71759, %edx       # imm = 0xD1B71759
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %r12d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x8074
addl $-0x3, %r12d
jmp 0x80b2
addl $-0x2, %r12d
jmp 0x80b2
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 0x8af5
movl $0x10, %r8d
leaq -0xf8(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0xdc16(%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 -0x38(%rbp), %rbx
je 0x8131
movq %rdx, -0x70(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x60(%rbp)
jmp 0x8137
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
leaq -0x200(%rbp), %r15
movq 0x8(%rax), %rdx
movq %rdx, -0x68(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x70(%rbp), %rdi
leaq 0xdbcb(%rip), %rsi      # 0x15d2b
callq 0x45f0
movq %rbx, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8185
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x818b
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl 0x15477(%rip), %r12d    # 0x1d620
movl %r12d, %r13d
negl %r13d
cmovsl %r12d, %r13d
movl $0x1, %ebx
cmpl $0xa, %r13d
jb 0x8200
movl $0x4, %ebx
movl %r13d, %eax
cmpl $0x63, %eax
jbe 0x81f9
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x81fe
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x8200
movl %eax, %ecx
movl $0xd1b71759, %edx       # imm = 0xD1B71759
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %ebx
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x81c6
addl $-0x3, %ebx
jmp 0x8200
addl $-0x2, %ebx
jmp 0x8200
decl %ebx
shrl $0x1f, %r12d
leal (%rbx,%r12), %esi
leaq -0x88(%rbp), %rax
movq %rax, -0x98(%rbp)
leaq -0x98(%rbp), %rdi
movl $0x2d, %edx
callq 0x4370
addq -0x98(%rbp), %r12
movq %r12, %rdi
movl %ebx, %esi
movl %r13d, %edx
callq 0x8af5
movq -0x48(%rbp), %rcx
movl $0xf, %esi
leaq -0x38(%rbp), %r12
cmpq %r12, %rcx
je 0x8251
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %r8
movq -0x90(%rbp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rsi, %rax
leaq -0x48(%rbp), %r13
jbe 0x828a
movl $0xf, %esi
leaq -0x88(%rbp), %rdi
cmpq %rdi, -0x98(%rbp)
je 0x8285
movq -0x88(%rbp), %rsi
cmpq %rsi, %rax
jbe 0x829b
movq -0x98(%rbp), %rsi
movq %r13, %rdi
callq 0x40f0
jmp 0x82ab
leaq -0x98(%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 0x82d8
movq %rdx, -0xd8(%rbp)
movq (%rcx), %rdx
movq %rdx, -0xc8(%rbp)
jmp 0x82de
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 0x9846
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x8328
callq 0x42f0
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x8340
callq 0x42f0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x8352
callq 0x42f0
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x8364
callq 0x42f0
movq -0xf8(%rbp), %rdi
leaq -0xe8(%rbp), %rax
cmpq %rax, %rdi
je 0x837c
callq 0x42f0
xorl %ebx, %ebx
movl %ebx, -0x48(%rbp)
movq 0x8(%r14), %rdi
callq 0x13c88
cmpl %eax, %ebx
jge 0x83a0
movq %r15, %rdi
movq %r13, %rsi
callq 0x88ca
movl -0x48(%rbp), %ebx
incl %ebx
jmp 0x837e
cmpl $0x0, 0x15279(%rip)     # 0x1d620
jle 0x83c7
xorl %ebx, %ebx
movl $0xffffffff, -0x48(%rbp) # imm = 0xFFFFFFFF
movq %r15, %rdi
movq %r13, %rsi
callq 0x88ca
incl %ebx
cmpl 0x1525b(%rip), %ebx     # 0x1d620
jl 0x83ab
movl 0x15253(%rip), %eax     # 0x1d620
testl %eax, %eax
jle 0x83f8
xorl %ebx, %ebx
xorl %r12d, %r12d
movq -0x110(%rbp), %rdi
addq %rbx, %rdi
callq 0x4560
incq %r12
movslq 0x15231(%rip), %rax     # 0x1d620
addq $0x8, %rbx
cmpq %rax, %r12
jl 0x83d6
movq -0x110(%rbp), %rsi
cltq
leaq (%rsi,%rax,8), %rdx
leaq -0x110(%rbp), %rdi
callq 0x924e
cmpl $0x0, 0x15234(%rip)     # 0x1d64c
jne 0x8425
movq 0x10(%r14), %rdi
xorl %esi, %esi
callq 0xd064
cmpb $0x1, 0x1520c(%rip)     # 0x1d638
jne 0x8614
movq 0x8(%r14), %r12
leaq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq 0x18(%r14), %rsi
movq 0x20(%r14), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x6876
movq %r13, %rdi
leaq 0xd8a5(%rip), %rsi      # 0x15d00
callq 0x45f0
movl $0x1, %ebx
cmpl $0xa, -0x78(%rbp)
jb 0x84ae
movl $0x4, %ebx
movq -0x78(%rbp), %rax
cmpl $0x63, %eax
jbe 0x84a7
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x84ac
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x84ae
movl %eax, %ecx
movl $0xd1b71759, %edx       # imm = 0xD1B71759
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %ebx
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x8474
addl $-0x3, %ebx
jmp 0x84ae
addl $-0x2, %ebx
jmp 0x84ae
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 0x8af5
movq -0x48(%rbp), %rcx
movl $0xf, %esi
leaq -0x38(%rbp), %rax
cmpq %rax, %rcx
je 0x84eb
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %r8
movq -0x68(%rbp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rsi, %rax
jbe 0x8514
movl $0xf, %esi
leaq -0x60(%rbp), %rdi
cmpq %rdi, -0x70(%rbp)
je 0x850f
movq -0x60(%rbp), %rsi
cmpq %rsi, %rax
jbe 0x8522
movq -0x70(%rbp), %rsi
movq %r13, %rdi
callq 0x40f0
jmp 0x852f
leaq -0x70(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4350
leaq -0xa8(%rbp), %rsi
movq %rsi, -0xb8(%rbp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x855c
movq %rdx, -0xb8(%rbp)
movq (%rcx), %rdx
movq %rdx, -0xa8(%rbp)
jmp 0x8562
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, -0xb0(%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 0xd765(%rip), %rsi      # 0x15d05
leaq 0xd761(%rip), %rdx      # 0x15d08
callq 0x6b5c
movq %r12, %rdi
xorl %esi, %esi
leaq -0xb8(%rbp), %rdx
movq %rbx, %rcx
callq 0x13dcc
movq -0x138(%rbp), %rdi
leaq -0x128(%rbp), %rax
cmpq %rax, %rdi
je 0x85d8
callq 0x42f0
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x85f0
callq 0x42f0
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x8602
callq 0x42f0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x8614
callq 0x42f0
movq -0x78(%rbp), %rax
incl %eax
movq %rax, -0x78(%rbp)
cmpl 0x14fe4(%rip), %eax     # 0x1d608
jl 0x7f5f
leaq -0x188(%rbp), %rdi
callq 0x45c0
leaq -0x200(%rbp), %rdi
callq 0x8d92
leaq -0x110(%rbp), %rdi
callq 0x8962
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x879d
jmp 0x8691
movq %rax, %rbx
jmp 0x86b1
movq %rax, %rbx
movq -0x138(%rbp), %rdi
leaq -0x128(%rbp), %rax
cmpq %rax, %rdi
je 0x8699
callq 0x42f0
jmp 0x8699
jmp 0x8782
movq %rax, %rbx
jmp 0x86c3
movq %rax, %rbx
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x86b1
callq 0x42f0
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x86c3
callq 0x42f0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
jmp 0x8762
movq %rax, %rbx
jmp 0x873b
movq %rax, %rbx
jmp 0x8717
movq %rax, %rbx
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x86ff
callq 0x42f0
jmp 0x86ff
movq %rax, %rbx
jmp 0x8729
movq %rax, %rbx
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x8717
callq 0x42f0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x8729
callq 0x42f0
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x873b
callq 0x42f0
movq -0xf8(%rbp), %rdi
leaq -0xe8(%rbp), %rax
jmp 0x8762
jmp 0x8782
jmp 0x8782
jmp 0x8782
movq %rax, %rbx
movq -0x158(%rbp), %rdi
leaq -0x148(%rbp), %rax
cmpq %rax, %rdi
je 0x8785
callq 0x42f0
jmp 0x8785
jmp 0x8782
jmp 0x8782
jmp 0x8782
cmpq $0x0, -0x70(%rbp)
je 0x8782
callq 0x40c0
jmp 0x8782
movq %rax, %rbx
leaq -0x188(%rbp), %rdi
callq 0x45c0
leaq -0x200(%rbp), %rdi
callq 0x8d92
leaq -0x110(%rbp), %rdi
callq 0x8962
movq %rbx, %rdi
callq 0x4590
nop