#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_9__ TYPE_3__;
typedef struct TYPE_8__ TYPE_2__;
typedef struct TYPE_7__ TYPE_1__;

/* Type definitions */
struct TYPE_7__ {
  int x;
  int y;
  int width;
  int height;
};
typedef TYPE_1__ XRectangle;
struct TYPE_8__ {
  scalar_t__ arc_mode;
};
typedef TYPE_2__ XGCValues;
struct TYPE_9__ {
  int x;
  int y;
  int width;
  int height;
  int angle1;
  int angle2;
};
typedef TYPE_3__ XArc;
typedef int /*<<< orphan*/ GC;
typedef int /*<<< orphan*/ Drawable;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
scalar_t__ ArcPieSlice;
int /*<<< orphan*/ GCArcMode;
int /*<<< orphan*/ XFillArcs(int /*<<< orphan*/ *, int /*<<< orphan*/,
                             int /*<<< orphan*/, TYPE_3__ *, int);
int /*<<< orphan*/ XFillRectangles(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                   int /*<<< orphan*/, TYPE_1__ *, int);
int /*<<< orphan*/ XGetGCValues(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                int /*<<< orphan*/, TYPE_2__ *);
int /*<<< orphan*/ XSetArcMode(int /*<<< orphan*/ *, int /*<<< orphan*/,
                               scalar_t__);
void XmuFillRoundedRectangle(Display *dpy, Drawable draw, GC gc, int x, int y,
                             int w, int h, int ew, int eh) {
  XArc arcs[4];
  XRectangle rects[3];
  XGCValues vals;
  int ew2, eh2;
  XGetGCValues(dpy, gc, GCArcMode, &vals);
  if (vals.arc_mode != ArcPieSlice)
    XSetArcMode(dpy, gc, ArcPieSlice);
  if ((ew2 = (ew << 1)) > w)
    ew2 = ew = 0;
  if ((eh2 = (eh << 1)) > h)
    eh2 = eh = 0;
  arcs[0].x = x;
  arcs[0].y = y;
  arcs[0].width = ew2;
  arcs[0].height = eh2;
  arcs[0].angle1 = 180 * 64;
  arcs[0].angle2 = -90 * 64;
  arcs[1].x = x + w - ew2 - 1;
  arcs[1].y = y;
  arcs[1].width = ew2;
  arcs[1].height = eh2;
  arcs[1].angle1 = 90 * 64;
  arcs[1].angle2 = -90 * 64;
  arcs[2].x = x + w - ew2 - 1;
  arcs[2].y = y + h - eh2 - 1;
  arcs[2].width = ew2;
  arcs[2].height = eh2;
  arcs[2].angle1 = 0;
  arcs[2].angle2 = -90 * 64;
  arcs[3].x = x;
  arcs[3].y = y + h - eh2 - 1;
  arcs[3].width = ew2;
  arcs[3].height = eh2;
  arcs[3].angle1 = 270 * 64;
  arcs[3].angle2 = -90 * 64;
  XFillArcs(dpy, draw, gc, arcs, 4);
  rects[0].x = x + ew;
  rects[0].y = y;
  rects[0].width = w - ew2;
  rects[0].height = h;
  rects[1].x = x;
  rects[1].y = y + eh;
  rects[1].width = ew;
  rects[1].height = h - eh2;
  rects[2].x = x + w - ew;
  rects[2].y = y + eh;
  rects[2].width = ew;
  rects[2].height = h - eh2;
  XFillRectangles(dpy, draw, gc, rects, 3);
  if (vals.arc_mode != ArcPieSlice)
    XSetArcMode(dpy, gc, vals.arc_mode);
}


