// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/xml/xul/window.cpp
// Function: smooth::XML::XUL::Window::Window(smooth::XML::Node*)
S::XML::XUL::Window::Window(Node *node) : Widget(node)
{
	titlebar	= NIL;
	window		= NIL;

	if (node != NIL)
	{
		window = new GUI::Window(GetXMLAttributeValue(node, "title"), GUI::Point(GetXMLAttributeValue(node, "screenX").ToInt(), GetXMLAttributeValue(node, "screenY").ToInt()), GUI::Size(width, height));

		if (GetXMLAttributeValue(node, "hidechrome") != "true" && GetXMLAttributeValue(node, "hidechrome") != "1")
		{
			titlebar = new GUI::Titlebar();

			window->Add(titlebar);
		}

		if (GetXMLAttributeValue(node, "sizemode") == "maximized") window->Maximize();
		if (GetXMLAttributeValue(node, "sizemode") == "minimized") window->Minimize();

		for (Int i = 0; i < node->GetNOfNodes(); i++)
		{
			Node	*nNode = node->GetNthNode(i);

			if (nNode->GetName() == "toolbox")
			{
				for (Int j = 0; j < nNode->GetNOfNodes(); j++)
				{
					Node	*tNode = nNode->GetNthNode(j);

					if (tNode->GetName() == "menubar" || tNode->GetName() == "toolbar")
					{
						XUL::Menubar	*menu = new XUL::Menubar(tNode);

						window->Add(menu->GetWidget());

						widgets.Add(menu);
					}
				}
			}
		}

		XUL::Box	*box = new XUL::Box(node);

		window->Add(box->GetWidget());

		widgets.Add(box);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x579a0
leaq 0xb3659(%rip), %rax     # 0x169818
movq %rax, (%rbx)
leaq 0x90(%rbx), %rdi
movq %rdi, 0x50(%rsp)
movq %rbx, (%rsp)
callq 0x55d90
leaq 0xa9622(%rip), %rax     # 0x15f800
movq %rax, 0xd0(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0xd8(%rbx)
leaq 0xb338a(%rip), %rax     # 0x169580
movq %rax, 0x90(%rbx)
movups %xmm0, 0x80(%rbx)
testq %r14, %r14
je 0xb6633
movl $0x6d8, %edi            # imm = 0x6D8
callq 0x556b0
movq %rax, %r12
leaq 0x5ca9c(%rip), %rsi     # 0x112cbd
leaq 0x28(%rsp), %rdi
callq 0x579f0
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rcx
movq (%rsp), %rsi
movq %r14, %rdx
callq 0x56490
leaq 0x5ca7b(%rip), %rsi     # 0x112cc3
leaq 0x58(%rsp), %rdi
callq 0x579f0
leaq 0x70(%rsp), %rdi
leaq 0x58(%rsp), %rcx
movq (%rsp), %rsi
movq %r14, %rdx
callq 0x56490
leaq 0x70(%rsp), %rdi
callq 0x568c0
movq %rax, %rbx
leaq 0x5ca4f(%rip), %rsi     # 0x112ccb
leaq 0x88(%rsp), %rdi
callq 0x579f0
leaq 0xa0(%rsp), %rdi
leaq 0x88(%rsp), %rcx
movq (%rsp), %rsi
movq %r14, %rdx
callq 0x56490
leaq 0xa0(%rsp), %rdi
callq 0x568c0
leaq 0xc0(%rsp), %rdx
movl %ebx, (%rdx)
movl %eax, 0x4(%rdx)
movq (%rsp), %rbx
movq 0x2c(%rbx), %rax
leaq 0xb8(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
xorl %r8d, %r8d
callq 0x56fe0
leaq 0x80(%rbx), %rax
movq %rax, 0x40(%rsp)
movq %r12, (%rax)
leaq 0xa0(%rsp), %rdi
callq 0x59200
leaq 0x88(%rsp), %rdi
callq 0x59200
leaq 0x70(%rsp), %rdi
callq 0x59200
leaq 0x58(%rsp), %rdi
callq 0x59200
leaq 0x8(%rsp), %rdi
callq 0x59200
leaq 0x28(%rsp), %rdi
callq 0x59200
leaq 0x5c999(%rip), %rsi     # 0x112cd3
leaq 0x28(%rsp), %rdi
callq 0x579f0
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rcx
movq %rbx, %rsi
movq %r14, %rdx
callq 0x56490
leaq 0x5c482(%rip), %rsi     # 0x1127e2
leaq 0x8(%rsp), %rdi
callq 0x590a0
testb %al, %al
je 0xb640f
leaq 0x5c95a(%rip), %rsi     # 0x112cd3
leaq 0x58(%rsp), %rdi
callq 0x579f0
leaq 0x70(%rsp), %rdi
leaq 0x58(%rsp), %rcx
movq (%rsp), %rsi
movq %r14, %rdx
callq 0x56490
leaq 0x73af3(%rip), %rsi     # 0x129e93
leaq 0x70(%rsp), %rdi
callq 0x590a0
movl %eax, %ebx
leaq 0x70(%rsp), %rdi
callq 0x59200
leaq 0x58(%rsp), %rdi
callq 0x59200
leaq 0x8(%rsp), %rdi
callq 0x59200
leaq 0x28(%rsp), %rdi
callq 0x59200
testb %bl, %bl
je 0xb6423
movl $0x5c8, %edi            # imm = 0x5C8
callq 0x556b0
movq %rax, %rbx
movq %rax, %rdi
movl $0x7, %esi
callq 0x56390
movq (%rsp), %rax
movq %rbx, 0x88(%rax)
movq 0x80(%rax), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x30(%rax)
jmp 0xb6423
leaq 0x8(%rsp), %rdi
callq 0x59200
leaq 0x28(%rsp), %rdi
callq 0x59200
leaq 0x5c8b4(%rip), %rsi     # 0x112cde
leaq 0x28(%rsp), %rdi
callq 0x579f0
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rcx
movq (%rsp), %rsi
movq %r14, %rdx
callq 0x56490
leaq 0x5c896(%rip), %rsi     # 0x112ce7
leaq 0x8(%rsp), %rdi
callq 0x57ef0
movl %eax, %ebx
leaq 0x8(%rsp), %rdi
callq 0x59200
leaq 0x28(%rsp), %rdi
callq 0x59200
testb %bl, %bl
je 0xb6482
movq 0x40(%rsp), %rax
movq (%rax), %rdi
callq 0x55130
leaq 0x5c855(%rip), %rsi     # 0x112cde
leaq 0x28(%rsp), %rdi
callq 0x579f0
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rcx
movq (%rsp), %rsi
movq %r14, %rdx
callq 0x56490
leaq 0x5c841(%rip), %rsi     # 0x112cf1
leaq 0x8(%rsp), %rdi
callq 0x57ef0
movl %eax, %ebx
leaq 0x8(%rsp), %rdi
callq 0x59200
leaq 0x28(%rsp), %rdi
callq 0x59200
testb %bl, %bl
je 0xb64e1
movq 0x40(%rsp), %rax
movq (%rax), %rdi
callq 0x585d0
movq %r14, 0x48(%rsp)
movl $0x0, 0x24(%rsp)
leaq 0x5c80e(%rip), %r13     # 0x112d03
leaq 0x8(%rsp), %rbx
movq 0x48(%rsp), %rdi
callq 0x56050
movl 0x24(%rsp), %esi
cmpl %eax, %esi
jge 0xb65ea
movq 0x48(%rsp), %rdi
callq 0x57e20
movq %rax, %r15
movq %rax, %rdi
callq 0x57d50
movq %rax, %rdi
leaq 0x5c7cc(%rip), %rsi     # 0x112cfb
callq 0x57ef0
testb %al, %al
je 0xb65e1
xorl %r14d, %r14d
movq %r15, %rdi
callq 0x56050
cmpl %eax, %r14d
jge 0xb65e1
movq %r15, %rdi
movl %r14d, %esi
callq 0x57e20
movq %rax, %r12
movq %rax, %rdi
callq 0x57d50
movq %rax, %rdi
movq %r13, %rsi
callq 0x57ef0
testb %al, %al
jne 0xb6590
movq %r12, %rdi
callq 0x57d50
movq %rax, %rdi
leaq 0x5c784(%rip), %rsi     # 0x112d0b
callq 0x57ef0
testb %al, %al
je 0xb65d9
movl $0xe0, %edi
callq 0x556b0
movq %rax, %rbp
movq %rax, %rdi
movq %r12, %rsi
callq 0xb4f94
movq 0x40(%rsp), %rax
movq (%rax), %r12
movq (%rbp), %rax
movq %rbp, %rdi
callq *0x10(%rax)
movq (%r12), %rcx
movq %r12, %rdi
movq %rax, %rsi
callq *0x30(%rcx)
movq %rbp, 0x8(%rsp)
movq 0x50(%rsp), %rdi
movq %rbx, %rsi
callq 0x5aed8
incl %r14d
jmp 0xb653f
incl 0x24(%rsp)
jmp 0xb64fa
movl $0xe0, %edi
callq 0x556b0
movq %rax, %rbx
movq %rax, %rdi
movq 0x48(%rsp), %rsi
callq 0xb462c
movq 0x40(%rsp), %rax
movq (%rax), %r14
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq (%r14), %rcx
movq %r14, %rdi
movq %rax, %rsi
callq *0x30(%rcx)
leaq 0x8(%rsp), %rsi
movq %rbx, (%rsi)
movq 0x50(%rsp), %rdi
callq 0x5aed8
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movl $0x5c8, %esi            # imm = 0x5C8
jmp 0xb667c
movq %rax, %r15
leaq 0x70(%rsp), %rdi
callq 0x59200
jmp 0xb6661
movq %rax, %r15
leaq 0x58(%rsp), %rdi
callq 0x59200
jmp 0xb6699
jmp 0xb6696
jmp 0xb6752
movq %rax, %r15
movl $0xe0, %esi
movq %rbx, %rdi
jmp 0xb6747
jmp 0xb6696
jmp 0xb66a5
jmp 0xb6752
jmp 0xb6696
jmp 0xb66a5
jmp 0xb6752
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x59200
jmp 0xb66a8
movq %rax, %r15
leaq 0x28(%rsp), %rdi
callq 0x59200
jmp 0xb6755
jmp 0xb6752
jmp 0xb66be
movq %rax, %r15
leaq 0xa0(%rsp), %rdi
callq 0x59200
jmp 0xb66d3
movq %rax, %r15
leaq 0x88(%rsp), %rdi
callq 0x59200
jmp 0xb66e7
jmp 0xb66e4
movq %rax, %r15
leaq 0x70(%rsp), %rdi
callq 0x59200
leaq 0x58(%rsp), %rdi
callq 0x59200
leaq 0x8(%rsp), %rdi
callq 0x59200
leaq 0x28(%rsp), %rdi
callq 0x59200
movl $0x6d8, %esi            # imm = 0x6D8
movq %r12, %rdi
jmp 0xb6747
movq %rax, %r15
jmp 0xb66f1
movq %rax, %r15
jmp 0xb66fb
movq %rax, %r15
jmp 0xb6705
movq %rax, %r15
jmp 0xb670f
movq %rax, %r15
jmp 0xb675f
jmp 0xb6752
jmp 0xb6752
jmp 0xb6752
jmp 0xb6752
jmp 0xb6752
movq %rax, %r15
movl $0xe0, %esi
movq %rbp, %rdi
callq 0x55480
jmp 0xb6755
jmp 0xb6752
jmp 0xb6752
movq %rax, %r15
movq 0x50(%rsp), %rdi
callq 0x5b0ee
movq (%rsp), %rdi
callq 0x59020
movq %r15, %rdi
callq 0x57090