#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_21__ TYPE_8__;
typedef struct TYPE_20__ TYPE_6__;
typedef struct TYPE_19__ TYPE_5__;
typedef struct TYPE_18__ TYPE_4__;
typedef struct TYPE_17__ TYPE_3__;
typedef struct TYPE_16__ TYPE_2__;
typedef struct TYPE_15__ TYPE_1__;

/* Type definitions */
struct TYPE_15__ {
  int member_0;
  int member_1;
  int member_2;
  int member_3;
};
typedef TYPE_1__ xcb_segment_t;
struct TYPE_16__ {
  int black_pixel;
  int white_pixel;
  int /*<<< orphan*/ root_visual;
  void *root;
};
typedef TYPE_2__ xcb_screen_t;
struct TYPE_17__ {
  int member_0;
  int member_1;
  int member_2;
  int member_3;
};
typedef TYPE_3__ xcb_rectangle_t;
struct TYPE_18__ {
  int member_0;
  int member_1;
};
typedef TYPE_4__ xcb_point_t;
struct TYPE_19__ {
  int response_type;
};
typedef TYPE_5__ xcb_generic_event_t;
typedef void *xcb_gcontext_t;
typedef void *xcb_drawable_t;
typedef int /*<<< orphan*/ xcb_connection_t;
struct TYPE_20__ {
  int member_0;
  int member_1;
  int member_2;
  int member_3;
  int member_5;
  int /*<<< orphan*/ member_4;
};
typedef TYPE_6__ xcb_arc_t;
typedef int uint32_t;
struct TYPE_21__ {
  TYPE_2__ *data;
};

