// File: /workspace/github_c_makefile_star2_O3/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 0xb46dd(%rip), %rax     # 0x169690
movq %rax, (%r13)
leaq 0x88(%r13), %rdi
movq %rdi, 0x10(%rsp)
callq 0x55d90
leaq 0xaa831(%rip), %rax     # 0x15f800
movq %rax, 0xc8(%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0xd0(%r13)
leaq 0xb46e8(%rip), %rax     # 0x1696d0
movq %rax, 0x88(%r13)
movq %r13, 0x8(%rsp)
movq $0x0, 0x80(%r13)
movq %r14, 0x18(%rsp)
testq %r14, %r14
je 0xb516f
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 0xb516f
movq 0x18(%rsp), %rdi
movl %r12d, %esi
callq 0x57e20
movq %rax, %r14
movq %rax, %rdi
callq 0x57d50
movq %rax, %rdi
leaq 0x5daf0(%rip), %rsi     # 0x112b5b
callq 0x57ef0
testb %al, %al
je 0xb50fd
movl $0xf8, %edi
callq 0x556b0
movq %rax, %r13
movq %rax, %rdi
movq %r14, %rsi
callq 0xb52b4
movq 0x8(%rsp), %rax
movq 0x80(%rax), %r14
movq %r13, %rdi
callq 0xb5622
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 0x5aed8
jmp 0xb5167
movq %r14, %rdi
callq 0x57d50
movq %rax, %rdi
leaq 0x5da51(%rip), %rsi     # 0x112b60
callq 0x57ef0
testb %al, %al
je 0xb5167
movq 0x8(%rsp), %r13
movq 0x80(%r13), %rbx
leaq 0x20(%rsp), %rdi
leaq 0x5d982(%rip), %rsi     # 0x112ab2
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 0xb5036
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 0xb51c1
jmp 0xb51db
movq %rax, %r14
jmp 0xb51ed
movq %rax, %r14
leaq 0x38(%rsp), %rdi
callq 0x59200
jmp 0xb51a3
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x59200
jmp 0xb51de
movq %rax, %r14
jmp 0xb51e3
jmp 0xb51db
movq %rax, %r14
movl $0xf8, %esi
movq %r13, %rdi
callq 0x55480
jmp 0xb51de
movq %rax, %r14
leaq 0x38(%rsp), %rdi
callq 0x59148
jmp 0xb51de
jmp 0xb51db
jmp 0xb51db
movq %rax, %r14
movq 0x8(%rsp), %r13
movq 0x10(%rsp), %rdi
callq 0x5b0ee
movq %r13, %rdi
callq 0x59020
movq %r14, %rdi
callq 0x57090
nop