anchor.diff:      nil
       nil ; 10
       nil
  -    nil
  -    nil
  -    nil
  -    nil
  -    nil
  +    (decode-v-w sys.lap-x86:movhlps nil nil nil)
  +    nil
  +    (decode-v-w sys.lap-x86:unpcklps sys.lap-x86:unpcklpd nil nil)
  +    (decode-v-w sys.lap-x86:unpckhps sys.lap-x86:unpckhpd nil nil)
  +    (decode-v-w sys.lap-x86:movlhps nil nil nil)
       nil
       nil ; 18
       nil
  
positive.code:     nil
      nil))
  
  (defun rex-w (rex)
    (and rex (logbitp 3 rex)))
  
  (defun rex-r (rex)
    (and rex (logbitp 2 rex)))
  
  (defun rex-x (rex)
    (and rex (logbitp 1 rex)))
  
  (defun rex-b (rex)
    (and rex (logbitp 0 rex)))
  
  (defun decode+rgv64 (context opcode-byte rex opcode)
    (declare (ignore context))
    (make-instruction opcode
                      (decode-gpr64 (ldb (byte 3 0) opcode-byte) (rex-b rex))))
  
  (defun decode-ev-gv (context opcode-byte rex opcode16 opcode32 opcode64)
    (declare (ignore opcode-byte opcode16))
    (multiple-value-bind (reg r/m)
        (disassemble-ordinary-modr/m context rex)
      (if (rex-w rex)
          (and opcode64
               (make-instruction opcode64
                                 (decode-gpr64-or-mem r/m (rex-b rex))
                                 (decode-gpr64 reg (rex-r rex))))
          (and opcode32
               (make-instruction opcode32
                                 (decode-gpr32-or-mem r/m (rex-b rex))
                                 (decode-gpr32 reg (rex-r rex)))))))
  
  (defun decode-gv-ev (context opcode-byte rex opcode16 opcode32 opcode64)
    (declare (ignore opcode-byte opcode16))
    (multiple-value-bind (reg r/m)
        (disassemble-ordinary-modr/m context rex)
      (if (rex-w rex)
          (and opcode64
               (make-instruction opcode64
                                 (decode-gpr64 reg (rex-r rex))
                                 (decode-gpr64-or-mem r/m (rex-b rex))))
          (and opcode32
               (make-instruction opcode32
                                 (decode-gpr32 reg (rex-r rex))
                                 (decode-gpr32-or-mem r/m (rex-b rex)))))))
  
  (defun decode-ev64 (context opcode-byte rex group-table)
    (declare (ignore opcode-byte))
    (multiple-value-bind (reg r/m)
        (disassemble-ordinary-modr/m context rex)
      (let ((opcode (aref (symbol-value group-table) reg)))
        (cond (opcode
               (make-instruction opcode
                                 (decode-gpr64-or-mem r/m (rex-b rex))))
              (t nil)))))
  
  (defun decode-al-ib (context opcode-byte rex opcode)
    (declare (ignore opcode-byte rex))
    (make-instruction opcode :al (consume-sb8 context)))
  
  (defun decode-ax-iz (context opcode-byte rex opcode16 opcode32 opcode64)
    (declare (ignore opcode-byte opcode16))
    (let ((imm (consume-sb32/le context)))
      (if (rex-w rex)
          (make-instruction opcode64 :rax imm)
          (make-instruction opcode32 :eax imm))))
  
  (defun decode-eb-ib (context opcode-byte rex group-table)
    (declare (ignore opcode-byte))
    (multiple-value-bind (reg r/m)
        (disassemble-ordinary-modr/m context rex)
      (let ((opcodes (aref (symbol-value group-table) reg)))
        (cond (opcodes
               (and (first opcodes)
                    (make-instruction (first opcodes)
                                      (decode-gpr8-or-mem r/m (rex-b rex))
                                      (consume-sb8 context))))
              (t nil)))))
  
  (defun decode-eb-gb (context opcode-byte rex opcode)
    (declare (ignore opcode-byte))
    (multiple-value-bind (reg r/m)
        (disassemble-ordinary-modr/m context rex)
      (make-instruction opcode
                        (decode-gpr8-or-mem r/m (rex-b rex))
                        (decode-gpr8 reg (rex-r rex)))))
  
  (defun decode-gb-eb (context opcode-byte rex opcode)
    (declare (ignore opcode-byte))
    (multiple-value-bind (reg r/m)
        (disassemble-ordinary-modr/m context rex)
      (make-instruction opcode
                        (decode-gpr8 reg (rex-r rex))
                        (decode-gpr8-or-mem r/m (rex-b rex)))))
  
  (defun decode-eb-1 (context opcode-byte rex group-table)
    (declare (ignore opcode-byte))
    (multiple-value-bind (reg r/m)
        (disassemble-ordinary-modr/m context rex)
      (let ((opcodes (aref (symbol-value group-table) reg)))
        (cond (opcodes
               (and (first opcodes)
                    (make-instruction (fourth opcodes)
                                      (decode-gpr8-or-mem r/m (rex-b rex))
                                      1)))
              (t nil)))))
  
  (defun decode-ev-1 (context opcode-byte rex group-table)
    (declare (ignore opcode-byte))
    (multiple-value-bind (reg r/m)
        (disassemble-ordinary-modr/m context rex)
      (let ((opcodes (aref (symbol-value group-table) reg)))
        (cond (opcodes
               (if (rex-w rex)
                   (and (fourth opcodes)
                        (make-instruction (fourth opcodes)
                                          (decode-gpr64-or-mem r/m (rex-b rex))
                                          1))
                   (and (third opcodes)
                        (make-instruction (third opcodes)
                                          (decode-gpr32-or-mem r/m (rex-b rex))
                                          1))))
              (t nil)))))
  
  (defun decode-ev-ib (context opcode-byte rex group-table)
    (declare (ignore opcode-byte))
    (multiple-value-bind (reg r/m)
        (disassemble-ordinary-modr/m context rex)
      (let ((opcodes (aref (symbol-value group-table) reg)))
        (cond (opcodes
               (let ((imm (consume-sb8 context)))
                 (if (rex-w rex)
                     (and (fourth opcodes)
                          (make-instruction (fourth opcodes)
                                            (decode-gpr64-or-mem r/m (rex-b rex))
                                            imm))
                     (and (third opcodes)
                          (make-instruction (third opcodes)
                                            (decode-gpr32-or-mem r/m (rex-b rex))
                                            imm)))))
              (t nil)))))
  
  (defun decode-ev-iz (context opcode-byte rex group-table)
    (declare (ignore opcode-byte))
    (multiple-value-bind (reg r/m)
        (disassemble-ordinary-modr/m context rex)
      (let ((opcodes (aref (symbol-value group-table) reg)))
        (cond (opcodes
               (let ((imm (consume-sb32/le context)))
                 (if (rex-w rex)
                     (and (fourth opcodes)
                          (make-instruction (fourth opcodes)
                                            (decode-gpr64-or-mem r/m (rex-b rex))
                                            imm))
                     (and (third opcodes)
                          (make-instruction (third opcodes)
                                            (decode-gpr32-or-mem r/m (rex-b rex))
                                            imm)))))
              (t nil)))))
  
  (defun decode-jb (context opcode-byte rex opcode)
    (declare (ignore opcode-byte rex))
    (make-instruction opcode (make-instance 'effective-address
                                            :base :rip
                                            :disp (consume-sb8 context))))
  
  (defun decode-jz (context opcode-byte rex opcode)
    (declare (ignore opcode-byte rex))
    (make-instruction opcode (make-instance 'effective-address
                                            :base :rip
                                            :disp (consume-sb32/le context))))
  
  (defun decode-group-3-ev (context opcode-byte rex)
    (declare (ignore opcode-byte))
    (multiple-value-bind (reg r/m)
        (disassemble-ordinary-modr/m context rex)
      (case reg
        (0
         (let ((imm (consume-sb32/le context)))
           (if (rex-w rex)
               (make-instruction 'sys.lap-x86:test64
                                 (decode-gpr64-or-mem r/m (rex-b rex))
                                 imm)
               (make-instruction 'sys.lap-x86:test32
                                 ,(decode-gpr32-or-mem r/m (rex-b rex))
                                 imm))))
        (t nil))))
  
  (defun decode-mov+r-iv (context opcode-byte rex)
    (let ((reg (ldb (byte 3 0) opcode-byte)))
      (cond ((rex-w rex)
             (make-instruction 'sys.lap-x86:mov64
                               (decode-gpr64 reg (rex-b rex))
                               (consume-sb64/le context)))
            (t
             (make-instruction 'sys.lap-x86:mov32
                               (decode-gpr32 reg (rex-b rex))
                               (consume-sb32/le context))))))
  
  (defun decode-simple (context opcode-byte rex opcode)
    (declare (ignore context opcode-byte rex))
    (make-instruction opcode))
  
  (defun disassemble-one-instruction-1 (context)
    (let* ((byte (consume-ub8 context))
           (rex nil)
           (table *instruction-table*))
      (when (eql (logand byte #xF0) #x40)
        ;; REX prefix.
        (setf rex byte)
        (setf byte (consume-ub8 context)))
      (when (eql byte #x0F)
        (setf table *extended-instruction-table*)
        (setf byte (consume-ub8 context)))
      (let ((entry (aref table byte)))
        (cond (entry
               (apply (first entry) context byte rex (rest entry)))
              (t nil)))))
  
  (defun disassemble-one-instruction (context)
  
negative.code:     nil
      nil
      nil
      (decode-ev-gv-ib sys.lap-x86:shrd16 sys.lap-x86:shrd32 sys.lap-x86:shrd64)
      nil
      nil
      nil
      (decode-eb-gb sys.lap-x86:cmpxchg) ; B0
      (decode-ev-gv sys.lap-x86:cmpxchg sys.lap-x86:cmpxchg sys.lap-x86:cmpxchg)
      nil
      nil
      nil
  