int TkGetMiterPoints(p1, p2, p3, width, m1, m2)
double p1[];
double p2[];
double p3[];
double width;
double m1[];
double m2[];
{
  double theta1;
  double theta2;
  double theta;
  double theta3;
  double dist;
  double deltaX, deltaY;
  static float elevenDegrees = (11.0 * 2.0 * 3.14159265358979323846) / 360.0;
  if (p2[1] == p1[1]) {
    theta1 = (p2[0] < p1[0]) ? 0 : 3.14159265358979323846;
  } else if (p2[0] == p1[0]) {
    theta1 = (p2[1] < p1[1]) ? 3.14159265358979323846 / 2.0
                             : -3.14159265358979323846 / 2.0;
  } else {
    theta1 = atan2(p1[1] - p2[1], p1[0] - p2[0]);
  }
  if (p3[1] == p2[1]) {
    theta2 = (p3[0] > p2[0]) ? 0 : 3.14159265358979323846;
  } else if (p3[0] == p2[0]) {
    theta2 = (p3[1] > p2[1]) ? 3.14159265358979323846 / 2.0
                             : -3.14159265358979323846 / 2.0;
  } else {
    theta2 = atan2(p3[1] - p2[1], p3[0] - p2[0]);
  }
  theta = theta1 - theta2;
  if (theta > 3.14159265358979323846) {
    theta -= 2 * 3.14159265358979323846;
  } else if (theta < -3.14159265358979323846) {
    theta += 2 * 3.14159265358979323846;
  }
  if ((theta < elevenDegrees) && (theta > -elevenDegrees)) {
    return 0;
  }
  dist = 0.5 * width / sin(0.5 * theta);
  if (dist < 0.0) {
    dist = -dist;
  }
  theta3 = (theta1 + theta2) / 2.0;
  if (sin(theta3 - (theta1 + 3.14159265358979323846)) < 0.0) {
    theta3 += 3.14159265358979323846;
  }
  deltaX = dist * cos(theta3);
  m1[0] = p2[0] + deltaX;
  m2[0] = p2[0] - deltaX;
  deltaY = dist * sin(theta3);
  m1[1] = p2[1] + deltaY;
  m2[1] = p2[1] - deltaY;
  return 1;
}


