// File: /workspace/github_c_makefile_star2_O1/PoulinV[P]AxiCLASS/build/../include/parallel.h
// Function: std::future<std::result_of<transfer_init::$_0 ()>::type> Tools::TaskSystem::AsyncTask<transfer_init::$_0>(transfer_init::$_0&&)
std::future<typename std::result_of<F()>::type> AsyncTask(F&& f) {
    using return_type = typename std::result_of<F()>::type;
    auto task = std::make_shared<std::packaged_task<return_type()>>(f);
    std::future<return_type> res = task->get_future();

    auto work = [task](){ (*task)(); };
    unsigned int i = index_++;
    for(unsigned int n = 0; n < count_; ++n) {
      if(queues_[(i + n) % count_].TryPush(work)){
        return res;
      }
    }
    queues_[i % count_].Push(work);

    return res;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, 0x20(%rsp)
movl $0x20, %edi
callq 0x83b0
movq %rax, %r12
movq %rax, %r14
movabsq $0x100000001, %rbx      # imm = 0x100000001
movq %rbx, 0x8(%rax)
leaq 0x9f2e6(%rip), %rax     # 0x14a1f0
addq $0x10, %rax
movq %rax, (%r12)
movl $0xa8, %edi
callq 0x83b0
movq %rax, %rbp
movq %rbx, 0x8(%rax)
leaq 0x9fc86(%rip), %rax     # 0x14abb0
movq %rax, (%rbp)
leaq 0x10(%rbp), %rbx
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x1d42e
addq $0x10, %r12
leaq 0x9fcb6(%rip), %rax     # 0x14ac00
movq %rax, 0x10(%rbp)
movq %rbp, %rdi
addq $0x38, %rdi
movl $0xe, %ecx
movq %r13, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %rbx, 0x10(%r14)
movq %rbp, 0x18(%r14)
movq 0x20(%rsp), %rdi
movq %r12, %rsi
movq %r14, 0x18(%rsp)
callq 0x1d35e
movq %r12, 0x28(%rsp)
movq %r14, 0x30(%rsp)
movq 0xa1025(%rip), %rax     # 0x14bfb0
cmpb $0x0, (%rax)
je 0xaaf96
incl 0x8(%r14)
jmp 0xaaf9b
lock
incl 0x8(%r14)
movl $0x1, %r12d
lock
xaddl %r12d, 0x20(%r15)
movl (%r15), %ecx
testl %ecx, %ecx
je 0xab024
xorl %r13d, %r13d
leal (%r12,%r13), %eax
xorl %edx, %edx
divl %ecx
movq 0x28(%r15), %rbx
imulq $0xb0, %rdx, %rbp
leaq (%rbx,%rbp), %rdi
addq $0x58, %rdi
movq %rdi, 0x8(%rsp)
callq 0x8080
movl %eax, %r14d
testl %eax, %eax
sete 0x10(%rsp)
je 0xaafee
leaq 0x8(%rsp), %rdi
callq 0x1d17a
jmp 0xab014
addq %rbp, %rbx
movq %rbx, %rdi
leaq 0x28(%rsp), %rsi
callq 0xb58c4
leaq 0x8(%rsp), %rdi
callq 0x1d17a
subq $-0x80, %rbx
movq %rbx, %rdi
callq 0x81c0
testl %r14d, %r14d
je 0xab091
incl %r13d
movl (%r15), %ecx
cmpl %ecx, %r13d
jb 0xaafb1
movl %r12d, %eax
xorl %edx, %edx
divl (%r15)
movq 0x28(%r15), %r15
imulq $0xb0, %rdx, %rbx
leaq (%r15,%rbx), %rax
addq $0x58, %rax
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
movb $0x0, 0x8(%rdi)
callq 0x1d20a
addq %rbx, %r15
movb $0x1, 0x10(%rsp)
leaq 0x28(%rsp), %rsi
movq %r15, %rdi
movq 0x18(%rsp), %rbx
callq 0xb58c4
leaq 0x8(%rsp), %rdi
callq 0x1d17a
subq $-0x80, %r15
movq %r15, %rdi
callq 0x81c0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xab0a5
callq 0x1d2a6
jmp 0xab0a5
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xab0a0
callq 0x1d2a6
movq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0x1d2a6
movq 0x20(%rsp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xab0e7
movq %rax, %r15
jmp 0xab0f4
movq %rax, %r15
jmp 0xab116
movq %rax, %r15
movq %rbp, %rdi
callq 0x8380
jmp 0xab0dd
movq %rax, %r15
movq %r14, %rdi
callq 0x8380
jmp 0xab120
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x1d17a
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xab103
callq 0x1d2a6
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rdi
testq %rdi, %rdi
je 0xab116
callq 0x1d2a6
movq 0x18(%rsp), %rdi
callq 0x1d2a6
movq %r15, %rdi
callq 0x8650