/* Variables and functions */
int /*<<< orphan*/ XCB_COORD_MODE_ORIGIN;
int /*<<< orphan*/ XCB_COORD_MODE_PREVIOUS;
int /*<<< orphan*/ XCB_COPY_FROM_PARENT;
int XCB_CW_BACK_PIXEL;
int XCB_CW_EVENT_MASK;
int XCB_EVENT_MASK_EXPOSURE;
#define XCB_EXPOSE 128
int XCB_GC_FOREGROUND;
int XCB_GC_GRAPHICS_EXPOSURES;
int /*<<< orphan*/ XCB_WINDOW_CLASS_INPUT_OUTPUT;
int /*<<< orphan*/ free(TYPE_5__ *);
int /*<<< orphan*/ *xcb_connect(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ xcb_create_gc(int /*<<< orphan*/ *, void *, void *, int,
                                 int *);
int /*<<< orphan*/ xcb_create_window(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                     void *, void *, int /*<<< orphan*/,
                                     int /*<<< orphan*/, int, int, int,
                                     int /*<<< orphan*/, int /*<<< orphan*/,
                                     int, int *);
int /*<<< orphan*/ xcb_flush(int /*<<< orphan*/ *);
void *xcb_generate_id(int /*<<< orphan*/ *);
int /*<<< orphan*/ xcb_get_setup(int /*<<< orphan*/ *);
int /*<<< orphan*/ xcb_map_window(int /*<<< orphan*/ *, void *);
int /*<<< orphan*/ xcb_poly_arc(int /*<<< orphan*/ *, void *, void *, int,
                                TYPE_6__ *);
int /*<<< orphan*/ xcb_poly_line(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                 void *, void *, int, TYPE_4__ *);
int /*<<< orphan*/ xcb_poly_point(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                  void *, void *, int, TYPE_4__ *);
int /*<<< orphan*/ xcb_poly_rectangle(int /*<<< orphan*/ *, void *, void *, int,
                                      TYPE_3__ *);
int /*<<< orphan*/ xcb_poly_segment(int /*<<< orphan*/ *, void *, void *, int,
                                    TYPE_1__ *);
TYPE_8__ xcb_setup_roots_iterator(int /*<<< orphan*/);
TYPE_5__ *xcb_wait_for_event(int /*<<< orphan*/ *);
int main() {
  xcb_point_t points[] = {{10, 10}, {10, 20}, {20, 10}, {20, 20}};
  xcb_point_t polyline[] = {{50, 10}, {5, 20}, {25, -20}, {10, 10}};
  xcb_segment_t segments[] = {{100, 10, 140, 30}, {110, 25, 130, 60}};
  xcb_rectangle_t rectangles[] = {{10, 50, 40, 20}, {80, 50, 10, 40}};
  xcb_arc_t arcs[] = {{10, 100, 60, 40, 0, 90 << 6},
                      {90, 100, 55, 40, 0, 270 << 6}};
  xcb_connection_t *connection = xcb_connect(NULL, NULL);
  xcb_screen_t *screen =
      xcb_setup_roots_iterator(xcb_get_setup(connection)).data;
  xcb_drawable_t window = screen->root;
  xcb_gcontext_t foreground = xcb_generate_id(connection);
  uint32_t mask = XCB_GC_FOREGROUND | XCB_GC_GRAPHICS_EXPOSURES;
  uint32_t values[2] = {screen->black_pixel, 0};
  xcb_create_gc(connection, foreground, window, mask, values);
  window = xcb_generate_id(connection);
  mask = XCB_CW_BACK_PIXEL | XCB_CW_EVENT_MASK;
  values[0] = screen->white_pixel;
  values[1] = XCB_EVENT_MASK_EXPOSURE;
  xcb_create_window(connection, XCB_COPY_FROM_PARENT, window, screen->root, 0,
                    0, 150, 150, 10, XCB_WINDOW_CLASS_INPUT_OUTPUT,
                    screen->root_visual, mask, values);
  xcb_map_window(connection, window);
  xcb_flush(connection);
  xcb_generic_event_t *event;
  while (event = xcb_wait_for_event(connection)) {
    switch (event->response_type & ~0x80) {
    case XCB_EXPOSE:
      xcb_poly_point(connection, XCB_COORD_MODE_ORIGIN, window, foreground, 4,
                     points);
      xcb_poly_line(connection, XCB_COORD_MODE_PREVIOUS, window, foreground, 4,
                    polyline);
      xcb_poly_segment(connection, window, foreground, 2, segments);
      xcb_poly_rectangle(connection, window, foreground, 2, rectangles);
      xcb_poly_arc(connection, window, foreground, 2, arcs);
      xcb_flush(connection);
      break;
    default:
      break;
    }
    free(event);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x138,%rsp
movl   $0x0,-0xc(%rbp)
mov    0xde6(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xde3(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xde0(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xddd(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xdda(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xdd7(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xdd4(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xdd1(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xdce(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    0xdcb(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    0xdc8(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0xdc5(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    0xdc2(%rip),%rax
mov    %rax,-0x90(%rbp)
mov    0xdbc(%rip),%rax
mov    %rax,-0x88(%rbp)
mov    0xdb6(%rip),%rax
mov    %rax,-0x80(%rbp)
mov    0xdb3(%rip),%rax
mov    %rax,-0x78(%rbp)
lea    -0xc0(%rbp),%rdi
lea    0xda9(%rip),%rsi
mov    $0x30,%edx
call   10a0 <memcpy@plt>
xor    %eax,%eax
mov    %eax,%esi
mov    %rsi,%rdi
call   1050 <xcb_connect@plt>
mov    %rax,-0xc8(%rbp)
mov    -0xc8(%rbp),%rdi
call   1120 <xcb_get_setup@plt>
mov    %eax,%edi
call   1090 <xcb_setup_roots_iterator@plt>
mov    %rax,-0xd8(%rbp)
mov    -0xd8(%rbp),%rax
mov    %rax,-0xd0(%rbp)
mov    -0xd0(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0xe0(%rbp)
mov    -0xc8(%rbp),%rdi
call   1080 <xcb_generate_id@plt>
mov    %rax,-0xe8(%rbp)
mov    0x2ca8(%rip),%rax
mov    (%rax),%eax
mov    0x2c6f(%rip),%rcx
or     (%rcx),%eax
mov    %eax,-0xec(%rbp)
mov    -0xd0(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xf4(%rbp)
movl   $0x0,-0xf0(%rbp)
mov    -0xc8(%rbp),%rdi
mov    -0xe8(%rbp),%rsi
mov    -0xe0(%rbp),%rdx
mov    -0xec(%rbp),%ecx
lea    -0xf4(%rbp),%r8
call   1060 <xcb_create_gc@plt>
mov    -0xc8(%rbp),%rdi
call   1080 <xcb_generate_id@plt>
mov    %rax,-0xe0(%rbp)
mov    0x2c05(%rip),%rax
mov    (%rax),%eax
mov    0x2be4(%rip),%rcx
or     (%rcx),%eax
mov    %eax,-0xec(%rbp)
mov    -0xd0(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0xf4(%rbp)
mov    0x2bf5(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xf0(%rbp)
mov    -0xc8(%rbp),%rdi
mov    0x2bd7(%rip),%rax
mov    (%rax),%esi
mov    -0xe0(%rbp),%rdx
mov    -0xd0(%rbp),%rax
mov    0x10(%rax),%rcx
mov    0x2bd4(%rip),%rax
mov    (%rax),%ebx
mov    -0xd0(%rbp),%rax
mov    0x8(%rax),%r11d
mov    -0xec(%rbp),%r10d
lea    -0xf4(%rbp),%rax
xor    %r9d,%r9d
mov    %r9d,%r8d
movl   $0x96,(%rsp)
movl   $0x96,0x8(%rsp)
movl   $0xa,0x10(%rsp)
mov    %ebx,0x18(%rsp)
mov    %r11d,0x20(%rsp)
mov    %r10d,0x28(%rsp)
mov    %rax,0x30(%rsp)
call   1040 <xcb_create_window@plt>
mov    -0xc8(%rbp),%rdi
mov    -0xe0(%rbp),%rsi
call   10e0 <xcb_map_window@plt>
mov    -0xc8(%rbp),%rdi
call   1070 <xcb_flush@plt>
mov    -0xc8(%rbp),%rdi
call   10f0 <xcb_wait_for_event@plt>
mov    %rax,-0x100(%rbp)
cmp    $0x0,%rax
je     15a6 <main+0x3a6>
mov    -0x100(%rbp),%rax
mov    (%rax),%eax
and    $0xffffff7f,%eax
sub    $0x80,%eax
jne    1590 <main+0x390>
jmp    14b6 <main+0x2b6>
mov    -0xc8(%rbp),%rdi
mov    0x2b14(%rip),%rax
mov    (%rax),%esi
mov    -0xe0(%rbp),%rdx
mov    -0xe8(%rbp),%rcx
lea    -0x30(%rbp),%r9
mov    $0x4,%r8d
call   10b0 <xcb_poly_point@plt>
mov    -0xc8(%rbp),%rdi
mov    0x2ab7(%rip),%rax
mov    (%rax),%esi
mov    -0xe0(%rbp),%rdx
mov    -0xe8(%rbp),%rcx
lea    -0x50(%rbp),%r9
mov    $0x4,%r8d
call   10c0 <xcb_poly_line@plt>
mov    -0xc8(%rbp),%rdi
mov    -0xe0(%rbp),%rsi
mov    -0xe8(%rbp),%rdx
lea    -0x70(%rbp),%r8
mov    $0x2,%ecx
call   1110 <xcb_poly_segment@plt>
mov    -0xc8(%rbp),%rdi
mov    -0xe0(%rbp),%rsi
mov    -0xe8(%rbp),%rdx
lea    -0x90(%rbp),%r8
mov    $0x2,%ecx
call   1100 <xcb_poly_rectangle@plt>
mov    -0xc8(%rbp),%rdi
mov    -0xe0(%rbp),%rsi
mov    -0xe8(%rbp),%rdx
lea    -0xc0(%rbp),%r8
mov    $0x2,%ecx
call   10d0 <xcb_poly_arc@plt>
mov    -0xc8(%rbp),%rdi
call   1070 <xcb_flush@plt>
jmp    1595 <main+0x395>
jmp    1595 <main+0x395>
mov    -0x100(%rbp),%rdi
call   1030 <free@plt>
jmp    147b <main+0x27b>
xor    %eax,%eax
add    $0x138,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
xor    %edi,%edi
xor    %esi,%esi
call   1050 <xcb_connect@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   10c0 <xcb_get_setup@plt>
mov    %eax,%edi
call   1090 <xcb_setup_roots_iterator@plt>
mov    %rax,%r14
mov    0x10(%rax),%r15
mov    %rbx,%rdi
call   1080 <xcb_generate_id@plt>
mov    0x2e17(%rip),%rdx
mov    0x2de8(%rip),%rcx
mov    (%rcx),%ecx
or     (%rdx),%ecx
mov    (%r14),%edx
mov    %edx,(%rsp)
movl   $0x0,0x4(%rsp)
mov    %rsp,%r12
mov    %rbx,%rdi
mov    %rax,%rsi
mov    %r15,%rdx
mov    %r12,%r8
call   1060 <xcb_create_gc@plt>
mov    %rbx,%rdi
call   1080 <xcb_generate_id@plt>
mov    0x2dab(%rip),%rcx
mov    0x2d94(%rip),%rdx
mov    (%rdx),%r10d
or     (%rcx),%r10d
mov    %rax,%r15
mov    0x4(%r14),%eax
mov    %eax,(%rsp)
mov    0x2da5(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x4(%rsp)
mov    0x2d90(%rip),%rax
mov    (%rax),%esi
mov    0x10(%r14),%rcx
mov    0x2d93(%rip),%rax
mov    (%rax),%r11d
mov    0x8(%r14),%eax
sub    $0x8,%rsp
mov    %rbx,%rdi
mov    %r15,%rdx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   %r12
push   %r10
push   %rax
push   %r11
push   $0xa
push   $0x96
push   $0x96
call   1040 <xcb_create_window@plt>
add    $0x40,%rsp
mov    %rbx,%rdi
mov    %r15,%rsi
call   10a0 <xcb_map_window@plt>
mov    %rbx,%rdi
call   1070 <xcb_flush@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rbx,%rdi
call   10b0 <xcb_wait_for_event@plt>
test   %rax,%rax
je     12b7 <main+0x117>
mov    %rax,%rdi
call   1030 <free@plt>
jmp    12a0 <main+0x100>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.TYPE_18__ = type { i32, i32 }
%struct.TYPE_15__ = type { i32, i32, i32, i32 }
%struct.TYPE_17__ = type { i32, i32, i32, i32 }
%struct.TYPE_20__ = type { i32, i32, i32, i32, i32, i32 }
%struct.TYPE_16__ = type { i32, i32, i32, i8* }
%struct.TYPE_21__ = type { %struct.TYPE_16__* }
%struct.TYPE_19__ = type { i32 }
@__const.main.points = [4 x %struct.TYPE_18__] [%struct.TYPE_18__ { i32 10, i32 10 }, %struct.TYPE_18__ { i32 10, i32 20 }, %struct.TYPE_18__ { i32 20, i32 10 }, %struct.TYPE_18__ { i32 20, i32 20 }]
@__const.main.polyline = [4 x %struct.TYPE_18__] [%struct.TYPE_18__ { i32 50, i32 10 }, %struct.TYPE_18__ { i32 5, i32 20 }, %struct.TYPE_18__ { i32 25, i32 -20 }, %struct.TYPE_18__ { i32 10, i32 10 }]
@__const.main.segments = [2 x %struct.TYPE_15__] [%struct.TYPE_15__ { i32 100, i32 10, i32 140, i32 30 }, %struct.TYPE_15__ { i32 110, i32 25, i32 130, i32 60 }]
@__const.main.rectangles = [2 x %struct.TYPE_17__] [%struct.TYPE_17__ { i32 10, i32 50, i32 40, i32 20 }, %struct.TYPE_17__ { i32 80, i32 50, i32 10, i32 40 }]
@__const.main.arcs = [2 x %struct.TYPE_20__] [%struct.TYPE_20__ { i32 10, i32 100, i32 60, i32 40, i32 0, i32 5760 }, %struct.TYPE_20__ { i32 90, i32 100, i32 55, i32 40, i32 0, i32 17280 }]
@XCB_GC_FOREGROUND = global i32 0
@XCB_GC_GRAPHICS_EXPOSURES = global i32 0
@XCB_CW_BACK_PIXEL = global i32 0
@XCB_CW_EVENT_MASK = global i32 0
@XCB_EVENT_MASK_EXPOSURE = global i32 0
@XCB_COPY_FROM_PARENT = global i32 0
@XCB_WINDOW_CLASS_INPUT_OUTPUT = global i32 0
@XCB_COORD_MODE_ORIGIN = global i32 0
@XCB_COORD_MODE_PREVIOUS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x %struct.TYPE_18__]
%3 = alloca [4 x %struct.TYPE_18__]
%4 = alloca [2 x %struct.TYPE_15__]
%5 = alloca [2 x %struct.TYPE_17__]
%6 = alloca [2 x %struct.TYPE_20__]
%7 = alloca i32*
%8 = alloca %struct.TYPE_16__*
%9 = alloca %struct.TYPE_21__
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i32
%13 = alloca [2 x i32]
%14 = alloca %struct.TYPE_19__*
store i32 0, i32* %1
%15 = bitcast [4 x %struct.TYPE_18__]* %2 to i8*
%16 = bitcast [4 x %struct.TYPE_18__]* %3 to i8*
%17 = bitcast [2 x %struct.TYPE_15__]* %4 to i8*
%18 = bitcast [2 x %struct.TYPE_17__]* %5 to i8*
%19 = bitcast [2 x %struct.TYPE_20__]* %6 to i8*
%20 = call i32* @xcb_connect(i32* null, i32* null)
store i32* %20, i32** %7
%21 = load i32*, i32** %7
%22 = call i32 @xcb_get_setup(i32* %21)
%23 = call %struct.TYPE_16__* @xcb_setup_roots_iterator(i32 %22)
%24 = getelementptr inbounds %struct.TYPE_21__, %struct.TYPE_21__* %9, i32 0, i32 0
store %struct.TYPE_16__* %23, %struct.TYPE_16__** %24
%25 = getelementptr inbounds %struct.TYPE_21__, %struct.TYPE_21__* %9, i32 0, i32 0
%26 = load %struct.TYPE_16__*, %struct.TYPE_16__** %25
store %struct.TYPE_16__* %26, %struct.TYPE_16__** %8
%27 = load %struct.TYPE_16__*, %struct.TYPE_16__** %8
%28 = getelementptr inbounds %struct.TYPE_16__, %struct.TYPE_16__* %27, i32 0, i32 3
%29 = load i8*, i8** %28
store i8* %29, i8** %10
%30 = load i32*, i32** %7
%31 = call i8* @xcb_generate_id(i32* %30)
store i8* %31, i8** %11
%32 = load i32, i32* @XCB_GC_FOREGROUND
%33 = load i32, i32* @XCB_GC_GRAPHICS_EXPOSURES
%34 = or i32 %32, %33
store i32 %34, i32* %12
%35 = getelementptr inbounds [2 x i32], [2 x i32]* %13, i64 0, i64 0
%36 = load %struct.TYPE_16__*, %struct.TYPE_16__** %8
%37 = getelementptr inbounds %struct.TYPE_16__, %struct.TYPE_16__* %36, i32 0, i32 0
%38 = load i32, i32* %37
store i32 %38, i32* %35
%39 = getelementptr inbounds i32, i32* %35, i64 1
store i32 0, i32* %39
%40 = load i32*, i32** %7
%41 = load i8*, i8** %11
%42 = load i8*, i8** %10
%43 = load i32, i32* %12
%44 = getelementptr inbounds [2 x i32], [2 x i32]* %13, i64 0, i64 0
%45 = call i32 @xcb_create_gc(i32* %40, i8* %41, i8* %42, i32 %43, i32* %44)
%46 = load i32*, i32** %7
%47 = call i8* @xcb_generate_id(i32* %46)
store i8* %47, i8** %10
%48 = load i32, i32* @XCB_CW_BACK_PIXEL
%49 = load i32, i32* @XCB_CW_EVENT_MASK
%50 = or i32 %48, %49
store i32 %50, i32* %12
%51 = load %struct.TYPE_16__*, %struct.TYPE_16__** %8
%52 = getelementptr inbounds %struct.TYPE_16__, %struct.TYPE_16__* %51, i32 0, i32 1
%53 = load i32, i32* %52
%54 = getelementptr inbounds [2 x i32], [2 x i32]* %13, i64 0, i64 0
store i32 %53, i32* %54
%55 = load i32, i32* @XCB_EVENT_MASK_EXPOSURE
%56 = getelementptr inbounds [2 x i32], [2 x i32]* %13, i64 0, i64 1
store i32 %55, i32* %56
%57 = load i32*, i32** %7
%58 = load i32, i32* @XCB_COPY_FROM_PARENT
%59 = load i8*, i8** %10
%60 = load %struct.TYPE_16__*, %struct.TYPE_16__** %8
%61 = getelementptr inbounds %struct.TYPE_16__, %struct.TYPE_16__* %60, i32 0, i32 3
%62 = load i8*, i8** %61
%63 = load i32, i32* @XCB_WINDOW_CLASS_INPUT_OUTPUT
%64 = load %struct.TYPE_16__*, %struct.TYPE_16__** %8
%65 = getelementptr inbounds %struct.TYPE_16__, %struct.TYPE_16__* %64, i32 0, i32 2
%66 = load i32, i32* %65
%67 = load i32, i32* %12
%68 = getelementptr inbounds [2 x i32], [2 x i32]* %13, i64 0, i64 0
%69 = call i32 @xcb_create_window(i32* %57, i32 %58, i8* %59, i8* %62, i32 0, i32 0, i32 150, i32 150, i32 10, i32 %63, i32 %66, i32 %67, i32* %68)
%70 = load i32*, i32** %7
%71 = load i8*, i8** %10
%72 = call i32 @xcb_map_window(i32* %70, i8* %71)
%73 = load i32*, i32** %7
%74 = call i32 @xcb_flush(i32* %73)
br label %75
75: ; preds = %115, %0
%76 = load i32*, i32** %7
%77 = call %struct.TYPE_19__* @xcb_wait_for_event(i32* %76)
store %struct.TYPE_19__* %77, %struct.TYPE_19__** %14
%78 = icmp ne %struct.TYPE_19__* %77, null
br i1 %78, label %79, label %118
79: ; preds = %75
%80 = load %struct.TYPE_19__*, %struct.TYPE_19__** %14
%81 = getelementptr inbounds %struct.TYPE_19__, %struct.TYPE_19__* %80, i32 0, i32 0
%82 = load i32, i32* %81
%83 = and i32 %82, -129
switch i32 %83, label %114 [
i32 128, label %84
]
84: ; preds = %79
%85 = load i32*, i32** %7
%86 = load i32, i32* @XCB_COORD_MODE_ORIGIN
%87 = load i8*, i8** %10
%88 = load i8*, i8** %11
%89 = getelementptr inbounds [4 x %struct.TYPE_18__], [4 x %struct.TYPE_18__]* %2, i64 0, i64 0
%90 = call i32 @xcb_poly_point(i32* %85, i32 %86, i8* %87, i8* %88, i32 4, %struct.TYPE_18__* %89)
%91 = load i32*, i32** %7
%92 = load i32, i32* @XCB_COORD_MODE_PREVIOUS
%93 = load i8*, i8** %10
%94 = load i8*, i8** %11
%95 = getelementptr inbounds [4 x %struct.TYPE_18__], [4 x %struct.TYPE_18__]* %3, i64 0, i64 0
%96 = call i32 @xcb_poly_line(i32* %91, i32 %92, i8* %93, i8* %94, i32 4, %struct.TYPE_18__* %95)
%97 = load i32*, i32** %7
%98 = load i8*, i8** %10
%99 = load i8*, i8** %11
%100 = getelementptr inbounds [2 x %struct.TYPE_15__], [2 x %struct.TYPE_15__]* %4, i64 0, i64 0
%101 = call i32 @xcb_poly_segment(i32* %97, i8* %98, i8* %99, i32 2, %struct.TYPE_15__* %100)
%102 = load i32*, i32** %7
%103 = load i8*, i8** %10
%104 = load i8*, i8** %11
%105 = getelementptr inbounds [2 x %struct.TYPE_17__], [2 x %struct.TYPE_17__]* %5, i64 0, i64 0
%106 = call i32 @xcb_poly_rectangle(i32* %102, i8* %103, i8* %104, i32 2, %struct.TYPE_17__* %105)
%107 = load i32*, i32** %7
%108 = load i8*, i8** %10
%109 = load i8*, i8** %11
%110 = getelementptr inbounds [2 x %struct.TYPE_20__], [2 x %struct.TYPE_20__]* %6, i64 0, i64 0
%111 = call i32 @xcb_poly_arc(i32* %107, i8* %108, i8* %109, i32 2, %struct.TYPE_20__* %110)
%112 = load i32*, i32** %7
%113 = call i32 @xcb_flush(i32* %112)
br label %115
114: ; preds = %79
br label %115
115: ; preds = %114, %84
%116 = load %struct.TYPE_19__*, %struct.TYPE_19__** %14
%117 = call i32 @free(%struct.TYPE_19__* %116)
br label %75
118: ; preds = %75
ret i32 0
}

LLVM IR (-O2):
%struct.TYPE_16__ = type { i32, i32, i32, i8* }
%struct.TYPE_19__ = type { i32 }
@XCB_GC_FOREGROUND = global i32 0
@XCB_GC_GRAPHICS_EXPOSURES = global i32 0
@XCB_CW_BACK_PIXEL = global i32 0
@XCB_CW_EVENT_MASK = global i32 0
@XCB_EVENT_MASK_EXPOSURE = global i32 0
@XCB_COPY_FROM_PARENT = global i32 0
@XCB_WINDOW_CLASS_INPUT_OUTPUT = global i32 0
@XCB_COORD_MODE_ORIGIN = global i32 0
@XCB_COORD_MODE_PREVIOUS = global i32 0
define i32 @main() {
%1 = alloca [2 x i32]
%2 = tail call i32* @xcb_connect(i32* null, i32* null)
%3 = tail call i32 @xcb_get_setup(i32* %2)
%4 = tail call %struct.TYPE_16__* @xcb_setup_roots_iterator(i32 %3)
%5 = getelementptr inbounds %struct.TYPE_16__, %struct.TYPE_16__* %4, i64 0, i32 3
%6 = load i8*, i8** %5
%7 = tail call i8* @xcb_generate_id(i32* %2)
%8 = load i32, i32* @XCB_GC_FOREGROUND
%9 = load i32, i32* @XCB_GC_GRAPHICS_EXPOSURES
%10 = or i32 %9, %8
%11 = bitcast [2 x i32]* %1 to i8*
%12 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 0
%13 = getelementptr inbounds %struct.TYPE_16__, %struct.TYPE_16__* %4, i64 0, i32 0
%14 = load i32, i32* %13
store i32 %14, i32* %12
%15 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 1
store i32 0, i32* %15
%16 = call i32 @xcb_create_gc(i32* %2, i8* %7, i8* %6, i32 %10, i32* %12)
%17 = call i8* @xcb_generate_id(i32* %2)
%18 = load i32, i32* @XCB_CW_BACK_PIXEL
%19 = load i32, i32* @XCB_CW_EVENT_MASK
%20 = or i32 %19, %18
%21 = getelementptr inbounds %struct.TYPE_16__, %struct.TYPE_16__* %4, i64 0, i32 1
%22 = load i32, i32* %21
store i32 %22, i32* %12
%23 = load i32, i32* @XCB_EVENT_MASK_EXPOSURE
store i32 %23, i32* %15
%24 = load i32, i32* @XCB_COPY_FROM_PARENT
%25 = load i8*, i8** %5
%26 = load i32, i32* @XCB_WINDOW_CLASS_INPUT_OUTPUT
%27 = getelementptr inbounds %struct.TYPE_16__, %struct.TYPE_16__* %4, i64 0, i32 2
%28 = load i32, i32* %27
%29 = call i32 @xcb_create_window(i32* %2, i32 %24, i8* %17, i8* %25, i32 0, i32 0, i32 150, i32 150, i32 10, i32 %26, i32 %28, i32 %20, i32* %12)
%30 = call i32 @xcb_map_window(i32* %2, i8* %17)
%31 = call i32 @xcb_flush(i32* %2)
%32 = call %struct.TYPE_19__* @xcb_wait_for_event(i32* %2)
%33 = icmp eq %struct.TYPE_19__* %32, null
br i1 %33, label %39, label %34
34: ; preds = %0, %34
%35 = phi %struct.TYPE_19__* [ %37, %34 ], [ %32, %0 ]
%36 = call i32 @free(%struct.TYPE_19__* %35)
%37 = call %struct.TYPE_19__* @xcb_wait_for_event(i32* %2)
%38 = icmp eq %struct.TYPE_19__* %37, null
br i1 %38, label %39, label %34
39: ; preds = %34, %0
ret i32 0
}