
(/VERSIONCHECK 2) 

(DEFUN |DFINTTLS;variation| (|p| |a| $)
  (|DFINTTLS;var|
      (SPADCALL |p|
          (SPADCALL (SPADCALL (|spadConstant| $ 9) 1 (QREFELT $ 12))
              (SPADCALL |a| (QREFELT $ 13)) (QREFELT $ 14))
          (QREFELT $ 15))
      $)) 

(DEFUN |DFINTTLS;keeprec?| (|a| |rec| $)
  (COND
    ((SPADCALL (QCDR |rec|) |a| (QREFELT $ 18)) 'T)
    ('T (SPADCALL |a| (QCAR |rec|) (QREFELT $ 18))))) 

(DEFUN |DFINTTLS;checkHalfAx| (|p| |a| |d| |incl?| $)
  (|DFINTTLS;posRoot|
      (SPADCALL |p|
          (SPADCALL |d|
              (SPADCALL
                  (SPADCALL (|spadConstant| $ 9) 1 (QREFELT $ 12))
                  (SPADCALL |a| (QREFELT $ 13)) (QREFELT $ 14))
              (QREFELT $ 20))
          (QREFELT $ 15))
      |incl?| $)) 

(DEFUN |DFINTTLS;ignore?;SB;4| (|str| $)
  (COND
    ((EQUAL |str| "noPole") 'T)
    ('T (|error| "integrate: last argument must be 'noPole'")))) 

(DEFUN |DFINTTLS;computeInt;KF2OcBU;5| (|k| |f| |a| |b| |eval?| $)
  (PROG (|ib| |ia| #0=#:G1848)
    (RETURN
      (SEQ (COND
             ((SPADCALL |f| (SPADCALL "integral" (QREFELT $ 24))
                  (QREFELT $ 25))
              (CONS 1 "failed"))
             ('T
              (SEQ (EXIT (SEQ (COND
                                ((NULL |eval?|)
                                 (LETT |f| (|DFINTTLS;mkLogPos| |f| $)
                                       . #1=(|DFINTTLS;computeInt;KF2OcBU;5|))))
                              (SEQ (LETT |ib|
                                    (|DFINTTLS;findLimit| |f| |k| |b|
                                     "left" |eval?| $) . #1#)
                                   (EXIT
                                    (COND
                                      ((QEQCAR |ib| 1)
                                       (PROGN
                                         (LETT #0#
                                          (CONS 1 "failed") . #1#)
                                         (GO #0#)))
                                      ('T
                                       (SEQ
                                        (LETT |ia|
                                         (|DFINTTLS;findLimit| |f| |k|
                                          |a| "right" |eval?| $) . #1#)
                                        (EXIT
                                         (COND
                                           ((QEQCAR |ia| 1)
                                            (PROGN
                                              (LETT #0#
                                               (CONS 1 "failed") . #1#)
                                              (GO #0#))))))))))
                              (COND
                                ((SPADCALL (QCDR |ia|) (QREFELT $ 27))
                                 (COND
                                   ((SPADCALL (QCDR |ia|) (QCDR |ib|)
                                     (QREFELT $ 28))
                                    (EXIT (CONS 1 "failed"))))))
                              (EXIT (CONS 0
                                     (SPADCALL (QCDR |ib|) (QCDR |ia|)
                                      (QREFELT $ 29))))))
                   #0# (EXIT #0#)))))))) 

(DEFUN |DFINTTLS;findLimit| (|f| |k| |a| |dir| |eval?| $)
  (PROG (|r| |u|)
    (RETURN
      (SEQ (LETT |r| (SPADCALL |a| (QREFELT $ 34))
                 . #0=(|DFINTTLS;findLimit|))
           (EXIT (COND
                   ((QEQCAR |r| 0)
                    (COND
                      (|eval?| (CONS 0
                                     (SPADCALL
                                      (|DFINTTLS;mkLogPos|
                                       (SPADCALL |f| |k| (QCDR |r|)
                                        (QREFELT $ 36))
                                       $)
                                      (QREFELT $ 37))))
                      (#1='T
                       (SEQ (LETT |u|
                                  (SPADCALL |f|
                                      (SPADCALL
                                       (SPADCALL |k| (QREFELT $ 38))
                                       (QCDR |r|) (QREFELT $ 40))
                                      |dir| (QREFELT $ 42)) . #0#)
                            (EXIT (COND
                                    ((QEQCAR |u| 0)
                                     (CONS 0 (QCDR |u|)))
                                    (#1# (CONS 1 "failed"))))))))
                   (#1#
                    (SEQ (LETT |u|
                               (SPADCALL |f|
                                   (SPADCALL
                                    (SPADCALL
                                     (SPADCALL |k| (QREFELT $ 38))
                                     (QREFELT $ 37))
                                    |a| (QREFELT $ 44))
                                   (QREFELT $ 47)) . #0#)
                         (EXIT (COND
                                 ((QEQCAR |u| 0) (CONS 0 (QCDR |u|)))
                                 (#1# (CONS 1 "failed")))))))))))) 

(DEFUN |DFINTTLS;mkLogPos| (|f| $)
  (PROG (|k| #0=#:G1885 |v| |lk| |lv|)
    (RETURN
      (SEQ (LETT |lk| NIL . #1=(|DFINTTLS;mkLogPos|))
           (LETT |lv| NIL . #1#)
           (SEQ (LETT |k| NIL . #1#)
                (LETT #0# (SPADCALL |f| (QREFELT $ 49)) . #1#) G190
                (COND
                  ((OR (ATOM #0#)
                       (PROGN (LETT |k| (CAR #0#) . #1#) NIL))
                   (GO G191)))
                (SEQ (EXIT (COND
                             ((SPADCALL |k|
                                  (SPADCALL "log" (QREFELT $ 24))
                                  (QREFELT $ 50))
                              (SEQ (LETT |v|
                                    (|DFINTTLS;mkKerPos| |k| $) . #1#)
                                   (EXIT
                                    (COND
                                      ((QEQCAR |v| 0)
                                       (SEQ
                                        (LETT |lk|
                                         (CONS |k| |lk|) . #1#)
                                        (EXIT
                                         (LETT |lv|
                                          (CONS (QCDR |v|) |lv|) . #1#)))))))))))
                (LETT #0# (CDR #0#) . #1#) (GO G190) G191 (EXIT NIL))
           (EXIT (SPADCALL |f| |lk| |lv| (QREFELT $ 52))))))) 

(DEFUN |DFINTTLS;mkKerPos| (|k| $)
  (PROG (|f| |u|)
    (RETURN
      (SEQ (LETT |u|
                 (|DFINTTLS;negative|
                     (LETT |f|
                           (|SPADfirst| (SPADCALL |k| (QREFELT $ 54)))
                           . #0=(|DFINTTLS;mkKerPos|))
                     $) . #0#)
           (EXIT (COND
                   ((QEQCAR |u| 1)
                    (CONS 0
                          (SPADCALL
                              (SPADCALL (SPADCALL |f| 2 (QREFELT $ 56))
                                  (QREFELT $ 57))
                              (SPADCALL 2 (QREFELT $ 58))
                              (QREFELT $ 59))))
                   ((QCDR |u|)
                    (CONS 0
                          (SPADCALL (SPADCALL |f| (QREFELT $ 60))
                              (QREFELT $ 57))))
                   ('T (CONS 1 "positive")))))))) 

(DEFUN |DFINTTLS;negative| (|f| $)
  (PROG (|u|)
    (RETURN
      (SEQ (LETT |u| (SPADCALL |f| (QREFELT $ 63)) |DFINTTLS;negative|)
           (EXIT (COND
                   ((QEQCAR |u| 1) (CONS 1 "failed"))
                   ('T (CONS 0 (< (QCDR |u|) 0))))))))) 

(DEFUN |DFINTTLS;checkForZero;PS2OcBU;10| (|p| |x| |a| |b| |incl?| $)
  (SPADCALL
      (SPADCALL (CONS #'|DFINTTLS;checkForZero;PS2OcBU;10!0| $)
          (SPADCALL |p| |x| (QREFELT $ 67)) (QREFELT $ 71))
      |a| |b| |incl?| (QREFELT $ 73))) 

(DEFUN |DFINTTLS;checkForZero;PS2OcBU;10!0| (|#1| $)
  (SPADCALL |#1| (QREFELT $ 65))) 

(DEFUN |DFINTTLS;checkForZero;Sup2OcBU;11| (|q| |a| |b| |incl?| $)
  (PROG (|d| |i| #0=#:G1928 |u|)
    (RETURN
      (SEQ (COND
             ((SPADCALL |q| (QREFELT $ 75)) (CONS 0 'NIL))
             ('T
              (SEQ (EXIT (SEQ (SEQ (LETT |d| (|DFINTTLS;maprat| |q| $)
                                    . #1=(|DFINTTLS;checkForZero;Sup2OcBU;11|))
                                   (EXIT
                                    (COND
                                      ((QEQCAR |d| 0)
                                       (SEQ
                                        (LETT |i|
                                         (|DFINTTLS;intrat| |a| |b| $) . #1#)
                                        (EXIT
                                         (COND
                                           ((NULL (QEQCAR |i| 3))
                                            (PROGN
                                              (LETT #0#
                                               (COND
                                                 ((NULL
                                                   (|DFINTTLS;findRealZero|
                                                    (QCDR |d|) |i|
                                                    |incl?| $))
                                                  (CONS 0 'NIL))
                                                 ('T (CONS 0 'T))) . #1#)
                                              (GO #0#))))))))))
                              (LETT |u|
                                    (|DFINTTLS;checkBudan| |q| |a| |b|
                                     |incl?| $) . #1#)
                              (EXIT (COND
                                      ((QEQCAR |u| 1)
                                       (COND
                                         (|incl?|
                                          (|DFINTTLS;checkDeriv| |q|
                                           |a| |b| $))
                                         ('T (CONS 1 "failed"))))
                                      ('T (CONS 0 (QCDR |u|)))))))
                   #0# (EXIT #0#)))))))) 

(DEFUN |DFINTTLS;maprat| (|p| $)
  (PROG (|c| |r| #0=#:G1947 |ans|)
    (RETURN
      (SEQ (EXIT (SEQ (LETT |ans| (|spadConstant| $ 77)
                            . #1=(|DFINTTLS;maprat|))
                      (SEQ G190
                           (COND
                             ((NULL (COND
                                      ((SPADCALL |p|
                                        (|spadConstant| $ 80)
                                        (QREFELT $ 81))
                                       'NIL)
                                      ('T 'T)))
                              (GO G191)))
                           (SEQ (LETT |r|
                                      (SPADCALL
                                       (LETT |c|
                                        (SPADCALL |p| (QREFELT $ 82)) . #1#)
                                       (QREFELT $ 84)) . #1#)
                                (EXIT (COND
                                        ((QEQCAR |r| 1)
                                         (PROGN
                                           (LETT #0#
                                            (CONS 1 "failed") . #1#)
                                           (GO #0#)))
                                        ('T
                                         (SEQ
                                          (LETT |ans|
                                           (SPADCALL |ans|
                                            (SPADCALL (QCDR |r|)
                                             (SPADCALL |p|
                                              (QREFELT $ 85))
                                             (QREFELT $ 86))
                                            (QREFELT $ 87)) . #1#)
                                          (EXIT
                                           (LETT |p|
                                            (SPADCALL |p|
                                             (QREFELT $ 88)) . #1#)))))))
                           NIL (GO G190) G191 (EXIT NIL))
                      (EXIT (CONS 0
                                  (SPADCALL (ELT $ 89)
                                      (QCAR
                                       (SPADCALL |ans| (QREFELT $ 92)))
                                      (QREFELT $ 96))))))
           #0# (EXIT #0#))))) 

(DEFUN |DFINTTLS;intrat| (|a| |b| $)
  (PROG (|r| #0=#:G1965 |q| |n| #1=#:G1964 |t|)
    (RETURN
      (SEQ (EXIT (SEQ (SEQ (LETT |n| (SPADCALL |a| (QREFELT $ 98))
                                 . #2=(|DFINTTLS;intrat|))
                           (EXIT (COND
                                   ((NULL (EQL |n| 0))
                                    (PROGN
                                      (LETT #0#
                                       (SEQ
                                        (LETT |r|
                                         (SPADCALL |b| (QREFELT $ 34)) . #2#)
                                        (EXIT
                                         (COND
                                           ((QEQCAR |r| 1)
                                            (CONS 2 "all"))
                                           (#3='T
                                            (SEQ
                                             (LETT |q|
                                              (SPADCALL (QCDR |r|)
                                               (QREFELT $ 84)) . #2#)
                                             (EXIT
                                              (COND
                                                ((QEQCAR |q| 1)
                                                 (CONS 3 "failed"))
                                                (#3#
                                                 (CONS 1
                                                  (CONS (QCDR |q|) |n|)))))))))) . #2#)
                                      (GO #0#))))))
                      (LETT |q|
                            (SPADCALL (SPADCALL |a| (QREFELT $ 99))
                                (QREFELT $ 84)) . #2#)
                      (EXIT (COND
                              ((QEQCAR |q| 1) (CONS 3 "failed"))
                              (#3#
                               (SEQ (EXIT
                                     (SEQ
                                      (SEQ
                                       (LETT |n|
                                        (SPADCALL |b| (QREFELT $ 98)) . #2#)
                                       (EXIT
                                        (COND
                                          ((NULL (EQL |n| 0))
                                           (PROGN
                                             (LETT #1#
                                              (CONS 1
                                               (CONS (QCDR |q|) |n|)) . #2#)
                                             (GO #1#))))))
                                      (LETT |t|
                                       (SPADCALL
                                        (SPADCALL |b| (QREFELT $ 99))
                                        (QREFELT $ 84)) . #2#)
                                      (EXIT
                                       (COND
                                         ((QEQCAR |t| 1)
                                          (CONS 3 "failed"))
                                         (#3#
                                          (CONS 0
                                           (CONS (QCDR |q|) (QCDR |t|))))))))
                                    #1# (EXIT #1#)))))))
           #0# (EXIT #0#))))) 

(DEFUN |DFINTTLS;findRealZero| (|p| |i| |incl?| $)
  (PROG (|r| #0=#:G1996 #1=#:G1980 #2=#:G1978 #3=#:G1979 #4=#:G1997
             #5=#:G1983 #6=#:G1981 #7=#:G1982 |bounds| #8=#:G1998 |t|
             #9=#:G1999 |u| #10=#:G1989 |l| #11=#:G1970 |ep|)
    (RETURN
      (SEQ (COND
             ((QEQCAR |i| 0)
              (SEQ (LETT |l|
                         (SPADCALL |p|
                             (LETT |r| (CDR |i|)
                                   . #12=(|DFINTTLS;findRealZero|))
                             (QREFELT $ 103)) . #12#)
                   (EXIT (COND
                           (|incl?| |l|)
                           (#13='T
                            (SPADCALL
                                (CONS #'|DFINTTLS;findRealZero!0|
                                      (VECTOR $ |r|))
                                |l| (QREFELT $ 106)))))))
             ((QEQCAR |i| 2) (SPADCALL |p| (QREFELT $ 107)))
             ((QEQCAR |i| 1)
              (COND
                ((NULL (LETT |l| (SPADCALL |p| (QREFELT $ 107)) . #12#))
                 NIL)
                ('T
                 (SEQ (LETT |bounds|
                            (COND
                              ((< 0
                                  (QCDR (PROG2 (LETT #11# |i| . #12#)
                                         (QCDR #11#)
                                          (|check-union|
                                           (QEQCAR #11# 1)
                                           (|Record|
                                            (|:| |endpoint|
                                             (|Fraction| (|Integer|)))
                                            (|:| |dir| (|Integer|)))
                                           #11#))))
                               (CONS (QCAR
                                      (PROG2 (LETT #11# |i| . #12#)
                                       (QCDR #11#)
                                        (|check-union| (QEQCAR #11# 1)
                                         (|Record|
                                          (|:| |endpoint|
                                           (|Fraction| (|Integer|)))
                                          (|:| |dir| (|Integer|)))
                                         #11#)))
                                     (PROGN
                                       (LETT #3# NIL . #12#)
                                       (SEQ (LETT |t| NIL . #12#)
                                        (LETT #0# |l| . #12#) G190
                                        (COND
                                          ((OR (ATOM #0#)
                                            (PROGN
                                              (LETT |t|
                                               (CAR #0#) . #12#)
                                              NIL))
                                           #14=(GO G191)))
                                        (SEQ
                                         (EXIT
                                          (PROGN
                                            (LETT #1#
                                             (QCDR |t|) . #12#)
                                            (COND
                                              (#3#
                                               (LETT #2#
                                                (SPADCALL #2# #1#
                                                 (QREFELT $ 110)) . #12#))
                                              ('T
                                               (PROGN
                                                 (LETT #2# #1# . #12#)
                                                 (LETT #3# 'T . #12#)))))))
                                        (LETT #0# (CDR #0#) . #12#)
                                        #15=(GO G190) G191 (EXIT NIL))
                                       (COND
                                         (#3# #2#)
                                         ('T (|IdentityError| '|max|))))))
                              ('T
                               (CONS (PROGN
                                       (LETT #7# NIL . #12#)
                                       (SEQ (LETT |t| NIL . #12#)
                                        (LETT #4# |l| . #12#) G190
                                        (COND
                                          ((OR (ATOM #4#)
                                            (PROGN
                                              (LETT |t|
                                               (CAR #4#) . #12#)
                                              NIL))
                                           #14#))
                                        (SEQ
                                         (EXIT
                                          (PROGN
                                            (LETT #5#
                                             (QCAR |t|) . #12#)
                                            (COND
                                              (#7#
                                               (LETT #6#
                                                (SPADCALL #6# #5#
                                                 (QREFELT $ 111)) . #12#))
                                              ('T
                                               (PROGN
                                                 (LETT #6# #5# . #12#)
                                                 (LETT #7# 'T . #12#)))))))
                                        (LETT #4# (CDR #4#) . #12#)
                                        #15# G191 (EXIT NIL))
                                       (COND
                                         (#7# #6#)
                                         ('T (|IdentityError| '|min|))))
                                     (QCAR
                                      (PROG2 (LETT #11# |i| . #12#)
                                       (QCDR #11#)
                                        (|check-union| (QEQCAR #11# 1)
                                         (|Record|
                                          (|:| |endpoint|
                                           (|Fraction| (|Integer|)))
                                          (|:| |dir| (|Integer|)))
                                         #11#)))))) . #12#)
                      (LETT |l|
                            (PROGN
                              (LETT #8# NIL . #12#)
                              (SEQ (LETT |t| NIL . #12#)
                                   (LETT #9# |l| . #12#) G190
                                   (COND
                                     ((OR (ATOM #9#)
                                       (PROGN
                                         (LETT |t| (CAR #9#) . #12#)
                                         NIL))
                                      #14#))
                                   (SEQ
                                    (EXIT
                                     (COND
                                       ((QEQCAR
                                         (LETT |u|
                                          (SPADCALL |p| |t| |bounds|
                                           (QREFELT $ 113)) . #12#)
                                         0)
                                        (LETT #8#
                                         (CONS
                                          (PROG2 (LETT #10# |u| . #12#)
                                           (QCDR #10#)
                                            (|check-union|
                                             (QEQCAR #10# 0)
                                             (|Record|
                                              (|:| |left|
                                               (|Fraction| (|Integer|)))
                                              (|:| |right|
                                               (|Fraction| (|Integer|))))
                                             #10#))
                                          #8#) . #12#)))))
                                   (LETT #9# (CDR #9#) . #12#) #15#
                                   G191 (EXIT (NREVERSE0 #8#)))) . #12#)
                      (EXIT (COND
                              (|incl?| |l|)
                              ('T
                               (SEQ (LETT |ep|
                                     (QCAR
                                      (PROG2 (LETT #11# |i| . #12#)
                                       (QCDR #11#)
                                        (|check-union| (QEQCAR #11# 1)
                                         (|Record|
                                          (|:| |endpoint|
                                           (|Fraction| (|Integer|)))
                                          (|:| |dir| (|Integer|)))
                                         #11#))) . #12#)
                                    (EXIT
                                     (SPADCALL
                                      (CONS #'|DFINTTLS;findRealZero!1|
                                       (VECTOR $ |ep|))
                                      |l| (QREFELT $ 106)))))))))))
             (#13# (|error| "findRealZero: should not happpen"))))))) 

(DEFUN |DFINTTLS;findRealZero!1| (|#1| $$)
  (|DFINTTLS;keeprec?| (QREFELT $$ 1) |#1| (QREFELT $$ 0))) 

(DEFUN |DFINTTLS;findRealZero!0| (|#1| $$)
  (PROG (|r| $)
    (LETT |r| (QREFELT $$ 1) . #0=(|DFINTTLS;findRealZero|))
    (LETT $ (QREFELT $$ 0) . #0#)
    (RETURN
      (PROGN
        (COND
          ((|DFINTTLS;keeprec?| (QCAR |r|) |#1| $)
           (|DFINTTLS;keeprec?| (QCDR |r|) |#1| $))
          ('T (|spadConstant| $ 104))))))) 

(DEFUN |DFINTTLS;checkBudan| (|p| |a| |b| |incl?| $)
  (PROG (|r| |aa| |za?| |n| #0=#:G2004 |bb| |zb?| |va| |vb| #1=#:G2018
             |m| |v|)
    (RETURN
      (SEQ (EXIT (SEQ (LETT |r| (SPADCALL |b| (QREFELT $ 34))
                            . #2=(|DFINTTLS;checkBudan|))
                      (SEQ (LETT |n|
                                 (SPADCALL |a| (QREFELT $ 98)) . #2#)
                           (EXIT (COND
                                   ((NULL (EQL |n| 0))
                                    (PROGN
                                      (LETT #1#
                                       (COND
                                         ((QEQCAR |r| 1)
                                          (|DFINTTLS;realRoot| |p| $))
                                         (#3='T
                                          (|DFINTTLS;checkHalfAx| |p|
                                           (QCDR |r|) |n| |incl?| $))) . #2#)
                                      (GO #1#))))))
                      (SEQ (LETT |za?|
                                 (SPADCALL
                                     (SPADCALL |p|
                                      (LETT |aa|
                                       (SPADCALL |a| (QREFELT $ 99)) . #2#)
                                      (QREFELT $ 114))
                                     (QREFELT $ 115)) . #2#)
                           (EXIT (COND
                                   (|za?|
                                    (COND
                                      (|incl?|
                                       (PROGN
                                         (LETT #1# (CONS 0 'T) . #2#)
                                         (GO #1#))))))))
                      (SEQ (LETT |n|
                                 (SPADCALL |b| (QREFELT $ 98)) . #2#)
                           (EXIT (COND
                                   ((NULL (EQL |n| 0))
                                    (PROGN
                                      (LETT #1#
                                       (|DFINTTLS;checkHalfAx| |p| |aa|
                                        |n| |incl?| $) . #2#)
                                      (GO #1#))))))
                      (SEQ (LETT |zb?|
                                 (SPADCALL
                                     (SPADCALL |p|
                                      (LETT |bb|
                                       (PROG2 (LETT #0# |r| . #2#)
                                        (QCDR #0#)
                                         (|check-union| (QEQCAR #0# 0)
                                          (QREFELT $ 7) #0#)) . #2#)
                                      (QREFELT $ 114))
                                     (QREFELT $ 115)) . #2#)
                           (EXIT (COND
                                   (|zb?|
                                    (COND
                                      (|incl?|
                                       (PROGN
                                         (LETT #1# (CONS 0 'T) . #2#)
                                         (GO #1#))))))))
                      (SEQ (LETT |va|
                                 (|DFINTTLS;variation| |p| |aa| $) . #2#)
                           (EXIT (COND
                                   ((QEQCAR |va| 1)
                                    (PROGN
                                      (LETT #1#
                                       (CONS 1 "failed") . #2#)
                                      (GO #1#)))
                                   (#3#
                                    (SEQ
                                     (LETT |vb|
                                      (|DFINTTLS;variation| |p| |bb| $) . #2#)
                                     (EXIT
                                      (COND
                                        ((QEQCAR |vb| 1)
                                         (PROGN
                                           (LETT #1#
                                            (CONS 1 "failed") . #2#)
                                           (GO #1#))))))))))
                      (LETT |m| 0 . #2#)
                      (COND (|za?| (LETT |m| (+ |m| 1) . #2#)))
                      (COND (|zb?| (LETT |m| (+ |m| 1) . #2#)))
                      (EXIT (COND
                              ((ODDP (LETT |v|
                                      (- (QCDR |va|) (QCDR |vb|)) . #2#))
                               (COND
                                 ((OR |incl?|
                                      (SPADCALL |m| (QREFELT $ 116)))
                                  (CONS 0 'T))
                                 ((EQL |v| 1) (CONS 0 'NIL))
                                 ('T (CONS 1 "failed"))))
                              ((ZEROP |v|) (CONS 0 'NIL))
                              ((EQL |m| 1) (CONS 0 'T))
                              ('T (CONS 1 "failed"))))))
           #1# (EXIT #1#))))) 

(DEFUN |DFINTTLS;checkDeriv| (|p| |a| |b| $)
  (PROG (|r| |s| |u|)
    (RETURN
      (SEQ (LETT |r| (SPADCALL |p| (QREFELT $ 117))
                 . #0=(|DFINTTLS;checkDeriv|))
           (EXIT (COND
                   ((QEQCAR |r| 0)
                    (CONS 0 (SPADCALL (QCDR |r|) (QREFELT $ 115))))
                   (#1='T
                    (SEQ (LETT |s|
                               (|DFINTTLS;sameSign| |p| |a| |b| $) . #0#)
                         (EXIT (COND
                                 ((QEQCAR |s| 1) (CONS 1 "failed"))
                                 ((QCDR |s|)
                                  (SEQ (LETT |u|
                                        (|DFINTTLS;checkDeriv|
                                         (SPADCALL |p| (QREFELT $ 118))
                                         |a| |b| $) . #0#)
                                       (EXIT
                                        (COND
                                          ((OR (QEQCAR |u| 1)
                                            (QCDR |u|))
                                           (CONS 1 "failed"))
                                          ('T (CONS 0 'NIL))))))
                                 (#1# (CONS 0 'T)))))))))))) 

(DEFUN |DFINTTLS;realRoot| (|p| $)
  (PROG (|b|)
    (RETURN
      (SEQ (LETT |b| (|DFINTTLS;posRoot| |p| 'T $) |DFINTTLS;realRoot|)
           (EXIT (COND
                   ((QEQCAR |b| 1) (CONS 1 "failed"))
                   ((QCDR |b|) (CONS 0 'T))
                   ('T
                    (|DFINTTLS;posRoot|
                        (SPADCALL |p|
                            (SPADCALL |p|
                                (SPADCALL (|spadConstant| $ 9) 1
                                    (QREFELT $ 12))
                                (QREFELT $ 14))
                            (QREFELT $ 15))
                        'T $)))))))) 

(DEFUN |DFINTTLS;sameSign| (|p| |a| |b| $)
  (PROG (|ea| |eb| |s|)
    (RETURN
      (SEQ (LETT |ea| (|DFINTTLS;infeval| |p| |a| $)
                 . #0=(|DFINTTLS;sameSign|))
           (EXIT (COND
                   ((QEQCAR |ea| 1) (CONS 1 "failed"))
                   (#1='T
                    (SEQ (LETT |eb|
                               (|DFINTTLS;infeval| |p| |b| $) . #0#)
                         (EXIT (COND
                                 ((QEQCAR |eb| 1) (CONS 1 "failed"))
                                 (#1#
                                  (SEQ (LETT |s|
                                        (SPADCALL
                                         (SPADCALL (QCDR |ea|)
                                          (QCDR |eb|) (QREFELT $ 119))
                                         (QREFELT $ 63)) . #0#)
                                       (EXIT
                                        (COND
                                          ((QEQCAR |s| 1)
                                           (CONS 1 "failed"))
                                          (#1#
                                           (CONS 0 (< 0 (QCDR |s|)))))))))))))))))) 

(DEFUN |DFINTTLS;posRoot| (|p| |incl0?| $)
  (PROG (|z0?| #0=#:G2058 |v|)
    (RETURN
      (SEQ (EXIT (SEQ (SEQ (LETT |z0?|
                                 (SPADCALL
                                     (SPADCALL |p| 0 (QREFELT $ 121))
                                     (QREFELT $ 115))
                                 . #1=(|DFINTTLS;posRoot|))
                           (EXIT (COND
                                   (|z0?|
                                    (COND
                                      (|incl0?|
                                       (PROGN
                                         (LETT #0# (CONS 0 'T) . #1#)
                                         (GO #0#))))))))
                      (LETT |v| (|DFINTTLS;var| |p| $) . #1#)
                      (EXIT (COND
                              ((QEQCAR |v| 1) (CONS 1 "failed"))
                              ((ODDP (QCDR |v|))
                               (COND
                                 ((OR |incl0?| (NULL |z0?|))
                                  (CONS 0 'T))
                                 ((EQL (QCDR |v|) 1) (CONS 0 'NIL))
                                 ('T (CONS 1 "failed"))))
                              ((ZEROP (QCDR |v|)) (CONS 0 'NIL))
                              (|z0?| (CONS 0 'T))
                              ('T (CONS 1 "failed"))))))
           #0# (EXIT #0#))))) 

(DEFUN |DFINTTLS;infeval| (|p| |a| $)
  (PROG (|n| |u|)
    (RETURN
      (SEQ (COND
             ((QSZEROP (LETT |n| (SPADCALL |a| (QREFELT $ 98))
                             . #0=(|DFINTTLS;infeval|)))
              (CONS 0
                    (SPADCALL |p| (SPADCALL |a| (QREFELT $ 99))
                        (QREFELT $ 114))))
             ('T
              (SEQ (LETT |u|
                         (SPADCALL |p| |n| (ELT $ 63) (QREFELT $ 124)) . #0#)
                   (EXIT (COND
                           ((QEQCAR |u| 1) (CONS 1 "failed"))
                           ('T
                            (CONS 0
                                  (SPADCALL (QCDR |u|) (QREFELT $ 58))))))))))))) 

(DEFUN |DFINTTLS;var| (|q| $)
  (PROG (|next| #0=#:G2082 |i| |lastCoef|)
    (RETURN
      (SEQ (EXIT (SEQ (LETT |i| 0 . #1=(|DFINTTLS;var|))
                      (LETT |lastCoef|
                            (|DFINTTLS;negative|
                                (SPADCALL |q| (QREFELT $ 82)) $) . #1#)
                      (EXIT (COND
                              ((QEQCAR |lastCoef| 1) (CONS 1 "failed"))
                              ('T
                               (SEQ (SEQ G190
                                     (COND
                                       ((NULL
                                         (SEQ
                                          (LETT |q|
                                           (SPADCALL |q|
                                            (QREFELT $ 88)) . #1#)
                                          (EXIT
                                           (COND
                                             ((SPADCALL |q|
                                               (|spadConstant| $ 80)
                                               (QREFELT $ 81))
                                              'NIL)
                                             ('T 'T)))))
                                        (GO G191)))
                                     (SEQ
                                      (LETT |next|
                                       (|DFINTTLS;negative|
                                        (SPADCALL |q| (QREFELT $ 82))
                                        $) . #1#)
                                      (EXIT
                                       (COND
                                         ((QEQCAR |next| 1)
                                          (PROGN
                                            (LETT #0#
                                             (CONS 1 "failed") . #1#)
                                            (GO #0#)))
                                         ('T
                                          (SEQ
                                           (COND
                                             ((QCDR |lastCoef|)
                                              (COND
                                                ((NULL (QCDR |next|))
                                                 (COND
                                                   ((QCDR |lastCoef|)
                                                    (LETT |i|
                                                     (+ |i| 1) . #1#))))))
                                             ((OR (QCDR |next|)
                                               (QCDR |lastCoef|))
                                              (LETT |i|
                                               (+ |i| 1) . #1#)))
                                           (EXIT
                                            (LETT |lastCoef|
                                             |next| . #1#)))))))
                                     NIL (GO G190) G191 (EXIT NIL))
                                    (EXIT (CONS 0 |i|))))))))
           #0# (EXIT #0#))))) 

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

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

(MAKEPROP '|DefiniteIntegrationTools| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|)
             (0 . |One|) (4 . |One|) (|NonNegativeInteger|)
             (|SparseUnivariatePolynomial| 7) (8 . |monomial|)
             (14 . |coerce|) (19 . -) (25 . |elt|) (|Boolean|)
             (|Fraction| 19) (31 . <) (|Integer|) (37 . *) (|String|)
             |DFINTTLS;ignore?;SB;4| (|Symbol|) (43 . |coerce|)
             (48 . |is?|) (|OrderedCompletion| 7) (54 . |infinite?|)
             (59 . =) (65 . -) (|Union| 26 '"failed") (|Kernel| 7)
             |DFINTTLS;computeInt;KF2OcBU;5| (|Union| 7 '"failed")
             (71 . |retractIfCan|) (|Kernel| $) (76 . |eval|)
             (83 . |coerce|) (88 . |coerce|) (|Equation| 7)
             (93 . |equation|) (|PowerSeriesLimitPackage| 6 7)
             (99 . |limit|) (|Equation| 26) (106 . |equation|)
             (|Record| (|:| |leftHandLimit| 30)
                 (|:| |rightHandLimit| 30))
             (|Union| 26 45 '"failed") (112 . |limit|) (|List| 35)
             (118 . |kernels|) (123 . |is?|) (|List| $) (129 . |eval|)
             (|List| 7) (136 . |argument|) (|PositiveInteger|)
             (141 . **) (147 . |log|) (152 . |coerce|) (157 . /)
             (163 . -) (|Union| 19 '"failed")
             (|ElementaryFunctionSign| 6 7) (168 . |sign|)
             (|Polynomial| 6) (173 . |coerce|)
             (|SparseUnivariatePolynomial| $) (178 . |univariate|)
             (|Mapping| 7 64) (|SparseUnivariatePolynomial| 64)
             (|SparseUnivariatePolynomialFunctions2| 64 7)
             (184 . |map|) (|Union| 16 '"failed")
             |DFINTTLS;checkForZero;Sup2OcBU;11|
             |DFINTTLS;checkForZero;PS2OcBU;10| (190 . |ground?|)
             (|SparseUnivariatePolynomial| 17) (195 . |Zero|)
             (199 . |Zero|) (203 . |Zero|) (207 . |Zero|) (211 . =)
             (217 . |leadingCoefficient|) (|Union| 17 '"failed")
             (222 . |retractIfCan|) (227 . |degree|) (232 . |monomial|)
             (238 . +) (244 . |reductum|) (249 . |numer|)
             (|Record| (|:| |num| 76) (|:| |den| 19))
             (|UnivariatePolynomialCommonDenominator| 19 17 76)
             (254 . |splitDenominator|)
             (|SparseUnivariatePolynomial| 19) (|Mapping| 19 17)
             (|SparseUnivariatePolynomialFunctions2| 17 19)
             (259 . |map|) (|SingleInteger|) (265 . |whatInfinity|)
             (270 . |retract|)
             (|Record| (|:| |left| 17) (|:| |right| 17)) (|List| 100)
             (|RealZeroPackage| 93) (275 . |realZeros|) (281 . |false|)
             (|Mapping| 16 100) (285 . |select!|) (291 . |realZeros|)
             (296 . |Zero|) (300 . |Zero|) (304 . |max|) (310 . |min|)
             (|Union| 100 '"failed") (316 . |refine|) (323 . |elt|)
             (329 . |zero?|) (334 . |even?|) (339 . |retractIfCan|)
             (344 . |differentiate|) (349 . *) (355 . |Zero|)
             (359 . |coefficient|) (|Mapping| 61 7)
             (|InnerPolySign| 7 11) (365 . |signAround|))
          '#(|ignore?| 372 |computeInt| 377 |checkForZero| 386) 'NIL
          (CONS (|makeByteWordVec2| 1 'NIL)
                (CONS '#()
                      (CONS '#()
                            (|makeByteWordVec2| 124
                                '(0 6 0 8 0 7 0 9 2 11 0 7 10 12 1 11 0
                                  7 13 2 11 0 0 0 14 2 11 0 0 0 15 2 17
                                  16 0 0 18 2 11 0 19 0 20 1 23 0 21 24
                                  2 7 16 0 23 25 1 26 16 0 27 2 26 16 0
                                  0 28 2 26 0 0 0 29 1 26 33 0 34 3 7 0
                                  0 35 0 36 1 26 0 7 37 1 7 0 35 38 2
                                  39 0 7 7 40 3 41 30 7 39 21 42 2 43 0
                                  26 26 44 2 41 46 7 43 47 1 7 48 0 49
                                  2 31 16 0 23 50 3 7 0 0 48 51 52 1 31
                                  53 0 54 2 7 0 0 55 56 1 7 0 0 57 1 7
                                  0 19 58 2 7 0 0 0 59 1 7 0 0 60 1 62
                                  61 7 63 1 7 0 64 65 2 64 66 0 23 67 2
                                  70 11 68 69 71 1 11 16 0 75 0 76 0 77
                                  0 6 0 78 0 7 0 79 0 11 0 80 2 11 16 0
                                  0 81 1 11 7 0 82 1 7 83 0 84 1 11 10
                                  0 85 2 76 0 17 10 86 2 76 0 0 0 87 1
                                  11 0 0 88 1 17 19 0 89 1 91 90 76 92
                                  2 95 93 94 76 96 1 26 97 0 98 1 26 7
                                  0 99 2 102 101 93 100 103 0 16 0 104
                                  2 101 0 105 0 106 1 102 101 93 107 0
                                  93 0 108 0 17 0 109 2 17 0 0 0 110 2
                                  17 0 0 0 111 3 102 112 93 100 100 113
                                  2 11 7 0 7 114 1 7 16 0 115 1 19 16 0
                                  116 1 11 33 0 117 1 11 0 0 118 2 7 0
                                  0 0 119 0 26 0 120 2 11 7 0 10 121 3
                                  123 61 11 19 122 124 1 0 16 21 22 5 0
                                  30 31 7 26 26 16 32 4 0 72 11 26 26
                                  16 73 5 0 72 64 23 26 26 16 74)))))
          '|lookupComplete|)) 
