// File: jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::xpath_parser::parse_expression_rec(pugi::impl::(anonymous namespace)::xpath_ast_node*, int)
xpath_ast_node* parse_expression_rec(xpath_ast_node* lhs, int limit)
		{
			binary_op_t op = binary_op_t::parse(_lexer);

			while (op.asttype != ast_unknown && op.precedence >= limit)
			{
				_lexer.next();

				xpath_ast_node* rhs = parse_path_or_unary_expression();
				if (!rhs) return 0;

				binary_op_t nextop = binary_op_t::parse(_lexer);

				while (nextop.asttype != ast_unknown && nextop.precedence > op.precedence)
				{
					rhs = parse_expression_rec(rhs, nextop.precedence);
					if (!rhs) return 0;

					nextop = binary_op_t::parse(_lexer);
				}

				if (op.asttype == ast_op_union && (lhs->rettype() != xpath_type_node_set || rhs->rettype() != xpath_type_node_set))
					return error("Union operator has to be applied to node sets");

				lhs = alloc_node(op.asttype, op.rettype, lhs, rhs);
				if (!lhs) return 0;

				op = binary_op_t::parse(_lexer);
			}

			return lhs;
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
addq $0x8, %rdi
callq 0x5dc70
movl %edx, -0x30(%rbp)
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x20(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x28(%rbp)
movb %al, -0xa9(%rbp)
je 0x5b2ac
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
setge %al
movb %al, -0xa9(%rbp)
movb -0xa9(%rbp), %al
testb $0x1, %al
jne 0x5b2bb
jmp 0x5b45d
movq -0xa8(%rbp), %rdi
addq $0x8, %rdi
callq 0x5a830
movq -0xa8(%rbp), %rdi
callq 0x5afd0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x5b2ef
movq $0x0, -0x8(%rbp)
jmp 0x5b465
movq -0xa8(%rbp), %rdi
addq $0x8, %rdi
callq 0x5dc70
movl %edx, -0x58(%rbp)
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x4c(%rbp)
movl -0x58(%rbp), %eax
movl %eax, -0x44(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x4c(%rbp)
movb %al, -0xaa(%rbp)
je 0x5b331
movl -0x44(%rbp), %eax
cmpl -0x20(%rbp), %eax
setg %al
movb %al, -0xaa(%rbp)
movb -0xaa(%rbp), %al
testb $0x1, %al
jne 0x5b33d
jmp 0x5b3a0
movq -0xa8(%rbp), %rdi
movq -0x40(%rbp), %rsi
movl -0x44(%rbp), %edx
callq 0x5b250
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x5b368
movq $0x0, -0x8(%rbp)
jmp 0x5b465
movq -0xa8(%rbp), %rdi
addq $0x8, %rdi
callq 0x5dc70
movl %edx, -0x78(%rbp)
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x6c(%rbp)
movl -0x78(%rbp), %eax
movl %eax, -0x64(%rbp)
movq -0x6c(%rbp), %rax
movq %rax, -0x4c(%rbp)
movl -0x64(%rbp), %eax
movl %eax, -0x44(%rbp)
jmp 0x5b314
cmpl $0xf, -0x28(%rbp)
jne 0x5b3de
movq -0x18(%rbp), %rdi
callq 0x4b490
cmpl $0x1, %eax
jne 0x5b3c2
movq -0x40(%rbp), %rdi
callq 0x4b490
cmpl $0x1, %eax
je 0x5b3de
movq -0xa8(%rbp), %rdi
leaq 0x12810(%rip), %rsi     # 0x6dbe0
callq 0x5af80
movq %rax, -0x8(%rbp)
jmp 0x5b465
movq -0xa8(%rbp), %rdi
movl -0x28(%rbp), %esi
movl -0x24(%rbp), %edx
movq -0x18(%rbp), %rcx
movq -0x40(%rbp), %r8
callq 0x5ba30
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x5b40d
movq $0x0, -0x8(%rbp)
jmp 0x5b465
movq -0xa8(%rbp), %rdi
addq $0x8, %rdi
callq 0x5dc70
movl %edx, -0x98(%rbp)
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
movq %rax, -0x8c(%rbp)
movl -0x98(%rbp), %eax
movl %eax, -0x84(%rbp)
movq -0x8c(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0x84(%rbp), %eax
movl %eax, -0x20(%rbp)
jmp 0x5b28f
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)