anchor.diff:        (let ((ri (bit-reverse-integer i inner)))
           (when (<= i ri)
             (push (cons i ri) to-swap))))
  -    (let* ((ordered (z-order-words to-swap))
  +    (let* ((ordered (z-order-words to-swap
  +                                   (1- (ash 1 (ceiling inner 2)))))
              (data (make-array (* 2 (length ordered))
                                :element-type '(unsigned-byte 32))))
         (loop for i upfrom 0 by 2
  
positive.code:             (push (cons a b) to-swap)))))
      `(progn
         ,@(loop
             for (a . b) across (z-order-words to-swap)
             collect
             `(let ((a (aref vec (+ middle-1 ,a)))
                    (b (aref vec (+ middle-2 ,b))))
  
negative.code:          `(rotatef (aref vec (+ start ,i))
                     (aref vec (+ start ,rev))))))
  
  ;; another way to z-order the bottom bits:
  (defun generate-outward-seq (seed most least)
    (let ((values (make-array (* least least)
                              :adjustable t
                              :fill-pointer 0)))
      (labels ((rec (seed most least)
                 (if (plusp least)
                     (dotimes (i 2)
                       (dotimes (j 2)
                         (rec (+ seed
                                 (* i most)
                                 (* j least))
                              (ash most 1)
                              (ash least -1))))
                     (vector-push-extend seed values))))
        (rec seed most least)
        (make-array (length values)
                    :initial-contents values))))
  
  (defun z-order-words (pairs &optional (mask -1))
    (flet ((interleave (x y)
             (let ((x   (logand x mask))
                   (y   (logand y mask))
                   (acc 0)
                   (mul 0))
               (dotimes (i 32 acc)
                 (let ((x (ldb (byte 1 i) x))
  