// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/tools/translator/section.cpp
// Function: Section::Export(smooth::IO::OutStream&, int)
Bool Section::Export(IO::OutStream &stream, Int level)
{
	String	 indent;

	indent.FillN(' ', level * 2);

	for (Int i = 0; i < items.Length(); i++)
	{
		StringItem	*item = items.GetNth(i);

		/* Save only entries with a translation.
		 */
		if (item->GetTranslation() != NIL) stream.OutputLine(String(indent).Append(item->GetTranslation().Replace("\n", " \\ ")));
	}

	foreach (Section *section, sections)
	{
		if (section->items.Length() == 0 && section->sections.Length() == 0) continue;

		stream.OutputString("\n");
		stream.OutputLine(String(indent).Append("# ").Append(section->GetName()));
		stream.OutputString("\n");

		section->Export(stream, level + 1);
	}

	return True;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %edx, %r12d
movq %rsi, %r14
movq %rdi, %r15
leaq 0x50(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x7480
movq %r12, 0x10(%rsp)
leal (%r12,%r12), %edx
movq %rbx, %rdi
movl $0x20, %esi
callq 0x7800
movq %r15, 0x8(%rsp)
cmpl $0x0, 0x28(%r15)
jle 0x8a67
movq 0x8(%rsp), %rax
leaq 0x20(%rax), %rbx
xorl %ebp, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0xa81a
movq (%rax), %r12
movl $0x650, %eax            # imm = 0x650
addq %rax, %r12
movq %r12, %rdi
xorl %esi, %esi
callq 0x76f0
testb %al, %al
je 0x8a57
leaq 0x18(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x7720
leaq 0x68(%rsp), %rdi
leaq 0x9b61(%rip), %rsi      # 0x12541
callq 0x77f0
leaq 0x80(%rsp), %r13
movq %r13, %rdi
leaq 0x9660(%rip), %rsi      # 0x12057
callq 0x77f0
leaq 0x38(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
leaq 0x68(%rsp), %rdx
movq %r13, %rcx
callq 0x73a0
leaq 0x18(%rsp), %rdi
movq %r15, %rsi
callq 0x7170
movq %r14, %rdi
movq %rax, %rsi
callq 0x7640
leaq 0x38(%rsp), %rdi
callq 0x7980
leaq 0x80(%rsp), %rdi
callq 0x7980
leaq 0x68(%rsp), %rdi
callq 0x7980
leaq 0x18(%rsp), %rdi
callq 0x7980
incl %ebp
movq 0x8(%rsp), %rax
cmpl 0x28(%rax), %ebp
jl 0x899e
movq 0x8(%rsp), %rax
cmpl $0x0, 0xd8(%rax)
jle 0x8b82
movq 0x8(%rsp), %rax
addq $0xd0, %rax
movq %rax, 0x30(%rsp)
movq 0x10(%rsp), %rax
incl %eax
movq %rax, 0x10(%rsp)
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
leaq 0x18(%rsp), %rbx
leaq 0x38(%rsp), %r13
incl %ebp
movq 0x30(%rsp), %rdi
movl %ebp, %esi
callq 0x9bf4
movq (%rax), %r12
cmpl $0x0, 0x28(%r12)
jne 0x8acc
cmpl $0x0, 0xd8(%r12)
je 0x8b6d
movq %rbx, %rdi
leaq 0x9a6b(%rip), %rsi      # 0x12541
callq 0x77f0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x75b0
movq %rbx, %rdi
callq 0x7980
movq %rbx, %rdi
leaq 0x50(%rsp), %rsi
callq 0x7720
movq %r13, %rdi
leaq 0x9556(%rip), %rsi      # 0x1205b
callq 0x77f0
movq %rbx, %rdi
movq %r13, %rsi
callq 0x7170
movq %rax, %rdi
movq %r12, %rsi
callq 0x7170
movq %r14, %rdi
movq %rax, %rsi
callq 0x7640
movq %r13, %rdi
callq 0x7980
movq %rbx, %rdi
callq 0x7980
movq %rbx, %rdi
leaq 0x99fc(%rip), %rsi      # 0x12541
callq 0x77f0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x75b0
movq %rbx, %rdi
callq 0x7980
movq %r12, %rdi
movq %r14, %rsi
movq 0x10(%rsp), %rdx
callq 0x8944
movq 0x8(%rsp), %rax
movl 0xd8(%rax), %eax
decl %eax
cmpl %eax, %ebp
jl 0x8aa4
leaq 0x50(%rsp), %rdi
callq 0x7980
movb $0x1, %al
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8be4
jmp 0x8be4
movq %rax, %rbx
jmp 0x8bdd
jmp 0x8bbc
movq %rax, %rbx
jmp 0x8bd0
jmp 0x8bbc
jmp 0x8bbc
jmp 0x8be4
jmp 0x8be4
jmp 0x8be4
jmp 0x8be4
movq %rax, %rbx
jmp 0x8bf6
jmp 0x8be4
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x7980
leaq 0x80(%rsp), %rdi
callq 0x7980
leaq 0x68(%rsp), %rdi
jmp 0x8bf1
movq %rax, %rbx
jmp 0x8c00
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x7980
leaq 0x18(%rsp), %rdi
callq 0x7980
leaq 0x50(%rsp), %rdi
callq 0x7980
movq %rbx, %rdi
callq 0x7290