// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x58bf0
leaq 0xaf8dc(%rip), %rax     # 0x15f6b0
movq %rax, (%rbx)
leaq 0x88(%rbx), %rdi
movq %rdi, 0x18(%rsp)
callq 0xb0084
andq $0x0, 0x80(%rbx)
movq %r14, 0x20(%rsp)
testq %r14, %r14
je 0xaff5e
movl $0x688, %edi            # imm = 0x688
callq 0x56700
movq %rax, %r14
movq %rax, %rdi
callq 0x58400
movq %r14, 0x80(%rbx)
xorl %r12d, %r12d
leaq 0x40(%rsp), %r15
movq %rbx, 0x10(%rsp)
movq 0x20(%rsp), %rdi
callq 0x57130
cmpl %eax, %r12d
jge 0xaff5e
movq 0x20(%rsp), %rdi
movl %r12d, %esi
callq 0x590b0
movq %rax, %r13
movq %rax, %rdi
callq 0x58fd0
movq %rax, %rdi
leaq 0x52bef(%rip), %rsi     # 0x102a4b
callq 0x59180
testb %al, %al
je 0xafeea
movl $0xf8, %edi
callq 0x56700
movq %rax, %r14
movq %rax, %rdi
movq %r13, %rsi
callq 0xb00c4
movq %r14, 0x28(%rsp)
movq 0x80(%rbx), %r13
movq %r14, %rdi
callq 0xb03fa
movq %rax, %r14
movq %r15, %rdi
xorl %esi, %esi
callq 0x59c80
movq 0x28(%rsp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq (%r13), %rcx
movq 0x188(%rcx), %r10
andl $0x0, (%rsp)
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %rax, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq *%r10
movq %r15, %rdi
callq 0x5a4c8
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0xb009a
jmp 0xaff56
movq %r13, %rdi
callq 0x58fd0
movq %rax, %rdi
leaq 0x52b54(%rip), %rsi     # 0x102a50
callq 0x59180
testb %al, %al
je 0xaff56
movq 0x80(%rbx), %r14
movq %r15, %rdi
leaq 0x52a8c(%rip), %rsi     # 0x1029a2
movq %rbx, %rbp
callq 0x58c40
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
movq %rbp, %rsi
movq %r13, %rdx
movq %r15, %rcx
callq 0x57590
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x569f0
movq %rbx, %rdi
callq 0x5a588
movq %r15, %rdi
callq 0x5a588
movq 0x10(%rsp), %rbx
incl %r12d
jmp 0xafe27
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r12
movl $0x688, %esi            # imm = 0x688
jmp 0xaffb3
jmp 0xaffd0
movq %rax, %r12
jmp 0xaffdd
movq %rax, %r12
leaq 0x28(%rsp), %rdi
callq 0x5a588
jmp 0xaff90
movq %rax, %r12
leaq 0x40(%rsp), %rdi
callq 0x5a588
movq 0x10(%rsp), %rbx
jmp 0xaffd3
movq %rax, %r12
movq %rbp, %rbx
jmp 0xaffd3
jmp 0xaffd0
movq %rax, %r12
movl $0xf8, %esi
movq %r14, %rdi
callq 0x564c0
jmp 0xaffd3
movq %rax, %r12
leaq 0x40(%rsp), %rdi
callq 0x5a4c8
jmp 0xaffd3
jmp 0xaffd0
jmp 0xaffd0
movq %rax, %r12
movq 0x18(%rsp), %rdi
callq 0x5c22c
movq %rbx, %rdi
callq 0x5a3a0
movq %r12, %rdi
callq 0x58260
nop