// File: jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::node_output_start(pugi::impl::(anonymous namespace)::xml_buffered_writer&, pugi::xml_node_struct*, char const*, unsigned long, unsigned int, unsigned int)
PUGI__FN bool node_output_start(xml_buffered_writer& writer, xml_node_struct* node, const char_t* indent, size_t indent_length, unsigned int flags, unsigned int depth)
	{
		const char_t* default_name = PUGIXML_TEXT(":anonymous");
		const char_t* name = node->name ? node->name + 0 : default_name;

		writer.write('<');
		writer.write_string(name);

		if (node->first_attribute)
			node_output_attributes(writer, node, indent, indent_length, flags, depth);

		// element nodes can have value if parse_embed_pcdata was used
		if (!node->value)
		{
			if (!node->first_child)
			{
				if (flags & format_no_empty_element_tags)
				{
					writer.write('>', '<', '/');
					writer.write_string(name);
					writer.write('>');

					return false;
				}
				else
				{
					if ((flags & format_raw) == 0)
						writer.write(' ');

					writer.write('/', '>');

					return false;
				}
			}
			else
			{
				writer.write('>');

				return true;
			}
		}
		else
		{
			writer.write('>');

			text_output(writer, node->value, ctx_special_pcdata, flags);

			if (!node->first_child)
			{
				writer.write('<', '/');
				writer.write_string(name);
				writer.write('>');

				return false;
			}
			else
			{
				return true;
			}
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movl %r9d, -0x30(%rbp)
leaq 0x1597e(%rip), %rax     # 0x6cc35
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x572d4
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x48(%rbp)
jmp 0x572dc
movq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movl $0x3c, %esi
callq 0x48cf0
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x48b60
movq -0x18(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x57327
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl -0x2c(%rbp), %r8d
movl -0x30(%rbp), %r9d
callq 0x57880
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x573d0
movq -0x18(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x573bc
movl -0x2c(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x5738a
movq -0x10(%rbp), %rdi
movl $0x3e, %esi
movl $0x3c, %edx
movl $0x2f, %ecx
callq 0x48a80
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x48b60
movq -0x10(%rbp), %rdi
movl $0x3e, %esi
callq 0x48cf0
movb $0x0, -0x1(%rbp)
jmp 0x5743a
movl -0x2c(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0x573a3
movq -0x10(%rbp), %rdi
movl $0x20, %esi
callq 0x48cf0
movq -0x10(%rbp), %rdi
movl $0x2f, %esi
movl $0x3e, %edx
callq 0x48c80
movb $0x0, -0x1(%rbp)
jmp 0x5743a
movq -0x10(%rbp), %rdi
movl $0x3e, %esi
callq 0x48cf0
movb $0x1, -0x1(%rbp)
jmp 0x5743a
movq -0x10(%rbp), %rdi
movl $0x3e, %esi
callq 0x48cf0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
movl -0x2c(%rbp), %ecx
movl $0x1, %edx
callq 0x574d0
movq -0x18(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x57436
movq -0x10(%rbp), %rdi
movl $0x3c, %esi
movl $0x2f, %edx
callq 0x48c80
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x48b60
movq -0x10(%rbp), %rdi
movl $0x3e, %esi
callq 0x48cf0
movb $0x0, -0x1(%rbp)
jmp 0x5743a
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)