// File: /workspace/github_cpp_makefile_star2_O3/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 0x21561
movq %rdx, %rdi
callq 0x1d379
movq %rax, %r13
jmp 0x21564
xorl %r13d, %r13d
movl $0x2, %r15d
movq %rbp, %r12
testq %r12, %r12
je 0x21924
movl (%r12), %eax
andl $0xf, %eax
addl $-0x3, %eax
cmpl $0x1, %eax
ja 0x2159c
movq %rbx, %rdi
movq %r12, %rsi
movl 0x4(%rsp), %edx
callq 0x29043
xorl %r15d, %r15d
jmp 0x217d4
testb $0x4, 0x4(%rsp)
jne 0x215d6
movl %r15d, %eax
andl $0x1, %eax
je 0x215d6
movq 0x2808(%rbx), %rdx
cmpq $0x800, %rdx            # imm = 0x800
jb 0x215c8
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x29c16
xorl %edx, %edx
movb $0xa, (%rbx,%rdx)
incq %rdx
movq %rdx, 0x2808(%rbx)
testq %r13, %r13
je 0x215f4
andl $0x2, %r15d
je 0x215f4
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movq %r13, %rdx
movl %r14d, %ecx
callq 0x295a9
movl (%r12), %eax
andl $0xf, %eax
cmpl $0x1, %eax
je 0x216d1
cmpl $0x2, %eax
jne 0x216e6
movq 0x8(%r12), %r15
testq %r15, %r15
leaq 0x11f03(%rip), %rax     # 0x3351f
cmoveq %rax, %r15
movq 0x2808(%rbx), %rdx
cmpq $0x800, %rdx            # imm = 0x800
jb 0x2163d
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x29c16
xorl %edx, %edx
movb $0x3c, (%rbx,%rdx)
incq %rdx
movq %rdx, 0x2808(%rbx)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x23680
cmpq $0x0, 0x38(%r12)
je 0x21679
movq %rbx, %rdi
movq %r12, %rsi
movq 0x8(%rsp), %rdx
movq %r13, %rcx
movl 0x4(%rsp), %r8d
movl %r14d, %r9d
callq 0x2990d
cmpq $0x0, 0x10(%r12)
je 0x216fa
movq 0x2808(%rbx), %rdx
cmpq $0x800, %rdx            # imm = 0x800
jb 0x2169e
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x29c16
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 0x29730
movq 0x20(%r12), %rax
testq %rax, %rax
jne 0x21732
jmp 0x2186e
movq 0x20(%r12), %rax
movl $0x2, %r15d
testq %rax, %rax
jne 0x21744
jmp 0x217d4
movq %rbx, %rdi
movq %r12, %rsi
movl 0x4(%rsp), %edx
callq 0x29043
jmp 0x218d2
cmpq $0x0, 0x20(%r12)
movq 0x2808(%rbx), %rdx
je 0x21755
cmpq $0x800, %rdx            # imm = 0x800
jb 0x2171f
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x29c16
xorl %edx, %edx
movb $0x3e, (%rbx,%rdx)
incq %rdx
movq %rdx, 0x2808(%rbx)
movq 0x20(%r12), %rax
xorl %ecx, %ecx
cmpq $0x0, 0x10(%r12)
sete %cl
leal (%rcx,%rcx,2), %r15d
incl %r14d
movq %rax, %r12
cmpq %rbp, %r12
jne 0x2156d
jmp 0x218dd
movl 0x4(%rsp), %eax
testb %al, %al
js 0x217aa
testb $0x4, %al
jne 0x21785
cmpq $0x800, %rdx            # imm = 0x800
jb 0x21777
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x29c16
xorl %edx, %edx
movb $0x20, (%rbx,%rdx)
incq %rdx
movq %rdx, 0x2808(%rbx)
cmpq $0x7ff, %rdx            # imm = 0x7FF
jb 0x2179b
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x29c16
xorl %edx, %edx
movw $0x3e2f, (%rbx,%rdx)    # imm = 0x3E2F
addq $0x2, %rdx
jmp 0x218cb
cmpq $0x7fe, %rdx            # imm = 0x7FE
jb 0x217c0
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x29c16
xorl %edx, %edx
movw $0x3c3e, (%rbx,%rdx)    # imm = 0x3C3E
movb $0x2f, 0x2(%rbx,%rdx)
addq $0x3, %rdx
jmp 0x21895
cmpq %rbp, %r12
je 0x21747
movq 0x30(%r12), %rax
testq %rax, %rax
jne 0x21744
movq 0x18(%r12), %r12
movl (%r12), %eax
andl $0xf, %eax
cmpl $0x2, %eax
jne 0x217d4
testb $0x1, %r15b
sete %al
orb 0x14(%rsp), %al
jne 0x21834
movq 0x2808(%rbx), %rdx
cmpq $0x800, %rdx            # imm = 0x800
jb 0x21826
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x29c16
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 0x2185b
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movq %r13, %rdx
movl %r14d, %ecx
callq 0x295a9
movq 0x8(%r12), %r15
testq %r15, %r15
leaq 0x11cb5(%rip), %rax     # 0x3351f
cmoveq %rax, %r15
movq 0x2808(%rbx), %rdx
cmpq $0x7ff, %rdx            # imm = 0x7FF
jb 0x2188b
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x29c16
xorl %edx, %edx
movw $0x2f3c, (%rbx,%rdx)    # imm = 0x2F3C
addq $0x2, %rdx
movq %rdx, 0x2808(%rbx)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x23680
movq 0x2808(%rbx), %rdx
cmpq $0x800, %rdx            # imm = 0x800
jb 0x218c4
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x29c16
xorl %edx, %edx
movb $0x3e, (%rbx,%rdx)
incq %rdx
movq %rdx, 0x2808(%rbx)
movl $0x3, %r15d
jmp 0x217d4
testb $0x4, 0x4(%rsp)
jne 0x21915
andl $0x1, %r15d
je 0x21915
movq 0x2808(%rbx), %rdx
cmpq $0x800, %rdx            # imm = 0x800
jb 0x21907
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x29c16
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 0x11b65(%rip), %rdi     # 0x33490
leaq 0x105f3(%rip), %rsi     # 0x31f25
leaq 0x11b5c(%rip), %rcx     # 0x33495
movl $0x1089, %edx           # imm = 0x1089
callq 0x6120
nop