
(/VERSIONCHECK 2) 

(DEFUN |BOUNDZRO;qzroot1| (|p| $)
  (|BOUNDZRO;negint|
      (SPADCALL
          (SPADCALL
              (SPADCALL (SPADCALL |p| (QREFELT $ 9)) (QREFELT $ 11))
              (SPADCALL |p| (QREFELT $ 11)) (QREFELT $ 12))
          (QREFELT $ 13))
      $)) 

(DEFUN |BOUNDZRO;zroot1| (|p| $)
  (PROG (|z| |r|)
    (RETURN
      (SEQ (LETT |z|
                 (SPADCALL
                     (SPADCALL
                         (SPADCALL (SPADCALL |p| (QREFELT $ 14))
                             (QREFELT $ 15))
                         (SPADCALL |p| (QREFELT $ 15)) (QREFELT $ 16))
                     (QREFELT $ 17))
                 . #0=(|BOUNDZRO;zroot1|))
           (LETT |r| (SPADCALL |z| (QREFELT $ 19)) . #0#)
           (EXIT (COND
                   ((QEQCAR |r| 0) (|BOUNDZRO;negint| (QCDR |r|) $))
                   ('T 0))))))) 

(DEFUN |BOUNDZRO;negint| (|r| $)
  (PROG (|u| #0=#:G1836)
    (RETURN
      (SEQ (EXIT (SEQ (SEQ (LETT |u| (SPADCALL |r| (QREFELT $ 21))
                                 . #1=(|BOUNDZRO;negint|))
                           (EXIT (COND
                                   ((QEQCAR |u| 0)
                                    (COND
                                      ((< (QCDR |u|) 0)
                                       (PROGN
                                         (LETT #0# (QCDR |u|) . #1#)
                                         (GO #0#))))))))
                      (EXIT 0)))
           #0# (EXIT #0#))))) 

(DEFUN |BOUNDZRO;bringDown| (|f| $)
  (PROG (|t| #0=#:G1841 |k| #1=#:G1842)
    (RETURN
      (SEQ (LETT |t| (SPADCALL |f| (QREFELT $ 23))
                 . #2=(|BOUNDZRO;bringDown|))
           (EXIT (SPADCALL
                     (SPADCALL |f| |t|
                         (PROGN
                           (LETT #0# NIL . #2#)
                           (SEQ (LETT |k| NIL . #2#)
                                (LETT #1# |t| . #2#) G190
                                (COND
                                  ((OR (ATOM #1#)
                                    (PROGN
                                      (LETT |k| (CAR #1#) . #2#)
                                      NIL))
                                   (GO G191)))
                                (SEQ (EXIT
                                      (LETT #0#
                                       (CONS
                                        (SPADCALL
                                         (SPADCALL (QREFELT $ 24))
                                         (QREFELT $ 25))
                                        #0#) . #2#)))
                                (LETT #1# (CDR #1#) . #2#) (GO G190)
                                G191 (EXIT (NREVERSE0 #0#))))
                         (QREFELT $ 27))
                     (QREFELT $ 28))))))) 

(DEFUN |BOUNDZRO;integerBound;UPI;5| (|p| $)
  (PROG (|q1| |q2|)
    (RETURN
      (SEQ (COND
             ((EQL (SPADCALL |p| (QREFELT $ 30)) 1)
              (|BOUNDZRO;zroot1| |p| $))
             ('T
              (SEQ (LETT |q1|
                         (SPADCALL
                             (CONS (|function| |BOUNDZRO;bringDown|) $)
                             |p| (QREFELT $ 33))
                         . #0=(|BOUNDZRO;integerBound;UPI;5|))
                   (LETT |q2|
                         (SPADCALL
                             (CONS (|function| |BOUNDZRO;bringDown|) $)
                             |p| (QREFELT $ 33)) . #0#)
                   (EXIT (|BOUNDZRO;qbound| |p|
                             (SPADCALL |q1| |q2| (QREFELT $ 34)) $))))))))) 

(DEFUN |BOUNDZRO;integerBound;UPI;6| (|p| $)
  (COND
    ((EQL (SPADCALL |p| (QREFELT $ 30)) 1) (|BOUNDZRO;zroot1| |p| $))
    ('T
     (|BOUNDZRO;qbound| |p|
         (SPADCALL (CONS #'|BOUNDZRO;integerBound;UPI;6!0| $) |p|
             (QREFELT $ 33))
         $)))) 

(DEFUN |BOUNDZRO;integerBound;UPI;6!0| (|#1| $)
  (SPADCALL |#1| (QREFELT $ 28))) 

(DEFUN |BOUNDZRO;qbound| (|p| |q| $)
  (PROG (|rec| #0=#:G1858 |r| |bound|)
    (RETURN
      (SEQ (LETT |bound| 0 . #1=(|BOUNDZRO;qbound|))
           (SEQ (LETT |rec| NIL . #1#)
                (LETT #0#
                      (SPADCALL (SPADCALL |q| (QREFELT $ 39))
                          (QREFELT $ 42)) . #1#)
                G190
                (COND
                  ((OR (ATOM #0#)
                       (PROGN (LETT |rec| (CAR #0#) . #1#) NIL))
                   (GO G191)))
                (SEQ (EXIT (COND
                             ((EQL (SPADCALL (QCAR |rec|)
                                    (QREFELT $ 43))
                                   1)
                              (SEQ (LETT |r|
                                    (|BOUNDZRO;qzroot1| (QCAR |rec|) $) . #1#)
                                   (EXIT
                                    (COND
                                      ((< |r| |bound|)
                                       (COND
                                         ((SPADCALL
                                           (SPADCALL |p|
                                            (SPADCALL
                                             (SPADCALL |r|
                                              (QREFELT $ 44))
                                             (QREFELT $ 25))
                                            (QREFELT $ 45))
                                           (QREFELT $ 47))
                                          (LETT |bound| |r| . #1#)))))))))))
                (LETT #0# (CDR #0#) . #1#) (GO G190) G191 (EXIT NIL))
           (EXIT |bound|))))) 

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

(DEFUN |BoundIntegerRoots;| (|#1| |#2|)
  (PROG (DV$1 DV$2 |dv$| $ |pv$|)
    (RETURN
      (PROGN
        (LETT DV$1 (|devaluate| |#1|) . #0=(|BoundIntegerRoots|))
        (LETT DV$2 (|devaluate| |#2|) . #0#)
        (LETT |dv$| (LIST '|BoundIntegerRoots| DV$1 DV$2) . #0#)
        (LETT $ (GETREFV 48) . #0#)
        (QSETREFV $ 0 |dv$|)
        (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #0#))
        (|haddProp| |$ConstructorCache| '|BoundIntegerRoots|
            (LIST DV$1 DV$2) (CONS 1 $))
        (|stuffDomainSlots| $)
        (QSETREFV $ 6 |#1|)
        (QSETREFV $ 7 |#2|)
        (COND
          ((|HasCategory| |#1| '(|ExpressionSpace|))
           (PROGN
             (QSETREFV $ 36
                 (CONS (|dispatchFunction|
                           |BOUNDZRO;integerBound;UPI;5|)
                       $))))
          ('T
           (QSETREFV $ 36
               (CONS (|dispatchFunction| |BOUNDZRO;integerBound;UPI;6|)
                     $))))
        $)))) 

(MAKEPROP '|BoundIntegerRoots| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|)
             (|SparseUnivariatePolynomial| 10) (0 . |reductum|)
             (|Fraction| 35) (5 . |leadingCoefficient|) (10 . /)
             (16 . -) (21 . |reductum|) (26 . |leadingCoefficient|)
             (31 . /) (37 . -) (|Union| 10 '"failed")
             (42 . |retractIfCan|) (|Union| 35 '"failed")
             (47 . |retractIfCan|) (|List| (|Kernel| $)) (52 . |tower|)
             (57 . |random|) (61 . |coerce|) (|List| $) (66 . |eval|)
             (73 . |retract|) (|NonNegativeInteger|) (78 . |degree|)
             (|Mapping| 10 6)
             (|UnivariatePolynomialCategoryFunctions2| 6 7 10 8)
             (83 . |map|) (89 . |gcd|) (|Integer|)
             (95 . |integerBound|) (|Factored| 8)
             (|RationalFactorize| 8) (100 . |factor|)
             (|Record| (|:| |factor| 8) (|:| |exponent| 35))
             (|List| 40) (105 . |factors|) (110 . |degree|)
             (115 . |coerce|) (120 . |elt|) (|Boolean|)
             (126 . |zero?|))
          '#(|integerBound| 131) 'NIL
          (CONS (|makeByteWordVec2| 1 'NIL)
                (CONS '#()
                      (CONS '#()
                            (|makeByteWordVec2| 47
                                '(1 8 0 0 9 1 8 10 0 11 2 10 0 0 0 12 1
                                  10 0 0 13 1 7 0 0 14 1 7 6 0 15 2 6 0
                                  0 0 16 1 6 0 0 17 1 6 18 0 19 1 10 20
                                  0 21 1 6 22 0 23 0 10 0 24 1 6 0 10
                                  25 3 6 0 0 22 26 27 1 6 10 0 28 1 7
                                  29 0 30 2 32 8 31 7 33 2 8 0 0 0 34 1
                                  0 35 7 36 1 38 37 8 39 1 37 41 0 42 1
                                  8 29 0 43 1 10 0 35 44 2 7 6 0 6 45 1
                                  6 46 0 47 1 0 35 7 36)))))
          '|lookupComplete|)) 
