// File: /workspace/github_cpp_makefile_star2_O2/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
movq %rsi, %r15
movq %rdi, %rbx
testb $0x41, %cl
sete %al
movl %ecx, 0x4(%rsp)
andl $0x4, %ecx
shrl $0x2, %ecx
movl %ecx, 0x14(%rsp)
orb %al, %cl
movq %rdx, 0x8(%rsp)
jne 0x1babe
movq %rdx, %rdi
callq 0x18462
movq %rax, %r13
jmp 0x1bac1
xorl %r13d, %r13d
pushq $0x2
popq %rbp
movq %r15, %r12
testq %r12, %r12
je 0x1bd46
movl (%r12), %eax
andl $0xf, %eax
addl $-0x3, %eax
cmpl $0x1, %eax
ja 0x1baf5
movq %rbx, %rdi
movq %r12, %rsi
movl 0x4(%rsp), %edx
callq 0x24529
xorl %ebp, %ebp
jmp 0x1bc5e
testb $0x4, 0x4(%rsp)
jne 0x1bb0e
movl %ebp, %eax
andl $0x1, %eax
je 0x1bb0e
movq %rbx, %rdi
pushq $0xa
popq %rsi
callq 0x1d952
testq %r13, %r13
je 0x1bb2b
andl $0x2, %ebp
je 0x1bb2b
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movq %r13, %rdx
movl %r14d, %ecx
callq 0x248f4
movl (%r12), %eax
andl $0xf, %eax
cmpl $0x1, %eax
je 0x1bbc6
cmpl $0x2, %eax
jne 0x1bbdc
movq 0x8(%r12), %rbp
testq %rbp, %rbp
leaq 0x11a62(%rip), %rax     # 0x2d5b5
cmoveq %rax, %rbp
movq %rbx, %rdi
pushq $0x3c
popq %rsi
callq 0x1d952
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x1d864
cmpq $0x0, 0x38(%r12)
je 0x1bb90
movq %rbx, %rdi
movq %r12, %rsi
movq 0x8(%rsp), %rdx
movq %r13, %rcx
movl 0x4(%rsp), %r8d
movl %r14d, %r9d
callq 0x24b4c
cmpq $0x0, 0x10(%r12)
je 0x1bbf0
movq %rbx, %rdi
pushq $0x3e
popq %rsi
callq 0x1d952
movq 0x10(%r12), %rsi
movq %rbx, %rdi
pushq $0x1
popq %rdx
movl 0x4(%rsp), %ecx
callq 0x249ae
movq 0x20(%r12), %rax
testq %rax, %rax
jne 0x1bc08
jmp 0x1bcd7
movq 0x20(%r12), %rax
pushq $0x2
popq %rbp
testq %rax, %rax
jne 0x1bd06
jmp 0x1bc5e
movq %rbx, %rdi
movq %r12, %rsi
movl 0x4(%rsp), %edx
callq 0x24529
jmp 0x1bcfb
cmpq $0x0, 0x20(%r12)
je 0x1bc1e
movq %rbx, %rdi
pushq $0x3e
popq %rsi
callq 0x1d952
movq 0x20(%r12), %rax
xorl %ecx, %ecx
cmpq $0x0, 0x10(%r12)
sete %cl
leal (%rcx,%rcx,2), %ebp
incl %r14d
jmp 0x1bd06
movl 0x4(%rsp), %eax
testb %al, %al
js 0x1bc48
testb $0x4, %al
jne 0x1bc35
movq %rbx, %rdi
pushq $0x20
popq %rsi
callq 0x1d952
movq %rbx, %rdi
pushq $0x2f
popq %rsi
pushq $0x3e
popq %rdx
callq 0x1d914
jmp 0x1bcfb
movq %rbx, %rdi
pushq $0x3e
popq %rsi
pushq $0x3c
popq %rdx
pushq $0x2f
popq %rcx
callq 0x1d814
jmp 0x1bce5
cmpq %r15, %r12
je 0x1bd03
movq 0x30(%r12), %rax
testq %rax, %rax
jne 0x1bd06
movq 0x18(%r12), %r12
movl (%r12), %eax
andl $0xf, %eax
cmpl $0x2, %eax
jne 0x1bc5e
testb $0x1, %bpl
sete %al
orb 0x14(%rsp), %al
jne 0x1bc9e
movq %rbx, %rdi
pushq $0xa
popq %rsi
callq 0x1d952
decl %r14d
testq %r13, %r13
sete %al
cmpl $0x2, %ebp
setb %cl
orb %al, %cl
jne 0x1bcc4
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movq %r13, %rdx
movl %r14d, %ecx
callq 0x248f4
movq 0x8(%r12), %rbp
testq %rbp, %rbp
leaq 0x118e2(%rip), %rax     # 0x2d5b5
cmoveq %rax, %rbp
movq %rbx, %rdi
pushq $0x3c
popq %rsi
pushq $0x2f
popq %rdx
callq 0x1d914
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x1d864
movq %rbx, %rdi
pushq $0x3e
popq %rsi
callq 0x1d952
pushq $0x3
popq %rbp
jmp 0x1bc5e
movq %r12, %rax
movq %rax, %r12
cmpq %r15, %rax
jne 0x1bac7
testb $0x4, 0x4(%rsp)
jne 0x1bd37
andl $0x1, %ebp
je 0x1bd37
pushq $0xa
popq %rsi
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1d952
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x117d9(%rip), %rdi     # 0x2d526
leaq 0x101e1(%rip), %rsi     # 0x2bf35
leaq 0x117d0(%rip), %rcx     # 0x2d52b
movl $0x1089, %edx           # imm = 0x1089
callq 0x6100
nop