// File: /workspace/github_c_makefile_star2_O3/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 0x56ec0
leaq 0x8(%rbx), %r14
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x570b0
leaq 0x787a1(%rip), %rsi     # 0x1144d7
leaq 0x20(%rsp), %rdi
callq 0x579f0
leaq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x562f0
leaq 0x50(%rsp), %rsi
movq %rax, %rdi
callq 0x562f0
movq %rax, %r15
leaq 0x5b67b(%rip), %rsi     # 0xf73e1
leaq 0x38(%rsp), %rdi
callq 0x579f0
leaq 0x38(%rsp), %rsi
movq %r15, %rdi
callq 0x562f0
movq (%rbx), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq *0x10(%rcx)
movl %eax, %ebp
leaq 0x38(%rsp), %rdi
callq 0x59200
leaq 0x20(%rsp), %rdi
callq 0x59200
leaq 0x8(%rsp), %rdi
callq 0x59200
testl %ebp, %ebp
je 0x9c3d2
leaq 0x5b5d4(%rip), %rsi     # 0xf738c
leaq 0x8(%rsp), %rdi
callq 0x579f0
leaq 0x50(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x55180
movl %eax, %ebp
leaq 0x8(%rsp), %rdi
callq 0x59200
testb %bpl, %bpl
je 0x9bec6
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x570b0
leaq 0x786dd(%rip), %rsi     # 0x1144d7
leaq 0x20(%rsp), %rdi
callq 0x579f0
leaq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x562f0
movq %rax, %r15
leaq 0x5b56f(%rip), %rsi     # 0xf738c
leaq 0x80(%rsp), %rdi
callq 0x579f0
leaq 0x50(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x57610
leaq 0x38(%rsp), %rdi
leaq 0x50(%rsp), %rsi
movl %eax, %edx
callq 0x58b00
leaq 0x38(%rsp), %rsi
movq %r15, %rdi
callq 0x562f0
movq %rax, %r15
leaq 0x5b57d(%rip), %rsi     # 0xf73e1
leaq 0x68(%rsp), %rdi
callq 0x579f0
leaq 0x68(%rsp), %rsi
movq %r15, %rdi
callq 0x562f0
movq (%rbx), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq *0x10(%rcx)
movl %eax, %ebp
leaq 0x68(%rsp), %rdi
callq 0x59200
leaq 0x38(%rsp), %rdi
callq 0x59200
leaq 0x80(%rsp), %rdi
callq 0x59200
leaq 0x20(%rsp), %rdi
callq 0x59200
leaq 0x8(%rsp), %rdi
callq 0x59200
testl %ebp, %ebp
je 0x9c3d2
leaq 0x7860a(%rip), %rsi     # 0x1144d7
leaq 0x8(%rsp), %rdi
callq 0x579f0
leaq 0x50(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x55180
testb %al, %al
je 0x9c01a
leaq 0x5b497(%rip), %rsi     # 0xf738c
leaq 0x20(%rsp), %rdi
callq 0x579f0
leaq 0x50(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x55180
movl %eax, %ebp
leaq 0x20(%rsp), %rdi
callq 0x59200
leaq 0x8(%rsp), %rdi
callq 0x59200
testb %bpl, %bpl
je 0x9c0e7
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x570b0
leaq 0x78596(%rip), %rsi     # 0x1144d7
leaq 0x20(%rsp), %rdi
callq 0x579f0
leaq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x562f0
movq %rax, %r15
leaq 0x78573(%rip), %rsi     # 0x1144d7
leaq 0x80(%rsp), %rdi
callq 0x579f0
leaq 0x50(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x57610
leaq 0x38(%rsp), %rdi
leaq 0x50(%rsp), %rsi
movl %eax, %edx
callq 0x58b00
leaq 0x38(%rsp), %rsi
movq %r15, %rdi
callq 0x562f0
movq %rax, %r15
leaq 0x5b3e1(%rip), %rsi     # 0xf738c
leaq 0xc8(%rsp), %rdi
callq 0x579f0
leaq 0x50(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x55180
movl %eax, %ebp
testb %al, %al
je 0x9c029
leaq 0x50(%rsp), %rdi
callq 0x57180
movl %eax, %r12d
leaq 0x5b3a8(%rip), %rsi     # 0xf738c
leaq 0xb0(%rsp), %rdi
callq 0x579f0
leaq 0x50(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x57610
subl %eax, %r12d
leaq 0x68(%rsp), %rdi
leaq 0x50(%rsp), %rsi
movl %r12d, %edx
callq 0x57f90
jmp 0x9c03a
leaq 0x8(%rsp), %rdi
callq 0x59200
jmp 0x9c0e7
leaq 0x759f8(%rip), %rsi     # 0x111a28
leaq 0x68(%rsp), %rdi
callq 0x579f0
leaq 0x68(%rsp), %rsi
movq %r15, %rdi
callq 0x562f0
movq %rax, %r15
leaq 0x5b390(%rip), %rsi     # 0xf73e1
leaq 0x98(%rsp), %rdi
callq 0x579f0
leaq 0x98(%rsp), %rsi
movq %r15, %rdi
callq 0x562f0
movq (%rbx), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq *0x10(%rcx)
movl %eax, %r15d
leaq 0x98(%rsp), %rdi
callq 0x59200
leaq 0x68(%rsp), %rdi
callq 0x59200
testb %bpl, %bpl
je 0x9c0a6
leaq 0xb0(%rsp), %rdi
callq 0x59200
leaq 0xc8(%rsp), %rdi
callq 0x59200
leaq 0x38(%rsp), %rdi
callq 0x59200
leaq 0x80(%rsp), %rdi
callq 0x59200
leaq 0x20(%rsp), %rdi
callq 0x59200
leaq 0x8(%rsp), %rdi
callq 0x59200
testl %r15d, %r15d
je 0x9c3d2
leaq 0x783e9(%rip), %rsi     # 0x1144d7
leaq 0x8(%rsp), %rdi
callq 0x579f0
leaq 0x50(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x55180
movl %eax, %ebp
leaq 0x8(%rsp), %rdi
callq 0x59200
testb %bpl, %bpl
je 0x9c1fc
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x570b0
leaq 0x783a7(%rip), %rsi     # 0x1144d7
leaq 0x20(%rsp), %rdi
callq 0x579f0
leaq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x562f0
movq %rax, %r15
leaq 0x78384(%rip), %rsi     # 0x1144d7
leaq 0x80(%rsp), %rdi
callq 0x579f0
leaq 0x50(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x57610
leaq 0x38(%rsp), %rdi
leaq 0x50(%rsp), %rsi
movl %eax, %edx
callq 0x58b00
leaq 0x38(%rsp), %rsi
movq %r15, %rdi
callq 0x562f0
movq %rax, %r15
leaq 0x5b247(%rip), %rsi     # 0xf73e1
leaq 0x68(%rsp), %rdi
callq 0x579f0
leaq 0x68(%rsp), %rsi
movq %r15, %rdi
callq 0x562f0
movq (%rbx), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq *0x10(%rcx)
movl %eax, %ebp
leaq 0x68(%rsp), %rdi
callq 0x59200
leaq 0x38(%rsp), %rdi
callq 0x59200
leaq 0x80(%rsp), %rdi
callq 0x59200
leaq 0x20(%rsp), %rdi
callq 0x59200
leaq 0x8(%rsp), %rdi
callq 0x59200
testl %ebp, %ebp
je 0x9c3d2
leaq 0x5b1a8(%rip), %rsi     # 0xf73ab
leaq 0x8(%rsp), %rdi
callq 0x579f0
leaq 0x50(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x577d0
testb %al, %al
je 0x9c282
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq 0x570b0
leaq 0x5b17b(%rip), %rsi     # 0xf73af
leaq 0x38(%rsp), %rdi
callq 0x579f0
leaq 0x20(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x562f0
movq (%rbx), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq *0x10(%rcx)
movl %eax, %ebp
leaq 0x38(%rsp), %rdi
callq 0x59200
leaq 0x20(%rsp), %rdi
callq 0x59200
leaq 0x8(%rsp), %rdi
callq 0x59200
testl %ebp, %ebp
jne 0x9c28c
jmp 0x9c3d2
leaq 0x8(%rsp), %rdi
callq 0x59200
leaq 0x5b124(%rip), %rsi     # 0xf73b7
leaq 0x8(%rsp), %rdi
callq 0x579f0
leaq 0x50(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x577d0
testb %al, %al
je 0x9c312
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq 0x570b0
leaq 0x7544f(%rip), %rsi     # 0x111713
leaq 0x38(%rsp), %rdi
callq 0x579f0
leaq 0x20(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x562f0
movq (%rbx), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq *0x10(%rcx)
movl %eax, %ebp
leaq 0x38(%rsp), %rdi
callq 0x59200
leaq 0x20(%rsp), %rdi
callq 0x59200
leaq 0x8(%rsp), %rdi
callq 0x59200
testl %ebp, %ebp
jne 0x9c31c
jmp 0x9c3d2
leaq 0x8(%rsp), %rdi
callq 0x59200
leaq 0x5b098(%rip), %rsi     # 0xf73bb
leaq 0x8(%rsp), %rdi
callq 0x579f0
leaq 0x50(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x577d0
testb %al, %al
je 0x9c39f
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq 0x570b0
leaq 0x75598(%rip), %rsi     # 0x1118ec
leaq 0x38(%rsp), %rdi
callq 0x579f0
leaq 0x20(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x562f0
movq (%rbx), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq *0x10(%rcx)
movl %eax, %ebp
leaq 0x38(%rsp), %rdi
callq 0x59200
leaq 0x20(%rsp), %rdi
callq 0x59200
leaq 0x8(%rsp), %rdi
callq 0x59200
testl %ebp, %ebp
jne 0x9c3a9
jmp 0x9c3d2
leaq 0x8(%rsp), %rdi
callq 0x59200
leaq 0x5afc2(%rip), %rsi     # 0xf7372
leaq 0x8(%rsp), %rdi
callq 0x579f0
movq (%rbx), %rax
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq *0x10(%rax)
leaq 0x8(%rsp), %rdi
callq 0x59200
leaq 0x50(%rsp), %rdi
callq 0x59200
xorl %eax, %eax
addq $0xe0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9c438
jmp 0x9c516
jmp 0x9c4fd
jmp 0x9c3fc
movq %rax, %rbx
jmp 0x9c47e
jmp 0x9c4b2
jmp 0x9c4b2
jmp 0x9c516
jmp 0x9c516
jmp 0x9c4fd
jmp 0x9c502
jmp 0x9c516
jmp 0x9c4fd
jmp 0x9c516
jmp 0x9c4fd
movq %rax, %rbx
jmp 0x9c488
movq %rax, %rbx
jmp 0x9c49a
jmp 0x9c4fd
jmp 0x9c502
jmp 0x9c4b2
jmp 0x9c4b2
jmp 0x9c516
jmp 0x9c516
jmp 0x9c4fd
jmp 0x9c502
jmp 0x9c507
jmp 0x9c4fd
jmp 0x9c502
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x59200
leaq 0x68(%rsp), %rdi
callq 0x59200
testb %bpl, %bpl
je 0x9c49a
leaq 0xb0(%rsp), %rdi
callq 0x59200
leaq 0xc8(%rsp), %rdi
jmp 0x9c4d9
jmp 0x9c4ea
jmp 0x9c516
jmp 0x9c4fd
jmp 0x9c507
jmp 0x9c4fd
jmp 0x9c502
jmp 0x9c4b2
movq %rax, %rbx
jmp 0x9c4de
jmp 0x9c516
jmp 0x9c516
jmp 0x9c4fd
jmp 0x9c502
jmp 0x9c507
jmp 0x9c4fd
jmp 0x9c502
jmp 0x9c4d1
jmp 0x9c4ea
jmp 0x9c4fd
jmp 0x9c502
jmp 0x9c4fd
jmp 0x9c502
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x59200
leaq 0x38(%rsp), %rdi
callq 0x59200
jmp 0x9c4ed
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
jmp 0x9c50f
jmp 0x9c4fd
jmp 0x9c502
jmp 0x9c516
movq %rax, %rbx
jmp 0x9c523
movq %rax, %rbx
jmp 0x9c52d
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x59200
jmp 0x9c519
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x59200
leaq 0x8(%rsp), %rdi
callq 0x59200
leaq 0x50(%rsp), %rdi
callq 0x59200
movq %rbx, %rdi
callq 0x57090