// File: /workspace/github_c_makefile_star2_O3/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 0x74e0
testb %al, %al
je 0xd2b9
movq 0x658(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
leaq 0x52e2(%rip), %rsi      # 0x12439
movq %rax, %rdi
callq 0x7840
movb $0x1, %r12b
testb %al, %al
jne 0xd269
movq 0x658(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
leaq 0x52c0(%rip), %rsi      # 0x12441
movq %rax, %rdi
callq 0x7840
movl $0x1, %ebp
testb %al, %al
jne 0xd269
movq 0x658(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
leaq 0x529c(%rip), %rsi      # 0x12449
movq %rax, %rdi
callq 0x7840
movl $0x2, %ebp
testb %al, %al
jne 0xd269
movq 0x658(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
leaq 0x5279(%rip), %rsi      # 0x12452
movq %rax, %rdi
callq 0x7840
movl $0x3, %ebp
testb %al, %al
jne 0xd269
movq 0x658(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
leaq 0x525d(%rip), %rsi      # 0x1245e
movq %rax, %rdi
callq 0x7840
movl $0x4, %ebp
testb %al, %al
jne 0xd269
movq 0x658(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
leaq 0x523e(%rip), %rsi      # 0x12467
movq %rax, %rdi
callq 0x7840
movl $0x5, %ebp
testb %al, %al
jne 0xd269
movq 0x658(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
leaq 0x521d(%rip), %rsi      # 0x1246e
movq %rax, %rdi
callq 0x7840
testb %al, %al
je 0xd746
movl $0x6, %ebp
xorl %r12d, %r12d
leaq 0x6b8(%rbx), %r14
movq %r14, %rdi
movl %ebp, %esi
callq 0x9c68
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 0xd3b5
incl %ebp
movq %r14, %rdi
movl %ebp, %esi
jmp 0xd491
leaq 0x6b8(%rbx), %r14
cmpl $0x8, 0x6c0(%rbx)
jl 0xd30d
movl $0x7, %ebp
movq %r14, %rdi
movl %ebp, %esi
callq 0x9c68
movq (%rax), %rax
movslq 0x630(%rax), %r15
movq 0x648(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
movq %rax, %rdi
callq 0x71e0
cmpq %r15, %rax
je 0xd4a3
incl %ebp
cmpl 0x6c0(%rbx), %ebp
jl 0xd2ce
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 0xa824
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 0x9cc4
leaq 0x710(%rbx), %rdi
movq %r15, (%r12)
movl 0x630(%r15), %edx
leaq 0x18(%rsp), %rsi
callq 0x9cc4
jmp 0xd4fe
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 0x4fac(%rip), %rsi      # 0x123ce
leaq 0x18(%rsp), %r12
movq %r12, %rdi
callq 0x77f0
movq (%r15), %rax
movq %r15, %rdi
movq %r12, %rsi
callq *0xa0(%rax)
leaq 0x18(%rsp), %rdi
callq 0x7980
movq 0x660(%rbx), %r15
leaq 0x4f82(%rip), %rsi      # 0x123d8
leaq 0x18(%rsp), %r12
movq %r12, %rdi
callq 0x77f0
movq (%r15), %rax
movq %r15, %rdi
movq %r12, %rsi
callq *0xa0(%rax)
leaq 0x18(%rsp), %rdi
callq 0x7980
cmpl $0x8, 0x6c0(%rbx)
jl 0xd5e5
movq %r14, %rdi
movl $0x7, %esi
callq 0x9c68
movq (%rax), %rdi
callq 0x7860
jmp 0xd746
movq %r14, %rdi
movl %ebp, %esi
callq 0x9c68
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 0xa902
movq 0x668(%rbx), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
leaq 0x650(%r15), %rdi
movq %rax, %rsi
callq 0x7550
movq %r15, %rdi
callq 0xa902
movq 0xbaf3(%rip), %rax      # 0x18ff8
movswl (%rax), %edx
movq 0xba69(%rip), %rbp      # 0x18f78
movswl (%rbp), %ecx
xorl %r12d, %r12d
leaq 0x58(%rsp), %r9
movq %r12, 0x8(%r9)
movl %r12d, (%r9)
movq 0xbac7(%rip), %r13      # 0x18ff0
leaq 0x18(%rsp), %rdi
movq %r13, %rsi
movl %ecx, %r8d
callq 0x7770
movq 0xbab8(%rip), %rax      # 0x18ff8
movswl (%rax), %edx
movswl (%rbp), %ecx
movq %rsp, %r9
movq %r12, 0x8(%r9)
movl %r12d, (%r9)
leaq 0x58(%rsp), %r12
movq %r12, %rdi
movq %r13, %rsi
movl %ecx, %r8d
callq 0x7770
movq %rsp, %rsi
movq $0xff, 0x8(%rsi)
movl $0x0, (%rsi)
leaq 0x18(%rsp), %r13
movq %r13, %rdi
callq 0x7410
leaq 0x650(%r15), %rdi
xorl %esi, %esi
callq 0x74e0
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 0xd732
movq %r14, %rdi
callq 0x11176
movq (%rax), %rdi
testq %rdi, %rdi
je 0xd68f
callq 0x7860
jmp 0xd732
movq 0x648(%rbx), %r14
leaq 0x4d2f(%rip), %rsi      # 0x12322
leaq 0x18(%rsp), %r15
movq %r15, %rdi
callq 0x77f0
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0xa0(%rax)
leaq 0x18(%rsp), %rdi
callq 0x7980
movq 0x658(%rbx), %r14
leaq 0x18(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x7480
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0xa0(%rax)
leaq 0x18(%rsp), %rdi
callq 0x7980
movq 0x668(%rbx), %r14
leaq 0x18(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x7480
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0xa0(%rax)
leaq 0x18(%rsp), %rdi
callq 0x7980
movq 0x668(%rbx), %rax
movq 0x5b8(%rax), %rdi
callq 0x73d0
jmp 0xd746
movq 0x648(%rbx), %r14
movq (%r14), %rax
movq %r14, %rdi
callq *0xa8(%rax)
movq %rax, %rdi
callq 0x71e0
incq %rax
movq %rsp, %rdi
movq %rax, %rsi
callq 0x7220
movq (%r14), %rax
movq %rsp, %rsi
movq %r14, %rdi
callq *0xa0(%rax)
movq %rsp, %rdi
callq 0x7980
movq 0x658(%rbx), %r14
movq %rsp, %rdi
xorl %esi, %esi
callq 0x7480
movq (%r14), %rax
movq %rsp, %rsi
movq %r14, %rdi
callq *0xa0(%rax)
movq %rsp, %rdi
callq 0x7980
movq 0x668(%rbx), %r14
movq %rsp, %rdi
xorl %esi, %esi
callq 0x7480
movq (%r14), %rax
movq %rsp, %rsi
movq %r14, %rdi
callq *0xa0(%rax)
movq %rsp, %rdi
callq 0x7980
movq 0x668(%rbx), %rax
movq 0x5b8(%rax), %rdi
callq 0x73d0
leaq 0x58(%rsp), %rdi
callq 0x7620
leaq 0x18(%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 0xd76c
movq %rbx, %rdi
callq 0xc7c6
movb $0x1, 0x770(%rbx)
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xd78d
jmp 0xd7cc
jmp 0xd78d
jmp 0xd7cc
movq %rax, %rbx
movq %rsp, %rdi
callq 0x7980
jmp 0xd7cf
jmp 0xd7a2
jmp 0xd7a2
jmp 0xd7a2
jmp 0xd7a2
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x7980
jmp 0xd7e3
jmp 0xd7cc
jmp 0xd7cc
movq %rax, %rbx
jmp 0xd7d9
movq %rax, %rbx
movl $0x668, %esi            # imm = 0x668
movq %r15, %rdi
callq 0x70a0
jmp 0xd7e3
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x7620
leaq 0x18(%rsp), %rdi
callq 0x7620
movq %rbx, %rdi
callq 0x7290
nop