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

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rsi, %r14
movq %rdi, %r13
callq 0x579a0
leaq 0xb46ad(%rip), %rax     # 0x16a690
movq %rax, (%r13)
leaq 0x88(%r13), %rdi
movq %rdi, 0x10(%rsp)
callq 0x55d90
leaq 0xaa7e1(%rip), %rax     # 0x1607e0
movq %rax, 0xc8(%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0xd0(%r13)
leaq 0xb46b8(%rip), %rax     # 0x16a6d0
movq %rax, 0x88(%r13)
movq %r13, 0x8(%rsp)
movq $0x0, 0x80(%r13)
movq %r14, 0x18(%rsp)
testq %r14, %r14
je 0xb619f
movl $0x688, %edi            # imm = 0x688
callq 0x556b0
movq %rax, %rbx
movq %rax, %rdi
callq 0x57210
movq 0x8(%rsp), %rax
movq %rbx, 0x80(%rax)
xorl %r12d, %r12d
leaq 0x38(%rsp), %r15
movq 0x18(%rsp), %rdi
callq 0x56050
cmpl %eax, %r12d
jge 0xb619f
movq 0x18(%rsp), %rdi
movl %r12d, %esi
callq 0x57e20
movq %rax, %r14
movq %rax, %rdi
callq 0x57d50
movq %rax, %rdi
leaq 0x5d8fb(%rip), %rsi     # 0x113996
callq 0x57ef0
testb %al, %al
je 0xb612d
movl $0xf8, %edi
callq 0x556b0
movq %rax, %r13
movq %rax, %rdi
movq %r14, %rsi
callq 0xb62e4
movq 0x8(%rsp), %rax
movq 0x80(%rax), %r14
movq %r13, %rdi
callq 0xb6652
movq %rax, %rbx
movq %r15, %rdi
xorl %esi, %esi
callq 0x58950
movq (%r13), %rax
movq %r13, %rdi
callq *0x10(%rax)
movq (%r14), %rcx
movq 0x188(%rcx), %r10
movl $0x0, (%rsp)
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %rax, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq *%r10
movq %r15, %rdi
callq 0x59148
movq %r13, 0x38(%rsp)
movq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x5af08
jmp 0xb6197
movq %r14, %rdi
callq 0x57d50
movq %rax, %rdi
leaq 0x5d85c(%rip), %rsi     # 0x11399b
callq 0x57ef0
testb %al, %al
je 0xb6197
movq 0x8(%rsp), %r13
movq 0x80(%r13), %rbx
leaq 0x20(%rsp), %rdi
leaq 0x5d78d(%rip), %rsi     # 0x1138ed
callq 0x579f0
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
leaq 0x20(%rsp), %rcx
callq 0x56490
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x55990
movq %r15, %rdi
callq 0x59200
leaq 0x20(%rsp), %rdi
callq 0x59200
incl %r12d
jmp 0xb6066
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movl $0x688, %esi            # imm = 0x688
movq %rbx, %rdi
jmp 0xb61f1
jmp 0xb620b
movq %rax, %r14
jmp 0xb621d
movq %rax, %r14
leaq 0x38(%rsp), %rdi
callq 0x59200
jmp 0xb61d3
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x59200
jmp 0xb620e
movq %rax, %r14
jmp 0xb6213
jmp 0xb620b
movq %rax, %r14
movl $0xf8, %esi
movq %r13, %rdi
callq 0x55480
jmp 0xb620e
movq %rax, %r14
leaq 0x38(%rsp), %rdi
callq 0x59148
jmp 0xb620e
jmp 0xb620b
jmp 0xb620b
movq %rax, %r14
movq 0x8(%rsp), %r13
movq 0x10(%rsp), %rdi
callq 0x5b11e
movq %r13, %rdi
callq 0x59020
movq %r14, %rdi
callq 0x57090
nop