
(/VERSIONCHECK 2) 

(DEFUN |FRUTIL;mergeFactors;3F;1| (|f| |g| $)
  (SPADCALL
      (SPADCALL (SPADCALL |f| (QREFELT $ 8))
          (SPADCALL |g| (QREFELT $ 8)) (QREFELT $ 9))
      (APPEND (SPADCALL |f| (QREFELT $ 13))
              (SPADCALL |g| (QREFELT $ 13)))
      (QREFELT $ 14))) 

(DEFUN |FRUTIL;refine;FMF;2| (|f| |func| $)
  (PROG (|item| #0=#:G1841 |fitem| #1=#:G1828 |u| #2=#:G1842 |v|
                #3=#:G1843 |l|)
    (RETURN
      (SEQ (LETT |u| (SPADCALL |f| (QREFELT $ 8))
                 . #4=(|FRUTIL;refine;FMF;2|))
           (LETT |l| NIL . #4#)
           (SEQ (LETT |item| NIL . #4#)
                (LETT #0# (SPADCALL |f| (QREFELT $ 13)) . #4#) G190
                (COND
                  ((OR (ATOM #0#)
                       (PROGN (LETT |item| (CAR #0#) . #4#) NIL))
                   #5=(GO G191)))
                (SEQ (LETT |fitem|
                           (SPADCALL (QVELT |item| 1) |func|) . #4#)
                     (LETT |u|
                           (SPADCALL |u|
                               (SPADCALL
                                   (SPADCALL |fitem| (QREFELT $ 8))
                                   (PROG1
                                    (LETT #1# (QVELT |item| 2) . #4#)
                                     (|check-subtype| (>= #1# 0)
                                      '(|NonNegativeInteger|) #1#))
                                   (QREFELT $ 17))
                               (QREFELT $ 9)) . #4#)
                     (EXIT (COND
                             ((EQL (QVELT |item| 2) 1)
                              (LETT |l|
                                    (SPADCALL
                                     (SPADCALL |fitem| (QREFELT $ 13))
                                     |l| (QREFELT $ 18)) . #4#))
                             ('T
                              (LETT |l|
                                    (SPADCALL
                                     (PROGN
                                       (LETT #2# NIL . #4#)
                                       (SEQ (LETT |v| NIL . #4#)
                                        (LETT #3#
                                         (SPADCALL |fitem|
                                          (QREFELT $ 13)) . #4#)
                                        G190
                                        (COND
                                          ((OR (ATOM #3#)
                                            (PROGN
                                              (LETT |v|
                                               (CAR #3#) . #4#)
                                              NIL))
                                           #5#))
                                        (SEQ
                                         (EXIT
                                          (LETT #2#
                                           (CONS
                                            (VECTOR (QVELT |v| 0)
                                             (QVELT |v| 1)
                                             (* (QVELT |v| 2)
                                              (QVELT |item| 2)))
                                            #2#) . #4#)))
                                        (LETT #3# (CDR #3#) . #4#)
                                        #6=(GO G190) G191
                                        (EXIT (NREVERSE0 #2#))))
                                     |l| (QREFELT $ 18)) . #4#)))))
                (LETT #0# (CDR #0#) . #4#) #6# G191 (EXIT NIL))
           (EXIT (SPADCALL |u| |l| (QREFELT $ 14))))))) 

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

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

(MAKEPROP '|FactoredFunctionUtilities| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|Factored| 6)
             (0 . |unit|) (5 . *)
             (|Union| '"nil" '"sqfr" '"irred" '"prime")
             (|Record| (|:| |flg| 10) (|:| |fctr| 6)
                 (|:| |xpnt| (|Integer|)))
             (|List| 11) (11 . |factorList|) (16 . |makeFR|)
             |FRUTIL;mergeFactors;3F;1| (|NonNegativeInteger|)
             (22 . **) (28 . |concat|) (|Mapping| 7 6)
             |FRUTIL;refine;FMF;2|)
          '#(|refine| 34 |mergeFactors| 40) 'NIL
          (CONS (|makeByteWordVec2| 1 'NIL)
                (CONS '#()
                      (CONS '#()
                            (|makeByteWordVec2| 20
                                '(1 7 6 0 8 2 6 0 0 0 9 1 7 12 0 13 2 7
                                  0 6 12 14 2 6 0 0 16 17 2 12 0 0 0 18
                                  2 0 7 7 19 20 2 0 7 7 7 15)))))
          '|lookupComplete|)) 
