// File: /workspace/github_cpp_makefile_star2_O2/adamiaonr[P]rid-analytics/src/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)
				throw_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();

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

				return new (alloc_node()) xpath_ast_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) throw_error("Two axis specifiers in one step");

					axis = parse_axis_name(nt_name, axis_specified);

					if (!axis_specified) throw_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 throw_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) throw_error("Unrecognized node type");

							nt_name = xpath_lexer_string();
						}
						else if (nt_name == PUGIXML_TEXT("processing-instruction"))
						{
							if (_lexer.current() != lex_quoted_string)
								throw_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)
								throw_error("Unmatched brace near processing-instruction()");
							_lexer.next();
						}
						else
							throw_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 throw_error("Unrecognized node test");

			xpath_ast_node* n = new (alloc_node()) xpath_ast_node(ast_step, set, axis, nt_type, alloc_string(nt_name));

			xpath_ast_node* last = 0;

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

				xpath_ast_node* expr = parse_expression();

				xpath_ast_node* pred = new (alloc_node()) xpath_ast_node(ast_predicate, 0, expr, predicate_default);

				if (_lexer.current() != lex_close_square_brace)
					throw_error("Unmatched square brace");
				_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 0x12a08
cmpb $0x1, 0x1(%r15)
jne 0x12dfc
leaq 0x8(%rbx), %rdi
movl 0x28(%rbx), %eax
cmpl $0x18, %eax
je 0x12a46
cmpl $0x17, %eax
je 0x12a31
cmpl $0x16, %eax
movq %rdi, %r13
jne 0x12a6e
callq 0x1157c
movl 0x28(%rbx), %eax
movb $0x2, %r12b
movb $0x1, %bpl
jmp 0x12a73
callq 0x1157c
movq %rbx, %rdi
callq 0x12604
movl $0x20c0138, (%rax)      # imm = 0x20C0138
jmp 0x12a59
callq 0x1157c
movq %rbx, %rdi
callq 0x12604
movl $0x2090138, (%rax)      # imm = 0x2090138
movq %r15, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
andq $0x0, 0x20(%rax)
jmp 0x12ba6
movb $0x3, %r12b
xorl %ebp, %ebp
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
cmpl $0x9, %eax
je 0x12af6
cmpl $0x14, %eax
jne 0x12e05
movq %r13, %rdi
callq 0x1261c
movups (%rax), %xmm0
movaps %xmm0, (%rsp)
movq %r13, %rdi
callq 0x1157c
movl 0x28(%rbx), %eax
cmpl $0x19, %eax
jne 0x12d1b
testb %bpl, %bpl
jne 0x12e0e
movq (%rsp), %rax
movzbl (%rax), %eax
leal -0x61(%rax), %ecx
cmpl $0x5, %ecx
ja 0x12bb5
leaq 0x1394e(%rip), %rax     # 0x2641c
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x15dc0(%rip), %rsi     # 0x2889e
movq %rsp, %rdi
callq 0x12656
testb %al, %al
je 0x12cb1
xorl %r12d, %r12d
jmp 0x12ce1
movq %r13, %rdi
callq 0x1157c
movb $0x7, %bpl
movq %rbx, %rdi
callq 0x12604
movq %rax, %r14
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x1289c
movw $0x138, (%r14)          # imm = 0x138
movb %r12b, 0x2(%r14)
movb %bpl, 0x3(%r14)
movq %r15, 0x8(%r14)
leaq 0x10(%r14), %rbp
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
movq %r14, 0x10(%rsp)
movq %rax, 0x20(%r14)
xorl %r14d, %r14d
movq %r13, %r12
cmpl $0x12, 0x28(%rbx)
jne 0x12ba1
movq %r12, %rdi
callq 0x1157c
movq %rbx, %rdi
callq 0x11880
movq %rax, %r13
movq %rbx, %rdi
callq 0x12604
movl $0x110, (%rax)          # imm = 0x110
andq $0x0, 0x8(%rax)
movq %r13, 0x10(%rax)
andq $0x0, 0x18(%rax)
cmpl $0x13, 0x28(%rbx)
jne 0x12ded
movq %rax, %r15
movq %r12, %rdi
callq 0x1157c
leaq 0x18(%r14), %rax
testq %r14, %r14
cmoveq %rbp, %rax
movq %r15, (%rax)
movq %r15, %r14
jmp 0x12b44
movq 0x10(%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x6e, %eax
je 0x12c5d
cmpl $0x70, %eax
je 0x12c71
cmpl $0x73, %eax
jne 0x12e17
leaq 0x15cdc(%rip), %rsi     # 0x288b3
movq %rsp, %rdi
callq 0x12656
movb $0xc, %r12b
jmp 0x12cd9
leaq 0x15cd0(%rip), %rsi     # 0x288be
movq %rsp, %rdi
callq 0x12656
movb $0x4, %r12b
testb %al, %al
jne 0x12ce1
leaq 0x15cc1(%rip), %rsi     # 0x288c9
movq %rsp, %rdi
callq 0x12656
movb $0x5, %r12b
jmp 0x12cd9
leaq 0x15c99(%rip), %rsi     # 0x288b8
movq %rsp, %rdi
callq 0x12656
movb $0x3, %r12b
jmp 0x12cd9
leaq 0x15ca6(%rip), %rsi     # 0x288dc
movq %rsp, %rdi
callq 0x12656
movb $0x6, %r12b
testb %al, %al
jne 0x12ce1
leaq 0x15c96(%rip), %rsi     # 0x288e6
movq %rsp, %rdi
callq 0x12656
movb $0x7, %r12b
jmp 0x12cd9
leaq 0x15c94(%rip), %rsi     # 0x288f8
movq %rsp, %rdi
callq 0x12656
movb $0x8, %r12b
jmp 0x12cd9
leaq 0x1558f(%rip), %rsi     # 0x28207
movq %rsp, %rdi
callq 0x12656
movb $0x9, %r12b
testb %al, %al
jne 0x12ce1
leaq 0x15c74(%rip), %rsi     # 0x28902
movq %rsp, %rdi
callq 0x12656
movb $0xa, %r12b
testb %al, %al
jne 0x12ce1
leaq 0x15c68(%rip), %rsi     # 0x2890c
movq %rsp, %rdi
callq 0x12656
movb $0xb, %r12b
jmp 0x12cd9
leaq 0x15bef(%rip), %rsi     # 0x288a7
movq %rsp, %rdi
callq 0x12656
movb $0x1, %r12b
testb %al, %al
jne 0x12ce1
leaq 0x14059(%rip), %rsi     # 0x26d27
movq %rsp, %rdi
callq 0x12656
movb $0x2, %r12b
testb %al, %al
je 0x12e17
movq %r13, %r14
movq %r13, %rdi
callq 0x1157c
movl 0x28(%rbx), %eax
cmpl $0x9, %eax
je 0x12d96
cmpl $0x14, %eax
jne 0x12e05
movq %r13, %rdi
callq 0x1261c
movups (%rax), %xmm0
movaps %xmm0, (%rsp)
movq %r13, %rdi
callq 0x1157c
movl 0x28(%rbx), %eax
cmpl $0xc, %eax
jne 0x12d59
movq %r13, %r14
movq %r13, %rdi
callq 0x1157c
movl 0x28(%rbx), %ebp
cmpl $0xd, %ebp
jne 0x12da5
movq %r14, %rdi
callq 0x1157c
movq %rsp, %rdi
callq 0x127bc
testl %eax, %eax
je 0x12e20
movl %eax, %ebp
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
jmp 0x12b01
movq 0x8(%rsp), %rax
movq %rax, %rcx
subq (%rsp), %rcx
movb $0x1, %bpl
cmpq $0x3, %rcx
jl 0x12b01
cmpb $0x3a, -0x2(%rax)
jne 0x12b01
cmpb $0x2a, -0x1(%rax)
jne 0x12b01
decq %rax
movq %rax, 0x8(%rsp)
movb $0x8, %bpl
jmp 0x12b01
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq %r14, %rdi
jmp 0x12af9
leaq 0x157b2(%rip), %rsi     # 0x2855e
movq %rsp, %rdi
callq 0x12656
testb %al, %al
je 0x12e29
cmpl $0xe, %ebp
jne 0x12e32
movq %r13, %r14
movq %r13, %rdi
callq 0x1261c
movups (%rax), %xmm0
movaps %xmm0, (%rsp)
movq %r13, %rdi
callq 0x1157c
cmpl $0xd, 0x28(%rbx)
jne 0x12e3b
movq %r14, %rdi
callq 0x1157c
movb $0x6, %bpl
jmp 0x12b01
leaq 0x157ae(%rip), %rsi     # 0x285a2
movq %rbx, %rdi
callq 0x11894
leaq 0x15738(%rip), %rsi     # 0x2853b
jmp 0x12df4
leaq 0x159cf(%rip), %rsi     # 0x287db
jmp 0x12df4
leaq 0x15999(%rip), %rsi     # 0x287ae
jmp 0x12df4
leaq 0x159b0(%rip), %rsi     # 0x287ce
jmp 0x12df4
leaq 0x159cb(%rip), %rsi     # 0x287f2
jmp 0x12df4
leaq 0x15a4a(%rip), %rsi     # 0x2887a
jmp 0x12df4
leaq 0x159d0(%rip), %rsi     # 0x28809
jmp 0x12df4
leaq 0x15a0a(%rip), %rsi     # 0x2884c
jmp 0x12df4