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

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

/* Variables and functions */
unsigned long GCForeground;
unsigned long GCLineWidth;
int /*<<< orphan*/ None;
int /*<<< orphan*/ ShapeBounding;
int /*<<< orphan*/ ShapeClip;
int /*<<< orphan*/ ShapeSet;
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*/ XDrawArc(int /*<<< orphan*/ *, int /*<<< orphan*/,
                            int /*<<< orphan*/, int, int, unsigned int,
                            unsigned int, int /*<<< orphan*/, int);
int /*<<< orphan*/ XFillArc(int /*<<< orphan*/ *, int /*<<< orphan*/,
                            int /*<<< orphan*/, int, int, unsigned int,
                            unsigned int, int /*<<< orphan*/, int);
int /*<<< orphan*/ XFillRectangle(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                  int /*<<< orphan*/, int /*<<< orphan*/,
                                  int /*<<< orphan*/, unsigned int,
                                  unsigned 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*/ XmuFillRoundedRectangle(int /*<<< orphan*/ *,
                                           int /*<<< orphan*/,
                                           int /*<<< orphan*/, int, int, int,
                                           int, int, int);
int /*<<< orphan*/ *XtDisplay(TYPE_3__ *);
int /*<<< orphan*/ XtWindow(TYPE_3__ *);
void ShapeEllipseOrRoundedRectangle(Widget w, Bool ellipse, int ew, int eh) {
  Display *dpy = XtDisplay(w);
  unsigned width = w->core.width;
  unsigned height = w->core.height;
  Pixmap p;
  XGCValues values;
  GC gc;
  unsigned long mask;
  if (width < 3 || width < 3)
    return;
  width += w->core.border_width << 1;
  height += w->core.border_width << 1;
  mask = GCForeground | GCLineWidth;
  p = XCreatePixmap(dpy, XtWindow(w), width, height, 1);
  values.foreground = 0;
  values.line_width = 2;
  gc = XCreateGC(dpy, p, mask, &values);
  XFillRectangle(dpy, p, gc, 0, 0, width, height);
  XSetForeground(dpy, gc, 1);
  if (!ellipse)
    XmuFillRoundedRectangle(dpy, p, gc, 1, 1, width - 2, height - 2, ew, eh);
  else {
    XDrawArc(dpy, p, gc, 1, 1, width - 2, height - 2, 0, 360 * 64);
    XFillArc(dpy, p, gc, 2, 2, width - 4, height - 4, 0, 360 * 64);
  }
  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);
    XSetForeground(dpy, gc, 1);
    if (!ellipse)
      XmuFillRoundedRectangle(dpy, p, gc, 1, 1, w->core.width - 2,
                              w->core.height - 2, ew, eh);
    else
      XFillArc(dpy, p, gc, 0, 0, w->core.width, w->core.height, 0, 360 * 64);
    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):
