// File: /workspace/github_c_makefile_star2_O1/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 0x579a0
leaq 0xb441c(%rip), %rax     # 0x16a720
movq %rax, (%r12)
leaq 0x88(%r12), %rdi
movq %rdi, 0x18(%rsp)
callq 0x55d90
leaq 0xaa4bf(%rip), %rax     # 0x1607e0
movq %rax, 0xc8(%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0xd0(%r12)
leaq 0xb4394(%rip), %rax     # 0x16a6d0
movq %rax, 0x88(%r12)
leaq 0xe0(%r12), %rdi
movq %rdi, 0x10(%rsp)
xorl %esi, %esi
callq 0x58e20
movq $0x0, 0x80(%r12)
testq %r14, %r14
je 0xb6591
leaq 0x5d579(%rip), %rsi     # 0x1138ed
leaq 0x40(%rsp), %rdi
callq 0x579f0
leaq 0x28(%rsp), %rdi
leaq 0x40(%rsp), %rcx
movq %r12, %rsi
movq %r14, %rdx
callq 0x56490
leaq 0x28(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x555f0
leaq 0x28(%rsp), %rdi
callq 0x59200
leaq 0x40(%rsp), %rdi
callq 0x59200
movq %r14, %rdi
xorl %esi, %esi
callq 0x57e20
movq %rax, %rdi
callq 0x57d50
leaq 0x5d61f(%rip), %rsi     # 0x1139ee
movq %rax, %rdi
callq 0x57ef0
testb %al, %al
je 0xb6591
movq %r14, %rdi
xorl %esi, %esi
callq 0x57e20
movq %rax, 0x20(%rsp)
movl $0x6b8, %edi            # imm = 0x6B8
callq 0x556b0
movq %rax, %r14
movq %rax, %rdi
movq %r12, 0x8(%rsp)
callq 0x58d00
movq %r14, 0x80(%r12)
xorl %r13d, %r13d
leaq 0x28(%rsp), %r15
movq 0x20(%rsp), %rdi
callq 0x56050
cmpl %eax, %r13d
jge 0xb6591
movq 0x20(%rsp), %rdi
movl %r13d, %esi
callq 0x57e20
movq %rax, %rbp
movq %rax, %rdi
callq 0x57d50
movq %rax, %rdi
leaq 0x5d5ab(%rip), %rsi     # 0x1139f8
callq 0x57ef0
testb %al, %al
je 0xb64ac
movq 0x80(%r12), %r14
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
leaq 0x5d480(%rip), %rsi     # 0x1138ed
callq 0x579f0
movq %r15, %rdi
movq %r12, %rsi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x56490
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x55990
movq %r15, %rdi
callq 0x59200
leaq 0x40(%rsp), %rdi
callq 0x59200
movq 0x8(%rsp), %r12
jmp 0xb6589
movq %rbp, %rdi
callq 0x57d50
movq %rax, %rdi
leaq 0x5d543(%rip), %rsi     # 0x113a01
callq 0x57ef0
testb %al, %al
je 0xb64f3
movq 0x80(%r12), %r14
movq %r15, %rdi
xorl %esi, %esi
callq 0x58e20
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x55990
movq %r15, %rdi
callq 0x59200
jmp 0xb6589
movq %rbp, %rdi
callq 0x57d50
movq %rax, %rdi
leaq 0x5d491(%rip), %rsi     # 0x113996
callq 0x57ef0
testb %al, %al
je 0xb6589
movl $0xf8, %edi
callq 0x556b0
movq %rax, %r14
movq %rax, %rdi
movq %rbp, %rsi
callq 0xb62e4
movq 0x80(%r12), %rbp
movq %r15, %rdi
xorl %esi, %esi
callq 0x58950
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
movq %r14, %rsi
addq $0xe0, %rsi
movq (%rbp), %rcx
movq 0x188(%rcx), %r10
movl $0x0, (%rsp)
movq %rbp, %rdi
movq %r15, %rdx
movq %rax, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq *%r10
movq %r15, %rdi
callq 0x59148
movq %r14, 0x28(%rsp)
movq 0x18(%rsp), %rdi
movq %r15, %rsi
callq 0x5af08
incl %r13d
jmp 0xb6418
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x6b8, %esi            # imm = 0x6B8
jmp 0xb65d8
movq %r12, 0x8(%rsp)
jmp 0xb660d
movq %r12, 0x8(%rsp)
jmp 0xb6606
jmp 0xb65ff
movq %r12, 0x8(%rsp)
movq %rax, %rbx
jmp 0xb6635
movq %r12, 0x8(%rsp)
movq %rax, %rbx
jmp 0xb663f
jmp 0xb6628
movq %rax, %rbx
movl $0xf8, %esi
movq %r14, %rdi
callq 0x55480
jmp 0xb662b
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
jmp 0xb661f
jmp 0xb6628
jmp 0xb6628
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x59148
jmp 0xb662b
movq %r12, 0x8(%rsp)
jmp 0xb6628
movq %rax, %rbx
jmp 0xb661a
jmp 0xb6628
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x59200
leaq 0x40(%rsp), %rdi
callq 0x59200
jmp 0xb662b
jmp 0xb6628
movq %rax, %rbx
movq 0x10(%rsp), %rdi
callq 0x59200
movq 0x18(%rsp), %rdi
callq 0x5b11e
movq 0x8(%rsp), %rdi
callq 0x59020
movq %rbx, %rdi
callq 0x57090
nop