#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
struct TYPE_4__ {
  int /*<<< orphan*/ max_height;
  int /*<<< orphan*/ max_width;
  scalar_t__ min_height;
  scalar_t__ min_width;
  int /*<<< orphan*/ flags;
};
typedef TYPE_1__ XSizeHints;
typedef int /*<<< orphan*/ Window;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
int /*<<< orphan*/ INT_MAX;
int PMaxSize;
int PMinSize;
int /*<<< orphan*/ USSize;
int /*<<< orphan*/ XSetNormalHints(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                   TYPE_1__ *);
int /*<<< orphan*/ XSetWMSizeHints(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                   TYPE_1__ *, int);
int /*<<< orphan*/ printf(char *);
void unlockwindowsize(Display *d, Window w) {
  XSizeHints xsh;
  xsh.flags = USSize;
  xsh.min_width = xsh.min_height = 0;
  xsh.max_width = xsh.max_height = INT_MAX;
  XSetNormalHints(d, w, &xsh);
  XSetWMSizeHints(d, w, &xsh, PMinSize | PMaxSize);
  printf("Booyeah?\n");
}


x86 assembly (clang, -O0):
<unlockwindowsize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2e82(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
movq   $0x0,-0x28(%rbp)
movq   $0x0,-0x20(%rbp)
mov    0x2e7e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x30(%rbp)
mov    %eax,-0x2c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    -0x30(%rbp),%rdx
call   1040 <XSetNormalHints@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    0x2e48(%rip),%rax
mov    (%rax),%ecx
mov    0x2e67(%rip),%rax
or     (%rax),%ecx
lea    -0x30(%rbp),%rdx
call   1050 <XSetWMSizeHints@plt>
lea    0xe5d(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unlockwindowsize>:
push   %rbp
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %esi,%ebp
mov    %rdi,%rbx
mov    0x2e84(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x18(%rsp)
xorps  %xmm0,%xmm0
movups %xmm0,0x8(%rsp)
mov    0x2e87(%rip),%rax
mov    (%rax),%eax
mov    %eax,(%rsp)
mov    %eax,0x4(%rsp)
mov    %rsp,%r14
mov    %r14,%rdx
call   1040 <XSetNormalHints@plt>
mov    0x2e5c(%rip),%rax
mov    0x2e7d(%rip),%rcx
mov    (%rcx),%ecx
or     (%rax),%ecx
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
call   1050 <XSetWMSizeHints@plt>
lea    0xe6d(%rip),%rdi
call   1030 <puts@plt>
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { i32, i32, i64, i64, i32 }
@USSize = global i32 0
@INT_MAX = global i32 0
@PMinSize = global i32 0
@PMaxSize = global i32 0
@.str = [10 x i8] c"Booyeah?\0A\00"
define void @unlockwindowsize(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca %struct.TYPE_4__
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = load i32, i32* @USSize
%7 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %5, i32 0, i32 4
store i32 %6, i32* %7
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %5, i32 0, i32 2
store i64 0, i64* %8
%9 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %5, i32 0, i32 3
store i64 0, i64* %9
%10 = load i32, i32* @INT_MAX
%11 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %5, i32 0, i32 0
store i32 %10, i32* %11
%12 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %5, i32 0, i32 1
store i32 %10, i32* %12
%13 = load i32*, i32** %3
%14 = load i32, i32* %4
%15 = call i32 @XSetNormalHints(i32* %13, i32 %14, %struct.TYPE_4__* %5)
%16 = load i32*, i32** %3
%17 = load i32, i32* %4
%18 = load i32, i32* @PMinSize
%19 = load i32, i32* @PMaxSize
%20 = or i32 %18, %19
%21 = call i32 @XSetWMSizeHints(i32* %16, i32 %17, %struct.TYPE_4__* %5, i32 %20)
%22 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.TYPE_4__ = type { i32, i32, i64, i64, i32 }
@USSize = global i32 0
@INT_MAX = global i32 0
@PMinSize = global i32 0
@PMaxSize = global i32 0
@str = [9 x i8] c"Booyeah?\00"
define void @unlockwindowsize(i32* %0, i32 %1) {
%3 = alloca %struct.TYPE_4__
%4 = bitcast %struct.TYPE_4__* %3 to i8*
%5 = load i32, i32* @USSize
%6 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %3, i64 0, i32 4
store i32 %5, i32* %6
%7 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %3, i64 0, i32 2
%8 = bitcast i64* %7 to i8*
%9 = load i32, i32* @INT_MAX
%10 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %3, i64 0, i32 0
store i32 %9, i32* %10
%11 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %3, i64 0, i32 1
store i32 %9, i32* %11
%12 = call i32 @XSetNormalHints(i32* %0, i32 %1, %struct.TYPE_4__* %3)
%13 = load i32, i32* @PMinSize
%14 = load i32, i32* @PMaxSize
%15 = or i32 %14, %13
%16 = call i32 @XSetWMSizeHints(i32* %0, i32 %1, %struct.TYPE_4__* %3, i32 %15)
%17 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret void
}