#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_10__ TYPE_2__;
typedef struct TYPE_9__ TYPE_1__;

/* Type definitions */
struct TYPE_9__ {
  int visualid;
  int depth;
  int /*<<< orphan*/ visual;
  int /*<<< orphan*/ screen;
  int /*<<< orphan*/ class;
};
typedef TYPE_1__ XVisualInfo;
struct TYPE_10__ {
  scalar_t__ border_pixel;
  int /*<<< orphan*/ colormap;
};
typedef TYPE_2__ XSetWindowAttributes;
typedef int /*<<< orphan*/ Window;
typedef int /*<<< orphan*/ GLXContext;
typedef int /*<<< orphan*/ Display;
typedef int /*<<< orphan*/ Colormap;

/* Variables and functions */
int /*<<< orphan*/ AllocNone;
int CWBorderPixel;
int CWColormap;
char *ClassOf(int /*<<< orphan*/);
int /*<<< orphan*/ DefaultScreen(int /*<<< orphan*/ *);
scalar_t__ False;
char *Format(int, int);
int /*<<< orphan*/ GLX_ACCUM_ALPHA_SIZE;
int /*<<< orphan*/ GLX_ACCUM_BLUE_SIZE;
int /*<<< orphan*/ GLX_ACCUM_GREEN_SIZE;
int /*<<< orphan*/ GLX_ACCUM_RED_SIZE;
int /*<<< orphan*/ GLX_ALPHA_SIZE;
int /*<<< orphan*/ GLX_AUX_BUFFERS;
int /*<<< orphan*/ GLX_BLUE_SIZE;
int /*<<< orphan*/ GLX_BUFFER_SIZE;
int /*<<< orphan*/ GLX_DEPTH_SIZE;
int /*<<< orphan*/ GLX_DOUBLEBUFFER;
int /*<<< orphan*/ GLX_GREEN_SIZE;
int /*<<< orphan*/ GLX_LEVEL;
int /*<<< orphan*/ GLX_RED_SIZE;
int /*<<< orphan*/ GLX_RGBA;
int /*<<< orphan*/ GLX_STENCIL_SIZE;
int /*<<< orphan*/ GLX_STEREO;
int /*<<< orphan*/ GLX_USE_GL;
int /*<<< orphan*/ GL_EXTENSIONS;
int /*<<< orphan*/ GL_RENDERER;
int /*<<< orphan*/ GL_TRUE;
int /*<<< orphan*/ GL_VENDOR;
int /*<<< orphan*/ GL_VERSION;
int /*<<< orphan*/ InputOutput;
int /*<<< orphan*/ RootWindow(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ VisualScreenMask;
int /*<<< orphan*/ XCreateColormap(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                   int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ XCreateWindow(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                 int /*<<< orphan*/, int /*<<< orphan*/, int,
                                 int, int /*<<< orphan*/, int,
                                 int /*<<< orphan*/, int /*<<< orphan*/, int,
                                 TYPE_2__ *);
char *XDisplayName(int /*<<< orphan*/ *);
int /*<<< orphan*/ XFree(TYPE_1__ *);
TYPE_1__ *XGetVisualInfo(int /*<<< orphan*/ *, int /*<<< orphan*/, TYPE_1__ *,
                         int *);
int /*<<< orphan*/ *XOpenDisplay(int /*<<< orphan*/ *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
char *glGetString(int /*<<< orphan*/);
int /*<<< orphan*/ glXCreateContext(int /*<<< orphan*/ *, TYPE_1__ *,
                                    int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ glXGetConfig(int /*<<< orphan*/ *, TYPE_1__ *,
                                int /*<<< orphan*/, int *);
scalar_t__ glXIsDirect(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ glXMakeCurrent(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                  int /*<<< orphan*/);
scalar_t__ glXQueryExtension(int /*<<< orphan*/ *, int *, int *);
int /*<<< orphan*/ glXQueryVersion(int /*<<< orphan*/ *, int *, int *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stderr;
void main(int argc, char *argv[]) {
  Display *dpy;
  XVisualInfo match, *visualList, *vi, *visualToTry;
  int errorBase, eventBase, major, minor, found;
  int glxCapable, bufferSize, level, renderType, doubleBuffer, stereo,
      auxBuffers, redSize, greenSize, blueSize, alphaSize, depthSize,
      stencilSize, acRedSize, acGreenSize, acBlueSize, acAlphaSize;
  dpy = XOpenDisplay(NULL);
  if (!dpy) {
    fprintf(stderr, "Could not connect to %s.\n", XDisplayName(NULL));
    exit(1);
  }
  if (glXQueryExtension(dpy, &errorBase, &eventBase) == False) {
    fprintf(stderr, "OpenGL not supported by X server.\n");
    exit(1);
  }
  glXQueryVersion(dpy, &major, &minor);
  printf("display: %s\n", XDisplayName(NULL));
  printf("using GLX version: %d.%d\n\n", major, minor);
  match.screen = DefaultScreen(dpy);
  visualList = XGetVisualInfo(dpy, VisualScreenMask, &match, &found);
  printf("   visual     bf lv rg d st  r  g  b a   ax dp st accum buffs\n");
  printf(" id dep cl    sz l  ci b ro sz sz sz sz  bf th cl  r  g  b  a\n");
  printf("-------------------------------------------------------------\n");
  visualToTry = NULL;
  for (vi = visualList; found > 0; found--, vi++) {
    glXGetConfig(dpy, vi, GLX_USE_GL, &glxCapable);
    if (glxCapable) {
      printf("0x%x %2d %s", vi->visualid, vi->depth, ClassOf(vi->class));
      glXGetConfig(dpy, vi, GLX_BUFFER_SIZE, &bufferSize);
      glXGetConfig(dpy, vi, GLX_LEVEL, &level);
      glXGetConfig(dpy, vi, GLX_RGBA, &renderType);
      glXGetConfig(dpy, vi, GLX_DOUBLEBUFFER, &doubleBuffer);
      glXGetConfig(dpy, vi, GLX_STEREO, &stereo);
      glXGetConfig(dpy, vi, GLX_AUX_BUFFERS, &auxBuffers);
      glXGetConfig(dpy, vi, GLX_RED_SIZE, &redSize);
      glXGetConfig(dpy, vi, GLX_GREEN_SIZE, &greenSize);
      glXGetConfig(dpy, vi, GLX_BLUE_SIZE, &blueSize);
      glXGetConfig(dpy, vi, GLX_ALPHA_SIZE, &alphaSize);
      glXGetConfig(dpy, vi, GLX_DEPTH_SIZE, &depthSize);
      glXGetConfig(dpy, vi, GLX_STENCIL_SIZE, &stencilSize);
      glXGetConfig(dpy, vi, GLX_ACCUM_RED_SIZE, &acRedSize);
      glXGetConfig(dpy, vi, GLX_ACCUM_GREEN_SIZE, &acGreenSize);
      glXGetConfig(dpy, vi, GLX_ACCUM_BLUE_SIZE, &acBlueSize);
      glXGetConfig(dpy, vi, GLX_ACCUM_ALPHA_SIZE, &acAlphaSize);
      printf("    %2s %2s %1s  %1s  %1s ", Format(bufferSize, 2),
             Format(level, 2), renderType ? "r" : "c", doubleBuffer ? "y" : ".",
             stereo ? "y" : ".");
      printf("%2s %2s %2s %2s ", Format(redSize, 2), Format(greenSize, 2),
             Format(blueSize, 2), Format(alphaSize, 2));
      printf("%2s %2s %2s %2s %2s %2s %2s", Format(auxBuffers, 2),
             Format(depthSize, 2), Format(stencilSize, 2), Format(acRedSize, 2),
             Format(acGreenSize, 2), Format(acBlueSize, 2),
             Format(acAlphaSize, 2));
      printf("\n");
      visualToTry = vi;
    }
  }
  if (visualToTry) {
    GLXContext context;
    Window window;
    Colormap colormap;
    XSetWindowAttributes swa;
    context = glXCreateContext(dpy, visualToTry, 0, GL_TRUE);
    colormap = XCreateColormap(dpy, RootWindow(dpy, visualToTry->screen),
                               visualToTry->visual, AllocNone);
    swa.colormap = colormap;
    swa.border_pixel = 0;
    window =
        XCreateWindow(dpy, RootWindow(dpy, visualToTry->screen), 0, 0, 100, 100,
                      0, visualToTry->depth, InputOutput, visualToTry->visual,
                      CWBorderPixel | CWColormap, &swa);
    glXMakeCurrent(dpy, window, context);
    printf("\n");
    printf("OpenGL vendor string: %s\n", glGetString(GL_VENDOR));
    printf("OpenGL renderer string: %s\n", glGetString(GL_RENDERER));
    printf("OpenGL version string: %s\n", glGetString(GL_VERSION));
    if (glXIsDirect(dpy, context))
      printf("direct rendering: supported\n");
    printf("GL extensions: '%s'\n\n", glGetString(GL_EXTENSIONS));
  } else
    printf("No GLX-capable visuals!\n");
  XFree(visualList);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
sub    $0x160,%rsp
mov    %edi,-0x14(%rbp)
mov    %rsi,-0x20(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   20a0 <XOpenDisplay@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    22a6 <main+0x66>
mov    0x2ccc(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xd4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   20e0 <XDisplayName@plt>
mov    -0xd4(%rbp),%edi
mov    %rax,%rdx
lea    0xd6b(%rip),%rsi
mov    $0x0,%al
call   20b0 <fprintf@plt>
mov    $0x1,%edi
call   2150 <exit@plt>
mov    -0x28(%rbp),%rdi
lea    -0x5c(%rbp),%rsi
lea    -0x60(%rbp),%rdx
call   2080 <glXQueryExtension@plt>
mov    0x2d0a(%rip),%rcx
cmp    (%rcx),%rax
jne    22e8 <main+0xa8>
mov    0x2c72(%rip),%rax
mov    (%rax),%edi
lea    0xd43(%rip),%rsi
mov    $0x0,%al
call   20b0 <fprintf@plt>
mov    $0x1,%edi
call   2150 <exit@plt>
mov    -0x28(%rbp),%rdi
lea    -0x64(%rbp),%rsi
lea    -0x68(%rbp),%rdx
call   2110 <glXQueryVersion@plt>
xor    %eax,%eax
mov    %eax,%edi
call   20e0 <XDisplayName@plt>
mov    %rax,%rsi
lea    0xd31(%rip),%rdi
mov    $0x0,%al
call   2040 <printf@plt>
mov    -0x64(%rbp),%esi
mov    -0x68(%rbp),%edx
lea    0xd2a(%rip),%rdi
mov    $0x0,%al
call   2040 <printf@plt>
mov    -0x28(%rbp),%rdi
call   2160 <DefaultScreen@plt>
mov    %eax,-0x34(%rbp)
mov    -0x28(%rbp),%rdi
mov    0x2caa(%rip),%rax
mov    (%rax),%esi
lea    -0x40(%rbp),%rdx
lea    -0x6c(%rbp),%rcx
call   2070 <XGetVisualInfo@plt>
mov    %rax,-0x48(%rbp)
lea    0xd0d(%rip),%rdi
mov    $0x0,%al
call   2040 <printf@plt>
lea    0xd3e(%rip),%rdi
mov    $0x0,%al
call   2040 <printf@plt>
lea    0xd6f(%rip),%rdi
mov    $0x0,%al
call   2040 <printf@plt>
movq   $0x0,-0x58(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,-0x50(%rbp)
cmpl   $0x0,-0x6c(%rbp)
jle    27ce <main+0x58e>
mov    -0x28(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    0x2b6c(%rip),%rax
mov    (%rax),%edx
lea    -0x70(%rbp),%rcx
call   2140 <glXGetConfig@plt>
cmpl   $0x0,-0x70(%rbp)
je     27af <main+0x56f>
mov    -0x50(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x130(%rbp)
mov    -0x50(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x12c(%rbp)
mov    -0x50(%rbp),%rax
mov    0x10(%rax),%edi
call   2130 <ClassOf@plt>
mov    -0x130(%rbp),%esi
mov    -0x12c(%rbp),%edx
mov    %rax,%rcx
lea    0xd2e(%rip),%rdi
mov    $0x0,%al
call   2040 <printf@plt>
mov    -0x28(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    0x2bc6(%rip),%rax
mov    (%rax),%edx
lea    -0x74(%rbp),%rcx
call   2140 <glXGetConfig@plt>
mov    -0x28(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    0x2af4(%rip),%rax
mov    (%rax),%edx
lea    -0x78(%rbp),%rcx
call   2140 <glXGetConfig@plt>
mov    -0x28(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    0x2b82(%rip),%rax
mov    (%rax),%edx
lea    -0x7c(%rbp),%rcx
call   2140 <glXGetConfig@plt>
mov    -0x28(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    0x2af8(%rip),%rax
mov    (%rax),%edx
lea    -0x80(%rbp),%rcx
call   2140 <glXGetConfig@plt>
mov    -0x28(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    0x2b3e(%rip),%rax
mov    (%rax),%edx
lea    -0x84(%rbp),%rcx
call   2140 <glXGetConfig@plt>
mov    -0x28(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    0x2a99(%rip),%rax
mov    (%rax),%edx
lea    -0x88(%rbp),%rcx
call   2140 <glXGetConfig@plt>
mov    -0x28(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    0x2a74(%rip),%rax
mov    (%rax),%edx
lea    -0x8c(%rbp),%rcx
call   2140 <glXGetConfig@plt>
mov    -0x28(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    0x2aef(%rip),%rax
mov    (%rax),%edx
lea    -0x90(%rbp),%rcx
call   2140 <glXGetConfig@plt>
mov    -0x28(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    0x2ac2(%rip),%rax
mov    (%rax),%edx
lea    -0x94(%rbp),%rcx
call   2140 <glXGetConfig@plt>
mov    -0x28(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    0x2a55(%rip),%rax
mov    (%rax),%edx
lea    -0x98(%rbp),%rcx
call   2140 <glXGetConfig@plt>
mov    -0x28(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    0x2ab8(%rip),%rax
mov    (%rax),%edx
lea    -0x9c(%rbp),%rcx
call   2140 <glXGetConfig@plt>
mov    -0x28(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    0x29bb(%rip),%rax
mov    (%rax),%edx
lea    -0xa0(%rbp),%rcx
call   2140 <glXGetConfig@plt>
mov    -0x28(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    0x2a3e(%rip),%rax
mov    (%rax),%edx
lea    -0xa4(%rbp),%rcx
call   2140 <glXGetConfig@plt>
mov    -0x28(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    0x2a09(%rip),%rax
mov    (%rax),%edx
lea    -0xa8(%rbp),%rcx
call   2140 <glXGetConfig@plt>
mov    -0x28(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    0x2974(%rip),%rax
mov    (%rax),%edx
lea    -0xac(%rbp),%rcx
call   2140 <glXGetConfig@plt>
mov    -0x28(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    0x29ef(%rip),%rax
mov    (%rax),%edx
lea    -0xb0(%rbp),%rcx
call   2140 <glXGetConfig@plt>
mov    -0x74(%rbp),%edi
mov    $0x2,%esi
call   2060 <Format@plt>
mov    %rax,-0x128(%rbp)
mov    -0x78(%rbp),%edi
mov    $0x2,%esi
call   2060 <Format@plt>
mov    -0x128(%rbp),%rsi
mov    %rax,%rdx
mov    -0x7c(%rbp),%edi
lea    0xb57(%rip),%rcx
lea    0xb4e(%rip),%rax
cmp    $0x0,%edi
cmovne %rax,%rcx
mov    -0x80(%rbp),%edi
lea    0xb43(%rip),%r8
lea    0xb3a(%rip),%rax
cmp    $0x0,%edi
cmovne %rax,%r8
mov    -0x84(%rbp),%edi
lea    0xb28(%rip),%r9
lea    0xb1f(%rip),%rax
cmp    $0x0,%edi
cmovne %rax,%r9
lea    0xaf2(%rip),%rdi
mov    $0x0,%al
call   2040 <printf@plt>
mov    -0x8c(%rbp),%edi
mov    $0x2,%esi
call   2060 <Format@plt>
mov    %rax,-0x120(%rbp)
mov    -0x90(%rbp),%edi
mov    $0x2,%esi
call   2060 <Format@plt>
mov    %rax,-0x118(%rbp)
mov    -0x94(%rbp),%edi
mov    $0x2,%esi
call   2060 <Format@plt>
mov    %rax,-0x110(%rbp)
mov    -0x98(%rbp),%edi
mov    $0x2,%esi
call   2060 <Format@plt>
mov    -0x120(%rbp),%rsi
mov    -0x118(%rbp),%rdx
mov    -0x110(%rbp),%rcx
mov    %rax,%r8
lea    0xa9a(%rip),%rdi
mov    $0x0,%al
call   2040 <printf@plt>
mov    -0x88(%rbp),%edi
mov    $0x2,%esi
call   2060 <Format@plt>
mov    %rax,-0x108(%rbp)
mov    -0x9c(%rbp),%edi
mov    $0x2,%esi
call   2060 <Format@plt>
mov    %rax,-0x100(%rbp)
mov    -0xa0(%rbp),%edi
mov    $0x2,%esi
call   2060 <Format@plt>
mov    %rax,-0xf8(%rbp)
mov    -0xa4(%rbp),%edi
mov    $0x2,%esi
call   2060 <Format@plt>
mov    %rax,-0xf0(%rbp)
mov    -0xa8(%rbp),%edi
mov    $0x2,%esi
call   2060 <Format@plt>
mov    %rax,-0xe8(%rbp)
mov    -0xac(%rbp),%edi
mov    $0x2,%esi
call   2060 <Format@plt>
mov    %rax,-0xe0(%rbp)
mov    -0xb0(%rbp),%edi
mov    $0x2,%esi
call   2060 <Format@plt>
mov    -0x108(%rbp),%rsi
mov    -0x100(%rbp),%rdx
mov    -0xf8(%rbp),%rcx
mov    -0xf0(%rbp),%r8
mov    -0xe8(%rbp),%r9
mov    -0xe0(%rbp),%r10
lea    0x9d9(%rip),%rdi
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
mov    $0x0,%al
call   2040 <printf@plt>
lea    0xa60(%rip),%rdi
mov    $0x0,%al
call   2040 <printf@plt>
mov    -0x50(%rbp),%rax
mov    %rax,-0x58(%rbp)
jmp    27b4 <main+0x574>
mov    -0x6c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x6c(%rbp)
mov    -0x50(%rbp),%rax
add    $0x14,%rax
mov    %rax,-0x50(%rbp)
jmp    238b <main+0x14b>
cmpq   $0x0,-0x58(%rbp)
je     29a7 <main+0x767>
mov    -0x28(%rbp),%rdi
mov    -0x58(%rbp),%rsi
mov    0x2760(%rip),%rax
mov    (%rax),%ecx
xor    %edx,%edx
call   20d0 <glXCreateContext@plt>
mov    %eax,-0xb4(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x140(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x58(%rbp),%rax
mov    0xc(%rax),%esi
call   2100 <RootWindow@plt>
mov    -0x140(%rbp),%rdi
mov    %eax,%esi
mov    -0x58(%rbp),%rax
mov    0x8(%rax),%edx
mov    0x275f(%rip),%rax
mov    (%rax),%ecx
call   2120 <XCreateColormap@plt>
mov    %eax,-0xbc(%rbp)
mov    -0xbc(%rbp),%eax
mov    %eax,-0xc8(%rbp)
movq   $0x0,-0xd0(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x138(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x58(%rbp),%rax
mov    0xc(%rax),%esi
call   2100 <RootWindow@plt>
mov    -0x138(%rbp),%rdi
mov    %eax,%esi
mov    -0x58(%rbp),%rax
mov    0x4(%rax),%r14d
mov    0x26b0(%rip),%rax
mov    (%rax),%ebx
mov    -0x58(%rbp),%rax
mov    0x8(%rax),%r11d
mov    0x275f(%rip),%rax
mov    (%rax),%r10d
mov    0x26dd(%rip),%rax
or     (%rax),%r10d
xor    %ecx,%ecx
mov    $0x64,%r9d
lea    -0xd0(%rbp),%rax
mov    %ecx,%edx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
mov    %r14d,0x8(%rsp)
mov    %ebx,0x10(%rsp)
mov    %r11d,0x18(%rsp)
mov    %r10d,0x20(%rsp)
mov    %rax,0x28(%rsp)
call   20f0 <XCreateWindow@plt>
mov    %eax,-0xb8(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0xb8(%rbp),%esi
mov    -0xb4(%rbp),%edx
call   2090 <glXMakeCurrent@plt>
lea    0x908(%rip),%rdi
mov    $0x0,%al
call   2040 <printf@plt>
mov    0x268a(%rip),%rax
mov    (%rax),%edi
call   20c0 <glGetString@plt>
mov    %rax,%rsi
lea    0x867(%rip),%rdi
mov    $0x0,%al
call   2040 <printf@plt>
mov    0x263b(%rip),%rax
mov    (%rax),%edi
call   20c0 <glGetString@plt>
mov    %rax,%rsi
lea    0x862(%rip),%rdi
mov    $0x0,%al
call   2040 <printf@plt>
mov    0x2624(%rip),%rax
mov    (%rax),%edi
call   20c0 <glGetString@plt>
mov    %rax,%rsi
lea    0x85f(%rip),%rdi
mov    $0x0,%al
call   2040 <printf@plt>
mov    -0x28(%rbp),%rdi
mov    -0xb4(%rbp),%esi
call   2030 <glXIsDirect@plt>
cmp    $0x0,%rax
je     2983 <main+0x743>
lea    0x853(%rip),%rdi
mov    $0x0,%al
call   2040 <printf@plt>
mov    0x25ae(%rip),%rax
mov    (%rax),%edi
call   20c0 <glGetString@plt>
mov    %rax,%rsi
lea    0x851(%rip),%rdi
mov    $0x0,%al
call   2040 <printf@plt>
jmp    29b5 <main+0x775>
lea    0x854(%rip),%rdi
mov    $0x0,%al
call   2040 <printf@plt>
mov    -0x48(%rbp),%rdi
call   2050 <XFree@plt>
add    $0x160,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa8,%rsp
xor    %edi,%edi
call   20c0 <XOpenDisplay@plt>
test   %rax,%rax
je     286f <main+0x60f>
mov    %rax,%r14
lea    0x7c(%rsp),%rsi
lea    0x78(%rsp),%rdx
mov    %rax,%rdi
call   20a0 <glXQueryExtension@plt>
mov    0x2d2b(%rip),%rcx
cmp    (%rcx),%rax
je     289c <main+0x63c>
lea    0x54(%rsp),%rsi
lea    0x50(%rsp),%rdx
mov    %r14,%rdi
call   2130 <glXQueryVersion@plt>
xor    %edi,%edi
call   2100 <XDisplayName@plt>
lea    0xd77(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   2060 <printf@plt>
mov    0x54(%rsp),%esi
mov    0x50(%rsp),%edx
lea    0xd6b(%rip),%rdi
xor    %eax,%eax
call   2060 <printf@plt>
mov    %r14,%rdi
call   2180 <DefaultScreen@plt>
mov    %eax,0x9c(%rsp)
mov    0x2cec(%rip),%rax
mov    (%rax),%esi
lea    0x90(%rsp),%rdx
lea    0x8(%rsp),%rcx
mov    %r14,%rdi
call   2090 <XGetVisualInfo@plt>
mov    %rax,%r12
lea    0xe0b(%rip),%rdi
call   2040 <puts@plt>
lea    0xe3d(%rip),%rdi
call   2040 <puts@plt>
lea    0xe6f(%rip),%rdi
call   2040 <puts@plt>
cmpl   $0x0,0x8(%rsp)
jle    2849 <main+0x5e9>
mov    %r12,0x58(%rsp)
xor    %r13d,%r13d
mov    %r14,0x60(%rsp)
jmp    2378 <main+0x118>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x8(%rsp),%eax
lea    -0x1(%rax),%ecx
mov    %ecx,0x8(%rsp)
add    $0x14,%r12
cmp    $0x1,%eax
jle    26d2 <main+0x472>
mov    0x2b91(%rip),%rax
mov    (%rax),%edx
mov    %r14,%rdi
mov    %r12,%rsi
lea    0x4c(%rsp),%rcx
call   2160 <glXGetConfig@plt>
cmpl   $0x0,0x4c(%rsp)
je     2360 <main+0x100>
mov    (%r12),%ebp
mov    0x4(%r12),%ebx
mov    0x10(%r12),%edi
call   2150 <ClassOf@plt>
lea    0xcb3(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%edx
mov    %rax,%rcx
xor    %eax,%eax
call   2060 <printf@plt>
mov    0x2c09(%rip),%rax
mov    (%rax),%edx
mov    %r14,%rdi
mov    %r12,%rsi
lea    0x48(%rsp),%rcx
call   2160 <glXGetConfig@plt>
mov    0x2b38(%rip),%rax
mov    (%rax),%edx
mov    %r14,%rdi
mov    %r12,%rsi
lea    0x44(%rsp),%rcx
call   2160 <glXGetConfig@plt>
mov    0x2bc7(%rip),%rax
mov    (%rax),%edx
mov    %r14,%rdi
mov    %r12,%rsi
lea    0x40(%rsp),%rcx
call   2160 <glXGetConfig@plt>
mov    0x2b3e(%rip),%rax
mov    (%rax),%edx
mov    %r14,%rdi
mov    %r12,%rsi
lea    0x3c(%rsp),%rcx
call   2160 <glXGetConfig@plt>
mov    0x2b85(%rip),%rax
mov    (%rax),%edx
mov    %r14,%rdi
mov    %r12,%rsi
lea    0x38(%rsp),%rcx
call   2160 <glXGetConfig@plt>
mov    0x2ae4(%rip),%rax
mov    (%rax),%edx
mov    %r14,%rdi
mov    %r12,%rsi
lea    0x34(%rsp),%rcx
call   2160 <glXGetConfig@plt>
mov    0x2ac3(%rip),%rax
mov    (%rax),%edx
mov    %r14,%rdi
mov    %r12,%rsi
lea    0x30(%rsp),%rcx
call   2160 <glXGetConfig@plt>
mov    0x2b42(%rip),%rax
mov    (%rax),%edx
mov    %r14,%rdi
mov    %r12,%rsi
lea    0x2c(%rsp),%rcx
call   2160 <glXGetConfig@plt>
mov    0x2b19(%rip),%rax
mov    (%rax),%edx
mov    %r14,%rdi
mov    %r12,%rsi
lea    0x28(%rsp),%rcx
call   2160 <glXGetConfig@plt>
mov    0x2ab0(%rip),%rax
mov    (%rax),%edx
mov    %r14,%rdi
mov    %r12,%rsi
lea    0x24(%rsp),%rcx
call   2160 <glXGetConfig@plt>
mov    0x2b17(%rip),%rax
mov    (%rax),%edx
mov    %r14,%rdi
mov    %r12,%rsi
lea    0x20(%rsp),%rcx
call   2160 <glXGetConfig@plt>
mov    0x2a1e(%rip),%rax
mov    (%rax),%edx
mov    %r14,%rdi
mov    %r12,%rsi
lea    0x1c(%rsp),%rcx
call   2160 <glXGetConfig@plt>
mov    0x2aa5(%rip),%rax
mov    (%rax),%edx
mov    %r14,%rdi
mov    %r12,%rsi
lea    0x18(%rsp),%rcx
call   2160 <glXGetConfig@plt>
mov    0x2a74(%rip),%rax
mov    (%rax),%edx
mov    %r14,%rdi
mov    %r12,%rsi
lea    0x14(%rsp),%rcx
call   2160 <glXGetConfig@plt>
mov    0x29e3(%rip),%rax
mov    (%rax),%edx
mov    %r14,%rdi
mov    %r12,%rsi
lea    0x10(%rsp),%rcx
call   2160 <glXGetConfig@plt>
mov    0x2a62(%rip),%rax
mov    (%rax),%edx
mov    %r14,%rdi
mov    %r12,%rsi
lea    0xc(%rsp),%rcx
call   2160 <glXGetConfig@plt>
mov    0x48(%rsp),%edi
mov    $0x2,%esi
call   2080 <Format@plt>
mov    %rax,%rbx
mov    0x44(%rsp),%edi
mov    $0x2,%esi
call   2080 <Format@plt>
cmpl   $0x0,0x40(%rsp)
lea    0xb11(%rip),%rcx
lea    0xb0c(%rip),%rdx
cmove  %rdx,%rcx
cmpl   $0x0,0x3c(%rsp)
lea    0xafe(%rip),%r9
mov    %r9,%r8
lea    0xaf6(%rip),%rdx
cmove  %rdx,%r8
cmpl   $0x0,0x38(%rsp)
cmove  %rdx,%r9
lea    0xac1(%rip),%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
xor    %eax,%eax
call   2060 <printf@plt>
mov    0x30(%rsp),%edi
mov    $0x2,%esi
call   2080 <Format@plt>
mov    %rax,%r14
mov    0x2c(%rsp),%edi
mov    $0x2,%esi
call   2080 <Format@plt>
mov    %rax,%rbp
mov    0x28(%rsp),%edi
mov    $0x2,%esi
call   2080 <Format@plt>
mov    %rax,%rbx
mov    0x24(%rsp),%edi
mov    $0x2,%esi
call   2080 <Format@plt>
lea    0xa8f(%rip),%rdi
mov    %r14,%rsi
mov    %rbp,%rdx
mov    %rbx,%rcx
mov    %rax,%r8
xor    %eax,%eax
call   2060 <printf@plt>
mov    0x34(%rsp),%edi
mov    $0x2,%esi
call   2080 <Format@plt>
mov    %rax,0x70(%rsp)
mov    0x20(%rsp),%edi
mov    $0x2,%esi
call   2080 <Format@plt>
mov    %rax,0x68(%rsp)
mov    0x1c(%rsp),%edi
mov    $0x2,%esi
call   2080 <Format@plt>
mov    %rax,%r14
mov    0x18(%rsp),%edi
mov    $0x2,%esi
call   2080 <Format@plt>
mov    %rax,%rbx
mov    0x14(%rsp),%edi
mov    $0x2,%esi
call   2080 <Format@plt>
mov    %rax,%r13
mov    0x10(%rsp),%edi
mov    $0x2,%esi
call   2080 <Format@plt>
mov    %rax,%r15
mov    0xc(%rsp),%edi
mov    $0x2,%esi
call   2080 <Format@plt>
mov    %rax,%rbp
lea    0xa0b(%rip),%rdi
mov    0x70(%rsp),%rsi
mov    0x68(%rsp),%rdx
mov    %r14,%rcx
mov    0x60(%rsp),%r14
mov    %rbx,%r8
mov    %r13,%r9
xor    %eax,%eax
push   %rbp
push   %r15
call   2060 <printf@plt>
add    $0x10,%rsp
mov    $0xa,%edi
call   2030 <putchar@plt>
mov    %r12,%r13
jmp    2360 <main+0x100>
test   %r13,%r13
mov    0x58(%rsp),%r12
je     2849 <main+0x5e9>
mov    0x2861(%rip),%rax
mov    (%rax),%ecx
mov    %r14,%rdi
mov    %r13,%rsi
xor    %edx,%edx
call   20f0 <glXCreateContext@plt>
mov    %r14,%rbp
mov    %eax,%r14d
mov    0xc(%r13),%esi
mov    %rbp,%rdi
call   2120 <RootWindow@plt>
mov    0x8(%r13),%edx
mov    0x2875(%rip),%rcx
mov    (%rcx),%ecx
mov    %rbp,%rdi
mov    %eax,%esi
call   2140 <XCreateColormap@plt>
mov    %eax,0x88(%rsp)
movq   $0x0,0x80(%rsp)
mov    0xc(%r13),%esi
mov    %rbp,%rdi
call   2120 <RootWindow@plt>
mov    0x27eb(%rip),%rcx
mov    (%rcx),%r11d
mov    0x4(%r13),%r10d
mov    0x8(%r13),%r12d
mov    0x2899(%rip),%rcx
mov    0x281a(%rip),%rdx
mov    (%rdx),%ebx
or     (%rcx),%ebx
lea    0x80(%rsp),%r15
mov    %rbp,%rdi
mov    %eax,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0x64,%r8d
mov    $0x64,%r9d
push   %r15
push   %rbx
push   %r12
push   %r11
push   %r10
push   $0x0
call   2110 <XCreateWindow@plt>
add    $0x30,%rsp
mov    %rbp,%rdi
mov    %eax,%esi
mov    %r14d,%edx
call   20b0 <glXMakeCurrent@plt>
mov    $0xa,%edi
call   2030 <putchar@plt>
mov    0x27df(%rip),%rax
mov    (%rax),%edi
call   20e0 <glGetString@plt>
lea    0x902(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   2060 <printf@plt>
mov    0x2790(%rip),%rax
mov    (%rax),%edi
call   20e0 <glGetString@plt>
lea    0x8fd(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   2060 <printf@plt>
mov    0x2779(%rip),%rax
mov    (%rax),%edi
call   20e0 <glGetString@plt>
lea    0x8fa(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   2060 <printf@plt>
mov    %rbp,%rdi
mov    %r14d,%esi
call   2050 <glXIsDirect@plt>
test   %rax,%rax
je     2823 <main+0x5c3>
lea    0x9dc(%rip),%rdi
call   2040 <puts@plt>
mov    0x270e(%rip),%rax
mov    (%rax),%edi
call   20e0 <glGetString@plt>
lea    0x8da(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   2060 <printf@plt>
mov    0x58(%rsp),%r12
jmp    2855 <main+0x5f5>
lea    0x992(%rip),%rdi
call   2040 <puts@plt>
mov    %r12,%rdi
call   2070 <XFree@plt>
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x26ca(%rip),%rax
mov    (%rax),%ebx
xor    %edi,%edi
call   2100 <XDisplayName@plt>
lea    0x77a(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
xor    %eax,%eax
call   20d0 <fprintf@plt>
mov    $0x1,%edi
call   2170 <exit@plt>
mov    0x269d(%rip),%rax
mov    (%rax),%edi
lea    0x76e(%rip),%rsi
xor    %eax,%eax
call   20d0 <fprintf@plt>
mov    $0x1,%edi
call   2170 <exit@plt>

LLVM IR (-O0):
%struct.TYPE_9__ = type { i32, i32, i32, i32, i32 }
%struct.TYPE_10__ = type { i64, i32 }
@stderr = global i32 0
@.str = [26 x i8] c"Could not connect to %s.\0A\00"
@False = global i64 0
@.str.1 = [35 x i8] c"OpenGL not supported by X server.\0A\00"
@.str.2 = [13 x i8] c"display: %s\0A\00"
@.str.3 = [27 x i8] c"using GLX version: %d.%d\0A\0A\00"
@VisualScreenMask = global i32 0
@.str.4 = [63 x i8] c" visual bf lv rg d st r g b a ax dp st accum buffs\0A\00"
@.str.5 = [63 x i8] c" id dep cl sz l ci b ro sz sz sz sz bf th cl r g b a\0A\00"
@.str.6 = [63 x i8] c"-------------------------------------------------------------\0A\00"
@GLX_USE_GL = global i32 0
@.str.7 = [12 x i8] c"0x%x %2d %s\00"
@GLX_BUFFER_SIZE = global i32 0
@GLX_LEVEL = global i32 0
@GLX_RGBA = global i32 0
@GLX_DOUBLEBUFFER = global i32 0
@GLX_STEREO = global i32 0
@GLX_AUX_BUFFERS = global i32 0
@GLX_RED_SIZE = global i32 0
@GLX_GREEN_SIZE = global i32 0
@GLX_BLUE_SIZE = global i32 0
@GLX_ALPHA_SIZE = global i32 0
@GLX_DEPTH_SIZE = global i32 0
@GLX_STENCIL_SIZE = global i32 0
@GLX_ACCUM_RED_SIZE = global i32 0
@GLX_ACCUM_GREEN_SIZE = global i32 0
@GLX_ACCUM_BLUE_SIZE = global i32 0
@GLX_ACCUM_ALPHA_SIZE = global i32 0
@.str.8 = [27 x i8] c" %2s %2s %1s %1s %1s \00"
@.str.9 = [2 x i8] c"r\00"
@.str.10 = [2 x i8] c"c\00"
@.str.11 = [2 x i8] c"y\00"
@.str.12 = [2 x i8] c".\00"
@.str.13 = [17 x i8] c"%2s %2s %2s %2s \00"
@.str.14 = [28 x i8] c"%2s %2s %2s %2s %2s %2s %2s\00"
@.str.15 = [2 x i8] c"\0A\00"
@GL_TRUE = global i32 0
@AllocNone = global i32 0
@InputOutput = global i32 0
@CWBorderPixel = global i32 0
@CWColormap = global i32 0
@.str.16 = [26 x i8] c"OpenGL vendor string: %s\0A\00"
@GL_VENDOR = global i32 0
@.str.17 = [28 x i8] c"OpenGL renderer string: %s\0A\00"
@GL_RENDERER = global i32 0
@.str.18 = [27 x i8] c"OpenGL version string: %s\0A\00"
@GL_VERSION = global i32 0
@.str.19 = [29 x i8] c"direct rendering: supported\0A\00"
@.str.20 = [22 x i8] c"GL extensions: '%s'\0A\0A\00"
@GL_EXTENSIONS = global i32 0
@.str.21 = [25 x i8] c"No GLX-capable visuals!\0A\00"
define void @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32*
%6 = alloca %struct.TYPE_9__
%7 = alloca %struct.TYPE_9__*
%8 = alloca %struct.TYPE_9__*
%9 = alloca %struct.TYPE_9__*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
%30 = alloca i32
%31 = alloca i32
%32 = alloca i32
%33 = alloca i32
%34 = alloca i32
%35 = alloca %struct.TYPE_10__
store i32 %0, i32* %3
store i8** %1, i8*** %4
%36 = call i32* @XOpenDisplay(i32* null)
store i32* %36, i32** %5
%37 = load i32*, i32** %5
%38 = icmp ne i32* %37, null
br i1 %38, label %44, label %39
39: ; preds = %2
%40 = load i32, i32* @stderr
%41 = call i8* @XDisplayName(i32* null)
%42 = call i32 (i32, i8*, ...) @fprintf(i32 %40, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %41)
%43 = call i32 @exit(i32 1)
unreachable
44: ; preds = %2
%45 = load i32*, i32** %5
%46 = call i64 @glXQueryExtension(i32* %45, i32* %10, i32* %11)
%47 = load i64, i64* @False
%48 = icmp eq i64 %46, %47
br i1 %48, label %49, label %53
49: ; preds = %44
%50 = load i32, i32* @stderr
%51 = call i32 (i32, i8*, ...) @fprintf(i32 %50, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
%52 = call i32 @exit(i32 1)
unreachable
53: ; preds = %44
%54 = load i32*, i32** %5
%55 = call i32 @glXQueryVersion(i32* %54, i32* %12, i32* %13)
%56 = call i8* @XDisplayName(i32* null)
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8* %56)
%58 = load i32, i32* %12
%59 = load i32, i32* %13
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i32 %58, i32 %59)
%61 = load i32*, i32** %5
%62 = call i32 @DefaultScreen(i32* %61)
%63 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %6, i32 0, i32 3
store i32 %62, i32* %63
%64 = load i32*, i32** %5
%65 = load i32, i32* @VisualScreenMask
%66 = call %struct.TYPE_9__* @XGetVisualInfo(i32* %64, i32 %65, %struct.TYPE_9__* %6, i32* %14)
store %struct.TYPE_9__* %66, %struct.TYPE_9__** %7
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.4, i64 0, i64 0))
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.5, i64 0, i64 0))
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.6, i64 0, i64 0))
store %struct.TYPE_9__* null, %struct.TYPE_9__** %9
%70 = load %struct.TYPE_9__*, %struct.TYPE_9__** %7
store %struct.TYPE_9__* %70, %struct.TYPE_9__** %8
br label %71
71: ; preds = %201, %53
%72 = load i32, i32* %14
%73 = icmp sgt i32 %72, 0
br i1 %73, label %74, label %206
74: ; preds = %71
%75 = load i32*, i32** %5
%76 = load %struct.TYPE_9__*, %struct.TYPE_9__** %8
%77 = load i32, i32* @GLX_USE_GL
%78 = call i32 @glXGetConfig(i32* %75, %struct.TYPE_9__* %76, i32 %77, i32* %15)
%79 = load i32, i32* %15
%80 = icmp ne i32 %79, 0
br i1 %80, label %81, label %200
81: ; preds = %74
%82 = load %struct.TYPE_9__*, %struct.TYPE_9__** %8
%83 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %82, i32 0, i32 0
%84 = load i32, i32* %83
%85 = load %struct.TYPE_9__*, %struct.TYPE_9__** %8
%86 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %85, i32 0, i32 1
%87 = load i32, i32* %86
%88 = load %struct.TYPE_9__*, %struct.TYPE_9__** %8
%89 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %88, i32 0, i32 4
%90 = load i32, i32* %89
%91 = call i8* @ClassOf(i32 %90)
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i32 %84, i32 %87, i8* %91)
%93 = load i32*, i32** %5
%94 = load %struct.TYPE_9__*, %struct.TYPE_9__** %8
%95 = load i32, i32* @GLX_BUFFER_SIZE
%96 = call i32 @glXGetConfig(i32* %93, %struct.TYPE_9__* %94, i32 %95, i32* %16)
%97 = load i32*, i32** %5
%98 = load %struct.TYPE_9__*, %struct.TYPE_9__** %8
%99 = load i32, i32* @GLX_LEVEL
%100 = call i32 @glXGetConfig(i32* %97, %struct.TYPE_9__* %98, i32 %99, i32* %17)
%101 = load i32*, i32** %5
%102 = load %struct.TYPE_9__*, %struct.TYPE_9__** %8
%103 = load i32, i32* @GLX_RGBA
%104 = call i32 @glXGetConfig(i32* %101, %struct.TYPE_9__* %102, i32 %103, i32* %18)
%105 = load i32*, i32** %5
%106 = load %struct.TYPE_9__*, %struct.TYPE_9__** %8
%107 = load i32, i32* @GLX_DOUBLEBUFFER
%108 = call i32 @glXGetConfig(i32* %105, %struct.TYPE_9__* %106, i32 %107, i32* %19)
%109 = load i32*, i32** %5
%110 = load %struct.TYPE_9__*, %struct.TYPE_9__** %8
%111 = load i32, i32* @GLX_STEREO
%112 = call i32 @glXGetConfig(i32* %109, %struct.TYPE_9__* %110, i32 %111, i32* %20)
%113 = load i32*, i32** %5
%114 = load %struct.TYPE_9__*, %struct.TYPE_9__** %8
%115 = load i32, i32* @GLX_AUX_BUFFERS
%116 = call i32 @glXGetConfig(i32* %113, %struct.TYPE_9__* %114, i32 %115, i32* %21)
%117 = load i32*, i32** %5
%118 = load %struct.TYPE_9__*, %struct.TYPE_9__** %8
%119 = load i32, i32* @GLX_RED_SIZE
%120 = call i32 @glXGetConfig(i32* %117, %struct.TYPE_9__* %118, i32 %119, i32* %22)
%121 = load i32*, i32** %5
%122 = load %struct.TYPE_9__*, %struct.TYPE_9__** %8
%123 = load i32, i32* @GLX_GREEN_SIZE
%124 = call i32 @glXGetConfig(i32* %121, %struct.TYPE_9__* %122, i32 %123, i32* %23)
%125 = load i32*, i32** %5
%126 = load %struct.TYPE_9__*, %struct.TYPE_9__** %8
%127 = load i32, i32* @GLX_BLUE_SIZE
%128 = call i32 @glXGetConfig(i32* %125, %struct.TYPE_9__* %126, i32 %127, i32* %24)
%129 = load i32*, i32** %5
%130 = load %struct.TYPE_9__*, %struct.TYPE_9__** %8
%131 = load i32, i32* @GLX_ALPHA_SIZE
%132 = call i32 @glXGetConfig(i32* %129, %struct.TYPE_9__* %130, i32 %131, i32* %25)
%133 = load i32*, i32** %5
%134 = load %struct.TYPE_9__*, %struct.TYPE_9__** %8
%135 = load i32, i32* @GLX_DEPTH_SIZE
%136 = call i32 @glXGetConfig(i32* %133, %struct.TYPE_9__* %134, i32 %135, i32* %26)
%137 = load i32*, i32** %5
%138 = load %struct.TYPE_9__*, %struct.TYPE_9__** %8
%139 = load i32, i32* @GLX_STENCIL_SIZE
%140 = call i32 @glXGetConfig(i32* %137, %struct.TYPE_9__* %138, i32 %139, i32* %27)
%141 = load i32*, i32** %5
%142 = load %struct.TYPE_9__*, %struct.TYPE_9__** %8
%143 = load i32, i32* @GLX_ACCUM_RED_SIZE
%144 = call i32 @glXGetConfig(i32* %141, %struct.TYPE_9__* %142, i32 %143, i32* %28)
%145 = load i32*, i32** %5
%146 = load %struct.TYPE_9__*, %struct.TYPE_9__** %8
%147 = load i32, i32* @GLX_ACCUM_GREEN_SIZE
%148 = call i32 @glXGetConfig(i32* %145, %struct.TYPE_9__* %146, i32 %147, i32* %29)
%149 = load i32*, i32** %5
%150 = load %struct.TYPE_9__*, %struct.TYPE_9__** %8
%151 = load i32, i32* @GLX_ACCUM_BLUE_SIZE
%152 = call i32 @glXGetConfig(i32* %149, %struct.TYPE_9__* %150, i32 %151, i32* %30)
%153 = load i32*, i32** %5
%154 = load %struct.TYPE_9__*, %struct.TYPE_9__** %8
%155 = load i32, i32* @GLX_ACCUM_ALPHA_SIZE
%156 = call i32 @glXGetConfig(i32* %153, %struct.TYPE_9__* %154, i32 %155, i32* %31)
%157 = load i32, i32* %16
%158 = call i8* @Format(i32 %157, i32 2)
%159 = load i32, i32* %17
%160 = call i8* @Format(i32 %159, i32 2)
%161 = load i32, i32* %18
%162 = icmp ne i32 %161, 0
%163 = zext i1 %162 to i64
%164 = select i1 %162, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0)
%165 = load i32, i32* %19
%166 = icmp ne i32 %165, 0
%167 = zext i1 %166 to i64
%168 = select i1 %166, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0)
%169 = load i32, i32* %20
%170 = icmp ne i32 %169, 0
%171 = zext i1 %170 to i64
%172 = select i1 %170, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0)
%173 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), i8* %158, i8* %160, i8* %164, i8* %168, i8* %172)
%174 = load i32, i32* %22
%175 = call i8* @Format(i32 %174, i32 2)
%176 = load i32, i32* %23
%177 = call i8* @Format(i32 %176, i32 2)
%178 = load i32, i32* %24
%179 = call i8* @Format(i32 %178, i32 2)
%180 = load i32, i32* %25
%181 = call i8* @Format(i32 %180, i32 2)
%182 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.13, i64 0, i64 0), i8* %175, i8* %177, i8* %179, i8* %181)
%183 = load i32, i32* %21
%184 = call i8* @Format(i32 %183, i32 2)
%185 = load i32, i32* %26
%186 = call i8* @Format(i32 %185, i32 2)
%187 = load i32, i32* %27
%188 = call i8* @Format(i32 %187, i32 2)
%189 = load i32, i32* %28
%190 = call i8* @Format(i32 %189, i32 2)
%191 = load i32, i32* %29
%192 = call i8* @Format(i32 %191, i32 2)
%193 = load i32, i32* %30
%194 = call i8* @Format(i32 %193, i32 2)
%195 = load i32, i32* %31
%196 = call i8* @Format(i32 %195, i32 2)
%197 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.14, i64 0, i64 0), i8* %184, i8* %186, i8* %188, i8* %190, i8* %192, i8* %194, i8* %196)
%198 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
%199 = load %struct.TYPE_9__*, %struct.TYPE_9__** %8
store %struct.TYPE_9__* %199, %struct.TYPE_9__** %9
br label %200
200: ; preds = %81, %74
br label %201
201: ; preds = %200
%202 = load i32, i32* %14
%203 = add nsw i32 %202, -1
store i32 %203, i32* %14
%204 = load %struct.TYPE_9__*, %struct.TYPE_9__** %8
%205 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %204, i32 1
store %struct.TYPE_9__* %205, %struct.TYPE_9__** %8
br label %71
206: ; preds = %71
%207 = load %struct.TYPE_9__*, %struct.TYPE_9__** %9
%208 = icmp ne %struct.TYPE_9__* %207, null
br i1 %208, label %209, label %269
209: ; preds = %206
%210 = load i32*, i32** %5
%211 = load %struct.TYPE_9__*, %struct.TYPE_9__** %9
%212 = load i32, i32* @GL_TRUE
%213 = call i32 @glXCreateContext(i32* %210, %struct.TYPE_9__* %211, i32 0, i32 %212)
store i32 %213, i32* %32
%214 = load i32*, i32** %5
%215 = load i32*, i32** %5
%216 = load %struct.TYPE_9__*, %struct.TYPE_9__** %9
%217 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %216, i32 0, i32 3
%218 = load i32, i32* %217
%219 = call i32 @RootWindow(i32* %215, i32 %218)
%220 = load %struct.TYPE_9__*, %struct.TYPE_9__** %9
%221 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %220, i32 0, i32 2
%222 = load i32, i32* %221
%223 = load i32, i32* @AllocNone
%224 = call i32 @XCreateColormap(i32* %214, i32 %219, i32 %222, i32 %223)
store i32 %224, i32* %34
%225 = load i32, i32* %34
%226 = getelementptr inbounds %struct.TYPE_10__, %struct.TYPE_10__* %35, i32 0, i32 1
store i32 %225, i32* %226
%227 = getelementptr inbounds %struct.TYPE_10__, %struct.TYPE_10__* %35, i32 0, i32 0
store i64 0, i64* %227
%228 = load i32*, i32** %5
%229 = load i32*, i32** %5
%230 = load %struct.TYPE_9__*, %struct.TYPE_9__** %9
%231 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %230, i32 0, i32 3
%232 = load i32, i32* %231
%233 = call i32 @RootWindow(i32* %229, i32 %232)
%234 = load %struct.TYPE_9__*, %struct.TYPE_9__** %9
%235 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %234, i32 0, i32 1
%236 = load i32, i32* %235
%237 = load i32, i32* @InputOutput
%238 = load %struct.TYPE_9__*, %struct.TYPE_9__** %9
%239 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %238, i32 0, i32 2
%240 = load i32, i32* %239
%241 = load i32, i32* @CWBorderPixel
%242 = load i32, i32* @CWColormap
%243 = or i32 %241, %242
%244 = call i32 @XCreateWindow(i32* %228, i32 %233, i32 0, i32 0, i32 100, i32 100, i32 0, i32 %236, i32 %237, i32 %240, i32 %243, %struct.TYPE_10__* %35)
store i32 %244, i32* %33
%245 = load i32*, i32** %5
%246 = load i32, i32* %33
%247 = load i32, i32* %32
%248 = call i32 @glXMakeCurrent(i32* %245, i32 %246, i32 %247)
%249 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
%250 = load i32, i32* @GL_VENDOR
%251 = call i8* @glGetString(i32 %250)
%252 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.16, i64 0, i64 0), i8* %251)
%253 = load i32, i32* @GL_RENDERER
%254 = call i8* @glGetString(i32 %253)
%255 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.17, i64 0, i64 0), i8* %254)
%256 = load i32, i32* @GL_VERSION
%257 = call i8* @glGetString(i32 %256)
%258 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.18, i64 0, i64 0), i8* %257)
%259 = load i32*, i32** %5
%260 = load i32, i32* %32
%261 = call i64 @glXIsDirect(i32* %259, i32 %260)
%262 = icmp ne i64 %261, 0
br i1 %262, label %263, label %265
263: ; preds = %209
%264 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.19, i64 0, i64 0))
br label %265
265: ; preds = %263, %209
%266 = load i32, i32* @GL_EXTENSIONS
%267 = call i8* @glGetString(i32 %266)
%268 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.20, i64 0, i64 0), i8* %267)
br label %271
269: ; preds = %206
%270 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.21, i64 0, i64 0))
br label %271
271: ; preds = %269, %265
%272 = load %struct.TYPE_9__*, %struct.TYPE_9__** %7
%273 = call i32 @XFree(%struct.TYPE_9__* %272)
ret void
}

LLVM IR (-O2):
%struct.TYPE_9__ = type { i32, i32, i32, i32, i32 }
%struct.TYPE_10__ = type { i64, i32 }
@stderr = global i32 0
@.str = [26 x i8] c"Could not connect to %s.\0A\00"
@False = global i64 0
@.str.1 = [35 x i8] c"OpenGL not supported by X server.\0A\00"
@.str.2 = [13 x i8] c"display: %s\0A\00"
@.str.3 = [27 x i8] c"using GLX version: %d.%d\0A\0A\00"
@VisualScreenMask = global i32 0
@GLX_USE_GL = global i32 0
@.str.7 = [12 x i8] c"0x%x %2d %s\00"
@GLX_BUFFER_SIZE = global i32 0
@GLX_LEVEL = global i32 0
@GLX_RGBA = global i32 0
@GLX_DOUBLEBUFFER = global i32 0
@GLX_STEREO = global i32 0
@GLX_AUX_BUFFERS = global i32 0
@GLX_RED_SIZE = global i32 0
@GLX_GREEN_SIZE = global i32 0
@GLX_BLUE_SIZE = global i32 0
@GLX_ALPHA_SIZE = global i32 0
@GLX_DEPTH_SIZE = global i32 0
@GLX_STENCIL_SIZE = global i32 0
@GLX_ACCUM_RED_SIZE = global i32 0
@GLX_ACCUM_GREEN_SIZE = global i32 0
@GLX_ACCUM_BLUE_SIZE = global i32 0
@GLX_ACCUM_ALPHA_SIZE = global i32 0
@.str.8 = [27 x i8] c" %2s %2s %1s %1s %1s \00"
@.str.9 = [2 x i8] c"r\00"
@.str.10 = [2 x i8] c"c\00"
@.str.11 = [2 x i8] c"y\00"
@.str.12 = [2 x i8] c".\00"
@.str.13 = [17 x i8] c"%2s %2s %2s %2s \00"
@.str.14 = [28 x i8] c"%2s %2s %2s %2s %2s %2s %2s\00"
@GL_TRUE = global i32 0
@AllocNone = global i32 0
@InputOutput = global i32 0
@CWBorderPixel = global i32 0
@CWColormap = global i32 0
@.str.16 = [26 x i8] c"OpenGL vendor string: %s\0A\00"
@GL_VENDOR = global i32 0
@.str.17 = [28 x i8] c"OpenGL renderer string: %s\0A\00"
@GL_RENDERER = global i32 0
@.str.18 = [27 x i8] c"OpenGL version string: %s\0A\00"
@GL_VERSION = global i32 0
@.str.20 = [22 x i8] c"GL extensions: '%s'\0A\0A\00"
@GL_EXTENSIONS = global i32 0
@str = [62 x i8] c" visual bf lv rg d st r g b a ax dp st accum buffs\00"
@str.22 = [62 x i8] c" id dep cl sz l ci b ro sz sz sz sz bf th cl r g b a\00"
@str.23 = [62 x i8] c"-------------------------------------------------------------\00"
@str.24 = [24 x i8] c"No GLX-capable visuals!\00"
@str.25 = [28 x i8] c"direct rendering: supported\00"
define void @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca %struct.TYPE_9__
%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 i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca %struct.TYPE_10__
%27 = bitcast %struct.TYPE_9__* %3 to i8*
%28 = bitcast i32* %4 to i8*
%29 = bitcast i32* %5 to i8*
%30 = bitcast i32* %6 to i8*
%31 = bitcast i32* %7 to i8*
%32 = bitcast i32* %8 to i8*
%33 = bitcast i32* %9 to i8*
%34 = bitcast i32* %10 to i8*
%35 = bitcast i32* %11 to i8*
%36 = bitcast i32* %12 to i8*
%37 = bitcast i32* %13 to i8*
%38 = bitcast i32* %14 to i8*
%39 = bitcast i32* %15 to i8*
%40 = bitcast i32* %16 to i8*
%41 = bitcast i32* %17 to i8*
%42 = bitcast i32* %18 to i8*
%43 = bitcast i32* %19 to i8*
%44 = bitcast i32* %20 to i8*
%45 = bitcast i32* %21 to i8*
%46 = bitcast i32* %22 to i8*
%47 = bitcast i32* %23 to i8*
%48 = bitcast i32* %24 to i8*
%49 = bitcast i32* %25 to i8*
%50 = tail call i32* @XOpenDisplay(i32* null)
%51 = icmp eq i32* %50, null
br i1 %51, label %52, label %57
52: ; preds = %2
%53 = load i32, i32* @stderr
%54 = tail call i8* @XDisplayName(i32* null)
%55 = tail call i32 (i32, i8*, ...) @fprintf(i32 %53, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %54)
%56 = tail call i32 @exit(i32 1)
unreachable
57: ; preds = %2
%58 = call i64 @glXQueryExtension(i32* %50, i32* %4, i32* %5)
%59 = load i64, i64* @False
%60 = icmp eq i64 %58, %59
br i1 %60, label %61, label %65
61: ; preds = %57
%62 = load i32, i32* @stderr
%63 = call i32 (i32, i8*, ...) @fprintf(i32 %62, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
%64 = call i32 @exit(i32 1)
unreachable
65: ; preds = %57
%66 = call i32 @glXQueryVersion(i32* %50, i32* %6, i32* %7)
%67 = call i8* @XDisplayName(i32* null)
%68 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8* %67)
%69 = load i32, i32* %6
%70 = load i32, i32* %7
%71 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i32 %69, i32 %70)
%72 = call i32 @DefaultScreen(i32* %50)
%73 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %3, i64 0, i32 3
store i32 %72, i32* %73
%74 = load i32, i32* @VisualScreenMask
%75 = call %struct.TYPE_9__* @XGetVisualInfo(i32* %50, i32 %74, %struct.TYPE_9__* %3, i32* %8)
%76 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str, i64 0, i64 0))
%77 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.22, i64 0, i64 0))
%78 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.23, i64 0, i64 0))
%79 = load i32, i32* %8
%80 = icmp sgt i32 %79, 0
br i1 %80, label %81, label %218
81: ; preds = %65, %168
%82 = phi %struct.TYPE_9__* [ %172, %168 ], [ %75, %65 ]
%83 = phi %struct.TYPE_9__* [ %169, %168 ], [ null, %65 ]
%84 = load i32, i32* @GLX_USE_GL
%85 = call i32 @glXGetConfig(i32* %50, %struct.TYPE_9__* %82, i32 %84, i32* %9)
%86 = load i32, i32* %9
%87 = icmp eq i32 %86, 0
br i1 %87, label %168, label %88
88: ; preds = %81
%89 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %82, i64 0, i32 0
%90 = load i32, i32* %89
%91 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %82, i64 0, i32 1
%92 = load i32, i32* %91
%93 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %82, i64 0, i32 4
%94 = load i32, i32* %93
%95 = call i8* @ClassOf(i32 %94)
%96 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i32 %90, i32 %92, i8* %95)
%97 = load i32, i32* @GLX_BUFFER_SIZE
%98 = call i32 @glXGetConfig(i32* %50, %struct.TYPE_9__* %82, i32 %97, i32* %10)
%99 = load i32, i32* @GLX_LEVEL
%100 = call i32 @glXGetConfig(i32* %50, %struct.TYPE_9__* %82, i32 %99, i32* %11)
%101 = load i32, i32* @GLX_RGBA
%102 = call i32 @glXGetConfig(i32* %50, %struct.TYPE_9__* %82, i32 %101, i32* %12)
%103 = load i32, i32* @GLX_DOUBLEBUFFER
%104 = call i32 @glXGetConfig(i32* %50, %struct.TYPE_9__* %82, i32 %103, i32* %13)
%105 = load i32, i32* @GLX_STEREO
%106 = call i32 @glXGetConfig(i32* %50, %struct.TYPE_9__* %82, i32 %105, i32* %14)
%107 = load i32, i32* @GLX_AUX_BUFFERS
%108 = call i32 @glXGetConfig(i32* %50, %struct.TYPE_9__* %82, i32 %107, i32* %15)
%109 = load i32, i32* @GLX_RED_SIZE
%110 = call i32 @glXGetConfig(i32* %50, %struct.TYPE_9__* %82, i32 %109, i32* %16)
%111 = load i32, i32* @GLX_GREEN_SIZE
%112 = call i32 @glXGetConfig(i32* %50, %struct.TYPE_9__* %82, i32 %111, i32* %17)
%113 = load i32, i32* @GLX_BLUE_SIZE
%114 = call i32 @glXGetConfig(i32* %50, %struct.TYPE_9__* %82, i32 %113, i32* %18)
%115 = load i32, i32* @GLX_ALPHA_SIZE
%116 = call i32 @glXGetConfig(i32* %50, %struct.TYPE_9__* %82, i32 %115, i32* %19)
%117 = load i32, i32* @GLX_DEPTH_SIZE
%118 = call i32 @glXGetConfig(i32* %50, %struct.TYPE_9__* %82, i32 %117, i32* %20)
%119 = load i32, i32* @GLX_STENCIL_SIZE
%120 = call i32 @glXGetConfig(i32* %50, %struct.TYPE_9__* %82, i32 %119, i32* %21)
%121 = load i32, i32* @GLX_ACCUM_RED_SIZE
%122 = call i32 @glXGetConfig(i32* %50, %struct.TYPE_9__* %82, i32 %121, i32* %22)
%123 = load i32, i32* @GLX_ACCUM_GREEN_SIZE
%124 = call i32 @glXGetConfig(i32* %50, %struct.TYPE_9__* %82, i32 %123, i32* %23)
%125 = load i32, i32* @GLX_ACCUM_BLUE_SIZE
%126 = call i32 @glXGetConfig(i32* %50, %struct.TYPE_9__* %82, i32 %125, i32* %24)
%127 = load i32, i32* @GLX_ACCUM_ALPHA_SIZE
%128 = call i32 @glXGetConfig(i32* %50, %struct.TYPE_9__* %82, i32 %127, i32* %25)
%129 = load i32, i32* %10
%130 = call i8* @Format(i32 %129, i32 2)
%131 = load i32, i32* %11
%132 = call i8* @Format(i32 %131, i32 2)
%133 = load i32, i32* %12
%134 = icmp eq i32 %133, 0
%135 = select i1 %134, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0)
%136 = load i32, i32* %13
%137 = icmp eq i32 %136, 0
%138 = select i1 %137, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0)
%139 = load i32, i32* %14
%140 = icmp eq i32 %139, 0
%141 = select i1 %140, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0)
%142 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), i8* %130, i8* %132, i8* %135, i8* %138, i8* %141)
%143 = load i32, i32* %16
%144 = call i8* @Format(i32 %143, i32 2)
%145 = load i32, i32* %17
%146 = call i8* @Format(i32 %145, i32 2)
%147 = load i32, i32* %18
%148 = call i8* @Format(i32 %147, i32 2)
%149 = load i32, i32* %19
%150 = call i8* @Format(i32 %149, i32 2)
%151 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.13, i64 0, i64 0), i8* %144, i8* %146, i8* %148, i8* %150)
%152 = load i32, i32* %15
%153 = call i8* @Format(i32 %152, i32 2)
%154 = load i32, i32* %20
%155 = call i8* @Format(i32 %154, i32 2)
%156 = load i32, i32* %21
%157 = call i8* @Format(i32 %156, i32 2)
%158 = load i32, i32* %22
%159 = call i8* @Format(i32 %158, i32 2)
%160 = load i32, i32* %23
%161 = call i8* @Format(i32 %160, i32 2)
%162 = load i32, i32* %24
%163 = call i8* @Format(i32 %162, i32 2)
%164 = load i32, i32* %25
%165 = call i8* @Format(i32 %164, i32 2)
%166 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.14, i64 0, i64 0), i8* %153, i8* %155, i8* %157, i8* %159, i8* %161, i8* %163, i8* %165)
%167 = call i32 @putchar(i32 10)
br label %168
168: ; preds = %81, %88
%169 = phi %struct.TYPE_9__* [ %82, %88 ], [ %83, %81 ]
%170 = load i32, i32* %8
%171 = add nsw i32 %170, -1
store i32 %171, i32* %8
%172 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %82, i64 1
%173 = icmp sgt i32 %170, 1
br i1 %173, label %81, label %174
174: ; preds = %168
%175 = icmp eq %struct.TYPE_9__* %169, null
br i1 %175, label %218, label %176
176: ; preds = %174
%177 = bitcast %struct.TYPE_10__* %26 to i8*
%178 = load i32, i32* @GL_TRUE
%179 = call i32 @glXCreateContext(i32* %50, %struct.TYPE_9__* %169, i32 0, i32 %178)
%180 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %169, i64 0, i32 3
%181 = load i32, i32* %180
%182 = call i32 @RootWindow(i32* %50, i32 %181)
%183 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %169, i64 0, i32 2
%184 = load i32, i32* %183
%185 = load i32, i32* @AllocNone
%186 = call i32 @XCreateColormap(i32* %50, i32 %182, i32 %184, i32 %185)
%187 = getelementptr inbounds %struct.TYPE_10__, %struct.TYPE_10__* %26, i64 0, i32 1
store i32 %186, i32* %187
%188 = getelementptr inbounds %struct.TYPE_10__, %struct.TYPE_10__* %26, i64 0, i32 0
store i64 0, i64* %188
%189 = load i32, i32* %180
%190 = call i32 @RootWindow(i32* %50, i32 %189)
%191 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %169, i64 0, i32 1
%192 = load i32, i32* %191
%193 = load i32, i32* @InputOutput
%194 = load i32, i32* %183
%195 = load i32, i32* @CWBorderPixel
%196 = load i32, i32* @CWColormap
%197 = or i32 %196, %195
%198 = call i32 @XCreateWindow(i32* %50, i32 %190, i32 0, i32 0, i32 100, i32 100, i32 0, i32 %192, i32 %193, i32 %194, i32 %197, %struct.TYPE_10__* %26)
%199 = call i32 @glXMakeCurrent(i32* %50, i32 %198, i32 %179)
%200 = call i32 @putchar(i32 10)
%201 = load i32, i32* @GL_VENDOR
%202 = call i8* @glGetString(i32 %201)
%203 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.16, i64 0, i64 0), i8* %202)
%204 = load i32, i32* @GL_RENDERER
%205 = call i8* @glGetString(i32 %204)
%206 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.17, i64 0, i64 0), i8* %205)
%207 = load i32, i32* @GL_VERSION
%208 = call i8* @glGetString(i32 %207)
%209 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.18, i64 0, i64 0), i8* %208)
%210 = call i64 @glXIsDirect(i32* %50, i32 %179)
%211 = icmp eq i64 %210, 0
br i1 %211, label %214, label %212
212: ; preds = %176
%213 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.25, i64 0, i64 0))
br label %214
214: ; preds = %212, %176
%215 = load i32, i32* @GL_EXTENSIONS
%216 = call i8* @glGetString(i32 %215)
%217 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.20, i64 0, i64 0), i8* %216)
br label %220
218: ; preds = %65, %174
%219 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.24, i64 0, i64 0))
br label %220
220: ; preds = %218, %214
%221 = call i32 @XFree(%struct.TYPE_9__* %75)
ret void
}