#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_2__;
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
typedef int /*<<< orphan*/ XTextProperty;
typedef int /*<<< orphan*/ XSizeHints;
struct TYPE_4__ {
  int x;
  int y;
  int width;
  int height;
};
struct TYPE_5__ {
  int type;
  TYPE_1__ xconfigure;
};
typedef TYPE_2__ XEvent;
typedef int /*<<< orphan*/ Window;
typedef int /*<<< orphan*/ Display;
typedef int /*<<< orphan*/ Atom;

/* Variables and functions */
#define ConfigureNotify 129
int /*<<< orphan*/ CopyFromParent;
#define Expose 128
int ExposureMask;
int /*<<< orphan*/ False;
int /*<<< orphan*/ PropModeAppend;
int /*<<< orphan*/ RootWindow(int /*<<< orphan*/ *, int /*<<< orphan*/);
int StructureNotifyMask;
int /*<<< orphan*/ WhitePixel(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ XChangeProperty(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                   int /*<<< orphan*/, int /*<<< orphan*/, int,
                                   int /*<<< orphan*/, char *,
                                   int /*<<< orphan*/);
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*/ XInternAtom(int /*<<< orphan*/ *, char *,
                               int /*<<< orphan*/);
int /*<<< orphan*/ XMapWindow(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ XNextEvent(int /*<<< orphan*/ *, TYPE_2__ *);
int /*<<< orphan*/ *XOpenDisplay(int /*<<< orphan*/ *);
int /*<<< orphan*/ XSelectInput(int /*<<< orphan*/ *, int /*<<< orphan*/, int);
int /*<<< orphan*/ XSetWindowBackground(int /*<<< orphan*/ *,
                                        int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strlen(char *);
int main(int argc, char **argv) {
  Display *display;
  Window win;
  XEvent report;
  int x = 10, y = 10, h = 100, w = 400;
  XSizeHints size;
  XTextProperty name;
  Atom nameprop, nameenc;
  if (argc < 2)
    return 1;
  display = XOpenDisplay(NULL);
  if (display == NULL) {
    fprintf(stderr, "couldn't connect to X server :0\n");
    return 0;
  }
  if (argc > 2)
    nameprop = XInternAtom(display, argv[2], False);
  else
    nameprop = XInternAtom(display, "WM_NAME", False);
  if (argc > 3)
    nameenc = XInternAtom(display, argv[3], False);
  else
    nameenc = XInternAtom(display, "STRING", False);
  win = XCreateWindow(display, RootWindow(display, 0), x, y, w, h, 10,
                      CopyFromParent, CopyFromParent, CopyFromParent, 0, NULL);
  XSetWindowBackground(display, win, WhitePixel(display, 0));
  XChangeProperty(display, win, nameprop, nameenc, 8, PropModeAppend, argv[1],
                  strlen(argv[1]));
  XFlush(display);
  XMapWindow(display, win);
  XSelectInput(display, win, ExposureMask | StructureNotifyMask);
  while (1) {
    XNextEvent(display, &report);
    switch (report.type) {
    case Expose:
      printf("exposed\n");
      break;
    case ConfigureNotify:
      x = report.xconfigure.x;
      y = report.xconfigure.y;
      w = report.xconfigure.width;
      h = report.xconfigure.height;
      printf("confignotify %i,%i-%ix%i\n", x, y, w, h);
      break;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0xc8,%rsp
movl   $0x0,-0xc(%rbp)
mov    %edi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0xa,-0x3c(%rbp)
movl   $0xa,-0x40(%rbp)
movl   $0x64,-0x44(%rbp)
movl   $0x190,-0x48(%rbp)
cmpl   $0x2,-0x10(%rbp)
jge    122c <main+0x4c>
movl   $0x1,-0xc(%rbp)
jmp    14bf <main+0x2df>
xor    %eax,%eax
mov    %eax,%edi
call   1060 <XOpenDisplay@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1265 <main+0x85>
mov    0x2d7d(%rip),%rax
mov    (%rax),%edi
lea    0xdac(%rip),%rsi
call   1070 <fprintf@plt>
movl   $0x0,-0xc(%rbp)
jmp    14bf <main+0x2df>
cmpl   $0x2,-0x10(%rbp)
jle    1291 <main+0xb1>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%rsi
mov    0x2d66(%rip),%rax
mov    (%rax),%edx
call   1090 <XInternAtom@plt>
mov    %eax,-0x54(%rbp)
jmp    12ad <main+0xcd>
mov    -0x20(%rbp),%rdi
mov    0x2d4c(%rip),%rax
mov    (%rax),%edx
lea    0xd7c(%rip),%rsi
call   1090 <XInternAtom@plt>
mov    %eax,-0x54(%rbp)
cmpl   $0x3,-0x10(%rbp)
jle    12d9 <main+0xf9>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    0x18(%rax),%rsi
mov    0x2d1e(%rip),%rax
mov    (%rax),%edx
call   1090 <XInternAtom@plt>
mov    %eax,-0x58(%rbp)
jmp    12f5 <main+0x115>
mov    -0x20(%rbp),%rdi
mov    0x2d04(%rip),%rax
mov    (%rax),%edx
lea    0xd3c(%rip),%rsi
call   1090 <XInternAtom@plt>
mov    %eax,-0x58(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x90(%rbp)
mov    -0x20(%rbp),%rdi
xor    %esi,%esi
call   10c0 <RootWindow@plt>
mov    -0x90(%rbp),%rdi
mov    %eax,%esi
mov    -0x3c(%rbp),%edx
mov    -0x40(%rbp),%ecx
mov    -0x48(%rbp),%r8d
mov    -0x44(%rbp),%r9d
mov    0x2c8f(%rip),%rax
mov    (%rax),%r11d
mov    0x2c85(%rip),%rax
mov    (%rax),%r10d
mov    0x2c7b(%rip),%rax
mov    (%rax),%eax
xor    %ebx,%ebx
xor    %ebx,%ebx
movl   $0xa,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
movl   $0x0,0x20(%rsp)
movq   $0x0,0x28(%rsp)
call   10b0 <XCreateWindow@plt>
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x7c(%rbp)
mov    -0x20(%rbp),%rdi
xor    %esi,%esi
call   1050 <WhitePixel@plt>
mov    -0x88(%rbp),%rdi
mov    -0x7c(%rbp),%esi
mov    %eax,%edx
call   1100 <XSetWindowBackground@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x78(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x70(%rbp)
mov    -0x54(%rbp),%eax
mov    %eax,-0x6c(%rbp)
mov    -0x58(%rbp),%eax
mov    %eax,-0x68(%rbp)
mov    0x2c21(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x64(%rbp)
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x60(%rbp)
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <strlen@plt>
mov    -0x78(%rbp),%rdi
mov    -0x70(%rbp),%esi
mov    -0x6c(%rbp),%edx
mov    -0x68(%rbp),%ecx
mov    -0x64(%rbp),%r9d
mov    -0x60(%rbp),%r10
mov    $0x8,%r8d
mov    %r10,(%rsp)
mov    %eax,0x8(%rsp)
call   10a0 <XChangeProperty@plt>
mov    -0x20(%rbp),%rdi
call   10e0 <XFlush@plt>
mov    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   10f0 <XMapWindow@plt>
mov    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    0x2b98(%rip),%rax
mov    (%rax),%edx
mov    0x2b9f(%rip),%rax
or     (%rax),%edx
call   10d0 <XSelectInput@plt>
mov    -0x20(%rbp),%rdi
lea    -0x38(%rbp),%rsi
call   1080 <XNextEvent@plt>
mov    -0x38(%rbp),%eax
mov    %eax,-0x94(%rbp)
sub    $0x80,%eax
je     1474 <main+0x294>
jmp    145e <main+0x27e>
mov    -0x94(%rbp),%eax
sub    $0x81,%eax
je     1487 <main+0x2a7>
jmp    14ba <main+0x2da>
lea    0xbb5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    14ba <main+0x2da>
mov    -0x34(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x30(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x28(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0x3c(%rbp),%esi
mov    -0x40(%rbp),%edx
mov    -0x48(%rbp),%ecx
mov    -0x44(%rbp),%r8d
lea    0xb86(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1438 <main+0x258>
mov    -0xc(%rbp),%eax
add    $0xc8,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    $0x1,%ebp
cmp    $0x2,%edi
jl     1262 <main+0x72>
mov    %rsi,%r14
mov    %edi,%r12d
xor    %ebp,%ebp
xor    %edi,%edi
call   1070 <XOpenDisplay@plt>
test   %rax,%rax
je     124d <main+0x5d>
mov    %rax,%rbx
cmp    $0x2,%r12d
jbe    1273 <main+0x83>
mov    0x10(%r14),%rsi
mov    0x2db8(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
call   10a0 <XInternAtom@plt>
cmp    $0x3,%r12d
mov    %eax,0xc(%rsp)
jne    1298 <main+0xa8>
lea    0xdde(%rip),%rsi
jmp    129c <main+0xac>
mov    0x2d74(%rip),%rax
mov    (%rax),%edi
lea    0xda3(%rip),%rsi
call   1080 <fprintf@plt>
mov    %ebp,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2d6e(%rip),%rax
mov    (%rax),%edx
lea    0xd9e(%rip),%rsi
mov    %rbx,%rdi
call   10a0 <XInternAtom@plt>
mov    %eax,0xc(%rsp)
lea    0xd93(%rip),%rsi
jmp    129c <main+0xac>
mov    0x18(%r14),%rsi
mov    0x2d45(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
call   10a0 <XInternAtom@plt>
mov    %eax,%r12d
mov    %rbx,%rdi
xor    %esi,%esi
call   10d0 <RootWindow@plt>
mov    0x2cf7(%rip),%rcx
mov    (%rcx),%ebp
mov    %rbx,%rdi
mov    %eax,%esi
mov    $0xa,%edx
mov    $0xa,%ecx
mov    $0x190,%r8d
mov    $0x64,%r9d
push   $0x0
push   $0x0
push   %rbp
push   %rbp
push   %rbp
push   $0xa
call   10c0 <XCreateWindow@plt>
add    $0x30,%rsp
mov    %eax,%r15d
mov    %rbx,%rdi
xor    %esi,%esi
call   1060 <WhitePixel@plt>
mov    %rbx,%rdi
mov    %r15d,%esi
mov    %eax,%edx
call   1110 <XSetWindowBackground@plt>
mov    0x2ccf(%rip),%rax
mov    (%rax),%r13d
mov    0x8(%r14),%rbp
mov    %rbp,%rdi
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %r15d,%esi
mov    0xc(%rsp),%edx
mov    %r12d,%ecx
mov    $0x8,%r8d
mov    %r13d,%r9d
push   %rax
push   %rbp
call   10b0 <XChangeProperty@plt>
add    $0x10,%rsp
mov    %rbx,%rdi
call   10f0 <XFlush@plt>
mov    %rbx,%rdi
mov    %r15d,%esi
call   1100 <XMapWindow@plt>
mov    0x2c65(%rip),%rax
mov    0x2c6e(%rip),%rcx
mov    (%rcx),%edx
or     (%rax),%edx
mov    %rbx,%rdi
mov    %r15d,%esi
call   10e0 <XSelectInput@plt>
lea    0x10(%rsp),%rbp
lea    0xcb3(%rip),%r14
lea    0xcc6(%rip),%r15
jmp    13ab <main+0x1bb>
cs nopw 0x0(%rax,%rax,1)
mov    0x14(%rsp),%esi
mov    0x18(%rsp),%edx
mov    0x1c(%rsp),%ecx
mov    0x20(%rsp),%r8d
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1090 <XNextEvent@plt>
mov    0x10(%rsp),%eax
cmp    $0x81,%eax
je     1390 <main+0x1a0>
cmp    $0x80,%eax
jne    13ab <main+0x1bb>
mov    %r15,%rdi
call   1030 <puts@plt>
jmp    13ab <main+0x1bb>

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

LLVM IR (-O2):
%struct.TYPE_5__ = type { i32, %struct.TYPE_4__ }
%struct.TYPE_4__ = type { i32, i32, i32, i32 }
@stderr = global i32 0
@.str = [33 x i8] c"couldn't connect to X server :0\0A\00"
@False = global i32 0
@.str.1 = [8 x i8] c"WM_NAME\00"
@.str.2 = [7 x i8] c"STRING\00"
@CopyFromParent = global i32 0
@PropModeAppend = global i32 0
@ExposureMask = global i32 0
@StructureNotifyMask = global i32 0
@.str.4 = [26 x i8] c"confignotify %i,%i-%ix%i\0A\00"
@str = [8 x i8] c"exposed\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.TYPE_5__
%4 = bitcast %struct.TYPE_5__* %3 to i8*
%5 = icmp slt i32 %0, 2
br i1 %5, label %64, label %6
6: ; preds = %2
%7 = tail call i32* @XOpenDisplay(i32* null)
%8 = icmp eq i32* %7, null
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* @stderr
%11 = tail call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
br label %64
12: ; preds = %6
%13 = icmp ugt i32 %0, 2
br i1 %13, label %17, label %14
14: ; preds = %12
%15 = load i32, i32* @False
%16 = tail call i32 @XInternAtom(i32* %7, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %15)
br label %26
17: ; preds = %12
%18 = getelementptr inbounds i8*, i8** %1, i64 2
%19 = load i8*, i8** %18
%20 = load i32, i32* @False
%21 = tail call i32 @XInternAtom(i32* %7, i8* %19, i32 %20)
%22 = icmp eq i32 %0, 3
br i1 %22, label %26, label %23
23: ; preds = %17
%24 = getelementptr inbounds i8*, i8** %1, i64 3
%25 = load i8*, i8** %24
br label %26
26: ; preds = %17, %14, %23
%27 = phi i8* [ %25, %23 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), %14 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), %17 ]
%28 = phi i32 [ %21, %23 ], [ %16, %14 ], [ %21, %17 ]
%29 = load i32, i32* @False
%30 = tail call i32 @XInternAtom(i32* %7, i8* %27, i32 %29)
%31 = tail call i32 @RootWindow(i32* %7, i32 0)
%32 = load i32, i32* @CopyFromParent
%33 = tail call i32 @XCreateWindow(i32* %7, i32 %31, i32 10, i32 10, i32 400, i32 100, i32 10, i32 %32, i32 %32, i32 %32, i32 0, i32* null)
%34 = tail call i32 @WhitePixel(i32* %7, i32 0)
%35 = tail call i32 @XSetWindowBackground(i32* %7, i32 %33, i32 %34)
%36 = load i32, i32* @PropModeAppend
%37 = getelementptr inbounds i8*, i8** %1, i64 1
%38 = load i8*, i8** %37
%39 = tail call i32 @strlen(i8* %38)
%40 = tail call i32 @XChangeProperty(i32* %7, i32 %33, i32 %28, i32 %30, i32 8, i32 %36, i8* %38, i32 %39)
%41 = tail call i32 @XFlush(i32* %7)
%42 = tail call i32 @XMapWindow(i32* %7, i32 %33)
%43 = load i32, i32* @ExposureMask
%44 = load i32, i32* @StructureNotifyMask
%45 = or i32 %44, %43
%46 = tail call i32 @XSelectInput(i32* %7, i32 %33, i32 %45)
%47 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %3, i64 0, i32 0
%48 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %3, i64 0, i32 1, i32 0
%49 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %3, i64 0, i32 1, i32 1
%50 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %3, i64 0, i32 1, i32 2
%51 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %3, i64 0, i32 1, i32 3
br label %52
52: ; preds = %55, %26
%53 = call i32 @XNextEvent(i32* %7, %struct.TYPE_5__* %3)
%54 = load i32, i32* %47
switch i32 %54, label %55 [
i32 128, label %56
i32 129, label %58
]
55: ; preds = %52, %58, %56
br label %52
56: ; preds = %52
%57 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
br label %55
58: ; preds = %52
%59 = load i32, i32* %48
%60 = load i32, i32* %49
%61 = load i32, i32* %50
%62 = load i32, i32* %51
%63 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 %59, i32 %60, i32 %61, i32 %62)
br label %55
64: ; preds = %2, %9
%65 = phi i32 [ 0, %9 ], [ 1, %2 ]
ret i32 %65
}