
(/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 (|r| |z|)
    (RETURN
     (SEQ
      (LETT |z|
            (SPADCALL
             (SPADCALL (SPADCALL (SPADCALL |p| (QREFELT $ 14)) (QREFELT $ 15))
                       (SPADCALL |p| (QREFELT $ 15)) (QREFELT $ 16))
             (QREFELT $ 17))
            . #1=(|BOUNDZRO;zroot1|))
      (LETT |r| (SPADCALL |z| (QREFELT $ 19)) . #1#)
      (EXIT (COND ((QEQCAR |r| 0) (|BOUNDZRO;negint| (QCDR |r|) $)) ('T 0))))))) 

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

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

(DEFUN |BOUNDZRO;integerBound;UPI;5| (|p| $)
  (PROG (|q2| |q1|)
    (RETURN
     (SEQ
      (COND ((EQL (SPADCALL |p| (QREFELT $ 30)) 1) (|BOUNDZRO;zroot1| |p| $))
            ('T
             (SEQ
              (LETT |q1|
                    (SPADCALL (CONS (|function| |BOUNDZRO;bringDown|) $) |p|
                              (QREFELT $ 33))
                    . #1=(|BOUNDZRO;integerBound;UPI;5|))
              (LETT |q2|
                    (SPADCALL (CONS (|function| |BOUNDZRO;bringDown|) $) |p|
                              (QREFELT $ 33))
                    . #1#)
              (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 (ELT $ 28) |p| (QREFELT $ 33)) $)))) 

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

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

(DEFUN |BoundIntegerRoots;| (|#1| |#2|)
  (PROG (|pv$| $ |dv$| DV$2 DV$1)
    (RETURN
     (PROGN
      (LETT DV$1 (|devaluate| |#1|) . #1=(|BoundIntegerRoots|))
      (LETT DV$2 (|devaluate| |#2|) . #1#)
      (LETT |dv$| (LIST '|BoundIntegerRoots| DV$1 DV$2) . #1#)
      (LETT $ (GETREFV 48) . #1#)
      (QSETREFV $ 0 |dv$|)
      (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #1#))
      (|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|)) 
