// File: /workspace/github_cpp_makefile_star2_O3/jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::xpath_ast_node::eval_node_set(pugi::impl::(anonymous namespace)::xpath_context const&, pugi::impl::(anonymous namespace)::xpath_stack const&, pugi::impl::(anonymous namespace)::nodeset_eval_t)
xpath_node_set_raw eval_node_set(const xpath_context& c, const xpath_stack& stack, nodeset_eval_t eval)
		{
			switch (_type)
			{
			case ast_op_union:
			{
				xpath_allocator_capture cr(stack.temp);

				xpath_stack swapped_stack = {stack.temp, stack.result};

				xpath_node_set_raw ls = _left->eval_node_set(c, swapped_stack, eval);
				xpath_node_set_raw rs = _right->eval_node_set(c, stack, eval);

				// we can optimize merging two sorted sets, but this is a very rare operation, so don't bother
				rs.set_type(xpath_node_set::type_unsorted);

				rs.append(ls.begin(), ls.end(), stack.result);
				rs.remove_duplicates();

				return rs;
			}

			case ast_filter:
			{
				xpath_node_set_raw set = _left->eval_node_set(c, stack, _test == predicate_constant_one ? nodeset_eval_first : nodeset_eval_all);

				// either expression is a number or it contains position() call; sort by document order
				if (_test != predicate_posinv) set.sort_do();

				bool once = eval_once(set.type(), eval);

				apply_predicate(set, 0, stack, once);

				return set;
			}

			case ast_func_id:
				return xpath_node_set_raw();

			case ast_step:
			{
				switch (_axis)
				{
				case axis_ancestor:
					return step_do(c, stack, eval, axis_to_type<axis_ancestor>());

				case axis_ancestor_or_self:
					return step_do(c, stack, eval, axis_to_type<axis_ancestor_or_self>());

				case axis_attribute:
					return step_do(c, stack, eval, axis_to_type<axis_attribute>());

				case axis_child:
					return step_do(c, stack, eval, axis_to_type<axis_child>());

				case axis_descendant:
					return step_do(c, stack, eval, axis_to_type<axis_descendant>());

				case axis_descendant_or_self:
					return step_do(c, stack, eval, axis_to_type<axis_descendant_or_self>());

				case axis_following:
					return step_do(c, stack, eval, axis_to_type<axis_following>());

				case axis_following_sibling:
					return step_do(c, stack, eval, axis_to_type<axis_following_sibling>());

				case axis_namespace:
					// namespaced axis is not supported
					return xpath_node_set_raw();

				case axis_parent:
					return step_do(c, stack, eval, axis_to_type<axis_parent>());

				case axis_preceding:
					return step_do(c, stack, eval, axis_to_type<axis_preceding>());

				case axis_preceding_sibling:
					return step_do(c, stack, eval, axis_to_type<axis_preceding_sibling>());

				case axis_self:
					return step_do(c, stack, eval, axis_to_type<axis_self>());

				default:
					assert(false && "Unknown axis"); // unreachable
					return xpath_node_set_raw();
				}
			}

			case ast_step_root:
			{
				assert(!_right); // root step can't have any predicates

				xpath_node_set_raw ns;

				ns.set_type(xpath_node_set::type_sorted);

				if (c.n.node()) ns.push_back(c.n.node().root(), stack.result);
				else if (c.n.attribute()) ns.push_back(c.n.parent().root(), stack.result);

				return ns;
			}

			case ast_variable:
			{
				assert(_rettype == _data.variable->type());

				if (_rettype == xpath_type_node_set)
				{
					const xpath_node_set& s = _data.variable->get_node_set();

					xpath_node_set_raw ns;

					ns.set_type(s.type());
					ns.append(s.begin(), s.end(), stack.result);

					return ns;
				}
			}

			// fallthrough
			default:
				assert(false && "Wrong expression for return type node set"); // unreachable
				return xpath_node_set_raw();
			}
		}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movl %r8d, %ebp
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r14
movzbl (%rsi), %eax
leal -0xf(%rax), %ecx
cmpl $0x9, %ecx
ja 0x27a92
leaq 0x9fc9(%rip), %rax      # 0x319d0
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x8(%rbx), %rax
movq %rax, (%rsp)
movups (%rax), %xmm0
movups %xmm0, 0x8(%rsp)
movq 0x10(%rax), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x40(%rsp), %rcx
movq %rax, (%rcx)
movq (%rbx), %rax
movq %rax, 0x8(%rcx)
movq 0x8(%r15), %rsi
leaq 0x20(%rsp), %rdi
movq %r12, %rdx
movl %ebp, %r8d
callq 0x279d6
movq 0x10(%r15), %rsi
movq %r14, %rdi
movq %r12, %rdx
movq %rbx, %rcx
movl %ebp, %r8d
callq 0x279d6
movl $0x0, (%r14)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq (%rbx), %rcx
movq %r14, %rdi
callq 0x2d954
movq %r14, %rdi
callq 0x2d9e8
movq %rsp, %rdi
callq 0x2d264
jmp 0x27c3c
cmpl $0x38, %eax
je 0x27be6
cmpl $0x39, %eax
jne 0x27db0
cmpq $0x0, 0x10(%r15)
jne 0x27dee
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
movq $0x0, 0x18(%r14)
movl $0x1, (%r14)
movq (%r12), %rax
movq 0x8(%r12), %rcx
testq %rcx, %rcx
setne %dl
testq %rax, %rax
sete %sil
orb %dl, %sil
je 0x27af3
testq %rcx, %rcx
je 0x27c3c
testq %rax, %rax
je 0x27c49
movq (%rax), %rcx
shrq $0x8, %rcx
negq %rcx
movq (%rax,%rcx), %rax
addq $-0x40, %rax
movq %rsp, %rsi
movq %rax, (%rsi)
movq $0x0, 0x8(%rsi)
movq (%rbx), %rdx
movq %r14, %rdi
callq 0x2f806
jmp 0x27c3c
movq 0x8(%r15), %rsi
xorl %r8d, %r8d
cmpb $0x3, 0x3(%r15)
sete %r8b
addl %r8d, %r8d
movq %r14, %rdi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x279d6
cmpb $0x1, 0x3(%r15)
movl (%r14), %eax
je 0x27b62
movq 0x8(%r14), %rdi
movq 0x10(%r14), %rsi
movl %eax, %edx
xorl %ecx, %ecx
callq 0x24089
movl %eax, (%r14)
xorl %ecx, %ecx
testl %ebp, %ebp
setne %cl
xorl %edx, %edx
cmpl $0x1, %ebp
sete %dl
cmpl $0x1, %eax
cmovel %ecx, %edx
movzbl %dl, %r8d
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rbx, %rcx
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2da8a
movsbl 0x1(%r15), %ecx
movq 0x20(%r15), %rax
cmpl %ecx, (%rax)
jne 0x27dcf
cmpb $0x1, %cl
jne 0x27db0
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
movq $0x0, 0x18(%r14)
movl 0x10(%rax), %ecx
movl %ecx, (%r14)
movq 0x28(%rax), %rsi
movq 0x30(%rax), %rdx
movq (%rbx), %rcx
movq %r14, %rdi
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2d954
movzbl 0x2(%r15), %eax
cmpq $0xc, %rax
ja 0x27e0d
leaq 0x9dfc(%rip), %rcx      # 0x319f8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rbx, %rcx
movl %ebp, %r8d
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2ddca
movl $0x0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
movq $0x0, 0x18(%r14)
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
jmp 0x27b05
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rbx, %rcx
movl %ebp, %r8d
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2e96c
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rbx, %rcx
movl %ebp, %r8d
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2e292
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rbx, %rcx
movl %ebp, %r8d
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2eaa2
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rbx, %rcx
movl %ebp, %r8d
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2e74a
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rbx, %rcx
movl %ebp, %r8d
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2e00e
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rbx, %rcx
movl %ebp, %r8d
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2e156
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rbx, %rcx
movl %ebp, %r8d
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2e612
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rbx, %rcx
movl %ebp, %r8d
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2deec
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rbx, %rcx
movl %ebp, %r8d
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2e3ca
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rbx, %rcx
movl %ebp, %r8d
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2e4ee
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rbx, %rcx
movl %ebp, %r8d
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2e84a
leaq 0xcece(%rip), %rdi      # 0x34c85
leaq 0xa167(%rip), %rsi      # 0x31f25
leaq 0xce28(%rip), %rcx      # 0x34bed
movl $0x2a61, %edx           # imm = 0x2A61
callq 0x6120
leaq 0xc3ca(%rip), %rdi      # 0x341a0
leaq 0xa148(%rip), %rsi      # 0x31f25
leaq 0xce09(%rip), %rcx      # 0x34bed
movl $0x2a50, %edx           # imm = 0x2A50
callq 0x6120
leaq 0xce88(%rip), %rdi      # 0x34c7d
leaq 0xa129(%rip), %rsi      # 0x31f25
leaq 0xcdea(%rip), %rcx      # 0x34bed
movl $0x2a42, %edx           # imm = 0x2A42
callq 0x6120
leaq 0xcdc1(%rip), %rdi      # 0x34bd5
leaq 0xa10a(%rip), %rsi      # 0x31f25
leaq 0xcdcb(%rip), %rcx      # 0x34bed
movl $0x2a3b, %edx           # imm = 0x2A3B
callq 0x6120
movq %rax, %rbx
movq %rsp, %rdi
callq 0x2d264
movq %rbx, %rdi
callq 0x6430
nop