
(/VERSIONCHECK 2) 

(DEFUN |PATTERN;coerce;R$;1| (|r| $)
  (|PATTERN;mkPat| 'T (CONS 0 |r|) 0 $)) 

(DEFUN |PATTERN;mkPat| (|c| |p| |l| $)
  (VECTOR |c| |p| |l| NIL (QREFELT $ 17))) 

(DEFUN |PATTERN;hasTopPredicate?;$B;3| (|x| $)
  (COND ((NULL (QVELT |x| 3)) 'NIL) ('T 'T))) 

(DEFUN |PATTERN;topPredicate;$R;4| (|x| $)
  (CONS (QVELT |x| 3) (QVELT |x| 4))) 

(DEFUN |PATTERN;setTopPredicate;$LA$;5| (|x| |l| |f| $)
  (SEQ (QSETVELT |x| 3 |l|) (QSETVELT |x| 4 |f|) (EXIT |x|))) 

(PUT '|PATTERN;constant?;$B;6| '|SPADreplace|
     '(XLAM (|p|) (QVELT |p| 0))) 

(DEFUN |PATTERN;constant?;$B;6| (|p| $) (QVELT |p| 0)) 

(PUT '|PATTERN;depth;$Nni;7| '|SPADreplace|
     '(XLAM (|p|) (QVELT |p| 2))) 

(DEFUN |PATTERN;depth;$Nni;7| (|p| $) (QVELT |p| 2)) 

(DEFUN |PATTERN;inR?;$B;8| (|p| $) (QEQCAR (QVELT |p| 1) 0)) 

(DEFUN |PATTERN;symbol?;$B;9| (|p| $) (QEQCAR (QVELT |p| 1) 4)) 

(DEFUN |PATTERN;isPlus;$U;10| (|p| $) (|PATTERN;isTaggedOp| |p| 1 $)) 

(DEFUN |PATTERN;isTimes;$U;11| (|p| $)
  (|PATTERN;isTaggedOp| |p| (SPADCALL 2 (QREFELT $ 33)) $)) 

(DEFUN |PATTERN;isList;$U;12| (|p| $)
  (|PATTERN;isTaggedOp| |p| (SPADCALL 3 (QREFELT $ 33)) $)) 

(DEFUN |PATTERN;isExpt;$U;13| (|p| $)
  (PROG (#0=#:G1947)
    (RETURN
      (COND
        ((QEQCAR (QVELT |p| 1) 2)
         (CONS 0
               (PROG2 (LETT #0# (QVELT |p| 1) |PATTERN;isExpt;$U;13|)
                      (QCDR #0#)
                 (|check-union| (QEQCAR #0# 2)
                     (|Record| (|:| |val| $)
                         (|:| |exponent| (|NonNegativeInteger|)))
                     #0#))))
        ('T (CONS 1 "failed")))))) 

(DEFUN |PATTERN;isQuotient;$U;14| (|p| $)
  (PROG (#0=#:G1966)
    (RETURN
      (COND
        ((QEQCAR (QVELT |p| 1) 3)
         (CONS 0
               (PROG2 (LETT #0# (QVELT |p| 1)
                            |PATTERN;isQuotient;$U;14|)
                      (QCDR #0#)
                 (|check-union| (QEQCAR #0# 3)
                     (|Record| (|:| |num| $) (|:| |den| $)) #0#))))
        ('T (CONS 1 "failed")))))) 

(DEFUN |PATTERN;hasPredicate?;$B;15| (|p| $)
  (COND ((NULL (SPADCALL |p| (QREFELT $ 43))) 'NIL) ('T 'T))) 

(DEFUN |PATTERN;quoted?;$B;16| (|p| $)
  (PROG (#0=#:G1984)
    (RETURN
      (COND
        ((SPADCALL |p| (QREFELT $ 29))
         (ZEROP (QVELT (PROG2 (LETT #0# (QVELT |p| 1)
                                    |PATTERN;quoted?;$B;16|)
                              (QCDR #0#)
                         (|check-union| (QEQCAR #0# 4)
                             (|Record| (|:| |tag| (|SingleInteger|))
                                 (|:| |val| (|Symbol|))
                                 (|:| |pred| (|List| (|Any|)))
                                 (|:| |bad| (|List| (|Any|))))
                             #0#))
                       0)))
        ('T 'NIL))))) 

(DEFUN |PATTERN;generic?;$B;17| (|p| $)
  (PROG (#0=#:G1995)
    (RETURN
      (COND
        ((SPADCALL |p| (QREFELT $ 29))
         (|PATTERN;bitSet?|
             (QVELT (PROG2 (LETT #0# (QVELT |p| 1)
                                 |PATTERN;generic?;$B;17|)
                           (QCDR #0#)
                      (|check-union| (QEQCAR #0# 4)
                          (|Record| (|:| |tag| (|SingleInteger|))
                              (|:| |val| (|Symbol|))
                              (|:| |pred| (|List| (|Any|)))
                              (|:| |bad| (|List| (|Any|))))
                          #0#))
                    0)
             1 $))
        ('T 'NIL))))) 

(DEFUN |PATTERN;multiple?;$B;18| (|p| $)
  (PROG (#0=#:G2006)
    (RETURN
      (COND
        ((SPADCALL |p| (QREFELT $ 29))
         (|PATTERN;bitSet?|
             (QVELT (PROG2 (LETT #0# (QVELT |p| 1)
                                 |PATTERN;multiple?;$B;18|)
                           (QCDR #0#)
                      (|check-union| (QEQCAR #0# 4)
                          (|Record| (|:| |tag| (|SingleInteger|))
                              (|:| |val| (|Symbol|))
                              (|:| |pred| (|List| (|Any|)))
                              (|:| |bad| (|List| (|Any|))))
                          #0#))
                    0)
             (SPADCALL 2 (QREFELT $ 33)) $))
        ('T 'NIL))))) 

(DEFUN |PATTERN;optional?;$B;19| (|p| $)
  (PROG (#0=#:G2017)
    (RETURN
      (COND
        ((SPADCALL |p| (QREFELT $ 29))
         (|PATTERN;bitSet?|
             (QVELT (PROG2 (LETT #0# (QVELT |p| 1)
                                 |PATTERN;optional?;$B;19|)
                           (QCDR #0#)
                      (|check-union| (QEQCAR #0# 4)
                          (|Record| (|:| |tag| (|SingleInteger|))
                              (|:| |val| (|Symbol|))
                              (|:| |pred| (|List| (|Any|)))
                              (|:| |bad| (|List| (|Any|))))
                          #0#))
                    0)
             (SPADCALL 4 (QREFELT $ 33)) $))
        ('T 'NIL))))) 

(DEFUN |PATTERN;bitSet?| (|a| |b| $)
  (COND ((EQL (LOGAND |a| |b|) 0) 'NIL) ('T 'T))) 

(DEFUN |PATTERN;coerce;$Of;21| (|p| $)
  (|PATTERN;PAT2O| (QVELT |p| 1) $)) 

(DEFUN |PATTERN;**;3$;22| (|p1| |p2| $)
  (|PATTERN;taggedElt| (SPADCALL 6 (QREFELT $ 33)) (LIST |p1| |p2|) $)) 

(DEFUN |PATTERN;LPAT2O| (|f| |l| $)
  (PROG (#0=#:G2037 |x| #1=#:G2038)
    (RETURN
      (SEQ (SPADCALL |f|
               (PROGN
                 (LETT #0# NIL . #2=(|PATTERN;LPAT2O|))
                 (SEQ (LETT |x| NIL . #2#) (LETT #1# |l| . #2#) G190
                      (COND
                        ((OR (ATOM #1#)
                             (PROGN (LETT |x| (CAR #1#) . #2#) NIL))
                         (GO G191)))
                      (SEQ (EXIT (LETT #0#
                                       (CONS
                                        (SPADCALL |x| (QREFELT $ 50))
                                        #0#) . #2#)))
                      (LETT #1# (CDR #1#) . #2#) (GO G190) G191
                      (EXIT (NREVERSE0 #0#))))
               (QREFELT $ 54)))))) 

(DEFUN |PATTERN;retract;$R;24| (|p| $)
  (PROG (#0=#:G2043)
    (RETURN
      (COND
        ((SPADCALL |p| (QREFELT $ 28))
         (PROG2 (LETT #0# (QVELT |p| 1) |PATTERN;retract;$R;24|)
                (QCDR #0#)
           (|check-union| (QEQCAR #0# 0) (QREFELT $ 6) #0#)))
        ('T (|error| "Not retractable")))))) 

(DEFUN |PATTERN;convert;L$;25| (|l| $)
  (|PATTERN;taggedElt| (SPADCALL 3 (QREFELT $ 33)) |l| $)) 

(DEFUN |PATTERN;retractIfCan;$U;26| (|p| $)
  (PROG (#0=#:G2058)
    (RETURN
      (COND
        ((SPADCALL |p| (QREFELT $ 28))
         (CONS 0
               (PROG2 (LETT #0# (QVELT |p| 1)
                            |PATTERN;retractIfCan;$U;26|)
                      (QCDR #0#)
                 (|check-union| (QEQCAR #0# 0) (QREFELT $ 6) #0#))))
        ('T (CONS 1 "failed")))))) 

(DEFUN |PATTERN;withPredicates;$L$;27| (|p| |l| $)
  (SPADCALL (SPADCALL |p| (QREFELT $ 60)) |l| (QREFELT $ 61))) 

(DEFUN |PATTERN;coerce;S$;28| (|sy| $)
  (SPADCALL |sy| 'NIL 'NIL 'NIL (QREFELT $ 63))) 

(DEFUN |PATTERN;copy;2$;29| (|p| $)
  (VECTOR (SPADCALL |p| (QREFELT $ 25))
          (|PATTERN;patcopy| (QVELT |p| 1) $) (QVELT |p| 2)
          (QVELT |p| 3) (QVELT |p| 4))) 

(DEFUN |PATTERN;optpair;LU;30| (|l| $)
  (PROG (|b| |a|)
    (RETURN
      (SEQ (COND
             ((SPADCALL
                  (SPADCALL (SPADCALL |l| (QREFELT $ 66))
                      (QREFELT $ 66))
                  (QREFELT $ 67))
              (SEQ (LETT |b|
                         (SPADCALL (SPADCALL |l| (QREFELT $ 66))
                             (QREFELT $ 68))
                         . #0=(|PATTERN;optpair;LU;30|))
                   (EXIT (COND
                           ((SPADCALL
                                (LETT |a|
                                      (SPADCALL |l| (QREFELT $ 68)) . #0#)
                                (QREFELT $ 48))
                            (CONS 0 |l|))
                           ((SPADCALL |b| (QREFELT $ 48))
                            (CONS 0 (SPADCALL |l| (QREFELT $ 69))))
                           ('T (CONS 1 "failed"))))))
             ('T (CONS 1 "failed"))))))) 

(DEFUN |PATTERN;incmax| (|l| $)
  (PROG (#0=#:G2090 |p| #1=#:G2091)
    (RETURN
      (SEQ (+ 1
              (SPADCALL (ELT $ 72)
                  (PROGN
                    (LETT #0# NIL . #2=(|PATTERN;incmax|))
                    (SEQ (LETT |p| NIL . #2#) (LETT #1# |l| . #2#) G190
                         (COND
                           ((OR (ATOM #1#)
                                (PROGN (LETT |p| (CAR #1#) . #2#) NIL))
                            (GO G191)))
                         (SEQ (EXIT (LETT #0#
                                     (CONS (QVELT |p| 2) #0#) . #2#)))
                         (LETT #1# (CDR #1#) . #2#) (GO G190) G191
                         (EXIT (NREVERSE0 #0#))))
                  0 (QREFELT $ 75))))))) 

(DEFUN |PATTERN;=;2$B;32| (|p1| |p2| $)
  (COND
    ((|BooleanEquality| (QVELT |p1| 0) (QVELT |p2| 0))
     (COND
       ((EQL (QVELT |p1| 2) (QVELT |p2| 2))
        (COND
          ((SPADCALL (QVELT |p1| 3) (QVELT |p2| 3) (QREFELT $ 76))
           (COND
             ((EQ (QVELT |p1| 4) (QVELT |p2| 4))
              (|PATTERN;pateq?| (QVELT |p1| 1) (QVELT |p2| 1) $))
             ('T 'NIL)))
          ('T 'NIL)))
       ('T 'NIL)))
    ('T 'NIL))) 

(DEFUN |PATTERN;isPower;$U;33| (|p| $)
  (PROG (|u|)
    (RETURN
      (SEQ (LETT |u|
                 (|PATTERN;isTaggedOp| |p| (SPADCALL 6 (QREFELT $ 33))
                     $)
                 |PATTERN;isPower;$U;33|)
           (EXIT (COND
                   ((QEQCAR |u| 1) (CONS 1 "failed"))
                   ('T
                    (CONS 0
                          (CONS (SPADCALL (QCDR |u|) (QREFELT $ 68))
                                (SPADCALL (QCDR |u|) (QREFELT $ 78))))))))))) 

(DEFUN |PATTERN;taggedElt| (|n| |l| $)
  (|PATTERN;mkPat| (SPADCALL (ELT $ 25) |l| (QREFELT $ 83))
      (CONS 1 (VECTOR |n| (QREFELT $ 12) |l|)) (|PATTERN;incmax| |l| $)
      $)) 

(DEFUN |PATTERN;elt;BoL$;35| (|o| |l| $)
  (SEQ (COND
         ((SPADCALL |o| (SPADCALL "%power" (QREFELT $ 85))
              (QREFELT $ 86))
          (COND
            ((EQL (SPADCALL |l| (QREFELT $ 87)) 2)
             (EXIT (SPADCALL (SPADCALL |l| (QREFELT $ 68))
                       (SPADCALL |l| (QREFELT $ 88)) (QREFELT $ 51)))))))
       (EXIT (|PATTERN;mkPat| (SPADCALL (ELT $ 25) |l| (QREFELT $ 83))
                 (CONS 1 (VECTOR 0 |o| |l|)) (|PATTERN;incmax| |l| $)
                 $)))) 

(DEFUN |PATTERN;isOp;$U;36| (|p| $)
  (PROG (#0=#:G2154)
    (RETURN
      (SEQ (COND
             ((QEQCAR (QVELT |p| 1) 1)
              (COND
                ((ZEROP (QVELT (PROG2 (LETT #0# (QVELT |p| 1)
                                       . #1=(|PATTERN;isOp;$U;36|))
                                      (QCDR #0#)
                                 (|check-union| (QEQCAR #0# 1)
                                     (|Record|
                                      (|:| |tag| (|SingleInteger|))
                                      (|:| |op| (|BasicOperator|))
                                      (|:| |arg| (|List| $)))
                                     #0#))
                               0))
                 (EXIT (CONS 0
                             (CONS (QVELT
                                    (PROG2
                                     (LETT #0# (QVELT |p| 1) . #1#)
                                     (QCDR #0#)
                                      (|check-union| (QEQCAR #0# 1)
                                       (|Record|
                                        (|:| |tag| (|SingleInteger|))
                                        (|:| |op| (|BasicOperator|))
                                        (|:| |arg| (|List| $)))
                                       #0#))
                                    1)
                                   (QVELT
                                    (PROG2
                                     (LETT #0# (QVELT |p| 1) . #1#)
                                     (QCDR #0#)
                                      (|check-union| (QEQCAR #0# 1)
                                       (|Record|
                                        (|:| |tag| (|SingleInteger|))
                                        (|:| |op| (|BasicOperator|))
                                        (|:| |arg| (|List| $)))
                                       #0#))
                                    2))))))))
           (EXIT (CONS 1 "failed")))))) 

(DEFUN |PATTERN;isTaggedOp| (|p| |t| $)
  (PROG (#0=#:G2174)
    (RETURN
      (SEQ (COND
             ((QEQCAR (QVELT |p| 1) 1)
              (COND
                ((EQL (QVELT (PROG2 (LETT #0# (QVELT |p| 1)
                                     . #1=(|PATTERN;isTaggedOp|))
                                    (QCDR #0#)
                               (|check-union| (QEQCAR #0# 1)
                                   (|Record|
                                    (|:| |tag| (|SingleInteger|))
                                    (|:| |op| (|BasicOperator|))
                                    (|:| |arg| (|List| $)))
                                   #0#))
                             0)
                      |t|)
                 (EXIT (CONS 0
                             (QVELT (PROG2
                                     (LETT #0# (QVELT |p| 1) . #1#)
                                     (QCDR #0#)
                                      (|check-union| (QEQCAR #0# 1)
                                       (|Record|
                                        (|:| |tag| (|SingleInteger|))
                                        (|:| |op| (|BasicOperator|))
                                        (|:| |arg| (|List| $)))
                                       #0#))
                                    2)))))))
           (EXIT (CONS 1 "failed")))))) 

(DEFUN |PATTERN;One;$;38| ($)
  (SPADCALL (|spadConstant| $ 94) (QREFELT $ 18))) 

(DEFUN |PATTERN;One;$;39| ($)
  (|PATTERN;taggedElt| (SPADCALL 5 (QREFELT $ 33))
      (SPADCALL (QREFELT $ 95)) $)) 

(DEFUN |PATTERN;Zero;$;40| ($)
  (SPADCALL (|spadConstant| $ 96) (QREFELT $ 18))) 

(DEFUN |PATTERN;Zero;$;41| ($)
  (|PATTERN;taggedElt| (SPADCALL 4 (QREFELT $ 33))
      (SPADCALL (QREFELT $ 95)) $)) 

(DEFUN |PATTERN;**;$Nni$;42| (|p| |n| $)
  (SEQ (COND
         ((SPADCALL |p| (|spadConstant| $ 89) (QREFELT $ 77))
          (COND ((< 0 |n|) (EXIT (|spadConstant| $ 89))))))
       (COND
         ((OR (SPADCALL |p| (|spadConstant| $ 71) (QREFELT $ 77))
              (ZEROP |n|))
          (EXIT (|spadConstant| $ 71))))
       (EXIT (COND
               ((EQL |n| 1) |p|)
               ('T
                (|PATTERN;mkPat| (SPADCALL |p| (QREFELT $ 25))
                    (CONS 2 (CONS |p| |n|)) (+ 1 (QVELT |p| 2)) $)))))) 

(DEFUN |PATTERN;/;3$;43| (|p1| |p2| $)
  (COND
    ((SPADCALL |p2| (|spadConstant| $ 71) (QREFELT $ 77)) |p1|)
    ('T
     (|PATTERN;mkPat|
         (COND
           ((SPADCALL |p1| (QREFELT $ 25))
            (SPADCALL |p2| (QREFELT $ 25)))
           ('T 'NIL))
         (CONS 3 (CONS |p1| |p2|))
         (+ 1 (MAX (QVELT |p1| 2) (QVELT |p2| 2))) $)))) 

(DEFUN |PATTERN;+;3$;44| (|p1| |p2| $)
  (PROG (|u1| |u2| #0=#:G2213)
    (RETURN
      (COND
        ((SPADCALL |p1| (|spadConstant| $ 89) (QREFELT $ 77)) |p2|)
        ((SPADCALL |p2| (|spadConstant| $ 89) (QREFELT $ 77)) |p1|)
        ('T
         (COND
           ((QEQCAR (LETT |u1| (SPADCALL |p1| (QREFELT $ 31))
                          . #1=(|PATTERN;+;3$;44|))
                    0)
            (COND
              ((QEQCAR (LETT |u2| (SPADCALL |p2| (QREFELT $ 31)) . #1#)
                       0)
               (|PATTERN;taggedElt| 1
                   (SPADCALL
                       (PROG2 (LETT #0# |u1| . #1#) (QCDR #0#)
                         (|check-union| (QEQCAR #0# 0) (|List| $) #0#))
                       (PROG2 (LETT #0# |u2| . #1#) (QCDR #0#)
                         (|check-union| (QEQCAR #0# 0) (|List| $) #0#))
                       (QREFELT $ 99))
                   $))
              ('T
               (|PATTERN;taggedElt| 1
                   (SPADCALL
                       (PROG2 (LETT #0# |u1| . #1#) (QCDR #0#)
                         (|check-union| (QEQCAR #0# 0) (|List| $) #0#))
                       |p2| (QREFELT $ 100))
                   $))))
           ((QEQCAR (LETT |u2| (SPADCALL |p2| (QREFELT $ 31)) . #1#) 0)
            (|PATTERN;taggedElt| 1
                (SPADCALL |p1|
                    (PROG2 (LETT #0# |u2| . #1#) (QCDR #0#)
                      (|check-union| (QEQCAR #0# 0) (|List| $) #0#))
                    (QREFELT $ 101))
                $))
           ('T (|PATTERN;taggedElt| 1 (LIST |p1| |p2|) $)))))))) 

(DEFUN |PATTERN;*;3$;45| (|p1| |p2| $)
  (PROG (|u1| |u2| #0=#:G2221)
    (RETURN
      (COND
        ((OR (SPADCALL |p1| (|spadConstant| $ 89) (QREFELT $ 77))
             (SPADCALL |p2| (|spadConstant| $ 89) (QREFELT $ 77)))
         (|spadConstant| $ 89))
        ('T
         (COND
           ((SPADCALL |p1| (|spadConstant| $ 71) (QREFELT $ 77)) |p2|)
           ((SPADCALL |p2| (|spadConstant| $ 71) (QREFELT $ 77)) |p1|)
           ('T
            (COND
              ((QEQCAR (LETT |u1| (SPADCALL |p1| (QREFELT $ 34))
                             . #1=(|PATTERN;*;3$;45|))
                       0)
               (COND
                 ((QEQCAR (LETT |u2|
                                (SPADCALL |p2| (QREFELT $ 34)) . #1#)
                          0)
                  (|PATTERN;taggedElt| (SPADCALL 2 (QREFELT $ 33))
                      (SPADCALL
                          (PROG2 (LETT #0# |u1| . #1#) (QCDR #0#)
                            (|check-union| (QEQCAR #0# 0) (|List| $)
                                #0#))
                          (PROG2 (LETT #0# |u2| . #1#) (QCDR #0#)
                            (|check-union| (QEQCAR #0# 0) (|List| $)
                                #0#))
                          (QREFELT $ 99))
                      $))
                 ('T
                  (|PATTERN;taggedElt| (SPADCALL 2 (QREFELT $ 33))
                      (SPADCALL
                          (PROG2 (LETT #0# |u1| . #1#) (QCDR #0#)
                            (|check-union| (QEQCAR #0# 0) (|List| $)
                                #0#))
                          |p2| (QREFELT $ 100))
                      $))))
              ((QEQCAR (LETT |u2| (SPADCALL |p2| (QREFELT $ 34)) . #1#)
                       0)
               (|PATTERN;taggedElt| (SPADCALL 2 (QREFELT $ 33))
                   (SPADCALL |p1|
                       (PROG2 (LETT #0# |u2| . #1#) (QCDR #0#)
                         (|check-union| (QEQCAR #0# 0) (|List| $) #0#))
                       (QREFELT $ 101))
                   $))
              ('T
               (|PATTERN;taggedElt| (SPADCALL 2 (QREFELT $ 33))
                   (LIST |p1| |p2|) $)))))))))) 

(DEFUN |PATTERN;isOp;$BoU;46| (|p| |o| $)
  (PROG (#0=#:G2237)
    (RETURN
      (SEQ (COND
             ((QEQCAR (QVELT |p| 1) 1)
              (COND
                ((ZEROP (QVELT (PROG2 (LETT #0# (QVELT |p| 1)
                                       . #1=(|PATTERN;isOp;$BoU;46|))
                                      (QCDR #0#)
                                 (|check-union| (QEQCAR #0# 1)
                                     (|Record|
                                      (|:| |tag| (|SingleInteger|))
                                      (|:| |op| (|BasicOperator|))
                                      (|:| |arg| (|List| $)))
                                     #0#))
                               0))
                 (COND
                   ((SPADCALL
                        (QVELT (PROG2 (LETT #0# (QVELT |p| 1) . #1#)
                                      (QCDR #0#)
                                 (|check-union| (QEQCAR #0# 1)
                                     (|Record|
                                      (|:| |tag| (|SingleInteger|))
                                      (|:| |op| (|BasicOperator|))
                                      (|:| |arg| (|List| $)))
                                     #0#))
                               1)
                        |o| (QREFELT $ 104))
                    (EXIT (CONS 0
                                (QVELT (PROG2
                                        (LETT #0# (QVELT |p| 1) . #1#)
                                        (QCDR #0#)
                                         (|check-union| (QEQCAR #0# 1)
                                          (|Record|
                                           (|:| |tag|
                                            (|SingleInteger|))
                                           (|:| |op| (|BasicOperator|))
                                           (|:| |arg| (|List| $)))
                                          #0#))
                                       2)))))))))
           (EXIT (CONS 1 "failed")))))) 

(DEFUN |PATTERN;predicates;$L;47| (|p| $)
  (PROG (#0=#:G2255)
    (RETURN
      (COND
        ((SPADCALL |p| (QREFELT $ 29))
         (QVELT (PROG2 (LETT #0# (QVELT |p| 1)
                             |PATTERN;predicates;$L;47|)
                       (QCDR #0#)
                  (|check-union| (QEQCAR #0# 4)
                      (|Record| (|:| |tag| (|SingleInteger|))
                          (|:| |val| (|Symbol|))
                          (|:| |pred| (|List| (|Any|)))
                          (|:| |bad| (|List| (|Any|))))
                      #0#))
                2))
        ('T NIL))))) 

(DEFUN |PATTERN;setPredicates;$L$;48| (|p| |l| $)
  (PROG (#0=#:G2266)
    (RETURN
      (SEQ (COND
             ((SPADCALL |p| (QREFELT $ 46))
              (SEQ (QSETVELT
                       (PROG2 (LETT #0# (QVELT |p| 1)
                                    |PATTERN;setPredicates;$L$;48|)
                              (QCDR #0#)
                         (|check-union| (QEQCAR #0# 4)
                             (|Record| (|:| |tag| (|SingleInteger|))
                                 (|:| |val| (|Symbol|))
                                 (|:| |pred| (|List| (|Any|)))
                                 (|:| |bad| (|List| (|Any|))))
                             #0#))
                       2 |l|)
                   (EXIT |p|)))
             ('T
              (|error| "Can only attach predicates to generic symbol"))))))) 

(DEFUN |PATTERN;resetBadValues;2$;49| (|p| $)
  (PROG (#0=#:G2278)
    (RETURN
      (SEQ (COND
             ((SPADCALL |p| (QREFELT $ 46))
              (SEQ (QSETVELT
                       (PROG2 (LETT #0# (QVELT |p| 1)
                                    |PATTERN;resetBadValues;2$;49|)
                              (QCDR #0#)
                         (|check-union| (QEQCAR #0# 4)
                             (|Record| (|:| |tag| (|SingleInteger|))
                                 (|:| |val| (|Symbol|))
                                 (|:| |pred| (|List| (|Any|)))
                                 (|:| |bad| (|List| (|Any|))))
                             #0#))
                       3 NIL)
                   (EXIT |p|)))
             ('T
              (|error| "Can only attach bad values to generic symbol"))))))) 

(DEFUN |PATTERN;addBadValue;$A$;50| (|p| |a| $)
  (PROG (#0=#:G2290)
    (RETURN
      (SEQ (COND
             ((SPADCALL |p| (QREFELT $ 46))
              (SEQ (COND
                     ((NULL (SPADCALL |a|
                                (QVELT (PROG2
                                        (LETT #0# (QVELT |p| 1)
                                         . #1=(|PATTERN;addBadValue;$A$;50|))
                                        (QCDR #0#)
                                         (|check-union| (QEQCAR #0# 4)
                                          (|Record|
                                           (|:| |tag|
                                            (|SingleInteger|))
                                           (|:| |val| (|Symbol|))
                                           (|:| |pred|
                                            (|List| (|Any|)))
                                           (|:| |bad| (|List| (|Any|))))
                                          #0#))
                                       3)
                                (QREFELT $ 107)))
                      (QSETVELT
                          (PROG2 (LETT #0# (QVELT |p| 1) . #1#)
                                 (QCDR #0#)
                            (|check-union| (QEQCAR #0# 4)
                                (|Record| (|:| |tag| (|SingleInteger|))
                                    (|:| |val| (|Symbol|))
                                    (|:| |pred| (|List| (|Any|)))
                                    (|:| |bad| (|List| (|Any|))))
                                #0#))
                          3
                          (CONS |a|
                                (QVELT (PROG2
                                        (LETT #0# (QVELT |p| 1) . #1#)
                                        (QCDR #0#)
                                         (|check-union| (QEQCAR #0# 4)
                                          (|Record|
                                           (|:| |tag|
                                            (|SingleInteger|))
                                           (|:| |val| (|Symbol|))
                                           (|:| |pred|
                                            (|List| (|Any|)))
                                           (|:| |bad| (|List| (|Any|))))
                                          #0#))
                                       3)))))
                   (EXIT |p|)))
             ('T
              (|error| "Can only attach bad values to generic symbol"))))))) 

(DEFUN |PATTERN;getBadValues;$L;51| (|p| $)
  (PROG (#0=#:G2303)
    (RETURN
      (COND
        ((SPADCALL |p| (QREFELT $ 46))
         (QVELT (PROG2 (LETT #0# (QVELT |p| 1)
                             |PATTERN;getBadValues;$L;51|)
                       (QCDR #0#)
                  (|check-union| (QEQCAR #0# 4)
                      (|Record| (|:| |tag| (|SingleInteger|))
                          (|:| |val| (|Symbol|))
                          (|:| |pred| (|List| (|Any|)))
                          (|:| |bad| (|List| (|Any|))))
                      #0#))
                3))
        ('T (|error| "Not a generic symbol")))))) 

(DEFUN |PATTERN;SYM2O| (|p| $)
  (PROG (|sy| #0=#:G2311 |i| #1=#:G2312)
    (RETURN
      (SEQ (LETT |sy| (SPADCALL (QVELT |p| 1) (QREFELT $ 110))
                 . #2=(|PATTERN;SYM2O|))
           (EXIT (COND
                   ((NULL (QVELT |p| 2)) |sy|)
                   ('T
                    (SPADCALL
                        (SPADCALL " | " |sy|
                                  (SPADCALL (ELT $ 111)
                                      (PROGN
                                        (LETT #0# NIL . #2#)
                                        (SEQ (LETT |i| 1 . #2#)
                                         (LETT #1#
                                          (LENGTH (QVELT |p| 2)) . #2#)
                                         G190
                                         (COND
                                           ((QSGREATERP |i| #1#)
                                            (GO G191)))
                                         (SEQ
                                          (EXIT
                                           (LETT #0#
                                            (CONS
                                             (SPADCALL "f"
                                              (SPADCALL |i|
                                               (QREFELT $ 112))
                                              (QREFELT $ 113))
                                             #0#) . #2#)))
                                         (LETT |i| (QSADD1 |i|) . #2#)
                                         (GO G190) G191
                                         (EXIT (NREVERSE0 #0#))))
                                      (QREFELT $ 54))
                                  (QREFELT $ 114))
                        (QREFELT $ 115))))))))) 

(DEFUN |PATTERN;variables;$L;53| (|p| $)
  (PROG (|q| #0=#:G2319 #1=#:G2320 #2=#:G2328 |r| #3=#:G2318
             #4=#:G2329)
    (RETURN
      (SEQ (COND
             ((SPADCALL |p| (QREFELT $ 25)) (SPADCALL (QREFELT $ 95)))
             ((SPADCALL |p| (QREFELT $ 46)) (LIST |p|))
             ('T
              (SEQ (LETT |q| (QVELT |p| 1)
                         . #5=(|PATTERN;variables;$L;53|))
                   (EXIT (COND
                           ((QEQCAR |q| 0) (SPADCALL (QREFELT $ 95)))
                           ((QEQCAR |q| 2)
                            (SPADCALL
                                (QCAR (PROG2 (LETT #0# |q| . #5#)
                                       (QCDR #0#)
                                        (|check-union| (QEQCAR #0# 2)
                                         (|Record| (|:| |val| $)
                                          (|:| |exponent|
                                           (|NonNegativeInteger|)))
                                         #0#)))
                                (QREFELT $ 116)))
                           ((QEQCAR |q| 3)
                            (SPADCALL
                                (SPADCALL
                                    (QCAR
                                     (PROG2 (LETT #1# |q| . #5#)
                                      (QCDR #1#)
                                       (|check-union| (QEQCAR #1# 3)
                                        (|Record| (|:| |num| $)
                                         (|:| |den| $))
                                        #1#)))
                                    (QREFELT $ 116))
                                (SPADCALL
                                    (QCDR
                                     (PROG2 (LETT #1# |q| . #5#)
                                      (QCDR #1#)
                                       (|check-union| (QEQCAR #1# 3)
                                        (|Record| (|:| |num| $)
                                         (|:| |den| $))
                                        #1#)))
                                    (QREFELT $ 116))
                                (QREFELT $ 117)))
                           ((QEQCAR |q| 1)
                            (SPADCALL
                                (PROGN
                                  (LETT #2# NIL . #5#)
                                  (SEQ (LETT |r| NIL . #5#)
                                       (LETT #4#
                                        (QVELT
                                         (PROG2 (LETT #3# |q| . #5#)
                                          (QCDR #3#)
                                           (|check-union|
                                            (QEQCAR #3# 1)
                                            (|Record|
                                             (|:| |tag|
                                              (|SingleInteger|))
                                             (|:| |op|
                                              (|BasicOperator|))
                                             (|:| |arg| (|List| $)))
                                            #3#))
                                         2) . #5#)
                                       G190
                                       (COND
                                         ((OR (ATOM #4#)
                                           (PROGN
                                             (LETT |r| (CAR #4#) . #5#)
                                             NIL))
                                          (GO G191)))
                                       (SEQ
                                        (EXIT
                                         (LETT #2#
                                          (CONS
                                           (SPADCALL |r|
                                            (QREFELT $ 116))
                                           #2#) . #5#)))
                                       (LETT #4# (CDR #4#) . #5#)
                                       (GO G190) G191
                                       (EXIT (NREVERSE0 #2#))))
                                (QREFELT $ 118)))
                           ('T (SPADCALL (QREFELT $ 95)))))))))))) 

(DEFUN |PATTERN;PAT2O| (|p| $)
  (PROG (#0=#:G2338 #1=#:G2336 #2=#:G2337 #3=#:G2355 |x| #4=#:G2356 |l|
            |u| #5=#:G2335)
    (RETURN
      (SEQ (COND
             ((QEQCAR |p| 0) (SPADCALL (CDR |p|) (QREFELT $ 119)))
             ((QEQCAR |p| 4)
              (|PATTERN;SYM2O|
                  (PROG2 (LETT #0# |p| . #6=(|PATTERN;PAT2O|))
                         (QCDR #0#)
                    (|check-union| (QEQCAR #0# 4)
                        (|Record| (|:| |tag| (|SingleInteger|))
                            (|:| |val| (|Symbol|))
                            (|:| |pred| (|List| (|Any|)))
                            (|:| |bad| (|List| (|Any|))))
                        #0#))
                  $))
             ((QEQCAR |p| 2)
              (SPADCALL
                  (SPADCALL
                      (QCAR (PROG2 (LETT #1# |p| . #6#) (QCDR #1#)
                              (|check-union| (QEQCAR #1# 2)
                                  (|Record| (|:| |val| $)
                                      (|:| |exponent|
                                       (|NonNegativeInteger|)))
                                  #1#)))
                      (QREFELT $ 50))
                  (SPADCALL
                      (QCDR (PROG2 (LETT #1# |p| . #6#) (QCDR #1#)
                              (|check-union| (QEQCAR #1# 2)
                                  (|Record| (|:| |val| $)
                                      (|:| |exponent|
                                       (|NonNegativeInteger|)))
                                  #1#)))
                      (QREFELT $ 112))
                  (QREFELT $ 120)))
             ((QEQCAR |p| 3)
              (SPADCALL
                  (SPADCALL
                      (QCAR (PROG2 (LETT #2# |p| . #6#) (QCDR #2#)
                              (|check-union| (QEQCAR #2# 3)
                                  (|Record| (|:| |num| $)
                                      (|:| |den| $))
                                  #2#)))
                      (QREFELT $ 50))
                  (SPADCALL
                      (QCDR (PROG2 (LETT #2# |p| . #6#) (QCDR #2#)
                              (|check-union| (QEQCAR #2# 3)
                                  (|Record| (|:| |num| $)
                                      (|:| |den| $))
                                  #2#)))
                      (QREFELT $ 50))
                  (QREFELT $ 121)))
             ('T
              (COND
                ((EQL (QVELT (PROG2 (LETT #5# |p| . #6#) (QCDR #5#)
                               (|check-union| (QEQCAR #5# 1)
                                   (|Record|
                                    (|:| |tag| (|SingleInteger|))
                                    (|:| |op| (|BasicOperator|))
                                    (|:| |arg| (|List| $)))
                                   #5#))
                             0)
                      1)
                 (|PATTERN;LPAT2O| (ELT $ 122)
                     (QVELT (PROG2 (LETT #5# |p| . #6#) (QCDR #5#)
                              (|check-union| (QEQCAR #5# 1)
                                  (|Record|
                                      (|:| |tag| (|SingleInteger|))
                                      (|:| |op| (|BasicOperator|))
                                      (|:| |arg| (|List| $)))
                                  #5#))
                            2)
                     $))
                ((EQL (QVELT (PROG2 (LETT #5# |p| . #6#) (QCDR #5#)
                               (|check-union| (QEQCAR #5# 1)
                                   (|Record|
                                    (|:| |tag| (|SingleInteger|))
                                    (|:| |op| (|BasicOperator|))
                                    (|:| |arg| (|List| $)))
                                   #5#))
                             0)
                      (SPADCALL 2 (QREFELT $ 33)))
                 (|PATTERN;LPAT2O| (ELT $ 123)
                     (QVELT (PROG2 (LETT #5# |p| . #6#) (QCDR #5#)
                              (|check-union| (QEQCAR #5# 1)
                                  (|Record|
                                      (|:| |tag| (|SingleInteger|))
                                      (|:| |op| (|BasicOperator|))
                                      (|:| |arg| (|List| $)))
                                  #5#))
                            2)
                     $))
                ((EQL (QVELT (PROG2 (LETT #5# |p| . #6#) (QCDR #5#)
                               (|check-union| (QEQCAR #5# 1)
                                   (|Record|
                                    (|:| |tag| (|SingleInteger|))
                                    (|:| |op| (|BasicOperator|))
                                    (|:| |arg| (|List| $)))
                                   #5#))
                             0)
                      (SPADCALL 3 (QREFELT $ 33)))
                 (SPADCALL
                     (QVELT (PROG2 (LETT #5# |p| . #6#) (QCDR #5#)
                              (|check-union| (QEQCAR #5# 1)
                                  (|Record|
                                      (|:| |tag| (|SingleInteger|))
                                      (|:| |op| (|BasicOperator|))
                                      (|:| |arg| (|List| $)))
                                  #5#))
                            2)
                     (QREFELT $ 124)))
                ((EQL (QVELT (PROG2 (LETT #5# |p| . #6#) (QCDR #5#)
                               (|check-union| (QEQCAR #5# 1)
                                   (|Record|
                                    (|:| |tag| (|SingleInteger|))
                                    (|:| |op| (|BasicOperator|))
                                    (|:| |arg| (|List| $)))
                                   #5#))
                             0)
                      (SPADCALL 4 (QREFELT $ 33)))
                 (SPADCALL 0 (QREFELT $ 125)))
                ((EQL (QVELT (PROG2 (LETT #5# |p| . #6#) (QCDR #5#)
                               (|check-union| (QEQCAR #5# 1)
                                   (|Record|
                                    (|:| |tag| (|SingleInteger|))
                                    (|:| |op| (|BasicOperator|))
                                    (|:| |arg| (|List| $)))
                                   #5#))
                             0)
                      (SPADCALL 5 (QREFELT $ 33)))
                 (SPADCALL 1 (QREFELT $ 125)))
                ('T
                 (SEQ (LETT |l|
                            (PROGN
                              (LETT #3# NIL . #6#)
                              (SEQ (LETT |x| NIL . #6#)
                                   (LETT #4#
                                    (QVELT
                                     (PROG2 (LETT #5# |p| . #6#)
                                      (QCDR #5#)
                                       (|check-union| (QEQCAR #5# 1)
                                        (|Record|
                                         (|:| |tag| (|SingleInteger|))
                                         (|:| |op| (|BasicOperator|))
                                         (|:| |arg| (|List| $)))
                                        #5#))
                                     2) . #6#)
                                   G190
                                   (COND
                                     ((OR (ATOM #4#)
                                       (PROGN
                                         (LETT |x| (CAR #4#) . #6#)
                                         NIL))
                                      (GO G191)))
                                   (SEQ
                                    (EXIT
                                     (LETT #3#
                                      (CONS
                                       (SPADCALL |x| (QREFELT $ 50))
                                       #3#) . #6#)))
                                   (LETT #4# (CDR #4#) . #6#) (GO G190)
                                   G191 (EXIT (NREVERSE0 #3#)))) . #6#)
                      (LETT |u|
                            (SPADCALL
                                (QVELT (PROG2 (LETT #5# |p| . #6#)
                                        (QCDR #5#)
                                         (|check-union| (QEQCAR #5# 1)
                                          (|Record|
                                           (|:| |tag|
                                            (|SingleInteger|))
                                           (|:| |op| (|BasicOperator|))
                                           (|:| |arg| (|List| $)))
                                          #5#))
                                       1)
                                (QREFELT $ 128)) . #6#)
                      (EXIT (COND
                              ((QEQCAR |u| 1)
                               (SPADCALL
                                   (SPADCALL
                                    (SPADCALL
                                     (QVELT
                                      (PROG2 (LETT #5# |p| . #6#)
                                       (QCDR #5#)
                                        (|check-union| (QEQCAR #5# 1)
                                         (|Record|
                                          (|:| |tag| (|SingleInteger|))
                                          (|:| |op| (|BasicOperator|))
                                          (|:| |arg| (|List| $)))
                                         #5#))
                                      1)
                                     (QREFELT $ 129))
                                    (QREFELT $ 110))
                                   |l| (QREFELT $ 130)))
                              ('T (SPADCALL |l| (QCDR |u|)))))))))))))) 

(DEFUN |PATTERN;patcopy| (|p| $)
  (PROG (#0=#:G2365 #1=#:G2371 |x| #2=#:G2362 #3=#:G2372 #4=#:G2364
            #5=#:G2363)
    (RETURN
      (SEQ (COND
             ((QEQCAR |p| 0) (CONS 0 (CDR |p|)))
             ((QEQCAR |p| 4)
              (CONS 4
                    (VECTOR (QVELT (PROG2
                                    (LETT #0# |p|
                                     . #6=(|PATTERN;patcopy|))
                                    (QCDR #0#)
                                     (|check-union| (QEQCAR #0# 4)
                                      (|Record|
                                       (|:| |tag| (|SingleInteger|))
                                       (|:| |val| (|Symbol|))
                                       (|:| |pred| (|List| (|Any|)))
                                       (|:| |bad| (|List| (|Any|))))
                                      #0#))
                                   0)
                            (QVELT (PROG2 (LETT #0# |p| . #6#)
                                    (QCDR #0#)
                                     (|check-union| (QEQCAR #0# 4)
                                      (|Record|
                                       (|:| |tag| (|SingleInteger|))
                                       (|:| |val| (|Symbol|))
                                       (|:| |pred| (|List| (|Any|)))
                                       (|:| |bad| (|List| (|Any|))))
                                      #0#))
                                   1)
                            (SPADCALL
                                (QVELT (PROG2 (LETT #0# |p| . #6#)
                                        (QCDR #0#)
                                         (|check-union| (QEQCAR #0# 4)
                                          (|Record|
                                           (|:| |tag|
                                            (|SingleInteger|))
                                           (|:| |val| (|Symbol|))
                                           (|:| |pred|
                                            (|List| (|Any|)))
                                           (|:| |bad| (|List| (|Any|))))
                                          #0#))
                                       2)
                                (QREFELT $ 131))
                            (SPADCALL
                                (QVELT (PROG2 (LETT #0# |p| . #6#)
                                        (QCDR #0#)
                                         (|check-union| (QEQCAR #0# 4)
                                          (|Record|
                                           (|:| |tag|
                                            (|SingleInteger|))
                                           (|:| |val| (|Symbol|))
                                           (|:| |pred|
                                            (|List| (|Any|)))
                                           (|:| |bad| (|List| (|Any|))))
                                          #0#))
                                       3)
                                (QREFELT $ 131)))))
             ((QEQCAR |p| 1)
              (CONS 1
                    (VECTOR (QVELT (PROG2 (LETT #2# |p| . #6#)
                                    (QCDR #2#)
                                     (|check-union| (QEQCAR #2# 1)
                                      (|Record|
                                       (|:| |tag| (|SingleInteger|))
                                       (|:| |op| (|BasicOperator|))
                                       (|:| |arg| (|List| $)))
                                      #2#))
                                   0)
                            (QVELT (PROG2 (LETT #2# |p| . #6#)
                                    (QCDR #2#)
                                     (|check-union| (QEQCAR #2# 1)
                                      (|Record|
                                       (|:| |tag| (|SingleInteger|))
                                       (|:| |op| (|BasicOperator|))
                                       (|:| |arg| (|List| $)))
                                      #2#))
                                   1)
                            (PROGN
                              (LETT #1# NIL . #6#)
                              (SEQ (LETT |x| NIL . #6#)
                                   (LETT #3#
                                    (QVELT
                                     (PROG2 (LETT #2# |p| . #6#)
                                      (QCDR #2#)
                                       (|check-union| (QEQCAR #2# 1)
                                        (|Record|
                                         (|:| |tag| (|SingleInteger|))
                                         (|:| |op| (|BasicOperator|))
                                         (|:| |arg| (|List| $)))
                                        #2#))
                                     2) . #6#)
                                   G190
                                   (COND
                                     ((OR (ATOM #3#)
                                       (PROGN
                                         (LETT |x| (CAR #3#) . #6#)
                                         NIL))
                                      (GO G191)))
                                   (SEQ
                                    (EXIT
                                     (LETT #1#
                                      (CONS
                                       (SPADCALL |x| (QREFELT $ 60))
                                       #1#) . #6#)))
                                   (LETT #3# (CDR #3#) . #6#) (GO G190)
                                   G191 (EXIT (NREVERSE0 #1#)))))))
             ((QEQCAR |p| 3)
              (CONS 3
                    (CONS (SPADCALL
                              (QCAR (PROG2 (LETT #4# |p| . #6#)
                                     (QCDR #4#)
                                      (|check-union| (QEQCAR #4# 3)
                                       (|Record| (|:| |num| $)
                                        (|:| |den| $))
                                       #4#)))
                              (QREFELT $ 60))
                          (SPADCALL
                              (QCDR (PROG2 (LETT #4# |p| . #6#)
                                     (QCDR #4#)
                                      (|check-union| (QEQCAR #4# 3)
                                       (|Record| (|:| |num| $)
                                        (|:| |den| $))
                                       #4#)))
                              (QREFELT $ 60)))))
             ('T
              (CONS 2
                    (CONS (SPADCALL
                              (QCAR (PROG2 (LETT #5# |p| . #6#)
                                     (QCDR #5#)
                                      (|check-union| (QEQCAR #5# 2)
                                       (|Record| (|:| |val| $)
                                        (|:| |exponent|
                                         (|NonNegativeInteger|)))
                                       #5#)))
                              (QREFELT $ 60))
                          (QCDR (PROG2 (LETT #5# |p| . #6#) (QCDR #5#)
                                  (|check-union| (QEQCAR #5# 2)
                                      (|Record| (|:| |val| $)
                                       (|:| |exponent|
                                        (|NonNegativeInteger|)))
                                      #5#))))))))))) 

(DEFUN |PATTERN;pateq?| (|p1| |p2| $)
  (PROG (#0=#:G2380 #1=#:G2381 #2=#:G2378 #3=#:G2379)
    (RETURN
      (COND
        ((QEQCAR |p1| 0)
         (COND
           ((QEQCAR |p2| 0)
            (SPADCALL (CDR |p1|) (CDR |p2|) (QREFELT $ 132)))
           (#4='T 'NIL)))
        ((QEQCAR |p1| 3)
         (COND
           ((QEQCAR |p2| 3)
            (COND
              ((SPADCALL
                   (QCAR (PROG2 (LETT #0# |p1| . #5=(|PATTERN;pateq?|))
                                (QCDR #0#)
                           (|check-union| (QEQCAR #0# 3)
                               (|Record| (|:| |num| $) (|:| |den| $))
                               #0#)))
                   (QCAR (CDR |p2|)) (QREFELT $ 77))
               (SPADCALL
                   (QCDR (PROG2 (LETT #0# |p1| . #5#) (QCDR #0#)
                           (|check-union| (QEQCAR #0# 3)
                               (|Record| (|:| |num| $) (|:| |den| $))
                               #0#)))
                   (QCDR (CDR |p2|)) (QREFELT $ 77)))
              ('T 'NIL)))
           (#4# 'NIL)))
        ((QEQCAR |p1| 4)
         (COND
           ((QEQCAR |p2| 4)
            (COND
              ((EQUAL (QVELT (PROG2 (LETT #1# |p1| . #5#) (QCDR #1#)
                               (|check-union| (QEQCAR #1# 4)
                                   (|Record|
                                    (|:| |tag| (|SingleInteger|))
                                    (|:| |val| (|Symbol|))
                                    (|:| |pred| (|List| (|Any|)))
                                    (|:| |bad| (|List| (|Any|))))
                                   #1#))
                             1)
                      (QVELT (CDR |p2|) 1))
               (COND
                 ((SPADCALL
                      (SPADCALL
                          (QVELT (PROG2 (LETT #1# |p1| . #5#)
                                        (QCDR #1#)
                                   (|check-union| (QEQCAR #1# 4)
                                    (|Record|
                                     (|:| |tag| (|SingleInteger|))
                                     (|:| |val| (|Symbol|))
                                     (|:| |pred| (|List| (|Any|)))
                                     (|:| |bad| (|List| (|Any|))))
                                    #1#))
                                 2)
                          (QREFELT $ 134))
                      (SPADCALL (QVELT (CDR |p2|) 2) (QREFELT $ 134))
                      (QREFELT $ 135))
                  (SPADCALL
                      (SPADCALL
                          (QVELT (PROG2 (LETT #1# |p1| . #5#)
                                        (QCDR #1#)
                                   (|check-union| (QEQCAR #1# 4)
                                    (|Record|
                                     (|:| |tag| (|SingleInteger|))
                                     (|:| |val| (|Symbol|))
                                     (|:| |pred| (|List| (|Any|)))
                                     (|:| |bad| (|List| (|Any|))))
                                    #1#))
                                 3)
                          (QREFELT $ 134))
                      (SPADCALL (QVELT (CDR |p2|) 3) (QREFELT $ 134))
                      (QREFELT $ 135)))
                 ('T 'NIL)))
              ('T 'NIL)))
           (#4# 'NIL)))
        ((QEQCAR |p1| 1)
         (COND
           ((QEQCAR |p2| 1)
            (COND
              ((EQL (QVELT (PROG2 (LETT #2# |p1| . #5#) (QCDR #2#)
                             (|check-union| (QEQCAR #2# 1)
                                 (|Record|
                                     (|:| |tag| (|SingleInteger|))
                                     (|:| |op| (|BasicOperator|))
                                     (|:| |arg| (|List| $)))
                                 #2#))
                           0)
                    (QVELT (CDR |p2|) 0))
               (COND
                 ((SPADCALL
                      (QVELT (PROG2 (LETT #2# |p1| . #5#) (QCDR #2#)
                               (|check-union| (QEQCAR #2# 1)
                                   (|Record|
                                    (|:| |tag| (|SingleInteger|))
                                    (|:| |op| (|BasicOperator|))
                                    (|:| |arg| (|List| $)))
                                   #2#))
                             1)
                      (QVELT (CDR |p2|) 1) (QREFELT $ 104))
                  (SPADCALL
                      (QVELT (PROG2 (LETT #2# |p1| . #5#) (QCDR #2#)
                               (|check-union| (QEQCAR #2# 1)
                                   (|Record|
                                    (|:| |tag| (|SingleInteger|))
                                    (|:| |op| (|BasicOperator|))
                                    (|:| |arg| (|List| $)))
                                   #2#))
                             2)
                      (QVELT (CDR |p2|) 2) (QREFELT $ 136)))
                 ('T 'NIL)))
              ('T 'NIL)))
           (#4# 'NIL)))
        ((QEQCAR |p2| 2)
         (COND
           ((EQL (QCDR (PROG2 (LETT #3# |p1| . #5#) (QCDR #3#)
                         (|check-union| (QEQCAR #3# 2)
                             (|Record| (|:| |val| $)
                                 (|:| |exponent|
                                      (|NonNegativeInteger|)))
                             #3#)))
                 (QCDR (CDR |p2|)))
            (SPADCALL
                (QCAR (PROG2 (LETT #3# |p1| . #5#) (QCDR #3#)
                        (|check-union| (QEQCAR #3# 2)
                            (|Record| (|:| |val| $)
                                (|:| |exponent| (|NonNegativeInteger|)))
                            #3#)))
                (QCAR (CDR |p2|)) (QREFELT $ 77)))
           ('T 'NIL)))
        (#4# 'NIL))))) 

(DEFUN |PATTERN;retractIfCan;$U;57| (|p| $)
  (PROG (#0=#:G2401)
    (RETURN
      (COND
        ((SPADCALL |p| (QREFELT $ 29))
         (CONS 0
               (QVELT (PROG2 (LETT #0# (QVELT |p| 1)
                                   |PATTERN;retractIfCan;$U;57|)
                             (QCDR #0#)
                        (|check-union| (QEQCAR #0# 4)
                            (|Record| (|:| |tag| (|SingleInteger|))
                                (|:| |val| (|Symbol|))
                                (|:| |pred| (|List| (|Any|)))
                                (|:| |bad| (|List| (|Any|))))
                            #0#))
                      1)))
        ('T (CONS 1 "failed")))))) 

(DEFUN |PATTERN;mkrsy| (|t| |c?| |o?| |m?| $)
  (PROG (|mlt| |opt|)
    (RETURN
      (SEQ (COND
             (|c?| (VECTOR 0 |t| NIL NIL))
             (#0='T
              (SEQ (LETT |mlt| (COND (|m?| 2) (#0# 0))
                         . #1=(|PATTERN;mkrsy|))
                   (LETT |opt| (COND (|o?| 4) (#0# 0)) . #1#)
                   (EXIT (VECTOR (LOGIOR (LOGIOR 1 |mlt|) |opt|) |t|
                                 NIL NIL))))))))) 

(DEFUN |PATTERN;patternVariable;S3B$;59| (|sy| |c?| |o?| |m?| $)
  (PROG (|rsy|)
    (RETURN
      (SEQ (LETT |rsy| (|PATTERN;mkrsy| |sy| |c?| |o?| |m?| $)
                 |PATTERN;patternVariable;S3B$;59|)
           (EXIT (|PATTERN;mkPat| (ZEROP (QVELT |rsy| 0))
                     (CONS 4 |rsy|) 0 $)))))) 

(DEFUN |Pattern| (#0=#:G2421)
  (PROG ()
    (RETURN
      (PROG (#1=#:G2422)
        (RETURN
          (COND
            ((LETT #1#
                   (|lassocShiftWithFunction| (LIST (|devaluate| #0#))
                       (HGET |$ConstructorCache| '|Pattern|)
                       '|domainEqualList|)
                   . #2=(|Pattern|))
             (|CDRwithIncrement| #1#))
            ('T
             (UNWIND-PROTECT
               (PROG1 (|Pattern;| #0#) (LETT #1# T . #2#))
               (COND
                 ((NOT #1#) (HREM |$ConstructorCache| '|Pattern|))))))))))) 

(DEFUN |Pattern;| (|#1|)
  (PROG (DV$1 |dv$| $ |pv$|)
    (RETURN
      (PROGN
        (LETT DV$1 (|devaluate| |#1|) . #0=(|Pattern|))
        (LETT |dv$| (LIST '|Pattern| DV$1) . #0#)
        (LETT $ (GETREFV 139) . #0#)
        (QSETREFV $ 0 |dv$|)
        (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #0#))
        (|haddProp| |$ConstructorCache| '|Pattern| (LIST DV$1)
            (CONS 1 $))
        (|stuffDomainSlots| $)
        (QSETREFV $ 6 |#1|)
        (QSETREFV $ 7
            (|Record| (|:| |cons?| (|Boolean|))
                (|:| |pat|
                     (|Union| (|:| |ret| |#1|)
                              (|:| |ker|
                                   (|Record|
                                    (|:| |tag| (|SingleInteger|))
                                    (|:| |op| (|BasicOperator|))
                                    (|:| |arg| (|List| $))))
                              (|:| |exp|
                                   (|Record| (|:| |val| $)
                                    (|:| |exponent|
                                     (|NonNegativeInteger|))))
                              (|:| |qot|
                                   (|Record| (|:| |num| $)
                                    (|:| |den| $)))
                              (|:| |sym|
                                   (|Record|
                                    (|:| |tag| (|SingleInteger|))
                                    (|:| |val| (|Symbol|))
                                    (|:| |pred| (|List| (|Any|)))
                                    (|:| |bad| (|List| (|Any|)))))))
                (|:| |lev| (|NonNegativeInteger|))
                (|:| |topvar| (|List| (|Symbol|)))
                (|:| |toppred| (|Any|))))
        (QSETREFV $ 12
            (SPADCALL (SPADCALL (QREFELT $ 9)) (QREFELT $ 11)))
        (QSETREFV $ 17 (SPADCALL 0 (QREFELT $ 16)))
        (COND
          ((|HasCategory| |#1| '(|Monoid|))
           (QSETREFV $ 71
               (CONS IDENTITY
                     (FUNCALL (|dispatchFunction| |PATTERN;One;$;38|)
                              $))))
          ('T
           (QSETREFV $ 71
               (CONS IDENTITY
                     (FUNCALL (|dispatchFunction| |PATTERN;One;$;39|)
                              $)))))
        (COND
          ((|HasCategory| |#1| '(|AbelianMonoid|))
           (QSETREFV $ 89
               (CONS IDENTITY
                     (FUNCALL (|dispatchFunction| |PATTERN;Zero;$;40|)
                              $))))
          ('T
           (QSETREFV $ 89
               (CONS IDENTITY
                     (FUNCALL (|dispatchFunction| |PATTERN;Zero;$;41|)
                              $)))))
        $)))) 

(MAKEPROP '|Pattern| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) '|Rep| (|Symbol|)
             (0 . |new|) (|BasicOperator|) (4 . |operator|) '|dummy|
             (|Any|) (|Integer|) (|AnyFunctions1| 14) (9 . |coerce|)
             '|nopred| |PATTERN;coerce;R$;1| (|Boolean|)
             |PATTERN;hasTopPredicate?;$B;3|
             (|Record| (|:| |var| 23) (|:| |pred| 13))
             |PATTERN;topPredicate;$R;4| (|List| 8)
             |PATTERN;setTopPredicate;$LA$;5| |PATTERN;constant?;$B;6|
             (|NonNegativeInteger|) |PATTERN;depth;$Nni;7|
             |PATTERN;inR?;$B;8| |PATTERN;symbol?;$B;9|
             (|Union| 56 '"failed") |PATTERN;isPlus;$U;10|
             (|SingleInteger|) (14 . |coerce|) |PATTERN;isTimes;$U;11|
             |PATTERN;isList;$U;12|
             (|Record| (|:| |val| $) (|:| |exponent| 26))
             (|Union| 36 '"failed") |PATTERN;isExpt;$U;13|
             (|Record| (|:| |num| $) (|:| |den| $))
             (|Union| 39 '"failed") |PATTERN;isQuotient;$U;14|
             (|List| 13) |PATTERN;predicates;$L;47|
             |PATTERN;hasPredicate?;$B;15| |PATTERN;quoted?;$B;16|
             |PATTERN;generic?;$B;17| |PATTERN;multiple?;$B;18|
             |PATTERN;optional?;$B;19| (|OutputForm|)
             |PATTERN;coerce;$Of;21| |PATTERN;**;3$;22|
             (|Mapping| 49 49 49) (|List| 49) (19 . |reduce|)
             |PATTERN;retract;$R;24| (|List| $) |PATTERN;convert;L$;25|
             (|Union| 6 '"failed") |PATTERN;retractIfCan;$U;26|
             |PATTERN;copy;2$;29| |PATTERN;setPredicates;$L$;48|
             |PATTERN;withPredicates;$L$;27|
             |PATTERN;patternVariable;S3B$;59| |PATTERN;coerce;S$;28|
             (|List| $$) (25 . |rest|) (30 . |empty?|) (35 . |first|)
             (40 . |reverse|) |PATTERN;optpair;LU;30| (45 . |One|)
             (49 . |max|) (|Mapping| 26 26 26) (|List| 26)
             (55 . |reduce|) (62 . =) |PATTERN;=;2$B;32|
             (68 . |second|)
             (|Record| (|:| |val| $) (|:| |exponent| $))
             (|Union| 79 '"failed") |PATTERN;isPower;$U;33|
             (|Mapping| 19 $$) (73 . |every?|) (|String|)
             (79 . |coerce|) (84 . |is?|) (90 . |#|) (95 . |last|)
             (100 . |Zero|) |PATTERN;elt;BoL$;35|
             (|Record| (|:| |op| 10) (|:| |arg| 56))
             (|Union| 91 '"failed") |PATTERN;isOp;$U;36| (104 . |One|)
             (108 . |empty|) (112 . |Zero|) |PATTERN;**;$Nni$;42|
             |PATTERN;/;3$;43| (116 . |concat|) (122 . |concat|)
             (128 . |concat|) |PATTERN;+;3$;44| |PATTERN;*;3$;45|
             (134 . =) |PATTERN;isOp;$BoU;46|
             |PATTERN;resetBadValues;2$;49| (140 . |member?|)
             |PATTERN;addBadValue;$A$;50| |PATTERN;getBadValues;$L;51|
             (146 . |coerce|) (151 . |and|) (157 . |coerce|)
             (162 . |sub|) (168 . |infix|) (175 . |paren|)
             |PATTERN;variables;$L;53| (180 . |concat!|)
             (186 . |concat|) (191 . |coerce|) (196 . **) (202 . /)
             (208 . +) (214 . *) (220 . |coerce|) (225 . |coerce|)
             (|Mapping| 49 53) (|Union| 126 '"failed")
             (230 . |display|) (235 . |name|) (240 . |prefix|)
             (246 . |copy|) (251 . =) (|Set| 13) (257 . |brace|)
             (262 . =) (268 . =) (|Union| 8 '"failed")
             |PATTERN;retractIfCan;$U;57|)
          '#(~= 274 |withPredicates| 280 |variables| 286 |topPredicate|
             291 |symbol?| 296 |setTopPredicate| 301 |setPredicates|
             308 |retractIfCan| 314 |retract| 324 |resetBadValues| 334
             |quoted?| 339 |predicates| 344 |patternVariable| 349
             |optpair| 357 |optional?| 362 |multiple?| 367 |latex| 372
             |isTimes| 377 |isQuotient| 382 |isPower| 387 |isPlus| 392
             |isOp| 397 |isList| 408 |isExpt| 413 |inR?| 418 |hash| 423
             |hasTopPredicate?| 428 |hasPredicate?| 433 |getBadValues|
             438 |generic?| 443 |elt| 448 |depth| 454 |copy| 459
             |convert| 464 |constant?| 469 |coerce| 474 |addBadValue|
             489 |Zero| 495 |One| 499 = 503 / 509 + 515 ** 521 * 533)
          'NIL
          (CONS (|makeByteWordVec2| 1 '(0 0 0 0 0))
                (CONS '#(|SetCategory&| |BasicType&| |RetractableTo&|
                         |RetractableTo&| NIL)
                      (CONS '#((|SetCategory|) (|BasicType|)
                               (|RetractableTo| 8) (|RetractableTo| 6)
                               (|CoercibleTo| 49))
                            (|makeByteWordVec2| 138
                                '(0 8 0 9 1 10 0 8 11 1 15 13 14 16 1
                                  32 0 14 33 2 53 49 52 0 54 1 65 0 0
                                  66 1 65 19 0 67 1 65 2 0 68 1 65 0 0
                                  69 0 0 0 71 2 26 0 0 0 72 3 74 26 73
                                  0 26 75 2 23 19 0 0 76 1 65 2 0 78 2
                                  65 19 82 0 83 1 8 0 84 85 2 10 19 0 8
                                  86 1 65 26 0 87 1 65 2 0 88 0 0 0 89
                                  0 6 0 94 0 65 0 95 0 6 0 96 2 65 0 0
                                  0 99 2 65 0 0 2 100 2 65 0 2 0 101 2
                                  10 19 0 0 104 2 42 19 13 0 107 1 8 49
                                  0 110 2 49 0 0 0 111 1 26 49 0 112 2
                                  49 0 0 0 113 3 49 0 0 0 0 114 1 49 0
                                  0 115 2 65 0 0 0 117 1 65 0 56 118 1
                                  6 49 0 119 2 49 0 0 0 120 2 49 0 0 0
                                  121 2 49 0 0 0 122 2 49 0 0 0 123 1
                                  65 49 0 124 1 14 49 0 125 1 10 127 0
                                  128 1 10 8 0 129 2 49 0 0 56 130 1 42
                                  0 0 131 2 6 19 0 0 132 1 133 0 42 134
                                  2 133 19 0 0 135 2 65 19 0 0 136 2 0
                                  19 0 0 1 2 0 0 0 42 62 1 0 56 0 116 1
                                  0 21 0 22 1 0 19 0 29 3 0 0 0 23 13
                                  24 2 0 0 0 42 61 1 0 137 0 138 1 0 58
                                  0 59 1 0 8 0 1 1 0 6 0 55 1 0 0 0 106
                                  1 0 19 0 45 1 0 42 0 43 4 0 0 8 19 19
                                  19 63 1 0 30 56 70 1 0 19 0 48 1 0 19
                                  0 47 1 0 84 0 1 1 0 30 0 34 1 0 40 0
                                  41 1 0 80 0 81 1 0 30 0 31 1 0 92 0
                                  93 2 0 30 0 10 105 1 0 30 0 35 1 0 37
                                  0 38 1 0 19 0 28 1 0 32 0 1 1 0 19 0
                                  20 1 0 19 0 44 1 0 42 0 109 1 0 19 0
                                  46 2 0 0 10 56 90 1 0 26 0 27 1 0 0 0
                                  60 1 0 0 56 57 1 0 19 0 25 1 0 0 8 64
                                  1 0 0 6 18 1 0 49 0 50 2 0 0 0 13 108
                                  0 0 0 89 0 0 0 71 2 0 19 0 0 77 2 0 0
                                  0 0 98 2 0 0 0 0 102 2 0 0 0 0 51 2 0
                                  0 0 26 97 2 0 0 0 0 103)))))
          '|lookupComplete|)) 
