#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_11__ TYPE_3__;
typedef struct TYPE_10__ TYPE_2__;
typedef struct TYPE_9__ TYPE_1__;

/* Type definitions */
struct TYPE_10__ {
  int foreground;
  int background;
  int line_width;
  int /*<<< orphan*/ cap_style;
};
typedef TYPE_2__ XGCValues;
typedef TYPE_3__ *Widget;
struct TYPE_9__ {
  int width;
  int height;
  int border_width;
};
struct TYPE_11__ {
  TYPE_1__ core;
};
typedef int /*<<< orphan*/ Pixmap;
typedef int /*<<< orphan*/ GC;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
int /*<<< orphan*/ CapRound;
int GCBackground;
int GCCapStyle;
int GCForeground;
int GCLineWidth;
int /*<<< orphan*/ None;
int /*<<< orphan*/ ShapeBounding;
int /*<<< orphan*/ ShapeClip;
int /*<<< orphan*/ ShapeSet;
int /*<<< orphan*/ XChangeGC(int /*<<< orphan*/ *, int /*<<< orphan*/, int,
                             TYPE_2__ *);
int /*<<< orphan*/ XCreateGC(int /*<<< orphan*/ *, int /*<<< orphan*/, int,
                             TYPE_2__ *);
int /*<<< orphan*/ XCreatePixmap(int /*<<< orphan*/ *, int /*<<< orphan*/, int,
                                 int, int);
int /*<<< orphan*/ XDrawLine(int /*<<< orphan*/ *, int /*<<< orphan*/,
                             int /*<<< orphan*/, int, int, int, int);
int /*<<< orphan*/ XFillRectangle(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                  int /*<<< orphan*/, int /*<<< orphan*/,
                                  int /*<<< orphan*/, int, int);
