// File: jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::xml_parser::parse_doctype_group(char*, char)
char_t* parse_doctype_group(char_t* s, char_t endch)
		{
			size_t depth = 0;

			assert((s[0] == '<' || s[0] == 0) && s[1] == '!');
			s += 2;

			while (*s)
			{
				if (s[0] == '<' && s[1] == '!' && s[2] != '-')
				{
					if (s[2] == '[')
					{
						// ignore
						s = parse_doctype_ignore(s);
						if (!s) return s;
					}
					else
					{
						// some control group
						s += 2;
						depth++;
					}
				}
				else if (s[0] == '<' || s[0] == '"' || s[0] == '\'')
				{
					// unknown tag (forbidden), or some primitive group
					s = parse_doctype_primitive(s);
					if (!s) return s;
				}
				else if (*s == '>')
				{
					if (depth == 0)
						return s;

					depth--;
					s++;
				}
				else s++;
			}

			if (depth != 0 || endch != '>') PUGI__THROW_ERROR(status_bad_doctype, s);

			return s;
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb %al, -0x19(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3c, %eax
je 0x56832
movq -0x18(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x31(%rbp)
jne 0x56843
movq -0x18(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x21, %eax
sete %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x5684c
jmp 0x5684e
jmp 0x5686d
leaq 0x1624a(%rip), %rdi     # 0x6ca9f
leaq 0x14af9(%rip), %rsi     # 0x6b355
movl $0xbb5, %edx            # imm = 0xBB5
leaq 0x16261(%rip), %rcx     # 0x6cac9
callq 0x7180
movq -0x18(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
je 0x56994
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3c, %eax
jne 0x568fd
movq -0x18(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x21, %eax
jne 0x568fd
movq -0x18(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x2d, %eax
je 0x568fd
movq -0x18(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x5b, %eax
jne 0x568e0
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x569e0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x568de
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x569c9
jmp 0x568f8
movq -0x18(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x5698f
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3c, %eax
je 0x56921
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
je 0x56921
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x27, %eax
jne 0x56948
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x56b40
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x56946
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x569c9
jmp 0x5698d
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3e, %eax
jne 0x5697f
cmpq $0x0, -0x28(%rbp)
jne 0x56965
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x569c9
movq -0x28(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x5698b
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x5698d
jmp 0x5698f
jmp 0x56879
cmpq $0x0, -0x28(%rbp)
jne 0x569a4
movsbl -0x19(%rbp), %eax
cmpl $0x3e, %eax
je 0x569c1
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x9, 0x10(%rax)
movq $0x0, -0x8(%rbp)
jmp 0x569c9
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)