// File: /workspace/github_cpp_makefile_star2_O1/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 0x6e8a
testq %rax, %rax
je 0x7932
cmpb $0x3c, (%rax)
jne 0x7932
movq %rax, %rdi
movl %ebp, %esi
callq 0x6e8a
testq %rax, %rax
je 0x7932
movq %rax, %r14
cmpb $0x0, (%rax)
je 0x7932
leaq 0x33b7(%rip), %rsi      # 0xac96
movq %r14, %rdi
movl $0x1, %edx
movl %ebp, %ecx
callq 0x7254
testb %al, %al
je 0x793d
movl $0x68, %edi
callq 0x3130
movq %rax, %r14
movq %rax, %rdi
movl $0x5, %esi
callq 0x35ea
leaq 0x800d(%rip), %rax      # 0xf920
addq $0x10, %rax
movq %rax, (%r14)
leaq 0x8937(%rip), %rax      # 0x10258
movq %rax, 0x50(%r14)
movq %rax, 0x58(%r14)
movq %rax, 0x60(%r14)
jmp 0x7a30
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x2be8(%rip), %rsi      # 0xa52c
movq %r14, %rdi
xorl %edx, %edx
movl %ebp, %ecx
callq 0x7254
testb %al, %al
je 0x797a
movl $0x50, %edi
callq 0x3130
movq %rax, %r14
movq %rax, %rdi
movl $0x2, %esi
callq 0x35ea
leaq 0x7f0b(%rip), %rax      # 0xf880
jmp 0x7a29
leaq 0x2b9d(%rip), %rsi      # 0xa51e
movq %r14, %rdi
xorl %edx, %edx
movl %ebp, %ecx
callq 0x7254
testb %al, %al
je 0x79b4
movl $0x58, %edi
callq 0x3130
movq %rax, %r14
leaq 0x2a40(%rip), %rsi      # 0xa3e5
movq %rax, %rdi
callq 0x6916
movb $0x1, 0x50(%r14)
jmp 0x7a30
leaq 0x32e1(%rip), %rsi      # 0xac9c
movq %r14, %rdi
xorl %edx, %edx
movl %ebp, %ecx
callq 0x7254
testb %al, %al
je 0x79e7
movl $0x50, %edi
callq 0x3130
movq %rax, %r14
movq %rax, %rdi
movl $0x3, %esi
callq 0x35ea
jmp 0x7a22
movzbl 0x1(%r14), %ebp
movb $0x1, %al
cmpl $0x7e, %ebp
ja 0x79ff
movl %ebp, %edi
callq 0x3250
testl %eax, %eax
setne %al
cmpl $0x5f, %ebp
je 0x7a39
testb %al, %al
jne 0x7a39
movl $0x50, %edi
callq 0x3130
movq %rax, %r14
movq %rax, %rdi
movl $0x3, %esi
callq 0x35ea
leaq 0x809f(%rip), %rax      # 0xfac8
addq $0x10, %rax
movq %rax, (%r14)
movq %rbx, 0x18(%r14)
jmp 0x7935
movl $0x90, %edi
callq 0x3130
movq %rax, %r14
leaq 0x2998(%rip), %rsi      # 0xa3e5
movq %rax, %rdi
callq 0x400a
jmp 0x7a30
jmp 0x7a6f
movq %rax, %rbx
movl $0x90, %esi
jmp 0x7a81
jmp 0x7a6f
movq %rax, %rbx
movl $0x58, %esi
jmp 0x7a81
movq %rax, %rbx
movl $0x50, %esi
jmp 0x7a81
movq %rax, %rbx
movl $0x68, %esi
movq %r14, %rdi
callq 0x3140
movq %rbx, %rdi
callq 0x3280
nop