// File: /workspace/github_c_makefile_star2_O1/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 $0xf0, %rsp
movq %rdi, %rbx
leaq 0x18(%rsp), %rdi
callq 0x56ec0
leaq 0x8(%rbx), %r14
movq %rsp, %rdi
movq %r14, %rsi
callq 0x570b0
leaq 0x78c9f(%rip), %rsi     # 0x1152c7
leaq 0x90(%rsp), %rdi
callq 0x579f0
movq %rsp, %rdi
leaq 0x90(%rsp), %rsi
callq 0x562f0
leaq 0x18(%rsp), %rsi
movq %rax, %rdi
callq 0x562f0
movq %rax, %r15
leaq 0x5bbe1(%rip), %rsi     # 0xf823d
leaq 0x30(%rsp), %rdi
callq 0x579f0
leaq 0x30(%rsp), %rsi
movq %r15, %rdi
callq 0x562f0
movq (%rbx), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq *0x10(%rcx)
movl %eax, %ebp
leaq 0x30(%rsp), %rdi
callq 0x59200
leaq 0x90(%rsp), %rdi
callq 0x59200
movq %rsp, %rdi
callq 0x59200
testl %ebp, %ebp
je 0x9cca1
leaq 0x5bb39(%rip), %rsi     # 0xf81e8
movq %rsp, %rdi
callq 0x579f0
leaq 0x18(%rsp), %rdi
movq %rsp, %rsi
callq 0x55180
movl %eax, %ebp
movq %rsp, %rdi
callq 0x59200
testb %bpl, %bpl
je 0x9c7b1
movq %rsp, %rdi
movq %r14, %rsi
callq 0x570b0
leaq 0x78bde(%rip), %rsi     # 0x1152c7
leaq 0x90(%rsp), %rdi
callq 0x579f0
movq %rsp, %rdi
leaq 0x90(%rsp), %rsi
callq 0x562f0
movq %rax, %r15
leaq 0x5bad8(%rip), %rsi     # 0xf81e8
leaq 0x60(%rsp), %rdi
callq 0x579f0
leaq 0x18(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x57610
leaq 0x30(%rsp), %rdi
leaq 0x18(%rsp), %rsi
movl %eax, %edx
callq 0x58b00
leaq 0x30(%rsp), %rsi
movq %r15, %rdi
callq 0x562f0
movq %rax, %r15
leaq 0x5baec(%rip), %rsi     # 0xf823d
leaq 0x48(%rsp), %rdi
callq 0x579f0
leaq 0x48(%rsp), %rsi
movq %r15, %rdi
callq 0x562f0
movq (%rbx), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq *0x10(%rcx)
movl %eax, %ebp
leaq 0x48(%rsp), %rdi
callq 0x59200
leaq 0x30(%rsp), %rdi
callq 0x59200
leaq 0x60(%rsp), %rdi
callq 0x59200
leaq 0x90(%rsp), %rdi
callq 0x59200
movq %rsp, %rdi
callq 0x59200
testl %ebp, %ebp
je 0x9cca1
leaq 0x78b0f(%rip), %rsi     # 0x1152c7
movq %rsp, %rdi
callq 0x579f0
leaq 0x18(%rsp), %rdi
movq %rsp, %rsi
callq 0x55180
movl %eax, %ebp
testb %al, %al
je 0x9c7fe
leaq 0x5ba0e(%rip), %rsi     # 0xf81e8
leaq 0x90(%rsp), %rdi
callq 0x579f0
leaq 0x18(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x55180
movl %eax, %r15d
jmp 0x9c801
xorl %r15d, %r15d
testb %bpl, %bpl
je 0x9c813
leaq 0x90(%rsp), %rdi
callq 0x59200
movq %rsp, %rdi
callq 0x59200
testb %r15b, %r15b
je 0x9c9c0
movq %rsp, %rdi
movq %r14, %rsi
callq 0x570b0
leaq 0x78a91(%rip), %rsi     # 0x1152c7
leaq 0x30(%rsp), %rdi
callq 0x579f0
movq %rsp, %rdi
leaq 0x30(%rsp), %rsi
callq 0x562f0
movq %rax, %r15
leaq 0x78a70(%rip), %rsi     # 0x1152c7
leaq 0x48(%rsp), %rdi
callq 0x579f0
leaq 0x18(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x57610
leaq 0x60(%rsp), %rdi
leaq 0x18(%rsp), %rsi
movl %eax, %edx
callq 0x58b00
leaq 0x60(%rsp), %rsi
movq %r15, %rdi
callq 0x562f0
movq %rax, %r15
leaq 0x5b950(%rip), %rsi     # 0xf81e8
leaq 0xc0(%rsp), %rdi
callq 0x579f0
leaq 0x18(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x55180
movl %eax, %ebp
testb %al, %al
je 0x9c907
leaq 0x18(%rsp), %rdi
callq 0x57180
movl %eax, %r12d
leaq 0x5b917(%rip), %rsi     # 0xf81e8
leaq 0xd8(%rsp), %rdi
callq 0x579f0
leaq 0x18(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
callq 0x57610
subl %eax, %r12d
leaq 0x78(%rsp), %rdi
leaq 0x18(%rsp), %rsi
movl %r12d, %edx
callq 0x57f90
jmp 0x9c918
leaq 0x75f76(%rip), %rsi     # 0x112884
leaq 0x78(%rsp), %rdi
callq 0x579f0
leaq 0x78(%rsp), %rsi
movq %r15, %rdi
callq 0x562f0
movq %rax, %r15
leaq 0x5b90e(%rip), %rsi     # 0xf823d
leaq 0xa8(%rsp), %rdi
callq 0x579f0
leaq 0xa8(%rsp), %rsi
movq %r15, %rdi
callq 0x562f0
movq (%rbx), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq *0x10(%rcx)
movl %eax, %r15d
leaq 0xa8(%rsp), %rdi
callq 0x59200
leaq 0x78(%rsp), %rdi
callq 0x59200
testb %bpl, %bpl
je 0x9c984
leaq 0xd8(%rsp), %rdi
callq 0x59200
leaq 0xc0(%rsp), %rdi
callq 0x59200
leaq 0x60(%rsp), %rdi
callq 0x59200
leaq 0x48(%rsp), %rdi
callq 0x59200
leaq 0x30(%rsp), %rdi
callq 0x59200
movq %rsp, %rdi
callq 0x59200
testl %r15d, %r15d
je 0x9cca1
leaq 0x78900(%rip), %rsi     # 0x1152c7
movq %rsp, %rdi
callq 0x579f0
leaq 0x18(%rsp), %rdi
movq %rsp, %rsi
callq 0x55180
movl %eax, %ebp
movq %rsp, %rdi
callq 0x59200
testb %bpl, %bpl
je 0x9cac0
movq %rsp, %rdi
movq %r14, %rsi
callq 0x570b0
leaq 0x788c6(%rip), %rsi     # 0x1152c7
leaq 0x30(%rsp), %rdi
callq 0x579f0
movq %rsp, %rdi
leaq 0x30(%rsp), %rsi
callq 0x562f0
movq %rax, %r15
leaq 0x788a5(%rip), %rsi     # 0x1152c7
leaq 0x48(%rsp), %rdi
callq 0x579f0
leaq 0x18(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x57610
leaq 0x60(%rsp), %rdi
leaq 0x18(%rsp), %rsi
movl %eax, %edx
callq 0x58b00
leaq 0x60(%rsp), %rsi
movq %r15, %rdi
callq 0x562f0
movq %rax, %r15
leaq 0x5b7da(%rip), %rsi     # 0xf823d
leaq 0x78(%rsp), %rdi
callq 0x579f0
leaq 0x78(%rsp), %rsi
movq %r15, %rdi
callq 0x562f0
movq (%rbx), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq *0x10(%rcx)
movl %eax, %ebp
leaq 0x78(%rsp), %rdi
callq 0x59200
leaq 0x60(%rsp), %rdi
callq 0x59200
leaq 0x48(%rsp), %rdi
callq 0x59200
leaq 0x30(%rsp), %rdi
callq 0x59200
movq %rsp, %rdi
callq 0x59200
testl %ebp, %ebp
je 0x9cca1
leaq 0x5b740(%rip), %rsi     # 0xf8207
movq %rsp, %rdi
callq 0x579f0
leaq 0x18(%rsp), %rdi
movq %rsp, %rsi
callq 0x577d0
movl %eax, %ebp
testb %al, %al
je 0x9cb23
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
callq 0x570b0
leaq 0x5b715(%rip), %rsi     # 0xf820b
leaq 0x60(%rsp), %rdi
callq 0x579f0
leaq 0x30(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x562f0
movq (%rbx), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq *0x10(%rcx)
testl %eax, %eax
sete %r15b
jmp 0x9cb26
xorl %r15d, %r15d
testb %bpl, %bpl
je 0x9cb3f
leaq 0x60(%rsp), %rdi
callq 0x59200
leaq 0x30(%rsp), %rdi
callq 0x59200
movq %rsp, %rdi
callq 0x59200
testb %r15b, %r15b
jne 0x9cca1
leaq 0x5b6bc(%rip), %rsi     # 0xf8213
movq %rsp, %rdi
callq 0x579f0
leaq 0x18(%rsp), %rdi
movq %rsp, %rsi
callq 0x577d0
movl %eax, %ebp
testb %al, %al
je 0x9cbb3
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
callq 0x570b0
leaq 0x759e9(%rip), %rsi     # 0x11256f
leaq 0x78(%rsp), %rdi
callq 0x579f0
leaq 0x48(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x562f0
movq (%rbx), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq *0x10(%rcx)
testl %eax, %eax
sete %r15b
jmp 0x9cbb6
xorl %r15d, %r15d
testb %bpl, %bpl
je 0x9cbcf
leaq 0x78(%rsp), %rdi
callq 0x59200
leaq 0x48(%rsp), %rdi
callq 0x59200
movq %rsp, %rdi
callq 0x59200
testb %r15b, %r15b
jne 0x9cca1
leaq 0x5b630(%rip), %rsi     # 0xf8217
movq %rsp, %rdi
callq 0x579f0
leaq 0x18(%rsp), %rdi
movq %rsp, %rsi
callq 0x577d0
movl %eax, %ebp
testb %al, %al
je 0x9cc4f
leaq 0xc0(%rsp), %rdi
movq %r14, %rsi
callq 0x570b0
leaq 0x75b2f(%rip), %rsi     # 0x112748
leaq 0xa8(%rsp), %rdi
callq 0x579f0
leaq 0xc0(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x562f0
movq (%rbx), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq *0x10(%rcx)
testl %eax, %eax
sete %r14b
jmp 0x9cc52
xorl %r14d, %r14d
testb %bpl, %bpl
je 0x9cc71
leaq 0xa8(%rsp), %rdi
callq 0x59200
leaq 0xc0(%rsp), %rdi
callq 0x59200
movq %rsp, %rdi
callq 0x59200
testb %r14b, %r14b
jne 0x9cca1
leaq 0x5b549(%rip), %rsi     # 0xf81ce
movq %rsp, %rdi
callq 0x579f0
movq (%rbx), %rax
movq %rsp, %rsi
movq %rbx, %rdi
callq *0x10(%rax)
movq %rsp, %rdi
callq 0x59200
leaq 0x18(%rsp), %rdi
callq 0x59200
xorl %eax, %eax
addq $0xf0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9ce54
jmp 0x9ce59
movq %rax, %rbx
jmp 0x9cce1
jmp 0x9ce54
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x59200
leaq 0xc0(%rsp), %rdi
jmp 0x9ce78
jmp 0x9ce54
jmp 0x9ce59
movq %rax, %rbx
jmp 0x9cd1a
jmp 0x9ce54
movq %rax, %rbx
movb $0x1, %bpl
jmp 0x9cdf7
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x59200
leaq 0x48(%rsp), %rdi
jmp 0x9ce78
jmp 0x9ce54
jmp 0x9ce59
jmp 0x9cd5d
jmp 0x9ce54
jmp 0x9cd53
jmp 0x9cd53
jmp 0x9cd5d
jmp 0x9cd5d
jmp 0x9ce54
jmp 0x9ce59
jmp 0x9cd49
movq %rax, %rbx
jmp 0x9cddb
jmp 0x9cd53
movq %rax, %rbx
jmp 0x9ce07
jmp 0x9cd5d
movq %rax, %rbx
jmp 0x9ce20
jmp 0x9ce54
jmp 0x9ce59
jmp 0x9ce6d
jmp 0x9ce54
jmp 0x9cd7b
movq %rax, %rbx
jmp 0x9ce38
jmp 0x9ce6d
jmp 0x9ce6d
jmp 0x9ce54
jmp 0x9ce59
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
jmp 0x9ce1b
jmp 0x9ce54
jmp 0x9ce59
movq %rax, %rbx
jmp 0x9cde5
movq %rax, %rbx
jmp 0x9cdfa
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
jmp 0x9ce02
jmp 0x9ce13
jmp 0x9ce54
jmp 0x9ce59
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x59200
leaq 0x78(%rsp), %rdi
callq 0x59200
testb %bpl, %bpl
je 0x9cdf7
leaq 0xd8(%rsp), %rdi
callq 0x59200
testb %bpl, %bpl
leaq 0xc0(%rsp), %rdi
callq 0x59200
leaq 0x60(%rsp), %rdi
callq 0x59200
jmp 0x9ce16
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x59200
leaq 0x30(%rsp), %rdi
jmp 0x9ce78
jmp 0x9ce54
jmp 0x9ce59
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x59200
leaq 0x30(%rsp), %rdi
callq 0x59200
jmp 0x9ce47
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
jmp 0x9ce66
jmp 0x9ce54
jmp 0x9ce59
jmp 0x9ce6d
movq %rax, %rbx
jmp 0x9ce7d
movq %rax, %rbx
jmp 0x9ce85
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x59200
jmp 0x9ce70
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x59200
movq %rsp, %rdi
callq 0x59200
leaq 0x18(%rsp), %rdi
callq 0x59200
movq %rbx, %rdi
callq 0x57090