LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: 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:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movq %rcx, 0x20(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rdi
callq 0x81b20
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq 0x28(%rsp), %rdx
leaq 0x18(%rsp), %rcx
callq 0x81ed0
movl %eax, %ecx
movl %ecx, 0x14(%rsp)
testl %eax, %eax
je 0x7eea8
jmp 0x7ee8f
movl 0x14(%rsp), %eax
subl $0x1, %eax
je 0x7eec2
jmp 0x7ee9a
movl 0x14(%rsp), %eax
addl $-0x3, %eax
subl $0x2, %eax
jb 0x7eeb5
jmp 0x7ef1f
movl $0x0, 0x44(%rsp)
jmp 0x7ef43
movl $0x4, 0x44(%rsp)
jmp 0x7ef43
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rsp)
movq 0x38(%rsp), %rdi
callq 0x37a50
movaps %xmm0, %xmm1
movsd (%rsp), %xmm0
leaq 0xf95fa(%rip), %rax     # 0x1784e0
movsd (%rax), %xmm2
callq 0x3c090
cmpl $0x0, %eax
je 0x7eefe
movl $0x0, 0x44(%rsp)
jmp 0x7ef43
cmpq $0x0, 0x20(%rsp)
je 0x7ef15
movsd 0x18(%rsp), %xmm0
movq 0x20(%rsp), %rax
movsd %xmm0, (%rax)
movl $0x1, 0x44(%rsp)
jmp 0x7ef43
leaq 0xb6a4e(%rip), %rdi     # 0x135974
movb $0x0, %al
callq 0xd4e20
leaq 0xb6a55(%rip), %rdi     # 0x135989
movb $0x0, %al
callq 0xd4e20
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopl (%rax)
// File: 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:
subq $0x88, %rsp
movq %rdi, 0x78(%rsp)
movq %rsi, 0x70(%rsp)
movq %rdx, 0x68(%rsp)
movq %rcx, 0x60(%rsp)
movq 0x78(%rsp), %rsi
leaq 0x10(%rsp), %rdi
callq 0x6d450
movl $0x0, 0xc(%rsp)
cmpl $0x2, 0xc(%rsp)
jge 0x7efef
movl $0x0, 0x8(%rsp)
cmpl $0x3, 0x8(%rsp)
jge 0x7efe0
movq 0x70(%rsp), %rdi
movl 0xc(%rsp), %esi
movl 0x8(%rsp), %edx
callq 0x81f10
movq %rax, %rdi
callq 0x78920
movq %rax, %rsi
leaq 0x10(%rsp), %rdi
callq 0x6dd30
cmpl $0x0, %eax
jne 0x7efd1
movl $0x0, 0x84(%rsp)
jmp 0x7f049
jmp 0x7efd3
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x7ef91
jmp 0x7efe2
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x7ef82
cmpq $0x0, 0x68(%rsp)
je 0x7f00e
leaq 0x10(%rsp), %rdi
callq 0x39250
movq %rax, %rsi
movq 0x68(%rsp), %rdi
callq 0x6f1e0
cmpq $0x0, 0x60(%rsp)
je 0x7f03e
movq 0x78(%rsp), %rax
movq %rax, (%rsp)
leaq 0x10(%rsp), %rdi
callq 0x39250
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x6d920
movq 0x60(%rsp), %rax
movsd %xmm0, (%rax)
movl $0x4, 0x84(%rsp)
movl 0x84(%rsp), %eax
addq $0x88, %rsp
retq
nopl (%rax,%rax)
// File: 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:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movq %rcx, 0x20(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rdi
callq 0x81b20
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq 0x28(%rsp), %rdx
xorl %eax, %eax
movl %eax, %ecx
leaq 0x18(%rsp), %r8
callq 0x4c6e0
movl %eax, %ecx
movl %ecx, 0x14(%rsp)
testl %eax, %eax
je 0x7f0cc
jmp 0x7f0b3
movl 0x14(%rsp), %eax
subl $0x1, %eax
je 0x7f0e6
jmp 0x7f0be
movl 0x14(%rsp), %eax
addl $-0x3, %eax
subl $0x2, %eax
jb 0x7f0d9
jmp 0x7f143
movl $0x0, 0x44(%rsp)
jmp 0x7f167
movl $0x4, 0x44(%rsp)
jmp 0x7f167
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rsp)
movq 0x38(%rsp), %rdi
callq 0x37a50
movaps %xmm0, %xmm1
movsd (%rsp), %xmm0
leaq 0xf93d6(%rip), %rax     # 0x1784e0
movsd (%rax), %xmm2
callq 0x3c090
cmpl $0x0, %eax
je 0x7f122
movl $0x0, 0x44(%rsp)
jmp 0x7f167
cmpq $0x0, 0x20(%rsp)
je 0x7f139
movsd 0x18(%rsp), %xmm0
movq 0x20(%rsp), %rax
movsd %xmm0, (%rax)
movl $0x1, 0x44(%rsp)
jmp 0x7f167
leaq 0xb682a(%rip), %rdi     # 0x135974
movb $0x0, %al
callq 0xd4e20
leaq 0xb6831(%rip), %rdi     # 0x135989
movb $0x0, %al
callq 0xd4e20
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
// File: 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:
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movq %rsi, 0x50(%rsp)
movq 0x58(%rsp), %rdi
callq 0x13e60
movq %rax, %rdi
callq 0x701d0
movl %eax, 0x4c(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x50(%rsp), %rsi
movl 0x4c(%rsp), %edx
leaq 0x30(%rsp), %rdi
callq 0x42e40
movq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x86f90
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x7f946
movl $0x0, 0x64(%rsp)
jmp 0x7f993
movq 0x58(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x50(%rsp), %rsi
movl 0x4c(%rsp), %edx
xorl $-0x1, %edx
andl $0x7, %edx
leaq 0x18(%rsp), %rdi
callq 0x42e40
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x86f90
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x7f98b
movl $0x0, 0x64(%rsp)
jmp 0x7f993
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
movl 0x64(%rsp), %eax
addq $0x68, %rsp
retq
nopl (%rax)
// File: 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:
subq $0x278, %rsp            # imm = 0x278
movq %rdi, 0x268(%rsp)
movq %rsi, 0x260(%rsp)
movq 0x260(%rsp), %rdi
callq 0x3c180
cmpl $0x0, %eax
je 0x7f9d9
movl $0x0, 0x274(%rsp)
jmp 0x7fbc9
movq 0x268(%rsp), %rsi
leaq 0x240(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0x6c140
movq 0x260(%rsp), %rdi
callq 0x81bb0
movq %rax, %rsi
leaq 0xb0(%rsp), %rdi
movq %rdi, 0x50(%rsp)
callq 0x4e590
movq 0x50(%rsp), %rsi
leaq 0x130(%rsp), %rdi
movq %rdi, 0x60(%rsp)
xorl %edx, %edx
callq 0x4d390
movq 0x58(%rsp), %rdi
movq 0x60(%rsp), %rsi
callq 0x6d210
jmp 0x7fa3f
movq 0x260(%rsp), %rdi
xorl %esi, %esi
callq 0x3c1d0
movsd %xmm0, 0x48(%rsp)
jmp 0x7fa56
movsd 0x48(%rsp), %xmm0
movaps 0xb35cd(%rip), %xmm1    # 0x133030
pxor %xmm1, %xmm0
movsd %xmm0, 0x38(%rsp)
movq 0x260(%rsp), %rdi
movl $0x1, %esi
callq 0x3c1d0
movsd %xmm0, 0x40(%rsp)
jmp 0x7fa87
movsd 0x40(%rsp), %xmm0
movaps 0xb359c(%rip), %xmm1    # 0x133030
pxor %xmm1, %xmm0
movsd %xmm0, 0x28(%rsp)
movq 0x260(%rsp), %rdi
movl $0x2, %esi
callq 0x3c1d0
movsd %xmm0, 0x30(%rsp)
jmp 0x7fab8
movsd 0x30(%rsp), %xmm0
movaps 0xb356b(%rip), %xmm1    # 0x133030
pxor %xmm1, %xmm0
movsd %xmm0, 0x18(%rsp)
movq 0x260(%rsp), %rdi
xorl %esi, %esi
callq 0x3c1d0
movsd %xmm0, 0x20(%rsp)
jmp 0x7fae6
movq 0x260(%rsp), %rdi
movl $0x1, %esi
callq 0x3c1d0
movsd %xmm0, 0x10(%rsp)
jmp 0x7fb00
movq 0x260(%rsp), %rdi
movl $0x2, %esi
callq 0x3c1d0
movsd %xmm0, 0x8(%rsp)
jmp 0x7fb1a
movsd 0x8(%rsp), %xmm5
movsd 0x10(%rsp), %xmm4
movsd 0x20(%rsp), %xmm3
movsd 0x18(%rsp), %xmm2
movsd 0x28(%rsp), %xmm1
movsd 0x38(%rsp), %xmm0
leaq 0x68(%rsp), %rdi
callq 0x429c0
jmp 0x7fb4a
leaq 0x240(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x7f8e0
movl %eax, 0x4(%rsp)
jmp 0x7fb62
movl 0x4(%rsp), %eax
movl %eax, 0x274(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x36a80
leaq 0x130(%rsp), %rdi
callq 0x4d430
jmp 0x7fbc9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
jmp 0x7fbba
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x36a80
leaq 0x130(%rsp), %rdi
callq 0x4d430
jmp 0x7fbd8
movl 0x274(%rsp), %eax
addq $0x278, %rsp            # imm = 0x278
retq
movq 0xa8(%rsp), %rdi
callq 0xf890
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
callq 0x42710
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x3a820
movsd %xmm0, 0x18(%rsp)
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x20(%rsp), %rdi
callq 0x39f50
movaps %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
leaq 0xf8895(%rip), %rax     # 0x1784e0
movsd (%rax), %xmm2
callq 0x3c090
cmpl $0x0, %eax
je 0x7fc63
movl $0x0, 0x34(%rsp)
jmp 0x7fca7
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rsp)
movq 0x20(%rsp), %rdi
callq 0x39f50
movaps %xmm0, %xmm1
movsd (%rsp), %xmm0
leaq 0xf8859(%rip), %rax     # 0x1784e0
movsd (%rax), %xmm2
callq 0x37170
cmpl $0x0, %eax
je 0x7fc9f
movl $0x1, 0x34(%rsp)
jmp 0x7fca7
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
// File: 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:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
cmpl $0x2, 0xc(%rsp)
jge 0x7fd28
movl $0x0, 0x8(%rsp)
cmpl $0x3, 0x8(%rsp)
jge 0x7fd19
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %esi
movl 0x8(%rsp), %edx
callq 0x81f10
movq %rax, %rdi
movq 0x18(%rsp), %rsi
callq 0x81fc0
cmpl $0x0, %eax
jne 0x7fd0a
movl $0x0, 0x24(%rsp)
jmp 0x7fd30
jmp 0x7fd0c
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x7fcd5
jmp 0x7fd1b
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x7fcc6
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: 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:
subq $0x298, %rsp            # imm = 0x298
movq %rdi, 0x290(%rsp)
movq %rsi, 0x288(%rsp)
movq %rdx, 0x280(%rsp)
movq 0x288(%rsp), %rdi
callq 0x39f70
movq %rax, %rsi
leaq 0xf0(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x4e500
movq 0x8(%rsp), %rsi
leaq 0x170(%rsp), %rdi
xorl %edx, %edx
callq 0x4d390
movq 0x290(%rsp), %rsi
leaq 0xd0(%rsp), %rdi
callq 0x6c140
jmp 0x7fddc
leaq 0xd0(%rsp), %rdi
leaq 0x170(%rsp), %rsi
callq 0x6d270
jmp 0x7fdf3
leaq 0xf8c66(%rip), %rsi     # 0x178a60
leaq 0x4fb097(%rip), %rdx    # 0x57ae98
leaq 0x10(%rsp), %rdi
callq 0x95570
jmp 0x7fe0d
leaq 0xb34aa(%rip), %rdi     # 0x1332be
xorl %eax, %eax
callq 0xd4e20
jmp 0x7fe1d
leaq 0x10(%rsp), %rdi
callq 0x81ff0
leaq 0x170(%rsp), %rdi
callq 0x4d430
xorl %eax, %eax
addq $0x298, %rsp            # imm = 0x298
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc8(%rsp)
movl %eax, 0xc4(%rsp)
jmp 0x7fe72
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc8(%rsp)
movl %eax, 0xc4(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x81ff0
leaq 0x170(%rsp), %rdi
callq 0x4d430
movq 0xc8(%rsp), %rdi
callq 0xf890
nopl (%rax)
// File: 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:
subq $0x78, %rsp
movq %rdi, 0x68(%rsp)
movq %rsi, 0x60(%rsp)
movq 0x68(%rsp), %rdi
callq 0x78920
movq %rax, 0x30(%rsp)
movq 0x60(%rsp), %rdi
callq 0x81cb0
movq 0x30(%rsp), %rdi
movq %rax, %rsi
callq 0x86f90
movsd %xmm0, 0x58(%rsp)
movsd 0x58(%rsp), %xmm0
leaq 0xf8529(%rip), %rax     # 0x1784e0
movsd (%rax), %xmm1
callq 0x3a5d0
cmpl $0x0, %eax
je 0x7ffd2
movl $0xffffffff, 0x74(%rsp) # imm = 0xFFFFFFFF
jmp 0x8011f
movsd 0x58(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
movq 0x60(%rsp), %rdi
callq 0x3c2e0
movaps %xmm0, %xmm1
movsd 0x28(%rsp), %xmm0
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
leaq 0xf84d1(%rip), %rax     # 0x1784e0
movsd (%rax), %xmm2
callq 0x39630
cmpl $0x0, %eax
je 0x8002a
movl $0x0, 0x74(%rsp)
jmp 0x8011f
movq 0x68(%rsp), %rdi
callq 0x78920
movq %rax, %rdi
callq 0x13e60
movq %rax, 0x20(%rsp)
movq 0x60(%rsp), %rdi
callq 0x78a80
movq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x702c0
movsd %xmm0, 0x50(%rsp)
xorps %xmm0, %xmm0
ucomisd 0x50(%rsp), %xmm0
jbe 0x800ac
movq 0x68(%rsp), %rdi
callq 0x78920
movq %rax, %rdi
callq 0x13e60
movq %rax, 0x18(%rsp)
movq 0x60(%rsp), %rdi
callq 0x78a80
movq %rax, %rsi
leaq 0x38(%rsp), %rdi
callq 0x70fa0
movq 0x18(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x702c0
movsd %xmm0, 0x50(%rsp)
movsd 0x58(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x50(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x60(%rsp), %rdi
callq 0x3c2e0
movsd 0x8(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x10(%rsp), %xmm0
mulsd %xmm2, %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
leaq 0xf83e1(%rip), %rax     # 0x1784e0
movsd (%rax), %xmm2
callq 0x81b80
cmpl $0x0, %eax
je 0x80117
movl $0xffffffff, 0x74(%rsp) # imm = 0xFFFFFFFF
jmp 0x8011f
movl $0x0, 0x74(%rsp)
movl 0x74(%rsp), %eax
addq $0x78, %rsp
retq
nopl (%rax,%rax)
// File: 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:
subq $0x278, %rsp            # imm = 0x278
movq %rdi, 0x268(%rsp)
movq %rsi, 0x260(%rsp)
movq 0x260(%rsp), %rdi
callq 0x3c180
cmpl $0x0, %eax
je 0x801e9
movl $0x0, 0x274(%rsp)
jmp 0x803d9
movq 0x268(%rsp), %rsi
leaq 0x240(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0xa1470
movq 0x260(%rsp), %rdi
callq 0x81bb0
movq %rax, %rsi
leaq 0xb0(%rsp), %rdi
movq %rdi, 0x50(%rsp)
callq 0x4e590
movq 0x50(%rsp), %rsi
leaq 0x130(%rsp), %rdi
movq %rdi, 0x60(%rsp)
xorl %edx, %edx
callq 0x4d390
movq 0x58(%rsp), %rdi
movq 0x60(%rsp), %rsi
callq 0xa1690
jmp 0x8024f
movq 0x260(%rsp), %rdi
xorl %esi, %esi
callq 0x3c1d0
movsd %xmm0, 0x48(%rsp)
jmp 0x80266
movsd 0x48(%rsp), %xmm0
movaps 0xb2dbd(%rip), %xmm1    # 0x133030
pxor %xmm1, %xmm0
movsd %xmm0, 0x38(%rsp)
movq 0x260(%rsp), %rdi
movl $0x1, %esi
callq 0x3c1d0
movsd %xmm0, 0x40(%rsp)
jmp 0x80297
movsd 0x40(%rsp), %xmm0
movaps 0xb2d8c(%rip), %xmm1    # 0x133030
pxor %xmm1, %xmm0
movsd %xmm0, 0x28(%rsp)
movq 0x260(%rsp), %rdi
movl $0x2, %esi
callq 0x3c1d0
movsd %xmm0, 0x30(%rsp)
jmp 0x802c8
movsd 0x30(%rsp), %xmm0
movaps 0xb2d5b(%rip), %xmm1    # 0x133030
pxor %xmm1, %xmm0
movsd %xmm0, 0x18(%rsp)
movq 0x260(%rsp), %rdi
xorl %esi, %esi
callq 0x3c1d0
movsd %xmm0, 0x20(%rsp)
jmp 0x802f6
movq 0x260(%rsp), %rdi
movl $0x1, %esi
callq 0x3c1d0
movsd %xmm0, 0x10(%rsp)
jmp 0x80310
movq 0x260(%rsp), %rdi
movl $0x2, %esi
callq 0x3c1d0
movsd %xmm0, 0x8(%rsp)
jmp 0x8032a
movsd 0x8(%rsp), %xmm5
movsd 0x10(%rsp), %xmm4
movsd 0x20(%rsp), %xmm3
movsd 0x18(%rsp), %xmm2
movsd 0x28(%rsp), %xmm1
movsd 0x38(%rsp), %xmm0
leaq 0x68(%rsp), %rdi
callq 0x429c0
jmp 0x8035a
leaq 0x240(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x80130
movl %eax, 0x4(%rsp)
jmp 0x80372
movl 0x4(%rsp), %eax
movl %eax, 0x274(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x36a80
leaq 0x130(%rsp), %rdi
callq 0x4d430
jmp 0x803d9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
jmp 0x803ca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x36a80
leaq 0x130(%rsp), %rdi
callq 0x4d430
jmp 0x803e8
movl 0x274(%rsp), %eax
addq $0x278, %rsp            # imm = 0x278
retq
movq 0xa8(%rsp), %rdi
callq 0xf890
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rdi
callq 0x78920
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
callq 0x42710
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x86f90
movsd %xmm0, 0x18(%rsp)
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x20(%rsp), %rdi
callq 0x39f50
movaps %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
leaq 0xf8069(%rip), %rax     # 0x1784e0
movsd (%rax), %xmm2
callq 0x39630
cmpl $0x0, %eax
je 0x8048f
movl $0x0, 0x34(%rsp)
jmp 0x804ea
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rsp)
movq 0x20(%rsp), %rdi
callq 0x39f50
movaps %xmm0, %xmm1
movsd (%rsp), %xmm0
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
leaq 0xf8016(%rip), %rax     # 0x1784e0
movsd (%rax), %xmm2
callq 0x37170
cmpl $0x0, %eax
je 0x804e2
movl $0x1, 0x34(%rsp)
jmp 0x804ea
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
cmpl $0x2, 0xc(%rsp)
jge 0x80678
movl $0x0, 0x8(%rsp)
cmpl $0x3, 0x8(%rsp)
jge 0x80669
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %esi
movl 0x8(%rsp), %edx
callq 0x81f10
movq %rax, %rdi
movq 0x18(%rsp), %rsi
callq 0x7fee0
cmpl $0x0, %eax
jne 0x8065a
movl $0x0, 0x24(%rsp)
jmp 0x80680
jmp 0x8065c
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x80625
jmp 0x8066b
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x80616
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: 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:
subq $0x88, %rsp
movq %rdi, 0x78(%rsp)
movq %rsi, 0x70(%rsp)
movq 0x78(%rsp), %rdi
callq 0x44d80
cmpl $0x0, %eax
je 0x812b0
movl $0x0, 0x84(%rsp)
jmp 0x81375
movq 0x70(%rsp), %rdi
callq 0x3c180
cmpl $0x0, %eax
je 0x812cf
movl $0x0, 0x84(%rsp)
jmp 0x81375
movl $0x0, 0x6c(%rsp)
cmpl $0x2, 0x6c(%rsp)
jge 0x8136a
movl $0x0, 0x68(%rsp)
cmpl $0x3, 0x68(%rsp)
jge 0x81358
movq 0x70(%rsp), %rsi
movl 0x6c(%rsp), %edx
movl 0x68(%rsp), %ecx
leaq 0x8(%rsp), %rdi
callq 0x9f970
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x38f60
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
xorl %edx, %edx
callq 0xa1630
movq 0x78(%rsp), %rsi
leaq 0x48(%rsp), %rdi
callq 0x80130
cmpl $0x0, %eax
jne 0x81349
movl $0x0, 0x84(%rsp)
jmp 0x81375
jmp 0x8134b
movl 0x68(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x68(%rsp)
jmp 0x812ea
jmp 0x8135a
movl 0x6c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
jmp 0x812d7
movl $0xffffffff, 0x84(%rsp) # imm = 0xFFFFFFFF
movl 0x84(%rsp), %eax
addq $0x88, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
cmpl $0x2, 0xc(%rsp)
jge 0x81448
movl $0x0, 0x8(%rsp)
cmpl $0x3, 0x8(%rsp)
jge 0x81439
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %esi
movl 0x8(%rsp), %edx
callq 0x81f10
movq %rax, %rdi
movq 0x18(%rsp), %rsi
callq 0x80130
cmpl $0x0, %eax
jne 0x8142a
movl $0x0, 0x24(%rsp)
jmp 0x81450
jmp 0x8142c
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x813f5
jmp 0x8143b
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x813e6
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Isect.cpp
// Function: gaps::R3Intersects(gaps::R3OrientedBox const&, gaps::R3OrientedBox const&)
RNClassID R3Intersects(const R3OrientedBox& 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:
subq $0x88, %rsp
movq %rdi, 0x78(%rsp)
movq %rsi, 0x70(%rsp)
movq 0x78(%rsp), %rdi
callq 0x3c180
cmpl $0x0, %eax
je 0x814c0
movl $0x0, 0x84(%rsp)
jmp 0x81585
movq 0x70(%rsp), %rdi
callq 0x3c180
cmpl $0x0, %eax
je 0x814df
movl $0x0, 0x84(%rsp)
jmp 0x81585
movl $0x0, 0x6c(%rsp)
cmpl $0x2, 0x6c(%rsp)
jge 0x8157a
movl $0x0, 0x68(%rsp)
cmpl $0x3, 0x68(%rsp)
jge 0x81568
movq 0x70(%rsp), %rsi
movl 0x6c(%rsp), %edx
movl 0x68(%rsp), %ecx
leaq 0x8(%rsp), %rdi
callq 0x9f970
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x38f60
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
xorl %edx, %edx
callq 0xa1630
movq 0x78(%rsp), %rsi
leaq 0x48(%rsp), %rdi
callq 0x801b0
cmpl $0x0, %eax
jne 0x81559
movl $0x0, 0x84(%rsp)
jmp 0x81585
jmp 0x8155b
movl 0x68(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x68(%rsp)
jmp 0x814fa
jmp 0x8156a
movl 0x6c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
jmp 0x814e7
movl $0xffffffff, 0x84(%rsp) # imm = 0xFFFFFFFF
movl 0x84(%rsp), %eax
addq $0x88, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Isect.cpp
// Function: gaps::R3Intersects(gaps::R3OrientedBox const&, gaps::R3Sphere const&)
RNClassID R3Intersects(const R3OrientedBox& box, const R3Sphere& sphere)
{
    // Check if box is empty
    if (box.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(-box.Plane(dir, dim), 0);
        if (!R3Intersects(halfspace, sphere)) {
          return RN_NULL_CLASS_ID;
        }
      }
    }

    // Passed all tests
    return RN_UNKNOWN_CLASS_ID;
}

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x78(%rsp)
movq %rsi, 0x70(%rsp)
movq 0x78(%rsp), %rdi
callq 0x3c180
cmpl $0x0, %eax
je 0x815d0
movl $0x0, 0x84(%rsp)
jmp 0x81676
movl $0x0, 0x6c(%rsp)
cmpl $0x2, 0x6c(%rsp)
jge 0x8166b
movl $0x0, 0x68(%rsp)
cmpl $0x3, 0x68(%rsp)
jge 0x81659
movq 0x78(%rsp), %rsi
movl 0x6c(%rsp), %edx
movl 0x68(%rsp), %ecx
leaq 0x8(%rsp), %rdi
callq 0x9f970
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x38f60
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
xorl %edx, %edx
callq 0xa1630
movq 0x70(%rsp), %rsi
leaq 0x48(%rsp), %rdi
callq 0x80400
cmpl $0x0, %eax
jne 0x8164a
movl $0x0, 0x84(%rsp)
jmp 0x81676
jmp 0x8164c
movl 0x68(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x68(%rsp)
jmp 0x815eb
jmp 0x8165b
movl 0x6c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
jmp 0x815d8
movl $0xffffffff, 0x84(%rsp) # imm = 0xFFFFFFFF
movl 0x84(%rsp), %eax
addq $0x88, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
cmpl $0x2, 0xc(%rsp)
jge 0x81708
movl $0x0, 0x8(%rsp)
cmpl $0x3, 0x8(%rsp)
jge 0x816f9
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %esi
movl 0x8(%rsp), %edx
callq 0x81f10
movq %rax, %rdi
movq 0x18(%rsp), %rsi
callq 0x801b0
cmpl $0x0, %eax
jne 0x816ea
movl $0x0, 0x24(%rsp)
jmp 0x81710
jmp 0x816ec
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x816b5
jmp 0x816fb
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x816a6
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Isect.cpp
// Function: gaps::R3Intersects(gaps::R3OrientedBox const&, gaps::R3Shape const&)
RNClassID R3Intersects(const R3OrientedBox& box, const R3Shape& shape)
{
    // Check if box is empty
    if (box.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(-box.Plane(dir, dim), 0);
        if (!R3Intersects(halfspace, shape)) {
          return RN_NULL_CLASS_ID;
        }
      }
    }

    // Passed all tests
    return RN_UNKNOWN_CLASS_ID;
}

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x78(%rsp)
movq %rsi, 0x70(%rsp)
movq 0x78(%rsp), %rdi
callq 0x3c180
cmpl $0x0, %eax
je 0x81750
movl $0x0, 0x84(%rsp)
jmp 0x817f6
movl $0x0, 0x6c(%rsp)
cmpl $0x2, 0x6c(%rsp)
jge 0x817eb
movl $0x0, 0x68(%rsp)
cmpl $0x3, 0x68(%rsp)
jge 0x817d9
movq 0x78(%rsp), %rsi
movl 0x6c(%rsp), %edx
movl 0x68(%rsp), %ecx
leaq 0x8(%rsp), %rdi
callq 0x9f970
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x38f60
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
xorl %edx, %edx
callq 0xa1630
movq 0x70(%rsp), %rsi
leaq 0x48(%rsp), %rdi
callq 0x80690
cmpl $0x0, %eax
jne 0x817ca
movl $0x0, 0x84(%rsp)
jmp 0x817f6
jmp 0x817cc
movl 0x68(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x68(%rsp)
jmp 0x8176b
jmp 0x817db
movl 0x6c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
jmp 0x81758
movl $0xffffffff, 0x84(%rsp) # imm = 0xFFFFFFFF
movl 0x84(%rsp), %eax
addq $0x88, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x88, %rsp
movq %rdi, 0x78(%rsp)
movq %rsi, 0x70(%rsp)
movq 0x78(%rsp), %rdi
callq 0x42710
movq %rax, 0x8(%rsp)
movq 0x70(%rsp), %rdi
callq 0x42710
movq 0x8(%rsp), %rsi
movq %rax, %rdx
leaq 0x58(%rsp), %rdi
callq 0x6eeb0
leaq 0x58(%rsp), %rdi
callq 0x38c20
movsd %xmm0, 0x20(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x38c20
movsd %xmm0, 0x18(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x38c30
movsd %xmm0, 0x10(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x38c30
movsd 0x10(%rsp), %xmm1
movsd 0x18(%rsp), %xmm2
movaps %xmm0, %xmm3
movsd 0x20(%rsp), %xmm0
mulsd %xmm3, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x28(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x38c40
movsd %xmm0, 0x30(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x38c40
movsd 0x28(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x30(%rsp), %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x50(%rsp)
movq 0x78(%rsp), %rdi
callq 0x39f50
movsd %xmm0, 0x38(%rsp)
movq 0x70(%rsp), %rdi
callq 0x39f50
movaps %xmm0, %xmm1
movsd 0x38(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x48(%rsp)
movsd 0x48(%rsp), %xmm0
mulsd 0x48(%rsp), %xmm0
movsd %xmm0, 0x40(%rsp)
movsd 0x50(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
leaq 0xf6baa(%rip), %rax     # 0x1784e0
movsd (%rax), %xmm2
callq 0x3c090
cmpl $0x0, %eax
je 0x81951
movl $0x0, 0x84(%rsp)
jmp 0x8198a
movsd 0x50(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
leaq 0xf6b7c(%rip), %rax     # 0x1784e0
movsd (%rax), %xmm2
callq 0x37170
cmpl $0x0, %eax
je 0x8197f
movl $0x1, 0x84(%rsp)
jmp 0x8198a
movl $0xffffffff, 0x84(%rsp) # imm = 0xFFFFFFFF
movl 0x84(%rsp), %eax
addq $0x88, %rsp
retq
nopl (%rax)
// File: 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:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
cmpl $0x2, 0xc(%rsp)
jge 0x81a18
movl $0x0, 0x8(%rsp)
cmpl $0x3, 0x8(%rsp)
jge 0x81a09
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %esi
movl 0x8(%rsp), %edx
callq 0x81f10
movq %rax, %rdi
movq 0x18(%rsp), %rsi
callq 0x80400
cmpl $0x0, %eax
jne 0x819fa
movl $0x0, 0x24(%rsp)
jmp 0x81a20
jmp 0x819fc
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x819c5
jmp 0x81a0b
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x819b6
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: 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:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
cmpl $0x2, 0xc(%rsp)
jge 0x81ad8
movl $0x0, 0x8(%rsp)
cmpl $0x3, 0x8(%rsp)
jge 0x81ac9
movq 0x18(%rsp), %rdi
movl 0xc(%rsp), %esi
movl 0x8(%rsp), %edx
callq 0x81f10
movq %rax, %rdi
movq 0x10(%rsp), %rsi
callq 0x80690
cmpl $0x0, %eax
jne 0x81aba
movl $0x0, 0x24(%rsp)
jmp 0x81ae0
jmp 0x81abc
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x81a85
jmp 0x81acb
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x81a76
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Cont.cpp
// Function: gaps::R3Contains(gaps::R3Vector const&, gaps::R3Vector const&)
RNBoolean R3Contains(const R3Vector& vector1, const R3Vector& vector2)
{
    // Return whether vector1 and vector2 are equal within tolerance
    return (RNIsEqual(vector1.X(), vector2.X()) &&
            RNIsEqual(vector1.Y(), vector2.Y()) &&
            RNIsEqual(vector1.Z(), vector2.Z()));
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x30(%rsp), %rdi
callq 0x38c20
movsd %xmm0, 0x18(%rsp)
movq 0x28(%rsp), %rdi
callq 0x38c20
movaps %xmm0, %xmm1
movsd 0x18(%rsp), %xmm0
leaq 0xf6408(%rip), %rax     # 0x1784e0
movsd (%rax), %xmm2
callq 0x37170
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0x27(%rsp)
je 0x8216b
movq 0x30(%rsp), %rdi
callq 0x38c30
movsd %xmm0, 0x10(%rsp)
movq 0x28(%rsp), %rdi
callq 0x38c30
movaps %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
leaq 0xf63c8(%rip), %rax     # 0x1784e0
movsd (%rax), %xmm2
callq 0x37170
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0x27(%rsp)
je 0x8216b
movq 0x30(%rsp), %rdi
callq 0x38c40
movsd %xmm0, 0x8(%rsp)
movq 0x28(%rsp), %rdi
callq 0x38c40
movaps %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
leaq 0xf6388(%rip), %rax     # 0x1784e0
movsd (%rax), %xmm2
callq 0x37170
cmpl $0x0, %eax
setne %al
movb %al, 0x27(%rsp)
movb 0x27(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
addq $0x38, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Cont.cpp
// Function: gaps::R3Contains(gaps::R3Point const&, gaps::R3Point const&)
RNBoolean R3Contains(const R3Point& point1, const R3Point& point2)
{
    // Return whether point1 and point2 are equal to within tolerance
    return (RNIsEqual(point1.X(), point2.X()) &&
            RNIsEqual(point1.Y(), point2.Y()) &&
            RNIsEqual(point1.Z(), point2.Z()));
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x30(%rsp), %rdi
callq 0x37820
movsd %xmm0, 0x18(%rsp)
movq 0x28(%rsp), %rdi
callq 0x37820
movaps %xmm0, %xmm1
movsd 0x18(%rsp), %xmm0
leaq 0xf6328(%rip), %rax     # 0x1784e0
movsd (%rax), %xmm2
callq 0x37170
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0x27(%rsp)
je 0x8224b
movq 0x30(%rsp), %rdi
callq 0x37870
movsd %xmm0, 0x10(%rsp)
movq 0x28(%rsp), %rdi
callq 0x37870
movaps %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
leaq 0xf62e8(%rip), %rax     # 0x1784e0
movsd (%rax), %xmm2
callq 0x37170
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0x27(%rsp)
je 0x8224b
movq 0x30(%rsp), %rdi
callq 0x378c0
movsd %xmm0, 0x8(%rsp)
movq 0x28(%rsp), %rdi
callq 0x378c0
movaps %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
leaq 0xf62a8(%rip), %rax     # 0x1784e0
movsd (%rax), %xmm2
callq 0x37170
cmpl $0x0, %eax
setne %al
movb %al, 0x27(%rsp)
movb 0x27(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
addq $0x38, %rsp
retq
nopl (%rax)
// File: 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:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq 0x40(%rsp), %rdi
callq 0x86a00
movq %rax, 0x38(%rsp)
movq 0x40(%rsp), %rdi
callq 0x86a10
movq %rax, 0x30(%rsp)
movq 0x40(%rsp), %rdi
callq 0x86a20
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x38(%rsp)
je 0x82353
cmpq $0x0, 0x30(%rsp)
je 0x82353
cmpq $0x0, 0x28(%rsp)
jne 0x82360
movl $0x0, 0x54(%rsp)
jmp 0x823f4
movq 0x48(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x38(%rsp), %rdi
callq 0x78950
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0x82180
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0x27(%rsp)
je 0x823e7
movq 0x48(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rdi
callq 0x78950
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x82180
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0x27(%rsp)
je 0x823e7
movq 0x48(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rdi
callq 0x78950
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x82180
cmpl $0x0, %eax
setne %al
movb %al, 0x27(%rsp)
movb 0x27(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Cont.cpp
// Function: gaps::R3Contains(gaps::R3Point const&, gaps::R3Box 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:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x44d80
cmpl $0x0, %eax
je 0x825d7
movl $0x0, 0x24(%rsp)
jmp 0x82629
movq 0x10(%rsp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
cmpl $0x0, %eax
jne 0x825f1
movl $0x0, 0x24(%rsp)
jmp 0x82629
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x81b40
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x82180
cmpl $0x0, %eax
jne 0x82621
movl $0x0, 0x24(%rsp)
jmp 0x82629
movl $0x1, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Cont.cpp
// Function: gaps::R3Contains(gaps::R3Point const&, gaps::R3OrientedBox const&)
RNBoolean R3Contains(const R3Point& point, const R3OrientedBox& box)
{
    // Return whether point contains box
    if (box.IsEmpty()) return FALSE;
    if (!box.IsPoint()) return FALSE;
    if (!R3Contains(point, box.Center())) return FALSE;
    return TRUE;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x3c180
cmpl $0x0, %eax
je 0x82667
movl $0x0, 0x24(%rsp)
jmp 0x826b9
movq 0x10(%rsp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
cmpl $0x0, %eax
jne 0x82681
movl $0x0, 0x24(%rsp)
jmp 0x826b9
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x3c1b0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x82180
cmpl $0x0, %eax
jne 0x826b1
movl $0x0, 0x24(%rsp)
jmp 0x826b9
movl $0x1, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Cont.cpp
// Function: gaps::R3Contains(gaps::R3Line const&, gaps::R3Box const&)
RNBoolean R3Contains(const R3Line& line, const R3Box& box)
{
    // Return whether line contains box 
    if (box.IsEmpty()) return FALSE;
    if (!box.IsLinear()) return FALSE;
    if (!R3Contains(line, box.Min())) return FALSE;
    if (!R3Contains(line, box.Max())) return FALSE;
    return TRUE;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x44d80
cmpl $0x0, %eax
je 0x8296a
movl $0x0, 0x24(%rsp)
jmp 0x829ea
movq 0x10(%rsp), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
cmpl $0x0, %eax
jne 0x82984
movl $0x0, 0x24(%rsp)
jmp 0x829ea
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x81b40
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x82770
cmpl $0x0, %eax
jne 0x829b4
movl $0x0, 0x24(%rsp)
jmp 0x829ea
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rdi
callq 0x45060
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x82770
cmpl $0x0, %eax
jne 0x829e2
movl $0x0, 0x24(%rsp)
jmp 0x829ea
movl $0x1, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Cont.cpp
// Function: gaps::R3Contains(gaps::R3Line const&, gaps::R3OrientedBox const&)
RNBoolean R3Contains(const R3Line& line, const R3OrientedBox& box)
{
    // Return whether line contains box 
    if (box.IsEmpty()) return FALSE;
    if (!box.IsLinear()) return FALSE;
    for (int i = 0; i < RN_NUM_OCTANTS; i++) 
      if (!R3Contains(line, box.Corner(i))) return FALSE;
    return TRUE;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq 0x30(%rsp), %rdi
callq 0x3c180
cmpl $0x0, %eax
je 0x82a2a
movl $0x0, 0x44(%rsp)
jmp 0x82aae
movq 0x30(%rsp), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
cmpl $0x0, %eax
jne 0x82a44
movl $0x0, 0x44(%rsp)
jmp 0x82aae
movl $0x0, 0x2c(%rsp)
cmpl $0x8, 0x2c(%rsp)
jge 0x82aa6
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rsi
movl 0x2c(%rsp), %edx
leaq 0x10(%rsp), %rdi
callq 0x39cf0
movq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x82770
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x82a8d
jmp 0x82a97
movl $0x0, 0x44(%rsp)
jmp 0x82aae
jmp 0x82a99
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x82a4c
movl $0x1, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw (%rax,%rax)
// File: 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:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq 0x38(%rsp), %rdi
callq 0x81c00
movq %rax, %rdi
movq 0x30(%rsp), %rsi
callq 0x82940
cmpl $0x0, %eax
jne 0x82d24
movl $0x0, 0x44(%rsp)
jmp 0x82d8c
movq 0x38(%rsp), %rdi
callq 0x3c0e0
movq %rax, %rdi
callq 0x701d0
movl %eax, 0x2c(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rsi
movl 0x2c(%rsp), %edx
xorl $-0x1, %edx
andl $0x7, %edx
leaq 0x10(%rsp), %rdi
callq 0x42e40
movq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x82b60
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x82d7a
jmp 0x82d84
movl $0x0, 0x44(%rsp)
jmp 0x82d8c
movl $0x1, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Cont.cpp
// Function: gaps::R3Contains(gaps::R3Ray const&, gaps::R3OrientedBox const&)
RNBoolean R3Contains(const R3Ray& ray, const R3OrientedBox& box)
{
    // Return whether ray contains box
    if (box.IsEmpty()) return FALSE;
    if (!box.IsLinear()) return FALSE;
    for (int i = 0; i < RN_NUM_OCTANTS; i++) 
      if (!R3Contains(ray, box.Corner(i))) return FALSE;
    return TRUE;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq 0x30(%rsp), %rdi
callq 0x3c180
cmpl $0x0, %eax
je 0x82dca
movl $0x0, 0x44(%rsp)
jmp 0x82e4e
movq 0x30(%rsp), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
cmpl $0x0, %eax
jne 0x82de4
movl $0x0, 0x44(%rsp)
jmp 0x82e4e
movl $0x0, 0x2c(%rsp)
cmpl $0x8, 0x2c(%rsp)
jge 0x82e46
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rsi
movl 0x2c(%rsp), %edx
leaq 0x10(%rsp), %rdi
callq 0x39cf0
movq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x82b60
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x82e2d
jmp 0x82e37
movl $0x0, 0x44(%rsp)
jmp 0x82e4e
jmp 0x82e39
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x82dec
movl $0x1, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw (%rax,%rax)