// File: /workspace/github_cpp_makefile_star2_O3/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 0x4a2d
movl %edx, %r15d
movq %rsi, %rbx
movq %rdi, %r14
testl %edx, %edx
jle 0x48b5
leaq 0x5a08(%rip), %r12      # 0xa2a1
movl %r15d, %ebp
movl $0x4, %esi
movl $0x1, %edx
movq %r12, %rdi
movq %rbx, %rcx
callq 0x32a0
decl %ebp
jne 0x489c
movq 0x38(%r14), %rdx
addq $0x10, %rdx
leaq 0x59e2(%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 0x4921
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 0x48e9
movq 0x20(%r12), %rax
cmpq $0x0, (%rax)
jne 0x48e9
movq 0x28(%r14), %rdi
testq %rdi, %rdi
je 0x49bc
cmpq 0x30(%r14), %rdi
je 0x49dd
movl $0x3e, %edi
movq %rbx, %rsi
callq 0x31c0
movq 0x28(%r14), %r12
testq %r12, %r12
je 0x4987
leal 0x1(%r15), %ebp
movq (%r12), %rax
movq %r12, %rdi
callq *0x70(%rax)
testq %rax, %rax
jne 0x496e
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 0x4952
movl $0xa, %edi
movq %rbx, %rsi
callq 0x31c0
testl %r15d, %r15d
jle 0x4a0c
leaq 0x5901(%rip), %r12      # 0xa2a1
movl $0x4, %esi
movl $0x1, %edx
movq %r12, %rdi
movq %rbx, %rcx
callq 0x32a0
decl %r15d
jne 0x49a0
jmp 0x4a0c
leaq 0x58e7(%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 0x4938
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 0x5893(%rip), %rsi      # 0xa2ae
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x31f0
leaq 0x5833(%rip), %rdi      # 0xa267
leaq 0x55fc(%rip), %rsi      # 0xa037
leaq 0x582b(%rip), %rcx      # 0xa26d
movl $0x323, %edx            # imm = 0x323
callq 0x30e0