// File: jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::xml_parser::parse_question(char*, pugi::xml_node_struct*&, unsigned int, char)
char_t* parse_question(char_t* s, xml_node_struct*& ref_cursor, unsigned int optmsk, char_t endch)
		{
			// load into registers
			xml_node_struct* cursor = ref_cursor;
			char_t ch = 0;

			// parse node contents, starting with question mark
			++s;

			// read PI target
			char_t* target = s;

			if (!PUGI__IS_CHARTYPE(*s, ct_start_symbol)) PUGI__THROW_ERROR(status_bad_pi, s);

			PUGI__SCANWHILE(PUGI__IS_CHARTYPE(*s, ct_symbol));
			PUGI__CHECK_ERROR(status_bad_pi, s);

			// determine node type; stricmp / strcasecmp is not portable
			bool declaration = (target[0] | ' ') == 'x' && (target[1] | ' ') == 'm' && (target[2] | ' ') == 'l' && target + 3 == s;

			if (declaration ? PUGI__OPTSET(parse_declaration) : PUGI__OPTSET(parse_pi))
			{
				if (declaration)
				{
					// disallow non top-level declarations
					if (cursor->parent) PUGI__THROW_ERROR(status_bad_pi, s);

					PUGI__PUSHNODE(node_declaration);
				}
				else
				{
					PUGI__PUSHNODE(node_pi);
				}

				cursor->name = target;

				PUGI__ENDSEG();

				// parse value/attributes
				if (ch == '?')
				{
					// empty node
					if (!PUGI__ENDSWITH(*s, '>')) PUGI__THROW_ERROR(status_bad_pi, s);
					s += (*s == '>');

					PUGI__POPNODE();
				}
				else if (PUGI__IS_CHARTYPE(ch, ct_space))
				{
					PUGI__SKIPWS();

					// scan for tag end
					char_t* value = s;

					PUGI__SCANFOR(s[0] == '?' && PUGI__ENDSWITH(s[1], '>'));
					PUGI__CHECK_ERROR(status_bad_pi, s);

					if (declaration)
					{
						// replace ending ? with / so that 'element' terminates properly
						*s = '/';

						// we exit from this function with cursor at node_declaration, which is a signal to parse() to go to LOC_ATTRIBUTES
						s = value;
					}
					else
					{
						// store value and step over >
						cursor->value = value;

						PUGI__POPNODE();

						PUGI__ENDSEG();

						s += (*s == '>');
					}
				}
				else PUGI__THROW_ERROR(status_bad_pi, s);
			}
			else
			{
				// scan for tag end
				PUGI__SCANFOR(s[0] == '?' && PUGI__ENDSWITH(s[1], '>'));
				PUGI__CHECK_ERROR(status_bad_pi, s);

				s += (s[1] == '>' ? 2 : 1);
			}

			// store from registers
			ref_cursor = cursor;

			return s;
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movb %r8b, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movb %al, -0x25(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movb $0x0, -0x31(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x18178(%rip), %rax     # 0x6b0d0
movzbl (%rax,%rcx), %eax
andl $0x80, %eax
cmpl $0x0, %eax
jne 0x52f86
movq -0x58(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x6, 0x10(%rax)
movq $0x0, -0x8(%rbp)
jmp 0x53427
jmp 0x52f88
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x18138(%rip), %rax     # 0x6b0d0
movzbl (%rax,%rcx), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x52fb2
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x52f88
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x52fde
movq -0x58(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x6, 0x10(%rax)
movq $0x0, -0x8(%rbp)
jmp 0x53427
movq -0x40(%rbp), %rax
movsbl (%rax), %ecx
orl $0x20, %ecx
xorl %eax, %eax
cmpl $0x78, %ecx
movb %al, -0x59(%rbp)
jne 0x5302e
movq -0x40(%rbp), %rax
movsbl 0x1(%rax), %ecx
orl $0x20, %ecx
xorl %eax, %eax
cmpl $0x6d, %ecx
movb %al, -0x59(%rbp)
jne 0x5302e
movq -0x40(%rbp), %rax
movsbl 0x2(%rax), %ecx
orl $0x20, %ecx
xorl %eax, %eax
cmpl $0x6c, %ecx
movb %al, -0x59(%rbp)
jne 0x5302e
movq -0x40(%rbp), %rax
addq $0x3, %rax
cmpq -0x18(%rbp), %rax
sete %al
movb %al, -0x59(%rbp)
movb -0x59(%rbp), %al
andb $0x1, %al
movb %al, -0x41(%rbp)
testb $0x1, -0x41(%rbp)
je 0x53049
movl -0x24(%rbp), %eax
andl $0x100, %eax            # imm = 0x100
movl %eax, -0x60(%rbp)
jmp 0x53052
movl -0x24(%rbp), %eax
andl $0x1, %eax
movl %eax, -0x60(%rbp)
movl -0x60(%rbp), %eax
cmpl $0x0, %eax
je 0x53345
testb $0x1, -0x41(%rbp)
je 0x530d1
movq -0x30(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x5308f
movq -0x58(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x6, 0x10(%rax)
movq $0x0, -0x8(%rbp)
jmp 0x53427
movq -0x58(%rbp), %rax
movq -0x30(%rbp), %rdi
movq (%rax), %rsi
movl $0x7, %edx
callq 0x4fb50
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x530cf
movq -0x58(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x3, 0x10(%rax)
movq $0x0, -0x8(%rbp)
jmp 0x53427
jmp 0x53113
movq -0x58(%rbp), %rax
movq -0x30(%rbp), %rdi
movq (%rax), %rsi
movl $0x6, %edx
callq 0x4fb50
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x53111
movq -0x58(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x3, 0x10(%rax)
movq $0x0, -0x8(%rbp)
jmp 0x53427
jmp 0x53113
movq -0x40(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movb (%rax), %al
movb %al, -0x31(%rbp)
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movsbl -0x31(%rbp), %eax
cmpl $0x3f, %eax
jne 0x531b6
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3e, %eax
je 0x53185
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x53165
movsbl -0x25(%rbp), %eax
cmpl $0x3e, %eax
je 0x53185
movq -0x58(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x6, 0x10(%rax)
movq $0x0, -0x8(%rbp)
jmp 0x53427
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3e, %eax
sete %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x53340
movzbl -0x31(%rbp), %eax
movl %eax, %ecx
leaq 0x17f0d(%rip), %rax     # 0x6b0d0
movzbl (%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x5331e
jmp 0x531d5
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x17eeb(%rip), %rax     # 0x6b0d0
movzbl (%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x531ff
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x531d5
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x61(%rbp)
je 0x5326e
movq -0x18(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x3f, %ecx
movb %al, -0x62(%rbp)
jne 0x53266
movq -0x18(%rbp), %rax
movsbl 0x1(%rax), %ecx
movb $0x1, %al
cmpl $0x3e, %ecx
movb %al, -0x63(%rbp)
je 0x53260
movq -0x18(%rbp), %rax
movsbl 0x1(%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x64(%rbp)
jne 0x5325a
movsbl -0x25(%rbp), %eax
cmpl $0x3e, %eax
sete %al
movb %al, -0x64(%rbp)
movb -0x64(%rbp), %al
movb %al, -0x63(%rbp)
movb -0x63(%rbp), %al
movb %al, -0x62(%rbp)
movb -0x62(%rbp), %al
xorb $-0x1, %al
movb %al, -0x61(%rbp)
movb -0x61(%rbp), %al
testb $0x1, %al
jne 0x53277
jmp 0x53285
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x53207
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x532b1
movq -0x58(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x6, 0x10(%rax)
movq $0x0, -0x8(%rbp)
jmp 0x53427
testb $0x1, -0x41(%rbp)
je 0x532c8
movq -0x18(%rbp), %rax
movb $0x2f, (%rax)
movq -0x50(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x5331c
movq -0x50(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movb (%rax), %al
movb %al, -0x31(%rbp)
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3e, %eax
sete %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x5333e
movq -0x58(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x6, 0x10(%rax)
movq $0x0, -0x8(%rbp)
jmp 0x53427
jmp 0x53340
jmp 0x53414
jmp 0x53347
movq -0x18(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x65(%rbp)
je 0x533ae
movq -0x18(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x3f, %ecx
movb %al, -0x66(%rbp)
jne 0x533a6
movq -0x18(%rbp), %rax
movsbl 0x1(%rax), %ecx
movb $0x1, %al
cmpl $0x3e, %ecx
movb %al, -0x67(%rbp)
je 0x533a0
movq -0x18(%rbp), %rax
movsbl 0x1(%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x68(%rbp)
jne 0x5339a
movsbl -0x25(%rbp), %eax
cmpl $0x3e, %eax
sete %al
movb %al, -0x68(%rbp)
movb -0x68(%rbp), %al
movb %al, -0x67(%rbp)
movb -0x67(%rbp), %al
movb %al, -0x66(%rbp)
movb -0x66(%rbp), %al
xorb $-0x1, %al
movb %al, -0x65(%rbp)
movb -0x65(%rbp), %al
testb $0x1, %al
jne 0x533b7
jmp 0x533c5
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x53347
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x533ee
movq -0x58(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x6, 0x10(%rax)
movq $0x0, -0x8(%rbp)
jmp 0x53427
movq -0x18(%rbp), %rax
movsbl 0x1(%rax), %edx
movl $0x1, %ecx
movl $0x2, %eax
cmpl $0x3e, %edx
cmovel %eax, %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)