#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 */

/* Type definitions */
typedef int /*<<< orphan*/ Window;
typedef int /*<<< orphan*/ GC;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
int /*<<< orphan*/ XDrawArc(int /*<<< orphan*/ *, int /*<<< orphan*/,
                            int /*<<< orphan*/, int, int, int, int, int, int);
int abs(int);
float acos(float);
float asin(float);
double atan(double);
float sqrt(float);
void XfDrawCircle(Display *display, Window window, GC gc, int xcen, int ycen,
                  int radius, int npix, int nrast) {
  int i;
  int phi1 = 0, phi2 = 23040;
  int d[4];
  float dx, dy, ddx, ddy, r, diag, dmin;
  static float rtod;
  if (rtod == 0.0)
    rtod = 45.0 / atan(1.0);
  d[0] = npix - xcen;
  d[1] = ycen;
  d[2] = xcen;
  d[3] = nrast - ycen;
  r = (float)radius;
  for (i = 0; i < 4; i++) {
    if (d[((i + 2) % 4)] < 0 && radius < d[i]) {
      if (radius < abs(d[((i + 2) % 4)]))
        return;
      ddx = (float)d[((i + 2) % 4)];
      dy = sqrt(r * r - ddx * ddx);
    } else {
      ddx = 0.0;
      dy = (float)d[((i + 1) % 4)];
    }
    if (d[((i + 3) % 4)] < 0 && radius < d[((i + 1) % 4)]) {
      if (radius < abs(d[((i + 3) % 4)]))
        return;
      ddy = (float)d[((i + 3) % 4)];
      dx = sqrt(r * r - ddy * ddy);
    } else {
      ddy = 0.0;
      dx = (float)d[i];
    }
    diag = sqrt(dx * dx + dy * dy);
    dmin = sqrt(ddx * ddx + ddy * ddy);
    if ((diag > r) && (r > dmin) && (dx > 0.0) && (dy > 0.0)) {
      if (r > dx)
        phi1 = 64 * (90 * i + (int)(acos(dx / r) * rtod)) + 32;
      if (r > dy)
        phi2 = 64 * (90 * i + (int)(asin(dy / r) * rtod)) - 32;
      if (((phi2 % 5760) != 0) || (i == 3)) {
        XDrawArc(display, window, gc, (xcen - radius), (ycen - radius),
                 (2 * radius), (2 * radius), phi1, phi2);
        phi2 = 23040;
      }
    } else
      phi1 = 5760 * i;
  }
  return;
}


