// File: /workspace/github_c_makefile_star2_O2/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 0x56700
movq %rax, %r14
movq %rax, %rdi
callq 0x584a0
movq %r14, 0x38(%rsp)
leaq 0x4fecc(%rip), %rsi     # 0xe72c1
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
callq 0x58c40
addq $0x8, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x56630
leaq 0x60(%rsp), %rdi
callq 0x5a588
movl $0xf0, %edi
leaq 0x38(%rsp), %r15
addq (%r15), %rdi
leaq 0x6ad97(%rip), %rsi     # 0x1021c6
callq 0x57010
movl $0x108, %edi            # imm = 0x108
addq (%r15), %rdi
leaq 0x4fe2f(%rip), %rsi     # 0xe7272
callq 0x57010
movl $0x120, %edi            # imm = 0x120
addq (%r15), %rdi
leaq 0x4fe7b(%rip), %rsi     # 0xe72d2
callq 0x57010
movl $0x138, %edi            # imm = 0x138
addq (%r15), %rdi
leaq 0x4fe6f(%rip), %rsi     # 0xe72da
callq 0x57010
movq (%r15), %rax
movb $0x0, 0x150(%rax)
movq 0x18(%rsp), %rbx
leaq 0x20(%rbx), %rdi
movq %r15, %rsi
callq 0x992b6
leaq 0x8(%rbx), %rsi
leaq 0x60(%rsp), %rdi
movq %rsi, 0x10(%rsp)
callq 0x98493
pushq $-0x1
popq %rax
movl %eax, 0xc(%rsp)
leaq 0x20(%rsp), %r13
movl 0x68(%rsp), %eax
decl %eax
movl 0xc(%rsp), %esi
cmpl %eax, %esi
jge 0x97614
incl %esi
leaq 0x60(%rsp), %rdi
movl %esi, 0xc(%rsp)
callq 0x992f0
movq %rax, %r14
movq %rax, %rdi
callq 0x56480
testb %al, %al
je 0x974aa
movq %r15, %rdi
movq 0x10(%rsp), %rsi
callq 0x58280
movq %r13, %rdi
leaq 0x4fded(%rip), %rsi     # 0xe72df
callq 0x58c40
movq %r15, %rdi
movq %r13, %rsi
callq 0x573e0
movq %r14, %rdi
movq %rax, %rsi
callq 0x57ec0
movl 0x8(%rax), %ebx
movq %r13, %rdi
callq 0x5a588
movq %r15, %rdi
callq 0x5a588
testl %ebx, %ebx
je 0x974aa
movq %r15, %rdi
movq 0x10(%rsp), %rsi
callq 0x58280
movq %r13, %rdi
leaq 0x4fda4(%rip), %rsi     # 0xe72df
callq 0x58c40
movq %r15, %rdi
movq %r13, %rsi
callq 0x573e0
movq %r14, %rdi
movq %rax, %rsi
callq 0x57ec0
movq %rax, %r14
movq %r13, %rdi
callq 0x5a588
movq %r15, %rdi
callq 0x5a588
xorl %r12d, %r12d
leal -0x1(%r12), %eax
movl 0x8(%r14), %ecx
decl %ecx
cmpl %ecx, %eax
jge 0x974aa
movq %r14, %rdi
movl %r12d, %esi
callq 0x99342
movq %rax, %rbx
movq %r15, %rdi
callq 0x58e60
movq %r13, %rdi
movq %rbx, %rsi
callq 0x5a310
movq %r15, %rdi
movq %r13, %rsi
callq 0x56560
movl %eax, %ebp
movq %r13, %rdi
callq 0x5a588
testl %ebp, %ebp
jne 0x97604
movl $0x158, %edi            # imm = 0x158
callq 0x56700
movq %rax, %rbp
movq %rax, %rdi
callq 0x584a0
movq %rbx, %rdi
callq 0x59340
movq %rbp, %rdi
addq $0x108, %rdi            # imm = 0x108
movq %rax, %rsi
callq 0x56630
movq %r15, %rsi
movq %rbp, %rdx
callq 0x58f20
testl %eax, %eax
jne 0x97604
movq 0x18(%rsp), %rdi
movq %rbp, %rsi
callq 0x56bb0
movq %r15, %rdi
callq 0x56440
incl %r12d
jmp 0x9756c
leaq 0x60(%rsp), %rdi
callq 0x5dd4a
xorl %eax, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x5a588
jmp 0x976bc
movq %rax, %rbx
movl $0x158, %esi            # imm = 0x158
movq %r14, %rdi
callq 0x564c0
jmp 0x976bc
jmp 0x976a0
jmp 0x97657
movq %rax, %rbx
jmp 0x9766d
jmp 0x976a0
jmp 0x97660
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x5a588
leaq 0x38(%rsp), %rdi
callq 0x5a588
jmp 0x976b2
jmp 0x976a0
movq %rax, %rbx
movl $0x158, %esi            # imm = 0x158
movq %rbp, %rdi
callq 0x564c0
jmp 0x976a8
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x5a588
jmp 0x976a8
jmp 0x976a5
jmp 0x976a0
movq %rax, %rbx
jmp 0x976b2
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x56440
leaq 0x60(%rsp), %rdi
callq 0x5dd4a
movq %rbx, %rdi
callq 0x58260