// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/xml/xul/popupmenu.cpp
// Function: smooth::XML::XUL::PopupMenu::PopupMenu(smooth::XML::Node*)
S::XML::XUL::PopupMenu::PopupMenu(Node *node) : Widget(node)
{
	menu = NIL;

	if (node != NIL)
	{
		name	= GetXMLAttributeValue(node, "label");

		if (node->GetNthNode(0)->GetName() == "menupopup")
		{
			node = node->GetNthNode(0);

			menu = new GUI::PopupMenu();

			for (Int i = 0; i < node->GetNOfNodes(); i++)
			{
				Node	*entry = node->GetNthNode(i);

				if (entry->GetName() == "menuitem")
				{
					menu->AddEntry(GetXMLAttributeValue(entry, "label"));
				}
				else if (entry->GetName() == "menuseparator")
				{
					menu->AddEntry();
				}
				else if (entry->GetName() == "menu")
				{
					XUL::PopupMenu	*popup = new XUL::PopupMenu(entry);

					menu->AddEntry(popup->GetName(), NIL, (GUI::PopupMenu *) popup->GetWidget());

					entries.Add(popup);
				}
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r14
movq %rdi, %r12
callq 0x58bf0
leaq 0xaf65c(%rip), %rax     # 0x15f740
movq %rax, (%r12)
leaq 0x88(%r12), %rdi
movq %rdi, 0x30(%rsp)
movq %r12, 0x8(%rsp)
callq 0xb0084
leaq 0xe0(%r12), %rdi
movq %rdi, 0x28(%rsp)
xorl %esi, %esi
callq 0x5a180
andq $0x0, 0x80(%r12)
testq %r14, %r14
je 0xb0353
leaq 0x52876(%rip), %rsi     # 0x1029a2
leaq 0x10(%rsp), %rdi
callq 0x58c40
leaq 0x40(%rsp), %rdi
leaq 0x10(%rsp), %rcx
movq %r12, %rsi
movq %r14, %rdx
callq 0x57590
leaq 0x40(%rsp), %rsi
movq 0x28(%rsp), %rdi
callq 0x56630
leaq 0x40(%rsp), %rdi
callq 0x5a588
leaq 0x10(%rsp), %rdi
callq 0x5a588
movq %r14, %rdi
xorl %esi, %esi
callq 0x590b0
movq %rax, %rdi
callq 0x58fd0
leaq 0x5291c(%rip), %rsi     # 0x102aa3
movq %rax, %rdi
callq 0x59180
testb %al, %al
je 0xb0353
movq %r14, %rdi
xorl %esi, %esi
callq 0x590b0
movq %rax, 0x38(%rsp)
movl $0x6b8, %edi            # imm = 0x6B8
callq 0x56700
movq %rax, %r14
movq %rax, %rdi
callq 0x5a050
movq %r14, 0x80(%r12)
xorl %r13d, %r13d
leaq 0x40(%rsp), %r15
movq 0x38(%rsp), %rdi
callq 0x57130
cmpl %eax, %r13d
jge 0xb0353
movq 0x38(%rsp), %rdi
movl %r13d, %esi
callq 0x590b0
movq %rax, %rbp
movq %rax, %rdi
callq 0x58fd0
movq %rax, %rdi
leaq 0x528ad(%rip), %rsi     # 0x102aad
callq 0x59180
testb %al, %al
je 0xb025f
movq 0x80(%r12), %r14
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
leaq 0x52782(%rip), %rsi     # 0x1029a2
callq 0x58c40
movq %r15, %rdi
movq %r12, %rsi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x57590
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x569f0
movq %r15, %rdi
callq 0x5a588
leaq 0x10(%rsp), %rdi
callq 0x5a588
movq 0x8(%rsp), %r12
jmp 0xb034b
movq %rbp, %rdi
callq 0x58fd0
movq %rax, %rdi
leaq 0x52845(%rip), %rsi     # 0x102ab6
callq 0x59180
testb %al, %al
je 0xb02a6
movq 0x80(%r12), %r14
movq %r15, %rdi
xorl %esi, %esi
callq 0x5a180
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x569f0
movq %r15, %rdi
callq 0x5a588
jmp 0xb034b
movq %rbp, %rdi
callq 0x58fd0
movq %rax, %rdi
leaq 0x52793(%rip), %rsi     # 0x102a4b
callq 0x59180
testb %al, %al
je 0xb034b
movl $0xf8, %edi
callq 0x56700
movq %rax, %r14
movq %rax, %rdi
movq %rbp, %rsi
callq 0xb00c4
movq %r14, 0x40(%rsp)
movq 0x80(%r12), %rbp
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x59c80
movq 0x40(%rsp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
leaq 0x10(%rsp), %rbx
addq $0xe0, %r14
movq (%rbp), %rcx
movq 0x188(%rcx), %r10
andl $0x0, (%rsp)
movq %rbp, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %rax, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq *%r10
movq %rbx, %rdi
callq 0x5a4c8
movq 0x30(%rsp), %rdi
movq %r15, %rsi
movq 0x8(%rsp), %r12
callq 0xb009a
incl %r13d
jmp 0xb01cb
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movl $0x6b8, %esi            # imm = 0x6B8
jmp 0xb0386
jmp 0xb03b6
jmp 0xb03af
jmp 0xb03d1
movq %rax, %r15
jmp 0xb03de
movq %rax, %r15
jmp 0xb03e8
jmp 0xb03d1
movq %rax, %r15
movl $0xf8, %esi
movq %r14, %rdi
callq 0x564c0
jmp 0xb03d4
movq %rax, %r15
leaq 0x40(%rsp), %rdi
jmp 0xb03c8
jmp 0xb03d1
jmp 0xb03d1
movq %rax, %r15
leaq 0x10(%rsp), %rdi
callq 0x5a4c8
jmp 0xb03d4
jmp 0xb03d1
movq %rax, %r15
jmp 0xb03c3
jmp 0xb03d1
movq %rax, %r15
leaq 0x40(%rsp), %rdi
callq 0x5a588
leaq 0x10(%rsp), %rdi
callq 0x5a588
jmp 0xb03d4
jmp 0xb03d1
movq %rax, %r15
movq 0x28(%rsp), %rdi
callq 0x5a588
movq 0x30(%rsp), %rdi
callq 0x5c22c
movq 0x8(%rsp), %rdi
callq 0x5a3a0
movq %r15, %rdi
callq 0x58260