anchor.diff:      integer(c_int), intent(out) :: num_intersections
       integer(c_int), intent(out) :: status
       ! Variables outside of signature.
  -    real(c_double), allocatable :: intersections_workspace(:, :)
       integer(c_int) :: num_candidates, num_next_candidates, index_, py_exc
       logical(c_bool) :: is_even
   
  
positive.code:   ! threads are used, this should be thread-local.
    type(CurveData), allocatable :: CANDIDATES_ODD(:, :)
    type(CurveData), allocatable :: CANDIDATES_EVEN(:, :)
  
  contains
  
  
negative.code:              status = ALL_INTERSECTIONS_TOO_SMALL
            else if (num_intersections > 0) then
               ! NOTE: This assumes, but doesn't check that
               !       ``INTERSECTIONS_WORKSPACE`` has been allocated
               !       and that is has 2 rows, just like ``intersections``.
               intersections(:, :num_intersections) = ( &
                    INTERSECTIONS_WORKSPACE(:, :num_intersections))
            end if
  
            return
  