// File: /workspace/github_c_makefile_star2_O3/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, 0x30(%rsp)
movl $0x20, %edi
callq 0x83b0
movq %rax, %r12
movq %rax, 0x8(%rsp)
movabsq $0x100000001, %r14      # imm = 0x100000001
movq %r14, 0x8(%rax)
leaq 0x9f352(%rip), %rax     # 0x147240
addq $0x10, %rax
movq %rax, (%r12)
movl $0xa8, %edi
callq 0x83b0
movq %rax, %rbp
movq %r14, 0x8(%rax)
leaq 0x9fcc2(%rip), %rax     # 0x147bd0
movq %rax, (%rbp)
leaq 0x10(%rbp), %r14
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x1d4aa
addq $0x10, %r12
leaq 0x9fcf2(%rip), %rax     # 0x147c20
movq %rax, 0x10(%rbp)
movq %rbp, %rdi
addq $0x38, %rdi
movl $0xe, %ecx
movq %r13, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq 0x8(%rsp), %rbx
movq %r14, 0x10(%rbx)
movq %rbp, 0x18(%rbx)
movq 0x30(%rsp), %rdi
movq %r12, %rsi
callq 0x1d3e8
movq %r12, 0x20(%rsp)
movq %rbx, 0x28(%rsp)
movq 0xa1041(%rip), %rax     # 0x148fb0
cmpb $0x0, (%rax)
je 0xa7f79
incl 0x8(%rbx)
jmp 0xa7f7d
lock
incl 0x8(%rbx)
movl $0x1, %r12d
lock
xaddl %r12d, 0x20(%r15)
movl (%r15), %ecx
testl %ecx, %ecx
je 0xa7fdf
xorl %r14d, %r14d
leaq 0x10(%rsp), %r13
leal (%r12,%r14), %eax
xorl %edx, %edx
divl %ecx
movq 0x28(%r15), %rbp
imulq $0xb0, %rdx, %rbx
leaq (%rbx,%rbp), %rdi
addq $0x58, %rdi
movq %rdi, 0x10(%rsp)
callq 0x8080
testl %eax, %eax
sete 0x18(%rsp)
je 0xa8062
movq %r13, %rdi
callq 0x1d204
incl %r14d
movl (%r15), %ecx
cmpl %ecx, %r14d
jb 0xa7f98
jmp 0xa7fe1
xorl %ecx, %ecx
movl %r12d, %eax
xorl %edx, %edx
divl %ecx
movq 0x28(%r15), %r15
imulq $0xb0, %rdx, %rbx
leaq (%r15,%rbx), %rax
addq $0x58, %rax
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
movb $0x0, 0x8(%rdi)
callq 0x1d294
addq %rbx, %r15
movb $0x1, 0x18(%rsp)
leaq 0x20(%rsp), %rsi
movq %r15, %rdi
movq 0x8(%rsp), %rbx
callq 0xb271e
leaq 0x10(%rsp), %rdi
callq 0x1d204
subq $-0x80, %r15
movq %r15, %rdi
callq 0x81c0
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0xa804b
callq 0x1d330
movq %rbx, %rdi
callq 0x1d330
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq %rbx, %rbp
leaq 0x20(%rsp), %rsi
movq %rbp, %rdi
callq 0xb271e
leaq 0x10(%rsp), %rdi
callq 0x1d204
subq $-0x80, %rbp
movq %rbp, %rdi
callq 0x81c0
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
movq 0x8(%rsp), %rbx
jne 0xa8046
jmp 0xa804b
jmp 0xa809b
movq %rax, %r15
leaq 0x10(%rsp), %rdi
callq 0x1d204
jmp 0xa80ad
movq %rax, %r15
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0xa80bc
callq 0x1d330
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rdi
testq %rdi, %rdi
je 0xa80d4
callq 0x1d330
jmp 0xa80d4
movq %rax, %r15
movq 0x8(%rsp), %rdi
callq 0x1d330
jmp 0xa80fa
movq %rax, %r15
movq %rbp, %rdi
callq 0x8380
jmp 0xa80f0
movq %rax, %r15
movq 0x8(%rsp), %rdi
callq 0x8380
movq %r15, %rdi
callq 0x8650