// File: /workspace/github_cpp_makefile_star2_O3/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
movq %r14, %rax
movzbl (%rax), %ecx
cmpl $0x5b, %ecx
je 0x232a8
cmpl $0x3e, %ecx
je 0x232d8
testl %ecx, %ecx
je 0x23320
incq %rax
movq %rax, (%rbx)
jmp 0x2328b
incq %rax
movq %rax, (%rbx)
movl $0x1, %ecx
movzbl (%rax), %edx
cmpl $0x5b, %edx
je 0x232ca
cmpl $0x5d, %edx
je 0x232c6
testl %edx, %edx
jne 0x232cc
jmp 0x23320
decl %ecx
jmp 0x232cc
incl %ecx
incq %rax
movq %rax, (%rbx)
testl %ecx, %ecx
jg 0x232b3
jmp 0x2328b
addq $0x60, %rdi
movl $0x60, %esi
callq 0x2379e
xorl %ecx, %ecx
movq %rcx, 0x20(%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movl $0x6, 0x28(%rax)
movq %rcx, 0x30(%rax)
movq %rcx, 0x40(%rax)
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
movl $0x18, %edi
callq 0x2a2e0
movq (%rbx), %rcx
leaq 0xf558c(%rip), %rdx     # 0x1188c0
movq %rdx, (%rax)
leaq 0xb4217(%rip), %rdx     # 0xd7555
movq %rdx, 0x8(%rax)
movq %rcx, 0x10(%rax)
leaq 0xf554b(%rip), %rsi     # 0x118898
leaq 0x723c(%rip), %rdx      # 0x2a590
movq %rax, %rdi
callq 0x2b330