
(/VERSIONCHECK 2) 

(DEFUN |GALFACT;useEisensteinCriterion?;B;1| ($) (QREFELT $ 11)) 

(DEFUN |GALFACT;useEisensteinCriterion;2B;2| (|b| $)
  (PROG (|#G5| |#G4|)
    (RETURN
     (SEQ
      (PROGN
       (LETT |#G4| |b| . #1=(|GALFACT;useEisensteinCriterion;2B;2|))
       (LETT |#G5| (QREFELT $ 11) . #1#)
       (SETELT $ 11 |#G4|)
       (LETT |b| |#G5| . #1#))
      (EXIT |b|))))) 

(DEFUN |GALFACT;tryFunctionalDecomposition?;B;3| ($) (QREFELT $ 10)) 

(DEFUN |GALFACT;tryFunctionalDecomposition;2B;4| (|b| $)
  (PROG (|#G8| |#G7|)
    (RETURN
     (SEQ
      (PROGN
       (LETT |#G7| |b| . #1=(|GALFACT;tryFunctionalDecomposition;2B;4|))
       (LETT |#G8| (QREFELT $ 10) . #1#)
       (SETELT $ 10 |#G7|)
       (LETT |b| |#G8| . #1#))
      (EXIT |b|))))) 

(DEFUN |GALFACT;useSingleFactorBound?;B;5| ($) (QREFELT $ 9)) 

(DEFUN |GALFACT;useSingleFactorBound;2B;6| (|b| $)
  (PROG (|#G11| |#G10|)
    (RETURN
     (SEQ
      (PROGN
       (LETT |#G10| |b| . #1=(|GALFACT;useSingleFactorBound;2B;6|))
       (LETT |#G11| (QREFELT $ 9) . #1#)
       (SETELT $ 9 |#G10|)
       (LETT |b| |#G11| . #1#))
      (EXIT |b|))))) 

(DEFUN |GALFACT;stopMusserTrials;Pi;7| ($) (QREFELT $ 8)) 

(DEFUN |GALFACT;stopMusserTrials;2Pi;8| (|n| $)
  (PROG (|#G14| |#G13|)
    (RETURN
     (SEQ
      (PROGN
       (LETT |#G13| |n| . #1=(|GALFACT;stopMusserTrials;2Pi;8|))
       (LETT |#G14| (QREFELT $ 8) . #1#)
       (SETELT $ 8 |#G13|)
       (LETT |n| |#G14| . #1#))
      (EXIT |n|))))) 

(DEFUN |GALFACT;musserTrials;Pi;9| ($) (QREFELT $ 7)) 

(DEFUN |GALFACT;musserTrials;2Pi;10| (|n| $)
  (PROG (|#G17| |#G16|)
    (RETURN
     (SEQ
      (PROGN
       (LETT |#G16| |n| . #1=(|GALFACT;musserTrials;2Pi;10|))
       (LETT |#G17| (QREFELT $ 7) . #1#)
       (SETELT $ 7 |#G16|)
       (LETT |n| |#G17| . #1#))
      (EXIT |n|))))) 

(DEFUN |GALFACT;eisensteinIrreducible?;UPB;11| (|f| $)
  (PROG (#1=#:G753 #2=#:G754 |p| |rf| |tc| |lc| |c|)
    (RETURN
     (SEQ
      (EXIT
       (SEQ
        (LETT |rf| (SPADCALL |f| (QREFELT $ 24))
              . #3=(|GALFACT;eisensteinIrreducible?;UPB;11|))
        (LETT |c| (SPADCALL |rf| (QREFELT $ 26)) . #3#)
        (EXIT
         (COND ((OR (ZEROP |c|) (SPADCALL |c| (QREFELT $ 27))) 'NIL)
               ('T
                (SEQ (LETT |lc| (SPADCALL |f| (QREFELT $ 28)) . #3#)
                     (LETT |tc| |lc| . #3#)
                     (SEQ G190
                          (COND
                           ((NULL
                             (COND ((SPADCALL |rf| (QREFELT $ 29)) 'NIL)
                                   ('T 'T)))
                            #4=(GO G191)))
                          (SEQ (LETT |tc| (SPADCALL |rf| (QREFELT $ 28)) . #3#)
                               (EXIT
                                (LETT |rf| (SPADCALL |rf| (QREFELT $ 24))
                                      . #3#)))
                          NIL #5=(GO G190) G191 (EXIT NIL))
                     (SEQ (LETT |p| NIL . #3#)
                          (LETT #2#
                                (SPADCALL (SPADCALL |c| (QREFELT $ 31))
                                          (QREFELT $ 35))
                                . #3#)
                          G190
                          (COND
                           ((OR (ATOM #2#)
                                (PROGN (LETT |p| (CAR #2#) . #3#) NIL))
                            #4#))
                          (SEQ
                           (EXIT
                            (COND
                             ((EQL (QCDR |p|) 1)
                              (COND
                               ((NULL (ZEROP (REMAINDER2 |lc| (QCAR |p|))))
                                (COND
                                 ((NULL
                                   (ZEROP
                                    (REMAINDER2 |tc| (EXPT (QCAR |p|) 2))))
                                  (PROGN (LETT #1# 'T . #3#) (GO #1#))))))))))
                          (LETT #2# (CDR #2#) . #3#) #5# G191 (EXIT NIL))
                     (EXIT 'NIL)))))))
      #1# (EXIT #1#))))) 

(DEFUN |GALFACT;numberOfFactors;LNni;12| (|ddlist| $)
  (PROG (|n| #1=#:G756 |d| #2=#:G763 |dd|)
    (RETURN
     (SEQ (LETT |n| 0 . #3=(|GALFACT;numberOfFactors;LNni;12|))
          (LETT |d| 0 . #3#)
          (SEQ (LETT |dd| NIL . #3#) (LETT #2# |ddlist| . #3#) G190
               (COND
                ((OR (ATOM #2#) (PROGN (LETT |dd| (CAR #2#) . #3#) NIL))
                 (GO G191)))
               (SEQ
                (EXIT
                 (LETT |n|
                       (+ |n|
                          (COND
                           ((ZEROP
                             (LETT |d| (SPADCALL (QCAR |dd|) (QREFELT $ 38))
                                   . #3#))
                            1)
                           ('T
                            (PROG1 (LETT #1# (QUOTIENT2 |d| (QCDR |dd|)) . #3#)
                              (|check-subtype| (>= #1# 0)
                                               '(|NonNegativeInteger|) #1#)))))
                       . #3#)))
               (LETT #2# (CDR #2#) . #3#) (GO G190) G191 (EXIT NIL))
          (EXIT |n|))))) 

(DEFUN |GALFACT;shiftSet| (|s| |shift| $)
  (PROG (#1=#:G767 |e| #2=#:G766)
    (RETURN
     (SEQ
      (SPADCALL
       (PROGN
        (LETT #2# NIL . #3=(|GALFACT;shiftSet|))
        (SEQ (LETT |e| NIL . #3#)
             (LETT #1# (SPADCALL |s| (QREFELT $ 44)) . #3#) G190
             (COND
              ((OR (ATOM #1#) (PROGN (LETT |e| (CAR #1#) . #3#) NIL))
               (GO G191)))
             (SEQ (EXIT (LETT #2# (CONS (+ |e| |shift|) #2#) . #3#)))
             (LETT #1# (CDR #1#) . #3#) (GO G190) G191 (EXIT (NREVERSE0 #2#))))
       (QREFELT $ 45)))))) 

(DEFUN |GALFACT;reductum| (|n| $) (- |n| (ASH 1 (- (INTEGER-LENGTH |n|) 1)))) 

(DEFUN |GALFACT;seed| (|level| $) (- (ASH 1 |level|) 1)) 

(DEFUN |GALFACT;nextRecNum| (|levels| |level| |n| $)
  (PROG (|b| |lr| #1=#:G777 |l|)
    (RETURN
     (SEQ
      (EXIT
       (SEQ
        (SEQ (LETT |l| (INTEGER-LENGTH |n|) . #2=(|GALFACT;nextRecNum|))
             (EXIT
              (COND
               ((< |l| |levels|)
                (PROGN
                 (LETT #1# (CONS 1 (+ |n| (ASH 1 (- |l| 1)))) . #2#)
                 (GO #1#))))))
        (EXIT
         (COND
          ((EQL |n| (ASH (|GALFACT;seed| |level| $) (- |levels| |level|)))
           (CONS 0 "End of level"))
          ('T
           (SEQ (LETT |b| 1 . #2#)
                (SEQ G190
                     (COND
                      ((NULL
                        (EQL (- |l| |b|)
                             (LETT |lr|
                                   (INTEGER-LENGTH
                                    (LETT |n| (|GALFACT;reductum| |n| $)
                                          . #2#))
                                   . #2#)))
                       (GO G191)))
                     (SEQ (EXIT (LETT |b| (+ |b| 1) . #2#))) NIL (GO G190) G191
                     (EXIT NIL))
                (EXIT
                 (CONS 1
                       (+ (|GALFACT;reductum| |n| $)
                          (ASH (|GALFACT;seed| (+ |b| 1) $) |lr|))))))))))
      #1# (EXIT #1#))))) 

(DEFUN |GALFACT;fullSet| (|n| $)
  (PROG (|i| #1=#:G780)
    (RETURN
     (SEQ
      (SPADCALL
       (PROGN
        (LETT #1# NIL . #2=(|GALFACT;fullSet|))
        (SEQ (LETT |i| 0 . #2#) G190 (COND ((QSGREATERP |i| |n|) (GO G191)))
             (SEQ (EXIT (LETT #1# (CONS |i| #1#) . #2#)))
             (LETT |i| (QSADD1 |i|) . #2#) (GO G190) G191
             (EXIT (NREVERSE0 #1#))))
       (QREFELT $ 45)))))) 

(DEFUN |GALFACT;modularFactor;UPR;18| (|p| $)
  (PROG (|cprime| |choice| |nfc| |nf| #1=#:G807 |t| #2=#:G803 |d| |trials| |s|
         #3=#:G806 |j| |degfact| #4=#:G788 #5=#:G805 |f| |ddlist| #6=#:G804 |i|
         |diffp| |dirred| |n|)
    (RETURN
     (SEQ
      (EXIT
       (COND
        ((NULL (EQL (ABS (SPADCALL |p| (QREFELT $ 26))) 1))
         (|error| "modularFactor: the polynomial is not primitive."))
        ('T
         (COND
          ((ZEROP
            (LETT |n| (SPADCALL |p| (QREFELT $ 38))
                  . #7=(|GALFACT;modularFactor;UPR;18|)))
           (CONS 0 (LIST |p|)))
          ('T
           (SEQ (LETT |cprime| 2 . #7#) (LETT |trials| NIL . #7#)
                (LETT |d| (|GALFACT;fullSet| |n| $) . #7#)
                (LETT |dirred| (SPADCALL (LIST 0 |n|) (QREFELT $ 45)) . #7#)
                (LETT |s| (SPADCALL (QREFELT $ 48)) . #7#)
                (LETT |ddlist| NIL . #7#) (LETT |degfact| 0 . #7#)
                (LETT |nf| (+ (QREFELT $ 8) 1) . #7#)
                (LETT |diffp| (SPADCALL |p| (QREFELT $ 49)) . #7#)
                (SEQ (LETT |i| 1 . #7#) (LETT #6# (QREFELT $ 7) . #7#) G190
                     (COND ((QSGREATERP |i| #6#) #8=(GO G191)))
                     (SEQ
                      (EXIT
                       (COND
                        ((< (QREFELT $ 8) |nf|)
                         (SEQ
                          (SEQ G190
                               (COND
                                ((NULL
                                  (COND
                                   ((OR
                                     (ZEROP
                                      (REMAINDER2 (SPADCALL |p| (QREFELT $ 28))
                                                  |cprime|))
                                     (NULL
                                      (ZEROP
                                       (SPADCALL
                                        (SPADCALL |p| |diffp| |cprime|
                                                  (QREFELT $ 51))
                                        (QREFELT $ 38)))))
                                    'T)
                                   ('T 'NIL)))
                                 #8#))
                               (SEQ
                                (EXIT
                                 (LETT |cprime|
                                       (SPADCALL |cprime| (QREFELT $ 53))
                                       . #7#)))
                               NIL #9=(GO G190) G191 (EXIT NIL))
                          (LETT |ddlist| (SPADCALL |p| |cprime| (QREFELT $ 54))
                                . #7#)
                          (LETT |s| (SPADCALL (LIST 0) (QREFELT $ 45)) . #7#)
                          (SEQ (LETT |f| NIL . #7#) (LETT #5# |ddlist| . #7#)
                               G190
                               (COND
                                ((OR (ATOM #5#)
                                     (PROGN (LETT |f| (CAR #5#) . #7#) NIL))
                                 #8#))
                               (SEQ
                                (LETT |degfact|
                                      (PROG1 (LETT #4# (QCDR |f|) . #7#)
                                        (|check-subtype| (>= #4# 0)
                                                         '(|NonNegativeInteger|)
                                                         #4#))
                                      . #7#)
                                (EXIT
                                 (COND
                                  ((NULL (ZEROP |degfact|))
                                   (SEQ (LETT |j| 1 . #7#)
                                        (LETT #3#
                                              (QUOTIENT2
                                               (SPADCALL (QCAR |f|)
                                                         (QREFELT $ 38))
                                               |degfact|)
                                              . #7#)
                                        G190 (COND ((QSGREATERP |j| #3#) #8#))
                                        (SEQ
                                         (EXIT
                                          (LETT |s|
                                                (SPADCALL |s|
                                                          (|GALFACT;shiftSet|
                                                           |s| |degfact| $)
                                                          (QREFELT $ 55))
                                                . #7#)))
                                        (LETT |j| (QSADD1 |j|) . #7#) #9# G191
                                        (EXIT NIL))))))
                               (LETT #5# (CDR #5#) . #7#) #9# G191 (EXIT NIL))
                          (LETT |trials|
                                (CONS (CONS |cprime| |ddlist|) |trials|) . #7#)
                          (LETT |d| (SPADCALL |d| |s| (QREFELT $ 56)) . #7#)
                          (EXIT
                           (COND
                            ((SPADCALL |d| |dirred| (QREFELT $ 57))
                             (PROGN
                              (LETT #2# (CONS 0 (LIST |p|)) . #7#)
                              (GO #2#)))
                            ('T
                             (SEQ
                              (LETT |cprime| (SPADCALL |cprime| (QREFELT $ 53))
                                    . #7#)
                              (EXIT
                               (LETT |nf| (SPADCALL |ddlist| (QREFELT $ 41))
                                     . #7#)))))))))))
                     (LETT |i| (QSADD1 |i|) . #7#) #9# G191 (EXIT NIL))
                (LETT |choice| (|SPADfirst| |trials|) . #7#)
                (LETT |nfc| (SPADCALL (QCDR |choice|) (QREFELT $ 41)) . #7#)
                (SEQ (LETT |t| NIL . #7#) (LETT #1# (CDR |trials|) . #7#) G190
                     (COND
                      ((OR (ATOM #1#) (PROGN (LETT |t| (CAR #1#) . #7#) NIL))
                       #8#))
                     (SEQ
                      (LETT |nf| (SPADCALL (QCDR |t|) (QREFELT $ 41)) . #7#)
                      (EXIT
                       (COND
                        ((< |nf| |nfc|)
                         (SEQ (LETT |nfc| |nf| . #7#)
                              (EXIT (LETT |choice| |t| . #7#))))
                        ((EQL |nf| |nfc|)
                         (COND
                          ((< (QCAR |choice|) (QCAR |t|))
                           (SEQ (LETT |nfc| |nf| . #7#)
                                (EXIT (LETT |choice| |t| . #7#)))))))))
                     (LETT #1# (CDR #1#) . #7#) #9# G191 (EXIT NIL))
                (LETT |cprime| (QCAR |choice|) . #7#)
                (EXIT
                 (CONS |cprime|
                       (SPADCALL (QCDR |choice|) |cprime|
                                 (QREFELT $ 59))))))))))
      #2# (EXIT #2#))))) 

(DEFUN |GALFACT;degreePartition;LM;19| (|ddlist| $)
  (PROG (|dp| |dd| #1=#:G809 |d| #2=#:G815 |f|)
    (RETURN
     (SEQ
      (LETT |dp| (SPADCALL (QREFELT $ 63))
            . #3=(|GALFACT;degreePartition;LM;19|))
      (LETT |d| 0 . #3#) (LETT |dd| 0 . #3#)
      (SEQ (LETT |f| NIL . #3#) (LETT #2# |ddlist| . #3#) G190
           (COND
            ((OR (ATOM #2#) (PROGN (LETT |f| (CAR #2#) . #3#) NIL)) (GO G191)))
           (SEQ
            (EXIT
             (COND
              ((ZEROP (LETT |d| (SPADCALL (QCAR |f|) (QREFELT $ 38)) . #3#))
               (LETT |dp| (SPADCALL 0 |dp| (QREFELT $ 64)) . #3#))
              ('T
               (SEQ
                (LETT |dd|
                      (PROG1 (LETT #1# (QCDR |f|) . #3#)
                        (|check-subtype| (>= #1# 0) '(|NonNegativeInteger|)
                                         #1#))
                      . #3#)
                (EXIT
                 (LETT |dp|
                       (SPADCALL |dd| |dp| (QUOTIENT2 |d| |dd|) (QREFELT $ 65))
                       . #3#)))))))
           (LETT #2# (CDR #2#) . #3#) (GO G190) G191 (EXIT NIL))
      (EXIT |dp|))))) 

(DEFUN |GALFACT;henselfact| (|f| |pdecomp| $)
  (PROG (#1=#:G831 #2=#:G830 #3=#:G832 #4=#:G836 |g| |lrf| |b| #5=#:G827
         |cprime| |m| |cf| #6=#:G835)
    (RETURN
     (SEQ
      (EXIT
       (SEQ
        (COND
         ((SPADCALL |f| (QREFELT $ 68))
          (PROGN (LETT #6# (LIST |f|) . #7=(|GALFACT;henselfact|)) (GO #6#)))
         ((QREFELT $ 11)
          (COND
           ((SPADCALL |f| (QREFELT $ 36))
            (PROGN (LETT #6# (LIST |f|) . #7#) (GO #6#))))))
        (COND
         (|pdecomp|
          (COND
           ((QREFELT $ 10) (LETT |cf| (SPADCALL |f| (QREFELT $ 72)) . #7#))
           (#8='T (LETT |cf| (CONS 1 #9="failed") . #7#))))
         (#8# (LETT |cf| (CONS 1 #9#) . #7#)))
        (EXIT
         (COND
          ((QEQCAR |cf| 1)
           (SEQ (LETT |m| (SPADCALL |f| (QREFELT $ 61)) . #7#)
                (EXIT
                 (COND ((ZEROP (LETT |cprime| (QCAR |m|) . #7#)) (QCDR |m|))
                       (#8#
                        (SEQ
                         (LETT |b|
                               (PROG1
                                   (LETT #5#
                                         (*
                                          (SPADCALL 2
                                                    (SPADCALL |f|
                                                              (QREFELT $ 28))
                                                    (QREFELT $ 73))
                                          (SPADCALL |f| (QREFELT $ 75)))
                                         . #7#)
                                 (|check-subtype| (> #5# 0)
                                                  '(|PositiveInteger|) #5#))
                               . #7#)
                         (EXIT
                          (SPADCALL |f| (QCDR |m|) |cprime| |b|
                                    (QREFELT $ 77)))))))))
          (#8#
           (SEQ (LETT |lrf| (QCDR |cf|) . #7#)
                (EXIT
                 (PROGN
                  (LETT #1# NIL . #7#)
                  (SEQ (LETT |g| NIL . #7#)
                       (LETT #4# (|GALFACT;henselfact| (QCAR |lrf|) 'T $)
                             . #7#)
                       G190
                       (COND
                        ((OR (ATOM #4#) (PROGN (LETT |g| (CAR #4#) . #7#) NIL))
                         (GO G191)))
                       (SEQ
                        (EXIT
                         (PROGN
                          (LETT #3#
                                (|GALFACT;henselfact|
                                 (SPADCALL |g| (QCDR |lrf|) (QREFELT $ 78))
                                 'NIL $)
                                . #7#)
                          (COND (#1# (LETT #2# (APPEND #2# #3#) . #7#))
                                ('T
                                 (PROGN
                                  (LETT #2# #3# . #7#)
                                  (LETT #1# 'T . #7#)))))))
                       (LETT #4# (CDR #4#) . #7#) (GO G190) G191 (EXIT NIL))
                  (COND (#1# #2#) (#8# NIL))))))))))
      #6# (EXIT #6#))))) 

(DEFUN |GALFACT;completeFactor| (|f| |lf| |cprime| |pk| |r| |d| $)
  (PROG (|level| |found?| |levels| |ic| #1=#:G885 |ltrue| #2=#:G871 |llg| |b|
         #3=#:G870 |degf| #4=#:G869 |lg| |gpk| #5=#:G864 #6=#:G861 #7=#:G859
         |rg| #8=#:G858 |dg| |f0| |lc| #9=#:G856 #10=#:G855 |nb| |j| |f1| |g|
         |g0| |degg| |i| #11=#:G772)
    (RETURN
     (SEQ
      (EXIT
       (SEQ
        (LETT |lc| (SPADCALL |f| (QREFELT $ 28))
              . #12=(|GALFACT;completeFactor|))
        (LETT |f0| (SPADCALL |f| 0 (QREFELT $ 79)) . #12#)
        (LETT |ltrue| NIL . #12#) (LETT |found?| 'T . #12#)
        (LETT |degf| 0 . #12#) (LETT |degg| 0 . #12#) (LETT |g0| 0 . #12#)
        (LETT |g| (|spadConstant| $ 47) . #12#) (LETT |rg| 0 . #12#)
        (LETT |nb| 0 . #12#) (LETT |lg| NIL . #12#) (LETT |b| 1 . #12#)
        (LETT |dg| (SPADCALL (QREFELT $ 48)) . #12#)
        (LETT |llg| (CONS NIL 0) . #12#) (LETT |levels| (LENGTH |lf|) . #12#)
        (LETT |level| 1 . #12#) (LETT |ic| (CONS 1 0) . #12#)
        (LETT |i| 0 . #12#)
        (SEQ G190 (COND ((NULL (< |level| |levels|)) #13=(GO G191)))
             (SEQ (LETT |ic| (CONS 1 (|GALFACT;seed| |level| $)) . #12#)
                  (SEQ G190
                       (COND
                        ((NULL (COND (|found?| 'NIL) ('T (QEQCAR |ic| 1))))
                         #13#))
                       (SEQ
                        (LETT |i|
                              (PROG2
                                  (LETT #11# |ic| . #12#)
                                  (QCDR #11#)
                                (|check-union| (QEQCAR #11# 1) (|Integer|)
                                               #11#))
                              . #12#)
                        (LETT |degg| 0 . #12#) (LETT |g0| 1 . #12#)
                        (SEQ (LETT |j| 1 . #12#) G190
                             (COND ((QSGREATERP |j| |levels|) #13#))
                             (SEQ
                              (EXIT
                               (COND
                                ((SPADCALL |i| (- |j| 1) (QREFELT $ 80))
                                 (SEQ
                                  (LETT |degg|
                                        (+ |degg|
                                           (SPADCALL
                                            (SPADCALL |lf| |j| (QREFELT $ 81))
                                            (QREFELT $ 38)))
                                        . #12#)
                                  (EXIT
                                   (LETT |g0|
                                         (* |g0|
                                            (SPADCALL
                                             (SPADCALL |lf| |j| (QREFELT $ 81))
                                             0 (QREFELT $ 79)))
                                         . #12#)))))))
                             (LETT |j| (QSADD1 |j|) . #12#) #14=(GO G190) G191
                             (EXIT NIL))
                        (LETT |g0| (SPADCALL (* |lc| |g0|) |pk| (QREFELT $ 82))
                              . #12#)
                        (COND
                         ((SPADCALL |degg| |d| (QREFELT $ 83))
                          (COND
                           ((QEQCAR
                             (SPADCALL (* |lc| |f0|) |g0| (QREFELT $ 85)) 0)
                            (SEQ
                             (LETT |g| (SPADCALL |lc| (QREFELT $ 86)) . #12#)
                             (SEQ (LETT |j| 1 . #12#) G190
                                  (COND ((QSGREATERP |j| |levels|) #13#))
                                  (SEQ
                                   (EXIT
                                    (COND
                                     ((SPADCALL |i| (- |j| 1) (QREFELT $ 80))
                                      (LETT |g|
                                            (SPADCALL |g|
                                                      (SPADCALL |lf| |j|
                                                                (QREFELT $ 81))
                                                      (QREFELT $ 87))
                                            . #12#)))))
                                  (LETT |j| (QSADD1 |j|) . #12#) #14# G191
                                  (EXIT NIL))
                             (LETT |g|
                                   (SPADCALL (SPADCALL |g| |pk| (QREFELT $ 88))
                                             (QREFELT $ 89))
                                   . #12#)
                             (LETT |f1| (SPADCALL |f| |g| (QREFELT $ 90))
                                   . #12#)
                             (EXIT
                              (COND
                               ((QEQCAR |f1| 0)
                                (SEQ (LETT |found?| 'T . #12#)
                                     (LETT |nb| 1 . #12#)
                                     (SEQ (LETT |j| 1 . #12#) G190
                                          (COND
                                           ((QSGREATERP |j| |levels|) #13#))
                                          (SEQ
                                           (EXIT
                                            (COND
                                             ((SPADCALL |i| (- |j| 1)
                                                        (QREFELT $ 80))
                                              (SEQ
                                               (SPADCALL |lf| |j| |nb|
                                                         (QREFELT $ 92))
                                               (EXIT
                                                (LETT |nb| (+ |nb| 1)
                                                      . #12#)))))))
                                          (LETT |j| (QSADD1 |j|) . #12#) #14#
                                          G191 (EXIT NIL))
                                     (LETT |lg| |lf| . #12#)
                                     (LETT |lf|
                                           (SPADCALL |lf|
                                                     (PROG1
                                                         (LETT #10# |level|
                                                               . #12#)
                                                       (|check-subtype|
                                                        (>= #10# 0)
                                                        '(|NonNegativeInteger|)
                                                        #10#))
                                                     (QREFELT $ 93))
                                           . #12#)
                                     (SPADCALL
                                      (SPADCALL |lg|
                                                (PROG1
                                                    (LETT #9# (- |level| 1)
                                                          . #12#)
                                                  (|check-subtype| (>= #9# 0)
                                                                   '(|NonNegativeInteger|)
                                                                   #9#))
                                                (QREFELT $ 93))
                                      NIL (QREFELT $ 94))
                                     (LETT |f| (QCDR |f1|) . #12#)
                                     (LETT |lc| (SPADCALL |f| (QREFELT $ 28))
                                           . #12#)
                                     (LETT |f0| (SPADCALL |f| 0 (QREFELT $ 79))
                                           . #12#)
                                     (LETT |dg|
                                           (SPADCALL
                                            (CONS #'|GALFACT;completeFactor!0|
                                                  (VECTOR $ |degg|))
                                            |d| (QREFELT $ 99))
                                           . #12#)
                                     (COND
                                      ((SPADCALL |dg|
                                                 (SPADCALL (LIST 0 |degg|)
                                                           (QREFELT $ 45))
                                                 (QREFELT $ 57))
                                       (LETT |lg| (LIST |g|) . #12#))
                                      ('T
                                       (SEQ
                                        (LETT |rg|
                                              (PROG1
                                                  (LETT #8#
                                                        (MAX 2
                                                             (- (+ |r| |level|)
                                                                |levels|))
                                                        . #12#)
                                                (|check-subtype| (>= #8# 0)
                                                                 '(|NonNegativeInteger|)
                                                                 #8#))
                                              . #12#)
                                        (LETT |b|
                                              (PROG1
                                                  (LETT #7#
                                                        (*
                                                         (SPADCALL 2
                                                                   (SPADCALL
                                                                    |g|
                                                                    (QREFELT $
                                                                             28))
                                                                   (QREFELT $
                                                                            73))
                                                         (SPADCALL |g| |rg|
                                                                   (QREFELT $
                                                                            100)))
                                                        . #12#)
                                                (|check-subtype| (> #7# 0)
                                                                 '(|PositiveInteger|)
                                                                 #7#))
                                              . #12#)
                                        (EXIT
                                         (COND
                                          ((< |pk| |b|)
                                           (COND
                                            ((SPADCALL |g| (QREFELT $ 68))
                                             (LETT |lg| (LIST |g|) . #12#))
                                            ((QREFELT $ 11)
                                             (COND
                                              ((SPADCALL |g| (QREFELT $ 36))
                                               (LETT |lg| (LIST |g|) . #12#))
                                              ('T
                                               (SEQ
                                                (LETT |llg|
                                                      (SPADCALL |g| |lg|
                                                                |cprime| |b|
                                                                (QREFELT $
                                                                         102))
                                                      . #12#)
                                                (LETT |gpk|
                                                      (PROG1
                                                          (LETT #6#
                                                                (QCDR |llg|)
                                                                . #12#)
                                                        (|check-subtype|
                                                         (> #6# 0)
                                                         '(|PositiveInteger|)
                                                         #6#))
                                                      . #12#)
                                                (EXIT
                                                 (COND
                                                  ((< |gpk| |b|)
                                                   (LETT |lg| (QCAR |llg|)
                                                         . #12#))
                                                  ('T
                                                   (LETT |lg|
                                                         (|GALFACT;completeFactor|
                                                          |g| (QCAR |llg|)
                                                          |cprime| |gpk| |rg|
                                                          |dg| $)
                                                         . #12#))))))))
                                            ('T
                                             (SEQ
                                              (LETT |llg|
                                                    (SPADCALL |g| |lg| |cprime|
                                                              |b|
                                                              (QREFELT $ 102))
                                                    . #12#)
                                              (LETT |gpk|
                                                    (PROG1
                                                        (LETT #5# (QCDR |llg|)
                                                              . #12#)
                                                      (|check-subtype|
                                                       (> #5# 0)
                                                       '(|PositiveInteger|)
                                                       #5#))
                                                    . #12#)
                                              (EXIT
                                               (COND
                                                ((< |gpk| |b|)
                                                 (LETT |lg| (QCAR |llg|)
                                                       . #12#))
                                                ('T
                                                 (LETT |lg|
                                                       (|GALFACT;completeFactor|
                                                        |g| (QCAR |llg|)
                                                        |cprime| |gpk| |rg|
                                                        |dg| $)
                                                       . #12#))))))))
                                          ('T
                                           (LETT |lg| (LIST |g|) . #12#)))))))
                                     (LETT |ltrue| (APPEND |ltrue| |lg|)
                                           . #12#)
                                     (LETT |r|
                                           (PROG1
                                               (LETT #4#
                                                     (MAX 2
                                                          (- |r|
                                                             (LENGTH |lg|)))
                                                     . #12#)
                                             (|check-subtype| (>= #4# 0)
                                                              '(|NonNegativeInteger|)
                                                              #4#))
                                           . #12#)
                                     (LETT |degf| (SPADCALL |f| (QREFELT $ 38))
                                           . #12#)
                                     (LETT |d|
                                           (SPADCALL
                                            (CONS #'|GALFACT;completeFactor!1|
                                                  (VECTOR $ |degf|))
                                            |d| (QREFELT $ 99))
                                           . #12#)
                                     (EXIT
                                      (COND
                                       ((< 1 |degf|)
                                        (SEQ
                                         (LETT |b|
                                               (PROG1
                                                   (LETT #3#
                                                         (*
                                                          (SPADCALL 2 |lc|
                                                                    (QREFELT $
                                                                             73))
                                                          (SPADCALL |f| |r|
                                                                    (QREFELT $
                                                                             100)))
                                                         . #12#)
                                                 (|check-subtype| (> #3# 0)
                                                                  '(|PositiveInteger|)
                                                                  #3#))
                                               . #12#)
                                         (EXIT
                                          (COND
                                           ((< |pk| |b|)
                                            (SEQ
                                             (LETT |llg|
                                                   (SPADCALL |f| |lf| |cprime|
                                                             |b|
                                                             (QREFELT $ 102))
                                                   . #12#)
                                             (LETT |lf| (QCAR |llg|) . #12#)
                                             (LETT |pk|
                                                   (PROG1
                                                       (LETT #2# (QCDR |llg|)
                                                             . #12#)
                                                     (|check-subtype| (> #2# 0)
                                                                      '(|PositiveInteger|)
                                                                      #2#))
                                                   . #12#)
                                             (COND
                                              ((< |pk| |b|)
                                               (PROGN
                                                (LETT #1# (APPEND |lf| |ltrue|)
                                                      . #12#)
                                                (GO #1#))))
                                             (EXIT
                                              (LETT |level| 1 . #12#))))))))
                                       ('T
                                        (SEQ
                                         (COND
                                          ((EQL |degf| 1)
                                           (LETT |ltrue| (CONS |f| |ltrue|)
                                                 . #12#)))
                                         (EXIT
                                          (PROGN
                                           (LETT #1# |ltrue| . #12#)
                                           (GO #1#))))))))))))))))
                        (EXIT
                         (LETT |ic|
                               (|GALFACT;nextRecNum| |levels| |level| |i| $)
                               . #12#)))
                       NIL #14# G191 (EXIT NIL))
                  (COND
                   (|found?|
                    (SEQ (LETT |levels| (LENGTH |lf|) . #12#)
                         (EXIT (LETT |found?| 'NIL . #12#)))))
                  (EXIT
                   (COND
                    ((NULL (QEQCAR |ic| 1))
                     (LETT |level| (+ |level| 1) . #12#)))))
             NIL #14# G191 (EXIT NIL))
        (EXIT (CONS |f| |ltrue|))))
      #1# (EXIT #1#))))) 

(DEFUN |GALFACT;completeFactor!1| (|x| $$)
  (PROG (|degf| $)
    (LETT |degf| (QREFELT $$ 1) . #1=(|GALFACT;completeFactor|))
    (LETT $ (QREFELT $$ 0) . #1#)
    (RETURN
     (PROGN
      (COND ((SPADCALL |degf| |x| (QREFELT $ 95)) (|spadConstant| $ 96))
            ('T (|spadConstant| $ 97))))))) 

(DEFUN |GALFACT;completeFactor!0| (|x| $$)
  (PROG (|degg| $)
    (LETT |degg| (QREFELT $$ 1) . #1=(|GALFACT;completeFactor|))
    (LETT $ (QREFELT $$ 0) . #1#)
    (RETURN
     (PROGN
      (COND ((SPADCALL |degg| |x| (QREFELT $ 95)) (|spadConstant| $ 96))
            ('T (|spadConstant| $ 97))))))) 

(DEFUN |GALFACT;divideSet| (|s| |n| $)
  (PROG (|l| |ee| #1=#:G893 |e|)
    (RETURN
     (SEQ (LETT |l| (LIST 0) . #2=(|GALFACT;divideSet|))
          (SEQ (LETT |e| NIL . #2#)
               (LETT #1# (SPADCALL |s| (QREFELT $ 44)) . #2#) G190
               (COND
                ((OR (ATOM #1#) (PROGN (LETT |e| (CAR #1#) . #2#) NIL))
                 (GO G191)))
               (SEQ (LETT |ee| (SPADCALL |e| |n| (QREFELT $ 103)) . #2#)
                    (EXIT
                     (COND
                      ((QEQCAR |ee| 0)
                       (LETT |l| (CONS (QCDR |ee|) |l|) . #2#)))))
               (LETT #1# (CDR #1#) . #2#) (GO G190) G191 (EXIT NIL))
          (EXIT (SPADCALL |l| (QREFELT $ 45))))))) 

(DEFUN |GALFACT;btwFactor| (|f| |d| |r| |pdecomp| $)
  (PROG (#1=#:G930 |i| |lf| #2=#:G929 |fact| #3=#:G928 #4=#:G917 |lfg|
         #5=#:G916 |df| #6=#:G914 |dgh| |g| #7=#:G927 |lg| |dh| |lrf| |pk|
         #8=#:G909 |lm| |b| #9=#:G907 |f0| |lc| #10=#:G926 |cprime| |m| |cf|
         |negativelc?| |reverse?|)
    (RETURN
     (SEQ
      (EXIT
       (SEQ
        (LETT |df| (SPADCALL |f| (QREFELT $ 38)) . #11=(|GALFACT;btwFactor|))
        (COND
         ((NULL (EQL (SPADCALL |d| (QREFELT $ 104)) |df|))
          (EXIT (|error| "btwFact: Bad arguments"))))
        (LETT |reverse?| 'NIL . #11#) (LETT |negativelc?| 'NIL . #11#)
        (EXIT
         (COND
          ((SPADCALL |d| (SPADCALL (LIST 0 |df|) (QREFELT $ 45))
                     (QREFELT $ 57))
           (LIST |f|))
          (#12='T
           (SEQ
            (COND
             ((< (ABS (SPADCALL |f| 0 (QREFELT $ 79)))
                 (ABS (SPADCALL |f| (QREFELT $ 28))))
              (SEQ (LETT |f| (SPADCALL |f| (QREFELT $ 106)) . #11#)
                   (EXIT (LETT |reverse?| 'T . #11#)))))
            (COND
             ((SPADCALL |f| (QREFELT $ 68))
              (EXIT
               (COND (|reverse?| (LIST (SPADCALL |f| (QREFELT $ 106))))
                     (#12# (LIST |f|)))))
             ((QREFELT $ 11)
              (COND
               ((SPADCALL |f| (QREFELT $ 36))
                (EXIT
                 (COND (|reverse?| (LIST (SPADCALL |f| (QREFELT $ 106))))
                       (#12# (LIST |f|))))))))
            (COND
             ((< (SPADCALL |f| (QREFELT $ 28)) 0)
              (SEQ (LETT |f| (SPADCALL |f| (QREFELT $ 107)) . #11#)
                   (EXIT (LETT |negativelc?| 'T . #11#)))))
            (COND
             (|pdecomp|
              (COND
               ((QREFELT $ 10)
                (LETT |cf| (SPADCALL |f| (QREFELT $ 72)) . #11#))
               (#12# (LETT |cf| (CONS 1 #13="failed") . #11#))))
             (#12# (LETT |cf| (CONS 1 #13#) . #11#)))
            (COND
             ((QEQCAR |cf| 1)
              (SEQ (LETT |m| (SPADCALL |f| (QREFELT $ 61)) . #11#)
                   (EXIT
                    (COND
                     ((ZEROP (LETT |cprime| (QCAR |m|) . #11#))
                      (COND
                       (|reverse?|
                        (COND
                         (|negativelc?|
                          (PROGN
                           (LETT #10#
                                 (LIST
                                  (SPADCALL (SPADCALL |f| (QREFELT $ 106))
                                            (QREFELT $ 107)))
                                 . #11#)
                           (GO #10#)))
                         (#12#
                          (PROGN
                           (LETT #10# (LIST (SPADCALL |f| (QREFELT $ 106)))
                                 . #11#)
                           (GO #10#)))))
                       (|negativelc?|
                        (PROGN
                         (LETT #10# (LIST (SPADCALL |f| (QREFELT $ 107)))
                               . #11#)
                         (GO #10#)))
                       (#12# (PROGN (LETT #10# (LIST |f|) . #11#) (GO #10#)))))
                     (#12#
                      (SEQ
                       (COND
                        ((SPADCALL |f| (QREFELT $ 108))
                         (LETT |d| (SPADCALL 1 |d| (QREFELT $ 110)) . #11#)))
                       (LETT |lc| (SPADCALL |f| (QREFELT $ 28)) . #11#)
                       (LETT |f0| (SPADCALL |f| 0 (QREFELT $ 79)) . #11#)
                       (LETT |b|
                             (PROG1
                                 (LETT #9#
                                       (* (SPADCALL 2 |lc| (QREFELT $ 73))
                                          (SPADCALL |f| |r| (QREFELT $ 100)))
                                       . #11#)
                               (|check-subtype| (> #9# 0) '(|PositiveInteger|)
                                                #9#))
                             . #11#)
                       (LETT |lm|
                             (SPADCALL |f| (QCDR |m|) |cprime| |b|
                                       (QREFELT $ 102))
                             . #11#)
                       (LETT |lf| (QCAR |lm|) . #11#)
                       (LETT |pk|
                             (PROG1 (LETT #8# (QCDR |lm|) . #11#)
                               (|check-subtype| (> #8# 0) '(|PositiveInteger|)
                                                #8#))
                             . #11#)
                       (COND
                        ((SPADCALL (|SPADfirst| |lf|) (QREFELT $ 111))
                         (LETT |lf| (CDR |lf|) . #11#)))
                       (EXIT
                        (COND
                         ((NULL (< |pk| |b|))
                          (LETT |lf|
                                (|GALFACT;completeFactor| |f| |lf| |cprime|
                                 |pk| |r| |d| $)
                                . #11#))))))))))
             (#12#
              (SEQ (LETT |lrf| (QCDR |cf|) . #11#)
                   (LETT |dh| (SPADCALL (QCDR |lrf|) (QREFELT $ 38)) . #11#)
                   (LETT |lg|
                         (|GALFACT;btwFactor| (QCAR |lrf|)
                          (|GALFACT;divideSet| |d| |dh| $) 2 'T $)
                         . #11#)
                   (LETT |lf| NIL . #11#)
                   (EXIT
                    (SEQ (LETT |i| 1 . #11#) (LETT #7# (LENGTH |lg|) . #11#)
                         G190 (COND ((QSGREATERP |i| #7#) #14=(GO G191)))
                         (SEQ
                          (LETT |g| (SPADCALL |lg| |i| (QREFELT $ 81)) . #11#)
                          (LETT |dgh| (* (SPADCALL |g| (QREFELT $ 38)) |dh|)
                                . #11#)
                          (LETT |df|
                                (PROG2
                                    (LETT #6#
                                          (SPADCALL |df| |dgh| (QREFELT $ 112))
                                          . #11#)
                                    (QCDR #6#)
                                  (|check-union| (QEQCAR #6# 0)
                                                 (|NonNegativeInteger|) #6#))
                                . #11#)
                          (LETT |lfg|
                                (|GALFACT;btwFactor|
                                 (SPADCALL |g| (QCDR |lrf|) (QREFELT $ 78))
                                 (SPADCALL
                                  (CONS #'|GALFACT;btwFactor!0|
                                        (VECTOR $ |dgh|))
                                  |d| (QREFELT $ 99))
                                 (PROG1 (LETT #5# (MAX 2 (- |r| |df|)) . #11#)
                                   (|check-subtype| (>= #5# 0)
                                                    '(|NonNegativeInteger|)
                                                    #5#))
                                 'NIL $)
                                . #11#)
                          (LETT |lf| (APPEND |lf| |lfg|) . #11#)
                          (EXIT
                           (LETT |r|
                                 (PROG1
                                     (LETT #4# (MAX 2 (- |r| (LENGTH |lfg|)))
                                           . #11#)
                                   (|check-subtype| (>= #4# 0)
                                                    '(|NonNegativeInteger|)
                                                    #4#))
                                 . #11#)))
                         (LETT |i| (QSADD1 |i|) . #11#) #15=(GO G190) G191
                         (EXIT NIL))))))
            (COND
             (|reverse?|
              (LETT |lf|
                    (PROGN
                     (LETT #3# NIL . #11#)
                     (SEQ (LETT |fact| NIL . #11#) (LETT #2# |lf| . #11#) G190
                          (COND
                           ((OR (ATOM #2#)
                                (PROGN (LETT |fact| (CAR #2#) . #11#) NIL))
                            #14#))
                          (SEQ
                           (EXIT
                            (LETT #3#
                                  (CONS (SPADCALL |fact| (QREFELT $ 106)) #3#)
                                  . #11#)))
                          (LETT #2# (CDR #2#) . #11#) #15# G191
                          (EXIT (NREVERSE0 #3#))))
                    . #11#)))
            (SEQ (LETT |i| 1 . #11#) (LETT #1# (LENGTH |lf|) . #11#) G190
                 (COND ((QSGREATERP |i| #1#) #14#))
                 (SEQ
                  (EXIT
                   (COND
                    ((<
                      (SPADCALL (SPADCALL |lf| |i| (QREFELT $ 81))
                                (QREFELT $ 28))
                      0)
                     (SPADCALL |lf| |i|
                               (SPADCALL (SPADCALL |lf| |i| (QREFELT $ 81))
                                         (QREFELT $ 107))
                               (QREFELT $ 113))))))
                 (LETT |i| (QSADD1 |i|) . #11#) #15# G191 (EXIT NIL))
            (EXIT |lf|)))))))
      #10# (EXIT #10#))))) 

(DEFUN |GALFACT;btwFactor!0| (|x| $$)
  (PROG (|dgh| $)
    (LETT |dgh| (QREFELT $$ 1) . #1=(|GALFACT;btwFactor|))
    (LETT $ (QREFELT $$ 0) . #1#)
    (RETURN
     (PROGN
      (COND ((SPADCALL |dgh| |x| (QREFELT $ 95)) (|spadConstant| $ 96))
            ('T (|spadConstant| $ 97))))))) 

(DEFUN |GALFACT;makeFR;RF;24| (|flist| $)
  (PROG (|fflist| #1=#:G956 |fc| #2=#:G955 |ff| |ctp|)
    (RETURN
     (SEQ
      (LETT |ctp| (SPADCALL (QCAR |flist|) (QREFELT $ 31))
            . #3=(|GALFACT;makeFR;RF;24|))
      (LETT |fflist| NIL . #3#)
      (SEQ (LETT |ff| NIL . #3#) (LETT #2# (QCDR |flist|) . #3#) G190
           (COND
            ((OR (ATOM #2#) (PROGN (LETT |ff| (CAR #2#) . #3#) NIL))
             #4=(GO G191)))
           (SEQ
            (EXIT
             (LETT |fflist|
                   (CONS (VECTOR (CONS 3 "prime") (QCAR |ff|) (QCDR |ff|))
                         |fflist|)
                   . #3#)))
           (LETT #2# (CDR #2#) . #3#) #5=(GO G190) G191 (EXIT NIL))
      (SEQ (LETT |fc| NIL . #3#)
           (LETT #1# (SPADCALL |ctp| (QREFELT $ 117)) . #3#) G190
           (COND ((OR (ATOM #1#) (PROGN (LETT |fc| (CAR #1#) . #3#) NIL)) #4#))
           (SEQ
            (EXIT
             (LETT |fflist|
                   (CONS
                    (VECTOR (QVELT |fc| 0)
                            (SPADCALL (QVELT |fc| 1) (QREFELT $ 86))
                            (QVELT |fc| 2))
                    |fflist|)
                   . #3#)))
           (LETT #1# (CDR #1#) . #3#) #5# G191 (EXIT NIL))
      (EXIT
       (SPADCALL (SPADCALL (SPADCALL |ctp| (QREFELT $ 118)) (QREFELT $ 86))
                 |fflist| (QREFELT $ 122))))))) 

(DEFUN |GALFACT;quadratic| (|p| $)
  (PROG (#1=#:G965 |f| |b| |a| |d| |r|)
    (RETURN
     (SEQ (LETT |a| (SPADCALL |p| (QREFELT $ 28)) . #2=(|GALFACT;quadratic|))
          (LETT |b| (SPADCALL |p| 1 (QREFELT $ 79)) . #2#)
          (LETT |d|
                (- (SPADCALL |b| 2 (QREFELT $ 126))
                   (* (SPADCALL 4 |a| (QREFELT $ 73))
                      (SPADCALL |p| 0 (QREFELT $ 79))))
                . #2#)
          (LETT |r| (SPADCALL |d| (QREFELT $ 129)) . #2#)
          (EXIT
           (COND ((QEQCAR |r| 1) (LIST |p|))
                 ('T
                  (SEQ (LETT |b| (+ |b| (QCDR |r|)) . #2#)
                       (LETT |a| (SPADCALL 2 |a| (QREFELT $ 73)) . #2#)
                       (LETT |d| (GCD |a| |b|) . #2#)
                       (COND
                        ((NULL (EQL |d| 1))
                         (SEQ (LETT |a| (QUOTIENT2 |a| |d|) . #2#)
                              (EXIT (LETT |b| (QUOTIENT2 |b| |d|) . #2#)))))
                       (LETT |f|
                             (SPADCALL (SPADCALL |a| 1 (QREFELT $ 130))
                                       (SPADCALL |b| 0 (QREFELT $ 130))
                                       (QREFELT $ 131))
                             . #2#)
                       (EXIT
                        (CONS |f|
                              (LIST
                               (PROG2
                                   (LETT #1# (SPADCALL |p| |f| (QREFELT $ 90))
                                         . #2#)
                                   (QCDR #1#)
                                 (|check-union| (QEQCAR #1# 0) (QREFELT $ 6)
                                                #1#))))))))))))) 

(DEFUN |GALFACT;isPowerOf2| (|n| $)
  (PROG (|qr|)
    (RETURN
     (SEQ
      (COND ((EQL |n| 1) 'T)
            (#1='T
             (SEQ (LETT |qr| (DIVIDE2 |n| 2) |GALFACT;isPowerOf2|)
                  (EXIT
                   (COND ((EQL (QCDR |qr|) 1) 'NIL)
                         (#1# (|GALFACT;isPowerOf2| (QCAR |qr|) $))))))))))) 

(DEFUN |GALFACT;subMinusX| (|supPol| $)
  (PROG (|minusX|)
    (RETURN
     (SEQ (LETT |minusX| (SPADCALL -1 1 (QREFELT $ 133)) |GALFACT;subMinusX|)
          (EXIT
           (SPADCALL (SPADCALL |supPol| |minusX| (QREFELT $ 134))
                     (QREFELT $ 135))))))) 

(DEFUN |GALFACT;henselFact;UPBR;28| (|f| |sqf| $)
  (PROG (|factorlist| #1=#:G1019 |pf| #2=#:G1018 #3=#:G1017 #4=#:G1016 |d|
         |sqff| |mult| #5=#:G1015 |sqfr| |sqfflist| #6=#:G1014 #7=#:G1013 |fac|
         #8=#:G1012 |sfac| #9=#:G1011 |lcPol| |c| #10=#:G978)
    (RETURN
     (SEQ (LETT |factorlist| NIL . #11=(|GALFACT;henselFact;UPBR;28|))
          (LETT |c| (SPADCALL |f| (QREFELT $ 26)) . #11#)
          (LETT |f|
                (PROG2
                    (LETT #10# (SPADCALL |f| |c| (QREFELT $ 136)) . #11#)
                    (QCDR #10#)
                  (|check-union| (QEQCAR #10# 0) (QREFELT $ 6) #10#))
                . #11#)
          (COND
           ((< (SPADCALL |f| (QREFELT $ 28)) 0)
            (SEQ (LETT |c| (- |c|) . #11#)
                 (EXIT (LETT |f| (SPADCALL |f| (QREFELT $ 107)) . #11#)))))
          (SEQ (LETT |d| (SPADCALL |f| (QREFELT $ 137)) . #11#)
               (EXIT
                (COND
                 ((< 0 |d|)
                  (SEQ
                   (LETT |f|
                         (QCAR
                          (SPADCALL |f| (SPADCALL 1 |d| (QREFELT $ 130))
                                    (QREFELT $ 139)))
                         . #11#)
                   (EXIT
                    (LETT |factorlist|
                          (LIST (CONS (SPADCALL 1 1 (QREFELT $ 130)) |d|))
                          . #11#)))))))
          (LETT |d| (SPADCALL |f| (QREFELT $ 38)) . #11#)
          (EXIT
           (COND ((ZEROP |d|) (CONS |c| |factorlist|))
                 ((EQL |d| 1) (CONS |c| (CONS (CONS |f| 1) |factorlist|)))
                 (#12='T
                  (SEQ
                   (LETT |lcPol|
                         (SPADCALL (SPADCALL |f| (QREFELT $ 28))
                                   (QREFELT $ 86))
                         . #11#)
                   (EXIT
                    (COND
                     ((SPADCALL (SPADCALL |lcPol| (QREFELT $ 107))
                                (SPADCALL |f| (QREFELT $ 24)) (QREFELT $ 140))
                      (SEQ
                       (SEQ (LETT |fac| NIL . #11#)
                            (LETT #9#
                                  (SPADCALL (ELT $ 135)
                                            (SPADCALL |d| (QREFELT $ 143))
                                            (QREFELT $ 146))
                                  . #11#)
                            G190
                            (COND
                             ((OR (ATOM #9#)
                                  (PROGN (LETT |fac| (CAR #9#) . #11#) NIL))
                              #13=(GO G191)))
                            (SEQ
                             (EXIT
                              (LETT |factorlist|
                                    (CONS (CONS |fac| 1) |factorlist|)
                                    . #11#)))
                            (LETT #9# (CDR #9#) . #11#) #14=(GO G190) G191
                            (EXIT NIL))
                       (EXIT (CONS |c| |factorlist|))))
                     (#12#
                      (SEQ
                       (COND
                        ((ODDP |d|)
                         (COND
                          ((SPADCALL |lcPol| (SPADCALL |f| (QREFELT $ 24))
                                     (QREFELT $ 140))
                           (EXIT
                            (SEQ
                             (SEQ (LETT |sfac| NIL . #11#)
                                  (LETT #8# (SPADCALL |d| (QREFELT $ 143))
                                        . #11#)
                                  G190
                                  (COND
                                   ((OR (ATOM #8#)
                                        (PROGN
                                         (LETT |sfac| (CAR #8#) . #11#)
                                         NIL))
                                    #13#))
                                  (SEQ
                                   (LETT |fac| (|GALFACT;subMinusX| |sfac| $)
                                         . #11#)
                                   (COND
                                    ((< (SPADCALL |fac| (QREFELT $ 28)) 0)
                                     (LETT |fac|
                                           (SPADCALL |fac| (QREFELT $ 107))
                                           . #11#)))
                                   (EXIT
                                    (LETT |factorlist|
                                          (CONS (CONS |fac| 1) |factorlist|)
                                          . #11#)))
                                  (LETT #8# (CDR #8#) . #11#) #14# G191
                                  (EXIT NIL))
                             (EXIT (CONS |c| |factorlist|))))))))
                       (COND
                        ((|GALFACT;isPowerOf2| |d| $)
                         (COND
                          ((SPADCALL |lcPol| (SPADCALL |f| (QREFELT $ 24))
                                     (QREFELT $ 140))
                           (EXIT
                            (SEQ
                             (LETT |factorlist|
                                   (CONS (CONS |f| 1) |factorlist|) . #11#)
                             (EXIT (CONS |c| |factorlist|))))))))
                       (EXIT
                        (COND
                         (|sqf|
                          (CONS |c|
                                (APPEND
                                 (PROGN
                                  (LETT #7# NIL . #11#)
                                  (SEQ (LETT |pf| NIL . #11#)
                                       (LETT #6#
                                             (|GALFACT;henselfact| |f| 'T $)
                                             . #11#)
                                       G190
                                       (COND
                                        ((OR (ATOM #6#)
                                             (PROGN
                                              (LETT |pf| (CAR #6#) . #11#)
                                              NIL))
                                         #13#))
                                       (SEQ
                                        (EXIT
                                         (LETT #7# (CONS (CONS |pf| 1) #7#)
                                               . #11#)))
                                       (LETT #6# (CDR #6#) . #11#) #14# G191
                                       (EXIT (NREVERSE0 #7#))))
                                 |factorlist|)))
                         (#12#
                          (SEQ
                           (LETT |sqfflist|
                                 (SPADCALL (SPADCALL |f| (QREFELT $ 147))
                                           (QREFELT $ 150))
                                 . #11#)
                           (SEQ (LETT |sqfr| NIL . #11#)
                                (LETT #5# |sqfflist| . #11#) G190
                                (COND
                                 ((OR (ATOM #5#)
                                      (PROGN
                                       (LETT |sqfr| (CAR #5#) . #11#)
                                       NIL))
                                  #13#))
                                (SEQ (LETT |mult| (QCDR |sqfr|) . #11#)
                                     (LETT |sqff| (QCAR |sqfr|) . #11#)
                                     (LETT |d| (SPADCALL |sqff| (QREFELT $ 38))
                                           . #11#)
                                     (EXIT
                                      (COND
                                       ((EQL |d| 1)
                                        (LETT |factorlist|
                                              (CONS (CONS |sqff| |mult|)
                                                    |factorlist|)
                                              . #11#))
                                       ((EQL |d| 2)
                                        (LETT |factorlist|
                                              (APPEND
                                               (PROGN
                                                (LETT #4# NIL . #11#)
                                                (SEQ (LETT |pf| NIL . #11#)
                                                     (LETT #3#
                                                           (|GALFACT;quadratic|
                                                            |sqff| $)
                                                           . #11#)
                                                     G190
                                                     (COND
                                                      ((OR (ATOM #3#)
                                                           (PROGN
                                                            (LETT |pf|
                                                                  (CAR #3#)
                                                                  . #11#)
                                                            NIL))
                                                       #13#))
                                                     (SEQ
                                                      (EXIT
                                                       (LETT #4#
                                                             (CONS
                                                              (CONS |pf|
                                                                    |mult|)
                                                              #4#)
                                                             . #11#)))
                                                     (LETT #3# (CDR #3#)
                                                           . #11#)
                                                     #14# G191
                                                     (EXIT (NREVERSE0 #4#))))
                                               |factorlist|)
                                              . #11#))
                                       ('T
                                        (LETT |factorlist|
                                              (APPEND
                                               (PROGN
                                                (LETT #2# NIL . #11#)
                                                (SEQ (LETT |pf| NIL . #11#)
                                                     (LETT #1#
                                                           (|GALFACT;henselfact|
                                                            |sqff| 'T $)
                                                           . #11#)
                                                     G190
                                                     (COND
                                                      ((OR (ATOM #1#)
                                                           (PROGN
                                                            (LETT |pf|
                                                                  (CAR #1#)
                                                                  . #11#)
                                                            NIL))
                                                       #13#))
                                                     (SEQ
                                                      (EXIT
                                                       (LETT #2#
                                                             (CONS
                                                              (CONS |pf|
                                                                    |mult|)
                                                              #2#)
                                                             . #11#)))
                                                     (LETT #1# (CDR #1#)
                                                           . #11#)
                                                     #14# G191
                                                     (EXIT (NREVERSE0 #2#))))
                                               |factorlist|)
                                              . #11#)))))
                                (LETT #5# (CDR #5#) . #11#) #14# G191
                                (EXIT NIL))
                           (EXIT (CONS |c| |factorlist|)))))))))))))))))) 

(DEFUN |GALFACT;btwFact;UPBSNniR;29| (|f| |sqf| |fd| |r| $)
  (PROG (|maxd| #1=#:G1057 |factorlist| #2=#:G1074 |pf| #3=#:G1073 #4=#:G1054
         #5=#:G1072 #6=#:G1071 #7=#:G1051 |d| |sqff| |mult| #8=#:G1070 |sqfr|
         #9=#:G1049 |sqfflist| #10=#:G1069 #11=#:G1068 |fac| #12=#:G1067 |sfac|
         #13=#:G1066 |lcPol| #14=#:G1031 #15=#:G1029 |c| #16=#:G1024)
    (RETURN
     (SEQ
      (LETT |d| (SPADCALL |f| (QREFELT $ 38))
            . #17=(|GALFACT;btwFact;UPBSNniR;29|))
      (COND
       ((NULL (EQL (SPADCALL |fd| (QREFELT $ 104)) |d|))
        (EXIT (|error| "btwFact: Bad arguments"))))
      (LETT |factorlist| NIL . #17#)
      (LETT |c| (SPADCALL |f| (QREFELT $ 26)) . #17#)
      (LETT |f|
            (PROG2
                (LETT #16# (SPADCALL |f| |c| (QREFELT $ 136)) . #17#)
                (QCDR #16#)
              (|check-union| (QEQCAR #16# 0) (QREFELT $ 6) #16#))
            . #17#)
      (COND
       ((< (SPADCALL |f| (QREFELT $ 28)) 0)
        (SEQ (LETT |c| (- |c|) . #17#)
             (EXIT (LETT |f| (SPADCALL |f| (QREFELT $ 107)) . #17#)))))
      (SEQ (LETT |maxd| (SPADCALL |f| (QREFELT $ 137)) . #17#)
           (EXIT
            (COND
             ((< 0 |maxd|)
              (SEQ
               (LETT |f|
                     (QCAR
                      (SPADCALL |f| (SPADCALL 1 |maxd| (QREFELT $ 130))
                                (QREFELT $ 139)))
                     . #17#)
               (LETT |factorlist|
                     (LIST (CONS (SPADCALL 1 1 (QREFELT $ 130)) |maxd|))
                     . #17#)
               (LETT |r|
                     (PROG1 (LETT #15# (MAX 2 (- |r| |maxd|)) . #17#)
                       (|check-subtype| (>= #15# 0) '(|NonNegativeInteger|)
                                        #15#))
                     . #17#)
               (LETT |d|
                     (PROG2
                         (LETT #14# (SPADCALL |d| |maxd| (QREFELT $ 112))
                               . #17#)
                         (QCDR #14#)
                       (|check-union| (QEQCAR #14# 0) (|NonNegativeInteger|)
                                      #14#))
                     . #17#)
               (EXIT
                (LETT |fd|
                      (SPADCALL
                       (CONS #'|GALFACT;btwFact;UPBSNniR;29!0| (VECTOR $ |d|))
                       |fd| (QREFELT $ 99))
                      . #17#)))))))
      (EXIT
       (COND ((ZEROP |d|) (CONS |c| |factorlist|))
             ((EQL |d| 1) (CONS |c| (CONS (CONS |f| 1) |factorlist|)))
             (#18='T
              (SEQ
               (LETT |lcPol|
                     (SPADCALL (SPADCALL |f| (QREFELT $ 28)) (QREFELT $ 86))
                     . #17#)
               (EXIT
                (COND
                 ((SPADCALL (SPADCALL |lcPol| (QREFELT $ 107))
                            (SPADCALL |f| (QREFELT $ 24)) (QREFELT $ 140))
                  (SEQ
                   (SEQ (LETT |fac| NIL . #17#)
                        (LETT #13#
                              (SPADCALL (ELT $ 135)
                                        (SPADCALL |d| (QREFELT $ 143))
                                        (QREFELT $ 146))
                              . #17#)
                        G190
                        (COND
                         ((OR (ATOM #13#)
                              (PROGN (LETT |fac| (CAR #13#) . #17#) NIL))
                          #19=(GO G191)))
                        (SEQ
                         (EXIT
                          (LETT |factorlist| (CONS (CONS |fac| 1) |factorlist|)
                                . #17#)))
                        (LETT #13# (CDR #13#) . #17#) #20=(GO G190) G191
                        (EXIT NIL))
                   (EXIT (CONS |c| |factorlist|))))
                 (#18#
                  (SEQ
                   (COND
                    ((ODDP |d|)
                     (COND
                      ((SPADCALL |lcPol| (SPADCALL |f| (QREFELT $ 24))
                                 (QREFELT $ 140))
                       (EXIT
                        (SEQ
                         (SEQ (LETT |sfac| NIL . #17#)
                              (LETT #12# (SPADCALL |d| (QREFELT $ 143)) . #17#)
                              G190
                              (COND
                               ((OR (ATOM #12#)
                                    (PROGN
                                     (LETT |sfac| (CAR #12#) . #17#)
                                     NIL))
                                #19#))
                              (SEQ
                               (LETT |fac| (|GALFACT;subMinusX| |sfac| $)
                                     . #17#)
                               (COND
                                ((< (SPADCALL |fac| (QREFELT $ 28)) 0)
                                 (LETT |fac| (SPADCALL |fac| (QREFELT $ 107))
                                       . #17#)))
                               (EXIT
                                (LETT |factorlist|
                                      (CONS (CONS |fac| 1) |factorlist|)
                                      . #17#)))
                              (LETT #12# (CDR #12#) . #17#) #20# G191
                              (EXIT NIL))
                         (EXIT (CONS |c| |factorlist|))))))))
                   (COND
                    ((|GALFACT;isPowerOf2| |d| $)
                     (COND
                      ((SPADCALL |lcPol| (SPADCALL |f| (QREFELT $ 24))
                                 (QREFELT $ 140))
                       (EXIT
                        (SEQ
                         (LETT |factorlist| (CONS (CONS |f| 1) |factorlist|)
                               . #17#)
                         (EXIT (CONS |c| |factorlist|))))))))
                   (EXIT
                    (COND
                     (|sqf|
                      (CONS |c|
                            (APPEND
                             (PROGN
                              (LETT #11# NIL . #17#)
                              (SEQ (LETT |pf| NIL . #17#)
                                   (LETT #10#
                                         (|GALFACT;btwFactor| |f| |fd| |r| 'T
                                          $)
                                         . #17#)
                                   G190
                                   (COND
                                    ((OR (ATOM #10#)
                                         (PROGN
                                          (LETT |pf| (CAR #10#) . #17#)
                                          NIL))
                                     #19#))
                                   (SEQ
                                    (EXIT
                                     (LETT #11# (CONS (CONS |pf| 1) #11#)
                                           . #17#)))
                                   (LETT #10# (CDR #10#) . #17#) #20# G191
                                   (EXIT (NREVERSE0 #11#))))
                             |factorlist|)))
                     (#18#
                      (SEQ
                       (LETT |sqfflist|
                             (SPADCALL (SPADCALL |f| (QREFELT $ 147))
                                       (QREFELT $ 150))
                             . #17#)
                       (COND
                        ((EQL (LENGTH |sqfflist|) 1)
                         (LETT |r|
                               (PROG1
                                   (LETT #9#
                                         (MAX
                                          (QUOTIENT2 |r|
                                                     (QCDR
                                                      (|SPADfirst|
                                                       |sqfflist|)))
                                          2)
                                         . #17#)
                                 (|check-subtype| (>= #9# 0)
                                                  '(|NonNegativeInteger|) #9#))
                               . #17#))
                        (#18# (LETT |r| 2 . #17#)))
                       (SEQ (LETT |sqfr| NIL . #17#)
                            (LETT #8# |sqfflist| . #17#) G190
                            (COND
                             ((OR (ATOM #8#)
                                  (PROGN (LETT |sqfr| (CAR #8#) . #17#) NIL))
                              #19#))
                            (SEQ (LETT |mult| (QCDR |sqfr|) . #17#)
                                 (LETT |sqff| (QCAR |sqfr|) . #17#)
                                 (LETT |d| (SPADCALL |sqff| (QREFELT $ 38))
                                       . #17#)
                                 (EXIT
                                  (COND
                                   ((EQL |d| 1)
                                    (SEQ
                                     (LETT |factorlist|
                                           (CONS (CONS |sqff| |mult|)
                                                 |factorlist|)
                                           . #17#)
                                     (LETT |maxd|
                                           (PROG1
                                               (LETT #7#
                                                     (-
                                                      (SPADCALL |fd|
                                                                (QREFELT $
                                                                         104))
                                                      |mult|)
                                                     . #17#)
                                             (|check-subtype| (>= #7# 0)
                                                              '(|NonNegativeInteger|)
                                                              #7#))
                                           . #17#)
                                     (EXIT
                                      (LETT |fd|
                                            (SPADCALL
                                             (CONS
                                              #'|GALFACT;btwFact;UPBSNniR;29!1|
                                              (VECTOR $ |maxd|))
                                             |fd| (QREFELT $ 99))
                                            . #17#))))
                                   ((EQL |d| 2)
                                    (SEQ
                                     (LETT |factorlist|
                                           (APPEND
                                            (PROGN
                                             (LETT #6# NIL . #17#)
                                             (SEQ (LETT |pf| NIL . #17#)
                                                  (LETT #5#
                                                        (|GALFACT;quadratic|
                                                         |sqff| $)
                                                        . #17#)
                                                  G190
                                                  (COND
                                                   ((OR (ATOM #5#)
                                                        (PROGN
                                                         (LETT |pf| (CAR #5#)
                                                               . #17#)
                                                         NIL))
                                                    #19#))
                                                  (SEQ
                                                   (EXIT
                                                    (LETT #6#
                                                          (CONS
                                                           (CONS |pf| |mult|)
                                                           #6#)
                                                          . #17#)))
                                                  (LETT #5# (CDR #5#) . #17#)
                                                  #20# G191
                                                  (EXIT (NREVERSE0 #6#))))
                                            |factorlist|)
                                           . #17#)
                                     (LETT |maxd|
                                           (PROG1
                                               (LETT #4#
                                                     (-
                                                      (SPADCALL |fd|
                                                                (QREFELT $
                                                                         104))
                                                      (SPADCALL 2 |mult|
                                                                (QREFELT $
                                                                         73)))
                                                     . #17#)
                                             (|check-subtype| (>= #4# 0)
                                                              '(|NonNegativeInteger|)
                                                              #4#))
                                           . #17#)
                                     (EXIT
                                      (LETT |fd|
                                            (SPADCALL
                                             (CONS
                                              #'|GALFACT;btwFact;UPBSNniR;29!2|
                                              (VECTOR $ |maxd|))
                                             |fd| (QREFELT $ 99))
                                            . #17#))))
                                   ('T
                                    (SEQ
                                     (LETT |factorlist|
                                           (APPEND
                                            (PROGN
                                             (LETT #3# NIL . #17#)
                                             (SEQ (LETT |pf| NIL . #17#)
                                                  (LETT #2#
                                                        (|GALFACT;btwFactor|
                                                         |sqff|
                                                         (SPADCALL
                                                          (CONS
                                                           #'|GALFACT;btwFact;UPBSNniR;29!3|
                                                           (VECTOR $ |d|))
                                                          |fd| (QREFELT $ 99))
                                                         |r| 'T $)
                                                        . #17#)
                                                  G190
                                                  (COND
                                                   ((OR (ATOM #2#)
                                                        (PROGN
                                                         (LETT |pf| (CAR #2#)
                                                               . #17#)
                                                         NIL))
                                                    #19#))
                                                  (SEQ
                                                   (EXIT
                                                    (LETT #3#
                                                          (CONS
                                                           (CONS |pf| |mult|)
                                                           #3#)
                                                          . #17#)))
                                                  (LETT #2# (CDR #2#) . #17#)
                                                  #20# G191
                                                  (EXIT (NREVERSE0 #3#))))
                                            |factorlist|)
                                           . #17#)
                                     (LETT |maxd|
                                           (PROG1
                                               (LETT #1#
                                                     (-
                                                      (SPADCALL |fd|
                                                                (QREFELT $
                                                                         104))
                                                      (SPADCALL |d| |mult|
                                                                (QREFELT $
                                                                         152)))
                                                     . #17#)
                                             (|check-subtype| (>= #1# 0)
                                                              '(|NonNegativeInteger|)
                                                              #1#))
                                           . #17#)
                                     (EXIT
                                      (LETT |fd|
                                            (SPADCALL
                                             (CONS
                                              #'|GALFACT;btwFact;UPBSNniR;29!4|
                                              (VECTOR $ |maxd|))
                                             |fd| (QREFELT $ 99))
                                            . #17#)))))))
                            (LETT #8# (CDR #8#) . #17#) #20# G191 (EXIT NIL))
                       (EXIT (CONS |c| |factorlist|)))))))))))))))))) 

(DEFUN |GALFACT;btwFact;UPBSNniR;29!4| (|x| $$)
  (PROG (|maxd| $)
    (LETT |maxd| (QREFELT $$ 1) . #1=(|GALFACT;btwFact;UPBSNniR;29|))
    (LETT $ (QREFELT $$ 0) . #1#)
    (RETURN
     (PROGN
      (COND ((SPADCALL |maxd| |x| (QREFELT $ 95)) (|spadConstant| $ 96))
            ('T (|spadConstant| $ 97))))))) 

(DEFUN |GALFACT;btwFact;UPBSNniR;29!3| (|x| $$)
  (PROG (|d| $)
    (LETT |d| (QREFELT $$ 1) . #1=(|GALFACT;btwFact;UPBSNniR;29|))
    (LETT $ (QREFELT $$ 0) . #1#)
    (RETURN
     (PROGN
      (COND ((SPADCALL |d| |x| (QREFELT $ 95)) (|spadConstant| $ 96))
            ('T (|spadConstant| $ 97))))))) 

(DEFUN |GALFACT;btwFact;UPBSNniR;29!2| (|x| $$)
  (PROG (|maxd| $)
    (LETT |maxd| (QREFELT $$ 1) . #1=(|GALFACT;btwFact;UPBSNniR;29|))
    (LETT $ (QREFELT $$ 0) . #1#)
    (RETURN
     (PROGN
      (COND ((SPADCALL |maxd| |x| (QREFELT $ 95)) (|spadConstant| $ 96))
            ('T (|spadConstant| $ 97))))))) 

(DEFUN |GALFACT;btwFact;UPBSNniR;29!1| (|x| $$)
  (PROG (|maxd| $)
    (LETT |maxd| (QREFELT $$ 1) . #1=(|GALFACT;btwFact;UPBSNniR;29|))
    (LETT $ (QREFELT $$ 0) . #1#)
    (RETURN
     (PROGN
      (COND ((SPADCALL |maxd| |x| (QREFELT $ 95)) (|spadConstant| $ 96))
            ('T (|spadConstant| $ 97))))))) 

(DEFUN |GALFACT;btwFact;UPBSNniR;29!0| (|x| $$)
  (PROG (|d| $)
    (LETT |d| (QREFELT $$ 1) . #1=(|GALFACT;btwFact;UPBSNniR;29|))
    (LETT $ (QREFELT $$ 0) . #1#)
    (RETURN
     (PROGN
      (COND ((SPADCALL |d| |x| (QREFELT $ 95)) (|spadConstant| $ 96))
            ('T (|spadConstant| $ 97))))))) 

(DEFUN |GALFACT;factor;UPF;30| (|f| $)
  (SPADCALL
   (COND
    ((QREFELT $ 9)
     (SPADCALL |f| 'NIL (|GALFACT;fullSet| (SPADCALL |f| (QREFELT $ 38)) $) 2
               (QREFELT $ 153)))
    ('T (SPADCALL |f| 'NIL (QREFELT $ 151))))
   (QREFELT $ 125))) 

(DEFUN |GALFACT;errorsum?| (|d| |ld| $)
  (PROG (#1=#:G1078 #2=#:G1077 #3=#:G1079 #4=#:G1082 #5=#:G661)
    (RETURN
     (SEQ
      (COND
       ((EQL |d|
             (PROGN
              (LETT #1# NIL . #6=(|GALFACT;errorsum?|))
              (SEQ (LETT #5# NIL . #6#) (LETT #4# |ld| . #6#) G190
                   (COND
                    ((OR (ATOM #4#) (PROGN (LETT #5# (CAR #4#) . #6#) NIL))
                     (GO G191)))
                   (SEQ
                    (EXIT
                     (PROGN
                      (LETT #3# #5# . #6#)
                      (COND (#1# (LETT #2# (+ #2# #3#) . #6#))
                            ('T
                             (PROGN
                              (LETT #2# #3# . #6#)
                              (LETT #1# 'T . #6#)))))))
                   (LETT #4# (CDR #4#) . #6#) (GO G190) G191 (EXIT NIL))
              (COND (#1# #2#) (#7='T 0))))
        'NIL)
       (#7# 'T)))))) 

(DEFUN |GALFACT;makeSet| (|ld| $)
  (PROG (|s| #1=#:G1086 |d|)
    (RETURN
     (SEQ
      (LETT |s| (SPADCALL (LIST 0) (QREFELT $ 45)) . #2=(|GALFACT;makeSet|))
      (SEQ (LETT |d| NIL . #2#) (LETT #1# |ld| . #2#) G190
           (COND
            ((OR (ATOM #1#) (PROGN (LETT |d| (CAR #1#) . #2#) NIL)) (GO G191)))
           (SEQ
            (EXIT
             (LETT |s|
                   (SPADCALL |s| (|GALFACT;shiftSet| |s| |d| $) (QREFELT $ 55))
                   . #2#)))
           (LETT #1# (CDR #1#) . #2#) (GO G190) G191 (EXIT NIL))
      (EXIT |s|))))) 

(DEFUN |GALFACT;factor;UPLNniF;33| (|f| |ld| |r| $)
  (COND
   ((|GALFACT;errorsum?| (SPADCALL |f| (QREFELT $ 38)) |ld| $)
    (|error| "factor: Bad arguments"))
   ('T
    (SPADCALL
     (SPADCALL |f| 'NIL (|GALFACT;makeSet| |ld| $) |r| (QREFELT $ 153))
     (QREFELT $ 125))))) 

(DEFUN |GALFACT;factor;UPNniF;34| (|f| |r| $)
  (SPADCALL
   (SPADCALL |f| 'NIL (|GALFACT;fullSet| (SPADCALL |f| (QREFELT $ 38)) $) |r|
             (QREFELT $ 153))
   (QREFELT $ 125))) 

(DEFUN |GALFACT;factor;UPLF;35| (|f| |ld| $)
  (SPADCALL |f| |ld| 2 (QREFELT $ 155))) 

(DEFUN |GALFACT;factor;UP2NniF;36| (|f| |d| |r| $)
  (PROG (|n|)
    (RETURN
     (SEQ
      (LETT |n| (SPADCALL (SPADCALL |f| (QREFELT $ 38)) |d| (QREFELT $ 103))
            |GALFACT;factor;UP2NniF;36|)
      (EXIT
       (COND ((QEQCAR |n| 1) (|error| "factor: Bad arguments"))
             ('T
              (SPADCALL |f| (SPADCALL (QCDR |n|) |d| (QREFELT $ 158)) |r|
                        (QREFELT $ 155))))))))) 

(DEFUN |GALFACT;factorSquareFree;UPF;37| (|f| $)
  (SPADCALL
   (COND
    ((QREFELT $ 9)
     (SPADCALL |f| 'T (|GALFACT;fullSet| (SPADCALL |f| (QREFELT $ 38)) $) 2
               (QREFELT $ 153)))
    ('T (SPADCALL |f| 'T (QREFELT $ 151))))
   (QREFELT $ 125))) 

(DEFUN |GALFACT;factorSquareFree;UPLNniF;38| (|f| |ld| |r| $)
  (COND
   ((|GALFACT;errorsum?| (SPADCALL |f| (QREFELT $ 38)) |ld| $)
    (|error| "factorSquareFree: Bad arguments"))
   ('T
    (SPADCALL (SPADCALL |f| 'T (|GALFACT;makeSet| |ld| $) |r| (QREFELT $ 153))
              (QREFELT $ 125))))) 

(DEFUN |GALFACT;factorSquareFree;UPNniF;39| (|f| |r| $)
  (SPADCALL
   (SPADCALL |f| 'T (|GALFACT;fullSet| (SPADCALL |f| (QREFELT $ 38)) $) |r|
             (QREFELT $ 153))
   (QREFELT $ 125))) 

(DEFUN |GALFACT;factorSquareFree;UPLF;40| (|f| |ld| $)
  (SPADCALL |f| |ld| 2 (QREFELT $ 161))) 

(DEFUN |GALFACT;factorSquareFree;UP2NniF;41| (|f| |d| |r| $)
  (PROG (|n|)
    (RETURN
     (SEQ
      (LETT |n| (SPADCALL (SPADCALL |f| (QREFELT $ 38)) |d| (QREFELT $ 103))
            |GALFACT;factorSquareFree;UP2NniF;41|)
      (EXIT
       (COND ((QEQCAR |n| 1) (|error| "factorSquareFree: Bad arguments"))
             ('T
              (SPADCALL |f| (SPADCALL (QCDR |n|) |d| (QREFELT $ 158)) |r|
                        (QREFELT $ 161))))))))) 

(DEFUN |GALFACT;factorOfDegree;PiUPLNniBU;42| (|d| |p| |ld| |r| |sqf| $)
  (PROG (#1=#:G1118 #2=#:G1124 #3=#:G1125 |f| |lf| |dp|)
    (RETURN
     (SEQ
      (EXIT
       (SEQ
        (LETT |dp| (SPADCALL |p| (QREFELT $ 38))
              . #4=(|GALFACT;factorOfDegree;PiUPLNniBU;42|))
        (EXIT
         (COND
          ((|GALFACT;errorsum?| |dp| |ld| $)
           (|error| "factorOfDegree: Bad arguments"))
          ('T
           (SEQ
            (COND
             ((EQL |d| 1)
              (COND
               ((SPADCALL |p| (QREFELT $ 108)) (EXIT (CONS 1 "failed"))))))
            (LETT |lf|
                  (QCDR
                   (SPADCALL |p| |sqf| (|GALFACT;makeSet| |ld| $) |r|
                             (QREFELT $ 153)))
                  . #4#)
            (SEQ
             (EXIT
              (SEQ (LETT |f| NIL . #4#) (LETT #3# |lf| . #4#) G190
                   (COND
                    ((OR (ATOM #3#) (PROGN (LETT |f| (CAR #3#) . #4#) NIL))
                     (GO G191)))
                   (SEQ
                    (EXIT
                     (COND
                      ((EQL (SPADCALL (QCAR |f|) (QREFELT $ 38)) |d|)
                       (PROGN
                        (LETT #1#
                              (PROGN
                               (LETT #2# (CONS 0 (QCAR |f|)) . #4#)
                               (GO #2#))
                              . #4#)
                        (GO #1#))))))
                   (LETT #3# (CDR #3#) . #4#) (GO G190) G191 (EXIT NIL)))
             #1# (EXIT #1#))
            (EXIT (CONS 1 "failed"))))))))
      #2# (EXIT #2#))))) 

(DEFUN |GALFACT;factorOfDegree;PiUPLNniU;43| (|d| |p| |ld| |r| $)
  (SPADCALL |d| |p| |ld| |r| 'NIL (QREFELT $ 166))) 

(DEFUN |GALFACT;factorOfDegree;PiUPNniU;44| (|d| |p| |r| $)
  (SPADCALL |d| |p| (SPADCALL (SPADCALL |p| (QREFELT $ 38)) 1 (QREFELT $ 158))
            |r| 'NIL (QREFELT $ 166))) 

(DEFUN |GALFACT;factorOfDegree;PiUPLU;45| (|d| |p| |ld| $)
  (SPADCALL |d| |p| |ld| 2 'NIL (QREFELT $ 166))) 

(DEFUN |GALFACT;factorOfDegree;PiUPU;46| (|d| |p| $)
  (SPADCALL |d| |p| (SPADCALL (SPADCALL |p| (QREFELT $ 38)) 1 (QREFELT $ 158))
            2 'NIL (QREFELT $ 166))) 

(DEFUN |GaloisGroupFactorizer| (#1=#:G1142)
  (PROG ()
    (RETURN
     (PROG (#2=#:G1143)
       (RETURN
        (COND
         ((LETT #2#
                (|lassocShiftWithFunction| (LIST (|devaluate| #1#))
                                           (HGET |$ConstructorCache|
                                                 '|GaloisGroupFactorizer|)
                                           '|domainEqualList|)
                . #3=(|GaloisGroupFactorizer|))
          (|CDRwithIncrement| #2#))
         ('T
          (UNWIND-PROTECT
              (PROG1 (|GaloisGroupFactorizer;| #1#) (LETT #2# T . #3#))
            (COND
             ((NOT #2#)
              (HREM |$ConstructorCache| '|GaloisGroupFactorizer|))))))))))) 

(DEFUN |GaloisGroupFactorizer;| (|#1|)
  (PROG (|pv$| $ |dv$| DV$1)
    (RETURN
     (PROGN
      (LETT DV$1 (|devaluate| |#1|) . #1=(|GaloisGroupFactorizer|))
      (LETT |dv$| (LIST '|GaloisGroupFactorizer| DV$1) . #1#)
      (LETT $ (GETREFV 171) . #1#)
      (QSETREFV $ 0 |dv$|)
      (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #1#))
      (|haddProp| |$ConstructorCache| '|GaloisGroupFactorizer| (LIST DV$1)
                  (CONS 1 $))
      (|stuffDomainSlots| $)
      (QSETREFV $ 6 |#1|)
      (QSETREFV $ 7 5)
      (QSETREFV $ 8 8)
      (QSETREFV $ 9 'T)
      (QSETREFV $ 10 'T)
      (QSETREFV $ 11 'T)
      $)))) 

(MAKEPROP '|GaloisGroupFactorizer| '|infovec|
          (LIST
           '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) '|mussertrials|
              '|stopmussertrials| '|usesinglefactorbound|
              '|tryfunctionaldecomposition| '|useeisensteincriterion|
              (|Boolean|) |GALFACT;useEisensteinCriterion?;B;1|
              |GALFACT;useEisensteinCriterion;2B;2|
              |GALFACT;tryFunctionalDecomposition?;B;3|
              |GALFACT;tryFunctionalDecomposition;2B;4|
              |GALFACT;useSingleFactorBound?;B;5|
              |GALFACT;useSingleFactorBound;2B;6| (|PositiveInteger|)
              |GALFACT;stopMusserTrials;Pi;7| |GALFACT;stopMusserTrials;2Pi;8|
              |GALFACT;musserTrials;Pi;9| |GALFACT;musserTrials;2Pi;10|
              (0 . |reductum|) (|Integer|) (5 . |content|) (10 . |unit?|)
              (15 . |leadingCoefficient|) (20 . |zero?|) (|Factored| $)
              (25 . |factor|) (|Record| (|:| |factor| 25) (|:| |exponent| 25))
              (|List| 32) (|Factored| 25) (30 . |factors|)
              |GALFACT;eisensteinIrreducible?;UPB;11| (|NonNegativeInteger|)
              (35 . |degree|) (|Record| (|:| |factor| 6) (|:| |degree| 25))
              (|List| 39) |GALFACT;numberOfFactors;LNni;12| (|List| 37)
              (|Set| 37) (40 . |parts|) (45 . |set|) (50 . |One|) (54 . |Zero|)
              (58 . |empty|) (62 . |differentiate|)
              (|ModularDistinctDegreeFactorizer| 6) (67 . |gcd|)
              (|IntegerPrimesPackage| 25) (74 . |nextPrime|) (79 . |ddFact|)
              (85 . |union|) (91 . |intersect|) (97 . =) (|List| 6)
              (103 . |separateFactors|)
              (|Record| (|:| |prime| 25) (|:| |factors| 58))
              |GALFACT;modularFactor;UPR;18| (|Multiset| 37) (109 . |empty|)
              (113 . |insert!|) (119 . |insert!|)
              |GALFACT;degreePartition;LM;19| (|BrillhartTests| 6)
              (126 . |brillhartIrreducible?|)
              (|Record| (|:| |left| 6) (|:| |right| 6)) (|Union| 69 '"failed")
              (|UnivariatePolynomialDecompositionPackage| 25 6)
              (131 . |monicDecomposeIfCan|) (136 . *)
              (|GaloisGroupFactorizationUtilities| 25 6 (|Float|))
              (142 . |beauzamyBound|) (|GeneralHenselPackage| 25 6)
              (147 . |completeHensel|) (155 . |elt|) (161 . |coefficient|)
              (167 . |bit?|) (173 . |elt|) (179 . |symmetricRemainder|)
              (185 . |member?|) (|Union| $ '"failed") (191 . |exquo|)
              (197 . |coerce|) (202 . *) (208 . |reduction|)
              (214 . |primitivePart|) (219 . |exquo|) (|Void|) (225 . |swap!|)
              (232 . |rest|) (238 . |setrest!|) (244 . <) (250 . |false|)
              (254 . |true|) (|Mapping| 12 37) (258 . |select|)
              (264 . |singleFactorBound|)
              (|Record| (|:| |plist| 58) (|:| |modulo| 25))
              (270 . |HenselLift|) (278 . |exquo|) (284 . |max|)
              (|GaloisGroupPolynomialUtilities| 25 6) (289 . |reverse|)
              (294 . -) (299 . |noLinearFactor?|) (304 . |One|)
              (308 . |remove|) (314 . |ground?|) (319 . |subtractIfCan|)
              (325 . |setelt|) (|Union| '"nil" '"sqfr" '"irred" '"prime")
              (|Record| (|:| |flg| 114) (|:| |fctr| 25) (|:| |xpnt| 25))
              (|List| 115) (332 . |factorList|) (337 . |unit|)
              (|Record| (|:| |flg| 114) (|:| |fctr| 6) (|:| |xpnt| 25))
              (|List| 119) (|Factored| 6) (342 . |makeFR|)
              (|Record| (|:| |irr| 6) (|:| |pow| 25))
              (|Record| (|:| |contp| 25) (|:| |factors| (|List| 123)))
              |GALFACT;makeFR;RF;24| (348 . ^) (|Union| 25 '"failed")
              (|IntegerRoots| 25) (354 . |perfectSqrt|) (359 . |monomial|)
              (365 . +) (|SparseUnivariatePolynomial| 25) (371 . |monomial|)
              (377 . |elt|) (383 . |unmakeSUP|) (388 . |exquo|)
              (394 . |minimumDegree|)
              (|Record| (|:| |quotient| $) (|:| |remainder| $))
              (399 . |monicDivide|) (405 . =) (|List| 132)
              (|CyclotomicPolynomialPackage|) (411 . |cyclotomicDecomposition|)
              (|Mapping| 6 132) (|ListFunctions2| 132 6) (416 . |map|)
              (422 . |squareFree|)
              (|Record| (|:| |factor| 6) (|:| |exponent| 25)) (|List| 148)
              (427 . |factors|) |GALFACT;henselFact;UPBR;28| (432 . *)
              |GALFACT;btwFact;UPBSNniR;29| |GALFACT;factor;UPF;30|
              |GALFACT;factor;UPLNniF;33| |GALFACT;factor;UPNniF;34|
              |GALFACT;factor;UPLF;35| (438 . |new|)
              |GALFACT;factor;UP2NniF;36| |GALFACT;factorSquareFree;UPF;37|
              |GALFACT;factorSquareFree;UPLNniF;38|
              |GALFACT;factorSquareFree;UPNniF;39|
              |GALFACT;factorSquareFree;UPLF;40|
              |GALFACT;factorSquareFree;UP2NniF;41| (|Union| 6 '"failed")
              |GALFACT;factorOfDegree;PiUPLNniBU;42|
              |GALFACT;factorOfDegree;PiUPLNniU;43|
              |GALFACT;factorOfDegree;PiUPNniU;44|
              |GALFACT;factorOfDegree;PiUPLU;45|
              |GALFACT;factorOfDegree;PiUPU;46|)
           '#(|useSingleFactorBound?| 444 |useSingleFactorBound| 448
              |useEisensteinCriterion?| 453 |useEisensteinCriterion| 457
              |tryFunctionalDecomposition?| 462 |tryFunctionalDecomposition|
              466 |stopMusserTrials| 471 |numberOfFactors| 480 |musserTrials|
              485 |modularFactor| 494 |makeFR| 499 |henselFact| 504
              |factorSquareFree| 510 |factorOfDegree| 541 |factor| 578
              |eisensteinIrreducible?| 609 |degreePartition| 614 |btwFact| 619)
           'NIL
           (CONS (|makeByteWordVec2| 1 'NIL)
                 (CONS '#()
                       (CONS '#()
                             (|makeByteWordVec2| 170
                                                 '(1 6 0 0 24 1 6 25 0 26 1 25
                                                   12 0 27 1 6 25 0 28 1 6 12 0
                                                   29 1 25 30 0 31 1 34 33 0 35
                                                   1 6 37 0 38 1 43 42 0 44 1
                                                   43 0 42 45 0 6 0 46 0 6 0 47
                                                   0 43 0 48 1 6 0 0 49 3 50 6
                                                   6 6 25 51 1 52 25 25 53 2 50
                                                   40 6 25 54 2 43 0 0 0 55 2
                                                   43 0 0 0 56 2 43 12 0 0 57 2
                                                   50 58 40 25 59 0 62 0 63 2
                                                   62 0 37 0 64 3 62 0 37 0 37
                                                   65 1 67 12 6 68 1 71 70 6 72
                                                   2 25 0 19 0 73 1 74 25 6 75
                                                   4 76 58 6 58 25 19 77 2 6 0
                                                   0 0 78 2 6 25 0 37 79 2 25
                                                   12 0 0 80 2 58 6 0 25 81 2
                                                   25 0 0 0 82 2 43 12 37 0 83
                                                   2 25 84 0 0 85 1 6 0 25 86 2
                                                   6 0 0 0 87 2 76 6 6 25 88 1
                                                   6 0 0 89 2 6 84 0 0 90 3 58
                                                   91 0 25 25 92 2 58 0 0 37 93
                                                   2 58 0 0 0 94 2 37 12 0 0 95
                                                   0 12 0 96 0 12 0 97 2 43 0
                                                   98 0 99 2 74 25 6 37 100 4
                                                   76 101 6 58 25 19 102 2 37
                                                   84 0 0 103 1 43 37 0 104 1
                                                   105 6 6 106 1 6 0 0 107 1 67
                                                   12 6 108 0 19 0 109 2 43 0
                                                   37 0 110 1 6 12 0 111 2 37
                                                   84 0 0 112 3 58 6 0 25 6 113
                                                   1 34 116 0 117 1 34 25 0 118
                                                   2 121 0 6 120 122 2 25 0 0
                                                   19 126 1 128 127 25 129 2 6
                                                   0 25 37 130 2 6 0 0 0 131 2
                                                   132 0 25 37 133 2 132 0 0 0
                                                   134 1 6 0 132 135 2 6 84 0
                                                   25 136 1 6 37 0 137 2 6 138
                                                   0 0 139 2 6 12 0 0 140 1 142
                                                   141 25 143 2 145 58 144 141
                                                   146 1 6 30 0 147 1 121 149 0
                                                   150 2 25 0 37 0 152 2 42 0
                                                   37 37 158 0 0 12 17 1 0 12
                                                   12 18 0 0 12 13 1 0 12 12 14
                                                   0 0 12 15 1 0 12 12 16 1 0
                                                   19 19 21 0 0 19 20 1 0 37 40
                                                   41 1 0 19 19 23 0 0 19 22 1
                                                   0 60 6 61 1 0 121 124 125 2
                                                   0 124 6 12 151 2 0 121 6 37
                                                   162 1 0 121 6 160 3 0 121 6
                                                   42 37 161 2 0 121 6 42 163 3
                                                   0 121 6 37 37 164 2 0 165 19
                                                   6 170 3 0 165 19 6 42 169 3
                                                   0 165 19 6 37 168 5 0 165 19
                                                   6 42 37 12 166 4 0 165 19 6
                                                   42 37 167 1 0 121 6 154 2 0
                                                   121 6 42 157 2 0 121 6 37
                                                   156 3 0 121 6 37 37 159 3 0
                                                   121 6 42 37 155 1 0 12 6 36
                                                   1 0 62 40 66 4 0 124 6 12 43
                                                   37 153)))))
           '|lookupComplete|)) 
