
(/VERSIONCHECK 2) 

(DEFUN |TRMANIP;expandTrigProducts;2F;1| (|e| $)
  (SPADCALL (LIST (QREFELT $ 23) (QREFELT $ 24) (QREFELT $ 25)) |e| 10
      (QREFELT $ 29))) 

(DEFUN |TRMANIP;logArgs| (|l| $)
  (PROG (|term| #0=#:G1861 |prod| |arg| |sum|)
    (RETURN
      (SEQ (LETT |sum| (|spadConstant| $ 31) . #1=(|TRMANIP;logArgs|))
           (LETT |arg| (|spadConstant| $ 32) . #1#)
           (SEQ (LETT |term| NIL . #1#) (LETT #0# |l| . #1#) G190
                (COND
                  ((OR (ATOM #0#)
                       (PROGN (LETT |term| (CAR #0#) . #1#) NIL))
                   (GO G191)))
                (SEQ (EXIT (COND
                             ((SPADCALL |term|
                                  (SPADCALL "log" (QREFELT $ 34))
                                  (QREFELT $ 36))
                              (LETT |arg|
                                    (SPADCALL |arg|
                                     (SPADCALL
                                      (|SPADfirst|
                                       (SPADCALL
                                        (|SPADfirst|
                                         (SPADCALL |term|
                                          (QREFELT $ 38)))
                                        (QREFELT $ 41)))
                                      (QREFELT $ 42))
                                     (QREFELT $ 15)) . #1#))
                             ('T
                              (SEQ (LETT |prod|
                                    (SPADCALL |term| (QREFELT $ 45)) . #1#)
                                   (COND
                                     ((QEQCAR |prod| 0)
                                      (COND
                                        ((SPADCALL (QCDR (QCDR |prod|))
                                          (SPADCALL "log"
                                           (QREFELT $ 34))
                                          (QREFELT $ 46))
                                         (EXIT
                                          (LETT |arg|
                                           (SPADCALL |arg|
                                            (SPADCALL
                                             (SPADCALL
                                              (|SPADfirst|
                                               (SPADCALL
                                                (QCDR (QCDR |prod|))
                                                (QREFELT $ 41)))
                                              (QCAR (QCDR |prod|))
                                              (QREFELT $ 47))
                                             (QREFELT $ 42))
                                            (QREFELT $ 15)) . #1#))))))
                                   (EXIT
                                    (LETT |sum|
                                     (SPADCALL |sum| |term|
                                      (QREFELT $ 16)) . #1#)))))))
                (LETT #0# (CDR #0#) . #1#) (GO G190) G191 (EXIT NIL))
           (EXIT (SPADCALL |sum| (SPADCALL |arg| (QREFELT $ 48))
                     (QREFELT $ 16))))))) 

(DEFUN |TRMANIP;simplifyLog;2F;3| (|e| $)
  (SPADCALL (|TRMANIP;simplifyLog1| (SPADCALL |e| (QREFELT $ 49)) $)
      (|TRMANIP;simplifyLog1| (SPADCALL |e| (QREFELT $ 50)) $)
      (QREFELT $ 20))) 

(DEFUN |TRMANIP;simplifyLog1| (|e| $)
  (PROG (|prod| |termList| |expt| |kers| #0=#:G1911 |u| #1=#:G1912
                #2=#:G1913 #3=#:G1914 |term| #4=#:G1915 |exprs|
                |nterms| |i| |args| #5=#:G1815 #6=#:G1916 #7=#:G1898
                #8=#:G1896 #9=#:G1897 |foundLog| |terms| #10=#:G1816
                #11=#:G1917 #12=#:G1906 #13=#:G1904 #14=#:G1905)
    (RETURN
      (SEQ (COND
             ((SPADCALL |e| (SPADCALL "log" (QREFELT $ 34))
                  (QREFELT $ 51))
              |e|)
             ('T
              (SEQ (LETT |prod| (SPADCALL |e| (QREFELT $ 45))
                         . #15=(|TRMANIP;simplifyLog1|))
                   (COND
                     ((QEQCAR |prod| 0)
                      (COND
                        ((SPADCALL (QCDR (QCDR |prod|))
                             (SPADCALL "log" (QREFELT $ 34))
                             (QREFELT $ 46))
                         (EXIT (SPADCALL
                                   (SPADCALL
                                    (SPADCALL
                                     (|SPADfirst|
                                      (SPADCALL (QCDR (QCDR |prod|))
                                       (QREFELT $ 41)))
                                     (QCAR (QCDR |prod|))
                                     (QREFELT $ 47))
                                    (QREFELT $ 42))
                                   (QREFELT $ 48)))))))
                   (LETT |termList|
                         (SPADCALL |e| (QREFELT $ 53)) . #15#)
                   (EXIT (COND
                           ((QEQCAR |termList| 1)
                            (SEQ (LETT |terms|
                                       (SPADCALL |e| (QREFELT $ 54)) . #15#)
                                 (EXIT (COND
                                         ((QEQCAR |terms| 1)
                                          (SEQ
                                           (LETT |expt|
                                            (SPADCALL |e|
                                             (QREFELT $ 57)) . #15#)
                                           (COND
                                             ((QEQCAR |expt| 0)
                                              (COND
                                                ((NULL
                                                  (EQL
                                                   (QCDR (QCDR |expt|))
                                                   1))
                                                 (EXIT
                                                  (SPADCALL
                                                   (SPADCALL
                                                    (QCAR
                                                     (QCDR |expt|))
                                                    (QREFELT $ 42))
                                                   (QCDR (QCDR |expt|))
                                                   (QREFELT $ 47)))))))
                                           (LETT |kers|
                                            (SPADCALL |e|
                                             (QREFELT $ 38)) . #15#)
                                           (COND
                                             ((NULL
                                               (EQL (LENGTH |kers|) 1))
                                              (EXIT |e|)))
                                           (EXIT
                                            (SPADCALL
                                             (SPADCALL
                                              (|SPADfirst| |kers|)
                                              (QREFELT $ 59))
                                             (PROGN
                                               (LETT #0# NIL . #15#)
                                               (SEQ
                                                (LETT |u| NIL . #15#)
                                                (LETT #1#
                                                 (SPADCALL
                                                  (|SPADfirst| |kers|)
                                                  (QREFELT $ 41)) . #15#)
                                                G190
                                                (COND
                                                  ((OR (ATOM #1#)
                                                    (PROGN
                                                      (LETT |u|
                                                       (CAR #1#) . #15#)
                                                      NIL))
                                                   #16=(GO G191)))
                                                (SEQ
                                                 (EXIT
                                                  (LETT #0#
                                                   (CONS
                                                    (SPADCALL |u|
                                                     (QREFELT $ 42))
                                                    #0#) . #15#)))
                                                (LETT #1#
                                                 (CDR #1#) . #15#)
                                                #17=(GO G190) G191
                                                (EXIT (NREVERSE0 #0#))))
                                             (QREFELT $ 61)))))
                                         ('T
                                          (|TRMANIP;logArgs|
                                           (QCDR |terms|) $))))))
                           ('T
                            (SEQ (LETT |terms|
                                       (PROGN
                                         (LETT #2# NIL . #15#)
                                         (SEQ (LETT |term| NIL . #15#)
                                          (LETT #3#
                                           (QCDR |termList|) . #15#)
                                          G190
                                          (COND
                                            ((OR (ATOM #3#)
                                              (PROGN
                                                (LETT |term|
                                                 (CAR #3#) . #15#)
                                                NIL))
                                             #16#))
                                          (SEQ
                                           (EXIT
                                            (LETT #2#
                                             (CONS
                                              (SPADCALL |term|
                                               (QREFELT $ 42))
                                              #2#) . #15#)))
                                          (LETT #3# (CDR #3#) . #15#)
                                          #17# G191
                                          (EXIT (NREVERSE0 #2#)))) . #15#)
                                 (LETT |exprs| NIL . #15#)
                                 (LETT |nterms| NIL . #15#)
                                 (SEQ (LETT |term| NIL . #15#)
                                      (LETT #4# |terms| . #15#) G190
                                      (COND
                                        ((OR (ATOM #4#)
                                          (PROGN
                                            (LETT |term|
                                             (CAR #4#) . #15#)
                                            NIL))
                                         #16#))
                                      (SEQ
                                       (EXIT
                                        (COND
                                          ((QEQCAR
                                            (SPADCALL |term|
                                             (QREFELT $ 63))
                                            0)
                                           (LETT |exprs|
                                            (CONS |term| |exprs|) . #15#))
                                          ('T
                                           (LETT |nterms|
                                            (CONS |term| |nterms|) . #15#)))))
                                      (LETT #4# (CDR #4#) . #15#) #17#
                                      G191 (EXIT NIL))
                                 (LETT |terms| |nterms| . #15#)
                                 (COND
                                   ((NULL (NULL |exprs|))
                                    (SEQ (LETT |foundLog| 'NIL . #15#)
                                     (LETT |i| 0 . #15#)
                                     (SEQ G190
                                      (COND
                                        ((NULL
                                          (COND
                                            (|foundLog| 'NIL)
                                            ('T
                                             (< |i| (LENGTH |terms|)))))
                                         #16#))
                                      (SEQ (LETT |i| (+ |i| 1) . #15#)
                                       (EXIT
                                        (COND
                                          ((SPADCALL
                                            (SPADCALL |terms| |i|
                                             (QREFELT $ 65))
                                            (SPADCALL "log"
                                             (QREFELT $ 34))
                                            (QREFELT $ 36))
                                           (SEQ
                                            (LETT |args|
                                             (SPADCALL
                                              (SPADCALL
                                               (SPADCALL |terms| |i|
                                                (QREFELT $ 65))
                                               (QREFELT $ 67))
                                              (QREFELT $ 41)) . #15#)
                                            (SPADCALL |terms| |i|
                                             (SPADCALL
                                              (|TRMANIP;simplifyLog1|
                                               (SPADCALL
                                                (|SPADfirst| |args|)
                                                (PROGN
                                                  (LETT #9# NIL . #15#)
                                                  (SEQ
                                                   (LETT #5#
                                                    NIL . #15#)
                                                   (LETT #6#
                                                    |exprs| . #15#)
                                                   G190
                                                   (COND
                                                     ((OR (ATOM #6#)
                                                       (PROGN
                                                         (LETT #5#
                                                          (CAR #6#) . #15#)
                                                         NIL))
                                                      #16#))
                                                   (SEQ
                                                    (EXIT
                                                     (PROGN
                                                       (LETT #7#
                                                        #5# . #15#)
                                                       (COND
                                                         (#9#
                                                          (LETT #8#
                                                           (SPADCALL
                                                            #8# #7#
                                                            (QREFELT $
                                                             15)) . #15#))
                                                         ('T
                                                          (PROGN
                                                            (LETT #8#
                                                             #7# . #15#)
                                                            (LETT #9#
                                                             'T . #15#)))))))
                                                   (LETT #6#
                                                    (CDR #6#) . #15#)
                                                   #17# G191
                                                   (EXIT NIL))
                                                  (COND
                                                    (#9# #8#)
                                                    ('T
                                                     (|spadConstant| $
                                                      32))))
                                                (QREFELT $ 68))
                                               $)
                                              (QREFELT $ 48))
                                             (QREFELT $ 69))
                                            (EXIT
                                             (LETT |foundLog|
                                              'T . #15#)))))))
                                      NIL #17# G191 (EXIT NIL))
                                     (EXIT
                                      (COND
                                        ((NULL |foundLog|)
                                         (LETT |terms|
                                          (APPEND |exprs| |terms|) . #15#)))))))
                                 (EXIT (PROGN
                                         (LETT #14# NIL . #15#)
                                         (SEQ (LETT #10# NIL . #15#)
                                          (LETT #11# |terms| . #15#)
                                          G190
                                          (COND
                                            ((OR (ATOM #11#)
                                              (PROGN
                                                (LETT #10#
                                                 (CAR #11#) . #15#)
                                                NIL))
                                             #16#))
                                          (SEQ
                                           (EXIT
                                            (PROGN
                                              (LETT #12# #10# . #15#)
                                              (COND
                                                (#14#
                                                 (LETT #13#
                                                  (SPADCALL #13# #12#
                                                   (QREFELT $ 15)) . #15#))
                                                ('T
                                                 (PROGN
                                                   (LETT #13#
                                                    #12# . #15#)
                                                   (LETT #14#
                                                    'T . #15#)))))))
                                          (LETT #11# (CDR #11#) . #15#)
                                          #17# G191 (EXIT NIL))
                                         (COND
                                           (#14# #13#)
                                           ('T (|spadConstant| $ 32)))))))))))))))) 

(DEFUN |TRMANIP;simplify;2F;5| (|x| $)
  (SPADCALL (|TRMANIP;simplify0| |x| $) (QREFELT $ 71))) 

(DEFUN |TRMANIP;simplify;2F;6| (|x| $) (|TRMANIP;simplify0| |x| $)) 

(DEFUN |TRMANIP;expandpow| (|k| $)
  (PROG (|arg| |a| |b| |ne| |de|)
    (RETURN
      (SEQ (LETT |a|
                 (SPADCALL
                     (|SPADfirst|
                         (LETT |arg| (SPADCALL |k| (QREFELT $ 41))
                               . #0=(|TRMANIP;expandpow|)))
                     (QREFELT $ 73)) . #0#)
           (LETT |b|
                 (SPADCALL (SPADCALL |arg| (QREFELT $ 74))
                     (QREFELT $ 73)) . #0#)
           (LETT |ne|
                 (COND
                   ((SPADCALL (SPADCALL |a| (QREFELT $ 76))
                        (|spadConstant| $ 78) (QREFELT $ 79))
                    (|spadConstant| $ 32))
                   ('T
                    (SPADCALL
                        (SPADCALL (SPADCALL |a| (QREFELT $ 76))
                            (QREFELT $ 80))
                        |b| (QREFELT $ 68)))) . #0#)
           (LETT |de|
                 (COND
                   ((SPADCALL (SPADCALL |a| (QREFELT $ 81))
                        (|spadConstant| $ 78) (QREFELT $ 79))
                    (|spadConstant| $ 32))
                   ('T
                    (SPADCALL
                        (SPADCALL (SPADCALL |a| (QREFELT $ 81))
                            (QREFELT $ 80))
                        (SPADCALL |b| (QREFELT $ 82)) (QREFELT $ 68)))) . #0#)
           (EXIT (SPADCALL |ne| |de| (QREFELT $ 15))))))) 

(DEFUN |TRMANIP;termexp| (|p| $)
  (PROG (|lk| |lpow| |k| #0=#:G1935 |d| |exponent| #1=#:G1936 |u|
              #2=#:G1937 |coef|)
    (RETURN
      (SEQ (LETT |exponent| (|spadConstant| $ 31)
                 . #3=(|TRMANIP;termexp|))
           (LETT |coef|
                 (SPADCALL (SPADCALL |p| (QREFELT $ 83))
                     (QREFELT $ 84)) . #3#)
           (LETT |lpow|
                 (SPADCALL (CONS #'|TRMANIP;termexp!0| $)
                     (LETT |lk| (SPADCALL |p| (QREFELT $ 86)) . #3#)
                     (QREFELT $ 88)) . #3#)
           (SEQ (LETT |k| NIL . #3#) (LETT #0# |lk| . #3#) G190
                (COND
                  ((OR (ATOM #0#)
                       (PROGN (LETT |k| (CAR #0#) . #3#) NIL))
                   #4=(GO G191)))
                (SEQ (LETT |d| (SPADCALL |p| |k| (QREFELT $ 90)) . #3#)
                     (EXIT (COND
                             ((SPADCALL |k|
                                  (SPADCALL "exp" (QREFELT $ 34))
                                  (QREFELT $ 46))
                              (LETT |exponent|
                                    (SPADCALL |exponent|
                                     (SPADCALL |d|
                                      (|SPADfirst|
                                       (SPADCALL |k| (QREFELT $ 41)))
                                      (QREFELT $ 91))
                                     (QREFELT $ 16)) . #3#))
                             ((NULL (SPADCALL |k|
                                     (SPADCALL "%power" (QREFELT $ 34))
                                     (QREFELT $ 46)))
                              (LETT |coef|
                                    (SPADCALL |coef|
                                     (SPADCALL (|spadConstant| $ 78)
                                      (SPADCALL
                                       (SPADCALL |k| (QREFELT $ 59))
                                       (PROGN
                                         (LETT #1# NIL . #3#)
                                         (SEQ (LETT |u| NIL . #3#)
                                          (LETT #2#
                                           (SPADCALL |k|
                                            (QREFELT $ 41)) . #3#)
                                          G190
                                          (COND
                                            ((OR (ATOM #2#)
                                              (PROGN
                                                (LETT |u|
                                                 (CAR #2#) . #3#)
                                                NIL))
                                             #4#))
                                          (SEQ
                                           (EXIT
                                            (LETT #1#
                                             (CONS
                                              (SPADCALL |u|
                                               (QREFELT $ 92))
                                              #1#) . #3#)))
                                          (LETT #2# (CDR #2#) . #3#)
                                          #5=(GO G190) G191
                                          (EXIT (NREVERSE0 #1#))))
                                       (SPADCALL |k| (QREFELT $ 93))
                                       (QREFELT $ 94))
                                      |d| (QREFELT $ 95))
                                     (QREFELT $ 96)) . #3#)))))
                (LETT #0# (CDR #0#) . #3#) #5# G191 (EXIT NIL))
           (EXIT (SPADCALL
                     (SPADCALL (SPADCALL |coef| (QREFELT $ 80))
                         (SPADCALL |exponent| (QREFELT $ 97))
                         (QREFELT $ 15))
                     (|TRMANIP;powersimp| |p| |lpow| $) (QREFELT $ 15))))))) 

(DEFUN |TRMANIP;termexp!0| (|#1| $)
  (SPADCALL |#1| (SPADCALL "%power" (QREFELT $ 34)) (QREFELT $ 46))) 

(DEFUN |TRMANIP;expandPower;2F;9| (|f| $)
  (PROG (|l| #0=#:G1941 |k| #1=#:G1942)
    (RETURN
      (SEQ (LETT |l|
                 (SPADCALL (CONS #'|TRMANIP;expandPower;2F;9!0| $)
                     (SPADCALL |f| (QREFELT $ 38)) (QREFELT $ 88))
                 . #2=(|TRMANIP;expandPower;2F;9|))
           (EXIT (SPADCALL |f| |l|
                     (PROGN
                       (LETT #0# NIL . #2#)
                       (SEQ (LETT |k| NIL . #2#) (LETT #1# |l| . #2#)
                            G190
                            (COND
                              ((OR (ATOM #1#)
                                   (PROGN
                                     (LETT |k| (CAR #1#) . #2#)
                                     NIL))
                               (GO G191)))
                            (SEQ (EXIT (LETT #0#
                                        (CONS
                                         (|TRMANIP;expandpow| |k| $)
                                         #0#) . #2#)))
                            (LETT #1# (CDR #1#) . #2#) (GO G190) G191
                            (EXIT (NREVERSE0 #0#))))
                     (QREFELT $ 98))))))) 

(DEFUN |TRMANIP;expandPower;2F;9!0| (|#1| $)
  (SPADCALL |#1| (SPADCALL "%power" (QREFELT $ 34)) (QREFELT $ 46))) 

(DEFUN |TRMANIP;powersimp| (|p| |l| $)
  (PROG (|k| |arg| |a| |lk| |k0| #0=#:G1948 |exponent|)
    (RETURN
      (SEQ (COND
             ((NULL |l|) (|spadConstant| $ 32))
             ('T
              (SEQ (LETT |k| (|SPADfirst| |l|)
                         . #1=(|TRMANIP;powersimp|))
                   (LETT |a|
                         (|SPADfirst|
                             (LETT |arg|
                                   (SPADCALL |k| (QREFELT $ 41)) . #1#)) . #1#)
                   (LETT |exponent|
                         (SPADCALL (SPADCALL |p| |k| (QREFELT $ 90))
                             (SPADCALL |arg| (QREFELT $ 74))
                             (QREFELT $ 99)) . #1#)
                   (EXIT (COND
                           ((NULL (LETT |lk|
                                        (SPADCALL
                                         (CONS #'|TRMANIP;powersimp!0|
                                          (VECTOR $ |a|))
                                         (CDR |l|) (QREFELT $ 88)) . #1#))
                            (SPADCALL
                                (SPADCALL |a| |exponent|
                                    (QREFELT $ 68))
                                (|TRMANIP;powersimp| |p| (CDR |l|) $)
                                (QREFELT $ 15)))
                           ('T
                            (SEQ (SEQ (LETT |k0| NIL . #1#)
                                      (LETT #0# |lk| . #1#) G190
                                      (COND
                                        ((OR (ATOM #0#)
                                          (PROGN
                                            (LETT |k0| (CAR #0#) . #1#)
                                            NIL))
                                         (GO G191)))
                                      (SEQ
                                       (EXIT
                                        (LETT |exponent|
                                         (SPADCALL |exponent|
                                          (SPADCALL
                                           (SPADCALL |p| |k0|
                                            (QREFELT $ 90))
                                           (SPADCALL
                                            (SPADCALL |k0|
                                             (QREFELT $ 41))
                                            (QREFELT $ 74))
                                           (QREFELT $ 99))
                                          (QREFELT $ 16)) . #1#)))
                                      (LETT #0# (CDR #0#) . #1#)
                                      (GO G190) G191 (EXIT NIL))
                                 (EXIT (SPADCALL
                                        (SPADCALL |a| |exponent|
                                         (QREFELT $ 68))
                                        (|TRMANIP;powersimp| |p|
                                         (SPADCALL (CDR |l|) |lk|
                                          (QREFELT $ 102))
                                         $)
                                        (QREFELT $ 15)))))))))))))) 

(DEFUN |TRMANIP;powersimp!0| (|#1| $$)
  (PROG ($)
    (LETT $ (QREFELT $$ 0) |TRMANIP;powersimp|)
    (RETURN
      (PROGN
        (SPADCALL (QREFELT $$ 1)
            (SPADCALL (SPADCALL |#1| (QREFELT $ 41)) (QREFELT $ 100))
            (QREFELT $ 101)))))) 

(DEFUN |TRMANIP;t2t| (|x| $)
  (SPADCALL (SPADCALL |x| (QREFELT $ 14)) (SPADCALL |x| (QREFELT $ 13))
      (QREFELT $ 20))) 

(DEFUN |TRMANIP;c2t| (|x| $)
  (SPADCALL (SPADCALL |x| (QREFELT $ 13)) (SPADCALL |x| (QREFELT $ 14))
      (QREFELT $ 20))) 

(DEFUN |TRMANIP;c2s| (|x| $)
  (SPADCALL (SPADCALL |x| (QREFELT $ 14)) (QREFELT $ 103))) 

(DEFUN |TRMANIP;s2c| (|x| $)
  (SPADCALL (SPADCALL |x| (QREFELT $ 13)) (QREFELT $ 103))) 

(DEFUN |TRMANIP;s2c2| (|x| $)
  (SPADCALL (|spadConstant| $ 32)
      (SPADCALL (SPADCALL |x| (QREFELT $ 13)) 2 (QREFELT $ 47))
      (QREFELT $ 17))) 

(DEFUN |TRMANIP;th2th| (|x| $)
  (SPADCALL (SPADCALL |x| (QREFELT $ 104))
      (SPADCALL |x| (QREFELT $ 105)) (QREFELT $ 20))) 

(DEFUN |TRMANIP;ch2th| (|x| $)
  (SPADCALL (SPADCALL |x| (QREFELT $ 105))
      (SPADCALL |x| (QREFELT $ 104)) (QREFELT $ 20))) 

(DEFUN |TRMANIP;ch2sh| (|x| $)
  (SPADCALL (SPADCALL |x| (QREFELT $ 104)) (QREFELT $ 103))) 

(DEFUN |TRMANIP;sh2ch| (|x| $)
  (SPADCALL (SPADCALL |x| (QREFELT $ 105)) (QREFELT $ 103))) 

(DEFUN |TRMANIP;sh2ch2| (|x| $)
  (SPADCALL (SPADCALL (SPADCALL |x| (QREFELT $ 105)) 2 (QREFELT $ 47))
      (|spadConstant| $ 32) (QREFELT $ 17))) 

(DEFUN |TRMANIP;ueval| (|x| |s| |f| $)
  (SPADCALL |x| (SPADCALL |s| (QREFELT $ 34)) |f| (QREFELT $ 107))) 

(DEFUN |TRMANIP;ueval2| (|x| |s| |f| $)
  (SPADCALL |x| (SPADCALL |s| (QREFELT $ 34)) 2 |f| (QREFELT $ 108))) 

(DEFUN |TRMANIP;cos2sec;2F;23| (|x| $)
  (|TRMANIP;ueval| |x| "cos" (CONS #'|TRMANIP;cos2sec;2F;23!0| $) $)) 

(DEFUN |TRMANIP;cos2sec;2F;23!0| (|#1| $)
  (SPADCALL (SPADCALL |#1| (QREFELT $ 109)) (QREFELT $ 103))) 

(DEFUN |TRMANIP;sin2csc;2F;24| (|x| $)
  (|TRMANIP;ueval| |x| "sin" (CONS #'|TRMANIP;sin2csc;2F;24!0| $) $)) 

(DEFUN |TRMANIP;sin2csc;2F;24!0| (|#1| $)
  (SPADCALL (SPADCALL |#1| (QREFELT $ 111)) (QREFELT $ 103))) 

(DEFUN |TRMANIP;csc2sin;2F;25| (|x| $)
  (|TRMANIP;ueval| |x| "csc" (CONS (|function| |TRMANIP;c2s|) $) $)) 

(DEFUN |TRMANIP;sec2cos;2F;26| (|x| $)
  (|TRMANIP;ueval| |x| "sec" (CONS (|function| |TRMANIP;s2c|) $) $)) 

(DEFUN |TRMANIP;tan2cot;2F;27| (|x| $)
  (|TRMANIP;ueval| |x| "tan" (CONS #'|TRMANIP;tan2cot;2F;27!0| $) $)) 

(DEFUN |TRMANIP;tan2cot;2F;27!0| (|#1| $)
  (SPADCALL (SPADCALL |#1| (QREFELT $ 115)) (QREFELT $ 103))) 

(DEFUN |TRMANIP;cot2tan;2F;28| (|x| $)
  (|TRMANIP;ueval| |x| "cot" (CONS #'|TRMANIP;cot2tan;2F;28!0| $) $)) 

(DEFUN |TRMANIP;cot2tan;2F;28!0| (|#1| $)
  (SPADCALL (SPADCALL |#1| (QREFELT $ 117)) (QREFELT $ 103))) 

(DEFUN |TRMANIP;tan2trig;2F;29| (|x| $)
  (|TRMANIP;ueval| |x| "tan" (CONS (|function| |TRMANIP;t2t|) $) $)) 

(DEFUN |TRMANIP;cot2trig;2F;30| (|x| $)
  (|TRMANIP;ueval| |x| "cot" (CONS (|function| |TRMANIP;c2t|) $) $)) 

(DEFUN |TRMANIP;cosh2sech;2F;31| (|x| $)
  (|TRMANIP;ueval| |x| "cosh" (CONS #'|TRMANIP;cosh2sech;2F;31!0| $) $)) 

(DEFUN |TRMANIP;cosh2sech;2F;31!0| (|#1| $)
  (SPADCALL (SPADCALL |#1| (QREFELT $ 121)) (QREFELT $ 103))) 

(DEFUN |TRMANIP;sinh2csch;2F;32| (|x| $)
  (|TRMANIP;ueval| |x| "sinh" (CONS #'|TRMANIP;sinh2csch;2F;32!0| $) $)) 

(DEFUN |TRMANIP;sinh2csch;2F;32!0| (|#1| $)
  (SPADCALL (SPADCALL |#1| (QREFELT $ 123)) (QREFELT $ 103))) 

(DEFUN |TRMANIP;csch2sinh;2F;33| (|x| $)
  (|TRMANIP;ueval| |x| "csch" (CONS (|function| |TRMANIP;ch2sh|) $) $)) 

(DEFUN |TRMANIP;sech2cosh;2F;34| (|x| $)
  (|TRMANIP;ueval| |x| "sech" (CONS (|function| |TRMANIP;sh2ch|) $) $)) 

(DEFUN |TRMANIP;tanh2coth;2F;35| (|x| $)
  (|TRMANIP;ueval| |x| "tanh" (CONS #'|TRMANIP;tanh2coth;2F;35!0| $) $)) 

(DEFUN |TRMANIP;tanh2coth;2F;35!0| (|#1| $)
  (SPADCALL (SPADCALL |#1| (QREFELT $ 127)) (QREFELT $ 103))) 

(DEFUN |TRMANIP;coth2tanh;2F;36| (|x| $)
  (|TRMANIP;ueval| |x| "coth" (CONS #'|TRMANIP;coth2tanh;2F;36!0| $) $)) 

(DEFUN |TRMANIP;coth2tanh;2F;36!0| (|#1| $)
  (SPADCALL (SPADCALL |#1| (QREFELT $ 129)) (QREFELT $ 103))) 

(DEFUN |TRMANIP;tanh2trigh;2F;37| (|x| $)
  (|TRMANIP;ueval| |x| "tanh" (CONS (|function| |TRMANIP;th2th|) $) $)) 

(DEFUN |TRMANIP;coth2trigh;2F;38| (|x| $)
  (|TRMANIP;ueval| |x| "coth" (CONS (|function| |TRMANIP;ch2th|) $) $)) 

(DEFUN |TRMANIP;removeCosSq;2F;39| (|x| $)
  (|TRMANIP;ueval2| |x| "cos" (CONS #'|TRMANIP;removeCosSq;2F;39!0| $)
      $)) 

(DEFUN |TRMANIP;removeCosSq;2F;39!0| (|#1| $)
  (SPADCALL (|spadConstant| $ 32)
      (SPADCALL (SPADCALL |#1| (QREFELT $ 14)) 2 (QREFELT $ 47))
      (QREFELT $ 17))) 

(DEFUN |TRMANIP;removeSinSq;2F;40| (|x| $)
  (|TRMANIP;ueval2| |x| "sin" (CONS (|function| |TRMANIP;s2c2|) $) $)) 

(DEFUN |TRMANIP;removeCoshSq;2F;41| (|x| $)
  (|TRMANIP;ueval2| |x| "cosh"
      (CONS #'|TRMANIP;removeCoshSq;2F;41!0| $) $)) 

(DEFUN |TRMANIP;removeCoshSq;2F;41!0| (|#1| $)
  (SPADCALL (|spadConstant| $ 32)
      (SPADCALL (SPADCALL |#1| (QREFELT $ 104)) 2 (QREFELT $ 47))
      (QREFELT $ 16))) 

(DEFUN |TRMANIP;removeSinhSq;2F;42| (|x| $)
  (|TRMANIP;ueval2| |x| "sinh" (CONS (|function| |TRMANIP;sh2ch2|) $)
      $)) 

(DEFUN |TRMANIP;expandLog;2F;43| (|x| $)
  (SPADCALL (|TRMANIP;smplog| (SPADCALL |x| (QREFELT $ 76)) $)
      (|TRMANIP;smplog| (SPADCALL |x| (QREFELT $ 81)) $)
      (QREFELT $ 20))) 

(DEFUN |TRMANIP;simplifyExp;2F;44| (|x| $)
  (SPADCALL (|TRMANIP;smpexp| (SPADCALL |x| (QREFELT $ 76)) $)
      (|TRMANIP;smpexp| (SPADCALL |x| (QREFELT $ 81)) $)
      (QREFELT $ 20))) 

(DEFUN |TRMANIP;expand;2F;45| (|x| $)
  (SPADCALL (|TRMANIP;smpexpand| (SPADCALL |x| (QREFELT $ 76)) $)
      (|TRMANIP;smpexpand| (SPADCALL |x| (QREFELT $ 81)) $)
      (QREFELT $ 20))) 

(DEFUN |TRMANIP;smpexpand| (|p| $)
  (SPADCALL (CONS (|function| |TRMANIP;kerexpand|) $)
      (CONS #'|TRMANIP;smpexpand!0| $) |p| (QREFELT $ 143))) 

(DEFUN |TRMANIP;smpexpand!0| (|#1| $) (SPADCALL |#1| (QREFELT $ 139))) 

(DEFUN |TRMANIP;smplog| (|p| $)
  (SPADCALL (CONS (|function| |TRMANIP;logexpand|) $)
      (CONS #'|TRMANIP;smplog!0| $) |p| (QREFELT $ 143))) 

(DEFUN |TRMANIP;smplog!0| (|#1| $) (SPADCALL |#1| (QREFELT $ 139))) 

(DEFUN |TRMANIP;smp2htrigs| (|p| $)
  (SPADCALL (CONS #'|TRMANIP;smp2htrigs!0| $)
      (CONS #'|TRMANIP;smp2htrigs!1| $) |p| (QREFELT $ 143))) 

(DEFUN |TRMANIP;smp2htrigs!1| (|#1| $)
  (SPADCALL |#1| (QREFELT $ 139))) 

(DEFUN |TRMANIP;smp2htrigs!0| (|#1| $)
  (SPADCALL (SPADCALL |#1| (QREFELT $ 144)) (QREFELT $ 145))) 

(DEFUN |TRMANIP;htrigs;2F;49| (|f| $)
  (PROG (|m| |k| |op| #0=#:G2001 |x| #1=#:G2002 |arg| |num| |den| |a|
             |g2| |b| |g1|)
    (RETURN
      (SEQ (LETT |m| (SPADCALL |f| (QREFELT $ 147))
                 . #2=(|TRMANIP;htrigs;2F;49|))
           (EXIT (COND
                   ((QEQCAR |m| 1) |f|)
                   ('T
                    (SEQ (LETT |op|
                               (SPADCALL (LETT |k| (QCDR |m|) . #2#)
                                   (QREFELT $ 59)) . #2#)
                         (LETT |arg|
                               (PROGN
                                 (LETT #0# NIL . #2#)
                                 (SEQ (LETT |x| NIL . #2#)
                                      (LETT #1#
                                       (SPADCALL |k| (QREFELT $ 41)) . #2#)
                                      G190
                                      (COND
                                        ((OR (ATOM #1#)
                                          (PROGN
                                            (LETT |x| (CAR #1#) . #2#)
                                            NIL))
                                         (GO G191)))
                                      (SEQ
                                       (EXIT
                                        (LETT #0#
                                         (CONS
                                          (SPADCALL |x|
                                           (QREFELT $ 145))
                                          #0#) . #2#)))
                                      (LETT #1# (CDR #1#) . #2#)
                                      (GO G190) G191
                                      (EXIT (NREVERSE0 #0#)))) . #2#)
                         (LETT |num|
                               (SPADCALL (SPADCALL |f| (QREFELT $ 76))
                                   |k| (QREFELT $ 149)) . #2#)
                         (LETT |den|
                               (SPADCALL (SPADCALL |f| (QREFELT $ 81))
                                   |k| (QREFELT $ 149)) . #2#)
                         (EXIT (COND
                                 ((SPADCALL |op|
                                      (SPADCALL "exp" (QREFELT $ 34))
                                      (QREFELT $ 150))
                                  (SEQ (LETT |g1|
                                        (SPADCALL
                                         (SPADCALL
                                          (LETT |a|
                                           (|SPADfirst| |arg|) . #2#)
                                          (QREFELT $ 105))
                                         (SPADCALL |a| (QREFELT $ 104))
                                         (QREFELT $ 16)) . #2#)
                                       (LETT |g2|
                                        (SPADCALL
                                         (SPADCALL |a| (QREFELT $ 105))
                                         (SPADCALL |a| (QREFELT $ 104))
                                         (QREFELT $ 17)) . #2#)
                                       (EXIT
                                        (SPADCALL
                                         (|TRMANIP;supexp| |num| |g1|
                                          |g2|
                                          (LETT |b|
                                           (QUOTIENT2
                                            (SPADCALL |num|
                                             (QREFELT $ 152))
                                            2) . #2#)
                                          $)
                                         (|TRMANIP;supexp| |den| |g1|
                                          |g2| |b| $)
                                         (QREFELT $ 20)))))
                                 ('T
                                  (SPADCALL
                                      (|TRMANIP;sup2htrigs| |num|
                                       (LETT |g1|
                                        (SPADCALL |op| |arg|
                                         (QREFELT $ 153)) . #2#)
                                       $)
                                      (|TRMANIP;sup2htrigs| |den| |g1|
                                       $)
                                      (QREFELT $ 20))))))))))))) 

(DEFUN |TRMANIP;supexp| (|p| |f1| |f2| |bse| $)
  (PROG (|g| |d| |ans|)
    (RETURN
      (SEQ (LETT |ans| (|spadConstant| $ 31) . #0=(|TRMANIP;supexp|))
           (SEQ G190
                (COND
                  ((NULL (COND
                           ((SPADCALL |p| (|spadConstant| $ 155)
                                (QREFELT $ 156))
                            'NIL)
                           ('T 'T)))
                   (GO G191)))
                (SEQ (LETT |g|
                           (SPADCALL
                               (SPADCALL (SPADCALL |p| (QREFELT $ 157))
                                   (QREFELT $ 80))
                               (QREFELT $ 145)) . #0#)
                     (SEQ (LETT |d|
                                (- (SPADCALL |p| (QREFELT $ 152))
                                   |bse|) . #0#)
                          (EXIT (COND
                                  ((< |d| 0)
                                   (LETT |ans|
                                    (SPADCALL |ans|
                                     (SPADCALL |g|
                                      (SPADCALL |f2| (- |d|)
                                       (QREFELT $ 47))
                                      (QREFELT $ 15))
                                     (QREFELT $ 16)) . #0#))
                                  ('T
                                   (LETT |ans|
                                    (SPADCALL |ans|
                                     (SPADCALL |g|
                                      (SPADCALL |f1| |d|
                                       (QREFELT $ 47))
                                      (QREFELT $ 15))
                                     (QREFELT $ 16)) . #0#)))))
                     (EXIT (LETT |p|
                                 (SPADCALL |p| (QREFELT $ 158)) . #0#)))
                NIL (GO G190) G191 (EXIT NIL))
           (EXIT |ans|))))) 

(DEFUN |TRMANIP;sup2htrigs| (|p| |f| $)
  (SPADCALL
      (SPADCALL (CONS (|function| |TRMANIP;smp2htrigs|) $) |p|
          (QREFELT $ 162))
      |f| (QREFELT $ 163))) 

(DEFUN |TRMANIP;exlog| (|p| $)
  (PROG (|r| #0=#:G2017 #1=#:G2015 #2=#:G2013 #3=#:G2014)
    (RETURN
      (SEQ (PROGN
             (LETT #3# NIL . #4=(|TRMANIP;exlog|))
             (SEQ (LETT |r| NIL . #4#)
                  (LETT #0#
                        (SPADCALL (SPADCALL |p| (QREFELT $ 165))
                            (QREFELT $ 170)) . #4#)
                  G190
                  (COND
                    ((OR (ATOM #0#)
                         (PROGN (LETT |r| (CAR #0#) . #4#) NIL))
                     (GO G191)))
                  (SEQ (EXIT (PROGN
                               (LETT #1#
                                     (SPADCALL (QCAR |r|)
                                      (SPADCALL
                                       (SPADCALL (QCDR |r|)
                                        (QREFELT $ 80))
                                       (QREFELT $ 48))
                                      (QREFELT $ 99)) . #4#)
                               (COND
                                 (#3# (LETT #2#
                                       (SPADCALL #2# #1#
                                        (QREFELT $ 16)) . #4#))
                                 ('T
                                  (PROGN
                                    (LETT #2# #1# . #4#)
                                    (LETT #3# 'T . #4#)))))))
                  (LETT #0# (CDR #0#) . #4#) (GO G190) G191 (EXIT NIL))
             (COND (#3# #2#) ('T (|spadConstant| $ 31)))))))) 

(DEFUN |TRMANIP;logexpand| (|k| $)
  (PROG (|op| #0=#:G2022 |x| #1=#:G2023)
    (RETURN
      (SEQ (COND
             ((SPADCALL
                  (LETT |op| (SPADCALL |k| (QREFELT $ 59))
                        . #2=(|TRMANIP;logexpand|))
                  (QREFELT $ 171))
              (SPADCALL |k| (QREFELT $ 144)))
             ((SPADCALL |op| (SPADCALL "log" (QREFELT $ 34))
                  (QREFELT $ 150))
              (SPADCALL
                  (|TRMANIP;exlog|
                      (SPADCALL
                          (LETT |x|
                                (SPADCALL
                                    (|SPADfirst|
                                     (SPADCALL |k| (QREFELT $ 41)))
                                    (QREFELT $ 137)) . #2#)
                          (QREFELT $ 76))
                      $)
                  (|TRMANIP;exlog| (SPADCALL |x| (QREFELT $ 81)) $)
                  (QREFELT $ 17)))
             ('T
              (SPADCALL |op|
                  (PROGN
                    (LETT #0# NIL . #2#)
                    (SEQ (LETT |x| NIL . #2#)
                         (LETT #1# (SPADCALL |k| (QREFELT $ 41)) . #2#)
                         G190
                         (COND
                           ((OR (ATOM #1#)
                                (PROGN (LETT |x| (CAR #1#) . #2#) NIL))
                            (GO G191)))
                         (SEQ (EXIT (LETT #0#
                                     (CONS
                                      (SPADCALL |x| (QREFELT $ 137))
                                      #0#) . #2#)))
                         (LETT #1# (CDR #1#) . #2#) (GO G190) G191
                         (EXIT (NREVERSE0 #0#))))
                  (QREFELT $ 153)))))))) 

(DEFUN |TRMANIP;kerexpand| (|k| $)
  (PROG (|op| |arg| |num| |den| |b| |a| |ta| |tb| |cta| |ctb|
              #0=#:G2041 #1=#:G2042 #2=#:G2034 #3=#:G2043 |x|
              #4=#:G2044)
    (RETURN
      (SEQ (COND
             ((SPADCALL
                  (LETT |op| (SPADCALL |k| (QREFELT $ 59))
                        . #5=(|TRMANIP;kerexpand|))
                  (QREFELT $ 171))
              (SPADCALL |k| (QREFELT $ 144)))
             ((SPADCALL |op| (SPADCALL "%power" (QREFELT $ 34))
                  (QREFELT $ 150))
              (|TRMANIP;expandpow| |k| $))
             ('T
              (SEQ (LETT |arg|
                         (|SPADfirst| (SPADCALL |k| (QREFELT $ 41))) . #5#)
                   (EXIT (COND
                           ((SPADCALL |op|
                                (SPADCALL "sec" (QREFELT $ 34))
                                (QREFELT $ 150))
                            (SPADCALL
                                (SPADCALL
                                    (SPADCALL |arg| (QREFELT $ 13))
                                    (QREFELT $ 138))
                                (QREFELT $ 103)))
                           ((SPADCALL |op|
                                (SPADCALL "csc" (QREFELT $ 34))
                                (QREFELT $ 150))
                            (SPADCALL
                                (SPADCALL
                                    (SPADCALL |arg| (QREFELT $ 14))
                                    (QREFELT $ 138))
                                (QREFELT $ 103)))
                           ((SPADCALL |op|
                                (SPADCALL "log" (QREFELT $ 34))
                                (QREFELT $ 150))
                            (SPADCALL
                                (|TRMANIP;exlog|
                                    (SPADCALL
                                     (LETT |x|
                                      (SPADCALL |arg| (QREFELT $ 138)) . #5#)
                                     (QREFELT $ 76))
                                    $)
                                (|TRMANIP;exlog|
                                    (SPADCALL |x| (QREFELT $ 81)) $)
                                (QREFELT $ 17)))
                           ('T
                            (SEQ (EXIT (SEQ
                                        (LETT |num|
                                         (SPADCALL |arg|
                                          (QREFELT $ 76)) . #5#)
                                        (LETT |den|
                                         (SPADCALL |arg|
                                          (QREFELT $ 81)) . #5#)
                                        (SEQ
                                         (LETT |b|
                                          (SPADCALL
                                           (SPADCALL |num|
                                            (QREFELT $ 172))
                                           |den| (QREFELT $ 173)) . #5#)
                                         (EXIT
                                          (COND
                                            ((NULL
                                              (SPADCALL |b|
                                               (|spadConstant| $ 31)
                                               (QREFELT $ 101)))
                                             (PROGN
                                               (LETT #2#
                                                (SEQ
                                                 (LETT |a|
                                                  (SPADCALL
                                                   (SPADCALL |num|
                                                    (QREFELT $ 174))
                                                   |den|
                                                   (QREFELT $ 173)) . #5#)
                                                 (EXIT
                                                  (COND
                                                    ((SPADCALL |op|
                                                      (SPADCALL "exp"
                                                       (QREFELT $ 34))
                                                      (QREFELT $ 150))
                                                     (SPADCALL
                                                      (SPADCALL
                                                       (SPADCALL |a|
                                                        (QREFELT $ 138))
                                                       (QREFELT $ 97))
                                                      (SPADCALL
                                                       (SPADCALL |b|
                                                        (QREFELT $ 97))
                                                       (QREFELT $ 138))
                                                      (QREFELT $ 15)))
                                                    ((SPADCALL |op|
                                                      (SPADCALL "sin"
                                                       (QREFELT $ 34))
                                                      (QREFELT $ 150))
                                                     (SPADCALL
                                                      (SPADCALL
                                                       (SPADCALL
                                                        (SPADCALL |a|
                                                         (QREFELT $
                                                          138))
                                                        (QREFELT $ 14))
                                                       (SPADCALL
                                                        (SPADCALL |b|
                                                         (QREFELT $ 13))
                                                        (QREFELT $ 138))
                                                       (QREFELT $ 15))
                                                      (SPADCALL
                                                       (SPADCALL
                                                        (SPADCALL |a|
                                                         (QREFELT $
                                                          138))
                                                        (QREFELT $ 13))
                                                       (SPADCALL
                                                        (SPADCALL |b|
                                                         (QREFELT $ 14))
                                                        (QREFELT $ 138))
                                                       (QREFELT $ 15))
                                                      (QREFELT $ 16)))
                                                    ((SPADCALL |op|
                                                      (SPADCALL "cos"
                                                       (QREFELT $ 34))
                                                      (QREFELT $ 150))
                                                     (SPADCALL
                                                      (SPADCALL
                                                       (SPADCALL
                                                        (SPADCALL |a|
                                                         (QREFELT $
                                                          138))
                                                        (QREFELT $ 13))
                                                       (SPADCALL
                                                        (SPADCALL |b|
                                                         (QREFELT $ 13))
                                                        (QREFELT $ 138))
                                                       (QREFELT $ 15))
                                                      (SPADCALL
                                                       (SPADCALL
                                                        (SPADCALL |a|
                                                         (QREFELT $
                                                          138))
                                                        (QREFELT $ 14))
                                                       (SPADCALL
                                                        (SPADCALL |b|
                                                         (QREFELT $ 14))
                                                        (QREFELT $ 138))
                                                       (QREFELT $ 15))
                                                      (QREFELT $ 17)))
                                                    ((SPADCALL |op|
                                                      (SPADCALL "tan"
                                                       (QREFELT $ 34))
                                                      (QREFELT $ 150))
                                                     (SEQ
                                                      (LETT |ta|
                                                       (SPADCALL
                                                        (SPADCALL |a|
                                                         (QREFELT $
                                                          138))
                                                        (QREFELT $ 117)) . #5#)
                                                      (LETT |tb|
                                                       (SPADCALL
                                                        (SPADCALL |b|
                                                         (QREFELT $
                                                          117))
                                                        (QREFELT $ 138)) . #5#)
                                                      (EXIT
                                                       (SPADCALL
                                                        (SPADCALL |ta|
                                                         |tb|
                                                         (QREFELT $ 16))
                                                        (SPADCALL
                                                         (|spadConstant|
                                                          $ 32)
                                                         (SPADCALL |ta|
                                                          |tb|
                                                          (QREFELT $
                                                           15))
                                                         (QREFELT $ 17))
                                                        (QREFELT $ 20)))))
                                                    ((SPADCALL |op|
                                                      (SPADCALL "cot"
                                                       (QREFELT $ 34))
                                                      (QREFELT $ 150))
                                                     (SEQ
                                                      (LETT |cta|
                                                       (SPADCALL
                                                        (SPADCALL |a|
                                                         (QREFELT $
                                                          138))
                                                        (QREFELT $ 115)) . #5#)
                                                      (LETT |ctb|
                                                       (SPADCALL
                                                        (SPADCALL |b|
                                                         (QREFELT $
                                                          115))
                                                        (QREFELT $ 138)) . #5#)
                                                      (EXIT
                                                       (SPADCALL
                                                        (SPADCALL
                                                         (SPADCALL
                                                          |cta| |ctb|
                                                          (QREFELT $
                                                           15))
                                                         (|spadConstant|
                                                          $ 32)
                                                         (QREFELT $ 17))
                                                        (SPADCALL |ctb|
                                                         |cta|
                                                         (QREFELT $ 16))
                                                        (QREFELT $ 20)))))
                                                    ('T
                                                     (SPADCALL |op|
                                                      (PROGN
                                                        (LETT #0#
                                                         NIL . #5#)
                                                        (SEQ
                                                         (LETT |x|
                                                          NIL . #5#)
                                                         (LETT #1#
                                                          (SPADCALL |k|
                                                           (QREFELT $
                                                            41)) . #5#)
                                                         G190
                                                         (COND
                                                           ((OR
                                                             (ATOM #1#)
                                                             (PROGN
                                                               (LETT
                                                                |x|
                                                                (CAR
                                                                 #1#) . #5#)
                                                               NIL))
                                                            #6=(GO
                                                                G191)))
                                                         (SEQ
                                                          (EXIT
                                                           (LETT #0#
                                                            (CONS
                                                             (SPADCALL
                                                              |x|
                                                              (QREFELT
                                                               $ 138))
                                                             #0#) . #5#)))
                                                         (LETT #1#
                                                          (CDR #1#) . #5#)
                                                         #7=(GO G190)
                                                         G191
                                                         (EXIT
                                                          (NREVERSE0
                                                           #0#))))
                                                      (QREFELT $ 153)))))) . #5#)
                                               (GO #2#))))))
                                        (EXIT
                                         (SPADCALL |op|
                                          (PROGN
                                            (LETT #3# NIL . #5#)
                                            (SEQ (LETT |x| NIL . #5#)
                                             (LETT #4#
                                              (SPADCALL |k|
                                               (QREFELT $ 41)) . #5#)
                                             G190
                                             (COND
                                               ((OR (ATOM #4#)
                                                 (PROGN
                                                   (LETT |x|
                                                    (CAR #4#) . #5#)
                                                   NIL))
                                                #6#))
                                             (SEQ
                                              (EXIT
                                               (LETT #3#
                                                (CONS
                                                 (SPADCALL |x|
                                                  (QREFELT $ 138))
                                                 #3#) . #5#)))
                                             (LETT #4# (CDR #4#) . #5#)
                                             #7# G191
                                             (EXIT (NREVERSE0 #3#))))
                                          (QREFELT $ 153)))))
                                 #2# (EXIT #2#)))))))))))) 

(DEFUN |TRMANIP;smpexp| (|p| $)
  (PROG (|ans|)
    (RETURN
      (SEQ (LETT |ans| (|spadConstant| $ 31) . #0=(|TRMANIP;smpexp|))
           (SEQ G190
                (COND
                  ((NULL (COND
                           ((SPADCALL |p| (|spadConstant| $ 175)
                                (QREFELT $ 79))
                            'NIL)
                           ('T 'T)))
                   (GO G191)))
                (SEQ (LETT |ans|
                           (SPADCALL |ans|
                               (|TRMANIP;termexp|
                                   (SPADCALL |p| (QREFELT $ 174)) $)
                               (QREFELT $ 16)) . #0#)
                     (EXIT (LETT |p|
                                 (SPADCALL |p| (QREFELT $ 172)) . #0#)))
                NIL (GO G190) G191 (EXIT NIL))
           (EXIT |ans|))))) 

(DEFUN |TRMANIP;simplify0| (|x| $)
  (SPADCALL
      (SPADCALL
          (SPADCALL |x|
              (LIST (SPADCALL "tan" (QREFELT $ 34))
                    (SPADCALL "cot" (QREFELT $ 34))
                    (SPADCALL "sec" (QREFELT $ 34))
                    (SPADCALL "csc" (QREFELT $ 34))
                    (SPADCALL "tanh" (QREFELT $ 34))
                    (SPADCALL "coth" (QREFELT $ 34))
                    (SPADCALL "sech" (QREFELT $ 34))
                    (SPADCALL "csch" (QREFELT $ 34)))
              (LIST (CONS (|function| |TRMANIP;t2t|) $)
                    (CONS (|function| |TRMANIP;c2t|) $)
                    (CONS (|function| |TRMANIP;s2c|) $)
                    (CONS (|function| |TRMANIP;c2s|) $)
                    (CONS (|function| |TRMANIP;th2th|) $)
                    (CONS (|function| |TRMANIP;ch2th|) $)
                    (CONS (|function| |TRMANIP;sh2ch|) $)
                    (CONS (|function| |TRMANIP;ch2sh|) $))
              (QREFELT $ 178))
          (LIST (SPADCALL "sin" (QREFELT $ 34))
                (SPADCALL "sinh" (QREFELT $ 34)))
          (LIST 2 2)
          (LIST (CONS (|function| |TRMANIP;s2c2|) $)
                (CONS (|function| |TRMANIP;sh2ch2|) $))
          (QREFELT $ 180))
      (QREFELT $ 92))) 

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

(DEFUN |TranscendentalManipulations;| (|#1| |#2|)
  (PROG (DV$1 DV$2 |dv$| $ |pv$|)
    (RETURN
      (PROGN
        (LETT DV$1 (|devaluate| |#1|)
              . #0=(|TranscendentalManipulations|))
        (LETT DV$2 (|devaluate| |#2|) . #0#)
        (LETT |dv$|
              (LIST '|TranscendentalManipulations| DV$1 DV$2) . #0#)
        (LETT $ (GETREFV 181) . #0#)
        (QSETREFV $ 0 |dv$|)
        (QSETREFV $ 3
            (LETT |pv$|
                  (|buildPredVector| 0 0
                      (LIST (AND (|HasCategory| |#1|
                                     (LIST '|ConvertibleTo|
                                      (LIST '|Pattern|
                                       (|devaluate| |#1|))))
                                 (|HasCategory| |#1|
                                     (LIST '|PatternMatchable|
                                      (|devaluate| |#1|)))
                                 (|HasCategory| |#2|
                                     (LIST '|ConvertibleTo|
                                      (LIST '|Pattern|
                                       (|devaluate| |#1|))))
                                 (|HasCategory| |#2|
                                     (LIST '|PatternMatchable|
                                      (|devaluate| |#1|)))))) . #0#))
        (|haddProp| |$ConstructorCache| '|TranscendentalManipulations|
            (LIST DV$1 DV$2) (CONS 1 $))
        (|stuffDomainSlots| $)
        (QSETREFV $ 6 |#1|)
        (QSETREFV $ 7 |#2|)
        (COND
          ((|HasCategory| |#1|
               (LIST '|PatternMatchable| (|devaluate| |#1|)))
           (COND
             ((|HasCategory| |#1|
                  (LIST '|ConvertibleTo|
                        (LIST '|Pattern| (|devaluate| |#1|))))
              (COND
                ((|HasCategory| |#2|
                     (LIST '|ConvertibleTo|
                           (LIST '|Pattern| (|devaluate| |#1|))))
                 (COND
                   ((|HasCategory| |#2|
                        (LIST '|PatternMatchable| (|devaluate| |#1|)))
                    (PROGN
                      (QSETREFV $ 11
                          (SPADCALL (SPADCALL (QREFELT $ 9))
                              (QREFELT $ 10)))
                      (QSETREFV $ 12
                          (SPADCALL (SPADCALL (QREFELT $ 9))
                              (QREFELT $ 10)))
                      (QSETREFV $ 23
                          (SPADCALL
                              (SPADCALL
                                  (SPADCALL (QREFELT $ 11)
                                      (QREFELT $ 13))
                                  (SPADCALL (QREFELT $ 12)
                                      (QREFELT $ 14))
                                  (QREFELT $ 15))
                              (SPADCALL
                                  (SPADCALL
                                      (SPADCALL
                                       (SPADCALL (QREFELT $ 11)
                                        (QREFELT $ 12) (QREFELT $ 16))
                                       (QREFELT $ 14))
                                      (SPADCALL
                                       (SPADCALL (QREFELT $ 11)
                                        (QREFELT $ 12) (QREFELT $ 17))
                                       (QREFELT $ 14))
                                      (QREFELT $ 17))
                                  (SPADCALL 2 (QREFELT $ 19))
                                  (QREFELT $ 20))
                              (QREFELT $ 22)))
                      (QSETREFV $ 24
                          (SPADCALL
                              (SPADCALL
                                  (SPADCALL (QREFELT $ 11)
                                      (QREFELT $ 14))
                                  (SPADCALL (QREFELT $ 12)
                                      (QREFELT $ 14))
                                  (QREFELT $ 15))
                              (SPADCALL
                                  (SPADCALL
                                      (SPADCALL
                                       (SPADCALL (QREFELT $ 11)
                                        (QREFELT $ 12) (QREFELT $ 17))
                                       (QREFELT $ 13))
                                      (SPADCALL
                                       (SPADCALL (QREFELT $ 11)
                                        (QREFELT $ 12) (QREFELT $ 16))
                                       (QREFELT $ 13))
                                      (QREFELT $ 17))
                                  (SPADCALL 2 (QREFELT $ 19))
                                  (QREFELT $ 20))
                              (QREFELT $ 22)))
                      (QSETREFV $ 25
                          (SPADCALL
                              (SPADCALL
                                  (SPADCALL (QREFELT $ 11)
                                      (QREFELT $ 13))
                                  (SPADCALL (QREFELT $ 12)
                                      (QREFELT $ 13))
                                  (QREFELT $ 15))
                              (SPADCALL
                                  (SPADCALL
                                      (SPADCALL
                                       (SPADCALL (QREFELT $ 11)
                                        (QREFELT $ 12) (QREFELT $ 17))
                                       (QREFELT $ 13))
                                      (SPADCALL
                                       (SPADCALL (QREFELT $ 11)
                                        (QREFELT $ 12) (QREFELT $ 16))
                                       (QREFELT $ 13))
                                      (QREFELT $ 16))
                                  (SPADCALL 2 (QREFELT $ 19))
                                  (QREFELT $ 20))
                              (QREFELT $ 22)))
                      (QSETREFV $ 30
                          (CONS (|dispatchFunction|
                                    |TRMANIP;expandTrigProducts;2F;1|)
                                $)))))))))))
        (COND
          ((|HasCategory| |#1| '(|RetractableTo| (|Integer|)))
           (QSETREFV $ 72
               (CONS (|dispatchFunction| |TRMANIP;simplify;2F;5|) $)))
          ('T
           (QSETREFV $ 72
               (CONS (|dispatchFunction| |TRMANIP;simplify;2F;6|) $))))
        $)))) 

(MAKEPROP '|TranscendentalManipulations| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|)
             (|Symbol|) (0 . |new|) (4 . |coerce|) 'XX 'YY (9 . |cos|)
             (14 . |sin|) (19 . *) (25 . +) (31 . -) (|Integer|)
             (37 . |coerce|) (42 . /) (|RewriteRule| 6 6 7)
             (48 . |rule|) '|sinCosRule| '|sinSinRule| '|cosCosRule|
             (|List| 21) (|PositiveInteger|) (|ApplyRules| 6 6 7)
             (54 . |applyRules|) (61 . |expandTrigProducts|)
             (66 . |Zero|) (70 . |One|) (|String|) (74 . |coerce|)
             (|Boolean|) (79 . |is?|) (|List| 66) (85 . |kernels|)
             (|List| 7) (|Kernel| 7) (90 . |argument|)
             |TRMANIP;simplifyLog;2F;3|
             (|Record| (|:| |coef| 18) (|:| |var| 66))
             (|Union| 43 '"failed") (95 . |isMult|) (100 . |is?|)
             (106 . **) (112 . |log|) (117 . |numerator|)
             (122 . |denominator|) (127 . |freeOf?|)
             (|Union| 60 '"failed") (133 . |isTimes|) (138 . |isPlus|)
             (|Record| (|:| |val| $) (|:| |exponent| 18))
             (|Union| 55 '"failed") (143 . |isPower|) (|BasicOperator|)
             (148 . |operator|) (|List| $) (153 . |kernel|)
             (|Union| (|Fraction| (|Polynomial| 6)) '"failed")
             (159 . |retractIfCan|) (164 . |One|) (168 . |elt|)
             (|Kernel| $) (174 . |retract|) (179 . **) (185 . |setelt|)
             (|AlgebraicManipulations| 6 7) (192 . |rootProduct|)
             (197 . |simplify|) |TRMANIP;expandPower;2F;9|
             (202 . |second|) (|SparseMultivariatePolynomial| 6 66)
             (207 . |numer|) (|SparseMultivariatePolynomial| 6 40)
             (212 . |One|) (216 . =) (222 . |coerce|) (227 . |denom|)
             (232 . -) (237 . |leadingCoefficient|) (242 . |coerce|)
             (|List| 40) (247 . |variables|) (|Mapping| 35 40)
             (252 . |select|) (|NonNegativeInteger|) (258 . |degree|)
             (264 . *) |TRMANIP;simplifyExp;2F;44| (270 . |height|)
             (275 . |kernel|) (282 . |monomial|) (289 . *)
             (295 . |exp|) (300 . |eval|) (307 . *) (313 . |first|)
             (318 . =) (324 . |setDifference|) (330 . |inv|)
             (335 . |sinh|) (340 . |cosh|) (|Mapping| $ $)
             (345 . |eval|) (352 . |eval|) (360 . |sec|)
             |TRMANIP;cos2sec;2F;23| (365 . |csc|)
             |TRMANIP;sin2csc;2F;24| |TRMANIP;csc2sin;2F;25|
             |TRMANIP;sec2cos;2F;26| (370 . |cot|)
             |TRMANIP;tan2cot;2F;27| (375 . |tan|)
             |TRMANIP;cot2tan;2F;28| |TRMANIP;tan2trig;2F;29|
             |TRMANIP;cot2trig;2F;30| (380 . |sech|)
             |TRMANIP;cosh2sech;2F;31| (385 . |csch|)
             |TRMANIP;sinh2csch;2F;32| |TRMANIP;csch2sinh;2F;33|
             |TRMANIP;sech2cosh;2F;34| (390 . |coth|)
             |TRMANIP;tanh2coth;2F;35| (395 . |tanh|)
             |TRMANIP;coth2tanh;2F;36| |TRMANIP;tanh2trigh;2F;37|
             |TRMANIP;coth2trigh;2F;38| |TRMANIP;removeCosSq;2F;39|
             |TRMANIP;removeSinSq;2F;40| |TRMANIP;removeCoshSq;2F;41|
             |TRMANIP;removeSinhSq;2F;42| |TRMANIP;expandLog;2F;43|
             |TRMANIP;expand;2F;45| (400 . |coerce|) (|Mapping| 7 40)
             (|Mapping| 7 6)
             (|PolynomialCategoryLifting| (|IndexedExponents| 40) 40 6
                 77 7)
             (405 . |map|) (412 . |coerce|) |TRMANIP;htrigs;2F;49|
             (|Union| 66 '"failed") (417 . |mainKernel|)
             (|SparseUnivariatePolynomial| $) (422 . |univariate|)
             (428 . |is?|) (|SparseUnivariatePolynomial| 77)
             (434 . |degree|) (439 . |elt|) (445 . |Zero|)
             (449 . |Zero|) (453 . =) (459 . |leadingCoefficient|)
             (464 . |reductum|) (|SparseUnivariatePolynomial| 7)
             (|Mapping| 7 77)
             (|SparseUnivariatePolynomialFunctions2| 77 7)
             (469 . |map|) (475 . |elt|) (|Factored| $)
             (481 . |squareFree|)
             (|Record| (|:| |coef| 89) (|:| |logand| 77)) (|List| 166)
             (|Factored| 77) (|FactoredFunctions| 77) (486 . |log|)
             (491 . |nullary?|) (496 . |reductum|) (501 . /)
             (507 . |leadingMonomial|) (512 . |Zero|) (|List| 8)
             (|List| 106) (516 . |eval|) (|List| 89) (523 . |eval|))
          '#(|tanh2trigh| 531 |tanh2coth| 536 |tan2trig| 541 |tan2cot|
             546 |sinh2csch| 551 |sin2csc| 556 |simplifyLog| 561
             |simplifyExp| 566 |simplify| 571 |sech2cosh| 576 |sec2cos|
             581 |removeSinhSq| 586 |removeSinSq| 591 |removeCoshSq|
             596 |removeCosSq| 601 |htrigs| 606 |expandTrigProducts|
             611 |expandPower| 616 |expandLog| 621 |expand| 626
             |csch2sinh| 631 |csc2sin| 636 |coth2trigh| 641 |coth2tanh|
             646 |cot2trig| 651 |cot2tan| 656 |cosh2sech| 661 |cos2sec|
             666)
          'NIL
          (CONS (|makeByteWordVec2| 1 'NIL)
                (CONS '#()
                      (CONS '#()
                            (|makeByteWordVec2| 180
                                '(0 8 0 9 1 7 0 8 10 1 7 0 0 13 1 7 0 0
                                  14 2 7 0 0 0 15 2 7 0 0 0 16 2 7 0 0
                                  0 17 1 7 0 18 19 2 7 0 0 0 20 2 21 0
                                  7 7 22 3 28 7 26 7 27 29 1 0 7 7 30 0
                                  7 0 31 0 7 0 32 1 8 0 33 34 2 7 35 0
                                  8 36 1 7 37 0 38 1 40 39 0 41 1 7 44
                                  0 45 2 40 35 0 8 46 2 7 0 0 18 47 1 7
                                  0 0 48 1 7 0 0 49 1 7 0 0 50 2 7 35 0
                                  8 51 1 7 52 0 53 1 7 52 0 54 1 7 56 0
                                  57 1 40 58 0 59 2 7 0 58 60 61 1 7 62
                                  0 63 0 6 0 64 2 39 7 0 18 65 1 7 66 0
                                  67 2 7 0 0 0 68 3 39 7 0 18 7 69 1 70
                                  7 7 71 1 0 7 7 72 1 39 7 0 74 1 7 75
                                  0 76 0 77 0 78 2 77 35 0 0 79 1 7 0
                                  75 80 1 7 75 0 81 1 7 0 0 82 1 77 6 0
                                  83 1 77 0 6 84 1 77 85 0 86 2 85 0 87
                                  0 88 2 77 89 0 40 90 2 7 0 89 0 91 1
                                  40 89 0 93 3 40 0 58 39 89 94 3 77 0
                                  0 40 89 95 2 77 0 0 0 96 1 7 0 0 97 3
                                  7 0 0 37 60 98 2 7 0 18 0 99 1 39 7 0
                                  100 2 7 35 0 0 101 2 85 0 0 0 102 1 7
                                  0 0 103 1 7 0 0 104 1 7 0 0 105 3 7 0
                                  0 8 106 107 4 7 0 0 8 89 106 108 1 7
                                  0 0 109 1 7 0 0 111 1 7 0 0 115 1 7 0
                                  0 117 1 7 0 0 121 1 7 0 0 123 1 7 0 0
                                  127 1 7 0 0 129 1 7 0 6 139 3 142 7
                                  140 141 77 143 1 7 0 66 144 1 7 146 0
                                  147 2 77 148 0 40 149 2 58 35 0 8 150
                                  1 151 89 0 152 2 7 0 58 60 153 0 6 0
                                  154 0 151 0 155 2 151 35 0 0 156 1
                                  151 77 0 157 1 151 0 0 158 2 161 159
                                  160 151 162 2 159 7 0 7 163 1 77 164
                                  0 165 1 169 167 168 170 1 58 35 0 171
                                  1 77 0 0 172 2 7 0 75 75 173 1 77 0 0
                                  174 0 77 0 175 3 7 0 0 176 177 178 4
                                  7 0 0 176 179 177 180 1 0 7 7 131 1 0
                                  7 7 128 1 0 7 7 119 1 0 7 7 116 1 0 7
                                  7 124 1 0 7 7 112 1 0 7 7 42 1 0 7 7
                                  92 1 0 7 7 72 1 0 7 7 126 1 0 7 7 114
                                  1 0 7 7 136 1 0 7 7 134 1 0 7 7 135 1
                                  0 7 7 133 1 0 7 7 145 1 1 7 7 30 1 0
                                  7 7 73 1 0 7 7 137 1 0 7 7 138 1 0 7
                                  7 125 1 0 7 7 113 1 0 7 7 132 1 0 7 7
                                  130 1 0 7 7 120 1 0 7 7 118 1 0 7 7
                                  122 1 0 7 7 110)))))
          '|lookupComplete|)) 
