
(/VERSIONCHECK 2) 

(DEFUN |TBAGG-;table;S;1| ($) (SPADCALL (QREFELT $ 9))) 

(DEFUN |TBAGG-;table;LS;2| (|l| $) (SPADCALL |l| (QREFELT $ 13))) 

(DEFUN |TBAGG-;insert!;R2S;3| (|p| |t| $)
  (SEQ (SPADCALL |t| (QCAR |p|) (QCDR |p|) (QREFELT $ 15)) (EXIT |t|))) 

(DEFUN |TBAGG-;indices;SL;4| (|t| $) (SPADCALL |t| (QREFELT $ 18))) 

(DEFUN |TBAGG-;coerce;SOf;5| (|t| $)
  (PROG (#0=#:G1836 |k| #1=#:G1837)
    (RETURN
      (SEQ (SPADCALL "table"
               (PROGN
                 (LETT #0# NIL . #2=(|TBAGG-;coerce;SOf;5|))
                 (SEQ (LETT |k| NIL . #2#)
                      (LETT #1# (SPADCALL |t| (QREFELT $ 18)) . #2#)
                      G190
                      (COND
                        ((OR (ATOM #1#)
                             (PROGN (LETT |k| (CAR #1#) . #2#) NIL))
                         (GO G191)))
                      (SEQ (EXIT (LETT #0#
                                       (CONS
                                        (SPADCALL
                                         (SPADCALL |k| (QREFELT $ 21))
                                         (SPADCALL
                                          (SPADCALL |t| |k|
                                           (QREFELT $ 22))
                                          (QREFELT $ 23))
                                         (QREFELT $ 24))
                                        #0#) . #2#)))
                      (LETT #1# (CDR #1#) . #2#) (GO G190) G191
                      (EXIT (NREVERSE0 #0#))))
               (QREFELT $ 26)))))) 

(DEFUN |TBAGG-;elt;SKeyEntry;6| (|t| |k| $)
  (PROG (|r|)
    (RETURN
      (SEQ (LETT |r| (SPADCALL |k| |t| (QREFELT $ 29))
                 |TBAGG-;elt;SKeyEntry;6|)
           (EXIT (COND
                   ((QEQCAR |r| 0) (QCDR |r|))
                   ('T (|error| "key not in table")))))))) 

(DEFUN |TBAGG-;elt;SKey2Entry;7| (|t| |k| |e| $)
  (PROG (|r|)
    (RETURN
      (SEQ (LETT |r| (SPADCALL |k| |t| (QREFELT $ 29))
                 |TBAGG-;elt;SKey2Entry;7|)
           (EXIT (COND ((QEQCAR |r| 0) (QCDR |r|)) ('T |e|))))))) 

(DEFUN |TBAGG-;map!;M2S;8| (|f| |t| $)
  (PROG (|k| #0=#:G1855)
    (RETURN
      (SEQ (SEQ (LETT |k| NIL . #1=(|TBAGG-;map!;M2S;8|))
                (LETT #0# (SPADCALL |t| (QREFELT $ 18)) . #1#) G190
                (COND
                  ((OR (ATOM #0#)
                       (PROGN (LETT |k| (CAR #0#) . #1#) NIL))
                   (GO G191)))
                (SEQ (EXIT (SPADCALL |t| |k|
                               (SPADCALL
                                   (SPADCALL |t| |k| (QREFELT $ 22))
                                   |f|)
                               (QREFELT $ 15))))
                (LETT #0# (CDR #0#) . #1#) (GO G190) G191 (EXIT NIL))
           (EXIT |t|))))) 

(DEFUN |TBAGG-;map;M3S;9| (|f| |s| |t| $)
  (PROG (|z| |k| #0=#:G1860)
    (RETURN
      (SEQ (LETT |z| (SPADCALL (QREFELT $ 34))
                 . #1=(|TBAGG-;map;M3S;9|))
           (SEQ (LETT |k| NIL . #1#)
                (LETT #0# (SPADCALL |s| (QREFELT $ 18)) . #1#) G190
                (COND
                  ((OR (ATOM #0#)
                       (PROGN (LETT |k| (CAR #0#) . #1#) NIL))
                   (GO G191)))
                (SEQ (EXIT (COND
                             ((SPADCALL |k| |t| (QREFELT $ 36))
                              (SPADCALL |z| |k|
                                  (SPADCALL
                                      (SPADCALL |s| |k| (QREFELT $ 22))
                                      (SPADCALL |t| |k| (QREFELT $ 22))
                                      |f|)
                                  (QREFELT $ 15))))))
                (LETT #0# (CDR #0#) . #1#) (GO G190) G191 (EXIT NIL))
           (EXIT |z|))))) 

(DEFUN |TBAGG-;parts;SL;10| (|t| $)
  (PROG (#0=#:G1869 |k| #1=#:G1870)
    (RETURN
      (SEQ (PROGN
             (LETT #0# NIL . #2=(|TBAGG-;parts;SL;10|))
             (SEQ (LETT |k| NIL . #2#)
                  (LETT #1# (SPADCALL |t| (QREFELT $ 18)) . #2#) G190
                  (COND
                    ((OR (ATOM #1#)
                         (PROGN (LETT |k| (CAR #1#) . #2#) NIL))
                     (GO G191)))
                  (SEQ (EXIT (LETT #0#
                                   (CONS
                                    (CONS |k|
                                     (SPADCALL |t| |k| (QREFELT $ 22)))
                                    #0#) . #2#)))
                  (LETT #1# (CDR #1#) . #2#) (GO G190) G191
                  (EXIT (NREVERSE0 #0#)))))))) 

(DEFUN |TBAGG-;parts;SL;11| (|t| $)
  (PROG (#0=#:G1873 |k| #1=#:G1874)
    (RETURN
      (SEQ (PROGN
             (LETT #0# NIL . #2=(|TBAGG-;parts;SL;11|))
             (SEQ (LETT |k| NIL . #2#)
                  (LETT #1# (SPADCALL |t| (QREFELT $ 18)) . #2#) G190
                  (COND
                    ((OR (ATOM #1#)
                         (PROGN (LETT |k| (CAR #1#) . #2#) NIL))
                     (GO G191)))
                  (SEQ (EXIT (LETT #0#
                                   (CONS
                                    (SPADCALL |t| |k| (QREFELT $ 22))
                                    #0#) . #2#)))
                  (LETT #1# (CDR #1#) . #2#) (GO G190) G191
                  (EXIT (NREVERSE0 #0#)))))))) 

(DEFUN |TBAGG-;entries;SL;12| (|t| $) (SPADCALL |t| (QREFELT $ 42))) 

(DEFUN |TBAGG-;=;2SB;13| (|s| |t| $)
  (PROG (|k| #0=#:G1886 |e| #1=#:G1885 #2=#:G1882)
    (RETURN
      (SEQ (EXIT (COND
                   ((SPADCALL |s| |t| (QREFELT $ 44)) 'T)
                   ((NULL (EQL (SPADCALL |s| (QREFELT $ 46))
                               (SPADCALL |t| (QREFELT $ 46))))
                    'NIL)
                   ('T
                    (SEQ (SEQ (EXIT (SEQ
                                     (LETT |k| NIL
                                      . #3=(|TBAGG-;=;2SB;13|))
                                     (LETT #0#
                                      (SPADCALL |s| (QREFELT $ 18)) . #3#)
                                     G190
                                     (COND
                                       ((OR (ATOM #0#)
                                         (PROGN
                                           (LETT |k| (CAR #0#) . #3#)
                                           NIL))
                                        (GO G191)))
                                     (SEQ
                                      (LETT |e|
                                       (SPADCALL |k| |t|
                                        (QREFELT $ 29)) . #3#)
                                      (EXIT
                                       (COND
                                         ((OR (QEQCAR |e| 1)
                                           (NULL
                                            (SPADCALL (QCDR |e|)
                                             (SPADCALL |s| |k|
                                              (QREFELT $ 22))
                                             (QREFELT $ 47))))
                                          (PROGN
                                            (LETT #2#
                                             (PROGN
                                               (LETT #1# 'NIL . #3#)
                                               (GO #1#)) . #3#)
                                            (GO #2#))))))
                                     (LETT #0# (CDR #0#) . #3#)
                                     (GO G190) G191 (EXIT NIL)))
                              #2# (EXIT #2#))
                         (EXIT 'T)))))
           #1# (EXIT #1#))))) 

(DEFUN |TBAGG-;map;M2S;14| (|f| |t| $)
  (PROG (|z| |k| #0=#:G1893 |ke|)
    (RETURN
      (SEQ (LETT |z| (SPADCALL (QREFELT $ 34))
                 . #1=(|TBAGG-;map;M2S;14|))
           (SEQ (LETT |k| NIL . #1#)
                (LETT #0# (SPADCALL |t| (QREFELT $ 18)) . #1#) G190
                (COND
                  ((OR (ATOM #0#)
                       (PROGN (LETT |k| (CAR #0#) . #1#) NIL))
                   (GO G191)))
                (SEQ (LETT |ke|
                           (SPADCALL
                               (CONS |k|
                                     (SPADCALL |t| |k| (QREFELT $ 22)))
                               |f|) . #1#)
                     (EXIT (SPADCALL |z| (QCAR |ke|) (QCDR |ke|)
                               (QREFELT $ 15))))
                (LETT #0# (CDR #0#) . #1#) (GO G190) G191 (EXIT NIL))
           (EXIT |z|))))) 

(DEFUN |TBAGG-;map!;M2S;15| (|f| |t| $)
  (PROG (|k| #0=#:G1902 #1=#:G1896 |lke| |ke| #2=#:G1903)
    (RETURN
      (SEQ (LETT |lke| NIL . #3=(|TBAGG-;map!;M2S;15|))
           (SEQ (LETT |k| NIL . #3#)
                (LETT #0# (SPADCALL |t| (QREFELT $ 18)) . #3#) G190
                (COND
                  ((OR (ATOM #0#)
                       (PROGN (LETT |k| (CAR #0#) . #3#) NIL))
                   #4=(GO G191)))
                (SEQ (EXIT (LETT |lke|
                                 (CONS (SPADCALL
                                        (CONS |k|
                                         (PROG2
                                          (LETT #1#
                                           (SPADCALL |k| |t|
                                            (QREFELT $ 51)) . #3#)
                                          (QCDR #1#)
                                           (|check-union|
                                            (QEQCAR #1# 0)
                                            (QREFELT $ 8) #1#)))
                                        |f|)
                                       |lke|) . #3#)))
                (LETT #0# (CDR #0#) . #3#) #5=(GO G190) G191
                (EXIT NIL))
           (SEQ (LETT |ke| NIL . #3#) (LETT #2# |lke| . #3#) G190
                (COND
                  ((OR (ATOM #2#)
                       (PROGN (LETT |ke| (CAR #2#) . #3#) NIL))
                   #4#))
                (SEQ (EXIT (SPADCALL |t| (QCAR |ke|) (QCDR |ke|)
                               (QREFELT $ 15))))
                (LETT #2# (CDR #2#) . #3#) #5# G191 (EXIT NIL))
           (EXIT |t|))))) 

(DEFUN |TBAGG-;inspect;SR;16| (|t| $)
  (PROG (|ks|)
    (RETURN
      (SEQ (LETT |ks| (SPADCALL |t| (QREFELT $ 18))
                 |TBAGG-;inspect;SR;16|)
           (EXIT (COND
                   ((NULL |ks|)
                    (|error| "Cannot extract from an empty aggregate"))
                   ('T
                    (CONS (|SPADfirst| |ks|)
                          (SPADCALL |t| (|SPADfirst| |ks|)
                              (QREFELT $ 22)))))))))) 

(DEFUN |TBAGG-;find;MSU;17| (|f| |t| $)
  (PROG (|ke| #0=#:G1919 #1=#:G1918)
    (RETURN
      (SEQ (EXIT (SEQ (SEQ (LETT |ke| NIL . #2=(|TBAGG-;find;MSU;17|))
                           (LETT #0#
                                 (SPADCALL |t| (QREFELT $ 54)) . #2#)
                           G190
                           (COND
                             ((OR (ATOM #0#)
                                  (PROGN
                                    (LETT |ke| (CAR #0#) . #2#)
                                    NIL))
                              (GO G191)))
                           (SEQ (EXIT (COND
                                        ((SPADCALL |ke| |f|)
                                         (PROGN
                                           (LETT #1#
                                            (CONS 0 |ke|) . #2#)
                                           (GO #1#))))))
                           (LETT #0# (CDR #0#) . #2#) (GO G190) G191
                           (EXIT NIL))
                      (EXIT (CONS 1 "failed"))))
           #1# (EXIT #1#))))) 

(DEFUN |TBAGG-;index?;KeySB;18| (|k| |t| $)
  (QEQCAR (SPADCALL |k| |t| (QREFELT $ 29)) 0)) 

(DEFUN |TBAGG-;remove!;R2S;19| (|x| |t| $)
  (SEQ (COND
         ((SPADCALL |x| |t| (QREFELT $ 59))
          (SPADCALL (QCAR |x|) |t| (QREFELT $ 51))))
       (EXIT |t|))) 

(DEFUN |TBAGG-;extract!;SR;20| (|t| $)
  (PROG (|k|)
    (RETURN
      (SEQ (LETT |k| (SPADCALL |t| (QREFELT $ 61))
                 |TBAGG-;extract!;SR;20|)
           (SPADCALL (QCAR |k|) |t| (QREFELT $ 51)) (EXIT |k|))))) 

(DEFUN |TBAGG-;any?;MSB;21| (|f| |t| $)
  (PROG (|k| #0=#:G1936 #1=#:G1935)
    (RETURN
      (SEQ (EXIT (SEQ (SEQ (LETT |k| NIL . #2=(|TBAGG-;any?;MSB;21|))
                           (LETT #0#
                                 (SPADCALL |t| (QREFELT $ 18)) . #2#)
                           G190
                           (COND
                             ((OR (ATOM #0#)
                                  (PROGN
                                    (LETT |k| (CAR #0#) . #2#)
                                    NIL))
                              (GO G191)))
                           (SEQ (EXIT (COND
                                        ((SPADCALL
                                          (SPADCALL |t| |k|
                                           (QREFELT $ 22))
                                          |f|)
                                         (PROGN
                                           (LETT #1# 'T . #2#)
                                           (GO #1#))))))
                           (LETT #0# (CDR #0#) . #2#) (GO G190) G191
                           (EXIT NIL))
                      (EXIT 'NIL)))
           #1# (EXIT #1#))))) 

(DEFUN |TBAGG-;every?;MSB;22| (|f| |t| $)
  (PROG (|k| #0=#:G1941 #1=#:G1940)
    (RETURN
      (SEQ (EXIT (SEQ (SEQ (LETT |k| NIL . #2=(|TBAGG-;every?;MSB;22|))
                           (LETT #0#
                                 (SPADCALL |t| (QREFELT $ 18)) . #2#)
                           G190
                           (COND
                             ((OR (ATOM #0#)
                                  (PROGN
                                    (LETT |k| (CAR #0#) . #2#)
                                    NIL))
                              (GO G191)))
                           (SEQ (EXIT (COND
                                        ((COND
                                           ((SPADCALL
                                             (SPADCALL |t| |k|
                                              (QREFELT $ 22))
                                             |f|)
                                            'NIL)
                                           ('T 'T))
                                         (PROGN
                                           (LETT #1# 'NIL . #2#)
                                           (GO #1#))))))
                           (LETT #0# (CDR #0#) . #2#) (GO G190) G191
                           (EXIT NIL))
                      (EXIT 'T)))
           #1# (EXIT #1#))))) 

(DEFUN |TBAGG-;count;MSNni;23| (|f| |t| $)
  (PROG (|k| #0=#:G1945 |tally|)
    (RETURN
      (SEQ (LETT |tally| 0 . #1=(|TBAGG-;count;MSNni;23|))
           (SEQ (LETT |k| NIL . #1#)
                (LETT #0# (SPADCALL |t| (QREFELT $ 18)) . #1#) G190
                (COND
                  ((OR (ATOM #0#)
                       (PROGN (LETT |k| (CAR #0#) . #1#) NIL))
                   (GO G191)))
                (SEQ (EXIT (COND
                             ((SPADCALL
                                  (SPADCALL |t| |k| (QREFELT $ 22))
                                  |f|)
                              (LETT |tally| (+ |tally| 1) . #1#)))))
                (LETT #0# (CDR #0#) . #1#) (GO G190) G191 (EXIT NIL))
           (EXIT |tally|))))) 

(DEFUN |TableAggregate&| (|#1| |#2| |#3|)
  (PROG (DV$1 DV$2 DV$3 |dv$| $ |pv$|)
    (RETURN
      (PROGN
        (LETT DV$1 (|devaluate| |#1|) . #0=(|TableAggregate&|))
        (LETT DV$2 (|devaluate| |#2|) . #0#)
        (LETT DV$3 (|devaluate| |#3|) . #0#)
        (LETT |dv$| (LIST '|TableAggregate&| DV$1 DV$2 DV$3) . #0#)
        (LETT $ (GETREFV 67) . #0#)
        (QSETREFV $ 0 |dv$|)
        (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #0#))
        (|stuffDomainSlots| $)
        (QSETREFV $ 6 |#1|)
        (QSETREFV $ 7 |#2|)
        (QSETREFV $ 8 |#3|)
        (COND
          ((|HasCategory| |#1| '(|finiteAggregate|))
           (PROGN
             (QSETREFV $ 39
                 (CONS (|dispatchFunction| |TBAGG-;parts;SL;10|) $))
             (QSETREFV $ 41
                 (CONS (|dispatchFunction| |TBAGG-;parts;SL;11|) $))
             (QSETREFV $ 43
                 (CONS (|dispatchFunction| |TBAGG-;entries;SL;12|) $))
             (QSETREFV $ 48
                 (CONS (|dispatchFunction| |TBAGG-;=;2SB;13|) $))
             (QSETREFV $ 50
                 (CONS (|dispatchFunction| |TBAGG-;map;M2S;14|) $))
             (QSETREFV $ 52
                 (CONS (|dispatchFunction| |TBAGG-;map!;M2S;15|) $))
             (QSETREFV $ 53
                 (CONS (|dispatchFunction| |TBAGG-;inspect;SR;16|) $))
             (QSETREFV $ 57
                 (CONS (|dispatchFunction| |TBAGG-;find;MSU;17|) $))
             (QSETREFV $ 58
                 (CONS (|dispatchFunction| |TBAGG-;index?;KeySB;18|) $))
             (QSETREFV $ 60
                 (CONS (|dispatchFunction| |TBAGG-;remove!;R2S;19|) $))
             (QSETREFV $ 62
                 (CONS (|dispatchFunction| |TBAGG-;extract!;SR;20|) $))
             (QSETREFV $ 64
                 (CONS (|dispatchFunction| |TBAGG-;any?;MSB;21|) $))
             (QSETREFV $ 65
                 (CONS (|dispatchFunction| |TBAGG-;every?;MSB;22|) $))
             (QSETREFV $ 66
                 (CONS (|dispatchFunction| |TBAGG-;count;MSNni;23|) $)))))
        $)))) 

(MAKEPROP '|TableAggregate&| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|)
             (|local| |#3|) (0 . |empty|) |TBAGG-;table;S;1|
             (|Record| (|:| |key| 7) (|:| |entry| 8)) (|List| 11)
             (4 . |dictionary|) |TBAGG-;table;LS;2| (9 . |setelt|)
             |TBAGG-;insert!;R2S;3| (|List| 7) (16 . |keys|)
             |TBAGG-;indices;SL;4| (|OutputForm|) (21 . |coerce|)
             (26 . |elt|) (32 . |coerce|) (37 . =) (|List| $)
             (43 . |prefix|) |TBAGG-;coerce;SOf;5|
             (|Union| 8 '"failed") (49 . |search|)
             |TBAGG-;elt;SKeyEntry;6| |TBAGG-;elt;SKey2Entry;7|
             (|Mapping| 8 8) |TBAGG-;map!;M2S;8| (55 . |table|)
             (|Boolean|) (59 . |key?|) (|Mapping| 8 8 8)
             |TBAGG-;map;M3S;9| (65 . |parts|) (|List| 8)
             (70 . |parts|) (75 . |parts|) (80 . |entries|)
             (85 . |eq?|) (|NonNegativeInteger|) (91 . |#|) (96 . =)
             (102 . =) (|Mapping| 11 11) (108 . |map|)
             (114 . |remove!|) (120 . |map!|) (126 . |inspect|)
             (131 . |parts|) (|Union| 11 '"failed") (|Mapping| 35 11)
             (136 . |find|) (142 . |index?|) (148 . |member?|)
             (154 . |remove!|) (160 . |inspect|) (165 . |extract!|)
             (|Mapping| 35 8) (170 . |any?|) (176 . |every?|)
             (182 . |count|))
          '#(|table| 188 |remove!| 197 |parts| 203 |map!| 213 |map| 225
             |inspect| 238 |insert!| 243 |indices| 249 |index?| 254
             |find| 260 |extract!| 266 |every?| 271 |entries| 277 |elt|
             282 |count| 295 |coerce| 301 |any?| 306 = 312)
          'NIL
          (CONS (|makeByteWordVec2| 1 'NIL)
                (CONS '#()
                      (CONS '#()
                            (|makeByteWordVec2| 66
                                '(0 6 0 9 1 6 0 12 13 3 6 8 0 7 8 15 1
                                  6 17 0 18 1 7 20 0 21 2 6 8 0 7 22 1
                                  8 20 0 23 2 20 0 0 0 24 2 20 0 0 25
                                  26 2 6 28 7 0 29 0 6 0 34 2 6 35 7 0
                                  36 1 0 12 0 39 1 0 40 0 41 1 6 40 0
                                  42 1 0 40 0 43 2 6 35 0 0 44 1 6 45 0
                                  46 2 8 35 0 0 47 2 0 35 0 0 48 2 0 0
                                  49 0 50 2 6 28 7 0 51 2 0 0 49 0 52 1
                                  0 11 0 53 1 6 12 0 54 2 0 55 56 0 57
                                  2 0 35 7 0 58 2 6 35 11 0 59 2 0 0 11
                                  0 60 1 6 11 0 61 1 0 11 0 62 2 0 35
                                  63 0 64 2 0 35 63 0 65 2 0 45 63 0 66
                                  0 0 0 10 1 0 0 12 14 2 0 0 11 0 60 1
                                  0 40 0 41 1 0 12 0 39 2 0 0 32 0 33 2
                                  0 0 49 0 52 3 0 0 37 0 0 38 2 0 0 49
                                  0 50 1 0 11 0 53 2 0 0 11 0 16 1 0 17
                                  0 19 2 0 35 7 0 58 2 0 55 56 0 57 1 0
                                  11 0 62 2 0 35 63 0 65 1 0 40 0 43 3
                                  0 8 0 7 8 31 2 0 8 0 7 30 2 0 45 63 0
                                  66 1 0 20 0 27 2 0 35 63 0 64 2 0 35
                                  0 0 48)))))
          '|lookupComplete|)) 
