// File: /workspace/github_cpp_makefile_star2_O1/jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::node_output(pugi::impl::(anonymous namespace)::xml_buffered_writer&, pugi::xml_node_struct*, char const*, unsigned int, unsigned int)
PUGI__FN void node_output(xml_buffered_writer& writer, xml_node_struct* root, const char_t* indent, unsigned int flags, unsigned int depth)
	{
		size_t indent_length = ((flags & (format_indent | format_indent_attributes)) && (flags & format_raw) == 0) ? strlength(indent) : 0;
		unsigned int indent_flags = indent_indent;

		xml_node_struct* node = root;

		do
		{
			assert(node);

			// begin writing current node
			if (PUGI__NODETYPE(node) == node_pcdata || PUGI__NODETYPE(node) == node_cdata)
			{
				node_output_simple(writer, node, flags);

				indent_flags = 0;
			}
			else
			{
				if ((indent_flags & indent_newline) && (flags & format_raw) == 0)
					writer.write('\n');

				if ((indent_flags & indent_indent) && indent_length)
					text_output_indent(writer, indent, indent_length, depth);

				if (PUGI__NODETYPE(node) == node_element)
				{
					indent_flags = indent_newline | indent_indent;

					if (node_output_start(writer, node, indent, indent_length, flags, depth))
					{
						// element nodes can have value if parse_embed_pcdata was used
						if (node->value)
							indent_flags = 0;

						node = node->first_child;
						depth++;
						continue;
					}
				}
				else if (PUGI__NODETYPE(node) == node_document)
				{
					indent_flags = indent_indent;

					if (node->first_child)
					{
						node = node->first_child;
						continue;
					}
				}
				else
				{
					node_output_simple(writer, node, flags);

					indent_flags = indent_newline | indent_indent;
				}
			}

			// continue to the next node
			while (node != root)
			{
				if (node->next_sibling)
				{
					node = node->next_sibling;
					break;
				}

				node = node->parent;

				// write closing node
				if (PUGI__NODETYPE(node) == node_element)
				{
					depth--;

					if ((indent_flags & indent_newline) && (flags & format_raw) == 0)
						writer.write('\n');

					if ((indent_flags & indent_indent) && indent_length)
						text_output_indent(writer, indent, indent_length, depth);

					node_output_end(writer, node);

					indent_flags = indent_newline | indent_indent;
				}
			}
		}
		while (node != root);

		if ((indent_flags & indent_newline) && (flags & format_raw) == 0)
			writer.write('\n');
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %r14d
movl %ecx, 0x4(%rsp)
movq %rsi, %rbp
movq %rdi, %rbx
testb $0x41, %cl
sete %al
andl $0x4, %ecx
shrl $0x2, %ecx
movl %ecx, 0x14(%rsp)
orb %al, %cl
movq %rdx, 0x8(%rsp)
jne 0x217e5
movq %rdx, %rdi
callq 0x1d2a2
movq %rax, %r13
jmp 0x217e8
xorl %r13d, %r13d
movl $0x2, %r15d
movq %rbp, %r12
testq %r12, %r12
je 0x21c19
movl (%r12), %eax
andl $0xf, %eax
addl $-0x3, %eax
cmpl $0x1, %eax
ja 0x21820
movq %rbx, %rdi
movq %r12, %rsi
movl 0x4(%rsp), %edx
callq 0x29957
xorl %r15d, %r15d
jmp 0x21a9d
testb $0x4, 0x4(%rsp)
jne 0x21865
movl %r15d, %eax
andl $0x1, %eax
je 0x21865
movq 0x2808(%rbx), %rdx
cmpq $0x800, %rdx            # imm = 0x800
jb 0x21857
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x2a3c8
movq $0x0, 0x2808(%rbx)
xorl %edx, %edx
movb $0xa, (%rbx,%rdx)
incq %rdx
movq %rdx, 0x2808(%rbx)
testq %r13, %r13
je 0x21883
andl $0x2, %r15d
je 0x21883
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movq %r13, %rdx
movl %r14d, %ecx
callq 0x29ec7
movl (%r12), %eax
andl $0xf, %eax
cmpl $0x1, %eax
je 0x21978
cmpl $0x2, %eax
jne 0x21991
movq 0x8(%r12), %r15
testq %r15, %r15
leaq 0x12d4a(%rip), %rax     # 0x345f5
cmoveq %rax, %r15
movq 0x2808(%rbx), %rdx
cmpq $0x800, %rdx            # imm = 0x800
jb 0x218d7
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x2a3c8
movq $0x0, 0x2808(%rbx)
xorl %edx, %edx
movb $0x3c, (%rbx,%rdx)
incq %rdx
movq %rdx, 0x2808(%rbx)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x23ad0
cmpq $0x0, 0x38(%r12)
je 0x21913
movq %rbx, %rdi
movq %r12, %rsi
movq 0x8(%rsp), %rdx
movq %r13, %rcx
movl 0x4(%rsp), %r8d
movl %r14d, %r9d
callq 0x2a05f
cmpq $0x0, 0x10(%r12)
je 0x219a5
movq 0x2808(%rbx), %rdx
cmpq $0x800, %rdx            # imm = 0x800
jb 0x21947
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x2a3c8
movq $0x0, 0x2808(%rbx)
xorl %edx, %edx
movb $0x3e, (%rbx,%rdx)
incq %rdx
movq %rdx, 0x2808(%rbx)
movq 0x10(%r12), %rsi
movq %rbx, %rdi
movl $0x1, %edx
movl 0x4(%rsp), %ecx
callq 0x2a039
cmpq $0x0, 0x20(%r12)
jne 0x219e3
jmp 0x21b42
movq 0x20(%r12), %rax
movl $0x2, %r15d
testq %rax, %rax
je 0x21a9d
movq %rax, %r12
jmp 0x219fa
movq %rbx, %rdi
movq %r12, %rsi
movl 0x4(%rsp), %edx
callq 0x29957
jmp 0x21bbc
cmpq $0x0, 0x20(%r12)
je 0x21a08
movq 0x2808(%rbx), %rdx
cmpq $0x800, %rdx            # imm = 0x800
jb 0x219d5
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x2a3c8
movq $0x0, 0x2808(%rbx)
xorl %edx, %edx
movb $0x3e, (%rbx,%rdx)
incq %rdx
movq %rdx, 0x2808(%rbx)
xorl %eax, %eax
cmpq $0x0, 0x10(%r12)
sete %al
leal (%rax,%rax,2), %r15d
movq 0x20(%r12), %r12
incl %r14d
cmpq %rbp, %r12
jne 0x217f1
jmp 0x21bc7
movl 0x4(%rsp), %eax
testb %al, %al
js 0x21a81
testb $0x4, %al
jne 0x21a4a
movq 0x2808(%rbx), %rdx
cmpq $0x800, %rdx            # imm = 0x800
jb 0x21a3c
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x2a3c8
movq $0x0, 0x2808(%rbx)
xorl %edx, %edx
movb $0x20, (%rbx,%rdx)
incq %rdx
movq %rdx, 0x2808(%rbx)
movq 0x2808(%rbx), %rdx
cmpq $0x7ff, %rdx            # imm = 0x7FF
jb 0x21a72
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x2a3c8
movq $0x0, 0x2808(%rbx)
xorl %edx, %edx
movw $0x3e2f, (%rbx,%rdx)    # imm = 0x3E2F
addq $0x2, %rdx
jmp 0x21bb5
movq %rbx, %rdi
movl $0x3e, %esi
movl $0x3c, %edx
movl $0x2f, %ecx
callq 0x23a72
jmp 0x21b7b
cmpq %rbp, %r12
je 0x219fa
movq 0x30(%r12), %rax
testq %rax, %rax
jne 0x2198c
movq 0x18(%r12), %r12
movl (%r12), %eax
andl $0xf, %eax
cmpl $0x2, %eax
jne 0x21a9d
testb $0x1, %r15b
sete %al
orb 0x14(%rsp), %al
jne 0x21b08
movq 0x2808(%rbx), %rdx
cmpq $0x800, %rdx            # imm = 0x800
jb 0x21afa
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x2a3c8
movq $0x0, 0x2808(%rbx)
xorl %edx, %edx
movb $0xa, (%rbx,%rdx)
incq %rdx
movq %rdx, 0x2808(%rbx)
decl %r14d
testq %r13, %r13
sete %al
testb $0x2, %r15b
sete %cl
orb %al, %cl
jne 0x21b2f
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movq %r13, %rdx
movl %r14d, %ecx
callq 0x29ec7
movq 0x8(%r12), %r15
testq %r15, %r15
leaq 0x12ab7(%rip), %rax     # 0x345f5
cmoveq %rax, %r15
movq 0x2808(%rbx), %rdx
cmpq $0x7ff, %rdx            # imm = 0x7FF
jb 0x21b6a
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x2a3c8
movq $0x0, 0x2808(%rbx)
xorl %edx, %edx
movw $0x2f3c, (%rbx,%rdx)    # imm = 0x2F3C
addq $0x2, %rdx
movq %rdx, 0x2808(%rbx)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x23ad0
movq 0x2808(%rbx), %rdx
cmpq $0x800, %rdx            # imm = 0x800
jb 0x21bae
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x2a3c8
movq $0x0, 0x2808(%rbx)
xorl %edx, %edx
movb $0x3e, (%rbx,%rdx)
incq %rdx
movq %rdx, 0x2808(%rbx)
movl $0x3, %r15d
jmp 0x21a9d
testb $0x4, 0x4(%rsp)
jne 0x21c0a
andl $0x1, %r15d
je 0x21c0a
movq 0x2808(%rbx), %rdx
cmpq $0x800, %rdx            # imm = 0x800
jb 0x21bfc
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x2a3c8
movq $0x0, 0x2808(%rbx)
xorl %edx, %edx
movb $0xa, (%rbx,%rdx)
incq %rdx
movq %rdx, 0x2808(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x12946(%rip), %rdi     # 0x34566
leaq 0x112ce(%rip), %rsi     # 0x32ef5
leaq 0x1293d(%rip), %rcx     # 0x3456b
movl $0x1089, %edx           # imm = 0x1089
callq 0x6120