#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_13__ TYPE_4__;
typedef struct TYPE_12__ TYPE_3__;
typedef struct TYPE_11__ TYPE_2__;
typedef struct TYPE_10__ TYPE_1__;

/* Type definitions */
struct TYPE_11__ {
  int /*<<< orphan*/ font;
  int /*<<< orphan*/ background;
  int /*<<< orphan*/ foreground;
};
typedef TYPE_2__ XGCValues;
struct TYPE_13__ {
  unsigned int rbearing;
  unsigned int ascent;
  unsigned int descent;
  unsigned int lbearing;
  unsigned int width;
};
struct TYPE_10__ {
  unsigned int lbearing;
};
struct TYPE_12__ {
  TYPE_4__ max_bounds;
  int /*<<< orphan*/ fid;
  TYPE_1__ min_bounds;
};
typedef TYPE_3__ XFontStruct;
typedef TYPE_4__ XCharStruct;
typedef int /*<<< orphan*/ Window;
typedef int /*<<< orphan*/ Pixmap;
typedef int /*<<< orphan*/ GLubyte;
typedef int GLint;
typedef unsigned int GLfloat;
typedef int /*<<< orphan*/ GC;
typedef int /*<<< orphan*/ Font;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
int /*<<< orphan*/ BlackPixel(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ DefaultScreen(int /*<<< orphan*/ *);
unsigned long GCBackground;
unsigned long GCFont;
unsigned long GCForeground;
int /*<<< orphan*/ GL_COMPILE;
int GL_FALSE;
int /*<<< orphan*/ GL_UNPACK_ALIGNMENT;
int /*<<< orphan*/ GL_UNPACK_LSB_FIRST;
int /*<<< orphan*/ GL_UNPACK_ROW_LENGTH;
int /*<<< orphan*/ GL_UNPACK_SKIP_PIXELS;
int /*<<< orphan*/ GL_UNPACK_SKIP_ROWS;
int /*<<< orphan*/ GL_UNPACK_SWAP_BYTES;
int /*<<< orphan*/ RootWindow(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ WhitePixel(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ XCreateGC(int /*<<< orphan*/ *, int /*<<< orphan*/,
                             unsigned long, TYPE_2__ *);
int /*<<< orphan*/ XCreatePixmap(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                 unsigned int, unsigned int, int);
int /*<<< orphan*/ XFreeFontInfo(int /*<<< orphan*/ *, TYPE_3__ *, int);
int /*<<< orphan*/ XFreeGC(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ XFreePixmap(int /*<<< orphan*/ *, int /*<<< orphan*/);
TYPE_3__ *XQueryFont(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ fill_bitmap(int /*<<< orphan*/ *, int /*<<< orphan*/,
                               int /*<<< orphan*/, unsigned int, unsigned int,
                               unsigned int, unsigned int, int, int,
                               unsigned int const, int /*<<< orphan*/ *, int);
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
int /*<<< orphan*/ glBitmap(unsigned int, unsigned int, double, double,
                            unsigned int, unsigned int, int /*<<< orphan*/ *);
int /*<<< orphan*/ glEndList();
int /*<<< orphan*/ glGetIntegerv(int /*<<< orphan*/, int *);
int /*<<< orphan*/ glNewList(int const, int /*<<< orphan*/);
int /*<<< orphan*/ glPixelStorei(int /*<<< orphan*/, int);
int /*<<< orphan*/ *glXGetCurrentDisplay();
TYPE_4__ *isvalid(TYPE_3__ *, unsigned int const);
scalar_t__ malloc(unsigned int);
void glXUseRotatedXFontMESA(Font font, int first, int count, int listbase,
                            int rotation) {
  Display *dpy;
  Window win;
  Pixmap pixmap;
  GC gc;
  XFontStruct *fs;
  GLint swapbytes, lsbfirst, rowlength;
  GLint skiprows, skippixels, alignment;
  unsigned int maxCharWidth, maxCharHeight;
  GLubyte *bm;
  int i;
  if (rotation != 0 && rotation != 90 && rotation != 180 && rotation != 270)
    return;
  dpy = glXGetCurrentDisplay();
  if (!dpy)
    return;
  win = RootWindow(dpy, DefaultScreen(dpy));
  fs = XQueryFont(dpy, font);
  if (!fs) {
    return;
  }
  maxCharWidth = fs->max_bounds.rbearing - fs->min_bounds.lbearing;
  maxCharHeight = fs->max_bounds.ascent + fs->max_bounds.descent;
  if (rotation == 90 || rotation == 270) {
    bm = (GLubyte *)malloc((maxCharHeight + 7) / 8 * maxCharWidth);
  } else {
    bm = (GLubyte *)malloc((maxCharWidth + 7) / 8 * maxCharHeight);
  }
  if (!bm) {
    XFreeFontInfo(NULL, fs, 1);
    return;
  }
  glGetIntegerv(GL_UNPACK_SWAP_BYTES, &swapbytes);
  glGetIntegerv(GL_UNPACK_LSB_FIRST, &lsbfirst);
  glGetIntegerv(GL_UNPACK_ROW_LENGTH, &rowlength);
  glGetIntegerv(GL_UNPACK_SKIP_ROWS, &skiprows);
  glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &skippixels);
  glGetIntegerv(GL_UNPACK_ALIGNMENT, &alignment);
  glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE);
  glPixelStorei(GL_UNPACK_LSB_FIRST, GL_FALSE);
  glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
  glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
  glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
  glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
  pixmap = XCreatePixmap(dpy, win, maxCharWidth, maxCharHeight, 1);
  {
    XGCValues values;
    unsigned long valuemask;
    values.foreground = BlackPixel(dpy, DefaultScreen(dpy));
    values.background = WhitePixel(dpy, DefaultScreen(dpy));
    values.font = fs->fid;
    valuemask = GCForeground | GCBackground | GCFont;
    gc = XCreateGC(dpy, pixmap, valuemask, &values);
  }
  for (i = 0; i < count; i++) {
    const unsigned int c = first + i;
    const int list = listbase + i;
    unsigned int charWidth, charHeight;
    unsigned int bitmapWidth = 0, bitmapHeight = 0;
    GLfloat xOrig, yOrig, xStep, yStep, dtemp;
    const XCharStruct *ch;
    int xPos, yPos;
    int valid;
    ch = isvalid(fs, c);
    if (!ch) {
      ch = &fs->max_bounds;
      valid = 0;
    } else {
      valid = 1;
    }
    charWidth = ch->rbearing - ch->lbearing;
    charHeight = ch->ascent + ch->descent;
    xOrig = -ch->lbearing;
    yOrig = ch->descent;
    xStep = ch->width;
    yStep = 0;
    xPos = -ch->lbearing;
    yPos = ch->ascent;
    switch (rotation) {
    case 0:
      bitmapWidth = charWidth;
      bitmapHeight = charHeight;
      break;
    case 90:
      dtemp = xStep;
      xStep = -yStep;
      yStep = dtemp;
      yOrig = xOrig;
      xOrig = charHeight - (charHeight - yPos);
      bitmapWidth = charHeight;
      bitmapHeight = charWidth;
      break;
    case 180:
      xStep = -xStep;
      yStep = -yStep;
      xOrig = charWidth - xOrig - 1;
      yOrig = charHeight - yOrig - 1;
      bitmapWidth = charWidth;
      bitmapHeight = charHeight;
      break;
    case 270:
      dtemp = xStep;
      xStep = yStep;
      yStep = -dtemp;
      dtemp = yOrig;
      yOrig = charWidth - xOrig;
      xOrig = dtemp;
      bitmapWidth = charHeight;
      bitmapHeight = charWidth;
      break;
    default:;
    }
    glNewList(list, GL_COMPILE);
    if (valid && bitmapWidth > 0 && bitmapHeight > 0) {
      fill_bitmap(dpy, pixmap, gc, bitmapWidth, bitmapHeight, charWidth,
                  charHeight, xPos, yPos, c, bm, rotation);
      glBitmap(bitmapWidth, bitmapHeight, xOrig, yOrig, xStep, yStep, bm);
    } else {
      glBitmap(0, 0, 0.0, 0.0, xStep, yStep, NULL);
    }
    glEndList();
  }
  free(bm);
  XFreeFontInfo(NULL, fs, 1);
  XFreePixmap(dpy, pixmap);
  XFreeGC(dpy, gc);
  glPixelStorei(GL_UNPACK_SWAP_BYTES, swapbytes);
  glPixelStorei(GL_UNPACK_LSB_FIRST, lsbfirst);
  glPixelStorei(GL_UNPACK_ROW_LENGTH, rowlength);
  glPixelStorei(GL_UNPACK_SKIP_ROWS, skiprows);
  glPixelStorei(GL_UNPACK_SKIP_PIXELS, skippixels);
  glPixelStorei(GL_UNPACK_ALIGNMENT, alignment);
}


x86 assembly (clang, -O0):
<glXUseRotatedXFontMESA>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x110,%rsp
mov    %edi,-0x24(%rbp)
mov    %esi,-0x28(%rbp)
mov    %edx,-0x2c(%rbp)
mov    %ecx,-0x30(%rbp)
mov    %r8d,-0x34(%rbp)
cmpl   $0x0,-0x34(%rbp)
je     1295 <glXUseRotatedXFontMESA+0x55>
cmpl   $0x5a,-0x34(%rbp)
je     1295 <glXUseRotatedXFontMESA+0x55>
cmpl   $0xb4,-0x34(%rbp)
je     1295 <glXUseRotatedXFontMESA+0x55>
cmpl   $0x10e,-0x34(%rbp)
je     1295 <glXUseRotatedXFontMESA+0x55>
jmp    198c <glXUseRotatedXFontMESA+0x74c>
mov    $0x0,%al
call   10b0 <glXGetCurrentDisplay@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jne    12b0 <glXUseRotatedXFontMESA+0x70>
jmp    198c <glXUseRotatedXFontMESA+0x74c>
mov    -0x40(%rbp),%rax
mov    %rax,-0xe8(%rbp)
mov    -0x40(%rbp),%rdi
call   1130 <DefaultScreen@plt>
mov    -0xe8(%rbp),%rdi
mov    %eax,%esi
call   10f0 <RootWindow@plt>
mov    %eax,-0x44(%rbp)
mov    -0x40(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   10a0 <XQueryFont@plt>
mov    %rax,-0x58(%rbp)
cmpq   $0x0,-0x58(%rbp)
jne    12f5 <glXUseRotatedXFontMESA+0xb5>
jmp    198c <glXUseRotatedXFontMESA+0x74c>
mov    -0x58(%rbp),%rax
mov    (%rax),%eax
mov    -0x58(%rbp),%rcx
sub    0x18(%rcx),%eax
mov    %eax,-0x74(%rbp)
mov    -0x58(%rbp),%rax
mov    0x4(%rax),%eax
mov    -0x58(%rbp),%rcx
add    0x8(%rcx),%eax
mov    %eax,-0x78(%rbp)
cmpl   $0x5a,-0x34(%rbp)
je     132d <glXUseRotatedXFontMESA+0xed>
cmpl   $0x10e,-0x34(%rbp)
jne    1348 <glXUseRotatedXFontMESA+0x108>
mov    -0x78(%rbp),%edi
add    $0x7,%edi
shr    $0x3,%edi
imul   -0x74(%rbp),%edi
call   10d0 <malloc@plt>
mov    %rax,-0x80(%rbp)
jmp    135e <glXUseRotatedXFontMESA+0x11e>
mov    -0x74(%rbp),%edi
add    $0x7,%edi
shr    $0x3,%edi
imul   -0x78(%rbp),%edi
call   10d0 <malloc@plt>
mov    %rax,-0x80(%rbp)
cmpq   $0x0,-0x80(%rbp)
jne    1380 <glXUseRotatedXFontMESA+0x140>
mov    -0x58(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edi
mov    $0x1,%edx
call   10e0 <XFreeFontInfo@plt>
jmp    198c <glXUseRotatedXFontMESA+0x74c>
mov    0x2c29(%rip),%rax
mov    (%rax),%edi
lea    -0x5c(%rbp),%rsi
call   1140 <glGetIntegerv@plt>
mov    0x2c27(%rip),%rax
mov    (%rax),%edi
lea    -0x60(%rbp),%rsi
call   1140 <glGetIntegerv@plt>
mov    0x2bfd(%rip),%rax
mov    (%rax),%edi
lea    -0x64(%rbp),%rsi
call   1140 <glGetIntegerv@plt>
mov    0x2bdb(%rip),%rax
mov    (%rax),%edi
lea    -0x68(%rbp),%rsi
call   1140 <glGetIntegerv@plt>
mov    0x2c01(%rip),%rax
mov    (%rax),%edi
lea    -0x6c(%rbp),%rsi
call   1140 <glGetIntegerv@plt>
mov    0x2bf7(%rip),%rax
mov    (%rax),%edi
lea    -0x70(%rbp),%rsi
call   1140 <glGetIntegerv@plt>
mov    0x2bbd(%rip),%rax
mov    (%rax),%edi
mov    0x2bec(%rip),%rax
mov    (%rax),%esi
call   1080 <glPixelStorei@plt>
mov    0x2bb6(%rip),%rax
mov    (%rax),%edi
mov    0x2bd5(%rip),%rax
mov    (%rax),%esi
call   1080 <glPixelStorei@plt>
mov    0x2b87(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1080 <glPixelStorei@plt>
mov    0x2b67(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1080 <glPixelStorei@plt>
mov    0x2b8f(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1080 <glPixelStorei@plt>
mov    0x2b87(%rip),%rax
mov    (%rax),%edi
mov    $0x1,%esi
call   1080 <glPixelStorei@plt>
mov    -0x40(%rbp),%rdi
mov    -0x44(%rbp),%esi
mov    -0x74(%rbp),%edx
mov    -0x78(%rbp),%ecx
mov    $0x1,%r8d
call   1150 <XCreatePixmap@plt>
mov    %eax,-0x48(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0xf8(%rbp)
mov    -0x40(%rbp),%rdi
call   1130 <DefaultScreen@plt>
mov    -0xf8(%rbp),%rdi
mov    %eax,%esi
call   1110 <BlackPixel@plt>
mov    %eax,-0x88(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0xf0(%rbp)
mov    -0x40(%rbp),%rdi
call   1130 <DefaultScreen@plt>
mov    -0xf0(%rbp),%rdi
mov    %eax,%esi
call   1060 <WhitePixel@plt>
mov    %eax,-0x8c(%rbp)
mov    -0x58(%rbp),%rax
mov    0x14(%rax),%eax
mov    %eax,-0x90(%rbp)
mov    0x2b04(%rip),%rax
mov    (%rax),%rax
mov    0x2aba(%rip),%rcx
or     (%rcx),%rax
mov    0x2ac8(%rip),%rcx
or     (%rcx),%rax
mov    %rax,-0x98(%rbp)
mov    -0x40(%rbp),%rdi
mov    -0x48(%rbp),%esi
mov    -0x98(%rbp),%rdx
lea    -0x90(%rbp),%rcx
call   1100 <XCreateGC@plt>
mov    %eax,-0x4c(%rbp)
movl   $0x0,-0x84(%rbp)
mov    -0x84(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    18f3 <glXUseRotatedXFontMESA+0x6b3>
mov    -0x28(%rbp),%eax
add    -0x84(%rbp),%eax
mov    %eax,-0x9c(%rbp)
mov    -0x30(%rbp),%eax
add    -0x84(%rbp),%eax
mov    %eax,-0xa0(%rbp)
movl   $0x0,-0xac(%rbp)
movl   $0x0,-0xb0(%rbp)
mov    -0x58(%rbp),%rdi
mov    -0x9c(%rbp),%esi
call   1040 <isvalid@plt>
mov    %rax,-0xd0(%rbp)
cmpq   $0x0,-0xd0(%rbp)
jne    15a0 <glXUseRotatedXFontMESA+0x360>
mov    -0x58(%rbp),%rax
mov    %rax,-0xd0(%rbp)
movl   $0x0,-0xdc(%rbp)
jmp    15aa <glXUseRotatedXFontMESA+0x36a>
movl   $0x1,-0xdc(%rbp)
mov    -0xd0(%rbp),%rcx
mov    (%rcx),%eax
mov    0xc(%rcx),%ecx
sub    %ecx,%eax
mov    %eax,-0xa4(%rbp)
mov    -0xd0(%rbp),%rcx
mov    0x4(%rcx),%eax
mov    0x8(%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0xa8(%rbp)
mov    -0xd0(%rbp),%rax
mov    0xc(%rax),%eax
neg    %eax
mov    %eax,-0xb4(%rbp)
mov    -0xd0(%rbp),%rax
mov    0x8(%rax),%eax
mov    %eax,-0xb8(%rbp)
mov    -0xd0(%rbp),%rax
mov    0x10(%rax),%eax
mov    %eax,-0xbc(%rbp)
movl   $0x0,-0xc0(%rbp)
mov    -0xd0(%rbp),%rax
mov    0xc(%rax),%eax
neg    %eax
mov    %eax,-0xd4(%rbp)
mov    -0xd0(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0xd8(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,-0xfc(%rbp)
test   %eax,%eax
je     1687 <glXUseRotatedXFontMESA+0x447>
jmp    1647 <glXUseRotatedXFontMESA+0x407>
mov    -0xfc(%rbp),%eax
sub    $0x5a,%eax
je     16a4 <glXUseRotatedXFontMESA+0x464>
jmp    165b <glXUseRotatedXFontMESA+0x41b>
mov    -0xfc(%rbp),%eax
sub    $0xb4,%eax
je     170d <glXUseRotatedXFontMESA+0x4cd>
jmp    1671 <glXUseRotatedXFontMESA+0x431>
mov    -0xfc(%rbp),%eax
sub    $0x10e,%eax
je     1770 <glXUseRotatedXFontMESA+0x530>
jmp    17dd <glXUseRotatedXFontMESA+0x59d>
mov    -0xa4(%rbp),%eax
mov    %eax,-0xac(%rbp)
mov    -0xa8(%rbp),%eax
mov    %eax,-0xb0(%rbp)
jmp    17e2 <glXUseRotatedXFontMESA+0x5a2>
mov    -0xbc(%rbp),%eax
mov    %eax,-0xc4(%rbp)
xor    %eax,%eax
sub    -0xc0(%rbp),%eax
mov    %eax,-0xbc(%rbp)
mov    -0xc4(%rbp),%eax
mov    %eax,-0xc0(%rbp)
mov    -0xb4(%rbp),%eax
mov    %eax,-0xb8(%rbp)
mov    -0xa8(%rbp),%eax
mov    -0xa8(%rbp),%ecx
sub    -0xd8(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0xb4(%rbp)
mov    -0xa8(%rbp),%eax
mov    %eax,-0xac(%rbp)
mov    -0xa4(%rbp),%eax
mov    %eax,-0xb0(%rbp)
jmp    17e2 <glXUseRotatedXFontMESA+0x5a2>
xor    %eax,%eax
sub    -0xbc(%rbp),%eax
mov    %eax,-0xbc(%rbp)
xor    %eax,%eax
sub    -0xc0(%rbp),%eax
mov    %eax,-0xc0(%rbp)
mov    -0xa4(%rbp),%eax
sub    -0xb4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xb4(%rbp)
mov    -0xa8(%rbp),%eax
sub    -0xb8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xb8(%rbp)
mov    -0xa4(%rbp),%eax
mov    %eax,-0xac(%rbp)
mov    -0xa8(%rbp),%eax
mov    %eax,-0xb0(%rbp)
jmp    17e2 <glXUseRotatedXFontMESA+0x5a2>
mov    -0xbc(%rbp),%eax
mov    %eax,-0xc4(%rbp)
mov    -0xc0(%rbp),%eax
mov    %eax,-0xbc(%rbp)
xor    %eax,%eax
sub    -0xc4(%rbp),%eax
mov    %eax,-0xc0(%rbp)
mov    -0xb8(%rbp),%eax
mov    %eax,-0xc4(%rbp)
mov    -0xa4(%rbp),%eax
sub    -0xb4(%rbp),%eax
mov    %eax,-0xb8(%rbp)
mov    -0xc4(%rbp),%eax
mov    %eax,-0xb4(%rbp)
mov    -0xa8(%rbp),%eax
mov    %eax,-0xac(%rbp)
mov    -0xa4(%rbp),%eax
mov    %eax,-0xb0(%rbp)
jmp    17e2 <glXUseRotatedXFontMESA+0x5a2>
jmp    17e2 <glXUseRotatedXFontMESA+0x5a2>
mov    -0xa0(%rbp),%edi
mov    0x27a1(%rip),%rax
mov    (%rax),%esi
call   1070 <glNewList@plt>
cmpl   $0x0,-0xdc(%rbp)
je     18b8 <glXUseRotatedXFontMESA+0x678>
cmpl   $0x0,-0xac(%rbp)
jbe    18b8 <glXUseRotatedXFontMESA+0x678>
cmpl   $0x0,-0xb0(%rbp)
jbe    18b8 <glXUseRotatedXFontMESA+0x678>
mov    -0x40(%rbp),%rdi
mov    -0x48(%rbp),%esi
mov    -0x4c(%rbp),%edx
mov    -0xac(%rbp),%ecx
mov    -0xb0(%rbp),%r8d
mov    -0xa4(%rbp),%r9d
mov    -0xa8(%rbp),%r10d
mov    -0xd4(%rbp),%r11d
mov    -0xd8(%rbp),%ebx
mov    -0x9c(%rbp),%r14d
mov    -0x80(%rbp),%r15
mov    -0x34(%rbp),%r12d
mov    %rsp,%rax
mov    %r12d,0x28(%rax)
mov    %r15,0x20(%rax)
mov    %r14d,0x18(%rax)
mov    %ebx,0x10(%rax)
mov    %r11d,0x8(%rax)
mov    %r10d,(%rax)
call   1090 <fill_bitmap@plt>
mov    -0xac(%rbp),%edi
mov    -0xb0(%rbp),%esi
mov    -0xb4(%rbp),%eax
cvtsi2sd %rax,%xmm0
mov    -0xb8(%rbp),%eax
cvtsi2sd %rax,%xmm1
mov    -0xbc(%rbp),%edx
mov    -0xc0(%rbp),%ecx
mov    -0x80(%rbp),%r8
call   10c0 <glBitmap@plt>
jmp    18d8 <glXUseRotatedXFontMESA+0x698>
mov    -0xbc(%rbp),%edx
mov    -0xc0(%rbp),%ecx
xor    %esi,%esi
xorps  %xmm1,%xmm1
xor    %eax,%eax
mov    %eax,%r8d
mov    %esi,%edi
movaps %xmm1,%xmm0
call   10c0 <glBitmap@plt>
mov    $0x0,%al
call   1160 <glEndList@plt>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    1521 <glXUseRotatedXFontMESA+0x2e1>
mov    -0x80(%rbp),%rdi
call   1030 <free@plt>
mov    -0x58(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edi
mov    $0x1,%edx
call   10e0 <XFreeFontInfo@plt>
mov    -0x40(%rbp),%rdi
mov    -0x48(%rbp),%esi
call   1050 <XFreePixmap@plt>
mov    -0x40(%rbp),%rdi
mov    -0x4c(%rbp),%esi
call   1120 <XFreeGC@plt>
mov    0x2683(%rip),%rax
mov    (%rax),%edi
mov    -0x5c(%rbp),%esi
call   1080 <glPixelStorei@plt>
mov    0x2682(%rip),%rax
mov    (%rax),%edi
mov    -0x60(%rbp),%esi
call   1080 <glPixelStorei@plt>
mov    0x2659(%rip),%rax
mov    (%rax),%edi
mov    -0x64(%rbp),%esi
call   1080 <glPixelStorei@plt>
mov    0x2638(%rip),%rax
mov    (%rax),%edi
mov    -0x68(%rbp),%esi
call   1080 <glPixelStorei@plt>
mov    0x265f(%rip),%rax
mov    (%rax),%edi
mov    -0x6c(%rbp),%esi
call   1080 <glPixelStorei@plt>
mov    0x2656(%rip),%rax
mov    (%rax),%edi
mov    -0x70(%rbp),%esi
call   1080 <glPixelStorei@plt>
add    $0x110,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<glXUseRotatedXFontMESA>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %r8d,%r14d
mov    %ecx,0x24(%rsp)
mov    %edx,%r12d
mov    %esi,%r15d
mov    %edi,%ebp
cmp    $0xb3,%r8d
jg     1279 <glXUseRotatedXFontMESA+0x39>
test   %r14d,%r14d
je     128f <glXUseRotatedXFontMESA+0x4f>
cmp    $0x5a,%r14d
je     128f <glXUseRotatedXFontMESA+0x4f>
jmp    1717 <glXUseRotatedXFontMESA+0x4d7>
cmp    $0x10e,%r14d
je     128f <glXUseRotatedXFontMESA+0x4f>
cmp    $0xb4,%r14d
jne    1717 <glXUseRotatedXFontMESA+0x4d7>
xor    %eax,%eax
call   10b0 <glXGetCurrentDisplay@plt>
test   %rax,%rax
je     1717 <glXUseRotatedXFontMESA+0x4d7>
mov    %rax,%r13
mov    %rax,%rdi
call   1130 <DefaultScreen@plt>
mov    %r13,%rdi
mov    %eax,%esi
call   10f0 <RootWindow@plt>
mov    %eax,%ebx
mov    %r13,%rdi
mov    %ebp,%esi
call   10a0 <XQueryFont@plt>
test   %rax,%rax
je     1717 <glXUseRotatedXFontMESA+0x4d7>
mov    %rax,%rbp
mov    %ebx,0x4(%rsp)
mov    (%rax),%ebx
sub    0x18(%rax),%ebx
mov    0x8(%rax),%ecx
add    0x4(%rax),%ecx
mov    %ecx,%edi
mov    %ebx,%eax
cmp    $0x5a,%r14d
je     12f6 <glXUseRotatedXFontMESA+0xb6>
mov    %ecx,%edi
mov    %ebx,%eax
cmp    $0x10e,%r14d
je     12f6 <glXUseRotatedXFontMESA+0xb6>
mov    %ebx,%edi
mov    %ecx,%eax
mov    %ecx,0xc(%rsp)
add    $0x7,%edi
shr    $0x3,%edi
imul   %eax,%edi
call   10d0 <malloc@plt>
mov    %rax,0x50(%rsp)
test   %rax,%rax
je     1729 <glXUseRotatedXFontMESA+0x4e9>
mov    0x2c93(%rip),%rax
mov    (%rax),%edi
lea    0x44(%rsp),%rsi
call   1140 <glGetIntegerv@plt>
mov    0x2c90(%rip),%rax
mov    (%rax),%edi
lea    0x40(%rsp),%rsi
call   1140 <glGetIntegerv@plt>
mov    0x2c65(%rip),%rax
mov    (%rax),%edi
lea    0x3c(%rsp),%rsi
call   1140 <glGetIntegerv@plt>
mov    0x2c42(%rip),%rax
mov    (%rax),%edi
lea    0x38(%rsp),%rsi
call   1140 <glGetIntegerv@plt>
mov    0x2c67(%rip),%rax
mov    (%rax),%edi
lea    0x34(%rsp),%rsi
call   1140 <glGetIntegerv@plt>
mov    0x2c5c(%rip),%rax
mov    (%rax),%edi
lea    0x30(%rsp),%rsi
call   1140 <glGetIntegerv@plt>
mov    0x2c21(%rip),%rax
mov    (%rax),%edi
mov    %rbp,0x28(%rsp)
mov    %ebx,%ebp
mov    0x2c49(%rip),%rbx
mov    (%rbx),%esi
call   1080 <glPixelStorei@plt>
mov    0x2c13(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%esi
mov    0x28(%rsp),%rbx
call   1080 <glPixelStorei@plt>
mov    0x2be6(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1080 <glPixelStorei@plt>
mov    0x2bc6(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1080 <glPixelStorei@plt>
mov    0x2bee(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1080 <glPixelStorei@plt>
mov    0x2be6(%rip),%rax
mov    (%rax),%edi
mov    $0x1,%esi
call   1080 <glPixelStorei@plt>
mov    %r13,%rdi
mov    0x4(%rsp),%esi
mov    %ebp,%edx
mov    0xc(%rsp),%ecx
mov    $0x1,%r8d
call   1150 <XCreatePixmap@plt>
mov    %eax,%ebp
mov    %r13,%rdi
call   1130 <DefaultScreen@plt>
mov    %r13,%rdi
mov    %eax,%esi
call   1110 <BlackPixel@plt>
mov    %eax,0x70(%rsp)
mov    %r13,%rdi
call   1130 <DefaultScreen@plt>
mov    %r13,%rdi
mov    %eax,%esi
call   1060 <WhitePixel@plt>
mov    %eax,0x6c(%rsp)
mov    0x2b95(%rip),%rax
mov    0x2b4e(%rip),%rcx
mov    (%rcx),%rdx
or     (%rax),%rdx
mov    0x14(%rbx),%eax
mov    %eax,0x68(%rsp)
mov    0x2b52(%rip),%rax
or     (%rax),%rdx
lea    0x68(%rsp),%rcx
mov    %r13,0x48(%rsp)
mov    %r13,%rdi
mov    %ebp,0x20(%rsp)
mov    %ebp,%esi
call   1100 <XCreateGC@plt>
mov    %eax,0x1c(%rsp)
test   %r12d,%r12d
jle    1675 <glXUseRotatedXFontMESA+0x435>
mov    %r14,0x58(%rsp)
jmp    14e8 <glXUseRotatedXFontMESA+0x2a8>
cs nopw 0x0(%rax,%rax,1)
nop
xorpd  %xmm0,%xmm0
xorpd  %xmm1,%xmm1
xor    %edi,%edi
xor    %esi,%esi
mov    %ebp,%edx
mov    0x4(%rsp),%ecx
xor    %r8d,%r8d
call   10c0 <glBitmap@plt>
mov    0x60(%rsp),%r15
mov    0x28(%rsp),%rbx
xor    %eax,%eax
call   1160 <glEndList@plt>
addl   $0x1,0x24(%rsp)
add    $0x1,%r15d
mov    0xc(%rsp),%r12d
add    $0xffffffff,%r12d
mov    0x58(%rsp),%r14
je     1675 <glXUseRotatedXFontMESA+0x435>
mov    %rbx,%rdi
mov    %r15,0x60(%rsp)
mov    %r15d,%esi
call   1040 <isvalid@plt>
test   %rax,%rax
setne  %r15b
cmove  %rbx,%rax
mov    (%rax),%ecx
mov    0x4(%rax),%edx
mov    0xc(%rax),%ebx
mov    %ecx,%r13d
sub    %ebx,%r13d
mov    0x8(%rax),%edi
lea    (%rdi,%rdx,1),%esi
neg    %ebx
mov    0x10(%rax),%ebp
cmp    $0xb3,%r14d
mov    %r12d,0xc(%rsp)
mov    %rdx,0x80(%rsp)
mov    %rsi,0x78(%rsp)
jg     1560 <glXUseRotatedXFontMESA+0x320>
test   %r14d,%r14d
je     1590 <glXUseRotatedXFontMESA+0x350>
cmp    $0x5a,%r14d
jne    15c0 <glXUseRotatedXFontMESA+0x380>
mov    %ebp,0x4(%rsp)
xor    %ebp,%ebp
mov    %esi,%r14d
mov    %r13d,%r12d
mov    %edx,%eax
mov    %edx,0x8(%rsp)
mov    %ebx,%eax
jmp    1588 <glXUseRotatedXFontMESA+0x348>
nopl   0x0(%rax)
cmp    $0xb4,%r14d
je     15a0 <glXUseRotatedXFontMESA+0x360>
cmp    $0x10e,%r14d
jne    15c0 <glXUseRotatedXFontMESA+0x380>
neg    %ebp
mov    %ebp,0x4(%rsp)
xor    %ebp,%ebp
mov    %esi,%r14d
mov    %r13d,%r12d
mov    %edi,%eax
mov    %edi,0x8(%rsp)
mov    %ecx,%eax
mov    %rax,0x10(%rsp)
jmp    15d9 <glXUseRotatedXFontMESA+0x399>
nop
mov    %rdi,0x10(%rsp)
mov    %r13d,%r14d
mov    %esi,%r12d
jmp    15cb <glXUseRotatedXFontMESA+0x38b>
nopl   (%rax)
neg    %ebp
add    $0xffffffff,%ecx
lea    -0x1(%rdx),%eax
mov    %rax,0x10(%rsp)
mov    %r13d,%r14d
mov    %esi,%r12d
mov    %ecx,0x8(%rsp)
jmp    15d1 <glXUseRotatedXFontMESA+0x391>
nopl   0x0(%rax)
mov    %rdi,0x10(%rsp)
xor    %r14d,%r14d
xor    %r12d,%r12d
mov    %ebx,%eax
mov    %ebx,0x8(%rsp)
movl   $0x0,0x4(%rsp)
mov    0x29b0(%rip),%rax
mov    (%rax),%esi
mov    0x24(%rsp),%edi
call   1070 <glNewList@plt>
test   %r14d,%r14d
setne  %al
and    %al,%r15b
cmp    $0x1,%r15b
jne    14a0 <glXUseRotatedXFontMESA+0x260>
test   %r12d,%r12d
je     14a0 <glXUseRotatedXFontMESA+0x260>
mov    0x48(%rsp),%rdi
mov    0x20(%rsp),%esi
mov    0x1c(%rsp),%edx
mov    %r14d,%ecx
mov    %r12d,%r8d
mov    %r13d,%r9d
push   0x58(%rsp)
mov    %ebp,%r13d
mov    0x58(%rsp),%rbp
push   %rbp
mov    0x70(%rsp),%r15
push   %r15
push   0x98(%rsp)
push   %rbx
push   0xa0(%rsp)
call   1090 <fill_bitmap@plt>
add    $0x30,%rsp
mov    0x8(%rsp),%eax
cvtsi2sd %rax,%xmm0
mov    0x10(%rsp),%eax
cvtsi2sd %rax,%xmm1
mov    %r14d,%edi
mov    %r12d,%esi
mov    %r13d,%edx
mov    0x4(%rsp),%ecx
mov    %rbp,%r8
call   10c0 <glBitmap@plt>
jmp    14bf <glXUseRotatedXFontMESA+0x27f>
mov    0x50(%rsp),%rdi
call   1030 <free@plt>
xor    %edi,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   10e0 <XFreeFontInfo@plt>
mov    0x48(%rsp),%rbx
mov    %rbx,%rdi
mov    0x20(%rsp),%esi
call   1050 <XFreePixmap@plt>
mov    %rbx,%rdi
mov    0x1c(%rsp),%esi
call   1120 <XFreeGC@plt>
mov    0x28fe(%rip),%rax
mov    (%rax),%edi
mov    0x44(%rsp),%esi
call   1080 <glPixelStorei@plt>
mov    0x28fc(%rip),%rax
mov    (%rax),%edi
mov    0x40(%rsp),%esi
call   1080 <glPixelStorei@plt>
mov    0x28d2(%rip),%rax
mov    (%rax),%edi
mov    0x3c(%rsp),%esi
call   1080 <glPixelStorei@plt>
mov    0x28b0(%rip),%rax
mov    (%rax),%edi
mov    0x38(%rsp),%esi
call   1080 <glPixelStorei@plt>
mov    0x28d6(%rip),%rax
mov    (%rax),%edi
mov    0x34(%rsp),%esi
call   1080 <glPixelStorei@plt>
mov    0x28cc(%rip),%rax
mov    (%rax),%edi
mov    0x30(%rsp),%esi
call   1080 <glPixelStorei@plt>
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %edi,%edi
mov    %rbp,%rsi
mov    $0x1,%edx
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    10e0 <XFreeFontInfo@plt>

LLVM IR (-O0):
%struct.TYPE_12__ = type { %struct.TYPE_13__, i32, %struct.TYPE_10__ }
%struct.TYPE_13__ = type { i32, i32, i32, i32, i32 }
%struct.TYPE_10__ = type { i32 }
%struct.TYPE_11__ = type { i32, i32, i32 }
@GL_UNPACK_SWAP_BYTES = global i32 0
@GL_UNPACK_LSB_FIRST = global i32 0
@GL_UNPACK_ROW_LENGTH = global i32 0
@GL_UNPACK_SKIP_ROWS = global i32 0
@GL_UNPACK_SKIP_PIXELS = global i32 0
@GL_UNPACK_ALIGNMENT = global i32 0
@GL_FALSE = global i32 0
@GCForeground = global i64 0
@GCBackground = global i64 0
@GCFont = global i64 0
@GL_COMPILE = global i32 0
define void @glXUseRotatedXFontMESA(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%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 %struct.TYPE_12__*
%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_11__
%27 = alloca i64
%28 = alloca i32
%29 = alloca i32
%30 = alloca i32
%31 = alloca i32
%32 = alloca i32
%33 = alloca i32
%34 = alloca i32
%35 = alloca i32
%36 = alloca i32
%37 = alloca i32
%38 = alloca i32
%39 = alloca %struct.TYPE_13__*
%40 = alloca i32
%41 = alloca i32
%42 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%43 = load i32, i32* %10
%44 = icmp ne i32 %43, 0
br i1 %44, label %45, label %55
45: ; preds = %5
%46 = load i32, i32* %10
%47 = icmp ne i32 %46, 90
br i1 %47, label %48, label %55
48: ; preds = %45
%49 = load i32, i32* %10
%50 = icmp ne i32 %49, 180
br i1 %50, label %51, label %55
51: ; preds = %48
%52 = load i32, i32* %10
%53 = icmp ne i32 %52, 270
br i1 %53, label %54, label %55
54: ; preds = %51
br label %343
55: ; preds = %51, %48, %45, %5
%56 = call i32* (...) @glXGetCurrentDisplay()
store i32* %56, i32** %11
%57 = load i32*, i32** %11
%58 = icmp ne i32* %57, null
br i1 %58, label %60, label %59
59: ; preds = %55
br label %343
60: ; preds = %55
%61 = load i32*, i32** %11
%62 = load i32*, i32** %11
%63 = call i32 @DefaultScreen(i32* %62)
%64 = call i32 @RootWindow(i32* %61, i32 %63)
store i32 %64, i32* %12
%65 = load i32*, i32** %11
%66 = load i32, i32* %6
%67 = call %struct.TYPE_12__* @XQueryFont(i32* %65, i32 %66)
store %struct.TYPE_12__* %67, %struct.TYPE_12__** %15
%68 = load %struct.TYPE_12__*, %struct.TYPE_12__** %15
%69 = icmp ne %struct.TYPE_12__* %68, null
br i1 %69, label %71, label %70
70: ; preds = %60
br label %343
71: ; preds = %60
%72 = load %struct.TYPE_12__*, %struct.TYPE_12__** %15
%73 = getelementptr inbounds %struct.TYPE_12__, %struct.TYPE_12__* %72, i32 0, i32 0
%74 = getelementptr inbounds %struct.TYPE_13__, %struct.TYPE_13__* %73, i32 0, i32 0
%75 = load i32, i32* %74
%76 = load %struct.TYPE_12__*, %struct.TYPE_12__** %15
%77 = getelementptr inbounds %struct.TYPE_12__, %struct.TYPE_12__* %76, i32 0, i32 2
%78 = getelementptr inbounds %struct.TYPE_10__, %struct.TYPE_10__* %77, i32 0, i32 0
%79 = load i32, i32* %78
%80 = sub i32 %75, %79
store i32 %80, i32* %22
%81 = load %struct.TYPE_12__*, %struct.TYPE_12__** %15
%82 = getelementptr inbounds %struct.TYPE_12__, %struct.TYPE_12__* %81, i32 0, i32 0
%83 = getelementptr inbounds %struct.TYPE_13__, %struct.TYPE_13__* %82, i32 0, i32 1
%84 = load i32, i32* %83
%85 = load %struct.TYPE_12__*, %struct.TYPE_12__** %15
%86 = getelementptr inbounds %struct.TYPE_12__, %struct.TYPE_12__* %85, i32 0, i32 0
%87 = getelementptr inbounds %struct.TYPE_13__, %struct.TYPE_13__* %86, i32 0, i32 2
%88 = load i32, i32* %87
%89 = add i32 %84, %88
store i32 %89, i32* %23
%90 = load i32, i32* %10
%91 = icmp eq i32 %90, 90
br i1 %91, label %95, label %92
92: ; preds = %71
%93 = load i32, i32* %10
%94 = icmp eq i32 %93, 270
br i1 %94, label %95, label %103
95: ; preds = %92, %71
%96 = load i32, i32* %23
%97 = add i32 %96, 7
%98 = udiv i32 %97, 8
%99 = load i32, i32* %22
%100 = mul i32 %98, %99
%101 = call i64 @malloc(i32 %100)
%102 = inttoptr i64 %101 to i32*
store i32* %102, i32** %24
br label %111
103: ; preds = %92
%104 = load i32, i32* %22
%105 = add i32 %104, 7
%106 = udiv i32 %105, 8
%107 = load i32, i32* %23
%108 = mul i32 %106, %107
%109 = call i64 @malloc(i32 %108)
%110 = inttoptr i64 %109 to i32*
store i32* %110, i32** %24
br label %111
111: ; preds = %103, %95
%112 = load i32*, i32** %24
%113 = icmp ne i32* %112, null
br i1 %113, label %117, label %114
114: ; preds = %111
%115 = load %struct.TYPE_12__*, %struct.TYPE_12__** %15
%116 = call i32 @XFreeFontInfo(i32* null, %struct.TYPE_12__* %115, i32 1)
br label %343
117: ; preds = %111
%118 = load i32, i32* @GL_UNPACK_SWAP_BYTES
%119 = call i32 @glGetIntegerv(i32 %118, i32* %16)
%120 = load i32, i32* @GL_UNPACK_LSB_FIRST
%121 = call i32 @glGetIntegerv(i32 %120, i32* %17)
%122 = load i32, i32* @GL_UNPACK_ROW_LENGTH
%123 = call i32 @glGetIntegerv(i32 %122, i32* %18)
%124 = load i32, i32* @GL_UNPACK_SKIP_ROWS
%125 = call i32 @glGetIntegerv(i32 %124, i32* %19)
%126 = load i32, i32* @GL_UNPACK_SKIP_PIXELS
%127 = call i32 @glGetIntegerv(i32 %126, i32* %20)
%128 = load i32, i32* @GL_UNPACK_ALIGNMENT
%129 = call i32 @glGetIntegerv(i32 %128, i32* %21)
%130 = load i32, i32* @GL_UNPACK_SWAP_BYTES
%131 = load i32, i32* @GL_FALSE
%132 = call i32 @glPixelStorei(i32 %130, i32 %131)
%133 = load i32, i32* @GL_UNPACK_LSB_FIRST
%134 = load i32, i32* @GL_FALSE
%135 = call i32 @glPixelStorei(i32 %133, i32 %134)
%136 = load i32, i32* @GL_UNPACK_ROW_LENGTH
%137 = call i32 @glPixelStorei(i32 %136, i32 0)
%138 = load i32, i32* @GL_UNPACK_SKIP_ROWS
%139 = call i32 @glPixelStorei(i32 %138, i32 0)
%140 = load i32, i32* @GL_UNPACK_SKIP_PIXELS
%141 = call i32 @glPixelStorei(i32 %140, i32 0)
%142 = load i32, i32* @GL_UNPACK_ALIGNMENT
%143 = call i32 @glPixelStorei(i32 %142, i32 1)
%144 = load i32*, i32** %11
%145 = load i32, i32* %12
%146 = load i32, i32* %22
%147 = load i32, i32* %23
%148 = call i32 @XCreatePixmap(i32* %144, i32 %145, i32 %146, i32 %147, i32 1)
store i32 %148, i32* %13
%149 = load i32*, i32** %11
%150 = load i32*, i32** %11
%151 = call i32 @DefaultScreen(i32* %150)
%152 = call i32 @BlackPixel(i32* %149, i32 %151)
%153 = getelementptr inbounds %struct.TYPE_11__, %struct.TYPE_11__* %26, i32 0, i32 2
store i32 %152, i32* %153
%154 = load i32*, i32** %11
%155 = load i32*, i32** %11
%156 = call i32 @DefaultScreen(i32* %155)
%157 = call i32 @WhitePixel(i32* %154, i32 %156)
%158 = getelementptr inbounds %struct.TYPE_11__, %struct.TYPE_11__* %26, i32 0, i32 1
store i32 %157, i32* %158
%159 = load %struct.TYPE_12__*, %struct.TYPE_12__** %15
%160 = getelementptr inbounds %struct.TYPE_12__, %struct.TYPE_12__* %159, i32 0, i32 1
%161 = load i32, i32* %160
%162 = getelementptr inbounds %struct.TYPE_11__, %struct.TYPE_11__* %26, i32 0, i32 0
store i32 %161, i32* %162
%163 = load i64, i64* @GCForeground
%164 = load i64, i64* @GCBackground
%165 = or i64 %163, %164
%166 = load i64, i64* @GCFont
%167 = or i64 %165, %166
store i64 %167, i64* %27
%168 = load i32*, i32** %11
%169 = load i32, i32* %13
%170 = load i64, i64* %27
%171 = call i32 @XCreateGC(i32* %168, i32 %169, i64 %170, %struct.TYPE_11__* %26)
store i32 %171, i32* %14
store i32 0, i32* %25
br label %172
172: ; preds = %311, %117
%173 = load i32, i32* %25
%174 = load i32, i32* %8
%175 = icmp slt i32 %173, %174
br i1 %175, label %176, label %314
176: ; preds = %172
%177 = load i32, i32* %7
%178 = load i32, i32* %25
%179 = add nsw i32 %177, %178
store i32 %179, i32* %28
%180 = load i32, i32* %9
%181 = load i32, i32* %25
%182 = add nsw i32 %180, %181
store i32 %182, i32* %29
store i32 0, i32* %32
store i32 0, i32* %33
%183 = load %struct.TYPE_12__*, %struct.TYPE_12__** %15
%184 = load i32, i32* %28
%185 = call %struct.TYPE_13__* @isvalid(%struct.TYPE_12__* %183, i32 %184)
store %struct.TYPE_13__* %185, %struct.TYPE_13__** %39
%186 = load %struct.TYPE_13__*, %struct.TYPE_13__** %39
%187 = icmp ne %struct.TYPE_13__* %186, null
br i1 %187, label %191, label %188
188: ; preds = %176
%189 = load %struct.TYPE_12__*, %struct.TYPE_12__** %15
%190 = getelementptr inbounds %struct.TYPE_12__, %struct.TYPE_12__* %189, i32 0, i32 0
store %struct.TYPE_13__* %190, %struct.TYPE_13__** %39
store i32 0, i32* %42
br label %192
191: ; preds = %176
store i32 1, i32* %42
br label %192
192: ; preds = %191, %188
%193 = load %struct.TYPE_13__*, %struct.TYPE_13__** %39
%194 = getelementptr inbounds %struct.TYPE_13__, %struct.TYPE_13__* %193, i32 0, i32 0
%195 = load i32, i32* %194
%196 = load %struct.TYPE_13__*, %struct.TYPE_13__** %39
%197 = getelementptr inbounds %struct.TYPE_13__, %struct.TYPE_13__* %196, i32 0, i32 3
%198 = load i32, i32* %197
%199 = sub i32 %195, %198
store i32 %199, i32* %30
%200 = load %struct.TYPE_13__*, %struct.TYPE_13__** %39
%201 = getelementptr inbounds %struct.TYPE_13__, %struct.TYPE_13__* %200, i32 0, i32 1
%202 = load i32, i32* %201
%203 = load %struct.TYPE_13__*, %struct.TYPE_13__** %39
%204 = getelementptr inbounds %struct.TYPE_13__, %struct.TYPE_13__* %203, i32 0, i32 2
%205 = load i32, i32* %204
%206 = add i32 %202, %205
store i32 %206, i32* %31
%207 = load %struct.TYPE_13__*, %struct.TYPE_13__** %39
%208 = getelementptr inbounds %struct.TYPE_13__, %struct.TYPE_13__* %207, i32 0, i32 3
%209 = load i32, i32* %208
%210 = sub i32 0, %209
store i32 %210, i32* %34
%211 = load %struct.TYPE_13__*, %struct.TYPE_13__** %39
%212 = getelementptr inbounds %struct.TYPE_13__, %struct.TYPE_13__* %211, i32 0, i32 2
%213 = load i32, i32* %212
store i32 %213, i32* %35
%214 = load %struct.TYPE_13__*, %struct.TYPE_13__** %39
%215 = getelementptr inbounds %struct.TYPE_13__, %struct.TYPE_13__* %214, i32 0, i32 4
%216 = load i32, i32* %215
store i32 %216, i32* %36
store i32 0, i32* %37
%217 = load %struct.TYPE_13__*, %struct.TYPE_13__** %39
%218 = getelementptr inbounds %struct.TYPE_13__, %struct.TYPE_13__* %217, i32 0, i32 3
%219 = load i32, i32* %218
%220 = sub i32 0, %219
store i32 %220, i32* %40
%221 = load %struct.TYPE_13__*, %struct.TYPE_13__** %39
%222 = getelementptr inbounds %struct.TYPE_13__, %struct.TYPE_13__* %221, i32 0, i32 1
%223 = load i32, i32* %222
store i32 %223, i32* %41
%224 = load i32, i32* %10
switch i32 %224, label %268 [
i32 0, label %225
i32 90, label %228
i32 180, label %241
i32 270, label %256
]
225: ; preds = %192
%226 = load i32, i32* %30
store i32 %226, i32* %32
%227 = load i32, i32* %31
store i32 %227, i32* %33
br label %269
228: ; preds = %192
%229 = load i32, i32* %36
store i32 %229, i32* %38
%230 = load i32, i32* %37
%231 = sub i32 0, %230
store i32 %231, i32* %36
%232 = load i32, i32* %38
store i32 %232, i32* %37
%233 = load i32, i32* %34
store i32 %233, i32* %35
%234 = load i32, i32* %31
%235 = load i32, i32* %31
%236 = load i32, i32* %41
%237 = sub i32 %235, %236
%238 = sub i32 %234, %237
store i32 %238, i32* %34
%239 = load i32, i32* %31
store i32 %239, i32* %32
%240 = load i32, i32* %30
store i32 %240, i32* %33
br label %269
241: ; preds = %192
%242 = load i32, i32* %36
%243 = sub i32 0, %242
store i32 %243, i32* %36
%244 = load i32, i32* %37
%245 = sub i32 0, %244
store i32 %245, i32* %37
%246 = load i32, i32* %30
%247 = load i32, i32* %34
%248 = sub i32 %246, %247
%249 = sub i32 %248, 1
store i32 %249, i32* %34
%250 = load i32, i32* %31
%251 = load i32, i32* %35
%252 = sub i32 %250, %251
%253 = sub i32 %252, 1
store i32 %253, i32* %35
%254 = load i32, i32* %30
store i32 %254, i32* %32
%255 = load i32, i32* %31
store i32 %255, i32* %33
br label %269
256: ; preds = %192
%257 = load i32, i32* %36
store i32 %257, i32* %38
%258 = load i32, i32* %37
store i32 %258, i32* %36
%259 = load i32, i32* %38
%260 = sub i32 0, %259
store i32 %260, i32* %37
%261 = load i32, i32* %35
store i32 %261, i32* %38
%262 = load i32, i32* %30
%263 = load i32, i32* %34
%264 = sub i32 %262, %263
store i32 %264, i32* %35
%265 = load i32, i32* %38
store i32 %265, i32* %34
%266 = load i32, i32* %31
store i32 %266, i32* %32
%267 = load i32, i32* %30
store i32 %267, i32* %33
br label %269
268: ; preds = %192
br label %269
269: ; preds = %268, %256, %241, %228, %225
%270 = load i32, i32* %29
%271 = load i32, i32* @GL_COMPILE
%272 = call i32 @glNewList(i32 %270, i32 %271)
%273 = load i32, i32* %42
%274 = icmp ne i32 %273, 0
br i1 %274, label %275, label %305
275: ; preds = %269
%276 = load i32, i32* %32
%277 = icmp ugt i32 %276, 0
br i1 %277, label %278, label %305
278: ; preds = %275
%279 = load i32, i32* %33
%280 = icmp ugt i32 %279, 0
br i1 %280, label %281, label %305
281: ; preds = %278
%282 = load i32*, i32** %11
%283 = load i32, i32* %13
%284 = load i32, i32* %14
%285 = load i32, i32* %32
%286 = load i32, i32* %33
%287 = load i32, i32* %30
%288 = load i32, i32* %31
%289 = load i32, i32* %40
%290 = load i32, i32* %41
%291 = load i32, i32* %28
%292 = load i32*, i32** %24
%293 = load i32, i32* %10
%294 = call i32 @fill_bitmap(i32* %282, i32 %283, i32 %284, i32 %285, i32 %286, i32 %287, i32 %288, i32 %289, i32 %290, i32 %291, i32* %292, i32 %293)
%295 = load i32, i32* %32
%296 = load i32, i32* %33
%297 = load i32, i32* %34
%298 = uitofp i32 %297 to double
%299 = load i32, i32* %35
%300 = uitofp i32 %299 to double
%301 = load i32, i32* %36
%302 = load i32, i32* %37
%303 = load i32*, i32** %24
%304 = call i32 @glBitmap(i32 %295, i32 %296, double %298, double %300, i32 %301, i32 %302, i32* %303)
br label %309
305: ; preds = %278, %275, %269
%306 = load i32, i32* %36
%307 = load i32, i32* %37
%308 = call i32 @glBitmap(i32 0, i32 0, double 0.000000e+00, double 0.000000e+00, i32 %306, i32 %307, i32* null)
br label %309
309: ; preds = %305, %281
%310 = call i32 (...) @glEndList()
br label %311
311: ; preds = %309
%312 = load i32, i32* %25
%313 = add nsw i32 %312, 1
store i32 %313, i32* %25
br label %172
314: ; preds = %172
%315 = load i32*, i32** %24
%316 = call i32 @free(i32* %315)
%317 = load %struct.TYPE_12__*, %struct.TYPE_12__** %15
%318 = call i32 @XFreeFontInfo(i32* null, %struct.TYPE_12__* %317, i32 1)
%319 = load i32*, i32** %11
%320 = load i32, i32* %13
%321 = call i32 @XFreePixmap(i32* %319, i32 %320)
%322 = load i32*, i32** %11
%323 = load i32, i32* %14
%324 = call i32 @XFreeGC(i32* %322, i32 %323)
%325 = load i32, i32* @GL_UNPACK_SWAP_BYTES
%326 = load i32, i32* %16
%327 = call i32 @glPixelStorei(i32 %325, i32 %326)
%328 = load i32, i32* @GL_UNPACK_LSB_FIRST
%329 = load i32, i32* %17
%330 = call i32 @glPixelStorei(i32 %328, i32 %329)
%331 = load i32, i32* @GL_UNPACK_ROW_LENGTH
%332 = load i32, i32* %18
%333 = call i32 @glPixelStorei(i32 %331, i32 %332)
%334 = load i32, i32* @GL_UNPACK_SKIP_ROWS
%335 = load i32, i32* %19
%336 = call i32 @glPixelStorei(i32 %334, i32 %335)
%337 = load i32, i32* @GL_UNPACK_SKIP_PIXELS
%338 = load i32, i32* %20
%339 = call i32 @glPixelStorei(i32 %337, i32 %338)
%340 = load i32, i32* @GL_UNPACK_ALIGNMENT
%341 = load i32, i32* %21
%342 = call i32 @glPixelStorei(i32 %340, i32 %341)
br label %343
343: ; preds = %314, %114, %70, %59, %54
ret void
}

LLVM IR (-O2):
%struct.TYPE_11__ = type { i32, i32, i32 }
%struct.TYPE_12__ = type { %struct.TYPE_13__, i32, %struct.TYPE_10__ }
%struct.TYPE_13__ = type { i32, i32, i32, i32, i32 }
%struct.TYPE_10__ = type { i32 }
@GL_UNPACK_SWAP_BYTES = global i32 0
@GL_UNPACK_LSB_FIRST = global i32 0
@GL_UNPACK_ROW_LENGTH = global i32 0
@GL_UNPACK_SKIP_ROWS = global i32 0
@GL_UNPACK_SKIP_PIXELS = global i32 0
@GL_UNPACK_ALIGNMENT = global i32 0
@GL_FALSE = global i32 0
@GCForeground = global i64 0
@GCBackground = global i64 0
@GCFont = global i64 0
@GL_COMPILE = global i32 0
define void @glXUseRotatedXFontMESA(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca %struct.TYPE_11__
%13 = bitcast i32* %6 to i8*
%14 = bitcast i32* %7 to i8*
%15 = bitcast i32* %8 to i8*
%16 = bitcast i32* %9 to i8*
%17 = bitcast i32* %10 to i8*
%18 = bitcast i32* %11 to i8*
switch i32 %4, label %172 [
i32 270, label %19
i32 180, label %19
i32 90, label %19
i32 0, label %19
]
19: ; preds = %5, %5, %5, %5
%20 = tail call i32* (...) @glXGetCurrentDisplay()
%21 = icmp eq i32* %20, null
br i1 %21, label %172, label %22
22: ; preds = %19
%23 = tail call i32 @DefaultScreen(i32* %20)
%24 = tail call i32 @RootWindow(i32* %20, i32 %23)
%25 = tail call %struct.TYPE_12__* @XQueryFont(i32* %20, i32 %0)
%26 = icmp eq %struct.TYPE_12__* %25, null
br i1 %26, label %172, label %27
27: ; preds = %22
%28 = getelementptr inbounds %struct.TYPE_12__, %struct.TYPE_12__* %25, i64 0, i32 0
%29 = getelementptr inbounds %struct.TYPE_12__, %struct.TYPE_12__* %25, i64 0, i32 0, i32 0
%30 = load i32, i32* %29
%31 = getelementptr inbounds %struct.TYPE_12__, %struct.TYPE_12__* %25, i64 0, i32 2, i32 0
%32 = load i32, i32* %31
%33 = sub i32 %30, %32
%34 = getelementptr inbounds %struct.TYPE_12__, %struct.TYPE_12__* %25, i64 0, i32 0, i32 1
%35 = load i32, i32* %34
%36 = getelementptr inbounds %struct.TYPE_12__, %struct.TYPE_12__* %25, i64 0, i32 0, i32 2
%37 = load i32, i32* %36
%38 = add i32 %37, %35
switch i32 %4, label %39 [
i32 270, label %40
i32 90, label %40
]
39: ; preds = %27
br label %40
40: ; preds = %27, %27, %39
%41 = phi i32 [ %33, %39 ], [ %38, %27 ], [ %38, %27 ]
%42 = phi i32 [ %38, %39 ], [ %33, %27 ], [ %33, %27 ]
%43 = add i32 %41, 7
%44 = lshr i32 %43, 3
%45 = mul i32 %44, %42
%46 = tail call i64 @malloc(i32 %45)
%47 = inttoptr i64 %46 to i32*
%48 = icmp eq i64 %46, 0
br i1 %48, label %49, label %51
49: ; preds = %40
%50 = tail call i32 @XFreeFontInfo(i32* null, %struct.TYPE_12__* %25, i32 1)
br label %172
51: ; preds = %40
%52 = load i32, i32* @GL_UNPACK_SWAP_BYTES
%53 = call i32 @glGetIntegerv(i32 %52, i32* %6)
%54 = load i32, i32* @GL_UNPACK_LSB_FIRST
%55 = call i32 @glGetIntegerv(i32 %54, i32* %7)
%56 = load i32, i32* @GL_UNPACK_ROW_LENGTH
%57 = call i32 @glGetIntegerv(i32 %56, i32* %8)
%58 = load i32, i32* @GL_UNPACK_SKIP_ROWS
%59 = call i32 @glGetIntegerv(i32 %58, i32* %9)
%60 = load i32, i32* @GL_UNPACK_SKIP_PIXELS
%61 = call i32 @glGetIntegerv(i32 %60, i32* %10)
%62 = load i32, i32* @GL_UNPACK_ALIGNMENT
%63 = call i32 @glGetIntegerv(i32 %62, i32* %11)
%64 = load i32, i32* @GL_UNPACK_SWAP_BYTES
%65 = load i32, i32* @GL_FALSE
%66 = call i32 @glPixelStorei(i32 %64, i32 %65)
%67 = load i32, i32* @GL_UNPACK_LSB_FIRST
%68 = load i32, i32* @GL_FALSE
%69 = call i32 @glPixelStorei(i32 %67, i32 %68)
%70 = load i32, i32* @GL_UNPACK_ROW_LENGTH
%71 = call i32 @glPixelStorei(i32 %70, i32 0)
%72 = load i32, i32* @GL_UNPACK_SKIP_ROWS
%73 = call i32 @glPixelStorei(i32 %72, i32 0)
%74 = load i32, i32* @GL_UNPACK_SKIP_PIXELS
%75 = call i32 @glPixelStorei(i32 %74, i32 0)
%76 = load i32, i32* @GL_UNPACK_ALIGNMENT
%77 = call i32 @glPixelStorei(i32 %76, i32 1)
%78 = call i32 @XCreatePixmap(i32* %20, i32 %24, i32 %33, i32 %38, i32 1)
%79 = bitcast %struct.TYPE_11__* %12 to i8*
%80 = call i32 @DefaultScreen(i32* %20)
%81 = call i32 @BlackPixel(i32* %20, i32 %80)
%82 = getelementptr inbounds %struct.TYPE_11__, %struct.TYPE_11__* %12, i64 0, i32 2
store i32 %81, i32* %82
%83 = call i32 @DefaultScreen(i32* %20)
%84 = call i32 @WhitePixel(i32* %20, i32 %83)
%85 = getelementptr inbounds %struct.TYPE_11__, %struct.TYPE_11__* %12, i64 0, i32 1
store i32 %84, i32* %85
%86 = getelementptr inbounds %struct.TYPE_12__, %struct.TYPE_12__* %25, i64 0, i32 1
%87 = load i32, i32* %86
%88 = getelementptr inbounds %struct.TYPE_11__, %struct.TYPE_11__* %12, i64 0, i32 0
store i32 %87, i32* %88
%89 = load i64, i64* @GCForeground
%90 = load i64, i64* @GCBackground
%91 = or i64 %90, %89
%92 = load i64, i64* @GCFont
%93 = or i64 %91, %92
%94 = call i32 @XCreateGC(i32* %20, i32 %78, i64 %93, %struct.TYPE_11__* %12)
%95 = icmp sgt i32 %2, 0
br i1 %95, label %96, label %149
96: ; preds = %51, %145
%97 = phi i32 [ %147, %145 ], [ 0, %51 ]
%98 = add nsw i32 %97, %1
%99 = add nsw i32 %97, %3
%100 = call %struct.TYPE_13__* @isvalid(%struct.TYPE_12__* %25, i32 %98)
%101 = icmp eq %struct.TYPE_13__* %100, null
%102 = select i1 %101, %struct.TYPE_13__* %28, %struct.TYPE_13__* %100
%103 = xor i1 %101, true
%104 = getelementptr inbounds %struct.TYPE_13__, %struct.TYPE_13__* %102, i64 0, i32 0
%105 = load i32, i32* %104
%106 = getelementptr inbounds %struct.TYPE_13__, %struct.TYPE_13__* %102, i64 0, i32 3
%107 = load i32, i32* %106
%108 = sub i32 %105, %107
%109 = getelementptr inbounds %struct.TYPE_13__, %struct.TYPE_13__* %102, i64 0, i32 1
%110 = load i32, i32* %109
%111 = getelementptr inbounds %struct.TYPE_13__, %struct.TYPE_13__* %102, i64 0, i32 2
%112 = load i32, i32* %111
%113 = add i32 %112, %110
%114 = sub i32 0, %107
%115 = getelementptr inbounds %struct.TYPE_13__, %struct.TYPE_13__* %102, i64 0, i32 4
%116 = load i32, i32* %115
switch i32 %4, label %125 [
i32 0, label %117
i32 90, label %118
i32 180, label %119
i32 270, label %123
]
117: ; preds = %96
br label %125
118: ; preds = %96
br label %125
119: ; preds = %96
%120 = sub i32 0, %116
%121 = add i32 %105, -1
%122 = add i32 %110, -1
br label %125
123: ; preds = %96
%124 = sub i32 0, %116
br label %125
125: ; preds = %96, %123, %119, %118, %117
%126 = phi i32 [ 0, %96 ], [ %113, %123 ], [ %108, %119 ], [ %113, %118 ], [ %108, %117 ]
%127 = phi i32 [ 0, %96 ], [ %108, %123 ], [ %113, %119 ], [ %108, %118 ], [ %113, %117 ]
%128 = phi i32 [ %114, %96 ], [ %112, %123 ], [ %121, %119 ], [ %110, %118 ], [ %114, %117 ]
%129 = phi i32 [ %112, %96 ], [ %105, %123 ], [ %122, %119 ], [ %114, %118 ], [ %112, %117 ]
%130 = phi i32 [ %116, %96 ], [ 0, %123 ], [ %120, %119 ], [ 0, %118 ], [ %116, %117 ]
%131 = phi i32 [ 0, %96 ], [ %124, %123 ], [ 0, %119 ], [ %116, %118 ], [ 0, %117 ]
%132 = load i32, i32* @GL_COMPILE
%133 = call i32 @glNewList(i32 %99, i32 %132)
%134 = icmp ne i32 %126, 0
%135 = select i1 %103, i1 %134, i1 false
%136 = icmp ne i32 %127, 0
%137 = select i1 %135, i1 %136, i1 false
br i1 %137, label %138, label %143
138: ; preds = %125
%139 = call i32 @fill_bitmap(i32* %20, i32 %78, i32 %94, i32 %126, i32 %127, i32 %108, i32 %113, i32 %114, i32 %110, i32 %98, i32* %47, i32 %4)
%140 = uitofp i32 %128 to double
%141 = uitofp i32 %129 to double
%142 = call i32 @glBitmap(i32 %126, i32 %127, double %140, double %141, i32 %130, i32 %131, i32* %47)
br label %145
143: ; preds = %125
%144 = call i32 @glBitmap(i32 0, i32 0, double 0.000000e+00, double 0.000000e+00, i32 %130, i32 %131, i32* null)
br label %145
145: ; preds = %143, %138
%146 = call i32 (...) @glEndList()
%147 = add nuw nsw i32 %97, 1
%148 = icmp eq i32 %147, %2
br i1 %148, label %149, label %96
149: ; preds = %145, %51
%150 = call i32 @free(i32* %47)
%151 = call i32 @XFreeFontInfo(i32* null, %struct.TYPE_12__* %25, i32 1)
%152 = call i32 @XFreePixmap(i32* %20, i32 %78)
%153 = call i32 @XFreeGC(i32* %20, i32 %94)
%154 = load i32, i32* @GL_UNPACK_SWAP_BYTES
%155 = load i32, i32* %6
%156 = call i32 @glPixelStorei(i32 %154, i32 %155)
%157 = load i32, i32* @GL_UNPACK_LSB_FIRST
%158 = load i32, i32* %7
%159 = call i32 @glPixelStorei(i32 %157, i32 %158)
%160 = load i32, i32* @GL_UNPACK_ROW_LENGTH
%161 = load i32, i32* %8
%162 = call i32 @glPixelStorei(i32 %160, i32 %161)
%163 = load i32, i32* @GL_UNPACK_SKIP_ROWS
%164 = load i32, i32* %9
%165 = call i32 @glPixelStorei(i32 %163, i32 %164)
%166 = load i32, i32* @GL_UNPACK_SKIP_PIXELS
%167 = load i32, i32* %10
%168 = call i32 @glPixelStorei(i32 %166, i32 %167)
%169 = load i32, i32* @GL_UNPACK_ALIGNMENT
%170 = load i32, i32* %11
%171 = call i32 @glPixelStorei(i32 %169, i32 %170)
br label %172
172: ; preds = %22, %19, %5, %149, %49
ret void
}