// File: /workspace/github_c_makefile_star2_O0/kek[P]evilwm/new.c
// Function: get_wm_normal_hints
long get_wm_normal_hints(Client *c) {
	XSizeHints *size;
	long flags;
	long dummy;
	size = XAllocSizeHints();

	LOG_XENTER("XGetWMNormalHints(window=%lx)", c->window);
	XGetWMNormalHints(dpy, c->window, size, &dummy);
	debug_wm_normal_hints(size);
	LOG_XLEAVE();
	flags = size->flags;
	if (flags & PMinSize) {
		c->min_width = size->min_width;
		c->min_height = size->min_height;
	} else {
		c->min_width = c->min_height = 0;
	}
	if (flags & PMaxSize) {
		c->max_width = size->max_width;
		c->max_height = size->max_height;
	} else {
		c->max_width = c->max_height = 0;
	}
	if (flags & PBaseSize) {
		c->base_width = size->base_width;
		c->base_height = size->base_height;
	} else {
		c->base_width = c->min_width;
		c->base_height = c->min_height;
	}
	c->width_inc = c->height_inc = 1;
	if (flags & PResizeInc) {
		c->width_inc = size->width_inc ? size->width_inc : 1;
		c->height_inc = size->height_inc ? size->height_inc : 1;
	}
	if (!(flags & PMinSize)) {
		c->min_width = c->base_width + c->width_inc;
		c->min_height = c->base_height + c->height_inc;
	}
	if (flags & PWinGravity) {
		c->win_gravity_hint = size->win_gravity;
	} else {
		c->win_gravity_hint = NorthWestGravity;
	}
	c->win_gravity = c->win_gravity_hint;
	XFree(size);
	return flags;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
callq 0x3420
movq %rax, -0x10(%rbp)
leaq 0x6b74(%rip), %rax      # 0xf980
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rdx
leaq -0x20(%rbp), %rcx
callq 0x31c0
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
andq $0x10, %rax
cmpq $0x0, %rax
je 0x8e5a
movq -0x10(%rbp), %rax
movl 0x18(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x48(%rax)
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4c(%rax)
jmp 0x8e70
movq -0x8(%rbp), %rax
movl $0x0, 0x4c(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x48(%rax)
movq -0x18(%rbp), %rax
andq $0x20, %rax
cmpq $0x0, %rax
je 0x8e9c
movq -0x10(%rbp), %rax
movl 0x20(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x50(%rax)
movq -0x10(%rbp), %rax
movl 0x24(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x54(%rax)
jmp 0x8eb2
movq -0x8(%rbp), %rax
movl $0x0, 0x54(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x50(%rax)
movq -0x18(%rbp), %rax
andq $0x100, %rax            # imm = 0x100
cmpq $0x0, %rax
je 0x8ee0
movq -0x10(%rbp), %rax
movl 0x40(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x60(%rax)
movq -0x10(%rbp), %rax
movl 0x44(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x64(%rax)
jmp 0x8efc
movq -0x8(%rbp), %rax
movl 0x48(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x60(%rax)
movq -0x8(%rbp), %rax
movl 0x4c(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x64(%rax)
movq -0x8(%rbp), %rax
movl $0x1, 0x5c(%rax)
movq -0x8(%rbp), %rax
movl $0x1, 0x58(%rax)
movq -0x18(%rbp), %rax
andq $0x40, %rax
cmpq $0x0, %rax
je 0x8f74
movq -0x10(%rbp), %rax
cmpl $0x0, 0x28(%rax)
je 0x8f36
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, -0x24(%rbp)
jmp 0x8f40
movl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x8f40
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x58(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x2c(%rax)
je 0x8f60
movq -0x10(%rbp), %rax
movl 0x2c(%rax), %eax
movl %eax, -0x28(%rbp)
jmp 0x8f6a
movl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x8f6a
movl -0x28(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x5c(%rax)
movq -0x18(%rbp), %rax
andq $0x10, %rax
cmpq $0x0, %rax
jne 0x8fac
movq -0x8(%rbp), %rax
movl 0x60(%rax), %ecx
movq -0x8(%rbp), %rax
addl 0x58(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x48(%rax)
movq -0x8(%rbp), %rax
movl 0x64(%rax), %ecx
movq -0x8(%rbp), %rax
addl 0x5c(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4c(%rax)
movq -0x18(%rbp), %rax
andq $0x200, %rax            # imm = 0x200
cmpq $0x0, %rax
je 0x8fcc
movq -0x10(%rbp), %rax
movl 0x48(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x68(%rax)
jmp 0x8fd7
movq -0x8(%rbp), %rax
movl $0x1, 0x68(%rax)
movq -0x8(%rbp), %rax
movl 0x68(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x6c(%rax)
movq -0x10(%rbp), %rdi
callq 0x3220
movq -0x18(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)