<ShapeEllipseOrRoundedRectangle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1090 <XtDisplay@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x28(%rbp)
cmpl   $0x3,-0x24(%rbp)
jb     120c <ShapeEllipseOrRoundedRectangle+0x4c>
cmpl   $0x3,-0x24(%rbp)
jae    1211 <ShapeEllipseOrRoundedRectangle+0x51>
jmp    1546 <ShapeEllipseOrRoundedRectangle+0x386>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
shl    $0x1,%eax
add    -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
shl    $0x1,%eax
add    -0x28(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    0x2da8(%rip),%rax
mov    (%rax),%rax
mov    0x2d76(%rip),%rcx
or     (%rcx),%rax
mov    %rax,-0x50(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <XtWindow@plt>
mov    -0x58(%rbp),%rdi
mov    %eax,%esi
mov    -0x24(%rbp),%edx
mov    -0x28(%rbp),%ecx
mov    $0x1,%r8d
call   10e0 <XCreatePixmap@plt>
mov    %eax,-0x2c(%rbp)
movq   $0x0,-0x38(%rbp)
movl   $0x2,-0x40(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    -0x50(%rbp),%rdx
lea    -0x40(%rbp),%rcx
call   10a0 <XCreateGC@plt>
mov    %eax,-0x44(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    -0x44(%rbp),%edx
mov    -0x24(%rbp),%r9d
mov    -0x28(%rbp),%eax
xor    %r8d,%r8d
mov    %r8d,%ecx
mov    %eax,(%rsp)
call   1060 <XFillRectangle@plt>
mov    -0x20(%rbp),%rdi
mov    -0x44(%rbp),%esi
mov    $0x1,%edx
call   10b0 <XSetForeground@plt>
cmpl   $0x0,-0xc(%rbp)
jne    1315 <ShapeEllipseOrRoundedRectangle+0x155>
mov    -0x20(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    -0x44(%rbp),%edx
mov    -0x24(%rbp),%r9d
sub    $0x2,%r9d
mov    -0x28(%rbp),%r11d
sub    $0x2,%r11d
mov    -0x10(%rbp),%r10d
mov    -0x14(%rbp),%eax
mov    $0x1,%r8d
mov    %r8d,%ecx
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1080 <XmuFillRoundedRectangle@plt>
jmp    138b <ShapeEllipseOrRoundedRectangle+0x1cb>
mov    -0x20(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    -0x44(%rbp),%edx
mov    -0x24(%rbp),%r9d
sub    $0x2,%r9d
mov    -0x28(%rbp),%eax
sub    $0x2,%eax
mov    $0x1,%r8d
xor    %ecx,%ecx
mov    %r8d,%ecx
mov    %eax,(%rsp)
movl   $0x0,0x8(%rsp)
movl   $0x5a00,0x10(%rsp)
call   1040 <XDrawArc@plt>
mov    -0x20(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    -0x44(%rbp),%edx
mov    -0x24(%rbp),%r9d
sub    $0x4,%r9d
mov    -0x28(%rbp),%eax
sub    $0x4,%eax
mov    $0x2,%r8d
xor    %ecx,%ecx
mov    %r8d,%ecx
mov    %eax,(%rsp)
movl   $0x0,0x8(%rsp)
movl   $0x5a00,0x10(%rsp)
call   10d0 <XFillArc@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <XtWindow@plt>
mov    -0x60(%rbp),%rdi
mov    %eax,%esi
mov    0x2c1f(%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    -0x2c(%rbp),%r9d
mov    0x2c0e(%rip),%rax
mov    (%rax),%eax
mov    %eax,(%rsp)
call   1030 <XShapeCombineMask@plt>
mov    -0x8(%rbp),%rax
cmpl   $0x0,0x8(%rax)
je     14e8 <ShapeEllipseOrRoundedRectangle+0x328>
mov    -0x20(%rbp),%rdi
mov    -0x44(%rbp),%esi
xor    %edx,%edx
call   10b0 <XSetForeground@plt>
mov    -0x20(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    -0x44(%rbp),%edx
mov    -0x24(%rbp),%r9d
mov    -0x28(%rbp),%eax
xor    %r8d,%r8d
mov    %r8d,%ecx
mov    %eax,(%rsp)
call   1060 <XFillRectangle@plt>
mov    -0x20(%rbp),%rdi
mov    -0x44(%rbp),%esi
mov    $0x1,%edx
call   10b0 <XSetForeground@plt>
cmpl   $0x0,-0xc(%rbp)
jne    1472 <ShapeEllipseOrRoundedRectangle+0x2b2>
mov    -0x20(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    -0x44(%rbp),%edx
mov    -0x8(%rbp),%rax
mov    (%rax),%r9d
sub    $0x2,%r9d
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%r11d
sub    $0x2,%r11d
mov    -0x10(%rbp),%r10d
mov    -0x14(%rbp),%eax
mov    $0x1,%r8d
mov    %r8d,%ecx
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1080 <XmuFillRoundedRectangle@plt>
jmp    14a8 <ShapeEllipseOrRoundedRectangle+0x2e8>
mov    -0x20(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    -0x44(%rbp),%edx
mov    -0x8(%rbp),%rax
mov    (%rax),%r9d
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
xor    %r8d,%r8d
mov    %r8d,%ecx
mov    %eax,(%rsp)
movl   $0x0,0x8(%rsp)
movl   $0x5a00,0x10(%rsp)
call   10d0 <XFillArc@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <XtWindow@plt>
mov    -0x68(%rbp),%rdi
mov    %eax,%esi
mov    0x2b2a(%rip),%rax
mov    (%rax),%edx
mov    -0x2c(%rbp),%r9d
mov    0x2b05(%rip),%rax
mov    (%rax),%eax
xor    %r8d,%r8d
mov    %r8d,%ecx
mov    %eax,(%rsp)
call   1030 <XShapeCombineMask@plt>
jmp    152e <ShapeEllipseOrRoundedRectangle+0x36e>
mov    -0x8(%rbp),%rdi
call   1090 <XtDisplay@plt>
mov    %rax,-0x70(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <XtWindow@plt>
mov    -0x70(%rbp),%rdi
mov    %eax,%esi
mov    0x2ae5(%rip),%rax
mov    (%rax),%edx
mov    0x2abc(%rip),%rax
mov    (%rax),%r9d
mov    0x2aba(%rip),%rax
mov    (%rax),%eax
xor    %r8d,%r8d
mov    %r8d,%ecx
mov    %eax,(%rsp)
call   1030 <XShapeCombineMask@plt>
mov    -0x20(%rbp),%rdi
mov    -0x2c(%rbp),%esi
call   1070 <XFreePixmap@plt>
mov    -0x20(%rbp),%rdi
mov    -0x44(%rbp),%esi
call   10c0 <XFreeGC@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ShapeEllipseOrRoundedRectangle>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %ecx,%r12d
mov    %edx,%ebx
mov    %esi,%r15d
mov    %rdi,%rbp
call   1090 <XtDisplay@plt>
mov    0x0(%rbp),%r13d
cmp    $0x3,%r13d
jb     14e1 <ShapeEllipseOrRoundedRectangle+0x321>
mov    %rax,%r14
mov    %r12,0x10(%rsp)
mov    %rbx,0x18(%rsp)
mov    0x4(%rbp),%eax
mov    %rax,0x40(%rsp)
mov    %r15d,0xc(%rsp)
mov    0x8(%rbp),%ecx
mov    %rcx,0x38(%rsp)
lea    0x0(%r13,%rcx,2),%r12d
lea    (%rax,%rcx,2),%r15d
mov    0x2dc2(%rip),%rax
mov    0x2d93(%rip),%rcx
mov    (%rcx),%rbx
or     (%rax),%rbx
mov    %rbp,0x20(%rsp)
mov    %rbp,%rdi
call   1050 <XtWindow@plt>
mov    %r14,%rdi
mov    %eax,%esi
mov    %r12d,%edx
mov    %r12,%rbp
mov    %r15d,%ecx
mov    $0x1,%r8d
call   10e0 <XCreatePixmap@plt>
mov    %eax,%r12d
movq   $0x0,0x50(%rsp)
movl   $0x2,0x48(%rsp)
lea    0x48(%rsp),%rcx
mov    %r14,%rdi
mov    %eax,%esi
mov    %rbx,%rdx
call   10a0 <XCreateGC@plt>
mov    %eax,%ebx
sub    $0x8,%rsp
mov    %r14,%rdi
mov    %r12d,0x10(%rsp)
mov    %r12d,%esi
mov    %eax,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
mov    %ebp,%r9d
mov    %r15,0x30(%rsp)
push   %r15
call   1060 <XFillRectangle@plt>
add    $0x10,%rsp
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x1,%edx
call   10b0 <XSetForeground@plt>
mov    0x38(%rsp),%rax
lea    -0x2(%r13,%rax,2),%r9d
mov    0x40(%rsp),%rcx
lea    (%rcx,%rax,2),%eax
add    $0xfffffffe,%eax
cmpl   $0x0,0xc(%rsp)
mov    %rbp,0x30(%rsp)
je     1334 <ShapeEllipseOrRoundedRectangle+0x174>
sub    $0x8,%rsp
mov    %r14,%rdi
mov    0x10(%rsp),%r15d
mov    %r15d,%esi
mov    %ebx,%edx
mov    $0x1,%ecx
mov    $0x1,%r8d
push   $0x5a00
push   $0x0
push   %rax
call   1040 <XDrawArc@plt>
add    $0x20,%rsp
lea    -0x4(%rbp),%r9d
mov    0x28(%rsp),%rax
add    $0xfffffffc,%eax
sub    $0x8,%rsp
mov    %r14,%rdi
mov    %r15d,%esi
mov    %ebx,%r13d
mov    %ebx,%edx
mov    $0x2,%ecx
mov    $0x2,%r8d
push   $0x5a00
push   $0x0
push   %rax
call   10d0 <XFillArc@plt>
jmp    1361 <ShapeEllipseOrRoundedRectangle+0x1a1>
sub    $0x8,%rsp
mov    %r14,%rdi
mov    0x10(%rsp),%r15d
mov    %r15d,%esi
mov    %ebx,%r13d
mov    %ebx,%edx
mov    $0x1,%ecx
mov    $0x1,%r8d
push   0x18(%rsp)
push   0x28(%rsp)
push   %rax
call   1080 <XmuFillRoundedRectangle@plt>
add    $0x20,%rsp
mov    0x20(%rsp),%rbp
mov    %rbp,%rdi
call   1050 <XtWindow@plt>
mov    0x2c4f(%rip),%rcx
mov    (%rcx),%edx
xor    %ecx,%ecx
sub    0x8(%rbp),%ecx
mov    0x2c51(%rip),%r12
mov    (%r12),%ebx
sub    $0x8,%rsp
mov    %r14,%rdi
mov    %eax,%esi
mov    %ecx,%r8d
mov    %r15d,%r9d
push   %rbx
call   1030 <XShapeCombineMask@plt>
add    $0x10,%rsp
cmpl   $0x0,0x8(%rbp)
je     141c <ShapeEllipseOrRoundedRectangle+0x25c>
mov    %r14,%rdi
mov    %r13d,%ebx
mov    %r13d,%esi
xor    %edx,%edx
call   10b0 <XSetForeground@plt>
sub    $0x8,%rsp
mov    %r14,%rdi
mov    %r15d,%esi
mov    %r13d,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
mov    0x38(%rsp),%r9
push   0x30(%rsp)
call   1060 <XFillRectangle@plt>
add    $0x10,%rsp
mov    %r14,%rdi
mov    %r13d,%esi
mov    $0x1,%edx
call   10b0 <XSetForeground@plt>
mov    0x0(%rbp),%r9d
cmpl   $0x0,0xc(%rsp)
je     1469 <ShapeEllipseOrRoundedRectangle+0x2a9>
mov    0x4(%rbp),%eax
sub    $0x8,%rsp
mov    %r14,%rdi
mov    %r15d,%esi
mov    %ebx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
push   $0x5a00
push   $0x0
push   %rax
call   10d0 <XFillArc@plt>
jmp    1498 <ShapeEllipseOrRoundedRectangle+0x2d8>
mov    %rbp,%rdi
call   1090 <XtDisplay@plt>
mov    %r14,%rbx
mov    %rax,%r14
mov    %rbp,%rdi
call   1050 <XtWindow@plt>
mov    0x2bb7(%rip),%rcx
mov    (%rcx),%edx
mov    0x2b8e(%rip),%rcx
mov    (%rcx),%r9d
mov    (%r12),%ebp
sub    $0x8,%rsp
mov    %r14,%rdi
mov    %rbx,%r14
mov    %eax,%esi
xor    %ecx,%ecx
xor    %r8d,%r8d
push   %rbp
call   1030 <XShapeCombineMask@plt>
add    $0x10,%rsp
mov    %r13d,%ebx
jmp    14cc <ShapeEllipseOrRoundedRectangle+0x30c>
add    $0xfffffffe,%r9d
mov    0x4(%rbp),%eax
add    $0xfffffffe,%eax
sub    $0x8,%rsp
mov    %r14,%rdi
mov    %r15d,%esi
mov    %ebx,%edx
mov    $0x1,%ecx
mov    $0x1,%r8d
push   0x18(%rsp)
push   0x28(%rsp)
push   %rax
call   1080 <XmuFillRoundedRectangle@plt>
add    $0x20,%rsp
mov    %rbp,%rdi
call   1050 <XtWindow@plt>
mov    0x2b45(%rip),%rcx
mov    (%rcx),%edx
mov    (%r12),%ebp
sub    $0x8,%rsp
mov    %r14,%rdi
mov    %eax,%esi
xor    %ecx,%ecx
xor    %r8d,%r8d
mov    %r15d,%r9d
push   %rbp
call   1030 <XShapeCombineMask@plt>
add    $0x10,%rsp
mov    %r14,%rdi
mov    %r15d,%esi
call   1070 <XFreePixmap@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   10c0 <XFreeGC@plt>
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.TYPE_10__ = type { %struct.TYPE_8__ }
%struct.TYPE_8__ = type { i32, i32, i32 }
%struct.TYPE_9__ = type { i32, i64 }
@GCForeground = global i64 0
@GCLineWidth = global i64 0
@ShapeBounding = global i32 0
@ShapeSet = global i32 0
@ShapeClip = global i32 0
@None = global i32 0
define void @ShapeEllipseOrRoundedRectangle(%struct.TYPE_10__* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca %struct.TYPE_10__*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca %struct.TYPE_9__
%14 = alloca i32
%15 = alloca i64
store %struct.TYPE_10__* %0, %struct.TYPE_10__** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%16 = load %struct.TYPE_10__*, %struct.TYPE_10__** %5
%17 = call i32* @XtDisplay(%struct.TYPE_10__* %16)
store i32* %17, i32** %9
%18 = load %struct.TYPE_10__*, %struct.TYPE_10__** %5
%19 = getelementptr inbounds %struct.TYPE_10__, %struct.TYPE_10__* %18, i32 0, i32 0
%20 = getelementptr inbounds %struct.TYPE_8__, %struct.TYPE_8__* %19, i32 0, i32 0
%21 = load i32, i32* %20
store i32 %21, i32* %10
%22 = load %struct.TYPE_10__*, %struct.TYPE_10__** %5
%23 = getelementptr inbounds %struct.TYPE_10__, %struct.TYPE_10__* %22, i32 0, i32 0
%24 = getelementptr inbounds %struct.TYPE_8__, %struct.TYPE_8__* %23, i32 0, i32 1
%25 = load i32, i32* %24
store i32 %25, i32* %11
%26 = load i32, i32* %10
%27 = icmp ult i32 %26, 3
br i1 %27, label %31, label %28
28: ; preds = %4
%29 = load i32, i32* %10
%30 = icmp ult i32 %29, 3
br i1 %30, label %31, label %32
31: ; preds = %28, %4
br label %193
32: ; preds = %28
%33 = load %struct.TYPE_10__*, %struct.TYPE_10__** %5
%34 = getelementptr inbounds %struct.TYPE_10__, %struct.TYPE_10__* %33, i32 0, i32 0
%35 = getelementptr inbounds %struct.TYPE_8__, %struct.TYPE_8__* %34, i32 0, i32 2
%36 = load i32, i32* %35
%37 = shl i32 %36, 1
%38 = load i32, i32* %10
%39 = add i32 %38, %37
store i32 %39, i32* %10
%40 = load %struct.TYPE_10__*, %struct.TYPE_10__** %5
%41 = getelementptr inbounds %struct.TYPE_10__, %struct.TYPE_10__* %40, i32 0, i32 0
%42 = getelementptr inbounds %struct.TYPE_8__, %struct.TYPE_8__* %41, i32 0, i32 2
%43 = load i32, i32* %42
%44 = shl i32 %43, 1
%45 = load i32, i32* %11
%46 = add i32 %45, %44
store i32 %46, i32* %11
%47 = load i64, i64* @GCForeground
%48 = load i64, i64* @GCLineWidth
%49 = or i64 %47, %48
store i64 %49, i64* %15
%50 = load i32*, i32** %9
%51 = load %struct.TYPE_10__*, %struct.TYPE_10__** %5
%52 = call i32 @XtWindow(%struct.TYPE_10__* %51)
%53 = load i32, i32* %10
%54 = load i32, i32* %11
%55 = call i32 @XCreatePixmap(i32* %50, i32 %52, i32 %53, i32 %54, i32 1)
store i32 %55, i32* %12
%56 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %13, i32 0, i32 1
store i64 0, i64* %56
%57 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %13, i32 0, i32 0
store i32 2, i32* %57
%58 = load i32*, i32** %9
%59 = load i32, i32* %12
%60 = load i64, i64* %15
%61 = call i32 @XCreateGC(i32* %58, i32 %59, i64 %60, %struct.TYPE_9__* %13)
store i32 %61, i32* %14
%62 = load i32*, i32** %9
%63 = load i32, i32* %12
%64 = load i32, i32* %14
%65 = load i32, i32* %10
%66 = load i32, i32* %11
%67 = call i32 @XFillRectangle(i32* %62, i32 %63, i32 %64, i32 0, i32 0, i32 %65, i32 %66)
%68 = load i32*, i32** %9
%69 = load i32, i32* %14
%70 = call i32 @XSetForeground(i32* %68, i32 %69, i32 1)
%71 = load i32, i32* %6
%72 = icmp ne i32 %71, 0
br i1 %72, label %84, label %73
73: ; preds = %32
%74 = load i32*, i32** %9
%75 = load i32, i32* %12
%76 = load i32, i32* %14
%77 = load i32, i32* %10
%78 = sub i32 %77, 2
%79 = load i32, i32* %11
%80 = sub i32 %79, 2
%81 = load i32, i32* %7
%82 = load i32, i32* %8
%83 = call i32 @XmuFillRoundedRectangle(i32* %74, i32 %75, i32 %76, i32 1, i32 1, i32 %78, i32 %80, i32 %81, i32 %82)
br label %101
84: ; preds = %32
%85 = load i32*, i32** %9
%86 = load i32, i32* %12
%87 = load i32, i32* %14
%88 = load i32, i32* %10
%89 = sub i32 %88, 2
%90 = load i32, i32* %11
%91 = sub i32 %90, 2
%92 = call i32 @XDrawArc(i32* %85, i32 %86, i32 %87, i32 1, i32 1, i32 %89, i32 %91, i32 0, i32 23040)
%93 = load i32*, i32** %9
%94 = load i32, i32* %12
%95 = load i32, i32* %14
%96 = load i32, i32* %10
%97 = sub i32 %96, 4
%98 = load i32, i32* %11
%99 = sub i32 %98, 4
%100 = call i32 @XFillArc(i32* %93, i32 %94, i32 %95, i32 2, i32 2, i32 %97, i32 %99, i32 0, i32 23040)
br label %101
101: ; preds = %84, %73
%102 = load i32*, i32** %9
%103 = load %struct.TYPE_10__*, %struct.TYPE_10__** %5
%104 = call i32 @XtWindow(%struct.TYPE_10__* %103)
%105 = load i32, i32* @ShapeBounding
%106 = load %struct.TYPE_10__*, %struct.TYPE_10__** %5
%107 = getelementptr inbounds %struct.TYPE_10__, %struct.TYPE_10__* %106, i32 0, i32 0
%108 = getelementptr inbounds %struct.TYPE_8__, %struct.TYPE_8__* %107, i32 0, i32 2
%109 = load i32, i32* %108
%110 = sub nsw i32 0, %109
%111 = load %struct.TYPE_10__*, %struct.TYPE_10__** %5
%112 = getelementptr inbounds %struct.TYPE_10__, %struct.TYPE_10__* %111, i32 0, i32 0
%113 = getelementptr inbounds %struct.TYPE_8__, %struct.TYPE_8__* %112, i32 0, i32 2
%114 = load i32, i32* %113
%115 = sub nsw i32 0, %114
%116 = load i32, i32* %12
%117 = load i32, i32* @ShapeSet
%118 = call i32 @XShapeCombineMask(i32* %102, i32 %104, i32 %105, i32 %110, i32 %115, i32 %116, i32 %117)
%119 = load %struct.TYPE_10__*, %struct.TYPE_10__** %5
%120 = getelementptr inbounds %struct.TYPE_10__, %struct.TYPE_10__* %119, i32 0, i32 0
%121 = getelementptr inbounds %struct.TYPE_8__, %struct.TYPE_8__* %120, i32 0, i32 2
%122 = load i32, i32* %121
%123 = icmp ne i32 %122, 0
br i1 %123, label %124, label %177
124: ; preds = %101
%125 = load i32*, i32** %9
%126 = load i32, i32* %14
%127 = call i32 @XSetForeground(i32* %125, i32 %126, i32 0)
%128 = load i32*, i32** %9
%129 = load i32, i32* %12
%130 = load i32, i32* %14
%131 = load i32, i32* %10
%132 = load i32, i32* %11
%133 = call i32 @XFillRectangle(i32* %128, i32 %129, i32 %130, i32 0, i32 0, i32 %131, i32 %132)
%134 = load i32*, i32** %9
%135 = load i32, i32* %14
%136 = call i32 @XSetForeground(i32* %134, i32 %135, i32 1)
%137 = load i32, i32* %6
%138 = icmp ne i32 %137, 0
br i1 %138, label %156, label %139
139: ; preds = %124
%140 = load i32*, i32** %9
%141 = load i32, i32* %12
%142 = load i32, i32* %14
%143 = load %struct.TYPE_10__*, %struct.TYPE_10__** %5
%144 = getelementptr inbounds %struct.TYPE_10__, %struct.TYPE_10__* %143, i32 0, i32 0
%145 = getelementptr inbounds %struct.TYPE_8__, %struct.TYPE_8__* %144, i32 0, i32 0
%146 = load i32, i32* %145
%147 = sub i32 %146, 2
%148 = load %struct.TYPE_10__*, %struct.TYPE_10__** %5
%149 = getelementptr inbounds %struct.TYPE_10__, %struct.TYPE_10__* %148, i32 0, i32 0
%150 = getelementptr inbounds %struct.TYPE_8__, %struct.TYPE_8__* %149, i32 0, i32 1
%151 = load i32, i32* %150
%152 = sub i32 %151, 2
%153 = load i32, i32* %7
%154 = load i32, i32* %8
%155 = call i32 @XmuFillRoundedRectangle(i32* %140, i32 %141, i32 %142, i32 1, i32 1, i32 %147, i32 %152, i32 %153, i32 %154)
br label %169
156: ; preds = %124
%157 = load i32*, i32** %9
%158 = load i32, i32* %12
%159 = load i32, i32* %14
%160 = load %struct.TYPE_10__*, %struct.TYPE_10__** %5
%161 = getelementptr inbounds %struct.TYPE_10__, %struct.TYPE_10__* %160, i32 0, i32 0
%162 = getelementptr inbounds %struct.TYPE_8__, %struct.TYPE_8__* %161, i32 0, i32 0
%163 = load i32, i32* %162
%164 = load %struct.TYPE_10__*, %struct.TYPE_10__** %5
%165 = getelementptr inbounds %struct.TYPE_10__, %struct.TYPE_10__* %164, i32 0, i32 0
%166 = getelementptr inbounds %struct.TYPE_8__, %struct.TYPE_8__* %165, i32 0, i32 1
%167 = load i32, i32* %166
%168 = call i32 @XFillArc(i32* %157, i32 %158, i32 %159, i32 0, i32 0, i32 %163, i32 %167, i32 0, i32 23040)
br label %169
169: ; preds = %156, %139
%170 = load i32*, i32** %9
%171 = load %struct.TYPE_10__*, %struct.TYPE_10__** %5
%172 = call i32 @XtWindow(%struct.TYPE_10__* %171)
%173 = load i32, i32* @ShapeClip
%174 = load i32, i32* %12
%175 = load i32, i32* @ShapeSet
%176 = call i32 @XShapeCombineMask(i32* %170, i32 %172, i32 %173, i32 0, i32 0, i32 %174, i32 %175)
br label %186
177: ; preds = %101
%178 = load %struct.TYPE_10__*, %struct.TYPE_10__** %5
%179 = call i32* @XtDisplay(%struct.TYPE_10__* %178)
%180 = load %struct.TYPE_10__*, %struct.TYPE_10__** %5
%181 = call i32 @XtWindow(%struct.TYPE_10__* %180)
%182 = load i32, i32* @ShapeClip
%183 = load i32, i32* @None
%184 = load i32, i32* @ShapeSet
%185 = call i32 @XShapeCombineMask(i32* %179, i32 %181, i32 %182, i32 0, i32 0, i32 %183, i32 %184)
br label %186
186: ; preds = %177, %169
%187 = load i32*, i32** %9
%188 = load i32, i32* %12
%189 = call i32 @XFreePixmap(i32* %187, i32 %188)
%190 = load i32*, i32** %9
%191 = load i32, i32* %14
%192 = call i32 @XFreeGC(i32* %190, i32 %191)
br label %193
193: ; preds = %186, %31
ret void
}

LLVM IR (-O2):
%struct.TYPE_10__ = type { %struct.TYPE_8__ }
%struct.TYPE_8__ = type { i32, i32, i32 }
%struct.TYPE_9__ = type { i32, i64 }
@GCForeground = global i64 0
@GCLineWidth = global i64 0
@ShapeBounding = global i32 0
@ShapeSet = global i32 0
@ShapeClip = global i32 0
@None = global i32 0
define void @ShapeEllipseOrRoundedRectangle(%struct.TYPE_10__* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca %struct.TYPE_9__
%6 = tail call i32* @XtDisplay(%struct.TYPE_10__* %0)
%7 = getelementptr inbounds %struct.TYPE_10__, %struct.TYPE_10__* %0, i64 0, i32 0, i32 0
%8 = load i32, i32* %7
%9 = getelementptr inbounds %struct.TYPE_10__, %struct.TYPE_10__* %0, i64 0, i32 0, i32 1
%10 = load i32, i32* %9
%11 = bitcast %struct.TYPE_9__* %5 to i8*
%12 = icmp ult i32 %8, 3
br i1 %12, label %76, label %13
13: ; preds = %4
%14 = getelementptr inbounds %struct.TYPE_10__, %struct.TYPE_10__* %0, i64 0, i32 0, i32 2
%15 = load i32, i32* %14
%16 = shl i32 %15, 1
%17 = add i32 %16, %8
%18 = add i32 %16, %10
%19 = load i64, i64* @GCForeground
%20 = load i64, i64* @GCLineWidth
%21 = or i64 %20, %19
%22 = tail call i32 @XtWindow(%struct.TYPE_10__* %0)
%23 = tail call i32 @XCreatePixmap(i32* %6, i32 %22, i32 %17, i32 %18, i32 1)
%24 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %5, i64 0, i32 1
store i64 0, i64* %24
%25 = getelementptr inbounds %struct.TYPE_9__, %struct.TYPE_9__* %5, i64 0, i32 0
store i32 2, i32* %25
%26 = call i32 @XCreateGC(i32* %6, i32 %23, i64 %21, %struct.TYPE_9__* %5)
%27 = call i32 @XFillRectangle(i32* %6, i32 %23, i32 %26, i32 0, i32 0, i32 %17, i32 %18)
%28 = call i32 @XSetForeground(i32* %6, i32 %26, i32 1)
%29 = icmp eq i32 %1, 0
%30 = add i32 %17, -2
%31 = add i32 %18, -2
br i1 %29, label %32, label %34
32: ; preds = %13
%33 = call i32 @XmuFillRoundedRectangle(i32* %6, i32 %23, i32 %26, i32 1, i32 1, i32 %30, i32 %31, i32 %2, i32 %3)
br label %39
34: ; preds = %13
%35 = call i32 @XDrawArc(i32* %6, i32 %23, i32 %26, i32 1, i32 1, i32 %30, i32 %31, i32 0, i32 23040)
%36 = add i32 %17, -4
%37 = add i32 %18, -4
%38 = call i32 @XFillArc(i32* %6, i32 %23, i32 %26, i32 2, i32 2, i32 %36, i32 %37, i32 0, i32 23040)
br label %39
39: ; preds = %34, %32
%40 = call i32 @XtWindow(%struct.TYPE_10__* %0)
%41 = load i32, i32* @ShapeBounding
%42 = load i32, i32* %14
%43 = sub nsw i32 0, %42
%44 = load i32, i32* @ShapeSet
%45 = call i32 @XShapeCombineMask(i32* %6, i32 %40, i32 %41, i32 %43, i32 %43, i32 %23, i32 %44)
%46 = load i32, i32* %14
%47 = icmp eq i32 %46, 0
br i1 %47, label %66, label %48
48: ; preds = %39
%49 = call i32 @XSetForeground(i32* %6, i32 %26, i32 0)
%50 = call i32 @XFillRectangle(i32* %6, i32 %23, i32 %26, i32 0, i32 0, i32 %17, i32 %18)
%51 = call i32 @XSetForeground(i32* %6, i32 %26, i32 1)
%52 = load i32, i32* %7
br i1 %29, label %53, label %58
53: ; preds = %48
%54 = add i32 %52, -2
%55 = load i32, i32* %9
%56 = add i32 %55, -2
%57 = call i32 @XmuFillRoundedRectangle(i32* %6, i32 %23, i32 %26, i32 1, i32 1, i32 %54, i32 %56, i32 %2, i32 %3)
br label %61
58: ; preds = %48
%59 = load i32, i32* %9
%60 = call i32 @XFillArc(i32* %6, i32 %23, i32 %26, i32 0, i32 0, i32 %52, i32 %59, i32 0, i32 23040)
br label %61
61: ; preds = %58, %53
%62 = call i32 @XtWindow(%struct.TYPE_10__* %0)
%63 = load i32, i32* @ShapeClip
%64 = load i32, i32* @ShapeSet
%65 = call i32 @XShapeCombineMask(i32* %6, i32 %62, i32 %63, i32 0, i32 0, i32 %23, i32 %64)
br label %73
66: ; preds = %39
%67 = call i32* @XtDisplay(%struct.TYPE_10__* %0)
%68 = call i32 @XtWindow(%struct.TYPE_10__* %0)
%69 = load i32, i32* @ShapeClip
%70 = load i32, i32* @None
%71 = load i32, i32* @ShapeSet
%72 = call i32 @XShapeCombineMask(i32* %67, i32 %68, i32 %69, i32 0, i32 0, i32 %70, i32 %71)
br label %73
73: ; preds = %66, %61
%74 = call i32 @XFreePixmap(i32* %6, i32 %23)
%75 = call i32 @XFreeGC(i32* %6, i32 %26)
br label %76
76: ; preds = %4, %73
ret void
}