// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/gui/window/backends/xlib/windowxlib.cpp
// Function: smooth::GUI::WindowXLib::Maximize()
S::Int S::GUI::WindowXLib::Maximize()
{
	if (wnd == None) return Success();

	static Atom	 wmStateAtom		  = XInternAtom(display, "_NET_WM_STATE", False);
	static Atom	 wmStateMaximizedHorzAtom = XInternAtom(display, "_NET_WM_STATE_MAXIMIZED_HORZ", False);
	static Atom	 wmStateMaximizedVertAtom = XInternAtom(display, "_NET_WM_STATE_MAXIMIZED_VERT", False);

	static Atom	 wmStateMaximizedAtoms[2] = { wmStateMaximizedHorzAtom, wmStateMaximizedVertAtom };

	if (!maximized)
	{
		XChangeProperty(display, wnd, wmStateAtom, XA_ATOM, 32, PropModeAppend, (unsigned char *) wmStateMaximizedAtoms, 2);
		XFlush(display);
	}

	return Success();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, 0x138(%rax)
jne 0x12765a
leaq -0x20(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0x5ca80
movq -0x58(%rbp), %rdi
callq 0x59680
movl %eax, -0x4c(%rbp)
jmp 0x12762c
movl -0x4c(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x5a410
jmp 0x127885
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x5a410
jmp 0x127891
cmpb $0x0, 0xed4f7(%rip)     # 0x214b58
jne 0x1276aa
leaq 0xed4ee(%rip), %rdi     # 0x214b58
callq 0x5a4e0
cmpl $0x0, %eax
je 0x1276aa
movq -0x48(%rbp), %rax
movq 0x120(%rax), %rdi
leaq 0x7f371(%rip), %rsi     # 0x1a69f7
xorl %edx, %edx
callq 0x5c7a0
movq %rax, -0x60(%rbp)
jmp 0x127693
movq -0x60(%rbp), %rax
movq %rax, 0xed4b2(%rip)     # 0x214b50
leaq 0xed4b3(%rip), %rdi     # 0x214b58
callq 0x5b0c0
cmpb $0x0, 0xed4b7(%rip)     # 0x214b68
jne 0x1276fa
leaq 0xed4ae(%rip), %rdi     # 0x214b68
callq 0x5a4e0
cmpl $0x0, %eax
je 0x1276fa
movq -0x48(%rbp), %rax
movq 0x120(%rax), %rdi
leaq 0x7f32f(%rip), %rsi     # 0x1a6a05
xorl %edx, %edx
callq 0x5c7a0
movq %rax, -0x68(%rbp)
jmp 0x1276e3
movq -0x68(%rbp), %rax
movq %rax, 0xed472(%rip)     # 0x214b60
leaq 0xed473(%rip), %rdi     # 0x214b68
callq 0x5b0c0
cmpb $0x0, 0xed477(%rip)     # 0x214b78
jne 0x12774a
leaq 0xed46e(%rip), %rdi     # 0x214b78
callq 0x5a4e0
cmpl $0x0, %eax
je 0x12774a
movq -0x48(%rbp), %rax
movq 0x120(%rax), %rdi
leaq 0x7f2fc(%rip), %rsi     # 0x1a6a22
xorl %edx, %edx
callq 0x5c7a0
movq %rax, -0x70(%rbp)
jmp 0x127733
movq -0x70(%rbp), %rax
movq %rax, 0xed432(%rip)     # 0x214b70
leaq 0xed433(%rip), %rdi     # 0x214b78
callq 0x5b0c0
cmpb $0x0, 0xed43f(%rip)     # 0x214b90
jne 0x12778c
leaq 0xed436(%rip), %rdi     # 0x214b90
callq 0x5a4e0
cmpl $0x0, %eax
je 0x12778c
movq 0xed3f5(%rip), %rax     # 0x214b60
movq %rax, 0xed40e(%rip)     # 0x214b80
movq 0xed3f7(%rip), %rax     # 0x214b70
movq %rax, 0xed408(%rip)     # 0x214b88
leaq 0xed409(%rip), %rdi     # 0x214b90
callq 0x5b0c0
movq -0x48(%rbp), %rax
testb $0x1, 0x1a0(%rax)
jne 0x127842
movq -0x48(%rbp), %rax
movq 0x120(%rax), %rdi
movq 0x138(%rax), %rsi
movq 0xed39a(%rip), %rdx     # 0x214b50
movl $0x4, %ecx
movl $0x20, %r8d
movl $0x2, %r9d
leaq 0xed3b2(%rip), %rax     # 0x214b80
movq %rax, (%rsp)
movl $0x2, 0x8(%rsp)
callq 0x5beb0
movq -0x48(%rbp), %rax
movq 0x120(%rax), %rdi
callq 0x5a0d0
jmp 0x127842
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq 0xed354(%rip), %rdi     # 0x214b58
callq 0x5a860
jmp 0x127891
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq 0xed347(%rip), %rdi     # 0x214b68
callq 0x5a860
jmp 0x127891
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq 0xed33d(%rip), %rdi     # 0x214b78
callq 0x5a860
jmp 0x127891
leaq -0x40(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x5ca80
movq -0x80(%rbp), %rdi
callq 0x59680
movl %eax, -0x74(%rbp)
jmp 0x12785d
movl -0x74(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x5a410
jmp 0x127885
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x5a410
jmp 0x127891
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x5b6b0
nopw (%rax,%rax)