// File: /workspace/github_c_makefile_star2_O2/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 0x58bf0
leaq 0xae8e5(%rip), %rax     # 0x15f838
movq %rax, (%rbx)
leaq 0x90(%rbx), %rdi
movq %rdi, 0x50(%rsp)
movq %rbx, (%rsp)
callq 0xaf998
xorps %xmm0, %xmm0
movups %xmm0, 0x80(%rbx)
testq %r14, %r14
je 0xb13a2
movl $0x6d8, %edi            # imm = 0x6D8
callq 0x56700
movq %rax, %r12
leaq 0x51c1b(%rip), %rsi     # 0x102bad
leaq 0x28(%rsp), %rdi
callq 0x58c40
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rcx
movq (%rsp), %rsi
movq %r14, %rdx
callq 0x57590
leaq 0x51bfa(%rip), %rsi     # 0x102bb3
leaq 0x58(%rsp), %rdi
callq 0x58c40
leaq 0x70(%rsp), %rdi
leaq 0x58(%rsp), %rcx
movq (%rsp), %rsi
movq %r14, %rdx
callq 0x57590
leaq 0x70(%rsp), %rdi
callq 0x57a10
movq %rax, %rbx
leaq 0x51bce(%rip), %rsi     # 0x102bbb
leaq 0x88(%rsp), %rdi
callq 0x58c40
leaq 0xa0(%rsp), %rdi
leaq 0x88(%rsp), %rcx
movq (%rsp), %rsi
movq %r14, %rdx
callq 0x57590
leaq 0xa0(%rsp), %rdi
callq 0x57a10
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 0x581a0
leaq 0x80(%rbx), %rax
movq %rax, 0x40(%rsp)
movq %r12, (%rax)
leaq 0xa0(%rsp), %rdi
callq 0x5a588
leaq 0x88(%rsp), %rdi
callq 0x5a588
leaq 0x70(%rsp), %rdi
callq 0x5a588
leaq 0x58(%rsp), %rdi
callq 0x5a588
leaq 0x8(%rsp), %rdi
callq 0x5a588
leaq 0x28(%rsp), %rdi
callq 0x5a588
leaq 0x51b18(%rip), %rsi     # 0x102bc3
leaq 0x28(%rsp), %rdi
callq 0x58c40
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rcx
movq %rbx, %rsi
movq %r14, %rdx
callq 0x57590
leaq 0x51601(%rip), %rsi     # 0x1026d2
leaq 0x8(%rsp), %rdi
callq 0x5a420
testb %al, %al
je 0xb117e
leaq 0x51ad9(%rip), %rsi     # 0x102bc3
leaq 0x58(%rsp), %rdi
callq 0x58c40
leaq 0x70(%rsp), %rdi
leaq 0x58(%rsp), %rcx
movq (%rsp), %rsi
movq %r14, %rdx
callq 0x57590
leaq 0x68ab2(%rip), %rsi     # 0x119bc3
leaq 0x70(%rsp), %rdi
callq 0x5a420
movl %eax, %ebx
leaq 0x70(%rsp), %rdi
callq 0x5a588
leaq 0x58(%rsp), %rdi
callq 0x5a588
leaq 0x8(%rsp), %rdi
callq 0x5a588
leaq 0x28(%rsp), %rdi
callq 0x5a588
testb %bl, %bl
je 0xb1192
movl $0x5c8, %edi            # imm = 0x5C8
callq 0x56700
movq %rax, %rbx
pushq $0x7
popq %rsi
movq %rax, %rdi
callq 0x57490
movq (%rsp), %rax
movq %rbx, 0x88(%rax)
movq 0x80(%rax), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x30(%rax)
jmp 0xb1192
leaq 0x8(%rsp), %rdi
callq 0x5a588
leaq 0x28(%rsp), %rdi
callq 0x5a588
leaq 0x51a35(%rip), %rsi     # 0x102bce
leaq 0x28(%rsp), %rdi
callq 0x58c40
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rcx
movq (%rsp), %rsi
movq %r14, %rdx
callq 0x57590
leaq 0x51a17(%rip), %rsi     # 0x102bd7
leaq 0x8(%rsp), %rdi
callq 0x59180
movl %eax, %ebx
leaq 0x8(%rsp), %rdi
callq 0x5a588
leaq 0x28(%rsp), %rdi
callq 0x5a588
testb %bl, %bl
je 0xb11f1
movq 0x40(%rsp), %rax
movq (%rax), %rdi
callq 0x56130
leaq 0x519d6(%rip), %rsi     # 0x102bce
leaq 0x28(%rsp), %rdi
callq 0x58c40
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rcx
movq (%rsp), %rsi
movq %r14, %rdx
callq 0x57590
leaq 0x519c2(%rip), %rsi     # 0x102be1
leaq 0x8(%rsp), %rdi
callq 0x59180
movl %eax, %ebx
leaq 0x8(%rsp), %rdi
callq 0x5a588
leaq 0x28(%rsp), %rdi
callq 0x5a588
testb %bl, %bl
je 0xb1250
movq 0x40(%rsp), %rax
movq (%rax), %rdi
callq 0x598c0
movq %r14, 0x48(%rsp)
movl $0x0, 0x24(%rsp)
leaq 0x5198f(%rip), %r13     # 0x102bf3
leaq 0x8(%rsp), %rbx
movq 0x48(%rsp), %rdi
callq 0x57130
movl 0x24(%rsp), %esi
cmpl %eax, %esi
jge 0xb1359
movq 0x48(%rsp), %rdi
callq 0x590b0
movq %rax, %r15
movq %rax, %rdi
callq 0x58fd0
movq %rax, %rdi
leaq 0x5194d(%rip), %rsi     # 0x102beb
callq 0x59180
testb %al, %al
je 0xb1350
xorl %r14d, %r14d
movq %r15, %rdi
callq 0x57130
cmpl %eax, %r14d
jge 0xb1350
movq %r15, %rdi
movl %r14d, %esi
callq 0x590b0
movq %rax, %r12
movq %rax, %rdi
callq 0x58fd0
movq %rax, %rdi
movq %r13, %rsi
callq 0x59180
testb %al, %al
jne 0xb12ff
movq %r12, %rdi
callq 0x58fd0
movq %rax, %rdi
leaq 0x51905(%rip), %rsi     # 0x102bfb
callq 0x59180
testb %al, %al
je 0xb1348
movl $0xe0, %edi
callq 0x56700
movq %rax, %rbp
movq %rax, %rdi
movq %r12, %rsi
callq 0xafdb4
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 0xaf9ae
incl %r14d
jmp 0xb12ae
incl 0x24(%rsp)
jmp 0xb1269
movl $0xe0, %edi
callq 0x56700
movq %rax, %rbx
movq %rax, %rdi
movq 0x48(%rsp), %rsi
callq 0xaf4b8
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 0xaf9ae
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 0xb13eb
movq %rax, %r15
leaq 0x70(%rsp), %rdi
callq 0x5a588
jmp 0xb13d0
movq %rax, %r15
leaq 0x58(%rsp), %rdi
callq 0x5a588
jmp 0xb1408
jmp 0xb1405
jmp 0xb14c1
movq %rax, %r15
movl $0xe0, %esi
movq %rbx, %rdi
jmp 0xb14b6
jmp 0xb1405
jmp 0xb1414
jmp 0xb14c1
jmp 0xb1405
jmp 0xb1414
jmp 0xb14c1
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x5a588
jmp 0xb1417
movq %rax, %r15
leaq 0x28(%rsp), %rdi
callq 0x5a588
jmp 0xb14c4
jmp 0xb14c1
jmp 0xb142d
movq %rax, %r15
leaq 0xa0(%rsp), %rdi
callq 0x5a588
jmp 0xb1442
movq %rax, %r15
leaq 0x88(%rsp), %rdi
callq 0x5a588
jmp 0xb1456
jmp 0xb1453
movq %rax, %r15
leaq 0x70(%rsp), %rdi
callq 0x5a588
leaq 0x58(%rsp), %rdi
callq 0x5a588
leaq 0x8(%rsp), %rdi
callq 0x5a588
leaq 0x28(%rsp), %rdi
callq 0x5a588
movl $0x6d8, %esi            # imm = 0x6D8
movq %r12, %rdi
jmp 0xb14b6
movq %rax, %r15
jmp 0xb1460
movq %rax, %r15
jmp 0xb146a
movq %rax, %r15
jmp 0xb1474
movq %rax, %r15
jmp 0xb147e
movq %rax, %r15
jmp 0xb14ce
jmp 0xb14c1
jmp 0xb14c1
jmp 0xb14c1
jmp 0xb14c1
jmp 0xb14c1
movq %rax, %r15
movl $0xe0, %esi
movq %rbp, %rdi
callq 0x564c0
jmp 0xb14c4
jmp 0xb14c1
jmp 0xb14c1
movq %rax, %r15
movq 0x50(%rsp), %rdi
callq 0x5c22c
movq (%rsp), %rdi
callq 0x5a3a0
movq %r15, %rdi
callq 0x58260
nop