x86 assembly (clang, -O0):
<TkGetMiterPoints>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movsd  %xmm0,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    %r8,-0x38(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
ucomisd 0x8(%rax),%xmm0
jne    11ab <TkGetMiterPoints+0x7b>
jp     11ab <TkGetMiterPoints+0x7b>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
xorps  %xmm3,%xmm3
movsd  0xe83(%rip),%xmm2
cmpltsd %xmm1,%xmm0
movaps %xmm0,%xmm1
andpd  %xmm3,%xmm1
andnpd %xmm2,%xmm0
orpd   %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
jmp    1238 <TkGetMiterPoints+0x108>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
ucomisd (%rax),%xmm0
jne    1207 <TkGetMiterPoints+0xd7>
jp     1207 <TkGetMiterPoints+0xd7>
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
movsd  0xe1f(%rip),%xmm3
movsd  0xe1f(%rip),%xmm2
cmpltsd %xmm1,%xmm0
movaps %xmm0,%xmm1
andpd  %xmm3,%xmm1
andnpd %xmm2,%xmm0
orpd   %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
jmp    1233 <TkGetMiterPoints+0x103>
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
subsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x18(%rbp),%rax
subsd  (%rax),%xmm1
call   1030 <atan2@plt>
movsd  %xmm0,-0x40(%rbp)
jmp    1238 <TkGetMiterPoints+0x108>
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
ucomisd 0x8(%rax),%xmm0
jne    128f <TkGetMiterPoints+0x15f>
jp     128f <TkGetMiterPoints+0x15f>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
xorps  %xmm3,%xmm3
movsd  0xd9f(%rip),%xmm2
cmpltsd %xmm1,%xmm0
movaps %xmm0,%xmm1
andpd  %xmm3,%xmm1
andnpd %xmm2,%xmm0
orpd   %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
jmp    131c <TkGetMiterPoints+0x1ec>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
ucomisd (%rax),%xmm0
jne    12eb <TkGetMiterPoints+0x1bb>
jp     12eb <TkGetMiterPoints+0x1bb>
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  0xd3b(%rip),%xmm3
movsd  0xd3b(%rip),%xmm2
cmpltsd %xmm1,%xmm0
movaps %xmm0,%xmm1
andpd  %xmm3,%xmm1
andnpd %xmm2,%xmm0
orpd   %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
jmp    1317 <TkGetMiterPoints+0x1e7>
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
subsd  0x8(%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x18(%rbp),%rax
subsd  (%rax),%xmm1
call   1030 <atan2@plt>
movsd  %xmm0,-0x48(%rbp)
jmp    131c <TkGetMiterPoints+0x1ec>
movsd  -0x40(%rbp),%xmm0
subsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  0xcd8(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    135d <TkGetMiterPoints+0x22d>
movsd  -0x50(%rbp),%xmm0
movsd  0xcd1(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    1387 <TkGetMiterPoints+0x257>
movsd  0xcb3(%rip),%xmm0
ucomisd -0x50(%rbp),%xmm0
jbe    1382 <TkGetMiterPoints+0x252>
movsd  0xca8(%rip),%xmm0
addsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    1387 <TkGetMiterPoints+0x257>
movsd  -0x50(%rbp),%xmm1
movss  0x2ca4(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    13d6 <TkGetMiterPoints+0x2a6>
movsd  -0x50(%rbp),%xmm0
movss  0x2c89(%rip),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
cvtss2sd %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    13d6 <TkGetMiterPoints+0x2a6>
movl   $0x0,-0x4(%rbp)
jmp    1541 <TkGetMiterPoints+0x411>
movsd  0xc4a(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  0xc38(%rip),%xmm0
mulsd  -0x50(%rbp),%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x78(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x60(%rbp),%xmm0
jbe    143a <TkGetMiterPoints+0x30a>
movsd  -0x60(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x40(%rbp),%xmm0
addsd  -0x48(%rbp),%xmm0
movsd  0xbe4(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  0xbae(%rip),%xmm1
addsd  -0x40(%rbp),%xmm1
subsd  %xmm1,%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1492 <TkGetMiterPoints+0x362>
movsd  0xb88(%rip),%xmm0
addsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
call   1050 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x88(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
addsd  -0x68(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
subsd  -0x68(%rbp),%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x58(%rbp),%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x80(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
addsd  -0x70(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
subsd  -0x70(%rbp),%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TkGetMiterPoints>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %r8,%r14
mov    %rcx,%r15
movapd %xmm0,%xmm3
mov    %rdx,%rbx
mov    %rsi,%r12
movsd  (%rsi),%xmm4
movsd  0x8(%rsi),%xmm2
movsd  (%rdi),%xmm1
movsd  0x8(%rdi),%xmm0
ucomisd %xmm0,%xmm2
jne    1178 <TkGetMiterPoints+0x48>
jp     1178 <TkGetMiterPoints+0x48>
cmpltsd %xmm1,%xmm4
movsd  0xeae(%rip),%xmm0
andnpd %xmm0,%xmm4
jmp    11b9 <TkGetMiterPoints+0x89>
ucomisd %xmm1,%xmm4
jne    1197 <TkGetMiterPoints+0x67>
jp     1197 <TkGetMiterPoints+0x67>
xor    %eax,%eax
ucomisd %xmm2,%xmm0
seta   %al
lea    0xe70(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm4
jmp    11b9 <TkGetMiterPoints+0x89>
subsd  %xmm2,%xmm0
subsd  %xmm4,%xmm1
movapd %xmm3,(%rsp)
call   1030 <atan2@plt>
movapd (%rsp),%xmm3
movapd %xmm0,%xmm4
movsd  0x8(%r12),%xmm2
movsd  (%rbx),%xmm1
movsd  0x8(%rbx),%xmm0
ucomisd %xmm2,%xmm0
movsd  (%r12),%xmm5
jne    11e3 <TkGetMiterPoints+0xb3>
jp     11e3 <TkGetMiterPoints+0xb3>
cmpltsd %xmm1,%xmm5
movsd  0xe43(%rip),%xmm0
andnpd %xmm0,%xmm5
jmp    1229 <TkGetMiterPoints+0xf9>
ucomisd %xmm5,%xmm1
jne    1202 <TkGetMiterPoints+0xd2>
jp     1202 <TkGetMiterPoints+0xd2>
xor    %eax,%eax
ucomisd %xmm2,%xmm0
seta   %al
lea    0xe05(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm5
jmp    1229 <TkGetMiterPoints+0xf9>
subsd  %xmm2,%xmm0
subsd  %xmm5,%xmm1
movapd %xmm3,(%rsp)
movapd %xmm4,0x20(%rsp)
call   1030 <atan2@plt>
movapd 0x20(%rsp),%xmm4
movapd (%rsp),%xmm3
movapd %xmm0,%xmm5
movapd %xmm4,%xmm0
subsd  %xmm5,%xmm0
ucomisd 0xde7(%rip),%xmm0
jbe    1245 <TkGetMiterPoints+0x115>
addsd  0xdf5(%rip),%xmm0
jmp    125b <TkGetMiterPoints+0x12b>
movsd  0xddb(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    125b <TkGetMiterPoints+0x12b>
addsd  0xdd5(%rip),%xmm0
movsd  0xddd(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    1279 <TkGetMiterPoints+0x149>
xor    %eax,%eax
ucomisd 0xdd5(%rip),%xmm0
ja     1399 <TkGetMiterPoints+0x269>
movsd  0xdcf(%rip),%xmm1
mulsd  %xmm1,%xmm3
movapd %xmm3,(%rsp)
mulsd  %xmm1,%xmm0
movapd %xmm4,0x20(%rsp)
movapd %xmm5,0x10(%rsp)
call   1040 <sin@plt>
movapd (%rsp),%xmm3
divsd  %xmm0,%xmm3
movapd 0xd60(%rip),%xmm0
xorpd  %xmm3,%xmm0
xorpd  %xmm2,%xmm2
movapd %xmm3,%xmm1
cmpltsd %xmm2,%xmm1
andpd  %xmm1,%xmm0
andnpd %xmm3,%xmm1
orpd   %xmm0,%xmm1
movapd %xmm1,(%rsp)
movapd 0x10(%rsp),%xmm1
movapd 0x20(%rsp),%xmm0
addsd  %xmm0,%xmm1
mulsd  0xd66(%rip),%xmm1
movapd %xmm1,0x10(%rsp)
movsd  0xd28(%rip),%xmm2
addsd  %xmm2,%xmm0
movapd %xmm0,%xmm2
movapd %xmm1,%xmm0
subsd  %xmm2,%xmm0
call   1040 <sin@plt>
movsd  0xd0b(%rip),%xmm1
movapd 0x10(%rsp),%xmm2
addsd  %xmm2,%xmm1
cmpltsd 0xd30(%rip),%xmm0
andpd  %xmm0,%xmm1
andnpd %xmm2,%xmm0
orpd   %xmm1,%xmm0
movapd %xmm0,0x10(%rsp)
call   1050 <cos@plt>
mulsd  (%rsp),%xmm0
movsd  (%r12),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%r15)
movsd  (%r12),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,(%r14)
movapd 0x10(%rsp),%xmm0
call   1040 <sin@plt>
mulsd  (%rsp),%xmm0
movsd  0x8(%r12),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%r15)
movsd  0x8(%r12),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%r14)
mov    $0x1,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@TkGetMiterPoints.elevenDegrees = internal global float 0x3FC8930120000000
define i32 @TkGetMiterPoints(double* %0, double* %1, double* %2, double %3, double* %4, double* %5) {
%7 = alloca i32
%8 = alloca double*
%9 = alloca double*
%10 = alloca double*
%11 = alloca double
%12 = alloca double*
%13 = alloca double*
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
store double* %0, double** %8
store double* %1, double** %9
store double* %2, double** %10
store double %3, double* %11
store double* %4, double** %12
store double* %5, double** %13
%21 = load double*, double** %9
%22 = getelementptr inbounds double, double* %21, i64 1
%23 = load double, double* %22
%24 = load double*, double** %8
%25 = getelementptr inbounds double, double* %24, i64 1
%26 = load double, double* %25
%27 = fcmp oeq double %23, %26
br i1 %27, label %28, label %38
28: ; preds = %6
%29 = load double*, double** %9
%30 = getelementptr inbounds double, double* %29, i64 0
%31 = load double, double* %30
%32 = load double*, double** %8
%33 = getelementptr inbounds double, double* %32, i64 0
%34 = load double, double* %33
%35 = fcmp olt double %31, %34
%36 = zext i1 %35 to i64
%37 = select i1 %35, double 0.000000e+00, double 0x400921FB54442D18
store double %37, double* %14
br label %73
38: ; preds = %6
%39 = load double*, double** %9
%40 = getelementptr inbounds double, double* %39, i64 0
%41 = load double, double* %40
%42 = load double*, double** %8
%43 = getelementptr inbounds double, double* %42, i64 0
%44 = load double, double* %43
%45 = fcmp oeq double %41, %44
br i1 %45, label %46, label %56
46: ; preds = %38
%47 = load double*, double** %9
%48 = getelementptr inbounds double, double* %47, i64 1
%49 = load double, double* %48
%50 = load double*, double** %8
%51 = getelementptr inbounds double, double* %50, i64 1
%52 = load double, double* %51
%53 = fcmp olt double %49, %52
%54 = zext i1 %53 to i64
%55 = select i1 %53, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18
store double %55, double* %14
br label %72
56: ; preds = %38
%57 = load double*, double** %8
%58 = getelementptr inbounds double, double* %57, i64 1
%59 = load double, double* %58
%60 = load double*, double** %9
%61 = getelementptr inbounds double, double* %60, i64 1
%62 = load double, double* %61
%63 = fsub double %59, %62
%64 = load double*, double** %8
%65 = getelementptr inbounds double, double* %64, i64 0
%66 = load double, double* %65
%67 = load double*, double** %9
%68 = getelementptr inbounds double, double* %67, i64 0
%69 = load double, double* %68
%70 = fsub double %66, %69
%71 = call double @atan2(double %63, double %70)
store double %71, double* %14
br label %72
72: ; preds = %56, %46
br label %73
73: ; preds = %72, %28
%74 = load double*, double** %10
%75 = getelementptr inbounds double, double* %74, i64 1
%76 = load double, double* %75
%77 = load double*, double** %9
%78 = getelementptr inbounds double, double* %77, i64 1
%79 = load double, double* %78
%80 = fcmp oeq double %76, %79
br i1 %80, label %81, label %91
81: ; preds = %73
%82 = load double*, double** %10
%83 = getelementptr inbounds double, double* %82, i64 0
%84 = load double, double* %83
%85 = load double*, double** %9
%86 = getelementptr inbounds double, double* %85, i64 0
%87 = load double, double* %86
%88 = fcmp ogt double %84, %87
%89 = zext i1 %88 to i64
%90 = select i1 %88, double 0.000000e+00, double 0x400921FB54442D18
store double %90, double* %15
br label %126
91: ; preds = %73
%92 = load double*, double** %10
%93 = getelementptr inbounds double, double* %92, i64 0
%94 = load double, double* %93
%95 = load double*, double** %9
%96 = getelementptr inbounds double, double* %95, i64 0
%97 = load double, double* %96
%98 = fcmp oeq double %94, %97
br i1 %98, label %99, label %109
99: ; preds = %91
%100 = load double*, double** %10
%101 = getelementptr inbounds double, double* %100, i64 1
%102 = load double, double* %101
%103 = load double*, double** %9
%104 = getelementptr inbounds double, double* %103, i64 1
%105 = load double, double* %104
%106 = fcmp ogt double %102, %105
%107 = zext i1 %106 to i64
%108 = select i1 %106, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18
store double %108, double* %15
br label %125
109: ; preds = %91
%110 = load double*, double** %10
%111 = getelementptr inbounds double, double* %110, i64 1
%112 = load double, double* %111
%113 = load double*, double** %9
%114 = getelementptr inbounds double, double* %113, i64 1
%115 = load double, double* %114
%116 = fsub double %112, %115
%117 = load double*, double** %10
%118 = getelementptr inbounds double, double* %117, i64 0
%119 = load double, double* %118
%120 = load double*, double** %9
%121 = getelementptr inbounds double, double* %120, i64 0
%122 = load double, double* %121
%123 = fsub double %119, %122
%124 = call double @atan2(double %116, double %123)
store double %124, double* %15
br label %125
125: ; preds = %109, %99
br label %126
126: ; preds = %125, %81
%127 = load double, double* %14
%128 = load double, double* %15
%129 = fsub double %127, %128
store double %129, double* %16
%130 = load double, double* %16
%131 = fcmp ogt double %130, 0x400921FB54442D18
br i1 %131, label %132, label %135
132: ; preds = %126
%133 = load double, double* %16
%134 = fsub double %133, 0x401921FB54442D18
store double %134, double* %16
br label %142
135: ; preds = %126
%136 = load double, double* %16
%137 = fcmp olt double %136, 0xC00921FB54442D18
br i1 %137, label %138, label %141
138: ; preds = %135
%139 = load double, double* %16
%140 = fadd double %139, 0x401921FB54442D18
store double %140, double* %16
br label %141
141: ; preds = %138, %135
br label %142
142: ; preds = %141, %132
%143 = load double, double* %16
%144 = load float, float* @TkGetMiterPoints.elevenDegrees
%145 = fpext float %144 to double
%146 = fcmp olt double %143, %145
br i1 %146, label %147, label %154
147: ; preds = %142
%148 = load double, double* %16
%149 = load float, float* @TkGetMiterPoints.elevenDegrees
%150 = fneg float %149
%151 = fpext float %150 to double
%152 = fcmp ogt double %148, %151
br i1 %152, label %153, label %154
153: ; preds = %147
store i32 0, i32* %7
br label %217
154: ; preds = %147, %142
%155 = load double, double* %11
%156 = fmul double 5.000000e-01, %155
%157 = load double, double* %16
%158 = fmul double 5.000000e-01, %157
%159 = call double @sin(double %158)
%160 = fdiv double %156, %159
store double %160, double* %18
%161 = load double, double* %18
%162 = fcmp olt double %161, 0.000000e+00
br i1 %162, label %163, label %166
163: ; preds = %154
%164 = load double, double* %18
%165 = fneg double %164
store double %165, double* %18
br label %166
166: ; preds = %163, %154
%167 = load double, double* %14
%168 = load double, double* %15
%169 = fadd double %167, %168
%170 = fdiv double %169, 2.000000e+00
store double %170, double* %17
%171 = load double, double* %17
%172 = load double, double* %14
%173 = fadd double %172, 0x400921FB54442D18
%174 = fsub double %171, %173
%175 = call double @sin(double %174)
%176 = fcmp olt double %175, 0.000000e+00
br i1 %176, label %177, label %180
177: ; preds = %166
%178 = load double, double* %17
%179 = fadd double %178, 0x400921FB54442D18
store double %179, double* %17
br label %180
180: ; preds = %177, %166
%181 = load double, double* %18
%182 = load double, double* %17
%183 = call double @cos(double %182)
%184 = fmul double %181, %183
store double %184, double* %19
%185 = load double*, double** %9
%186 = getelementptr inbounds double, double* %185, i64 0
%187 = load double, double* %186
%188 = load double, double* %19
%189 = fadd double %187, %188
%190 = load double*, double** %12
%191 = getelementptr inbounds double, double* %190, i64 0
store double %189, double* %191
%192 = load double*, double** %9
%193 = getelementptr inbounds double, double* %192, i64 0
%194 = load double, double* %193
%195 = load double, double* %19
%196 = fsub double %194, %195
%197 = load double*, double** %13
%198 = getelementptr inbounds double, double* %197, i64 0
store double %196, double* %198
%199 = load double, double* %18
%200 = load double, double* %17
%201 = call double @sin(double %200)
%202 = fmul double %199, %201
store double %202, double* %20
%203 = load double*, double** %9
%204 = getelementptr inbounds double, double* %203, i64 1
%205 = load double, double* %204
%206 = load double, double* %20
%207 = fadd double %205, %206
%208 = load double*, double** %12
%209 = getelementptr inbounds double, double* %208, i64 1
store double %207, double* %209
%210 = load double*, double** %9
%211 = getelementptr inbounds double, double* %210, i64 1
%212 = load double, double* %211
%213 = load double, double* %20
%214 = fsub double %212, %213
%215 = load double*, double** %13
%216 = getelementptr inbounds double, double* %215, i64 1
store double %214, double* %216
store i32 1, i32* %7
br label %217
217: ; preds = %180, %153
%218 = load i32, i32* %7
ret i32 %218
}

LLVM IR (-O2):
define i32 @TkGetMiterPoints(double* nocapture %0, double* nocapture %1, double* nocapture %2, double %3, double* nocapture writeonly %4, double* nocapture writeonly %5) {
%7 = getelementptr inbounds double, double* %1, i64 1
%8 = load double, double* %7
%9 = getelementptr inbounds double, double* %0, i64 1
%10 = load double, double* %9
%11 = fcmp oeq double %8, %10
%12 = load double, double* %1
%13 = load double, double* %0
br i1 %11, label %14, label %17
14: ; preds = %6
%15 = fcmp olt double %12, %13
%16 = select i1 %15, double 0.000000e+00, double 0x400921FB54442D18
br label %27
17: ; preds = %6
%18 = fcmp oeq double %12, %13
br i1 %18, label %19, label %22
19: ; preds = %17
%20 = fcmp olt double %8, %10
%21 = select i1 %20, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18
br label %27
22: ; preds = %17
%23 = fsub double %10, %8
%24 = fsub double %13, %12
%25 = tail call double @atan2(double %23, double %24)
%26 = load double, double* %7
br label %27
27: ; preds = %19, %22, %14
%28 = phi double [ %8, %14 ], [ %8, %19 ], [ %26, %22 ]
%29 = phi double [ %16, %14 ], [ %21, %19 ], [ %25, %22 ]
%30 = getelementptr inbounds double, double* %2, i64 1
%31 = load double, double* %30
%32 = fcmp oeq double %31, %28
%33 = load double, double* %2
%34 = load double, double* %1
br i1 %32, label %35, label %38
35: ; preds = %27
%36 = fcmp ogt double %33, %34
%37 = select i1 %36, double 0.000000e+00, double 0x400921FB54442D18
br label %47
38: ; preds = %27
%39 = fcmp oeq double %33, %34
br i1 %39, label %40, label %43
40: ; preds = %38
%41 = fcmp ogt double %31, %28
%42 = select i1 %41, double 0x3FF921FB54442D18, double 0xBFF921FB54442D18
br label %47
43: ; preds = %38
%44 = fsub double %31, %28
%45 = fsub double %33, %34
%46 = tail call double @atan2(double %44, double %45)
br label %47
47: ; preds = %40, %43, %35
%48 = phi double [ %37, %35 ], [ %42, %40 ], [ %46, %43 ]
%49 = fsub double %29, %48
%50 = fcmp ogt double %49, 0x400921FB54442D18
br i1 %50, label %51, label %53
51: ; preds = %47
%52 = fadd double %49, 0xC01921FB54442D18
br label %57
53: ; preds = %47
%54 = fcmp olt double %49, 0xC00921FB54442D18
br i1 %54, label %55, label %57
55: ; preds = %53
%56 = fadd double %49, 0x401921FB54442D18
br label %57
57: ; preds = %53, %55, %51
%58 = phi double [ %52, %51 ], [ %56, %55 ], [ %49, %53 ]
%59 = fcmp olt double %58, 0x3FC8930120000000
%60 = fcmp ogt double %58, 0xBFC8930120000000
%61 = and i1 %59, %60
br i1 %61, label %92, label %62
62: ; preds = %57
%63 = fmul double %3, 5.000000e-01
%64 = fmul double %58, 5.000000e-01
%65 = tail call double @sin(double %64)
%66 = fdiv double %63, %65
%67 = fcmp olt double %66, 0.000000e+00
%68 = fneg double %66
%69 = select i1 %67, double %68, double %66
%70 = fadd double %29, %48
%71 = fmul double %70, 5.000000e-01
%72 = fadd double %29, 0x400921FB54442D18
%73 = fsub double %71, %72
%74 = tail call double @sin(double %73)
%75 = fcmp olt double %74, 0.000000e+00
%76 = fadd double %71, 0x400921FB54442D18
%77 = select i1 %75, double %76, double %71
%78 = tail call double @cos(double %77)
%79 = fmul double %78, %69
%80 = load double, double* %1
%81 = fadd double %80, %79
store double %81, double* %4
%82 = load double, double* %1
%83 = fsub double %82, %79
store double %83, double* %5
%84 = tail call double @sin(double %77)
%85 = fmul double %69, %84
%86 = load double, double* %7
%87 = fadd double %86, %85
%88 = getelementptr inbounds double, double* %4, i64 1
store double %87, double* %88
%89 = load double, double* %7
%90 = fsub double %89, %85
%91 = getelementptr inbounds double, double* %5, i64 1
store double %90, double* %91
br label %92
92: ; preds = %57, %62
%93 = phi i32 [ 1, %62 ], [ 0, %57 ]
ret i32 %93
}