
(/VERSIONCHECK 2) 

(DEFUN |MRATFAC;numer1| (|c| $)
  (SPADCALL (SPADCALL |c| (QREFELT $ 11)) (QREFELT $ 13))) 

(DEFUN |MRATFAC;numer2| (|pol| $)
  (SPADCALL (ELT $ 14) (CONS (|function| |MRATFAC;numer1|) $) |pol|
      (QREFELT $ 18))) 

(DEFUN |MRATFAC;coerce1| (|d| $)
  (SPADCALL (SPADCALL |d| (QREFELT $ 19)) (QREFELT $ 20))) 

(DEFUN |MRATFAC;coerce2| (|pp| $)
  (SPADCALL (ELT $ 21) (CONS (|function| |MRATFAC;coerce1|) $) |pp|
      (QREFELT $ 25))) 

(DEFUN |MRATFAC;factor;PF;5| (|p| $)
  (PROG (#0=#:G1833 |c| #1=#:G1834 |pden| |pol| |ipol| |ffact| |u|
            #2=#:G1835 #3=#:G1830 #4=#:G1828 #5=#:G1829)
    (RETURN
      (SEQ (LETT |pden|
                 (SPADCALL
                     (PROGN
                       (LETT #0# NIL . #6=(|MRATFAC;factor;PF;5|))
                       (SEQ (LETT |c| NIL . #6#)
                            (LETT #1#
                                  (SPADCALL |p| (QREFELT $ 27)) . #6#)
                            G190
                            (COND
                              ((OR (ATOM #1#)
                                   (PROGN
                                     (LETT |c| (CAR #1#) . #6#)
                                     NIL))
                               #7=(GO G191)))
                            (SEQ (EXIT (LETT #0#
                                        (CONS
                                         (SPADCALL |c| (QREFELT $ 28))
                                         #0#) . #6#)))
                            (LETT #1# (CDR #1#) . #6#) #8=(GO G190)
                            G191 (EXIT (NREVERSE0 #0#))))
                     (QREFELT $ 30)) . #6#)
           (LETT |pol|
                 (SPADCALL (SPADCALL |pden| (QREFELT $ 19)) |p|
                     (QREFELT $ 31)) . #6#)
           (LETT |ipol|
                 (SPADCALL (ELT $ 14)
                     (CONS (|function| |MRATFAC;numer1|) $) |pol|
                     (QREFELT $ 18)) . #6#)
           (LETT |ffact| (SPADCALL |ipol| (QREFELT $ 34)) . #6#)
           (EXIT (SPADCALL
                     (SPADCALL
                         (SPADCALL (|spadConstant| $ 35) |pden|
                             (QREFELT $ 38))
                         (SPADCALL (ELT $ 21)
                             (CONS (|function| |MRATFAC;coerce1|) $)
                             (SPADCALL |ffact| (QREFELT $ 39))
                             (QREFELT $ 25))
                         (QREFELT $ 31))
                     (PROGN
                       (LETT #5# NIL . #6#)
                       (SEQ (LETT |u| NIL . #6#)
                            (LETT #2#
                                  (SPADCALL |ffact| (QREFELT $ 44)) . #6#)
                            G190
                            (COND
                              ((OR (ATOM #2#)
                                   (PROGN
                                     (LETT |u| (CAR #2#) . #6#)
                                     NIL))
                               #7#))
                            (SEQ (EXIT (PROGN
                                         (LETT #3#
                                          (SPADCALL
                                           (SPADCALL (ELT $ 21)
                                            (CONS
                                             (|function|
                                              |MRATFAC;coerce1|)
                                             $)
                                            (QCAR |u|) (QREFELT $ 25))
                                           (QCDR |u|) (QREFELT $ 47)) . #6#)
                                         (COND
                                           (#5#
                                            (LETT #4#
                                             (SPADCALL #4# #3#
                                              (QREFELT $ 48)) . #6#))
                                           ('T
                                            (PROGN
                                              (LETT #4# #3# . #6#)
                                              (LETT #5# 'T . #6#)))))))
                            (LETT #2# (CDR #2#) . #6#) #8# G191
                            (EXIT NIL))
                       (COND (#5# #4#) ('T (|spadConstant| $ 49))))
                     (QREFELT $ 50))))))) 

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

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

(MAKEPROP '|MRationalFactorize| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|)
             (|local| |#3|) (|local| |#4|) (|Fraction| 8) (0 . |numer|)
             (|SparseMultivariatePolynomial| 8 7) (5 . |coerce|)
             (10 . |coerce|) (|Mapping| 12 7) (|Mapping| 12 10)
             (|PolynomialCategoryLifting| 6 7 10 9 12) (15 . |map|)
             (22 . |coerce|) (27 . |coerce|) (32 . |coerce|)
             (|Mapping| 9 7) (|Mapping| 9 8)
             (|PolynomialCategoryLifting| (|IndexedExponents| 7) 7 8 12
                 9)
             (37 . |map|) (|List| 10) (44 . |coefficients|)
             (49 . |denom|) (|List| $) (54 . |lcm|) (59 . *)
             (|Factored| 12)
             (|MultivariateFactorize| 7 (|IndexedExponents| 7) 8 12)
             (65 . |factor|) (70 . |One|) (74 . |One|) (78 . |One|)
             (82 . /) (88 . |unit|) (|Fraction| 45) (93 . |One|)
             (|Record| (|:| |factor| 12) (|:| |exponent| 45))
             (|List| 42) (97 . |factors|) (|Integer|) (|Factored| 9)
             (102 . |primeFactor|) (108 . *) (114 . |One|) (118 . *)
             |MRATFAC;factor;PF;5|)
          '#(|factor| 124) 'NIL
          (CONS (|makeByteWordVec2| 1 'NIL)
                (CONS '#()
                      (CONS '#()
                            (|makeByteWordVec2| 51
                                '(1 10 8 0 11 1 12 0 8 13 1 12 0 7 14 3
                                  17 12 15 16 9 18 1 10 0 8 19 1 9 0 10
                                  20 1 9 0 7 21 3 24 9 22 23 12 25 1 9
                                  26 0 27 1 10 8 0 28 1 8 0 29 30 2 9 0
                                  10 0 31 1 33 32 12 34 0 8 0 35 0 9 0
                                  36 0 12 0 37 2 10 0 8 8 38 1 32 12 0
                                  39 0 40 0 41 1 32 43 0 44 2 46 0 9 45
                                  47 2 46 0 0 0 48 0 46 0 49 2 46 0 9 0
                                  50 1 0 46 9 51)))))
          '|lookupComplete|)) 
