anchor.diff:    contains
   
       subroutine partition_lomuto_int(arr, i_min, i_max, part)
  -      ! Lomuto partition scheme for quicksort
  -
  +      ! Duplication of partition_lomuto_dp in array_quicksort_dp, but for an
  +      ! integer array.
         integer, intent(inout) :: arr(:)
         integer, intent(in) :: i_min, i_max
         integer, intent(out) :: part
  
positive.code:   end subroutine array_reverse_dp
  
    subroutine array_reverse_int(arr)
      ! Reverse array
  
      integer, intent(inout) :: arr(:)
  
      integer :: i, j, n
  
negative.code:   end subroutine array_quicksort_int
  
    subroutine array_pack_dp(in_arr, out_arr, mask)
      ! Pack an array using an (optional) masking array.
      !
      ! pack() is an intrinsic routine, but the mask argument is required; when
      ! we may or may not have a mask, this method is convenient. If no mask is
      ! present, then this routine simply copies the input array.
      !
      ! in_arr :: input array
      ! out_arr :: packed array
      ! mask :: optional masking array
      real(dp), intent(in) :: in_arr(:)
      real(dp), allocatable, intent(out) :: out_arr(:)
      logical, intent(in), optional :: mask(:)
  