x86 assembly (clang, -O0):
<XmuFillRoundedRectangle>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    0x2e61(%rip),%rax
mov    (%rax),%edx
lea    -0xb8(%rbp),%rcx
call   1030 <XGetGCValues@plt>
mov    -0xb8(%rbp),%rax
mov    0x2e55(%rip),%rcx
cmp    (%rcx),%rax
je     11b2 <XmuFillRoundedRectangle+0x72>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    0x2e3e(%rip),%rax
mov    (%rax),%rdx
call   1040 <XSetArcMode@plt>
mov    0x18(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xbc(%rbp)
cmp    -0x1c(%rbp),%eax
jle    11d8 <XmuFillRoundedRectangle+0x98>
movl   $0x0,0x18(%rbp)
movl   $0x0,-0xbc(%rbp)
mov    0x20(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc0(%rbp)
cmp    0x10(%rbp),%eax
jle    11fe <XmuFillRoundedRectangle+0xbe>
movl   $0x0,0x20(%rbp)
movl   $0x0,-0xc0(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x80(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x7c(%rbp)
mov    -0xbc(%rbp),%eax
mov    %eax,-0x78(%rbp)
mov    -0xc0(%rbp),%eax
mov    %eax,-0x74(%rbp)
movl   $0x2d00,-0x70(%rbp)
movl   $0xffffe980,-0x6c(%rbp)
mov    -0x14(%rbp),%eax
add    -0x1c(%rbp),%eax
sub    -0xbc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x68(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x64(%rbp)
mov    -0xbc(%rbp),%eax
mov    %eax,-0x60(%rbp)
mov    -0xc0(%rbp),%eax
mov    %eax,-0x5c(%rbp)
movl   $0x1680,-0x58(%rbp)
movl   $0xffffe980,-0x54(%rbp)
mov    -0x14(%rbp),%eax
add    -0x1c(%rbp),%eax
sub    -0xbc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x50(%rbp)
mov    -0x18(%rbp),%eax
add    0x10(%rbp),%eax
sub    -0xc0(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x4c(%rbp)
mov    -0xbc(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0xc0(%rbp),%eax
mov    %eax,-0x44(%rbp)
movl   $0x0,-0x40(%rbp)
movl   $0xffffe980,-0x3c(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x18(%rbp),%eax
add    0x10(%rbp),%eax
sub    -0xc0(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0xbc(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0xc0(%rbp),%eax
mov    %eax,-0x2c(%rbp)
movl   $0x4380,-0x28(%rbp)
movl   $0xffffe980,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    -0x80(%rbp),%rcx
mov    $0x4,%r8d
call   1060 <XFillArcs@plt>
mov    -0x14(%rbp),%eax
add    0x18(%rbp),%eax
mov    %eax,-0xb0(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0xac(%rbp)
mov    -0x1c(%rbp),%eax
sub    -0xbc(%rbp),%eax
mov    %eax,-0xa8(%rbp)
mov    0x10(%rbp),%eax
mov    %eax,-0xa4(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0xa0(%rbp)
mov    -0x18(%rbp),%eax
add    0x20(%rbp),%eax
mov    %eax,-0x9c(%rbp)
mov    0x18(%rbp),%eax
mov    %eax,-0x98(%rbp)
mov    0x10(%rbp),%eax
sub    -0xc0(%rbp),%eax
mov    %eax,-0x94(%rbp)
mov    -0x14(%rbp),%eax
add    -0x1c(%rbp),%eax
sub    0x18(%rbp),%eax
mov    %eax,-0x90(%rbp)
mov    -0x18(%rbp),%eax
add    0x20(%rbp),%eax
mov    %eax,-0x8c(%rbp)
mov    0x18(%rbp),%eax
mov    %eax,-0x88(%rbp)
mov    0x10(%rbp),%eax
sub    -0xc0(%rbp),%eax
mov    %eax,-0x84(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    -0xb0(%rbp),%rcx
mov    $0x3,%r8d
call   1050 <XFillRectangles@plt>
mov    -0xb8(%rbp),%rax
mov    0x2c3a(%rip),%rcx
cmp    (%rcx),%rax
je     13ca <XmuFillRoundedRectangle+0x28a>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    -0xb8(%rbp),%rdx
call   1040 <XSetArcMode@plt>
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<XmuFillRoundedRectangle>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xd8,%rsp
mov    %r9d,%r13d
mov    %r8,0x68(%rsp)
mov    %rcx,0x60(%rsp)
mov    %edx,%ebp
mov    %esi,0x4(%rsp)
mov    0x120(%rsp),%r14d
mov    0x118(%rsp),%r12d
mov    0x110(%rsp),%r15d
mov    0x2e55(%rip),%rax
mov    (%rax),%edx
lea    0x18(%rsp),%rcx
mov    %rdi,0x8(%rsp)
mov    %ebp,(%rsp)
mov    %ebp,%esi
call   1030 <XGetGCValues@plt>
mov    0x2e48(%rip),%rax
mov    (%rax),%rdx
cmp    %rdx,0x18(%rsp)
je     11b7 <XmuFillRoundedRectangle+0x77>
mov    0x8(%rsp),%rdi
mov    (%rsp),%esi
call   1040 <XSetArcMode@plt>
lea    (%r12,%r12,1),%ebx
xor    %eax,%eax
cmp    %r13d,%ebx
cmovg  %eax,%r12d
cmovg  %eax,%ebx
mov    %r13,%rcx
mov    %r13,0x50(%rsp)
lea    (%r14,%r14,1),%r13d
cmp    %r15d,%r13d
cmovg  %eax,%r14d
mov    %r14,0x58(%rsp)
cmovg  %eax,%r13d
mov    0x60(%rsp),%r14
mov    %r14d,0x70(%rsp)
mov    0x68(%rsp),%rbp
mov    %ebp,0x74(%rsp)
mov    %ebx,0x78(%rsp)
mov    %r13d,0x7c(%rsp)
movabs $0xffffe98000002d00,%rax
e9 ff ff
mov    %rax,0x80(%rsp)
lea    (%rcx,%r14,1),%edx
mov    %edx,0x14(%rsp)
mov    %ebx,%eax
not    %eax
add    %edx,%eax
mov    %eax,0x88(%rsp)
mov    %ebp,0x8c(%rsp)
mov    %ebx,0x90(%rsp)
mov    %r13d,0x94(%rsp)
movabs $0xffffe98000001680,%rcx
e9 ff ff
mov    %rcx,0x98(%rsp)
mov    %eax,0xa0(%rsp)
mov    %r13d,%ecx
not    %ecx
add    %r15d,%ecx
add    %ebp,%ecx
mov    %ecx,0xa4(%rsp)
mov    %ebx,0xa8(%rsp)
mov    %r13d,0xac(%rsp)
movabs $0xffffe98000000000,%rax
e9 ff ff
mov    %rax,0xb0(%rsp)
mov    %r14d,0xb8(%rsp)
mov    %ecx,0xbc(%rsp)
mov    %ebx,0xc0(%rsp)
mov    %r13d,0xc4(%rsp)
movabs $0xffffe98000004380,%rax
e9 ff ff
mov    %rax,0xc8(%rsp)
lea    0x70(%rsp),%rcx
mov    0x8(%rsp),%rdi
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
mov    $0x4,%r8d
call   1060 <XFillArcs@plt>
lea    (%r12,%r14,1),%eax
mov    %eax,0x20(%rsp)
mov    %ebp,0x24(%rsp)
mov    0x50(%rsp),%rax
sub    %ebx,%eax
mov    %eax,0x28(%rsp)
mov    %r15d,0x2c(%rsp)
mov    %r14d,0x30(%rsp)
mov    0x58(%rsp),%rax
add    %ebp,%eax
mov    %eax,0x34(%rsp)
mov    %r12d,0x38(%rsp)
sub    %r13d,%r15d
mov    %r15d,0x3c(%rsp)
mov    0x14(%rsp),%ecx
sub    %r12d,%ecx
mov    %ecx,0x40(%rsp)
mov    %eax,0x44(%rsp)
mov    %r12d,0x48(%rsp)
mov    %r15d,0x4c(%rsp)
lea    0x20(%rsp),%rcx
mov    0x8(%rsp),%rdi
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
mov    $0x3,%r8d
call   1050 <XFillRectangles@plt>
mov    0x18(%rsp),%rdx
mov    0x2c9b(%rip),%rax
cmp    (%rax),%rdx
je     135f <XmuFillRoundedRectangle+0x21f>
mov    0x8(%rsp),%rdi
mov    (%rsp),%esi
call   1040 <XSetArcMode@plt>
add    $0xd8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
%struct.TYPE_9__ = type { i32, i32, i32, i32, i32, i32 }
%struct.TYPE_7__ = type { i32, i32, i32, i32 }
%struct.TYPE_8__ = type { i64 }
@GCArcMode = global i32 0
@ArcPieSlice = global i64 0
define void @XmuFillRoundedRectangle(i32* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8) {
%10 = alloca [4 x %struct.TYPE_9__]
%11 = alloca [3 x %struct.TYPE_7__]
%12 = alloca %struct.TYPE_8__
%13 = bitcast [4 x %struct.TYPE_9__]* %10 to i8*
%14 = bitcast [3 x %struct.TYPE_7__]* %11 to i8*
%15 = bitcast %struct.TYPE_8__* %12 to i8*
%16 = load i32, i32* @GCArcMode
%17 = call i32 @XGetGCValues(i32* %0, i32 %2, i32 %16, %struct.TYPE_8__* %12)
%18 = getelementptr inbounds %struct.TYPE_8__, %struct.TYPE_8__* %12, i64 0, i32 0
%19 = load i64, i64* %18
%20 = load i64, i64* @ArcPieSlice
%21 = icmp eq i64 %19, %20
br i1 %21, label %24, label %22
22: ; preds = %9
%23 = call i32 @XSetArcMode(i32* %0, i32 %2, i64 %20)
br label %24
24: ; preds = %22, %9
%25 = shl i32 %7, 1
%26 = icmp sgt i32 %25, %5
%27 = select i1 %26, i32 0, i32 %7
%28 = select i1 %26, i32 0, i32 %25
%29 = shl i32 %8, 1
%30 = icmp sgt i32 %29, %6
%31 = select i1 %30, i32 0, i32 %8
%32 = select i1 %30, i32 0, i32 %29
%33 = getelementptr inbounds [4 x %struct.TYPE_9__], [4 x %struct.TYPE_9__]* %10, i64 0, i64 0
%34 = getelementptr inbounds [4 x %struct.TYPE_9__], [4 x %struct.TYPE_9__]* %10, i64 0, i64 0, i32 0
store i32 %3, i32* %34
%35 = getelementptr inbounds [4 x %struct.TYPE_9__], [4 x %struct.TYPE_9__]* %10, i64 0, i64 0, i32 1
store i32 %4, i32* %35
%36 = getelementptr inbounds [4 x %struct.TYPE_9__], [4 x %struct.TYPE_9__]* %10, i64 0, i64 0, i32 2
store i32 %28, i32* %36
%37 = getelementptr inbounds [4 x %struct.TYPE_9__], [4 x %struct.TYPE_9__]* %10, i64 0, i64 0, i32 3
store i32 %32, i32* %37
%38 = getelementptr inbounds [4 x %struct.TYPE_9__], [4 x %struct.TYPE_9__]* %10, i64 0, i64 0, i32 4
store i32 11520, i32* %38
%39 = getelementptr inbounds [4 x %struct.TYPE_9__], [4 x %struct.TYPE_9__]* %10, i64 0, i64 0, i32 5
store i32 -5760, i32* %39
%40 = add nsw i32 %5, %3
%41 = xor i32 %28, -1
%42 = add i32 %40, %41
%43 = getelementptr inbounds [4 x %struct.TYPE_9__], [4 x %struct.TYPE_9__]* %10, i64 0, i64 1, i32 0
store i32 %42, i32* %43
%44 = getelementptr inbounds [4 x %struct.TYPE_9__], [4 x %struct.TYPE_9__]* %10, i64 0, i64 1, i32 1
store i32 %4, i32* %44
%45 = getelementptr inbounds [4 x %struct.TYPE_9__], [4 x %struct.TYPE_9__]* %10, i64 0, i64 1, i32 2
store i32 %28, i32* %45
%46 = getelementptr inbounds [4 x %struct.TYPE_9__], [4 x %struct.TYPE_9__]* %10, i64 0, i64 1, i32 3
store i32 %32, i32* %46
%47 = getelementptr inbounds [4 x %struct.TYPE_9__], [4 x %struct.TYPE_9__]* %10, i64 0, i64 1, i32 4
store i32 5760, i32* %47
%48 = getelementptr inbounds [4 x %struct.TYPE_9__], [4 x %struct.TYPE_9__]* %10, i64 0, i64 1, i32 5
store i32 -5760, i32* %48
%49 = getelementptr inbounds [4 x %struct.TYPE_9__], [4 x %struct.TYPE_9__]* %10, i64 0, i64 2, i32 0
store i32 %42, i32* %49
%50 = add nsw i32 %6, %4
%51 = xor i32 %32, -1
%52 = add i32 %50, %51
%53 = getelementptr inbounds [4 x %struct.TYPE_9__], [4 x %struct.TYPE_9__]* %10, i64 0, i64 2, i32 1
store i32 %52, i32* %53
%54 = getelementptr inbounds [4 x %struct.TYPE_9__], [4 x %struct.TYPE_9__]* %10, i64 0, i64 2, i32 2
store i32 %28, i32* %54
%55 = getelementptr inbounds [4 x %struct.TYPE_9__], [4 x %struct.TYPE_9__]* %10, i64 0, i64 2, i32 3
store i32 %32, i32* %55
%56 = getelementptr inbounds [4 x %struct.TYPE_9__], [4 x %struct.TYPE_9__]* %10, i64 0, i64 2, i32 4
store i32 0, i32* %56
%57 = getelementptr inbounds [4 x %struct.TYPE_9__], [4 x %struct.TYPE_9__]* %10, i64 0, i64 2, i32 5
store i32 -5760, i32* %57
%58 = getelementptr inbounds [4 x %struct.TYPE_9__], [4 x %struct.TYPE_9__]* %10, i64 0, i64 3, i32 0
store i32 %3, i32* %58
%59 = getelementptr inbounds [4 x %struct.TYPE_9__], [4 x %struct.TYPE_9__]* %10, i64 0, i64 3, i32 1
store i32 %52, i32* %59
%60 = getelementptr inbounds [4 x %struct.TYPE_9__], [4 x %struct.TYPE_9__]* %10, i64 0, i64 3, i32 2
store i32 %28, i32* %60
%61 = getelementptr inbounds [4 x %struct.TYPE_9__], [4 x %struct.TYPE_9__]* %10, i64 0, i64 3, i32 3
store i32 %32, i32* %61
%62 = getelementptr inbounds [4 x %struct.TYPE_9__], [4 x %struct.TYPE_9__]* %10, i64 0, i64 3, i32 4
store i32 17280, i32* %62
%63 = getelementptr inbounds [4 x %struct.TYPE_9__], [4 x %struct.TYPE_9__]* %10, i64 0, i64 3, i32 5
store i32 -5760, i32* %63
%64 = call i32 @XFillArcs(i32* %0, i32 %1, i32 %2, %struct.TYPE_9__* %33, i32 4)
%65 = add nsw i32 %27, %3
%66 = getelementptr inbounds [3 x %struct.TYPE_7__], [3 x %struct.TYPE_7__]* %11, i64 0, i64 0
%67 = getelementptr inbounds [3 x %struct.TYPE_7__], [3 x %struct.TYPE_7__]* %11, i64 0, i64 0, i32 0
store i32 %65, i32* %67
%68 = getelementptr inbounds [3 x %struct.TYPE_7__], [3 x %struct.TYPE_7__]* %11, i64 0, i64 0, i32 1
store i32 %4, i32* %68
%69 = sub nsw i32 %5, %28
%70 = getelementptr inbounds [3 x %struct.TYPE_7__], [3 x %struct.TYPE_7__]* %11, i64 0, i64 0, i32 2
store i32 %69, i32* %70
%71 = getelementptr inbounds [3 x %struct.TYPE_7__], [3 x %struct.TYPE_7__]* %11, i64 0, i64 0, i32 3
store i32 %6, i32* %71
%72 = getelementptr inbounds [3 x %struct.TYPE_7__], [3 x %struct.TYPE_7__]* %11, i64 0, i64 1, i32 0
store i32 %3, i32* %72
%73 = add nsw i32 %31, %4
%74 = getelementptr inbounds [3 x %struct.TYPE_7__], [3 x %struct.TYPE_7__]* %11, i64 0, i64 1, i32 1
store i32 %73, i32* %74
%75 = getelementptr inbounds [3 x %struct.TYPE_7__], [3 x %struct.TYPE_7__]* %11, i64 0, i64 1, i32 2
store i32 %27, i32* %75
%76 = sub nsw i32 %6, %32
%77 = getelementptr inbounds [3 x %struct.TYPE_7__], [3 x %struct.TYPE_7__]* %11, i64 0, i64 1, i32 3
store i32 %76, i32* %77
%78 = sub nsw i32 %40, %27
%79 = getelementptr inbounds [3 x %struct.TYPE_7__], [3 x %struct.TYPE_7__]* %11, i64 0, i64 2, i32 0
store i32 %78, i32* %79
%80 = getelementptr inbounds [3 x %struct.TYPE_7__], [3 x %struct.TYPE_7__]* %11, i64 0, i64 2, i32 1
store i32 %73, i32* %80
%81 = getelementptr inbounds [3 x %struct.TYPE_7__], [3 x %struct.TYPE_7__]* %11, i64 0, i64 2, i32 2
store i32 %27, i32* %81
%82 = getelementptr inbounds [3 x %struct.TYPE_7__], [3 x %struct.TYPE_7__]* %11, i64 0, i64 2, i32 3
store i32 %76, i32* %82
%83 = call i32 @XFillRectangles(i32* %0, i32 %1, i32 %2, %struct.TYPE_7__* %66, i32 3)
%84 = load i64, i64* %18
%85 = load i64, i64* @ArcPieSlice
%86 = icmp eq i64 %84, %85
br i1 %86, label %89, label %87
87: ; preds = %24
%88 = call i32 @XSetArcMode(i32* %0, i32 %2, i64 %84)
br label %89
89: ; preds = %87, %24
ret void
}