// File: /workspace/github_cpp_makefile_star2_O3/wichtounet[P]articles/plf_colony_alpha/plf_colony.h
// Function: plf::colony<Trivial<8>, std::allocator<Trivial<8>>, unsigned short>::reduced_stack::push(Trivial<8>*)
void push(const stack_element_type the_element)
		{
			switch ((top_element == NULL) + (top_element == end_element))
			{
				case 0:
				{
					PLF_COLONY_CONSTRUCT(element_pointer_allocator_type, (*this), ++top_element, the_element); // According to the C++ standard, construction of a pointer (of any type) may not trigger an exception (17.6.3.3) - hence, no try-catch blocks are necessary for storing the erased location pointers.
					++total_number_of_elements;
					return;
				}
				case 1:
				{
					if (current_group->next_group == NULL)
					{
						current_group->next_group = PLF_COLONY_ALLOCATE(stack_group_allocator_type, group_allocator_pair, 1, current_group);

						try
						{
							#ifdef PLF_COLONY_VARIADICS_SUPPORT
								PLF_COLONY_CONSTRUCT(stack_group_allocator_type, group_allocator_pair, current_group->next_group, (total_number_of_elements < std::numeric_limits<size_type>::max() / 2) ? total_number_of_elements : std::numeric_limits<size_type>::max() / 2, current_group);
							#else
								PLF_COLONY_CONSTRUCT(stack_group_allocator_type, group_allocator_pair, current_group->next_group, group((total_number_of_elements < std::numeric_limits<size_type>::max() / 2) ? total_number_of_elements : std::numeric_limits<size_type>::max() / 2, current_group));
							#endif
						}
						catch (...)
						{
							PLF_COLONY_DEALLOCATE(stack_group_allocator_type, group_allocator_pair, current_group->next_group, 1);
							current_group->next_group = NULL;
							throw;
						}
					}

					current_group = current_group->next_group;
					start_element = top_element = current_group->elements;
					end_element = current_group->end;

					PLF_COLONY_CONSTRUCT(element_pointer_allocator_type, (*this), top_element, the_element);
					++total_number_of_elements;
					return;
				}
				case 2: // ie. empty stack, must initialize
				{
					initialize(group_allocator_pair.min_elements_per_group);
					PLF_COLONY_CONSTRUCT(element_pointer_allocator_type, (*this), top_element, the_element);
					total_number_of_elements = 1;
					return;
				}
			}
		}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x10(%rdi), %rax
xorl %ecx, %ecx
movq %rsi, %r14
movq %rdi, %rbx
cmpq 0x20(%rdi), %rax
sete %cl
cmpq $0x1, %rax
adcl $0x0, %ecx
cmpl $0x2, %ecx
je 0x51f00
cmpl $0x1, %ecx
jne 0x51f1d
movq (%rbx), %rax
movq 0x8(%rax), %rax
testq %rax, %rax
jne 0x51f57
movl $0x20, %edi
callq 0x41c0
movq (%rbx), %rcx
movq %rax, %r15
movabsq $0x7fffffffffffffff, %r12 # imm = 0x7FFFFFFFFFFFFFFF
movq %r15, 0x8(%rcx)
movq 0x28(%rbx), %rax
movq (%rbx), %r13
cmpq %r12, %rax
cmovbq %rax, %r12
testq %r13, %r13
je 0x51f2b
movq (%r13), %rdx
jmp 0x51f2d
movq 0x30(%rbx), %rsi
movq %rbx, %rdi
callq 0x52354
movq 0x10(%rbx), %rax
movq %r14, (%rax)
movq $0x1, 0x28(%rbx)
jmp 0x51f74
leaq 0x8(%rax), %rcx
movq %rcx, 0x10(%rbx)
movq %r14, 0x8(%rax)
jmp 0x51f70
xorl %edx, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0xc3f8
movq %rax, (%r15)
leaq -0x8(%rax,%r12,8), %rax
movq $0x0, 0x8(%r15)
movq %r13, 0x10(%r15)
movq %rax, 0x18(%r15)
movq (%rbx), %rax
movq 0x8(%rax), %rax
movq %rax, (%rbx)
movq (%rax), %rcx
movq %rcx, 0x10(%rbx)
movq %rcx, 0x18(%rbx)
movq 0x18(%rax), %rax
movq %rax, 0x20(%rbx)
movq %r14, (%rcx)
incq 0x28(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rdi
callq 0x40c0
movq (%rbx), %rax
movq 0x8(%rax), %rdi
callq 0x41a0
movq (%rbx), %rax
movq $0x0, 0x8(%rax)
callq 0x4270
movq %rax, %rbx
callq 0x42c0
movq %rbx, %rdi
callq 0x42d0
movq %rax, %rdi
callq 0xaa79