// File: smallmuou[P]tinyhtml/tinyxmlparser.cpp
// Function: TiXmlDeclaration::Parse(char const*, TiXmlParsingData*, TiXmlEncoding)
const char* TiXmlDeclaration::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding _encoding )
{
	p = SkipWhiteSpace( p, _encoding );
	// Find the beginning, find the end, and look for
	// the stuff in-between.
	TiXmlDocument* document = GetDocument();
	if ( !p || !*p || !StringEqual( p, "<?xml", true, _encoding ) )
	{
		if ( document ) document->SetError( TIXML_ERROR_PARSING_DECLARATION, 0, 0, _encoding );
		return 0;
	}
	if ( data )
	{
		data->Stamp( p, _encoding );
		location = data->Cursor();
	}
	p += 5;

	version = "";
	encoding = "";
	standalone = "";

	while ( p && *p )
	{
		if ( *p == '>' )
		{
			++p;
			return p;
		}

		p = SkipWhiteSpace( p, _encoding );
		if ( StringEqual( p, "version", true, _encoding ) )
		{
			TiXmlAttribute attrib;
			p = attrib.Parse( p, data, _encoding );		
			version = attrib.Value();
		}
		else if ( StringEqual( p, "encoding", true, _encoding ) )
		{
			TiXmlAttribute attrib;
			p = attrib.Parse( p, data, _encoding );		
			encoding = attrib.Value();
		}
		else if ( StringEqual( p, "standalone", true, _encoding ) )
		{
			TiXmlAttribute attrib;
			p = attrib.Parse( p, data, _encoding );		
			standalone = attrib.Value();
		}
		else
		{
			// Read over whatever it is.
			while( p && *p && *p != '>' && !IsWhiteSpace( *p ) )
				++p;
		}
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp            # imm = 0x160
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x18(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0x8e00
movq -0x108(%rbp), %rdi
movq %rax, -0x18(%rbp)
callq 0x7920
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xb2c1
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
je 0xb2c1
movq -0x18(%rbp), %rdi
movl -0x24(%rbp), %ecx
leaq 0x3a28(%rip), %rsi      # 0xecdb
movl $0x1, %edx
callq 0x9540
testb $0x1, %al
jne 0xb2ee
cmpq $0x0, -0x30(%rbp)
je 0xb2e1
movq -0x30(%rbp), %rdi
movl -0x24(%rbp), %r8d
movl $0xb, %esi
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0x9c50
movq $0x0, -0x8(%rbp)
jmp 0xb66f
cmpq $0x0, -0x20(%rbp)
je 0xb31f
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x24(%rbp), %edx
callq 0x8a90
movq -0x20(%rbp), %rdi
callq 0xb950
movq %rax, %rcx
movq -0x108(%rbp), %rax
movq (%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x108(%rbp), %rdi
movq -0x18(%rbp), %rax
addq $0x5, %rax
movq %rax, -0x18(%rbp)
addq $0x50, %rdi
leaq 0x30a8(%rip), %rsi      # 0xe3e5
callq 0x79c0
movq -0x108(%rbp), %rdi
addq $0x58, %rdi
leaq 0x3091(%rip), %rsi      # 0xe3e5
callq 0x79c0
movq -0x108(%rbp), %rdi
addq $0x60, %rdi
leaq 0x307a(%rip), %rsi      # 0xe3e5
callq 0x79c0
xorl %eax, %eax
cmpq $0x0, -0x18(%rbp)
movb %al, -0x109(%rbp)
je 0xb38f
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
setne %al
movb %al, -0x109(%rbp)
movb -0x109(%rbp), %al
testb $0x1, %al
jne 0xb39e
jmp 0xb667
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3e, %eax
jne 0xb3c3
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xb66f
movq -0x18(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0x8e00
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movl -0x24(%rbp), %ecx
leaq 0x3903(%rip), %rsi      # 0xece4
movl $0x1, %edx
callq 0x9540
testb $0x1, %al
jne 0xb3f4
jmp 0xb482
leaq -0x70(%rbp), %rdi
movq %rdi, -0x120(%rbp)
callq 0x7f10
movq -0x120(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x24(%rbp), %ecx
callq 0xacd0
movq %rax, -0x118(%rbp)
jmp 0xb424
movq -0x118(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x7a50
movq %rax, -0x128(%rbp)
jmp 0xb441
movq -0x128(%rbp), %rsi
movq -0x108(%rbp), %rdi
addq $0x50, %rdi
callq 0x79c0
jmp 0xb45a
leaq -0x70(%rbp), %rdi
callq 0x7fb0
jmp 0xb662
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x7fb0
jmp 0xb67c
movq -0x18(%rbp), %rdi
movl -0x24(%rbp), %ecx
leaq 0x385c(%rip), %rsi      # 0xecec
movl $0x1, %edx
callq 0x9540
testb $0x1, %al
jne 0xb4a3
jmp 0xb53d
leaq -0xc0(%rbp), %rdi
movq %rdi, -0x138(%rbp)
callq 0x7f10
movq -0x138(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x24(%rbp), %ecx
callq 0xacd0
movq %rax, -0x130(%rbp)
jmp 0xb4d6
movq -0x130(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x7a50
movq %rax, -0x140(%rbp)
jmp 0xb4f6
movq -0x140(%rbp), %rsi
movq -0x108(%rbp), %rdi
addq $0x58, %rdi
callq 0x79c0
jmp 0xb50f
leaq -0xc0(%rbp), %rdi
callq 0x7fb0
jmp 0xb660
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x7fb0
jmp 0xb67c
movq -0x18(%rbp), %rdi
movl -0x24(%rbp), %ecx
leaq 0x37aa(%rip), %rsi      # 0xecf5
movl $0x1, %edx
callq 0x9540
testb $0x1, %al
jne 0xb55e
jmp 0xb5f8
leaq -0x100(%rbp), %rdi
movq %rdi, -0x150(%rbp)
callq 0x7f10
movq -0x150(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x24(%rbp), %ecx
callq 0xacd0
movq %rax, -0x148(%rbp)
jmp 0xb591
movq -0x148(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x7a50
movq %rax, -0x158(%rbp)
jmp 0xb5b1
movq -0x158(%rbp), %rsi
movq -0x108(%rbp), %rdi
addq $0x60, %rdi
callq 0x79c0
jmp 0xb5ca
leaq -0x100(%rbp), %rdi
callq 0x7fb0
jmp 0xb65e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x7fb0
jmp 0xb67c
jmp 0xb5fa
xorl %eax, %eax
cmpq $0x0, -0x18(%rbp)
movb %al, -0x159(%rbp)
je 0xb642
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpb $0x0, (%rcx)
movb %al, -0x159(%rbp)
je 0xb642
movq -0x18(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x3e, %ecx
movb %al, -0x159(%rbp)
je 0xb642
movq -0x18(%rbp), %rax
movsbl (%rax), %edi
callq 0xb690
xorb $-0x1, %al
movb %al, -0x159(%rbp)
movb -0x159(%rbp), %al
testb $0x1, %al
jne 0xb64e
jmp 0xb65c
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0xb5fa
jmp 0xb65e
jmp 0xb660
jmp 0xb662
jmp 0xb370
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x160, %rsp            # imm = 0x160
popq %rbp
retq
movq -0x78(%rbp), %rdi
callq 0x3270
nopw %cs:(%rax,%rax)
nop