// File: /workspace/github_c_makefile_star2_O2/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 0x1c38(%rip), %rbx      # 0x12503
leaq 0x58(%rsp), %rdi
movq %rbx, %rsi
callq 0x1139c
leaq 0x40(%rsp), %rdi
movq %rbx, %rsi
callq 0x113e6
leaq 0x88(%rsp), %rdi
pushq $0x3
popq %rsi
pushq $0x2
popq %rcx
movq %r14, 0x20(%rsp)
movq %r14, %rdx
callq 0x8400
leaq 0x28(%rsp), %rdi
xorl %esi, %esi
callq 0x8480
leaq 0x190(%rsp), %r14
leaq 0x8(%rsp), %r12
leaq 0x28(%rsp), %r15
leaq 0x1c1b(%rip), %rbp      # 0x12540
cmpw $0x0, 0x90(%rsp)
je 0x10adc
movq 0xd0(%rsp), %rax
cmpq 0x98(%rsp), %rax
jge 0x10ae6
movq %r14, %rdi
leaq 0x88(%rsp), %rsi
callq 0x8760
movq %r12, %rdi
movq %r14, %rsi
callq 0x8980
leaq 0x70(%rsp), %r13
movq %r13, %rdi
leaq 0x1bbf(%rip), %rsi      # 0x12533
callq 0x8800
movq %r12, %rdi
movq %r13, %rsi
callq 0x87c0
movl %eax, %ebx
movq %r13, %rdi
callq 0x8990
movq %r12, %rdi
callq 0x8990
testb %bl, %bl
je 0x109bc
movq %r12, %rdi
leaq 0x1b8d(%rip), %rsi      # 0x12531
callq 0x8800
movq %r15, %rdi
movq %r12, %rsi
callq 0x8170
movq %r12, %rdi
callq 0x8990
movq %r12, %rdi
leaq 0x1b77(%rip), %rsi      # 0x1253d
callq 0x8800
movq %r14, %rdi
movq %r12, %rsi
callq 0x87c0
movl %eax, %ebx
movq %r12, %rdi
callq 0x8990
testb %bl, %bl
je 0x10a7b
movq %r12, %rdi
leaq 0x1b50(%rip), %rsi      # 0x12542
callq 0x8800
movq %r15, %rdi
movq %r12, %rsi
callq 0x8170
movq %r12, %rdi
callq 0x8990
movq %r14, %rdi
callq 0x8280
addl $-0x4, %eax
movq %r12, %rdi
movq %r14, %rsi
movl %eax, %edx
callq 0x8340
movq %r14, %rdi
movq %r12, %rsi
callq 0x8550
jmp 0x109b4
movq %r12, %rdi
leaq 0x1b06(%rip), %rsi      # 0x1253f
callq 0x8800
movq %r15, %rdi
movq %r12, %rsi
callq 0x8170
movq %r12, %rdi
callq 0x8990
movq %r14, %rdi
callq 0x8280
decl %eax
movq %r12, %rdi
movq %r14, %rsi
movl %eax, %edx
callq 0x8340
movq %r14, %rdi
movq %r12, %rsi
callq 0x8550
movq %r12, %rdi
callq 0x8990
movq %r12, %rdi
movq %rbp, %rsi
callq 0x8800
movq %r14, %rdi
movq %r12, %rsi
callq 0x87c0
movl %eax, %ebx
movq %r12, %rdi
callq 0x8990
testb %bl, %bl
jne 0x10a2f
movq %r15, %rdi
movq %r14, %rsi
callq 0x8170
movq %rax, %rbx
movq %r12, %rdi
leaq 0x1a7a(%rip), %rsi      # 0x12531
callq 0x8800
movq %rbx, %rdi
movq %r12, %rsi
callq 0x8170
movq %r12, %rdi
callq 0x8990
movq %r14, %rdi
callq 0x8990
jmp 0x10925
movw $0x5, 0x180(%rsp)
leaq 0x190(%rsp), %rdi
pushq $0x3
popq %rsi
pushq $0x1
popq %rcx
movq 0x20(%rsp), %rdx
callq 0x8890
leaq 0x190(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x85b0
leaq 0x190(%rsp), %rdi
callq 0x8690
leaq 0x190(%rsp), %rdi
callq 0x8610
leaq 0x28(%rsp), %rdi
callq 0x8990
leaq 0x88(%rsp), %rdi
callq 0x8520
leaq 0x40(%rsp), %rdi
callq 0x11430
leaq 0x58(%rsp), %rdi
callq 0x1145e
addq $0x298, %rsp            # imm = 0x298
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x10bae
movq %rax, %rbx
jmp 0x10bf2
movq %rax, %rbx
jmp 0x10bff
movq %rax, %rbx
jmp 0x10c09
movq %rax, %rbx
leaq 0x190(%rsp), %rdi
callq 0x8610
jmp 0x10be8
jmp 0x10bc5
jmp 0x10bd8
jmp 0x10bd8
jmp 0x10bc5
jmp 0x10bd8
jmp 0x10bd8
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x8990
jmp 0x10bc8
movq %rax, %rbx
jmp 0x10be8
jmp 0x10bc5
jmp 0x10bd8
jmp 0x10bc5
jmp 0x10bc5
jmp 0x10bc5
jmp 0x10bd8
jmp 0x10bc5
jmp 0x10bc5
jmp 0x10bd8
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x8990
jmp 0x10bdb
jmp 0x10bd8
jmp 0x10bd8
movq %rax, %rbx
leaq 0x190(%rsp), %rdi
callq 0x8990
leaq 0x28(%rsp), %rdi
callq 0x8990
leaq 0x88(%rsp), %rdi
callq 0x8520
leaq 0x40(%rsp), %rdi
callq 0x11430
leaq 0x58(%rsp), %rdi
callq 0x1145e
movq %rbx, %rdi
callq 0x8290
nop