// File: /workspace/github_c_makefile_star2_O2/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 $0x98, %rsp
movq %rdi, %rbx
movq 0x648(%rdi), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
xorl %ebp, %ebp
movq %rax, %rdi
xorl %esi, %esi
callq 0x84e0
testb %al, %al
je 0xdec6
movq 0x658(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
leaq 0x45a4(%rip), %rsi      # 0x12429
movq %rax, %rdi
callq 0x8850
movb $0x1, %r12b
testb %al, %al
jne 0xe232
movq 0x658(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
leaq 0x4582(%rip), %rsi      # 0x12431
movq %rax, %rdi
callq 0x8850
testb %al, %al
je 0xe0d7
pushq $0x1
jmp 0xe231
leaq 0x6b8(%rbx), %r14
pushq $0x7
popq %rbp
cmpl 0x6c0(%rbx), %ebp
jge 0xdf11
movq %r14, %rdi
movl %ebp, %esi
callq 0xab92
movq (%rax), %rax
movslq 0x630(%rax), %r15
movq 0x648(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
movq %rax, %rdi
callq 0x81e0
cmpq %r15, %rax
je 0xdfb6
incl %ebp
jmp 0xded0
movl $0x668, %edi            # imm = 0x668
callq 0x8530
movq %rax, %r15
movq 0x648(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
movq %rax, %rdi
callq 0x81e0
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 0xb6d8
movq 0x600(%rbx), %rdi
movq (%rdi), %rax
movq %r15, %rsi
callq *0x30(%rax)
leaq 0x18(%rsp), %r12
movq %r15, (%r12)
movl 0x630(%r15), %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0xabe4
leaq 0x710(%rbx), %rdi
movq %r15, (%r12)
movl 0x630(%r15), %edx
leaq 0x18(%rsp), %rsi
callq 0xabe4
jmp 0xdff9
movq %r14, %rdi
movl %ebp, %esi
callq 0xab92
movq (%rax), %r15
movq 0x658(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
movq %r15, %rdi
movq %rax, %rsi
callq 0x11498
movq 0x668(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
movq %r15, %rdi
movq %rax, %rsi
callq 0x9ea8
movq 0xaff8(%rip), %r12      # 0x18ff8
movswl (%r12), %edx
movq 0xaf6c(%rip), %rbp      # 0x18f78
leaq 0x58(%rsp), %r9
andq $0x0, 0x8(%r9)
movswl (%rbp), %ecx
andl $0x0, (%r9)
movq 0xafcb(%rip), %r13      # 0x18ff0
leaq 0x18(%rsp), %rdi
movq %r13, %rsi
movl %ecx, %r8d
callq 0x8780
movswl (%r12), %edx
movq %rsp, %r9
andq $0x0, 0x8(%r9)
movswl (%rbp), %ecx
andl $0x0, (%r9)
leaq 0x58(%rsp), %r12
movq %r12, %rdi
movq %r13, %rsi
movl %ecx, %r8d
callq 0x8780
movq %rsp, %rsi
movq $0xff, 0x8(%rsi)
andl $0x0, (%rsi)
leaq 0x18(%rsp), %r13
movq %r13, %rdi
callq 0x8410
leaq 0x650(%r15), %rdi
xorl %esi, %esi
callq 0x84e0
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 0x84e0
testb %al, %al
je 0xe1a1
movq %r14, %rdi
callq 0x11c50
movq (%rax), %rdi
testq %rdi, %rdi
je 0xe105
callq 0x8870
jmp 0xe1a1
movq 0x658(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
leaq 0x434b(%rip), %rsi      # 0x12439
movq %rax, %rdi
callq 0x8850
testb %al, %al
je 0xe1ba
pushq $0x2
jmp 0xe231
movq 0x648(%rbx), %r14
movq (%r14), %rax
movq %r14, %rdi
callq *0xa8(%rax)
movq %rax, %rdi
callq 0x81e0
incq %rax
movq %rsp, %rdi
movq %rax, %rsi
callq 0x8220
movq (%r14), %rax
movq %rsp, %rsi
movq %r14, %rdi
callq *0xa0(%rax)
movq %rsp, %rdi
callq 0x8990
movq 0x658(%rbx), %r14
movq %rsp, %rdi
xorl %esi, %esi
callq 0x8480
movq (%r14), %rax
movq %rsp, %rsi
movq %r14, %rdi
callq *0xa0(%rax)
movq %rsp, %rdi
callq 0x8990
movq 0x668(%rbx), %r14
movq %rsp, %rdi
xorl %esi, %esi
callq 0x8480
movq (%r14), %rax
movq %rsp, %rsi
movq %r14, %rdi
callq *0xa0(%rax)
movq %rsp, %rdi
callq 0x8990
movq 0x668(%rbx), %rdi
callq 0x1148c
leaq 0x58(%rsp), %rdi
callq 0x8620
leaq 0x18(%rsp), %rdi
callq 0x8620
jmp 0xe3f6
movq 0x658(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
leaq 0x4271(%rip), %rsi      # 0x12442
movq %rax, %rdi
callq 0x8850
testb %al, %al
je 0xe1e1
pushq $0x3
jmp 0xe231
movq 0x658(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
leaq 0x4256(%rip), %rsi      # 0x1244e
movq %rax, %rdi
callq 0x8850
testb %al, %al
je 0xe208
pushq $0x4
jmp 0xe231
movq 0x658(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
leaq 0x4238(%rip), %rsi      # 0x12457
movq %rax, %rdi
callq 0x8850
testb %al, %al
je 0xe435
pushq $0x5
popq %rbp
leaq 0x6b8(%rbx), %r14
movq %r14, %rdi
movl %ebp, %esi
callq 0xab92
movq (%rax), %r15
movq 0x668(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
movq %r15, %rdi
movq %rax, %rsi
callq 0x11382
testb %r12b, %r12b
je 0xe272
incl %ebp
movq %r14, %rdi
movl %ebp, %esi
jmp 0xe346
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
pushq $0x3
popq %rsi
callq *0x180(%rax)
movq (%rax), %rcx
movq %rax, %rdi
callq *0x68(%rcx)
movq 0x650(%rbx), %r15
leaq 0x40e1(%rip), %rsi      # 0x123be
leaq 0x18(%rsp), %r12
movq %r12, %rdi
callq 0x8800
movq (%r15), %rax
movq %r15, %rdi
movq %r12, %rsi
callq *0xa0(%rax)
leaq 0x18(%rsp), %rdi
callq 0x8990
movq 0x660(%rbx), %r15
leaq 0x40b7(%rip), %rsi      # 0x123c8
leaq 0x18(%rsp), %r12
movq %r12, %rdi
callq 0x8800
movq (%r15), %rax
movq %r15, %rdi
movq %r12, %rsi
callq *0xa0(%rax)
leaq 0x18(%rsp), %rdi
callq 0x8990
cmpl $0x8, 0x6c0(%rbx)
jl 0xe358
pushq $0x7
popq %rsi
movq %r14, %rdi
callq 0xab92
movq (%rax), %rdi
callq 0x8870
jmp 0xe3f6
movq 0x648(%rbx), %r14
leaq 0x3fac(%rip), %rsi      # 0x12312
leaq 0x18(%rsp), %r15
movq %r15, %rdi
callq 0x8800
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0xa0(%rax)
leaq 0x18(%rsp), %rdi
callq 0x8990
movq 0x658(%rbx), %r14
leaq 0x18(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x8480
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0xa0(%rax)
leaq 0x18(%rsp), %rdi
callq 0x8990
movq 0x668(%rbx), %r14
leaq 0x18(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x8480
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0xa0(%rax)
leaq 0x18(%rsp), %rdi
callq 0x8990
movq 0x668(%rbx), %rdi
callq 0x1148c
movq 0x5f0(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
movq %rax, %rdi
xorl %esi, %esi
callq 0x86f0
testb %al, %al
je 0xe41c
movq %rbx, %rdi
callq 0xd576
movb $0x1, 0x770(%rbx)
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x658(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
leaq 0x4012(%rip), %rsi      # 0x1245e
movq %rax, %rdi
callq 0x8850
testb %al, %al
je 0xe3f6
pushq $0x6
popq %rbp
xorl %r12d, %r12d
jmp 0xe232
jmp 0xe46b
jmp 0xe4aa
jmp 0xe46b
jmp 0xe4aa
movq %rax, %rbx
movq %rsp, %rdi
callq 0x8990
jmp 0xe4ad
jmp 0xe480
jmp 0xe480
jmp 0xe480
jmp 0xe480
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x8990
jmp 0xe4c1
jmp 0xe4aa
jmp 0xe4aa
movq %rax, %rbx
jmp 0xe4b7
movq %rax, %rbx
movl $0x668, %esi            # imm = 0x668
movq %r15, %rdi
callq 0x80a0
jmp 0xe4c1
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x8620
leaq 0x18(%rsp), %rdi
callq 0x8620
movq %rbx, %rdi
callq 0x8290
nop