// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/tools/translator/section.cpp
// Function: Section::Filter(smooth::String const&, smooth::GUI::List*)
Bool Section::Filter(const String &string, List *list_filtered)
{
	if (list == NIL) return True;

	for (Int i = 0; i < list->Length(); i++)
	{
		const ListEntry	*entry = list->GetNthEntry(i);

		if (entry->GetObjectType() == Tree::classID)
		{
			Tree	*tree	 = new Tree(entry->GetText());

			sections.Get(entry->GetText().ComputeCRC32())->Filter(string, tree->GetList());

			if (tree->Length() > 0)
			{
				tree->Open();
				list_filtered->Add(tree);
			}
			else
			{
				delete tree;
			}
		}
		else if (entry->GetObjectType() == StringItem::classID && entry->GetText().ToLower().Contains(string))
		{
			StringItem	*item = new StringItem(((StringItem *) entry)->GetID(),
							       ((StringItem *) entry)->GetOriginal(),
							       ((StringItem *) entry)->GetTranslation());

			item->SetFont(entry->GetFont());

			list_filtered->Add(item);
		}
	}

	/* OnSelectEntry may already be connected if we parsed a template
	 * before, so try to disconnect before actually connecting it.
	 */
	list_filtered->onSelectEntry.Disconnect(&Section::OnSelectEntry, this);
	list_filtered->onSelectEntry.Connect(&Section::OnSelectEntry, this);

	return True;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x98(%rbp)
cmpq $0x0, 0x18(%rax)
jne 0xaea2
movb $0x1, -0x1(%rbp)
jmp 0xb260
movl $0x0, -0x24(%rbp)
movq -0x98(%rbp), %rax
movl -0x24(%rbp), %ecx
movl %ecx, -0x9c(%rbp)
movq 0x18(%rax), %rdi
movq (%rdi), %rax
callq *0x178(%rax)
movl %eax, %ecx
movl -0x9c(%rbp), %eax
cmpl %ecx, %eax
jge 0xb1e5
movq -0x98(%rbp), %rax
movq 0x18(%rax), %rdi
movl -0x24(%rbp), %esi
movq (%rdi), %rax
callq *0x180(%rax)
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0xba50
movq %rax, %rdi
movq 0x1a084(%rip), %rax     # 0x24f88
movswl (%rax), %esi
callq 0x82d0
testb $0x1, %al
jne 0xaf15
jmp 0xb038
movl $0xd60, %edi            # imm = 0xD60
callq 0x8540
movq %rax, -0xb0(%rbp)
movq -0x30(%rbp), %rdi
movq (%rdi), %rax
movq 0xa8(%rax), %rax
callq *%rax
movq %rax, -0xa8(%rbp)
jmp 0xaf3f
movq -0xa8(%rbp), %rsi
movq -0xb0(%rbp), %rdi
callq 0x8920
jmp 0xaf54
movq -0x98(%rbp), %rax
movq -0xb0(%rbp), %rcx
movq %rcx, -0x38(%rbp)
addq $0xd0, %rax
movq %rax, -0xc8(%rbp)
movq -0x30(%rbp), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
movq %rax, %rdi
callq 0x8570
movq -0xc8(%rbp), %rdi
movl %eax, %esi
callq 0xb680
movq (%rax), %rax
movq %rax, -0xc0(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x38(%rbp), %rdi
callq 0xb6b0
movq -0xc0(%rbp), %rdi
movq -0xb8(%rbp), %rsi
movq %rax, %rdx
callq 0xae70
movq -0x38(%rbp), %rdi
callq 0xba70
cmpl $0x0, %eax
jle 0xb013
movq -0x38(%rbp), %rdi
callq 0xb6d0
movq -0x20(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq (%rdi), %rax
callq *0x30(%rax)
jmp 0xb033
movq -0xb0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0xd60, %esi            # imm = 0xD60
callq 0x80a0
jmp 0xb26e
movq -0x38(%rbp), %rax
movq %rax, -0xd0(%rbp)
cmpq $0x0, %rax
je 0xb031
movq -0xd0(%rbp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
jmp 0xb033
jmp 0xb1d5
movq -0x30(%rbp), %rdi
callq 0xba50
movq %rax, %rdi
leaq 0x1a4e5(%rip), %rax     # 0x25530
movswl (%rax), %esi
callq 0x82d0
movb %al, %cl
movb $0x0, -0x61(%rbp)
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0xd1(%rbp)
jne 0xb068
jmp 0xb0b5
movq -0x30(%rbp), %rdi
movq (%rdi), %rax
movq 0xa8(%rax), %rax
callq *%rax
movq %rax, %rsi
leaq -0x60(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
callq 0x8380
movq -0xe0(%rbp), %rdi
movb $0x1, -0x61(%rbp)
movq -0x18(%rbp), %rsi
callq 0x8070
movb %al, -0xd2(%rbp)
jmp 0xb0a7
movb -0xd2(%rbp), %al
movb %al, -0xd1(%rbp)
jmp 0xb0b5
movb -0xd1(%rbp), %al
movb %al, -0xe1(%rbp)
testb $0x1, -0x61(%rbp)
jne 0xb0c9
jmp 0xb0d2
leaq -0x60(%rbp), %rdi
callq 0x8990
movb -0xe1(%rbp), %al
testb $0x1, %al
jne 0xb0e1
jmp 0xb1d3
movl $0x668, %edi            # imm = 0x668
callq 0x8540
movq %rax, -0xf0(%rbp)
movq -0x30(%rbp), %rdi
callq 0xb630
movl %eax, -0xe8(%rbp)
jmp 0xb103
movq -0x30(%rbp), %rdi
callq 0xb5e0
movq %rax, -0xf8(%rbp)
jmp 0xb115
movq -0x30(%rbp), %rdi
callq 0xb5c0
movq %rax, -0x100(%rbp)
jmp 0xb127
movq -0x100(%rbp), %rcx
movq -0xf8(%rbp), %rdx
movl -0xe8(%rbp), %esi
movq -0xf0(%rbp), %rdi
callq 0xf3a0
jmp 0xb149
movq -0xf0(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x30(%rbp), %rdi
movq (%rdi), %rax
callq *0xe8(%rax)
movq -0x108(%rbp), %rdi
movq %rax, %rsi
movq (%rdi), %rax
callq *0xe0(%rax)
movq -0x20(%rbp), %rdi
movq -0x70(%rbp), %rsi
movq (%rdi), %rax
callq *0x30(%rax)
jmp 0xb1d3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
testb $0x1, -0x61(%rbp)
jne 0xb1a3
jmp 0xb1ac
leaq -0x60(%rbp), %rdi
callq 0x8990
jmp 0xb26e
movq -0xf0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0x668, %esi            # imm = 0x668
callq 0x80a0
jmp 0xb26e
jmp 0xb1d5
jmp 0xb1d7
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xaea9
movq -0x98(%rbp), %rcx
movq -0x20(%rbp), %rdi
addq $0x688, %rdi            # imm = 0x688
leaq -0xd7e(%rip), %rax      # 0xa480
movq %rax, -0x110(%rbp)
movq %rax, -0x80(%rbp)
movq $0x0, -0x78(%rbp)
movq -0x80(%rbp), %rsi
movq -0x78(%rbp), %rdx
callq 0xb760
movq -0x98(%rbp), %rcx
movq -0x110(%rbp), %rax
movq -0x20(%rbp), %rdi
addq $0x688, %rdi            # imm = 0x688
movq %rax, -0x90(%rbp)
movq $0x0, -0x88(%rbp)
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
callq 0xb8e0
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x8290
nopw (%rax,%rax)