// File: /workspace/github_c_makefile_star2_O3/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 0xb444c(%rip), %rax     # 0x169720
movq %rax, (%r12)
leaq 0x88(%r12), %rdi
movq %rdi, 0x18(%rsp)
callq 0x55d90
leaq 0xaa50f(%rip), %rax     # 0x15f800
movq %rax, 0xc8(%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0xd0(%r12)
leaq 0xb43c4(%rip), %rax     # 0x1696d0
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 0xb5561
leaq 0x5d76e(%rip), %rsi     # 0x112ab2
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 0x5d814(%rip), %rsi     # 0x112bb3
movq %rax, %rdi
callq 0x57ef0
testb %al, %al
je 0xb5561
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 0xb5561
movq 0x20(%rsp), %rdi
movl %r13d, %esi
callq 0x57e20
movq %rax, %rbp
movq %rax, %rdi
callq 0x57d50
movq %rax, %rdi
leaq 0x5d7a0(%rip), %rsi     # 0x112bbd
callq 0x57ef0
testb %al, %al
je 0xb547c
movq 0x80(%r12), %r14
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
leaq 0x5d675(%rip), %rsi     # 0x112ab2
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 0xb5559
movq %rbp, %rdi
callq 0x57d50
movq %rax, %rdi
leaq 0x5d738(%rip), %rsi     # 0x112bc6
callq 0x57ef0
testb %al, %al
je 0xb54c3
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 0xb5559
movq %rbp, %rdi
callq 0x57d50
movq %rax, %rdi
leaq 0x5d686(%rip), %rsi     # 0x112b5b
callq 0x57ef0
testb %al, %al
je 0xb5559
movl $0xf8, %edi
callq 0x556b0
movq %rax, %r14
movq %rax, %rdi
movq %rbp, %rsi
callq 0xb52b4
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 0x5aed8
incl %r13d
jmp 0xb53e8
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 0xb55a8
movq %r12, 0x8(%rsp)
jmp 0xb55dd
movq %r12, 0x8(%rsp)
jmp 0xb55d6
jmp 0xb55cf
movq %r12, 0x8(%rsp)
movq %rax, %rbx
jmp 0xb5605
movq %r12, 0x8(%rsp)
movq %rax, %rbx
jmp 0xb560f
jmp 0xb55f8
movq %rax, %rbx
movl $0xf8, %esi
movq %r14, %rdi
callq 0x55480
jmp 0xb55fb
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
jmp 0xb55ef
jmp 0xb55f8
jmp 0xb55f8
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x59148
jmp 0xb55fb
movq %r12, 0x8(%rsp)
jmp 0xb55f8
movq %rax, %rbx
jmp 0xb55ea
jmp 0xb55f8
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x59200
leaq 0x40(%rsp), %rdi
callq 0x59200
jmp 0xb55fb
jmp 0xb55f8
movq %rax, %rbx
movq 0x10(%rsp), %rdi
callq 0x59200
movq 0x18(%rsp), %rdi
callq 0x5b0ee
movq 0x8(%rsp), %rdi
callq 0x59020
movq %rbx, %rdi
callq 0x57090
nop