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

/* Variables and functions */
double angle_diff(double, double);
scalar_t__ angle_diff_signed(double, double);
double atan2(int, int);
double cos(double);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, double, ...);
double sin(double);
void write_svg_circle(FILE *fe, FILE *svg, double *param, int *pext,
                      int smooth) {
  int fa = 0, fs = 1;
  double ang_start, ang_end;
  if (smooth) {
    param[0] *= 1.25;
    param[1] *= 1.25;
    param[2] *= 1.25;
    param[3] *= 1.25;
    pext[0] *= 1.25;
    pext[1] *= 1.25;
    pext[2] *= 1.25;
    pext[3] *= 1.25;
  }
  ang_start = atan2(pext[1] - param[1], pext[0] - param[0]);
  ang_end = atan2(pext[3] - param[1], pext[2] - param[0]);
  double C = 6.28318530718 * param[2];
  if (angle_diff(ang_start, ang_end) < 6.28318530718 * 1.414213562373095 / C &&
      angle_diff_signed(ang_start, ang_end) > 0) {
    fprintf(svg,
            "<ellipse cx=\"%f\" cy=\"%f\" rx=\"%f\" ry=\"%f\" stroke=\"blue\" "
            "stroke-width=\"%d\" fill=\"none\" /> \n",
            param[0], param[1], param[2], param[3], 1);
  } else {
    double x1, y1, x2, y2;
    x1 = param[2] * cos(ang_start) + param[0];
    y1 = param[2] * sin(ang_start) + param[1];
    x2 = param[2] * cos(ang_end) + param[0];
    y2 = param[2] * sin(ang_end) + param[1];
    if (ang_start < 0)
      ang_start += 6.28318530718;
    if (ang_end < 0)
      ang_end += 6.28318530718;
    if (ang_end < ang_start)
      ang_end += 6.28318530718;
    if ((ang_end - ang_start) > 3.14159265358979323846)
      fa = 1;
    fprintf(svg, "<path d=\"M %f,%f A%f,%f %f %d,%d %f,%f\"", x1, y1, param[2],
            param[2], 0.0, fa, fs, x2, y2);
    fprintf(svg, " fill=\"none\" stroke =\"blue\" stroke-width=\"%d\" />\n", 1);
  }
  fprintf(fe, "%f %f %f %f %f %f %f\n", param[0], param[1], param[2], param[3],
          param[4], ang_start, ang_end);
}


