LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Polygon.cpp
// Function: gaps::R2Polygon::R2Polygon(gaps::R2Polygon const&)
R2Polygon::
R2Polygon(const R2Polygon& polygon) 
  : points(NULL),
    npoints(polygon.npoints),
    bbox(polygon.bbox),
    clockwise(polygon.clockwise)
{
  // Copy points
  if (polygon.npoints > 0) {
    points = new R2Point [ npoints ];
    for (int i = 0; i < npoints; i++) {
      points[i] = polygon.points[i];
    }
  }
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq 0x60(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0xbec40
movq 0x38(%rsp), %rdi
leaq 0xb4847(%rip), %rax     # 0x16e320
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movq 0x58(%rsp), %rax
movl 0x10(%rax), %eax
movl %eax, 0x10(%rdi)
addq $0x18, %rdi
movq %rdi, 0x40(%rsp)
movq 0x58(%rsp), %rsi
addq $0x18, %rsi
callq 0xbd3e0
jmp 0xb9b08
movq 0x38(%rsp), %rax
movq 0x58(%rsp), %rcx
movl 0x40(%rcx), %ecx
movl %ecx, 0x40(%rax)
movq 0x58(%rsp), %rax
cmpl $0x0, 0x10(%rax)
jle 0xb9c4a
movq 0x38(%rsp), %rax
movslq 0x10(%rax), %rax
movq %rax, 0x20(%rsp)
movl $0x10, %ecx
mulq %rcx
movq %rax, %rdi
movq $-0x1, %rax
cmovoq %rax, %rdi
movq %rdi, 0x28(%rsp)
callq 0xf030
movq %rax, 0x30(%rsp)
jmp 0xb9b5c
movq 0x20(%rsp), %rax
cmpq $0x0, %rax
je 0xb9bae
movq 0x30(%rsp), %rax
movq 0x20(%rsp), %rdx
shlq $0x4, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xc3130
jmp 0xb9b96
movq 0x10(%rsp), %rcx
movq 0x8(%rsp), %rax
addq $0x10, %rax
cmpq %rcx, %rax
movq %rax, 0x18(%rsp)
jne 0xb9b85
movq 0x38(%rsp), %rax
movq 0x30(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl $0x0, 0x48(%rsp)
movq 0x38(%rsp), %rcx
movl 0x48(%rsp), %eax
cmpl 0x10(%rcx), %eax
jge 0xb9c48
movq 0x38(%rsp), %rcx
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rsi
movslq 0x48(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rsi
movq 0x8(%rcx), %rdi
addq %rax, %rdi
callq 0xc33e0
jmp 0xb9bfa
jmp 0xb9bfc
movl 0x48(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x48(%rsp)
jmp 0xb9bc4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
jmp 0xb9c59
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
jmp 0xb9c4f
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
callq 0xf990
jmp 0xb9c4f
jmp 0xb9c4a
addq $0x68, %rsp
retq
movq 0x40(%rsp), %rdi
callq 0x6bc50
movq 0x38(%rsp), %rdi
callq 0xbec70
movq 0x50(%rsp), %rdi
callq 0xf890
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Polygon.cpp
// Function: gaps::R2Polygon::R2Polygon(gaps::RNArray<gaps::R2Point*> const&, int)
R2Polygon::
R2Polygon(const RNArray<R2Point *>& p, RNBoolean clockwise)
  : points(NULL),
    npoints(p.NEntries()),
    bbox(R2null_box),
    clockwise(clockwise)
{
  // Copy points
  if (npoints > 0) {
    points = new R2Point [ npoints ];
    for (int i = 0; i < npoints; i++) {
      points[i] = *(p[i]);
      bbox.Union(*(p[i]));
    }
  }
}

// Assembly:
subq $0x98, %rsp
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movl %edx, 0x84(%rsp)
movq 0x90(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0xbec40
movq 0x58(%rsp), %rax
leaq 0xb4674(%rip), %rcx     # 0x16e320
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
addq $0x10, %rax
movq %rax, 0x60(%rsp)
movq 0x88(%rsp), %rdi
callq 0x13600
movl %eax, 0x6c(%rsp)
jmp 0xb9cd3
movq 0x58(%rsp), %rdi
movq 0x60(%rsp), %rax
movl 0x6c(%rsp), %ecx
movl %ecx, (%rax)
addq $0x18, %rdi
movq %rdi, 0x50(%rsp)
leaq 0x4c0cf5(%rip), %rsi    # 0x57a9e8
callq 0xbd3e0
jmp 0xb9cfa
movq 0x58(%rsp), %rax
movl 0x84(%rsp), %ecx
movl %ecx, 0x40(%rax)
cmpl $0x0, 0x10(%rax)
jle 0xb9e85
movq 0x58(%rsp), %rax
movslq 0x10(%rax), %rax
movq %rax, 0x38(%rsp)
movl $0x10, %ecx
mulq %rcx
movq %rax, %rdi
movq $-0x1, %rax
cmovoq %rax, %rdi
movq %rdi, 0x40(%rsp)
callq 0xf030
movq %rax, 0x48(%rsp)
jmp 0xb9d48
movq 0x38(%rsp), %rax
cmpq $0x0, %rax
je 0xb9d9a
movq 0x48(%rsp), %rax
movq 0x38(%rsp), %rdx
shlq $0x4, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, 0x28(%rsp)
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0xc3130
jmp 0xb9d82
movq 0x28(%rsp), %rcx
movq 0x20(%rsp), %rax
addq $0x10, %rax
cmpq %rcx, %rax
movq %rax, 0x30(%rsp)
jne 0xb9d71
movq 0x58(%rsp), %rax
movq 0x48(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl $0x0, 0x70(%rsp)
movq 0x58(%rsp), %rcx
movl 0x70(%rsp), %eax
cmpl 0x10(%rcx), %eax
jge 0xb9e83
movq 0x88(%rsp), %rdi
movl 0x70(%rsp), %esi
callq 0xbd1e0
movq %rax, 0x18(%rsp)
jmp 0xb9dda
movq 0x18(%rsp), %rsi
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rdi
movslq 0x70(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rdi
callq 0xc33e0
jmp 0xb9dfb
movq 0x58(%rsp), %rax
addq $0x18, %rax
movq %rax, 0x8(%rsp)
movq 0x88(%rsp), %rdi
movl 0x70(%rsp), %esi
callq 0xbd1e0
movq %rax, 0x10(%rsp)
jmp 0xb9e21
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0xbe470
jmp 0xb9e32
jmp 0xb9e34
movl 0x70(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x70(%rsp)
jmp 0xb9db0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
jmp 0xb9e97
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
jmp 0xb9e8d
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
callq 0xf990
jmp 0xb9e8d
jmp 0xb9e85
addq $0x98, %rsp
retq
movq 0x50(%rsp), %rdi
callq 0x6bc50
movq 0x58(%rsp), %rdi
callq 0xbec70
movq 0x78(%rsp), %rdi
callq 0xf890
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Polygon.cpp
// Function: gaps::R2Polygon::R2Polygon(gaps::R2Point const*, int, int)
R2Polygon::
R2Polygon(const R2Point *p, int np, RNBoolean clockwise)
  : points(NULL),
    npoints(np),
    bbox(R2null_box),
    clockwise(clockwise)
{
  // Copy points
  if (npoints > 0) {
    points = new R2Point [ npoints ];
    for (int i = 0; i < npoints; i++) {
      points[i] = p[i];
      bbox.Union(p[i]);
    }
  }
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movl %edx, 0x54(%rsp)
movl %ecx, 0x50(%rsp)
movq 0x60(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0xbec40
movq 0x30(%rsp), %rdi
leaq 0xb443f(%rip), %rax     # 0x16e320
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movl 0x54(%rsp), %eax
movl %eax, 0x10(%rdi)
addq $0x18, %rdi
movq %rdi, 0x38(%rsp)
leaq 0x4c0ae5(%rip), %rsi    # 0x57a9e8
callq 0xbd3e0
jmp 0xb9f0a
movq 0x30(%rsp), %rax
movl 0x50(%rsp), %ecx
movl %ecx, 0x40(%rax)
cmpl $0x0, 0x10(%rax)
jle 0xba062
movq 0x30(%rsp), %rax
movslq 0x10(%rax), %rax
movq %rax, 0x18(%rsp)
movl $0x10, %ecx
mulq %rcx
movq %rax, %rdi
movq $-0x1, %rax
cmovoq %rax, %rdi
movq %rdi, 0x20(%rsp)
callq 0xf030
movq %rax, 0x28(%rsp)
jmp 0xb9f55
movq 0x18(%rsp), %rax
cmpq $0x0, %rax
je 0xb9fa5
movq 0x28(%rsp), %rax
movq 0x18(%rsp), %rdx
shlq $0x4, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, (%rsp)
callq 0xc3130
jmp 0xb9f8e
movq 0x8(%rsp), %rcx
movq (%rsp), %rax
addq $0x10, %rax
cmpq %rcx, %rax
movq %rax, 0x10(%rsp)
jne 0xb9f7e
movq 0x30(%rsp), %rax
movq 0x28(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl $0x0, 0x40(%rsp)
movq 0x30(%rsp), %rcx
movl 0x40(%rsp), %eax
cmpl 0x10(%rcx), %eax
jge 0xba060
movq 0x30(%rsp), %rcx
movq 0x58(%rsp), %rsi
movslq 0x40(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rsi
movq 0x8(%rcx), %rdi
addq %rax, %rdi
callq 0xc33e0
jmp 0xb9ff1
movq 0x30(%rsp), %rdi
addq $0x18, %rdi
movq 0x58(%rsp), %rsi
movslq 0x40(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rsi
callq 0xbe470
jmp 0xba012
jmp 0xba014
movl 0x40(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x40(%rsp)
jmp 0xb9fbb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
jmp 0xba071
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
jmp 0xba067
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
callq 0xf990
jmp 0xba067
jmp 0xba062
addq $0x68, %rsp
retq
movq 0x38(%rsp), %rdi
callq 0x6bc50
movq 0x30(%rsp), %rdi
callq 0xbec70
movq 0x48(%rsp), %rdi
callq 0xf890
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Polygon.cpp
// Function: gaps::R2Polygon::ClosestPoint(gaps::R2Point const&) const
const R2Point R2Polygon::
ClosestPoint(const R2Point& point) const
{
  // Return closest point on polygon
  R2Point closest_point(0,0);
  RNLength closest_squared_distance = FLT_MAX;
  for (int i = 0; i < npoints; i++) {
    const R2Point& position = points[i];
    RNLength squared_distance = R2SquaredDistance(point, position);
    if (squared_distance < closest_squared_distance) {
      closest_point = position;
      closest_squared_distance = squared_distance;
    }
  }

  // Return closest point
  return closest_point;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x8(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x18(%rsp)
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0xc3140
movsd 0x78eb3(%rip), %xmm0    # 0x133020
movsd %xmm0, 0x38(%rsp)
movl $0x0, 0x34(%rsp)
movq 0x18(%rsp), %rcx
movl 0x34(%rsp), %eax
cmpl 0x10(%rcx), %eax
jge 0xba1f4
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x34(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, 0x28(%rsp)
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0xcc2f0
movsd %xmm0, 0x20(%rsp)
movsd 0x20(%rsp), %xmm1
movsd 0x38(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xba1e5
movq 0x8(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0xc33e0
movsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x38(%rsp)
jmp 0xba1e7
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
jmp 0xba17b
movq 0x10(%rsp), %rax
addq $0x58, %rsp
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Polygon.cpp
// Function: gaps::R2Polygon::Area() const
const RNArea R2Polygon::
Area(void) const
{
  // Check number of points
  if (npoints < 3) return 0;

  // Compute twicearea by sum of cross products
  RNLength sum = 0;
  R2Point *p1 = &points[npoints-1];
  for (int i = 0; i < npoints; i++) {
    R2Point *p2 = &points[i];
    sum += p1->X()*p2->Y() - p2->X()*p1->Y();
    p1 = p2;
  }

  // Compute area
  RNArea area = 0.5 * sum;

  // Flip if clockwise
  if (clockwise) area = -area;

  // Return area
  return area;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpl $0x3, 0x10(%rax)
jge 0xba287
xorps %xmm0, %xmm0
movsd %xmm0, 0x50(%rsp)
jmp 0xba3c6
movq 0x18(%rsp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, 0x40(%rsp)
movq 0x8(%rcx), %rax
movl 0x10(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, 0x38(%rsp)
movl $0x0, 0x34(%rsp)
movq 0x18(%rsp), %rcx
movl 0x34(%rsp), %eax
cmpl 0x10(%rcx), %eax
jge 0xba378
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x34(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, 0x28(%rsp)
movq 0x38(%rsp), %rdi
callq 0x38c50
movsd %xmm0, 0x10(%rsp)
movq 0x28(%rsp), %rdi
callq 0x38c60
movsd %xmm0, 0x8(%rsp)
movq 0x28(%rsp), %rdi
callq 0x38c50
movsd %xmm0, (%rsp)
movq 0x38(%rsp), %rdi
callq 0x38c60
movsd (%rsp), %xmm1
movsd 0x8(%rsp), %xmm2
movaps %xmm0, %xmm3
movsd 0x10(%rsp), %xmm0
mulsd %xmm3, %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
addsd 0x40(%rsp), %xmm0
movsd %xmm0, 0x40(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x38(%rsp)
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
jmp 0xba2b6
movq 0x18(%rsp), %rax
movsd 0x78c8b(%rip), %xmm0    # 0x133010
mulsd 0x40(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
cmpl $0x0, 0x40(%rax)
je 0xba3ba
movsd 0x20(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x50(%rsp)
movsd 0x50(%rsp), %xmm0
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Polygon.cpp
// Function: gaps::R2Polygon::Convexity() const
const RNArea R2Polygon::
Convexity(void) const
{
  // Check number of points
  if (npoints < 3) return 0;

  // Compute area
  RNArea area = Area();

  // Compute area of convex hull
  R2Polygon convex_hull = ConvexHull();
  RNArea convex_hull_area = convex_hull.Area();
  if (convex_hull_area == 0) return 0;

  // Return ratio of areas
  return area / convex_hull_area;
}

// Assembly:
subq $0x98, %rsp
movq %rdi, 0x88(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpl $0x3, 0x10(%rax)
jge 0xba413
xorps %xmm0, %xmm0
movsd %xmm0, 0x90(%rsp)
jmp 0xba4cb
movq 0x18(%rsp), %rdi
movq (%rdi), %rax
movq 0x30(%rax), %rax
callq *%rax
movq 0x18(%rsp), %rsi
movsd %xmm0, 0x80(%rsp)
movq (%rsi), %rax
movq 0x68(%rax), %rax
leaq 0x38(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq *%rax
movq 0x8(%rsp), %rdi
callq 0xba260
movsd %xmm0, 0x10(%rsp)
jmp 0xba454
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
movsd 0x30(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xba4a1
jp 0xba4a1
xorps %xmm0, %xmm0
movsd %xmm0, 0x90(%rsp)
movl $0x1, 0x20(%rsp)
jmp 0xba4c1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
leaq 0x38(%rsp), %rdi
callq 0xba090
jmp 0xba4dc
movsd 0x80(%rsp), %xmm0
divsd 0x30(%rsp), %xmm0
movsd %xmm0, 0x90(%rsp)
movl $0x1, 0x20(%rsp)
leaq 0x38(%rsp), %rdi
callq 0xba090
movsd 0x90(%rsp), %xmm0
addq $0x98, %rsp
retq
movq 0x28(%rsp), %rdi
callq 0xf890
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Polygon.cpp
// Function: gaps::R2Polygon::Perimeter() const
const RNLength R2Polygon::
Perimeter(void) const
{
  // Check number of points
  if (npoints < 2) return 0;

  // Compute perimeter
  RNLength sum = 0;
  R2Point *p1 = &points[npoints-1];
  for (int i = 0; i < npoints; i++) {
    R2Point *p2 = &points[i];
    sum += R2Distance(*p1, *p2);
    p1 = p2;
  }

  // Return perimeter
  return sum;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, (%rsp)
cmpl $0x2, 0x10(%rax)
jge 0xba516
xorps %xmm0, %xmm0
movsd %xmm0, 0x30(%rsp)
jmp 0xba5a8
movq (%rsp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, 0x20(%rsp)
movq 0x8(%rcx), %rax
movl 0x10(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
movq (%rsp), %rcx
movl 0x14(%rsp), %eax
cmpl 0x10(%rcx), %eax
jge 0xba59c
movq (%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x14(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0xcb540
addsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x18(%rsp)
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0xba544
movsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
movsd 0x30(%rsp), %xmm0
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Polygon.cpp
// Function: gaps::R2Polygon::Centroid() const
const R2Point R2Polygon::
Centroid(void) const
{
  // Check number of points
  if (npoints == 0) return R2zero_point;

  // Return centroid
  R2Point sum = R2zero_point;
  for (int i = 0; i < npoints; i++) sum += points[i];
  return sum / npoints;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x8(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpl $0x0, 0x10(%rax)
jne 0xba5fe
movq 0x8(%rsp), %rdi
leaq 0x4c0821(%rip), %rsi    # 0x57ae18
callq 0xc3170
jmp 0xba66a
leaq 0x28(%rsp), %rdi
leaq 0x4c080e(%rip), %rsi    # 0x57ae18
callq 0xc3170
movl $0x0, 0x24(%rsp)
movq 0x18(%rsp), %rcx
movl 0x24(%rsp), %eax
cmpl 0x10(%rcx), %eax
jge 0xba651
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rsi
movslq 0x24(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rsi
leaq 0x28(%rsp), %rdi
callq 0xc3430
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0xba617
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rax
cvtsi2sdl 0x10(%rax), %xmm0
leaq 0x28(%rsp), %rsi
callq 0xc3ad0
movq 0x10(%rsp), %rax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Polygon.cpp
// Function: gaps::R2Polygon::Empty()
void R2Polygon::
Empty(void)
{
    // Empty polygon
    if (points) delete [] points;
    points = NULL;
    npoints = 0;
    bbox = R2null_box;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rax)
je 0xbc008
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0xbc006
movq (%rsp), %rdi
callq 0xf670
jmp 0xbc008
movq 0x8(%rsp), %rdi
movq $0x0, 0x8(%rdi)
movl $0x0, 0x10(%rdi)
addq $0x18, %rdi
leaq 0x4be9c1(%rip), %rsi    # 0x57a9e8
callq 0xa5da0
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Polygon.cpp
// Function: gaps::R2Polygon::RemovePoint(int)
void R2Polygon::
RemovePoint(int k)
{
    // Copy points down one
    npoints--;
    for (int i = k; k < npoints; i++) {
      points[i] = points[i+1];
    }

    // Update bounding box
    bbox = R2null_box;
    for (int i = 0; i < npoints; i++) {
        bbox.Union(points[i]);
    }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x10(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x10(%rax)
movl 0x1c(%rsp), %eax
movl %eax, 0x18(%rsp)
movq 0x8(%rsp), %rcx
movl 0x1c(%rsp), %eax
cmpl 0x10(%rcx), %eax
jge 0xbc0b2
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rsi
movl 0x18(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rsi
movq 0x8(%rax), %rdi
movslq 0x18(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rdi
callq 0xc33e0
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0xbc068
movq 0x8(%rsp), %rdi
addq $0x18, %rdi
leaq 0x4be926(%rip), %rsi    # 0x57a9e8
callq 0xa5da0
movl $0x0, 0x14(%rsp)
movq 0x8(%rsp), %rcx
movl 0x14(%rsp), %eax
cmpl 0x10(%rcx), %eax
jge 0xbc10b
movq 0x8(%rsp), %rax
movq %rax, %rdi
addq $0x18, %rdi
movq 0x8(%rax), %rsi
movslq 0x14(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rsi
callq 0xbe470
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0xbc0cf
addq $0x28, %rsp
retq
// File: tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Polygon.cpp
// Function: gaps::R2Polygon::InsertPoint(int, gaps::R2Point const&)
void R2Polygon::
InsertPoint(int k, const R2Point& position)
{
    // Add point in position k, moving others starting at k+1 up to make room
    R2Point *p = new R2Point [npoints+1];
    for (int i = 0; i < k; i++) p[i] = points[i];
    p[k] = position;
    for (int i = k; i < npoints; i++) p[i+1] = points[i];
    if (points) delete [] points;
    points = p;
    npoints++;
    
    // Update bounding box
    bbox.Union(position);
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movl %esi, 0x6c(%rsp)
movq %rdx, 0x60(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x20(%rsp)
movl 0x10(%rax), %eax
addl $0x1, %eax
cltq
movq %rax, 0x30(%rsp)
movl $0x10, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
movq %rdi, 0x28(%rsp)
callq 0xf030
movq %rax, %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x38(%rsp)
cmpq $0x0, %rax
je 0xbc1b9
movq 0x38(%rsp), %rax
movq 0x30(%rsp), %rdx
shlq $0x4, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xc3130
jmp 0xbc1a1
movq 0x10(%rsp), %rcx
movq 0x8(%rsp), %rax
addq $0x10, %rax
cmpq %rcx, %rax
movq %rax, 0x18(%rsp)
jne 0xbc190
movq 0x38(%rsp), %rax
movq %rax, 0x58(%rsp)
movl $0x0, 0x48(%rsp)
movl 0x48(%rsp), %eax
cmpl 0x6c(%rsp), %eax
jge 0xbc22f
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rsi
movslq 0x48(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rsi
movq 0x58(%rsp), %rdi
movslq 0x48(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rdi
callq 0xc33e0
movl 0x48(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x48(%rsp)
jmp 0xbc1cb
movq 0x28(%rsp), %rsi
movq 0x38(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
callq 0xf990
jmp 0xbc2f0
movq 0x60(%rsp), %rsi
movq 0x58(%rsp), %rdi
movslq 0x6c(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rdi
callq 0xc33e0
movl 0x6c(%rsp), %eax
movl %eax, 0x44(%rsp)
movq 0x20(%rsp), %rcx
movl 0x44(%rsp), %eax
cmpl 0x10(%rcx), %eax
jge 0xbc29c
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rsi
movslq 0x44(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rsi
movq 0x58(%rsp), %rdi
movl 0x44(%rsp), %eax
addl $0x1, %eax
cltq
shlq $0x4, %rax
addq %rax, %rdi
callq 0xc33e0
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x44(%rsp)
jmp 0xbc252
movq 0x20(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0xbc2c6
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0xbc2c4
movq (%rsp), %rdi
callq 0xf670
jmp 0xbc2c6
movq 0x20(%rsp), %rdi
movq 0x58(%rsp), %rax
movq %rax, 0x8(%rdi)
movl 0x10(%rdi), %eax
addl $0x1, %eax
movl %eax, 0x10(%rdi)
addq $0x18, %rdi
movq 0x60(%rsp), %rsi
callq 0xbe470
addq $0x78, %rsp
retq
movq 0x50(%rsp), %rdi
callq 0xf890
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Polygon.cpp
// Function: gaps::R2Polygon::SetPoint(int, gaps::R2Point const&)
void R2Polygon::
SetPoint(int k, const R2Point& position)
{
    // Set point
    points[k] = position;

    // Update bounding box
    bbox = R2null_box;
    for (int i = 0; i < npoints; i++) {
        bbox.Union(points[i]);
    }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rsi
movq 0x8(%rax), %rdi
movslq 0x1c(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rdi
callq 0xc33e0
movq (%rsp), %rdi
addq $0x18, %rdi
leaq 0x4be6a4(%rip), %rsi    # 0x57a9e8
callq 0xa5da0
movl $0x0, 0xc(%rsp)
movq (%rsp), %rcx
movl 0xc(%rsp), %eax
cmpl 0x10(%rcx), %eax
jge 0xbc38b
movq (%rsp), %rax
movq %rax, %rdi
addq $0x18, %rdi
movq 0x8(%rax), %rsi
movslq 0xc(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rsi
callq 0xbe470
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0xbc351
addq $0x28, %rsp
retq
// File: 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:
subq $0xb8, %rsp
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, (%rsp)
cmpl $0x0, 0x10(%rax)
jne 0xbcb0e
jmp 0xbcc36
movq 0xa8(%rsp), %rdi
callq 0xa3750
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
leaq 0x80(%rsp), %rdi
movsd 0x764c6(%rip), %xmm0    # 0x133008
xorps %xmm1, %xmm1
callq 0xc2790
movq (%rsp), %rdi
movq (%rdi), %rax
leaq 0x80(%rsp), %rsi
callq *0x78(%rax)
movq (%rsp), %rax
cmpl $0x0, 0x10(%rax)
jne 0xbcb6b
jmp 0xbcc36
movq 0xa8(%rsp), %rdi
callq 0xa3790
movaps %xmm0, %xmm2
leaq 0x58(%rsp), %rdi
movsd 0x76490(%rip), %xmm0    # 0x133018
xorps %xmm1, %xmm1
callq 0xc2790
movq (%rsp), %rdi
movq (%rdi), %rax
leaq 0x58(%rsp), %rsi
callq *0x78(%rax)
movq (%rsp), %rax
cmpl $0x0, 0x10(%rax)
jne 0xbcbae
jmp 0xbcc36
movq 0xa8(%rsp), %rdi
callq 0xa3770
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
leaq 0x30(%rsp), %rdi
xorps %xmm0, %xmm0
movsd 0x76426(%rip), %xmm1    # 0x133008
callq 0xc2790
movq (%rsp), %rdi
movq (%rdi), %rax
leaq 0x30(%rsp), %rsi
callq *0x78(%rax)
movq (%rsp), %rax
cmpl $0x0, 0x10(%rax)
jne 0xbcc02
jmp 0xbcc36
movq 0xa8(%rsp), %rdi
callq 0xa37b0
movaps %xmm0, %xmm2
leaq 0x8(%rsp), %rdi
xorps %xmm0, %xmm0
movsd 0x763f6(%rip), %xmm1    # 0x133018
callq 0xc2790
movq (%rsp), %rdi
movq (%rdi), %rax
leaq 0x8(%rsp), %rsi
callq *0x78(%rax)
addq $0xb8, %rsp
retq
nop
// File: 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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rdi
movq %rdi, 0x8(%rsp)
addq $0x18, %rdi
leaq 0x4bdd85(%rip), %rsi    # 0x57a9e8
callq 0xa5da0
movl $0x0, 0x14(%rsp)
movq 0x8(%rsp), %rcx
movl 0x14(%rsp), %eax
cmpl 0x10(%rcx), %eax
jge 0xbcccb
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
movslq 0x14(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rdi
movq 0x18(%rsp), %rsi
callq 0xc3380
movq 0x8(%rsp), %rax
movq %rax, %rdi
addq $0x18, %rdi
movq 0x8(%rax), %rsi
movslq 0x14(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rsi
callq 0xbe470
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0xbcc70
addq $0x28, %rsp
retq
// File: 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:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x40(%rsp)
cmpq $0x0, 0x8(%rax)
je 0xbcd1f
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x38(%rsp)
cmpq $0x0, %rax
je 0xbcd12
movq 0x38(%rsp), %rdi
movl $0x10, %esi
callq 0xf4d0
movq 0x40(%rsp), %rax
movq $0x0, 0x8(%rax)
movq 0x40(%rsp), %rdi
movq 0x58(%rsp), %rax
movl 0x40(%rax), %eax
movl %eax, 0x40(%rdi)
movq 0x58(%rsp), %rsi
addq $0x18, %rsi
addq $0x18, %rdi
callq 0xa5da0
movq 0x40(%rsp), %rax
movq 0x58(%rsp), %rcx
movl 0x10(%rcx), %ecx
movl %ecx, 0x10(%rax)
cmpl $0x0, 0x10(%rax)
jle 0xbce6a
movq 0x40(%rsp), %rax
movslq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
movl $0x10, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
movq %rdi, 0x20(%rsp)
callq 0xf030
movq %rax, %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x30(%rsp)
cmpq $0x0, %rax
je 0xbcde9
movq 0x30(%rsp), %rax
movq 0x28(%rsp), %rdx
shlq $0x4, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xc3130
jmp 0xbcdd1
movq 0x10(%rsp), %rcx
movq 0x8(%rsp), %rax
addq $0x10, %rax
cmpq %rcx, %rax
movq %rax, 0x18(%rsp)
jne 0xbcdc0
movq 0x40(%rsp), %rax
movq 0x30(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl $0x0, 0x48(%rsp)
movq 0x40(%rsp), %rcx
movl 0x48(%rsp), %eax
cmpl 0x10(%rcx), %eax
jge 0xbce68
movq 0x40(%rsp), %rax
movq 0x58(%rsp), %rcx
movq 0x8(%rcx), %rsi
movslq 0x48(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rsi
movq 0x8(%rax), %rdi
movslq 0x48(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rdi
callq 0xc33e0
movl 0x48(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x48(%rsp)
jmp 0xbcdff
movq 0x20(%rsp), %rsi
movq 0x30(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
callq 0xf990
jmp 0xbce74
jmp 0xbce6a
movq 0x40(%rsp), %rax
addq $0x68, %rsp
retq
movq 0x50(%rsp), %rdi
callq 0xf890
nop
// File: 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:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %rdi
movl 0x10(%rax), %edx
leaq 0x76eb0(%rip), %rsi     # 0x133d57
movb $0x0, %al
callq 0xf730
movl $0x0, 0x24(%rsp)
movq 0x18(%rsp), %rcx
movl 0x24(%rsp), %eax
cmpl 0x10(%rcx), %eax
jge 0xbcf31
movq 0x18(%rsp), %rax
movq 0x28(%rsp), %rcx
movq %rcx, 0x8(%rsp)
movq 0x8(%rax), %rdi
movslq 0x24(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rdi
callq 0x38c50
movq 0x18(%rsp), %rax
movsd %xmm0, 0x10(%rsp)
movq 0x8(%rax), %rdi
movslq 0x24(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rdi
callq 0x38c60
movq 0x8(%rsp), %rdi
movaps %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
leaq 0x792d9(%rip), %rsi     # 0x1361f6
movb $0x2, %al
callq 0xf730
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0xbceb6
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Box.cpp
// Function: gaps::R2Box::NDimensions() const
const int R2Box::
NDimensions (void) const
{
    // Return number of non-zero dimensions in box
    int ndimensions = 0;
    if (minpt.X() > maxpt.X()) return -1;
    if (minpt.X() < maxpt.X()) ndimensions++;
    if (minpt.Y() > maxpt.Y()) return -1;
    if (minpt.Y() < maxpt.Y()) ndimensions++;
    return ndimensions;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movq %rdi, 0x20(%rsp)
movl $0x0, 0x34(%rsp)
addq $0x8, %rdi
callq 0x38c50
movq 0x20(%rsp), %rdi
movsd %xmm0, 0x28(%rsp)
addq $0x18, %rdi
callq 0x38c50
movaps %xmm0, %xmm1
movsd 0x28(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xbd7b4
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0xbd869
movq 0x20(%rsp), %rdi
addq $0x8, %rdi
callq 0x38c50
movq 0x20(%rsp), %rdi
movsd %xmm0, 0x18(%rsp)
addq $0x18, %rdi
callq 0x38c50
movsd 0x18(%rsp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0xbd7ed
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
movq 0x20(%rsp), %rdi
addq $0x8, %rdi
callq 0x38c60
movq 0x20(%rsp), %rdi
movsd %xmm0, 0x10(%rsp)
addq $0x18, %rdi
callq 0x38c60
movaps %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xbd828
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0xbd869
movq 0x20(%rsp), %rdi
addq $0x8, %rdi
callq 0x38c60
movq 0x20(%rsp), %rdi
movsd %xmm0, 0x8(%rsp)
addq $0x18, %rdi
callq 0x38c60
movsd 0x8(%rsp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0xbd861
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
movl %eax, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Box.cpp
// Function: gaps::R2Box::IsFinite() const
const RNBoolean R2Box::
IsFinite (void) const
{
    // Return whether bounding box contains a finite amount of space
    if (IsEmpty()) return TRUE;
    if (!RNIsFinite(minpt.X())) return FALSE;
    if (!RNIsFinite(minpt.Y())) return FALSE;
    if (!RNIsFinite(maxpt.X())) return FALSE;
    if (!RNIsFinite(maxpt.Y())) return FALSE;
    return TRUE;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq 0x8(%rsp), %rdi
movq %rdi, (%rsp)
callq 0xa36c0
cmpl $0x0, %eax
je 0xbd8b9
movl $0x1, 0x14(%rsp)
jmp 0xbd945
movq (%rsp), %rdi
addq $0x8, %rdi
callq 0x38c50
callq 0x44e40
cmpl $0x0, %eax
jne 0xbd8da
movl $0x0, 0x14(%rsp)
jmp 0xbd945
movq (%rsp), %rdi
addq $0x8, %rdi
callq 0x38c60
callq 0x44e40
cmpl $0x0, %eax
jne 0xbd8fb
movl $0x0, 0x14(%rsp)
jmp 0xbd945
movq (%rsp), %rdi
addq $0x18, %rdi
callq 0x38c50
callq 0x44e40
cmpl $0x0, %eax
jne 0xbd91c
movl $0x0, 0x14(%rsp)
jmp 0xbd945
movq (%rsp), %rdi
addq $0x18, %rdi
callq 0x38c60
callq 0x44e40
cmpl $0x0, %eax
jne 0xbd93d
movl $0x0, 0x14(%rsp)
jmp 0xbd945
movl $0x1, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nop
// File: 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:
subq $0x48, %rsp
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movl %edx, 0x34(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x20(%rsp)
movl 0x34(%rsp), %eax
movq %rax, 0x28(%rsp)
subq $0x3, %rax
ja 0xbda3a
movq 0x28(%rsp), %rax
leaq 0x78930(%rip), %rcx     # 0x1362c8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rsi
addq $0x8, %rsi
callq 0xc3170
jmp 0xbda59
movq 0x20(%rsp), %rdi
addq $0x8, %rdi
callq 0x38c50
movq 0x20(%rsp), %rdi
movsd %xmm0, 0x8(%rsp)
addq $0x18, %rdi
callq 0x38c60
movq 0x10(%rsp), %rdi
movaps %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
callq 0xc3140
jmp 0xbda59
movq 0x20(%rsp), %rdi
addq $0x18, %rdi
callq 0x38c50
movq 0x20(%rsp), %rdi
movsd %xmm0, (%rsp)
addq $0x8, %rdi
callq 0x38c60
movq 0x10(%rsp), %rdi
movaps %xmm0, %xmm1
movsd (%rsp), %xmm0
callq 0xc3140
jmp 0xbda59
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rsi
addq $0x18, %rsi
callq 0xc3170
jmp 0xbda59
leaq 0x788a5(%rip), %rdi     # 0x1362e6
movb $0x0, %al
callq 0xd4e20
movq 0x10(%rsp), %rdi
leaq 0x4bd3c4(%rip), %rsi    # 0x57ae18
callq 0xc3170
movq 0x18(%rsp), %rax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Box.cpp
// Function: gaps::R2Box::ShortestAxisLength() const
const RNLength R2Box::
ShortestAxisLength (void) const
{
    // Return shortest axis length
    RNLength dx = this->XLength();
    RNLength dy = this->YLength();
    return (dx < dy) ? dx : dy;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xb9370
movq 0x8(%rsp), %rdi
movsd %xmm0, 0x18(%rsp)
callq 0xb9390
movsd %xmm0, 0x10(%rsp)
movsd 0x18(%rsp), %xmm1
movsd 0x10(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xbe04d
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rsp)
jmp 0xbe058
movsd 0x10(%rsp), %xmm0
movsd %xmm0, (%rsp)
movsd (%rsp), %xmm0
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Box.cpp
// Function: gaps::R2Box::LongestAxisLength() const
const RNLength R2Box::
LongestAxisLength (void) const
{
    // Return longest axis length
    RNLength dx = this->XLength();
    RNLength dy = this->YLength();
    return (dx > dy) ? dx : dy;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xb9370
movq 0x8(%rsp), %rdi
movsd %xmm0, 0x18(%rsp)
callq 0xb9390
movsd %xmm0, 0x10(%rsp)
movsd 0x18(%rsp), %xmm0
ucomisd 0x10(%rsp), %xmm0
jbe 0xbe0b9
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rsp)
jmp 0xbe0c4
movsd 0x10(%rsp), %xmm0
movsd %xmm0, (%rsp)
movsd (%rsp), %xmm0
addq $0x28, %rsp
retq
nop
// File: 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:
subq $0x78, %rsp
movq %rdi, 0x48(%rsp)
movq %rdi, %rax
movq %rax, 0x40(%rsp)
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movq %rdx, 0x60(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x60(%rsp), %rsi
callq 0xc3170
movq 0x48(%rsp), %rdi
callq 0x38c50
movq 0x50(%rsp), %rdi
movsd %xmm0, 0x58(%rsp)
callq 0xa3750
movsd 0x58(%rsp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0xbe172
movq 0x50(%rsp), %rdi
callq 0xa3750
movq 0x48(%rsp), %rdi
movsd %xmm0, 0x38(%rsp)
xorl %esi, %esi
callq 0xa5b60
movsd 0x38(%rsp), %xmm0
movsd %xmm0, (%rax)
jmp 0xbe1c3
movq 0x48(%rsp), %rdi
callq 0x38c50
movq 0x50(%rsp), %rdi
movsd %xmm0, 0x30(%rsp)
callq 0xa3790
movaps %xmm0, %xmm1
movsd 0x30(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xbe1c1
movq 0x50(%rsp), %rdi
callq 0xa3790
movq 0x48(%rsp), %rdi
movsd %xmm0, 0x28(%rsp)
xorl %esi, %esi
callq 0xa5b60
movsd 0x28(%rsp), %xmm0
movsd %xmm0, (%rax)
jmp 0xbe1c3
movq 0x48(%rsp), %rdi
callq 0x38c60
movq 0x50(%rsp), %rdi
movsd %xmm0, 0x20(%rsp)
callq 0xa3770
movsd 0x20(%rsp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0xbe214
movq 0x50(%rsp), %rdi
callq 0xa3770
movq 0x48(%rsp), %rdi
movsd %xmm0, 0x18(%rsp)
movl $0x1, %esi
callq 0xa5b60
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
jmp 0xbe268
movq 0x48(%rsp), %rdi
callq 0x38c60
movq 0x50(%rsp), %rdi
movsd %xmm0, 0x10(%rsp)
callq 0xa37b0
movaps %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xbe266
movq 0x50(%rsp), %rdi
callq 0xa37b0
movq 0x48(%rsp), %rdi
movsd %xmm0, 0x8(%rsp)
movl $0x1, %esi
callq 0xa5b60
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rax)
jmp 0xbe268
movq 0x40(%rsp), %rax
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movsd %xmm0, 0x68(%rsp)
movq 0x70(%rsp), %rdi
movq %rdi, (%rsp)
callq 0xa36c0
cmpl $0x0, %eax
je 0xbe397
jmp 0xbe429
movq (%rsp), %rsi
leaq 0x58(%rsp), %rdi
callq 0xbdf00
movq (%rsp), %rdi
callq 0xa3570
movq %rax, %rsi
leaq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rdx
callq 0xc3830
movsd 0x68(%rsp), %xmm0
leaq 0x28(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0xa5c30
leaq 0x38(%rsp), %rdi
leaq 0x58(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0xc3880
movsd 0x68(%rsp), %xmm0
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0xa5c30
leaq 0x18(%rsp), %rdi
leaq 0x58(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0xc37a0
movq (%rsp), %rdi
movq (%rdi), %rax
leaq 0x38(%rsp), %rsi
leaq 0x18(%rsp), %rdx
callq *0x90(%rax)
addq $0x78, %rsp
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Box.cpp
// Function: gaps::R2Box::Union(gaps::R2Point const&)
void R2Box::
Union (const R2Point& point) 
{
    // Expand this to include point
    if (minpt.X() > point.X()) minpt[0] = point.X();
    if (minpt.Y() > point.Y()) minpt[1] = point.Y();
    if (maxpt.X() < point.X()) maxpt[0] = point.X();
    if (maxpt.Y() < point.Y()) maxpt[1] = point.Y();
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x50(%rsp), %rdi
movq %rdi, 0x38(%rsp)
addq $0x8, %rdi
callq 0x38c50
movsd %xmm0, 0x40(%rsp)
movq 0x48(%rsp), %rdi
callq 0x38c50
movaps %xmm0, %xmm1
movsd 0x40(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xbe4da
movq 0x48(%rsp), %rdi
callq 0x38c50
movq 0x38(%rsp), %rdi
movsd %xmm0, 0x30(%rsp)
addq $0x8, %rdi
xorl %esi, %esi
callq 0xa5b60
movsd 0x30(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x38(%rsp), %rdi
addq $0x8, %rdi
callq 0x38c60
movsd %xmm0, 0x28(%rsp)
movq 0x48(%rsp), %rdi
callq 0x38c60
movaps %xmm0, %xmm1
movsd 0x28(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xbe534
movq 0x48(%rsp), %rdi
callq 0x38c60
movq 0x38(%rsp), %rdi
movsd %xmm0, 0x20(%rsp)
addq $0x8, %rdi
movl $0x1, %esi
callq 0xa5b60
movsd 0x20(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x38(%rsp), %rdi
addq $0x18, %rdi
callq 0x38c50
movsd %xmm0, 0x18(%rsp)
movq 0x48(%rsp), %rdi
callq 0x38c50
movsd 0x18(%rsp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0xbe588
movq 0x48(%rsp), %rdi
callq 0x38c50
movq 0x38(%rsp), %rdi
movsd %xmm0, 0x10(%rsp)
addq $0x18, %rdi
xorl %esi, %esi
callq 0xa5b60
movsd 0x10(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x38(%rsp), %rdi
addq $0x18, %rdi
callq 0x38c60
movsd %xmm0, 0x8(%rsp)
movq 0x48(%rsp), %rdi
callq 0x38c60
movsd 0x8(%rsp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0xbe5dd
movq 0x48(%rsp), %rdi
callq 0x38c60
movq 0x38(%rsp), %rdi
movsd %xmm0, (%rsp)
addq $0x18, %rdi
movl $0x1, %esi
callq 0xa5b60
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Box.cpp
// Function: gaps::R2Box::Union(gaps::R2Box const&)
void R2Box::
Union (const R2Box& box) 
{
    // Expand this to include box
    if (minpt.X() > box.XMin()) minpt[0] = box.XMin();
    if (minpt.Y() > box.YMin()) minpt[1] = box.YMin();
    if (maxpt.X() < box.XMax()) maxpt[0] = box.XMax();
    if (maxpt.Y() < box.YMax()) maxpt[1] = box.YMax();
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x50(%rsp), %rdi
movq %rdi, 0x38(%rsp)
addq $0x8, %rdi
callq 0x38c50
movsd %xmm0, 0x40(%rsp)
movq 0x48(%rsp), %rdi
callq 0xa3750
movaps %xmm0, %xmm1
movsd 0x40(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xbe65a
movq 0x48(%rsp), %rdi
callq 0xa3750
movq 0x38(%rsp), %rdi
movsd %xmm0, 0x30(%rsp)
addq $0x8, %rdi
xorl %esi, %esi
callq 0xa5b60
movsd 0x30(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x38(%rsp), %rdi
addq $0x8, %rdi
callq 0x38c60
movsd %xmm0, 0x28(%rsp)
movq 0x48(%rsp), %rdi
callq 0xa3770
movaps %xmm0, %xmm1
movsd 0x28(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xbe6b4
movq 0x48(%rsp), %rdi
callq 0xa3770
movq 0x38(%rsp), %rdi
movsd %xmm0, 0x20(%rsp)
addq $0x8, %rdi
movl $0x1, %esi
callq 0xa5b60
movsd 0x20(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x38(%rsp), %rdi
addq $0x18, %rdi
callq 0x38c50
movsd %xmm0, 0x18(%rsp)
movq 0x48(%rsp), %rdi
callq 0xa3790
movsd 0x18(%rsp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0xbe708
movq 0x48(%rsp), %rdi
callq 0xa3790
movq 0x38(%rsp), %rdi
movsd %xmm0, 0x10(%rsp)
addq $0x18, %rdi
xorl %esi, %esi
callq 0xa5b60
movsd 0x10(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x38(%rsp), %rdi
addq $0x18, %rdi
callq 0x38c60
movsd %xmm0, 0x8(%rsp)
movq 0x48(%rsp), %rdi
callq 0xa37b0
movsd 0x8(%rsp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0xbe75d
movq 0x48(%rsp), %rdi
callq 0xa37b0
movq 0x38(%rsp), %rdi
movsd %xmm0, (%rsp)
addq $0x18, %rdi
movl $0x1, %esi
callq 0xa5b60
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Box.cpp
// Function: gaps::R2Box::Intersect(gaps::R2Box const&)
void R2Box::
Intersect (const R2Box& box) 
{
    // Intersect with box
    if (minpt.X() < box.XMin()) minpt[0] = box.XMin();
    if (minpt.Y() < box.YMin()) minpt[1] = box.YMin();
    if (maxpt.X() > box.XMax()) maxpt[0] = box.XMax();
    if (maxpt.Y() > box.YMax()) maxpt[1] = box.YMax();
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x50(%rsp), %rdi
movq %rdi, 0x38(%rsp)
addq $0x8, %rdi
callq 0x38c50
movsd %xmm0, 0x40(%rsp)
movq 0x48(%rsp), %rdi
callq 0xa3750
movsd 0x40(%rsp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0xbe857
movq 0x48(%rsp), %rdi
callq 0xa3750
movq 0x38(%rsp), %rdi
movsd %xmm0, 0x30(%rsp)
addq $0x8, %rdi
xorl %esi, %esi
callq 0xa5b60
movsd 0x30(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x38(%rsp), %rdi
addq $0x8, %rdi
callq 0x38c60
movsd %xmm0, 0x28(%rsp)
movq 0x48(%rsp), %rdi
callq 0xa3770
movsd 0x28(%rsp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0xbe8ae
movq 0x48(%rsp), %rdi
callq 0xa3770
movq 0x38(%rsp), %rdi
movsd %xmm0, 0x20(%rsp)
addq $0x8, %rdi
movl $0x1, %esi
callq 0xa5b60
movsd 0x20(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x38(%rsp), %rdi
addq $0x18, %rdi
callq 0x38c50
movsd %xmm0, 0x18(%rsp)
movq 0x48(%rsp), %rdi
callq 0xa3790
movaps %xmm0, %xmm1
movsd 0x18(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xbe905
movq 0x48(%rsp), %rdi
callq 0xa3790
movq 0x38(%rsp), %rdi
movsd %xmm0, 0x10(%rsp)
addq $0x18, %rdi
xorl %esi, %esi
callq 0xa5b60
movsd 0x10(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x38(%rsp), %rdi
addq $0x18, %rdi
callq 0x38c60
movsd %xmm0, 0x8(%rsp)
movq 0x48(%rsp), %rdi
callq 0xa37b0
movaps %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xbe95d
movq 0x48(%rsp), %rdi
callq 0xa37b0
movq 0x38(%rsp), %rdi
movsd %xmm0, (%rsp)
addq $0x18, %rdi
movl $0x1, %esi
callq 0xa5b60
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Box.cpp
// Function: gaps::R2Box::Transform(gaps::R2Transformation const&)
void R2Box::
Transform (const R2Transformation& transformation)
{
    // Do not transform empty box
    if (IsEmpty()) return;

    // Transform box ???
    R2Box tmp = R2null_box;
    for (RNQuadrant quadrant = 0; quadrant < RN_NUM_QUADRANTS; quadrant++) {
	R2Point corner(Corner(quadrant));
	corner.Transform(transformation);
	tmp.Union(corner);
    }
    *this = tmp;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq 0x60(%rsp), %rdi
movq %rdi, (%rsp)
callq 0xa36c0
cmpl $0x0, %eax
je 0xbe996
jmp 0xbea2f
leaq 0x30(%rsp), %rdi
leaq 0x4bc046(%rip), %rsi    # 0x57a9e8
callq 0xbd3e0
movl $0x0, 0x2c(%rsp)
cmpl $0x4, 0x2c(%rsp)
jge 0xbea15
movq (%rsp), %rsi
movl 0x2c(%rsp), %edx
leaq 0x18(%rsp), %rdi
callq 0xbd950
jmp 0xbe9ca
movq 0x58(%rsp), %rsi
leaq 0x18(%rsp), %rdi
callq 0xc3380
jmp 0xbe9db
leaq 0x30(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0xbe470
jmp 0xbe9ec
jmp 0xbe9ee
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0xbe9af
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x10(%rsp)
movl %eax, 0xc(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x6bc50
jmp 0xbea34
movq (%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xa5da0
jmp 0xbea25
leaq 0x30(%rsp), %rdi
callq 0x6bc50
addq $0x68, %rsp
retq
movq 0x10(%rsp), %rdi
callq 0xf890
nop
// File: tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Diad.cpp
// Function: gaps::R2Diad::R2Diad(gaps::R2Vector const&, gaps::R2Vector const&)
R2Diad::
R2Diad(const R2Vector& xaxis, const R2Vector& yaxis)
{
    // Just checking ...
    assert(xaxis.IsNormalized());
    assert(yaxis.IsNormalized());
    assert(R2Perpendicular(xaxis, yaxis));

    // Assign axes
    axis[0] = xaxis;
    axis[1] = yaxis;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rax, %rcx
addq $0x20, %rcx
movq %rcx, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movq %rdi, (%rsp)
callq 0xc3c20
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
addq $0x10, %rax
cmpq %rcx, %rax
movq %rax, 0x18(%rsp)
jne 0xbf41e
movq 0x8(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0xc4350
movq 0x8(%rsp), %rdi
movq 0x20(%rsp), %rsi
addq $0x10, %rdi
callq 0xc4350
addq $0x38, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R2Shapes/R3Matrix.cpp
// Function: gaps::R3Matrix::IsIsotropic() const
const RNBoolean R3Matrix::
IsIsotropic(void) const
{
    // Return whether matrix transformation is isotropic
    RNScalar d0 = m[0][0]*m[0][0] + m[1][0]*m[1][0] + m[2][0]*m[2][0];
    RNScalar d1 = m[0][1]*m[0][1] + m[1][1]*m[1][1] + m[2][1]*m[2][1];
    if (d0 != d1) return FALSE;
    return TRUE;
}

// Assembly:
movq %rdi, -0x10(%rsp)
movq -0x10(%rsp), %rax
movq %rax, -0x28(%rsp)
movsd (%rax), %xmm1
movsd (%rax), %xmm2
movsd 0x18(%rax), %xmm0
mulsd 0x18(%rax), %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x30(%rax), %xmm0
movsd 0x30(%rax), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rsp)
movsd 0x8(%rax), %xmm1
movsd 0x8(%rax), %xmm2
movsd 0x20(%rax), %xmm0
mulsd 0x20(%rax), %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x38(%rax), %xmm0
movsd 0x38(%rax), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rsp)
movsd -0x18(%rsp), %xmm0
ucomisd -0x20(%rsp), %xmm0
jne 0xbf9e7
jp 0xbf9e7
jmp 0xbf9f1
movl $0x0, -0x4(%rsp)
jmp 0xbf9f9
movl $0x1, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nop
// File: 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:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
movsd (%rax), %xmm0
movsd (%rax), %xmm2
movsd 0x18(%rax), %xmm1
mulsd 0x18(%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x10(%rsp), %xmm0
leaq 0xb8a31(%rip), %rax     # 0x1784e0
movsd (%rax), %xmm2
movsd 0x7354d(%rip), %xmm1    # 0x133008
callq 0x55570
cmpl $0x0, %eax
je 0xbfacf
movl $0x1, 0x24(%rsp)
jmp 0xbfb2a
movq (%rsp), %rax
movsd 0x8(%rax), %xmm0
movsd 0x8(%rax), %xmm2
movsd 0x20(%rax), %xmm1
mulsd 0x20(%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x8(%rsp), %xmm0
leaq 0xb89de(%rip), %rax     # 0x1784e0
movsd (%rax), %xmm2
movsd 0x734fa(%rip), %xmm1    # 0x133008
callq 0x55570
cmpl $0x0, %eax
je 0xbfb22
movl $0x1, 0x24(%rsp)
jmp 0xbfb2a
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R2Shapes/R3Matrix.cpp
// Function: gaps::R3Matrix::Determinant() const
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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movsd (%rax), %xmm0
movsd 0x8(%rax), %xmm1
movsd 0x10(%rax), %xmm2
movsd 0x18(%rax), %xmm3
movsd 0x20(%rax), %xmm4
movsd 0x28(%rax), %xmm5
movsd 0x30(%rax), %xmm6
movsd 0x38(%rax), %xmm7
movsd 0x40(%rax), %xmm8
movsd %xmm8, (%rsp)
callq 0xbfc70
addq $0x18, %rsp
retq
nopl (%rax,%rax)