// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/i18n/translator_internal.cpp
// Function: smooth::I18n::TranslatorInternal::ActivateLanguage(smooth::String const&)
S::Int S::I18n::TranslatorInternal::ActivateLanguage(const String &magic)
{
	foreach (Language *language, languages)
	{
		if (language->magic != magic) continue;

		activeLanguage = language;

		/* Load actual language data.
		 */
		if (magic != "internal" && activeLanguage->strings.Length() == 0 && activeLanguage->sections.Length() == 0)
		{
			for (Int i = 0; languageMagics[i] != NIL; i++)
			{
				if (magic != languageMagics[i]) continue;

				XML::Document	 doc;

				if (doc.ParseMemory((void *) languageXMLs[i], strlen(languageXMLs[i])) == Success()) LoadData(doc, activeLanguage);
			}
		}

		return Success();
	}

	return Error();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xa0(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0xffffffff, -0x20(%rbp) # imm = 0xFFFFFFFF
xorl %eax, %eax
cmpl $0x0, -0x1c(%rbp)
movb %al, -0xa1(%rbp)
jne 0xe3ac9
movq -0xa0(%rbp), %rdi
movl -0x20(%rbp), %eax
movl %eax, -0xa8(%rbp)
addq $0x20, %rdi
callq 0x5c990
movl %eax, %ecx
movl -0xa8(%rbp), %eax
subl $0x1, %ecx
cmpl %ecx, %eax
setl %al
movb %al, -0xa1(%rbp)
movb -0xa1(%rbp), %al
testb $0x1, %al
jne 0xe3ad8
jmp 0xe3d2b
movq -0xa0(%rbp), %rdi
addq $0x20, %rdi
movl -0x20(%rbp), %esi
addl $0x1, %esi
movl %esi, -0x20(%rbp)
callq 0xe3090
movq (%rax), %rax
movq %rax, -0x28(%rbp)
cmpl $0x0, -0x1c(%rbp)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xe3b0a
jmp 0xe3d1b
movq -0x28(%rbp), %rdi
addq $0x108, %rdi            # imm = 0x108
movq -0x18(%rbp), %rsi
callq 0x5b570
testb $0x1, %al
jne 0xe3b24
jmp 0xe3b29
jmp 0xe3d0d
movq -0xa0(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rcx, 0x78(%rax)
movq -0x18(%rbp), %rdi
leaq 0xa768d(%rip), %rsi     # 0x18b1d0
callq 0x5dd80
testb $0x1, %al
jne 0xe3b51
jmp 0xe3caf
movq -0xa0(%rbp), %rax
movq 0x78(%rax), %rdi
addq $0x40, %rdi
callq 0x5c990
cmpl $0x0, %eax
jne 0xe3caf
movq -0xa0(%rbp), %rax
movq 0x78(%rax), %rdi
addq $0x98, %rdi
callq 0x5c990
cmpl $0x0, %eax
jne 0xe3caf
movl $0x0, -0x2c(%rbp)
movslq -0x2c(%rbp), %rcx
leaq 0x127c30(%rip), %rax    # 0x20b7d0
cmpq $0x0, (%rax,%rcx,8)
je 0xe3cad
movq -0x18(%rbp), %rdi
movslq -0x2c(%rbp), %rcx
leaq 0x127c16(%rip), %rax    # 0x20b7d0
movq (%rax,%rcx,8), %rsi
callq 0x5dd80
testb $0x1, %al
jne 0xe3bc9
jmp 0xe3bce
jmp 0xe3c91
leaq -0x58(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
callq 0x5c470
movslq -0x2c(%rbp), %rcx
leaq 0x128b87(%rip), %rax    # 0x20c770
movq (%rax,%rcx,8), %rdi
movq %rdi, -0xb8(%rbp)
callq 0x5a790
movq -0xc0(%rbp), %rdi
movq -0xb8(%rbp), %rsi
movl %eax, %edx
callq 0x5d950
movl %eax, -0xac(%rbp)
jmp 0xe3c16
leaq -0x78(%rbp), %rdi
callq 0x5ca80
jmp 0xe3c21
leaq -0x78(%rbp), %rdi
callq 0x59680
movl %eax, -0xc4(%rbp)
jmp 0xe3c32
leaq -0x78(%rbp), %rdi
callq 0x5a410
movl -0xc4(%rbp), %ecx
movl -0xac(%rbp), %eax
cmpl %ecx, %eax
jne 0xe3c88
movq -0xa0(%rbp), %rdi
movq 0x78(%rdi), %rdx
leaq -0x58(%rbp), %rsi
callq 0x5a060
jmp 0xe3c61
jmp 0xe3c88
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xe3c9f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x5a410
jmp 0xe3c9f
leaq -0x58(%rbp), %rdi
callq 0x59520
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xe3b95
leaq -0x58(%rbp), %rdi
callq 0x59520
jmp 0xe3d94
jmp 0xe3caf
leaq -0x88(%rbp), %rdi
movq %rdi, -0xd0(%rbp)
callq 0x5ca80
movq -0xd0(%rbp), %rdi
callq 0x59680
movl %eax, -0xc8(%rbp)
jmp 0xe3cd6
movl -0xc8(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x5a410
jmp 0xe3d88
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x5a410
jmp 0xe3d94
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xe3af8
jmp 0xe3d1d
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xe3a8c
leaq -0x98(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5a9c0
movq -0xe0(%rbp), %rdi
callq 0x59680
movl %eax, -0xd4(%rbp)
jmp 0xe3d57
movl -0xd4(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x5b5b0
jmp 0xe3d88
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x5b5b0
jmp 0xe3d94
movl -0x4(%rbp), %eax
addq $0xe0, %rsp
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x5b6b0
nopl (%rax)