
(/VERSIONCHECK 2) 

(DEFUN |PMDOWN;fixPredicate;MM;1| (|f| $)
  (CONS #'|PMDOWN;fixPredicate;MM;1!0| (VECTOR |f| $))) 

(DEFUN |PMDOWN;fixPredicate;MM;1!0| (|#1| $$)
  (SPADCALL (SPADCALL |#1| (QREFELT (QREFELT $$ 1) 9)) (QREFELT $$ 0))) 

(DEFUN |PMDOWN;patternMatch;AP2Pmr;2| (|a| |p| |l| $)
  (PROG (|u|)
    (RETURN
      (SEQ (LETT |u|
                 (|PMDOWN;fixPredicates| |p| |l|
                     (SPADCALL (QREFELT $ 14)) $)
                 |PMDOWN;patternMatch;AP2Pmr;2|)
           (EXIT (COND
                   ((QEQCAR |u| 1) (SPADCALL (QREFELT $ 16)))
                   ('T
                    (SPADCALL |l|
                        (SPADCALL
                            (CONS #'|PMDOWN;patternMatch;AP2Pmr;2!0| $)
                            (SPADCALL |a| (QCAR (QCDR |u|))
                                (QCDR (QCDR |u|)) (QREFELT $ 19))
                            (QREFELT $ 22))
                        (QREFELT $ 23))))))))) 

(DEFUN |PMDOWN;patternMatch;AP2Pmr;2!0| (|#1| $)
  (SPADCALL |#1| (QREFELT $ 9))) 

(DEFUN |PMDOWN;inA| (|p| |l| $)
  (PROG (|u| |r|)
    (RETURN
      (SEQ (LETT |u| (SPADCALL |p| |l| (QREFELT $ 26))
                 . #0=(|PMDOWN;inA|))
           (EXIT (COND
                   ((QEQCAR |u| 1) (CONS 0 NIL))
                   (#1='T
                    (SEQ (LETT |r|
                               (SPADCALL (QCDR |u|) (QREFELT $ 28)) . #0#)
                         (EXIT (COND
                                 ((QEQCAR |r| 0)
                                  (CONS 0 (LIST (QCDR |r|))))
                                 (#1# (CONS 1 "failed")))))))))))) 

(DEFUN |PMDOWN;fixList| (|fn| |l| |lb| |la| $)
  (PROG (|x| #0=#:G1862 |f| #1=#:G1861 |ll|)
    (RETURN
      (SEQ (EXIT (SEQ (LETT |ll| NIL . #2=(|PMDOWN;fixList|))
                      (SEQ (LETT |x| NIL . #2#) (LETT #0# |l| . #2#)
                           G190
                           (COND
                             ((OR (ATOM #0#)
                                  (PROGN
                                    (LETT |x| (CAR #0#) . #2#)
                                    NIL))
                              (GO G191)))
                           (SEQ (LETT |f|
                                      (|PMDOWN;fixPredicates| |x| |lb|
                                       |la| $) . #2#)
                                (EXIT (COND
                                        ((QEQCAR |f| 1)
                                         (PROGN
                                           (LETT #1#
                                            (CONS 1 "failed") . #2#)
                                           (GO #1#)))
                                        ('T
                                         (SEQ
                                          (LETT |ll|
                                           (CONS (QCAR (QCDR |f|))
                                            |ll|) . #2#)
                                          (EXIT
                                           (LETT |la|
                                            (QCDR (QCDR |f|)) . #2#)))))))
                           (LETT #0# (CDR #0#) . #2#) (GO G190) G191
                           (EXIT NIL))
                      (EXIT (CONS 0 (CONS (SPADCALL |ll| |fn|) |la|)))))
           #1# (EXIT #1#))))) 

(DEFUN |PMDOWN;fixPred| (|f| $)
  (PROG (|u| |g|)
    (RETURN
      (SEQ (LETT |u| (SPADCALL |f| (QREFELT $ 32))
                 . #0=(|PMDOWN;fixPred|))
           (EXIT (COND
                   ((QEQCAR |u| 1) (CONS 1 "failed"))
                   ('T
                    (SEQ (LETT |g|
                               (SPADCALL (QCDR |u|) (QREFELT $ 12)) . #0#)
                         (EXIT (CONS 0 (SPADCALL |g| (QREFELT $ 34)))))))))))) 

(DEFUN |PMDOWN;fixPredicates| (|p| |lb| |la| $)
  (PROG (|r| #0=#:G1951 |u| #1=#:G1895 |ur| |us| #2=#:G1902 |v|
             #3=#:G1911 |vr| |fn| |fd| |w| #4=#:G1921 |wr| |f| |uu|
             #5=#:G1930 |uur| |fv| |fe| |ua| #6=#:G1953 |g| #7=#:G1954
             |h| #8=#:G1952 |lp| |q|)
    (RETURN
      (SEQ (EXIT (SEQ (EXIT (SEQ (SEQ (LETT |r|
                                       (SPADCALL |p| (QREFELT $ 36))
                                       . #9=(|PMDOWN;fixPredicates|))
                                      (EXIT
                                       (COND
                                         ((OR (QEQCAR |r| 0)
                                           (SPADCALL |p|
                                            (QREFELT $ 38)))
                                          (PROGN
                                            (LETT #0#
                                             (CONS 0 (CONS |p| |la|)) . #9#)
                                            (GO #0#))))))
                                 (EXIT (COND
                                         ((QEQCAR
                                           (LETT |u|
                                            (SPADCALL |p|
                                             (QREFELT $ 41)) . #9#)
                                           0)
                                          (SEQ
                                           (LETT |ur|
                                            (PROG2 (LETT #1# |u| . #9#)
                                             (QCDR #1#)
                                              (|check-union|
                                               (QEQCAR #1# 0)
                                               (|Record|
                                                (|:| |op|
                                                 (|BasicOperator|))
                                                (|:| |arg|
                                                 (|List|
                                                  (|Pattern|
                                                   (QREFELT $ 6)))))
                                               #1#)) . #9#)
                                           (EXIT
                                            (|PMDOWN;fixList|
                                             (CONS
                                              #'|PMDOWN;fixPredicates!0|
                                              (VECTOR $ |ur|))
                                             (QCDR |ur|) |lb| |la| $))))
                                         ((QEQCAR
                                           (LETT |us|
                                            (SPADCALL |p|
                                             (QREFELT $ 46)) . #9#)
                                           0)
                                          (|PMDOWN;fixList|
                                           (CONS
                                            #'|PMDOWN;fixPredicates!1|
                                            $)
                                           (PROG2 (LETT #2# |us| . #9#)
                                            (QCDR #2#)
                                             (|check-union|
                                              (QEQCAR #2# 0)
                                              (|List|
                                               (|Pattern|
                                                (QREFELT $ 6)))
                                              #2#))
                                           |lb| |la| $))
                                         ((QEQCAR
                                           (LETT |us|
                                            (SPADCALL |p|
                                             (QREFELT $ 51)) . #9#)
                                           0)
                                          (|PMDOWN;fixList|
                                           (CONS
                                            #'|PMDOWN;fixPredicates!2|
                                            $)
                                           (PROG2 (LETT #2# |us| . #9#)
                                            (QCDR #2#)
                                             (|check-union|
                                              (QEQCAR #2# 0)
                                              (|List|
                                               (|Pattern|
                                                (QREFELT $ 6)))
                                              #2#))
                                           |lb| |la| $))
                                         ((QEQCAR
                                           (LETT |v|
                                            (SPADCALL |p|
                                             (QREFELT $ 55)) . #9#)
                                           0)
                                          (SEQ
                                           (LETT |vr|
                                            (PROG2 (LETT #3# |v| . #9#)
                                             (QCDR #3#)
                                              (|check-union|
                                               (QEQCAR #3# 0)
                                               (|Record|
                                                (|:| |num|
                                                 (|Pattern|
                                                  (QREFELT $ 6)))
                                                (|:| |den|
                                                 (|Pattern|
                                                  (QREFELT $ 6))))
                                               #3#)) . #9#)
                                           (LETT |fn|
                                            (|PMDOWN;fixPredicates|
                                             (QCAR |vr|) |lb| |la| $) . #9#)
                                           (EXIT
                                            (COND
                                              ((QEQCAR |fn| 1)
                                               (CONS 1 "failed"))
                                              ('T
                                               (SEQ
                                                (LETT |la|
                                                 (QCDR (QCDR |fn|)) . #9#)
                                                (LETT |fd|
                                                 (|PMDOWN;fixPredicates|
                                                  (QCDR |vr|) |lb| |la|
                                                  $) . #9#)
                                                (EXIT
                                                 (COND
                                                   ((QEQCAR |fd| 1)
                                                    (CONS 1 "failed"))
                                                   ('T
                                                    (CONS 0
                                                     (CONS
                                                      (SPADCALL
                                                       (QCAR
                                                        (QCDR |fn|))
                                                       (QCAR
                                                        (QCDR |fd|))
                                                       (QREFELT $ 56))
                                                      (QCDR
                                                       (QCDR |fd|)))))))))))))
                                         ((QEQCAR
                                           (LETT |w|
                                            (SPADCALL |p|
                                             (QREFELT $ 59)) . #9#)
                                           0)
                                          (SEQ
                                           (LETT |wr|
                                            (PROG2 (LETT #4# |w| . #9#)
                                             (QCDR #4#)
                                              (|check-union|
                                               (QEQCAR #4# 0)
                                               (|Record|
                                                (|:| |val|
                                                 (|Pattern|
                                                  (QREFELT $ 6)))
                                                (|:| |exponent|
                                                 (|NonNegativeInteger|)))
                                               #4#)) . #9#)
                                           (LETT |f|
                                            (|PMDOWN;fixPredicates|
                                             (QCAR |wr|) |lb| |la| $) . #9#)
                                           (EXIT
                                            (COND
                                              ((QEQCAR |f| 1)
                                               (CONS 1 "failed"))
                                              ('T
                                               (CONS 0
                                                (CONS
                                                 (SPADCALL
                                                  (QCAR (QCDR |f|))
                                                  (QCDR |wr|)
                                                  (QREFELT $ 61))
                                                 (QCDR (QCDR |f|)))))))))
                                         ((QEQCAR
                                           (LETT |uu|
                                            (SPADCALL |p|
                                             (QREFELT $ 64)) . #9#)
                                           0)
                                          (SEQ
                                           (LETT |uur|
                                            (PROG2
                                             (LETT #5# |uu| . #9#)
                                             (QCDR #5#)
                                              (|check-union|
                                               (QEQCAR #5# 0)
                                               (|Record|
                                                (|:| |val|
                                                 (|Pattern|
                                                  (QREFELT $ 6)))
                                                (|:| |exponent|
                                                 (|Pattern|
                                                  (QREFELT $ 6))))
                                               #5#)) . #9#)
                                           (LETT |fv|
                                            (|PMDOWN;fixPredicates|
                                             (QCAR |uur|) |lb| |la| $) . #9#)
                                           (EXIT
                                            (COND
                                              ((QEQCAR |fv| 1)
                                               (CONS 1 "failed"))
                                              ('T
                                               (SEQ
                                                (LETT |la|
                                                 (QCDR (QCDR |fv|)) . #9#)
                                                (LETT |fe|
                                                 (|PMDOWN;fixPredicates|
                                                  (QCDR |uur|) |lb|
                                                  |la| $) . #9#)
                                                (EXIT
                                                 (COND
                                                   ((QEQCAR |fe| 1)
                                                    (CONS 1 "failed"))
                                                   ('T
                                                    (CONS 0
                                                     (CONS
                                                      (SPADCALL
                                                       (QCAR
                                                        (QCDR |fv|))
                                                       (QCAR
                                                        (QCDR |fe|))
                                                       (QREFELT $ 65))
                                                      (QCDR
                                                       (QCDR |fe|)))))))))))))
                                         ((SPADCALL |p| (QREFELT $ 66))
                                          (SEQ
                                           (LETT |ua|
                                            (|PMDOWN;inA| |p| |lb| $) . #9#)
                                           (EXIT
                                            (COND
                                              ((QEQCAR |ua| 1)
                                               (CONS 1 "failed"))
                                              ('T
                                               (SEQ
                                                (LETT |lp|
                                                 (PROGN
                                                   (LETT #6# NIL . #9#)
                                                   (SEQ
                                                    (LETT |g|
                                                     NIL . #9#)
                                                    (LETT #7#
                                                     (SPADCALL |p|
                                                      (QREFELT $ 68)) . #9#)
                                                    G190
                                                    (COND
                                                      ((OR (ATOM #7#)
                                                        (PROGN
                                                          (LETT |g|
                                                           (CAR #7#) . #9#)
                                                          NIL))
                                                       (GO G191)))
                                                    (SEQ
                                                     (EXIT
                                                      (LETT #6#
                                                       (CONS
                                                        (SEQ
                                                         (LETT |h|
                                                          (|PMDOWN;fixPred|
                                                           |g| $) . #9#)
                                                         (EXIT
                                                          (COND
                                                            ((QEQCAR
                                                              |h| 0)
                                                             (QCDR |h|))
                                                            ('T
                                                             (PROGN
                                                               (LETT
                                                                #8#
                                                                (CONS 1
                                                                 "failed") . #9#)
                                                               (GO #8#))))))
                                                        #6#) . #9#)))
                                                    (LETT #7#
                                                     (CDR #7#) . #9#)
                                                    (GO G190) G191
                                                    (EXIT
                                                     (NREVERSE0 #6#)))) . #9#)
                                                (LETT |q|
                                                 (SPADCALL
                                                  (SPADCALL
                                                   (SPADCALL |p|
                                                    (QREFELT $ 70))
                                                   (SPADCALL |p|
                                                    (QREFELT $ 71))
                                                   (SPADCALL |p|
                                                    (QREFELT $ 72))
                                                   (SPADCALL |p|
                                                    (QREFELT $ 73))
                                                   (QREFELT $ 74))
                                                  |lp| (QREFELT $ 75)) . #9#)
                                                (EXIT
                                                 (CONS 0
                                                  (CONS |q|
                                                   (COND
                                                     ((NULL
                                                       (QCDR |ua|))
                                                      |la|)
                                                     ('T
                                                      (SPADCALL |q|
                                                       (|SPADfirst|
                                                        (QCDR |ua|))
                                                       |la|
                                                       (QREFELT $ 76)))))))))))))
                                         ('T
                                          (|error| "Should not happen"))))))
                      #0# (EXIT #0#)))
           #8# (EXIT #8#))))) 

(DEFUN |PMDOWN;fixPredicates!2| (|#1| $)
  (SPADCALL (ELT $ 52) |#1| (QREFELT $ 50))) 

(DEFUN |PMDOWN;fixPredicates!1| (|#1| $)
  (SPADCALL (ELT $ 47) |#1| (QREFELT $ 50))) 

(DEFUN |PMDOWN;fixPredicates!0| (|#1| $$)
  (SPADCALL (QCAR (QREFELT $$ 1)) |#1| (QREFELT (QREFELT $$ 0) 44))) 

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

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

(MAKEPROP '|PatternMatchPushDown| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|)
             (|local| |#3|) (0 . |coerce|) (|Mapping| 37 7)
             (|Mapping| 37 8) |PMDOWN;fixPredicate;MM;1|
             (|PatternMatchResult| 6 7) (5 . |new|)
             (|PatternMatchResult| 6 8) (9 . |failed|)
             (|PatternMatchResult| 6 $) (|Pattern| 6)
             (13 . |patternMatch|) (|Mapping| 8 7)
             (|PatternMatchResultFunctions2| 6 7 8) (20 . |map|)
             (26 . |union|) |PMDOWN;patternMatch;AP2Pmr;2|
             (|Union| 8 '"failed") (32 . |getMatch|)
             (|Union| 7 '"failed") (38 . |retractIfCan|)
             (|Union| 11 '"failed") (|Any|) (|AnyFunctions1| 11)
             (43 . |retractIfCan|) (|AnyFunctions1| 10) (48 . |coerce|)
             (|Union| 6 '"failed") (53 . |retractIfCan|) (|Boolean|)
             (58 . |quoted?|) (|Record| (|:| |op| 42) (|:| |arg| 43))
             (|Union| 39 '"failed") (63 . |isOp|) (|BasicOperator|)
             (|List| $) (68 . |elt|) (|Union| 43 '"failed")
             (74 . |isPlus|) (79 . +) (|Mapping| 18 18 18) (|List| 18)
             (85 . |reduce|) (91 . |isTimes|) (96 . *)
             (|Record| (|:| |num| $) (|:| |den| $))
             (|Union| 53 '"failed") (102 . |isQuotient|) (107 . /)
             (|Record| (|:| |val| $) (|:| |exponent| 60))
             (|Union| 57 '"failed") (113 . |isExpt|)
             (|NonNegativeInteger|) (118 . **)
             (|Record| (|:| |val| $) (|:| |exponent| $))
             (|Union| 62 '"failed") (124 . |isPower|) (129 . **)
             (135 . |generic?|) (|List| 30) (140 . |predicates|)
             (|Symbol|) (145 . |retract|) (150 . |constant?|)
             (155 . |optional?|) (160 . |multiple?|)
             (165 . |patternVariable|) (173 . |setPredicates|)
             (179 . |insertMatch|))
          '#(|patternMatch| 186 |fixPredicate| 193) 'NIL
          (CONS (|makeByteWordVec2| 1 'NIL)
                (CONS '#()
                      (CONS '#()
                            (|makeByteWordVec2| 76
                                '(1 8 0 7 9 0 13 0 14 0 15 0 16 3 7 17
                                  0 18 17 19 2 21 15 20 13 22 2 15 0 0
                                  0 23 2 15 25 18 0 26 1 8 27 0 28 1 31
                                  29 30 32 1 33 30 10 34 1 18 35 0 36 1
                                  18 37 0 38 1 18 40 0 41 2 18 0 42 43
                                  44 1 18 45 0 46 2 18 0 0 0 47 2 49 18
                                  48 0 50 1 18 45 0 51 2 18 0 0 0 52 1
                                  18 54 0 55 2 18 0 0 0 56 1 18 58 0 59
                                  2 18 0 0 60 61 1 18 63 0 64 2 18 0 0
                                  0 65 1 18 37 0 66 1 18 67 0 68 1 18
                                  69 0 70 1 18 37 0 71 1 18 37 0 72 1
                                  18 37 0 73 4 18 0 69 37 37 37 74 2 18
                                  0 0 67 75 3 13 0 18 7 0 76 3 0 15 7
                                  18 15 24 1 0 10 11 12)))))
          '|lookupComplete|)) 
