LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Triangle.cpp
// Function: gaps::R3Triangle::Area() const
const RNArea R3Triangle::
Area(void) const
{
    // Compute area using Newell's method
    R3Vector sum = R3null_vector;
    sum += v[0]->Position().Vector() % v[2]->Position().Vector();
    sum += v[1]->Position().Vector() % v[0]->Position().Vector();
    sum += v[2]->Position().Vector() % v[1]->Position().Vector();
    return 0.5 * sum.Length();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rdi, %r14
leaq 0x4caaf(%rip), %rsi     # 0x99690
leaq 0x48(%rsp), %rbx
movq %rbx, %rdi
callq 0x3831c
movq 0x8(%r14), %rsi
leaq 0x18(%rsp), %r15
movq %r15, %rdi
callq 0x212f8
movq 0x18(%r14), %rsi
movq %rsp, %r12
movq %r12, %rdi
callq 0x212f8
leaq 0x30(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x389be
movq %rbx, %rdi
movq %r13, %rsi
callq 0x38a24
movq 0x10(%r14), %rsi
leaq 0x18(%rsp), %r15
movq %r15, %rdi
callq 0x212f8
movq 0x8(%r14), %rsi
movq %rsp, %r12
movq %r12, %rdi
callq 0x212f8
leaq 0x30(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x389be
movq %rbx, %rdi
movq %r13, %rsi
callq 0x38a24
movq 0x18(%r14), %rsi
leaq 0x18(%rsp), %r15
movq %r15, %rdi
callq 0x212f8
movq 0x10(%r14), %rsi
movq %rsp, %r14
movq %r14, %rdi
callq 0x212f8
leaq 0x30(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x389be
movq %rbx, %rdi
movq %r12, %rsi
callq 0x38a24
movq %rbx, %rdi
callq 0x38412
mulsd 0x46358(%rip), %xmm0    # 0x93010
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Triangle.cpp
// Function: gaps::R3Triangle::Centroid() const
const R3Point R3Triangle::
Centroid(void) const
{
    // Return centroid of vertex set
    R3Point centroid = R3zero_point;
    centroid += v[0]->Position();
    centroid += v[1]->Position();
    centroid += v[2]->Position();
    centroid /= 3;
    return centroid;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x48ed99(%rip), %rsi    # 0x4dba70
callq 0x37b5c
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x381b6
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x381b6
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0x381b6
movsd 0x464d0(%rip), %xmm0    # 0x931d8
movq %rbx, %rdi
callq 0x38234
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Triangle.cpp
// Function: gaps::R3Triangle::RandomPoint() const
const R3Point R3Triangle::
RandomPoint(void) const
{
  // Get vertex positions
  const R3Point& p0 = v[0]->Position();
  const R3Point& p1 = v[1]->Position();
  const R3Point& p2 = v[2]->Position();
  
  // Return random point on triangle
  RNScalar r1 = sqrt(RNRandomScalar());
  RNScalar r2 = RNRandomScalar();
  R3Point p = p0 * (1.0 - r1) + p1 * r1 * (1.0 - r2) + p2 * r1 * r2;
  return p;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movq %rdi, %rbx
movq 0x8(%rsi), %r12
movq 0x10(%rsi), %r15
movq 0x18(%rsi), %r14
callq 0x67e16
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x4cd50
sqrtsd %xmm0, %xmm0
jmp 0x4cd55
callq 0xe350
movsd %xmm0, (%rsp)
callq 0x67e16
movsd %xmm0, 0x8(%rsp)
movsd 0x4629b(%rip), %xmm0    # 0x93008
subsd (%rsp), %xmm0
leaq 0x70(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x382c0
leaq 0x40(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movsd (%rsp), %xmm0
callq 0x382c0
movsd 0x46269(%rip), %xmm0    # 0x93008
subsd 0x8(%rsp), %xmm0
leaq 0x58(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x382c0
leaq 0x88(%rsp), %r12
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x3827a
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movsd (%rsp), %xmm0
callq 0x382c0
leaq 0x28(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
movsd 0x8(%rsp), %xmm0
callq 0x382c0
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x3827a
movq %rbx, %rax
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Triangle.cpp
// Function: gaps::R3Triangle::ClosestPoint(gaps::R3Point const&) const
const R3Point R3Triangle::
ClosestPoint(const R3Point& point) const
{
    // Start with projection onto plane
    R3Point closest_point = point;
    closest_point.Project(Plane());

    // Project onto edge plane if point is on other side
    for (int i = 0; i < 3; i++) {
      R3TriangleVertex *v0 = v[i];
      R3TriangleVertex *v1 = v[(i+1)%3];
      R3Point p0 = v0->Position();
      R3Point p1 = v1->Position();
      R3Span span(p0, p1);
      if (RNIsZero(span.Length())) return Centroid();
      R3Vector n = span.Vector() % Normal();
      R3Plane edge_plane(p0, n);
      RNScalar d1 = R3SignedDistance(edge_plane, closest_point);
      if (RNIsPositive(d1)) {
        RNScalar t = span.T(closest_point);
        if (t < 0) t = 0;
        if (t > span.Length()) t = span.Length();
        closest_point = span.Point(t);
      }
    }
   
    // Return closest point;
    return closest_point;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rsi, %r14
movq %rdi, (%rsp)
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x37b5c
leaq 0x20(%r14), %rsi
movq %rbx, %rdi
movq %rsi, 0x8(%rsp)
callq 0x37e56
pushq $-0x3
popq %rbx
leaq 0xc0(%rsp), %rbp
leaq 0xd8(%rsp), %r12
testq %rbx, %rbx
je 0x4cf7d
movq 0x20(%r14,%rbx,8), %rsi
leaq 0x4(%rbx), %rax
incq %rbx
movl $0x0, %ecx
cmoveq %rcx, %rax
movq 0x8(%r14,%rax,8), %r13
movq %rbp, %rdi
callq 0x37b5c
leaq 0xa8(%rsp), %r15
movq %r15, %rdi
movq %r13, %rsi
callq 0x37b5c
leaq 0x28(%rsp), %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x37000
movsd 0x70(%rsp), %xmm0
leaq 0x8dce9(%rip), %rax     # 0xdaba8
movsd (%rax), %xmm1
movapd %xmm1, %xmm2
xorpd 0x46161(%rip), %xmm2    # 0x93030
ucomisd %xmm2, %xmm0
jb 0x4cedf
ucomisd %xmm0, %xmm1
jae 0x4cf90
leaq 0x90(%rsp), %r15
movq %r15, %rdi
leaq 0x40(%rsp), %rsi
movq 0x8(%rsp), %rdx
callq 0x389be
movq %r12, %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x367ac
movq %r12, %rdi
leaq 0x10(%rsp), %rsi
callq 0x43420
leaq 0x8dc8d(%rip), %rax     # 0xdaba8
ucomisd (%rax), %xmm0
jbe 0x4ce64
leaq 0x28(%rsp), %r15
movq %r15, %rdi
leaq 0x10(%rsp), %rsi
callq 0x37276
xorpd %xmm1, %xmm1
maxsd %xmm0, %xmm1
movsd 0x70(%rsp), %xmm0
minsd %xmm1, %xmm0
movq %r14, %r13
movq %rbp, %r14
movq %r12, %rbp
leaq 0x78(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x37180
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
movq %rbp, %r12
movq %r14, %rbp
movq %r13, %r14
callq 0x37e36
jmp 0x4ce64
leaq 0x10(%rsp), %rsi
movq (%rsp), %rbx
movq %rbx, %rdi
callq 0x37b5c
jmp 0x4cfa0
movq (%r14), %rax
movq (%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq *0x68(%rax)
movq %rbx, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Triangle.cpp
// Function: gaps::R3Triangle::FurthestPoint(gaps::R3Point const&) const
const R3Point R3Triangle::
FurthestPoint(const R3Point& point) const
{
    // Find furthest point
    RNLength furthest_dd = 0;
    R3Point furthest_point = R3zero_point;
    for (int i = 0; i < 3; i++) {
      R3TriangleVertex *vertex = v[i];
      R3Point p = vertex->Position();
      RNLength dd = R3SquaredDistance(p, point);
      if (dd > furthest_dd) {
        furthest_dd = dd;
        furthest_point = p;
      }
    }

    // Return furthest point
    return furthest_point;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0x48ea9d(%rip), %rsi    # 0x4dba70
callq 0x37b5c
xorpd %xmm0, %xmm0
movsd %xmm0, (%rsp)
pushq $0x1
popq %r13
leaq 0x8(%rsp), %r12
cmpq $0x4, %r13
je 0x4d023
movq (%r15,%r13,8), %rsi
movq %r12, %rdi
callq 0x37b5c
movq %r12, %rdi
movq %rbx, %rsi
callq 0x431f1
ucomisd (%rsp), %xmm0
jbe 0x4d01e
movq %r14, %rdi
movq %r12, %rsi
movsd %xmm0, (%rsp)
callq 0x37e36
incq %r13
jmp 0x4cfea
movq %r14, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Triangle.cpp
// Function: gaps::R3Triangle::operator=(gaps::R3Triangle const&)
R3Triangle& R3Triangle::
operator=(const R3Triangle& triangle)
{
    // Delete prevous vertices
    if (v[0] && !v[0]->Flags()[R3_VERTEX_SHARED_FLAG]) delete v[0];
    if (v[1] && !v[1]->Flags()[R3_VERTEX_SHARED_FLAG]) delete v[1];
    if (v[2] && !v[2]->Flags()[R3_VERTEX_SHARED_FLAG]) delete v[2];
  
    // Copy properties
    plane = triangle.plane;
    bbox = triangle.bbox;
    flags = triangle.flags;
    mark = 0;

    // Copy vertices 
    if (!triangle.v[0] || triangle.v[0]->Flags()[R3_VERTEX_SHARED_FLAG]) v[0] = triangle.v[0];
    else v[0] = new R3TriangleVertex(*(triangle.v[0]));
    if (!triangle.v[1] || triangle.v[1]->Flags()[R3_VERTEX_SHARED_FLAG]) v[1] = triangle.v[1];
    else v[1] = new R3TriangleVertex(*(triangle.v[1]));
    if (!triangle.v[2] || triangle.v[2]->Flags()[R3_VERTEX_SHARED_FLAG]) v[2] = triangle.v[2];
    else v[2] = new R3TriangleVertex(*(triangle.v[2]));

    // Update the triangle
    Update();

    // Return this
    return *this;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x4d0b3
testb $0x1, 0x5a(%rdi)
jne 0x4d0b3
pushq $0x68
popq %rsi
callq 0xe460
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x4d0ca
testb $0x1, 0x5a(%rdi)
jne 0x4d0ca
pushq $0x68
popq %rsi
callq 0xe460
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x4d0e1
testb $0x1, 0x5a(%rdi)
jne 0x4d0e1
pushq $0x68
popq %rsi
callq 0xe460
leaq 0x20(%r14), %rsi
leaq 0x20(%rbx), %rdi
callq 0x223a4
leaq 0x40(%r14), %rsi
leaq 0x40(%rbx), %rdi
callq 0x2141e
movq 0x78(%r14), %rax
movq %rax, 0x78(%rbx)
andl $0x0, 0x80(%rbx)
movq 0x8(%r14), %r12
testq %r12, %r12
je 0x4d136
testb $0x1, 0x5a(%r12)
jne 0x4d139
pushq $0x68
popq %rdi
callq 0xe450
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
callq 0x4c472
movq %r15, %r12
jmp 0x4d139
xorl %r12d, %r12d
movq %r12, 0x8(%rbx)
movq 0x10(%r14), %r12
testq %r12, %r12
je 0x4d169
testb $0x1, 0x5a(%r12)
jne 0x4d16c
pushq $0x68
popq %rdi
callq 0xe450
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
callq 0x4c472
movq %r15, %r12
jmp 0x4d16c
xorl %r12d, %r12d
movq %r12, 0x10(%rbx)
movq 0x18(%r14), %r14
testq %r14, %r14
je 0x4d19b
testb $0x1, 0x5a(%r14)
jne 0x4d19e
pushq $0x68
popq %rdi
callq 0xe450
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x4c472
movq %r15, %r14
jmp 0x4d19e
xorl %r14d, %r14d
movq %r14, 0x18(%rbx)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x250(%rax)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x4d1c1
jmp 0x4d1c1
movq %rax, %rbx
pushq $0x68
popq %rsi
movq %r15, %rdi
callq 0xe460
movq %rbx, %rdi
callq 0xe810
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Triangle.cpp
// Function: gaps::R3Triangle::Flip()
void R3Triangle::
Flip (void) 
{
    // Flip orientation of plane
    plane.Flip();

    // Reverse order of vertices
    R3TriangleVertex *swap = v[0];
    v[0] = v[2];
    v[2] = swap;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $0x20, %rdi
callq 0x21548
movq 0x8(%rbx), %rax
movq 0x18(%rbx), %rcx
movq %rcx, 0x8(%rbx)
movq %rax, 0x18(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Triangle.cpp
// Function: gaps::R3Triangle::Mirror(gaps::R3Plane const&)
void R3Triangle::
Mirror (const R3Plane& plane)
{
    // Mirror vertices (what if they are shared?)
    v[0]->Mirror(plane);
    v[1]->Mirror(plane);
    v[2]->Mirror(plane);

    // Reverse order of vertices
    R3TriangleVertex *swap = v[0];
    v[0] = v[2];
    v[2] = swap;

    // Update
    Update();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rdi
callq 0x4c72a
movq 0x10(%r14), %rdi
movq %rbx, %rsi
callq 0x4c72a
movq 0x18(%r14), %rdi
movq %rbx, %rsi
callq 0x4c72a
movq (%r14), %rax
movq 0x8(%r14), %rcx
movq 0x18(%r14), %rdx
movq %rdx, 0x8(%r14)
movq %rcx, 0x18(%r14)
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *0x250(%rax)
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Triangle.cpp
// Function: gaps::R3Triangle::Transform(gaps::R3Transformation const&)
void R3Triangle::
Transform (const R3Transformation& transformation) 
{
    // Transform vertices
    v[0]->Transform(transformation);
    v[1]->Transform(transformation);
    v[2]->Transform(transformation);

    // Check if need to flip orientation
    if (transformation.IsMirrored()) {
      R3TriangleVertex *swap = v[0];
      v[0] = v[2];
      v[2] = swap;
    }

    // Update
    Update();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x4c750
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x4c750
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0x4c750
movq (%r14), %rax
movq %r14, %rdi
callq *0x18(%rax)
testl %eax, %eax
je 0x4d2c0
movq 0x8(%rbx), %rax
movq 0x18(%rbx), %rcx
movq %rcx, 0x8(%rbx)
movq %rax, 0x18(%rbx)
movq (%rbx), %rax
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *0x250(%rax)
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Triangle.cpp
// Function: gaps::R3Triangle::Update()
void R3Triangle::
Update(void)
{
    // Recompute plane equation
    plane = R3Plane(v[0]->Position(), v[1]->Position(), v[2]->Position()); 

    // Recompute bounding box
    bbox = R3null_box;
    bbox.Union(v[0]->Position());
    bbox.Union(v[1]->Position());
    bbox.Union(v[2]->Position());

    // Recompute flags
    UpdateFlags();
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %rsi
movq 0x10(%rdi), %rdx
movq 0x18(%rdi), %rcx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x36918
leaq 0x20(%rbx), %rdi
movq %r14, %rsi
callq 0x223a4
leaq 0x40(%rbx), %r14
leaq 0x8db5c(%rip), %rsi     # 0xdaea8
movq %r14, %rdi
callq 0x2141e
movq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x254a4
movq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x254a4
movq 0x18(%rbx), %rsi
movq %r14, %rdi
callq 0x254a4
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x248(%rax)
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Triangle.cpp
// Function: gaps::R3Triangle::UpdateFlags()
void R3Triangle::
UpdateFlags(void)
{
    // Recompute flags
    flags.Add(R3_EVERYTHING_DRAW_FLAGS);
    for (int i = 0; i < 3; i++) {
	RNFlags vertex_flags = v[i]->Flags();
	if (!(vertex_flags[R3_VERTEX_NORMALS_DRAW_FLAG]))
	    flags.Remove(R3_VERTEX_NORMALS_DRAW_FLAG);
	if (!(vertex_flags[R3_VERTEX_COLORS_DRAW_FLAG]))
	    flags.Remove(R3_VERTEX_COLORS_DRAW_FLAG);
	if (!(vertex_flags[R3_VERTEX_TEXTURE_COORDS_DRAW_FLAG]))
	    flags.Remove(R3_VERTEX_TEXTURE_COORDS_DRAW_FLAG);
    }
}

// Assembly:
movl $0x7777, %ecx           # imm = 0x7777
orq 0x78(%rdi), %rcx
movq %rcx, 0x78(%rdi)
pushq $0x1
popq %rax
cmpq $0x4, %rax
je 0x4d3f1
movq (%rdi,%rax,8), %rdx
movl 0x58(%rdx), %edx
movq %rcx, %rsi
andq $-0x101, %rsi           # imm = 0xFEFF
btl $0x8, %edx
cmovbq %rcx, %rsi
movq %rsi, %r8
andq $-0x401, %r8            # imm = 0xFBFF
btl $0xa, %edx
cmovbq %rsi, %r8
movq %r8, %rcx
andq $-0x201, %rcx           # imm = 0xFDFF
btl $0x9, %edx
cmovbq %r8, %rcx
notl %edx
testw $0x700, %dx             # imm = 0x700
je 0x4d3ec
movq %rcx, 0x78(%rdi)
incq %rax
jmp 0x4d39c
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Ellipsoid.cpp
// Function: gaps::R3Ellipsoid::IsLinear() const
const RNBoolean R3Ellipsoid::
IsLinear(void) const
{
    // A ellipsoid only lies on a single line if two radii are zero
    int nzeros = 0;
    if (radii.X() == 0.0) nzeros++;
    if (radii.Y() == 0.0) nzeros++;
    if (radii.Z() == 0.0) nzeros++;
    return (nzeros >= 2);
}

// Assembly:
xorpd %xmm0, %xmm0
movsd 0x68(%rdi), %xmm1
cmpeqsd %xmm0, %xmm1
movq %xmm1, %rax
pushq $0x1
popq %rcx
subl %eax, %ecx
andl $0x1, %eax
ucomisd 0x70(%rdi), %xmm0
cmovnel %eax, %ecx
cmovpl %eax, %ecx
cmpeqsd 0x78(%rdi), %xmm0
movq %xmm0, %rax
subl %eax, %ecx
xorl %eax, %eax
cmpl $0x2, %ecx
setae %al
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Ellipsoid.cpp
// Function: gaps::R3Ellipsoid::BSphere() const
const R3Sphere R3Ellipsoid::
BSphere(void) const
{
    // Return bounding sphere
    switch(radii.Sextant()) {
    case RN_NX_SEXTANT: return R3Sphere(Center(), radii.X());
    case RN_PX_SEXTANT: return R3Sphere(Center(), radii.X());
    case RN_NY_SEXTANT: return R3Sphere(Center(), radii.Y());
    case RN_PY_SEXTANT: return R3Sphere(Center(), radii.Y());
    case RN_NZ_SEXTANT: return R3Sphere(Center(), radii.Z());
    case RN_PZ_SEXTANT: return R3Sphere(Center(), radii.Z());
    default:
	RNAbort("Illegal sextant found");
	return R3null_sphere;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x68(%rsi), %rdi
callq 0x384ca
cmpl $0x5, %eax
ja 0x4d748
movl %eax, %eax
leaq 0x4ca81(%rip), %rcx     # 0x9a190
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movsd 0x68(%r14), %xmm0
jmp 0x4d72e
movsd 0x78(%r14), %xmm0
jmp 0x4d72e
movsd 0x70(%r14), %xmm0
addq $0x8, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x24714
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x4ca7a(%rip), %rdi     # 0x9a1c9
xorl %eax, %eax
callq 0x680f0
leaq 0x8d5f3(%rip), %rsi     # 0xdad50
movq %rbx, %rdi
callq 0x246c8
jmp 0x4d73d
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Cone.cpp
// Function: gaps::R3Cone::BBox() const
const R3Box R3Cone::
BBox(void) const
{
    // Return bounding box 
    R3Box bbox(Apex(), Apex());
    bbox.Union(base.BBox());
    return bbox;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x38(%rsi), %rdx
movq %rdx, %rsi
callq 0x24b90
addq $0x58, %r14
movq %rsp, %rdi
movq %r14, %rsi
callq 0x4a990
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x25556
movq %rsp, %rdi
callq 0x25832
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rsp, %rdi
callq 0x25832
jmp 0x4db86
movq %rax, %r14
movq %rbx, %rdi
callq 0x25832
movq %r14, %rdi
callq 0xe810
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Cone.cpp
// Function: gaps::R3Cone::BSphere() const
const R3Sphere R3Cone::
BSphere(void) const
{
    // Compute distance up axis for sphere center using quadradic formula
    if (RNIsLessOrEqual(Height(), Radius())) return base.BSphere();
    RNScalar d = 1.0 - 4.0 * (Radius() * Radius() - Height());
    if (RNIsNegativeOrZero(d)) return base.BSphere();
    d = sqrt(d);
    if (d <= 1.0) d = 0.5 * (1.0 + d);
    else  d = 0.5 * (1.0 + d);
    R3Point center = base.Center() + d * axis.Vector();
    return R3Sphere(center, Height() - d); 
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movsd 0x50(%rsi), %xmm2
movsd 0x78(%rsi), %xmm0
leaq 0x8cfee(%rip), %rax     # 0xdaba8
movsd (%rax), %xmm1
movapd %xmm2, %xmm3
subsd %xmm0, %xmm3
ucomisd %xmm3, %xmm1
jae 0x4dbfa
mulsd %xmm0, %xmm0
subsd %xmm2, %xmm0
mulsd 0x4c324(%rip), %xmm0    # 0x99f00
addsd 0x45424(%rip), %xmm0    # 0x93008
ucomisd %xmm0, %xmm1
jae 0x4dbfa
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x4dc0b
sqrtsd %xmm0, %xmm0
jmp 0x4dc10
addq $0x58, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4a9d6
jmp 0x4dc65
callq 0xe350
addsd 0x453f0(%rip), %xmm0    # 0x93008
mulsd 0x453f0(%rip), %xmm0    # 0x93010
leaq 0x60(%r14), %r15
leaq 0x20(%r14), %rsi
leaq 0x10(%rsp), %r12
movq %r12, %rdi
movsd %xmm0, 0x8(%rsp)
callq 0x38a02
leaq 0x28(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x37e13
movsd 0x50(%r14), %xmm0
subsd 0x8(%rsp), %xmm0
movq %rbx, %rdi
movq %r13, %rsi
callq 0x24714
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Cone.cpp
// Function: gaps::R3Cone::Reposition(gaps::R3Span const&)
void R3Cone::
Reposition(const R3Span& axis)
{
    // Set cone axis
    this->axis = axis;
    base.Reposition(axis.Start());
    base.Align(-axis.Vector());
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
addq $0x8, %rdi
callq 0x21dfa
addq $0x58, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4a9f8
addq $0x18, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x38c72
movq %r14, %rdi
movq %r15, %rsi
callq 0x4aa4c
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Cylinder.cpp
// Function: gaps::R3Cylinder::operator==(gaps::R3Cylinder const&) const
RNBoolean R3Cylinder::
operator==(const R3Cylinder& cylinder) const
{
    // Return whether cylinder is equal
    return ((axis == cylinder.axis) && 
	    (base == cylinder.base) &&
	    (top == cylinder.top));
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
addq $0x8, %rdi
addq $0x8, %rsi
callq 0x376aa
xorl %ebp, %ebp
testl %eax, %eax
je 0x4e0e0
leaq 0x58(%r14), %rdi
leaq 0x58(%rbx), %rsi
callq 0x4e398
testl %eax, %eax
je 0x4e0e0
movl $0xa0, %eax
addq %rax, %r14
addq %rax, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4e398
xorl %ebp, %ebp
testl %eax, %eax
setne %bpl
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Cylinder.cpp
// Function: gaps::R3Cylinder::BBox() const
const R3Box R3Cylinder::
BBox(void) const
{
    // Return bounding box of cylinder ???
    R3Box bbox(R3null_box);
    bbox.Union(base.BBox());
    bbox.Union(top.BBox());
    return bbox;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8cd38(%rip), %rsi     # 0xdaea8
callq 0x24b3e
leaq 0x58(%r14), %rsi
movq %rsp, %rdi
callq 0x4a990
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x25556
movq %rsp, %rdi
callq 0x25832
addq $0xa0, %r14
movq %rsp, %rdi
movq %r14, %rsi
callq 0x4a990
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x25556
movq %rsp, %rdi
callq 0x25832
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
jmp 0x4e1c8
jmp 0x4e1d5
movq %rax, %r14
movq %rsp, %rdi
callq 0x25832
jmp 0x4e1d8
movq %rax, %r14
movq %rbx, %rdi
callq 0x25832
movq %r14, %rdi
callq 0xe810
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Cylinder.cpp
// Function: gaps::R3Cylinder::BSphere() const
const R3Sphere R3Cylinder::
BSphere(void) const
{
    // Return BSphere
    RNScalar a = 0.5 * Height();
    RNScalar r = sqrt(a * a + Radius() * Radius());
    return R3Sphere(Centroid(), r);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movsd 0x50(%rsi), %xmm0
movsd 0x78(%rsi), %xmm1
mulsd 0x44e0c(%rip), %xmm0    # 0x93010
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
sqrtsd %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
movq (%rsi), %rax
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq *0x68(%rax)
movq %rbx, %rdi
movq %r14, %rsi
movsd 0x8(%rsp), %xmm0
callq 0x24714
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Cylinder.cpp
// Function: gaps::R3Cylinder::Reposition(gaps::R3Span const&)
void R3Cylinder::
Reposition(const R3Span& axis)
{
    // Set cylinder axis
    this->axis = axis;
    base.Reposition(axis.Start());
    base.Align(-(axis.Vector()));
    top.Reposition(axis.End());
    top.Align(axis.Vector());
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
addq $0x8, %rdi
callq 0x21dfa
leaq 0x58(%rbx), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x4a9f8
leaq 0x18(%r14), %r12
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x38c72
movq %r15, %rdi
movq %r13, %rsi
callq 0x4aa4c
addq $0xa0, %rbx
addq $0x30, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4a9f8
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4aa4c
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/./R3Circle.h
// Function: gaps::R3Circle::operator==(gaps::R3Circle const&) const
inline RNBoolean R3Circle::
operator==(const R3Circle& circle) const
{
    // Return whether circle is equal
    return ((center == circle.center) && 
	    (radius == circle.radius) && 
	    (plane == circle.plane));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0x8, %rdi
addq $0x8, %rsi
callq 0x37c12
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
je 0x4e3e2
movsd 0x20(%r14), %xmm0
ucomisd 0x20(%rbx), %xmm0
jne 0x4e3e2
jp 0x4e3e2
addq $0x28, %r14
addq $0x28, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x477ca
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3OrientedBox.cpp
// Function: gaps::R3OrientedBox::R3OrientedBox(gaps::R3OrientedBox const&)
R3OrientedBox::
R3OrientedBox(const R3OrientedBox& box)
    : cs(box.cs)
{
    // Copy radii from box
    this->radius[0] = box.radius[0];
    this->radius[1] = box.radius[1];
    this->radius[2] = box.radius[2];
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x25826
leaq 0x8abbe(%rip), %rax     # 0xd9088
movq %rax, (%rbx)
leaq 0x8(%rbx), %rdi
leaq 0x8(%r14), %rsi
callq 0x27d6c
movsd 0x68(%r14), %xmm0
movsd %xmm0, 0x68(%rbx)
movsd 0x70(%r14), %xmm0
movsd %xmm0, 0x70(%rbx)
movsd 0x78(%r14), %xmm0
movsd %xmm0, 0x78(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x25832
movq %r14, %rdi
callq 0xe810
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3OrientedBox.cpp
// Function: gaps::R3OrientedBox::Plane(int, int) const
const R3Plane R3OrientedBox::
Plane(RNDirection dir, RNDimension dim) const
{
    if (IsEmpty()) return R3null_plane;
    R3Vector normal = (dir == 0) ? Axis(dim) : -1.0 * Axis(dim);
    R3Point point = cs.Origin() + Radius(dim)*normal;
    return R3Plane(point, normal);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %ecx, %r15d
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x22b76
testl %eax, %eax
je 0x4eac0
leaq 0x48cbea(%rip), %rsi    # 0x4db6a0
movq %rbx, %rdi
callq 0x36720
jmp 0x4eb29
movslq %r15d, %r15
imulq $0x18, %r15, %rax
leaq (%r14,%rax), %rsi
addq $0x20, %rsi
movq %rsp, %rdi
testl %ebp, %ebp
je 0x4eae5
movsd 0x44542(%rip), %xmm0    # 0x93020
callq 0x38a02
jmp 0x4eaea
callq 0x3831c
movsd 0x68(%r14,%r15,8), %xmm0
addq $0x8, %r14
leaq 0x18(%rsp), %r15
movq %rsp, %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x38a02
leaq 0x30(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x37e13
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x367ac
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3OrientedBox.cpp
// Function: gaps::R3OrientedBox::Plane(int) const
const R3Plane R3OrientedBox::
Plane(RNSide side) const
{
    // Return plane for appropriate side
    switch (side) {
    case RN_LX_SIDE: return Plane(RN_LO, RN_X);
    case RN_HX_SIDE: return Plane(RN_HI, RN_X);
    case RN_LY_SIDE: return Plane(RN_LO, RN_Y);
    case RN_HY_SIDE: return Plane(RN_HI, RN_Y);
    case RN_LZ_SIDE: return Plane(RN_LO, RN_Z);
    case RN_HZ_SIDE: return Plane(RN_HI, RN_Z);
    }
    
    // Should never reach here
    return R3null_plane;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl $0x5, %edx
ja 0x4eb93
movl %edx, %eax
leaq 0x4b6f2(%rip), %rcx     # 0x9a240
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
xorl %edx, %edx
jmp 0x4eb7c
pushq $0x2
jmp 0x4eb64
pushq $0x1
popq %rcx
movq %rbx, %rdi
xorl %edx, %edx
jmp 0x4eb89
pushq $0x1
popq %rcx
movq %rbx, %rdi
movl %ecx, %edx
jmp 0x4eb89
pushq $0x1
popq %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
jmp 0x4eb89
pushq $0x1
popq %rdx
pushq $0x2
popq %rcx
movq %rbx, %rdi
callq 0x4ea8a
movq %rbx, %rax
popq %rbx
retq
leaq 0x48cb06(%rip), %rsi    # 0x4db6a0
movq %rbx, %rdi
callq 0x36720
jmp 0x4eb8e
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3OrientedBox.cpp
// Function: gaps::R3OrientedBox::ClosestPoint(gaps::R3Point const&) const
const R3Point R3OrientedBox::
ClosestPoint(const R3Point& point) const
{
    // Check if box is empty
    if (IsEmpty()) return R3zero_point;

    // Start with original point
    R3Point closest_point = point;

    // Iteratively project onto each plane, if outside
    for (int dir = 0; dir < 2; dir++) {
      for (int dim = 0; dim < 3; dim++) {
        R3Plane plane = Plane(dir, dim);
        RNScalar d = R3SignedDistance(plane, closest_point);
        if (d > 0) closest_point -= d * plane.Normal();
      }
    }

    // Return closest point
    return closest_point;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x22b76
testl %eax, %eax
je 0x4ebe8
leaq 0x48cea2(%rip), %rsi    # 0x4dba70
movq %rbx, %rdi
callq 0x37b5c
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movq %r15, %rsi
callq 0x37b5c
xorl %ebp, %ebp
leaq 0x18(%rsp), %r15
movq %rsp, %r12
cmpl $0x2, %ebp
je 0x4ebd6
xorl %r13d, %r13d
cmpl $0x3, %r13d
je 0x4ec4b
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
movl %r13d, %ecx
callq 0x4ea8a
movq %r15, %rdi
movq %rbx, %rsi
callq 0x43420
ucomisd 0x445ba(%rip), %xmm0    # 0x931e8
jbe 0x4ec46
movq %r12, %rdi
movq %r15, %rsi
callq 0x38a02
movq %rbx, %rdi
movq %r12, %rsi
callq 0x381e4
incl %r13d
jmp 0x4ec05
incl %ebp
jmp 0x4ebfd
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3OrientedBox.cpp
// Function: gaps::R3OrientedBox::IsLinear() const
const RNBoolean R3OrientedBox::
IsLinear(void) const
{
    // Check if box is empty
    if (IsEmpty()) return FALSE;

    // A box lies on a line if its second highest radius is zero
    if (Radius(0) > Radius(1)) {
        if (Radius(1) > Radius(2)) return RNIsZero(Radius(1));
        else return RNIsZero(Radius(2));
    }
    else {
        if (Radius(0) > Radius(2)) return RNIsZero(Radius(0));
        else return RNIsZero(Radius(2));
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x22b76
testl %eax, %eax
je 0x4ed41
xorl %eax, %eax
jmp 0x4edb3
movsd 0x68(%rbx), %xmm3
movsd 0x70(%rbx), %xmm4
ucomisd %xmm4, %xmm3
movsd 0x78(%rbx), %xmm2
leaq 0x8be4d(%rip), %rax     # 0xdaba8
movsd (%rax), %xmm1
movapd 0x442c9(%rip), %xmm0    # 0x93030
xorpd %xmm1, %xmm0
jbe 0x4ed87
ucomisd %xmm2, %xmm4
jbe 0x4eda1
cmplepd %xmm4, %xmm0
cmplepd %xmm1, %xmm4
andpd %xmm0, %xmm4
movd %xmm4, %eax
jmp 0x4edb3
ucomisd %xmm2, %xmm3
jbe 0x4eda1
cmplepd %xmm3, %xmm0
cmplepd %xmm1, %xmm3
andpd %xmm0, %xmm3
movd %xmm3, %eax
jmp 0x4edb3
cmplepd %xmm2, %xmm0
cmplepd %xmm1, %xmm2
andpd %xmm0, %xmm2
movd %xmm2, %eax
movzbl %al, %eax
andl $0x1, %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3OrientedBox.cpp
// Function: gaps::R3OrientedBox::operator==(gaps::R3OrientedBox const&) const
RNBoolean R3OrientedBox::
operator==(const R3OrientedBox& box) const
{
    // Return whether box is equal
    return ((Center() == Center()) &&
            (Axis(0) == box.Axis(0)) && 
	    (Axis(1) == box.Axis(1)) && 
	    (Axis(2) == box.Axis(2)) && 
	    (Radius(0) == box.Radius(0)) && 
	    (Radius(1) == box.Radius(1)) && 
	    (Radius(2) == box.Radius(2)));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
addq $0x8, %rdi
movq %rdi, %rsi
callq 0x37c12
xorl %ebx, %ebx
testl %eax, %eax
je 0x4ee93
leaq 0x20(%r14), %rdi
leaq 0x20(%r15), %rsi
callq 0x385ac
testl %eax, %eax
je 0x4ee93
leaq 0x38(%r14), %rdi
leaq 0x38(%r15), %rsi
callq 0x385ac
testl %eax, %eax
je 0x4ee93
leaq 0x50(%r14), %rdi
leaq 0x50(%r15), %rsi
callq 0x385ac
testl %eax, %eax
je 0x4ee93
movsd 0x68(%r14), %xmm0
ucomisd 0x68(%r15), %xmm0
jne 0x4ee93
jp 0x4ee93
movsd 0x70(%r14), %xmm0
ucomisd 0x70(%r15), %xmm0
jne 0x4ee93
jp 0x4ee93
movsd 0x78(%r15), %xmm0
cmpeqsd 0x78(%r14), %xmm0
movq %xmm0, %rbx
andl $0x1, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3OrientedBox.cpp
// Function: gaps::R3OrientedBox::Area() const
const RNArea R3OrientedBox::
Area(void) const
{
    // Check if box is empty
    if (IsEmpty()) return 0.0;

    // Return surface area of box
    RNScalar area = 0;
    area += 2*4*Radius(0)*Radius(1);
    area += 2*4*Radius(1)*Radius(2);
    area += 2*4*Radius(2)*Radius(0);
    return area;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x22b76
testl %eax, %eax
je 0x4eee2
xorps %xmm0, %xmm0
popq %rbx
retq
movsd 0x68(%rbx), %xmm1
movsd 0x70(%rbx), %xmm2
movsd 0x44304(%rip), %xmm3    # 0x931f8
movapd %xmm1, %xmm0
mulsd %xmm3, %xmm0
mulsd %xmm2, %xmm0
xorpd %xmm4, %xmm4
addsd %xmm0, %xmm4
mulsd %xmm3, %xmm2
movsd 0x78(%rbx), %xmm0
mulsd %xmm0, %xmm2
addsd %xmm4, %xmm2
mulsd %xmm3, %xmm0
mulsd %xmm1, %xmm0
addsd %xmm2, %xmm0
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3OrientedBox.cpp
// Function: gaps::R3OrientedBox::Volume() const
const RNVolume R3OrientedBox::
Volume(void) const
{
    // Check if box is empty
    if (IsEmpty()) return 0.0;

    // Return volume of box
    return 8*Radius(0)*Radius(1)*Radius(2);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x22b76
xorpd %xmm0, %xmm0
testl %eax, %eax
jne 0x4ef50
movsd 0x68(%rbx), %xmm0
mulsd 0x442b2(%rip), %xmm0    # 0x931f8
mulsd 0x70(%rbx), %xmm0
mulsd 0x78(%rbx), %xmm0
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3OrientedBox.cpp
// Function: gaps::R3OrientedBox::BBox() const
const R3Box R3OrientedBox::
BBox(void) const
{
    // Check if box is empty
    if (IsEmpty()) return R3null_box;

    // Return bounding box 
    R3Box bbox = R3null_box;
    for (int i = 0; i < RN_NUM_OCTANTS; i++) 
      bbox.Union(Corner(i));
    return bbox;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x22b76
movl %eax, %ebp
leaq 0x8bef7(%rip), %rsi     # 0xdaea8
movq %rbx, %rdi
callq 0x24b3e
testl %ebp, %ebp
je 0x4efcb
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %ebp, %ebp
movq %rsp, %r15
cmpl $0x8, %ebp
je 0x4efbd
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x221da
movq %rbx, %rdi
movq %r15, %rsi
callq 0x254a4
incl %ebp
jmp 0x4efd0
movq %rax, %r14
movq %rbx, %rdi
callq 0x25832
movq %r14, %rdi
callq 0xe810
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3OrientedBox.cpp
// Function: gaps::R3OrientedBox::Resize(double, double, double)
void R3OrientedBox::
Resize(RNLength radius0, RNLength radius1, RNLength radius2) 
{
    // Check if box is empty
    if (IsEmpty()) return;

    // Set box radius
    this->radius[0] = radius0;
    this->radius[1] = radius1;
    this->radius[2] = radius2;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movsd %xmm2, 0x18(%rsp)
movsd %xmm1, 0x10(%rsp)
movsd %xmm0, 0x8(%rsp)
movq %rdi, %rbx
callq 0x22b76
testl %eax, %eax
jne 0x4f0fe
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x68(%rbx)
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x70(%rbx)
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x78(%rbx)
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3OrientedBox.cpp
// Function: gaps::R3OrientedBox::Rotate(int, double)
void R3OrientedBox::
Rotate(RNAxis rotation_axis, RNAngle theta) 
{
    // Check if box is empty
    if (IsEmpty()) return;

    // Rotate axes
    R3Vector axis0 = Axis(0);
    R3Vector axis1 = Axis(1);
    axis0.Rotate(rotation_axis, theta);
    axis1.Rotate(rotation_axis, theta);

    // Reorient with rotated axes
    Reorient(axis0, axis1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movsd %xmm0, (%rsp)
movl %esi, %ebp
movq %rdi, %rbx
callq 0x22b76
testl %eax, %eax
jne 0x4f1cb
leaq 0x20(%rbx), %rsi
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x3831c
leaq 0x38(%rbx), %rsi
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x3831c
movq %r14, %rdi
movl %ebp, %esi
movsd (%rsp), %xmm0
callq 0x387ec
movq %r15, %rdi
movl %ebp, %esi
movsd (%rsp), %xmm0
callq 0x387ec
movq (%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq *0x250(%rax)
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3OrientedBox.cpp
// Function: gaps::R3OrientedBox::Rotate(gaps::R3Vector const&, double)
void R3OrientedBox::
Rotate(const R3Vector& rotation_axis, RNAngle theta) 
{
    // Check if box is empty
    if (IsEmpty()) return;

    // Rotate axes
    R3Vector axis0 = Axis(0);
    R3Vector axis1 = Axis(1);
    axis0.Rotate(rotation_axis, theta);
    axis1.Rotate(rotation_axis, theta);

    // Reorient with rotated axes
    Reorient(axis0, axis1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movsd %xmm0, (%rsp)
movq %rsi, %r14
movq %rdi, %rbx
callq 0x22b76
testl %eax, %eax
jne 0x4f249
leaq 0x20(%rbx), %rsi
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0x3831c
leaq 0x38(%rbx), %rsi
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x3831c
movq %r15, %rdi
movq %r14, %rsi
movsd (%rsp), %xmm0
callq 0x3889c
movq %r12, %rdi
movq %r14, %rsi
movsd (%rsp), %xmm0
callq 0x3889c
movq (%rbx), %rax
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq *0x250(%rax)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3OrientedBox.cpp
// Function: gaps::R3OrientedBox::Transform(gaps::R3Transformation const&)
void R3OrientedBox::
Transform (const R3Transformation& transformation)
{
    // Check if box is empty
    if (IsEmpty()) return;

    // Transform 
    cs.Transform(transformation);
    radius[0] *= transformation.ScaleFactor();
    radius[1] *= transformation.ScaleFactor();
    radius[2] *= transformation.ScaleFactor();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x22b76
testl %eax, %eax
jne 0x4f305
leaq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x27f1e
movq (%r14), %rax
movq %r14, %rdi
callq *0xc0(%rax)
mulsd 0x68(%rbx), %xmm0
movsd %xmm0, 0x68(%rbx)
movq (%r14), %rax
movq %r14, %rdi
callq *0xc0(%rax)
mulsd 0x70(%rbx), %xmm0
movsd %xmm0, 0x70(%rbx)
movq (%r14), %rax
movq %r14, %rdi
callq *0xc0(%rax)
mulsd 0x78(%rbx), %xmm0
movsd %xmm0, 0x78(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/./R3OrientedBox.h
// Function: gaps::R3OrientedBox::MaxRadius() const
inline const RNLength R3OrientedBox::
MaxRadius(void) const
{
    // Check if box is empty
    if (IsEmpty()) return -1.0;

    // Return smallest radius
    RNLength result = Radius(0);
    if (Radius(1) > result) result = Radius(1);
    if (Radius(2) > result) result = Radius(2);
    return result;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x22b76
testl %eax, %eax
je 0x4f6c1
movsd 0x43961(%rip), %xmm0    # 0x93020
jmp 0x4f6da
movsd 0x70(%rbx), %xmm0
movsd 0x78(%rbx), %xmm1
maxsd 0x68(%rbx), %xmm0
ucomisd %xmm0, %xmm1
jbe 0x4f6da
movapd %xmm1, %xmm0
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/./R3OrientedBox.h
// Function: gaps::R3OrientedBox::DiagonalRadius() const
inline const RNLength R3OrientedBox::
DiagonalRadius(void) const
{
    // Check if box is empty
    if (IsEmpty()) return -1.0;

    // Return box radius
    return sqrt(Radius(0)*Radius(0) + Radius(1)*Radius(1) + Radius(2)*Radius(2));
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x22b76
testl %eax, %eax
je 0x4f6f3
movsd 0x4392f(%rip), %xmm0    # 0x93020
popq %rbx
retq
movsd 0x68(%rbx), %xmm0
movsd 0x70(%rbx), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
movsd 0x78(%rbx), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm0, %xmm1
sqrtsd %xmm1, %xmm0
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Cont.cpp
// Function: gaps::R2Contains(gaps::R2Line const&, gaps::R2Box const&)
RNBoolean R2Contains(const R2Line& line, const R2Box& box)
{
    // Return whether line contains box 
    if (!box.IsLinear()) return FALSE;
    if (!R2Contains(line, box.Min())) return FALSE;
    if (!R2Contains(line, box.Max())) return FALSE;
    return TRUE;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rax
movq %rsi, %rdi
callq *0x20(%rax)
xorl %ebp, %ebp
testl %eax, %eax
je 0x4fa56
leaq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x4f917
testl %eax, %eax
je 0x4fa56
addq $0x18, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4f917
xorl %ebp, %ebp
testl %eax, %eax
setne %bpl
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Cont.cpp
// Function: gaps::R2Contains(gaps::R2Span const&, gaps::R2Box const&)
RNBoolean R2Contains(const R2Span& span, const R2Box& box)
{
    // Return whether span contains box
    if (!R2Contains(span.Line(), box)) return FALSE;
    if (!R2Contains(span, box.Min())) return FALSE;
    if (!R2Contains(span, box.Max())) return FALSE;
    return TRUE;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x4fa16
xorl %ebp, %ebp
testl %eax, %eax
je 0x4fd10
leaq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x4fc28
testl %eax, %eax
je 0x4fd10
addq $0x18, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4fc28
xorl %ebp, %ebp
testl %eax, %eax
setne %bpl
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Cont.cpp
// Function: gaps::R2Contains(gaps::R2Halfspace const&, gaps::R2Halfspace const&)
RNBoolean R2Contains(const R2Halfspace& halfspace1, const R2Halfspace& halfspace2)
{
    // Return whether halfspace1 contains halfspace2
    RNScalar dot = halfspace1.Normal().Dot(halfspace2.Normal());
    if (RNIsEqual(dot, 1.0)) {
	// Halfspaces are parallel ???
	return RNIsLessOrEqual(halfspace1.Line().C(), halfspace2.Line().C());
    }
    else {
	// Halfspaces are not parallel
	return FALSE;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0x10, %rdi
addq $0x10, %rsi
callq 0x5fa20
leaq 0x8ad3f(%rip), %rax     # 0xdaba8
movsd (%rax), %xmm1
addsd 0x431ab(%rip), %xmm0    # 0x93020
movapd 0x431b3(%rip), %xmm2    # 0x93030
xorpd %xmm1, %xmm2
xorl %eax, %eax
ucomisd %xmm2, %xmm0
jb 0x4fea3
ucomisd %xmm0, %xmm1
jb 0x4fea3
movsd 0x20(%r14), %xmm0
subsd 0x20(%rbx), %xmm0
xorl %eax, %eax
ucomisd %xmm0, %xmm1
setae %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Cont.cpp
// Function: gaps::R2Contains(gaps::R2Box const&, gaps::R2Point const&)
RNBoolean R2Contains(const R2Box& box, const R2Point& point)
{
    // Return whether box contains point
    if (box.IsEmpty()) return FALSE;
    if (RNIsLess(point.X(), box.XMin())) return FALSE;
    if (RNIsLess(point.Y(), box.YMin())) return FALSE;
    if (RNIsGreater(point.X(), box.XMax())) return FALSE;
    if (RNIsGreater(point.Y(), box.YMax())) return FALSE;
    return TRUE;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x50606
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x4ffa0
movsd (%r14), %xmm1
leaq 0x8ac55(%rip), %rcx     # 0xdaba8
movsd (%rcx), %xmm0
movapd %xmm1, %xmm2
subsd 0x8(%rbx), %xmm2
movapd 0x430c8(%rip), %xmm3    # 0x93030
xorpd %xmm0, %xmm3
ucomisd %xmm2, %xmm3
ja 0x4ffa0
movsd 0x8(%r14), %xmm2
movapd %xmm2, %xmm4
subsd 0x10(%rbx), %xmm4
ucomisd %xmm4, %xmm3
ja 0x4ffa0
subsd 0x18(%rbx), %xmm1
ucomisd %xmm0, %xmm1
ja 0x4ffa0
subsd 0x20(%rbx), %xmm2
xorl %eax, %eax
ucomisd %xmm0, %xmm2
setbe %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Cont.cpp
// Function: gaps::R2Contains(gaps::R2Box const&, gaps::R2Span const&)
RNBoolean R2Contains(const R2Box& box, const R2Span& span)
{
    // Return whether box contains span
    if (!R2Contains(box, span.Start())) return FALSE;
    if (!R2Contains(box, span.End())) return FALSE;
    return TRUE;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0x28, %rsi
callq 0x4ff30
testl %eax, %eax
je 0x5000d
addq $0x38, %rbx
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4ff30
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Cont.cpp
// Function: gaps::R2Contains(gaps::R2Box const&, gaps::R2Halfspace const&)
RNBoolean R2Contains(const R2Box& box, const R2Halfspace& halfspace)
{
    // Return whether box contains halfspace
    RNQuadrant quadrant = halfspace.Normal().Quadrant();
    R2Point corner = box.Corner(quadrant);
    if (!RNIsFinite(corner.X())) return FALSE;
    if (!RNIsFinite(corner.Y())) return FALSE;
    RNAbort("Not Implemented");
    return FALSE;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x10(%rsi), %rdi
callq 0x5f9f8
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %edx
callq 0x5cce2
movsd (%r14), %xmm2
leaq 0x8ab70(%rip), %rax     # 0xdabb8
movsd (%rax), %xmm0
movapd 0x42fdc(%rip), %xmm1    # 0x93030
xorpd %xmm0, %xmm1
ucomisd %xmm1, %xmm2
jbe 0x50084
ucomisd %xmm2, %xmm0
jbe 0x50084
movsd 0x10(%rsp), %xmm2
ucomisd %xmm1, %xmm2
jbe 0x50084
ucomisd %xmm2, %xmm0
jbe 0x50084
leaq 0x43c50(%rip), %rdi     # 0x93ccd
xorl %eax, %eax
callq 0x680f0
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R2Shapes/R2Cont.cpp
// Function: gaps::R2Contains(gaps::R2Box const&, gaps::R2Box const&)
RNBoolean R2Contains(const R2Box& box1, const R2Box& box2) 
{
    // Return whether box1 contains box2
    if (box1.IsEmpty()) return FALSE;
    if (box2.IsEmpty()) return TRUE;
    if (RNIsLess(box2.XMin(), box1.XMin())) return FALSE;
    if (RNIsLess(box2.YMin(), box1.YMin())) return FALSE;
    if (RNIsGreater(box2.XMax(), box1.XMax())) return FALSE;
    if (RNIsGreater(box2.YMax(), box1.YMax())) return FALSE;
    return TRUE;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
callq 0x50606
xorl %ebx, %ebx
testl %eax, %eax
jne 0x50117
movq %r15, %rdi
callq 0x50606
testl %eax, %eax
je 0x500b5
pushq $0x1
popq %rbx
jmp 0x50117
movsd 0x8(%r15), %xmm2
leaq 0x8aae6(%rip), %rax     # 0xdaba8
movsd (%rax), %xmm0
subsd 0x8(%r14), %xmm2
movapd 0x42f5c(%rip), %xmm1    # 0x93030
xorpd %xmm0, %xmm1
ucomisd %xmm2, %xmm1
ja 0x50117
movsd 0x10(%r15), %xmm2
subsd 0x10(%r14), %xmm2
ucomisd %xmm2, %xmm1
ja 0x50117
movsd 0x18(%r15), %xmm1
subsd 0x18(%r14), %xmm1
ucomisd %xmm0, %xmm1
ja 0x50117
movsd 0x20(%r15), %xmm1
subsd 0x20(%r14), %xmm1
xorl %ebx, %ebx
ucomisd %xmm0, %xmm1
setbe %bl
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq