anchor.diff:                simple-array-unsigned-byte-8)
     (:temporary (:sc double-reg) x0 x1 x2 x3 x4 x5 x6 x7 x8 x9)
     (:generator 1000
  -     (flet ((buffer-mem (base)
  -              (make-ea :qword
  -                       :base base
  -                       :disp (- (* n-word-bytes vector-data-offset)
  -                                other-pointer-lowtag))))
  -       (inst movdqu x0 (buffer-mem accumulator))
  -       (inst movdqu x1 (buffer-mem key))
  -       (inst movdqa x3 x0)
  -       (inst pclmulqdq x3 x1 0)
  -       (inst movdqa x4 x0)
  -       (inst pclmulqdq x4 x1 16)
  -       (inst movdqa x5 x0)
  -       (inst pclmulqdq x5 x1 1)
  -       (inst movdqa x6 x0)
  -       (inst pclmulqdq x6 x1 17)
  -       (inst pxor x4 x5)
  -       (inst movdqa x5 x4)
  -       (inst psrldq x4 8)
  -       (inst pslldq x5 8)
  -       (inst pxor x3 x5)
  -       (inst pxor x6 x4)
  -       (inst movdqa x7 x3)
  -       (inst movdqa x8 x6)
  -       (inst pslld-imm x3 1)
  -       (inst pslld-imm x6 1)
  -       (inst psrld-imm x7 31)
  -       (inst psrld-imm x8 31)
  -       (inst movdqa x9 x7)
  -       (inst pslldq x8 4)
  -       (inst pslldq x7 4)
  -       (inst psrldq x9 12)
  -       (inst por x3 x7)
  -       (inst por x6 x8)
  -       (inst por x6 x9)
  -       (inst movdqa x7 x3)
  -       (inst movdqa x8 x3)
  -       (inst movdqa x9 x3)
  -       (inst pslld-imm x7 31)
  -       (inst pslld-imm x8 30)
  -       (inst pslld-imm x9 25)
  -       (inst pxor x7 x8)
  -       (inst pxor x7 x9)
  -       (inst movdqa x8 x7)
  -       (inst pslldq x7 12)
  -       (inst psrldq x8 4)
  -       (inst pxor x3 x7)
  -       (inst movdqa x2 x3)
  -       (inst movdqa x4 x3)
  -       (inst movdqa x5 x3)
  -       (inst psrld-imm x2 1)
  -       (inst psrld-imm x4 2)
  -       (inst psrld-imm x5 7)
  -       (inst pxor x2 x4)
  -       (inst pxor x2 x5)
  -       (inst pxor x2 x8)
  -       (inst pxor x3 x2)
  -       (inst pxor x6 x3)
  -       (inst movdqu (buffer-mem accumulator) x6))))
  +    (flet ((buffer-mem (base)
  +             (let ((disp (- (* n-word-bytes vector-data-offset)
  +                            other-pointer-lowtag)))
  +               (ea disp base))))
  +      (inst movdqu x0 (buffer-mem accumulator))
  +      (inst movdqu x1 (buffer-mem key))
  +      (inst movdqa x3 x0)
  +      (inst pclmulqdq x3 x1 0)
  +      (inst movdqa x4 x0)
  +      (inst pclmulqdq x4 x1 16)
  +      (inst movdqa x5 x0)
  +      (inst pclmulqdq x5 x1 1)
  +      (inst movdqa x6 x0)
  +      (inst pclmulqdq x6 x1 17)
  +      (inst pxor x4 x5)
  +      (inst movdqa x5 x4)
  +      (inst psrldq x4 8)
  +      (inst pslldq x5 8)
  +      (inst pxor x3 x5)
  +      (inst pxor x6 x4)
  +      (inst movdqa x7 x3)
  +      (inst movdqa x8 x6)
  +      (inst pslld-imm x3 1)
  +      (inst pslld-imm x6 1)
  +      (inst psrld-imm x7 31)
  +      (inst psrld-imm x8 31)
  +      (inst movdqa x9 x7)
  +      (inst pslldq x8 4)
  +      (inst pslldq x7 4)
  +      (inst psrldq x9 12)
  +      (inst por x3 x7)
  +      (inst por x6 x8)
  +      (inst por x6 x9)
  +      (inst movdqa x7 x3)
  +      (inst movdqa x8 x3)
  +      (inst movdqa x9 x3)
  +      (inst pslld-imm x7 31)
  +      (inst pslld-imm x8 30)
  +      (inst pslld-imm x9 25)
  +      (inst pxor x7 x8)
  +      (inst pxor x7 x9)
  +      (inst movdqa x8 x7)
  +      (inst pslldq x7 12)
  +      (inst psrldq x8 4)
  +      (inst pxor x3 x7)
  +      (inst movdqa x2 x3)
  +      (inst movdqa x4 x3)
  +      (inst movdqa x5 x3)
  +      (inst psrld-imm x2 1)
  +      (inst psrld-imm x4 2)
  +      (inst psrld-imm x5 7)
  +      (inst pxor x2 x4)
  +      (inst pxor x2 x5)
  +      (inst pxor x2 x8)
  +      (inst pxor x3 x2)
  +      (inst pxor x6 x3)
  +      (inst movdqu (buffer-mem accumulator) x6))))
   
   #+x86-64
   (define-vop (xor128)
  
positive.code:               simple-array-unsigned-byte-8)
    (:temporary (:sc unsigned-reg) idx)
    (:generator 1000
       (flet ((buffer-mem (base offset)
                (make-ea :byte
                         :base base
                         :index offset
                         :disp (- (* n-word-bytes vector-data-offset)
                                  other-pointer-lowtag
                                  1))))
         (let ((start (gen-label))
               (end (gen-label)))
           (move idx size)
           (inst stc)
           (emit-label start)
           (inst adc (buffer-mem counter idx) 0)
           (inst jmp :nc end)
           (inst dec idx)
           (inst jmp :nz start)
           (emit-label end)))))
  )                        ; PROGN
  
