LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Polygon.cpp
// Function: gaps::R2Polygon::Clip(gaps::R2Box const&)
void R2Polygon::
Clip(const R2Box& box) 
{
  // Clip to each side of box
  if (npoints == 0) return;
  Clip(R2Line(1, 0, -(box.XMin())));
  if (npoints == 0) return;
  Clip(R2Line(-1, 0, box.XMax()));
  if (npoints == 0) return;
  Clip(R2Line(0, 1, -(box.YMin())));
  if (npoints == 0) return;
  Clip(R2Line(0, -1, box.YMax()));
}

// Assembly:
cmpl $0x0, 0x10(%rdi)
je 0x64ed3
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movsd 0x8(%rsi), %xmm2
xorps 0x3d215(%rip), %xmm2    # 0xa2020
leaq 0x8(%rsp), %r15
movsd 0x3d220(%rip), %xmm0    # 0xa2038
xorps %xmm1, %xmm1
movq %r15, %rdi
callq 0x67b0e
movq (%rbx), %rax
movq %rbx, %rdi
movq %r15, %rsi
callq *0x78(%rax)
cmpl $0x0, 0x10(%rbx)
je 0x64eca
movsd 0x18(%r14), %xmm2
leaq 0x8(%rsp), %r15
movsd 0x3d1fc(%rip), %xmm0    # 0xa2048
xorps %xmm1, %xmm1
movq %r15, %rdi
callq 0x67b0e
movq (%rbx), %rax
movq %rbx, %rdi
movq %r15, %rsi
callq *0x78(%rax)
cmpl $0x0, 0x10(%rbx)
je 0x64eca
movsd 0x10(%r14), %xmm2
xorps 0x3d1aa(%rip), %xmm2    # 0xa2020
leaq 0x8(%rsp), %r15
movsd 0x3d1b5(%rip), %xmm1    # 0xa2038
xorps %xmm0, %xmm0
movq %r15, %rdi
callq 0x67b0e
movq (%rbx), %rax
movq %rbx, %rdi
movq %r15, %rsi
callq *0x78(%rax)
cmpl $0x0, 0x10(%rbx)
je 0x64eca
movsd 0x20(%r14), %xmm2
leaq 0x8(%rsp), %r14
movsd 0x3d195(%rip), %xmm1    # 0xa2048
xorps %xmm0, %xmm0
movq %r14, %rdi
callq 0x67b0e
movq (%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *0x78(%rax)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Polygon.cpp
// Function: gaps::R2Polygon::Transform(gaps::R2Transformation const&)
void R2Polygon::
Transform(const R2Transformation& transformation) 
{
  // Transform points
  bbox = R2null_box;
  for (int i = 0; i < npoints; i++) {
    points[i].Transform(transformation);
    bbox.Union(points[i]);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
addq $0x20, %rdi
leaq 0x482fea(%rip), %r15    # 0x4e7ed8
leaq 0x8(%r15), %rsi
callq 0x681de
leaq 0x30(%r14), %rdi
addq $0x18, %r15
movq %r15, %rsi
callq 0x681de
cmpl $0x0, 0x10(%r14)
jle 0x64f46
leaq 0x18(%r14), %r15
xorl %r12d, %r12d
xorl %r13d, %r13d
movq 0x8(%r14), %rdi
addq %r12, %rdi
movq %rbx, %rsi
callq 0x681ba
movq 0x8(%r14), %rsi
addq %r12, %rsi
movq %r15, %rdi
callq 0x65986
incq %r13
movslq 0x10(%r14), %rax
addq $0x10, %r12
cmpq %rax, %r13
jl 0x64f18
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Polygon.cpp
// Function: gaps::R2Polygon::operator=(gaps::R2Polygon const&)
R2Polygon& R2Polygon::
operator=(const R2Polygon& polygon) 
{
  // Delete previous points
  if (points) {
    delete points;
    points = NULL;
  }
  
  // Copy properties
  clockwise = polygon.clockwise;
  bbox = polygon.bbox;

  // Copy points
  npoints = polygon.npoints;
  if (npoints > 0) {
    points = new R2Point [ npoints ];
    for (int i = 0; i < npoints; i++) {
      points[i] = polygon.points[i];
    }
  }

  // Return this
  return *this;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x64f7a
movl $0x10, %esi
callq 0xe450
movq $0x0, 0x8(%rbx)
movl 0x40(%r14), %eax
movl %eax, 0x40(%rbx)
leaq 0x20(%rbx), %rdi
leaq 0x20(%r14), %rsi
callq 0x681de
leaq 0x30(%rbx), %rdi
leaq 0x30(%r14), %rsi
callq 0x681de
movslq 0x10(%r14), %r15
movl %r15d, 0x10(%rbx)
testq %r15, %r15
jle 0x64fff
shlq $0x4, %r15
movq %r15, %rdi
callq 0xe030
movq %rax, %r12
xorl %r13d, %r13d
leaq (%r12,%r13), %rdi
callq 0x680a4
addq $0x10, %r13
cmpq %r13, %r15
jne 0x64fba
movq %r12, 0x8(%rbx)
cmpl $0x0, 0x10(%rbx)
jle 0x64fff
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x8(%r14), %rsi
addq %r15, %rsi
movq 0x8(%rbx), %rdi
addq %r15, %rdi
callq 0x681de
incq %r12
movslq 0x10(%rbx), %rax
addq $0x10, %r15
cmpq %rax, %r12
jl 0x64fdc
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %r12, %rdi
movq %r15, %rsi
callq 0xe8c0
movq %rbx, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Polygon.cpp
// Function: gaps::R2Polygon::Print(_IO_FILE*) const
void R2Polygon::
Print(FILE *fp) const
{
  // Print points
  fprintf(fp, "%d\n", npoints);
  for (int i = 0; i < npoints; i++) {
    fprintf(fp, "%12.6f %12.6f\n", points[i].X(), points[i].Y());
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0x10(%rdi), %edx
leaq 0x3dcde(%rip), %rsi     # 0xa2d19
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe670
cmpl $0x0, 0x10(%r14)
jle 0x6508a
movl $0x8, %r12d
xorl %r13d, %r13d
leaq 0x447e4(%rip), %r15     # 0xa9840
movq 0x8(%r14), %rax
movsd -0x8(%rax,%r12), %xmm0
movsd (%rax,%r12), %xmm1
movq %rbx, %rdi
movq %r15, %rsi
movb $0x2, %al
callq 0xe670
incq %r13
movslq 0x10(%r14), %rax
addq $0x10, %r12
cmpq %rax, %r13
jl 0x6505c
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Polygon.cpp
// Function: gaps::R2Polygon::ReadTheraFile(char const*)
int R2Polygon::
ReadTheraFile(const char *filename)
{
  // Open file
  FILE *fp = fopen(filename, "r");
  if (!fp) {
    RNFail("Unable to open polygon file: %s\n", filename);
    return 0;
  }

  // Read header line
  int ndimensions;
  double polygon_depth, sample_spacing;
  if (fscanf(fp, "%d %d %lf %lf", &ndimensions, &npoints, &polygon_depth, &sample_spacing) != 4) {
    RNFail("Unable to read polygon file header: %s\n", filename);
    return 0;
  }

  // Allocate points
  points = new R2Point [ npoints ];
  if (!points) {
    RNFail("Unable to allocate points for polygon: %s\n", filename);
    return 0;
  }

  // Read points
  for (int i = 0; i < npoints; i++) {
    double x, y;
    if (fscanf(fp, "%lf %lf", &x, &y) != 2) {
      RNFail("Unable to read point %d from polygon file %s\n", npoints, filename);
      return 0;
    }

    // Add point
    points[i].Reset(x,y);
    bbox.Union(points[i]);
  }

  // Close file
  fclose(fp);

  // Return success
  return npoints;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x46d24(%rip), %rsi     # 0xabdd3
movq %rbx, %rdi
callq 0xe530
testq %rax, %rax
je 0x651b5
movq %rax, %r15
leaq 0x10(%r14), %r12
leaq 0x447a2(%rip), %rsi     # 0xa9870
xorl %ebp, %ebp
leaq 0x24(%rsp), %rdx
leaq 0x30(%rsp), %r8
leaq 0x28(%rsp), %r9
movq %rax, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0xe840
cmpl $0x4, %eax
jne 0x651c0
movq %rbx, 0x8(%rsp)
movq %r12, (%rsp)
movslq (%r12), %rbx
movq %rbx, %rbp
shlq $0x4, %rbp
testq %rbx, %rbx
movq $-0x1, %r12
cmovnsq %rbp, %r12
movq %r12, %rdi
callq 0xe030
movq %rax, %r13
testq %rbx, %rbx
je 0x651d3
xorl %ebx, %ebx
leaq (%rbx,%r13), %rdi
callq 0x680a4
addq $0x10, %rbx
cmpq %rbx, %rbp
jne 0x6512d
cmpl $0x0, 0x10(%r14)
movq %r13, 0x8(%r14)
jle 0x651d7
leaq 0x18(%r14), %r13
leaq 0x4471d(%rip), %rbx     # 0xa9876
xorl %r12d, %r12d
xorl %ebp, %ebp
movq %r15, %rdi
movq %rbx, %rsi
leaq 0x18(%rsp), %rdx
leaq 0x10(%rsp), %rcx
xorl %eax, %eax
callq 0xe840
cmpl $0x2, %eax
jne 0x651f6
movq 0x8(%r14), %rax
leaq (%rax,%r12), %rsi
movsd 0x18(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movsd %xmm0, (%rax,%r12)
movsd %xmm1, 0x8(%rax,%r12)
movq %r13, %rdi
callq 0x65986
incq %rbp
movslq 0x10(%r14), %rax
addq $0x10, %r12
cmpq %rax, %rbp
jl 0x6515e
jmp 0x651d7
leaq 0x44693(%rip), %rdi     # 0xa984f
xorl %ebp, %ebp
jmp 0x651c7
leaq 0x446b7(%rip), %rdi     # 0xa987e
movq %rbx, %rsi
xorl %eax, %eax
callq 0x719d2
jmp 0x651e5
movq %r13, 0x8(%r14)
movq %r15, %rdi
callq 0xe430
movq (%rsp), %rax
movl (%rax), %ebp
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rsp), %rax
movl (%rax), %esi
leaq 0x446a3(%rip), %rdi     # 0xa98a6
xorl %ebp, %ebp
movq 0x8(%rsp), %rdx
xorl %eax, %eax
callq 0x719d2
jmp 0x651e5
movq %rax, %rbx
movq %r13, %rdi
movq %r12, %rsi
callq 0xe8c0
movq %rbx, %rdi
callq 0xe7e0
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Box.cpp
// Function: gaps::R2Box::Corner(int) const
const R2Point R2Box::
Corner (RNQuadrant quadrant) const
{
    // Return corner point 
    switch (quadrant) {
    case RN_NN_QUADRANT: return minpt;
    case RN_NP_QUADRANT: return R2Point(minpt.X(), maxpt.Y());
    case RN_PN_QUADRANT: return R2Point(maxpt.X(), minpt.Y());
    case RN_PP_QUADRANT: return maxpt;
    default: RNAbort("Invalid quadrant for box corner"); return R2null_point;
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl $0x3, %edx
ja 0x65577
movl %edx, %eax
leaq 0x443be(%rip), %rcx     # 0xa9900
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
addq $0x8, %rsi
jmp 0x6558c
movsd 0x10(%rsi), %xmm1
movsd 0x18(%rsi), %xmm0
jmp 0x6556d
addq $0x18, %rsi
jmp 0x6558c
movsd 0x8(%rsi), %xmm0
movsd 0x20(%rsi), %xmm1
movq %rbx, %rdi
callq 0x680a6
jmp 0x65594
leaq 0x443a0(%rip), %rdi     # 0xa991e
xorl %eax, %eax
callq 0x718f6
leaq 0x482cf4(%rip), %rsi    # 0x4e8280
movq %rbx, %rdi
callq 0x680b0
movq %rbx, %rax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Box.cpp
// Function: gaps::R2Box::Quadrant(int, int) const
const R2Box R2Box::
Quadrant (RNDirection xdir, RNDirection ydir) const
{
    // Return box in quadrant (xdir, ydir)
    R2Box result;
    R2Point centroid = Centroid();
    if (xdir == RN_HI) { result[RN_LO][RN_X] = centroid[RN_X]; result[RN_HI][RN_X] = maxpt[RN_X]; }
    else { result[RN_LO][RN_X] = minpt[RN_X]; result[RN_HI][RN_X] = centroid[RN_X]; }
    if (ydir == RN_HI) { result[RN_LO][RN_Y] = centroid[RN_Y]; result[RN_HI][RN_Y] = maxpt[RN_Y]; }
    else { result[RN_LO][RN_Y] = minpt[RN_Y]; result[RN_HI][RN_Y] = centroid[RN_Y]; }
    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %ecx, %r15d
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x65234
movsd 0x18(%r14), %xmm0
movsd 0x20(%r14), %xmm1
addsd 0x8(%r14), %xmm0
movsd 0x3ca34(%rip), %xmm2    # 0xa2030
mulsd %xmm2, %xmm0
addsd 0x10(%r14), %xmm1
mulsd %xmm2, %xmm1
movq %rsp, %rdi
callq 0x680a6
movd %r15d, %xmm0
movd %ebp, %xmm1
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
pshufd $0x50, %xmm1, %xmm0     # xmm0 = xmm1[0,0,1,1]
pcmpeqd 0x442c4(%rip), %xmm0    # 0xa98f0
movdqu 0x8(%r14), %xmm1
movdqu 0x18(%r14), %xmm2
movdqa %xmm0, %xmm3
pandn %xmm1, %xmm3
movdqa (%rsp), %xmm1
movdqa %xmm1, %xmm4
pand %xmm0, %xmm4
por %xmm3, %xmm4
pand %xmm0, %xmm2
pandn %xmm1, %xmm0
por %xmm2, %xmm0
movdqu %xmm0, 0x18(%rbx)
movdqu %xmm4, 0x8(%rbx)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x65c14
movq %r14, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Box.cpp
// Function: gaps::R2Box::ClosestPoint(gaps::R2Point const&) const
const R2Point R2Box::
ClosestPoint(const R2Point& point) const
{
    // Return closest point in box
    R2Point closest(point);
    if (closest.X() < XMin()) closest[RN_X] = XMin();
    else if (closest.X() > XMax()) closest[RN_X] = XMax();
    if (closest.Y() < YMin()) closest[RN_Y] = YMin();
    else if (closest.Y() > YMax()) closest[RN_Y] = YMax();
    return closest;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rdx, %rsi
callq 0x680b0
movsd (%rbx), %xmm1
movsd 0x8(%r14), %xmm0
ucomisd %xmm1, %xmm0
ja 0x65770
movsd 0x18(%r14), %xmm0
ucomisd %xmm0, %xmm1
jbe 0x65774
movsd %xmm0, (%rbx)
movsd 0x8(%rbx), %xmm1
movsd 0x10(%r14), %xmm0
ucomisd %xmm1, %xmm0
ja 0x65791
movsd 0x20(%r14), %xmm0
ucomisd %xmm0, %xmm1
jbe 0x65796
movsd %xmm0, 0x8(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Box.cpp
// Function: gaps::R2Box::Inflate(double)
void R2Box::
Inflate (RNScalar fraction) 
{
  // Scale box around centroid by fraction
  if (IsEmpty()) return;
  R2Point centroid = Centroid();
  R2Vector diagonal = Max() - centroid;
  Reset(centroid - fraction * diagonal, centroid + fraction * diagonal);
}

// Assembly:
movaps %xmm0, %xmm4
movsd 0x8(%rdi), %xmm0
movsd 0x18(%rdi), %xmm2
ucomisd %xmm2, %xmm0
ja 0x6595a
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x70, %rsp
movq %rdi, %rbx
movsd 0x10(%rdi), %xmm1
movsd 0x20(%rdi), %xmm3
ucomisd %xmm3, %xmm1
ja 0x6594d
leaq 0x18(%rbx), %r15
addsd %xmm2, %xmm0
movsd 0x3c779(%rip), %xmm2    # 0xa2030
mulsd %xmm2, %xmm0
addsd %xmm3, %xmm1
mulsd %xmm2, %xmm1
leaq 0x60(%rsp), %r14
movq %r14, %rdi
movsd %xmm4, 0x8(%rsp)
callq 0x680a6
leaq 0x50(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x682e3
leaq 0x30(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
movsd 0x8(%rsp), %xmm0
callq 0x6870c
leaq 0x40(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x68303
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
movsd 0x8(%rsp), %xmm0
callq 0x6870c
leaq 0x20(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x682cf
movq (%rbx), %rax
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq *0x90(%rax)
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R3Matrix.cpp
// Function: gaps::R3Matrix::HasTranslation() const
const RNBoolean R3Matrix::
HasTranslation(void) const
{
    // Return whether matrix transformation has translation
    if (RNIsNotZero(m[0][2])) return TRUE;
    if (RNIsNotZero(m[1][2])) return TRUE;
    return FALSE;
}

// Assembly:
movsd 0x10(%rdi), %xmm2
leaq 0x7f8bc(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm0
ucomisd %xmm0, %xmm2
movl $0x1, %eax
ja 0x66317
movapd 0x3bd2d(%rip), %xmm1    # 0xa2020
xorpd %xmm0, %xmm1
ucomisd %xmm2, %xmm1
ja 0x66317
movsd 0x28(%rdi), %xmm2
cmpltpd %xmm2, %xmm0
cmpltpd %xmm1, %xmm2
orpd %xmm0, %xmm2
movd %xmm2, %eax
andl $0x1, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R3Matrix.cpp
// Function: gaps::R3Matrix::HasScale() const
const RNBoolean R3Matrix::
HasScale(void) const
{
    // Return whether matrix transformation has scale
    RNScalar d0 = m[0][0]*m[0][0] + m[1][0]*m[1][0];
    if (RNIsNotEqual(d0, 1.0)) return TRUE;
    RNScalar d1 = m[0][1]*m[0][1] + m[1][1]*m[1][1];
    if (RNIsNotEqual(d1, 1.0)) return TRUE;
    return FALSE;
}

// Assembly:
movsd (%rdi), %xmm2
movsd 0x18(%rdi), %xmm0
mulsd %xmm0, %xmm0
mulsd %xmm2, %xmm2
addsd %xmm0, %xmm2
leaq 0x7f864(%rip), %rax     # 0xe5b98
addsd 0x3bd0c(%rip), %xmm2    # 0xa2048
movsd (%rax), %xmm0
ucomisd %xmm0, %xmm2
movl $0x1, %eax
ja 0x66390
movapd 0x3bccd(%rip), %xmm1    # 0xa2020
xorpd %xmm0, %xmm1
ucomisd %xmm2, %xmm1
ja 0x66390
movsd 0x8(%rdi), %xmm2
movsd 0x20(%rdi), %xmm3
mulsd %xmm3, %xmm3
mulsd %xmm2, %xmm2
addsd %xmm3, %xmm2
addsd 0x3bccd(%rip), %xmm2    # 0xa2048
cmpltpd %xmm2, %xmm0
cmpltpd %xmm1, %xmm2
orpd %xmm0, %xmm2
movd %xmm2, %eax
andl $0x1, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R3Matrix.cpp
// Function: gaps::R3Matrix::HasRotation() const
const RNBoolean R3Matrix::
HasRotation(void) const
{
    // Return whether matrix transformation has rotation
    if (RNIsNotZero(m[0][1])) return TRUE;
    if (RNIsNotZero(m[1][0])) return TRUE;
    return FALSE;
}

// Assembly:
movsd 0x8(%rdi), %xmm2
leaq 0x7f7fa(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm0
ucomisd %xmm0, %xmm2
movl $0x1, %eax
ja 0x663d9
movapd 0x3bc6b(%rip), %xmm1    # 0xa2020
xorpd %xmm0, %xmm1
ucomisd %xmm2, %xmm1
ja 0x663d9
movsd 0x18(%rdi), %xmm2
cmpltpd %xmm2, %xmm0
cmpltpd %xmm1, %xmm2
orpd %xmm0, %xmm2
movd %xmm2, %eax
andl $0x1, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R3Matrix.cpp
// Function: gaps::R3Matrix::HasMirror() const
const RNBoolean R3Matrix::
HasMirror(void) const
{
    // Return whether matrix transformation has mirror operator
    R2Vector vx(m[0][0], m[1][0]);
    R2Vector vy(m[0][1], m[1][1]);
    return RNIsNegative(vx % vy);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movsd (%rdi), %xmm0
movsd 0x18(%rdi), %xmm1
leaq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0x683d2
movsd 0x8(%rbx), %xmm0
movsd 0x20(%rbx), %xmm1
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x683d2
movq %r14, %rdi
movq %rbx, %rsi
callq 0x68921
leaq 0x7f775(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm1
xorpd 0x3bbf1(%rip), %xmm1    # 0xa2020
xorl %eax, %eax
ucomisd %xmm0, %xmm1
seta %al
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R3Matrix.cpp
// Function: gaps::R3Matrix::Invert()
const RNScalar R3Matrix::
Determinant(void) const
{
    // Return matrix determinant
    return R3MatrixDet3(
        m[0][0], m[0][1], m[0][2], 
        m[1][0], m[1][1], m[1][2], 
        m[2][0], m[2][1], m[2][2]);
}

// Assembly:
movsd (%rdi), %xmm0
movsd 0x8(%rdi), %xmm5
movsd 0x20(%rdi), %xmm1
movupd 0x10(%rdi), %xmm2
movupd 0x28(%rdi), %xmm3
movupd 0x38(%rdi), %xmm6
movapd %xmm3, %xmm4
mulsd %xmm6, %xmm4
movapd %xmm6, %xmm7
unpckhpd %xmm6, %xmm7            # xmm7 = xmm7[1],xmm6[1]
movapd %xmm1, %xmm8
mulsd %xmm7, %xmm8
subsd %xmm4, %xmm8
movapd %xmm3, %xmm9
unpckhpd %xmm3, %xmm9            # xmm9 = xmm9[1],xmm3[1]
movapd %xmm3, %xmm10
mulsd %xmm9, %xmm10
movapd %xmm2, %xmm4
unpckhpd %xmm2, %xmm4            # xmm4 = xmm4[1],xmm2[1]
mulsd %xmm4, %xmm7
subsd %xmm10, %xmm7
mulsd %xmm5, %xmm7
mulsd %xmm0, %xmm8
subsd %xmm7, %xmm8
mulsd %xmm1, %xmm9
mulsd %xmm6, %xmm4
subsd %xmm9, %xmm4
mulsd %xmm2, %xmm4
addsd %xmm8, %xmm4
movapd 0x3bc60(%rip), %xmm7    # 0xa2270
andpd %xmm4, %xmm7
movsd 0x3c79b(%rip), %xmm8    # 0xa2db8
ucomisd %xmm7, %xmm8
jae 0x66750
movapd %xmm6, %xmm8
shufpd $0x1, %xmm6, %xmm8      # xmm8 = xmm8[1],xmm6[0]
movapd %xmm3, %xmm7
unpcklpd %xmm5, %xmm7            # xmm7 = xmm7[0],xmm5[0]
movapd 0x3b9dc(%rip), %xmm9    # 0xa2020
movapd %xmm6, %xmm10
mulpd %xmm7, %xmm10
xorpd %xmm9, %xmm7
movapd %xmm1, %xmm11
unpcklpd %xmm2, %xmm11           # xmm11 = xmm11[0],xmm2[0]
mulpd %xmm8, %xmm11
subpd %xmm10, %xmm11
movapd %xmm4, %xmm8
unpcklpd %xmm4, %xmm8            # xmm8 = xmm8[0],xmm4[0]
divpd %xmm8, %xmm11
movupd %xmm11, (%rdi)
movapd %xmm6, %xmm10
movsd %xmm1, %xmm10           # xmm10 = xmm1[0],xmm10[1]
mulpd %xmm2, %xmm10
movapd %xmm5, %xmm11
unpcklpd %xmm3, %xmm11           # xmm11 = xmm11[0],xmm3[0]
mulpd %xmm3, %xmm11
subpd %xmm10, %xmm11
divpd %xmm8, %xmm11
movupd %xmm11, 0x10(%rdi)
movapd %xmm1, %xmm10
unpcklpd %xmm0, %xmm10           # xmm10 = xmm10[0],xmm0[0]
movapd %xmm2, %xmm11
unpcklpd %xmm2, %xmm11           # xmm11 = xmm11[0],xmm2[0]
xorpd 0x3b95a(%rip), %xmm11   # 0xa2020
xorpd %xmm10, %xmm9
movhlps %xmm9, %xmm11           # xmm11 = xmm9[1],xmm11[1]
mulpd %xmm3, %xmm11
movapd %xmm2, %xmm9
unpcklpd %xmm0, %xmm9            # xmm9 = xmm9[0],xmm0[0]
movapd %xmm2, %xmm12
unpckhpd %xmm6, %xmm12           # xmm12 = xmm12[1],xmm6[1]
mulpd %xmm9, %xmm12
addpd %xmm11, %xmm12
divpd %xmm8, %xmm12
shufpd $0x1, %xmm12, %xmm12    # xmm12 = xmm12[1,0]
movupd %xmm12, 0x20(%rdi)
movapd %xmm3, %xmm9
shufpd $0x1, %xmm6, %xmm9      # xmm9 = xmm9[1],xmm6[0]
mulpd %xmm10, %xmm9
movapd %xmm2, %xmm10
shufpd $0x1, %xmm5, %xmm10     # xmm10 = xmm10[1],xmm5[0]
movsd %xmm6, %xmm3            # xmm3 = xmm6[0],xmm3[1]
mulpd %xmm10, %xmm3
subpd %xmm9, %xmm3
divpd %xmm8, %xmm3
movupd %xmm3, 0x30(%rdi)
mulpd %xmm2, %xmm7
unpckhpd %xmm7, %xmm7            # xmm7 = xmm7[1,1]
mulsd %xmm1, %xmm0
addsd %xmm7, %xmm0
divsd %xmm4, %xmm0
movsd %xmm0, 0x40(%rdi)
retq
leaq 0x3c769(%rip), %rdi     # 0xa2ec0
xorl %eax, %eax
jmp 0x71a8d
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R3Matrix.cpp
// Function: gaps::R3Matrix::Inverse() const
const R3Matrix R3Matrix::
Inverse(void) const
{
    // Return inverse of matrix
    R3Matrix inverse(*this);
    inverse.Invert();
    return inverse;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movups (%rsi), %xmm0
movups %xmm0, (%rdi)
movups 0x10(%rsi), %xmm0
movups %xmm0, 0x10(%rdi)
movups 0x20(%rsi), %xmm0
movups %xmm0, 0x20(%rdi)
movups 0x30(%rsi), %xmm0
movups %xmm0, 0x30(%rdi)
movsd 0x40(%rsi), %xmm0
movsd %xmm0, 0x40(%rdi)
callq 0x66582
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R3Matrix.cpp
// Function: gaps::R3Matrix::Translate(int, double)
void R3Matrix:: 
Translate(RNAxis axis, RNScalar offset)
{
    // Translate matrix along axis
    switch (axis) {
    case RN_XAXIS: 
	XTranslate(offset); 
	break;

    case RN_YAXIS: 
	YTranslate(offset); 
	break;

    default: 
	RNWarning("Matrix translate along undefined axis");
	break;
    }
}

// Assembly:
cmpl $0x1, %esi
je 0x66810
testl %esi, %esi
jne 0x66833
movsd (%rdi), %xmm1
mulsd %xmm0, %xmm1
addsd 0x10(%rdi), %xmm1
movsd %xmm1, 0x10(%rdi)
mulsd 0x18(%rdi), %xmm0
jmp 0x66828
movsd 0x8(%rdi), %xmm1
mulsd %xmm0, %xmm1
addsd 0x10(%rdi), %xmm1
movsd %xmm1, 0x10(%rdi)
mulsd 0x20(%rdi), %xmm0
addsd 0x28(%rdi), %xmm0
movsd %xmm0, 0x28(%rdi)
retq
leaq 0x3c6b4(%rip), %rdi     # 0xa2eee
xorl %eax, %eax
jmp 0x71a8d
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R3Matrix.cpp
// Function: gaps::R3Matrix::Scale(int, double)
void R3Matrix:: 
Scale(RNAxis axis, RNScalar scale)
{
    // Scale matrix along axis
    switch (axis) {
    case RN_XAXIS: 
	XScale(scale); 
	break;

    case RN_YAXIS: 
	YScale(scale); 
	break;

    default: 
	RNWarning("Matrix scale along undefined axis");
	break;
    }
}

// Assembly:
cmpl $0x1, %esi
je 0x6691c
testl %esi, %esi
jne 0x66935
movsd (%rdi), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, (%rdi)
mulsd 0x18(%rdi), %xmm0
movsd %xmm0, 0x18(%rdi)
retq
movsd 0x8(%rdi), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rdi)
mulsd 0x20(%rdi), %xmm0
movsd %xmm0, 0x20(%rdi)
retq
leaq 0x3c5d8(%rip), %rdi     # 0xa2f14
xorl %eax, %eax
jmp 0x71a8d
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R3Matrix.cpp
// Function: gaps::operator-(gaps::R3Matrix const&)
R3Matrix 
operator-(const R3Matrix& a)
{
    // Negate matrix
    return R3Matrix(
   	-a.m[0][0], -a.m[0][1], -a.m[0][2], 
	-a.m[1][0], -a.m[1][1], -a.m[1][2], 
        -a.m[2][0], -a.m[2][1], -a.m[2][2]);
}

// Assembly:
movq %rdi, %rax
movsd 0x40(%rsi), %xmm0
movaps 0x3b35d(%rip), %xmm1    # 0xa2020
xorps %xmm1, %xmm0
movups (%rsi), %xmm2
xorps %xmm1, %xmm2
movups %xmm2, (%rdi)
movups 0x10(%rsi), %xmm2
xorps %xmm1, %xmm2
movups %xmm2, 0x10(%rdi)
movups 0x20(%rsi), %xmm2
xorps %xmm1, %xmm2
movups %xmm2, 0x20(%rdi)
movups 0x30(%rsi), %xmm2
xorps %xmm1, %xmm2
movups %xmm2, 0x30(%rdi)
movlps %xmm0, 0x40(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R3Matrix.cpp
// Function: gaps::operator*(gaps::R3Matrix const&, gaps::R2Vector const&)
R2Vector
operator*(const R3Matrix& a, const R2Vector& v)
{
    // Multiply matrix by vector
    RNCoord x = a.m[0][0] * v.X() + a.m[0][1] * v.Y();
    RNCoord y = a.m[1][0] * v.X() + a.m[1][1] * v.Y();
    return R2Vector(x, y);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movsd (%rdx), %xmm1
movsd 0x8(%rdx), %xmm2
movsd 0x8(%rsi), %xmm3
mulsd %xmm2, %xmm3
movsd (%rsi), %xmm0
mulsd %xmm1, %xmm0
mulsd 0x20(%rsi), %xmm2
addsd %xmm3, %xmm0
mulsd 0x18(%rsi), %xmm1
addsd %xmm2, %xmm1
callq 0x683d2
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Span.cpp
// Function: gaps::R2Span::R2Span(gaps::R2Point const&, gaps::R2Vector const&)
R2Span::
R2Span(const R2Point& point, const R2Vector& vector)
    : end(point + vector)
{
    R2Vector v(vector);
    length = v.Length();
    if (RNIsNotZero(length)) v /= length;
    ray.Reset(point, v, TRUE);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
callq 0x678b8
leaq 0x38(%r14), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x682cf
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x683dc
movq %r12, %rdi
callq 0x68476
movsd %xmm0, 0x48(%r14)
leaq 0x7eb9d(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm1
ucomisd %xmm1, %xmm0
ja 0x67013
xorpd 0x3b013(%rip), %xmm1    # 0xa2020
ucomisd %xmm0, %xmm1
jbe 0x6701d
leaq 0x8(%rsp), %rdi
callq 0x68842
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
movl $0x1, %edx
callq 0x67e96
movq %r14, %rdi
movq %rbx, %rsi
callq 0x67e70
addq $0x28, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x681de
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Span.cpp
// Function: gaps::R2Span::R2Span(gaps::R2Point const&, gaps::R2Point const&)
R2Span::
R2Span(const R2Point& point1, const R2Point& point2)
    : end(point2)
{
    R2Vector v(point2 - point1);
    length = v.Length();
    if (RNIsNotZero(length)) v /= length;
    ray.Reset(point1, v, TRUE);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
callq 0x678b8
leaq 0x38(%r14), %rdi
movq %r15, %rsi
callq 0x680b0
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x682e3
movq %r12, %rdi
callq 0x68476
movsd %xmm0, 0x48(%r14)
leaq 0x7eaf5(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm1
ucomisd %xmm1, %xmm0
ja 0x670bb
xorpd 0x3af6b(%rip), %xmm1    # 0xa2020
ucomisd %xmm0, %xmm1
jbe 0x670c5
leaq 0x8(%rsp), %rdi
callq 0x68842
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
movl $0x1, %edx
callq 0x67e96
movq %r14, %rdi
movq %rbx, %rsi
callq 0x67e70
addq $0x28, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x681de
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Span.cpp
// Function: gaps::R2Span::R2Span(double, double, double, double)
R2Span::
R2Span(RNCoord x1, RNCoord y1, RNCoord x2, RNCoord y2)
    : end(x2, y2)
{
    R2Point p1(x1, y1);
    R2Point p2(x2, y2);
    R2Vector v(p2 - p1);
    length = v.Length();
    if (RNIsNotZero(length)) v /= length;
    ray.Reset(R2Point(x1, y1), v, TRUE);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movsd %xmm3, 0x10(%rsp)
movsd %xmm2, 0x8(%rsp)
movsd %xmm1, 0x20(%rsp)
movsd %xmm0, 0x18(%rsp)
movq %rdi, %rbx
callq 0x678b8
leaq 0x38(%rbx), %rdi
movsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
callq 0x680a6
leaq 0x58(%rsp), %r14
movq %r14, %rdi
movsd 0x18(%rsp), %xmm0
movsd 0x20(%rsp), %xmm1
callq 0x680a6
leaq 0x48(%rsp), %r15
movq %r15, %rdi
movsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
callq 0x680a6
leaq 0x28(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x682e3
movq %r12, %rdi
callq 0x68476
movsd %xmm0, 0x48(%rbx)
leaq 0x7ea01(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm1
ucomisd %xmm1, %xmm0
ja 0x671af
xorpd 0x3ae77(%rip), %xmm1    # 0xa2020
ucomisd %xmm0, %xmm1
jbe 0x671b9
leaq 0x28(%rsp), %rdi
callq 0x68842
leaq 0x38(%rsp), %r14
movq %r14, %rdi
movsd 0x18(%rsp), %xmm0
movsd 0x20(%rsp), %xmm1
callq 0x680a6
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x67e96
movq %rbx, %rdi
movq %r14, %rsi
callq 0x67e70
addq $0x28, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x681de
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Span.cpp
// Function: gaps::R2Span::BBox() const
const R2Box R2Span::
BBox(void) const
{
    // Return bounding box 
    R2Box bbox(Start(), Start());
    bbox.Union(End());
    return bbox;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x28(%rsi), %rdx
movq %rdx, %rsi
callq 0x652ca
addq $0x38, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x65986
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x65c14
movq %r14, %rdi
callq 0xe7e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Span.cpp
// Function: gaps::R2Span::Reposition(int, gaps::R2Point const&)
void R2Span::
Reposition(int k, const R2Point& point)
{
    // Set one endpoint of span
    if (k == 0) ray = R2Ray(point, end);
    else { end = point; ray.Align(end - ray.Start()); }
    length = R2Distance(Start(), End());
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
testl %esi, %esi
je 0x67380
leaq 0x38(%rbx), %r14
movq %r14, %rdi
movq %rdx, %rsi
callq 0x681de
leaq 0x28(%rbx), %rdx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x682e3
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x67e96
jmp 0x673cc
leaq 0x38(%rbx), %rax
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x6791e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x68720
leaq 0x10(%rbx), %rdi
leaq 0x18(%rsp), %r14
movq %r14, %rsi
callq 0x68720
movsd 0x10(%r14), %xmm0
movsd %xmm0, 0x20(%rbx)
leaq 0x28(%rbx), %rdi
leaq 0x30(%rsp), %rsi
callq 0x681de
leaq 0x28(%rbx), %rdi
leaq 0x38(%rbx), %rsi
callq 0x6c52b
movsd %xmm0, 0x48(%rbx)
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Span.cpp
// Function: gaps::R2Span::Project(gaps::R2Line const&)
void R2Span::
Project(const R2Line& line)
{
    // Project span onto line
    length *= Vector().Dot(line.Vector());
    if (length < 0.0) length = -length;
    ray.Project(line);
    end.Project(line);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x68540
mulsd 0x48(%r14), %xmm0
movapd 0x3ac1b(%rip), %xmm1    # 0xa2020
xorpd %xmm0, %xmm1
maxsd %xmm0, %xmm1
movsd %xmm1, 0x48(%r14)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x67a4c
addq $0x38, %r14
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x68130
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Span.cpp
// Function: gaps::R2Span::Transform(gaps::R2Transformation const&)
void R2Span::
Transform (const R2Transformation& transformation)
{
    // Transform span
    end.Transform(transformation);
    ray.Transform(transformation);
    length = R2Distance(Start(), End());
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x38(%rdi), %r15
movq %r15, %rdi
callq 0x681ba
movq %r14, %rdi
movq %rbx, %rsi
callq 0x67a72
leaq 0x28(%r14), %rdi
movq %r15, %rsi
callq 0x6c52b
movsd %xmm0, 0x48(%r14)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Span.cpp
// Function: gaps::R2Span::InverseTransform(gaps::R2Transformation const&)
void R2Span::
InverseTransform (const R2Transformation& transformation)
{
    // Transform span
    end.InverseTransform(transformation);
    ray.InverseTransform(transformation);
    length = R2Distance(Start(), End());
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x38(%rdi), %r15
movq %r15, %rdi
callq 0x681cc
movq %r14, %rdi
movq %rbx, %rsi
callq 0x67a98
leaq 0x28(%r14), %rdi
movq %r15, %rsi
callq 0x6c52b
movsd %xmm0, 0x48(%r14)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Span.cpp
// Function: gaps::R2Span::Flip()
void R2Span::
Flip(void)
{
    // Flip direction of span
    R2Point swap = Start();
    ray.Reposition(end);
    end = swap;
    ray.Flip();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x28(%rdi), %r14
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x680b0
leaq 0x38(%rbx), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x67e70
movq %r14, %rdi
movq %r12, %rsi
callq 0x681de
movq %r12, %rdi
movq %r15, %rsi
callq 0x681de
movq %rbx, %rdi
callq 0x685fe
leaq 0x10(%rbx), %rdi
callq 0x685fe
movsd 0x20(%rbx), %xmm0
xorps 0x3aa92(%rip), %xmm0    # 0xa2020
movlps %xmm0, 0x20(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Span.cpp
// Function: gaps::R2Span::Reset(gaps::R2Point const&, gaps::R2Point const&)
void R2Span::
Reset(const R2Point& point1, const R2Point& point2)
{
    // Reset span
    ray = R2Ray(point1, point2);
    end = point2;
    length = R2Distance(point1, point2);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsp, %r12
movq %r12, %rdi
callq 0x6791e
movq %rbx, %rdi
movq %r12, %rsi
callq 0x68720
leaq 0x10(%rbx), %rdi
leaq 0x10(%rsp), %r12
movq %r12, %rsi
callq 0x68720
movsd 0x10(%r12), %xmm0
movsd %xmm0, 0x20(%rbx)
leaq 0x28(%rbx), %rdi
leaq 0x28(%rsp), %rsi
callq 0x681de
leaq 0x38(%rbx), %rdi
movq %r14, %rsi
callq 0x681de
movq %r15, %rdi
movq %r14, %rsi
callq 0x6c52b
movsd %xmm0, 0x48(%rbx)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Span.cpp
// Function: gaps::R2Span::operator==(gaps::R2Span const&) const
const RNBoolean R2Span::
operator==(const R2Span& span) const
{
    // Return whether span is equal
    if (Start() != span.Start()) return FALSE;
    if (End() != span.End()) return FALSE;
    return TRUE;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0x28, %rdi
addq $0x28, %rsi
callq 0x6839e
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x678a5
addq $0x38, %r14
addq $0x38, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6839e
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
sete %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Ray.cpp
// Function: gaps::R2Ray::T(gaps::R2Point const&) const
const RNScalar R2Ray::
T(const R2Point& point) const
{
    // Return parametric value of closest point on ray
    RNScalar denom = Vector().Dot(Vector());
    if (RNIsZero(denom)) return 0.0;
    R2Vector topoint = point - Start();
    return (Vector().Dot(topoint) / denom);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rdi, %rsi
callq 0x68540
movapd %xmm0, %xmm2
leaq 0x7e1c8(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm1
movapd 0x3a644(%rip), %xmm0    # 0xa2020
xorpd %xmm1, %xmm0
ucomisd %xmm0, %xmm2
jb 0x679f0
xorpd %xmm0, %xmm0
ucomisd %xmm2, %xmm1
jae 0x67a1b
leaq 0x28(%rbx), %rdx
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movsd %xmm2, 0x8(%rsp)
callq 0x682e3
movq %rbx, %rdi
movq %r15, %rsi
callq 0x68540
divsd 0x8(%rsp), %xmm0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Line.cpp
// Function: gaps::R2Line::Mirror(gaps::R2Line const&)
void R2Line::
Mirror(const R2Line& line)
{
    // Mirror line over another line
    R2Point p = (normal * -c).Point();
    p.Mirror(line);
    vector.Mirror(line);
    normal = R2Vector(vector.Y(), -(vector.X()));
    c = -(normal.X()*p.X() + normal.Y()*p.Y());
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x10(%rdi), %r14
movsd 0x20(%rdi), %xmm0
xorps 0x3a2a7(%rip), %xmm0    # 0xa2020
movq %rsp, %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x6870c
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %r13, %rsi
callq 0x684e2
movq %r15, %rdi
movq %r12, %rsi
callq 0x6813e
movq %rbx, %rdi
movq %r12, %rsi
callq 0x68736
movsd 0x8(%rbx), %xmm0
movsd (%rbx), %xmm1
xorps 0x3a263(%rip), %xmm1    # 0xa2020
movq %rsp, %r12
movq %r12, %rdi
callq 0x683d2
movq %r14, %rdi
movq %r12, %rsi
callq 0x68720
movsd 0x10(%rbx), %xmm0
movsd 0x18(%rbx), %xmm1
mulsd 0x8(%r15), %xmm1
mulsd (%r15), %xmm0
addsd %xmm1, %xmm0
xorpd 0x3a22c(%rip), %xmm0    # 0xa2020
movlpd %xmm0, 0x20(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Line.cpp
// Function: gaps::R2Line::Align(gaps::R2Vector const&, int)
void R2Line::
Align(const R2Vector& vector, RNBoolean normalized)
{
    // Set vector of line
    this->vector = vector;
    if (!normalized) this->vector.Normalize();
    this->normal = R2Vector(this->vector.Y(), -this->vector.X());
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebp
movq %rdi, %rbx
callq 0x68720
testl %ebp, %ebp
jne 0x67eb4
movq %rbx, %rdi
callq 0x685c0
movsd 0x8(%rbx), %xmm0
movsd (%rbx), %xmm1
xorps 0x3a15c(%rip), %xmm1    # 0xa2020
movq %rsp, %r14
movq %r14, %rdi
callq 0x683d2
addq $0x10, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x68720
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Line.cpp
// Function: gaps::R2Line::Transform(gaps::R2Transformation const&)
void R2Line::
Transform (const R2Transformation& transformation)
{
    // Transform line
    vector.Transform(transformation);
    vector.Normalize();
    normal = R2Vector(vector.Y(), -vector.X());
    R2Point p(Point());
    p.Transform(transformation);
    Reposition(p);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x68790
movq %rbx, %rdi
callq 0x685c0
movsd 0x8(%rbx), %xmm0
movsd (%rbx), %xmm1
xorps 0x3a10a(%rip), %xmm1    # 0xa2020
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x683d2
leaq 0x10(%rbx), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x68720
movsd 0x20(%rbx), %xmm0
xorps 0x3a0e2(%rip), %xmm0    # 0xa2020
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x6870c
leaq 0x48032b(%rip), %rsi    # 0x4e8280
leaq 0x18(%rsp), %r12
movq %r12, %rdi
movq %r15, %rdx
callq 0x682cf
movq %r12, %rdi
movq %r14, %rsi
callq 0x681ba
movsd 0x10(%rbx), %xmm0
movsd 0x18(%rbx), %xmm1
mulsd 0x8(%r12), %xmm1
mulsd (%r12), %xmm0
addsd %xmm1, %xmm0
xorpd 0x3a08d(%rip), %xmm0    # 0xa2020
movlpd %xmm0, 0x20(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Line.cpp
// Function: gaps::R2Line::InverseTransform(gaps::R2Transformation const&)
void R2Line::
InverseTransform (const R2Transformation& transformation)
{
    // Inverse Transform line
    vector.InverseTransform(transformation);
    vector.Normalize();
    normal = R2Vector(vector.Y(), -vector.X());
    R2Point p(Point());
    p.InverseTransform(transformation);
    Reposition(p);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x687a2
movq %rbx, %rdi
callq 0x685c0
movsd 0x8(%rbx), %xmm0
movsd (%rbx), %xmm1
xorps 0x3a04e(%rip), %xmm1    # 0xa2020
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x683d2
leaq 0x10(%rbx), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x68720
movsd 0x20(%rbx), %xmm0
xorps 0x3a026(%rip), %xmm0    # 0xa2020
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x6870c
leaq 0x48026f(%rip), %rsi    # 0x4e8280
leaq 0x18(%rsp), %r12
movq %r12, %rdi
movq %r15, %rdx
callq 0x682cf
movq %r12, %rdi
movq %r14, %rsi
callq 0x681cc
movsd 0x10(%rbx), %xmm0
movsd 0x18(%rbx), %xmm1
mulsd 0x8(%r12), %xmm1
mulsd (%r12), %xmm0
addsd %xmm1, %xmm0
xorpd 0x39fd1(%rip), %xmm0    # 0xa2020
movlpd %xmm0, 0x20(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Vector.cpp
// Function: gaps::R2Vector::Project(gaps::R2Vector const&)
void R2Vector::
Project(const R2Vector& vector)
{
    // Project onto another vector    
    RNScalar dot = this->Dot(vector);
    RNLength length = vector.Length();
    if ((RNIsPositive(length)) && (length != 1.0)) 
	dot /= (length * length);
    *this = vector * dot;
}

// Assembly:
leaq 0x7d50f(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm0
movupd (%rsi), %xmm1
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
movsd 0x8(%rdi), %xmm3
mulsd %xmm2, %xmm3
movsd (%rdi), %xmm4
mulsd %xmm1, %xmm4
addsd %xmm3, %xmm4
mulsd %xmm2, %xmm2
movapd %xmm1, %xmm3
mulsd %xmm1, %xmm3
addsd %xmm2, %xmm3
xorps %xmm2, %xmm2
sqrtsd %xmm3, %xmm2
movapd %xmm2, %xmm3
mulsd %xmm2, %xmm3
movapd %xmm4, %xmm5
divsd %xmm3, %xmm5
cmpltsd %xmm2, %xmm0
cmpneqsd 0x39955(%rip), %xmm2    # 0xa2038
movapd %xmm2, %xmm3
andnpd %xmm4, %xmm3
andpd %xmm5, %xmm2
orpd %xmm3, %xmm2
andpd %xmm0, %xmm2
andnpd %xmm4, %xmm0
orpd %xmm2, %xmm0
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
mulpd %xmm1, %xmm0
movupd %xmm0, (%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Image.cpp
// Function: gaps::R2Image::R2Image(int, int, int)
R2Image::
R2Image(int width, int height, int ncomponents)
  : width(width), 
    height(height),
    ncomponents(ncomponents),
    rowsize(0),
    pixels(NULL)
{
  // Initialize pixels
  rowsize = ncomponents * width;
  if ((rowsize % 4) != 0) rowsize = (rowsize / 4 + 1) * 4;
  int nbytes = rowsize * height;
  if (nbytes > 0) {
    pixels = new unsigned char [nbytes];
    assert(pixels);
    unsigned char *p = pixels;
    while (--nbytes) *(p++) = 0;
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rdi, %r14
movl %esi, (%rdi)
movl %edx, 0x4(%rdi)
movl %ecx, 0x8(%rdi)
movq $0x0, 0x10(%rdi)
imull %esi, %ecx
testb $0x3, %cl
je 0x68c8b
leal 0x3(%rcx), %eax
testl %ecx, %ecx
cmovnsl %ecx, %eax
andl $-0x4, %eax
addl $0x4, %eax
movl %eax, %ecx
movl %ecx, 0xc(%r14)
imull %ecx, %ebx
testl %ebx, %ebx
jle 0x68cb8
movl %ebx, %edi
callq 0xe030
movq %rax, 0x10(%r14)
decl %ebx
je 0x68cb8
movl %ebx, %edx
movq %rax, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe260
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Image.cpp
// Function: gaps::R2Image::R2Image(int, int, int, unsigned char*)
R2Image::
R2Image(int width, int height, int ncomponents, unsigned char *data)
  : width(width), 
    height(height),
    ncomponents(ncomponents),
    rowsize(0),
    pixels(NULL)
{
  // Copy pixels (first pixel is lower-left)
  rowsize = ncomponents * width;
  if ((rowsize % 4) != 0) rowsize = (rowsize / 4 + 1) * 4;
  int nbytes = rowsize * height;
  if (nbytes > 0) {
    pixels = new unsigned char [nbytes];
    assert(pixels);
    unsigned char *p = pixels;
    while (--nbytes) *(p++) = *(data++);
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %r8, %rbx
movl %edx, %ebp
movq %rdi, %r14
movl %esi, (%rdi)
movl %edx, 0x4(%rdi)
movl %ecx, 0x8(%rdi)
movq $0x0, 0x10(%rdi)
imull %esi, %ecx
testb $0x3, %cl
je 0x68cf4
leal 0x3(%rcx), %eax
testl %ecx, %ecx
cmovnsl %ecx, %eax
andl $-0x4, %eax
addl $0x4, %eax
movl %eax, %ecx
movl %ecx, 0xc(%r14)
imull %ecx, %ebp
testl %ebp, %ebp
jle 0x68d1f
movl %ebp, %edi
callq 0xe030
movq %rax, 0x10(%r14)
decl %ebp
je 0x68d1f
movl %ebp, %edx
movq %rax, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0xe370
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Image.cpp
// Function: gaps::R2Image::R2Image(gaps::R2Grid const&, gaps::R2Grid const&, gaps::R2Grid const&)
R2Image::
R2Image(const R2Grid& red, const R2Grid& green, const R2Grid& blue)
  : width(red.XResolution()), 
    height(red.YResolution()),
    ncomponents(3),
    rowsize(0),
    pixels(NULL)
{
  // Just checking
  assert(red.XResolution() == green.XResolution());
  assert(red.YResolution() == green.YResolution());
  assert(red.XResolution() == blue.XResolution());
  assert(red.YResolution() == blue.YResolution());

  // Copy pixels (first pixel is lower-left)
  rowsize = ncomponents * width;
  if ((rowsize % 4) != 0) rowsize = (rowsize / 4 + 1) * 4;
  int nbytes = rowsize * height;
  if (nbytes > 0) {
    pixels = new unsigned char [nbytes];
    assert(pixels);
    for (int i = 0; i < width*height; i++) {
      int r = 255.0 * red.GridValue(i);
      int g = 255.0 * green.GridValue(i);
      int b = 255.0 * blue.GridValue(i);
      r = (r < 0) ? 0 : ((r > 255) ? 255 : r);
      g = (g < 0) ? 0 : ((g > 255) ? 255 : g);
      b = (b < 0) ? 0 : ((b > 255) ? 255 : b);
      pixels[i*3+0] = r;
      pixels[i*3+1] = g;
      pixels[i*3+2] = b;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movl 0xc0(%rsi), %r13d
movl %r13d, (%rdi)
movl 0xc4(%rsi), %ebp
movl %ebp, 0x4(%rdi)
movl $0x3, 0x8(%rdi)
movq $0x0, 0x10(%rdi)
leal (%r13,%r13,2), %eax
testb $0x3, %al
je 0x68d76
leal 0x3(%rax), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
andl $-0x4, %ecx
addl $0x4, %ecx
movl %ecx, %eax
movl %eax, 0xc(%r12)
imull %ebp, %eax
testl %eax, %eax
jle 0x68e57
movl %eax, %edi
callq 0xe030
movq %rax, 0x10(%r12)
imull %r13d, %ebp
testl %ebp, %ebp
jle 0x68e57
xorl %eax, %eax
movsd 0x39470(%rip), %xmm0    # 0xa2218
xorl %ecx, %ecx
movq 0xb8(%r15), %rdx
movsd (%rdx,%rcx,8), %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %edx
movl $0xff, %esi
cmpl %esi, %edx
jl 0x68dcc
movl $0xff, %edx
testl %edx, %edx
jg 0x68dd2
xorl %edx, %edx
movq 0xb8(%r14), %rdi
movsd (%rdi,%rcx,8), %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %edi
cmpl %esi, %edi
jl 0x68def
movl $0xff, %edi
testl %edi, %edi
jg 0x68df5
xorl %edi, %edi
movq 0xb8(%rbx), %r8
movsd (%r8,%rcx,8), %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %r8d
cmpl %esi, %r8d
jl 0x68e16
movl $0xff, %r8d
testl %r8d, %r8d
jg 0x68e1e
xorl %r8d, %r8d
movq 0x10(%r12), %rsi
movb %dl, (%rsi,%rax)
movq 0x10(%r12), %rdx
movb %dil, 0x1(%rdx,%rax)
movq 0x10(%r12), %rdx
movb %r8b, 0x2(%rdx,%rax)
incq %rcx
movslq (%r12), %rdx
movslq 0x4(%r12), %rsi
imulq %rdx, %rsi
addq $0x3, %rax
cmpq %rsi, %rcx
jl 0x68daa
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Image.cpp
// Function: gaps::R2Image::R2Image(gaps::R2Image const&)
R2Image::
R2Image(const R2Image& image)
  : width(image.width), 
    height(image.height),
    ncomponents(image.ncomponents),
    rowsize(image.rowsize),
    pixels(NULL)
{
  // Copy pixels
  int nbytes = rowsize * height;
  if (nbytes > 0) {
    pixels = new unsigned char [nbytes];
    assert(pixels);
    unsigned char *p = pixels;
    unsigned char *data = image.pixels;
    while (--nbytes) *(p++) = *(data++);
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl 0xc(%rsi), %ebp
imull 0x4(%rsi), %ebp
movups (%rsi), %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
testl %ebp, %ebp
jle 0x68eaf
movq %rsi, %rbx
movq %rdi, %r14
movl %ebp, %edi
callq 0xe030
movq %rax, 0x10(%r14)
decl %ebp
je 0x68eaf
movq 0x10(%rbx), %rcx
movl %ebp, %edx
xorl %esi, %esi
movb (%rcx,%rsi), %dil
movb %dil, (%rax,%rsi)
incq %rsi
cmpl %esi, %edx
jne 0x68ea0
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Image.cpp
// Function: gaps::R2Image::PixelRGB(int, int) const
const RNRgb R2Image::
PixelRGB(int x, int y) const
{
  // Return pixel RGB at (x,y)
  RNScalar r, g, b;
  const unsigned char *pixel = Pixel(x, y);
  switch (ncomponents) {
  case 1: 
  case 2:
    r = *(pixel++) / 255.0;
    g = b = r;
    break;

  case 3:
  case 4:
    r = *(pixel++) / 255.0;
    g = *(pixel++) / 255.0;
    b = *(pixel++) / 255.0;
    break;

  default:
    r = b = g = 0;
    break;
  }
  return RNRgb(r, g, b);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rsi), %rax
imull 0xc(%rsi), %ecx
movl 0x8(%rsi), %esi
imull %esi, %edx
addl %ecx, %edx
movslq %edx, %rcx
leal -0x3(%rsi), %edx
cmpl $0x2, %edx
jb 0x68f02
decl %esi
cmpl $0x1, %esi
ja 0x68f35
movzbl (%rax,%rcx), %eax
cvtsi2sd %eax, %xmm0
divsd 0x39320(%rip), %xmm0    # 0xa2218
movapd %xmm0, %xmm1
unpcklpd %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
jmp 0x68f3d
movzbl (%rax,%rcx), %edx
cvtsi2sd %edx, %xmm0
divsd 0x39306(%rip), %xmm0    # 0xa2218
movzwl 0x1(%rax,%rcx), %eax
movd %eax, %xmm1
pxor %xmm2, %xmm2
punpcklbw %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1],xmm1[2],xmm2[2],xmm1[3],xmm2[3],xmm1[4],xmm2[4],xmm1[5],xmm2[5],xmm1[6],xmm2[6],xmm1[7],xmm2[7]
punpcklwd %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1],xmm1[2],xmm2[2],xmm1[3],xmm2[3]
cvtdq2pd %xmm1, %xmm1
divpd 0x40bed(%rip), %xmm1    # 0xa9b20
jmp 0x68f3d
xorpd %xmm1, %xmm1
xorpd %xmm0, %xmm0
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
movq %rbx, %rdi
callq 0x6f680
movq %rbx, %rax
popq %rbx
retq