// File: /workspace/github_c_makefile_star2_O1/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 $0xe8, %rsp
movq %rdi, 0x18(%rsp)
movl $0x158, %edi            # imm = 0x158
callq 0x556b0
movq %rax, %r14
movq %rax, %rdi
callq 0x572b0
leaq 0x5c5a3(%rip), %rsi     # 0xf821d
leaq 0x68(%rsp), %rbx
movq %rbx, %rdi
callq 0x579f0
leaq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0x555f0
leaq 0x68(%rsp), %rbx
movq %rbx, %rdi
callq 0x59200
leaq 0xf0(%r14), %rdi
leaq 0x77478(%rip), %rsi     # 0x113126
callq 0x55f40
leaq 0x108(%r14), %rdi
leaq 0x5c50d(%rip), %rsi     # 0xf81ce
callq 0x55f40
leaq 0x120(%r14), %rdi
leaq 0x5c55a(%rip), %rsi     # 0xf822e
callq 0x55f40
movq %r14, %rdi
addq $0x138, %rdi            # imm = 0x138
leaq 0x5c54c(%rip), %rsi     # 0xf8236
callq 0x55f40
movb $0x0, 0x150(%r14)
movq 0x18(%rsp), %r15
leaq 0x20(%r15), %rdi
movq %r14, (%rbx)
leaq 0x68(%rsp), %rsi
callq 0x5af08
leaq 0x8(%r15), %rsi
leaq 0x68(%rsp), %rbx
movq %rbx, %rdi
movq %rsi, 0x10(%rsp)
callq 0x9ce97
cmpl $0x0, 0x8(%rbx)
jle 0x9bed3
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
leaq 0x50(%rsp), %r15
leaq 0xc0(%rsp), %r13
leaq 0x38(%rsp), %r12
incl %ebp
leaq 0x68(%rsp), %rdi
movl %ebp, %esi
callq 0x9dcd2
movq %rax, %r14
movq %rax, %rdi
callq 0x55440
movl %eax, %ebx
movl %ebp, 0xc(%rsp)
movb $0x1, %bpl
testb %al, %al
je 0x9bda8
leaq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x570b0
movq %r15, %rdi
leaq 0x5c4b8(%rip), %rsi     # 0xf823b
callq 0x579f0
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x562f0
movq %r14, %rdi
movq %rax, %rsi
callq 0x56d30
cmpl $0x0, 0x8(%rax)
sete %bpl
testb %bl, %bl
je 0x9bdbe
movq %r15, %rdi
callq 0x59200
leaq 0x20(%rsp), %rdi
callq 0x59200
testb %bpl, %bpl
jne 0x9bebc
movq %r13, %rdi
movq 0x10(%rsp), %rsi
callq 0x570b0
movq %r12, %rdi
leaq 0x5c45d(%rip), %rsi     # 0xf823b
callq 0x579f0
movq %r13, %rdi
movq %r12, %rsi
callq 0x562f0
movq %r14, %rdi
movq %rax, %rsi
callq 0x56d30
movq %rax, %r15
movq %r12, %rdi
callq 0x59200
movq %r13, %rdi
callq 0x59200
cmpl $0x0, 0x8(%r15)
jle 0x9bebc
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
incl %r14d
movq %r15, %rdi
movl %r14d, %esi
callq 0x9dd2e
movq %rax, %rbx
movq %r13, %rdi
callq 0x57be0
movq %r12, %rdi
movq %rbx, %rsi
callq 0x58fa0
movq %r13, %rdi
movq %r12, %rsi
callq 0x55520
movl %eax, %ebp
movq %r12, %rdi
callq 0x59200
testl %ebp, %ebp
jne 0x9bea5
movl $0x158, %edi            # imm = 0x158
callq 0x556b0
movq %rax, %rbp
movq %rax, %rdi
callq 0x572b0
movq %rbx, %rdi
callq 0x580b0
movq %rbp, %rdi
addq $0x108, %rdi            # imm = 0x108
movq %rax, %rsi
callq 0x555f0
movq %r13, %rsi
movq %rbp, %rdx
callq 0x57ca0
testl %eax, %eax
jne 0x9bea5
movq 0x18(%rsp), %rdi
movq %rbp, %rsi
callq 0x55b30
movq %r13, %rdi
callq 0x55400
movl 0x8(%r15), %eax
decl %eax
cmpl %eax, %r14d
jl 0x9be1d
movl 0x70(%rsp), %eax
decl %eax
movl 0xc(%rsp), %ebp
cmpl %eax, %ebp
leaq 0x50(%rsp), %r15
jl 0x9bd44
leaq 0x68(%rsp), %rdi
callq 0x5cd7e
xorl %eax, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x59200
jmp 0x9bf9e
movq %rax, %rbx
movl $0x158, %esi            # imm = 0x158
movq %r14, %rdi
callq 0x55480
jmp 0x9bf9e
jmp 0x9bf7f
jmp 0x9bf7f
movq %rax, %rbx
jmp 0x9bf37
movq %rax, %rbx
jmp 0x9bf4b
jmp 0x9bf7f
jmp 0x9bf7f
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x59200
leaq 0x20(%rsp), %rdi
jmp 0x9bf53
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x59200
leaq 0xc0(%rsp), %rdi
callq 0x59200
jmp 0x9bf94
movq %rax, %rbx
movl $0x158, %esi            # imm = 0x158
movq %rbp, %rdi
callq 0x55480
jmp 0x9bf87
jmp 0x9bf84
jmp 0x9bf7f
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x59200
jmp 0x9bf87
movq %rax, %rbx
jmp 0x9bf94
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
callq 0x55400
leaq 0x68(%rsp), %rdi
callq 0x5cd7e
movq %rbx, %rdi
callq 0x57090