// File: /workspace/github_cpp_makefile_star2_O2/jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::xpath_parser::parse_step(pugi::impl::(anonymous namespace)::xpath_ast_node*)
xpath_ast_node* parse_step(xpath_ast_node* set)
		{
			if (set && set->rettype() != xpath_type_node_set)
				return error("Step has to be applied to node set");

			bool axis_specified = false;
			axis_t axis = axis_child; // implied child axis

			if (_lexer.current() == lex_axis_attribute)
			{
				axis = axis_attribute;
				axis_specified = true;

				_lexer.next();
			}
			else if (_lexer.current() == lex_dot)
			{
				_lexer.next();

				if (_lexer.current() == lex_open_square_brace)
					return error("Predicates are not allowed after an abbreviated step");

				return alloc_node(ast_step, set, axis_self, nodetest_type_node, 0);
			}
			else if (_lexer.current() == lex_double_dot)
			{
				_lexer.next();

				if (_lexer.current() == lex_open_square_brace)
					return error("Predicates are not allowed after an abbreviated step");

				return alloc_node(ast_step, set, axis_parent, nodetest_type_node, 0);
			}

			nodetest_t nt_type = nodetest_none;
			xpath_lexer_string nt_name;

			if (_lexer.current() == lex_string)
			{
				// node name test
				nt_name = _lexer.contents();
				_lexer.next();

				// was it an axis name?
				if (_lexer.current() == lex_double_colon)
				{
					// parse axis name
					if (axis_specified)
						return error("Two axis specifiers in one step");

					axis = parse_axis_name(nt_name, axis_specified);

					if (!axis_specified)
						return error("Unknown axis");

					// read actual node test
					_lexer.next();

					if (_lexer.current() == lex_multiply)
					{
						nt_type = nodetest_all;
						nt_name = xpath_lexer_string();
						_lexer.next();
					}
					else if (_lexer.current() == lex_string)
					{
						nt_name = _lexer.contents();
						_lexer.next();
					}
					else
					{
						return error("Unrecognized node test");
					}
				}

				if (nt_type == nodetest_none)
				{
					// node type test or processing-instruction
					if (_lexer.current() == lex_open_brace)
					{
						_lexer.next();

						if (_lexer.current() == lex_close_brace)
						{
							_lexer.next();

							nt_type = parse_node_test_type(nt_name);

							if (nt_type == nodetest_none)
								return error("Unrecognized node type");

							nt_name = xpath_lexer_string();
						}
						else if (nt_name == PUGIXML_TEXT("processing-instruction"))
						{
							if (_lexer.current() != lex_quoted_string)
								return error("Only literals are allowed as arguments to processing-instruction()");

							nt_type = nodetest_pi;
							nt_name = _lexer.contents();
							_lexer.next();

							if (_lexer.current() != lex_close_brace)
								return error("Unmatched brace near processing-instruction()");
							_lexer.next();
						}
						else
						{
							return error("Unmatched brace near node type test");
						}
					}
					// QName or NCName:*
					else
					{
						if (nt_name.end - nt_name.begin > 2 && nt_name.end[-2] == ':' && nt_name.end[-1] == '*') // NCName:*
						{
							nt_name.end--; // erase *

							nt_type = nodetest_all_in_namespace;
						}
						else
						{
							nt_type = nodetest_name;
						}
					}
				}
			}
			else if (_lexer.current() == lex_multiply)
			{
				nt_type = nodetest_all;
				_lexer.next();
			}
			else
			{
				return error("Unrecognized node test");
			}

			const char_t* nt_name_copy = alloc_string(nt_name);
			if (!nt_name_copy) return 0;

			xpath_ast_node* n = alloc_node(ast_step, set, axis, nt_type, nt_name_copy);
			if (!n) return 0;

			xpath_ast_node* last = 0;

			while (_lexer.current() == lex_open_square_brace)
			{
				_lexer.next();

				xpath_ast_node* expr = parse_expression();
				if (!expr) return 0;

				xpath_ast_node* pred = alloc_node(ast_predicate, 0, expr, predicate_default);
				if (!pred) return 0;

				if (_lexer.current() != lex_close_square_brace)
					return error("Expected ']' to match an opening '['");
				_lexer.next();

				if (last) last->set_next(pred);
				else n->set_right(pred);

				last = pred;
			}

			return n;
		}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movq %rdi, %rbx