int /*<<< orphan*/ XFreeGC(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ XFreePixmap(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ XSetForeground(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                  int);
int /*<<< orphan*/ XShapeCombineMask(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                     int /*<<< orphan*/, int, int,
                                     int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ *XtDisplay(TYPE_3__ *);
int /*<<< orphan*/ XtWindow(TYPE_3__ *);
void ShapeOval(Widget w) {
  Display *dpy = XtDisplay(w);
  int width = w->core.width;
  int height = w->core.height;
  Pixmap p;
  XGCValues values;
  GC gc;
  int rad;
  if (width < 3 || height < 3)
    return;
  width += w->core.border_width << 1;
  height += w->core.border_width << 1;
  p = XCreatePixmap(dpy, XtWindow(w), width, height, 1);
  values.foreground = 0;
  values.background = 1;
  values.cap_style = CapRound;
  values.line_width = (((width) < (height)) ? (width) : (height));
  gc = XCreateGC(dpy, p, GCForeground | GCBackground | GCLineWidth | GCCapStyle,
                 &values);
  XFillRectangle(dpy, p, gc, 0, 0, width, height);
  XSetForeground(dpy, gc, 1);
  if (width < height) {
    rad = width >> 1;
    XDrawLine(dpy, p, gc, rad, rad, rad, height - rad - 1);
  } else {
    rad = height >> 1;
    XDrawLine(dpy, p, gc, rad, rad, width - rad - 1, rad);
  }
  XShapeCombineMask(dpy, XtWindow(w), ShapeBounding, -(int)w->core.border_width,
                    -(int)w->core.border_width, p, ShapeSet);
  if (w->core.border_width) {
    XSetForeground(dpy, gc, 0);
    XFillRectangle(dpy, p, gc, 0, 0, width, height);
    values.line_width =
        (((w->core.width) < (w->core.height)) ? (w->core.width)
                                              : (w->core.height));
    values.foreground = 1;
    XChangeGC(dpy, gc, GCLineWidth | GCForeground, &values);
    if (w->core.width < w->core.height) {
      rad = w->core.width >> 1;
      XDrawLine(dpy, p, gc, rad, rad, rad, w->core.height - rad - 1);
    } else {
      rad = w->core.height >> 1;
      XDrawLine(dpy, p, gc, rad, rad, w->core.width - rad - 1, rad);
    }
    XShapeCombineMask(dpy, XtWindow(w), ShapeClip, 0, 0, p, ShapeSet);
  } else
    XShapeCombineMask(XtDisplay(w), XtWindow(w), ShapeClip, 0, 0, None,
                      ShapeSet);
  XFreePixmap(dpy, p);
  XFreeGC(dpy, gc);
}


x86 assembly (clang, -O0):
<ShapeOval>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1070 <XtDisplay@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x3,-0x14(%rbp)
jl     11f0 <ShapeOval+0x40>
cmpl   $0x3,-0x18(%rbp)
jge    11f5 <ShapeOval+0x45>
jmp    1557 <ShapeOval+0x3a7>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
shl    $0x1,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
shl    $0x1,%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <XtWindow@plt>
mov    -0x40(%rbp),%rdi
mov    %eax,%esi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    $0x1,%r8d
call   10c0 <XCreatePixmap@plt>
mov    %eax,-0x1c(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x1,-0x2c(%rbp)
mov    0x2d63(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1271 <ShapeOval+0xc1>
mov    -0x14(%rbp),%eax
mov    %eax,-0x44(%rbp)
jmp    1277 <ShapeOval+0xc7>
mov    -0x18(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    0x2d4d(%rip),%rax
mov    (%rax),%edx
mov    0x2d14(%rip),%rax
or     (%rax),%edx
mov    0x2d03(%rip),%rax
or     (%rax),%edx
mov    0x2d42(%rip),%rax
or     (%rax),%edx
lea    -0x30(%rbp),%rcx
call   1080 <XCreateGC@plt>
mov    %eax,-0x34(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x34(%rbp),%edx
mov    -0x14(%rbp),%r9d
mov    -0x18(%rbp),%eax
xor    %r8d,%r8d
mov    %r8d,%ecx
mov    %eax,(%rsp)
call   1050 <XFillRectangle@plt>
mov    -0x10(%rbp),%rdi
mov    -0x34(%rbp),%esi
mov    $0x1,%edx
call   1090 <XSetForeground@plt>
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1324 <ShapeOval+0x174>
mov    -0x14(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x34(%rbp),%edx
mov    -0x38(%rbp),%ecx
mov    -0x38(%rbp),%r8d
mov    -0x38(%rbp),%r9d
mov    -0x18(%rbp),%eax
sub    -0x38(%rbp),%eax
sub    $0x1,%eax
mov    %eax,(%rsp)
call   10d0 <XDrawLine@plt>
jmp    1355 <ShapeOval+0x1a5>
mov    -0x18(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x34(%rbp),%edx
mov    -0x38(%rbp),%ecx
mov    -0x38(%rbp),%r8d
mov    -0x14(%rbp),%r9d
sub    -0x38(%rbp),%r9d
sub    $0x1,%r9d
mov    -0x38(%rbp),%eax
mov    %eax,(%rsp)
call   10d0 <XDrawLine@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <XtWindow@plt>
mov    -0x50(%rbp),%rdi
mov    %eax,%esi
mov    0x2c4d(%rip),%rax
mov    (%rax),%edx
mov    -0x8(%rbp),%rax
xor    %ecx,%ecx
sub    0x8(%rax),%ecx
mov    -0x8(%rbp),%rax
xor    %r8d,%r8d
sub    0x8(%rax),%r8d
mov    -0x1c(%rbp),%r9d
mov    0x2c3c(%rip),%rax
mov    (%rax),%eax
mov    %eax,(%rsp)
call   1030 <XShapeCombineMask@plt>
mov    -0x8(%rbp),%rax
cmpl   $0x0,0x8(%rax)
je     14f9 <ShapeOval+0x349>
mov    -0x10(%rbp),%rdi
mov    -0x34(%rbp),%esi
xor    %edx,%edx
call   1090 <XSetForeground@plt>
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x34(%rbp),%edx
mov    -0x14(%rbp),%r9d
mov    -0x18(%rbp),%eax
xor    %r8d,%r8d
mov    %r8d,%ecx
mov    %eax,(%rsp)
call   1050 <XFillRectangle@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x8(%rbp),%rcx
cmp    0x4(%rcx),%eax
jge    13fa <ShapeOval+0x24a>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x54(%rbp)
jmp    1404 <ShapeOval+0x254>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x54(%rbp)
mov    -0x54(%rbp),%eax
mov    %eax,-0x28(%rbp)
movl   $0x1,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x34(%rbp),%esi
mov    0x2b81(%rip),%rax
mov    (%rax),%edx
mov    0x2bb0(%rip),%rax
or     (%rax),%edx
lea    -0x30(%rbp),%rcx
call   10a0 <XChangeGC@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x8(%rbp),%rcx
cmp    0x4(%rcx),%eax
jge    1481 <ShapeOval+0x2d1>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
sar    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x34(%rbp),%edx
mov    -0x38(%rbp),%ecx
mov    -0x38(%rbp),%r8d
mov    -0x38(%rbp),%r9d
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
sub    -0x38(%rbp),%eax
sub    $0x1,%eax
mov    %eax,(%rsp)
call   10d0 <XDrawLine@plt>
jmp    14b9 <ShapeOval+0x309>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
sar    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x34(%rbp),%edx
mov    -0x38(%rbp),%ecx
mov    -0x38(%rbp),%r8d
mov    -0x8(%rbp),%rax
mov    (%rax),%r9d
sub    -0x38(%rbp),%r9d
sub    $0x1,%r9d
mov    -0x38(%rbp),%eax
mov    %eax,(%rsp)
call   10d0 <XDrawLine@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <XtWindow@plt>
mov    -0x60(%rbp),%rdi
mov    %eax,%esi
mov    0x2b19(%rip),%rax
mov    (%rax),%edx
mov    -0x1c(%rbp),%r9d
mov    0x2aec(%rip),%rax
mov    (%rax),%eax
xor    %r8d,%r8d
mov    %r8d,%ecx
mov    %eax,(%rsp)
call   1030 <XShapeCombineMask@plt>
jmp    153f <ShapeOval+0x38f>
mov    -0x8(%rbp),%rdi
call   1070 <XtDisplay@plt>
mov    %rax,-0x68(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <XtWindow@plt>
mov    -0x68(%rbp),%rdi
mov    %eax,%esi
mov    0x2ad4(%rip),%rax
mov    (%rax),%edx
mov    0x2aa3(%rip),%rax
mov    (%rax),%r9d
mov    0x2aa1(%rip),%rax
mov    (%rax),%eax
xor    %r8d,%r8d
mov    %r8d,%ecx
mov    %eax,(%rsp)
call   1030 <XShapeCombineMask@plt>
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1060 <XFreePixmap@plt>
mov    -0x10(%rbp),%rdi
mov    -0x34(%rbp),%esi
call   10b0 <XFreeGC@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ShapeOval>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %rdi,%rbp
call   1070 <XtDisplay@plt>
mov    0x0(%rbp),%r14d
cmp    $0x3,%r14d
jl     147c <ShapeOval+0x2cc>
mov    0x4(%rbp),%ecx
cmp    $0x3,%ecx
jl     147c <ShapeOval+0x2cc>
mov    %rax,%r15
mov    0x8(%rbp),%eax
lea    (%r14,%rax,2),%ebx
lea    (%rcx,%rax,2),%r13d
mov    %rbp,0x30(%rsp)
mov    %rbp,%rdi
mov    %rcx,%rbp
mov    %rcx,0x40(%rsp)
call   1040 <XtWindow@plt>
mov    %r15,%rdi
mov    %eax,%esi
mov    %ebx,%edx
mov    %r13d,%ecx
mov    $0x1,%r8d
call   10c0 <XCreatePixmap@plt>
movabs $0x100000000,%rcx
mov    %rcx,0x20(%rsp)
mov    0x2d8a(%rip),%rcx
mov    (%rcx),%edi
cmp    %ebp,%r14d
mov    %r13d,%ecx
cmovb  %ebx,%ecx
mov    0x2d98(%rip),%rsi
mov    0x2d61(%rip),%rdx
mov    (%rdx),%edx
or     (%rsi),%edx
mov    %edi,0x2c(%rsp)
mov    0x2d4a(%rip),%rsi
or     (%rsi),%edx
mov    %ecx,0x28(%rsp)
mov    0x2d85(%rip),%rcx
or     (%rcx),%edx
lea    0x20(%rsp),%rcx
mov    %r15,%rdi
mov    %eax,%esi
mov    %eax,%ebp
call   1080 <XCreateGC@plt>
mov    %eax,%r12d
mov    %r13d,0x14(%rsp)
mov    %r13d,(%rsp)
mov    %r15,%rdi
mov    %ebp,0x18(%rsp)
mov    %ebp,%esi
mov    %eax,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
mov    %ebx,%r9d
call   1050 <XFillRectangle@plt>
mov    %r15,0x38(%rsp)
mov    %r15,%rdi
mov    %r12d,%esi
mov    $0x1,%edx
call   1090 <XSetForeground@plt>
cmp    0x40(%rsp),%r14d
mov    %ebx,0x1c(%rsp)
jae    12e4 <ShapeOval+0x134>
mov    %ebx,%ecx
sar    %ecx
mov    %ecx,%eax
not    %eax
add    0x14(%rsp),%eax
mov    %eax,(%rsp)
mov    0x38(%rsp),%rbx
mov    %rbx,%rdi
mov    0x18(%rsp),%r14d
mov    %r14d,%esi
mov    %r12d,%edx
mov    %ecx,%r8d
mov    %ecx,%r9d
jmp    130c <ShapeOval+0x15c>
mov    0x14(%rsp),%ecx
sar    %ecx
mov    %ecx,%r9d
not    %r9d
add    %ebx,%r9d
mov    %ecx,(%rsp)
mov    0x38(%rsp),%rbx
mov    %rbx,%rdi
mov    0x18(%rsp),%r14d
mov    %r14d,%esi
mov    %r12d,%edx
mov    %ecx,%r8d
call   10d0 <XDrawLine@plt>
mov    %r12d,%r15d
mov    0x30(%rsp),%rbp
mov    %rbp,%rdi
call   1040 <XtWindow@plt>
mov    0x2c98(%rip),%rcx
mov    (%rcx),%edx
xor    %ecx,%ecx
sub    0x8(%rbp),%ecx
mov    0x2c9a(%rip),%r13
mov    0x0(%r13),%esi
mov    %esi,(%rsp)
mov    %rbx,%rdi
mov    %eax,%esi
mov    %ecx,%r8d
mov    %r14d,%r9d
call   1030 <XShapeCombineMask@plt>
cmpl   $0x0,0x8(%rbp)
je     13e6 <ShapeOval+0x236>
mov    %rbx,%rdi
mov    %r15d,%esi
xor    %edx,%edx
call   1090 <XSetForeground@plt>
mov    0x14(%rsp),%eax
mov    %eax,(%rsp)
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %r15d,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
mov    0x1c(%rsp),%r9d
call   1050 <XFillRectangle@plt>
mov    0x0(%rbp),%eax
mov    0x4(%rbp),%ecx
cmp    %ecx,%eax
cmovl  %eax,%ecx
mov    %ecx,0x28(%rsp)
movl   $0x1,0x20(%rsp)
mov    0x2c37(%rip),%rax
mov    (%rax),%edx
mov    0x2bf6(%rip),%rax
or     (%rax),%edx
lea    0x20(%rsp),%rcx
mov    %rbx,%rdi
mov    %r15d,%esi
call   10a0 <XChangeGC@plt>
mov    0x0(%rbp),%r9d
mov    0x4(%rbp),%ecx
cmp    %ecx,%r9d
jge    141f <ShapeOval+0x26f>
sar    %r9d
mov    %r9d,%eax
not    %eax
add    %eax,%ecx
mov    %ecx,(%rsp)
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %r15d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
jmp    1437 <ShapeOval+0x287>
mov    %rbp,%rdi
call   1070 <XtDisplay@plt>
mov    %rax,%r12
mov    %rbp,%rdi
call   1040 <XtWindow@plt>
mov    0x2bf0(%rip),%rcx
mov    (%rcx),%edx
mov    0x2bbf(%rip),%rcx
mov    (%rcx),%r9d
mov    0x0(%r13),%ecx
mov    %ecx,(%rsp)
mov    %r12,%rdi
mov    %eax,%esi
xor    %ecx,%ecx
xor    %r8d,%r8d
jmp    1461 <ShapeOval+0x2b1>
sar    %ecx
mov    %ecx,%eax
not    %eax
add    %eax,%r9d
mov    %ecx,(%rsp)
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %r15d,%edx
mov    %ecx,%r8d
call   10d0 <XDrawLine@plt>
mov    %rbp,%rdi
call   1040 <XtWindow@plt>
mov    0x2ba5(%rip),%rcx
mov    (%rcx),%edx
mov    0x0(%r13),%ecx
mov    %ecx,(%rsp)
mov    %rbx,%rdi
mov    %eax,%esi
xor    %ecx,%ecx
xor    %r8d,%r8d
mov    %r14d,%r9d
call   1030 <XShapeCombineMask@plt>
mov    %rbx,%rdi
mov    %r14d,%esi
call   1060 <XFreePixmap@plt>
mov    %rbx,%rdi
mov    %r15d,%esi
call   10b0 <XFreeGC@plt>
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.TYPE_11__ = type { %struct.TYPE_9__ }
%struct.TYPE_9__ = type { i32, i32, i32 }
%struct.TYPE_10__ = type { i32, i32, i32, i32 }
@CapRound = global i32 0
@GCForeground = global i32 0
@GCBackground = global i32 0
@GCLineWidth = global i32 0
@GCCapStyle = global i32 0
@ShapeBounding = global i32 0
@ShapeSet = global i32 0
@ShapeClip = global i32 0
@None = global i32 0
define void @ShapeOval(%struct.TYPE_11__* %0) {
%2 = alloca %struct.TYPE_11__*
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca %struct.TYPE_10__
%8 = alloca i32
%9 = alloca i32
store %struct.TYPE_11__* %0, %struct.TYPE_11__** %2
%10 = load %struct.TYPE_11__*, %struct.TYPE_11__** %2
%11 = call i32* @XtDisplay(%struct.TYPE_11__* %10)
store i32* %11, i32** %3
%12 = load %struct.TYPE_11__*, %struct.TYPE_11__** %2
%13 = getelementptr inbounds %struct.TYPE_11__, %struct.TYPE_11__* %12, i32 0, i32 0
%14 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %13, i32 0, i32 0
%15 = load i32, i32* %14
store i32 %15, i32* %4
%16 = load %struct.TYPE_11__*, %struct.TYPE_11__** %2
%17 = getelementptr inbounds %struct.TYPE_11__, %struct.TYPE_11__* %16, i32 0, i32 0
%18 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %17, i32 0, i32 1
%19 = load i32, i32* %18
store i32 %19, i32* %5
%20 = load i32, i32* %4
%21 = icmp slt i32 %20, 3
br i1 %21, label %25, label %22
22: ; preds = %1
%23 = load i32, i32* %5
%24 = icmp slt i32 %23, 3
br i1 %24, label %25, label %26
25: ; preds = %22, %1
br label %246
26: ; preds = %22
%27 = load %struct.TYPE_11__*, %struct.TYPE_11__** %2
%28 = getelementptr inbounds %struct.TYPE_11__, %struct.TYPE_11__* %27, i32 0, i32 0
%29 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %28, i32 0, i32 2
%30 = load i32, i32* %29
%31 = shl i32 %30, 1
%32 = load i32, i32* %4
%33 = add nsw i32 %32, %31
store i32 %33, i32* %4
%34 = load %struct.TYPE_11__*, %struct.TYPE_11__** %2
%35 = getelementptr inbounds %struct.TYPE_11__, %struct.TYPE_11__* %34, i32 0, i32 0
%36 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %35, i32 0, i32 2
%37 = load i32, i32* %36
%38 = shl i32 %37, 1
%39 = load i32, i32* %5
%40 = add nsw i32 %39, %38
store i32 %40, i32* %5
%41 = load i32*, i32** %3
%42 = load %struct.TYPE_11__*, %struct.TYPE_11__** %2
%43 = call i32 @XtWindow(%struct.TYPE_11__* %42)
%44 = load i32, i32* %4
%45 = load i32, i32* %5
%46 = call i32 @XCreatePixmap(i32* %41, i32 %43, i32 %44, i32 %45, i32 1)
store i32 %46, i32* %6
%47 = getelementptr inbounds %struct.TYPE_10__, %struct.TYPE_10__* %7, i32 0, i32 0
store i32 0, i32* %47
%48 = getelementptr inbounds %struct.TYPE_10__, %struct.TYPE_10__* %7, i32 0, i32 1
store i32 1, i32* %48
%49 = load i32, i32* @CapRound
%50 = getelementptr inbounds %struct.TYPE_10__, %struct.TYPE_10__* %7, i32 0, i32 3
store i32 %49, i32* %50
%51 = load i32, i32* %4
%52 = load i32, i32* %5
%53 = icmp slt i32 %51, %52
br i1 %53, label %54, label %56
54: ; preds = %26
%55 = load i32, i32* %4
br label %58
56: ; preds = %26
%57 = load i32, i32* %5
br label %58
58: ; preds = %56, %54
%59 = phi i32 [ %55, %54 ], [ %57, %56 ]
%60 = getelementptr inbounds %struct.TYPE_10__, %struct.TYPE_10__* %7, i32 0, i32 2
store i32 %59, i32* %60
%61 = load i32*, i32** %3
%62 = load i32, i32* %6
%63 = load i32, i32* @GCForeground
%64 = load i32, i32* @GCBackground
%65 = or i32 %63, %64
%66 = load i32, i32* @GCLineWidth
%67 = or i32 %65, %66
%68 = load i32, i32* @GCCapStyle
%69 = or i32 %67, %68
%70 = call i32 @XCreateGC(i32* %61, i32 %62, i32 %69, %struct.TYPE_10__* %7)
store i32 %70, i32* %8
%71 = load i32*, i32** %3
%72 = load i32, i32* %6
%73 = load i32, i32* %8
%74 = load i32, i32* %4
%75 = load i32, i32* %5
%76 = call i32 @XFillRectangle(i32* %71, i32 %72, i32 %73, i32 0, i32 0, i32 %74, i32 %75)
%77 = load i32*, i32** %3
%78 = load i32, i32* %8
%79 = call i32 @XSetForeground(i32* %77, i32 %78, i32 1)
%80 = load i32, i32* %4
%81 = load i32, i32* %5
%82 = icmp slt i32 %80, %81
br i1 %82, label %83, label %97
83: ; preds = %58
%84 = load i32, i32* %4
%85 = ashr i32 %84, 1
store i32 %85, i32* %9
%86 = load i32*, i32** %3
%87 = load i32, i32* %6
%88 = load i32, i32* %8
%89 = load i32, i32* %9
%90 = load i32, i32* %9
%91 = load i32, i32* %9
%92 = load i32, i32* %5
%93 = load i32, i32* %9
%94 = sub nsw i32 %92, %93
%95 = sub nsw i32 %94, 1
%96 = call i32 @XDrawLine(i32* %86, i32 %87, i32 %88, i32 %89, i32 %90, i32 %91, i32 %95)
br label %111
97: ; preds = %58
%98 = load i32, i32* %5
%99 = ashr i32 %98, 1
store i32 %99, i32* %9
%100 = load i32*, i32** %3
%101 = load i32, i32* %6
%102 = load i32, i32* %8
%103 = load i32, i32* %9
%104 = load i32, i32* %9
%105 = load i32, i32* %4
%106 = load i32, i32* %9
%107 = sub nsw i32 %105, %106
%108 = sub nsw i32 %107, 1
%109 = load i32, i32* %9
%110 = call i32 @XDrawLine(i32* %100, i32 %101, i32 %102, i32 %103, i32 %104, i32 %108, i32 %109)
br label %111
111: ; preds = %97, %83
%112 = load i32*, i32** %3
%113 = load %struct.TYPE_11__*, %struct.TYPE_11__** %2
%114 = call i32 @XtWindow(%struct.TYPE_11__* %113)
%115 = load i32, i32* @ShapeBounding
%116 = load %struct.TYPE_11__*, %struct.TYPE_11__** %2
%117 = getelementptr inbounds %struct.TYPE_11__, %struct.TYPE_11__* %116, i32 0, i32 0
%118 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %117, i32 0, i32 2
%119 = load i32, i32* %118
%120 = sub nsw i32 0, %119
%121 = load %struct.TYPE_11__*, %struct.TYPE_11__** %2
%122 = getelementptr inbounds %struct.TYPE_11__, %struct.TYPE_11__* %121, i32 0, i32 0
%123 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %122, i32 0, i32 2
%124 = load i32, i32* %123
%125 = sub nsw i32 0, %124
%126 = load i32, i32* %6
%127 = load i32, i32* @ShapeSet
%128 = call i32 @XShapeCombineMask(i32* %112, i32 %114, i32 %115, i32 %120, i32 %125, i32 %126, i32 %127)
%129 = load %struct.TYPE_11__*, %struct.TYPE_11__** %2
%130 = getelementptr inbounds %struct.TYPE_11__, %struct.TYPE_11__* %129, i32 0, i32 0
%131 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %130, i32 0, i32 2
%132 = load i32, i32* %131
%133 = icmp ne i32 %132, 0
br i1 %133, label %134, label %230
134: ; preds = %111
%135 = load i32*, i32** %3
%136 = load i32, i32* %8
%137 = call i32 @XSetForeground(i32* %135, i32 %136, i32 0)
%138 = load i32*, i32** %3
%139 = load i32, i32* %6
%140 = load i32, i32* %8
%141 = load i32, i32* %4
%142 = load i32, i32* %5
%143 = call i32 @XFillRectangle(i32* %138, i32 %139, i32 %140, i32 0, i32 0, i32 %141, i32 %142)
%144 = load %struct.TYPE_11__*, %struct.TYPE_11__** %2
%145 = getelementptr inbounds %struct.TYPE_11__, %struct.TYPE_11__* %144, i32 0, i32 0
%146 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %145, i32 0, i32 0
%147 = load i32, i32* %146
%148 = load %struct.TYPE_11__*, %struct.TYPE_11__** %2
%149 = getelementptr inbounds %struct.TYPE_11__, %struct.TYPE_11__* %148, i32 0, i32 0
%150 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %149, i32 0, i32 1
%151 = load i32, i32* %150
%152 = icmp slt i32 %147, %151
br i1 %152, label %153, label %158
153: ; preds = %134
%154 = load %struct.TYPE_11__*, %struct.TYPE_11__** %2
%155 = getelementptr inbounds %struct.TYPE_11__, %struct.TYPE_11__* %154, i32 0, i32 0
%156 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %155, i32 0, i32 0
%157 = load i32, i32* %156
br label %163
158: ; preds = %134
%159 = load %struct.TYPE_11__*, %struct.TYPE_11__** %2
%160 = getelementptr inbounds %struct.TYPE_11__, %struct.TYPE_11__* %159, i32 0, i32 0
%161 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %160, i32 0, i32 1
%162 = load i32, i32* %161
br label %163
163: ; preds = %158, %153
%164 = phi i32 [ %157, %153 ], [ %162, %158 ]
%165 = getelementptr inbounds %struct.TYPE_10__, %struct.TYPE_10__* %7, i32 0, i32 2
store i32 %164, i32* %165
%166 = getelementptr inbounds %struct.TYPE_10__, %struct.TYPE_10__* %7, i32 0, i32 0
store i32 1, i32* %166
%167 = load i32*, i32** %3
%168 = load i32, i32* %8
%169 = load i32, i32* @GCLineWidth
%170 = load i32, i32* @GCForeground
%171 = or i32 %169, %170
%172 = call i32 @XChangeGC(i32* %167, i32 %168, i32 %171, %struct.TYPE_10__* %7)
%173 = load %struct.TYPE_11__*, %struct.TYPE_11__** %2
%174 = getelementptr inbounds %struct.TYPE_11__, %struct.TYPE_11__* %173, i32 0, i32 0
%175 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %174, i32 0, i32 0
%176 = load i32, i32* %175
%177 = load %struct.TYPE_11__*, %struct.TYPE_11__** %2
%178 = getelementptr inbounds %struct.TYPE_11__, %struct.TYPE_11__* %177, i32 0, i32 0
%179 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %178, i32 0, i32 1
%180 = load i32, i32* %179
%181 = icmp slt i32 %176, %180
br i1 %181, label %182, label %202
182: ; preds = %163
%183 = load %struct.TYPE_11__*, %struct.TYPE_11__** %2
%184 = getelementptr inbounds %struct.TYPE_11__, %struct.TYPE_11__* %183, i32 0, i32 0
%185 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %184, i32 0, i32 0
%186 = load i32, i32* %185
%187 = ashr i32 %186, 1
store i32 %187, i32* %9
%188 = load i32*, i32** %3
%189 = load i32, i32* %6
%190 = load i32, i32* %8
%191 = load i32, i32* %9
%192 = load i32, i32* %9
%193 = load i32, i32* %9
%194 = load %struct.TYPE_11__*, %struct.TYPE_11__** %2
%195 = getelementptr inbounds %struct.TYPE_11__, %struct.TYPE_11__* %194, i32 0, i32 0
%196 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %195, i32 0, i32 1
%197 = load i32, i32* %196
%198 = load i32, i32* %9
%199 = sub nsw i32 %197, %198
%200 = sub nsw i32 %199, 1
%201 = call i32 @XDrawLine(i32* %188, i32 %189, i32 %190, i32 %191, i32 %192, i32 %193, i32 %200)
br label %222
202: ; preds = %163
%203 = load %struct.TYPE_11__*, %struct.TYPE_11__** %2
%204 = getelementptr inbounds %struct.TYPE_11__, %struct.TYPE_11__* %203, i32 0, i32 0
%205 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %204, i32 0, i32 1
%206 = load i32, i32* %205
%207 = ashr i32 %206, 1
store i32 %207, i32* %9
%208 = load i32*, i32** %3
%209 = load i32, i32* %6
%210 = load i32, i32* %8
%211 = load i32, i32* %9
%212 = load i32, i32* %9
%213 = load %struct.TYPE_11__*, %struct.TYPE_11__** %2
%214 = getelementptr inbounds %struct.TYPE_11__, %struct.TYPE_11__* %213, i32 0, i32 0
%215 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %214, i32 0, i32 0
%216 = load i32, i32* %215
%217 = load i32, i32* %9
%218 = sub nsw i32 %216, %217
%219 = sub nsw i32 %218, 1
%220 = load i32, i32* %9
%221 = call i32 @XDrawLine(i32* %208, i32 %209, i32 %210, i32 %211, i32 %212, i32 %219, i32 %220)
br label %222
222: ; preds = %202, %182
%223 = load i32*, i32** %3
%224 = load %struct.TYPE_11__*, %struct.TYPE_11__** %2
%225 = call i32 @XtWindow(%struct.TYPE_11__* %224)
%226 = load i32, i32* @ShapeClip
%227 = load i32, i32* %6
%228 = load i32, i32* @ShapeSet
%229 = call i32 @XShapeCombineMask(i32* %223, i32 %225, i32 %226, i32 0, i32 0, i32 %227, i32 %228)
br label %239
230: ; preds = %111
%231 = load %struct.TYPE_11__*, %struct.TYPE_11__** %2
%232 = call i32* @XtDisplay(%struct.TYPE_11__* %231)
%233 = load %struct.TYPE_11__*, %struct.TYPE_11__** %2
%234 = call i32 @XtWindow(%struct.TYPE_11__* %233)
%235 = load i32, i32* @ShapeClip
%236 = load i32, i32* @None
%237 = load i32, i32* @ShapeSet
%238 = call i32 @XShapeCombineMask(i32* %232, i32 %234, i32 %235, i32 0, i32 0, i32 %236, i32 %237)
br label %239
239: ; preds = %230, %222
%240 = load i32*, i32** %3
%241 = load i32, i32* %6
%242 = call i32 @XFreePixmap(i32* %240, i32 %241)
%243 = load i32*, i32** %3
%244 = load i32, i32* %8
%245 = call i32 @XFreeGC(i32* %243, i32 %244)
br label %246
246: ; preds = %239, %25
ret void
}

LLVM IR (-O2):
%struct.TYPE_11__ = type { %struct.TYPE_9__ }
%struct.TYPE_9__ = type { i32, i32, i32 }
%struct.TYPE_10__ = type { i32, i32, i32, i32 }
@CapRound = global i32 0
@GCForeground = global i32 0
@GCBackground = global i32 0
@GCLineWidth = global i32 0
@GCCapStyle = global i32 0
@ShapeBounding = global i32 0
@ShapeSet = global i32 0
@ShapeClip = global i32 0
@None = global i32 0
define void @ShapeOval(%struct.TYPE_11__* %0) {
%2 = alloca %struct.TYPE_10__
%3 = tail call i32* @XtDisplay(%struct.TYPE_11__* %0)
%4 = getelementptr inbounds %struct.TYPE_11__, %struct.TYPE_11__* %0, i64 0, i32 0, i32 0
%5 = load i32, i32* %4
%6 = getelementptr inbounds %struct.TYPE_11__, %struct.TYPE_11__* %0, i64 0, i32 0, i32 1
%7 = load i32, i32* %6
%8 = bitcast %struct.TYPE_10__* %2 to i8*
%9 = icmp slt i32 %5, 3
%10 = icmp slt i32 %7, 3
%11 = select i1 %9, i1 true, i1 %10
br i1 %11, label %95, label %12
12: ; preds = %1
%13 = getelementptr inbounds %struct.TYPE_11__, %struct.TYPE_11__* %0, i64 0, i32 0, i32 2
%14 = load i32, i32* %13
%15 = shl i32 %14, 1
%16 = add nsw i32 %15, %5
%17 = add nsw i32 %15, %7
%18 = tail call i32 @XtWindow(%struct.TYPE_11__* %0)
%19 = tail call i32 @XCreatePixmap(i32* %3, i32 %18, i32 %16, i32 %17, i32 1)
%20 = getelementptr inbounds %struct.TYPE_10__, %struct.TYPE_10__* %2, i64 0, i32 0
store i32 0, i32* %20
%21 = getelementptr inbounds %struct.TYPE_10__, %struct.TYPE_10__* %2, i64 0, i32 1
store i32 1, i32* %21
%22 = load i32, i32* @CapRound
%23 = getelementptr inbounds %struct.TYPE_10__, %struct.TYPE_10__* %2, i64 0, i32 3
store i32 %22, i32* %23
%24 = icmp ult i32 %5, %7
%25 = select i1 %24, i32 %16, i32 %17
%26 = getelementptr inbounds %struct.TYPE_10__, %struct.TYPE_10__* %2, i64 0, i32 2
store i32 %25, i32* %26
%27 = load i32, i32* @GCForeground
%28 = load i32, i32* @GCBackground
%29 = or i32 %28, %27
%30 = load i32, i32* @GCLineWidth
%31 = or i32 %29, %30
%32 = load i32, i32* @GCCapStyle
%33 = or i32 %31, %32
%34 = call i32 @XCreateGC(i32* %3, i32 %19, i32 %33, %struct.TYPE_10__* %2)
%35 = call i32 @XFillRectangle(i32* %3, i32 %19, i32 %34, i32 0, i32 0, i32 %16, i32 %17)
%36 = call i32 @XSetForeground(i32* %3, i32 %34, i32 1)
br i1 %24, label %37, label %42
37: ; preds = %12
%38 = ashr i32 %16, 1
%39 = xor i32 %38, -1
%40 = add i32 %17, %39
%41 = call i32 @XDrawLine(i32* %3, i32 %19, i32 %34, i32 %38, i32 %38, i32 %38, i32 %40)
br label %47
42: ; preds = %12
%43 = ashr i32 %17, 1
%44 = xor i32 %43, -1
%45 = add i32 %16, %44
%46 = call i32 @XDrawLine(i32* %3, i32 %19, i32 %34, i32 %43, i32 %43, i32 %45, i32 %43)
br label %47
47: ; preds = %42, %37
%48 = call i32 @XtWindow(%struct.TYPE_11__* %0)
%49 = load i32, i32* @ShapeBounding
%50 = load i32, i32* %13
%51 = sub nsw i32 0, %50
%52 = load i32, i32* @ShapeSet
%53 = call i32 @XShapeCombineMask(i32* %3, i32 %48, i32 %49, i32 %51, i32 %51, i32 %19, i32 %52)
%54 = load i32, i32* %13
%55 = icmp eq i32 %54, 0
br i1 %55, label %85, label %56
56: ; preds = %47
%57 = call i32 @XSetForeground(i32* %3, i32 %34, i32 0)
%58 = call i32 @XFillRectangle(i32* %3, i32 %19, i32 %34, i32 0, i32 0, i32 %16, i32 %17)
%59 = load i32, i32* %4
%60 = load i32, i32* %6
%61 = icmp slt i32 %59, %60
%62 = select i1 %61, i32 %59, i32 %60
store i32 %62, i32* %26
store i32 1, i32* %20
%63 = load i32, i32* @GCLineWidth
%64 = load i32, i32* @GCForeground
%65 = or i32 %64, %63
%66 = call i32 @XChangeGC(i32* %3, i32 %34, i32 %65, %struct.TYPE_10__* %2)
%67 = load i32, i32* %4
%68 = load i32, i32* %6
%69 = icmp slt i32 %67, %68
br i1 %69, label %70, label %75
70: ; preds = %56
%71 = ashr i32 %67, 1
%72 = xor i32 %71, -1
%73 = add i32 %68, %72
%74 = call i32 @XDrawLine(i32* %3, i32 %19, i32 %34, i32 %71, i32 %71, i32 %71, i32 %73)
br label %80
75: ; preds = %56
%76 = ashr i32 %68, 1
%77 = xor i32 %76, -1
%78 = add i32 %67, %77
%79 = call i32 @XDrawLine(i32* %3, i32 %19, i32 %34, i32 %76, i32 %76, i32 %78, i32 %76)
br label %80
80: ; preds = %75, %70
%81 = call i32 @XtWindow(%struct.TYPE_11__* %0)
%82 = load i32, i32* @ShapeClip
%83 = load i32, i32* @ShapeSet
%84 = call i32 @XShapeCombineMask(i32* %3, i32 %81, i32 %82, i32 0, i32 0, i32 %19, i32 %83)
br label %92
85: ; preds = %47
%86 = call i32* @XtDisplay(%struct.TYPE_11__* %0)
%87 = call i32 @XtWindow(%struct.TYPE_11__* %0)
%88 = load i32, i32* @ShapeClip
%89 = load i32, i32* @None
%90 = load i32, i32* @ShapeSet
%91 = call i32 @XShapeCombineMask(i32* %86, i32 %87, i32 %88, i32 0, i32 0, i32 %89, i32 %90)
br label %92
92: ; preds = %85, %80
%93 = call i32 @XFreePixmap(i32* %3, i32 %19)
%94 = call i32 @XFreeGC(i32* %3, i32 %34)
br label %95
95: ; preds = %1, %92
ret void
}