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

	if ( data )
	{
		data->Stamp( p, encoding );
		location = data->Cursor();
	}

	const char* const startTag = "<![CDATA[";
	const char* const endTag   = "]]>";

	if ( cdata || StringEqual( p, startTag, false, encoding ) )
	{
		cdata = true;

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

		// Keep all the white space, ignore the encoding, etc.
		while (	   p && *p
				&& !StringEqual( p, endTag, false, encoding )
			  )
		{
			value += *p;
			++p;
		}

		TIXML_STRING dummy; 
		p = ReadText( p, &dummy, false, endTag, false, encoding );
		return p;
	}
	else
	{
		bool ignoreWhite = true;

		const char* end = "<";
		p = ReadText( p, &value, ignoreWhite, end, false, encoding );
		if ( p && *p )
			return p-1;	// don't truncate the '<'
		return 0;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x68(%rbp)
addq $0x38, %rdi
leaq 0x33a8(%rip), %rsi      # 0xe3e5
callq 0x79c0
movq -0x68(%rbp), %rdi
callq 0x7920
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xb07d
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x24(%rbp), %edx
callq 0x8a90
movq -0x20(%rbp), %rdi
callq 0xb950
movq %rax, %rcx
movq -0x68(%rbp), %rax
movq (%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x68(%rbp), %rax
leaq 0x3496(%rip), %rcx      # 0xe51e
movq %rcx, -0x38(%rbp)
leaq 0x3495(%rip), %rcx      # 0xe528
movq %rcx, -0x40(%rbp)
testb $0x1, 0x50(%rax)
jne 0xb0bb
movq -0x18(%rbp), %rdi
movl -0x24(%rbp), %ecx
leaq 0x3473(%rip), %rsi      # 0xe51e
xorl %edx, %edx
callq 0x9540
testb $0x1, %al
jne 0xb0bb
jmp 0xb1da
movq -0x68(%rbp), %rax
movb $0x1, 0x50(%rax)
movq -0x18(%rbp), %rdi
movl -0x24(%rbp), %ecx
leaq 0x344d(%rip), %rsi      # 0xe51e
xorl %edx, %edx
callq 0x9540
testb $0x1, %al
jne 0xb10a
cmpq $0x0, -0x30(%rbp)
je 0xb0fd
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movl -0x24(%rbp), %r8d
movl $0xe, %esi
callq 0x9c50
movq $0x0, -0x8(%rbp)
jmp 0xb237
movq -0x18(%rbp), %rax
addq $0x9, %rax
movq %rax, -0x18(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x18(%rbp)
movb %al, -0x69(%rbp)
je 0xb14a
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpb $0x0, (%rcx)
movb %al, -0x69(%rbp)
je 0xb14a
movq -0x18(%rbp), %rdi
movl -0x24(%rbp), %ecx
leaq 0x33ea(%rip), %rsi      # 0xe528
xorl %edx, %edx
callq 0x9540
xorb $-0x1, %al
movb %al, -0x69(%rbp)
movb -0x69(%rbp), %al
testb $0x1, %al
jne 0xb153
jmp 0xb177
movq -0x68(%rbp), %rdi
movq -0x18(%rbp), %rax
movb (%rax), %al
addq $0x38, %rdi
movsbl %al, %esi
callq 0x7830
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0xb116
leaq -0x48(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x78a0
movq -0x80(%rbp), %rsi
movq -0x18(%rbp), %rdi
movl -0x24(%rbp), %r9d
leaq 0x3391(%rip), %rcx      # 0xe528
xorl %r8d, %r8d
movl %r8d, %edx
callq 0x96f0
movq %rax, -0x78(%rbp)
jmp 0xb1a8
movq -0x78(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x78c0
jmp 0xb237
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x78c0
jmp 0xb244
movq -0x68(%rbp), %rsi
movb $0x1, -0x55(%rbp)
leaq 0x3330(%rip), %rax      # 0xe519
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rdi
addq $0x38, %rsi
movb -0x55(%rbp), %al
movq -0x60(%rbp), %rcx
movl -0x24(%rbp), %r9d
xorl %r8d, %r8d
andb $0x1, %al
movzbl %al, %edx
callq 0x96f0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xb22f
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
je 0xb22f
movq -0x18(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0xb237
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x3270
nopl (%rax)