LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3TriangleArray.cpp
// Function: gaps::R3TriangleArray::ClosestPoint(gaps::R3Point const&) const
const R3Point R3TriangleArray::
ClosestPoint(const R3Point& point) const
{
    // Find closest point
    R3Point closest_point = R3zero_point;
    RNLength closest_dd = RN_INFINITY * RN_INFINITY;
    for (int i = 0; i < triangles.NEntries(); i++) {
      R3Triangle *triangle = triangles.Kth(i);
      R3Point p = triangle->ClosestPoint(point);
      RNLength dd = R3SquaredDistance(p, point);
      if (dd < closest_dd) {
        closest_point = p;
        closest_dd = dd;
      }
    }
        
    // Return closest point
    return closest_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 0x494bf7(%rip), %rsi    # 0x4e6a60
callq 0x3c542
cmpl $0x0, 0x24(%r15)
jle 0x51edb
leaq 0x93d2c(%rip), %rax     # 0xe5ba8
movsd (%rax), %xmm0
mulsd %xmm0, %xmm0
movsd %xmm0, (%rsp)
xorl %r13d, %r13d
leaq 0x8(%rsp), %r12
movq 0x18(%r15), %rax
movq (%rax,%r13,8), %rsi
movq (%rsi), %rax
movq %r12, %rdi
movq %rbx, %rdx
callq *0x70(%rax)
movq %r12, %rdi
movq %rbx, %rsi
callq 0x493db
movapd %xmm0, %xmm1
movsd (%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x51ecf
movq %r14, %rdi
movq %r12, %rsi
movsd %xmm1, (%rsp)
callq 0x3c89a
incq %r13
movslq 0x24(%r15), %rax
cmpq %rax, %r13
jl 0x51e91
movq %r14, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3TriangleArray.cpp
// Function: gaps::R3TriangleArray::FurthestPoint(gaps::R3Point const&) const
const R3Point R3TriangleArray::
FurthestPoint(const R3Point& point) const
{
    // Find furthest point
    R3Point furthest_point = R3zero_point;
    RNLength furthest_dd = 0;
    for (int i = 0; i < vertices.NEntries(); i++) {
      R3TriangleVertex *vertex = vertices.Kth(i);
      R3Point p = vertex->Position();
      RNLength dd = R3SquaredDistance(p, point);
      if (dd > furthest_dd) {
        furthest_point = p;
        furthest_dd = dd;
      }
    }

    // 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 0x494b57(%rip), %rsi    # 0x4e6a60
callq 0x3c542
cmpl $0x0, 0x14(%r15)
jle 0x51f64
xorpd %xmm0, %xmm0
movsd %xmm0, (%rsp)
xorl %r13d, %r13d
leaq 0x8(%rsp), %r12
movq 0x8(%r15), %rax
movq (%rax,%r13,8), %rsi
movq %r12, %rdi
callq 0x3c542
movq %r12, %rdi
movq %rbx, %rsi
callq 0x493db
ucomisd (%rsp), %xmm0
jbe 0x51f58
movq %r14, %rdi
movq %r12, %rsi
movsd %xmm0, (%rsp)
callq 0x3c89a
incq %r13
movslq 0x14(%r15), %rax
cmpq %rax, %r13
jl 0x51f26
movq %r14, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3TriangleArray.cpp
// Function: gaps::R3TriangleArray::Flip()
void R3TriangleArray::
Flip (void)
{
    // Flip the triangles
    for (int i = 0; i < triangles.NEntries(); i++)
      triangles[i]->Flip();

    // Update
    Update();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x24(%rdi)
jle 0x52183
xorl %r14d, %r14d
movq 0x18(%rbx), %rax
movq (%rax,%r14,8), %rdi
movq (%rdi), %rax
callq *0x220(%rax)
incq %r14
movslq 0x24(%rbx), %rax
cmpq %rax, %r14
jl 0x52166
movq (%rbx), %rax
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *0x248(%rax)
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3TriangleArray.cpp
// Function: gaps::R3TriangleArray::Mirror(gaps::R3Plane const&)
void R3TriangleArray::
Mirror (const R3Plane& plane)
{
    // Mirror vertices
    for (int i = 0; i < vertices.NEntries(); i++) 
      vertices[i]->Mirror(plane);

    // Update the triangles
    for (int i = 0; i < triangles.NEntries(); i++)
      triangles[i]->Update();

    // Update the bounding box
    Update();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x14(%rdi)
jle 0x521c6
movq %rsi, %r14
xorl %r15d, %r15d
movq 0x8(%rbx), %rax
movq (%rax,%r15,8), %rdi
movq %r14, %rsi
callq 0x537c2
incq %r15
movslq 0x14(%rbx), %rax
cmpq %rax, %r15
jl 0x521aa
cmpl $0x0, 0x24(%rbx)
jle 0x521ec
xorl %r14d, %r14d
movq 0x18(%rbx), %rax
movq (%rax,%r14,8), %rdi
movq (%rdi), %rax
callq *0x250(%rax)
incq %r14
movslq 0x24(%rbx), %rax
cmpq %rax, %r14
jl 0x521cf
movq (%rbx), %rax
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmpq *0x248(%rax)
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3TriangleArray.cpp
// Function: gaps::R3TriangleArray::Transform(gaps::R3Transformation const&)
void R3TriangleArray::
Transform (const R3Transformation& transformation) 
{
    // Transform vertices
    for (int i = 0; i < vertices.NEntries(); i++) 
      vertices[i]->Transform(transformation);

    // Update the triangles
    for (int i = 0; i < triangles.NEntries(); i++)
      triangles[i]->Update();

    // Check if need to flip triangles
    if (transformation.IsMirrored()) Flip();

    // Update the bounding box
    Update();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x0, 0x14(%rdi)
jle 0x5222e
xorl %r15d, %r15d
movq 0x8(%rbx), %rax
movq (%rax,%r15,8), %rdi
movq %r14, %rsi
callq 0x537e8
incq %r15
movslq 0x14(%rbx), %rax
cmpq %rax, %r15
jl 0x52212
cmpl $0x0, 0x24(%rbx)
jle 0x52254
xorl %r15d, %r15d
movq 0x18(%rbx), %rax
movq (%rax,%r15,8), %rdi
movq (%rdi), %rax
callq *0x250(%rax)
incq %r15
movslq 0x24(%rbx), %rax
cmpq %rax, %r15
jl 0x52237
movq (%r14), %rax
movq %r14, %rdi
callq *0x18(%rax)
testl %eax, %eax
je 0x5226d
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x218(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmpq *0x248(%rax)
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3TriangleArray.cpp
// Function: gaps::R3TriangleArray::MoveVertex(gaps::R3TriangleVertex*, gaps::R3Point const&)
void R3TriangleArray::
MoveVertex(R3TriangleVertex *vertex, const R3Point& position)
{
    // Move vertex
    vertex->SetPosition(position);

    // Update triangles
    for (int i = 0; i < triangles.NEntries(); i++) {
      R3Triangle *triangle = triangles.Kth(i);
      for (int j = 0; j < 3; j++) {
        if (triangle->Vertex(i) == vertex) {
          triangle->Update();
          break;
        }
      }
    }

    // Update
    Update();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x3c89a
movl 0x24(%rbx), %eax
testl %eax, %eax
jle 0x52b7a
xorl %r15d, %r15d
movq 0x18(%rbx), %rcx
movq (%rcx,%r15,8), %rdi
cmpq %r14, 0x8(%rdi,%r15,8)
jne 0x52b6f
movq (%rdi), %rax
callq *0x250(%rax)
movl 0x24(%rbx), %eax
incq %r15
movslq %eax, %rcx
cmpq %rcx, %r15
jl 0x52b54
movq (%rbx), %rax
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmpq *0x248(%rax)
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3TriangleArray.cpp
// Function: gaps::R3TriangleArray::Update()
void R3TriangleArray::
Update(void)
{
  // Mark vertices as shared
  for (int i = 0; i < vertices.NEntries(); i++) {
    R3TriangleVertex *v = vertices.Kth(i);
    v->SetSharedFlag();
  }
    
  // Recompute bounding box
  bbox = R3null_box;
  for (int i = 0; i < vertices.NEntries(); i++) {
    R3TriangleVertex *v = vertices.Kth(i);
    bbox.Union(v->Position());
  }

  // Recompute flags
  flags.Add(R3_EVERYTHING_DRAW_FLAGS);
  for (int i = 0; i < vertices.NEntries(); i++) {
    R3TriangleVertex *v = vertices.Kth(i);
    RNFlags vertex_flags = v->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);
  }

  // Invalidate VBO
  InvalidateVBO();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movslq 0x14(%rdi), %rax
testq %rax, %rax
jle 0x52e35
movq 0x8(%rbx), %rcx
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
orq $0x10000, 0x58(%rsi)    # imm = 0x10000
incq %rdx
cmpq %rdx, %rax
jne 0x52e21
leaq 0x30(%rbx), %rdi
leaq 0x93058(%rip), %r14     # 0xe5e98
leaq 0x8(%r14), %rsi
callq 0x3c89a
leaq 0x48(%rbx), %rdi
addq $0x20, %r14
movq %r14, %rsi
callq 0x3c89a
cmpl $0x0, 0x14(%rbx)
jle 0x52ef2
leaq 0x28(%rbx), %r14
xorl %r15d, %r15d
movq 0x8(%rbx), %rax
movq (%rax,%r15,8), %rsi
movq %r14, %rdi
callq 0x27cc6
incq %r15
movslq 0x14(%rbx), %rax
cmpq %rax, %r15
jl 0x52e6a
movl $0x7777, %ecx           # imm = 0x7777
orq 0x60(%rbx), %rcx
movq %rcx, 0x60(%rbx)
testl %eax, %eax
jle 0x52ef8
movq 0x8(%rbx), %rdx
xorl %esi, %esi
movq (%rdx,%rsi,8), %rdi
movl 0x58(%rdi), %edi
movq %rcx, %r8
andq $-0x101, %r8            # imm = 0xFEFF
btl $0x8, %edi
cmovbq %rcx, %r8
movq %r8, %r9
andq $-0x401, %r9            # imm = 0xFBFF
btl $0xa, %edi
cmovbq %r8, %r9
movq %r9, %rcx
andq $-0x201, %rcx           # imm = 0xFDFF
btl $0x9, %edi
cmovbq %r9, %rcx
notl %edi
testl $0x700, %edi            # imm = 0x700
je 0x52ee8
movq %rcx, 0x60(%rbx)
incq %rsi
cmpq %rsi, %rax
jne 0x52e9d
jmp 0x52ef8
orw $0x7777, 0x60(%rbx)     # imm = 0x7777
movq (%rbx), %rax
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmpq *0x250(%rax)
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Triangle.cpp
// Function: gaps::R3Triangle::R3Triangle(gaps::R3Triangle const&)
R3Triangle::
R3Triangle(const R3Triangle& triangle)
  : 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();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
callq 0x54600
leaq 0x8fbf9(%rip), %rax     # 0xe3498
movq %rax, (%rbx)
leaq 0x20(%rbx), %rdi
leaq 0x20(%r15), %rsi
callq 0x3b026
leaq 0x40(%rbx), %r14
leaq 0x40(%r15), %rsi
movq %r14, %rdi
callq 0x272d4
movq 0x78(%r15), %rax
movq %rax, 0x78(%rbx)
movl $0x0, 0x80(%rbx)
movq 0x8(%r15), %r12
testq %r12, %r12
je 0x538fd
testb $0x1, 0x5a(%r12)
jne 0x538fd
movl $0x68, %edi
callq 0xe440
movq %rax, %r13
movq %rax, %rdi
movq %r12, %rsi
callq 0x53452
movq %r13, %r12
movq %r12, 0x8(%rbx)
movq 0x10(%r15), %r12
testq %r12, %r12
je 0x5392d
testb $0x1, 0x5a(%r12)
jne 0x5392d
movl $0x68, %edi
callq 0xe440
movq %rax, %r13
movq %rax, %rdi
movq %r12, %rsi
callq 0x53452
movq %r13, %r12
movq %r12, 0x10(%rbx)
movq 0x18(%r15), %r15
testq %r15, %r15
je 0x5395c
testb $0x1, 0x5a(%r15)
jne 0x5395c
movl $0x68, %edi
callq 0xe440
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
callq 0x53452
movq %r12, %r15
movq %r15, 0x18(%rbx)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x250(%rax)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r15
movl $0x68, %esi
movq %r12, %rdi
jmp 0x53990
jmp 0x53985
movq %rax, %r15
movl $0x68, %esi
movq %r13, %rdi
callq 0xe450
jmp 0x5399a
movq %rax, %r15
movq %r14, %rdi
callq 0x280f4
jmp 0x539a7
movq %rax, %r15
movq %rbx, %rdi
callq 0x5460c
movq %r15, %rdi
callq 0xe7e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Triangle.cpp
// Function: gaps::R3Triangle::IsFinite() const
const RNBoolean R3Triangle::
IsFinite (void) const
{
    // Check each point
    if (!(v[0]->Position().IsFinite())) return FALSE;
    if (!(v[1]->Position().IsFinite())) return FALSE;
    if (!(v[2]->Position().IsFinite())) return FALSE;
    return TRUE;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x8(%rdi), %rdi
callq 0x3c57e
xorl %ebx, %ebx
testl %eax, %eax
je 0x53c0d
movq 0x10(%r14), %rdi
callq 0x3c57e
testl %eax, %eax
je 0x53c0d
movq 0x18(%r14), %rdi
callq 0x3c57e
xorl %ebx, %ebx
testl %eax, %eax
setne %bl
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Triangle.cpp
// Function: gaps::R3Triangle::Length() const
const RNLength R3Triangle::
Length (void) const
{
    // Return perimeter of closed triangle
    RNLength length = 0.0;
    length += R3Distance(v[0]->Position(), v[1]->Position());
    length += R3Distance(v[1]->Position(), v[2]->Position());
    length += R3Distance(v[2]->Position(), v[0]->Position());
    return length;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
movq 0x10(%rbx), %rsi
callq 0x49404
xorpd %xmm1, %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %rsi
callq 0x49404
addsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x8(%rbx), %rsi
movq 0x18(%rbx), %rdi
callq 0x49404
addsd 0x8(%rsp), %xmm0
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x54a41(%rip), %rsi     # 0xa86e0
leaq 0x48(%rsp), %rbx
movq %rbx, %rdi
callq 0x3cfd6
movq 0x8(%r14), %rax
movsd (%rax), %xmm0
movsd 0x8(%rax), %xmm1
movsd 0x10(%rax), %xmm2
leaq 0x18(%rsp), %r15
movq %r15, %rdi
callq 0x3cfc6
movq 0x18(%r14), %rax
movsd (%rax), %xmm0
movsd 0x8(%rax), %xmm1
movsd 0x10(%rax), %xmm2
movq %rsp, %r12
movq %r12, %rdi
callq 0x3cfc6
leaq 0x30(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x3d8fa
movq %rbx, %rdi
movq %r13, %rsi
callq 0x3d984
movq 0x10(%r14), %rax
movsd (%rax), %xmm0
movsd 0x8(%rax), %xmm1
movsd 0x10(%rax), %xmm2
leaq 0x18(%rsp), %r15
movq %r15, %rdi
callq 0x3cfc6
movq 0x8(%r14), %rax
movsd (%rax), %xmm0
movsd 0x8(%rax), %xmm1
movsd 0x10(%rax), %xmm2
movq %rsp, %r12
movq %r12, %rdi
callq 0x3cfc6
leaq 0x30(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x3d8fa
movq %rbx, %rdi
movq %r13, %rsi
callq 0x3d984
movq 0x18(%r14), %rax
movsd (%rax), %xmm0
movsd 0x8(%rax), %xmm1
movsd 0x10(%rax), %xmm2
leaq 0x18(%rsp), %r15
movq %r15, %rdi
callq 0x3cfc6
movq 0x10(%r14), %rax
movsd (%rax), %xmm0
movsd 0x8(%rax), %xmm1
movsd 0x10(%rax), %xmm2
movq %rsp, %r14
movq %r14, %rdi
callq 0x3cfc6
leaq 0x30(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x3d8fa
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3d984
movq %rbx, %rdi
callq 0x3d0cc
mulsd 0x4e266(%rip), %xmm0    # 0xa2030
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x492c77(%rip), %rsi    # 0x4e6a60
callq 0x3c542
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x3ce6c
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x3ce6c
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0x3ce6c
movsd 0x4e3be(%rip), %xmm0    # 0xa21d8
movq %rbx, %rdi
callq 0x3ceea
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x715e8
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x53e62
sqrtsd %xmm0, %xmm0
jmp 0x53e67
callq 0xe340
movsd %xmm0, (%rsp)
callq 0x715e8
movsd %xmm0, 0x8(%rsp)
movsd 0x4e1b9(%rip), %xmm0    # 0xa2038
subsd (%rsp), %xmm0
leaq 0x70(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x3cf76
leaq 0x40(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movsd (%rsp), %xmm0
callq 0x3cf76
movsd 0x4e187(%rip), %xmm0    # 0xa2038
subsd 0x8(%rsp), %xmm0
leaq 0x58(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x3cf76
leaq 0x88(%rsp), %r12
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x3cf30
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movsd (%rsp), %xmm0
callq 0x3cf76
leaq 0x28(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
movsd 0x8(%rsp), %xmm0
callq 0x3cf76
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x3cf30
movq %rbx, %rax
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x3c542
leaq 0x20(%r14), %rsi
movq %rbx, %rdi
movq %rsi, 0x8(%rsp)
callq 0x3c8ba
movl $0x1, %ebx
leaq 0xc0(%rsp), %rbp
leaq 0xd8(%rsp), %r12
movq (%r14,%rbx,8), %rsi
cmpq $0x3, %rbx
movq %rbx, %rax
movl $0x0, %ecx
cmoveq %rcx, %rax
movq 0x8(%r14,%rax,8), %r13
movq %rbp, %rdi
callq 0x3c542
leaq 0xa8(%rsp), %r15
movq %r15, %rdi
movq %r13, %rsi
callq 0x3c542
leaq 0x28(%rsp), %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x3b9b6
movsd 0x70(%rsp), %xmm0
leaq 0x91bcf(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm1
movapd %xmm1, %xmm2
xorpd 0x4e047(%rip), %xmm2    # 0xa2020
ucomisd %xmm2, %xmm0
jb 0x53fe9
ucomisd %xmm0, %xmm1
jae 0x5409e
leaq 0x90(%rsp), %r15
movq %r15, %rdi
leaq 0x40(%rsp), %rsi
movq 0x8(%rsp), %rdx
callq 0x3d8fa
movq %r12, %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x3b0b2
movq %r12, %rdi
leaq 0x10(%rsp), %rsi
callq 0x49617
leaq 0x91b73(%rip), %rax     # 0xe5b98
ucomisd (%rax), %xmm0
jbe 0x5407e
leaq 0x28(%rsp), %r15
movq %r15, %rdi
leaq 0x10(%rsp), %rsi
callq 0x3bc5c
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 0x3bb46
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
movq %rbp, %r12
movq %r14, %rbp
movq %r13, %r14
callq 0x3c89a
incq %rbx
cmpq $0x4, %rbx
jne 0x53f78
leaq 0x10(%rsp), %rsi
movq (%rsp), %rbx
movq %rbx, %rdi
callq 0x3c542
jmp 0x540ae
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_O3/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 0x49297f(%rip), %rsi    # 0x4e6a60
callq 0x3c542
xorpd %xmm0, %xmm0
movsd %xmm0, (%rsp)
movl $0x1, %r13d
leaq 0x8(%rsp), %r12
movq (%r15,%r13,8), %rsi
movq %r12, %rdi
callq 0x3c542
movq %r12, %rdi
movq %rbx, %rsi
callq 0x493db
ucomisd (%rsp), %xmm0
jbe 0x54128
movq %r14, %rdi
movq %r12, %rsi
movsd %xmm0, (%rsp)
callq 0x3c89a
incq %r13
cmpq $0x4, %r13
jne 0x540fa
movq %r14, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x541c3
testb $0x1, 0x5a(%rdi)
jne 0x541c3
movl $0x68, %esi
callq 0xe450
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x541dc
testb $0x1, 0x5a(%rdi)
jne 0x541dc
movl $0x68, %esi
callq 0xe450
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x541f5
testb $0x1, 0x5a(%rdi)
jne 0x541f5
movl $0x68, %esi
callq 0xe450
leaq 0x20(%r14), %rsi
leaq 0x20(%rbx), %rdi
callq 0x3d752
movsd 0x38(%r14), %xmm0
movsd %xmm0, 0x38(%rbx)
leaq 0x48(%rbx), %rdi
leaq 0x48(%r14), %rsi
callq 0x3c89a
leaq 0x60(%rbx), %rdi
leaq 0x60(%r14), %rsi
callq 0x3c89a
movq 0x78(%r14), %rax
movq %rax, 0x78(%rbx)
movl $0x0, 0x80(%rbx)
movq 0x8(%r14), %r12
testq %r12, %r12
je 0x54267
testb $0x1, 0x5a(%r12)
jne 0x5426a
movl $0x68, %edi
callq 0xe440
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
callq 0x53452
movq %r15, %r12
jmp 0x5426a
xorl %r12d, %r12d
movq %r12, 0x8(%rbx)
movq 0x10(%r14), %r12
testq %r12, %r12
je 0x5429c
testb $0x1, 0x5a(%r12)
jne 0x5429f
movl $0x68, %edi
callq 0xe440
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
callq 0x53452
movq %r15, %r12
jmp 0x5429f
xorl %r12d, %r12d
movq %r12, 0x10(%rbx)
movq 0x18(%r14), %r14
testq %r14, %r14
je 0x542d0
testb $0x1, 0x5a(%r14)
jne 0x542d3
movl $0x68, %edi
callq 0xe440
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x53452
movq %r15, %r14
jmp 0x542d3
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 0x542f6
jmp 0x542f6
movq %rax, %rbx
movl $0x68, %esi
movq %r15, %rdi
callq 0xe450
movq %rbx, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x20(%rdi), %r14
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x3dc00
movq %r14, %rdi
movq %r15, %rsi
callq 0x3d752
movsd 0x38(%rbx), %xmm0
xorps 0x4dca9(%rip), %xmm0    # 0xa2020
movlps %xmm0, 0x38(%rbx)
movq 0x8(%rbx), %rax
movq 0x18(%rbx), %rcx
movq %rcx, 0x8(%rbx)
movq %rax, 0x18(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %r15
movq %r15, %rdi
callq 0x3c942
addq $0x18, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x3dae6
movq 0x10(%rbx), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x3c942
addq $0x18, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x3dae6
movq 0x18(%rbx), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x3c942
addq $0x18, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x3dae6
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movq 0x18(%rbx), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, 0x18(%rbx)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmpq *0x250(%rax)
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %rsi
movq 0x10(%rdi), %rdx
movq 0x18(%rdi), %rcx
movq %rsp, %r14
movq %r14, %rdi
callq 0x3b21e
leaq 0x20(%rbx), %rdi
movq %r14, %rsi
callq 0x3d752
movsd 0x18(%r14), %xmm0
movsd %xmm0, 0x38(%rbx)
leaq 0x40(%rbx), %r14
leaq 0x48(%rbx), %rdi
leaq 0x9195d(%rip), %r15     # 0xe5e98
leaq 0x8(%r15), %rsi
callq 0x3c89a
leaq 0x60(%rbx), %rdi
addq $0x20, %r15
movq %r15, %rsi
callq 0x3c89a
movq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x27cc6
movq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x27cc6
movq 0x18(%rbx), %rsi
movq %r14, %rdi
callq 0x27cc6
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x248(%rax)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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)
movl $0x1, %eax
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
testl $0x700, %edx            # imm = 0x700
je 0x545eb
movq %rcx, 0x78(%rdi)
incq %rax
cmpq $0x4, %rax
jne 0x545a0
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O3/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 0x3d18a
cmpl $0x5, %eax
ja 0x5496e
movl %eax, %eax
leaq 0x548ab(%rip), %rcx     # 0xa91e0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movsd 0x68(%r14), %xmm0
jmp 0x54954
movsd 0x78(%r14), %xmm0
jmp 0x54954
movsd 0x70(%r14), %xmm0
addq $0x8, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x26eba
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x548a4(%rip), %rdi     # 0xa9219
xorl %eax, %eax
callq 0x718f6
leaq 0x913bd(%rip), %rsi     # 0xe5d40
movq %rbx, %rdi
callq 0x26e6e
jmp 0x54963
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Ellipsoid.cpp
// Function: gaps::R3Ellipsoid::Empty()
void R3Ellipsoid::
Empty(void)
{
    // Empty ellipsoid
    cs = R3xyz_coordinate_system;
    radii = R3null_vector;
    bbox = R3null_box;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x8, %rdi
leaq 0x91770(%rip), %r14     # 0xe6110
movq %r14, %rsi
callq 0x3c89a
leaq 0x20(%rbx), %rdi
leaq 0x18(%r14), %rsi
callq 0x3d752
leaq 0x38(%rbx), %rdi
leaq 0x30(%r14), %rsi
callq 0x3d752
leaq 0x50(%rbx), %rdi
addq $0x48, %r14
movq %r14, %rsi
callq 0x3d752
leaq 0x68(%rbx), %rdi
leaq 0x53d03(%rip), %rsi     # 0xa86e0
callq 0x3d752
leaq 0x88(%rbx), %rdi
leaq 0x914a8(%rip), %r14     # 0xe5e98
leaq 0x8(%r14), %rsi
callq 0x3c89a
addq $0xa0, %rbx
addq $0x20, %r14
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3c89a
// File: /workspace/github_cpp_makefile_star2_O3/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 0x27326
addq $0x58, %r14
movq %rsp, %rdi
movq %r14, %rsi
callq 0x51692
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x27d8c
movq %rsp, %rdi
callq 0x280f4
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rsp, %rdi
callq 0x280f4
jmp 0x54e1a
movq %rax, %r14
movq %rbx, %rdi
callq 0x280f4
movq %r14, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O3/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 0x90d4a(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm1
movapd %xmm2, %xmm3
subsd %xmm0, %xmm3
ucomisd %xmm3, %xmm1
jae 0x54e8e
mulsd %xmm0, %xmm0
subsd %xmm2, %xmm0
mulsd 0x540e0(%rip), %xmm0    # 0xa8f50
addsd 0x4d1c0(%rip), %xmm0    # 0xa2038
ucomisd %xmm0, %xmm1
jae 0x54e8e
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x54e9f
sqrtsd %xmm0, %xmm0
jmp 0x54ea4
addq $0x58, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x516d8
jmp 0x54ef9
callq 0xe340
addsd 0x4d18c(%rip), %xmm0    # 0xa2038
mulsd 0x4d17c(%rip), %xmm0    # 0xa2030
leaq 0x60(%r14), %r15
leaq 0x20(%r14), %rsi
leaq 0x10(%rsp), %r12
movq %r12, %rdi
movsd %xmm0, 0x8(%rsp)
callq 0x3d962
leaq 0x28(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x3c877
movsd 0x50(%r14), %xmm0
subsd 0x8(%rsp), %xmm0
movq %rbx, %rdi
movq %r13, %rsi
callq 0x26eba
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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, %r14
movq %rdi, %rbx
addq $0x8, %rdi
callq 0x3c89a
leaq 0x20(%rbx), %rdi
leaq 0x18(%r14), %r15
movq %r15, %rsi
callq 0x3d752
leaq 0x38(%rbx), %rdi
leaq 0x30(%r14), %rsi
callq 0x3c89a
movsd 0x48(%r14), %xmm0
movsd %xmm0, 0x50(%rbx)
addq $0x58, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x51736
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x3dc00
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5178a
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x3c0d0
xorl %ebp, %ebp
testl %eax, %eax
je 0x55451
leaq 0x60(%r14), %rdi
leaq 0x60(%rbx), %rsi
callq 0x3c5f8
testl %eax, %eax
je 0x55451
movsd 0x78(%r14), %xmm0
ucomisd 0x78(%rbx), %xmm0
jne 0x55451
jp 0x55451
movl $0x80, %esi
leaq (%r14,%rsi), %rdi
addq %rbx, %rsi
callq 0x3d278
testl %eax, %eax
je 0x55451
movsd 0x98(%r14), %xmm0
ucomisd 0x98(%rbx), %xmm0
jne 0x55451
jp 0x55451
movl $0xa8, %esi
leaq (%r14,%rsi), %rdi
addq %rbx, %rsi
callq 0x3c5f8
testl %eax, %eax
je 0x55451
movsd 0xc0(%r14), %xmm0
ucomisd 0xc0(%rbx), %xmm0
jne 0x55451
jp 0x55451
movl $0xc8, %esi
leaq (%r14,%rsi), %rdi
addq %rbx, %rsi
callq 0x3d278
testl %eax, %eax
setne %al
movsd 0xe0(%r14), %xmm0
ucomisd 0xe0(%rbx), %xmm0
setnp %cl
sete %dl
andb %cl, %dl
andb %al, %dl
movzbl %dl, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x909b8(%rip), %rsi     # 0xe5e98
callq 0x272d4
leaq 0x58(%r14), %rsi
movq %rsp, %rdi
callq 0x51692
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x27d8c
movq %rsp, %rdi
callq 0x280f4
addq $0xa0, %r14
movq %rsp, %rdi
movq %r14, %rsi
callq 0x51692
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x27d8c
movq %rsp, %rdi
callq 0x280f4
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
jmp 0x55538
jmp 0x55545
movq %rax, %r14
movq %rsp, %rdi
callq 0x280f4
jmp 0x55548
movq %rax, %r14
movq %rbx, %rdi
callq 0x280f4
movq %r14, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4cabc(%rip), %xmm0    # 0xa2030
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 0x26eba
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/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, %r15
movq %rdi, %rbx
addq $0x8, %rdi
callq 0x3c89a
leaq 0x20(%rbx), %rdi
leaq 0x18(%r15), %r14
movq %r14, %rsi
callq 0x3d752
leaq 0x38(%rbx), %rdi
leaq 0x30(%r15), %r12
movq %r12, %rsi
callq 0x3c89a
movsd 0x48(%r15), %xmm0
movsd %xmm0, 0x50(%rbx)
leaq 0x58(%rbx), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x51736
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x3dc00
movq %r13, %rdi
movq %r15, %rsi
callq 0x5178a
addq $0xa0, %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x51736
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5178a
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x280e8
leaq 0x8e7c0(%rip), %rax     # 0xe4078
movq %rax, (%rbx)
leaq 0x8(%rbx), %rdi
leaq 0x8(%r14), %rsi
callq 0x2a6fe
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 0x280f4
movq %r14, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
movsd 0x70(%rsi), %xmm0
movsd 0x78(%rsi), %xmm1
minsd 0x68(%rsi), %xmm0
minsd %xmm0, %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
ja 0x55f2d
movq %rsi, %r14
movslq %ecx, %r15
leaq (%r15,%r15,2), %rax
leaq (%rsi,%rax,8), %rsi
addq $0x20, %rsi
leaq 0x8(%rsp), %rdi
testl %edx, %edx
je 0x55f3e
movsd 0x4c122(%rip), %xmm0    # 0xa2048
callq 0x3d962
jmp 0x55f43
leaq 0x49075c(%rip), %rsi    # 0x4e6690
movq %rbx, %rdi
callq 0x3b026
jmp 0x55f84
callq 0x3cfd6
movsd 0x68(%r14,%r15,8), %xmm0
addq $0x8, %r14
leaq 0x20(%rsp), %r15
leaq 0x8(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x3d962
leaq 0x38(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x3c877
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x3b0b2
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x55ff8
movl %edx, %eax
leaq 0x532e8(%rip), %rcx     # 0xa9290
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
xorl %edx, %edx
jmp 0x55fdd
movq %rbx, %rdi
xorl %edx, %edx
jmp 0x55fe9
movq %rbx, %rdi
xorl %edx, %edx
jmp 0x55fce
movq %rbx, %rdi
movl $0x1, %edx
movl $0x1, %ecx
jmp 0x55fee
movq %rbx, %rdi
movl $0x1, %edx
xorl %ecx, %ecx
jmp 0x55fee
movq %rbx, %rdi
movl $0x1, %edx
movl $0x2, %ecx
callq 0x55ed6
movq %rbx, %rax
popq %rbx
retq
leaq 0x490691(%rip), %rsi    # 0x4e6690
movq %rbx, %rdi
callq 0x3b026
jmp 0x55ff3
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 $0x48, %rsp
movq %rdi, %rbx
movsd 0x70(%rsi), %xmm0
movsd 0x78(%rsi), %xmm1
minsd 0x68(%rsi), %xmm0
minsd %xmm0, %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
ja 0x560b2
movq %rsi, %r14
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x3c542
xorl %ebp, %ebp
movb $0x1, %al
leaq 0x28(%rsp), %r15
leaq 0x10(%rsp), %r12
movl %eax, 0xc(%rsp)
xorl %r13d, %r13d
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
movl %r13d, %ecx
callq 0x55ed6
movq %r15, %rdi
movq %rbx, %rsi
callq 0x49617
ucomisd 0x4c16a(%rip), %xmm0    # 0xa21e8
jbe 0x56096
movq %r12, %rdi
movq %r15, %rsi
callq 0x3d962
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3ce9a
incl %r13d
cmpl $0x3, %r13d
jne 0x5605b
movl $0x1, %ebp
testb $0x1, 0xc(%rsp)
movl $0x0, %eax
jne 0x56054
jmp 0x560c1
leaq 0x4909a7(%rip), %rsi    # 0x4e6a60
movq %rbx, %rdi
callq 0x3c542
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_O3/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 0x3c5f8
xorl %ebx, %ebx
testl %eax, %eax
je 0x5638b
leaq 0x20(%r14), %rdi
leaq 0x20(%r15), %rsi
callq 0x3d278
testl %eax, %eax
je 0x5638b
leaq 0x38(%r14), %rdi
leaq 0x38(%r15), %rsi
callq 0x3d278
testl %eax, %eax
je 0x5638b
leaq 0x50(%r14), %rdi
leaq 0x50(%r15), %rsi
callq 0x3d278
testl %eax, %eax
je 0x5638b
movsd 0x68(%r14), %xmm0
ucomisd 0x68(%r15), %xmm0
jne 0x5638b
jp 0x5638b
movsd 0x70(%r14), %xmm0
ucomisd 0x70(%r15), %xmm0
jne 0x5638b
jp 0x5638b
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_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3OrientedBox.cpp
// Function: gaps::R3OrientedBox::NFacets() const
const RNInterval R3OrientedBox::
NFacets(void) const
{
    // Check if box is empty
    if (IsEmpty()) return RNInterval(0, 0);

    // Return number of facets (polygons)
    return RNInterval(6, 6);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movsd 0x70(%rsi), %xmm0
movsd 0x78(%rsi), %xmm1
minsd 0x68(%rsi), %xmm0
minsd %xmm0, %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
ja 0x563c6
movsd 0x4c8f3(%rip), %xmm0    # 0xa2cb0
movq %rbx, %rdi
movapd %xmm0, %xmm1
jmp 0x563cd
xorpd %xmm1, %xmm1
movq %rbx, %rdi
callq 0x7150e
movq %rbx, %rax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3OrientedBox.cpp
// Function: gaps::R3OrientedBox::Centroid() const
const R3Point R3OrientedBox::
Centroid(void) const
{
    // Check if box is empty
    if (IsEmpty()) return R3zero_point;

    // Return centroid of box
    return Center();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movsd 0x70(%rsi), %xmm0
movsd 0x78(%rsi), %xmm1
minsd 0x68(%rsi), %xmm0
minsd %xmm0, %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x5649c
leaq 0x4905c6(%rip), %rsi    # 0x4e6a60
jmp 0x564a0
addq $0x8, %rsi
movq %rbx, %rdi
callq 0x3c542
movq %rbx, %rax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movsd 0x70(%rsi), %xmm0
movsd 0x78(%rsi), %xmm1
minsd 0x68(%rsi), %xmm0
minsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
leaq 0x8f9b6(%rip), %rsi     # 0xe5e98
callq 0x272d4
xorpd %xmm0, %xmm0
ucomisd 0x8(%rsp), %xmm0
ja 0x56519
xorl %ebp, %ebp
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x24628
movq %rbx, %rdi
movq %r15, %rsi
callq 0x27cc6
incl %ebp
cmpl $0x8, %ebp
jne 0x564fa
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x280f4
movq %r14, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3OrientedBox.cpp
// Function: gaps::R3OrientedBox::BSphere() const
const R3Sphere R3OrientedBox::
BSphere(void) const
{
    // Check if box is empty
    if (IsEmpty()) return R3null_sphere;

    // Return BSphere
    return R3Sphere(Center(), DiagonalRadius());
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movsd 0x68(%rsi), %xmm0
movsd 0x70(%rsi), %xmm2
movapd %xmm2, %xmm3
minsd %xmm0, %xmm3
movsd 0x78(%rsi), %xmm1
movapd %xmm1, %xmm4
minsd %xmm3, %xmm4
xorpd %xmm3, %xmm3
ucomisd %xmm4, %xmm3
ja 0x56590
addq $0x8, %rsi
mulsd %xmm2, %xmm2
mulsd %xmm0, %xmm0
addsd %xmm2, %xmm0
mulsd %xmm1, %xmm1
addsd %xmm0, %xmm1
xorps %xmm0, %xmm0
sqrtsd %xmm1, %xmm0
movq %rbx, %rdi
callq 0x26eba
jmp 0x5659f
leaq 0x8f7a9(%rip), %rsi     # 0xe5d40
movq %rbx, %rdi
callq 0x26e6e
movq %rbx, %rax
popq %rbx
retq