LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Isect.cpp
// Function: gaps::R3Intersects(gaps::R3Span const&, gaps::R3Span const&, gaps::R3Point*, double*, double*)
RNClassID R3Intersects(const R3Span& span1, const R3Span& span2, 
    R3Point *hit_point, RNScalar *hit_t1, RNScalar *hit_t2)
{
    // Intersect span1 with span2's ray
    RNScalar s1, s2;
    switch (R3Intersects(span1, span2.Ray(), hit_point, &s1, &s2)) {
    case RN_NULL_CLASS_ID:
	// Spans do not intersect
	return RN_NULL_CLASS_ID;

    case R3_SPAN_CLASS_ID:
	// Span1 lies on span2's ray -- check if they overlap ???
	if ((R3Contains(span2, span1.Start())) || (R3Contains(span2, span1.End()))) {
	    // Spans are on same line, and overlap
	    return R3_SPAN_CLASS_ID;
	}
	else {
	    // Spans are on same line, but do not overlap
	    return RN_NULL_CLASS_ID;
	}
	break;

    case R3_POINT_CLASS_ID: 
	// Check if intersection point is on span
	if (RNIsGreater(s1, span1.Length())) {
	    // Span's ray intersects plane beyond span endpoint
	    return RN_NULL_CLASS_ID;
	}
	else {
	    // Span and plane intersect at point
	    if (hit_t1) *hit_t1 = s1;
	    if (hit_t2) *hit_t2 = s2;
	    return R3_POINT_CLASS_ID;
	}
	break;

    default:
	RNAbort("Illegal intersection");
	break;
    }

    // Should never get here
    RNAbort("Should never get here");
    return RN_NULL_CLASS_ID;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %r14
movq %rcx, %r13
movq %rsi, %r12
movq %rdi, %r15
movq %rsp, %rcx
leaq 0x8(%rsp), %r8
movq %rsi, %rdi
movq %r15, %rsi
callq 0x434fe
movl %eax, %ebx
testl %eax, %eax
je 0x45052
cmpl $0x1, %ebx
je 0x44ff4
cmpl $0x4, %ebx
jne 0x45034
movq %r12, %rdi
movq %r15, %rsi
callq 0x4765d
movl $0x4, %ebx
testl %eax, %eax
jne 0x45052
addq $0x30, %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0x4765d
xorl %ebx, %ebx
testl %eax, %eax
setne %bl
shll $0x2, %ebx
jmp 0x45052
movsd 0x8(%rsp), %xmm0
leaq 0xa0b97(%rip), %rax     # 0xe5b98
movapd %xmm0, %xmm1
subsd 0x48(%r15), %xmm1
xorl %ebx, %ebx
ucomisd (%rax), %xmm1
ja 0x45052
testq %r13, %r13
je 0x4501e
movsd %xmm0, (%r13)
movl $0x1, %ebx
testq %r14, %r14
je 0x45052
movsd (%rsp), %xmm0
movsd %xmm0, (%r14)
jmp 0x45052
leaq 0x63f91(%rip), %rdi     # 0xa8fcc
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x72942
leaq 0x63f96(%rip), %rdi     # 0xa8fe1
xorl %eax, %eax
callq 0x72942
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Isect.cpp
// Function: gaps::R3Intersects(gaps::R3Span const&, gaps::R3Halfspace const&, gaps::R3Point*, double*)
RNClassID R3Intersects(const R3Span& span, const R3Halfspace& halfspace, 
    R3Point *hit_point, RNScalar *hit_t)
{
    // Intersect halfspace with span's ray
    RNScalar s;
    switch (R3Intersects(halfspace, span.Ray(), hit_point, &s)) {
    case RN_NULL_CLASS_ID:
	// Span and halfspace do not intersect
	return RN_NULL_CLASS_ID;

    case R3_RAY_CLASS_ID:
    case R3_SPAN_CLASS_ID:
	// Halfspace contains span
	return R3_SPAN_CLASS_ID;

    case R3_POINT_CLASS_ID: 
	// Check if intersection point is on span
	if (RNIsGreater(s, span.Length())) {
	    // Span's ray intersects halfspace beyond span endpoint
	    return RN_NULL_CLASS_ID;
	}
	else {
	    // Span and halfspace intersect at point
	    if (hit_t) *hit_t = s;
	    return R3_POINT_CLASS_ID;
	}
	break;

    default:
	RNAbort("Illegal intersection");
	break;
    }

    // Should never get here
    RNAbort("Should never get here");
    return RN_NULL_CLASS_ID;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r14
movq %rdi, %r15
leaq 0x8(%rsp), %rcx
callq 0x436d3
movl %eax, %ebx
leal -0x3(%rbx), %eax
cmpl $0x2, %eax
jb 0x453ff
testl %ebx, %ebx
je 0x45424
cmpl $0x1, %ebx
jne 0x45406
movsd 0x8(%rsp), %xmm0
leaq 0xa07bc(%rip), %rax     # 0xe5b98
movapd %xmm0, %xmm1
subsd 0x48(%r15), %xmm1
xorl %ebx, %ebx
ucomisd (%rax), %xmm1
ja 0x45424
movl $0x1, %ebx
testq %r14, %r14
je 0x45424
movsd %xmm0, (%r14)
jmp 0x45424
movl $0x4, %ebx
jmp 0x45424
leaq 0x63bbf(%rip), %rdi     # 0xa8fcc
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x72942
leaq 0x63bc4(%rip), %rdi     # 0xa8fe1
xorl %eax, %eax
callq 0x72942
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Isect.cpp
// Function: gaps::R3Intersects(gaps::R3Span const&, gaps::R3Frustum const&, gaps::R3Point*, double*)
RNClassID R3Intersects(const R3Span& span, const R3Frustum& frustum, 
    R3Point *hit_point, RNScalar *hit_t)
{
  // Clip by each halfspace
  R3Span result = span;
  for (int dir = 0; dir < 2; dir++) {
    for (int dim = 0; dim < 3; dim++) {
      if (!result.Clip(frustum.Halfspace(dir, dim).Plane())) {
        return RN_NULL_CLASS_ID;
      }
    }
  }

  // Passed all tests
  if (hit_point) *hit_point = result.Start();
  if (hit_t) *hit_t = span.T(result.Start());
  return R3_SPAN_CLASS_ID;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rcx, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movq %rsi, %r12
movq %rdi, %r14
leaq 0x18(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x3bdea
addq $0x68, %r12
xorl %ebp, %ebp
xorl %ebx, %ebx
xorl %r15d, %r15d
leaq (%r12,%r15), %rsi
movq %r13, %rdi
callq 0x3c3e8
testl %eax, %eax
je 0x45498
addq $0x20, %r15
cmpq $0x60, %r15
jne 0x45469
leaq 0x1(%rbp), %rax
addq $0x60, %r12
testq %rbp, %rbp
setne %bl
movq %rax, %rbp
je 0x45466
jmp 0x4549f
xorl %ebp, %ebp
testb $0x1, %bl
je 0x454d3
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x454b3
leaq 0x18(%rsp), %rsi
callq 0x3cd94
movl $0x4, %ebp
movq 0x10(%rsp), %rbx
testq %rbx, %rbx
je 0x454d3
leaq 0x18(%rsp), %rsi
movq %r14, %rdi
callq 0x3c150
movsd %xmm0, (%rbx)
movl %ebp, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Isect.cpp
// Function: gaps::R3Intersects(gaps::R3Span const&, gaps::R3Shape const&, gaps::R3Point*, double*)
RNClassID R3Intersects(const R3Span& span, const R3Shape& shape, 
    R3Point *hit_point, RNScalar *hit_t)
{
    // Intersect shape with span's ray
    RNScalar s;
    switch (R3Intersects(shape, span.Ray(), hit_point, NULL, &s)) {
    case RN_NULL_CLASS_ID:
	// Span and shape do not intersect
	return RN_NULL_CLASS_ID;

    case R3_RAY_CLASS_ID:
    case R3_SPAN_CLASS_ID:
	// Shape contains span
	return R3_SPAN_CLASS_ID;

    case R3_POINT_CLASS_ID: 
	// Check if intersection point is on span
	if (RNIsGreater(s, span.Length())) {
	    // Span's ray intersects shape beyond span endpoint
	    return RN_NULL_CLASS_ID;
	}
	else {
	    // Span and shape intersect at point
	    if (hit_t) *hit_t = s;
	    return R3_POINT_CLASS_ID;
	}
	break;

    default:
	RNAbort("Illegal intersection");
	break;
    }

    // Should never get here
    RNAbort("Should never get here");
    return RN_NULL_CLASS_ID;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r14
movq %rdi, %r15
movq (%rsi), %rax
leaq 0x8(%rsp), %r8
movq %rsi, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq *0x1d8(%rax)
movl %eax, %ebx
leal -0x3(%rbx), %eax
cmpl $0x2, %eax
jb 0x4554c
testl %ebx, %ebx
je 0x45571
cmpl $0x1, %ebx
jne 0x45553
movsd 0x8(%rsp), %xmm0
leaq 0xa066f(%rip), %rax     # 0xe5b98
movapd %xmm0, %xmm1
subsd 0x48(%r15), %xmm1
xorl %ebx, %ebx
ucomisd (%rax), %xmm1
ja 0x45571
movl $0x1, %ebx
testq %r14, %r14
je 0x45571
movsd %xmm0, (%r14)
jmp 0x45571
movl $0x4, %ebx
jmp 0x45571
leaq 0x63a72(%rip), %rdi     # 0xa8fcc
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x72942
leaq 0x63a77(%rip), %rdi     # 0xa8fe1
xorl %eax, %eax
callq 0x72942
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Isect.cpp
// Function: gaps::R3Intersects(gaps::R3Plane const&, gaps::R3Plane const&, gaps::R3Plane const&, gaps::R3Point*)
RNClassID R3Intersects(const R3Plane& plane1, const R3Plane& plane2, const R3Plane& plane3, 
    R3Point *hit_point)
{
    // From Graphics Gems I, page 305
    RNScalar denom = R4MatrixDet3(plane1.Normal().X(), plane2.Normal().X(), plane3.Normal().X(), 
				  plane1.Normal().Y(), plane2.Normal().Y(), plane3.Normal().Y(), 
				  plane1.Normal().Z(), plane2.Normal().Z(), plane3.Normal().Z());

    // Check for any two parallel planes 
    if (RNIsZero(denom)) {
	// Check for case of all planes coincident
	if (R3Contains(plane1, plane2) && R3Contains(plane1, plane3)) return R3_PLANE_CLASS_ID;
	else return RN_NULL_CLASS_ID;
    }

    // Compute unique intersection point
    if (hit_point) {
	*hit_point = R3zero_point;
	*hit_point += (plane2.Normal() % plane3.Normal()) * -(plane1.D());
	*hit_point += (plane3.Normal() % plane1.Normal()) * -(plane2.D());
	*hit_point += (plane1.Normal() % plane2.Normal()) * -(plane3.D());
	*hit_point /= denom;
    }

    // Return intersection type
    return R3_POINT_CLASS_ID;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movsd (%rdi), %xmm0
movsd 0x8(%rdi), %xmm3
movsd (%rsi), %xmm1
movsd 0x8(%rsi), %xmm4
movsd (%rdx), %xmm2
movsd 0x8(%rdx), %xmm5
movsd 0x10(%rdi), %xmm6
movsd 0x10(%rsi), %xmm7
movsd 0x10(%rdx), %xmm8
movsd %xmm8, (%rsp)
callq 0x2d4d1
leaq 0xa0434(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm2
movapd 0x5c8b0(%rip), %xmm1    # 0xa2020
xorpd %xmm2, %xmm1
ucomisd %xmm1, %xmm0
jb 0x457ae
ucomisd %xmm0, %xmm2
jb 0x457ae
movq %r15, %rdi
movq %r12, %rsi
callq 0x479a7
testl %eax, %eax
je 0x457a7
movq %r15, %rdi
movq %r14, %rsi
callq 0x479a7
movl $0x5, %ebp
testl %eax, %eax
jne 0x4588f
xorl %ebp, %ebp
jmp 0x4588f
movl $0x1, %ebp
testq %rbx, %rbx
je 0x4588f
leaq 0x4a129d(%rip), %rsi    # 0x4e6a60
movq %rbx, %rdi
movsd %xmm0, 0x10(%rsp)
callq 0x3cd94
leaq 0x18(%rsp), %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x3de12
movsd 0x18(%r15), %xmm0
xorps 0x5c832(%rip), %xmm0    # 0xa2020
leaq 0x30(%rsp), %r13
movq %r13, %rdi
leaq 0x18(%rsp), %rsi
callq 0x3de8e
movq %rbx, %rdi
movq %r13, %rsi
callq 0x3ce0e
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x3de12
movsd 0x18(%r12), %xmm0
xorps 0x5c7f7(%rip), %xmm0    # 0xa2020
leaq 0x30(%rsp), %r13
movq %r13, %rdi
leaq 0x18(%rsp), %rsi
callq 0x3de8e
movq %rbx, %rdi
movq %r13, %rsi
callq 0x3ce0e
leaq 0x18(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x3de12
movsd 0x18(%r14), %xmm0
xorps 0x5c7ba(%rip), %xmm0    # 0xa2020
leaq 0x30(%rsp), %r14
movq %r14, %rdi
movq %r13, %rsi
callq 0x3de8e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3ce0e
movq %rbx, %rdi
movsd 0x10(%rsp), %xmm0
callq 0x3d3e4
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Isect.cpp
// Function: gaps::R3Intersects(gaps::R3Plane const&, gaps::R3Box const&)
RNClassID R3Intersects(const R3Plane& plane, const R3Box& box)
{
    // Return whether sphere intersects plane
    RNOctant octant = plane.Normal().Octant();
    if (R3SignedDistance(plane, box.Corner(octant)) < 0) return RN_NULL_CLASS_ID;
    if (R3SignedDistance(plane, box.Corner(~octant & 0x7)) > 0) return RN_NULL_CLASS_ID;
    return RN_UNKNOWN_CLASS_ID;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x3d6f4
movl %eax, %ebp
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
movl %eax, %edx
callq 0x2777e
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4a10f
xorl %eax, %eax
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
ja 0x4595a
notl %ebp
andl $0x7, %ebp
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x2777e
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4a10f
xorl %eax, %eax
ucomisd 0x5c893(%rip), %xmm0    # 0xa21e8
setbe %al
negl %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Isect.cpp
// Function: gaps::R3Intersects(gaps::R3Plane const&, gaps::R3OrientedBox const&)
RNClassID R3Intersects(const R3Plane& plane, const R3OrientedBox& box)
{
    // Check if box is empty
    if (box.IsEmpty()) return RN_NULL_CLASS_ID;

    // Transform plane into std coordinate system and intersect there
    R3Plane transformed_plane = plane;
    R3Affine cs_to_std_xform(box.CoordSystem().InverseMatrix());
    transformed_plane.Transform(cs_to_std_xform);
    R3Box axis_aligned_box(-box.Radius(0), -box.Radius(1), -box.Radius(2), box.Radius(0), box.Radius(1), box.Radius(2));
    return R3Intersects(transformed_plane, axis_aligned_box);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
movq %rsi, %rbx
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 0x45a34
movq %rdi, %rsi
movq %rsp, %r14
movq %r14, %rdi
callq 0x3b51a
leaq 0x8(%rbx), %rsi
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0x2aa1e
leaq 0xa0(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x2a22e
movq %r14, %rdi
movq %r12, %rsi
callq 0x3bc30
movsd 0x68(%rbx), %xmm3
movsd 0x70(%rbx), %xmm4
movapd 0x5c635(%rip), %xmm2    # 0xa2020
movapd %xmm3, %xmm0
xorpd %xmm2, %xmm0
movapd %xmm4, %xmm1
xorpd %xmm2, %xmm1
movsd 0x78(%rbx), %xmm5
xorpd %xmm5, %xmm2
leaq 0x20(%rsp), %rdi
callq 0x27590
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x458ed
movl %eax, %ebp
leaq 0x20(%rsp), %rdi
callq 0x28348
leaq 0xa0(%rsp), %rdi
callq 0x2a27c
movl %ebp, %eax
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x28348
jmp 0x45a5a
jmp 0x45a57
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x2a27c
movq %rbx, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Isect.cpp
// Function: gaps::R3Intersects(gaps::R3Plane const&, gaps::R3Sphere const&)
RNClassID R3Intersects(const R3Plane& plane, const R3Sphere& sphere)
{
    // Return whether sphere intersects plane
    RNScalar d = R3Distance(plane, sphere.Center());
    if (RNIsGreater(d, sphere.Radius())) return RN_NULL_CLASS_ID;
    else if (RNIsEqual(d, sphere.Radius())) return R3_POINT_CLASS_ID;
    else return RN_UNKNOWN_CLASS_ID;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
movq %rdi, %rsi
leaq 0x8(%rbx), %rdi
callq 0x4a0b6
leaq 0xa0112(%rip), %rax     # 0xe5b98
subsd 0x20(%rbx), %xmm0
movsd (%rax), %xmm1
xorl %eax, %eax
ucomisd %xmm1, %xmm0
ja 0x45ab8
movapd %xmm0, %xmm2
cmpnlepd %xmm1, %xmm2
xorpd 0x5c578(%rip), %xmm1    # 0xa2020
cmpnlepd %xmm0, %xmm1
orpd %xmm2, %xmm1
movd %xmm1, %eax
orl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Isect.cpp
// Function: gaps::R3Intersects(gaps::R3Plane const&, gaps::R3Frustum const&)
RNClassID R3Intersects(const R3Plane& plane, const R3Frustum& frustum)
{
  // Check each halfspace
  for (int dir = 0; dir < 2; dir++) {
    for (int dim = 0; dim < 3; dim++) {
      if (!R3Intersects(frustum.Halfspace(dir, dim), plane)) {
        return RN_NULL_CLASS_ID;
      }
    }
  }

  // Passed all tests
  return RN_UNKNOWN_CLASS_ID;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x68(%rsi), %rax
movq %rax, (%rsp)
addq $0x88, %rbx
xorl %r13d, %r13d
xorl %ebp, %ebp
leaq (,%r13,2), %rsi
addq %r13, %rsi
shlq $0x5, %rsi
addq (%rsp), %rsi
movq %r14, %rdi
callq 0x458a0
testl %eax, %eax
je 0x45b3e
movq $-0x1, %r12
movq %rbx, %r15
cmpq $0x1, %r12
je 0x45b2a
movq %r14, %rdi
movq %r15, %rsi
callq 0x458a0
incq %r12
addq $0x20, %r15
testl %eax, %eax
jne 0x45b08
cmpq $0x2, %r12
jb 0x45b3e
leaq 0x1(%r13), %rax
addq $0x60, %rbx
testq %r13, %r13
setne %bpl
movq %rax, %r13
je 0x45adf
movzbl %bpl, %eax
andl $0x1, %eax
negl %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Isect.cpp
// Function: gaps::R3Intersects(gaps::R3Plane const&, gaps::R3Ellipsoid const&, gaps::R3Ellipse*)
RNClassID R3Intersects(const R3Plane& plane, const R3Ellipsoid& ellipsoid,
                       R3Ellipse *result)
{
  // Compute transformation from ellipse to canonical coordinate systems
  R3Affine xform(ellipsoid.CoordSystem().Matrix());

  // Transform plane to canonical coordinate system
  R3Plane transformed_plane(plane);
  transformed_plane.InverseTransform(xform);

  // Compute intersection
  R3Ellipse ellipse(R3xyz_coordinate_system, R2null_vector); 

  // If no intersection
  RNAbort("Not implemented");
  return RN_NULL_CLASS_ID;

  // Transform intersection back to original coordinate system
  if (result) {
    *result = ellipse;
    result->Transform(xform);
  }

  // Return success
  return R3_ELLIPSE_CLASS_ID;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x1e8, %rsp            # imm = 0x1E8
movq %rdi, %rbx
addq $0x8, %rsi
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0x2a996
leaq 0xd8(%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x2a22e
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x3b51a
leaq 0x8(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
callq 0x3bcd4
leaq 0xa054f(%rip), %rsi     # 0xe6110
leaq 0x63e50(%rip), %rdx     # 0xa9a18
leaq 0x28(%rsp), %rdi
callq 0x51be2
leaq 0x5c749(%rip), %rdi     # 0xa2322
xorl %eax, %eax
callq 0x72942
leaq 0x9d139(%rip), %rax     # 0xe2d20
addq $0x10, %rax
leaq 0xa0(%rsp), %rdi
movq %rax, -0x78(%rdi)
callq 0x28348
leaq 0x28(%rsp), %rdi
callq 0x5528c
leaq 0xd8(%rsp), %rdi
callq 0x2a27c
xorl %eax, %eax
addq $0x1e8, %rsp            # imm = 0x1E8
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x9d0f6(%rip), %rax     # 0xe2d20
addq $0x10, %rax
leaq 0xa0(%rsp), %rdi
movq %rax, -0x78(%rdi)
callq 0x28348
leaq 0x28(%rsp), %rdi
callq 0x5528c
jmp 0x45c50
jmp 0x45c4d
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
callq 0x2a27c
movq %rbx, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Isect.cpp
// Function: gaps::R3Intersects(gaps::R3Halfspace const&, gaps::R3Circle const&)
RNClassID R3Intersects(const R3Halfspace& halfspace, const R3Circle& circle)
{
    // Return whether halfspace intersects circle
    RNScalar d = R3SignedDistance(halfspace.Plane(), circle.Center());
    if (RNIsPositiveOrZero(d)) return RN_UNKNOWN_CLASS_ID;
    else if (RNIsLess(d, -(circle.Radius()))) return RN_NULL_CLASS_ID;
    else {
        RNScalar cos_theta = halfspace.Plane().Normal().Dot(circle.Normal());
	if (cos_theta < 0.0) cos_theta = halfspace.Plane().Normal().Dot(-circle.Normal());
	if (RNIsGreaterOrEqual(d, -(cos_theta * circle.Radius()))) return RN_UNKNOWN_CLASS_ID;
	else return RN_NULL_CLASS_ID;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
addq $0x8, %rsi
callq 0x4a10f
leaq 0x9fe93(%rip), %r13     # 0xe5b98
movsd (%r13), %xmm1
xorpd 0x5c30d(%rip), %xmm1    # 0xa2020
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
ucomisd %xmm1, %xmm0
jae 0x45d8d
movsd 0x20(%rbx), %xmm2
addsd %xmm0, %xmm2
xorl %eax, %eax
ucomisd %xmm2, %xmm1
ja 0x45d8d
movsd %xmm0, (%rsp)
leaq 0x28(%rbx), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x3d756
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jbe 0x45d68
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x3e154
movq %r14, %rdi
movq %r12, %rsi
callq 0x3d756
mulsd 0x20(%rbx), %xmm0
movsd (%rsp), %xmm1
addsd %xmm0, %xmm1
movsd (%r13), %xmm0
xorpd 0x5c29c(%rip), %xmm0    # 0xa2020
xorl %eax, %eax
ucomisd %xmm0, %xmm1
adcl $-0x1, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Isect.cpp
// Function: gaps::R3Intersects(gaps::R3Halfspace const&, gaps::R3OrientedBox const&)
RNClassID R3Intersects(const R3Halfspace& halfspace, const R3OrientedBox& box)
{
    // Check if box is empty
    if (box.IsEmpty()) return RN_NULL_CLASS_ID;

    // Transform halfspace into std coordinate system and intersect there
    R3Halfspace transformed_halfspace = halfspace;
    R3Affine cs_to_std_xform(box.CoordSystem().InverseMatrix());
    transformed_halfspace.Transform(cs_to_std_xform);
    R3Box axis_aligned_box(-box.Radius(0), -box.Radius(1), -box.Radius(2), box.Radius(0), box.Radius(1), box.Radius(2));
    return R3Intersects(transformed_halfspace, axis_aligned_box);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
movq %rsi, %rbx
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 0x45ead
movq %rdi, %rsi
movq %rsp, %r14
movq %r14, %rdi
callq 0x5793e
leaq 0x8(%rbx), %rsi
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0x2aa1e
leaq 0xa0(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x2a22e
movq %r14, %rdi
movq %r12, %rsi
callq 0x5797a
movsd 0x68(%rbx), %xmm3
movsd 0x70(%rbx), %xmm4
movapd 0x5c1bc(%rip), %xmm2    # 0xa2020
movapd %xmm3, %xmm0
xorpd %xmm2, %xmm0
movapd %xmm4, %xmm1
xorpd %xmm2, %xmm1
movsd 0x78(%rbx), %xmm5
xorpd %xmm5, %xmm2
leaq 0x20(%rsp), %rdi
callq 0x27590
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x45d9b
movl %eax, %ebp
leaq 0x20(%rsp), %rdi
callq 0x28348
leaq 0xa0(%rsp), %rdi
callq 0x2a27c
movl %ebp, %eax
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x28348
jmp 0x45ed3
jmp 0x45ed0
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x2a27c
movq %rbx, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Isect.cpp
// Function: gaps::R3Intersects(gaps::R3Halfspace const&, gaps::R3Sphere const&)
RNClassID R3Intersects(const R3Halfspace& halfspace, const R3Sphere& sphere)
{
    // Return whether sphere intersects halfspace
    RNScalar d = R3SignedDistance(halfspace.Plane(), sphere.Center());
    if (RNIsLess(d, -(sphere.Radius()))) return RN_NULL_CLASS_ID;
    else if (RNIsEqual(d, -(sphere.Radius()))) return R3_POINT_CLASS_ID;
    else return RN_UNKNOWN_CLASS_ID;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
addq $0x8, %rsi
callq 0x4a10f
leaq 0x9fc9c(%rip), %rax     # 0xe5b98
addsd 0x20(%rbx), %xmm0
movsd (%rax), %xmm1
movapd 0x5c113(%rip), %xmm2    # 0xa2020
xorpd %xmm1, %xmm2
movapd %xmm0, %xmm3
cmpnlepd %xmm1, %xmm3
movapd %xmm2, %xmm1
cmpnlepd %xmm0, %xmm1
orpd %xmm3, %xmm1
movd %xmm1, %ecx
orl $0x1, %ecx
xorl %eax, %eax
ucomisd %xmm0, %xmm2
cmovbel %ecx, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Isect.cpp
// Function: gaps::R3Intersects(gaps::R3Halfspace const&, gaps::R3Cylinder const&)
RNClassID R3Intersects(const R3Halfspace& halfspace, const R3Cylinder& cylinder)
{
    // Return whether halfspace intersects cylinder
    if (R3Intersects(halfspace, cylinder.Top())) return RN_UNKNOWN_CLASS_ID;
    if (R3Intersects(halfspace, cylinder.Base())) return RN_UNKNOWN_CLASS_ID;
    return RN_NULL_CLASS_ID;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0xa0, %rsi
callq 0x45ce2
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x45f71
addq $0x58, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x45ce2
movl %eax, %ecx
xorl %eax, %eax
negl %ecx
sbbl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Isect.cpp
// Function: gaps::R3Intersects(gaps::R3Halfspace const&, gaps::R3Cone const&)
RNClassID R3Intersects(const R3Halfspace& halfspace, const R3Cone& cone)
{
    // Return whether halfspace intersects cone
    if (R3Intersects(halfspace, cone.Apex())) return RN_UNKNOWN_CLASS_ID;
    if (R3Intersects(halfspace, cone.Base())) return RN_UNKNOWN_CLASS_ID;
    return RN_NULL_CLASS_ID;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0x38, %rsi
callq 0x48368
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x45fae
addq $0x58, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x45ce2
movl %eax, %ecx
xorl %eax, %eax
negl %ecx
sbbl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Isect.cpp
// Function: gaps::R3Intersects(gaps::R3Halfspace const&, gaps::R3Frustum const&)
RNClassID R3Intersects(const R3Halfspace& halfspace, const R3Frustum& frustum)
{
  // Check each halfspace
  for (int dir = 0; dir < 2; dir++) {
    for (int dim = 0; dim < 3; dim++) {
      if (!R3Intersects(frustum.Halfspace(dir, dim), halfspace)) {
        return RN_NULL_CLASS_ID;
      }
    }
  }

  // Passed all tests
  return RN_UNKNOWN_CLASS_ID;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x68(%rsi), %rax
movq %rax, (%rsp)
addq $0x88, %rbx
xorl %r13d, %r13d
xorl %ebp, %ebp
leaq (,%r13,2), %rdi
addq %r13, %rdi
shlq $0x5, %rdi
addq (%rsp), %rdi
movq %r14, %rsi
callq 0x45c82
testl %eax, %eax
je 0x4603a
movq $-0x1, %r12
movq %rbx, %r15
cmpq $0x1, %r12
je 0x46026
movq %r15, %rdi
movq %r14, %rsi
callq 0x45c82
incq %r12
addq $0x20, %r15
testl %eax, %eax
jne 0x46004
cmpq $0x2, %r12
jb 0x4603a
leaq 0x1(%r13), %rax
addq $0x60, %rbx
testq %r13, %r13
setne %bpl
movq %rax, %r13
je 0x45fdb
movzbl %bpl, %eax
andl $0x1, %eax
negl %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Isect.cpp
// Function: gaps::R3Intersects(gaps::R3Box const&, gaps::R3OrientedBox const&)
RNClassID R3Intersects(const R3Box& box1, const R3OrientedBox& box2)
{
    // Check if box is empty
    if (box1.IsEmpty()) return RN_NULL_CLASS_ID;
    if (box2.IsEmpty()) return RN_NULL_CLASS_ID;

    // Check for intersection with all halfspaces
    for (int dir = 0; dir < 2; dir++) {
      for (int dim = 0; dim < 3; dim++) {
        R3Halfspace halfspace(-box2.Plane(dir, dim), 0);
        if (!R3Intersects(halfspace, box1)) {
          return RN_NULL_CLASS_ID;
        }
      }
    }

    // Passed all tests
    return RN_UNKNOWN_CLASS_ID;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, 0x8(%rsp)
movsd 0x8(%rdi), %xmm0
xorl %eax, %eax
ucomisd 0x20(%rdi), %xmm0
ja 0x46669
movsd 0x10(%rdi), %xmm0
ucomisd 0x28(%rdi), %xmm0
ja 0x46669
movsd 0x18(%rdi), %xmm0
ucomisd 0x30(%rdi), %xmm0
ja 0x46669
movq 0x8(%rsp), %rcx
movsd 0x70(%rcx), %xmm0
movsd 0x78(%rcx), %xmm1
minsd 0x68(%rcx), %xmm0
minsd %xmm0, %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
ja 0x46669
movq %rdi, 0x10(%rsp)
movl $0x0, 0x4(%rsp)
leaq 0x18(%rsp), %r15
leaq 0x58(%rsp), %r12
leaq 0x38(%rsp), %r13
xorl %ebp, %ebp
xorl %r14d, %r14d
xorl %ebx, %ebx
movq %r15, %rdi
movq 0x8(%rsp), %rsi
movl %ebp, %edx
movl %ebx, %ecx
callq 0x56b92
movq %r12, %rdi
movq %r15, %rsi
callq 0x3e154
movsd 0x30(%rsp), %xmm0
xorpd 0x5ba17(%rip), %xmm0    # 0xa2020
movq %r13, %rdi
movq %r12, %rsi
callq 0x3b582
movq %r12, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x5796e
movq %r12, %rdi
movq 0x10(%rsp), %rsi
callq 0x45d9b
testl %eax, %eax
je 0x46645
cmpl $0x2, %ebx
leal 0x1(%rbx), %eax
setae %r14b
movl %eax, %ebx
cmpl $0x3, %eax
jne 0x465df
jmp 0x4664b
testb $0x1, %r14b
je 0x4665f
leal 0x1(%rbp), %eax
testl %ebp, %ebp
setne %cl
movl %ecx, 0x4(%rsp)
movl %eax, %ebp
je 0x465da
movzbl 0x4(%rsp), %eax
andl $0x1, %eax
negl %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Isect.cpp
// Function: gaps::R3Intersects(gaps::R3Box const&, gaps::R3Frustum const&)
RNClassID R3Intersects(const R3Box& box, const R3Frustum& frustum)
{
  // Check each halfspace
  for (int dir = 0; dir < 2; dir++) {
    for (int dim = 0; dim < 3; dim++) {
      if (!R3Intersects(frustum.Halfspace(dir, dim), box)) {
        return RN_NULL_CLASS_ID;
      }
    }
  }

  // Passed all tests
  return RN_UNKNOWN_CLASS_ID;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x68(%rsi), %rax
movq %rax, (%rsp)
addq $0x88, %rbx
xorl %r13d, %r13d
xorl %ebp, %ebp
leaq (,%r13,2), %rdi
addq %r13, %rdi
shlq $0x5, %rdi
addq (%rsp), %rdi
movq %r14, %rsi
callq 0x45d9b
testl %eax, %eax
je 0x46730
movq $-0x1, %r12
movq %rbx, %r15
cmpq $0x1, %r12
je 0x4671c
movq %r15, %rdi
movq %r14, %rsi
callq 0x45d9b
incq %r12
addq $0x20, %r15
testl %eax, %eax
jne 0x466fa
cmpq $0x2, %r12
jb 0x46730
leaq 0x1(%r13), %rax
addq $0x60, %rbx
testq %r13, %r13
setne %bpl
movq %rax, %r13
je 0x466d1
movzbl %bpl, %eax
andl $0x1, %eax
negl %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Isect.cpp
// Function: gaps::R3Intersects(gaps::R3OrientedBox const&, gaps::R3Frustum const&)
RNClassID R3Intersects(const R3OrientedBox& box, const R3Frustum& frustum)
{
  // Check each halfspace
  for (int dir = 0; dir < 2; dir++) {
    for (int dim = 0; dim < 3; dim++) {
      if (!R3Intersects(frustum.Halfspace(dir, dim), box)) {
        return RN_NULL_CLASS_ID;
      }
    }
  }

  // Passed all tests
  return RN_UNKNOWN_CLASS_ID;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x68(%rsi), %rax
movq %rax, (%rsp)
addq $0x88, %rbx
xorl %r13d, %r13d
xorl %ebp, %ebp
leaq (,%r13,2), %rdi
addq %r13, %rdi
shlq $0x5, %rdi
addq (%rsp), %rdi
movq %r14, %rsi
callq 0x45dde
testl %eax, %eax
je 0x46a1c
movq $-0x1, %r12
movq %rbx, %r15
cmpq $0x1, %r12
je 0x46a08
movq %r15, %rdi
movq %r14, %rsi
callq 0x45dde
incq %r12
addq $0x20, %r15
testl %eax, %eax
jne 0x469e6
cmpq $0x2, %r12
jb 0x46a1c
leaq 0x1(%r13), %rax
addq $0x60, %rbx
testq %r13, %r13
setne %bpl
movq %rax, %r13
je 0x469bd
movzbl %bpl, %eax
andl $0x1, %eax
negl %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Isect.cpp
// Function: gaps::R3Intersects(gaps::R3Sphere const&, gaps::R3Sphere const&)
RNClassID R3Intersects(const R3Sphere& sphere1, const R3Sphere& sphere2)
{
    // Return whether sphere intersects sphere
    R3Vector v = sphere1.Center() - sphere2.Center();
    RNScalar distance_squared = v.X() * v.X() + v.Y() * v.Y() + v.Z() * v.Z();
    RNScalar radius_sum = sphere1.Radius() + sphere2.Radius();
    RNScalar radius_sum_squared = radius_sum * radius_sum;
    if (RNIsGreater(distance_squared, radius_sum_squared)) return RN_NULL_CLASS_ID;
    else if (RNIsEqual(distance_squared, radius_sum_squared)) return R3_POINT_CLASS_ID;
    else return RN_UNKNOWN_CLASS_ID;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %rsi
leaq 0x8(%rbx), %rdx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x3cc88
movsd (%r15), %xmm1
movsd 0x8(%r15), %xmm0
mulsd %xmm0, %xmm0
mulsd %xmm1, %xmm1
addsd %xmm0, %xmm1
movsd 0x10(%r15), %xmm0
mulsd %xmm0, %xmm0
movsd 0x20(%r14), %xmm2
addsd 0x20(%rbx), %xmm2
addsd %xmm1, %xmm0
mulsd %xmm2, %xmm2
leaq 0x9f00e(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm1
subsd %xmm2, %xmm0
xorl %eax, %eax
ucomisd %xmm1, %xmm0
ja 0x46bbb
movapd %xmm0, %xmm2
cmpnlepd %xmm1, %xmm2
xorpd 0x5b475(%rip), %xmm1    # 0xa2020
cmpnlepd %xmm0, %xmm1
orpd %xmm2, %xmm1
movd %xmm1, %eax
orl $0x1, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Isect.cpp
// Function: gaps::R3Intersects(gaps::R3Sphere const&, gaps::R3Frustum const&)
RNClassID R3Intersects(const R3Sphere& sphere, const R3Frustum& frustum)
{
  // Check each halfspace
  for (int dir = 0; dir < 2; dir++) {
    for (int dim = 0; dim < 3; dim++) {
      if (!R3Intersects(frustum.Halfspace(dir, dim), sphere)) {
        return RN_NULL_CLASS_ID;
      }
    }
  }

  // Passed all tests
  return RN_UNKNOWN_CLASS_ID;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x68(%rsi), %rax
movq %rax, 0x10(%rsp)
leaq 0x8(%rdi), %r15
addq $0x88, %rbx
movq $0x0, (%rsp)
leaq 0x9ef9c(%rip), %rbp     # 0xe5b98
movq $0x0, 0x8(%rsp)
movq (%rsp), %rax
leaq (%rax,%rax,2), %rdi
shlq $0x5, %rdi
addq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x4a10f
addsd 0x20(%r14), %xmm0
movsd (%rbp), %xmm1
xorpd 0x5b3ef(%rip), %xmm1    # 0xa2020
ucomisd %xmm0, %xmm1
ja 0x46c99
movq $-0x1, %r13
movq %rbx, %r12
cmpq $0x1, %r13
je 0x46c78
movq %r12, %rdi
movq %r15, %rsi
callq 0x4a10f
addsd 0x20(%r14), %xmm0
movsd (%rbp), %xmm1
xorpd 0x5b3bb(%rip), %xmm1    # 0xa2020
incq %r13
addq $0x20, %r12
ucomisd %xmm0, %xmm1
jbe 0x46c41
cmpq $0x2, %r13
jb 0x46c99
movq (%rsp), %rcx
leaq 0x1(%rcx), %rax
addq $0x60, %rbx
testq %rcx, %rcx
setne %cl
movq %rcx, 0x8(%rsp)
movq %rax, (%rsp)
je 0x46c05
movzbl 0x8(%rsp), %eax
andl $0x1, %eax
negl %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Isect.cpp
// Function: gaps::R3Intersects(gaps::R3Frustum const&, gaps::R3Shape const&)
RNClassID R3Intersects(const R3Frustum& frustum, const R3Shape& shape)
{
  // Check each halfspace
  for (int dir = 0; dir < 2; dir++) {
    for (int dim = 0; dim < 3; dim++) {
      if (!R3Intersects(frustum.Halfspace(dir, dim), shape)) {
        return RN_NULL_CLASS_ID;
      }
    }
  }

  // Passed all tests
  return RN_UNKNOWN_CLASS_ID;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x68(%rdi), %rax
movq %rax, (%rsp)
addq $0x88, %r14
xorl %r13d, %r13d
xorl %ebp, %ebp
leaq (,%r13,2), %rsi
addq %r13, %rsi
shlq $0x5, %rsi
addq (%rsp), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x1f0(%rax)
testl %eax, %eax
je 0x46d53
movq $-0x1, %r12
movq %r14, %r15
cmpq $0x1, %r12
je 0x46d3f
movq (%rbx), %rax
movq %rbx, %rdi
movq %r15, %rsi
callq *0x1f0(%rax)
incq %r12
addq $0x20, %r15
testl %eax, %eax
jne 0x46d19
cmpq $0x2, %r12
jb 0x46d53
leaq 0x1(%r13), %rax
addq $0x60, %r14
testq %r13, %r13
setne %bpl
movq %rax, %r13
je 0x46cec
movzbl %bpl, %eax
andl $0x1, %eax
negl %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x46f0e
movq %rdi, %rbx
callq 0x46e1b
testl %eax, %eax
je 0x46f0e
movq %rbx, %rdi
movq %r15, %rsi
callq 0x46e1b
testl %eax, %eax
je 0x46f0e
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x46e1b
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %xmm1, %xmm1
ucomisd %xmm0, %xmm1
ja 0x4825f
movq %rdi, %rbx
ucomisd 0x70(%rdi), %xmm1
ja 0x4825f
leaq 0x9d9f5(%rip), %r13     # 0xe5b98
movsd (%r13), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x4825f
movsd 0x70(%rbx), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x4825f
movq %rsi, %r14
leaq 0x8(%rbx), %r15
leaq 0x50(%rbx), %rdx
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x3b5a6
movq %r12, %rdi
movq %r14, %rsi
callq 0x4a10f
movsd (%r13), %xmm1
movapd 0x59e2a(%rip), %xmm2    # 0xa2020
xorpd %xmm1, %xmm2
ucomisd %xmm2, %xmm0
jb 0x4825f
ucomisd %xmm0, %xmm1
jb 0x4825f
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x3cc88
leaq 0x20(%rbx), %rsi
movq %r12, %rdi
callq 0x3d756
divsd 0x68(%rbx), %xmm0
movsd %xmm0, (%rsp)
leaq 0x38(%rbx), %rsi
movq %r12, %rdi
callq 0x3d756
divsd 0x70(%rbx), %xmm0
mulsd %xmm0, %xmm0
movsd (%rsp), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm0, %xmm1
xorl %ebp, %ebp
ucomisd 0x59ddd(%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_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Cont.cpp
// Function: gaps::R3Contains(gaps::R3OrientedBox const&, gaps::R3Box 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 $0x78, %rsp
movsd 0x70(%rdi), %xmm0
movsd 0x78(%rdi), %xmm1
movq %rdi, 0x10(%rsp)
minsd 0x68(%rdi), %xmm0
minsd %xmm0, %xmm1
xorl %eax, %eax
xorpd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
ja 0x4915f
movsd 0x8(%rsi), %xmm0
ucomisd 0x20(%rsi), %xmm0
ja 0x4915f
movsd 0x10(%rsi), %xmm0
ucomisd 0x28(%rsi), %xmm0
ja 0x4915f
movsd 0x18(%rsi), %xmm0
ucomisd 0x30(%rsi), %xmm0
ja 0x4915f
movq %rsi, 0x8(%rsp)
movl $0x0, 0x4(%rsp)
leaq 0x18(%rsp), %r15
leaq 0x58(%rsp), %r12
leaq 0x38(%rsp), %r13
xorl %ebp, %ebp
xorl %r14d, %r14d
xorl %ebx, %ebx
movq %r15, %rdi
movq 0x10(%rsp), %rsi
movl %ebp, %edx
movl %ebx, %ecx
callq 0x56b92
movq %r12, %rdi
movq %r15, %rsi
callq 0x3e154
movsd 0x30(%rsp), %xmm0
xorpd 0x58f1f(%rip), %xmm0    # 0xa2020
movq %r13, %rdi
movq %r12, %rsi
callq 0x3b582
movq %r12, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x5796e
movq %r12, %rdi
movq 0x8(%rsp), %rsi
callq 0x48579
testl %eax, %eax
je 0x4913d
cmpl $0x2, %ebx
leal 0x1(%rbx), %eax
setae %r14b
movl %eax, %ebx
cmpl $0x3, %eax
jne 0x490d7
jmp 0x49143
testb $0x1, %r14b
je 0x49157
leal 0x1(%rbp), %eax
testl %ebp, %ebp
setne %cl
movl %ecx, 0x4(%rsp)
movl %eax, %ebp
je 0x490d2
movzbl 0x4(%rsp), %eax
andl $0x1, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x473fd
addq $0x8, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x49f22
leaq 0x9e7c2(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm1
movapd 0x5ac3e(%rip), %xmm2    # 0xa2020
xorpd %xmm1, %xmm2
cmplepd %xmm0, %xmm2
cmplepd %xmm1, %xmm0
andpd %xmm2, %xmm0
movd %xmm0, %eax
andl $0x1, %eax
jmp 0x473ff
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x471fd
testl %eax, %eax
je 0x47557
leaq 0x18(%rbx), %rdi
callq 0x3d6f4
notl %eax
andl $0x7, %eax
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movl %eax, %edx
callq 0x2777e
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4741c
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
jmp 0x47559
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x471fd
xorl %ebp, %ebp
testl %eax, %eax
je 0x47740
leaq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x4765d
testl %eax, %eax
je 0x47740
addq $0x20, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4765d
xorl %ebp, %ebp
testl %eax, %eax
setne %bpl
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x47c00
addq $0x8, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4a10f
leaq 0x9dfbf(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm1
movapd 0x5a43b(%rip), %xmm2    # 0xa2020
xorpd %xmm1, %xmm2
cmplepd %xmm0, %xmm2
cmplepd %xmm1, %xmm0
andpd %xmm2, %xmm0
movd %xmm0, %eax
andl $0x1, %eax
jmp 0x47c02
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x479a7
xorl %ebp, %ebp
testl %eax, %eax
je 0x47f69
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 0x28348
testl %r15d, %r15d
je 0x47f69
movq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x47c1f
testl %eax, %eax
je 0x47f69
xorl %ecx, %ecx
movq %rcx, %r15
cmpq $0x2, %rcx
je 0x47f5f
movq 0x10(%rbx,%r15,8), %rsi
movq %r14, %rdi
callq 0x47c1f
leaq 0x1(%r15), %rcx
testl %eax, %eax
jne 0x47f41
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 0x28348
movq %rbx, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x48163
movq %rsi, %r15
movq %rdi, %r14
addq $0x28, %rdi
callq 0x4a10f
leaq 0x9da70(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm1
movapd 0x59eec(%rip), %xmm2    # 0xa2020
xorpd %xmm1, %xmm2
ucomisd %xmm2, %xmm0
jb 0x48163
ucomisd %xmm0, %xmm1
jb 0x48163
leaq 0x8(%r14), %rdi
movq %r15, %rsi
callq 0x49ed3
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_O1/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 0x4c416
testl %eax, %eax
je 0x484d7
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x3ba8a
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4a10f
leaq 0x9d6d8(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm1
xorpd 0x59b54(%rip), %xmm1    # 0xa2020
xorl %eax, %eax
ucomisd %xmm1, %xmm0
setae %al
jmp 0x484d9
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x48579
movl $0x1, %ebp
testl %eax, %eax
jne 0x4856c
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x4a10f
leaq 0x9d683(%rip), %r15     # 0xe5b98
movsd (%r15), %xmm1
xorpd 0x59afe(%rip), %xmm1    # 0xa2020
xorl %ebp, %ebp
ucomisd %xmm1, %xmm0
jb 0x4856c
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x4a10f
movsd (%r15), %xmm1
xorpd 0x59add(%rip), %xmm1    # 0xa2020
ucomisd %xmm1, %xmm0
jb 0x4856c
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0x4a10f
movsd (%r15), %xmm1
xorpd 0x59abe(%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