
(/VERSIONCHECK 2) 

(DEFUN |CLIP;Fnan?| (|x| $) (COND ((= |x| |x|) 'NIL) ('T 'T))) 

(DEFUN |CLIP;Pnan?| (|p| $)
  (SPADCALL (CONS (|function| |CLIP;Fnan?|) $) |p| (QREFELT $ 9))) 

(DEFUN |CLIP;iClipParametric| (|pointLists| |fraction| |scale| $)
  (PROG (|yseg| |xseg| |yMax| |xMax| |yMin| |xMin| |ys| |xs| |newclip| |denn|
         |numm| |yDiff| |xDiff| |k| #1=#:G1863 |pt| |firstPt| |lastN| |clipNum|
         |den| |num| |n| |sortedList|)
    (RETURN
     (SEQ
      (COND
       ((OR (SPADCALL |fraction| (|spadConstant| $ 11) (QREFELT $ 12))
            (SPADCALL (|spadConstant| $ 13) |fraction| (QREFELT $ 12)))
        (|error| "clipDraw: fraction should be between 0 and 1"))
       ('T
        (COND
         ((NULL |pointLists|)
          (VECTOR NIL (SPADCALL 0.0 0.0 (QREFELT $ 16))
                  (SPADCALL 0.0 0.0 (QREFELT $ 16))))
         (#2='T
          (SEQ
           (LETT |sortedList|
                 (SPADCALL (CONS #'|CLIP;iClipParametric!0| $)
                           (SPADCALL (CONS #'|CLIP;iClipParametric!1| $)
                                     (SPADCALL |pointLists| (QREFELT $ 22))
                                     (QREFELT $ 24))
                           (QREFELT $ 26))
                 . #3=(|CLIP;iClipParametric|))
           (EXIT
            (COND
             ((NULL |sortedList|)
              (VECTOR NIL (SPADCALL 0.0 0.0 (QREFELT $ 16))
                      (SPADCALL 0.0 0.0 (QREFELT $ 16))))
             (#2#
              (SEQ (LETT |n| (LENGTH |sortedList|) . #3#)
                   (LETT |num| (SPADCALL |fraction| (QREFELT $ 28)) . #3#)
                   (LETT |den| (SPADCALL |fraction| (QREFELT $ 29)) . #3#)
                   (LETT |clipNum|
                         (QUOTIENT2 (SPADCALL |n| |num| (QREFELT $ 31)) |den|)
                         . #3#)
                   (LETT |lastN| (- (- |n| 1) |clipNum|) . #3#)
                   (LETT |firstPt| (|SPADfirst| |sortedList|) . #3#)
                   (LETT |xMin| (SPADCALL |firstPt| (QREFELT $ 33)) . #3#)
                   (LETT |xMax| (SPADCALL |firstPt| (QREFELT $ 33)) . #3#)
                   (LETT |yMin| (SPADCALL |firstPt| (QREFELT $ 34)) . #3#)
                   (LETT |yMax| (SPADCALL |firstPt| (QREFELT $ 34)) . #3#)
                   (SEQ (LETT |pt| NIL . #3#)
                        (LETT #1# (CDR |sortedList|) . #3#) (LETT |k| 0 . #3#)
                        G190
                        (COND
                         ((OR (QSGREATERP |k| |lastN|) (ATOM #1#)
                              (PROGN (LETT |pt| (CAR #1#) . #3#) NIL))
                          (GO G191)))
                        (SEQ
                         (LETT |xMin|
                               (MIN |xMin| (SPADCALL |pt| (QREFELT $ 33)))
                               . #3#)
                         (LETT |xMax|
                               (MAX |xMax| (SPADCALL |pt| (QREFELT $ 33)))
                               . #3#)
                         (LETT |yMin|
                               (MIN |yMin| (SPADCALL |pt| (QREFELT $ 34)))
                               . #3#)
                         (EXIT
                          (LETT |yMax|
                                (MAX |yMax| (SPADCALL |pt| (QREFELT $ 34)))
                                . #3#)))
                        (LETT |k|
                              (PROG1 (QSADD1 |k|) (LETT #1# (CDR #1#) . #3#))
                              . #3#)
                        (GO G190) G191 (EXIT NIL))
                   (LETT |xDiff| (- |xMax| |xMin|) . #3#)
                   (LETT |yDiff| (- |yMax| |yMin|) . #3#)
                   (EXIT
                    (COND
                     ((= |xDiff| 0.0)
                      (COND
                       ((= |yDiff| 0.0)
                        (VECTOR |pointLists|
                                (SPADCALL (- |xMin| 1.0) (+ |xMax| 1.0)
                                          (QREFELT $ 16))
                                (SPADCALL (- |yMin| 1.0) (+ |yMax| 1.0)
                                          (QREFELT $ 16))))
                       (#2#
                        (VECTOR |pointLists|
                                (SPADCALL (- |xMin| 1.0) (+ |xMax| 1.0)
                                          (QREFELT $ 16))
                                (SPADCALL |yMin| |yMax| (QREFELT $ 16))))))
                     ((= |yDiff| 0.0)
                      (VECTOR |pointLists|
                              (SPADCALL |xMin| |xMax| (QREFELT $ 16))
                              (SPADCALL (- |yMin| 1.0) (+ |yMax| 1.0)
                                        (QREFELT $ 16))))
                     (#2#
                      (SEQ
                       (LETT |numm| (SPADCALL |scale| (QREFELT $ 28)) . #3#)
                       (LETT |denn| (SPADCALL |scale| (QREFELT $ 29)) . #3#)
                       (LETT |xMin|
                             (- |xMin|
                                (/
                                 (* (FLOAT |numm| MOST-POSITIVE-DOUBLE-FLOAT)
                                    |xDiff|)
                                 (FLOAT |denn| MOST-POSITIVE-DOUBLE-FLOAT)))
                             . #3#)
                       (LETT |xMax|
                             (+ |xMax|
                                (/
                                 (* (FLOAT |numm| MOST-POSITIVE-DOUBLE-FLOAT)
                                    |xDiff|)
                                 (FLOAT |denn| MOST-POSITIVE-DOUBLE-FLOAT)))
                             . #3#)
                       (LETT |yMin|
                             (- |yMin|
                                (/
                                 (* (FLOAT |numm| MOST-POSITIVE-DOUBLE-FLOAT)
                                    |yDiff|)
                                 (FLOAT |denn| MOST-POSITIVE-DOUBLE-FLOAT)))
                             . #3#)
                       (LETT |yMax|
                             (+ |yMax|
                                (/
                                 (* (FLOAT |numm| MOST-POSITIVE-DOUBLE-FLOAT)
                                    |yDiff|)
                                 (FLOAT |denn| MOST-POSITIVE-DOUBLE-FLOAT)))
                             . #3#)
                       (LETT |newclip|
                             (SPADCALL |pointLists| |xMin| |xMax| |yMin| |yMax|
                                       (QREFELT $ 37))
                             . #3#)
                       (EXIT
                        (COND
                         ((< (LENGTH |pointLists|)
                             (LENGTH (QVELT |newclip| 0)))
                          |newclip|)
                         (#2#
                          (SEQ
                           (LETT |xs|
                                 (SPADCALL (ELT $ 33) |sortedList|
                                           (QREFELT $ 41))
                                 . #3#)
                           (LETT |ys|
                                 (SPADCALL (ELT $ 34) |sortedList|
                                           (QREFELT $ 41))
                                 . #3#)
                           (LETT |xMin|
                                 (SPADCALL (ELT $ 42) |xs| (QREFELT $ 44))
                                 . #3#)
                           (LETT |yMin|
                                 (SPADCALL (ELT $ 42) |ys| (QREFELT $ 44))
                                 . #3#)
                           (LETT |xMax|
                                 (SPADCALL (ELT $ 45) |xs| (QREFELT $ 44))
                                 . #3#)
                           (LETT |yMax|
                                 (SPADCALL (ELT $ 45) |ys| (QREFELT $ 44))
                                 . #3#)
                           (LETT |xseg| (SPADCALL |xMin| |xMax| (QREFELT $ 46))
                                 . #3#)
                           (LETT |yseg| (SPADCALL |yMin| |yMax| (QREFELT $ 46))
                                 . #3#)
                           (EXIT
                            (VECTOR |pointLists| |xseg|
                                    |yseg|))))))))))))))))))))))) 

(DEFUN |CLIP;iClipParametric!1| (|z| $)
  (COND ((|CLIP;Pnan?| |z| $) (|spadConstant| $ 18))
        ('T (|spadConstant| $ 19)))) 

(DEFUN |CLIP;iClipParametric!0| (|x| |y| $)
  (SPADCALL (|CLIP;norm| |x| $) (|CLIP;norm| |y| $) (QREFELT $ 17))) 

(DEFUN |CLIP;point| (|xx| |yy| $)
  (PROG (|l|)
    (RETURN
     (SPADCALL (LETT |l| (LIST |xx| |yy|) |CLIP;point|) (QREFELT $ 47))))) 

(DEFUN |CLIP;intersectWithHorizLine| (|x1| |y1| |x2| |y2| |yy| $)
  (COND ((= |x1| |x2|) (|CLIP;point| |x1| |yy| $))
        ('T
         (|CLIP;point|
          (+ |x1| (/ (* (- |x2| |x1|) (- |yy| |y1|)) (- |y2| |y1|))) |yy| $)))) 

(DEFUN |CLIP;intersectWithVertLine| (|x1| |y1| |x2| |y2| |xx| $)
  (COND ((= |y1| |y2|) (|CLIP;point| |xx| |y1| $))
        ('T
         (|CLIP;point| |xx|
          (+ |y1| (/ (* (- |y2| |y1|) (- |xx| |x1|)) (- |x2| |x1|))) $)))) 

(DEFUN |CLIP;intersectWithBdry| (|xMin| |xMax| |yMin| |yMax| |pt1| |pt2| $)
  (PROG (|y2| |x2| |y1| |x1|)
    (RETURN
     (SEQ
      (LETT |x1| (SPADCALL |pt1| (QREFELT $ 33))
            . #1=(|CLIP;intersectWithBdry|))
      (LETT |y1| (SPADCALL |pt1| (QREFELT $ 34)) . #1#)
      (LETT |x2| (SPADCALL |pt2| (QREFELT $ 33)) . #1#)
      (LETT |y2| (SPADCALL |pt2| (QREFELT $ 34)) . #1#)
      (COND
       ((< |yMax| |y2|)
        (SEQ
         (LETT |pt2|
               (|CLIP;intersectWithHorizLine| |x1| |y1| |x2| |y2| |yMax| $)
               . #1#)
         (LETT |x2| (SPADCALL |pt2| (QREFELT $ 33)) . #1#)
         (EXIT (LETT |y2| (SPADCALL |pt2| (QREFELT $ 34)) . #1#)))))
      (COND
       ((< |y2| |yMin|)
        (SEQ
         (LETT |pt2|
               (|CLIP;intersectWithHorizLine| |x1| |y1| |x2| |y2| |yMin| $)
               . #1#)
         (LETT |x2| (SPADCALL |pt2| (QREFELT $ 33)) . #1#)
         (EXIT (LETT |y2| (SPADCALL |pt2| (QREFELT $ 34)) . #1#)))))
      (COND
       ((< |xMax| |x2|)
        (SEQ
         (LETT |pt2|
               (|CLIP;intersectWithVertLine| |x1| |y1| |x2| |y2| |xMax| $)
               . #1#)
         (LETT |x2| (SPADCALL |pt2| (QREFELT $ 33)) . #1#)
         (EXIT (LETT |y2| (SPADCALL |pt2| (QREFELT $ 34)) . #1#)))))
      (COND
       ((< |x2| |xMin|)
        (LETT |pt2| (|CLIP;intersectWithVertLine| |x1| |y1| |x2| |y2| |xMin| $)
              . #1#)))
      (EXIT |pt2|))))) 

(DEFUN |CLIP;discardAndSplit|
       (|pointList| |pred| |xMin| |xMax| |yMin| |yMax| $)
  (PROG (|list| |lastPt?| |lastPt| |ans| |bdryPt| |pt|)
    (RETURN
     (SEQ (LETT |ans| NIL . #1=(|CLIP;discardAndSplit|))
          (LETT |list| NIL . #1#) (LETT |lastPt?| 'NIL . #1#)
          (LETT |lastPt| (|CLIP;point| 0.0 0.0 $) . #1#)
          (SEQ G190
               (COND
                ((NULL (COND ((NULL |pointList|) 'NIL) ('T 'T))) (GO G191)))
               (SEQ (LETT |pt| (|SPADfirst| |pointList|) . #1#)
                    (LETT |pointList| (CDR |pointList|) . #1#)
                    (EXIT
                     (COND
                      ((SPADCALL |pt| |pred|)
                       (SEQ
                        (COND
                         ((NULL |list|)
                          (COND
                           (|lastPt?|
                            (LETT |bdryPt|
                                  (|CLIP;intersectWithBdry| |xMin| |xMax|
                                   |yMin| |yMax| |pt| |lastPt| $)
                                  . #1#)))))
                        (EXIT (LETT |list| (CONS |pt| |list|) . #1#))))
                      ('T
                       (SEQ
                        (COND
                         ((NULL (NULL |list|))
                          (SEQ
                           (LETT |bdryPt|
                                 (|CLIP;intersectWithBdry| |xMin| |xMax| |yMin|
                                  |yMax| (|SPADfirst| |list|) |pt| $)
                                 . #1#)
                           (EXIT (LETT |ans| (CONS |list| |ans|) . #1#)))))
                        (LETT |lastPt| |pt| . #1#) (LETT |lastPt?| 'T . #1#)
                        (EXIT (LETT |list| NIL . #1#)))))))
               NIL (GO G190) G191 (EXIT NIL))
          (EXIT
           (COND ((NULL |list|) |ans|)
                 ('T (NREVERSE (CONS (NREVERSE |list|) |ans|))))))))) 

(DEFUN |CLIP;clip;P2FR;9| (|plot| |fraction| |scale| $)
  (PROG (|yMax| |yMin| #1=#:G1902 |pt| #2=#:G1901 |list| |lists| |xMax| |xMin|
         |denn| |numm| |yDiff| |clipNum| |den| |num| |n| |sortedList|
         |pointList| |pointLists| |xVals|)
    (RETURN
     (SEQ
      (COND
       ((OR (SPADCALL |fraction| (|spadConstant| $ 11) (QREFELT $ 12))
            (SPADCALL (SPADCALL 1 2 (QREFELT $ 48)) |fraction| (QREFELT $ 12)))
        (|error| "clipDraw: fraction should be between 0 and 1/2"))
       ('T
        (SEQ
         (LETT |xVals| (SPADCALL |plot| (QREFELT $ 50))
               . #3=(|CLIP;clip;P2FR;9|))
         (EXIT
          (COND
           ((NULL (LETT |pointLists| (SPADCALL |plot| (QREFELT $ 51)) . #3#))
            (VECTOR NIL |xVals| (SPADCALL 0.0 0.0 (QREFELT $ 16))))
           ((SPADCALL
             (LETT |pointLists| (SPADCALL |plot| (QREFELT $ 51)) . #3#) 1
             (QREFELT $ 52))
            (|error| "clipDraw: plot has more than one branch"))
           ((NULL (LETT |pointList| (|SPADfirst| |pointLists|) . #3#))
            (VECTOR NIL |xVals| (SPADCALL 0.0 0.0 (QREFELT $ 16))))
           (#4='T
            (SEQ
             (LETT |sortedList|
                   (SPADCALL (CONS #'|CLIP;clip;P2FR;9!0| $) |pointList|
                             (QREFELT $ 26))
                   . #3#)
             (LETT |n| (LENGTH |sortedList|) . #3#)
             (LETT |num| (SPADCALL |fraction| (QREFELT $ 28)) . #3#)
             (LETT |den| (SPADCALL |fraction| (QREFELT $ 29)) . #3#)
             (LETT |clipNum|
                   (QUOTIENT2 (SPADCALL |n| |num| (QREFELT $ 31)) |den|) . #3#)
             (LETT |yMin|
                   (SPADCALL (SPADCALL |sortedList| |clipNum| (QREFELT $ 53))
                             (QREFELT $ 34))
                   . #3#)
             (LETT |yMax|
                   (SPADCALL
                    (SPADCALL |sortedList| (- (- |n| 1) |clipNum|)
                              (QREFELT $ 53))
                    (QREFELT $ 34))
                   . #3#)
             (COND ((|CLIP;Fnan?| |yMin| $) (LETT |yMin| 0.0 . #3#)))
             (COND ((|CLIP;Fnan?| |yMax| $) (LETT |yMax| 0.0 . #3#)))
             (LETT |yDiff| (- |yMax| |yMin|) . #3#)
             (EXIT
              (COND
               ((= |yDiff| 0.0)
                (VECTOR |pointLists| (SPADCALL |plot| (QREFELT $ 50))
                        (SPADCALL (- |yMin| 1.0) (+ |yMax| 1.0)
                                  (QREFELT $ 16))))
               (#4#
                (SEQ (LETT |numm| (SPADCALL |scale| (QREFELT $ 28)) . #3#)
                     (LETT |denn| (SPADCALL |scale| (QREFELT $ 29)) . #3#)
                     (LETT |xMin| (SPADCALL |xVals| (QREFELT $ 54)) . #3#)
                     (LETT |xMax| (SPADCALL |xVals| (QREFELT $ 55)) . #3#)
                     (LETT |yMin|
                           (- |yMin|
                              (/
                               (* (FLOAT |numm| MOST-POSITIVE-DOUBLE-FLOAT)
                                  |yDiff|)
                               (FLOAT |denn| MOST-POSITIVE-DOUBLE-FLOAT)))
                           . #3#)
                     (LETT |yMax|
                           (+ |yMax|
                              (/
                               (* (FLOAT |numm| MOST-POSITIVE-DOUBLE-FLOAT)
                                  |yDiff|)
                               (FLOAT |denn| MOST-POSITIVE-DOUBLE-FLOAT)))
                           . #3#)
                     (LETT |lists|
                           (|CLIP;discardAndSplit| |pointList|
                            (CONS #'|CLIP;clip;P2FR;9!1|
                                  (VECTOR |yMin| |yMax| $))
                            |xMin| |xMax| |yMin| |yMax| $)
                           . #3#)
                     (LETT |yMin|
                           (SPADCALL
                            (SPADCALL |sortedList| |clipNum| (QREFELT $ 53))
                            (QREFELT $ 34))
                           . #3#)
                     (LETT |yMax|
                           (SPADCALL
                            (SPADCALL |sortedList| (- (- |n| 1) |clipNum|)
                                      (QREFELT $ 53))
                            (QREFELT $ 34))
                           . #3#)
                     (COND ((|CLIP;Fnan?| |yMin| $) (LETT |yMin| 0.0 . #3#)))
                     (COND ((|CLIP;Fnan?| |yMax| $) (LETT |yMax| 0.0 . #3#)))
                     (SEQ (LETT |list| NIL . #3#) (LETT #2# |lists| . #3#) G190
                          (COND
                           ((OR (ATOM #2#)
                                (PROGN (LETT |list| (CAR #2#) . #3#) NIL))
                            #5=(GO G191)))
                          (SEQ
                           (EXIT
                            (SEQ (LETT |pt| NIL . #3#) (LETT #1# |list| . #3#)
                                 G190
                                 (COND
                                  ((OR (ATOM #1#)
                                       (PROGN (LETT |pt| (CAR #1#) . #3#) NIL))
                                   #5#))
                                 (SEQ
                                  (EXIT
                                   (COND
                                    ((NULL
                                      (|CLIP;Fnan?|
                                       (SPADCALL |pt| (QREFELT $ 34)) $))
                                     (SEQ
                                      (LETT |yMin|
                                            (MIN |yMin|
                                                 (SPADCALL |pt|
                                                           (QREFELT $ 34)))
                                            . #3#)
                                      (EXIT
                                       (LETT |yMax|
                                             (MAX |yMax|
                                                  (SPADCALL |pt|
                                                            (QREFELT $ 34)))
                                             . #3#)))))))
                                 (LETT #1# (CDR #1#) . #3#) #6=(GO G190) G191
                                 (EXIT NIL))))
                          (LETT #2# (CDR #2#) . #3#) #6# G191 (EXIT NIL))
                     (EXIT
                      (VECTOR |lists| |xVals|
                              (SPADCALL |yMin| |yMax|
                                        (QREFELT $ 16))))))))))))))))))) 

(DEFUN |CLIP;clip;P2FR;9!1| (|x| $$)
  (PROG ($ |yMax| |yMin|)
    (LETT $ (QREFELT $$ 2) . #1=(|CLIP;clip;P2FR;9|))
    (LETT |yMax| (QREFELT $$ 1) . #1#)
    (LETT |yMin| (QREFELT $$ 0) . #1#)
    (RETURN
     (PROGN
      (COND
       ((SPADCALL (SPADCALL |x| (QREFELT $ 34)) |yMax| (QREFELT $ 17))
        (SPADCALL |yMin| (SPADCALL |x| (QREFELT $ 34)) (QREFELT $ 17)))
       ('T (|spadConstant| $ 18))))))) 

(DEFUN |CLIP;clip;P2FR;9!0| (|x| |y| $)
  (SPADCALL (SPADCALL |x| (QREFELT $ 34)) (SPADCALL |y| (QREFELT $ 34))
            (QREFELT $ 17))) 

(DEFUN |CLIP;clip;PR;10| (|plot| $)
  (SPADCALL |plot| (SPADCALL 1 4 (QREFELT $ 48)) (SPADCALL 5 1 (QREFELT $ 48))
            (QREFELT $ 56))) 

(DEFUN |CLIP;norm| (|pt| $)
  (PROG (|r| |y| |x|)
    (RETURN
     (SEQ (LETT |x| (SPADCALL |pt| (QREFELT $ 33)) . #1=(|CLIP;norm|))
          (LETT |y| (SPADCALL |pt| (QREFELT $ 34)) . #1#)
          (COND
           ((|CLIP;Fnan?| |x| $)
            (COND ((|CLIP;Fnan?| |y| $) (LETT |r| 0.0 . #1#))
                  (#2='T (LETT |r| (SPADCALL |y| 2 (QREFELT $ 59)) . #1#))))
           ((|CLIP;Fnan?| |y| $)
            (LETT |r| (SPADCALL |x| 2 (QREFELT $ 59)) . #1#))
           (#2#
            (LETT |r|
                  (+ (SPADCALL |x| 2 (QREFELT $ 59))
                     (SPADCALL |y| 2 (QREFELT $ 59)))
                  . #1#)))
          (EXIT |r|))))) 

(DEFUN |CLIP;findPt| (|lists| $)
  (PROG (#1=#:G1916 #2=#:G1914 #3=#:G1918 #4=#:G1920 |p| #5=#:G1919 |list|)
    (RETURN
     (SEQ
      (EXIT
       (SEQ
        (SEQ
         (EXIT
          (SEQ (LETT |list| NIL . #6=(|CLIP;findPt|)) (LETT #5# |lists| . #6#)
               G190
               (COND
                ((OR (ATOM #5#) (PROGN (LETT |list| (CAR #5#) . #6#) NIL))
                 #7=(GO G191)))
               (SEQ
                (EXIT
                 (COND
                  ((NULL (NULL |list|))
                   (PROGN
                    (LETT #1#
                          (SEQ
                           (EXIT
                            (SEQ (LETT |p| NIL . #6#) (LETT #4# |list| . #6#)
                                 G190
                                 (COND
                                  ((OR (ATOM #4#)
                                       (PROGN (LETT |p| (CAR #4#) . #6#) NIL))
                                   #7#))
                                 (SEQ
                                  (EXIT
                                   (COND
                                    ((NULL (|CLIP;Pnan?| |p| $))
                                     (PROGN
                                      (LETT #2#
                                            (PROGN
                                             (LETT #3# (CONS 0 |p|) . #6#)
                                             (GO #3#))
                                            . #6#)
                                      (GO #2#))))))
                                 (LETT #4# (CDR #4#) . #6#) #8=(GO G190) G191
                                 (EXIT NIL)))
                           #2# (EXIT #2#))
                          . #6#)
                    (GO #1#))))))
               (LETT #5# (CDR #5#) . #6#) #8# G191 (EXIT NIL)))
         #1# (EXIT #1#))
        (EXIT (CONS 1 "failed"))))
      #3# (EXIT #3#))))) 

(DEFUN |CLIP;clipWithRanges;L4DfR;13|
       (|pointLists| |xMin| |xMax| |yMin| |yMax| $)
  (PROG (#1=#:G1955 |pt| #2=#:G1954 |list| |firstPt| |lists| #3=#:G1953
         |pointList|)
    (RETURN
     (SEQ (LETT |lists| NIL . #4=(|CLIP;clipWithRanges;L4DfR;13|))
          (SEQ (LETT |pointList| NIL . #4#) (LETT #3# |pointLists| . #4#) G190
               (COND
                ((OR (ATOM #3#) (PROGN (LETT |pointList| (CAR #3#) . #4#) NIL))
                 #5=(GO G191)))
               (SEQ
                (EXIT
                 (LETT |lists|
                       (SPADCALL |lists|
                                 (|CLIP;discardAndSplit| |pointList|
                                  (CONS #'|CLIP;clipWithRanges;L4DfR;13!0|
                                        (VECTOR |yMin| |yMax| |xMin| $ |xMax|))
                                  |xMin| |xMax| |yMin| |yMax| $)
                                 (QREFELT $ 60))
                       . #4#)))
               (LETT #3# (CDR #3#) . #4#) #6=(GO G190) G191 (EXIT NIL))
          (LETT |pt| (|CLIP;findPt| |lists| $) . #4#)
          (EXIT
           (COND
            ((QEQCAR |pt| 1)
             (VECTOR NIL (SPADCALL 0.0 0.0 (QREFELT $ 16))
                     (SPADCALL 0.0 0.0 (QREFELT $ 16))))
            ('T
             (SEQ (LETT |firstPt| (QCDR |pt|) . #4#)
                  (LETT |xMin| (SPADCALL |firstPt| (QREFELT $ 33)) . #4#)
                  (LETT |xMax| (SPADCALL |firstPt| (QREFELT $ 33)) . #4#)
                  (LETT |yMin| (SPADCALL |firstPt| (QREFELT $ 34)) . #4#)
                  (LETT |yMax| (SPADCALL |firstPt| (QREFELT $ 34)) . #4#)
                  (SEQ (LETT |list| NIL . #4#) (LETT #2# |lists| . #4#) G190
                       (COND
                        ((OR (ATOM #2#)
                             (PROGN (LETT |list| (CAR #2#) . #4#) NIL))
                         #5#))
                       (SEQ
                        (EXIT
                         (SEQ (LETT |pt| NIL . #4#) (LETT #1# |list| . #4#)
                              G190
                              (COND
                               ((OR (ATOM #1#)
                                    (PROGN (LETT |pt| (CAR #1#) . #4#) NIL))
                                #5#))
                              (SEQ
                               (EXIT
                                (COND
                                 ((NULL (|CLIP;Pnan?| |pt| $))
                                  (SEQ
                                   (LETT |xMin|
                                         (MIN |xMin|
                                              (SPADCALL |pt| (QREFELT $ 33)))
                                         . #4#)
                                   (LETT |xMax|
                                         (MAX |xMax|
                                              (SPADCALL |pt| (QREFELT $ 33)))
                                         . #4#)
                                   (LETT |yMin|
                                         (MIN |yMin|
                                              (SPADCALL |pt| (QREFELT $ 34)))
                                         . #4#)
                                   (EXIT
                                    (LETT |yMax|
                                          (MAX |yMax|
                                               (SPADCALL |pt| (QREFELT $ 34)))
                                          . #4#)))))))
                              (LETT #1# (CDR #1#) . #4#) #6# G191 (EXIT NIL))))
                       (LETT #2# (CDR #2#) . #4#) #6# G191 (EXIT NIL))
                  (EXIT
                   (VECTOR |lists| (SPADCALL |xMin| |xMax| (QREFELT $ 16))
                           (SPADCALL |yMin| |yMax| (QREFELT $ 16)))))))))))) 

(DEFUN |CLIP;clipWithRanges;L4DfR;13!0| (|x| $$)
  (PROG (|xMax| $ |xMin| |yMax| |yMin|)
    (LETT |xMax| (QREFELT $$ 4) . #1=(|CLIP;clipWithRanges;L4DfR;13|))
    (LETT $ (QREFELT $$ 3) . #1#)
    (LETT |xMin| (QREFELT $$ 2) . #1#)
    (LETT |yMax| (QREFELT $$ 1) . #1#)
    (LETT |yMin| (QREFELT $$ 0) . #1#)
    (RETURN
     (PROGN
      (COND
       ((OR (SPADCALL |xMax| (SPADCALL |x| (QREFELT $ 33)) (QREFELT $ 17))
            (OR (SPADCALL (SPADCALL |x| (QREFELT $ 33)) |xMin| (QREFELT $ 17))
                (OR
                 (SPADCALL |yMax| (SPADCALL |x| (QREFELT $ 34)) (QREFELT $ 17))
                 (SPADCALL (SPADCALL |x| (QREFELT $ 34)) |yMin|
                           (QREFELT $ 17)))))
        (|spadConstant| $ 18))
       ('T (|spadConstant| $ 19))))))) 

(DEFUN |CLIP;clipParametric;P2FR;14| (|plot| |fraction| |scale| $)
  (|CLIP;iClipParametric| (SPADCALL |plot| (QREFELT $ 51)) |fraction| |scale|
   $)) 

(DEFUN |CLIP;clipParametric;PR;15| (|plot| $)
  (SPADCALL |plot| (SPADCALL 1 2 (QREFELT $ 48)) (SPADCALL 5 1 (QREFELT $ 48))
            (QREFELT $ 61))) 

(DEFUN |CLIP;clip;LR;16| (|l| $)
  (|CLIP;iClipParametric| (SPADCALL |l| (QREFELT $ 63))
   (SPADCALL 1 2 (QREFELT $ 48)) (SPADCALL 5 1 (QREFELT $ 48)) $)) 

(DEFUN |CLIP;clip;LR;17| (|l| $)
  (|CLIP;iClipParametric| |l| (SPADCALL 1 2 (QREFELT $ 48))
   (SPADCALL 5 1 (QREFELT $ 48)) $)) 

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

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

(MAKEPROP '|TwoDimensionalPlotClipping| '|infovec|
          (LIST
           '#(NIL NIL NIL NIL NIL NIL (|Boolean|) (|Mapping| 6 14) (|Point| 14)
              (0 . |any?|) (|Fraction| 27) (6 . |Zero|) (10 . <) (16 . |One|)
              (|DoubleFloat|) (|Segment| 14) (20 . |segment|) (26 . <)
              (32 . |false|) (36 . |true|) (|List| $) (|List| 8)
              (40 . |concat|) (|Mapping| 6 8) (45 . |select|) (|Mapping| 6 8 8)
              (51 . |sort|) (|Integer|) (57 . |numer|) (62 . |denom|)
              (|NonNegativeInteger|) (67 . *) (|PointPackage| 14)
              (73 . |xCoord|) (78 . |yCoord|)
              (|Record| (|:| |brans| 36) (|:| |xValues| 15) (|:| |yValues| 15))
              (|List| 21) |CLIP;clipWithRanges;L4DfR;13| (|List| 14)
              (|Mapping| 14 8) (|ListFunctions2| 8 14) (83 . |map|)
              (89 . |min|) (|Mapping| 14 14 14) (95 . |reduce|) (101 . |max|)
              (107 . SEGMENT) (113 . |point|) (118 . /) (|Plot|)
              (124 . |xRange|) (129 . |listBranches|) (134 . |more?|)
              (140 . |elt|) (146 . |lo|) (151 . |hi|) |CLIP;clip;P2FR;9|
              |CLIP;clip;PR;10| (|PositiveInteger|) (156 . ^) (162 . |concat|)
              |CLIP;clipParametric;P2FR;14| |CLIP;clipParametric;PR;15|
              (168 . |list|) |CLIP;clip;LR;16| |CLIP;clip;LR;17|)
           '#(|clipWithRanges| 173 |clipParametric| 182 |clip| 194) 'NIL
           (CONS (|makeByteWordVec2| 1 'NIL)
                 (CONS '#()
                       (CONS '#()
                             (|makeByteWordVec2| 65
                                                 '(2 8 6 7 0 9 0 10 0 11 2 10 6
                                                   0 0 12 0 10 0 13 2 15 0 14
                                                   14 16 2 14 6 0 0 17 0 6 0 18
                                                   0 6 0 19 1 21 0 20 22 2 21 0
                                                   23 0 24 2 21 0 25 0 26 1 10
                                                   27 0 28 1 10 27 0 29 2 27 0
                                                   30 0 31 1 32 14 8 33 1 32 14
                                                   8 34 2 40 38 39 21 41 2 14 0
                                                   0 0 42 2 38 14 43 0 44 2 14
                                                   0 0 0 45 2 15 0 14 14 46 1 8
                                                   0 38 47 2 10 0 27 27 48 1 49
                                                   15 0 50 1 49 36 0 51 2 36 6
                                                   0 30 52 2 21 8 0 27 53 1 15
                                                   14 0 54 1 15 14 0 55 2 14 0
                                                   0 58 59 2 36 0 0 0 60 1 36 0
                                                   21 63 5 0 35 36 14 14 14 14
                                                   37 1 0 35 49 62 3 0 35 49 10
                                                   10 61 1 0 35 49 57 3 0 35 49
                                                   10 10 56 1 0 35 36 65 1 0 35
                                                   21 64)))))
           '|lookupComplete|)) 

(MAKEPROP '|TwoDimensionalPlotClipping| 'NILADIC T) 
