// File: /workspace/github_cpp_makefile_star2_O1/smallmuou[P]tinyhtml/tinyxml.cpp
// Function: TiXmlElement::Print(_IO_FILE*, int) const
void TiXmlElement::Print( FILE* cfile, int depth ) const
{
	int i;
	assert( cfile );
	for ( i=0; i<depth; i++ ) {
		fprintf( cfile, "    " );
	}

	fprintf( cfile, "<%s", value.c_str() );

	const TiXmlAttribute* attrib;
	for ( attrib = attributeSet.First(); attrib; attrib = attrib->Next() )
	{
		fprintf( cfile, " " );
		attrib->Print( cfile, depth );
	}

	// There are 3 different formatting approaches:
	// 1) An element without children is printed as a <foo /> node
	// 2) An element with only a text child is printed as <foo> text </foo>
	// 3) An element with children is printed on multiple lines.
	TiXmlNode* node;
	if ( !firstChild )
	{
		fprintf( cfile, " />" );
	}
	else if ( firstChild == lastChild && firstChild->ToText() )
	{
		fprintf( cfile, ">" );
		firstChild->Print( cfile, depth + 1 );
		fprintf( cfile, "</%s>", value.c_str() );
	}
	else
	{
		fprintf( cfile, ">" );

		for ( node = firstChild; node; node=node->NextSibling() )
		{
			if ( !node->ToText() )
			{
				fprintf( cfile, "\n" );
			}
			node->Print( cfile, depth+1 );
		}
		fprintf( cfile, "\n" );
		for( i=0; i<depth; ++i ) {
			fprintf( cfile, "    " );
		}
		fprintf( cfile, "</%s>", value.c_str() );
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rsi, %rsi
je 0x4ab5
movl %edx, %r15d
movq %rsi, %rbx
movq %rdi, %r14
testl %edx, %edx
jle 0x4935
leaq 0x5988(%rip), %r12      # 0xa2a1
movl %r15d, %ebp
movl $0x4, %esi
movl $0x1, %edx
movq %r12, %rdi
movq %rbx, %rcx
callq 0x32a0
decl %ebp
jne 0x491c
movq 0x38(%r14), %rdx
addq $0x10, %rdx
leaq 0x5962(%rip), %rsi      # 0xa2a6
movq %rbx, %rdi
xorl %eax, %eax
callq 0x31f0
leaq 0x50(%r14), %rax
movq 0x88(%r14), %r12
cmpq %rax, %r12
sete %al
testq %r12, %r12
sete %cl
orb %al, %cl
jne 0x49a9
movl $0x20, %edi
movq %rbx, %rsi
callq 0x31c0
movq (%r12), %rax
movq %r12, %rdi
movq %rbx, %rsi
movl %r15d, %edx
callq *0x10(%rax)
movq 0x38(%r12), %r12
movq 0x28(%r12), %rax
cmpq $0x0, (%rax)
jne 0x49a4
movq 0x20(%r12), %rax
cmpq $0x0, (%rax)
jne 0x49a4
xorl %r12d, %r12d
testq %r12, %r12
jne 0x4969
movq 0x28(%r14), %rdi
testq %rdi, %rdi
je 0x4a44
cmpq 0x30(%r14), %rdi
je 0x4a65
movl $0x3e, %edi
movq %rbx, %rsi
callq 0x31c0
movq 0x28(%r14), %r12
testq %r12, %r12
je 0x4a0f
leal 0x1(%r15), %ebp
movq (%r12), %rax
movq %r12, %rdi
callq *0x70(%rax)
testq %rax, %rax
jne 0x49f6
movl $0xa, %edi
movq %rbx, %rsi
callq 0x31c0
movq (%r12), %rax
movq %r12, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq *0x10(%rax)
movq 0x48(%r12), %r12
testq %r12, %r12
jne 0x49da
movl $0xa, %edi
movq %rbx, %rsi
callq 0x31c0
testl %r15d, %r15d
jle 0x4a94
leaq 0x5879(%rip), %r12      # 0xa2a1
movl $0x4, %esi
movl $0x1, %edx
movq %r12, %rdi
movq %rbx, %rcx
callq 0x32a0
decl %r15d
jne 0x4a28
jmp 0x4a94
leaq 0x585f(%rip), %rdi      # 0xa2aa
movl $0x3, %esi
movl $0x1, %edx
movq %rbx, %rcx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x32a0
movq (%rdi), %rax
callq *0x70(%rax)
testq %rax, %rax
je 0x49c0
movl $0x3e, %edi
movq %rbx, %rsi
callq 0x31c0
movq 0x28(%r14), %rdi
incl %r15d
movq (%rdi), %rax
movq %rbx, %rsi
movl %r15d, %edx
callq *0x10(%rax)
movq 0x38(%r14), %rdx
addq $0x10, %rdx
leaq 0x580b(%rip), %rsi      # 0xa2ae
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x31f0
leaq 0x57ab(%rip), %rdi      # 0xa267
leaq 0x5574(%rip), %rsi      # 0xa037
leaq 0x57a3(%rip), %rcx      # 0xa26d
movl $0x323, %edx            # imm = 0x323
callq 0x30e0