// File: smallmuou[P]tinyhtml/tinyxmlparser.cpp
// Function: TiXmlComment::Parse(char const*, TiXmlParsingData*, TiXmlEncoding)
const char* TiXmlComment::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding )
{
	TiXmlDocument* document = GetDocument();
	value = "";

	p = SkipWhiteSpace( p, encoding );

	if ( data )
	{
		data->Stamp( p, encoding );
		location = data->Cursor();
	}
	const char* startTag = "<!--";
	const char* endTag   = "-->";

	if ( !StringEqual( p, startTag, false, encoding ) )
	{
		if ( document )
			document->SetError( TIXML_ERROR_PARSING_COMMENT, p, data, encoding );
		return 0;
	}
	p += strlen( startTag );

	// [ 1475201 ] TinyXML parses entities in comments
	// Oops - ReadText doesn't work, because we don't want to parse the entities.
	// p = ReadText( p, &value, false, endTag, false, encoding );
	//
	// from the XML spec:
	/*
	 [Definition: Comments may appear anywhere in a document outside other markup; in addition, 
	              they may appear within the document type declaration at places allowed by the grammar. 
				  They are not part of the document's character data; an XML processor MAY, but need not, 
				  make it possible for an application to retrieve the text of comments. For compatibility, 
				  the string "--" (double-hyphen) MUST NOT occur within comments.] Parameter entity 
				  references MUST NOT be recognized within comments.

				  An example of a comment:

				  <!-- declarations for <head> & <body> -->
	*/

    value = "";
	// Keep all the white space.
	while (	p && *p && !StringEqual( p, endTag, false, encoding ) )
	{
		value.append( p, 1 );
		++p;
	}
	if ( p && *p ) 
		p += strlen( endTag );

	return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x48(%rbp)
callq 0x7920
movq -0x48(%rbp), %rdi
movq %rax, -0x30(%rbp)
addq $0x38, %rdi
leaq 0x386e(%rip), %rsi      # 0xe3e5
callq 0x79c0
movq -0x18(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0x8e00
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xabba
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x24(%rbp), %edx
callq 0x8a90
movq -0x20(%rbp), %rdi
callq 0xb950
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq (%rcx), %rcx
movq %rcx, 0x8(%rax)
leaq 0x396b(%rip), %rax      # 0xe52c
movq %rax, -0x38(%rbp)
leaq 0x37d5(%rip), %rax      # 0xe3a1
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl -0x24(%rbp), %ecx
xorl %edx, %edx
callq 0x9540
testb $0x1, %al
jne 0xac14
cmpq $0x0, -0x30(%rbp)
je 0xac07
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movl -0x24(%rbp), %r8d
movl $0xa, %esi
callq 0x9c50
movq $0x0, -0x8(%rbp)
jmp 0xacc0
movq -0x38(%rbp), %rdi
callq 0x30a0
movq -0x48(%rbp), %rdi
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
addq $0x38, %rdi
leaq 0x37b1(%rip), %rsi      # 0xe3e5
callq 0x79c0
xorl %eax, %eax
cmpq $0x0, -0x18(%rbp)
movb %al, -0x49(%rbp)
je 0xac6a
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpb $0x0, (%rcx)
movb %al, -0x49(%rbp)
je 0xac6a
movq -0x18(%rbp), %rdi
movq -0x40(%rbp), %rsi
movl -0x24(%rbp), %ecx
xorl %edx, %edx
callq 0x9540
xorb $-0x1, %al
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %al
testb $0x1, %al
jne 0xac73
jmp 0xac97
movq -0x48(%rbp), %rdi
addq $0x38, %rdi
movq -0x18(%rbp), %rsi
movl $0x1, %edx
callq 0xbe10
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0xac39
cmpq $0x0, -0x18(%rbp)
je 0xacb8
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
je 0xacb8
movq -0x40(%rbp), %rdi
callq 0x30a0
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)