negative.code:   (:args (buffer :scs (descriptor-reg))
           (state :scs (descriptor-reg)))
    (:info n-rounds)
    (:arg-types (:constant (signed-byte 61))
                simple-array-unsigned-byte-8
                simple-array-unsigned-byte-32)
    (:temporary (:sc double-reg) x0 x1 x2 x3 y0 y1 y2 y3 t0)
    (:temporary (:sc unsigned-reg) count)
    (:generator 1000
      (flet ((nth-xmm-mem (base i)
               (let ((disp (+ (- (* n-word-bytes vector-data-offset)
                                 other-pointer-lowtag)
                              (* 16 i))))
                 (ea disp base)))
             (chacha-round ()
               (inst paddd y0 y1)
               (inst pxor y3 y0)
               (inst movdqa t0 y3)
               (inst pslld-imm y3 16)
               (inst psrld-imm t0 16)
               (inst por y3 t0)
  
               (inst paddd y2 y3)
               (inst pxor y1 y2)
               (inst movdqa t0 y1)
               (inst pslld-imm y1 12)
               (inst psrld-imm t0 20)
               (inst por y1 t0)
  
               (inst paddd y0 y1)
               (inst pxor y3 y0)
               (inst movdqa t0 y3)
               (inst pslld-imm y3 8)
               (inst psrld-imm t0 24)
               (inst por y3 t0)
  
               (inst paddd y2 y3)
               (inst pxor y1 y2)
               (inst movdqa t0 y1)
               (inst pslld-imm y1 7)
               (inst psrld-imm t0 25)
               (inst por y1 t0)))
        (inst movdqu x0 (nth-xmm-mem state 0))
        (inst movdqu x1 (nth-xmm-mem state 1))
        (inst movdqu x2 (nth-xmm-mem state 2))
        (inst movdqu x3 (nth-xmm-mem state 3))
        (inst movdqa y0 x0)
        (inst movdqa y1 x1)
        (inst movdqa y2 x2)
        (inst movdqa y3 x3)
  
        (let ((repeat (gen-label)))
          (inst mov count n-rounds)
          (emit-label repeat)
  
          (chacha-round)
          (inst pshufd y1 y1 #b00111001)
          (inst pshufd y2 y2 #b01001110)
          (inst pshufd y3 y3 #b10010011)
  
          (chacha-round)
          (inst pshufd y1 y1 #b10010011)
          (inst pshufd y2 y2 #b01001110)
          (inst pshufd y3 y3 #b00111001)
  
          (inst sub count 1)
          (inst jmp :nz repeat))
  
        (inst paddd x0 y0)
        (inst paddd x1 y1)
        (inst paddd x2 y2)
        (inst paddd x3 y3)
        (inst movdqu (nth-xmm-mem buffer 0) x0)
        (inst movdqu (nth-xmm-mem buffer 1) x1)
        (inst movdqu (nth-xmm-mem buffer 2) x2)
        (inst movdqu (nth-xmm-mem buffer 3) x3))))
  
  #+x86-64
  (define-vop (pclmulqdq-support-p)
  