
(/VERSIONCHECK 2) 

(PUT '|IARRAY1;#;$Nni;1| '|SPADreplace| 'QVSIZE) 

(DEFUN |IARRAY1;#;$Nni;1| (|x| $) (QVSIZE |x|)) 

(DEFUN |IARRAY1;fill!;$S$;2| (|x| |s| $)
  (PROG (#1=#:G1809 |i|)
    (RETURN
     (SEQ
      (SEQ (LETT |i| 0 . #2=(|IARRAY1;fill!;$S$;2|))
           (LETT #1# (QVMAXINDEX |x|) . #2#) G190
           (COND ((QSGREATERP |i| #1#) (GO G191)))
           (SEQ (EXIT (SETELT |x| |i| |s|))) (LETT |i| (QSADD1 |i|) . #2#)
           (GO G190) G191 (EXIT NIL))
      (EXIT |x|))))) 

(DEFUN |IARRAY1;minIndex;$I;3| (|x| $) (QREFELT $ 7)) 

(PUT '|IARRAY1;empty;$;4| '|SPADreplace| '(XLAM NIL (MAKE-ARRAY 0))) 

(DEFUN |IARRAY1;empty;$;4| ($) (MAKE-ARRAY 0)) 

(PUT '|IARRAY1;new;NniS$;5| '|SPADreplace| 'MAKEARR1) 

(DEFUN |IARRAY1;new;NniS$;5| (|n| |s| $) (MAKEARR1 |n| |s|)) 

(DEFUN |IARRAY1;map!;M2$;6| (|f| |s1| $)
  (PROG (|i| |n|)
    (RETURN
     (SEQ (LETT |n| (QVMAXINDEX |s1|) . #1=(|IARRAY1;map!;M2$;6|))
          (EXIT
           (COND ((< |n| 0) |s1|)
                 ('T
                  (SEQ
                   (SEQ (LETT |i| 0 . #1#) G190
                        (COND ((QSGREATERP |i| |n|) (GO G191)))
                        (SEQ
                         (EXIT
                          (SETELT |s1| |i| (SPADCALL (ELT |s1| |i|) |f|))))
                        (LETT |i| (QSADD1 |i|) . #1#) (GO G190) G191
                        (EXIT NIL))
                   (EXIT |s1|))))))))) 

(DEFUN |IARRAY1;map;M2$;7| (|f| |s1| $)
  (PROG (|i| |ss2| |n|)
    (RETURN
     (SEQ (LETT |n| (QVMAXINDEX |s1|) . #1=(|IARRAY1;map;M2$;7|))
          (EXIT
           (COND ((< |n| 0) |s1|)
                 ('T
                  (SEQ (LETT |ss2| (MAKE-ARRAY (+ |n| 1)) . #1#)
                       (SEQ (LETT |i| 0 . #1#) G190
                            (COND ((QSGREATERP |i| |n|) (GO G191)))
                            (SEQ
                             (EXIT
                              (SETELT |ss2| |i|
                                      (SPADCALL (ELT |s1| |i|) |f|))))
                            (LETT |i| (QSADD1 |i|) . #1#) (GO G190) G191
                            (EXIT NIL))
                       (EXIT |ss2|))))))))) 

(DEFUN |IARRAY1;map;M3$;8| (|f| |a| |b| $)
  (PROG (|i| |c| |maxind|)
    (RETURN
     (SEQ
      (LETT |maxind| (MIN (QVMAXINDEX |a|) (QVMAXINDEX |b|))
            . #1=(|IARRAY1;map;M3$;8|))
      (EXIT
       (COND ((< |maxind| 0) (SPADCALL (QREFELT $ 13)))
             ('T
              (SEQ (LETT |c| (MAKE-ARRAY (+ |maxind| 1)) . #1#)
                   (SEQ (LETT |i| 0 . #1#) G190
                        (COND ((QSGREATERP |i| |maxind|) (GO G191)))
                        (SEQ
                         (EXIT
                          (SETELT |c| |i|
                                  (SPADCALL (ELT |a| |i|) (ELT |b| |i|) |f|))))
                        (LETT |i| (QSADD1 |i|) . #1#) (GO G190) G191
                        (EXIT NIL))
                   (EXIT |c|))))))))) 

(PUT '|IARRAY1;qelt;$IS;9| '|SPADreplace| 'ELT) 

(DEFUN |IARRAY1;qelt;$IS;9| (|x| |i| $) (ELT |x| |i|)) 

(PUT '|IARRAY1;qsetelt!;$I2S;10| '|SPADreplace| 'SETELT) 

(DEFUN |IARRAY1;qsetelt!;$I2S;10| (|x| |i| |s| $) (SETELT |x| |i| |s|)) 

(DEFUN |IARRAY1;elt;$IS;11| (|x| |i| $)
  (COND
   ((OR (MINUSP |i|) (< (SPADCALL |x| (QREFELT $ 23)) |i|))
    (|error| "index out of range"))
   ('T (SPADCALL |x| |i| (QREFELT $ 21))))) 

(DEFUN |IARRAY1;setelt;$I2S;12| (|x| |i| |s| $)
  (COND
   ((OR (MINUSP |i|) (< (SPADCALL |x| (QREFELT $ 23)) |i|))
    (|error| "index out of range"))
   ('T (SPADCALL |x| |i| |s| (QREFELT $ 22))))) 

(PUT '|IARRAY1;maxIndex;$I;13| '|SPADreplace| 'QVSIZE) 

(DEFUN |IARRAY1;maxIndex;$I;13| (|x| $) (QVSIZE |x|)) 

(DEFUN |IARRAY1;qelt;$IS;14| (|x| |i| $) (ELT |x| (- |i| 1))) 

(DEFUN |IARRAY1;qsetelt!;$I2S;15| (|x| |i| |s| $) (SETELT |x| (- |i| 1) |s|)) 

(DEFUN |IARRAY1;elt;$IS;16| (|x| |i| $)
  (COND
   ((OR (QSLESSP |i| 1) (QSLESSP (QVSIZE |x|) |i|))
    (|error| "index out of range"))
   ('T (ELT |x| (- |i| 1))))) 

(DEFUN |IARRAY1;setelt;$I2S;17| (|x| |i| |s| $)
  (COND
   ((OR (QSLESSP |i| 1) (QSLESSP (QVSIZE |x|) |i|))
    (|error| "index out of range"))
   ('T (SETELT |x| (- |i| 1) |s|)))) 

(DEFUN |IARRAY1;qelt;$IS;18| (|x| |i| $) (ELT |x| (- |i| (QREFELT $ 7)))) 

(DEFUN |IARRAY1;qsetelt!;$I2S;19| (|x| |i| |s| $)
  (SETELT |x| (- |i| (QREFELT $ 7)) |s|)) 

(DEFUN |IARRAY1;elt;$IS;20| (|x| |i| $)
  (COND
   ((OR (< |i| (QREFELT $ 7)) (< (SPADCALL |x| (QREFELT $ 23)) |i|))
    (|error| "index out of range"))
   ('T (SPADCALL |x| |i| (QREFELT $ 21))))) 

(DEFUN |IARRAY1;setelt;$I2S;21| (|x| |i| |s| $)
  (COND
   ((OR (< |i| (QREFELT $ 7)) (< (SPADCALL |x| (QREFELT $ 23)) |i|))
    (|error| "index out of range"))
   ('T (SPADCALL |x| |i| |s| (QREFELT $ 22))))) 

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

(DEFUN |IndexedOneDimensionalArray;| (|#1| |#2|)
  (PROG (#1=#:G1867 |pv$| #2=#:G1866 $ |dv$| DV$2 DV$1)
    (RETURN
     (PROGN
      (LETT DV$1 (|devaluate| |#1|) . #3=(|IndexedOneDimensionalArray|))
      (LETT DV$2 (|devaluate| |#2|) . #3#)
      (LETT |dv$| (LIST '|IndexedOneDimensionalArray| DV$1 DV$2) . #3#)
      (LETT $ (GETREFV 41) . #3#)
      (QSETREFV $ 0 |dv$|)
      (QSETREFV $ 3
                (LETT |pv$|
                      (|buildPredVector| 0 0
                                         (LIST
                                          (|HasCategory| |#1| '(|SetCategory|))
                                          (|HasCategory| |#1|
                                                         '(|ConvertibleTo|
                                                           (|InputForm|)))
                                          (LETT #2#
                                                (|HasCategory| |#1|
                                                               '(|OrderedSet|))
                                                . #3#)
                                          (OR #2#
                                              (|HasCategory| |#1|
                                                             '(|SetCategory|)))
                                          (|HasCategory| (|Integer|)
                                                         '(|OrderedSet|))
                                          (AND
                                           (|HasCategory| |#1|
                                                          (LIST '|Evalable|
                                                                (|devaluate|
                                                                 |#1|)))
                                           (|HasCategory| |#1|
                                                          '(|SetCategory|)))
                                          (OR
                                           (AND
                                            (|HasCategory| |#1|
                                                           (LIST '|Evalable|
                                                                 (|devaluate|
                                                                  |#1|)))
                                            #2#)
                                           (AND
                                            (|HasCategory| |#1|
                                                           (LIST '|Evalable|
                                                                 (|devaluate|
                                                                  |#1|)))
                                            (|HasCategory| |#1|
                                                           '(|SetCategory|))))))
                      . #3#))
      (|haddProp| |$ConstructorCache| '|IndexedOneDimensionalArray|
                  (LIST DV$1 DV$2) (CONS 1 $))
      (|stuffDomainSlots| $)
      (QSETREFV $ 6 |#1|)
      (QSETREFV $ 7 |#2|)
      (AND (LETT #1# (|HasCategory| $ '(|finiteAggregate|)) . #3#)
           (|augmentPredVector| $ 128))
      (AND (|HasCategory| |#1| '(|SetCategory|)) #1#
           (|augmentPredVector| $ 256))
      (AND (|HasCategory| $ '(|shallowlyMutable|)) (|augmentPredVector| $ 512))
      (AND #2# (|HasCategory| $ '(|shallowlyMutable|))
           (|augmentPredVector| $ 1024))
      (QSETREFV $ 20 (ZEROP |#2|))
      (COND
       ((QREFELT $ 20)
        (PROGN
         (QSETREFV $ 21 (CONS (|dispatchFunction| |IARRAY1;qelt;$IS;9|) $))
         (QSETREFV $ 22
                   (CONS (|dispatchFunction| |IARRAY1;qsetelt!;$I2S;10|) $))
         (QSETREFV $ 24 (CONS (|dispatchFunction| |IARRAY1;elt;$IS;11|) $))
         (QSETREFV $ 25
                   (CONS (|dispatchFunction| |IARRAY1;setelt;$I2S;12|) $))))
       ((EQL |#2| 1)
        (PROGN
         (QSETREFV $ 23 (CONS (|dispatchFunction| |IARRAY1;maxIndex;$I;13|) $))
         (QSETREFV $ 21 (CONS (|dispatchFunction| |IARRAY1;qelt;$IS;14|) $))
         (QSETREFV $ 22
                   (CONS (|dispatchFunction| |IARRAY1;qsetelt!;$I2S;15|) $))
         (QSETREFV $ 24 (CONS (|dispatchFunction| |IARRAY1;elt;$IS;16|) $))
         (QSETREFV $ 25
                   (CONS (|dispatchFunction| |IARRAY1;setelt;$I2S;17|) $))))
       ('T
        (PROGN
         (QSETREFV $ 21 (CONS (|dispatchFunction| |IARRAY1;qelt;$IS;18|) $))
         (QSETREFV $ 22
                   (CONS (|dispatchFunction| |IARRAY1;qsetelt!;$I2S;19|) $))
         (QSETREFV $ 24 (CONS (|dispatchFunction| |IARRAY1;elt;$IS;20|) $))
         (QSETREFV $ 25
                   (CONS (|dispatchFunction| |IARRAY1;setelt;$I2S;21|) $)))))
      $)))) 

(MAKEPROP '|IndexedOneDimensionalArray| '|infovec|
          (LIST
           '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|)
              (|NonNegativeInteger|) |IARRAY1;#;$Nni;1| |IARRAY1;fill!;$S$;2|
              (|Integer|) |IARRAY1;minIndex;$I;3| |IARRAY1;empty;$;4|
              |IARRAY1;new;NniS$;5| (|Mapping| 6 6) |IARRAY1;map!;M2$;6|
              |IARRAY1;map;M2$;7| (|Mapping| 6 6 6) |IARRAY1;map;M3$;8|
              '#:G1802 (0 . |qelt|) (6 . |qsetelt!|) (13 . |maxIndex|)
              (18 . |elt|) (24 . |setelt|) (|Boolean|) (|List| 6)
              (|Equation| 6) (|List| 28) (|Mapping| 26 6) (|Mapping| 26 6 6)
              (|UniversalSegment| 11) (|Void|) (|InputForm|) (|OutputForm|)
              (|String|) (|SingleInteger|) (|List| $) (|Union| 6 '"failed")
              (|List| 11))
           '#(~= 31 |swap!| 37 |sorted?| 44 |sort!| 55 |sort| 66 |smaller?| 77
              |size?| 83 |setelt| 89 |select| 103 |sample| 109 |reverse!| 113
              |reverse| 118 |removeDuplicates| 123 |remove| 128 |reduce| 140
              |qsetelt!| 161 |qelt| 168 |position| 174 |parts| 193 |new| 198
              |more?| 204 |minIndex| 210 |min| 215 |merge| 221 |members| 234
              |member?| 239 |maxIndex| 245 |max| 250 |map!| 256 |map| 262
              |less?| 275 |latex| 281 |insert| 286 |indices| 300 |index?| 305
              |hash| 311 |first| 316 |find| 321 |fill!| 327 |every?| 333 |eval|
              339 |eq?| 365 |entry?| 371 |entries| 377 |empty?| 382 |empty| 387
              |elt| 391 |delete| 410 |count| 422 |copyInto!| 434 |copy| 441
              |convert| 446 |construct| 451 |concat| 456 |coerce| 479 |any?|
              484 >= 490 > 496 = 502 <= 508 < 514 |#| 520)
           'NIL
           (CONS
            (|makeByteWordVec2| 7 '(0 0 0 0 0 3 0 3 0 0 7 4 0 0 0 0 7 1 2 4))
            (CONS
             '#(|OneDimensionalArrayAggregate&| |FiniteLinearAggregate&|
                |LinearAggregate&| |IndexedAggregate&| |Collection&|
                |OrderedSet&| |HomogeneousAggregate&| NIL |Aggregate&|
                |EltableAggregate&| |Evalable&| |SetCategory&| NIL NIL NIL NIL
                |InnerEvalable&| NIL NIL |BasicType&|)
             (CONS
              '#((|OneDimensionalArrayAggregate| 6) (|FiniteLinearAggregate| 6)
                 (|LinearAggregate| 6) (|IndexedAggregate| 11 6)
                 (|Collection| 6) (|OrderedSet|) (|HomogeneousAggregate| 6)
                 (|Comparable|) (|Aggregate|) (|EltableAggregate| 11 6)
                 (|Evalable| 6) (|SetCategory|) (|shallowlyMutable|)
                 (|finiteAggregate|) (|Type|) (|Eltable| 11 6)
                 (|InnerEvalable| 6 6) (|CoercibleTo| 35) (|ConvertibleTo| 34)
                 (|BasicType|))
              (|makeByteWordVec2| 40
                                  '(2 0 6 0 11 21 3 0 6 0 11 6 22 1 0 11 0 23 2
                                    0 6 0 11 24 3 0 6 0 11 6 25 2 1 26 0 0 1 3
                                    10 33 0 11 11 1 1 3 26 0 1 2 0 26 31 0 1 1
                                    11 0 0 1 2 10 0 31 0 1 1 3 0 0 1 2 0 0 31 0
                                    1 2 3 26 0 0 1 2 0 26 0 8 1 3 10 6 0 32 6 1
                                    3 10 6 0 11 6 25 2 8 0 30 0 1 0 0 0 1 1 10
                                    0 0 1 1 0 0 0 1 1 9 0 0 1 2 9 0 6 0 1 2 8 0
                                    30 0 1 4 9 6 18 0 6 6 1 3 8 6 18 0 6 1 2 8
                                    6 18 0 1 3 10 6 0 11 6 22 2 0 6 0 11 21 2 1
                                    11 6 0 1 3 1 11 6 0 11 1 2 0 11 30 0 1 1 8
                                    27 0 1 2 0 0 8 6 14 2 0 26 0 8 1 1 5 11 0
                                    12 2 3 0 0 0 1 2 3 0 0 0 1 3 0 0 31 0 0 1 1
                                    8 27 0 1 2 9 26 6 0 1 1 5 11 0 23 2 3 0 0 0
                                    1 2 10 0 15 0 16 3 0 0 18 0 0 19 2 0 0 15 0
                                    17 2 0 26 0 8 1 1 1 36 0 1 3 0 0 0 0 11 1 3
                                    0 0 6 0 11 1 1 0 40 0 1 2 0 26 11 0 1 1 1
                                    37 0 1 1 5 6 0 1 2 0 39 30 0 1 2 10 0 0 6
                                    10 2 8 26 30 0 1 3 6 0 0 27 27 1 2 6 0 0 28
                                    1 3 6 0 0 6 6 1 2 6 0 0 29 1 2 0 26 0 0 1 2
                                    9 26 6 0 1 1 0 27 0 1 1 0 26 0 1 0 0 0 13 2
                                    0 0 0 32 1 2 0 6 0 11 24 3 0 6 0 11 6 1 2 0
                                    0 0 11 1 2 0 0 0 32 1 2 9 8 6 0 1 2 8 8 30
                                    0 1 3 10 0 0 0 11 1 1 0 0 0 1 1 2 34 0 1 1
                                    0 0 27 1 1 0 0 38 1 2 0 0 6 0 1 2 0 0 0 0 1
                                    2 0 0 0 6 1 1 1 35 0 1 2 8 26 30 0 1 2 3 26
                                    0 0 1 2 3 26 0 0 1 2 1 26 0 0 1 2 3 26 0 0
                                    1 2 3 26 0 0 1 1 8 8 0 9)))))
           '|lookupComplete|)) 
