// File: /workspace/github_cpp_makefile_star2_O2/tdv[P]boss/boss/include/other/rapidxml-1.13/rapidxml.hpp
// Function: rapidxml::xml_node<char>* rapidxml::xml_document<char>::parse_doctype<992>(char*&)
xml_node<Ch> *parse_doctype(Ch *&text)
        {
            // Remember value start
            Ch *value = text;

            // Skip to >
            while (*text != Ch('>'))
            {
                // Determine character type
                switch (*text)
                {
                
                // If '[' encountered, scan for matching ending ']' using naive algorithm with depth
                // This works for all W3C test files except for 2 most wicked
                case Ch('['):
                {
                    ++text;     // Skip '['
                    int depth = 1;
                    while (depth > 0)
                    {
                        switch (*text)
                        {
                            case Ch('['): ++depth; break;
                            case Ch(']'): --depth; break;
                            case 0: RAPIDXML_PARSE_ERROR("unexpected end of data", text);
                        }
                        ++text;
                    }
                    break;
                }
                
                // Error on end of text
                case Ch('\0'):
                    RAPIDXML_PARSE_ERROR("unexpected end of data", text);
                
                // Other character, skip it
                default:
                    ++text;

                }
            }
            
            // If DOCTYPE nodes enabled
            if (Flags & parse_doctype_node)
            {
                // Create a new doctype node
                xml_node<Ch> *doctype = this->allocate_node(node_doctype);
                doctype->value(value, text - value);
                
                // Place zero terminator after value
                if (!(Flags & parse_no_string_terminators))
                    *text = Ch('\0');

                text += 1;      // skip '>'
                return doctype;
            }
            else
            {
                text += 1;      // skip '>'
                return 0;
            }

        }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rsi), %r14
pushq $0x1
popq %rax
movq %r14, %rcx
movzbl (%rcx), %edx
cmpl $0x5b, %edx
je 0x2284f
cmpl $0x3e, %edx
je 0x2287c
testl %edx, %edx
je 0x228b1
incq %rcx
movq %rcx, (%rbx)
jmp 0x22836
movl %eax, %edx
incq %rcx
movq %rcx, (%rbx)
testl %edx, %edx
jle 0x22836
movzbl (%rcx), %esi
incq %rcx
cmpl $0x5b, %esi
je 0x22871
cmpl $0x5d, %esi
je 0x22875
testl %esi, %esi
jne 0x22854
jmp 0x228b1
incl %edx
jmp 0x22877
decl %edx
decq %rcx
jmp 0x22851
addq $0x60, %rdi
pushq $0x6
popq %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x228ec
movq (%rbx), %rcx
subq %r14, %rcx
movq %r14, 0x8(%rax)
movq %rcx, 0x18(%rax)
movq (%rbx), %rcx
movb $0x0, (%rcx)
incq (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
pushq $0x18
popq %rdi
callq 0x28b50
movq (%rbx), %rcx
leaq 0xf7ffd(%rip), %rdx     # 0x11a8c0
movq %rdx, (%rax)
leaq 0xb4c88(%rip), %rdx     # 0xd7555
movq %rdx, 0x8(%rax)
movq %rcx, 0x10(%rax)
leaq 0xf7fbc(%rip), %rsi     # 0x11a898
leaq 0x651d(%rip), %rdx      # 0x28e00
movq %rax, %rdi
callq 0x29ba0
nop