x86 assembly (clang, -O0):
<XfDrawCircle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
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)
movl   $0x0,-0x24(%rbp)
movl   $0x5a00,-0x28(%rbp)
movss  0x2eb8(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    11db <XfDrawCircle+0x7b>
jp     11db <XfDrawCircle+0x7b>
movsd  0xe4d(%rip),%xmm0
call   1060 <atan@plt>
movaps %xmm0,%xmm1
movsd  0xe35(%rip),%xmm0
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x2e79(%rip)
mov    0x10(%rbp),%eax
sub    -0x14(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    0x18(%rbp),%eax
sub    -0x18(%rbp),%eax
mov    %eax,-0x34(%rbp)
cvtsi2ssl -0x1c(%rbp),%xmm0
movss  %xmm0,-0x54(%rbp)
movl   $0x0,-0x20(%rbp)
cmpl   $0x4,-0x20(%rbp)
jge    1564 <XfDrawCircle+0x404>
mov    -0x20(%rbp),%eax
add    $0x2,%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
movslq %edx,%rax
cmpl   $0x0,-0x40(%rbp,%rax,4)
jge    12c7 <XfDrawCircle+0x167>
mov    -0x1c(%rbp),%eax
movslq -0x20(%rbp),%rcx
cmp    -0x40(%rbp,%rcx,4),%eax
jge    12c7 <XfDrawCircle+0x167>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x60(%rbp)
mov    -0x20(%rbp),%eax
add    $0x2,%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
movslq %edx,%rax
mov    -0x40(%rbp,%rax,4),%edi
call   1030 <abs@plt>
mov    %eax,%ecx
mov    -0x60(%rbp),%eax
cmp    %ecx,%eax
jge    1273 <XfDrawCircle+0x113>
jmp    1569 <XfDrawCircle+0x409>
mov    -0x20(%rbp),%eax
add    $0x2,%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
movslq %edx,%rax
cvtsi2ssl -0x40(%rbp,%rax,4),%xmm0
movss  %xmm0,-0x4c(%rbp)
movss  -0x54(%rbp),%xmm0
movss  -0x54(%rbp),%xmm2
movss  -0x4c(%rbp),%xmm1
mulss  -0x4c(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1080 <sqrt@plt>
movss  %xmm0,-0x48(%rbp)
jmp    12eb <XfDrawCircle+0x18b>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4c(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
movslq %edx,%rax
cvtsi2ssl -0x40(%rbp,%rax,4),%xmm0
movss  %xmm0,-0x48(%rbp)
mov    -0x20(%rbp),%eax
add    $0x3,%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
movslq %edx,%rax
cmpl   $0x0,-0x40(%rbp,%rax,4)
jge    13b1 <XfDrawCircle+0x251>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x64(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    -0x64(%rbp),%eax
movslq %edx,%rcx
cmp    -0x40(%rbp,%rcx,4),%eax
jge    13b1 <XfDrawCircle+0x251>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x68(%rbp)
mov    -0x20(%rbp),%eax
add    $0x3,%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
movslq %edx,%rax
mov    -0x40(%rbp,%rax,4),%edi
call   1030 <abs@plt>
mov    %eax,%ecx
mov    -0x68(%rbp),%eax
cmp    %ecx,%eax
jge    135d <XfDrawCircle+0x1fd>
jmp    1569 <XfDrawCircle+0x409>
mov    -0x20(%rbp),%eax
add    $0x3,%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
movslq %edx,%rax
cvtsi2ssl -0x40(%rbp,%rax,4),%xmm0
movss  %xmm0,-0x50(%rbp)
movss  -0x54(%rbp),%xmm0
movss  -0x54(%rbp),%xmm2
movss  -0x50(%rbp),%xmm1
mulss  -0x50(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1080 <sqrt@plt>
movss  %xmm0,-0x44(%rbp)
jmp    13c8 <XfDrawCircle+0x268>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x50(%rbp)
movslq -0x20(%rbp),%rax
cvtsi2ssl -0x40(%rbp,%rax,4),%xmm0
movss  %xmm0,-0x44(%rbp)
movss  -0x44(%rbp),%xmm0
movss  -0x44(%rbp),%xmm2
movss  -0x48(%rbp),%xmm1
mulss  -0x48(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1080 <sqrt@plt>
movss  %xmm0,-0x58(%rbp)
movss  -0x4c(%rbp),%xmm0
movss  -0x4c(%rbp),%xmm2
movss  -0x50(%rbp),%xmm1
mulss  -0x50(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1080 <sqrt@plt>
movss  %xmm0,-0x5c(%rbp)
movss  -0x58(%rbp),%xmm0
ucomiss -0x54(%rbp),%xmm0
jbe    1547 <XfDrawCircle+0x3e7>
movss  -0x54(%rbp),%xmm0
ucomiss -0x5c(%rbp),%xmm0
jbe    1547 <XfDrawCircle+0x3e7>
movss  -0x44(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1547 <XfDrawCircle+0x3e7>
movss  -0x48(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1547 <XfDrawCircle+0x3e7>
movss  -0x54(%rbp),%xmm0
ucomiss -0x44(%rbp),%xmm0
jbe    149d <XfDrawCircle+0x33d>
imul   $0x5a,-0x20(%rbp),%eax
mov    %eax,-0x6c(%rbp)
movss  -0x44(%rbp),%xmm0
divss  -0x54(%rbp),%xmm0
call   1050 <acos@plt>
mov    -0x6c(%rbp),%eax
mulss  0x2bc6(%rip),%xmm0
cvttss2si %xmm0,%ecx
add    %ecx,%eax
shl    $0x6,%eax
add    $0x20,%eax
mov    %eax,-0x24(%rbp)
movss  -0x54(%rbp),%xmm0
ucomiss -0x48(%rbp),%xmm0
jbe    14dc <XfDrawCircle+0x37c>
imul   $0x5a,-0x20(%rbp),%eax
mov    %eax,-0x70(%rbp)
movss  -0x48(%rbp),%xmm0
divss  -0x54(%rbp),%xmm0
call   1070 <asin@plt>
mov    -0x70(%rbp),%eax
mulss  0x2b87(%rip),%xmm0
cvttss2si %xmm0,%ecx
add    %ecx,%eax
shl    $0x6,%eax
sub    $0x20,%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    $0x1680,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    14fa <XfDrawCircle+0x39a>
cmpl   $0x3,-0x20(%rbp)
jne    1542 <XfDrawCircle+0x3e2>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
sub    -0x1c(%rbp),%ecx
mov    -0x18(%rbp),%r8d
sub    -0x1c(%rbp),%r8d
mov    -0x1c(%rbp),%r9d
shl    $0x1,%r9d
mov    -0x1c(%rbp),%r11d
shl    $0x1,%r11d
mov    -0x24(%rbp),%r10d
mov    -0x28(%rbp),%eax
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1040 <XDrawArc@plt>
movl   $0x5a00,-0x28(%rbp)
jmp    1551 <XfDrawCircle+0x3f1>
imul   $0x1680,-0x20(%rbp),%eax
mov    %eax,-0x24(%rbp)
jmp    1556 <XfDrawCircle+0x3f6>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    120a <XfDrawCircle+0xaa>
jmp    1569 <XfDrawCircle+0x409>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<XfDrawCircle>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %r9d,%ebx
mov    %r8d,%r15d
mov    %ecx,%r12d
mov    %edx,0x3c(%rsp)
mov    %esi,0x38(%rsp)
mov    %rdi,0x50(%rsp)
mov    0x98(%rsp),%r14d
mov    0x90(%rsp),%ebp
movss  0x2ec1(%rip),%xmm0
xorps  %xmm2,%xmm2
ucomiss %xmm2,%xmm0
jne    11af <XfDrawCircle+0x5f>
jp     11af <XfDrawCircle+0x5f>
movsd  0xe63(%rip),%xmm0
call   1050 <atan@plt>
xorps  %xmm2,%xmm2
movl   $0x42652ee1,0x2e9d(%rip)
2e 65 42
sub    %r12d,%ebp
mov    %ebp,0x20(%rsp)
mov    %r15d,0x24(%rsp)
mov    %r12d,0x28(%rsp)
sub    %r15d,%r14d
mov    %r14d,0x2c(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ss %ebx,%xmm0
movss  %xmm0,0x14(%rsp)
sub    %ebx,%r12d
mov    %r12d,0x40(%rsp)
sub    %ebx,%r15d
mov    %r15d,0x44(%rsp)
lea    (%rbx,%rbx,1),%eax
mov    %rax,0x48(%rsp)
mov    $0x5a00,%ebp
mov    $0x3,%r12d
xor    %r13d,%r13d
mulss  %xmm0,%xmm0
movss  %xmm0,0x18(%rsp)
xor    %r14d,%r14d
xor    %r15d,%r15d
jmp    122c <XfDrawCircle+0xdc>
nopl   (%rax)
mov    %r13d,%r15d
add    $0x1,%r12
add    $0x5a,%r14d
add    $0x1680,%r13d
cmp    $0x7,%r12
je     14cb <XfDrawCircle+0x37b>
lea    -0x1(%r12),%eax
and    $0x3,%eax
mov    0x20(%rsp,%rax,4),%eax
test   %eax,%eax
jns    1280 <XfDrawCircle+0x130>
cmp    %ebx,0x14(%rsp,%r12,4)
jle    1280 <XfDrawCircle+0x130>
mov    %eax,%ecx
neg    %ecx
cmp    %ebx,%ecx
jg     14cb <XfDrawCircle+0x37b>
xorps  %xmm3,%xmm3
cvtsi2ss %eax,%xmm3
movaps %xmm3,%xmm1
mulss  %xmm3,%xmm1
movss  0x18(%rsp),%xmm0
subss  %xmm1,%xmm0
ucomiss %xmm2,%xmm0
jb     1484 <XfDrawCircle+0x334>
sqrtss %xmm0,%xmm0
jmp    1294 <XfDrawCircle+0x144>
cs nopw 0x0(%rax,%rax,1)
lea    -0x2(%r12),%eax
and    $0x3,%eax
xorps  %xmm0,%xmm0
cvtsi2ssl 0x20(%rsp,%rax,4),%xmm0
xorps  %xmm3,%xmm3
mov    %r12d,%eax
and    $0x3,%eax
mov    0x20(%rsp,%rax,4),%eax
test   %eax,%eax
movss  %xmm0,0xc(%rsp)
jns    1300 <XfDrawCircle+0x1b0>
lea    -0x2(%r12),%ecx
and    $0x3,%ecx
cmp    %ebx,0x20(%rsp,%rcx,4)
jle    1300 <XfDrawCircle+0x1b0>
mov    %eax,%ecx
neg    %ecx
cmp    %ebx,%ecx
jg     14cb <XfDrawCircle+0x37b>
xorps  %xmm5,%xmm5
cvtsi2ss %eax,%xmm5
movaps %xmm5,%xmm1
mulss  %xmm5,%xmm1
movss  0x18(%rsp),%xmm0
subss  %xmm1,%xmm0
ucomiss %xmm2,%xmm0
jb     149d <XfDrawCircle+0x34d>
xorps  %xmm4,%xmm4
sqrtss %xmm0,%xmm4
movss  0xc(%rsp),%xmm0
jmp    130d <XfDrawCircle+0x1bd>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xorps  %xmm4,%xmm4
cvtsi2ssl 0x14(%rsp,%r12,4),%xmm4
xorps  %xmm5,%xmm5
movaps %xmm0,%xmm1
mulss  %xmm0,%xmm1
movaps %xmm4,%xmm0
mulss  %xmm4,%xmm0
addss  %xmm1,%xmm0
ucomiss %xmm2,%xmm0
movss  %xmm4,0x1c(%rsp)
jb     1340 <XfDrawCircle+0x1f0>
xorps  %xmm4,%xmm4
sqrtss %xmm0,%xmm4
jmp    1363 <XfDrawCircle+0x213>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movss  %xmm3,0x8(%rsp)
movss  %xmm5,0x10(%rsp)
call   1070 <sqrt@plt>
movss  0x10(%rsp),%xmm5
movss  0x8(%rsp),%xmm3
xorps  %xmm2,%xmm2
movaps %xmm0,%xmm4
mulss  %xmm5,%xmm5
mulss  %xmm3,%xmm3
addss  %xmm5,%xmm3
ucomiss %xmm2,%xmm3
jb     1380 <XfDrawCircle+0x230>
xorps  %xmm0,%xmm0
sqrtss %xmm3,%xmm0
jmp    1397 <XfDrawCircle+0x247>
nopl   (%rax)
movaps %xmm3,%xmm0
movss  %xmm4,0x8(%rsp)
call   1070 <sqrt@plt>
movss  0x8(%rsp),%xmm4
xorps  %xmm2,%xmm2
movss  0x14(%rsp),%xmm1
movss  0x1c(%rsp),%xmm3
ucomiss %xmm1,%xmm4
jbe    1210 <XfDrawCircle+0xc0>
ucomiss %xmm0,%xmm1
jbe    1210 <XfDrawCircle+0xc0>
ucomiss %xmm2,%xmm3
jbe    1210 <XfDrawCircle+0xc0>
movss  0xc(%rsp),%xmm0
ucomiss %xmm2,%xmm0
jbe    1210 <XfDrawCircle+0xc0>
ucomiss %xmm3,%xmm1
jbe    1405 <XfDrawCircle+0x2b5>
divss  %xmm1,%xmm3
movaps %xmm3,%xmm0
call   1040 <acos@plt>
movss  0x14(%rsp),%xmm1
xorps  %xmm2,%xmm2
mulss  0x2c5d(%rip),%xmm0
cvttss2si %xmm0,%r15d
movss  0xc(%rsp),%xmm0
add    %r14d,%r15d
shl    $0x6,%r15d
or     $0x20,%r15d
ucomiss %xmm0,%xmm1
jbe    142b <XfDrawCircle+0x2db>
divss  %xmm1,%xmm0
call   1060 <asin@plt>
xorps  %xmm2,%xmm2
mulss  0x2c2e(%rip),%xmm0
cvttss2si %xmm0,%ebp
add    %r14d,%ebp
shl    $0x6,%ebp
add    $0xffffffe0,%ebp
imul   $0xa4fa4fa5,%ebp,%eax
add    $0x2d82d80,%eax
ror    $0x7,%eax
cmp    $0xb60b6,%eax
ja     144a <XfDrawCircle+0x2fa>
cmp    $0x6,%r12
jne    1213 <XfDrawCircle+0xc3>
sub    $0x8,%rsp
mov    0x58(%rsp),%rdi
mov    0x40(%rsp),%esi
mov    0x44(%rsp),%edx
mov    0x48(%rsp),%ecx
mov    0x4c(%rsp),%r8d
mov    0x50(%rsp),%r9
push   %rbp
push   %r15
push   %r9
call   1030 <XDrawArc@plt>
xorps  %xmm2,%xmm2
add    $0x20,%rsp
mov    $0x5a00,%ebp
jmp    1213 <XfDrawCircle+0xc3>
movss  %xmm3,0x8(%rsp)
call   1070 <sqrt@plt>
movss  0x8(%rsp),%xmm3
xorps  %xmm2,%xmm2
jmp    1294 <XfDrawCircle+0x144>
movss  %xmm3,0x8(%rsp)
movss  %xmm5,0x10(%rsp)
call   1070 <sqrt@plt>
movss  0x10(%rsp),%xmm5
movss  0x8(%rsp),%xmm3
xorps  %xmm2,%xmm2
movaps %xmm0,%xmm4
movss  0xc(%rsp),%xmm0
jmp    130d <XfDrawCircle+0x1bd>
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@XfDrawCircle.rtod = internal global float 0.000000e+00
define void @XfDrawCircle(i32* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca [4 x i32]
%21 = alloca float
%22 = alloca float
%23 = alloca float
%24 = alloca float
%25 = alloca float
%26 = alloca float
%27 = alloca float
store i32* %0, i32** %9
store i32 %1, i32* %10
store i32 %2, i32* %11
store i32 %3, i32* %12
store i32 %4, i32* %13
store i32 %5, i32* %14
store i32 %6, i32* %15
store i32 %7, i32* %16
store i32 0, i32* %18
store i32 23040, i32* %19
%28 = load float, float* @XfDrawCircle.rtod
%29 = fpext float %28 to double
%30 = fcmp oeq double %29, 0.000000e+00
br i1 %30, label %31, label %35
31: ; preds = %8
%32 = call double @atan(double 1.000000e+00)
%33 = fdiv double 4.500000e+01, %32
%34 = fptrunc double %33 to float
store float %34, float* @XfDrawCircle.rtod
br label %35
35: ; preds = %31, %8
%36 = load i32, i32* %15
%37 = load i32, i32* %12
%38 = sub nsw i32 %36, %37
%39 = getelementptr inbounds [4 x i32], [4 x i32]* %20, i64 0, i64 0
store i32 %38, i32* %39
%40 = load i32, i32* %13
%41 = getelementptr inbounds [4 x i32], [4 x i32]* %20, i64 0, i64 1
store i32 %40, i32* %41
%42 = load i32, i32* %12
%43 = getelementptr inbounds [4 x i32], [4 x i32]* %20, i64 0, i64 2
store i32 %42, i32* %43
%44 = load i32, i32* %16
%45 = load i32, i32* %13
%46 = sub nsw i32 %44, %45
%47 = getelementptr inbounds [4 x i32], [4 x i32]* %20, i64 0, i64 3
store i32 %46, i32* %47
%48 = load i32, i32* %14
%49 = sitofp i32 %48 to float
store float %49, float* %25
store i32 0, i32* %17
br label %50
50: ; preds = %246, %35
%51 = load i32, i32* %17
%52 = icmp slt i32 %51, 4
br i1 %52, label %53, label %249
53: ; preds = %50
%54 = load i32, i32* %17
%55 = add nsw i32 %54, 2
%56 = srem i32 %55, 4
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds [4 x i32], [4 x i32]* %20, i64 0, i64 %57
%59 = load i32, i32* %58
%60 = icmp slt i32 %59, 0
br i1 %60, label %61, label %95
61: ; preds = %53
%62 = load i32, i32* %14
%63 = load i32, i32* %17
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds [4 x i32], [4 x i32]* %20, i64 0, i64 %64
%66 = load i32, i32* %65
%67 = icmp slt i32 %62, %66
br i1 %67, label %68, label %95
68: ; preds = %61
%69 = load i32, i32* %14
%70 = load i32, i32* %17
%71 = add nsw i32 %70, 2
%72 = srem i32 %71, 4
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds [4 x i32], [4 x i32]* %20, i64 0, i64 %73
%75 = load i32, i32* %74
%76 = call i32 @abs(i32 %75)
%77 = icmp slt i32 %69, %76
br i1 %77, label %78, label %79
78: ; preds = %68
br label %250
79: ; preds = %68
%80 = load i32, i32* %17
%81 = add nsw i32 %80, 2
%82 = srem i32 %81, 4
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds [4 x i32], [4 x i32]* %20, i64 0, i64 %83
%85 = load i32, i32* %84
%86 = sitofp i32 %85 to float
store float %86, float* %23
%87 = load float, float* %25
%88 = load float, float* %25
%89 = load float, float* %23
%90 = load float, float* %23
%91 = fmul float %89, %90
%92 = fneg float %91
%93 = call float @llvm.fmuladd.f32(float %87, float %88, float %92)
%94 = call float @sqrt(float %93)
store float %94, float* %22
br label %103
95: ; preds = %61, %53
store float 0.000000e+00, float* %23
%96 = load i32, i32* %17
%97 = add nsw i32 %96, 1
%98 = srem i32 %97, 4
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds [4 x i32], [4 x i32]* %20, i64 0, i64 %99
%101 = load i32, i32* %100
%102 = sitofp i32 %101 to float
store float %102, float* %22
br label %103
103: ; preds = %95, %79
%104 = load i32, i32* %17
%105 = add nsw i32 %104, 3
%106 = srem i32 %105, 4
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds [4 x i32], [4 x i32]* %20, i64 0, i64 %107
%109 = load i32, i32* %108
%110 = icmp slt i32 %109, 0
br i1 %110, label %111, label %147
111: ; preds = %103
%112 = load i32, i32* %14
%113 = load i32, i32* %17
%114 = add nsw i32 %113, 1
%115 = srem i32 %114, 4
%116 = sext i32 %115 to i64
%117 = getelementptr inbounds [4 x i32], [4 x i32]* %20, i64 0, i64 %116
%118 = load i32, i32* %117
%119 = icmp slt i32 %112, %118
br i1 %119, label %120, label %147
120: ; preds = %111
%121 = load i32, i32* %14
%122 = load i32, i32* %17
%123 = add nsw i32 %122, 3
%124 = srem i32 %123, 4
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds [4 x i32], [4 x i32]* %20, i64 0, i64 %125
%127 = load i32, i32* %126
%128 = call i32 @abs(i32 %127)
%129 = icmp slt i32 %121, %128
br i1 %129, label %130, label %131
130: ; preds = %120
br label %250
131: ; preds = %120
%132 = load i32, i32* %17
%133 = add nsw i32 %132, 3
%134 = srem i32 %133, 4
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds [4 x i32], [4 x i32]* %20, i64 0, i64 %135
%137 = load i32, i32* %136
%138 = sitofp i32 %137 to float
store float %138, float* %24
%139 = load float, float* %25
%140 = load float, float* %25
%141 = load float, float* %24
%142 = load float, float* %24
%143 = fmul float %141, %142
%144 = fneg float %143
%145 = call float @llvm.fmuladd.f32(float %139, float %140, float %144)
%146 = call float @sqrt(float %145)
store float %146, float* %21
br label %153
147: ; preds = %111, %103
store float 0.000000e+00, float* %24
%148 = load i32, i32* %17
%149 = sext i32 %148 to i64
%150 = getelementptr inbounds [4 x i32], [4 x i32]* %20, i64 0, i64 %149
%151 = load i32, i32* %150
%152 = sitofp i32 %151 to float
store float %152, float* %21
br label %153
153: ; preds = %147, %131
%154 = load float, float* %21
%155 = load float, float* %21
%156 = load float, float* %22
%157 = load float, float* %22
%158 = fmul float %156, %157
%159 = call float @llvm.fmuladd.f32(float %154, float %155, float %158)
%160 = call float @sqrt(float %159)
store float %160, float* %26
%161 = load float, float* %23
%162 = load float, float* %23
%163 = load float, float* %24
%164 = load float, float* %24
%165 = fmul float %163, %164
%166 = call float @llvm.fmuladd.f32(float %161, float %162, float %165)
%167 = call float @sqrt(float %166)
store float %167, float* %27
%168 = load float, float* %26
%169 = load float, float* %25
%170 = fcmp ogt float %168, %169
br i1 %170, label %171, label %242
171: ; preds = %153
%172 = load float, float* %25
%173 = load float, float* %27
%174 = fcmp ogt float %172, %173
br i1 %174, label %175, label %242
175: ; preds = %171
%176 = load float, float* %21
%177 = fpext float %176 to double
%178 = fcmp ogt double %177, 0.000000e+00
br i1 %178, label %179, label %242
179: ; preds = %175
%180 = load float, float* %22
%181 = fpext float %180 to double
%182 = fcmp ogt double %181, 0.000000e+00
br i1 %182, label %183, label %242
183: ; preds = %179
%184 = load float, float* %25
%185 = load float, float* %21
%186 = fcmp ogt float %184, %185
br i1 %186, label %187, label %200
187: ; preds = %183
%188 = load i32, i32* %17
%189 = mul nsw i32 90, %188
%190 = load float, float* %21
%191 = load float, float* %25
%192 = fdiv float %190, %191
%193 = call float @acos(float %192)
%194 = load float, float* @XfDrawCircle.rtod
%195 = fmul float %193, %194
%196 = fptosi float %195 to i32
%197 = add nsw i32 %189, %196
%198 = mul nsw i32 64, %197
%199 = add nsw i32 %198, 32
store i32 %199, i32* %18
br label %200
200: ; preds = %187, %183
%201 = load float, float* %25
%202 = load float, float* %22
%203 = fcmp ogt float %201, %202
br i1 %203, label %204, label %217
204: ; preds = %200
%205 = load i32, i32* %17
%206 = mul nsw i32 90, %205
%207 = load float, float* %22
%208 = load float, float* %25
%209 = fdiv float %207, %208
%210 = call float @asin(float %209)
%211 = load float, float* @XfDrawCircle.rtod
%212 = fmul float %210, %211
%213 = fptosi float %212 to i32
%214 = add nsw i32 %206, %213
%215 = mul nsw i32 64, %214
%216 = sub nsw i32 %215, 32
store i32 %216, i32* %19
br label %217
217: ; preds = %204, %200
%218 = load i32, i32* %19
%219 = srem i32 %218, 5760
%220 = icmp ne i32 %219, 0
br i1 %220, label %224, label %221
221: ; preds = %217
%222 = load i32, i32* %17
%223 = icmp eq i32 %222, 3
br i1 %223, label %224, label %241
224: ; preds = %221, %217
%225 = load i32*, i32** %9
%226 = load i32, i32* %10
%227 = load i32, i32* %11
%228 = load i32, i32* %12
%229 = load i32, i32* %14
%230 = sub nsw i32 %228, %229
%231 = load i32, i32* %13
%232 = load i32, i32* %14
%233 = sub nsw i32 %231, %232
%234 = load i32, i32* %14
%235 = mul nsw i32 2, %234
%236 = load i32, i32* %14
%237 = mul nsw i32 2, %236
%238 = load i32, i32* %18
%239 = load i32, i32* %19
%240 = call i32 @XDrawArc(i32* %225, i32 %226, i32 %227, i32 %230, i32 %233, i32 %235, i32 %237, i32 %238, i32 %239)
store i32 23040, i32* %19
br label %241
241: ; preds = %224, %221
br label %245
242: ; preds = %179, %175, %171, %153
%243 = load i32, i32* %17
%244 = mul nsw i32 5760, %243
store i32 %244, i32* %18
br label %245
245: ; preds = %242, %241
br label %246
246: ; preds = %245
%247 = load i32, i32* %17
%248 = add nsw i32 %247, 1
store i32 %248, i32* %17
br label %50
249: ; preds = %50
br label %250
250: ; preds = %249, %130, %78
ret void
}

LLVM IR (-O2):
@XfDrawCircle.rtod = internal unnamed_addr global float 0.000000e+00
define void @XfDrawCircle(i32* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%9 = alloca [4 x i32]
%10 = bitcast [4 x i32]* %9 to i8*
%11 = load float, float* @XfDrawCircle.rtod
%12 = fcmp oeq float %11, 0.000000e+00
br i1 %12, label %13, label %15
13: ; preds = %8
%14 = tail call double @atan(double 1.000000e+00)
store float 0x404CA5DC20000000, float* @XfDrawCircle.rtod
br label %15
15: ; preds = %13, %8
%16 = sub nsw i32 %6, %3
%17 = getelementptr inbounds [4 x i32], [4 x i32]* %9, i64 0, i64 0
store i32 %16, i32* %17
%18 = getelementptr inbounds [4 x i32], [4 x i32]* %9, i64 0, i64 1
store i32 %4, i32* %18
%19 = getelementptr inbounds [4 x i32], [4 x i32]* %9, i64 0, i64 2
store i32 %3, i32* %19
%20 = sub nsw i32 %7, %4
%21 = getelementptr inbounds [4 x i32], [4 x i32]* %9, i64 0, i64 3
store i32 %20, i32* %21
%22 = sitofp i32 %5 to float
%23 = sub nsw i32 %3, %5
%24 = sub nsw i32 %4, %5
%25 = shl nsw i32 %5, 1
br label %26
26: ; preds = %15, %135
%27 = phi i64 [ 0, %15 ], [ %138, %135 ]
%28 = phi i32 [ 0, %15 ], [ %137, %135 ]
%29 = phi i32 [ 23040, %15 ], [ %136, %135 ]
%30 = add nuw i64 %27, 2
%31 = and i64 %30, 3
%32 = getelementptr inbounds [4 x i32], [4 x i32]* %9, i64 0, i64 %31
%33 = load i32, i32* %32
%34 = icmp slt i32 %33, 0
br i1 %34, label %35, label %48
35: ; preds = %26
%36 = getelementptr inbounds [4 x i32], [4 x i32]* %9, i64 0, i64 %27
%37 = load i32, i32* %36
%38 = icmp sgt i32 %37, %5
br i1 %38, label %39, label %48
39: ; preds = %35
%40 = sub nsw i32 0, %33
%41 = icmp sgt i32 %40, %5
br i1 %41, label %140, label %42
42: ; preds = %39
%43 = sitofp i32 %33 to float
%44 = fneg float %43
%45 = fmul float %44, %43
%46 = tail call float @llvm.fmuladd.f32(float %22, float %22, float %45)
%47 = tail call float @sqrt(float %46)
br label %54
48: ; preds = %35, %26
%49 = add nuw i64 %27, 1
%50 = and i64 %49, 3
%51 = getelementptr inbounds [4 x i32], [4 x i32]* %9, i64 0, i64 %50
%52 = load i32, i32* %51
%53 = sitofp i32 %52 to float
br label %54
54: ; preds = %48, %42
%55 = phi float [ %47, %42 ], [ %53, %48 ]
%56 = phi float [ %43, %42 ], [ 0.000000e+00, %48 ]
%57 = add nuw i64 %27, 3
%58 = and i64 %57, 3
%59 = getelementptr inbounds [4 x i32], [4 x i32]* %9, i64 0, i64 %58
%60 = load i32, i32* %59
%61 = icmp slt i32 %60, 0
br i1 %61, label %62, label %77
62: ; preds = %54
%63 = add nuw i64 %27, 1
%64 = and i64 %63, 3
%65 = getelementptr inbounds [4 x i32], [4 x i32]* %9, i64 0, i64 %64
%66 = load i32, i32* %65
%67 = icmp sgt i32 %66, %5
br i1 %67, label %68, label %77
68: ; preds = %62
%69 = sub nsw i32 0, %60
%70 = icmp sgt i32 %69, %5
br i1 %70, label %140, label %71
71: ; preds = %68
%72 = sitofp i32 %60 to float
%73 = fneg float %72
%74 = fmul float %73, %72
%75 = tail call float @llvm.fmuladd.f32(float %22, float %22, float %74)
%76 = tail call float @sqrt(float %75)
br label %81
77: ; preds = %62, %54
%78 = getelementptr inbounds [4 x i32], [4 x i32]* %9, i64 0, i64 %27
%79 = load i32, i32* %78
%80 = sitofp i32 %79 to float
br label %81
81: ; preds = %77, %71
%82 = phi float [ %76, %71 ], [ %80, %77 ]
%83 = phi float [ %72, %71 ], [ 0.000000e+00, %77 ]
%84 = fmul float %55, %55
%85 = tail call float @llvm.fmuladd.f32(float %82, float %82, float %84)
%86 = tail call float @sqrt(float %85)
%87 = fmul float %83, %83
%88 = tail call float @llvm.fmuladd.f32(float %56, float %56, float %87)
%89 = tail call float @sqrt(float %88)
%90 = fcmp ogt float %86, %22
%91 = fcmp olt float %89, %22
%92 = select i1 %90, i1 %91, i1 false
%93 = fcmp ogt float %82, 0.000000e+00
%94 = select i1 %92, i1 %93, i1 false
%95 = fcmp ogt float %55, 0.000000e+00
%96 = select i1 %94, i1 %95, i1 false
br i1 %96, label %97, label %132
97: ; preds = %81
%98 = fcmp olt float %82, %22
br i1 %98, label %99, label %110
99: ; preds = %97
%100 = fdiv float %82, %22
%101 = tail call float @acos(float %100)
%102 = load float, float* @XfDrawCircle.rtod
%103 = fmul float %101, %102
%104 = fptosi float %103 to i32
%105 = trunc i64 %27 to i32
%106 = mul i32 %105, 90
%107 = add nsw i32 %106, %104
%108 = shl nsw i32 %107, 6
%109 = or i32 %108, 32
br label %110
110: ; preds = %99, %97
%111 = phi i32 [ %109, %99 ], [ %28, %97 ]
%112 = fcmp olt float %55, %22
br i1 %112, label %113, label %124
113: ; preds = %110
%114 = fdiv float %55, %22
%115 = tail call float @asin(float %114)
%116 = load float, float* @XfDrawCircle.rtod
%117 = fmul float %115, %116
%118 = fptosi float %117 to i32
%119 = trunc i64 %27 to i32
%120 = mul i32 %119, 90
%121 = add nsw i32 %120, %118
%122 = shl nsw i32 %121, 6
%123 = add nsw i32 %122, -32
br label %124
124: ; preds = %113, %110
%125 = phi i32 [ %123, %113 ], [ %29, %110 ]
%126 = srem i32 %125, 5760
%127 = icmp ne i32 %126, 0
%128 = icmp eq i64 %27, 3
%129 = select i1 %127, i1 true, i1 %128
br i1 %129, label %130, label %135
130: ; preds = %124
%131 = tail call i32 @XDrawArc(i32* %0, i32 %1, i32 %2, i32 %23, i32 %24, i32 %25, i32 %25, i32 %111, i32 %125)
br label %135
132: ; preds = %81
%133 = trunc i64 %27 to i32
%134 = mul i32 %133, 5760
br label %135
135: ; preds = %132, %124, %130
%136 = phi i32 [ 23040, %130 ], [ %125, %124 ], [ %29, %132 ]
%137 = phi i32 [ %111, %130 ], [ %111, %124 ], [ %134, %132 ]
%138 = add nuw nsw i64 %27, 1
%139 = icmp eq i64 %138, 4
br i1 %139, label %140, label %26
140: ; preds = %135, %68, %39
ret void
}