// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/tools/translator/translator.cpp
// Function: Translator::FormatLines(smooth::String const&)
Void Translator::FormatLines(const String &file)
{
	String::InputFormat	 inputFormat("UTF-8");
	String::OutputFormat	 outputFormat("UTF-8");

	IO::InStream	 in(IO::STREAM_FILE, file, IO::IS_READ);

	String		 xmlString;

	while (in.GetPos() < in.Size())
	{
		String	 line = in.InputLine();

		if (line.Trim().StartsWith("<section ")) xmlString.Append("\n");

		while (line.StartsWith("    "))	{ xmlString.Append("\t"); line = line.Tail(line.Length() - 4); }
		while (line.StartsWith(" "))	{ xmlString.Append("  "); line = line.Tail(line.Length() - 1); }

		xmlString.Append(line).Append("\n");
	}

	IO::OutStream	 out(IO::STREAM_FILE, file, IO::OS_REPLACE);

	out.OutputString(xmlString);

	out.Close();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x298, %rsp            # imm = 0x298
movq %rsi, %r14
leaq 0x2776(%rip), %rbx      # 0x12513
leaq 0x58(%rsp), %rdi
movq %rbx, %rsi
callq 0x108f8
leaq 0x40(%rsp), %rdi
movq %rbx, %rsi
callq 0x10942
leaq 0x88(%rsp), %rdi
movl $0x3, %esi
movq %r14, 0x20(%rsp)
movq %r14, %rdx
movl $0x2, %ecx
callq 0x7400
leaq 0x28(%rsp), %rdi
xorl %esi, %esi
callq 0x7480
leaq 0x190(%rsp), %r14
leaq 0x8(%rsp), %r12
leaq 0x28(%rsp), %r15
leaq 0x2755(%rip), %rbp      # 0x12550
movzwl 0x90(%rsp), %ecx
testw %cx, %cx
je 0xfe12
movq 0xd0(%rsp), %rax
jmp 0xfe23
movw $0x5, 0x180(%rsp)
movq $-0x1, %rax
testw %cx, %cx
je 0xfe32
movq 0x98(%rsp), %rcx
jmp 0xfe43
movw $0x5, 0x180(%rsp)
movq $-0x1, %rcx
cmpq %rcx, %rax
jge 0xffde
movq %r14, %rdi
leaq 0x88(%rsp), %rsi
callq 0x7750
movq %r12, %rdi
movq %r14, %rsi
callq 0x7970
leaq 0x70(%rsp), %r13
movq %r13, %rdi
leaq 0x26cd(%rip), %rsi      # 0x12543
callq 0x77f0
movq %r12, %rdi
movq %r13, %rsi
callq 0x77b0
movl %eax, %ebx
movq %r13, %rdi
callq 0x7980
movq %r12, %rdi
callq 0x7980
testb %bl, %bl
je 0xfebe
movq %r12, %rdi
leaq 0x269b(%rip), %rsi      # 0x12541
callq 0x77f0
movq %r15, %rdi
movq %r12, %rsi
callq 0x7170
movq %r12, %rdi
callq 0x7980
movq %r12, %rdi
leaq 0x2685(%rip), %rsi      # 0x1254d
callq 0x77f0
movq %r14, %rdi
movq %r12, %rsi
callq 0x77b0
movl %eax, %ebx
movq %r12, %rdi
callq 0x7980
testb %bl, %bl
je 0xff7d
movq %r12, %rdi
leaq 0x265e(%rip), %rsi      # 0x12552
callq 0x77f0
movq %r15, %rdi
movq %r12, %rsi
callq 0x7170
movq %r12, %rdi
callq 0x7980
movq %r14, %rdi
callq 0x7280
addl $-0x4, %eax
movq %r12, %rdi
movq %r14, %rsi
movl %eax, %edx
callq 0x7340
movq %r14, %rdi
movq %r12, %rsi
callq 0x7550
jmp 0xfeb6
movq %r12, %rdi
leaq 0x2614(%rip), %rsi      # 0x1254f
callq 0x77f0
movq %r15, %rdi
movq %r12, %rsi
callq 0x7170
movq %r12, %rdi
callq 0x7980
movq %r14, %rdi
callq 0x7280
decl %eax
movq %r12, %rdi
movq %r14, %rsi
movl %eax, %edx
callq 0x7340
movq %r14, %rdi
movq %r12, %rsi
callq 0x7550
movq %r12, %rdi
callq 0x7980
movq %r12, %rdi
movq %rbp, %rsi
callq 0x77f0
movq %r14, %rdi
movq %r12, %rsi
callq 0x77b0
movl %eax, %ebx
movq %r12, %rdi
callq 0x7980
testb %bl, %bl
jne 0xff31
movq %r15, %rdi
movq %r14, %rsi
callq 0x7170
movq %rax, %rbx
movq %r12, %rdi
leaq 0x2588(%rip), %rsi      # 0x12541
callq 0x77f0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x7170
movq %r12, %rdi
callq 0x7980
movq %r14, %rdi
callq 0x7980
jmp 0xfdfb
leaq 0x190(%rsp), %rdi
movl $0x3, %esi
movq 0x20(%rsp), %rdx
movl $0x1, %ecx
callq 0x7880
leaq 0x190(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x75b0
leaq 0x190(%rsp), %rdi
callq 0x7690
leaq 0x190(%rsp), %rdi
callq 0x7610
leaq 0x28(%rsp), %rdi
callq 0x7980
leaq 0x88(%rsp), %rdi
callq 0x7520
leaq 0x40(%rsp), %rdi
callq 0x1098c
leaq 0x58(%rsp), %rdi
callq 0x109ba
addq $0x298, %rsp            # imm = 0x298
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1009b
movq %rax, %rbx
jmp 0x100ee
movq %rax, %rbx
jmp 0x100fb
movq %rax, %rbx
jmp 0x10105
movq %rax, %rbx
leaq 0x190(%rsp), %rdi
callq 0x7610
jmp 0x100e4
jmp 0x100d4
jmp 0x100c1
jmp 0x100d4
jmp 0x100c1
jmp 0x100d4
jmp 0x100d4
movq %rax, %rbx
jmp 0x100e4
jmp 0x100c1
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x7980
jmp 0x100c4
jmp 0x100d4
jmp 0x100c1
jmp 0x100c1
jmp 0x100c1
jmp 0x100c1
jmp 0x100d4
jmp 0x100d4
jmp 0x100c1
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x7980
jmp 0x100d7
jmp 0x100d4
jmp 0x100d4
movq %rax, %rbx
leaq 0x190(%rsp), %rdi
callq 0x7980
leaq 0x28(%rsp), %rdi
callq 0x7980
leaq 0x88(%rsp), %rdi
callq 0x7520
leaq 0x40(%rsp), %rdi
callq 0x1098c
leaq 0x58(%rsp), %rdi
callq 0x109ba
movq %rbx, %rdi
callq 0x7290
nop