
(/VERSIONCHECK 2) 

(DEFUN |MODHP;SUPI_to_PA| (|poli| |p| $)
  (PROG (|nlc| |m| |pa| |n|)
    (RETURN
     (SEQ (LETT |n| (SPADCALL |poli| (QREFELT $ 8)) . #1=(|MODHP;SUPI_to_PA|))
          (LETT |pa| (GETREFV32 (+ |n| 1) 0) . #1#)
          (SEQ G190
               (COND
                ((NULL (COND ((SPADCALL |poli| (QREFELT $ 10)) 'NIL) ('T 'T)))
                 (GO G191)))
               (SEQ (LETT |m| (SPADCALL |poli| (QREFELT $ 8)) . #1#)
                    (LETT |nlc|
                          (SPADCALL (SPADCALL |poli| (QREFELT $ 12)) |p|
                                    (QREFELT $ 13))
                          . #1#)
                    (SETELT32 |pa| |m| |nlc|)
                    (EXIT
                     (LETT |poli| (SPADCALL |poli| (QREFELT $ 14)) . #1#)))
               NIL (GO G190) G191 (EXIT NIL))
          (EXIT |pa|))))) 

(DEFUN |MODHP;VSUPI_to_VPA;VIV;2| (|vps| |p| $)
  (PROG (|i| |vpa| |m|)
    (RETURN
     (SEQ (LETT |m| (QVSIZE |vps|) . #1=(|MODHP;VSUPI_to_VPA;VIV;2|))
          (LETT |vpa| (MAKEARR1 |m| (GETREFV32 0 0)) . #1#)
          (SEQ (LETT |i| 1 . #1#) G190 (COND ((QSGREATERP |i| |m|) (GO G191)))
               (SEQ
                (EXIT
                 (SPADCALL |vpa| |i|
                           (|MODHP;SUPI_to_PA|
                            (SPADCALL |vps| |i| (QREFELT $ 16)) |p| $)
                           (QREFELT $ 19))))
               (LETT |i| (QSADD1 |i|) . #1#) (GO G190) G191 (EXIT NIL))
          (EXIT |vpa|))))) 

(DEFUN |MODHP;SUPPI_to_PA| (|poli| |vars| |pts| |p| $)
  (PROG (|nlc| |m| |pa| |n|)
    (RETURN
     (SEQ
      (LETT |n| (SPADCALL |poli| (QREFELT $ 22)) . #1=(|MODHP;SUPPI_to_PA|))
      (LETT |pa| (GETREFV32 (+ |n| 1) 0) . #1#)
      (SEQ G190
           (COND
            ((NULL (COND ((SPADCALL |poli| (QREFELT $ 23)) 'NIL) ('T 'T)))
             (GO G191)))
           (SEQ (LETT |m| (SPADCALL |poli| (QREFELT $ 22)) . #1#)
                (LETT |nlc|
                      (SPADCALL (SPADCALL |poli| (QREFELT $ 25)) |vars| |pts|
                                |p| (QREFELT $ 29))
                      . #1#)
                (SETELT32 |pa| |m| |nlc|)
                (EXIT (LETT |poli| (SPADCALL |poli| (QREFELT $ 30)) . #1#)))
           NIL (GO G190) G191 (EXIT NIL))
      (EXIT |pa|))))) 

(DEFUN |MODHP;VSUPPI_to_VPA;VLLIV;4| (|vps| |vars| |pts| |p| $)
  (PROG (|i| |vpa| |m|)
    (RETURN
     (SEQ (LETT |m| (QVSIZE |vps|) . #1=(|MODHP;VSUPPI_to_VPA;VLLIV;4|))
          (LETT |vpa| (MAKEARR1 |m| (GETREFV32 0 0)) . #1#)
          (SEQ (LETT |i| 1 . #1#) G190 (COND ((QSGREATERP |i| |m|) (GO G191)))
               (SEQ
                (EXIT
                 (SPADCALL |vpa| |i|
                           (|MODHP;SUPPI_to_PA|
                            (SPADCALL |vps| |i| (QREFELT $ 32)) |vars| |pts|
                            |p| $)
                           (QREFELT $ 19))))
               (LETT |i| (QSADD1 |i|) . #1#) (GO G190) G191 (EXIT NIL))
          (EXIT |vpa|))))) 

(DEFUN |MODHP;LFI_to_PA;L2IU;5| (|lfi| |n| |prime| $)
  (PROG (|nlc| |dms| #1=#:G1864 |dm| |nm| #2=#:G1865 |j| #3=#:G1866 |el| |pa|)
    (RETURN
     (SEQ
      (EXIT
       (SEQ (LETT |pa| (GETREFV32 |n| 0) . #4=(|MODHP;LFI_to_PA;L2IU;5|))
            (SEQ (LETT |el| NIL . #4#) (LETT #3# |lfi| . #4#)
                 (LETT |j| 0 . #4#) (LETT #2# (- |n| 1) . #4#) G190
                 (COND
                  ((OR (QSGREATERP |j| #2#) (ATOM #3#)
                       (PROGN (LETT |el| (CAR #3#) . #4#) NIL))
                   (GO G191)))
                 (SEQ
                  (LETT |nm|
                        (SPADCALL (SPADCALL |el| (QREFELT $ 35)) |prime|
                                  (QREFELT $ 13))
                        . #4#)
                  (LETT |dm|
                        (SPADCALL (SPADCALL |el| (QREFELT $ 36)) |prime|
                                  (QREFELT $ 13))
                        . #4#)
                  (EXIT
                   (COND
                    ((EQL |dm| 0)
                     (PROGN (LETT #1# (CONS 1 "failed") . #4#) (GO #1#)))
                    ('T
                     (SEQ (LETT |dms| |dm| . #4#)
                          (LETT |nlc|
                                (QSMULMOD32 |nm|
                                            (SPADCALL |dms| |prime|
                                                      (QREFELT $ 38))
                                            |prime|)
                                . #4#)
                          (EXIT (SETELT32 |pa| |j| |nlc|)))))))
                 (LETT |j| (PROG1 (QSADD1 |j|) (LETT #3# (CDR #3#) . #4#))
                       . #4#)
                 (GO G190) G191 (EXIT NIL))
            (EXIT (CONS 0 |pa|))))
      #1# (EXIT #1#))))) 

(DEFUN |MODHP;LFPI_to_PA;LILLIU;6| (|lfi| |n| |vars| |pts| |prime| $)
  (PROG (|nlc| |dms| #1=#:G1874 |dm| |nm| #2=#:G1875 |j| #3=#:G1876 |el| |pa|)
    (RETURN
     (SEQ
      (EXIT
       (SEQ (LETT |pa| (GETREFV32 |n| 0) . #4=(|MODHP;LFPI_to_PA;LILLIU;6|))
            (SEQ (LETT |el| NIL . #4#) (LETT #3# |lfi| . #4#)
                 (LETT |j| 0 . #4#) (LETT #2# (- |n| 1) . #4#) G190
                 (COND
                  ((OR (QSGREATERP |j| #2#) (ATOM #3#)
                       (PROGN (LETT |el| (CAR #3#) . #4#) NIL))
                   (GO G191)))
                 (SEQ
                  (LETT |nm|
                        (SPADCALL (SPADCALL |el| (QREFELT $ 43)) |vars| |pts|
                                  |prime| (QREFELT $ 29))
                        . #4#)
                  (LETT |dm|
                        (SPADCALL (SPADCALL |el| (QREFELT $ 44)) |vars| |pts|
                                  |prime| (QREFELT $ 29))
                        . #4#)
                  (EXIT
                   (COND
                    ((EQL |dm| 0)
                     (PROGN (LETT #1# (CONS 1 "failed") . #4#) (GO #1#)))
                    ('T
                     (SEQ (LETT |dms| |dm| . #4#)
                          (LETT |nlc|
                                (QSMULMOD32 |nm|
                                            (SPADCALL |dms| |prime|
                                                      (QREFELT $ 38))
                                            |prime|)
                                . #4#)
                          (EXIT (SETELT32 |pa| |j| |nlc|)))))))
                 (LETT |j| (PROG1 (QSADD1 |j|) (LETT #3# (CDR #3#) . #4#))
                       . #4#)
                 (GO G190) G191 (EXIT NIL))
            (EXIT (CONS 0 |pa|))))
      #1# (EXIT #1#))))) 

(DEFUN |MODHP;PPFtoPA| (|pfi| |sigma| |psi| $)
  (PROG (|nc| |nlcq| |m| |prime| |pa|)
    (RETURN
     (SEQ (LETT |pa| (GETREFV32 |sigma| 0) . #1=(|MODHP;PPFtoPA|))
          (LETT |prime| |psi| . #1#)
          (SEQ G190
               (COND
                ((NULL (COND ((SPADCALL |pfi| (QREFELT $ 10)) 'NIL) ('T 'T)))
                 (GO G191)))
               (SEQ (LETT |m| (SPADCALL |pfi| (QREFELT $ 8)) . #1#)
                    (COND
                     ((< |m| |sigma|)
                      (SEQ (LETT |nlcq| (SPADCALL |pfi| (QREFELT $ 12)) . #1#)
                           (LETT |nc| (SPADCALL |nlcq| |prime| (QREFELT $ 13))
                                 . #1#)
                           (EXIT (SETELT32 |pa| |m| |nc|)))))
                    (EXIT (LETT |pfi| (SPADCALL |pfi| (QREFELT $ 14)) . #1#)))
               NIL (GO G190) G191 (EXIT NIL))
          (EXIT (CONS 0 |pa|)))))) 

(DEFUN |MODHP;LPPFtoVPA| (|lpi| |sigma| |psi| $)
  (PROG (#1=#:G1896 |vpp| |i| #2=#:G1897 |p| |vpa| |m|)
    (RETURN
     (SEQ
      (EXIT
       (SEQ (LETT |m| (LENGTH |lpi|) . #3=(|MODHP;LPPFtoVPA|))
            (LETT |vpa| (MAKEARR1 |m| (GETREFV32 0 0)) . #3#)
            (SEQ (LETT |p| NIL . #3#) (LETT #2# |lpi| . #3#) (LETT |i| 1 . #3#)
                 G190
                 (COND
                  ((OR (QSGREATERP |i| |m|) (ATOM #2#)
                       (PROGN (LETT |p| (CAR #2#) . #3#) NIL))
                   (GO G191)))
                 (SEQ (LETT |vpp| (|MODHP;PPFtoPA| |p| |sigma| |psi| $) . #3#)
                      (EXIT
                       (COND
                        ((QEQCAR |vpp| 1)
                         (PROGN (LETT #1# (CONS 1 "failed") . #3#) (GO #1#)))
                        ('T
                         (SPADCALL |vpa| |i| (QCDR |vpp|) (QREFELT $ 19))))))
                 (LETT |i| (PROG1 (QSADD1 |i|) (LETT #2# (CDR #2#) . #3#))
                       . #3#)
                 (GO G190) G191 (EXIT NIL))
            (EXIT (CONS 0 |vpa|))))
      #1# (EXIT #1#))))) 

(DEFUN |MODHP;intpoly_to_PFI| (|p| $) (SPADCALL (ELT $ 47) |p| (QREFELT $ 51))) 

(DEFUN |MODHP;check_sol1a;VUvM3IUv;10|
       (|nres| |gv0| |gen| |sigma| |qval| |p| $)
  (PROG (|i| |res| |gvp| |m|)
    (RETURN
     (SEQ (LETT |m| (QVSIZE |nres|) . #1=(|MODHP;check_sol1a;VUvM3IUv;10|))
          (LETT |gvp| (SPADCALL |gv0| |p| |qval| |gen|) . #1#)
          (LETT |res| (GETREFV32 |sigma| 0) . #1#)
          (SEQ (LETT |i| 1 . #1#) G190 (COND ((QSGREATERP |i| |m|) (GO G191)))
               (SEQ
                (EXIT
                 (SPADCALL (SPADCALL |gvp| |i| (QREFELT $ 52))
                           (SPADCALL |nres| |i| (QREFELT $ 52)) |res|
                           (- |sigma| 1) |p| (QREFELT $ 56))))
               (LETT |i| (QSADD1 |i|) . #1#) (GO G190) G191 (EXIT NIL))
          (EXIT |res|))))) 

(DEFUN |MODHP;HP_solve_I;LLSNniMMU;11|
       (|list| |degs| |kind| |sigma| |gen| |check| $)
  (PROG (#1=#:G2003 |l| #2=#:G2007 |i| |mress| #3=#:G1982 |ii| #4=#:G1981
         |sol_ok| |sol_okp| |k| |s| |cc| #5=#:G1968 |mm| |j| |resvi| |resv|
         #6=#:G1963 |cden| |dens| |nums| |ppr| |pp| |cp| |rv| #7=#:G1946
         |rstate| |oldciv| |oldva| |nsols| #8=#:G1943 |is_bad| |all_bad| |civ|
         |va| |bm| |rblr| |blr| |gv2| |gv0| |gv0p| |psi| |nprimes| |ok| |lp|
         |prime| |maxd| |vi| |pts| #9=#:G1922 #10=#:G2006 |pts0| |ve|
         #11=#:G2005 |d| #12=#:G2004 |degs_sum| |m|)
    (RETURN
     (SEQ
      (EXIT
       (SEQ (LETT |lp| NIL . #13=(|MODHP;HP_solve_I;LLSNniMMU;11|))
            (COND
             ((OR (EQUAL |kind| '|qdiffHP|) (EQUAL |kind| '|qshiftHP|))
              (EXIT (CONS 1 'T))))
            (LETT |m| (SPADCALL |degs| (QREFELT $ 60)) . #13#)
            (LETT |degs_sum|
                  (+ (SPADCALL (ELT $ 61) |degs| (QREFELT $ 63)) |m|) . #13#)
            (LETT |ve|
                  (SPADCALL
                   (PROGN
                    (LETT #12# NIL . #13#)
                    (SEQ (LETT |d| NIL . #13#) (LETT #11# |degs| . #13#) G190
                         (COND
                          ((OR (ATOM #11#)
                               (PROGN (LETT |d| (CAR #11#) . #13#) NIL))
                           #14=(GO G191)))
                         (SEQ (EXIT (LETT #12# (CONS |d| #12#) . #13#)))
                         (LETT #11# (CDR #11#) . #13#) #15=(GO G190) G191
                         (EXIT (NREVERSE0 #12#))))
                   (QREFELT $ 65))
                  . #13#)
            (LETT |pts|
                  (COND ((EQUAL |kind| '|diffHP|) (GETREFV32 0 0))
                        ('T
                         (SEQ
                          (EXIT
                           (COND
                            ((EQUAL |kind| '|shiftHP|)
                             (PROGN
                              (LETT #9#
                                    (SEQ
                                     (LETT |pts0| (GETREFV32 |sigma| 0) . #13#)
                                     (SEQ (LETT |i| 0 . #13#)
                                          (LETT #10# (- |sigma| 1) . #13#) G190
                                          (COND ((QSGREATERP |i| #10#) #14#))
                                          (SEQ
                                           (EXIT (SETELT32 |pts0| |i| |i|)))
                                          (LETT |i| (QSADD1 |i|) . #13#) #15#
                                          G191 (EXIT NIL))
                                     (EXIT |pts0|))
                                    . #13#)
                              (GO #9#)))))
                          #9# (EXIT #9#))))
                  . #13#)
            (LETT |vi| (MAKEARR1 |m| NIL) . #13#) (LETT |nsols| -1 . #13#)
            (LETT |maxd| -1 . #13#) (LETT |nprimes| 0 . #13#)
            (LETT |nsols| (+ |m| 1) . #13#)
            (SEQ G190 NIL
                 (SEQ (LETT |ok| 'NIL . #13#)
                      (SEQ (LETT |k| 1 . #13#) G190
                           (COND
                            ((OR (QSGREATERP |k| 100)
                                 (NULL (COND (|ok| 'NIL) ('T 'T))))
                             #14#))
                           (SEQ
                            (LETT |prime|
                                  (SPADCALL (+ (RANDOM 2000000) 2000000)
                                            (QREFELT $ 68))
                                  . #13#)
                            (EXIT
                             (COND
                              ((SPADCALL |prime| |lp| (QREFELT $ 69))
                               "iterate")
                              ('T
                               (SEQ (LETT |lp| (CONS |prime| |lp|) . #13#)
                                    (EXIT (LETT |ok| 'T . #13#)))))))
                           (LETT |k| (QSADD1 |k|) . #13#) #15# G191 (EXIT NIL))
                      (EXIT
                       (COND
                        (|ok|
                         (SEQ (LETT |nprimes| (+ |nprimes| 1) . #13#)
                              (LETT |psi| (SPADCALL |prime| (QREFELT $ 70))
                                    . #13#)
                              (LETT |gv0p|
                                    (SPADCALL |list| (LENGTH |list|) |psi|
                                              (QREFELT $ 41))
                                    . #13#)
                              (EXIT
                               (COND ((QEQCAR |gv0p| 1) "iterate")
                                     ('T
                                      (SEQ (LETT |gv0| (QCDR |gv0p|) . #13#)
                                           (LETT |gv2|
                                                 (SPADCALL |gv0| |prime| 1
                                                           |gen|)
                                                 . #13#)
                                           (LETT |blr|
                                                 (SPADCALL |gv2| |ve| |sigma|
                                                           |pts| |prime| |kind|
                                                           (QREFELT $ 74))
                                                 . #13#)
                                           (EXIT
                                            (COND
                                             ((QEQCAR |blr| 1)
                                              (PROGN
                                               (LETT #1# (CONS 1 'NIL) . #13#)
                                               (GO #1#)))
                                             ('T
                                              (SEQ
                                               (LETT |rblr| (QCDR |blr|)
                                                     . #13#)
                                               (LETT |bm| (QVELT |rblr| 0)
                                                     . #13#)
                                               (LETT |va| (QVELT |rblr| 1)
                                                     . #13#)
                                               (LETT |civ| (QVELT |rblr| 2)
                                                     . #13#)
                                               (EXIT
                                                (COND
                                                 ((< |nsols| (QVSIZE |va|))
                                                  "iterate")
                                                 ('T
                                                  (SEQ
                                                   (LETT |is_bad| 'NIL . #13#)
                                                   (LETT |all_bad|
                                                         (< (QVSIZE |va|)
                                                            |nsols|)
                                                         . #13#)
                                                   (COND
                                                    ((EQL (QVSIZE |va|)
                                                          |nsols|)
                                                     (SEQ
                                                      (EXIT
                                                       (SEQ (LETT |i| 1 . #13#)
                                                            G190
                                                            (COND
                                                             ((QSGREATERP |i|
                                                                          |nsols|)
                                                              #14#))
                                                            (SEQ
                                                             (EXIT
                                                              (COND
                                                               ((<
                                                                 (SPADCALL |va|
                                                                           |i|
                                                                           (QREFELT
                                                                            $
                                                                            75))
                                                                 (SPADCALL
                                                                  |oldva| |i|
                                                                  (QREFELT $
                                                                           75)))
                                                                (SEQ
                                                                 (LETT
                                                                  |all_bad| 'T
                                                                  . #13#)
                                                                 (EXIT
                                                                  (PROGN
                                                                   (LETT #8#
                                                                         |$NoValue|
                                                                         . #13#)
                                                                   (GO #8#)))))
                                                               ((<
                                                                 (SPADCALL
                                                                  |oldva| |i|
                                                                  (QREFELT $
                                                                           75))
                                                                 (SPADCALL |va|
                                                                           |i|
                                                                           (QREFELT
                                                                            $
                                                                            75)))
                                                                (SEQ
                                                                 (LETT |is_bad|
                                                                       'T
                                                                       . #13#)
                                                                 (EXIT
                                                                  (PROGN
                                                                   (LETT #8#
                                                                         |$NoValue|
                                                                         . #13#)
                                                                   (GO #8#)))))
                                                               ((<
                                                                 (SPADCALL
                                                                  |civ| |i|
                                                                  (QREFELT $
                                                                           75))
                                                                 (SPADCALL
                                                                  |oldciv| |i|
                                                                  (QREFELT $
                                                                           75)))
                                                                (SEQ
                                                                 (LETT
                                                                  |all_bad| 'T
                                                                  . #13#)
                                                                 (EXIT
                                                                  (PROGN
                                                                   (LETT #8#
                                                                         |$NoValue|
                                                                         . #13#)
                                                                   (GO #8#)))))
                                                               ((<
                                                                 (SPADCALL
                                                                  |oldciv| |i|
                                                                  (QREFELT $
                                                                           75))
                                                                 (SPADCALL
                                                                  |civ| |i|
                                                                  (QREFELT $
                                                                           75)))
                                                                (SEQ
                                                                 (LETT |is_bad|
                                                                       'T
                                                                       . #13#)
                                                                 (EXIT
                                                                  (PROGN
                                                                   (LETT #8#
                                                                         |$NoValue|
                                                                         . #13#)
                                                                   (GO
                                                                    #8#))))))))
                                                            (LETT |i|
                                                                  (QSADD1 |i|)
                                                                  . #13#)
                                                            #15# G191
                                                            (EXIT NIL)))
                                                      #8# (EXIT #8#))))
                                                   (EXIT
                                                    (COND (|is_bad| "iterate")
                                                          ('T
                                                           (SEQ
                                                            (COND
                                                             (|all_bad|
                                                              (SEQ
                                                               (LETT |nsols|
                                                                     (QVSIZE
                                                                      |va|)
                                                                     . #13#)
                                                               (LETT |oldva|
                                                                     |va|
                                                                     . #13#)
                                                               (LETT |oldciv|
                                                                     |civ|
                                                                     . #13#)
                                                               (LETT |rstate|
                                                                     (SPADCALL
                                                                      (*
                                                                       |nsols|
                                                                       |degs_sum|)
                                                                      (QREFELT
                                                                       $ 77))
                                                                     . #13#)
                                                               (EXIT
                                                                (LETT |rv|
                                                                      (GETREFV32
                                                                       (*
                                                                        (PROG1
                                                                            (LETT
                                                                             #7#
                                                                             |nsols|
                                                                             . #13#)
                                                                          (|check-subtype|
                                                                           (>
                                                                            #7#
                                                                            0)
                                                                           '(|PositiveInteger|)
                                                                           #7#))
                                                                        |degs_sum|)
                                                                       0)
                                                                      . #13#)))))
                                                            (LETT |k| 0 . #13#)
                                                            (COND
                                                             ((EQL
                                                               (SPADCALL
                                                                |nprimes| 100
                                                                (QREFELT $ 13))
                                                               0)
                                                              (SEQ
                                                               (SPADCALL
                                                                "number of primes"
                                                                (QREFELT $ 80))
                                                               (EXIT
                                                                (SPADCALL
                                                                 (SPADCALL
                                                                  |nprimes|
                                                                  (QREFELT $
                                                                           81))
                                                                 (QREFELT $
                                                                          80))))))
                                                            (SEQ
                                                             (LETT |i| 1
                                                                   . #13#)
                                                             G190
                                                             (COND
                                                              ((QSGREATERP |i|
                                                                           |nsols|)
                                                               #14#))
                                                             (SEQ
                                                              (EXIT
                                                               (SEQ
                                                                (LETT |j| 1
                                                                      . #13#)
                                                                G190
                                                                (COND
                                                                 ((QSGREATERP
                                                                   |j| |m|)
                                                                  #14#))
                                                                (SEQ
                                                                 (LETT |mm|
                                                                       (SPADCALL
                                                                        |ve|
                                                                        |j|
                                                                        (QREFELT
                                                                         $ 75))
                                                                       . #13#)
                                                                 (LETT |cp|
                                                                       (SPADCALL
                                                                        |bm|
                                                                        |i| |j|
                                                                        (QREFELT
                                                                         $ 83))
                                                                       . #13#)
                                                                 (EXIT
                                                                  (SEQ
                                                                   (LETT |l| 0
                                                                         . #13#)
                                                                   G190
                                                                   (COND
                                                                    ((QSGREATERP
                                                                      |l| |mm|)
                                                                     #14#))
                                                                   (SEQ
                                                                    (SETELT32
                                                                     |rv| |k|
                                                                     (ELT32
                                                                      |cp|
                                                                      |l|))
                                                                    (EXIT
                                                                     (LETT |k|
                                                                           (+
                                                                            |k|
                                                                            1)
                                                                           . #13#)))
                                                                   (LETT |l|
                                                                         (QSADD1
                                                                          |l|)
                                                                         . #13#)
                                                                   #15# G191
                                                                   (EXIT
                                                                    NIL))))
                                                                (LETT |j|
                                                                      (QSADD1
                                                                       |j|)
                                                                      . #13#)
                                                                #15# G191
                                                                (EXIT NIL))))
                                                             (LETT |i|
                                                                   (QSADD1 |i|)
                                                                   . #13#)
                                                             #15# G191
                                                             (EXIT NIL))
                                                            (SPADCALL |rv|
                                                                      |prime|
                                                                      |rstate|
                                                                      (QREFELT
                                                                       $ 84))
                                                            (LETT |pp|
                                                                  (SPADCALL
                                                                   |rstate|
                                                                   (QREFELT $
                                                                            87))
                                                                  . #13#)
                                                            (EXIT
                                                             (COND
                                                              ((QEQCAR |pp| 1)
                                                               "iterate")
                                                              ('T
                                                               (SEQ
                                                                (LETT |ppr|
                                                                      (QCDR
                                                                       |pp|)
                                                                      . #13#)
                                                                (LETT |nums|
                                                                      (QCAR
                                                                       |ppr|)
                                                                      . #13#)
                                                                (LETT |dens|
                                                                      (QCDR
                                                                       (QCDR
                                                                        |pp|))
                                                                      . #13#)
                                                                (LETT |cden|
                                                                      (SPADCALL
                                                                       (SPADCALL
                                                                        |dens|
                                                                        (QREFELT
                                                                         $ 89))
                                                                       (QREFELT
                                                                        $ 91))
                                                                      . #13#)
                                                                (LETT |k| 0
                                                                      . #13#)
                                                                (LETT |resv|
                                                                      (MAKEARR1
                                                                       (PROG1
                                                                           (LETT
                                                                            #6#
                                                                            |nsols|
                                                                            . #13#)
                                                                         (|check-subtype|
                                                                          (>=
                                                                           #6#
                                                                           0)
                                                                          '(|NonNegativeInteger|)
                                                                          #6#))
                                                                       (MAKE-ARRAY
                                                                        0))
                                                                      . #13#)
                                                                (LETT |ii| 1
                                                                      . #13#)
                                                                (LETT |sol_ok|
                                                                      'T
                                                                      . #13#)
                                                                (SEQ
                                                                 (EXIT
                                                                  (SEQ
                                                                   (LETT |i| 1
                                                                         . #13#)
                                                                   G190
                                                                   (COND
                                                                    ((QSGREATERP
                                                                      |i|
                                                                      |nsols|)
                                                                     #14#))
                                                                   (SEQ
                                                                    (LETT
                                                                     |resvi|
                                                                     (MAKEARR1
                                                                      |m|
                                                                      (|spadConstant|
                                                                       $ 92))
                                                                     . #13#)
                                                                    (SEQ
                                                                     (LETT |j|
                                                                           1
                                                                           . #13#)
                                                                     G190
                                                                     (COND
                                                                      ((QSGREATERP
                                                                        |j|
                                                                        |m|)
                                                                       #14#))
                                                                     (SEQ
                                                                      (LETT
                                                                       |mm|
                                                                       (SPADCALL
                                                                        |ve|
                                                                        |j|
                                                                        (QREFELT
                                                                         $ 75))
                                                                       . #13#)
                                                                      (LETT |s|
                                                                            (|spadConstant|
                                                                             $
                                                                             92)
                                                                            . #13#)
                                                                      (SEQ
                                                                       (LETT
                                                                        |l| 0
                                                                        . #13#)
                                                                       G190
                                                                       (COND
                                                                        ((QSGREATERP
                                                                          |l|
                                                                          |mm|)
                                                                         #14#))
                                                                       (SEQ
                                                                        (LETT
                                                                         |cc|
                                                                         (*
                                                                          (QAREF1
                                                                           |nums|
                                                                           |k|)
                                                                          (PROG2
                                                                              (LETT
                                                                               #5#
                                                                               (SPADCALL
                                                                                |cden|
                                                                                (QAREF1
                                                                                 |dens|
                                                                                 |k|)
                                                                                (QREFELT
                                                                                 $
                                                                                 94))
                                                                               . #13#)
                                                                              (QCDR
                                                                               #5#)
                                                                            (|check-union|
                                                                             (QEQCAR
                                                                              #5#
                                                                              0)
                                                                             (|Integer|)
                                                                             #5#)))
                                                                         . #13#)
                                                                        (LETT
                                                                         |s|
                                                                         (SPADCALL
                                                                          |s|
                                                                          (SPADCALL
                                                                           |cc|
                                                                           |l|
                                                                           (QREFELT
                                                                            $
                                                                            95))
                                                                          (QREFELT
                                                                           $
                                                                           96))
                                                                         . #13#)
                                                                        (EXIT
                                                                         (LETT
                                                                          |k|
                                                                          (+
                                                                           |k|
                                                                           1)
                                                                          . #13#)))
                                                                       (LETT
                                                                        |l|
                                                                        (QSADD1
                                                                         |l|)
                                                                        . #13#)
                                                                       #15#
                                                                       G191
                                                                       (EXIT
                                                                        NIL))
                                                                      (EXIT
                                                                       (SPADCALL
                                                                        |resvi|
                                                                        |j| |s|
                                                                        (QREFELT
                                                                         $
                                                                         97))))
                                                                     (LETT |j|
                                                                           (QSADD1
                                                                            |j|)
                                                                           . #13#)
                                                                     #15# G191
                                                                     (EXIT
                                                                      NIL))
                                                                    (LETT
                                                                     |sol_okp|
                                                                     (SPADCALL
                                                                      (SPADCALL
                                                                       |resvi|
                                                                       (QREFELT
                                                                        $ 99))
                                                                      |check|)
                                                                     . #13#)
                                                                    (EXIT
                                                                     (COND
                                                                      ((QEQCAR
                                                                        |sol_okp|
                                                                        1)
                                                                       "iterate")
                                                                      ((QEQCAR
                                                                        |sol_okp|
                                                                        2)
                                                                       (SEQ
                                                                        (LETT
                                                                         |sol_ok|
                                                                         'NIL
                                                                         . #13#)
                                                                        (EXIT
                                                                         (PROGN
                                                                          (LETT
                                                                           #4#
                                                                           |$NoValue|
                                                                           . #13#)
                                                                          (GO
                                                                           #4#)))))
                                                                      ('T
                                                                       (SEQ
                                                                        (SPADCALL
                                                                         |resv|
                                                                         |ii|
                                                                         |resvi|
                                                                         (QREFELT
                                                                          $
                                                                          101))
                                                                        (EXIT
                                                                         (LETT
                                                                          |ii|
                                                                          (+
                                                                           |ii|
                                                                           1)
                                                                          . #13#)))))))
                                                                   (LETT |i|
                                                                         (QSADD1
                                                                          |i|)
                                                                         . #13#)
                                                                   #15# G191
                                                                   (EXIT NIL)))
                                                                 #4#
                                                                 (EXIT #4#))
                                                                (EXIT
                                                                 (COND
                                                                  (|sol_ok|
                                                                   (SEQ
                                                                    (LETT
                                                                     |mress|
                                                                     (SPADCALL
                                                                      |m|
                                                                      (PROG1
                                                                          (LETT
                                                                           #3#
                                                                           (-
                                                                            |ii|
                                                                            1)
                                                                           . #13#)
                                                                        (|check-subtype|
                                                                         (>=
                                                                          #3#
                                                                          0)
                                                                         '(|NonNegativeInteger|)
                                                                         #3#))
                                                                      (|spadConstant|
                                                                       $ 92)
                                                                      (QREFELT
                                                                       $ 103))
                                                                     . #13#)
                                                                    (SEQ
                                                                     (LETT |i|
                                                                           1
                                                                           . #13#)
                                                                     (LETT #2#
                                                                           (-
                                                                            |ii|
                                                                            1)
                                                                           . #13#)
                                                                     G190
                                                                     (COND
                                                                      ((QSGREATERP
                                                                        |i|
                                                                        #2#)
                                                                       #14#))
                                                                     (SEQ
                                                                      (EXIT
                                                                       (SEQ
                                                                        (LETT
                                                                         |l| 1
                                                                         . #13#)
                                                                        G190
                                                                        (COND
                                                                         ((QSGREATERP
                                                                           |l|
                                                                           |m|)
                                                                          #14#))
                                                                        (SEQ
                                                                         (EXIT
                                                                          (SPADCALL
                                                                           |mress|
                                                                           |l|
                                                                           |i|
                                                                           (SPADCALL
                                                                            (SPADCALL
                                                                             |resv|
                                                                             |i|
                                                                             (QREFELT
                                                                              $
                                                                              104))
                                                                            |l|
                                                                            (QREFELT
                                                                             $
                                                                             16))
                                                                           (QREFELT
                                                                            $
                                                                            105))))
                                                                        (LETT
                                                                         |l|
                                                                         (QSADD1
                                                                          |l|)
                                                                         . #13#)
                                                                        #15#
                                                                        G191
                                                                        (EXIT
                                                                         NIL))))
                                                                     (LETT |i|
                                                                           (QSADD1
                                                                            |i|)
                                                                           . #13#)
                                                                     #15# G191
                                                                     (EXIT
                                                                      NIL))
                                                                    (EXIT
                                                                     (PROGN
                                                                      (LETT #1#
                                                                            (CONS
                                                                             0
                                                                             |mress|)
                                                                            . #13#)
                                                                      (GO
                                                                       #1#)))))))))))))))))))))))))))))
                        ('T (|error| "Run out of primes")))))
                 NIL #15# G191 (EXIT NIL))
            (EXIT (PROGN (LETT #1# (CONS 1 'T) . #13#) (GO #1#)))))
      #1# (EXIT #1#))))) 

(DEFUN |MODHP;get_variables2| (|lpi| $)
  (PROG (|res| #1=#:G2012 |p|)
    (RETURN
     (SEQ (LETT |res| NIL . #2=(|MODHP;get_variables2|))
          (SEQ (LETT |p| NIL . #2#) (LETT #1# |lpi| . #2#) G190
               (COND
                ((OR (ATOM #1#) (PROGN (LETT |p| (CAR #1#) . #2#) NIL))
                 (GO G191)))
               (SEQ
                (LETT |res|
                      (SPADCALL |res|
                                (SPADCALL (SPADCALL |p| (QREFELT $ 43))
                                          (QREFELT $ 110))
                                (QREFELT $ 111))
                      . #2#)
                (EXIT
                 (LETT |res|
                       (SPADCALL |res|
                                 (SPADCALL (SPADCALL |p| (QREFELT $ 44))
                                           (QREFELT $ 110))
                                 (QREFELT $ 111))
                       . #2#)))
               (LETT #1# (CDR #1#) . #2#) (GO G190) G191 (EXIT NIL))
          (EXIT |res|))))) 

(DEFUN |MODHP;unpack_poly| (|vars| |exps| |coeffs| |lo| |hi| $)
  (PROG (|res| #1=#:G2020 |i| |term| |term1| #2=#:G2015 |k| #3=#:G2023 |var|
         |j| #4=#:G2013 |jj| |i0| |nn| |nvars|)
    (RETURN
     (SEQ (LETT |res| (|spadConstant| $ 112) . #5=(|MODHP;unpack_poly|))
          (LETT |nvars| (LENGTH |vars|) . #5#) (LETT |nn| (+ |nvars| 1) . #5#)
          (LETT |vars| (REVERSE |vars|) . #5#) (LETT |j| -1 . #5#)
          (LETT |i| (* |lo| |nn|) . #5#)
          (SEQ (LETT |i0| |lo| . #5#) G190 (COND ((> |i0| |hi|) #6=(GO G191)))
               (SEQ (LETT |jj| (SPADCALL |exps| |i| (QREFELT $ 115)) . #5#)
                    (EXIT
                     (COND
                      ((< |jj| |j|)
                       (|error|
                        "Internal error: inconsistent exponent vector"))
                      ('T
                       (SEQ
                        (COND
                         ((< |j| |jj|)
                          (SEQ
                           (COND
                            ((NULL (< |j| 0))
                             (LETT |res|
                                   (SPADCALL |res|
                                             (SPADCALL |term|
                                                       (PROG1
                                                           (LETT #4# |j| . #5#)
                                                         (|check-subtype|
                                                          (>= #4# 0)
                                                          '(|NonNegativeInteger|)
                                                          #4#))
                                                       (QREFELT $ 116))
                                             (QREFELT $ 117))
                                   . #5#)))
                           (LETT |j| |jj| . #5#)
                           (EXIT (LETT |term| (|spadConstant| $ 118) . #5#)))))
                        (LETT |term1|
                              (SPADCALL (QAREF1 |coeffs| |i0|) (QREFELT $ 119))
                              . #5#)
                        (SEQ (LETT |var| NIL . #5#) (LETT #3# |vars| . #5#)
                             (LETT |k| 1 . #5#) G190
                             (COND
                              ((OR (QSGREATERP |k| |nvars|) (ATOM #3#)
                                   (PROGN (LETT |var| (CAR #3#) . #5#) NIL))
                               #6#))
                             (SEQ
                              (EXIT
                               (LETT |term1|
                                     (SPADCALL |term1|
                                               (SPADCALL (|spadConstant| $ 120)
                                                         |var|
                                                         (PROG1
                                                             (LETT #2#
                                                                   (SPADCALL
                                                                    |exps|
                                                                    (+ |i| |k|)
                                                                    (QREFELT $
                                                                             115))
                                                                   . #5#)
                                                           (|check-subtype|
                                                            (>= #2# 0)
                                                            '(|NonNegativeInteger|)
                                                            #2#))
                                                         (QREFELT $ 121))
                                               (QREFELT $ 122))
                                     . #5#)))
                             (LETT |k|
                                   (PROG1 (QSADD1 |k|)
                                     (LETT #3# (CDR #3#) . #5#))
                                   . #5#)
                             #7=(GO G190) G191 (EXIT NIL))
                        (LETT |term| (SPADCALL |term1| |term| (QREFELT $ 123))
                              . #5#)
                        (EXIT (LETT |i| (+ |i| |nn|) . #5#)))))))
               (LETT |i0| (+ |i0| 1) . #5#) #7# G191 (EXIT NIL))
          (COND
           ((NULL (< |j| 0))
            (LETT |res|
                  (SPADCALL |res|
                            (SPADCALL |term|
                                      (PROG1 (LETT #1# |j| . #5#)
                                        (|check-subtype| (>= #1# 0)
                                                         '(|NonNegativeInteger|)
                                                         #1#))
                                      (QREFELT $ 116))
                            (QREFELT $ 117))
                  . #5#)))
          (EXIT |res|))))) 

(DEFUN |MODHP;intpoly_to_PFPI| (|p| $)
  (SPADCALL (ELT $ 124) |p| (QREFELT $ 128))) 

(DEFUN |MODHP;PFPI_to_PFI| (|p| $)
  (PROG (|res| |iq| |q| |m|)
    (RETURN
     (SEQ (LETT |res| (|spadConstant| $ 66) . #1=(|MODHP;PFPI_to_PFI|))
          (SEQ G190
               (COND
                ((NULL (COND ((SPADCALL |p| (QREFELT $ 129)) 'NIL) ('T 'T)))
                 (GO G191)))
               (SEQ (LETT |m| (SPADCALL |p| (QREFELT $ 130)) . #1#)
                    (LETT |q| (SPADCALL |p| (QREFELT $ 131)) . #1#)
                    (LETT |p| (SPADCALL |p| (QREFELT $ 132)) . #1#)
                    (LETT |iq| (SPADCALL |q| (QREFELT $ 133)) . #1#)
                    (EXIT
                     (LETT |res|
                           (SPADCALL (SPADCALL |iq| |m| (QREFELT $ 134)) |res|
                                     (QREFELT $ 135))
                           . #1#)))
               NIL (GO G190) G191 (EXIT NIL))
          (EXIT |res|))))) 

(DEFUN |MODHP;PI_to_PPI| (|p| $)
  (PROG (|res| |mq| |q| |m|)
    (RETURN
     (SEQ (LETT |res| (|spadConstant| $ 112) . #1=(|MODHP;PI_to_PPI|))
          (SEQ G190
               (COND
                ((NULL (COND ((SPADCALL |p| (QREFELT $ 10)) 'NIL) ('T 'T)))
                 (GO G191)))
               (SEQ (LETT |m| (SPADCALL |p| (QREFELT $ 8)) . #1#)
                    (LETT |q| (SPADCALL |p| (QREFELT $ 12)) . #1#)
                    (LETT |p| (SPADCALL |p| (QREFELT $ 14)) . #1#)
                    (LETT |mq| (SPADCALL |q| (QREFELT $ 119)) . #1#)
                    (EXIT
                     (LETT |res|
                           (SPADCALL (SPADCALL |mq| |m| (QREFELT $ 116)) |res|
                                     (QREFELT $ 117))
                           . #1#)))
               NIL (GO G190) G191 (EXIT NIL))
          (EXIT |res|))))) 

(DEFUN |MODHP;LPI_to_LPPI| (|lp| $)
  (PROG (#1=#:G2039 |p| #2=#:G2038)
    (RETURN
     (SEQ
      (PROGN
       (LETT #2# NIL . #3=(|MODHP;LPI_to_LPPI|))
       (SEQ (LETT |p| NIL . #3#) (LETT #1# |lp| . #3#) G190
            (COND
             ((OR (ATOM #1#) (PROGN (LETT |p| (CAR #1#) . #3#) NIL))
              (GO G191)))
            (SEQ (EXIT (LETT #2# (CONS (|MODHP;PI_to_PPI| |p| $) #2#) . #3#)))
            (LETT #1# (CDR #1#) . #3#) (GO G190) G191
            (EXIT (NREVERSE0 #2#)))))))) 

(DEFUN |MODHP;trivial_poly_solve|
       (|list| |degs| |kind| |sigma| |gen| |check| $)
  (PROG (|j| |i| |res| |nc| |nr| |resi| #1=#:G2057 |pres| |nlist| #2=#:G2059
         |q| #3=#:G2058)
    (RETURN
     (SEQ
      (EXIT
       (COND
        ((EQUAL |kind| '|qshiftHP|)
         (PROGN
          (LETT #1# (CONS 1 'T) . #4=(|MODHP;trivial_poly_solve|))
          (GO #1#)))
        (#5='T
         (SEQ (COND ((EQUAL |kind| '|qdiffHP|) (LETT |kind| '|diffHP| . #4#)))
              (LETT |nlist|
                    (PROGN
                     (LETT #3# NIL . #4#)
                     (SEQ (LETT |q| NIL . #4#) (LETT #2# |list| . #4#) G190
                          (COND
                           ((OR (ATOM #2#)
                                (PROGN (LETT |q| (CAR #2#) . #4#) NIL))
                            #6=(GO G191)))
                          (SEQ
                           (EXIT
                            (LETT #3# (CONS (SPADCALL |q| (QREFELT $ 133)) #3#)
                                  . #4#)))
                          (LETT #2# (CDR #2#) . #4#) #7=(GO G190) G191
                          (EXIT (NREVERSE0 #3#))))
                    . #4#)
              (LETT |pres|
                    (SPADCALL |nlist| |degs| |kind| |sigma| |gen|
                              (CONS #'|MODHP;trivial_poly_solve!0|
                                    (VECTOR |check| $))
                              (QREFELT $ 109))
                    . #4#)
              (EXIT
               (COND
                ((QEQCAR |pres| 1)
                 (PROGN (LETT #1# (CONS 1 (QCDR |pres|)) . #4#) (GO #1#)))
                (#5#
                 (SEQ (LETT |resi| (QCDR |pres|) . #4#)
                      (LETT |nr| (QVSIZE |resi|) . #4#)
                      (LETT |nc| (SPADCALL |resi| (QREFELT $ 136)) . #4#)
                      (LETT |res|
                            (SPADCALL |nr| |nc| (|spadConstant| $ 112)
                                      (QREFELT $ 138))
                            . #4#)
                      (SEQ (LETT |i| 1 . #4#) G190
                           (COND ((QSGREATERP |i| |nr|) #6#))
                           (SEQ
                            (EXIT
                             (SEQ (LETT |j| 1 . #4#) G190
                                  (COND ((QSGREATERP |j| |nc|) #6#))
                                  (SEQ
                                   (EXIT
                                    (SPADCALL |res| |i| |j|
                                              (|MODHP;PI_to_PPI|
                                               (SPADCALL |resi| |i| |j|
                                                         (QREFELT $ 139))
                                               $)
                                              (QREFELT $ 140))))
                                  (LETT |j| (QSADD1 |j|) . #4#) #7# G191
                                  (EXIT NIL))))
                           (LETT |i| (QSADD1 |i|) . #4#) #7# G191 (EXIT NIL))
                      (EXIT (CONS 0 |res|))))))))))
      #1# (EXIT #1#))))) 

(DEFUN |MODHP;trivial_poly_solve!0| (|x| $$)
  (PROG ($ |check|)
    (LETT $ (QREFELT $$ 1) . #1=(|MODHP;trivial_poly_solve|))
    (LETT |check| (QREFELT $$ 0) . #1#)
    (RETURN (PROGN (SPADCALL (|MODHP;LPI_to_LPPI| |x| $) |check|))))) 

(DEFUN |MODHP;get_variables;L2SL;19| (|list| |kind| |qvar| $)
  (PROG (|vars|)
    (RETURN
     (SEQ
      (LETT |vars| (|MODHP;get_variables2| |list| $)
            . #1=(|MODHP;get_variables;L2SL;19|))
      (COND
       ((OR (EQUAL |kind| '|qdiffHP|)
            (OR (EQUAL |kind| '|qshiftHP|) (EQUAL |kind| '|qmixed|)))
        (LETT |vars|
              (COND ((SPADCALL |qvar| |vars| (QREFELT $ 141)) |vars|)
                    ('T (CONS |qvar| |vars|)))
              . #1#)))
      (EXIT (REVERSE (SPADCALL |vars| (QREFELT $ 142)))))))) 

(DEFUN |MODHP;HP_solve_P;LL2SNniMMU;20|
       (|list| |degs| |kind| |qvar| |sigma| |gen| |check| $)
  (PROG (#1=#:G2117 |l| #2=#:G2121 |i| |mress| #3=#:G2103 |ii| #4=#:G2102 |ok|
         |sol_okp| |hi| |ohi| |kk| |lo| |j| |resvi| |resv| |nsols| |cc|
         |coeffs| |exps| |oc| |offsets| |ppr| |pp| |gv0| |vars| |pts|
         #5=#:G2077 #6=#:G2120 |pts0| |ve| #7=#:G2119 |d| #8=#:G2118 |m| |lp|)
    (RETURN
     (SEQ
      (EXIT
       (SEQ (LETT |lp| NIL . #9=(|MODHP;HP_solve_P;LL2SNniMMU;20|))
            (LETT |m| (SPADCALL |degs| (QREFELT $ 60)) . #9#)
            (LETT |ve|
                  (SPADCALL
                   (PROGN
                    (LETT #8# NIL . #9#)
                    (SEQ (LETT |d| NIL . #9#) (LETT #7# |degs| . #9#) G190
                         (COND
                          ((OR (ATOM #7#)
                               (PROGN (LETT |d| (CAR #7#) . #9#) NIL))
                           #10=(GO G191)))
                         (SEQ (EXIT (LETT #8# (CONS |d| #8#) . #9#)))
                         (LETT #7# (CDR #7#) . #9#) #11=(GO G190) G191
                         (EXIT (NREVERSE0 #8#))))
                   (QREFELT $ 65))
                  . #9#)
            (LETT |pts|
                  (SEQ
                   (EXIT
                    (COND
                     ((OR (EQUAL |kind| '|diffHP|) (EQUAL |kind| '|qdiffHP|))
                      (GETREFV32 0 0))
                     ((OR (EQUAL |kind| '|shiftHP|) (EQUAL |kind| '|qmixed|))
                      (SEQ (LETT |pts0| (GETREFV32 |sigma| 0) . #9#)
                           (SEQ (LETT |i| 0 . #9#)
                                (LETT #6# (- |sigma| 1) . #9#) G190
                                (COND ((QSGREATERP |i| #6#) #10#))
                                (SEQ (EXIT (SETELT32 |pts0| |i| |i|)))
                                (LETT |i| (QSADD1 |i|) . #9#) #11# G191
                                (EXIT NIL))
                           (EXIT |pts0|)))
                     ('T
                      (COND
                       ((EQUAL |kind| '|qshiftHP|)
                        (PROGN
                         (LETT #5# (GETREFV32 |sigma| 0) . #9#)
                         (GO #5#)))))))
                   #5# (EXIT #5#))
                  . #9#)
            (LETT |vars| (|MODHP;get_variables2| |list| $) . #9#)
            (COND
             ((OR (EQUAL |kind| '|qdiffHP|)
                  (OR (EQUAL |kind| '|qshiftHP|) (EQUAL |kind| '|qmixed|)))
              (LETT |vars|
                    (COND ((SPADCALL |qvar| |vars| (QREFELT $ 141)) |vars|)
                          (#12='T (CONS |qvar| |vars|)))
                    . #9#)))
            (EXIT
             (COND
              ((NULL |vars|)
               (|MODHP;trivial_poly_solve| |list| |degs| |kind| |sigma| |gen|
                |check| $))
              (#12#
               (SEQ (LETT |gv0| (SPADCALL |list| (QREFELT $ 145)) . #9#)
                    (EXIT
                     (SEQ G190 NIL
                          (SEQ
                           (LETT |pp|
                                 (SPADCALL |vars| |gv0| |ve| |sigma| |pts|
                                           |kind| |qvar| |gen| (QREFELT $ 148))
                                 . #9#)
                           (EXIT
                            (COND
                             ((QEQCAR |pp| 1)
                              (PROGN (LETT #1# (CONS 1 'NIL) . #9#) (GO #1#)))
                             ('T
                              (SEQ (LETT |ppr| (QCDR |pp|) . #9#)
                                   (LETT |offsets| (QVELT |ppr| 3) . #9#)
                                   (LETT |oc| (QVSIZE |offsets|) . #9#)
                                   (LETT |exps| (QVELT |ppr| 4) . #9#)
                                   (LETT |coeffs| (QVELT |ppr| 5) . #9#)
                                   (LETT |cc| (QVSIZE |coeffs|) . #9#)
                                   (LETT |nsols|
                                         (QUOTIENT2 (QVSIZE |offsets|) |m|)
                                         . #9#)
                                   (LETT |ok| 'T . #9#) (LETT |kk| 1 . #9#)
                                   (LETT |ohi|
                                         (SPADCALL |offsets| 1 (QREFELT $ 75))
                                         . #9#)
                                   (LETT |resv|
                                         (MAKEARR1 |nsols| (MAKE-ARRAY 0))
                                         . #9#)
                                   (LETT |ii| 1 . #9#)
                                   (SEQ
                                    (EXIT
                                     (SEQ (LETT |i| 1 . #9#) G190
                                          (COND
                                           ((QSGREATERP |i| |nsols|) #10#))
                                          (SEQ
                                           (LETT |resvi|
                                                 (MAKEARR1 |m|
                                                           (|spadConstant| $
                                                                           112))
                                                 . #9#)
                                           (SEQ (LETT |j| 1 . #9#) G190
                                                (COND
                                                 ((QSGREATERP |j| |m|) #10#))
                                                (SEQ (LETT |lo| |ohi| . #9#)
                                                     (LETT |ohi|
                                                           (SEQ
                                                            (LETT |kk|
                                                                  (+ |kk| 1)
                                                                  . #9#)
                                                            (EXIT
                                                             (COND
                                                              ((< |oc| |kk|)
                                                               |cc|)
                                                              ('T
                                                               (SPADCALL
                                                                |offsets| |kk|
                                                                (QREFELT $
                                                                         75))))))
                                                           . #9#)
                                                     (LETT |hi| (- |ohi| 1)
                                                           . #9#)
                                                     (EXIT
                                                      (SPADCALL |resvi| |j|
                                                                (|MODHP;unpack_poly|
                                                                 |vars| |exps|
                                                                 |coeffs| |lo|
                                                                 |hi| $)
                                                                (QREFELT $
                                                                         151))))
                                                (LETT |j| (QSADD1 |j|) . #9#)
                                                #11# G191 (EXIT NIL))
                                           (LETT |sol_okp|
                                                 (SPADCALL
                                                  (SPADCALL |resvi|
                                                            (QREFELT $ 153))
                                                  |check|)
                                                 . #9#)
                                           (EXIT
                                            (COND
                                             ((QEQCAR |sol_okp| 1) "iterate")
                                             ((QEQCAR |sol_okp| 2)
                                              (SEQ (LETT |ok| 'NIL . #9#)
                                                   (EXIT
                                                    (PROGN
                                                     (LETT #4# |$NoValue|
                                                           . #9#)
                                                     (GO #4#)))))
                                             ('T
                                              (SEQ
                                               (SPADCALL |resv| |ii| |resvi|
                                                         (QREFELT $ 155))
                                               (EXIT
                                                (LETT |ii| (+ |ii| 1)
                                                      . #9#)))))))
                                          (LETT |i| (QSADD1 |i|) . #9#) #11#
                                          G191 (EXIT NIL)))
                                    #4# (EXIT #4#))
                                   (EXIT
                                    (COND
                                     (|ok|
                                      (SEQ
                                       (LETT |mress|
                                             (SPADCALL |m|
                                                       (PROG1
                                                           (LETT #3# (- |ii| 1)
                                                                 . #9#)
                                                         (|check-subtype|
                                                          (>= #3# 0)
                                                          '(|NonNegativeInteger|)
                                                          #3#))
                                                       (|spadConstant| $ 112)
                                                       (QREFELT $ 138))
                                             . #9#)
                                       (SEQ (LETT |i| 1 . #9#)
                                            (LETT #2# (- |ii| 1) . #9#) G190
                                            (COND ((QSGREATERP |i| #2#) #10#))
                                            (SEQ
                                             (EXIT
                                              (SEQ (LETT |l| 1 . #9#) G190
                                                   (COND
                                                    ((QSGREATERP |l| |m|)
                                                     #10#))
                                                   (SEQ
                                                    (EXIT
                                                     (SPADCALL |mress| |l| |i|
                                                               (SPADCALL
                                                                (SPADCALL
                                                                 |resv| |i|
                                                                 (QREFELT $
                                                                          156))
                                                                |l|
                                                                (QREFELT $ 32))
                                                               (QREFELT $
                                                                        140))))
                                                   (LETT |l| (QSADD1 |l|)
                                                         . #9#)
                                                   #11# G191 (EXIT NIL))))
                                            (LETT |i| (QSADD1 |i|) . #9#) #11#
                                            G191 (EXIT NIL))
                                       (EXIT
                                        (PROGN
                                         (LETT #1# (CONS 0 |mress|) . #9#)
                                         (GO #1#)))))
                                     ('T
                                      (SEQ
                                       (SPADCALL
                                        "check_sol_poly rejected solution"
                                        (QREFELT $ 80))
                                       (SPADCALL
                                        (SPADCALL |resvi| (QREFELT $ 157))
                                        (QREFELT $ 80))
                                       (EXIT (|error| "giving up")))))))))))
                          NIL #11# G191 (EXIT NIL)))))))))
      #1# (EXIT #1#))))) 

(DEFUN |MODHP;HP_solve_M;LLSINniMU;21|
       (|list| |degs| |kind| |prime| |sigma| |gen| $)
  (PROG (#1=#:G2145 |l| |i| |mress| |s| |bmij| |mm| |j| |resvi| |resv| |nsols|
         |va| |bm| |rblr| |blr| |gv| |gv0| |pts| #2=#:G2130 #3=#:G2148 |pts0|
         |ve| #4=#:G2147 |d| #5=#:G2146 |m| |lp|)
    (RETURN
     (SEQ
      (EXIT
       (SEQ (LETT |lp| NIL . #6=(|MODHP;HP_solve_M;LLSINniMU;21|))
            (COND
             ((OR (EQUAL |kind| '|qdiffHP|) (EQUAL |kind| '|qshiftHP|))
              (EXIT (CONS 1 'T))))
            (LETT |m| (SPADCALL |degs| (QREFELT $ 60)) . #6#)
            (LETT |ve|
                  (SPADCALL
                   (PROGN
                    (LETT #5# NIL . #6#)
                    (SEQ (LETT |d| NIL . #6#) (LETT #4# |degs| . #6#) G190
                         (COND
                          ((OR (ATOM #4#)
                               (PROGN (LETT |d| (CAR #4#) . #6#) NIL))
                           #7=(GO G191)))
                         (SEQ (EXIT (LETT #5# (CONS |d| #5#) . #6#)))
                         (LETT #4# (CDR #4#) . #6#) #8=(GO G190) G191
                         (EXIT (NREVERSE0 #5#))))
                   (QREFELT $ 65))
                  . #6#)
            (LETT |pts|
                  (COND ((EQUAL |kind| '|diffHP|) (GETREFV32 0 0))
                        (#9='T
                         (SEQ
                          (EXIT
                           (COND
                            ((EQUAL |kind| '|shiftHP|)
                             (PROGN
                              (LETT #2#
                                    (SEQ
                                     (LETT |pts0| (GETREFV32 |sigma| 0) . #6#)
                                     (SEQ (LETT |i| 0 . #6#)
                                          (LETT #3# (- |sigma| 1) . #6#) G190
                                          (COND ((QSGREATERP |i| #3#) #7#))
                                          (SEQ
                                           (EXIT (SETELT32 |pts0| |i| |i|)))
                                          (LETT |i| (QSADD1 |i|) . #6#) #8#
                                          G191 (EXIT NIL))
                                     (EXIT |pts0|))
                                    . #6#)
                              (GO #2#)))))
                          #2# (EXIT #2#))))
                  . #6#)
            (LETT |gv0| (SPADCALL |list| (QREFELT $ 161)) . #6#)
            (LETT |gv| (SPADCALL |gv0| |prime| 1 |gen|) . #6#)
            (LETT |blr|
                  (SPADCALL |gv| |ve| |sigma| |pts| |prime| |kind|
                            (QREFELT $ 74))
                  . #6#)
            (EXIT
             (COND
              ((QEQCAR |blr| 1)
               (PROGN (LETT #1# (CONS 1 'NIL) . #6#) (GO #1#)))
              (#9#
               (SEQ (LETT |rblr| (QCDR |blr|) . #6#)
                    (LETT |bm| (QVELT |rblr| 0) . #6#)
                    (LETT |va| (QVELT |rblr| 1) . #6#)
                    (LETT |nsols| (QVSIZE |va|) . #6#)
                    (LETT |resv| (MAKEARR1 |nsols| (MAKE-ARRAY 0)) . #6#)
                    (SEQ (LETT |i| 1 . #6#) G190
                         (COND ((QSGREATERP |i| |nsols|) #7#))
                         (SEQ
                          (LETT |resvi| (MAKEARR1 |m| (|spadConstant| $ 92))
                                . #6#)
                          (SEQ (LETT |j| 1 . #6#) G190
                               (COND ((QSGREATERP |j| |m|) #7#))
                               (SEQ
                                (LETT |mm| (SPADCALL |ve| |j| (QREFELT $ 75))
                                      . #6#)
                                (LETT |bmij|
                                      (SPADCALL |bm| |i| |j| (QREFELT $ 83))
                                      . #6#)
                                (LETT |s| (|spadConstant| $ 92) . #6#)
                                (SEQ (LETT |l| 0 . #6#) G190
                                     (COND ((QSGREATERP |l| |mm|) #7#))
                                     (SEQ
                                      (EXIT
                                       (LETT |s|
                                             (SPADCALL |s|
                                                       (SPADCALL
                                                        (ELT32 |bmij| |l|) |l|
                                                        (QREFELT $ 95))
                                                       (QREFELT $ 96))
                                             . #6#)))
                                     (LETT |l| (QSADD1 |l|) . #6#) #8# G191
                                     (EXIT NIL))
                                (EXIT
                                 (SPADCALL |resvi| |j| |s| (QREFELT $ 97))))
                               (LETT |j| (QSADD1 |j|) . #6#) #8# G191
                               (EXIT NIL))
                          (EXIT (SPADCALL |resv| |i| |resvi| (QREFELT $ 101))))
                         (LETT |i| (QSADD1 |i|) . #6#) #8# G191 (EXIT NIL))
                    (LETT |mress|
                          (SPADCALL |m| |nsols| (|spadConstant| $ 92)
                                    (QREFELT $ 103))
                          . #6#)
                    (SEQ (LETT |i| 1 . #6#) G190
                         (COND ((QSGREATERP |i| |nsols|) #7#))
                         (SEQ
                          (EXIT
                           (SEQ (LETT |l| 1 . #6#) G190
                                (COND ((QSGREATERP |l| |m|) #7#))
                                (SEQ
                                 (EXIT
                                  (SPADCALL |mress| |l| |i|
                                            (SPADCALL
                                             (SPADCALL |resv| |i|
                                                       (QREFELT $ 104))
                                             |l| (QREFELT $ 16))
                                            (QREFELT $ 105))))
                                (LETT |l| (QSADD1 |l|) . #6#) #8# G191
                                (EXIT NIL))))
                         (LETT |i| (QSADD1 |i|) . #6#) #8# G191 (EXIT NIL))
                    (EXIT
                     (PROGN (LETT #1# (CONS 0 |mress|) . #6#) (GO #1#)))))))))
      #1# (EXIT #1#))))) 

(DEFUN |MODHP;HP_solve_A;LLSNniMMU;22|
       (|list| |degs| |kind| |sigma| |gen| |check| $)
  (CONS 1 'T)) 

(DEFUN |MODHP;HP_solve_PA;LL2SNniMMU;23|
       (|list| |degs| |kind| |qvar| |sigma| |gen| |check| $)
  (CONS 1 'T)) 

(DEFUN |ModularHermitePade| #1=()
  (PROG #1#
    (RETURN
     (PROG (#2=#:G2166)
       (RETURN
        (COND
         ((LETT #2# (HGET |$ConstructorCache| '|ModularHermitePade|)
                . #3=(|ModularHermitePade|))
          (|CDRwithIncrement| (CDAR #2#)))
         ('T
          (UNWIND-PROTECT
              (PROG1
                  (CDDAR
                   (HPUT |$ConstructorCache| '|ModularHermitePade|
                         (LIST (CONS NIL (CONS 1 (|ModularHermitePade;|))))))
                (LETT #2# T . #3#))
            (COND
             ((NOT #2#)
              (HREM |$ConstructorCache| '|ModularHermitePade|))))))))))) 

(DEFUN |ModularHermitePade;| ()
  (PROG (|dv$| $ |pv$|)
    (RETURN
     (PROGN
      (LETT |dv$| '(|ModularHermitePade|) . #1=(|ModularHermitePade|))
      (LETT $ (GETREFV 171) . #1#)
      (QSETREFV $ 0 |dv$|)
      (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #1#))
      (|haddProp| |$ConstructorCache| '|ModularHermitePade| NIL (CONS 1 $))
      (|stuffDomainSlots| $)
      $)))) 

(MAKEPROP '|ModularHermitePade| '|infovec|
          (LIST
           '#(NIL NIL NIL NIL NIL NIL (|NonNegativeInteger|)
              (|SparseUnivariatePolynomial| 11) (0 . |degree|) (|Boolean|)
              (5 . |zero?|) (|Integer|) (10 . |leadingCoefficient|)
              (15 . |positiveRemainder|) (21 . |reductum|) (|Vector| 7)
              (26 . |elt|) (|U32Vector|) (|Vector| 17) (32 . |setelt|)
              |MODHP;VSUPI_to_VPA;VIV;2| (|SparseUnivariatePolynomial| 24)
              (39 . |degree|) (44 . |zero?|) (|Polynomial| 11)
              (49 . |leadingCoefficient|) (|List| 73) (|List| 11)
              (|InnerModularHermitePade|) (54 . |modpeval|) (62 . |reductum|)
              (|Vector| 21) (67 . |elt|) |MODHP;VSUPPI_to_VPA;VLLIV;4|
              (|Fraction| 11) (73 . |numer|) (78 . |denom|) (|SingleInteger|)
              (83 . |invmod|) (|Union| 17 '"failed") (|List| 34)
              |MODHP;LFI_to_PA;L2IU;5| (|Fraction| 24) (89 . |numer|)
              (94 . |denom|) (|List| 42) |MODHP;LFPI_to_PA;LILLIU;6|
              (99 . |coerce|) (|SparseUnivariatePolynomial| 34)
              (|Mapping| 34 11) (|SparseUnivariatePolynomialFunctions2| 11 34)
              (104 . |map|) (110 . |elt|) (116 . |One|) (|Void|)
              (|U32VectorPolynomialOperations|) (120 . |truncated_mul_add|)
              (|Mapping| 18 17 11 11) |MODHP;check_sol1a;VUvM3IUv;10|
              (|List| 6) (129 . |#|) (134 . +) (|Mapping| 6 6 6)
              (140 . |reduce|) (|Vector| 11) (146 . |vector|) (151 . |Zero|)
              (|IntegerPrimesPackage| 11) (155 . |nextPrime|) (160 . |member?|)
              (166 . |coerce|)
              (|Record| (|:| |basis| 82) (|:| |defects| 64) (|:| |cinds| 64))
              (|Union| 71 '"no_solution") (|Symbol|) (171 . |do_modular_solve|)
              (181 . |elt|) (|VectorIntegerReconstructor|) (187 . |empty|)
              (|OutputForm|) (|PrintPackage|) (192 . |print|) (197 . |coerce|)
              (|TwoDimensionalArray| 17) (202 . |elt|) (209 . |chinese_update|)
              (|Record| (|:| |numers| 88) (|:| |denoms| 88))
              (|Union| 85 '"failed") (216 . |rational_reconstruction|)
              (|PrimitiveArray| 11) (221 . |entries|) (|List| $) (226 . |lcm|)
              (231 . |Zero|) (|Union| $ '"failed") (235 . |exquo|)
              (241 . |monomial|) (247 . +) (253 . |setelt|) (|List| 7)
              (260 . |entries|) (|Vector| 15) (265 . |setelt|) (|Matrix| 7)
              (272 . |new|) (279 . |elt|) (285 . |setelt|) (|Union| 102 9)
              (|Union| '"good" '"reject" '"no_solution") (|Mapping| 107 98)
              |MODHP;HP_solve_I;LLSNniMMU;11| (293 . |variables|)
              (298 . |setUnion|) (304 . |Zero|) (308 . |One|)
              (|SortedExponentVector|) (312 . |elt|) (318 . |monomial|)
              (324 . +) (330 . |Zero|) (334 . |coerce|) (339 . |One|)
              (343 . |monomial|) (350 . *) (356 . +) (362 . |coerce|)
              (|SparseUnivariatePolynomial| 42) (|Mapping| 42 24)
              (|SparseUnivariatePolynomialFunctions2| 24 42) (367 . |map|)
              (373 . |zero?|) (378 . |degree|) (383 . |leadingCoefficient|)
              (388 . |reductum|) (393 . |retract|) (398 . |monomial|) (404 . +)
              (410 . |ncols|) (|Matrix| 21) (415 . |new|) (422 . |elt|)
              (429 . |setelt|) (437 . |member?|) (443 . |sort|)
              |MODHP;get_variables;L2SL;19| (|PrimitiveArray| 42)
              (448 . |construct|)
              (|Record| (|:| |defects| 64) (|:| |cinds| 64) (|:| |rowlen| 11)
                        (|:| |offsetdata| 64) (|:| |expdata| 114)
                        (|:| |coeffdata| 88))
              (|Union| 146 '"no_solution") (453 . |do_poly_integer|)
              (465 . |One|) (469 . |One|) (473 . |setelt|) (|List| 21)
              (480 . |entries|) (|Vector| 31) (485 . |setelt|) (492 . |elt|)
              (498 . |coerce|) (|Union| 137 9) (|Mapping| 107 152)
              |MODHP;HP_solve_P;LL2SNniMMU;20| (503 . |construct|)
              |MODHP;HP_solve_M;LLSINniMU;21|
              (|Union|
               (|Matrix| (|SparseUnivariatePolynomial| (|AlgebraicNumber|))) 9)
              (|List| (|AlgebraicNumber|))
              (|Mapping| 107
                         (|List|
                          (|SparseUnivariatePolynomial| (|AlgebraicNumber|))))
              |MODHP;HP_solve_A;LLSNniMMU;22|
              (|Union|
               (|Matrix|
                (|SparseUnivariatePolynomial|
                 (|Polynomial| (|AlgebraicNumber|))))
               9)
              (|List| (|Fraction| (|Polynomial| (|AlgebraicNumber|))))
              (|Mapping| 107
                         (|List|
                          (|SparseUnivariatePolynomial|
                           (|Polynomial| (|AlgebraicNumber|)))))
              |MODHP;HP_solve_PA;LL2SNniMMU;23|)
           '#(|get_variables| 508 |check_sol1a| 515 |VSUPPI_to_VPA| 525
              |VSUPI_to_VPA| 533 |LFPI_to_PA| 539 |LFI_to_PA| 548 |HP_solve_PA|
              555 |HP_solve_P| 566 |HP_solve_M| 577 |HP_solve_I| 587
              |HP_solve_A| 597)
           'NIL
           (CONS (|makeByteWordVec2| 1 'NIL)
                 (CONS '#()
                       (CONS '#()
                             (|makeByteWordVec2| 170
                                                 '(1 7 6 0 8 1 7 9 0 10 1 7 11
                                                   0 12 2 11 0 0 0 13 1 7 0 0
                                                   14 2 15 7 0 11 16 3 18 17 0
                                                   11 17 19 1 21 6 0 22 1 21 9
                                                   0 23 1 21 24 0 25 4 28 11 24
                                                   26 27 11 29 1 21 0 0 30 2 31
                                                   21 0 11 32 1 34 11 0 35 1 34
                                                   11 0 36 2 37 0 0 0 38 1 42
                                                   24 0 43 1 42 24 0 44 1 34 0
                                                   11 47 2 50 48 49 7 51 2 18
                                                   17 0 11 52 0 48 0 53 5 55 54
                                                   17 17 17 11 11 56 1 59 6 0
                                                   60 2 6 0 0 0 61 2 59 6 62 0
                                                   63 1 64 0 27 65 0 48 0 66 1
                                                   67 11 11 68 2 27 9 11 0 69 1
                                                   37 0 11 70 6 28 72 18 64 6
                                                   17 11 73 74 2 64 11 0 11 75
                                                   1 76 0 11 77 1 79 54 78 80 1
                                                   11 78 0 81 3 82 17 0 11 11
                                                   83 3 76 54 17 11 0 84 1 76
                                                   86 0 87 1 88 27 0 89 1 11 0
                                                   90 91 0 7 0 92 2 11 93 0 0
                                                   94 2 7 0 11 6 95 2 7 0 0 0
                                                   96 3 15 7 0 11 7 97 1 15 98
                                                   0 99 3 100 15 0 11 15 101 3
                                                   102 0 6 6 7 103 2 100 15 0
                                                   11 104 4 102 7 0 11 11 7 105
                                                   1 24 26 0 110 2 26 0 0 0 111
                                                   0 21 0 112 0 21 0 113 2 114
                                                   11 0 11 115 2 21 0 24 6 116
                                                   2 21 0 0 0 117 0 24 0 118 1
                                                   24 0 11 119 0 24 0 120 3 24
                                                   0 0 73 6 121 2 24 0 0 0 122
                                                   2 24 0 0 0 123 1 42 0 24 124
                                                   2 127 125 126 21 128 1 125 9
                                                   0 129 1 125 6 0 130 1 125 42
                                                   0 131 1 125 0 0 132 1 42 34
                                                   0 133 2 48 0 34 6 134 2 48 0
                                                   0 0 135 1 102 6 0 136 3 137
                                                   0 6 6 21 138 3 102 7 0 11 11
                                                   139 4 137 21 0 11 11 21 140
                                                   2 26 9 73 0 141 1 26 0 0 142
                                                   1 144 0 45 145 8 28 147 26
                                                   144 64 6 17 73 73 57 148 0
                                                   125 0 149 0 42 0 150 3 31 21
                                                   0 11 21 151 1 31 152 0 153 3
                                                   154 31 0 11 31 155 2 154 31
                                                   0 11 156 1 31 78 0 157 1 17
                                                   0 27 161 3 0 26 45 73 73 143
                                                   6 0 17 18 17 57 11 11 11 58
                                                   4 0 18 31 26 27 11 33 2 0 18
                                                   15 11 20 5 0 39 45 11 26 27
                                                   11 46 3 0 39 40 11 11 41 7 0
                                                   167 168 59 73 73 6 57 169
                                                   170 7 0 158 45 59 73 73 6 57
                                                   159 160 6 0 106 27 59 73 11
                                                   6 57 162 6 0 106 40 59 73 6
                                                   57 108 109 6 0 163 164 59 73
                                                   6 57 165 166)))))
           '|lookupComplete|)) 

(MAKEPROP '|ModularHermitePade| 'NILADIC T) 
