// File: HQarroum[P]thread-pool/examples/one-producer-many-consumers/./../../includes/concurrent_queue.hpp
// Function: moodycamel::ConcurrentQueue<std::function<void ()>, moodycamel::ConcurrentQueueDefaultTraits>::FreeList<moodycamel::ConcurrentQueue<std::function<void ()>, moodycamel::ConcurrentQueueDefaultTraits>::Block>::try_get()
inline N* try_get()
		{
#ifdef MCDBGQ_NOLOCKFREE_FREELIST
			debug::DebugLock lock(mutex);
#endif		
			auto head = freeListHead.load(std::memory_order_acquire);
			while (head != nullptr) {
				auto prevHead = head;
				auto refs = head->freeListRefs.load(std::memory_order_relaxed);
				if ((refs & REFS_MASK) == 0 || !head->freeListRefs.compare_exchange_strong(refs, refs + 1, std::memory_order_acquire, std::memory_order_relaxed)) {
					head = freeListHead.load(std::memory_order_acquire);
					continue;
				}
				
				// Good, reference count has been incremented (it wasn't at zero), which means we can read the
				// next and not worry about it changing between now and the time we do the CAS
				auto next = head->freeListNext.load(std::memory_order_relaxed);
				if (freeListHead.compare_exchange_strong(head, next, std::memory_order_acquire, std::memory_order_relaxed)) {
					// Yay, got the node. This means it was on the list, which means shouldBeOnFreeList must be false no
					// matter the refcount (because nobody else knows it's been taken off yet, it can't have been put back on).
					assert((head->freeListRefs.load(std::memory_order_relaxed) & SHOULD_BE_ON_FREELIST) == 0);
					
					// Decrease refcount twice, once for our ref, and once for the list's ref
					head->freeListRefs.fetch_sub(2, std::memory_order_release);
					return head;
				}
				
				// OK, the head must have changed on us, but we still need to decrease the refcount we increased.
				// Note that we don't need to release any memory effects, but we do need to ensure that the reference
				// count decrement happens-after the CAS on the head.
				refs = prevHead->freeListRefs.fetch_sub(1, std::memory_order_acq_rel);
				if (refs == SHOULD_BE_ON_FREELIST + 1) {
					add_knowing_refcount_is_zero(prevHead);
				}
			}
			
			return nullptr;
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
movq %rdi, -0x98(%rbp)
movq -0x98(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
movl $0x2, %esi
callq 0x6210
movq %rax, -0xa0(%rbp)
cmpq $0x0, -0xa0(%rbp)
je 0x16ac8
movq -0xa0(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0xa0(%rbp), %rax
addq $0x430, %rax            # imm = 0x430
movq %rax, -0x60(%rbp)
movl $0x0, -0x64(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0xd0(%rbp)
movl -0x64(%rbp), %edi
movl $0xffff, %esi           # imm = 0xFFFF
callq 0x58d0
movl %eax, -0x68(%rbp)
movl -0x64(%rbp), %eax
movl %eax, -0xc4(%rbp)
decl %eax
subl $0x2, %eax
jb 0x161fd
jmp 0x161e2
movl -0xc4(%rbp), %eax
subl $0x5, %eax
je 0x1620b
jmp 0x161ef
movq -0xd0(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x6c(%rbp)
jmp 0x16217
movq -0xd0(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x6c(%rbp)
jmp 0x16217
movq -0xd0(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
movl %eax, -0xac(%rbp)
movl -0xac(%rbp), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpl $0x0, %eax
je 0x167ee
movq -0xa0(%rbp), %rcx
addq $0x430, %rcx            # imm = 0x430
movl -0xac(%rbp), %eax
incl %eax
movq %rcx, -0x38(%rbp)
leaq -0xac(%rbp), %rcx
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0x2, -0x48(%rbp)
movl $0x0, -0x4c(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0xf0(%rbp)
movl -0x48(%rbp), %eax
movq -0x40(%rbp), %rcx
movq %rcx, -0xe8(%rbp)
movl -0x44(%rbp), %ecx
movl %ecx, -0x50(%rbp)
movl -0x4c(%rbp), %ecx
movl %ecx, -0xdc(%rbp)
decl %eax
movl %eax, %ecx
movq %rcx, -0xd8(%rbp)
subl $0x4, %eax
ja 0x162b9
movq -0xd8(%rbp), %rax
leaq 0x2078(%rip), %rcx      # 0x18328
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl -0xdc(%rbp), %eax
decl %eax
subl $0x2, %eax
jb 0x163aa
jmp 0x162cc
movl -0xdc(%rbp), %eax
subl $0x5, %eax
je 0x163d8
jmp 0x1637c
movl -0xdc(%rbp), %eax
decl %eax
subl $0x2, %eax
jb 0x1648d
jmp 0x162f3
movl -0xdc(%rbp), %eax
subl $0x5, %eax
je 0x164bb
jmp 0x1645f
movl -0xdc(%rbp), %eax
decl %eax
subl $0x2, %eax
jb 0x16570
jmp 0x1631a
movl -0xdc(%rbp), %eax
subl $0x5, %eax
je 0x1659e
jmp 0x16542
movl -0xdc(%rbp), %eax
decl %eax
subl $0x2, %eax
jb 0x16653
jmp 0x16341
movl -0xdc(%rbp), %eax
subl $0x5, %eax
je 0x16681
jmp 0x16625
movl -0xdc(%rbp), %eax
decl %eax
subl $0x2, %eax
jb 0x16736
jmp 0x16368
movl -0xdc(%rbp), %eax
subl $0x5, %eax
je 0x16764
jmp 0x16708
movq -0xf0(%rbp), %rcx
movq -0xe8(%rbp), %rax
movl (%rax), %eax
movl -0x50(%rbp), %edx
lock
cmpxchgl %edx, (%rcx)
movl %eax, %ecx
sete %al
movb %al, -0xf5(%rbp)
movl %ecx, -0xf4(%rbp)
testb $0x1, %al
jne 0x1641a
jmp 0x1640b
movq -0xf0(%rbp), %rcx
movq -0xe8(%rbp), %rax
movl (%rax), %eax
movl -0x50(%rbp), %edx
lock
cmpxchgl %edx, (%rcx)
movl %eax, %ecx
sete %al
movb %al, -0xfd(%rbp)
movl %ecx, -0xfc(%rbp)
testb $0x1, %al
jne 0x16436
jmp 0x16427
movq -0xf0(%rbp), %rcx
movq -0xe8(%rbp), %rax
movl (%rax), %eax
movl -0x50(%rbp), %edx
lock
cmpxchgl %edx, (%rcx)
movl %eax, %ecx
sete %al
movb %al, -0x105(%rbp)
movl %ecx, -0x104(%rbp)
testb $0x1, %al
jne 0x16452
jmp 0x16443
jmp 0x167e8
movq -0xe8(%rbp), %rax
movl -0xf4(%rbp), %ecx
movl %ecx, (%rax)
movb -0xf5(%rbp), %al
andb $0x1, %al
movb %al, -0x51(%rbp)
jmp 0x16406
movq -0xe8(%rbp), %rax
movl -0xfc(%rbp), %ecx
movl %ecx, (%rax)
movb -0xfd(%rbp), %al
andb $0x1, %al
movb %al, -0x51(%rbp)
jmp 0x16406
movq -0xe8(%rbp), %rax
movl -0x104(%rbp), %ecx
movl %ecx, (%rax)
movb -0x105(%rbp), %al
andb $0x1, %al
movb %al, -0x51(%rbp)
jmp 0x16406
movq -0xf0(%rbp), %rcx
movq -0xe8(%rbp), %rax
movl (%rax), %eax
movl -0x50(%rbp), %edx
lock
cmpxchgl %edx, (%rcx)
movl %eax, %ecx
sete %al
movb %al, -0x10d(%rbp)
movl %ecx, -0x10c(%rbp)
testb $0x1, %al
jne 0x164fd
jmp 0x164ee
movq -0xf0(%rbp), %rcx
movq -0xe8(%rbp), %rax
movl (%rax), %eax
movl -0x50(%rbp), %edx
lock
cmpxchgl %edx, (%rcx)
movl %eax, %ecx
sete %al
movb %al, -0x115(%rbp)
movl %ecx, -0x114(%rbp)
testb $0x1, %al
jne 0x16519
jmp 0x1650a
movq -0xf0(%rbp), %rcx
movq -0xe8(%rbp), %rax
movl (%rax), %eax
movl -0x50(%rbp), %edx
lock
cmpxchgl %edx, (%rcx)
movl %eax, %ecx
sete %al
movb %al, -0x11d(%rbp)
movl %ecx, -0x11c(%rbp)
testb $0x1, %al
jne 0x16535
jmp 0x16526
jmp 0x167e8
movq -0xe8(%rbp), %rax
movl -0x10c(%rbp), %ecx
movl %ecx, (%rax)
movb -0x10d(%rbp), %al
andb $0x1, %al
movb %al, -0x51(%rbp)
jmp 0x164e9
movq -0xe8(%rbp), %rax
movl -0x114(%rbp), %ecx
movl %ecx, (%rax)
movb -0x115(%rbp), %al
andb $0x1, %al
movb %al, -0x51(%rbp)
jmp 0x164e9
movq -0xe8(%rbp), %rax
movl -0x11c(%rbp), %ecx
movl %ecx, (%rax)
movb -0x11d(%rbp), %al
andb $0x1, %al
movb %al, -0x51(%rbp)
jmp 0x164e9
movq -0xf0(%rbp), %rcx
movq -0xe8(%rbp), %rax
movl (%rax), %eax
movl -0x50(%rbp), %edx
lock
cmpxchgl %edx, (%rcx)
movl %eax, %ecx
sete %al
movb %al, -0x125(%rbp)
movl %ecx, -0x124(%rbp)
testb $0x1, %al
jne 0x165e0
jmp 0x165d1
movq -0xf0(%rbp), %rcx
movq -0xe8(%rbp), %rax
movl (%rax), %eax
movl -0x50(%rbp), %edx
lock
cmpxchgl %edx, (%rcx)
movl %eax, %ecx
sete %al
movb %al, -0x12d(%rbp)
movl %ecx, -0x12c(%rbp)
testb $0x1, %al
jne 0x165fc
jmp 0x165ed
movq -0xf0(%rbp), %rcx
movq -0xe8(%rbp), %rax
movl (%rax), %eax
movl -0x50(%rbp), %edx
lock
cmpxchgl %edx, (%rcx)
movl %eax, %ecx
sete %al
movb %al, -0x135(%rbp)
movl %ecx, -0x134(%rbp)
testb $0x1, %al
jne 0x16618
jmp 0x16609
jmp 0x167e8
movq -0xe8(%rbp), %rax
movl -0x124(%rbp), %ecx
movl %ecx, (%rax)
movb -0x125(%rbp), %al
andb $0x1, %al
movb %al, -0x51(%rbp)
jmp 0x165cc
movq -0xe8(%rbp), %rax
movl -0x12c(%rbp), %ecx
movl %ecx, (%rax)
movb -0x12d(%rbp), %al
andb $0x1, %al
movb %al, -0x51(%rbp)
jmp 0x165cc
movq -0xe8(%rbp), %rax
movl -0x134(%rbp), %ecx
movl %ecx, (%rax)
movb -0x135(%rbp), %al
andb $0x1, %al
movb %al, -0x51(%rbp)
jmp 0x165cc
movq -0xf0(%rbp), %rcx
movq -0xe8(%rbp), %rax
movl (%rax), %eax
movl -0x50(%rbp), %edx
lock
cmpxchgl %edx, (%rcx)
movl %eax, %ecx
sete %al
movb %al, -0x13d(%rbp)
movl %ecx, -0x13c(%rbp)
testb $0x1, %al
jne 0x166c3
jmp 0x166b4
movq -0xf0(%rbp), %rcx
movq -0xe8(%rbp), %rax
movl (%rax), %eax
movl -0x50(%rbp), %edx
lock
cmpxchgl %edx, (%rcx)
movl %eax, %ecx
sete %al
movb %al, -0x145(%rbp)
movl %ecx, -0x144(%rbp)
testb $0x1, %al
jne 0x166df
jmp 0x166d0
movq -0xf0(%rbp), %rcx
movq -0xe8(%rbp), %rax
movl (%rax), %eax
movl -0x50(%rbp), %edx
lock
cmpxchgl %edx, (%rcx)
movl %eax, %ecx
sete %al
movb %al, -0x14d(%rbp)
movl %ecx, -0x14c(%rbp)
testb $0x1, %al
jne 0x166fb
jmp 0x166ec
jmp 0x167e8
movq -0xe8(%rbp), %rax
movl -0x13c(%rbp), %ecx
movl %ecx, (%rax)
movb -0x13d(%rbp), %al
andb $0x1, %al
movb %al, -0x51(%rbp)
jmp 0x166af
movq -0xe8(%rbp), %rax
movl -0x144(%rbp), %ecx
movl %ecx, (%rax)
movb -0x145(%rbp), %al
andb $0x1, %al
movb %al, -0x51(%rbp)
jmp 0x166af
movq -0xe8(%rbp), %rax
movl -0x14c(%rbp), %ecx
movl %ecx, (%rax)
movb -0x14d(%rbp), %al
andb $0x1, %al
movb %al, -0x51(%rbp)
jmp 0x166af
movq -0xf0(%rbp), %rcx
movq -0xe8(%rbp), %rax
movl (%rax), %eax
movl -0x50(%rbp), %edx
lock
cmpxchgl %edx, (%rcx)
movl %eax, %ecx
sete %al
movb %al, -0x155(%rbp)
movl %ecx, -0x154(%rbp)
testb $0x1, %al
jne 0x167a3
jmp 0x16794
movq -0xf0(%rbp), %rcx
movq -0xe8(%rbp), %rax
movl (%rax), %eax
movl -0x50(%rbp), %edx
lock
cmpxchgl %edx, (%rcx)
movl %eax, %ecx
sete %al
movb %al, -0x15d(%rbp)
movl %ecx, -0x15c(%rbp)
testb $0x1, %al
jne 0x167bf
jmp 0x167b0
movq -0xf0(%rbp), %rcx
movq -0xe8(%rbp), %rax
movl (%rax), %eax
movl -0x50(%rbp), %edx
lock
cmpxchgl %edx, (%rcx)
movl %eax, %ecx
sete %al
movb %al, -0x165(%rbp)
movl %ecx, -0x164(%rbp)
testb $0x1, %al
jne 0x167db
jmp 0x167cc
jmp 0x167e8
movq -0xe8(%rbp), %rax
movl -0x154(%rbp), %ecx
movl %ecx, (%rax)
movb -0x155(%rbp), %al
andb $0x1, %al
movb %al, -0x51(%rbp)
jmp 0x16792
movq -0xe8(%rbp), %rax
movl -0x15c(%rbp), %ecx
movl %ecx, (%rax)
movb -0x15d(%rbp), %al
andb $0x1, %al
movb %al, -0x51(%rbp)
jmp 0x16792
movq -0xe8(%rbp), %rax
movl -0x164(%rbp), %ecx
movl %ecx, (%rax)
movb -0x165(%rbp), %al
andb $0x1, %al
movb %al, -0x51(%rbp)
jmp 0x16792
testb $0x1, -0x51(%rbp)
jne 0x1680b
movq -0xc0(%rbp), %rdi
movl $0x2, %esi
callq 0x6210
movq %rax, -0xa0(%rbp)
jmp 0x16181
movq -0xa0(%rbp), %rdi
addq $0x438, %rdi            # imm = 0x438
xorl %esi, %esi
callq 0x6210
movq -0xc0(%rbp), %rdi
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rdx
leaq -0xa0(%rbp), %rsi
movl $0x2, %ecx
xorl %r8d, %r8d
callq 0xb430
testb $0x1, %al
jne 0x16852
jmp 0x169da
movq -0xa0(%rbp), %rax
addq $0x430, %rax            # imm = 0x430
movq %rax, -0x78(%rbp)
movl $0x0, -0x7c(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x178(%rbp)
movl -0x7c(%rbp), %edi
movl $0xffff, %esi           # imm = 0xFFFF
callq 0x58d0
movl %eax, -0x80(%rbp)
movl -0x7c(%rbp), %eax
movl %eax, -0x16c(%rbp)
decl %eax
subl $0x2, %eax
jb 0x168b5
jmp 0x16897
movl -0x16c(%rbp), %eax
subl $0x5, %eax
je 0x168c6
jmp 0x168a4
movq -0x178(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x84(%rbp)
jmp 0x168d5
movq -0x178(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x84(%rbp)
jmp 0x168d5
movq -0x178(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x84(%rbp)
movl -0x84(%rbp), %eax
andl $0x80000000, %eax       # imm = 0x80000000
cmpl $0x0, %eax
jne 0x168e7
jmp 0x16906
leaq 0x2904(%rip), %rdi      # 0x191f2
leaq 0x1ab1(%rip), %rsi      # 0x183a6
movl $0x5c0, %edx            # imm = 0x5C0
leaq 0x2943(%rip), %rcx      # 0x19244
callq 0x3180
movq -0xa0(%rbp), %rax
addq $0x430, %rax            # imm = 0x430
movq %rax, -0x8(%rbp)
movl $0x2, -0xc(%rbp)
movl $0x3, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x188(%rbp)
movl -0x10(%rbp), %eax
movl -0xc(%rbp), %ecx
movl %ecx, -0x14(%rbp)
decl %eax
movl %eax, %ecx
movq %rcx, -0x180(%rbp)
subl $0x4, %eax
ja 0x16960
movq -0x180(%rbp), %rax
leaq 0x19f9(%rip), %rcx      # 0x18350
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x188(%rbp), %rcx
movl -0x14(%rbp), %eax
negl %eax
lock
xaddl %eax, (%rcx)
movl %eax, -0x18(%rbp)
jmp 0x169c7
movq -0x188(%rbp), %rcx
movl -0x14(%rbp), %eax
negl %eax
lock
xaddl %eax, (%rcx)
movl %eax, -0x18(%rbp)
jmp 0x169c7
movq -0x188(%rbp), %rcx
movl -0x14(%rbp), %eax
negl %eax
lock
xaddl %eax, (%rcx)
movl %eax, -0x18(%rbp)
jmp 0x169c7
movq -0x188(%rbp), %rcx
movl -0x14(%rbp), %eax
negl %eax
lock
xaddl %eax, (%rcx)
movl %eax, -0x18(%rbp)
jmp 0x169c7
movq -0x188(%rbp), %rcx
movl -0x14(%rbp), %eax
negl %eax
lock
xaddl %eax, (%rcx)
movl %eax, -0x18(%rbp)
movq -0xa0(%rbp), %rax
movq %rax, -0x90(%rbp)
jmp 0x16ad3
movq -0xa8(%rbp), %rax
addq $0x430, %rax            # imm = 0x430
movq %rax, -0x20(%rbp)
movl $0x1, -0x24(%rbp)
movl $0x4, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x198(%rbp)
movl -0x28(%rbp), %eax
movl -0x24(%rbp), %ecx
movl %ecx, -0x2c(%rbp)
decl %eax
movl %eax, %ecx
movq %rcx, -0x190(%rbp)
subl $0x4, %eax
ja 0x16a34
movq -0x190(%rbp), %rax
leaq 0x1911(%rip), %rcx      # 0x1833c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x198(%rbp), %rcx
movl -0x2c(%rbp), %eax
negl %eax
lock
xaddl %eax, (%rcx)
movl %eax, -0x30(%rbp)
jmp 0x16a9b
movq -0x198(%rbp), %rcx
movl -0x2c(%rbp), %eax
negl %eax
lock
xaddl %eax, (%rcx)
movl %eax, -0x30(%rbp)
jmp 0x16a9b
movq -0x198(%rbp), %rcx
movl -0x2c(%rbp), %eax
negl %eax
lock
xaddl %eax, (%rcx)
movl %eax, -0x30(%rbp)
jmp 0x16a9b
movq -0x198(%rbp), %rcx
movl -0x2c(%rbp), %eax
negl %eax
lock
xaddl %eax, (%rcx)
movl %eax, -0x30(%rbp)
jmp 0x16a9b
movq -0x198(%rbp), %rcx
movl -0x2c(%rbp), %eax
negl %eax
lock
xaddl %eax, (%rcx)
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0xac(%rbp)
cmpl $0x80000001, -0xac(%rbp) # imm = 0x80000001
jne 0x16ac3
movq -0xc0(%rbp), %rdi
movq -0xa8(%rbp), %rsi
callq 0xb2b0
jmp 0x16181
movq $0x0, -0x90(%rbp)
movq -0x90(%rbp), %rax
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)