// File: /workspace/github_cpp_makefile_star2_O2/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 0x5fec
testq %rax, %rax
je 0x6856
cmpb $0x3c, (%rax)
jne 0x6856
movq %rax, %rdi
movl %ebp, %esi
callq 0x5fec
testq %rax, %rax
je 0x6856
movq %rax, %r14
cmpb $0x0, (%rax)
je 0x6856
leaq 0x3015(%rip), %rsi      # 0x9842
pushq $0x1
popq %rdx
movq %r14, %rdi
movl %ebp, %ecx
callq 0x632a
testb %al, %al
je 0x6861
pushq $0x68
popq %rdi
callq 0x3130
movq %rax, %r14
movq %rax, %rdi
callq 0x5ac8
jmp 0x693a
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x2cc4(%rip), %rsi      # 0x952c
movq %r14, %rdi
xorl %edx, %edx
movl %ebp, %ecx
callq 0x632a
testb %al, %al
je 0x6890
pushq $0x50
popq %rdi
callq 0x3130
movq %rax, %r14
movq %rax, %rdi
callq 0x5a68
jmp 0x693a
leaq 0x2c87(%rip), %rsi      # 0x951e
movq %r14, %rdi
xorl %edx, %edx
movl %ebp, %ecx
callq 0x632a
testb %al, %al
je 0x68c8
pushq $0x58
popq %rdi
callq 0x3130
movq %rax, %r14
leaq 0x2b2c(%rip), %rsi      # 0x93e5
movq %rax, %rdi
callq 0x5a80
movb $0x1, 0x50(%r14)
jmp 0x693a
leaq 0x2f79(%rip), %rsi      # 0x9848
movq %r14, %rdi
xorl %edx, %edx
movl %ebp, %ecx
callq 0x632a
testb %al, %al
je 0x68f4
pushq $0x50
popq %rdi
callq 0x3130
movq %rax, %r14
movq %rax, %rdi
callq 0x5af4
jmp 0x693a
movzbl 0x1(%r14), %ebp
movl %ebp, %edi
callq 0x5e20
cmpl $0x5f, %ebp
je 0x691e
testl %eax, %eax
jne 0x691e
pushq $0x50
popq %rdi
callq 0x3130
movq %rax, %r14
movq %rax, %rdi
callq 0x5af4
jmp 0x693a
movl $0x90, %edi
callq 0x3130
movq %rax, %r14
leaq 0x2ab3(%rip), %rsi      # 0x93e5
movq %rax, %rdi
callq 0x3cc6
movq %rbx, 0x18(%r14)
jmp 0x6859
jmp 0x6958
movq %rax, %rbx
movl $0x90, %esi
jmp 0x6965
jmp 0x6958
movq %rax, %rbx
pushq $0x58
jmp 0x6964
movq %rax, %rbx
pushq $0x50
jmp 0x6964
movq %rax, %rbx
pushq $0x68
popq %rsi
movq %r14, %rdi
callq 0x3140
movq %rbx, %rdi
callq 0x3280
nop