anchor.diff:  
     n_singles = 1
     !DIR$ VECTOR ALIGNED
  -  do i=0,size_buffer-block_size, block_size
  +  do i=1,size_buffer
   
       do k=1,Nint
  -      do ii=1,block_size
  -        xorvec(ii, k) = xor( spindet(k), buffer(k,ii+i) )
  -      enddo
  +       xorvec(k) = xor( spindet(k), buffer(k,i) )
       enddo
       
  -    do ii=1,block_size
  -      if (xorvec(ii,1) /= 0_8) then
  -        degree(ii) = popcnt(xorvec(ii,1))
  -      else
  -        degree(ii) = 0
  +    if (xorvec(1) /= 0_8) then
  +      degree = popcnt(xorvec(1))
  +    else
  +      degree = 0
  +    endif
  +
  +    do k=2,Nint
  +      if ( (degree <= 4).and.(xorvec(k) /= 0_8) ) then
  +        degree = degree + popcnt(xorvec(k))
         endif
  -
  -      do k=2,Nint
  -        if ( (degree(ii) <= 2).and.(xorvec(ii,k) /= 0_8) ) then
  -          degree(ii) = degree(ii) + popcnt(xorvec(ii,k))
  -        endif
  -      enddo
  -    enddo
  -
  -    do ii=1,block_size
  -      if ( degree(ii) == 2 ) then
  -        singles(n_singles) = idx(i+ii)
  +    enddo
  +
  +    if ( degree == 2 ) then
  +        singles(n_singles) = idx(i)
           n_singles = n_singles+1
  -      endif
  -    enddo
  -
  -  enddo
  -
  -  imax = size_buffer-i
  -
  -  do k=1,Nint
  -    do ii=1,imax
  -      xorvec(ii, k) = xor( spindet(k), buffer(k,ii+i) )
  -    enddo
  -  enddo
  -  
  -  do ii=1,imax
  -    if (xorvec(ii,1) /= 0_8) then
  -      degree(ii) = popcnt(xorvec(ii,1))
  -    else
  -      degree(ii) = 0
  -    endif
  -
  -    do k=2,Nint
  -      if ( (degree(ii) <= 2).and.(xorvec(ii,k) /= 0_8) ) then
  -        degree(ii) = degree(ii) + popcnt(xorvec(ii,k))
  -      endif
  -    enddo
  -  enddo
  -
  -  do ii=1,imax
  -    if ( degree(ii) == 2 ) then
  -      singles(n_singles) = idx(i+ii)
  -      n_singles = n_singles+1
  -    endif
  +    endif
  +
     enddo
     n_singles = n_singles-1
     
  
positive.code:   integer, intent(out)           :: doubles(size_buffer)
    integer, intent(out)           :: n_doubles
  
    integer                        :: i,k,ii, imax
    integer, parameter             :: block_size=64
    include 'Utils/constants.include.F'
    integer(bit_kind)              :: xorvec(block_size,N_int_max)
    integer                        :: degree(block_size)
  
    !DIR$ ATTRIBUTES ALIGN : $IRP_ALIGN :: xorvec, degree
  
  !  select case (Nint)
  !    case (1)
  
negative.code:   n_singles = 1
    n_doubles = 1
    !DIR$ VECTOR ALIGNED
    do i=1,size_buffer
  
      do k=1,Nint
          xorvec(k) = xor( spindet(k), buffer(k,i) )
      enddo
      
      if (xorvec(1) /= 0_8) then
        degree = popcnt(xorvec(1))
      else
        degree = 0
      endif
    
      do k=2,Nint
        !DIR$ VECTOR ALIGNED
        if ( (degree <= 4).and.(xorvec(k) /= 0_8) ) then
          degree = degree + popcnt(xorvec(k))
        endif
      enddo
  
      if ( degree == 4 ) then
        doubles(n_doubles) = idx(i)
        n_doubles = n_doubles+1
      else if ( degree == 2 ) then
        singles(n_singles) = idx(i)
        n_singles = n_singles+1
      endif
  
    enddo
    n_singles = n_singles-1
    n_doubles = n_doubles-1
    
  