// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/tools/translator/section.cpp
// Function: Section::Save(smooth::XML::Node*, smooth::String const&)
Bool Section::Save(XML::Node *xmlSection, const String &templateName)
{
	for (Int i = 0; i < items.Length(); i++)
	{
		StringItem	*item = items.GetNth(i);

		/* If we have a template, save only
		 * entries with a translation.
		 */
		if (templateName == NIL || item->GetTranslation() != NIL)
		{
			XML::Node	*node = xmlSection->AddNode("entry", item->GetTranslation());

			node->SetAttribute("id", String::FromInt(item->GetID()));
			node->SetAttribute("string", item->GetOriginal());
		}
	}

	foreach (Section *section, sections)
	{
		XML::Node	*node = xmlSection->AddNode("section");

		node->SetAttribute("name", section->GetName());

		section->Save(node, templateName);
	}

	return True;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x170, %rsp            # imm = 0x170
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x108(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x108(%rbp), %rdi
movl -0x1c(%rbp), %eax
movl %eax, -0x10c(%rbp)
addq $0x20, %rdi
callq 0xb410
movl %eax, %ecx
movl -0x10c(%rbp), %eax
cmpl %ecx, %eax
jge 0xa6ee
movq -0x108(%rbp), %rdi
addq $0x20, %rdi
movl -0x1c(%rbp), %esi
callq 0xba20
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x84f0
testb $0x1, %al
jne 0xa547
movq -0x28(%rbp), %rdi
callq 0xb5c0
movq %rax, %rdi
xorl %esi, %esi
callq 0x8700
testb $0x1, %al
jne 0xa547
jmp 0xa6de
movq -0x10(%rbp), %rax
movq %rax, -0x120(%rbp)
leaq 0x12df6(%rip), %rsi     # 0x1d34f
leaq -0x48(%rbp), %rdi
callq 0x8800
movq -0x28(%rbp), %rdi
callq 0xb5c0
movq %rax, -0x118(%rbp)
jmp 0xa574
movq -0x118(%rbp), %rdx
movq -0x120(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x8580
movq %rax, -0x128(%rbp)
jmp 0xa594
leaq -0x48(%rbp), %rdi
callq 0x8990
movq -0x128(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x138(%rbp)
leaq 0x12a7b(%rip), %rsi     # 0x1d035
leaq -0x70(%rbp), %rdi
callq 0x8800
movq -0x28(%rbp), %rdi
callq 0xb630
movl %eax, -0x12c(%rbp)
jmp 0xa5d4
movl -0x12c(%rbp), %eax
movslq %eax, %rsi
leaq -0x88(%rbp), %rdi
callq 0x8220
jmp 0xa5eb
movq -0x138(%rbp), %rdi
leaq -0x70(%rbp), %rsi
leaq -0x88(%rbp), %rdx
callq 0x83c0
jmp 0xa604
leaq -0x88(%rbp), %rdi
callq 0x8990
leaq -0x70(%rbp), %rdi
callq 0x8990
movq -0x30(%rbp), %rax
movq %rax, -0x148(%rbp)
leaq 0x12a0d(%rip), %rsi     # 0x1d038
leaq -0xa0(%rbp), %rdi
callq 0x8800
movq -0x28(%rbp), %rdi
callq 0xb5e0
movq %rax, -0x140(%rbp)
jmp 0xa649
movq -0x140(%rbp), %rdx
movq -0x148(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x83c0
jmp 0xa665
leaq -0xa0(%rbp), %rdi
callq 0x8990
jmp 0xa6de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x8990
jmp 0xa909
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0xa6b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x8990
leaq -0x70(%rbp), %rdi
callq 0x8990
jmp 0xa909
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x8990
jmp 0xa909
jmp 0xa6e0
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xa4d9
movl $0x0, -0xa4(%rbp)
movl $0xffffffff, -0xa8(%rbp) # imm = 0xFFFFFFFF
xorl %eax, %eax
cmpl $0x0, -0xa4(%rbp)
movb %al, -0x149(%rbp)
jne 0xa748
movq -0x108(%rbp), %rdi
movl -0xa8(%rbp), %eax
movl %eax, -0x150(%rbp)
addq $0xd0, %rdi
callq 0xb410
movl %eax, %ecx
movl -0x150(%rbp), %eax
subl $0x1, %ecx
cmpl %ecx, %eax
setl %al
movb %al, -0x149(%rbp)
movb -0x149(%rbp), %al
testb $0x1, %al
jne 0xa757
jmp 0xa8fc
movq -0x108(%rbp), %rdi
addq $0xd0, %rdi
movl -0xa8(%rbp), %esi
addl $0x1, %esi
movl %esi, -0xa8(%rbp)
callq 0xb4a0
movq (%rax), %rax
movq %rax, -0xb0(%rbp)
cmpl $0x0, -0xa4(%rbp)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xa798
jmp 0xa8e6
movq -0x10(%rbp), %rax
movq %rax, -0x158(%rbp)
leaq 0x12895(%rip), %rsi     # 0x1d03f
leaq -0xd0(%rbp), %rdi
callq 0x8800
leaq -0xe8(%rbp), %rdi
xorl %esi, %esi
callq 0x8490
jmp 0xa7c6
movq -0x158(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
leaq -0xe8(%rbp), %rdx
callq 0x8580
movq %rax, -0x160(%rbp)
jmp 0xa7e9
leaq -0xe8(%rbp), %rdi
callq 0x8990
leaq -0xd0(%rbp), %rdi
callq 0x8990
movq -0x160(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rax
movq %rax, -0x170(%rbp)
leaq 0x1280c(%rip), %rsi     # 0x1d030
leaq -0x100(%rbp), %rdi
callq 0x8800
movq -0xb0(%rbp), %rdi
callq 0xb720
movq %rax, -0x168(%rbp)
jmp 0xa845
movq -0x168(%rbp), %rdx
movq -0x170(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0x83c0
jmp 0xa861
leaq -0x100(%rbp), %rdi
callq 0x8990
movq -0xb0(%rbp), %rdi
movq -0xb8(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xa4b0
movl -0xa4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa4(%rbp)
jmp 0xa783
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0xa8be
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x8990
leaq -0xd0(%rbp), %rdi
callq 0x8990
jmp 0xa909
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x8990
jmp 0xa909
jmp 0xa8e8
movl -0xa4(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xa4(%rbp)
jmp 0xa702
movb $0x1, %al
andb $0x1, %al
addq $0x170, %rsp            # imm = 0x170
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x8290
nopw %cs:(%rax,%rax)