// File: jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::xml_parser::parse_doctype_primitive(char*)
char_t* parse_doctype_primitive(char_t* s)
		{
			if (*s == '"' || *s == '\'')
			{
				// quoted string
				char_t ch = *s++;
				PUGI__SCANFOR(*s == ch);
				if (!*s) PUGI__THROW_ERROR(status_bad_doctype, s);

				s++;
			}
			else if (s[0] == '<' && s[1] == '?')
			{
				// <? ... ?>
				s += 2;
				PUGI__SCANFOR(s[0] == '?' && s[1] == '>'); // no need for ENDSWITH because ?> can't terminate proper doctype
				if (!*s) PUGI__THROW_ERROR(status_bad_doctype, s);

				s += 2;
			}
			else if (s[0] == '<' && s[1] == '!' && s[2] == '-' && s[3] == '-')
			{
				s += 4;
				PUGI__SCANFOR(s[0] == '-' && s[1] == '-' && s[2] == '>'); // no need for ENDSWITH because --> can't terminate proper doctype
				if (!*s) PUGI__THROW_ERROR(status_bad_doctype, s);

				s += 3;
			}
			else PUGI__THROW_ERROR(status_bad_doctype, s);

			return s;
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
je 0x56b70
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x27, %eax
jne 0x56bfb
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb (%rax), %al
movb %al, -0x19(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x29(%rbp)
je 0x56baa
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
movsbl -0x19(%rbp), %ecx
cmpl %ecx, %eax
sete %al
xorb $-0x1, %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x56bb3
jmp 0x56bc1
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x56b84
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x56bea
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x9, 0x10(%rax)
movq $0x0, -0x8(%rbp)
jmp 0x56dc4
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x56dbc
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3c, %eax
jne 0x56cb4
movq -0x18(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x3f, %eax
jne 0x56cb4
movq -0x18(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x2a(%rbp)
je 0x56c63
movq -0x18(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x3f, %ecx
movb %al, -0x2b(%rbp)
jne 0x56c5b
movq -0x18(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x3e, %eax
sete %al
movb %al, -0x2b(%rbp)
movb -0x2b(%rbp), %al
xorb $-0x1, %al
movb %al, -0x2a(%rbp)
movb -0x2a(%rbp), %al
testb $0x1, %al
jne 0x56c6c
jmp 0x56c7a
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x56c28
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x56ca3
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x9, 0x10(%rax)
movq $0x0, -0x8(%rbp)
jmp 0x56dc4
movq -0x18(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x18(%rbp)
jmp 0x56dba
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3c, %eax
jne 0x56d9b
movq -0x18(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x21, %eax
jne 0x56d9b
movq -0x18(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x2d, %eax
jne 0x56d9b
movq -0x18(%rbp), %rax
movsbl 0x3(%rax), %eax
cmpl $0x2d, %eax
jne 0x56d9b
movq -0x18(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x2c(%rbp)
je 0x56d50
movq -0x18(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x2d, %ecx
movb %al, -0x2d(%rbp)
jne 0x56d48
movq -0x18(%rbp), %rax
movsbl 0x1(%rax), %ecx
xorl %eax, %eax
cmpl $0x2d, %ecx
movb %al, -0x2d(%rbp)
jne 0x56d48
movq -0x18(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x3e, %eax
sete %al
movb %al, -0x2d(%rbp)
movb -0x2d(%rbp), %al
xorb $-0x1, %al
movb %al, -0x2c(%rbp)
movb -0x2c(%rbp), %al
testb $0x1, %al
jne 0x56d59
jmp 0x56d67
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x56d03
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x56d8d
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x9, 0x10(%rax)
movq $0x0, -0x8(%rbp)
jmp 0x56dc4
movq -0x18(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x18(%rbp)
jmp 0x56db8
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x9, 0x10(%rax)
movq $0x0, -0x8(%rbp)
jmp 0x56dc4
jmp 0x56dba
jmp 0x56dbc
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)