#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_5__ TYPE_1__;

/* Type definitions */
struct TYPE_5__ {
  int /*<<< orphan*/ window_group;
  int /*<<< orphan*/ flags;
};
typedef TYPE_1__ XWMHints;
typedef int /*<<< orphan*/ XEvent;
typedef int /*<<< orphan*/ Window;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
int /*<<< orphan*/ BlackPixel(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ CopyFromParent;
int /*<<< orphan*/ DefaultScreen(int /*<<< orphan*/ *);
int /*<<< orphan*/ RootWindow(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ WhitePixel(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ WindowGroupHint;
TYPE_1__ *XAllocWMHints();
int /*<<< orphan*/ XCreateWindow(int /*<<< orphan*/ *, int /*<<< orphan*/, int,
                                 int, int, int, int, int /*<<< orphan*/,
                                 int /*<<< orphan*/, int /*<<< orphan*/,
                                 int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ XFlush(int /*<<< orphan*/ *);
int /*<<< orphan*/ XFree(TYPE_1__ *);
int /*<<< orphan*/ XMapWindow(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ XNextEvent(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ *XOpenDisplay(int /*<<< orphan*/ *);
int /*<<< orphan*/ XSetTransientForHint(int /*<<< orphan*/ *,
                                        int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ XSetWMHints(int /*<<< orphan*/ *, int /*<<< orphan*/,
                               TYPE_1__ *);
int /*<<< orphan*/ XSetWindowBackground(int /*<<< orphan*/ *,
                                        int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ stderr;
int main() {
  Display *display;
  Window parent, child1, child2, group;
  XEvent report;
  int x = 10, y = 10, h = 400, w = 400;
  XWMHints *hints;
  display = XOpenDisplay(NULL);
  if (display == NULL) {
    fprintf(stderr, "couldn't connect to X server :0\n");
    return 0;
  }
  group = XCreateWindow(display, RootWindow(display, 0), x, y, w, h, 10,
                        CopyFromParent, CopyFromParent, CopyFromParent, 0, 0);
  parent = XCreateWindow(display, RootWindow(display, 0), x, y, w, h, 10,
                         CopyFromParent, CopyFromParent, CopyFromParent, 0, 0);
  child1 =
      XCreateWindow(display, RootWindow(display, 0), x, y, w / 2, h / 2, 10,
                    CopyFromParent, CopyFromParent, CopyFromParent, 0, 0);
  child2 =
      XCreateWindow(display, RootWindow(display, 0), x, y, w / 2, h / 2, 10,
                    CopyFromParent, CopyFromParent, CopyFromParent, 0, 0);
  XSetWindowBackground(display, parent, WhitePixel(display, 0));
  XSetWindowBackground(display, child1, BlackPixel(display, 0));
  XSetWindowBackground(display, child2, WhitePixel(display, 0));
  hints = XAllocWMHints();
  hints->flags = WindowGroupHint;
  hints->window_group = group;
  XSetWMHints(display, parent, hints);
  XSetWMHints(display, child1, hints);
  XSetWMHints(display, child2, hints);
  XFree(hints);
  XSetTransientForHint(display, child1,
                       RootWindow(display, DefaultScreen(display)));
  XSetTransientForHint(display, child2, parent);
  XMapWindow(display, parent);
  XFlush(display);
  sleep(3);
  XMapWindow(display, child1);
  XFlush(display);
  sleep(3);
  XMapWindow(display, child2);
  while (1) {
    XNextEvent(display, &report);
  }
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0xe8,%rsp
movl   $0x0,-0xc(%rbp)
movl   $0xa,-0x30(%rbp)
movl   $0xa,-0x34(%rbp)
movl   $0x190,-0x38(%rbp)
movl   $0x190,-0x3c(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1070 <XOpenDisplay@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1268 <main+0x68>
mov    0x2d8a(%rip),%rax
mov    (%rax),%edi
lea    0xda9(%rip),%rsi
call   1080 <fprintf@plt>
xor    %eax,%eax
add    $0xe8,%rsp
pop    %rbx
pop    %rbp
ret
mov    -0x18(%rbp),%rax
mov    %rax,-0xc0(%rbp)
mov    -0x18(%rbp),%rdi
xor    %esi,%esi
call   10c0 <RootWindow@plt>
mov    -0xc0(%rbp),%rdi
mov    %eax,%esi
mov    -0x30(%rbp),%edx
mov    -0x34(%rbp),%ecx
mov    -0x3c(%rbp),%r8d
mov    -0x38(%rbp),%r9d
mov    0x2d34(%rip),%rax
mov    (%rax),%r11d
mov    0x2d2a(%rip),%rax
mov    (%rax),%r10d
mov    0x2d20(%rip),%rax
mov    (%rax),%eax
xor    %ebx,%ebx
movl   $0xa,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
movl   $0x0,0x20(%rsp)
movl   $0x0,0x28(%rsp)
call   10b0 <XCreateWindow@plt>
mov    %eax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0xb8(%rbp)
mov    -0x18(%rbp),%rdi
xor    %esi,%esi
call   10c0 <RootWindow@plt>
mov    -0xb8(%rbp),%rdi
mov    %eax,%esi
mov    -0x30(%rbp),%edx
mov    -0x34(%rbp),%ecx
mov    -0x3c(%rbp),%r8d
mov    -0x38(%rbp),%r9d
mov    0x2cbb(%rip),%rax
mov    (%rax),%r11d
mov    0x2cb1(%rip),%rax
mov    (%rax),%r10d
mov    0x2ca7(%rip),%rax
mov    (%rax),%eax
xor    %ebx,%ebx
movl   $0xa,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
movl   $0x0,0x20(%rsp)
movl   $0x0,0x28(%rsp)
call   10b0 <XCreateWindow@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0xb0(%rbp)
mov    -0x18(%rbp),%rdi
xor    %esi,%esi
call   10c0 <RootWindow@plt>
mov    -0xb0(%rbp),%rdi
mov    %eax,%esi
mov    -0x30(%rbp),%eax
mov    %eax,-0xa4(%rbp)
mov    -0x34(%rbp),%ecx
mov    -0x3c(%rbp),%eax
mov    $0x2,%r8d
cltd
idiv   %r8d
mov    %eax,%r8d
mov    -0x38(%rbp),%eax
mov    $0x2,%r9d
cltd
idiv   %r9d
mov    -0xa4(%rbp),%edx
mov    %eax,%r9d
mov    0x2c1e(%rip),%rax
mov    (%rax),%r11d
mov    0x2c14(%rip),%rax
mov    (%rax),%r10d
mov    0x2c0a(%rip),%rax
mov    (%rax),%eax
xor    %ebx,%ebx
movl   $0xa,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
movl   $0x0,0x20(%rsp)
movl   $0x0,0x28(%rsp)
call   10b0 <XCreateWindow@plt>
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0xa0(%rbp)
mov    -0x18(%rbp),%rdi
xor    %esi,%esi
call   10c0 <RootWindow@plt>
mov    -0xa0(%rbp),%rdi
mov    %eax,%esi
mov    -0x30(%rbp),%eax
mov    %eax,-0x94(%rbp)
mov    -0x34(%rbp),%ecx
mov    -0x3c(%rbp),%eax
mov    $0x2,%r8d
cltd
idiv   %r8d
mov    %eax,%r8d
mov    -0x38(%rbp),%eax
mov    $0x2,%r9d
cltd
idiv   %r9d
mov    -0x94(%rbp),%edx
mov    %eax,%r9d
mov    0x2b81(%rip),%rax
mov    (%rax),%r11d
mov    0x2b77(%rip),%rax
mov    (%rax),%r10d
mov    0x2b6d(%rip),%rax
mov    (%rax),%eax
xor    %ebx,%ebx
movl   $0xa,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
movl   $0x0,0x20(%rsp)
movl   $0x0,0x28(%rsp)
call   10b0 <XCreateWindow@plt>
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x90(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x84(%rbp)
mov    -0x18(%rbp),%rdi
xor    %esi,%esi
call   1060 <WhitePixel@plt>
mov    -0x90(%rbp),%rdi
mov    -0x84(%rbp),%esi
mov    %eax,%edx
call   1100 <XSetWindowBackground@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x74(%rbp)
mov    -0x18(%rbp),%rdi
xor    %esi,%esi
call   10d0 <BlackPixel@plt>
mov    -0x80(%rbp),%rdi
mov    -0x74(%rbp),%esi
mov    %eax,%edx
call   1100 <XSetWindowBackground@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x64(%rbp)
mov    -0x18(%rbp),%rdi
xor    %esi,%esi
call   1060 <WhitePixel@plt>
mov    -0x70(%rbp),%rdi
mov    -0x64(%rbp),%esi
mov    %eax,%edx
call   1100 <XSetWindowBackground@plt>
mov    $0x0,%al
call   1090 <XAllocWMHints@plt>
mov    %rax,-0x48(%rbp)
mov    0x2ac9(%rip),%rax
mov    (%rax),%ecx
mov    -0x48(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x28(%rbp),%ecx
mov    -0x48(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x48(%rbp),%rdx
call   1050 <XSetWMHints@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%esi
mov    -0x48(%rbp),%rdx
call   1050 <XSetWMHints@plt>
mov    -0x18(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    -0x48(%rbp),%rdx
call   1050 <XSetWMHints@plt>
mov    -0x48(%rbp),%rdi
call   1040 <XFree@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x18(%rbp),%rdi
call   1110 <DefaultScreen@plt>
mov    -0x60(%rbp),%rdi
mov    %eax,%esi
call   10c0 <RootWindow@plt>
mov    -0x58(%rbp),%rdi
mov    -0x4c(%rbp),%esi
mov    %eax,%edx
call   1030 <XSetTransientForHint@plt>
mov    -0x18(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    -0x1c(%rbp),%edx
call   1030 <XSetTransientForHint@plt>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   10f0 <XMapWindow@plt>
mov    -0x18(%rbp),%rdi
call   10e0 <XFlush@plt>
mov    $0x3,%edi
call   1120 <sleep@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%esi
call   10f0 <XMapWindow@plt>
mov    -0x18(%rbp),%rdi
call   10e0 <XFlush@plt>
mov    $0x3,%edi
call   1120 <sleep@plt>
mov    -0x18(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   10f0 <XMapWindow@plt>
mov    -0x18(%rbp),%rdi
lea    -0x2c(%rbp),%rsi
call   10a0 <XNextEvent@plt>
jmp    1603 <main+0x403>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
xor    %edi,%edi
call   1070 <XOpenDisplay@plt>
test   %rax,%rax
je     143d <main+0x23d>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
call   10c0 <RootWindow@plt>
mov    0x2da1(%rip),%r13
mov    0x0(%r13),%ebp
mov    %rbx,%rdi
mov    %eax,%esi
mov    $0xa,%edx
mov    $0xa,%ecx
mov    $0x190,%r8d
mov    $0x190,%r9d
push   $0x0
push   $0x0
push   %rbp
push   %rbp
push   %rbp
push   $0xa
call   10b0 <XCreateWindow@plt>
add    $0x30,%rsp
mov    %eax,%r14d
mov    %rbx,%rdi
xor    %esi,%esi
call   10c0 <RootWindow@plt>
mov    0x0(%r13),%ebp
mov    %rbx,%rdi
mov    %eax,%esi
mov    $0xa,%edx
mov    $0xa,%ecx
mov    $0x190,%r8d
mov    $0x190,%r9d
push   $0x0
push   $0x0
push   %rbp
push   %rbp
push   %rbp
push   $0xa
call   10b0 <XCreateWindow@plt>
add    $0x30,%rsp
mov    %eax,%r15d
mov    %rbx,%rdi
xor    %esi,%esi
call   10c0 <RootWindow@plt>
mov    0x0(%r13),%ebp
mov    %rbx,%rdi
mov    %eax,%esi
mov    $0xa,%edx
mov    $0xa,%ecx
mov    $0xc8,%r8d
mov    $0xc8,%r9d
push   $0x0
push   $0x0
push   %rbp
push   %rbp
push   %rbp
push   $0xa
call   10b0 <XCreateWindow@plt>
add    $0x30,%rsp
mov    %eax,%r12d
mov    %rbx,%rdi
xor    %esi,%esi
call   10c0 <RootWindow@plt>
mov    0x0(%r13),%ebp
mov    %rbx,%rdi
mov    %eax,%esi
mov    $0xa,%edx
mov    $0xa,%ecx
mov    $0xc8,%r8d
mov    $0xc8,%r9d
push   $0x0
push   $0x0
push   %rbp
push   %rbp
push   %rbp
push   $0xa
call   10b0 <XCreateWindow@plt>
add    $0x30,%rsp
mov    %eax,%r13d
mov    %rbx,%rdi
xor    %esi,%esi
call   1060 <WhitePixel@plt>
mov    %rbx,%rdi
mov    %r15d,%esi
mov    %eax,%edx
call   1100 <XSetWindowBackground@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   10d0 <BlackPixel@plt>
mov    %rbx,%rdi
mov    %r12d,%esi
mov    %eax,%edx
call   1100 <XSetWindowBackground@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1060 <WhitePixel@plt>
mov    %rbx,%rdi
mov    %r13d,%esi
mov    %eax,%edx
call   1100 <XSetWindowBackground@plt>
xor    %eax,%eax
call   1090 <XAllocWMHints@plt>
mov    %rax,%rbp
mov    0x2c7d(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x4(%rbp)
mov    %r14d,0x0(%rbp)
mov    %rbx,%rdi
mov    %r15d,%esi
mov    %rbp,%rdx
call   1050 <XSetWMHints@plt>
mov    %rbx,%rdi
mov    %r12d,%esi
mov    %rbp,%rdx
call   1050 <XSetWMHints@plt>
mov    %rbx,%rdi
mov    %r13d,%esi
mov    %rbp,%rdx
call   1050 <XSetWMHints@plt>
mov    %rbp,%rdi
call   1040 <XFree@plt>
mov    %rbx,%rdi
call   1110 <DefaultScreen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   10c0 <RootWindow@plt>
mov    %rbx,%rdi
mov    %r12d,%esi
mov    %eax,%edx
call   1030 <XSetTransientForHint@plt>
mov    %rbx,%rdi
mov    %r13d,%esi
mov    %r15d,%edx
call   1030 <XSetTransientForHint@plt>
mov    %rbx,%rdi
mov    %r15d,%esi
call   10f0 <XMapWindow@plt>
mov    %rbx,%rdi
call   10e0 <XFlush@plt>
mov    $0x3,%edi
call   1120 <sleep@plt>
mov    %rbx,%rdi
mov    %r12d,%esi
call   10f0 <XMapWindow@plt>
mov    %rbx,%rdi
call   10e0 <XFlush@plt>
mov    $0x3,%edi
call   1120 <sleep@plt>
mov    %rbx,%rdi
mov    %r13d,%esi
call   10f0 <XMapWindow@plt>
lea    0x4(%rsp),%rbp
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rbx,%rdi
mov    %rbp,%rsi
call   10a0 <XNextEvent@plt>
jmp    1430 <main+0x230>
mov    0x2b94(%rip),%rax
mov    (%rax),%edi
lea    0xbb3(%rip),%rsi
call   1080 <fprintf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.TYPE_5__ = type { i32, i32 }
@stderr = global i32 0
@.str = [33 x i8] c"couldn't connect to X server :0\0A\00"
@CopyFromParent = global i32 0
@WindowGroupHint = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca %struct.TYPE_5__*
store i32 0, i32* %1
store i32 10, i32* %8
store i32 10, i32* %9
store i32 400, i32* %10
store i32 400, i32* %11
%13 = call i32* @XOpenDisplay(i32* null)
store i32* %13, i32** %2
%14 = load i32*, i32** %2
%15 = icmp eq i32* %14, null
br i1 %15, label %16, label %19
16: ; preds = %0
%17 = load i32, i32* @stderr
%18 = call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret i32 0
19: ; preds = %0
%20 = load i32*, i32** %2
%21 = load i32*, i32** %2
%22 = call i32 @RootWindow(i32* %21, i32 0)
%23 = load i32, i32* %8
%24 = load i32, i32* %9
%25 = load i32, i32* %11
%26 = load i32, i32* %10
%27 = load i32, i32* @CopyFromParent
%28 = load i32, i32* @CopyFromParent
%29 = load i32, i32* @CopyFromParent
%30 = call i32 @XCreateWindow(i32* %20, i32 %22, i32 %23, i32 %24, i32 %25, i32 %26, i32 10, i32 %27, i32 %28, i32 %29, i32 0, i32 0)
store i32 %30, i32* %6
%31 = load i32*, i32** %2
%32 = load i32*, i32** %2
%33 = call i32 @RootWindow(i32* %32, i32 0)
%34 = load i32, i32* %8
%35 = load i32, i32* %9
%36 = load i32, i32* %11
%37 = load i32, i32* %10
%38 = load i32, i32* @CopyFromParent
%39 = load i32, i32* @CopyFromParent
%40 = load i32, i32* @CopyFromParent
%41 = call i32 @XCreateWindow(i32* %31, i32 %33, i32 %34, i32 %35, i32 %36, i32 %37, i32 10, i32 %38, i32 %39, i32 %40, i32 0, i32 0)
store i32 %41, i32* %3
%42 = load i32*, i32** %2
%43 = load i32*, i32** %2
%44 = call i32 @RootWindow(i32* %43, i32 0)
%45 = load i32, i32* %8
%46 = load i32, i32* %9
%47 = load i32, i32* %11
%48 = sdiv i32 %47, 2
%49 = load i32, i32* %10
%50 = sdiv i32 %49, 2
%51 = load i32, i32* @CopyFromParent
%52 = load i32, i32* @CopyFromParent
%53 = load i32, i32* @CopyFromParent
%54 = call i32 @XCreateWindow(i32* %42, i32 %44, i32 %45, i32 %46, i32 %48, i32 %50, i32 10, i32 %51, i32 %52, i32 %53, i32 0, i32 0)
store i32 %54, i32* %4
%55 = load i32*, i32** %2
%56 = load i32*, i32** %2
%57 = call i32 @RootWindow(i32* %56, i32 0)
%58 = load i32, i32* %8
%59 = load i32, i32* %9
%60 = load i32, i32* %11
%61 = sdiv i32 %60, 2
%62 = load i32, i32* %10
%63 = sdiv i32 %62, 2
%64 = load i32, i32* @CopyFromParent
%65 = load i32, i32* @CopyFromParent
%66 = load i32, i32* @CopyFromParent
%67 = call i32 @XCreateWindow(i32* %55, i32 %57, i32 %58, i32 %59, i32 %61, i32 %63, i32 10, i32 %64, i32 %65, i32 %66, i32 0, i32 0)
store i32 %67, i32* %5
%68 = load i32*, i32** %2
%69 = load i32, i32* %3
%70 = load i32*, i32** %2
%71 = call i32 @WhitePixel(i32* %70, i32 0)
%72 = call i32 @XSetWindowBackground(i32* %68, i32 %69, i32 %71)
%73 = load i32*, i32** %2
%74 = load i32, i32* %4
%75 = load i32*, i32** %2
%76 = call i32 @BlackPixel(i32* %75, i32 0)
%77 = call i32 @XSetWindowBackground(i32* %73, i32 %74, i32 %76)
%78 = load i32*, i32** %2
%79 = load i32, i32* %5
%80 = load i32*, i32** %2
%81 = call i32 @WhitePixel(i32* %80, i32 0)
%82 = call i32 @XSetWindowBackground(i32* %78, i32 %79, i32 %81)
%83 = call %struct.TYPE_5__* (...) @XAllocWMHints()
store %struct.TYPE_5__* %83, %struct.TYPE_5__** %12
%84 = load i32, i32* @WindowGroupHint
%85 = load %struct.TYPE_5__*, %struct.TYPE_5__** %12
%86 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %85, i32 0, i32 1
store i32 %84, i32* %86
%87 = load i32, i32* %6
%88 = load %struct.TYPE_5__*, %struct.TYPE_5__** %12
%89 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %88, i32 0, i32 0
store i32 %87, i32* %89
%90 = load i32*, i32** %2
%91 = load i32, i32* %3
%92 = load %struct.TYPE_5__*, %struct.TYPE_5__** %12
%93 = call i32 @XSetWMHints(i32* %90, i32 %91, %struct.TYPE_5__* %92)
%94 = load i32*, i32** %2
%95 = load i32, i32* %4
%96 = load %struct.TYPE_5__*, %struct.TYPE_5__** %12
%97 = call i32 @XSetWMHints(i32* %94, i32 %95, %struct.TYPE_5__* %96)
%98 = load i32*, i32** %2
%99 = load i32, i32* %5
%100 = load %struct.TYPE_5__*, %struct.TYPE_5__** %12
%101 = call i32 @XSetWMHints(i32* %98, i32 %99, %struct.TYPE_5__* %100)
%102 = load %struct.TYPE_5__*, %struct.TYPE_5__** %12
%103 = call i32 @XFree(%struct.TYPE_5__* %102)
%104 = load i32*, i32** %2
%105 = load i32, i32* %4
%106 = load i32*, i32** %2
%107 = load i32*, i32** %2
%108 = call i32 @DefaultScreen(i32* %107)
%109 = call i32 @RootWindow(i32* %106, i32 %108)
%110 = call i32 @XSetTransientForHint(i32* %104, i32 %105, i32 %109)
%111 = load i32*, i32** %2
%112 = load i32, i32* %5
%113 = load i32, i32* %3
%114 = call i32 @XSetTransientForHint(i32* %111, i32 %112, i32 %113)
%115 = load i32*, i32** %2
%116 = load i32, i32* %3
%117 = call i32 @XMapWindow(i32* %115, i32 %116)
%118 = load i32*, i32** %2
%119 = call i32 @XFlush(i32* %118)
%120 = call i32 @sleep(i32 3)
%121 = load i32*, i32** %2
%122 = load i32, i32* %4
%123 = call i32 @XMapWindow(i32* %121, i32 %122)
%124 = load i32*, i32** %2
%125 = call i32 @XFlush(i32* %124)
%126 = call i32 @sleep(i32 3)
%127 = load i32*, i32** %2
%128 = load i32, i32* %5
%129 = call i32 @XMapWindow(i32* %127, i32 %128)
br label %130
130: ; preds = %19, %130
%131 = load i32*, i32** %2
%132 = call i32 @XNextEvent(i32* %131, i32* %7)
br label %130
}

LLVM IR (-O2):
%struct.TYPE_5__ = type { i32, i32 }
@stderr = global i32 0
@.str = [33 x i8] c"couldn't connect to X server :0\0A\00"
@CopyFromParent = global i32 0
@WindowGroupHint = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32* @XOpenDisplay(i32* null)
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret i32 0
8: ; preds = %0
%9 = tail call i32 @RootWindow(i32* %3, i32 0)
%10 = load i32, i32* @CopyFromParent
%11 = tail call i32 @XCreateWindow(i32* %3, i32 %9, i32 10, i32 10, i32 400, i32 400, i32 10, i32 %10, i32 %10, i32 %10, i32 0, i32 0)
%12 = tail call i32 @RootWindow(i32* %3, i32 0)
%13 = load i32, i32* @CopyFromParent
%14 = tail call i32 @XCreateWindow(i32* %3, i32 %12, i32 10, i32 10, i32 400, i32 400, i32 10, i32 %13, i32 %13, i32 %13, i32 0, i32 0)
%15 = tail call i32 @RootWindow(i32* %3, i32 0)
%16 = load i32, i32* @CopyFromParent
%17 = tail call i32 @XCreateWindow(i32* %3, i32 %15, i32 10, i32 10, i32 200, i32 200, i32 10, i32 %16, i32 %16, i32 %16, i32 0, i32 0)
%18 = tail call i32 @RootWindow(i32* %3, i32 0)
%19 = load i32, i32* @CopyFromParent
%20 = tail call i32 @XCreateWindow(i32* %3, i32 %18, i32 10, i32 10, i32 200, i32 200, i32 10, i32 %19, i32 %19, i32 %19, i32 0, i32 0)
%21 = tail call i32 @WhitePixel(i32* %3, i32 0)
%22 = tail call i32 @XSetWindowBackground(i32* %3, i32 %14, i32 %21)
%23 = tail call i32 @BlackPixel(i32* %3, i32 0)
%24 = tail call i32 @XSetWindowBackground(i32* %3, i32 %17, i32 %23)
%25 = tail call i32 @WhitePixel(i32* %3, i32 0)
%26 = tail call i32 @XSetWindowBackground(i32* %3, i32 %20, i32 %25)
%27 = tail call %struct.TYPE_5__* (...) @XAllocWMHints()
%28 = load i32, i32* @WindowGroupHint
%29 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %27, i64 0, i32 1
store i32 %28, i32* %29
%30 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %27, i64 0, i32 0
store i32 %11, i32* %30
%31 = tail call i32 @XSetWMHints(i32* %3, i32 %14, %struct.TYPE_5__* %27)
%32 = tail call i32 @XSetWMHints(i32* %3, i32 %17, %struct.TYPE_5__* %27)
%33 = tail call i32 @XSetWMHints(i32* %3, i32 %20, %struct.TYPE_5__* %27)
%34 = tail call i32 @XFree(%struct.TYPE_5__* %27)
%35 = tail call i32 @DefaultScreen(i32* %3)
%36 = tail call i32 @RootWindow(i32* %3, i32 %35)
%37 = tail call i32 @XSetTransientForHint(i32* %3, i32 %17, i32 %36)
%38 = tail call i32 @XSetTransientForHint(i32* %3, i32 %20, i32 %14)
%39 = tail call i32 @XMapWindow(i32* %3, i32 %14)
%40 = tail call i32 @XFlush(i32* %3)
%41 = tail call i32 @sleep(i32 3)
%42 = tail call i32 @XMapWindow(i32* %3, i32 %17)
%43 = tail call i32 @XFlush(i32* %3)
%44 = tail call i32 @sleep(i32 3)
%45 = tail call i32 @XMapWindow(i32* %3, i32 %20)
br label %46
46: ; preds = %46, %8
%47 = call i32 @XNextEvent(i32* %3, i32* %1)
br label %46
}