
(/VERSIONCHECK 2) 

(DEFUN |RDIST;weighted;LM;1| (|lvw| $)
  (PROG (|t| |r| #0=#:G1832 |u| |w| |kl| |n| |kv| |wv| |i| |k|
             #1=#:G1833 |totwt|)
    (RETURN
      (SEQ (LETT |t| (SPADCALL (QREFELT $ 8))
                 . #2=(|RDIST;weighted;LM;1|))
           (SEQ (LETT |r| NIL . #2#) (LETT #0# |lvw| . #2#) G190
                (COND
                  ((OR (ATOM #0#)
                       (PROGN (LETT |r| (CAR #0#) . #2#) NIL))
                   #3=(GO G191)))
                (SEQ (LETT |u|
                           (SPADCALL (QCAR |r|) |t| (QREFELT $ 10)) . #2#)
                     (LETT |w|
                           (COND
                             ((QEQCAR |u| 1) (|spadConstant| $ 12))
                             ('T (QCDR |u|))) . #2#)
                     (EXIT (SPADCALL |t| (QCAR |r|)
                               (SPADCALL |w| (QCDR |r|) (QREFELT $ 13))
                               (QREFELT $ 14))))
                (LETT #0# (CDR #0#) . #2#) #4=(GO G190) G191
                (EXIT NIL))
           (LETT |kl| (SPADCALL |t| (QREFELT $ 16)) . #2#)
           (LETT |n| (SPADCALL |kl| (QREFELT $ 18)) . #2#)
           (EXIT (COND
                   ((SPADCALL |n| (|spadConstant| $ 19) (QREFELT $ 21))
                    (|error| "Cannot select from empty set"))
                   ('T
                    (SEQ (LETT |kv|
                               (SPADCALL |n|
                                   (SPADCALL |kl| (|spadConstant| $ 19)
                                    (QREFELT $ 22))
                                   (QREFELT $ 24)) . #2#)
                         (LETT |wv|
                               (SPADCALL |n| (|spadConstant| $ 19)
                                   (QREFELT $ 26)) . #2#)
                         (LETT |totwt| (|spadConstant| $ 19) . #2#)
                         (SEQ (LETT |i| (|spadConstant| $ 29) . #2#)
                              (LETT |k| NIL . #2#)
                              (LETT #1# |kl| . #2#) G190
                              (COND
                                ((OR (ATOM #1#)
                                     (PROGN
                                       (LETT |k| (CAR #1#) . #2#)
                                       NIL)
                                     (> |i| |n|))
                                 #3#))
                              (SEQ (SPADCALL |kv| |i| |k|
                                    (QREFELT $ 30))
                                   (LETT |totwt|
                                    (SPADCALL |totwt|
                                     (SPADCALL |t| |k| (QREFELT $ 31))
                                     (QREFELT $ 13)) . #2#)
                                   (EXIT
                                    (SPADCALL |wv| |i| |totwt|
                                     (QREFELT $ 32))))
                              (LETT #1#
                                    (PROG1 (CDR #1#)
                                      (LETT |i| (+ |i| 1) . #2#)) . #2#)
                              #4# G191 (EXIT NIL))
                         (EXIT (SPADCALL |kv| |wv| |totwt|
                                   (QREFELT $ 34))))))))))) 

(DEFUN |RDIST;rdHack1;VVIM;2| (|kv| |wv| |totwt| $)
  (PROG ()
    (RETURN
      (SEQ (CONS #'|RDIST;rdHack1;VVIM;2!0| (VECTOR |kv| $ |totwt|)))))) 

(DEFUN |RDIST;rdHack1;VVIM;2!0| ($$)
  (PROG ($)
    (LETT $ (QREFELT $$ 1) |RDIST;rdHack1;VVIM;2|)
    (RETURN
      (PROGN
        (PROG (|w|)
          (RETURN
            (SEQ (LETT |w| (SPADCALL (QREFELT $$ 2) (QREFELT $ 39))
                       NIL)
                 (EXIT (SPADCALL (QREFELT $$ 0) (|spadConstant| $ 40)
                           (QREFELT $ 41)))))))))) 

(DEFUN |RDIST;uniform;SM;3| (|fset| $)
  (PROG ()
    (RETURN (SEQ (CONS #'|RDIST;uniform;SM;3!0| (VECTOR $ |fset|)))))) 

(DEFUN |RDIST;uniform;SM;3!0| ($$)
  (PROG ($)
    (LETT $ (QREFELT $$ 0) |RDIST;uniform;SM;3|)
    (RETURN
      (PROGN
        (PROG (|l| |n|)
          (RETURN
            (SEQ (LETT |l| (SPADCALL (QREFELT $$ 1) (QREFELT $ 43))
                       NIL)
                 (LETT |n| (SPADCALL |l| (QREFELT $ 18)) NIL)
                 (EXIT (SPADCALL |l|
                           (SPADCALL (SPADCALL |n| (QREFELT $ 39))
                               (|spadConstant| $ 29) (QREFELT $ 13))
                           (QREFELT $ 22)))))))))) 

(DEFUN |RandomDistributions| (#0=#:G1858)
  (PROG ()
    (RETURN
      (PROG (#1=#:G1859)
        (RETURN
          (COND
            ((LETT #1#
                   (|lassocShiftWithFunction| (LIST (|devaluate| #0#))
                       (HGET |$ConstructorCache|
                             '|RandomDistributions|)
                       '|domainEqualList|)
                   . #2=(|RandomDistributions|))
             (|CDRwithIncrement| #1#))
            ('T
             (UNWIND-PROTECT
               (PROG1 (|RandomDistributions;| #0#) (LETT #1# T . #2#))
               (COND
                 ((NOT #1#)
                  (HREM |$ConstructorCache| '|RandomDistributions|))))))))))) 

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

(MAKEPROP '|RandomDistributions| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|Table| 6 11)
             (0 . |table|) (|Union| 11 '"failed") (4 . |search|)
             (|Integer|) (10 . |Zero|) (14 . +) (20 . |setelt|)
             (|List| 6) (27 . |keys|) (|NonNegativeInteger|) (32 . |#|)
             (37 . |Zero|) (|Boolean|) (41 . =) (47 . |elt|)
             (|Vector| 6) (53 . |new|) (|Vector| 11) (59 . |new|)
             (|SingleInteger|) (65 . |One|) (69 . |One|)
             (73 . |setelt|) (80 . |elt|) (86 . |setelt|) (|Mapping| 6)
             |RDIST;rdHack1;VVIM;2|
             (|Record| (|:| |value| 6) (|:| |weight| 11)) (|List| 35)
             |RDIST;weighted;LM;1| (|RandomNumberSource|)
             (93 . |randnum|) (98 . |One|) (102 . |elt|) (|Set| 6)
             (108 . |members|) (113 . |randnum|) |RDIST;uniform;SM;3|)
          '#(|weighted| 117 |uniform| 122 |rdHack1| 127) 'NIL
          (CONS (|makeByteWordVec2| 1 'NIL)
                (CONS '#()
                      (CONS '#()
                            (|makeByteWordVec2| 45
                                '(0 7 0 8 2 7 9 6 0 10 0 11 0 12 2 11 0
                                  0 0 13 3 7 11 0 6 11 14 1 7 15 0 16 1
                                  15 17 0 18 0 17 0 19 2 17 20 0 0 21 2
                                  15 6 0 11 22 2 23 0 17 6 24 2 25 0 17
                                  11 26 0 27 0 28 0 17 0 29 3 23 6 0 11
                                  6 30 2 7 11 0 6 31 3 25 11 0 11 11 32
                                  1 38 11 11 39 0 11 0 40 2 23 6 0 11
                                  41 1 42 15 0 43 0 38 11 44 1 0 33 36
                                  37 1 0 33 42 45 3 0 33 23 25 11 34)))))
          '|lookupComplete|)) 
