
(/VERSIONCHECK 2) 

(DEFUN |TWOFACT;computeDegree| (|m| |mx| |q| $)
  (PROG (|my| |n1| |n2| |n| #0=#:G1830)
    (RETURN
      (SEQ (LETT |my| (SPADCALL |m| (QREFELT $ 9))
                 . #1=(|TWOFACT;computeDegree|))
           (LETT |n1|
                 (INTEGER-LENGTH
                     (* (SPADCALL 10 |mx| (QREFELT $ 12)) |my|)) . #1#)
           (LETT |n2| (- (INTEGER-LENGTH |q|) 1) . #1#)
           (LETT |n| (+ (QUOTIENT2 |n1| |n2|) 1) . #1#)
           (EXIT (PROG1 (LETT #0# |n| . #1#)
                   (|check-subtype| (> #0# 0) '(|PositiveInteger|) #0#))))))) 

(DEFUN |TWOFACT;exchangeVars| (|p| $)
  (COND
    ((SPADCALL |p| (|spadConstant| $ 14) (QREFELT $ 16))
     (|spadConstant| $ 14))
    ('T
     (SPADCALL
         (|TWOFACT;exchangeVarTerm| (SPADCALL |p| (QREFELT $ 18))
             (SPADCALL |p| (QREFELT $ 9)) $)
         (|TWOFACT;exchangeVars| (SPADCALL |p| (QREFELT $ 19)) $)
         (QREFELT $ 20))))) 

(DEFUN |TWOFACT;exchangeVarTerm| (|c| |e| $)
  (COND
    ((SPADCALL |c| (|spadConstant| $ 21) (QREFELT $ 22))
     (|spadConstant| $ 14))
    ('T
     (SPADCALL
         (SPADCALL
             (SPADCALL (SPADCALL |c| (QREFELT $ 23)) |e|
                 (QREFELT $ 24))
             (SPADCALL |c| (QREFELT $ 25)) (QREFELT $ 26))
         (|TWOFACT;exchangeVarTerm| (SPADCALL |c| (QREFELT $ 27)) |e|
             $)
         (QREFELT $ 20))))) 

(DEFUN |TWOFACT;pthRoot| (|poly| |p| |PthRootPow| $)
  (PROG (|tmp|)
    (RETURN
      (SEQ (LETT |tmp|
                 (SPADCALL
                     (SPADCALL
                         (CONS #'|TWOFACT;pthRoot!0|
                               (VECTOR $ |PthRootPow|))
                         |poly| (QREFELT $ 30))
                     |p| (QREFELT $ 32))
                 |TWOFACT;pthRoot|)
           (EXIT (COND
                   ((QEQCAR |tmp| 1)
                    (|error| "consistency error in TwoFactor"))
                   ('T (QCDR |tmp|)))))))) 

(DEFUN |TWOFACT;pthRoot!0| (|#1| $$)
  (SPADCALL |#1| (QREFELT $$ 1) (QREFELT (QREFELT $$ 0) 28))) 

(DEFUN |TWOFACT;generalSqFr;SupF;5| (|m| $)
  (PROG (|l| #0=#:G1875 #1=#:G1876 |cont| #2=#:G1863 |sqfrm| |u|
             #3=#:G1877 #4=#:G1865 |uexp| |nfacs| |v| #5=#:G1878
             |unitPart| |sqp| #6=#:G1879 |w| #7=#:G1880 |contlist|
             |pfaclist|)
    (RETURN
      (SEQ (COND
             ((SPADCALL |m| (|spadConstant| $ 14) (QREFELT $ 16))
              (|spadConstant| $ 34))
             ((EQL (SPADCALL |m| (QREFELT $ 9)) 0)
              (SEQ (LETT |l|
                         (SPADCALL (SPADCALL |m| (QREFELT $ 18))
                             (QREFELT $ 36))
                         . #8=(|TWOFACT;generalSqFr;SupF;5|))
                   (EXIT (SPADCALL
                             (SPADCALL (SPADCALL |l| (QREFELT $ 38))
                                 (QREFELT $ 39))
                             (PROGN
                               (LETT #0# NIL . #8#)
                               (SEQ (LETT |u| NIL . #8#)
                                    (LETT #1#
                                     (SPADCALL |l| (QREFELT $ 43)) . #8#)
                                    G190
                                    (COND
                                      ((OR (ATOM #1#)
                                        (PROGN
                                          (LETT |u| (CAR #1#) . #8#)
                                          NIL))
                                       #9=(GO G191)))
                                    (SEQ
                                     (EXIT
                                      (LETT #0#
                                       (CONS
                                        (VECTOR (QVELT |u| 0)
                                         (SPADCALL (QVELT |u| 1)
                                          (QREFELT $ 39))
                                         (QVELT |u| 2))
                                        #0#) . #8#)))
                                    (LETT #1# (CDR #1#) . #8#)
                                    #10=(GO G190) G191
                                    (EXIT (NREVERSE0 #0#))))
                             (QREFELT $ 46)))))
             ('T
              (SEQ (LETT |cont| (SPADCALL |m| (QREFELT $ 47)) . #8#)
                   (LETT |m|
                         (PROG2 (LETT #2#
                                      (SPADCALL |m| |cont|
                                       (QREFELT $ 48)) . #8#)
                                (QCDR #2#)
                           (|check-union| (QEQCAR #2# 0)
                               (|SparseUnivariatePolynomial|
                                   (|SparseUnivariatePolynomial|
                                    (QREFELT $ 6)))
                               #2#)) . #8#)
                   (LETT |sqfrm| (SPADCALL |m| (QREFELT $ 49)) . #8#)
                   (LETT |pfaclist| NIL . #8#)
                   (LETT |unitPart|
                         (SPADCALL |sqfrm| (QREFELT $ 50)) . #8#)
                   (SEQ (LETT |u| NIL . #8#)
                        (LETT #3#
                              (SPADCALL |sqfrm| (QREFELT $ 51)) . #8#)
                        G190
                        (COND
                          ((OR (ATOM #3#)
                               (PROGN (LETT |u| (CAR #3#) . #8#) NIL))
                           #9#))
                        (SEQ (EXIT (COND
                                     ((SPADCALL (QVELT |u| 0)
                                       (CONS 0 "nil") (QREFELT $ 52))
                                      (SEQ
                                       (LETT |uexp|
                                        (PROG1
                                         (LETT #4# (QVELT |u| 2) . #8#)
                                          (|check-subtype| (>= #4# 0)
                                           '(|NonNegativeInteger|) #4#)) . #8#)
                                       (LETT |nfacs|
                                        (SPADCALL
                                         (|TWOFACT;exchangeVars|
                                          (QVELT |u| 1) $)
                                         (QREFELT $ 49)) . #8#)
                                       (SEQ (LETT |v| NIL . #8#)
                                        (LETT #5#
                                         (SPADCALL |nfacs|
                                          (QREFELT $ 51)) . #8#)
                                        G190
                                        (COND
                                          ((OR (ATOM #5#)
                                            (PROGN
                                              (LETT |v|
                                               (CAR #5#) . #8#)
                                              NIL))
                                           #9#))
                                        (SEQ
                                         (EXIT
                                          (LETT |pfaclist|
                                           (CONS
                                            (VECTOR (QVELT |v| 0)
                                             (|TWOFACT;exchangeVars|
                                              (QVELT |v| 1) $)
                                             (* (QVELT |v| 2) |uexp|))
                                            |pfaclist|) . #8#)))
                                        (LETT #5# (CDR #5#) . #8#) #10#
                                        G191 (EXIT NIL))
                                       (EXIT
                                        (LETT |unitPart|
                                         (SPADCALL
                                          (SPADCALL
                                           (SPADCALL |nfacs|
                                            (QREFELT $ 50))
                                           |uexp| (QREFELT $ 53))
                                          |unitPart| (QREFELT $ 54)) . #8#))))
                                     ('T
                                      (LETT |pfaclist|
                                       (CONS |u| |pfaclist|) . #8#)))))
                        (LETT #3# (CDR #3#) . #8#) #10# G191
                        (EXIT NIL))
                   (EXIT (COND
                           ((SPADCALL |cont| (|spadConstant| $ 56)
                                (QREFELT $ 22))
                            (SPADCALL |unitPart| |pfaclist|
                                (QREFELT $ 46)))
                           ('T
                            (SEQ (LETT |sqp|
                                       (SPADCALL |cont| (QREFELT $ 36)) . #8#)
                                 (LETT |contlist|
                                       (PROGN
                                         (LETT #6# NIL . #8#)
                                         (SEQ (LETT |w| NIL . #8#)
                                          (LETT #7#
                                           (SPADCALL |sqp|
                                            (QREFELT $ 43)) . #8#)
                                          G190
                                          (COND
                                            ((OR (ATOM #7#)
                                              (PROGN
                                                (LETT |w|
                                                 (CAR #7#) . #8#)
                                                NIL))
                                             #9#))
                                          (SEQ
                                           (EXIT
                                            (LETT #6#
                                             (CONS
                                              (VECTOR (QVELT |w| 0)
                                               (SPADCALL (QVELT |w| 1)
                                                (QREFELT $ 39))
                                               (QVELT |w| 2))
                                              #6#) . #8#)))
                                          (LETT #7# (CDR #7#) . #8#)
                                          #10# G191
                                          (EXIT (NREVERSE0 #6#)))) . #8#)
                                 (LETT |pfaclist|
                                       (APPEND |contlist| |pfaclist|) . #8#)
                                 (EXIT (SPADCALL
                                        (SPADCALL
                                         (SPADCALL |sqp|
                                          (QREFELT $ 38))
                                         |unitPart| (QREFELT $ 57))
                                        |pfaclist| (QREFELT $ 46)))))))))))))) 

(DEFUN |TWOFACT;generalTwoFactor;SupF;6| (|m| $)
  (PROG (|l| #0=#:G1922 #1=#:G1923 |cont| |contfact| #2=#:G1924
             #3=#:G1925 |sqfrm| |u| #4=#:G1926 |expo| #5=#:G1900
             |expon| |fac| |p| #6=#:G1903 |PthRootPow| |m1| |res|
             #7=#:G1927 #8=#:G1928 |m2| #9=#:G1929 #10=#:G1930 |w|
             #11=#:G1931 #12=#:G1913 #13=#:G1911 #14=#:G1912 |ydeg|
             |twoF| |unitPart| #15=#:G1932 |v| #16=#:G1933 |ll|)
    (RETURN
      (SEQ (COND
             ((SPADCALL |m| (|spadConstant| $ 14) (QREFELT $ 16))
              (|spadConstant| $ 34))
             ((EQL (SPADCALL |m| (QREFELT $ 9)) 0)
              (SEQ (LETT |l|
                         (SPADCALL (SPADCALL |m| (QREFELT $ 18))
                             (QREFELT $ 60))
                         . #17=(|TWOFACT;generalTwoFactor;SupF;6|))
                   (EXIT (SPADCALL
                             (SPADCALL (SPADCALL |l| (QREFELT $ 38))
                                 (QREFELT $ 39))
                             (PROGN
                               (LETT #0# NIL . #17#)
                               (SEQ (LETT |u| NIL . #17#)
                                    (LETT #1#
                                     (SPADCALL |l| (QREFELT $ 43)) . #17#)
                                    G190
                                    (COND
                                      ((OR (ATOM #1#)
                                        (PROGN
                                          (LETT |u| (CAR #1#) . #17#)
                                          NIL))
                                       #18=(GO G191)))
                                    (SEQ
                                     (EXIT
                                      (LETT #0#
                                       (CONS
                                        (VECTOR (QVELT |u| 0)
                                         (SPADCALL (QVELT |u| 1)
                                          (QREFELT $ 39))
                                         (QVELT |u| 2))
                                        #0#) . #17#)))
                                    (LETT #1# (CDR #1#) . #17#)
                                    #19=(GO G190) G191
                                    (EXIT (NREVERSE0 #0#))))
                             (QREFELT $ 46)))))
             ('T
              (SEQ (LETT |ll| NIL . #17#)
                   (LETT |cont| (SPADCALL |m| (QREFELT $ 47)) . #17#)
                   (COND
                     ((< 0 (SPADCALL |cont| (QREFELT $ 25)))
                      (SEQ (LETT |m1|
                                 (SPADCALL |m| |cont| (QREFELT $ 48)) . #17#)
                           (EXIT (COND
                                   ((QEQCAR |m1| 1)
                                    (|error| "content doesn't divide"))
                                   ('T
                                    (SEQ (LETT |m| (QCDR |m1|) . #17#)
                                     (LETT |contfact|
                                      (SPADCALL |cont| (QREFELT $ 60)) . #17#)
                                     (LETT |unitPart|
                                      (SPADCALL
                                       (SPADCALL |contfact|
                                        (QREFELT $ 38))
                                       (QREFELT $ 39)) . #17#)
                                     (EXIT
                                      (LETT |ll|
                                       (PROGN
                                         (LETT #2# NIL . #17#)
                                         (SEQ (LETT |w| NIL . #17#)
                                          (LETT #3#
                                           (SPADCALL |contfact|
                                            (QREFELT $ 43)) . #17#)
                                          G190
                                          (COND
                                            ((OR (ATOM #3#)
                                              (PROGN
                                                (LETT |w|
                                                 (CAR #3#) . #17#)
                                                NIL))
                                             #18#))
                                          (SEQ
                                           (EXIT
                                            (LETT #2#
                                             (CONS
                                              (VECTOR (QVELT |w| 0)
                                               (SPADCALL (QVELT |w| 1)
                                                (QREFELT $ 39))
                                               (QVELT |w| 2))
                                              #2#) . #17#)))
                                          (LETT #3# (CDR #3#) . #17#)
                                          #19# G191
                                          (EXIT (NREVERSE0 #2#)))) . #17#))))))))
                     ('T
                      (LETT |unitPart|
                            (SPADCALL |cont| (QREFELT $ 39)) . #17#)))
                   (LETT |sqfrm| (SPADCALL |m| (QREFELT $ 49)) . #17#)
                   (SEQ (LETT |u| NIL . #17#)
                        (LETT #4#
                              (SPADCALL |sqfrm| (QREFELT $ 64)) . #17#)
                        G190
                        (COND
                          ((OR (ATOM #4#)
                               (PROGN (LETT |u| (CAR #4#) . #17#) NIL))
                           #18#))
                        (SEQ (LETT |expo| (QCDR |u|) . #17#)
                             (COND
                               ((< |expo| 0)
                                (|error| "negative exponent in a factorisation")))
                             (LETT |expon|
                                   (PROG1 (LETT #5# |expo| . #17#)
                                     (|check-subtype| (>= #5# 0)
                                      '(|NonNegativeInteger|) #5#)) . #17#)
                             (LETT |fac| (QCAR |u|) . #17#)
                             (EXIT (COND
                                     ((EQL
                                       (SPADCALL |fac| (QREFELT $ 9))
                                       1)
                                      (LETT |ll|
                                       (CONS
                                        (VECTOR (CONS 2 "irred") |fac|
                                         |expon|)
                                        |ll|) . #17#))
                                     ((SPADCALL
                                       (SPADCALL |fac| (QREFELT $ 65))
                                       (|spadConstant| $ 14)
                                       (QREFELT $ 16))
                                      (COND
                                        ((SPADCALL
                                          (SPADCALL (ELT $ 66) |fac|
                                           (QREFELT $ 68))
                                          (|spadConstant| $ 14)
                                          (QREFELT $ 16))
                                         (SEQ
                                          (LETT |p|
                                           (SPADCALL (QREFELT $ 69)) . #17#)
                                          (LETT |PthRootPow|
                                           (PROG2
                                            (LETT #6#
                                             (SPADCALL
                                              (SPADCALL (QREFELT $ 70))
                                              |p| (QREFELT $ 71)) . #17#)
                                            (QCDR #6#)
                                             (|check-union|
                                              (QEQCAR #6# 0)
                                              (|NonNegativeInteger|)
                                              #6#)) . #17#)
                                          (LETT |m1|
                                           (SPADCALL
                                            (SPADCALL
                                             (CONS
                                              #'|TWOFACT;generalTwoFactor;SupF;6!0|
                                              (VECTOR $ |PthRootPow|
                                               |p|))
                                             |fac| (QREFELT $ 68))
                                            |p| (QREFELT $ 72)) . #17#)
                                          (EXIT
                                           (COND
                                             ((QEQCAR |m1| 1)
                                              (|error|
                                               "consistency error in TwoFactor"))
                                             ('T
                                              (SEQ
                                               (LETT |res|
                                                (SPADCALL (QCDR |m1|)
                                                 (QREFELT $ 73)) . #17#)
                                               (LETT |unitPart|
                                                (SPADCALL |unitPart|
                                                 (SPADCALL
                                                  (SPADCALL |res|
                                                   (QREFELT $ 50))
                                                  (* |p| |expon|)
                                                  (QREFELT $ 53))
                                                 (QREFELT $ 54)) . #17#)
                                               (EXIT
                                                (LETT |ll|
                                                 (APPEND
                                                  (PROGN
                                                    (LETT #7#
                                                     NIL . #17#)
                                                    (SEQ
                                                     (LETT |v|
                                                      NIL . #17#)
                                                     (LETT #8#
                                                      (SPADCALL |res|
                                                       (QREFELT $ 51)) . #17#)
                                                     G190
                                                     (COND
                                                       ((OR (ATOM #8#)
                                                         (PROGN
                                                           (LETT |v|
                                                            (CAR #8#) . #17#)
                                                           NIL))
                                                        #18#))
                                                     (SEQ
                                                      (EXIT
                                                       (LETT #7#
                                                        (CONS
                                                         (VECTOR
                                                          (QVELT |v| 0)
                                                          (QVELT |v| 1)
                                                          (*
                                                           (* |expon|
                                                            |p|)
                                                           (QVELT |v|
                                                            2)))
                                                         #7#) . #17#)))
                                                     (LETT #8#
                                                      (CDR #8#) . #17#)
                                                     #19# G191
                                                     (EXIT
                                                      (NREVERSE0 #7#))))
                                                  |ll|) . #17#))))))))
                                        ('T
                                         (SEQ
                                          (LETT |m2|
                                           (SPADCALL
                                            (SPADCALL |fac|
                                             (QREFELT $ 75))
                                            (QREFELT $ 73)) . #17#)
                                          (LETT |unitPart|
                                           (SPADCALL |unitPart|
                                            (SPADCALL
                                             (SPADCALL |m2|
                                              (QREFELT $ 50))
                                             |expon| (QREFELT $ 53))
                                            (QREFELT $ 54)) . #17#)
                                          (EXIT
                                           (LETT |ll|
                                            (APPEND
                                             (PROGN
                                               (LETT #9# NIL . #17#)
                                               (SEQ
                                                (LETT |v| NIL . #17#)
                                                (LETT #10#
                                                 (SPADCALL |m2|
                                                  (QREFELT $ 51)) . #17#)
                                                G190
                                                (COND
                                                  ((OR (ATOM #10#)
                                                    (PROGN
                                                      (LETT |v|
                                                       (CAR #10#) . #17#)
                                                      NIL))
                                                   #18#))
                                                (SEQ
                                                 (EXIT
                                                  (LETT #9#
                                                   (CONS
                                                    (VECTOR
                                                     (QVELT |v| 0)
                                                     (SPADCALL
                                                      (QVELT |v| 1)
                                                      (QREFELT $ 75))
                                                     (SPADCALL |expon|
                                                      (QVELT |v| 2)
                                                      (QREFELT $ 76)))
                                                    #9#) . #17#)))
                                                (LETT #10#
                                                 (CDR #10#) . #17#)
                                                #19# G191
                                                (EXIT (NREVERSE0 #9#))))
                                             |ll|) . #17#))))))
                                     ('T
                                      (SEQ
                                       (LETT |ydeg|
                                        (PROGN
                                          (LETT #14# NIL . #17#)
                                          (SEQ (LETT |w| NIL . #17#)
                                           (LETT #11#
                                            (SPADCALL |fac|
                                             (QREFELT $ 78)) . #17#)
                                           G190
                                           (COND
                                             ((OR (ATOM #11#)
                                               (PROGN
                                                 (LETT |w|
                                                  (CAR #11#) . #17#)
                                                 NIL))
                                              #18#))
                                           (SEQ
                                            (EXIT
                                             (PROGN
                                               (LETT #12#
                                                (SPADCALL |w|
                                                 (QREFELT $ 25)) . #17#)
                                               (COND
                                                 (#14#
                                                  (LETT #13#
                                                   (MAX #13# #12#) . #17#))
                                                 ('T
                                                  (PROGN
                                                    (LETT #13#
                                                     #12# . #17#)
                                                    (LETT #14#
                                                     'T . #17#)))))))
                                           (LETT #11#
                                            (CDR #11#) . #17#)
                                           #19# G191 (EXIT NIL))
                                          (COND
                                            (#14# #13#)
                                            ('T
                                             (|IdentityError| '|max|)))) . #17#)
                                       (LETT |twoF|
                                        (SPADCALL |fac| |ydeg|
                                         (QREFELT $ 79)) . #17#)
                                       (LETT |unitPart|
                                        (SPADCALL |unitPart|
                                         (SPADCALL
                                          (SPADCALL |twoF|
                                           (QREFELT $ 50))
                                          |expon| (QREFELT $ 53))
                                         (QREFELT $ 54)) . #17#)
                                       (EXIT
                                        (LETT |ll|
                                         (APPEND
                                          (PROGN
                                            (LETT #15# NIL . #17#)
                                            (SEQ (LETT |v| NIL . #17#)
                                             (LETT #16#
                                              (SPADCALL |twoF|
                                               (QREFELT $ 51)) . #17#)
                                             G190
                                             (COND
                                               ((OR (ATOM #16#)
                                                 (PROGN
                                                   (LETT |v|
                                                    (CAR #16#) . #17#)
                                                   NIL))
                                                #18#))
                                             (SEQ
                                              (EXIT
                                               (LETT #15#
                                                (CONS
                                                 (VECTOR (QVELT |v| 0)
                                                  (QVELT |v| 1)
                                                  (SPADCALL |expon|
                                                   (QVELT |v| 2)
                                                   (QREFELT $ 76)))
                                                 #15#) . #17#)))
                                             (LETT #16#
                                              (CDR #16#) . #17#)
                                             #19# G191
                                             (EXIT (NREVERSE0 #15#))))
                                          |ll|) . #17#)))))))
                        (LETT #4# (CDR #4#) . #17#) #19# G191
                        (EXIT NIL))
                   (EXIT (SPADCALL |unitPart| |ll| (QREFELT $ 46)))))))))) 

(DEFUN |TWOFACT;generalTwoFactor;SupF;6!0| (|#1| $$)
  (|TWOFACT;pthRoot| |#1| (QREFELT $$ 2) (QREFELT $$ 1) (QREFELT $$ 0))) 

(DEFUN |TWOFACT;twoFactor;SupIF;7| (|m| |dx| $)
  (PROG (|dm| |try| |lcm| |vval| |umv| |n| |extField| |SUEx| TP |mm|
              |m1| |lcmm| |val| |i| |umex| |look| |prime| |fumex|
              |lfact1| #0=#:G1969 |lf| #1=#:G1970 |lfact| #2=#:G1949
              |dx1| |Normp| |c| |ff| |ffu| #3=#:G1961 |normfacs|
              #4=#:G1971 |g| #5=#:G1972 |lfacth| #6=#:G1815 #7=#:G1973
              #8=#:G1960 #9=#:G1958 #10=#:G1959 |ffn| #11=#:G1953
              |lfactk| |ff1| #12=#:G1974 #13=#:G1965 #14=#:G1963
              #15=#:G1964)
    (RETURN
      (SEQ (LETT |n|
                 (|TWOFACT;computeDegree| |m| |dx|
                     (SPADCALL (QREFELT $ 70)) $)
                 . #16=(|TWOFACT;twoFactor;SupIF;7|))
           (LETT |look| 'T . #16#)
           (LETT |dm| (SPADCALL |m| (QREFELT $ 9)) . #16#)
           (LETT |try| (MIN 5 (SPADCALL (QREFELT $ 70))) . #16#)
           (LETT |i| 0 . #16#)
           (LETT |lcm| (SPADCALL |m| (QREFELT $ 18)) . #16#)
           (SEQ G190
                (COND
                  ((NULL (COND (|look| (< |i| |try|)) ('T 'NIL)))
                   #17=(GO G191)))
                (SEQ (LETT |vval| (SPADCALL (QREFELT $ 80)) . #16#)
                     (LETT |i| (+ |i| 1) . #16#)
                     (EXIT (COND
                             ((SPADCALL
                                  (SPADCALL |lcm| |vval|
                                      (QREFELT $ 81))
                                  (QREFELT $ 82))
                              "next value")
                             ('T
                              (SEQ (LETT |umv|
                                    (SPADCALL
                                     (CONS
                                      #'|TWOFACT;twoFactor;SupIF;7!0|
                                      (VECTOR $ |vval|))
                                     |m| (QREFELT $ 85)) . #16#)
                                   (COND
                                     ((NULL
                                       (EQL
                                        (SPADCALL
                                         (SPADCALL |umv|
                                          (SPADCALL |umv|
                                           (QREFELT $ 66))
                                          (QREFELT $ 86))
                                         (QREFELT $ 25))
                                        0))
                                      (EXIT "next val")))
                                   (LETT |n| 1 . #16#)
                                   (EXIT (LETT |look| 'NIL . #16#)))))))
                NIL #18=(GO G190) G191 (EXIT NIL))
           (LETT |extField|
                 (|FiniteFieldExtension| (QREFELT $ 6) |n|) . #16#)
           (LETT |SUEx|
                 (|SparseUnivariatePolynomial| |extField|) . #16#)
           (LETT TP (|SparseUnivariatePolynomial| |SUEx|) . #16#)
           (LETT |mm|
                 (SPADCALL
                     (|compiledLookupCheck| '|Zero| (LIST '$) TP)) . #16#)
           (LETT |m1| |m| . #16#)
           (SEQ G190
                (COND
                  ((NULL (COND
                           ((SPADCALL |m1| (|spadConstant| $ 14)
                                (QREFELT $ 16))
                            'NIL)
                           ('T 'T)))
                   #17#))
                (SEQ (LETT |mm|
                           (SPADCALL |mm|
                               (SPADCALL
                                   (SPADCALL
                                    (|compiledLookupCheck| '|coerce|
                                     (LIST '$ (|devaluate| (ELT $ 6)))
                                     |extField|)
                                    (SPADCALL |m1| (QREFELT $ 18))
                                    (|compiledLookupCheck| '|map|
                                     (LIST (|devaluate| |SUEx|)
                                      (LIST '|Mapping|
                                       (|devaluate| |extField|)
                                       (|devaluate| (ELT $ 6)))
                                      (LIST
                                       '|SparseUnivariatePolynomial|
                                       (|devaluate| (ELT $ 6))))
                                     (|UnivariatePolynomialCategoryFunctions2|
                                      (ELT $ 6)
                                      (|SparseUnivariatePolynomial|
                                       (ELT $ 6))
                                      |extField| |SUEx|)))
                                   (SPADCALL |m1| (QREFELT $ 9))
                                   (|compiledLookupCheck| '|monomial|
                                    (LIST '$ (|devaluate| |SUEx|)
                                     (LIST '|NonNegativeInteger|))
                                    TP))
                               (|compiledLookupCheck| '+
                                   (LIST '$ '$ '$) TP)) . #16#)
                     (EXIT (LETT |m1|
                                 (SPADCALL |m1| (QREFELT $ 19)) . #16#)))
                NIL #18# G191 (EXIT NIL))
           (LETT |lcmm|
                 (SPADCALL |mm|
                     (|compiledLookupCheck| '|leadingCoefficient|
                         (LIST (|devaluate| |SUEx|) '$) TP)) . #16#)
           (COND
             ((NULL |look|)
              (SEQ (LETT |val|
                         (SPADCALL |vval|
                             (|compiledLookupCheck| '|coerce|
                                 (LIST '$ (|devaluate| (ELT $ 6)))
                                 |extField|)) . #16#)
                   (EXIT (LETT |umex|
                               (SPADCALL
                                   (|compiledLookupCheck| '|coerce|
                                    (LIST '$ (|devaluate| (ELT $ 6)))
                                    |extField|)
                                   |umv|
                                   (|compiledLookupCheck| '|map|
                                    (LIST (|devaluate| |SUEx|)
                                     (LIST '|Mapping|
                                      (|devaluate| |extField|)
                                      (|devaluate| (ELT $ 6)))
                                     (LIST
                                      '|SparseUnivariatePolynomial|
                                      (|devaluate| (ELT $ 6))))
                                    (|UnivariatePolynomialCategoryFunctions2|
                                     (ELT $ 6)
                                     (|SparseUnivariatePolynomial|
                                      (ELT $ 6))
                                     |extField| |SUEx|))) . #16#)))))
           (SEQ G190 (COND ((NULL |look|) #17#))
                (SEQ (LETT |val|
                           (SPADCALL
                               (|compiledLookupCheck| '|random|
                                   (LIST '$) |extField|)) . #16#)
                     (LETT |i| (+ |i| 1) . #16#)
                     (EXIT (COND
                             ((SPADCALL
                                  (SPADCALL |lcmm| |val|
                                      (|compiledLookupCheck| '|elt|
                                       (LIST (|devaluate| |extField|)
                                        '$ (|devaluate| |extField|))
                                       |SUEx|))
                                  (SPADCALL
                                      (|compiledLookupCheck| '|Zero|
                                       (LIST '$) |extField|))
                                  (|compiledLookupCheck| '=
                                      (LIST (LIST '|Boolean|) '$ '$)
                                      |extField|))
                              "next value")
                             ('T
                              (SEQ (LETT |umex|
                                    (SPADCALL
                                     (CONS
                                      #'|TWOFACT;twoFactor;SupIF;7!1|
                                      (VECTOR |SUEx| |extField| |val|))
                                     |mm|
                                     (|compiledLookupCheck| '|map|
                                      (LIST (|devaluate| |SUEx|)
                                       (LIST '|Mapping|
                                        (|devaluate| |extField|)
                                        (|devaluate| |SUEx|))
                                       (|devaluate| TP))
                                      (|UnivariatePolynomialCategoryFunctions2|
                                       |SUEx| TP |extField| |SUEx|))) . #16#)
                                   (COND
                                     ((NULL
                                       (EQL
                                        (SPADCALL
                                         (SPADCALL |umex|
                                          (SPADCALL |umex|
                                           (|compiledLookupCheck|
                                            '|differentiate|
                                            (LIST '$ '$) |SUEx|))
                                          (|compiledLookupCheck| '|gcd|
                                           (LIST '$ '$ '$) |SUEx|))
                                         (|compiledLookupCheck|
                                          '|degree|
                                          (LIST
                                           (LIST '|NonNegativeInteger|)
                                           '$)
                                          |SUEx|))
                                        0))
                                      (EXIT "next val")))
                                   (EXIT (LETT |look| 'NIL . #16#)))))))
                NIL #18# G191 (EXIT NIL))
           (LETT |prime|
                 (SPADCALL
                     (SPADCALL
                         (SPADCALL
                             (|compiledLookupCheck| '|One| (LIST '$)
                                 |extField|))
                         1
                         (|compiledLookupCheck| '|monomial|
                             (LIST '$ (|devaluate| |extField|)
                                   (LIST '|NonNegativeInteger|))
                             |SUEx|))
                     (SPADCALL |val| 0
                         (|compiledLookupCheck| '|monomial|
                             (LIST '$ (|devaluate| |extField|)
                                   (LIST '|NonNegativeInteger|))
                             |SUEx|))
                     (|compiledLookupCheck| '- (LIST '$ '$ '$) |SUEx|)) . #16#)
           (LETT |fumex|
                 (SPADCALL |umex|
                     (|compiledLookupCheck| '|factor|
                         (LIST (LIST '|Factored| (|devaluate| |SUEx|))
                               (|devaluate| |SUEx|))
                         (|DistinctDegreeFactorize| |extField| |SUEx|))) . #16#)
           (LETT |lfact1|
                 (SPADCALL |fumex|
                     (|compiledLookupCheck| '|factors|
                         (LIST (LIST '|List|
                                     (LIST '|Record|
                                      (LIST '|:| '|factor|
                                       (|devaluate| |SUEx|))
                                      (LIST '|:| '|exponent|
                                       (LIST '|Integer|))))
                               '$)
                         (|Factored| |SUEx|))) . #16#)
           (EXIT (COND
                   ((EQL (LENGTH |lfact1|) 1)
                    (SPADCALL |m| 1 (QREFELT $ 87)))
                   ('T
                    (SEQ (LETT |lfact|
                               (PROGN
                                 (LETT #0# NIL . #16#)
                                 (SEQ (LETT |lf| NIL . #16#)
                                      (LETT #1# |lfact1| . #16#) G190
                                      (COND
                                        ((OR (ATOM #1#)
                                          (PROGN
                                            (LETT |lf|
                                             (CAR #1#) . #16#)
                                            NIL))
                                         #17#))
                                      (SEQ
                                       (EXIT
                                        (LETT #0#
                                         (CONS
                                          (SPADCALL
                                           (|compiledLookupCheck|
                                            '|coerce|
                                            (LIST '$
                                             (|devaluate| |extField|))
                                            |SUEx|)
                                           (QCAR |lf|)
                                           (|compiledLookupCheck|
                                            '|map|
                                            (LIST (|devaluate| TP)
                                             (LIST '|Mapping|
                                              (|devaluate| |SUEx|)
                                              (|devaluate| |extField|))
                                             (|devaluate| |SUEx|))
                                            (|UnivariatePolynomialCategoryFunctions2|
                                             |extField| |SUEx| |SUEx|
                                             TP)))
                                          #0#) . #16#)))
                                      (LETT #1# (CDR #1#) . #16#) #18#
                                      G191 (EXIT (NREVERSE0 #0#)))) . #16#)
                         (LETT |lfact|
                               (CONS (SPADCALL
                                      (|compiledLookupCheck| '|coerce|
                                       (LIST '$
                                        (|devaluate| |extField|))
                                       |SUEx|)
                                      (SPADCALL |fumex|
                                       (|compiledLookupCheck| '|unit|
                                        (LIST (|devaluate| |SUEx|) '$)
                                        (|Factored| |SUEx|)))
                                      (|compiledLookupCheck| '|map|
                                       (LIST (|devaluate| TP)
                                        (LIST '|Mapping|
                                         (|devaluate| |SUEx|)
                                         (|devaluate| |extField|))
                                        (|devaluate| |SUEx|))
                                       (|UnivariatePolynomialCategoryFunctions2|
                                        |extField| |SUEx| |SUEx| TP)))
                                     |lfact|) . #16#)
                         (LETT |dx1|
                               (PROG1 (LETT #2# (+ |dx| 1) . #16#)
                                 (|check-subtype| (> #2# 0)
                                     '(|PositiveInteger|) #2#)) . #16#)
                         (LETT |lfacth|
                               (SPADCALL |mm| |lfact| |prime| |dx1|
                                   (|compiledLookupCheck|
                                    '|completeHensel|
                                    (LIST
                                     (LIST '|List| (|devaluate| TP))
                                     (|devaluate| TP)
                                     (LIST '|List| (|devaluate| TP))
                                     (|devaluate| |SUEx|)
                                     (LIST '|PositiveInteger|))
                                    (|GeneralHenselPackage| |SUEx| TP))) . #16#)
                         (LETT |lfactk| NIL . #16#)
                         (LETT |Normp|
                               (|NormRetractPackage| (QREFELT $ 6)
                                   |extField| |SUEx| TP |n|) . #16#)
                         (SEQ G190
                              (COND
                                ((NULL (COND
                                         ((NULL |lfacth|) 'NIL)
                                         ('T 'T)))
                                 #17#))
                              (SEQ (EXIT
                                    (SEQ
                                     (LETT |ff|
                                      (|SPADfirst| |lfacth|) . #16#)
                                     (LETT |lfacth|
                                      (CDR |lfacth|) . #16#)
                                     (SEQ
                                      (LETT |c|
                                       (SPADCALL
                                        (SPADCALL |ff|
                                         (|compiledLookupCheck|
                                          '|leadingCoefficient|
                                          (LIST (|devaluate| |SUEx|)
                                           '$)
                                          TP))
                                        (|compiledLookupCheck|
                                         '|leadingCoefficient|
                                         (LIST (|devaluate| |extField|)
                                          '$)
                                         |SUEx|)) . #16#)
                                      (EXIT
                                       (COND
                                         ((NULL
                                           (SPADCALL |c|
                                            (SPADCALL
                                             (|compiledLookupCheck|
                                              '|One| (LIST '$)
                                              |extField|))
                                            (|compiledLookupCheck| '=
                                             (LIST (LIST '|Boolean|) '$
                                              '$)
                                             |extField|)))
                                          (LETT |ff|
                                           (SPADCALL
                                            (SPADCALL
                                             (SPADCALL |c|
                                              (|compiledLookupCheck|
                                               '|inv| (LIST '$ '$)
                                               |extField|))
                                             (|compiledLookupCheck|
                                              '|coerce|
                                              (LIST '$
                                               (|devaluate| |extField|))
                                              |SUEx|))
                                            |ff|
                                            (|compiledLookupCheck| '*
                                             (LIST '$
                                              (|devaluate| |SUEx|) '$)
                                             TP)) . #16#)))))
                                     (SEQ
                                      (LETT |ffu|
                                       (SPADCALL |ff|
                                        (|compiledLookupCheck|
                                         '|retractIfCan|
                                         (LIST
                                          (LIST '|Union|
                                           (LIST
                                            '|SparseUnivariatePolynomial|
                                            (LIST
                                             '|SparseUnivariatePolynomial|
                                             (|devaluate| (ELT $ 6))))
                                           '"failed")
                                          (|devaluate| TP))
                                         |Normp|)) . #16#)
                                      (EXIT
                                       (COND
                                         ((NULL (QEQCAR |ffu| 1))
                                          (PROGN
                                            (LETT #3#
                                             (LETT |lfactk|
                                              (CONS (QCDR |ffu|)
                                               |lfactk|) . #16#) . #16#)
                                            (GO #3#))))))
                                     (LETT |normfacs|
                                      (SPADCALL |ff|
                                       (|compiledLookupCheck|
                                        '|normFactors|
                                        (LIST
                                         (LIST '|List|
                                          (|devaluate| TP))
                                         (|devaluate| TP))
                                        |Normp|)) . #16#)
                                     (LETT |lfacth|
                                      (PROGN
                                        (LETT #4# NIL . #16#)
                                        (SEQ (LETT |g| NIL . #16#)
                                         (LETT #5# |lfacth| . #16#)
                                         G190
                                         (COND
                                           ((OR (ATOM #5#)
                                             (PROGN
                                               (LETT |g|
                                                (CAR #5#) . #16#)
                                               NIL))
                                            #17#))
                                         (SEQ
                                          (EXIT
                                           (COND
                                             ((COND
                                                ((SPADCALL |g|
                                                  |normfacs|
                                                  (|compiledLookupCheck|
                                                   '|member?|
                                                   (LIST
                                                    (LIST '|Boolean|)
                                                    (|devaluate| TP)
                                                    '$)
                                                   (|List| TP)))
                                                 'NIL)
                                                ('T 'T))
                                              (LETT #4#
                                               (CONS |g| #4#) . #16#)))))
                                         (LETT #5# (CDR #5#) . #16#)
                                         #18# G191
                                         (EXIT (NREVERSE0 #4#)))) . #16#)
                                     (LETT |ffn|
                                      (PROGN
                                        (LETT #10# NIL . #16#)
                                        (SEQ (LETT #6# NIL . #16#)
                                         (LETT #7# |normfacs| . #16#)
                                         G190
                                         (COND
                                           ((OR (ATOM #7#)
                                             (PROGN
                                               (LETT #6#
                                                (CAR #7#) . #16#)
                                               NIL))
                                            #17#))
                                         (SEQ
                                          (EXIT
                                           (PROGN
                                             (LETT #8# #6# . #16#)
                                             (COND
                                               (#10#
                                                (LETT #9#
                                                 (SPADCALL #9# #8#
                                                  (|compiledLookupCheck|
                                                   '* (LIST '$ '$ '$)
                                                   TP)) . #16#))
                                               ('T
                                                (PROGN
                                                  (LETT #9# #8# . #16#)
                                                  (LETT #10# 'T . #16#)))))))
                                         (LETT #7# (CDR #7#) . #16#)
                                         #18# G191 (EXIT NIL))
                                        (COND
                                          (#10# #9#)
                                          ('T
                                           (SPADCALL
                                            (|compiledLookupCheck|
                                             '|One| (LIST '$) TP))))) . #16#)
                                     (EXIT
                                      (LETT |lfactk|
                                       (CONS
                                        (PROG2
                                         (LETT #11#
                                          (SPADCALL |ffn|
                                           (|compiledLookupCheck|
                                            '|retractIfCan|
                                            (LIST
                                             (LIST '|Union|
                                              (LIST
                                               '|SparseUnivariatePolynomial|
                                               (LIST
                                                '|SparseUnivariatePolynomial|
                                                (|devaluate| (ELT $ 6))))
                                              '"failed")
                                             (|devaluate| TP))
                                            |Normp|)) . #16#)
                                         (QCDR #11#)
                                          (|check-union|
                                           (QEQCAR #11# 0)
                                           (|SparseUnivariatePolynomial|
                                            (|SparseUnivariatePolynomial|
                                             (QREFELT $ 6)))
                                           #11#))
                                        |lfactk|) . #16#))))
                                   #3# (EXIT #3#))
                              NIL #18# G191 (EXIT NIL))
                         (EXIT (PROGN
                                 (LETT #15# NIL . #16#)
                                 (SEQ (LETT |ff1| NIL . #16#)
                                      (LETT #12# |lfactk| . #16#) G190
                                      (COND
                                        ((OR (ATOM #12#)
                                          (PROGN
                                            (LETT |ff1|
                                             (CAR #12#) . #16#)
                                            NIL))
                                         #17#))
                                      (SEQ
                                       (EXIT
                                        (PROGN
                                          (LETT #13#
                                           (SPADCALL |ff1| 1
                                            (QREFELT $ 87)) . #16#)
                                          (COND
                                            (#15#
                                             (LETT #14#
                                              (SPADCALL #14# #13#
                                               (QREFELT $ 88)) . #16#))
                                            ('T
                                             (PROGN
                                               (LETT #14# #13# . #16#)
                                               (LETT #15# 'T . #16#)))))))
                                      (LETT #12# (CDR #12#) . #16#)
                                      #18# G191 (EXIT NIL))
                                 (COND
                                   (#15# #14#)
                                   ('T (|spadConstant| $ 89))))))))))))) 

(DEFUN |TWOFACT;twoFactor;SupIF;7!1| (|#1| $$)
  (PROG (|extField|)
    (LETT |extField| (QREFELT $$ 1) |TWOFACT;twoFactor;SupIF;7|)
    (RETURN
      (PROGN
        (SPADCALL |#1| (QREFELT $$ 2)
            (|compiledLookupCheck| '|elt|
                (LIST (|devaluate| |extField|) '$
                      (|devaluate| |extField|))
                (QREFELT $$ 0))))))) 

(DEFUN |TWOFACT;twoFactor;SupIF;7!0| (|#1| $$)
  (SPADCALL |#1| (QREFELT $$ 1) (QREFELT (QREFELT $$ 0) 81))) 

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

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

(MAKEPROP '|TwoFactorize| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|)
             (|NonNegativeInteger|) (|SparseUnivariatePolynomial| 17)
             (0 . |degree|) (|PositiveInteger|) (|Integer|) (5 . *)
             (11 . |Zero|) (15 . |Zero|) (|Boolean|) (19 . =)
             (|SparseUnivariatePolynomial| 6)
             (25 . |leadingCoefficient|) (30 . |reductum|) (35 . +)
             (41 . |Zero|) (45 . =) (51 . |leadingCoefficient|)
             (56 . |monomial|) (62 . |degree|) (67 . |monomial|)
             (73 . |reductum|) (78 . **) (|Mapping| 6 6) (84 . |map|)
             (|Union| $ '"failed") (90 . |divideExponents|)
             (|Factored| 8) (96 . |Zero|) (|Factored| $)
             (100 . |squareFree|) (|Factored| 17) (105 . |unit|)
             (110 . |coerce|)
             (|Union| '"nil" '"sqfr" '"irred" '"prime")
             (|Record| (|:| |flg| 40) (|:| |fctr| 17) (|:| |xpnt| 11))
             (|List| 41) (115 . |factorList|)
             (|Record| (|:| |flg| 40) (|:| |fctr| 8) (|:| |xpnt| 11))
             (|List| 44) (120 . |makeFR|) (126 . |content|)
             (131 . |exquo|) (137 . |squareFree|) (142 . |unit|)
             (147 . |factorList|) (152 . =) (158 . **) (164 . *)
             (170 . |One|) (174 . |One|) (178 . *)
             |TWOFACT;generalSqFr;SupF;5|
             (|DistinctDegreeFactorize| 6 17) (184 . |factor|)
             (189 . |Zero|)
             (|Record| (|:| |factor| 8) (|:| |exponent| 11))
             (|List| 62) (193 . |factors|) (198 . |differentiate|)
             (203 . |differentiate|) (|Mapping| 17 17) (208 . |map|)
             (214 . |characteristic|) (218 . |size|) (222 . |exquo|)
             (228 . |divideExponents|)
             |TWOFACT;generalTwoFactor;SupF;6|
             (|CommuteUnivariatePolynomialCategory| 6 17 8)
             (234 . |swap|) (239 . *) (|List| 17)
             (245 . |coefficients|) |TWOFACT;twoFactor;SupIF;7|
             (250 . |random|) (254 . |elt|) (260 . |zero?|)
             (|Mapping| 6 17)
             (|UnivariatePolynomialCategoryFunctions2| 17 8 6 17)
             (265 . |map|) (271 . |gcd|) (277 . |primeFactor|)
             (283 . *) (289 . |One|))
          '#(|twoFactor| 293 |generalTwoFactor| 299 |generalSqFr| 304)
          'NIL
          (CONS (|makeByteWordVec2| 1 'NIL)
                (CONS '#()
                      (CONS '#()
                            (|makeByteWordVec2| 89
                                '(1 8 7 0 9 2 11 0 10 0 12 0 6 0 13 0 8
                                  0 14 2 8 15 0 0 16 1 8 17 0 18 1 8 0
                                  0 19 2 8 0 0 0 20 0 17 0 21 2 17 15 0
                                  0 22 1 17 6 0 23 2 17 0 6 7 24 1 17 7
                                  0 25 2 8 0 17 7 26 1 17 0 0 27 2 6 0
                                  0 7 28 2 17 0 29 0 30 2 17 31 0 7 32
                                  0 33 0 34 1 17 35 0 36 1 37 17 0 38 1
                                  8 0 17 39 1 37 42 0 43 2 33 0 8 45 46
                                  1 8 17 0 47 2 8 31 0 17 48 1 8 35 0
                                  49 1 33 8 0 50 1 33 45 0 51 2 40 15 0
                                  0 52 2 8 0 0 7 53 2 8 0 0 0 54 0 6 0
                                  55 0 17 0 56 2 8 0 17 0 57 1 59 37 17
                                  60 0 37 0 61 1 33 63 0 64 1 8 0 0 65
                                  1 17 0 0 66 2 8 0 67 0 68 0 6 7 69 0
                                  6 7 70 2 7 31 0 0 71 2 8 31 0 7 72 1
                                  74 8 8 75 2 11 0 7 0 76 1 8 77 0 78 0
                                  6 0 80 2 17 6 0 6 81 1 6 15 0 82 2 84
                                  17 83 8 85 2 17 0 0 0 86 2 33 0 8 11
                                  87 2 33 0 0 0 88 0 33 0 89 2 0 33 8
                                  11 79 1 0 33 8 73 1 0 33 8 58)))))
          '|lookupComplete|)) 
