// File: /workspace/github_cpp_makefile_star2_O3/smallmuou[P]tinyhtml/tinyxmlparser.cpp
// Function: TiXmlNode::Identify(char const*, TiXmlEncoding)
TiXmlNode* TiXmlNode::Identify( const char* p, TiXmlEncoding encoding )
{
	TiXmlNode* returnNode = 0;

	p = SkipWhiteSpace( p, encoding );
	if( !p || !*p || *p != '<' )
	{
		return 0;
	}

	p = SkipWhiteSpace( p, encoding );

	if ( !p || !*p )
	{
		return 0;
	}

	// What is this thing? 
	// - Elements start with a letter or underscore, but xml is reserved.
	// - Comments: <!--
	// - Decleration: <?xml
	// - Everthing else is unknown to tinyxml.
	//

	const char* xmlHeader = { "<?xml" };
	const char* commentHeader = { "<!--" };
	const char* dtdHeader = { "<!" };
	const char* cdataHeader = { "<![CDATA[" };

	if ( StringEqual( p, xmlHeader, true, encoding ) )
	{
		#ifdef DEBUG_PARSER
			TIXML_LOG( "XML parsing Declaration\n" );
		#endif
		returnNode = new TiXmlDeclaration();
	}
	else if ( StringEqual( p, commentHeader, false, encoding ) )
	{
		#ifdef DEBUG_PARSER
			TIXML_LOG( "XML parsing Comment\n" );
		#endif
		returnNode = new TiXmlComment();
	}
	else if ( StringEqual( p, cdataHeader, false, encoding ) )
	{
		#ifdef DEBUG_PARSER
			TIXML_LOG( "XML parsing CDATA\n" );
		#endif
		TiXmlText* text = new TiXmlText( "" );
		text->SetCDATA( true );
		returnNode = text;
	}
	else if ( StringEqual( p, dtdHeader, false, encoding ) )
	{
		#ifdef DEBUG_PARSER
			TIXML_LOG( "XML parsing Unknown(1)\n" );
		#endif
		returnNode = new TiXmlUnknown();
	}
	else if (    IsAlpha( *(p+1), encoding )
			  || *(p+1) == '_' )
	{
		#ifdef DEBUG_PARSER
			TIXML_LOG( "XML parsing Element\n" );
		#endif
		returnNode = new TiXmlElement( "" );
	}
	else
	{
		#ifdef DEBUG_PARSER
			TIXML_LOG( "XML parsing Unknown(2)\n" );
		#endif
		returnNode = new TiXmlUnknown();
	}

	if ( returnNode )
	{
		// Set the parent, so it can report errors
		returnNode->parent = this;
	}
	return returnNode;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rdi, %rbx
movq %rsi, %rdi
movl %edx, %esi
callq 0x6d4c
testq %rax, %rax
je 0x77c6
cmpb $0x3c, (%rax)
jne 0x77c6
movq %rax, %rdi
movl %ebp, %esi
callq 0x6d4c
testq %rax, %rax
je 0x77c6
movq %rax, %r14
cmpb $0x0, (%rax)
je 0x77c6
leaq 0x30e1(%rip), %rsi      # 0xa856
movq %r14, %rdi
movl $0x1, %edx
callq 0x70e8
testb %al, %al
je 0x77d1
movl $0x68, %edi
callq 0x3130
movq %rax, %r14
movq %rax, %rdi
movl $0x5, %esi
callq 0x35fa
leaq 0x81a9(%rip), %rax      # 0xf950
addq $0x10, %rax
movq %rax, (%r14)
leaq 0x8aa3(%rip), %rax      # 0x10258
movq %rax, 0x50(%r14)
movq %rax, 0x58(%r14)
movq %rax, 0x60(%r14)
jmp 0x787e
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x2d54(%rip), %rsi      # 0xa52c
movq %r14, %rdi
xorl %edx, %edx
callq 0x70e8
testb %al, %al
je 0x7809
movl $0x50, %edi
callq 0x3130
movq %rax, %r14
movq %rax, %rdi
movl $0x2, %esi
callq 0x35fa
leaq 0x80a9(%rip), %rax      # 0xf8b0
jmp 0x7877
leaq 0x2d0e(%rip), %rsi      # 0xa51e
movq %r14, %rdi
xorl %edx, %edx
callq 0x70e8
testb %al, %al
je 0x7841
movl $0x58, %edi
callq 0x3130
movq %rax, %r14
leaq 0x2bb3(%rip), %rsi      # 0xa3e5
movq %rax, %rdi
callq 0x6812
movb $0x1, 0x50(%r14)
jmp 0x787e
leaq 0x3014(%rip), %rsi      # 0xa85c
movq %r14, %rdi
xorl %edx, %edx
callq 0x70e8
testb %al, %al
je 0x7887
movl $0x50, %edi
callq 0x3130
movq %rax, %r14
movq %rax, %rdi
movl $0x3, %esi
callq 0x35fa
leaq 0x8281(%rip), %rax      # 0xfaf8
addq $0x10, %rax
movq %rax, (%r14)
movq %rbx, 0x18(%r14)
jmp 0x77c9
movzbl 0x1(%r14), %ebp
cmpl $0x7e, %ebp
ja 0x78bd
movl %ebp, %edi
callq 0x3250
cmpl $0x5f, %ebp
je 0x78bd
testl %eax, %eax
jne 0x78bd
movl $0x50, %edi
callq 0x3130
movq %rax, %r14
movq %rax, %rdi
movl $0x3, %esi
callq 0x35fa
jmp 0x7870
movl $0x90, %edi
callq 0x3130
movq %rax, %r14
leaq 0x2b14(%rip), %rsi      # 0xa3e5
movq %rax, %rdi
callq 0x3fd6
jmp 0x787e
jmp 0x78f3
movq %rax, %rbx
movl $0x90, %esi
jmp 0x7905
jmp 0x78f3
movq %rax, %rbx
movl $0x58, %esi
jmp 0x7905
movq %rax, %rbx
movl $0x50, %esi
jmp 0x7905
movq %rax, %rbx
movl $0x68, %esi
movq %r14, %rdi
callq 0x3140
movq %rbx, %rdi
callq 0x3280
nop