// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/i18n/translator.cpp
// Function: smooth::I18n::Translator::GetSupportedLanguages()
S::Int S::I18n::Translator::GetSupportedLanguages()
{
	/* Add default translation.
	 */
	{
		Language	*language = new Language();

		language->SetName("Default language");

		language->encoding    = "UTF-8";
		language->magic	      = "internal";
		language->author      = "unknown";
		language->url	      = "none";
		language->rightToLeft = False;

		languages.Add(language);
	}

	/* Check translation folders.
	 */
	const Array<Directory>	&dirs = GetTranslationFolders(appPrefix);

	foreach (const Directory &dir, dirs)
	{
		if (!dir.Exists() || dir.GetFilesByPattern(String(appPrefix).Append("_*.xml")).Length() == 0) continue;

		/* Load translation files.
		 */
		const Array<File>	&files = dir.GetFilesByPattern(String(appPrefix).Append("_*.xml"));

		foreach (const File &file, files)
		{
			XML::Document	 doc;

			if (doc.LoadFile(file) == Success())
			{
				Language	*language = new Language();

				language->magic = file.GetFileName();

				if (LoadDescription(doc, language) == Success()) AddLanguage(language);
			}
		}
	}

	return Success();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdi, 0x18(%rsp)
movl $0x158, %edi            # imm = 0x158
callq 0x556b0
movq %rax, %r14
movq %rax, %rdi
callq 0x572b0
leaq 0x5bf7b(%rip), %rsi     # 0xf73c1
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
callq 0x579f0
leaq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0x555f0
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
callq 0x59200
leaq 0xf0(%r14), %rdi
leaq 0x76e5c(%rip), %rsi     # 0x1122d6
callq 0x55f40
leaq 0x108(%r14), %rdi
leaq 0x5bee5(%rip), %rsi     # 0xf7372
callq 0x55f40
leaq 0x120(%r14), %rdi
leaq 0x5bf32(%rip), %rsi     # 0xf73d2
callq 0x55f40
movq %r14, %rdi
addq $0x138, %rdi            # imm = 0x138
leaq 0x5bf24(%rip), %rsi     # 0xf73da
callq 0x55f40
movb $0x0, 0x150(%r14)
movq 0x18(%rsp), %r15
leaq 0x20(%r15), %rdi
movq %r14, (%rbx)
leaq 0x38(%rsp), %rsi
callq 0x5aed8
leaq 0x8(%r15), %rsi
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
movq %rsi, 0x10(%rsp)
callq 0x9c53f
cmpl $0x0, 0x8(%rbx)
jle 0x9b67e
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
leaq 0x90(%rsp), %r12
leaq 0x20(%rsp), %r13
incl %esi
leaq 0x38(%rsp), %rdi
movl %esi, 0xc(%rsp)
callq 0x9d328
movq %rax, %rbx
movq %rax, %rdi
callq 0x55440
testb %al, %al
je 0x9b66c
movq %r12, %rdi
movq 0x10(%rsp), %rsi
callq 0x570b0
movq %r13, %rdi
leaq 0x5be9a(%rip), %rsi     # 0xf73df
callq 0x579f0
movq %r12, %rdi
movq %r13, %rsi
callq 0x562f0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x56d30
movl 0x8(%rax), %ebp
movq %r13, %rdi
callq 0x59200
movq %r12, %rdi
callq 0x59200
testl %ebp, %ebp
je 0x9b66c
movq %r12, %rdi
movq 0x10(%rsp), %rsi
callq 0x570b0
movq %r13, %rdi
leaq 0x5be4d(%rip), %rsi     # 0xf73df
callq 0x579f0
movq %r12, %rdi
movq %r13, %rsi
callq 0x562f0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x56d30
movq %rax, %r15
movq %r13, %rdi
callq 0x59200
movq %r12, %rdi
callq 0x59200
cmpl $0x0, 0x8(%r15)
jle 0x9b66c
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
incl %ebx
movq %r15, %rdi
movl %ebx, %esi
callq 0x9d384
movq %rax, %r14
movq %r12, %rdi
callq 0x57be0
movq %r13, %rdi
movq %r14, %rsi
callq 0x58fa0
movq %r12, %rdi
movq %r13, %rsi
callq 0x55520
movl %eax, %ebp
movq %r13, %rdi
callq 0x59200
testl %ebp, %ebp
jne 0x9b656
movl $0x158, %edi            # imm = 0x158
callq 0x556b0
movq %rax, %rbp
movq %rax, %rdi
callq 0x572b0
movq %r14, %rdi
callq 0x580b0
movq %rbp, %rdi
addq $0x108, %rdi            # imm = 0x108
movq %rax, %rsi
callq 0x555f0
movq %r12, %rsi
movq %rbp, %rdx
callq 0x57ca0
testl %eax, %eax
jne 0x9b656
movq 0x18(%rsp), %rdi
movq %rbp, %rsi
callq 0x55b30
movq %r12, %rdi
callq 0x55400
movl 0x8(%r15), %eax
decl %eax
cmpl %eax, %ebx
jl 0x9b5d0
movl 0x40(%rsp), %eax
decl %eax
movl 0xc(%rsp), %esi
cmpl %eax, %esi
jl 0x9b50b
leaq 0x38(%rsp), %rdi
callq 0x5cd46
xorl %eax, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x59200
jmp 0x9b72f
movq %rax, %rbx
movl $0x158, %esi            # imm = 0x158
movq %r14, %rdi
callq 0x55480
jmp 0x9b72f
jmp 0x9b6c4
jmp 0x9b6ff
movq %rax, %rbx
jmp 0x9b6da
jmp 0x9b6ff
jmp 0x9b6cd
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x59200
leaq 0x90(%rsp), %rdi
callq 0x59200
jmp 0x9b725
jmp 0x9b6ff
movq %rax, %rbx
movl $0x158, %esi            # imm = 0x158
movq %rbp, %rdi
callq 0x55480
jmp 0x9b718
jmp 0x9b6ff
movq %rax, %rbx
jmp 0x9b725
jmp 0x9b715
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x59200
jmp 0x9b718
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x55400
leaq 0x38(%rsp), %rdi
callq 0x5cd46
movq %rbx, %rdi
callq 0x57090
nop