LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Cont.cpp
// Function: gaps::R3Contains(gaps::R3Point const&, gaps::R3Triangle const&)
RNBoolean R3Contains(const R3Point& point, const R3Triangle& triangle)
{
    // Get triangle vertices
    R3TriangleVertex *v0 = triangle.V0();
    R3TriangleVertex *v1 = triangle.V1();
    R3TriangleVertex *v2 = triangle.V2();
    if (!v0 || !v1 || !v2) return FALSE;

    // Return whether point contains triangle's vertices
    return (R3Contains(point, v0->Position()) &&
            R3Contains(point, v1->Position()) &&
            R3Contains(point, v2->Position())); 
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rax
movq 0x8(%rsi), %rsi
movq 0x10(%rax), %r15
movq 0x18(%rax), %r14
testq %rsi, %rsi
sete %al
testq %r15, %r15
sete %cl
orb %al, %cl
testq %r14, %r14
sete %al
orb %cl, %al
jne 0x4661e
movq %rdi, %rbx
callq 0x4652b
testl %eax, %eax
je 0x4661e
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4652b
testl %eax, %eax
je 0x4661e
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x4652b
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Cont.cpp
// Function: gaps::R3Contains(gaps::R3Ellipse const&, gaps::R3Point const&)
RNBoolean R3Contains(const R3Point& point, const R3Box& box)
{
    // Return whether point contains box
    if (box.IsEmpty()) return FALSE;
    if (!box.IsPoint()) return FALSE;
    if (!R3Contains(point, box.Min())) return FALSE;
    return TRUE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movsd 0x68(%rdi), %xmm0
xorl %ebp, %ebp
xorpd %xmm2, %xmm2
ucomisd %xmm0, %xmm2
ja 0x4797b
movq %rdi, %rbx
movsd 0x70(%rdi), %xmm1
ucomisd %xmm1, %xmm2
ja 0x4797b
leaq 0x9e2d4(%rip), %r13     # 0xe5b98
movsd (%r13), %xmm2
ucomisd %xmm2, %xmm0
jbe 0x4797b
ucomisd %xmm2, %xmm1
jbe 0x4797b
movq %rsi, %r14
leaq 0x8(%rbx), %r15
leaq 0x50(%rbx), %rdx
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x3b0b2
movq %r12, %rdi
movq %r14, %rsi
callq 0x49617
movsd (%r13), %xmm1
movapd 0x5a70e(%rip), %xmm2    # 0xa2020
xorpd %xmm1, %xmm2
ucomisd %xmm2, %xmm0
jb 0x4797b
ucomisd %xmm0, %xmm1
jb 0x4797b
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x3c78e
leaq 0x20(%rbx), %rsi
movq %r12, %rdi
callq 0x3d252
divsd 0x68(%rbx), %xmm0
movsd %xmm0, (%rsp)
leaq 0x38(%rbx), %rsi
movq %r12, %rdi
callq 0x3d252
divsd 0x70(%rbx), %xmm0
mulsd %xmm0, %xmm0
movsd (%rsp), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm0, %xmm1
xorl %ebp, %ebp
ucomisd 0x5a6c1(%rip), %xmm1    # 0xa2038
setbe %bpl
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Cont.cpp
// Function: gaps::R3Contains(gaps::R3Line const&, gaps::R3OrientedBox const&)
RNBoolean R3Contains(const R3Point& point, const R3Sphere& sphere)
{
    // Return whether point contains sphere
    if (!sphere.IsPoint()) return FALSE;
    if (!R3Contains(point, sphere.Center())) return FALSE;
    return TRUE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movsd 0x70(%rsi), %xmm0
movsd 0x78(%rsi), %xmm1
minsd 0x68(%rsi), %xmm0
minsd %xmm0, %xmm1
xorl %ebp, %ebp
xorpd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
ja 0x46aa8
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rax
movq %rsi, %rdi
callq *0x20(%rax)
testl %eax, %eax
je 0x46aa8
movq %rsp, %r15
xorl %ebp, %ebp
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x24628
movq %r15, %rdi
movq %r14, %rsi
callq 0x4942a
leaq 0x9f15f(%rip), %r12     # 0xe5b98
movsd (%r12), %xmm1
movapd 0x5b5d9(%rip), %xmm2    # 0xa2020
xorpd %xmm1, %xmm2
ucomisd %xmm2, %xmm0
jb 0x46aa8
ucomisd %xmm0, %xmm1
jb 0x46aa8
xorl %ebp, %ebp
movq %rsp, %r15
movl %ebp, %r13d
cmpl $0x7, %ebp
je 0x46a9e
leal 0x1(%r13), %ebp
movq %r15, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x24628
movq %r15, %rdi
movq %r14, %rsi
callq 0x4942a
movsd (%r12), %xmm1
movapd %xmm1, %xmm2
xorpd 0x5b58e(%rip), %xmm2    # 0xa2020
ucomisd %xmm2, %xmm0
jb 0x46a9e
ucomisd %xmm0, %xmm1
jae 0x46a5c
xorl %ebp, %ebp
cmpl $0x7, %r13d
setae %bpl
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Cont.cpp
// Function: gaps::R3Contains(gaps::R3Line const&, gaps::R3Sphere const&)
RNBoolean R3Contains(const R3Line& line, const R3Sphere& sphere)
{
    // Return whether line contains sphere 
    if (!sphere.IsPoint()) return FALSE;
    if (!R3Contains(line, sphere.Center())) return FALSE;
    return TRUE;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rax
movq %rsi, %rdi
callq *0x10(%rax)
testl %eax, %eax
je 0x46b0d
addq $0x8, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4942a
leaq 0x9f0b2(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm1
movapd 0x5b52e(%rip), %xmm2    # 0xa2020
xorpd %xmm1, %xmm2
cmplepd %xmm0, %xmm2
cmplepd %xmm1, %xmm0
andpd %xmm2, %xmm0
movd %xmm0, %eax
andl $0x1, %eax
jmp 0x46b0f
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Cont.cpp
// Function: gaps::R3Contains(gaps::R3Ray const&, gaps::R3Box const&)
RNBoolean R3Contains(const R3Ray& ray, const R3Box& box)
{
    // Return whether ray contains box
    if (!R3Contains(ray.Line(), box)) return FALSE;
    RNOctant octant = ray.Vector().Octant();
    if (!R3Contains(ray, box.Corner(~octant & 0x7))) return FALSE;
    return TRUE;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x4690d
testl %eax, %eax
je 0x46c67
leaq 0x18(%rbx), %rdi
callq 0x3d1f0
notl %eax
andl $0x7, %eax
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movl %eax, %edx
callq 0x27552
movq %rbx, %rdi
movq %r15, %rsi
callq 0x46b2c
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
jmp 0x46c69
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Cont.cpp
// Function: gaps::R3Contains(gaps::R3Span const&, gaps::R3Box const&)
RNBoolean R3Contains(const R3Span& span, const R3Box& box)
{
    // Return whether span contains box
    if (!R3Contains(span.Line(), box)) return FALSE;
    if (!R3Contains(span, box.Min())) return FALSE;
    if (!R3Contains(span, box.Max())) return FALSE;
    return TRUE;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x4690d
xorl %ebp, %ebp
testl %eax, %eax
je 0x46e50
leaq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x46d6d
testl %eax, %eax
je 0x46e50
addq $0x20, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x46d6d
xorl %ebp, %ebp
testl %eax, %eax
setne %bpl
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Cont.cpp
// Function: gaps::R3Contains(gaps::R3Plane const&, gaps::R3Sphere const&)
RNBoolean R3Contains(const R3Plane& plane, const R3Sphere& sphere)
{
    // Return whether plane contains sphere 
    if (!sphere.IsPoint()) return FALSE;
    if (!R3Contains(plane, sphere.Center())) return FALSE;
    return TRUE;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rax
movq %rsi, %rdi
callq *0x10(%rax)
testl %eax, %eax
je 0x47310
addq $0x8, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x49617
leaq 0x9e8af(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm1
movapd 0x5ad2b(%rip), %xmm2    # 0xa2020
xorpd %xmm1, %xmm2
cmplepd %xmm0, %xmm2
cmplepd %xmm1, %xmm0
andpd %xmm2, %xmm0
movd %xmm0, %eax
andl $0x1, %eax
jmp 0x47312
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Cont.cpp
// Function: gaps::R3Contains(gaps::R3Triangle const&, gaps::R3Triangle const&)
RNBoolean R3Contains(const R3Triangle& triangle1, const R3Triangle& triangle2)
{
    // Check whether planes are the same
    if (!R3Contains(triangle1.Plane(), triangle2.Plane())) return FALSE;

    // Check whether triangle1's bounding box contains triangle2
    if (!R3Contains(triangle1.BBox(), triangle2)) return FALSE;

    // Check whether points of triangle2 are inside triangle1
    for (int i = 0; i < 3; i++) {
	if (!R3Contains(triangle1, triangle2.Vertex(i)->Position())) 
            return FALSE;
    }

    // Passed all tests
    return TRUE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, %r14
addq $0x20, %rdi
addq $0x20, %rsi
callq 0x470b7
xorl %ebp, %ebp
testl %eax, %eax
je 0x47686
movq (%r14), %rax
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq *0x88(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
movq %r15, %rsi
callq *0x1a8(%rax)
movl %eax, %r15d
movq %rsp, %rdi
callq 0x280f4
testl %r15d, %r15d
je 0x47686
movq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x4732f
testl %eax, %eax
je 0x47686
xorl %ecx, %ecx
movq %rcx, %r15
cmpq $0x2, %rcx
je 0x4767c
movq 0x10(%rbx,%r15,8), %rsi
movq %r14, %rdi
callq 0x4732f
leaq 0x1(%r15), %rcx
testl %eax, %eax
jne 0x4765e
xorl %ebp, %ebp
cmpq $0x2, %r15
setae %bpl
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x280f4
movq %rbx, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Cont.cpp
// Function: gaps::R3Contains(gaps::R3Circle const&, gaps::R3Point const&)
RNBoolean R3Contains(const R3Circle& circle, const R3Point& point)
{
    // Check whether ellipse is empty
    if (circle.IsEmpty()) return FALSE;

    // Check whether circle plane contains point
    if (!R3Contains(circle.Plane(), point)) return FALSE;

    // Check whether point is within radius of center
    RNScalar dd = R3SquaredDistance(circle.Center(), point);
    if (dd > circle.Radius() * circle.Radius()) return FALSE;

    // Circle contains point
    return TRUE;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
xorl %ebx, %ebx
xorpd %xmm0, %xmm0
ucomisd 0x20(%rdi), %xmm0
ja 0x47880
movq %rsi, %r15
movq %rdi, %r14
addq $0x28, %rdi
callq 0x49617
leaq 0x9e353(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm1
movapd 0x5a7cf(%rip), %xmm2    # 0xa2020
xorpd %xmm1, %xmm2
ucomisd %xmm2, %xmm0
jb 0x47880
ucomisd %xmm0, %xmm1
jb 0x47880
leaq 0x8(%r14), %rdi
movq %r15, %rsi
callq 0x493db
movsd 0x20(%r14), %xmm1
mulsd %xmm1, %xmm1
xorl %ebx, %ebx
ucomisd %xmm1, %xmm0
setbe %bl
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Cont.cpp
// Function: gaps::R3Contains(gaps::R3Halfspace const&, gaps::R3Plane const&)
RNBoolean R3Contains(const R3Halfspace& halfspace, const R3Plane& plane)
{
    // Check whether planes are parallel
    if (!R3Parallel(halfspace.Plane(), plane)) return FALSE;

    // Check whether halfspace contains at least one point on plane
    if (!R3Contains(halfspace, plane.Point())) return FALSE;

    // Passed all tests
    return TRUE;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x4b8fe
testl %eax, %eax
je 0x47bf5
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x3b594
movq %rbx, %rdi
movq %r15, %rsi
callq 0x49617
leaq 0x9dfba(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm1
xorpd 0x5a436(%rip), %xmm1    # 0xa2020
xorl %eax, %eax
ucomisd %xmm1, %xmm0
setae %al
jmp 0x47bf7
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Cont.cpp
// Function: gaps::R3Contains(gaps::R3Halfspace const&, gaps::R3Triangle const&)
RNBoolean R3Contains(const R3Halfspace& halfspace, const R3Triangle& triangle)
{
    // Check whether halfspace contains triangle bounding shape
    if (R3Contains(halfspace, triangle.Box())) return TRUE;

    // Check whether halfspace contains all vertices of triangle
    if (!R3Contains(halfspace, triangle.Vertex(0)->Position())) return FALSE;
    if (!R3Contains(halfspace, triangle.Vertex(1)->Position())) return FALSE;
    if (!R3Contains(halfspace, triangle.Vertex(2)->Position())) return FALSE;

    // Passed all tests
    return TRUE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
addq $0x40, %rsi
callq 0x47c97
movl $0x1, %ebp
testl %eax, %eax
jne 0x47c8a
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x49617
leaq 0x9df65(%rip), %r15     # 0xe5b98
movsd (%r15), %xmm1
xorpd 0x5a3e0(%rip), %xmm1    # 0xa2020
xorl %ebp, %ebp
ucomisd %xmm1, %xmm0
jb 0x47c8a
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x49617
movsd (%r15), %xmm1
xorpd 0x5a3bf(%rip), %xmm1    # 0xa2020
ucomisd %xmm1, %xmm0
jb 0x47c8a
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0x49617
movsd (%r15), %xmm1
xorpd 0x5a3a0(%rip), %xmm1    # 0xa2020
xorl %ebp, %ebp
ucomisd %xmm1, %xmm0
setae %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Cont.cpp
// Function: gaps::R3Contains(gaps::R3Halfspace const&, gaps::R3Circle const&)
RNBoolean R3Contains(const R3Halfspace& halfspace, const R3Circle& circle)
{
    // Return whether halfspace contains circle
    RNScalar d = R3SignedDistance(halfspace.Plane(), circle.Center());
    if (RNIsNegative(d)) return FALSE;
    else if (RNIsGreater(d, circle.Radius())) return TRUE;
    else {
        RNScalar cos_theta = halfspace.Plane().Normal().Dot(circle.Normal());
	if (cos_theta < 0.0) cos_theta = halfspace.Plane().Normal().Dot(-circle.Normal());
	return (RNIsGreaterOrEqual(d, cos_theta * circle.Radius()));
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
addq $0x8, %rsi
callq 0x49617
leaq 0x9de5a(%rip), %r13     # 0xe5b98
movsd (%r13), %xmm3
movapd 0x5a2d4(%rip), %xmm1    # 0xa2020
xorpd %xmm3, %xmm1
xorl %eax, %eax
ucomisd %xmm0, %xmm1
ja 0x47dce
movsd 0x20(%rbx), %xmm1
movapd %xmm0, %xmm2
subsd %xmm1, %xmm2
movl $0x1, %eax
ucomisd %xmm3, %xmm2
ja 0x47dce
movsd %xmm0, (%rsp)
leaq 0x28(%rbx), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x3d252
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jbe 0x47da9
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x3dc00
movq %r14, %rdi
movq %r12, %rsi
callq 0x3d252
mulsd 0x20(%rbx), %xmm0
movsd (%rsp), %xmm1
subsd %xmm0, %xmm1
movsd (%r13), %xmm0
xorpd 0x5a25b(%rip), %xmm0    # 0xa2020
xorl %eax, %eax
ucomisd %xmm0, %xmm1
setae %al
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/R3Cont.cpp
// Function: gaps::R3Contains(gaps::R3Halfspace const&, gaps::R3Halfspace const&)
RNBoolean R3Contains(const R3Halfspace& halfspace1, const R3Halfspace& halfspace2)
{
    // Return whether halfspace1 contains halfspace2
    RNScalar dot = halfspace1.Plane().Normal().Dot(halfspace2.Plane().Normal());
    if (RNIsEqual(dot, 1.0)) {
	// Halfspace and plane are parallel ???
	return RNIsLessOrEqual(halfspace1.Plane().D(), halfspace2.Plane().D());
    }
    else {
	// Halfspace and plane are not parallel
	return FALSE;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x3d252
leaq 0x9dda6(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm1
addsd 0x5a24a(%rip), %xmm0    # 0xa2048
movapd 0x5a21a(%rip), %xmm2    # 0xa2020
xorpd %xmm1, %xmm2
xorl %eax, %eax
ucomisd %xmm2, %xmm0
jb 0x47e2c
ucomisd %xmm0, %xmm1
jb 0x47e2c
movsd 0x18(%r14), %xmm0
subsd 0x18(%rbx), %xmm0
xorl %eax, %eax
ucomisd %xmm0, %xmm1
setae %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Cont.cpp
// Function: gaps::R3Contains(gaps::R3OrientedBox const&, gaps::R3Point const&)
RNBoolean R3Contains(const R3OrientedBox& box, const R3Point& point)
{
    // Check if box is empty
    if (box.IsEmpty()) return FALSE;

    // Return whether each halfspace contains point
    for (int dir = 0; dir < 2; dir++) {
      for (int dim = 0; dim < 3; dim++) {
        R3Halfspace halfspace(-box.Plane(dir, dim), 0);
        if (!R3Contains(halfspace, point)) {
          return FALSE;
        }
      }
    }

    // Passed all tests
    return TRUE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, 0x10(%rsp)
movsd 0x70(%rdi), %xmm0
movsd 0x78(%rdi), %xmm1
minsd 0x68(%rdi), %xmm0
minsd %xmm0, %xmm1
xorl %eax, %eax
xorpd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
ja 0x485cb
movq %rdi, %r14
xorl %ebp, %ebp
movb $0x1, %al
movl %eax, 0xc(%rsp)
leaq 0x18(%rsp), %r15
leaq 0x58(%rsp), %r12
leaq 0x38(%rsp), %r13
xorl %ebx, %ebx
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
movl %ebx, %ecx
callq 0x55ed6
movq %r12, %rdi
movq %r15, %rsi
callq 0x3dc00
movsd 0x30(%rsp), %xmm0
movapd 0x59abf(%rip), %xmm1    # 0xa2020
xorpd %xmm1, %xmm0
movq %r13, %rdi
movq %r12, %rsi
callq 0x3b08e
movq %r12, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x56cae
movq %r12, %rdi
movq 0x10(%rsp), %rsi
callq 0x49617
leaq 0x9d607(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm1
xorpd 0x59a83(%rip), %xmm1    # 0xa2020
ucomisd %xmm1, %xmm0
jb 0x485c2
incl %ebx
cmpl $0x3, %ebx
jne 0x48539
movl $0x1, %ebp
testb $0x1, 0xc(%rsp)
movl $0x0, 0xc(%rsp)
jne 0x48537
xorl %eax, %eax
ucomisd %xmm1, %xmm0
setae %al
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Cont.cpp
// Function: gaps::R3Contains(gaps::R3Sphere const&, gaps::R3Point const&)
RNBoolean R3Contains(const R3Sphere& sphere, const R3Point& point)
{
    // Return whether sphere contains point
    RNScalar radius_squared = sphere.Radius() * sphere.Radius();
    R3Vector v = sphere.Center() - point;
    RNScalar distance_squared = v.X() * v.X() + v.Y() * v.Y() + v.Z() * v.Z();
    return RNIsLessOrEqual(distance_squared, radius_squared);
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rdx
movsd 0x20(%rdi), %xmm0
mulsd %xmm0, %xmm0
movsd %xmm0, (%rsp)
leaq 0x8(%rdi), %rsi
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x3c78e
movsd (%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
movsd 0x10(%rbx), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm0, %xmm1
subsd (%rsp), %xmm1
leaq 0x9cff6(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm0
xorl %eax, %eax
ucomisd %xmm1, %xmm0
setae %al
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Cont.cpp
// Function: gaps::R3Contains(gaps::R3Sphere const&, gaps::R3Span const&)
RNBoolean R3Contains(const R3Sphere& sphere, const R3Span& span)
{
    // Return whether sphere contains span
    if (!R3Contains(sphere, span.Start())) return FALSE;
    if (!R3Contains(sphere, span.End())) return FALSE;
    return TRUE;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r15
movsd 0x20(%rdi), %xmm0
mulsd %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
leaq 0x8(%rdi), %r14
leaq 0x10(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x3c78e
movsd (%r12), %xmm0
movsd 0x8(%r12), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
movsd 0x10(%r12), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm0, %xmm1
subsd 0x8(%rsp), %xmm1
leaq 0x9cf13(%rip), %r12     # 0xe5b98
movsd (%r12), %xmm0
xorl %eax, %eax
ucomisd %xmm1, %xmm0
jb 0x48cf4
addq $0x30, %rbx
movsd 0x20(%r15), %xmm0
mulsd %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x3c78e
movsd (%r15), %xmm0
movsd 0x8(%r15), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
movsd 0x10(%r15), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm0, %xmm1
subsd 0x8(%rsp), %xmm1
movsd (%r12), %xmm0
xorl %eax, %eax
ucomisd %xmm1, %xmm0
setae %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Cont.cpp
// Function: gaps::R3Contains(gaps::R3Cylinder const&, gaps::R3Point const&)
RNBoolean R3Contains(const R3Cylinder& cylinder, const R3Point& point) 
{
    // Get cylinder axis
    const R3Span& axis = cylinder.Axis();
  
    // Check if outside top or bottom
    RNScalar t = axis.T(point);
    if (RNIsNegative(t) || RNIsGreater(t, axis.Length())) 
        return FALSE;

    // Check if inside radius
    RNLength d = R3Distance(point, axis.Point(t));
    return (RNIsLessOrEqual(d, cylinder.Radius()));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rdi), %r15
movq %r15, %rdi
callq 0x3bc5c
leaq 0x9cbec(%rip), %r13     # 0xe5b98
movsd (%r13), %xmm1
movapd 0x59066(%rip), %xmm2    # 0xa2020
xorpd %xmm1, %xmm2
xorl %eax, %eax
ucomisd %xmm0, %xmm2
ja 0x49004
movapd %xmm0, %xmm2
subsd 0x50(%rbx), %xmm2
ucomisd %xmm1, %xmm2
ja 0x49004
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x3bb46
movq %r14, %rdi
movq %r12, %rsi
callq 0x49404
movsd (%r13), %xmm1
subsd 0x78(%rbx), %xmm0
xorl %eax, %eax
ucomisd %xmm0, %xmm1
setae %al
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/R3Cont.cpp
// Function: gaps::R3Contains(gaps::R3Cone const&, gaps::R3Point const&)
RNBoolean R3Contains(const R3Cone& cone, const R3Point& point) 
{
    // Get cone axis
    const R3Span& axis = cone.Axis();
  
    // Check if outside top or bottom
    RNScalar t = axis.T(point);
    if (RNIsNegative(t) || RNIsGreater(t, axis.Length())) 
        return FALSE;

    // Check if inside radius
    RNLength r = (1.0 - t / axis.Length()) * cone.Radius();
    RNLength d = R3Distance(axis.Point(t), point);
    return RNIsGreaterOrEqual(r, d);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x8(%rdi), %r14
movq %r14, %rdi
callq 0x3bc5c
leaq 0x9cb62(%rip), %r12     # 0xe5b98
movsd (%r12), %xmm1
movapd 0x58fdc(%rip), %xmm2    # 0xa2020
xorpd %xmm1, %xmm2
xorl %eax, %eax
ucomisd %xmm0, %xmm2
ja 0x490c0
movsd 0x50(%r15), %xmm2
movapd %xmm0, %xmm3
subsd %xmm2, %xmm3
ucomisd %xmm1, %xmm3
ja 0x490c0
movapd %xmm0, %xmm1
divsd %xmm2, %xmm1
movsd 0x58fc4(%rip), %xmm2    # 0xa2038
subsd %xmm1, %xmm2
mulsd 0x78(%r15), %xmm2
movsd %xmm2, 0x8(%rsp)
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x3bb46
movq %r15, %rdi
movq %rbx, %rsi
callq 0x49404
movsd 0x8(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd (%r12), %xmm0
xorpd 0x58f69(%rip), %xmm0    # 0xa2020
xorl %eax, %eax
ucomisd %xmm0, %xmm1
setae %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Cont.cpp
// Function: gaps::R3Contains(gaps::R3Frustum const&, gaps::R3Point const&)
RNBoolean R3Contains(const R3Frustum& frustum, const R3Point& point)
{
  // Check each halfspace
  for (int dir = 0; dir < 2; dir++) {
    for (int dim = 0; dim < 3; dim++) {
      if (!R3Contains(frustum.Halfspace(dir, dim), point)) {
        return FALSE;
      }
    }
  }

  // Passed all tests
  return TRUE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0x68, %r14
movb $0x1, %bpl
xorl %eax, %eax
leaq 0x9caab(%rip), %r15     # 0xe5b98
leaq (%rax,%rax,2), %r12
shlq $0x5, %r12
addq %r14, %r12
xorl %r13d, %r13d
leaq (%r12,%r13), %rdi
movq %rbx, %rsi
callq 0x49617
movsd (%r15), %xmm1
xorpd 0x58f0c(%rip), %xmm1    # 0xa2020
ucomisd %xmm1, %xmm0
jb 0x49134
addq $0x20, %r13
cmpq $0x60, %r13
jne 0x490fb
movl $0x1, %eax
testb $0x1, %bpl
movl $0x0, %ebp
jne 0x490ed
xorl %eax, %eax
ucomisd %xmm1, %xmm0
setae %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Cont.cpp
// Function: gaps::R3Contains(gaps::R3Frustum const&, gaps::R3Span const&)
RNBoolean R3Contains(const R3Frustum& frustum, const R3Span& span) 
{
  // Check each halfspace
  for (int dir = 0; dir < 2; dir++) {
    for (int dim = 0; dim < 3; dim++) {
      if (!R3Contains(frustum.Halfspace(dir, dim), span)) {
        return FALSE;
      }
    }
  }

  // Passed all tests
  return TRUE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
addq $0x68, %r14
movb $0x1, %bpl
xorl %ecx, %ecx
leaq (%rcx,%rcx,2), %r15
shlq $0x5, %r15
addq %r14, %r15
xorl %r12d, %r12d
leaq (%r15,%r12), %rdi
movq %rbx, %rsi
callq 0x47b4d
testl %eax, %eax
je 0x491a1
addq $0x20, %r12
cmpq $0x60, %r12
jne 0x49177
movl $0x1, %ecx
testb $0x1, %bpl
movl $0x0, %ebp
jne 0x49169
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Cont.cpp
// Function: gaps::R3Contains(gaps::R3Frustum const&, gaps::R3Box const&)
RNBoolean R3Contains(const R3Frustum& frustum, const R3Box& box) 
{
  // Check each halfspace
  for (int dir = 0; dir < 2; dir++) {
    for (int dim = 0; dim < 3; dim++) {
      if (!R3Contains(frustum.Halfspace(dir, dim), box)) {
        return FALSE;
      }
    }
  }

  // Passed all tests
  return TRUE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
addq $0x68, %r14
movb $0x1, %bpl
xorl %ecx, %ecx
leaq (%rcx,%rcx,2), %r15
shlq $0x5, %r15
addq %r14, %r15
xorl %r12d, %r12d
leaq (%r15,%r12), %rdi
movq %rbx, %rsi
callq 0x47c97
testl %eax, %eax
je 0x491ff
addq $0x20, %r12
cmpq $0x60, %r12
jne 0x491d5
movl $0x1, %ecx
testb $0x1, %bpl
movl $0x0, %ebp
jne 0x491c7
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
movl %ecx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Cont.cpp
// Function: gaps::R3Contains(gaps::R3Frustum const&, gaps::R3OrientedBox const&)
RNBoolean R3Contains(const R3Frustum& frustum, const R3OrientedBox& box) 
{
  // Check each halfspace
  for (int dir = 0; dir < 2; dir++) {
    for (int dim = 0; dim < 3; dim++) {
      if (!R3Contains(frustum.Halfspace(dir, dim), box)) {
        return FALSE;
      }
    }
  }

  // Passed all tests
  return TRUE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
addq $0x68, %r14
movb $0x1, %bpl
xorl %ecx, %ecx
leaq (%rcx,%rcx,2), %r15
shlq $0x5, %r15
addq %r14, %r15
xorl %r12d, %r12d
leaq (%r15,%r12), %rdi
movq %rbx, %rsi
callq 0x47e34
testl %eax, %eax
je 0x49260
addq $0x20, %r12
cmpq $0x60, %r12
jne 0x49236
movl $0x1, %ecx
testb $0x1, %bpl
movl $0x0, %ebp
jne 0x49228
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Cont.cpp
// Function: gaps::R3Contains(gaps::R3Frustum const&, gaps::R3Sphere const&)
RNBoolean R3Contains(const R3Frustum& frustum, const R3Sphere& sphere) 
{
  // Check each halfspace
  for (int dir = 0; dir < 2; dir++) {
    for (int dim = 0; dim < 3; dim++) {
      if (!R3Contains(frustum.Halfspace(dir, dim), sphere)) {
        return FALSE;
      }
    }
  }

  // Passed all tests
  return TRUE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
leaq 0x8(%rsi), %r15
addq $0x68, %rdi
movq %rdi, (%rsp)
movb $0x1, %bpl
xorl %eax, %eax
leaq 0x9c909(%rip), %r12     # 0xe5b98
leaq (%rax,%rax,2), %r13
shlq $0x5, %r13
addq (%rsp), %r13
xorl %r14d, %r14d
leaq (%r14,%r13), %rdi
movq %r15, %rsi
callq 0x49617
subsd 0x20(%rbx), %xmm0
movsd (%r12), %xmm1
xorpd 0x58d63(%rip), %xmm1    # 0xa2020
ucomisd %xmm1, %xmm0
jb 0x492dd
addq $0x20, %r14
cmpq $0x60, %r14
jne 0x4929e
movl $0x1, %eax
testb $0x1, %bpl
movl $0x0, %ebp
jne 0x4928f
xorl %eax, %eax
ucomisd %xmm1, %xmm0
setae %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Cont.cpp
// Function: gaps::R3Contains(gaps::R3Frustum const&, gaps::R3Shape const&)
RNBoolean R3Contains(const R3Frustum& frustum, const R3Shape& shape) 
{
  // Check each halfspace
  for (int dir = 0; dir < 2; dir++) {
    for (int dim = 0; dim < 3; dim++) {
      if (!R3Contains(frustum.Halfspace(dir, dim), shape)) {
        return FALSE;
      }
    }
  }

  // Passed all tests
  return TRUE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
addq $0x68, %r14
movb $0x1, %bpl
xorl %ecx, %ecx
leaq (%rcx,%rcx,2), %r15
shlq $0x5, %r15
addq %r14, %r15
xorl %r12d, %r12d
leaq (%r15,%r12), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x1a0(%rax)
testl %eax, %eax
je 0x49348
addq $0x20, %r12
cmpq $0x60, %r12
jne 0x4931a
movl $0x1, %ecx
testb $0x1, %bpl
movl $0x0, %ebp
jne 0x4930c
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
movl %ecx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Dist.cpp
// Function: gaps::R3Distance(gaps::R3Point const&, gaps::R3Line const&)
RNLength R3Distance(const R3Point& point, const R3Line& line)
{
    // Return distance from point to line (Riddle p. 904)
    R3Vector v = line.Vector();
    v.Cross(line.Point() - point);
    return v.Length();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, %r14
addq $0x18, %rsi
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0x3cfd6
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x3c78e
movq %r15, %rdi
movq %r12, %rsi
callq 0x3d352
movq %r15, %rdi
callq 0x3d0cc
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Dist.cpp
// Function: gaps::R3Distance(gaps::R3Point const&, gaps::R3Ray const&)
RNLength R3Distance(const R3Point& point, const R3Ray& ray)
{
    // Check if start point is closest
    R3Vector v = point - ray.Start();
    RNScalar dir = v.Dot(ray.Vector());
    if (RNIsNegative(dir)) return v.Length();

    // Return distance from point to ray line
    return R3Distance(point, ray.Line());
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x3c78e
leaq 0x18(%rbx), %rsi
movq %r15, %rdi
callq 0x3d252
leaq 0x9c6e5(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm1
xorpd 0x58b61(%rip), %xmm1    # 0xa2020
ucomisd %xmm0, %xmm1
ja 0x494d2
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4942a
jmp 0x494dc
leaq 0x8(%rsp), %rdi
callq 0x3d0cc
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Dist.cpp
// Function: gaps::R3Distance(gaps::R3Point const&, gaps::R3Span const&)
RNLength R3Distance(const R3Point& point, const R3Span& span)
{
    // Check if span has zero length
    if (RNIsZero(span.Length())) return R3Distance(point, span.Start());

    // Check if start point is closest
    R3Vector v1 = point - span.Start();
    RNScalar dir1 = v1.Dot(span.Vector());
    if (RNIsNegative(dir1)) return v1.Length();

    // Check if end point is closest
    R3Vector v2 = point - span.End();
    RNScalar dir2 = v2.Dot(span.Vector());
    if (RNIsPositive(dir2)) return v2.Length();

    // Return distance from point to span line
    return R3Distance(point, span.Line());
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movsd 0x48(%rsi), %xmm0
leaq 0x9c693(%rip), %r13     # 0xe5b98
movsd (%r13), %xmm1
movapd 0x58b0d(%rip), %xmm2    # 0xa2020
xorpd %xmm1, %xmm2
ucomisd %xmm2, %xmm0
jb 0x49539
ucomisd %xmm0, %xmm1
jb 0x49539
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x3c78e
movq %r15, %rdi
jmp 0x495ab
movq %rsp, %r12
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x3c78e
leaq 0x18(%rbx), %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0x3d252
movsd (%r13), %xmm1
xorpd 0x58ab9(%rip), %xmm1    # 0xa2020
ucomisd %xmm0, %xmm1
ja 0x495a1
leaq 0x30(%rbx), %rdx
leaq 0x18(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x3c78e
movq %r12, %rdi
movq %r15, %rsi
callq 0x3d252
ucomisd (%r13), %xmm0
ja 0x495a6
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4942a
jmp 0x495b0
movq %rsp, %rdi
jmp 0x495ab
leaq 0x18(%rsp), %rdi
callq 0x3d0cc
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Dist.cpp
// Function: gaps::R3Distance(gaps::R3Point const&, gaps::R3OrientedBox const&)
RNLength R3Distance(const R3Point& point, const R3OrientedBox& box)
{
    // Check if box is empty
    if (box.IsEmpty()) return FLT_MAX;

    // Transform point into std coordinate system
    R3Point transformed_point = point;
    R3Affine cs_to_std_xform(box.CoordSystem().InverseMatrix());
    transformed_point.Transform(cs_to_std_xform);

    // Return distance in std coordinate system
    R3Box axis_aligned_box(-box.Radius(0), -box.Radius(1), -box.Radius(2), box.Radius(0), box.Radius(1), box.Radius(2));
    return R3Distance(transformed_point, axis_aligned_box);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
movq %rsi, %rbx
movsd 0x70(%rsi), %xmm0
movsd 0x78(%rsi), %xmm1
minsd 0x68(%rsi), %xmm0
minsd %xmm0, %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
ja 0x498c7
movq %rdi, %rsi
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x3c542
leaq 0x8(%rbx), %rsi
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0x2a7d6
leaq 0xa8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x29fda
movq %r14, %rdi
movq %r12, %rsi
callq 0x3ce48
movsd 0x68(%rbx), %xmm3
movsd 0x70(%rbx), %xmm4
movapd 0x587b1(%rip), %xmm2    # 0xa2020
movapd %xmm3, %xmm0
xorpd %xmm2, %xmm0
movapd %xmm4, %xmm1
xorpd %xmm2, %xmm1
movsd 0x78(%rbx), %xmm5
xorpd %xmm5, %xmm2
leaq 0x28(%rsp), %rdi
callq 0x27374
leaq 0x10(%rsp), %rdi
leaq 0x28(%rsp), %rbx
movq %rbx, %rsi
callq 0x4968f
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
callq 0x280f4
leaq 0xa8(%rsp), %rdi
callq 0x2a028
movsd 0x8(%rsp), %xmm0
jmp 0x498cf
movsd 0x58771(%rip), %xmm0    # 0xa2040
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x498e0
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x2a028
movq %rbx, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Dist.cpp
// Function: gaps::R3Distance(gaps::R3Point const&, gaps::R3Cone const&)
RNLength R3Distance(const R3Point& point, const R3Cone& cone)
{
    // Return distance from point to sphere
    RNScalar t = cone.Axis().T(point);
    if (RNIsNegativeOrZero(t)) {
        RNAbort("Not implemented");
        return 0.0;
    }
    else if (RNIsGreater(t, cone.Axis().Length())) {
        return R3Distance(point, cone.Apex());
    }
    else {
        // Get distance between axis and point
        R3Point p = cone.Axis().Point(t);
	RNLength r = (1.0 - t / cone.Axis().Length()) * cone.Radius();
	RNLength d = R3Distance(p, point) - r;
	if (RNIsNegativeOrZero(d)) return 0.0;
	else return d;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsi), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3bc5c
leaq 0x9c23e(%rip), %r13     # 0xe5b98
movsd (%r13), %xmm2
ucomisd %xmm0, %xmm2
jae 0x499ee
movapd %xmm0, %xmm1
subsd 0x50(%r14), %xmm1
ucomisd %xmm2, %xmm1
ja 0x49a02
leaq 0x28(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movsd %xmm0, 0x8(%rsp)
callq 0x3bb46
movsd 0x8(%rsp), %xmm1
divsd 0x50(%r14), %xmm1
movsd 0x58690(%rip), %xmm0    # 0xa2038
subsd %xmm1, %xmm0
mulsd 0x78(%r14), %xmm0
movsd %xmm0, 0x8(%rsp)
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x3c78e
movq %r14, %rdi
callq 0x3d0cc
movapd %xmm0, %xmm1
subsd 0x8(%rsp), %xmm1
movapd %xmm1, %xmm0
cmpnlesd (%r13), %xmm0
andpd %xmm1, %xmm0
jmp 0x49a21
leaq 0x5892d(%rip), %rdi     # 0xa2322
xorl %eax, %eax
callq 0x718f6
xorpd %xmm0, %xmm0
jmp 0x49a21
addq $0x38, %r14
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x3c78e
movq %r15, %rdi
callq 0x3d0cc
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/R3Dist.cpp
// Function: gaps::R3Distance(gaps::R3Line const&, gaps::R3Line const&)
RNLength R3Distance(const R3Line& line1, const R3Line& line2)
{
    // Return distance from line to line (Riddle p. 905)
    R3Vector v = line1.Vector();
    v.Cross(line2.Vector());
    RNLength vlength = v.Length();
    if (vlength == 0.0) return R3Distance(line1.Point(), line2);
    else v /= vlength;
    return fabs(v.Dot(line1.Point() - line2.Point()));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x18(%rdi), %rsi
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x3cfd6
leaq 0x18(%rbx), %rsi
movq %r15, %rdi
callq 0x3d352
movq %r15, %rdi
callq 0x3d0cc
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x49ad3
jp 0x49ad3
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4942a
jmp 0x49b06
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x3db98
leaq 0x20(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x3c78e
movq %r15, %rdi
movq %r12, %rsi
callq 0x3d252
andpd 0x5876a(%rip), %xmm0    # 0xa2270
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Dist.cpp
// Function: gaps::R3Distance(gaps::R3Line const&, gaps::R3Plane const&)
RNLength R3Distance(const R3Line& line, const R3Plane& plane)
{
    // Return distance from line to plane
    RNScalar d = R3SignedDistance(plane, line);
    if (RNIsPositive(d)) return d;
    else if (RNIsNegative(d)) return -d;
    else return 0.0;
}

// Assembly:
pushq %rax
movq %rdi, %rax
movq %rsi, %rdi
movq %rax, %rsi
callq 0x49fe9
leaq 0x9bbe3(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm2
ucomisd %xmm2, %xmm0
ja 0x49fdf
xorpd 0x58059(%rip), %xmm2    # 0xa2020
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm2
jbe 0x49fe3
movapd 0x58047(%rip), %xmm1    # 0xa2020
xorpd %xmm0, %xmm1
jmp 0x49fe3
movapd %xmm0, %xmm1
movapd %xmm1, %xmm0
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Dist.cpp
// Function: gaps::R3SignedDistance(gaps::R3Plane const&, gaps::R3Line const&)
RNLength R3SignedDistance(const R3Plane& plane, const R3Line& line)
{
    // Return signed distance from plane to line
    if (R3Parallel(plane, line)) {
	// Plane and line are parallel
	return R3SignedDistance(plane, line.Point());
    }
    else {
	// Plane and line are not parallel
	return 0.0;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movq %rbx, %rsi
callq 0x4b8bc
testl %eax, %eax
je 0x4a030
movsd (%r14), %xmm1
movsd 0x8(%r14), %xmm2
mulsd 0x8(%rbx), %xmm2
mulsd (%rbx), %xmm1
movsd 0x10(%r14), %xmm0
mulsd 0x10(%rbx), %xmm0
addsd %xmm2, %xmm1
addsd %xmm1, %xmm0
addsd 0x18(%rbx), %xmm0
jmp 0x4a034
xorpd %xmm0, %xmm0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Dist.cpp
// Function: gaps::R3Distance(gaps::R3Line const&, gaps::R3Halfspace const&)
RNLength R3Distance(const R3Line& line, const R3Halfspace& halfspace)
{
    // Return distance from line to halfspace
    RNScalar d = R3SignedDistance(halfspace.Plane(), line);
    if (RNIsNegative(d)) return -d;
    else return 0.0;
}

// Assembly:
pushq %rax
movq %rdi, %rax
movq %rsi, %rdi
movq %rax, %rsi
callq 0x49fe9
leaq 0x9bb46(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm1
movapd 0x57fc2(%rip), %xmm2    # 0xa2020
xorpd %xmm2, %xmm1
xorpd %xmm0, %xmm2
cmpnltsd %xmm1, %xmm0
andnpd %xmm2, %xmm0
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Dist.cpp
// Function: gaps::R3Distance(gaps::R3Line const&, gaps::R3OrientedBox const&)
RNLength R3Distance(const R3Line& line, const R3OrientedBox& box)
{
    // Check if box is empty
    if (box.IsEmpty()) return FLT_MAX;

    // Transform line into std coordinate system
    R3Line transformed_line = line;
    R3Affine cs_to_std_xform(box.CoordSystem().InverseMatrix());
    transformed_line.Transform(cs_to_std_xform);

    // Return distance in std coordinate system
    R3Box axis_aligned_box(-box.Radius(0), -box.Radius(1), -box.Radius(2), box.Radius(0), box.Radius(1), box.Radius(2));
    return R3Distance(transformed_line, axis_aligned_box);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movq %rsi, %rbx
movsd 0x70(%rsi), %xmm0
movsd 0x78(%rsi), %xmm1
minsd 0x68(%rsi), %xmm0
minsd %xmm0, %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
ja 0x4a15b
movq %rdi, %rsi
leaq 0x88(%rsp), %r14
movq %r14, %rdi
callq 0x3c21e
leaq 0x8(%rbx), %rsi
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x2a7d6
leaq 0xb8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x29fda
movq %r14, %rdi
movq %r12, %rsi
callq 0x3c42c
movsd 0x68(%rbx), %xmm3
movsd 0x70(%rbx), %xmm4
movapd 0x57f13(%rip), %xmm2    # 0xa2020
movapd %xmm3, %xmm0
xorpd %xmm2, %xmm0
movapd %xmm4, %xmm1
xorpd %xmm2, %xmm1
movsd 0x78(%rbx), %xmm5
xorpd %xmm5, %xmm2
leaq 0x8(%rsp), %rdi
callq 0x27374
leaq 0x581eb(%rip), %rdi     # 0xa2322
xorl %eax, %eax
callq 0x718f6
leaq 0x8(%rsp), %rdi
callq 0x280f4
leaq 0xb8(%rsp), %rdi
callq 0x2a028
xorpd %xmm0, %xmm0
jmp 0x4a163
movsd 0x57edd(%rip), %xmm0    # 0xa2040
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x280f4
jmp 0x4a186
jmp 0x4a183
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
callq 0x2a028
movq %rbx, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Dist.cpp
// Function: gaps::R3Distance(gaps::R3Ray const&, gaps::R3Plane const&)
RNLength R3Distance(const R3Ray& ray, const R3Plane& plane)
{
    // Return distance from ray to plane
    RNScalar d = R3SignedDistance(plane, ray);
    if (RNIsPositive(d)) return d;
    else if (RNIsNegative(d)) return -d;
    else return 0.0;
}

// Assembly:
pushq %rax
movq %rdi, %rax
movq %rsi, %rdi
movq %rax, %rsi
callq 0x4a4a4
leaq 0x9b728(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm2
ucomisd %xmm2, %xmm0
ja 0x4a49a
xorpd 0x57b9e(%rip), %xmm2    # 0xa2020
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm2
jbe 0x4a49e
movapd 0x57b8c(%rip), %xmm1    # 0xa2020
xorpd %xmm0, %xmm1
jmp 0x4a49e
movapd %xmm0, %xmm1
movapd %xmm1, %xmm0
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Dist.cpp
// Function: gaps::R3SignedDistance(gaps::R3Plane const&, gaps::R3Ray const&)
RNLength R3SignedDistance(const R3Plane& plane, const R3Ray& ray)
{
    // Return signed distance from plane to ray
    RNLength d1 = R3SignedDistance(plane, ray.Start());
    if (RNIsPositive(d1)) {
	// Start point is above plane
	RNScalar dot = ray.Vector().Dot(plane.Normal());
	if (RNIsNegative(dot)) return 0.0;
	else return d1;
    }
    else if (RNIsNegative(d1)) {
	// Start point is below plane
	RNScalar dot = ray.Vector().Dot(plane.Normal());
	if (RNIsPositive(dot)) return 0.0;
	else return d1;
    }
    else {
	// Start point is on plane
	return 0.0;
    }
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rax
movsd (%rsi), %xmm0
movsd 0x8(%rsi), %xmm1
mulsd 0x8(%rdi), %xmm1
mulsd (%rdi), %xmm0
movsd 0x10(%rsi), %xmm2
mulsd 0x10(%rdi), %xmm2
addsd %xmm1, %xmm0
addsd %xmm0, %xmm2
addsd 0x18(%rdi), %xmm2
leaq 0x9b6bc(%rip), %rbx     # 0xe5b98
movsd (%rbx), %xmm1
ucomisd %xmm1, %xmm2
ja 0x4a516
xorpd 0x57b32(%rip), %xmm1    # 0xa2020
xorpd %xmm0, %xmm0
ucomisd %xmm2, %xmm1
jbe 0x4a540
addq $0x18, %rsi
movq %rsi, %rdi
movq %rax, %rsi
movapd %xmm2, (%rsp)
callq 0x3d252
movapd %xmm0, %xmm1
movsd (%rbx), %xmm0
jmp 0x4a536
addq $0x18, %rsi
movq %rsi, %rdi
movq %rax, %rsi
movapd %xmm2, (%rsp)
callq 0x3d252
movsd (%rbx), %xmm1
xorpd 0x57aea(%rip), %xmm1    # 0xa2020
cmpnltsd %xmm1, %xmm0
andpd (%rsp), %xmm0
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Dist.cpp
// Function: gaps::R3Distance(gaps::R3Ray const&, gaps::R3Halfspace const&)
RNLength R3Distance(const R3Ray& ray, const R3Halfspace& halfspace)
{
    // Return distance from ray to halfspace
    RNScalar d = R3SignedDistance(halfspace.Plane(), ray);
    if (RNIsNegative(d)) return -d;
    else return 0.0;
}

// Assembly:
pushq %rax
movq %rdi, %rax
movq %rsi, %rdi
movq %rax, %rsi
callq 0x4a4a4
leaq 0x9b63c(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm1
movapd 0x57ab8(%rip), %xmm2    # 0xa2020
xorpd %xmm2, %xmm1
xorpd %xmm0, %xmm2
cmpnltsd %xmm1, %xmm0
andnpd %xmm2, %xmm0
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Dist.cpp
// Function: gaps::R3Distance(gaps::R3Ray const&, gaps::R3OrientedBox const&)
RNLength R3Distance(const R3Ray& ray, const R3OrientedBox& box)
{
    // Check if box is empty
    if (box.IsEmpty()) return FLT_MAX;

    // Transform ray into std coordinate system
    R3Ray transformed_ray = ray;
    R3Affine cs_to_std_xform(box.CoordSystem().InverseMatrix());
    transformed_ray.Transform(cs_to_std_xform);

    // Return distance in std coordinate system
    R3Box axis_aligned_box(-box.Radius(0), -box.Radius(1), -box.Radius(2), box.Radius(0), box.Radius(1), box.Radius(2));
    return R3Distance(transformed_ray, axis_aligned_box);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movq %rsi, %rbx
movsd 0x70(%rsi), %xmm0
movsd 0x78(%rsi), %xmm1
minsd 0x68(%rsi), %xmm0
minsd %xmm0, %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
ja 0x4a665
movq %rdi, %rsi
leaq 0x88(%rsp), %r14
movq %r14, %rdi
callq 0x3c11a
leaq 0x8(%rbx), %rsi
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x2a7d6
leaq 0xb8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x29fda
movq %r14, %rdi
movq %r12, %rsi
callq 0x3c1f4
movsd 0x68(%rbx), %xmm3
movsd 0x70(%rbx), %xmm4
movapd 0x57a09(%rip), %xmm2    # 0xa2020
movapd %xmm3, %xmm0
xorpd %xmm2, %xmm0
movapd %xmm4, %xmm1
xorpd %xmm2, %xmm1
movsd 0x78(%rbx), %xmm5
xorpd %xmm5, %xmm2
leaq 0x8(%rsp), %rdi
callq 0x27374
leaq 0x57ce1(%rip), %rdi     # 0xa2322
xorl %eax, %eax
callq 0x718f6
leaq 0x8(%rsp), %rdi
callq 0x280f4
leaq 0xb8(%rsp), %rdi
callq 0x2a028
xorpd %xmm0, %xmm0
jmp 0x4a66d
movsd 0x579d3(%rip), %xmm0    # 0xa2040
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x280f4
jmp 0x4a690
jmp 0x4a68d
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
callq 0x2a028
movq %rbx, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Dist.cpp
// Function: gaps::R3Distance(gaps::R3Span const&, gaps::R3Plane const&)
RNLength R3Distance(const R3Span& span, const R3Plane& plane)
{
    // Return distance from span to plane
    RNScalar d = R3SignedDistance(plane, span);
    if (RNIsPositive(d)) return d;
    else if (RNIsNegative(d)) return -d;
    else return 0.0;
}

// Assembly:
pushq %rax
movq %rdi, %rax
movq %rsi, %rdi
movq %rax, %rsi
callq 0x4aaee
leaq 0x9b0de(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm2
ucomisd %xmm2, %xmm0
ja 0x4aae4
xorpd 0x57554(%rip), %xmm2    # 0xa2020
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm2
jbe 0x4aae8
movapd 0x57542(%rip), %xmm1    # 0xa2020
xorpd %xmm0, %xmm1
jmp 0x4aae8
movapd %xmm0, %xmm1
movapd %xmm1, %xmm0
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Dist.cpp
// Function: gaps::R3Distance(gaps::R3Span const&, gaps::R3Halfspace const&)
RNLength R3Distance(const R3Span& span, const R3Halfspace& halfspace)
{
    // Return distance from span to halfspace
    RNScalar d = R3SignedDistance(halfspace.Plane(), span);
    if (RNIsNegative(d)) return -d;
    else return 0.0;
}

// Assembly:
pushq %rax
movq %rdi, %rax
movq %rsi, %rdi
movq %rax, %rsi
callq 0x4aaee
leaq 0x9afde(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm1
movapd 0x5745a(%rip), %xmm2    # 0xa2020
xorpd %xmm2, %xmm1
xorpd %xmm0, %xmm2
cmpnltsd %xmm1, %xmm0
andnpd %xmm2, %xmm0
popq %rax
retq