// File: /workspace/github_c_makefile_star2_O1/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 0xb3629(%rip), %rax     # 0x16a818
movq %rax, (%rbx)
leaq 0x90(%rbx), %rdi
movq %rdi, 0x50(%rsp)
movq %rbx, (%rsp)
callq 0x55d90
leaq 0xa95d2(%rip), %rax     # 0x1607e0
movq %rax, 0xd0(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0xd8(%rbx)
leaq 0xb335a(%rip), %rax     # 0x16a580
movq %rax, 0x90(%rbx)
movups %xmm0, 0x80(%rbx)
testq %r14, %r14
je 0xb7654
movl $0x6d8, %edi            # imm = 0x6D8
callq 0x556b0
movq %rax, %r12
leaq 0x5c8a8(%rip), %rsi     # 0x113af9
leaq 0x28(%rsp), %rdi
callq 0x579f0
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rcx
movq (%rsp), %rsi
movq %r14, %rdx
callq 0x56490
leaq 0x5c887(%rip), %rsi     # 0x113aff
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 0x5c85b(%rip), %rsi     # 0x113b07
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 0x5c7a5(%rip), %rsi     # 0x113b0f
leaq 0x28(%rsp), %rdi
callq 0x579f0
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rcx
movq %rbx, %rsi
movq %r14, %rdx
callq 0x56490
leaq 0x5c28d(%rip), %rsi     # 0x11361d
leaq 0x8(%rsp), %rdi
callq 0x590a0
movl %eax, %ebx
testb %al, %al
je 0xb73dc
leaq 0x5c768(%rip), %rsi     # 0x113b0f
leaq 0x58(%rsp), %rdi
callq 0x579f0
leaq 0x70(%rsp), %rdi
leaq 0x58(%rsp), %rcx
movq (%rsp), %rsi
movq %r14, %rdx
callq 0x56490
leaq 0x7389f(%rip), %rsi     # 0x12ac6d
leaq 0x70(%rsp), %rdi
callq 0x590a0
movl %eax, %ebp
jmp 0xb73de
xorl %ebp, %ebp
testb %bl, %bl
je 0xb73f6
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 %bpl, %bpl
je 0xb7444
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)
leaq 0x5c6cf(%rip), %rsi     # 0x113b1a
leaq 0x28(%rsp), %rdi
callq 0x579f0
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rcx
movq (%rsp), %rsi
movq %r14, %rdx
callq 0x56490
leaq 0x5c6b1(%rip), %rsi     # 0x113b23
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 0xb74a3
movq 0x40(%rsp), %rax
movq (%rax), %rdi
callq 0x55130
leaq 0x5c670(%rip), %rsi     # 0x113b1a
leaq 0x28(%rsp), %rdi
callq 0x579f0
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rcx
movq (%rsp), %rsi
movq %r14, %rdx
callq 0x56490
leaq 0x5c65c(%rip), %rsi     # 0x113b2d
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 0xb7502
movq 0x40(%rsp), %rax
movq (%rax), %rdi
callq 0x585d0
movq %r14, 0x48(%rsp)
movl $0x0, 0x24(%rsp)
leaq 0x5c629(%rip), %r13     # 0x113b3f
leaq 0x8(%rsp), %rbx
movq 0x48(%rsp), %rdi
callq 0x56050
movl 0x24(%rsp), %esi
cmpl %eax, %esi
jge 0xb760b
movq 0x48(%rsp), %rdi
callq 0x57e20
movq %rax, %r15
movq %rax, %rdi
callq 0x57d50
movq %rax, %rdi
leaq 0x5c5e7(%rip), %rsi     # 0x113b37
callq 0x57ef0
testb %al, %al
je 0xb7602
xorl %r14d, %r14d
movq %r15, %rdi
callq 0x56050
cmpl %eax, %r14d
jge 0xb7602
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 0xb75b1
movq %r12, %rdi
callq 0x57d50
movq %rax, %rdi
leaq 0x5c59f(%rip), %rsi     # 0x113b47
callq 0x57ef0
testb %al, %al
je 0xb75fa
movl $0xe0, %edi
callq 0x556b0
movq %rax, %rbp
movq %rax, %rdi
movq %r12, %rsi
callq 0xb5fc4
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 0x5af08
incl %r14d
jmp 0xb7560
incl 0x24(%rsp)
jmp 0xb751b
movl $0xe0, %edi
callq 0x556b0
movq %rax, %rbx
movq %rax, %rdi
movq 0x48(%rsp), %rsi
callq 0xb5658
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 0x5af08
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 0xb769d
movq %rax, %r15
leaq 0x70(%rsp), %rdi
callq 0x59200
jmp 0xb7682
movq %rax, %r15
leaq 0x58(%rsp), %rdi
callq 0x59200
jmp 0xb76ba
jmp 0xb76b7
jmp 0xb7773
movq %rax, %r15
movl $0xe0, %esi
movq %rbx, %rdi
jmp 0xb7768
jmp 0xb76b7
jmp 0xb76c6
jmp 0xb7773
jmp 0xb76b7
jmp 0xb76c6
jmp 0xb7773
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x59200
jmp 0xb76c9
movq %rax, %r15
leaq 0x28(%rsp), %rdi
callq 0x59200
jmp 0xb7776
jmp 0xb7773
jmp 0xb76df
movq %rax, %r15
leaq 0xa0(%rsp), %rdi
callq 0x59200
jmp 0xb76f4
movq %rax, %r15
leaq 0x88(%rsp), %rdi
callq 0x59200
jmp 0xb7708
jmp 0xb7705
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 0xb7768
movq %rax, %r15
jmp 0xb7712
movq %rax, %r15
jmp 0xb771c
movq %rax, %r15
jmp 0xb7726
movq %rax, %r15
jmp 0xb7730
movq %rax, %r15
jmp 0xb7780
jmp 0xb7773
jmp 0xb7773
jmp 0xb7773
jmp 0xb7773
jmp 0xb7773
movq %rax, %r15
movl $0xe0, %esi
movq %rbp, %rdi
callq 0x55480
jmp 0xb7776
jmp 0xb7773
jmp 0xb7773
movq %rax, %r15
movq 0x50(%rsp), %rdi
callq 0x5b11e
movq (%rsp), %rdi
callq 0x59020
movq %r15, %rdi
callq 0x57090
nop