testq %rsi, %rsi
je 0x26d90
cmpb $0x1, 0x1(%r15)
jne 0x26db9
leaq 0x8(%rbx), %r14
movl 0x28(%rbx), %eax
cmpl $0x18, %eax
je 0x26dde
cmpl $0x17, %eax
je 0x26dc9
cmpl $0x16, %eax
jne 0x26dfd
movq %r14, %rdi
callq 0x25a0e
movl 0x28(%rbx), %eax
pushq $0x2
popq %rbp
movb $0x1, %r13b
jmp 0x26e03
movq 0x40(%rbx), %rax
leaq 0x6eb4(%rip), %rcx      # 0x2dc78
jmp 0x26e57
movq %r14, %rdi
callq 0x25a0e
cmpl $0x12, 0x28(%rbx)
je 0x26df0
pushq $0xc
jmp 0x26e7d
movq %r14, %rdi
callq 0x25a0e
cmpl $0x12, 0x28(%rbx)
jne 0x26e7b
movq 0x40(%rbx), %rax
leaq 0x72ed(%rip), %rcx      # 0x2e0e8
jmp 0x26e57
pushq $0x3
popq %rbp
xorl %r13d, %r13d
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
cmpl $0x9, %eax
je 0x27177
leaq 0x7330(%rip), %r12      # 0x2e14a
cmpl $0x14, %eax
jne 0x26e50
movq %r14, %rdi
callq 0x269fe
movups (%rax), %xmm0
movaps %xmm0, (%rsp)
movq %r14, %rdi
callq 0x25a0e
movl 0x28(%rbx), %eax
cmpl $0x19, %eax
jne 0x27092
testb %r13b, %r13b
je 0x26e9d
leaq 0x72cf(%rip), %rcx      # 0x2e11d
jmp 0x26e53
movq %r12, %rcx
movq 0x40(%rbx), %rax
movq %rcx, (%rax)
movq 0x10(%rbx), %rcx
subq 0x30(%rbx), %rcx
movq %rcx, 0x8(%rax)
xorl %r15d, %r15d
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x9
popq %rdx
pushq $0x2
popq %rcx
movq %rbx, %rdi
movq %r15, %rsi
xorl %r8d, %r8d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x26a38
movq (%rsp), %rax
movzbl (%rax), %eax
leaq 0x7292(%rip), %r13      # 0x2e13d
leal -0x61(%rax), %ecx
cmpl $0x5, %ecx
ja 0x26efa
leaq 0x4cf6(%rip), %rax      # 0x2bbb0
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x7343(%rip), %rsi      # 0x2e20d
movq %rsp, %rdi
callq 0x26b58
xorl %ebp, %ebp
testb %al, %al
jne 0x27058
leaq 0x7333(%rip), %rsi      # 0x2e216
movq %rsp, %rdi
callq 0x26b58
testb %al, %al
je 0x2701d
pushq $0x1
jmp 0x27057
cmpl $0x6e, %eax
je 0x26fa9
cmpl $0x70, %eax
je 0x26f8f
cmpl $0x73, %eax
jne 0x26f32
leaq 0x730a(%rip), %rsi      # 0x2e222
movq %rsp, %rdi
callq 0x26b58
testb %al, %al
movq %r13, %rcx
je 0x26e53
pushq $0xc
jmp 0x27057
movq %r13, %rcx
jmp 0x26e53
leaq 0x57b1(%rip), %rsi      # 0x2c6f2
movq %rsp, %rdi
callq 0x26b58
testb %al, %al
movq %r13, %rcx
je 0x26e53
pushq $0x3
jmp 0x27057
leaq 0x72e3(%rip), %rsi      # 0x2e245
movq %rsp, %rdi
callq 0x26b58
testb %al, %al
je 0x26fca
pushq $0x6
jmp 0x27057
leaq 0x72ab(%rip), %rsi      # 0x2e227
movq %rsp, %rdi
callq 0x26b58
testb %al, %al
je 0x26fe8
pushq $0x4
jmp 0x27057
leaq 0x6abc(%rip), %rsi      # 0x2da52
movq %rsp, %rdi
callq 0x26b58
testb %al, %al
je 0x27006
pushq $0x9
jmp 0x27057
leaq 0x72b1(%rip), %rsi      # 0x2e261
movq %rsp, %rdi
callq 0x26b58
testb %al, %al
movq %r13, %rcx
je 0x26e53
pushq $0x8
jmp 0x27057
leaq 0x727e(%rip), %rsi      # 0x2e24f
movq %rsp, %rdi
callq 0x26b58
testb %al, %al
movq %r13, %rcx
je 0x26e53
pushq $0x7
jmp 0x27057
leaq 0x7243(%rip), %rsi      # 0x2e232
movq %rsp, %rdi
callq 0x26b58
testb %al, %al
movq %r13, %rcx
je 0x26e53
pushq $0x5
jmp 0x27057
leaq 0x725e(%rip), %rsi      # 0x2e26b
movq %rsp, %rdi
callq 0x26b58
testb %al, %al
je 0x2703b
pushq $0xa
jmp 0x27057
leaq 0x5493(%rip), %rsi      # 0x2c4b7
movq %rsp, %rdi
callq 0x26b58
testb %al, %al
movq %r13, %rcx
je 0x26e53
pushq $0x2
jmp 0x27057
leaq 0x7233(%rip), %rsi      # 0x2e275
movq %rsp, %rdi
callq 0x26b58
testb %al, %al
movq %r13, %rcx
je 0x26e53
pushq $0xb
popq %rbp
movq %r14, %rdi
callq 0x25a0e
movl 0x28(%rbx), %eax
cmpl $0x9, %eax
je 0x27170
movq %r12, %rcx
cmpl $0x14, %eax
jne 0x26e53
movq %r14, %rdi
callq 0x269fe
movups (%rax), %xmm0
movaps %xmm0, (%rsp)
movq %r14, %rdi
callq 0x25a0e
movl 0x28(%rbx), %eax
cmpl $0xc, %eax
jne 0x270d0
movq %r14, %rdi
callq 0x25a0e
movl 0x28(%rbx), %r12d
cmpl $0xd, %r12d
jne 0x2710c
movq %r14, %rdi
callq 0x25a0e
movq %rsp, %rdi
callq 0x2698e
testl %eax, %eax
je 0x27164
movl %eax, %r12d
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
jmp 0x27183
pushq $0x1
popq %r12
movq 0x8(%rsp), %rax
movq %rax, %rcx
subq (%rsp), %rcx
cmpq $0x3, %rcx
jl 0x27183
cmpb $0x3a, -0x2(%rax)
jne 0x27183
cmpb $0x2a, -0x1(%rax)
jne 0x27183
pushq $0x8
popq %r12
decq %rax
movq %rax, 0x8(%rsp)
jmp 0x27183
leaq 0x6b88(%rip), %rsi      # 0x2dc9b
movq %rsp, %rdi
callq 0x26b58
testb %al, %al
je 0x27158
cmpl $0xe, %r12d
jne 0x27238
movq %r14, %rdi
callq 0x269fe
movups (%rax), %xmm0
movaps %xmm0, (%rsp)
movq %r14, %rdi
callq 0x25a0e
cmpl $0xd, 0x28(%rbx)
jne 0x27244
pushq $0x6
popq %r12
movq %r14, %rdi
callq 0x25a0e
jmp 0x27183
leaq 0x708a(%rip), %rcx      # 0x2e1e9
jmp 0x26e53
leaq 0x6ff6(%rip), %rcx      # 0x2e161
jmp 0x26e53
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq %r14, %rdi
callq 0x25a0e
pushq $0x7
popq %r12
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x26bfc
testq %rax, %rax
je 0x26e66
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
movl %r12d, %ecx
movq %rax, %r8
callq 0x26a38
testq %rax, %rax
je 0x26e66
movq %rax, 0x10(%rsp)
movq %rax, %r12
addq $0x10, %r12
xorl %r15d, %r15d
xorl %ebp, %ebp
cmpl $0x12, 0x28(%rbx)
jne 0x27222
movq %r14, %rdi
callq 0x25a0e
movq %rbx, %rdi
xorl %esi, %esi
callq 0x25d12
testq %rax, %rax
je 0x26e69
movq %rbx, %rdi
pushq $0x10
popq %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x26b6e
testq %rax, %rax
je 0x26e69
cmpl $0x13, 0x28(%rbx)
jne 0x2722c
movq %rax, %r13
movq %r14, %rdi
callq 0x25a0e
leaq 0x18(%rbp), %rax
testq %rbp, %rbp
cmoveq %r12, %rax
movq %r13, (%rax)
movq %r13, %rbp
jmp 0x271c4
movq 0x10(%rsp), %r15
jmp 0x26e69
leaq 0x6b80(%rip), %rcx      # 0x2ddb3
jmp 0x26e53
leaq 0x6f39(%rip), %rcx      # 0x2e178
jmp 0x26e53
leaq 0x6f70(%rip), %rcx      # 0x2e1bb
jmp 0x26e53