// File: /workspace/github_cpp_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
testq %rsi, %rsi
je 0x440f
movq %rsi, %rbx
xorl %ebp, %ebp
testl %edx, %edx
movl %edx, 0xc(%rsp)
cmovgl %edx, %ebp
leaq 0x502a(%rip), %r15      # 0x92a1
pushq $0x4
popq %r12
pushq $0x1
popq %r13
movl %ebp, %r14d
subl $0x1, %r14d
jb 0x429b
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbx, %rcx
callq 0x32a0
jmp 0x4282
movq 0x10(%rsp), %r14
movq 0x38(%r14), %rdx
addq $0x10, %rdx
leaq 0x4ff7(%rip), %rsi      # 0x92a6
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x31f0
leaq 0x50(%r14), %rax
movq 0x88(%r14), %rcx
cmpq %rax, %rcx
cmovneq %rcx, %r15
pushq $0x20
popq %r12
movl 0xc(%rsp), %r13d
testq %r15, %r15
je 0x4303
movl %r12d, %edi
movq %rbx, %rsi
callq 0x31c0
movq (%r15), %rax
movq %r15, %rdi
movq %rbx, %rsi
movl %r13d, %edx
callq *0x10(%rax)
movq %r15, %rdi
callq 0x442e
movq %rax, %r15
jmp 0x42d7
movq 0x28(%r14), %rdi
testq %rdi, %rdi
je 0x4398
cmpq 0x30(%r14), %rdi
je 0x43bb
leaq 0x28(%r14), %r15
pushq $0x3e
popq %rdi
movq %rbx, %rsi
callq 0x31c0
incl %r13d
pushq $0xa
popq %r12
movq (%r15), %r15
testq %r15, %r15
je 0x4366
movq (%r15), %rax
movq %r15, %rdi
callq *0x70(%rax)
testq %rax, %rax
jne 0x4351
movl %r12d, %edi
movq %rbx, %rsi
callq 0x31c0
movq (%r15), %rax
movq %r15, %rdi
movq %rbx, %rsi
movl %r13d, %edx
callq *0x10(%rax)
addq $0x48, %r15
jmp 0x4330
pushq $0xa
popq %rdi
movq %rbx, %rsi
callq 0x31c0
leaq 0x4f29(%rip), %r15      # 0x92a1
pushq $0x4
popq %r12
pushq $0x1
popq %r13
subl $0x1, %ebp
jb 0x43e8
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbx, %rcx
callq 0x32a0
jmp 0x4380
leaq 0x4f0b(%rip), %rdi      # 0x92aa
pushq $0x3
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x32a0
movq (%rdi), %rax
callq *0x70(%rax)
testq %rax, %rax
je 0x431a
pushq $0x3e
popq %rdi
movq %rbx, %rsi
callq 0x31c0
movq 0x28(%r14), %rdi
incl %r13d
movq (%rdi), %rax
movq %rbx, %rsi
movl %r13d, %edx
callq *0x10(%rax)
movq 0x38(%r14), %rdx
addq $0x10, %rdx
leaq 0x4eb7(%rip), %rsi      # 0x92ae
movq %rbx, %rdi
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x31f0
leaq 0x4e51(%rip), %rdi      # 0x9267
leaq 0x4c1a(%rip), %rsi      # 0x9037
leaq 0x4e49(%rip), %rcx      # 0x926d
movl $0x323, %edx            # imm = 0x323
callq 0x30e0