
(/VERSIONCHECK 2) 

(DEFUN |ORDFUNS;pureLex;2VB;1| (|v1| |v2| $)
  (PROG (|i| #0=#:G1827 #1=#:G1826)
    (RETURN
      (SEQ (EXIT (SEQ (SEQ (LETT |i| 1 . #2=(|ORDFUNS;pureLex;2VB;1|))
                           (LETT #0# (QREFELT $ 8) . #2#) G190
                           (COND ((QSGREATERP |i| #0#) (GO G191)))
                           (SEQ (COND
                                  ((SPADCALL
                                    (SPADCALL |v1| |i| (QREFELT $ 11))
                                    (SPADCALL |v2| |i| (QREFELT $ 11))
                                    (QREFELT $ 13))
                                   (PROGN
                                     (LETT #1# 'T . #2#)
                                     (GO #1#))))
                                (EXIT (COND
                                        ((SPADCALL
                                          (SPADCALL |v2| |i|
                                           (QREFELT $ 11))
                                          (SPADCALL |v1| |i|
                                           (QREFELT $ 11))
                                          (QREFELT $ 13))
                                         (PROGN
                                           (LETT #1# 'NIL . #2#)
                                           (GO #1#))))))
                           (LETT |i| (QSADD1 |i|) . #2#) (GO G190) G191
                           (EXIT NIL))
                      (EXIT 'NIL)))
           #1# (EXIT #1#))))) 

(DEFUN |ORDFUNS;totalLex;2VB;2| (|v1| |v2| $)
  (PROG (#0=#:G1836 |n1| |n2| |i| #1=#:G1837 #2=#:G1835)
    (RETURN
      (SEQ (EXIT (SEQ (LETT |n1| (|spadConstant| $ 15)
                            . #3=(|ORDFUNS;totalLex;2VB;2|))
                      (LETT |n2| (|spadConstant| $ 15) . #3#)
                      (SEQ (LETT |i| 1 . #3#)
                           (LETT #0# (QREFELT $ 8) . #3#) G190
                           (COND ((QSGREATERP |i| #0#) #4=(GO G191)))
                           (SEQ (LETT |n1|
                                      (SPADCALL |n1|
                                       (SPADCALL |v1| |i|
                                        (QREFELT $ 11))
                                       (QREFELT $ 16)) . #3#)
                                (EXIT (LETT |n2|
                                       (SPADCALL |n2|
                                        (SPADCALL |v2| |i|
                                         (QREFELT $ 11))
                                        (QREFELT $ 16)) . #3#)))
                           (LETT |i| (QSADD1 |i|) . #3#) #5=(GO G190)
                           G191 (EXIT NIL))
                      (EXIT (COND
                              ((SPADCALL |n1| |n2| (QREFELT $ 13)) 'T)
                              ((SPADCALL |n2| |n1| (QREFELT $ 13))
                               'NIL)
                              ('T
                               (SEQ (SEQ (LETT |i| 1 . #3#)
                                     (LETT #1# (QREFELT $ 8) . #3#)
                                     G190
                                     (COND ((QSGREATERP |i| #1#) #4#))
                                     (SEQ
                                      (COND
                                        ((SPADCALL
                                          (SPADCALL |v1| |i|
                                           (QREFELT $ 11))
                                          (SPADCALL |v2| |i|
                                           (QREFELT $ 11))
                                          (QREFELT $ 13))
                                         (PROGN
                                           (LETT #2# 'T . #3#)
                                           (GO #2#))))
                                      (EXIT
                                       (COND
                                         ((SPADCALL
                                           (SPADCALL |v2| |i|
                                            (QREFELT $ 11))
                                           (SPADCALL |v1| |i|
                                            (QREFELT $ 11))
                                           (QREFELT $ 13))
                                          (PROGN
                                            (LETT #2# 'NIL . #3#)
                                            (GO #2#))))))
                                     (LETT |i| (QSADD1 |i|) . #3#) #5#
                                     G191 (EXIT NIL))
                                    (EXIT 'NIL)))))))
           #2# (EXIT #2#))))) 

(DEFUN |ORDFUNS;reverseLex;2VB;3| (|v1| |v2| $)
  (PROG (#0=#:G1846 |n1| |n2| |i| #1=#:G1845)
    (RETURN
      (SEQ (EXIT (SEQ (LETT |n1| (|spadConstant| $ 15)
                            . #2=(|ORDFUNS;reverseLex;2VB;3|))
                      (LETT |n2| (|spadConstant| $ 15) . #2#)
                      (SEQ (LETT |i| 1 . #2#)
                           (LETT #0# (QREFELT $ 8) . #2#) G190
                           (COND ((QSGREATERP |i| #0#) #3=(GO G191)))
                           (SEQ (LETT |n1|
                                      (SPADCALL |n1|
                                       (SPADCALL |v1| |i|
                                        (QREFELT $ 11))
                                       (QREFELT $ 16)) . #2#)
                                (EXIT (LETT |n2|
                                       (SPADCALL |n2|
                                        (SPADCALL |v2| |i|
                                         (QREFELT $ 11))
                                        (QREFELT $ 16)) . #2#)))
                           (LETT |i| (QSADD1 |i|) . #2#) #4=(GO G190)
                           G191 (EXIT NIL))
                      (EXIT (COND
                              ((SPADCALL |n1| |n2| (QREFELT $ 13)) 'T)
                              ((SPADCALL |n2| |n1| (QREFELT $ 13))
                               'NIL)
                              ('T
                               (SEQ (SEQ (LETT |i| (QREFELT $ 8) . #2#)
                                     G190 (COND ((< |i| 1) #3#))
                                     (SEQ
                                      (COND
                                        ((SPADCALL
                                          (SPADCALL |v2| |i|
                                           (QREFELT $ 11))
                                          (SPADCALL |v1| |i|
                                           (QREFELT $ 11))
                                          (QREFELT $ 13))
                                         (PROGN
                                           (LETT #1# 'T . #2#)
                                           (GO #1#))))
                                      (EXIT
                                       (COND
                                         ((SPADCALL
                                           (SPADCALL |v1| |i|
                                            (QREFELT $ 11))
                                           (SPADCALL |v2| |i|
                                            (QREFELT $ 11))
                                           (QREFELT $ 13))
                                          (PROGN
                                            (LETT #1# 'NIL . #2#)
                                            (GO #1#))))))
                                     (LETT |i| (+ |i| -1) . #2#) #4#
                                     G191 (EXIT NIL))
                                    (EXIT 'NIL)))))))
           #1# (EXIT #1#))))) 

(DEFUN |OrderingFunctions| (&REST #0=#:G1847)
  (PROG ()
    (RETURN
      (PROG (#1=#:G1848)
        (RETURN
          (COND
            ((LETT #1#
                   (|lassocShiftWithFunction| (|devaluateList| #0#)
                       (HGET |$ConstructorCache| '|OrderingFunctions|)
                       '|domainEqualList|)
                   . #2=(|OrderingFunctions|))
             (|CDRwithIncrement| #1#))
            ('T
             (UNWIND-PROTECT
               (PROG1 (APPLY (|function| |OrderingFunctions;|) #0#)
                 (LETT #1# T . #2#))
               (COND
                 ((NOT #1#)
                  (HREM |$ConstructorCache| '|OrderingFunctions|))))))))))) 

(DEFUN |OrderingFunctions;| (|#1| |#2|)
  (PROG (DV$1 DV$2 |dv$| $ |pv$|)
    (RETURN
      (PROGN
        (LETT DV$1 (|devaluate| |#1|) . #0=(|OrderingFunctions|))
        (LETT DV$2 (|devaluate| |#2|) . #0#)
        (LETT |dv$| (LIST '|OrderingFunctions| DV$1 DV$2) . #0#)
        (LETT $ (GETREFV 19) . #0#)
        (QSETREFV $ 0 |dv$|)
        (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #0#))
        (|haddProp| |$ConstructorCache| '|OrderingFunctions|
            (LIST DV$1 DV$2) (CONS 1 $))
        (|stuffDomainSlots| $)
        (QSETREFV $ 6 |#1|)
        (QSETREFV $ 7 |#2|)
        (QSETREFV $ 8 |#1|)
        $)))) 

(MAKEPROP '|OrderingFunctions| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|) '|n|
             (|Integer|) (|Vector| 7) (0 . |qelt|) (|Boolean|) (6 . <)
             |ORDFUNS;pureLex;2VB;1| (12 . |Zero|) (16 . +)
             |ORDFUNS;totalLex;2VB;2| |ORDFUNS;reverseLex;2VB;3|)
          '#(|totalLex| 22 |reverseLex| 28 |pureLex| 34) 'NIL
          (CONS (|makeByteWordVec2| 1 'NIL)
                (CONS '#()
                      (CONS '#()
                            (|makeByteWordVec2| 18
                                '(2 10 7 0 9 11 2 7 12 0 0 13 0 7 0 15
                                  2 7 0 0 0 16 2 0 12 10 10 17 2 0 12
                                  10 10 18 2 0 12 10 10 14)))))
          '|lookupComplete|)) 
