// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/tools/translator/translator.cpp
// Function: Translator::SaveData()
Void Translator::SaveData()
{
	if (edit_id->GetText() == NIL)
	{
		Int	 index = -1;

		if	(edit_original->GetText() == "Program")	    index = 0;
		else if (edit_original->GetText() == "Version")	    index = 1;
		else if (edit_original->GetText() == "Language")    index = 2;
		else if (edit_original->GetText() == "RightToLeft") index = 3;
		else if (edit_original->GetText() == "Template")    index = 4;
		else if (edit_original->GetText() == "Author")	    index = 5;
		else if (edit_original->GetText() == "URL")	    index = 6;

		if (index >= 0)
		{
			InfoItem	*entry = (InfoItem *) entries.GetNth(index);

			entry->SetValue(edit_translated->GetText());

			if (index < numInfoItems - 1)
			{
				entry = (InfoItem *) entries.GetNth(index + 1);

				entry->Select();
			}
			else
			{
				text_id->Activate();
				edit_id->Activate();
				edit_original->Activate();
				button_remove->Activate();
				button_copy->Activate();

				menu_entry->GetNthEntry(3)->Activate();

				text_original->SetText("Original:");
				text_translated->SetText("Translation:");

				if (entries.Length() > numInfoItems)
				{
					StringItem	*entry = (StringItem *) entries.GetNth(numInfoItems);

					entry->Select();
				}
				else
				{
					edit_id->SetText("1");
					edit_original->SetText(NIL);
					edit_translated->SetText(NIL);

					edit_translated->MarkAll();
				}
			}
		}
	}
	else
	{
		StringItem	*entry = NIL;

		for (Int i = numInfoItems; i < entries.Length(); i++)
		{
			if (((StringItem *) entries.GetNth(i))->GetID() == edit_id->GetText().ToInt())
			{
				entry = (StringItem *) entries.GetNth(i);

				entry->SetOriginal(edit_original->GetText());
				entry->SetTranslation(edit_translated->GetText());

				break;
			}
		}

		if (entry == NIL)
		{
			entry = new StringItem(edit_id->GetText().ToInt(), edit_original->GetText(), edit_translated->GetText());

			list_entries->Add(entry);

			entries.Add(entry, entry->GetID());
			createdEntries.Add(entry, entry->GetID());
		}

		GUI::Font	 redFont;
		GUI::Font	 blackFont;

		redFont.SetColor(Color(255, 0, 0));

		if (entry->GetTranslation() == NIL) entry->SetFont(redFont);
		else				    entry->SetFont(blackFont);

		/* Select next entry if no filter is active.
		 */
		if (edit_filter->GetText() == NIL)
		{
			entry = (StringItem *) entries.GetNext();

			if (entry != NIL)
			{
				entry->Select();
			}
			else
			{
				edit_id->SetText(String::FromInt(edit_id->GetText().ToInt() + 1));
				edit_original->SetText(NIL);
				edit_translated->SetText(NIL);

				edit_translated->MarkAll();
			}
		}
	}

	if (edit_filter->GetText() != NIL) FilterEntries();

	modified = True;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdi, %rbx
movq 0x648(%rdi), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
xorl %ebp, %ebp
movq %rax, %rdi
xorl %esi, %esi
callq 0x74e0
testb %al, %al
je 0xd317
movq 0x658(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
leaq 0x528e(%rip), %rsi      # 0x12439
movq %rax, %rdi
callq 0x7840
movb $0x1, %r12b
testb %al, %al
jne 0xd2bd
movq 0x658(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
leaq 0x526c(%rip), %rsi      # 0x12441
movq %rax, %rdi
callq 0x7840
movl $0x1, %ebp
testb %al, %al
jne 0xd2bd
movq 0x658(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
leaq 0x5248(%rip), %rsi      # 0x12449
movq %rax, %rdi
callq 0x7840
movl $0x2, %ebp
testb %al, %al
jne 0xd2bd
movq 0x658(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
leaq 0x5225(%rip), %rsi      # 0x12452
movq %rax, %rdi
callq 0x7840
movl $0x3, %ebp
testb %al, %al
jne 0xd2bd
movq 0x658(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
leaq 0x5209(%rip), %rsi      # 0x1245e
movq %rax, %rdi
callq 0x7840
movl $0x4, %ebp
testb %al, %al
jne 0xd2bd
movq 0x658(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
leaq 0x51ea(%rip), %rsi      # 0x12467
movq %rax, %rdi
callq 0x7840
movl $0x5, %ebp
testb %al, %al
jne 0xd2bd
movq 0x658(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
leaq 0x51c9(%rip), %rsi      # 0x1246e
movq %rax, %rdi
callq 0x7840
testb %al, %al
je 0xd80a
movl $0x6, %ebp
xorl %r12d, %r12d
movb $0x1, %al
testb %al, %al
je 0xd721
leaq 0x6b8(%rbx), %r14
movq %r14, %rdi
movl %ebp, %esi
callq 0x9ca8
movq (%rax), %r15
movq 0x668(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
leaq 0x648(%r15), %rdi
movq %rax, %rsi
callq 0x7550
movq %r15, %rdi
callq 0x7bf6
testb %r12b, %r12b
je 0xd56a
incl %ebp
movq %r14, %rdi
movl %ebp, %esi
jmp 0xd646
leaq 0x6b8(%rbx), %r14
cmpl $0x8, 0x6c0(%rbx)
jl 0xd36c
movl $0x7, %ebp
xorl %r15d, %r15d
movq %r14, %rdi
movl %ebp, %esi
callq 0x9ca8
movq (%rax), %rax
movslq 0x630(%rax), %r12
movq 0x648(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
movq %rax, %rdi
callq 0x71e0
cmpq %r12, %rax
je 0xd371
incl %ebp
cmpl 0x6c0(%rbx), %ebp
jl 0xd32f
jmp 0xd3cc
xorl %r15d, %r15d
jmp 0xd3cc
movq %r14, %rdi
movl %ebp, %esi
callq 0x9ca8
movq (%rax), %r15
movq 0x658(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
leaq 0x638(%r15), %rdi
movq %rax, %rsi
callq 0x7550
movq %r15, %rdi
callq 0xa956
movq 0x668(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
leaq 0x650(%r15), %rdi
movq %rax, %rsi
callq 0x7550
movq %r15, %rdi
callq 0xa956
testq %r15, %r15
jne 0xd478
movl $0x668, %edi            # imm = 0x668
callq 0x7530
movq %rax, %r15
movq 0x648(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
movq %rax, %rdi
callq 0x71e0
movq %rax, %r12
movq 0x658(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
movq %rax, %r13
movq 0x668(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
movq %r15, %rdi
movl %r12d, %esi
movq %r13, %rdx
movq %rax, %rcx
callq 0xa878
movq 0x600(%rbx), %rdi
movq (%rdi), %rax
movq %r15, %rsi
callq *0x30(%rax)
leaq 0x20(%rsp), %r12
movq %r15, (%r12)
movl 0x630(%r15), %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x9d04
leaq 0x710(%rbx), %rdi
movq %r15, (%r12)
movl 0x630(%r15), %edx
leaq 0x20(%rsp), %rsi
callq 0x9d04
movq %r14, 0x60(%rsp)
movq 0xbb74(%rip), %r12      # 0x18ff8
movswl (%r12), %edx
movq 0xbae8(%rip), %rbp      # 0x18f78
movswl (%rbp), %ecx
xorl %r14d, %r14d
leaq 0x68(%rsp), %r9
movq %r14, 0x8(%r9)
movl %r14d, (%r9)
movq 0xbb46(%rip), %r13      # 0x18ff0
leaq 0x20(%rsp), %rdi
movq %r13, %rsi
movl %ecx, %r8d
callq 0x7770
movswl (%r12), %edx
movswl (%rbp), %ecx
leaq 0x8(%rsp), %r9
movq %r14, 0x8(%r9)
movl %r14d, (%r9)
leaq 0x68(%rsp), %r12
movq %r12, %rdi
movq %r13, %rsi
movl %ecx, %r8d
callq 0x7770
leaq 0x8(%rsp), %rsi
movq $0xff, 0x8(%rsi)
movl $0x0, (%rsi)
leaq 0x20(%rsp), %r13
movq %r13, %rdi
callq 0x7410
leaq 0x650(%r15), %rdi
xorl %esi, %esi
callq 0x74e0
movq 0x60(%rsp), %r14
movq (%r15), %rcx
testb %al, %al
cmovneq %r13, %r12
movq %r15, %rdi
movq %r12, %rsi
callq *0xe0(%rcx)
movq 0x5f0(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
movq %rax, %rdi
xorl %esi, %esi
callq 0x74e0
testb %al, %al
je 0xd70d
movq %r14, %rdi
callq 0x1128c
movq (%rax), %rdi
testq %rdi, %rdi
je 0xd658
callq 0x7860
jmp 0xd70d
movq 0x640(%rbx), %rdi
movq (%rdi), %rax
callq *0x68(%rax)
movq 0x648(%rbx), %rdi
movq (%rdi), %rax
callq *0x68(%rax)
movq 0x658(%rbx), %rdi
movq (%rdi), %rax
callq *0x68(%rax)
movq 0x678(%rbx), %rdi
movq (%rdi), %rax
callq *0x68(%rax)
movq 0x680(%rbx), %rdi
movq (%rdi), %rax
callq *0x68(%rax)
movq 0x5e0(%rbx), %rdi
movq (%rdi), %rax
movl $0x3, %esi
callq *0x180(%rax)
movq (%rax), %rcx
movq %rax, %rdi
callq *0x68(%rcx)
movq 0x650(%rbx), %r15
leaq 0x4df7(%rip), %rsi      # 0x123ce
leaq 0x20(%rsp), %r12
movq %r12, %rdi
callq 0x77f0
movq (%r15), %rax
movq %r15, %rdi
movq %r12, %rsi
callq *0xa0(%rax)
leaq 0x20(%rsp), %rdi
callq 0x7980
movq 0x660(%rbx), %r15
leaq 0x4dcd(%rip), %rsi      # 0x123d8
leaq 0x20(%rsp), %r12
movq %r12, %rdi
callq 0x77f0
movq (%r15), %rax
movq %r15, %rdi
movq %r12, %rsi
callq *0xa0(%rax)
leaq 0x20(%rsp), %rdi
callq 0x7980
cmpl $0x8, 0x6c0(%rbx)
jl 0xd760
movq %r14, %rdi
movl $0x7, %esi
callq 0x9ca8
movq (%rax), %rdi
callq 0x7860
jmp 0xd721
movq 0x648(%rbx), %r14
movq (%r14), %rax
movq %r14, %rdi
callq *0xa8(%rax)
movq %rax, %rdi
callq 0x71e0
incq %rax
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x7220
movq (%r14), %rax
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq *0xa0(%rax)
leaq 0x8(%rsp), %rdi
callq 0x7980
movq 0x658(%rbx), %r14
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x7480
movq (%r14), %rax
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq *0xa0(%rax)
leaq 0x8(%rsp), %rdi
callq 0x7980
movq 0x668(%rbx), %r14
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x7480
movq (%r14), %rax
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq *0xa0(%rax)
leaq 0x8(%rsp), %rdi
callq 0x7980
movq 0x668(%rbx), %rax
movq 0x5b8(%rax), %rdi
callq 0x73d0
leaq 0x68(%rsp), %rdi
callq 0x7620
leaq 0x20(%rsp), %rdi
callq 0x7620
movq 0x5f0(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
movq %rax, %rdi
xorl %esi, %esi
callq 0x76f0
testb %al, %al
je 0xd747
movq %rbx, %rdi
callq 0xc81a
movb $0x1, 0x770(%rbx)
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x648(%rbx), %r14
leaq 0x4bb4(%rip), %rsi      # 0x12322
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0x77f0
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0xa0(%rax)
leaq 0x20(%rsp), %rdi
callq 0x7980
movq 0x658(%rbx), %r14
leaq 0x20(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x7480
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0xa0(%rax)
leaq 0x20(%rsp), %rdi
callq 0x7980
movq 0x668(%rbx), %r14
leaq 0x20(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x7480
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0xa0(%rax)
leaq 0x20(%rsp), %rdi
callq 0x7980
movq 0x668(%rbx), %rax
movq 0x5b8(%rax), %rdi
callq 0x73d0
jmp 0xd721
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
xorl %eax, %eax
jmp 0xd2bf
jmp 0xd835
jmp 0xd835
jmp 0xd835
jmp 0xd824
jmp 0xd85f
jmp 0xd824
jmp 0xd85f
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x7980
jmp 0xd862
jmp 0xd835
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x7980
jmp 0xd876
jmp 0xd85f
jmp 0xd85f
movq %rax, %rbx
jmp 0xd86c
movq %rax, %rbx
movl $0x668, %esi            # imm = 0x668
movq %r15, %rdi
callq 0x70a0
jmp 0xd876
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x7620
leaq 0x20(%rsp), %rdi
callq 0x7620
movq %rbx, %rdi
callq 0x7290