x86 assembly (clang, -O0):
<write_svg_circle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x1,-0x2c(%rbp)
cmpl   $0x0,-0x24(%rbp)
je     125b <write_svg_circle+0xfb>
mov    -0x18(%rbp),%rax
movsd  0xe5d(%rip),%xmm0
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0xe49(%rip),%xmm0
mulsd  0x8(%rax),%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rax
movsd  0xe33(%rip),%xmm0
mulsd  0x10(%rax),%xmm0
movsd  %xmm0,0x10(%rax)
mov    -0x18(%rbp),%rax
movsd  0xe1d(%rip),%xmm0
mulsd  0x18(%rax),%xmm0
movsd  %xmm0,0x18(%rax)
mov    -0x20(%rbp),%rax
cvtsi2sdl (%rax),%xmm0
movsd  0xe03(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%ecx
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
cvtsi2sdl 0x4(%rax),%xmm0
movsd  0xde8(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%ecx
mov    %ecx,0x4(%rax)
mov    -0x20(%rbp),%rax
cvtsi2sdl 0x8(%rax),%xmm0
movsd  0xdcc(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%ecx
mov    %ecx,0x8(%rax)
mov    -0x20(%rbp),%rax
cvtsi2sdl 0xc(%rax),%xmm0
movsd  0xdb0(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%ecx
mov    %ecx,0xc(%rax)
mov    -0x20(%rbp),%rax
cvtsi2sdl 0x4(%rax),%xmm0
mov    -0x18(%rbp),%rax
subsd  0x8(%rax),%xmm0
cvttsd2si %xmm0,%edi
mov    -0x20(%rbp),%rax
cvtsi2sdl (%rax),%xmm0
mov    -0x18(%rbp),%rax
subsd  (%rax),%xmm0
cvttsd2si %xmm0,%esi
call   1030 <atan2@plt>
movsd  %xmm0,-0x38(%rbp)
mov    -0x20(%rbp),%rax
cvtsi2sdl 0xc(%rax),%xmm0
mov    -0x18(%rbp),%rax
subsd  0x8(%rax),%xmm0
cvttsd2si %xmm0,%edi
mov    -0x20(%rbp),%rax
cvtsi2sdl 0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
subsd  (%rax),%xmm0
cvttsd2si %xmm0,%esi
call   1030 <atan2@plt>
movsd  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rax
movsd  0xd40(%rip),%xmm0
mulsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
call   1070 <angle_diff@plt>
movaps %xmm0,%xmm1
movsd  0xd14(%rip),%xmm0
divsd  -0x48(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    135b <write_svg_circle+0x1fb>
movsd  -0x38(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
call   1060 <angle_diff_signed@plt>
cmp    $0x0,%rax
jle    135b <write_svg_circle+0x1fb>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm2
mov    -0x18(%rbp),%rax
movsd  0x18(%rax),%xmm3
lea    0xcde(%rip),%rsi
mov    $0x1,%edx
mov    $0x4,%al
call   1040 <fprintf@plt>
jmp    151b <write_svg_circle+0x3bb>
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
call   1080 <cos@plt>
movaps %xmm0,%xmm2
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x38(%rbp),%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm2
movsd  -0x80(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x40(%rbp),%xmm0
call   1080 <cos@plt>
movaps %xmm0,%xmm2
movsd  -0x78(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x40(%rbp),%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm2
movsd  -0x70(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x38(%rbp),%xmm0
jbe    1457 <write_svg_circle+0x2f7>
movsd  0xbc3(%rip),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x40(%rbp),%xmm0
jbe    1477 <write_svg_circle+0x317>
movsd  0xba3(%rip),%xmm0
addsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    149d <write_svg_circle+0x33d>
movsd  0xb7d(%rip),%xmm0
addsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
subsd  -0x38(%rbp),%xmm0
movsd  0xb69(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    14c0 <write_svg_circle+0x360>
movl   $0x1,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
movsd  -0x50(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm2
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm3
mov    -0x28(%rbp),%edx
mov    -0x2c(%rbp),%ecx
movsd  -0x60(%rbp),%xmm5
movsd  -0x68(%rbp),%xmm6
lea    0xb8b(%rip),%rsi
xorps  %xmm4,%xmm4
mov    $0x7,%al
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xb9e(%rip),%rsi
movsd  0xb0c(%rip),%xmm0
mov    $0x1,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm2
mov    -0x18(%rbp),%rax
movsd  0x18(%rax),%xmm3
mov    -0x18(%rbp),%rax
movsd  0x20(%rax),%xmm4
movsd  -0x38(%rbp),%xmm5
movsd  -0x40(%rbp),%xmm6
lea    0xb80(%rip),%rsi
mov    $0x7,%al
call   1040 <fprintf@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_svg_circle>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %rcx,%rbx
mov    %rdx,%r12
mov    %rsi,%r15
mov    %rdi,%r14
test   %r8d,%r8d
je     11f0 <write_svg_circle+0x90>
movapd 0xe7c(%rip),%xmm1
movupd (%r12),%xmm0
movupd 0x10(%r12),%xmm2
mulpd  %xmm1,%xmm0
movupd %xmm0,(%r12)
mulpd  %xmm1,%xmm2
movupd %xmm2,0x10(%r12)
cvtdq2pd (%rbx),%xmm2
mulpd  %xmm1,%xmm2
cvttpd2dq %xmm2,%xmm1
pshufd $0x55,%xmm1,%xmm2
movd   %xmm1,(%rbx)
movd   %xmm2,0x4(%rbx)
xorps  %xmm2,%xmm2
cvtsi2sdl 0x8(%rbx),%xmm2
movsd  0xe40(%rip),%xmm3
mulsd  %xmm3,%xmm2
cvttsd2si %xmm2,%eax
mov    %eax,0x8(%rbx)
xorps  %xmm2,%xmm2
cvtsi2sdl 0xc(%rbx),%xmm2
mulsd  %xmm3,%xmm2
cvttsd2si %xmm2,%eax
mov    %eax,0xc(%rbx)
jmp    11fa <write_svg_circle+0x9a>
movsd  (%rbx),%xmm1
movupd (%r12),%xmm0
pshufd $0x55,%xmm1,%xmm2
movd   %xmm2,%eax
xorps  %xmm2,%xmm2
cvtsi2sd %eax,%xmm2
movapd %xmm0,%xmm3
unpckhpd %xmm0,%xmm3
subsd  %xmm3,%xmm2
cvttsd2si %xmm2,%edi
movd   %xmm1,%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
subsd  %xmm0,%xmm1
cvttsd2si %xmm1,%esi
call   1030 <atan2@plt>
movapd %xmm0,0x10(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sdl 0xc(%rbx),%xmm0
subsd  0x8(%r12),%xmm0
cvttsd2si %xmm0,%edi
xorps  %xmm0,%xmm0
cvtsi2sdl 0x8(%rbx),%xmm0
subsd  (%r12),%xmm0
cvttsd2si %xmm0,%esi
call   1030 <atan2@plt>
movapd %xmm0,%xmm1
movsd  0x10(%r12),%xmm0
mulsd  0xda3(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
movapd 0x10(%rsp),%xmm0
movapd %xmm1,0x30(%rsp)
call   1070 <angle_diff@plt>
movsd  0xd8c(%rip),%xmm1
divsd  0x8(%rsp),%xmm1
ucomisd %xmm0,%xmm1
jbe    12ec <write_svg_circle+0x18c>
movapd 0x10(%rsp),%xmm0
movapd 0x30(%rsp),%xmm1
call   1060 <angle_diff_signed@plt>
test   %rax,%rax
jle    12ec <write_svg_circle+0x18c>
movsd  (%r12),%xmm0
movsd  0x8(%r12),%xmm1
movsd  0x10(%r12),%xmm2
movsd  0x18(%r12),%xmm3
lea    0xd60(%rip),%rsi
mov    %r15,%rdi
mov    $0x1,%edx
mov    $0x4,%al
call   1040 <fprintf@plt>
jmp    147b <write_svg_circle+0x31b>
movsd  0x10(%r12),%xmm0
movsd  %xmm0,0x8(%rsp)
movapd 0x10(%rsp),%xmm0
call   1080 <cos@plt>
mulsd  0x8(%rsp),%xmm0
addsd  (%r12),%xmm0
movsd  %xmm0,0x50(%rsp)
movsd  0x10(%r12),%xmm0
movsd  %xmm0,0x8(%rsp)
movapd 0x10(%rsp),%xmm0
call   1050 <sin@plt>
movsd  0x8(%rsp),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x8(%r12),%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  0x10(%r12),%xmm0
movsd  %xmm0,0x28(%rsp)
movapd 0x30(%rsp),%xmm0
call   1080 <cos@plt>
movsd  0x28(%rsp),%xmm1
mulsd  %xmm0,%xmm1
addsd  (%r12),%xmm1
movsd  %xmm1,0x28(%rsp)
movsd  0x10(%r12),%xmm0
movsd  %xmm0,0x48(%rsp)
movapd 0x30(%rsp),%xmm0
call   1050 <sin@plt>
movsd  0x48(%rsp),%xmm6
mulsd  %xmm0,%xmm6
addsd  0x8(%r12),%xmm6
movsd  0xc74(%rip),%xmm0
movapd 0x10(%rsp),%xmm4
movapd %xmm4,%xmm1
addsd  %xmm0,%xmm1
xorpd  %xmm2,%xmm2
movapd %xmm4,%xmm3
cmpltsd %xmm2,%xmm3
andpd  %xmm3,%xmm1
andnpd %xmm4,%xmm3
orpd   %xmm1,%xmm3
movapd %xmm3,%xmm4
movapd %xmm3,0x10(%rsp)
movapd 0x30(%rsp),%xmm5
movapd %xmm5,%xmm1
addsd  %xmm0,%xmm1
movapd %xmm5,%xmm3
cmpltsd %xmm2,%xmm3
andpd  %xmm3,%xmm1
andnpd %xmm5,%xmm3
orpd   %xmm1,%xmm3
addsd  %xmm3,%xmm0
movapd %xmm3,%xmm1
cmpltsd %xmm4,%xmm1
andpd  %xmm1,%xmm0
andnpd %xmm3,%xmm1
orpd   %xmm0,%xmm1
movapd %xmm1,0x30(%rsp)
movapd %xmm1,%xmm0
subsd  %xmm4,%xmm0
xor    %edx,%edx
ucomisd 0xbff(%rip),%xmm0
seta   %dl
movsd  0x10(%r12),%xmm2
lea    0xc58(%rip),%rsi
xorpd  %xmm4,%xmm4
mov    %r15,%rdi
movsd  0x50(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
movaps %xmm2,%xmm3
mov    $0x1,%ecx
movsd  0x28(%rsp),%xmm5
mov    $0x7,%al
call   1040 <fprintf@plt>
lea    0xc51(%rip),%rsi
movsd  0xbbf(%rip),%xmm0
mov    %r15,%rdi
mov    $0x1,%al
call   1040 <fprintf@plt>
movaps 0x10(%rsp),%xmm5
movsd  (%r12),%xmm0
movsd  0x8(%r12),%xmm1
movsd  0x10(%r12),%xmm2
movsd  0x18(%r12),%xmm3
movsd  0x20(%r12),%xmm4
lea    0xc43(%rip),%rsi
mov    %r14,%rdi
movaps 0x30(%rsp),%xmm6
mov    $0x7,%al
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
@.str = [90 x i8] c"<ellipse cx=\22%f\22 cy=\22%f\22 rx=\22%f\22 ry=\22%f\22 stroke=\22blue\22 stroke-width=\22%d\22 fill=\22none\22 /> \0A\00"
@.str.1 = [40 x i8] c"<path d=\22M %f,%f A%f,%f %f %d,%d %f,%f\22\00"
@.str.2 = [50 x i8] c" fill=\22none\22 stroke =\22blue\22 stroke-width=\22%d\22 />\0A\00"
@.str.3 = [22 x i8] c"%f %f %f %f %f %f %f\0A\00"
define void @write_svg_circle(i32* %0, i32* %1, double* %2, i32* %3, i32 %4) {
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca double*
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
store i32* %0, i32** %6
store i32* %1, i32** %7
store double* %2, double** %8
store i32* %3, i32** %9
store i32 %4, i32* %10
store i32 0, i32* %11
store i32 1, i32* %12
%20 = load i32, i32* %10
%21 = icmp ne i32 %20, 0
br i1 %21, label %22, label %63
22: ; preds = %5
%23 = load double*, double** %8
%24 = getelementptr inbounds double, double* %23, i64 0
%25 = load double, double* %24
%26 = fmul double %25, 1.250000e+00
store double %26, double* %24
%27 = load double*, double** %8
%28 = getelementptr inbounds double, double* %27, i64 1
%29 = load double, double* %28
%30 = fmul double %29, 1.250000e+00
store double %30, double* %28
%31 = load double*, double** %8
%32 = getelementptr inbounds double, double* %31, i64 2
%33 = load double, double* %32
%34 = fmul double %33, 1.250000e+00
store double %34, double* %32
%35 = load double*, double** %8
%36 = getelementptr inbounds double, double* %35, i64 3
%37 = load double, double* %36
%38 = fmul double %37, 1.250000e+00
store double %38, double* %36
%39 = load i32*, i32** %9
%40 = getelementptr inbounds i32, i32* %39, i64 0
%41 = load i32, i32* %40
%42 = sitofp i32 %41 to double
%43 = fmul double %42, 1.250000e+00
%44 = fptosi double %43 to i32
store i32 %44, i32* %40
%45 = load i32*, i32** %9
%46 = getelementptr inbounds i32, i32* %45, i64 1
%47 = load i32, i32* %46
%48 = sitofp i32 %47 to double
%49 = fmul double %48, 1.250000e+00
%50 = fptosi double %49 to i32
store i32 %50, i32* %46
%51 = load i32*, i32** %9
%52 = getelementptr inbounds i32, i32* %51, i64 2
%53 = load i32, i32* %52
%54 = sitofp i32 %53 to double
%55 = fmul double %54, 1.250000e+00
%56 = fptosi double %55 to i32
store i32 %56, i32* %52
%57 = load i32*, i32** %9
%58 = getelementptr inbounds i32, i32* %57, i64 3
%59 = load i32, i32* %58
%60 = sitofp i32 %59 to double
%61 = fmul double %60, 1.250000e+00
%62 = fptosi double %61 to i32
store i32 %62, i32* %58
br label %63
63: ; preds = %22, %5
%64 = load i32*, i32** %9
%65 = getelementptr inbounds i32, i32* %64, i64 1
%66 = load i32, i32* %65
%67 = sitofp i32 %66 to double
%68 = load double*, double** %8
%69 = getelementptr inbounds double, double* %68, i64 1
%70 = load double, double* %69
%71 = fsub double %67, %70
%72 = fptosi double %71 to i32
%73 = load i32*, i32** %9
%74 = getelementptr inbounds i32, i32* %73, i64 0
%75 = load i32, i32* %74
%76 = sitofp i32 %75 to double
%77 = load double*, double** %8
%78 = getelementptr inbounds double, double* %77, i64 0
%79 = load double, double* %78
%80 = fsub double %76, %79
%81 = fptosi double %80 to i32
%82 = call double @atan2(i32 %72, i32 %81)
store double %82, double* %13
%83 = load i32*, i32** %9
%84 = getelementptr inbounds i32, i32* %83, i64 3
%85 = load i32, i32* %84
%86 = sitofp i32 %85 to double
%87 = load double*, double** %8
%88 = getelementptr inbounds double, double* %87, i64 1
%89 = load double, double* %88
%90 = fsub double %86, %89
%91 = fptosi double %90 to i32
%92 = load i32*, i32** %9
%93 = getelementptr inbounds i32, i32* %92, i64 2
%94 = load i32, i32* %93
%95 = sitofp i32 %94 to double
%96 = load double*, double** %8
%97 = getelementptr inbounds double, double* %96, i64 0
%98 = load double, double* %97
%99 = fsub double %95, %98
%100 = fptosi double %99 to i32
%101 = call double @atan2(i32 %91, i32 %100)
store double %101, double* %14
%102 = load double*, double** %8
%103 = getelementptr inbounds double, double* %102, i64 2
%104 = load double, double* %103
%105 = fmul double 0x401921FB54442EEA, %104
store double %105, double* %15
%106 = load double, double* %13
%107 = load double, double* %14
%108 = call double @angle_diff(double %106, double %107)
%109 = load double, double* %15
%110 = fdiv double 0x4021C5831ADD642D, %109
%111 = fcmp olt double %108, %110
br i1 %111, label %112, label %132
112: ; preds = %63
%113 = load double, double* %13
%114 = load double, double* %14
%115 = call i64 @angle_diff_signed(double %113, double %114)
%116 = icmp sgt i64 %115, 0
br i1 %116, label %117, label %132
117: ; preds = %112
%118 = load i32*, i32** %7
%119 = load double*, double** %8
%120 = getelementptr inbounds double, double* %119, i64 0
%121 = load double, double* %120
%122 = load double*, double** %8
%123 = getelementptr inbounds double, double* %122, i64 1
%124 = load double, double* %123
%125 = load double*, double** %8
%126 = getelementptr inbounds double, double* %125, i64 2
%127 = load double, double* %126
%128 = load double*, double** %8
%129 = getelementptr inbounds double, double* %128, i64 3
%130 = load double, double* %129
%131 = call i32 (i32*, i8*, double, ...) @fprintf(i32* %118, i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str, i64 0, i64 0), double %121, double %124, double %127, double %130, i32 1)
br label %210
132: ; preds = %112, %63
%133 = load double*, double** %8
%134 = getelementptr inbounds double, double* %133, i64 2
%135 = load double, double* %134
%136 = load double, double* %13
%137 = call double @cos(double %136)
%138 = load double*, double** %8
%139 = getelementptr inbounds double, double* %138, i64 0
%140 = load double, double* %139
%141 = call double @llvm.fmuladd.f64(double %135, double %137, double %140)
store double %141, double* %16
%142 = load double*, double** %8
%143 = getelementptr inbounds double, double* %142, i64 2
%144 = load double, double* %143
%145 = load double, double* %13
%146 = call double @sin(double %145)
%147 = load double*, double** %8
%148 = getelementptr inbounds double, double* %147, i64 1
%149 = load double, double* %148
%150 = call double @llvm.fmuladd.f64(double %144, double %146, double %149)
store double %150, double* %17
%151 = load double*, double** %8
%152 = getelementptr inbounds double, double* %151, i64 2
%153 = load double, double* %152
%154 = load double, double* %14
%155 = call double @cos(double %154)
%156 = load double*, double** %8
%157 = getelementptr inbounds double, double* %156, i64 0
%158 = load double, double* %157
%159 = call double @llvm.fmuladd.f64(double %153, double %155, double %158)
store double %159, double* %18
%160 = load double*, double** %8
%161 = getelementptr inbounds double, double* %160, i64 2
%162 = load double, double* %161
%163 = load double, double* %14
%164 = call double @sin(double %163)
%165 = load double*, double** %8
%166 = getelementptr inbounds double, double* %165, i64 1
%167 = load double, double* %166
%168 = call double @llvm.fmuladd.f64(double %162, double %164, double %167)
store double %168, double* %19
%169 = load double, double* %13
%170 = fcmp olt double %169, 0.000000e+00
br i1 %170, label %171, label %174
171: ; preds = %132
%172 = load double, double* %13
%173 = fadd double %172, 0x401921FB54442EEA
store double %173, double* %13
br label %174
174: ; preds = %171, %132
%175 = load double, double* %14
%176 = fcmp olt double %175, 0.000000e+00
br i1 %176, label %177, label %180
177: ; preds = %174
%178 = load double, double* %14
%179 = fadd double %178, 0x401921FB54442EEA
store double %179, double* %14
br label %180
180: ; preds = %177, %174
%181 = load double, double* %14
%182 = load double, double* %13
%183 = fcmp olt double %181, %182
br i1 %183, label %184, label %187
184: ; preds = %180
%185 = load double, double* %14
%186 = fadd double %185, 0x401921FB54442EEA
store double %186, double* %14
br label %187
187: ; preds = %184, %180
%188 = load double, double* %14
%189 = load double, double* %13
%190 = fsub double %188, %189
%191 = fcmp ogt double %190, 0x400921FB54442D18
br i1 %191, label %192, label %193
192: ; preds = %187
store i32 1, i32* %11
br label %193
193: ; preds = %192, %187
%194 = load i32*, i32** %7
%195 = load double, double* %16
%196 = load double, double* %17
%197 = load double*, double** %8
%198 = getelementptr inbounds double, double* %197, i64 2
%199 = load double, double* %198
%200 = load double*, double** %8
%201 = getelementptr inbounds double, double* %200, i64 2
%202 = load double, double* %201
%203 = load i32, i32* %11
%204 = load i32, i32* %12
%205 = load double, double* %18
%206 = load double, double* %19
%207 = call i32 (i32*, i8*, double, ...) @fprintf(i32* %194, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), double %195, double %196, double %199, double %202, double 0.000000e+00, i32 %203, i32 %204, double %205, double %206)
%208 = load i32*, i32** %7
%209 = call i32 (i32*, i8*, double, ...) @fprintf(i32* %208, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.2, i64 0, i64 0), double 1.000000e+00)
br label %210
210: ; preds = %193, %117
%211 = load i32*, i32** %6
%212 = load double*, double** %8
%213 = getelementptr inbounds double, double* %212, i64 0
%214 = load double, double* %213
%215 = load double*, double** %8
%216 = getelementptr inbounds double, double* %215, i64 1
%217 = load double, double* %216
%218 = load double*, double** %8
%219 = getelementptr inbounds double, double* %218, i64 2
%220 = load double, double* %219
%221 = load double*, double** %8
%222 = getelementptr inbounds double, double* %221, i64 3
%223 = load double, double* %222
%224 = load double*, double** %8
%225 = getelementptr inbounds double, double* %224, i64 4
%226 = load double, double* %225
%227 = load double, double* %13
%228 = load double, double* %14
%229 = call i32 (i32*, i8*, double, ...) @fprintf(i32* %211, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), double %214, double %217, double %220, double %223, double %226, double %227, double %228)
ret void
}

LLVM IR (-O2):
@.str = [90 x i8] c"<ellipse cx=\22%f\22 cy=\22%f\22 rx=\22%f\22 ry=\22%f\22 stroke=\22blue\22 stroke-width=\22%d\22 fill=\22none\22 /> \0A\00"
@.str.1 = [40 x i8] c"<path d=\22M %f,%f A%f,%f %f %d,%d %f,%f\22\00"
@.str.2 = [50 x i8] c" fill=\22none\22 stroke =\22blue\22 stroke-width=\22%d\22 />\0A\00"
@.str.3 = [22 x i8] c"%f %f %f %f %f %f %f\0A\00"
define void @write_svg_circle(i32* nocapture %0, i32* nocapture %1, double* nocapture %2, i32* nocapture %3, i32 %4) {
%6 = icmp eq i32 %4, 0
br i1 %6, label %7, label %12
7: ; preds = %5
%8 = bitcast i32* %3 to <2 x i32>*
%9 = load <2 x i32>, <2 x i32>* %8
%10 = bitcast double* %2 to <2 x double>*
%11 = load <2 x double>, <2 x double>* %10
br label %40
12: ; preds = %5
%13 = bitcast double* %2 to <2 x double>*
%14 = load <2 x double>, <2 x double>* %13
%15 = fmul <2 x double> %14, <double 1.250000e+00, double 1.250000e+00>
%16 = bitcast double* %2 to <2 x double>*
store <2 x double> %15, <2 x double>* %16
%17 = getelementptr inbounds double, double* %2, i64 2
%18 = bitcast double* %17 to <2 x double>*
%19 = load <2 x double>, <2 x double>* %18
%20 = fmul <2 x double> %19, <double 1.250000e+00, double 1.250000e+00>
%21 = bitcast double* %17 to <2 x double>*
store <2 x double> %20, <2 x double>* %21
%22 = getelementptr inbounds i32, i32* %3, i64 1
%23 = bitcast i32* %3 to <2 x i32>*
%24 = load <2 x i32>, <2 x i32>* %23
%25 = sitofp <2 x i32> %24 to <2 x double>
%26 = fmul <2 x double> %25, <double 1.250000e+00, double 1.250000e+00>
%27 = fptosi <2 x double> %26 to <2 x i32>
%28 = extractelement <2 x i32> %27, i64 0
store i32 %28, i32* %3
%29 = extractelement <2 x i32> %27, i64 1
store i32 %29, i32* %22
%30 = getelementptr inbounds i32, i32* %3, i64 2
%31 = load i32, i32* %30
%32 = sitofp i32 %31 to double
%33 = fmul double %32, 1.250000e+00
%34 = fptosi double %33 to i32
store i32 %34, i32* %30
%35 = getelementptr inbounds i32, i32* %3, i64 3
%36 = load i32, i32* %35
%37 = sitofp i32 %36 to double
%38 = fmul double %37, 1.250000e+00
%39 = fptosi double %38 to i32
store i32 %39, i32* %35
br label %40
40: ; preds = %7, %12
%41 = phi <2 x double> [ %11, %7 ], [ %15, %12 ]
%42 = phi <2 x i32> [ %9, %7 ], [ %27, %12 ]
%43 = extractelement <2 x i32> %42, i64 1
%44 = sitofp i32 %43 to double
%45 = getelementptr inbounds double, double* %2, i64 1
%46 = extractelement <2 x double> %41, i64 1
%47 = fsub double %44, %46
%48 = fptosi double %47 to i32
%49 = extractelement <2 x i32> %42, i64 0
%50 = sitofp i32 %49 to double
%51 = extractelement <2 x double> %41, i64 0
%52 = fsub double %50, %51
%53 = fptosi double %52 to i32
%54 = tail call double @atan2(i32 %48, i32 %53)
%55 = getelementptr inbounds i32, i32* %3, i64 3
%56 = load i32, i32* %55
%57 = sitofp i32 %56 to double
%58 = load double, double* %45
%59 = fsub double %57, %58
%60 = fptosi double %59 to i32
%61 = getelementptr inbounds i32, i32* %3, i64 2
%62 = load i32, i32* %61
%63 = sitofp i32 %62 to double
%64 = load double, double* %2
%65 = fsub double %63, %64
%66 = fptosi double %65 to i32
%67 = tail call double @atan2(i32 %60, i32 %66)
%68 = getelementptr inbounds double, double* %2, i64 2
%69 = load double, double* %68
%70 = fmul double %69, 0x401921FB54442EEA
%71 = tail call double @angle_diff(double %54, double %67)
%72 = fdiv double 0x4021C5831ADD642D, %70
%73 = fcmp olt double %71, %72
br i1 %73, label %74, label %84
74: ; preds = %40
%75 = tail call i64 @angle_diff_signed(double %54, double %67)
%76 = icmp sgt i64 %75, 0
br i1 %76, label %77, label %84
77: ; preds = %74
%78 = load double, double* %2
%79 = load double, double* %45
%80 = load double, double* %68
%81 = getelementptr inbounds double, double* %2, i64 3
%82 = load double, double* %81
%83 = tail call i32 (i32*, i8*, double, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str, i64 0, i64 0), double %78, double %79, double %80, double %82, i32 1)
br label %116
84: ; preds = %74, %40
%85 = load double, double* %68
%86 = tail call double @cos(double %54)
%87 = load double, double* %2
%88 = tail call double @llvm.fmuladd.f64(double %85, double %86, double %87)
%89 = load double, double* %68
%90 = tail call double @sin(double %54)
%91 = load double, double* %45
%92 = tail call double @llvm.fmuladd.f64(double %89, double %90, double %91)
%93 = load double, double* %68
%94 = tail call double @cos(double %67)
%95 = load double, double* %2
%96 = tail call double @llvm.fmuladd.f64(double %93, double %94, double %95)
%97 = load double, double* %68
%98 = tail call double @sin(double %67)
%99 = load double, double* %45
%100 = tail call double @llvm.fmuladd.f64(double %97, double %98, double %99)
%101 = fcmp olt double %54, 0.000000e+00
%102 = fadd double %54, 0x401921FB54442EEA
%103 = select i1 %101, double %102, double %54
%104 = fcmp olt double %67, 0.000000e+00
%105 = fadd double %67, 0x401921FB54442EEA
%106 = select i1 %104, double %105, double %67
%107 = fcmp olt double %106, %103
%108 = fadd double %106, 0x401921FB54442EEA
%109 = select i1 %107, double %108, double %106
%110 = fsub double %109, %103
%111 = fcmp ogt double %110, 0x400921FB54442D18
%112 = zext i1 %111 to i32
%113 = load double, double* %68
%114 = tail call i32 (i32*, i8*, double, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), double %88, double %92, double %113, double %113, double 0.000000e+00, i32 %112, i32 1, double %96, double %100)
%115 = tail call i32 (i32*, i8*, double, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.2, i64 0, i64 0), double 1.000000e+00)
br label %116
116: ; preds = %84, %77
%117 = phi double [ %67, %77 ], [ %109, %84 ]
%118 = phi double [ %54, %77 ], [ %103, %84 ]
%119 = load double, double* %2
%120 = load double, double* %45
%121 = load double, double* %68
%122 = getelementptr inbounds double, double* %2, i64 3
%123 = load double, double* %122
%124 = getelementptr inbounds double, double* %2, i64 4
%125 = load double, double* %124
%126 = tail call i32 (i32*, i8*, double, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), double %119, double %120, double %121, double %123, double %125, double %118, double %117)
ret void
}