// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/i18n/translator.cpp
// Function: smooth::I18n::Translator::SelectUserDefaultLanguage()
S::Int S::I18n::Translator::SelectUserDefaultLanguage()
{
	String	 code = GetUserDefaultLanguageCode();

	/* Try the language code, possibly with appended country and script code.
	 */
	if (ActivateLanguage(String(appPrefix).Append("_").Append(code).Append(".xml")) == Success()) return Success();

	/* If failed, try without the script code if applicable.
	 */
	if (code.Contains("@"))
	{
		if (ActivateLanguage(String(appPrefix).Append("_").Append(code.Head(code.Find("@"))).Append(".xml")) == Success()) return Success();
	}

	/* If failed, try without the country code if applicable.
	 */
	if (code.Contains("_") && code.Contains("@"))
	{
		if (ActivateLanguage(String(appPrefix).Append("_").Append(code.Head(code.Find("_"))).Append(code.Contains("@") ? code.Tail(code.Length() - code.Find("@")) : "").Append(".xml")) == Success()) return Success();
	}

	/* If failed, try the base language code if applicable.
	 */
	if (code.Contains("_"))
	{
		if (ActivateLanguage(String(appPrefix).Append("_").Append(code.Head(code.Find("_"))).Append(".xml")) == Success()) return Success();
	}

	/* Fall back to alternative language.
	 */
	if	(code.StartsWith("fil")	  && ActivateLanguage(String(appPrefix).Append("_tl.xml"))    == Success()) return Success(); // Fall back to Tagalog for Filipino
	else if	(code.StartsWith("prs")	  && ActivateLanguage(String(appPrefix).Append("_fa.xml"))    == Success()) return Success(); // Fall back to Persian for Dari
	else if (code.StartsWith("zh_MO") && ActivateLanguage(String(appPrefix).Append("_zh_HK.xml")) == Success()) return Success(); // Fall back to Cantonese (Hong Kong) for Cantonese (Macau)

	/* Fall back to internal language.
	 */
	ActivateLanguage("internal");

	return Success();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xe0, %rsp
movq %rdi, %rbx
leaq 0x50(%rsp), %rdi
callq 0x58070
leaq 0x8(%rbx), %r14
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x58280
leaq 0x6c6dd(%rip), %rsi     # 0x104367
leaq 0x20(%rsp), %rdi
callq 0x58c40
leaq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x573e0
leaq 0x50(%rsp), %rsi
movq %rax, %rdi
callq 0x573e0
movq %rax, %r15
leaq 0x4f627(%rip), %rsi     # 0xe72e1
leaq 0x38(%rsp), %rdi
callq 0x58c40
leaq 0x38(%rsp), %rsi
movq %r15, %rdi
callq 0x573e0
movq (%rbx), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq *0x10(%rcx)
movl %eax, %ebp
leaq 0x38(%rsp), %rdi
callq 0x5a588
leaq 0x20(%rsp), %rdi
callq 0x5a588
leaq 0x8(%rsp), %rdi
callq 0x5a588
testl %ebp, %ebp
je 0x98326
leaq 0x4f580(%rip), %rsi     # 0xe728c
leaq 0x8(%rsp), %rdi
callq 0x58c40
leaq 0x50(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x56180
movl %eax, %ebp
leaq 0x8(%rsp), %rdi
callq 0x5a588
testb %bpl, %bpl
je 0x97e1a
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x58280
leaq 0x6c619(%rip), %rsi     # 0x104367
leaq 0x20(%rsp), %rdi
callq 0x58c40
leaq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x573e0
movq %rax, %r15
leaq 0x4f51b(%rip), %rsi     # 0xe728c
leaq 0x80(%rsp), %rdi
callq 0x58c40
leaq 0x50(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x58830
leaq 0x38(%rsp), %rdi
leaq 0x50(%rsp), %rsi
movl %eax, %edx
callq 0x59e40
leaq 0x38(%rsp), %rsi
movq %r15, %rdi
callq 0x573e0
movq %rax, %r15
leaq 0x4f529(%rip), %rsi     # 0xe72e1
leaq 0x68(%rsp), %rdi
callq 0x58c40
leaq 0x68(%rsp), %rsi
movq %r15, %rdi
callq 0x573e0
movq (%rbx), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq *0x10(%rcx)
movl %eax, %ebp
leaq 0x68(%rsp), %rdi
callq 0x5a588
leaq 0x38(%rsp), %rdi
callq 0x5a588
leaq 0x80(%rsp), %rdi
callq 0x5a588
leaq 0x20(%rsp), %rdi
callq 0x5a588
leaq 0x8(%rsp), %rdi
callq 0x5a588
testl %ebp, %ebp
je 0x98326
leaq 0x6c546(%rip), %rsi     # 0x104367
leaq 0x8(%rsp), %rdi
callq 0x58c40
leaq 0x50(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x56180
testb %al, %al
je 0x97f6e
leaq 0x4f443(%rip), %rsi     # 0xe728c
leaq 0x20(%rsp), %rdi
callq 0x58c40
leaq 0x50(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x56180
movl %eax, %ebp
leaq 0x20(%rsp), %rdi
callq 0x5a588
leaq 0x8(%rsp), %rdi
callq 0x5a588
testb %bpl, %bpl
je 0x9803b
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x58280
leaq 0x6c4d2(%rip), %rsi     # 0x104367
leaq 0x20(%rsp), %rdi
callq 0x58c40
leaq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x573e0
movq %rax, %r15
leaq 0x6c4af(%rip), %rsi     # 0x104367
leaq 0x80(%rsp), %rdi
callq 0x58c40
leaq 0x50(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x58830
leaq 0x38(%rsp), %rdi
leaq 0x50(%rsp), %rsi
movl %eax, %edx
callq 0x59e40
leaq 0x38(%rsp), %rsi
movq %r15, %rdi
callq 0x573e0
movq %rax, %r15
leaq 0x4f38d(%rip), %rsi     # 0xe728c
leaq 0xc8(%rsp), %rdi
callq 0x58c40
leaq 0x50(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x56180
movl %eax, %ebp
testb %al, %al
je 0x97f7d
leaq 0x50(%rsp), %rdi
callq 0x58370
movl %eax, %r12d
leaq 0x4f354(%rip), %rsi     # 0xe728c
leaq 0xb0(%rsp), %rdi
callq 0x58c40
leaq 0x50(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x58830
subl %eax, %r12d
leaq 0x68(%rsp), %rdi
leaq 0x50(%rsp), %rsi
movl %r12d, %edx
callq 0x59220
jmp 0x97f8e
leaq 0x8(%rsp), %rdi
callq 0x5a588
jmp 0x9803b
leaq 0x699a4(%rip), %rsi     # 0x101928
leaq 0x68(%rsp), %rdi
callq 0x58c40
leaq 0x68(%rsp), %rsi
movq %r15, %rdi
callq 0x573e0
movq %rax, %r15
leaq 0x4f33c(%rip), %rsi     # 0xe72e1
leaq 0x98(%rsp), %rdi
callq 0x58c40
leaq 0x98(%rsp), %rsi
movq %r15, %rdi
callq 0x573e0
movq (%rbx), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq *0x10(%rcx)
movl %eax, %r15d
leaq 0x98(%rsp), %rdi
callq 0x5a588
leaq 0x68(%rsp), %rdi
callq 0x5a588
testb %bpl, %bpl
je 0x97ffa
leaq 0xb0(%rsp), %rdi
callq 0x5a588
leaq 0xc8(%rsp), %rdi
callq 0x5a588
leaq 0x38(%rsp), %rdi
callq 0x5a588
leaq 0x80(%rsp), %rdi
callq 0x5a588
leaq 0x20(%rsp), %rdi
callq 0x5a588
leaq 0x8(%rsp), %rdi
callq 0x5a588
testl %r15d, %r15d
je 0x98326
leaq 0x6c325(%rip), %rsi     # 0x104367
leaq 0x8(%rsp), %rdi
callq 0x58c40
leaq 0x50(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x56180
movl %eax, %ebp
leaq 0x8(%rsp), %rdi
callq 0x5a588
testb %bpl, %bpl
je 0x98150
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x58280
leaq 0x6c2e3(%rip), %rsi     # 0x104367
leaq 0x20(%rsp), %rdi
callq 0x58c40
leaq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x573e0
movq %rax, %r15
leaq 0x6c2c0(%rip), %rsi     # 0x104367
leaq 0x80(%rsp), %rdi
callq 0x58c40
leaq 0x50(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x58830
leaq 0x38(%rsp), %rdi
leaq 0x50(%rsp), %rsi
movl %eax, %edx
callq 0x59e40
leaq 0x38(%rsp), %rsi
movq %r15, %rdi
callq 0x573e0
movq %rax, %r15
leaq 0x4f1f3(%rip), %rsi     # 0xe72e1
leaq 0x68(%rsp), %rdi
callq 0x58c40
leaq 0x68(%rsp), %rsi
movq %r15, %rdi
callq 0x573e0
movq (%rbx), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq *0x10(%rcx)
movl %eax, %ebp
leaq 0x68(%rsp), %rdi
callq 0x5a588
leaq 0x38(%rsp), %rdi
callq 0x5a588
leaq 0x80(%rsp), %rdi
callq 0x5a588
leaq 0x20(%rsp), %rdi
callq 0x5a588
leaq 0x8(%rsp), %rdi
callq 0x5a588
testl %ebp, %ebp
je 0x98326
leaq 0x4f154(%rip), %rsi     # 0xe72ab
leaq 0x8(%rsp), %rdi
callq 0x58c40
leaq 0x50(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x58a10
testb %al, %al
je 0x981d6
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq 0x58280
leaq 0x4f127(%rip), %rsi     # 0xe72af
leaq 0x38(%rsp), %rdi
callq 0x58c40
leaq 0x20(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x573e0
movq (%rbx), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq *0x10(%rcx)
movl %eax, %ebp
leaq 0x38(%rsp), %rdi
callq 0x5a588
leaq 0x20(%rsp), %rdi
callq 0x5a588
leaq 0x8(%rsp), %rdi
callq 0x5a588
testl %ebp, %ebp
jne 0x981e0
jmp 0x98326
leaq 0x8(%rsp), %rdi
callq 0x5a588
leaq 0x4f0d0(%rip), %rsi     # 0xe72b7
leaq 0x8(%rsp), %rdi
callq 0x58c40
leaq 0x50(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x58a10
testb %al, %al
je 0x98266
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq 0x58280
leaq 0x693fb(%rip), %rsi     # 0x101613
leaq 0x38(%rsp), %rdi
callq 0x58c40
leaq 0x20(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x573e0
movq (%rbx), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq *0x10(%rcx)
movl %eax, %ebp
leaq 0x38(%rsp), %rdi
callq 0x5a588
leaq 0x20(%rsp), %rdi
callq 0x5a588
leaq 0x8(%rsp), %rdi
callq 0x5a588
testl %ebp, %ebp
jne 0x98270
jmp 0x98326
leaq 0x8(%rsp), %rdi
callq 0x5a588
leaq 0x4f044(%rip), %rsi     # 0xe72bb
leaq 0x8(%rsp), %rdi
callq 0x58c40
leaq 0x50(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x58a10
testb %al, %al
je 0x982f3
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq 0x58280
leaq 0x69544(%rip), %rsi     # 0x1017ec
leaq 0x38(%rsp), %rdi
callq 0x58c40
leaq 0x20(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x573e0
movq (%rbx), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq *0x10(%rcx)
movl %eax, %ebp
leaq 0x38(%rsp), %rdi
callq 0x5a588
leaq 0x20(%rsp), %rdi
callq 0x5a588
leaq 0x8(%rsp), %rdi
callq 0x5a588
testl %ebp, %ebp
jne 0x982fd
jmp 0x98326
leaq 0x8(%rsp), %rdi
callq 0x5a588
leaq 0x4ef6e(%rip), %rsi     # 0xe7272
leaq 0x8(%rsp), %rdi
callq 0x58c40
movq (%rbx), %rax
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq *0x10(%rax)
leaq 0x8(%rsp), %rdi
callq 0x5a588
leaq 0x50(%rsp), %rdi
callq 0x5a588
xorl %eax, %eax
addq $0xe0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9838c
jmp 0x9846a
jmp 0x98451
jmp 0x98350
movq %rax, %rbx
jmp 0x983d2
jmp 0x98406
jmp 0x98406
jmp 0x9846a
jmp 0x9846a
jmp 0x98451
jmp 0x98456
jmp 0x9846a
jmp 0x98451
jmp 0x9846a
jmp 0x98451
movq %rax, %rbx
jmp 0x983dc
movq %rax, %rbx
jmp 0x983ee
jmp 0x98451
jmp 0x98456
jmp 0x98406
jmp 0x98406
jmp 0x9846a
jmp 0x9846a
jmp 0x98451
jmp 0x98456
jmp 0x9845b
jmp 0x98451
jmp 0x98456
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x5a588
leaq 0x68(%rsp), %rdi
callq 0x5a588
testb %bpl, %bpl
je 0x983ee
leaq 0xb0(%rsp), %rdi
callq 0x5a588
leaq 0xc8(%rsp), %rdi
jmp 0x9842d
jmp 0x9843e
jmp 0x9846a
jmp 0x98451
jmp 0x9845b
jmp 0x98451
jmp 0x98456
jmp 0x98406
movq %rax, %rbx
jmp 0x98432
jmp 0x9846a
jmp 0x9846a
jmp 0x98451
jmp 0x98456
jmp 0x9845b
jmp 0x98451
jmp 0x98456
jmp 0x98425
jmp 0x9843e
jmp 0x98451
jmp 0x98456
jmp 0x98451
jmp 0x98456
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x5a588
leaq 0x38(%rsp), %rdi
callq 0x5a588
jmp 0x98441
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
jmp 0x98463
jmp 0x98451
jmp 0x98456
jmp 0x9846a
movq %rax, %rbx
jmp 0x98477
movq %rax, %rbx
jmp 0x98481
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x5a588
jmp 0x9846d
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x5a588
leaq 0x8(%rsp), %rdi
callq 0x5a588
leaq 0x50(%rsp), %rdi
callq 0x5a588
movq %rbx, %rdi
callq 0x58260