// File: /workspace/github_cpp_makefile_star2_O2/HQarroum[P]thread-pool/examples/one-producer-many-consumers/./../../includes/concurrent_queue.hpp
// Function: moodycamel::ConcurrentQueue<std::function<void ()>, moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::new_block_index()
bool new_block_index()
		{
			auto prev = blockIndex.load(std::memory_order_relaxed);
			size_t prevCapacity = prev == nullptr ? 0 : prev->capacity;
			auto entryCount = prev == nullptr ? nextBlockIndexCapacity : prevCapacity;
			auto raw = static_cast<char*>((Traits::malloc)(
				sizeof(BlockIndexHeader) +
				std::alignment_of<BlockIndexEntry>::value - 1 + sizeof(BlockIndexEntry) * entryCount +
				std::alignment_of<BlockIndexEntry*>::value - 1 + sizeof(BlockIndexEntry*) * nextBlockIndexCapacity));
			if (raw == nullptr) {
				return false;
			}
			
			auto header = new (raw) BlockIndexHeader;
			auto entries = reinterpret_cast<BlockIndexEntry*>(details::align_for<BlockIndexEntry>(raw + sizeof(BlockIndexHeader)));
			auto index = reinterpret_cast<BlockIndexEntry**>(details::align_for<BlockIndexEntry*>(reinterpret_cast<char*>(entries) + sizeof(BlockIndexEntry) * entryCount));
			if (prev != nullptr) {
				auto prevTail = prev->tail.load(std::memory_order_relaxed);
				auto prevPos = prevTail;
				size_t i = 0;
				do {
					prevPos = (prevPos + 1) & (prev->capacity - 1);
					index[i++] = prev->index[prevPos];
				} while (prevPos != prevTail);
				assert(i == prevCapacity);
			}
			for (size_t i = 0; i != entryCount; ++i) {
				new (entries + i) BlockIndexEntry;
				entries[i].key.store(INVALID_BLOCK_BASE, std::memory_order_relaxed);
				index[prevCapacity + i] = entries + i;
			}
			header->prev = prev;
			header->entries = entries;
			header->index = index;
			header->capacity = nextBlockIndexCapacity;
			header->tail.store((prevCapacity - 1) & (nextBlockIndexCapacity - 1), std::memory_order_relaxed);
			
			blockIndex.store(header, std::memory_order_release);
			
			nextBlockIndexCapacity <<= 1;
			
			return true;
		}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x60(%rdi), %r15
testq %r15, %r15
je 0x6304
movq (%r15), %r14
jmp 0x6307
xorl %r14d, %r14d
testq %r15, %r15
movq 0x58(%rbx), %r12
movq %r14, %r13
cmoveq %r12, %r13
movq %r13, %rbp
shlq $0x4, %rbp
leaq 0x36(,%r12,8), %rdi
addq %rbp, %rdi
callq 0x32c0
testq %rax, %rax
je 0x63ed
leaq 0x28(%rax), %rdx
negl %edx
andl $0x7, %edx
leaq (%rax,%rdx), %r9
addq $0x28, %r9
leaq (%r9,%rbp), %rsi
testq %r15, %r15
je 0x6386
movq %r9, (%rsp)
movq 0x8(%r15), %rdi
movq (%r15), %r8
movq 0x18(%r15), %r9
decq %r8
xorl %r10d, %r10d
movq %rdi, %r11
incq %r11
andq %r8, %r11
movq (%r9,%r11,8), %rcx
movq %rcx, (%rsi,%r10,8)
incq %r10
cmpq %rdi, %r11
jne 0x6367
cmpq %r10, %r14
movq (%rsp), %r9
jne 0x6402
movl %esi, %edi
negl %edi
andl $0x7, %edi
addq %rsi, %rdi
leaq (,%r14,8), %rcx
addq %rbp, %rcx
addq %rdx, %rcx
leaq (%rax,%rcx), %rdx
addq $0x28, %rdx
xorl %esi, %esi
movq %r9, %r8
cmpq %rsi, %r13
je 0x63c4
movq $0x1, (%r8)
movq %r8, (%rdx,%rsi,8)
incq %rsi
addq $0x10, %r8
jmp 0x63ab
movq %r15, 0x20(%rax)
movq %r9, 0x10(%rax)
movq %rdi, 0x18(%rax)
movq %r12, (%rax)
decq %r14
leaq -0x1(%r12), %rcx
andq %r14, %rcx
movq %rcx, 0x8(%rax)
movq %rax, 0x60(%rbx)
addq %r12, %r12
movq %r12, 0x58(%rbx)
testq %rax, %rax
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1624(%rip), %rdi      # 0x7a2d
leaq 0xc2e(%rip), %rsi       # 0x703e
leaq 0x1628(%rip), %rcx      # 0x7a3f
movl $0xb9d, %edx            # imm = 0xB9D
callq 0x3170
nop