// File: /workspace/github_cpp_makefile_star2_O1/jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::xml_document::save(pugi::xml_writer&, char const*, unsigned int, pugi::xml_encoding) const
PUGI__FN void xml_document::save(xml_writer& writer, const char_t* indent, unsigned int flags, xml_encoding encoding) const
	{
		impl::xml_buffered_writer buffered_writer(writer, encoding);

		if ((flags & format_write_bom) && encoding != encoding_latin1)
		{
			// BOM always represents the codepoint U+FEFF, so just write it in native encoding
		#ifdef PUGIXML_WCHAR_MODE
			unsigned int bom = 0xfeff;
			buffered_writer.write(static_cast<wchar_t>(bom));
		#else
			buffered_writer.write('\xef', '\xbb', '\xbf');
		#endif
		}

		if (!(flags & format_no_declaration) && !impl::has_declaration(_root))
		{
			buffered_writer.write_string(PUGIXML_TEXT("<?xml version=\"1.0\""));
			if (encoding == encoding_latin1) buffered_writer.write_string(PUGIXML_TEXT(" encoding=\"ISO-8859-1\""));
			buffered_writer.write('?', '>');
			if (!(flags & format_raw)) buffered_writer.write('\n');
		}

		impl::node_output(buffered_writer, _root, indent, flags, 0);

		buffered_writer.flush();
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x2820, %rsp           # imm = 0x2820
movl %r8d, %ebp
movl %ecx, %ebx
movq %rdx, %r14
movq %rdi, %r15
movq %rsi, 0x2808(%rsp)
movq $0x0, 0x2810(%rsp)
movl %r8d, %eax
cmpl $0x8, %r8d
ja 0x23917
movl $0x191, %eax            # imm = 0x191
btl %ebp, %eax
movl %ebp, %eax
jae 0x23917
movl %ebp, %eax
leaq 0xf5b0(%rip), %rcx      # 0x32ec4
movl (%rcx,%rax,4), %eax
movl %eax, 0x2818(%rsp)
testb $0x2, %bl
sete %al
cmpl $0x9, %ebp
sete %cl
orb %al, %cl
jne 0x23947
leaq 0x8(%rsp), %rdi
movl $0xffffffef, %esi       # imm = 0xFFFFFFEF
movl $0xffffffbb, %edx       # imm = 0xFFFFFFBB
movl $0xffffffbf, %ecx       # imm = 0xFFFFFFBF
callq 0x23a72
testb $0x8, %bl
jne 0x23a37
movq (%r15), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0x23991
movl (%rax), %edx
andl $0xf, %edx
cmpl $0x7, %edx
je 0x23971
cmpl $0x2, %edx
jne 0x23977
xorl %edx, %edx
xorl %ecx, %ecx
jmp 0x23979
movb $0x1, %cl
xorl %edx, %edx
jmp 0x23979
movb $0x1, %dl
testb %dl, %dl
je 0x23988
movq 0x30(%rax), %rax
testq %rax, %rax
jne 0x2395c
jmp 0x23991
testb $0x1, %cl
jne 0x23a37
leaq 0xfd39(%rip), %rsi      # 0x336d1
leaq 0x8(%rsp), %rdi
callq 0x23ad0
cmpl $0x9, %ebp
jne 0x239b8
leaq 0xfd37(%rip), %rsi      # 0x336e5
leaq 0x8(%rsp), %rdi
callq 0x23ad0
movq 0x2810(%rsp), %rax
cmpq $0x7ff, %rax            # imm = 0x7FF
jb 0x239e9
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x2a3c8
movq $0x0, 0x2808(%r12)
xorl %eax, %eax
movw $0x3e3f, 0x8(%rsp,%rax) # imm = 0x3E3F
leaq 0x2(%rax), %rdx
movq %rdx, 0x2810(%rsp)
testb $0x4, %bl
jne 0x23a37
cmpq $0x7fe, %rax            # imm = 0x7FE
jb 0x23a27
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r12, %rsi
callq 0x2a3c8
movq $0x0, 0x2808(%r12)
xorl %edx, %edx
movb $0xa, 0x8(%rsp,%rdx)
incq %rdx
movq %rdx, 0x2810(%rsp)
movq (%r15), %rsi
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rdx
movl %ebx, %ecx
xorl %r8d, %r8d
callq 0x217a4
movq 0x2808(%r15), %rdx
movq %r15, %rdi
movq %r15, %rsi
callq 0x2a3c8
addq $0x2820, %rsp           # imm = 0x2820
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop