(declare (block) (standard-bindings) (extended-bindings))
(begin
  (declare (not safe))
  (define std/generic/dispatch#type-of
    (lambda (_obj23206_)
      (declare (not interrupts-enabled))
      (let ((_t23209_ (##type _obj23206_)))
        (if (##fx= _t23209_ (macro-type-mem1))
            (let ((_st23211_ (##subtype _obj23206_)))
              (if (##fx= _st23211_ (macro-subtype-structure))
                  (##type-id (##structure-type _obj23206_))
                  (if (##fx= _st23211_ (macro-subtype-boxvalues))
                      (if (##fx= (##vector-length _obj23206_) '1) 'box 'values)
                      (##vector-ref
                       std/generic/dispatch#+subtype-id+
                       _st23211_))))
            (if (##fx= _t23209_ (macro-type-mem2))
                'pair
                (if (##fx= _t23209_ (macro-type-fixnum))
                    'fixnum
                    (if (##char? _obj23206_)
                        'char
                        (if (##eq? _obj23206_ '())
                            'null
                            (if (##eq? _obj23206_ '#f)
                                'boolean
                                (if (##eq? _obj23206_ '#t)
                                    'boolean
                                    (if (##eq? _obj23206_ '#!void)
                                        'void
                                        (if (##eq? _obj23206_ '#!eof)
                                            'eof
                                            'unknown))))))))))))
  (define std/generic/dispatch#linear-type-of
    (lambda (_obj23198_)
      (let ((_t23200_ (##type _obj23198_)))
        (if (##fx= _t23200_ (macro-type-mem1))
            (let ((_st23202_ (##subtype _obj23198_)))
              (if (##fx= _st23202_ (macro-subtype-structure))
                  (let ((_klass23204_ (##structure-type _obj23198_)))
                    (std/generic/dispatch#type-linearize-class _klass23204_))
                  (if (##fx= _st23202_ (macro-subtype-boxvalues))
                      (if (##fx= (##vector-length _obj23198_) '1)
                          '(box t)
                          '(values t))
                      (##vector-ref
                       std/generic/dispatch#+subtype-linear+
                       _st23202_))))
            (if (##fx= _t23200_ (macro-type-mem2))
                '(pair t)
                (if (##fx= _t23200_ (macro-type-fixnum))
                    '(fixnum integer real number t)
                    (if (##char? _obj23198_)
                        '(char t)
                        (if (##eq? _obj23198_ '())
                            '(null t)
                            (if (##eq? _obj23198_ '#f)
                                '(boolean t)
                                (if (##eq? _obj23198_ '#t)
                                    '(boolean t)
                                    (if (##eq? _obj23198_ '#!void)
                                        '(void t)
                                        (if (##eq? _obj23198_ '#!eof)
                                            '(eof t)
                                            '(unknown)))))))))))))
  (define std/generic/dispatch#type-linearize-class
    (lambda (_klass23196_)
      (if (type-descriptor? _klass23196_)
          (if (type-descriptor-mixin _klass23196_)
              (std/generic/dispatch#type-linearize-class-type _klass23196_)
              (std/generic/dispatch#type-linearize-struct-type _klass23196_))
          (std/generic/dispatch#type-linearize-record-type__0 _klass23196_))))
  (define std/generic/dispatch#type-linearize-class-type
    (lambda (_klass23156_)
      (let _lp23158_ ((_rest23160_ (type-descriptor-mixin _klass23156_))
                      (_r23161_ (cons (##type-id _klass23156_) '())))
        (let* ((_rest2316223170_ _rest23160_)
               (_else2316423178_
                (lambda () (foldl1 cons '(object t) _r23161_)))
               (_K2316623184_
                (lambda (_rest23181_ _klass23182_)
                  (_lp23158_
                   _rest23181_
                   (cons (##type-id _klass23182_) _r23161_)))))
          (if (##pair? _rest2316223170_)
              (let ((_hd2316723187_ (##car _rest2316223170_))
                    (_tl2316823189_ (##cdr _rest2316223170_)))
                (let* ((_klass23192_ _hd2316723187_)
                       (_rest23194_ _tl2316823189_))
                  (_K2316623184_ _rest23194_ _klass23192_)))
              (_else2316423178_))))))
  (define std/generic/dispatch#type-linearize-struct-type
    (lambda (_klass23154_)
      (std/generic/dispatch#type-linearize-record-type__%
       _klass23154_
       '(object t))))
  (define std/generic/dispatch#type-linearize-record-type__%
    (lambda (_klass23136_ _base23137_)
      (let _lp23139_ ((_klass23141_ _klass23136_) (_r23142_ '()))
        (if (##type? _klass23141_)
            (_lp23139_
             (##type-super _klass23141_)
             (cons (##type-id _klass23141_) _r23142_))
            (foldl1 cons _base23137_ _r23142_)))))
  (define std/generic/dispatch#type-linearize-record-type__0
    (lambda (_klass23147_)
      (let ((_base23149_ '(t)))
        (std/generic/dispatch#type-linearize-record-type__%
         _klass23147_
         _base23149_))))
  (define std/generic/dispatch#type-linearize-record-type
    (lambda _g23287_
      (let ((_g23286_ (length _g23287_)))
        (cond ((##fx= _g23286_ 1)
               (apply std/generic/dispatch#type-linearize-record-type__0
                      _g23287_))
              ((##fx= _g23286_ 2)
               (apply std/generic/dispatch#type-linearize-record-type__%
                      _g23287_))
              (else
               (##raise-wrong-number-of-arguments-exception
                std/generic/dispatch#type-linearize-record-type
                _g23287_))))))
  (define std/generic/dispatch#+subtype-id+ (make-vector '32 'unknown))
  (define std/generic/dispatch#+subtype-linear+ (make-vector '32 '(unknown)))
  (vector-set!
   std/generic/dispatch#+subtype-id+
   (macro-subtype-vector)
   'vector)
  (vector-set!
   std/generic/dispatch#+subtype-linear+
   (macro-subtype-vector)
   '(vector t))
  (vector-set! std/generic/dispatch#+subtype-id+ (macro-subtype-pair) 'pair)
  (vector-set!
   std/generic/dispatch#+subtype-linear+
   (macro-subtype-pair)
   '(pair t))
  (vector-set!
   std/generic/dispatch#+subtype-id+
   (macro-subtype-ratnum)
   'ratnum)
  (vector-set!
   std/generic/dispatch#+subtype-linear+
   (macro-subtype-ratnum)
   '(ratnum real number t))
  (vector-set!
   std/generic/dispatch#+subtype-id+
   (macro-subtype-cpxnum)
   'cpxnum)
  (vector-set!
   std/generic/dispatch#+subtype-linear+
   (macro-subtype-cpxnum)
   '(cpxnum number t))
  (vector-set!
   std/generic/dispatch#+subtype-id+
   (macro-subtype-symbol)
   'symbol)
  (vector-set!
   std/generic/dispatch#+subtype-linear+
   (macro-subtype-symbol)
   '(symbol t))
  (vector-set!
   std/generic/dispatch#+subtype-id+
   (macro-subtype-keyword)
   'keyword)
  (vector-set!
   std/generic/dispatch#+subtype-linear+
   (macro-subtype-keyword)
   '(keyword t))
  (vector-set! std/generic/dispatch#+subtype-id+ (macro-subtype-frame) 'frame)
  (vector-set!
   std/generic/dispatch#+subtype-linear+
   (macro-subtype-frame)
   '(frame t))
  (vector-set!
   std/generic/dispatch#+subtype-id+
   (macro-subtype-continuation)
   'continuation)
  (vector-set!
   std/generic/dispatch#+subtype-linear+
   (macro-subtype-continuation)
   '(continuation t))
  (vector-set!
   std/generic/dispatch#+subtype-id+
   (macro-subtype-promise)
   'promise)
  (vector-set!
   std/generic/dispatch#+subtype-linear+
   (macro-subtype-promise)
   '(promise t))
  (vector-set! std/generic/dispatch#+subtype-id+ (macro-subtype-weak) 'weak)
  (vector-set!
   std/generic/dispatch#+subtype-linear+
   (macro-subtype-weak)
   '(weak t))
  (vector-set!
   std/generic/dispatch#+subtype-id+
   (macro-subtype-procedure)
   'procedure)
  (vector-set!
   std/generic/dispatch#+subtype-linear+
   (macro-subtype-procedure)
   '(procedure t))
  (vector-set!
   std/generic/dispatch#+subtype-id+
   (macro-subtype-foreign)
   'foreign)
  (vector-set!
   std/generic/dispatch#+subtype-linear+
   (macro-subtype-foreign)
   '(foreign t))
  (vector-set!
   std/generic/dispatch#+subtype-id+
   (macro-subtype-string)
   'string)
  (vector-set!
   std/generic/dispatch#+subtype-linear+
   (macro-subtype-string)
   '(string t))
  (vector-set!
   std/generic/dispatch#+subtype-id+
   (macro-subtype-s8vector)
   's8vector)
  (vector-set!
   std/generic/dispatch#+subtype-linear+
   (macro-subtype-s8vector)
   '(s8vector t))
  (vector-set!
   std/generic/dispatch#+subtype-id+
   (macro-subtype-u8vector)
   'u8vector)
  (vector-set!
   std/generic/dispatch#+subtype-linear+
   (macro-subtype-u8vector)
   '(u8vector t))
  (vector-set!
   std/generic/dispatch#+subtype-id+
   (macro-subtype-s16vector)
   's16vector)
  (vector-set!
   std/generic/dispatch#+subtype-linear+
   (macro-subtype-s16vector)
   '(s16vector t))
  (vector-set!
   std/generic/dispatch#+subtype-id+
   (macro-subtype-u16vector)
   'u16vector)
  (vector-set!
   std/generic/dispatch#+subtype-linear+
   (macro-subtype-u16vector)
   '(u16vector t))
  (vector-set!
   std/generic/dispatch#+subtype-id+
   (macro-subtype-s32vector)
   's32vector)
  (vector-set!
   std/generic/dispatch#+subtype-linear+
   (macro-subtype-s32vector)
   '(s32vector t))
  (vector-set!
   std/generic/dispatch#+subtype-id+
   (macro-subtype-u32vector)
   'u32vector)
  (vector-set!
   std/generic/dispatch#+subtype-linear+
   (macro-subtype-u32vector)
   '(u32vector t))
  (vector-set!
   std/generic/dispatch#+subtype-id+
   (macro-subtype-f32vector)
   'f32vector)
  (vector-set!
   std/generic/dispatch#+subtype-linear+
   (macro-subtype-f32vector)
   '(f32vector t))
  (vector-set!
   std/generic/dispatch#+subtype-id+
   (macro-subtype-s64vector)
   's64vector)
  (vector-set!
   std/generic/dispatch#+subtype-linear+
   (macro-subtype-s64vector)
   '(s64vector t))
  (vector-set!
   std/generic/dispatch#+subtype-id+
   (macro-subtype-u64vector)
   'u64vector)
  (vector-set!
   std/generic/dispatch#+subtype-linear+
   (macro-subtype-u64vector)
   '(u64vector t))
  (vector-set!
   std/generic/dispatch#+subtype-id+
   (macro-subtype-f64vector)
   'f64vector)
  (vector-set!
   std/generic/dispatch#+subtype-linear+
   (macro-subtype-f64vector)
   '(f64vector t))
  (vector-set!
   std/generic/dispatch#+subtype-id+
   (macro-subtype-flonum)
   'flonum)
  (vector-set!
   std/generic/dispatch#+subtype-linear+
   (macro-subtype-flonum)
   '(flonum real number t))
  (vector-set!
   std/generic/dispatch#+subtype-id+
   (macro-subtype-bignum)
   'bignum)
  (vector-set!
   std/generic/dispatch#+subtype-linear+
   (macro-subtype-bignum)
   '(bignum integer real number t))
  (define std/generic/dispatch#generic::t
    (make-struct-type
     'std/generic/dispatch#generic::t
     '#f
     '4
     'generic
     '((final: . #t))
     ':init!
     '(id tabs default mx)))
  (define std/generic/dispatch#generic?
    (make-struct-predicate std/generic/dispatch#generic::t))
  (define std/generic/dispatch#make-generic
    (lambda _$args23132_
      (apply make-struct-instance
             std/generic/dispatch#generic::t
             _$args23132_)))
  (define std/generic/dispatch#generic-id
    (make-struct-field-accessor std/generic/dispatch#generic::t '0))
  (define std/generic/dispatch#generic-tabs
    (make-struct-field-accessor std/generic/dispatch#generic::t '1))
  (define std/generic/dispatch#generic-default
    (make-struct-field-accessor std/generic/dispatch#generic::t '2))
  (define std/generic/dispatch#generic-mx
    (make-struct-field-accessor std/generic/dispatch#generic::t '3))
  (define std/generic/dispatch#generic-id-set!
    (make-struct-field-mutator std/generic/dispatch#generic::t '0))
  (define std/generic/dispatch#generic-tabs-set!
    (make-struct-field-mutator std/generic/dispatch#generic::t '1))
  (define std/generic/dispatch#generic-default-set!
    (make-struct-field-mutator std/generic/dispatch#generic::t '2))
  (define std/generic/dispatch#generic-mx-set!
    (make-struct-field-mutator std/generic/dispatch#generic::t '3))
  (define std/generic/dispatch#&generic-id
    (make-struct-field-unchecked-accessor std/generic/dispatch#generic::t '0))
  (define std/generic/dispatch#&generic-tabs
    (make-struct-field-unchecked-accessor std/generic/dispatch#generic::t '1))
  (define std/generic/dispatch#&generic-default
    (make-struct-field-unchecked-accessor std/generic/dispatch#generic::t '2))
  (define std/generic/dispatch#&generic-mx
    (make-struct-field-unchecked-accessor std/generic/dispatch#generic::t '3))
  (define std/generic/dispatch#&generic-id-set!
    (make-struct-field-unchecked-mutator std/generic/dispatch#generic::t '0))
  (define std/generic/dispatch#&generic-tabs-set!
    (make-struct-field-unchecked-mutator std/generic/dispatch#generic::t '1))
  (define std/generic/dispatch#&generic-default-set!
    (make-struct-field-unchecked-mutator std/generic/dispatch#generic::t '2))
  (define std/generic/dispatch#&generic-mx-set!
    (make-struct-field-unchecked-mutator std/generic/dispatch#generic::t '3))
  (define std/generic/dispatch#generic:::init!__%
    (lambda (_self23113_ _id23114_ _default23115_)
      (if (or (not _default23115_) (procedure? _default23115_))
          '#!void
          (error '"Bad default method; expected procedure or #f"
                 _id23114_
                 _default23115_))
      (if (##fx< '4 (##vector-length _self23113_))
          (begin
            (##vector-set! _self23113_ '1 _id23114_)
            (##vector-set! _self23113_ '2 (vector))
            (##vector-set! _self23113_ '3 _default23115_)
            (##vector-set! _self23113_ '4 (make-mutex 'generic)))
          (error '"struct-instance-init!: too many arguments for struct"
                 _self23113_))))
  (define std/generic/dispatch#generic:::init!__0
    (lambda (_self23123_ _id23124_)
      (let ((_default23126_ '#f))
        (std/generic/dispatch#generic:::init!__%
         _self23123_
         _id23124_
         _default23126_))))
  (define std/generic/dispatch#generic:::init!
    (lambda _g23289_
      (let ((_g23288_ (length _g23289_)))
        (cond ((##fx= _g23288_ 2)
               (apply std/generic/dispatch#generic:::init!__0 _g23289_))
              ((##fx= _g23288_ 3)
               (apply std/generic/dispatch#generic:::init!__% _g23289_))
              (else
               (##raise-wrong-number-of-arguments-exception
                std/generic/dispatch#generic:::init!
                _g23289_))))))
  (bind-method!
   std/generic/dispatch#generic::t
   ':init!
   std/generic/dispatch#generic:::init!
   '#f)
  (define std/generic/dispatch#generic-table::t
    (make-struct-type
     'std/generic/dispatch#generic-table::t
     '#f
     '3
     'generic-table
     '((final: . #t))
     ':init!
     '(methods cache mx)))
  (define std/generic/dispatch#generic-table?
    (make-struct-predicate std/generic/dispatch#generic-table::t))
  (define std/generic/dispatch#make-generic-table
    (lambda _$args22987_
      (apply make-struct-instance
             std/generic/dispatch#generic-table::t
             _$args22987_)))
  (define std/generic/dispatch#generic-table-methods
    (make-struct-field-accessor std/generic/dispatch#generic-table::t '0))
  (define std/generic/dispatch#generic-table-cache
    (make-struct-field-accessor std/generic/dispatch#generic-table::t '1))
  (define std/generic/dispatch#generic-table-mx
    (make-struct-field-accessor std/generic/dispatch#generic-table::t '2))
  (define std/generic/dispatch#generic-table-methods-set!
    (make-struct-field-mutator std/generic/dispatch#generic-table::t '0))
  (define std/generic/dispatch#generic-table-cache-set!
    (make-struct-field-mutator std/generic/dispatch#generic-table::t '1))
  (define std/generic/dispatch#generic-table-mx-set!
    (make-struct-field-mutator std/generic/dispatch#generic-table::t '2))
  (define std/generic/dispatch#&generic-table-methods
    (make-struct-field-unchecked-accessor
     std/generic/dispatch#generic-table::t
     '0))
  (define std/generic/dispatch#&generic-table-cache
    (make-struct-field-unchecked-accessor
     std/generic/dispatch#generic-table::t
     '1))
  (define std/generic/dispatch#&generic-table-mx
    (make-struct-field-unchecked-accessor
     std/generic/dispatch#generic-table::t
     '2))
  (define std/generic/dispatch#&generic-table-methods-set!
    (make-struct-field-unchecked-mutator
     std/generic/dispatch#generic-table::t
     '0))
  (define std/generic/dispatch#&generic-table-cache-set!
    (make-struct-field-unchecked-mutator
     std/generic/dispatch#generic-table::t
     '1))
  (define std/generic/dispatch#&generic-table-mx-set!
    (make-struct-field-unchecked-mutator
     std/generic/dispatch#generic-table::t
     '2))
  (define std/generic/dispatch#generic-table:::init!
    (lambda (_self22985_)
      (if (##fx< '3 (##vector-length _self22985_))
          (begin
            (##vector-set! _self22985_ '1 '())
            (##vector-set! _self22985_ '2 (make-vector '10 '#f))
            (##vector-set! _self22985_ '3 (make-mutex 'generic-table)))
          (error '"struct-instance-init!: too many arguments for struct"
                 _self22985_))))
  (bind-method!
   std/generic/dispatch#generic-table::t
   ':init!
   std/generic/dispatch#generic-table:::init!
   '#f)
  (define std/generic/dispatch#generic-bind!
    (lambda (_gen22844_ _signature22845_ _method22846_)
      (if (procedure? _method22846_)
          '#!void
          (error '"Bad method; expected procedure" _method22846_))
      (let ((_arity22848_ (length _signature22845_))
            (_mx22849_
             (##unchecked-structure-ref
              _gen22844_
              '4
              std/generic/dispatch#generic::t
              '#f)))
        (mutex-lock! _mx22849_)
        (let ((_tabs22851_
               (##unchecked-structure-ref
                _gen22844_
                '2
                std/generic/dispatch#generic::t
                '#f)))
          (if (##fx< _arity22848_ (##vector-length _tabs22851_))
              (let ((_$e22853_ (##vector-ref _tabs22851_ _arity22848_)))
                (if _$e22853_
                    ((lambda (_gtab22856_)
                       (std/generic/dispatch#generic-bind-method!
                        _gtab22856_
                        _signature22845_
                        _method22846_))
                     _$e22853_)
                    (let ((_gtab22858_
                           (let ((__obj23284
                                  (make-object
                                   std/generic/dispatch#generic-table::t
                                   '3)))
                             (std/generic/dispatch#generic-table:::init!
                              __obj23284)
                             __obj23284)))
                      (##vector-set! _tabs22851_ _arity22848_ _gtab22858_)
                      (std/generic/dispatch#generic-bind-method!
                       _gtab22858_
                       _signature22845_
                       _method22846_))))
              (let ((_new-tabs22860_ (make-vector (##fx+ _arity22848_ '1) '#f))
                    (_gtab22861_
                     (let ((__obj23285
                            (make-object
                             std/generic/dispatch#generic-table::t
                             '3)))
                       (std/generic/dispatch#generic-table:::init! __obj23285)
                       __obj23285)))
                (##subvector-move!
                 _tabs22851_
                 '0
                 (##vector-length _tabs22851_)
                 _new-tabs22860_
                 '0)
                (##vector-set! _new-tabs22860_ _arity22848_ _gtab22861_)
                (##unchecked-structure-set!
                 _gen22844_
                 _new-tabs22860_
                 '2
                 std/generic/dispatch#generic::t
                 '#f)
                (std/generic/dispatch#generic-bind-method!
                 _gtab22861_
                 _signature22845_
                 _method22846_))))
        (mutex-unlock! _mx22849_))))
  (define std/generic/dispatch#generic-bind-method!
    (lambda (_gtab22817_ _signature22818_ _method22819_)
      (letrec ((_invalidate?22821_
                (lambda (_cache22833_)
                  (let ((_cache-len22835_ (##vector-length _cache22833_)))
                    (let _lp22837_ ((_i22839_ '0))
                      (if (##fx< _i22839_ _cache-len22835_)
                          (let ((_$e22841_
                                 (##vector-ref _cache22833_ _i22839_)))
                            (if _$e22841_
                                _$e22841_
                                (_lp22837_ (##fx+ _i22839_ '1))))
                          '#f))))))
        (let _again22823_ ()
          (let* ((_old-methods22826_
                  (##unchecked-structure-ref
                   _gtab22817_
                   '1
                   std/generic/dispatch#generic-table::t
                   '#f))
                 (_new-methods22828_
                  (std/generic/dispatch#generic-add-method
                   _old-methods22826_
                   _signature22818_
                   _method22819_)))
            (let ((_mx22831_
                   (##unchecked-structure-ref
                    _gtab22817_
                    '3
                    std/generic/dispatch#generic-table::t
                    '#f)))
              (mutex-lock! _mx22831_)
              (if (eq? _old-methods22826_
                       (##unchecked-structure-ref
                        _gtab22817_
                        '1
                        std/generic/dispatch#generic-table::t
                        '#f))
                  (begin
                    (##unchecked-structure-set!
                     _gtab22817_
                     _new-methods22828_
                     '1
                     std/generic/dispatch#generic-table::t
                     '#f)
                    (if (_invalidate?22821_
                         (##unchecked-structure-ref
                          _gtab22817_
                          '2
                          std/generic/dispatch#generic-table::t
                          '#f))
                        (##unchecked-structure-set!
                         _gtab22817_
                         (make-vector
                          (##vector-length
                           (##unchecked-structure-ref
                            _gtab22817_
                            '2
                            std/generic/dispatch#generic-table::t
                            '#f))
                          '#f)
                         '2
                         std/generic/dispatch#generic-table::t
                         '#f)
                        '#!void)
                    (mutex-unlock! _mx22831_))
                  (begin (mutex-unlock! _mx22831_) (_again22823_)))))))))
  (define std/generic/dispatch#generic-add-method
    (lambda (_methods22748_ _signature22749_ _method22750_)
      (let _recur22752_ ((_rest22754_ _methods22748_))
        (let* ((_rest2275522763_ _rest22754_)
               (_else2275722771_
                (lambda () (cons (cons _signature22749_ _method22750_) '())))
               (_K2275922805_
                (lambda (_rest22774_ _hd22775_)
                  (let* ((_hd2277622783_ _hd22775_)
                         (_E2277822787_
                          (lambda ()
                            (error '"No clause matching" _hd2277622783_)))
                         (_K2277922793_
                          (lambda (_hd-method22790_ _hd-signature22791_)
                            (if (std/generic/dispatch#generic-dispatch-before?
                                 _signature22749_
                                 _hd-signature22791_)
                                (cons (cons _signature22749_ _method22750_)
                                      (cons _hd22775_ _rest22774_))
                                (if (equal? _signature22749_
                                            _hd-signature22791_)
                                    (cons (cons _signature22749_ _method22750_)
                                          _rest22774_)
                                    (cons _hd22775_
                                          (_recur22752_ _rest22774_)))))))
                    (if (##pair? _hd2277622783_)
                        (let ((_hd2278022796_ (##car _hd2277622783_))
                              (_tl2278122798_ (##cdr _hd2277622783_)))
                          (let* ((_hd-signature22801_ _hd2278022796_)
                                 (_hd-method22803_ _tl2278122798_))
                            (_K2277922793_
                             _hd-method22803_
                             _hd-signature22801_)))
                        (_E2277822787_))))))
          (if (##pair? _rest2275522763_)
              (let ((_hd2276022808_ (##car _rest2275522763_))
                    (_tl2276122810_ (##cdr _rest2275522763_)))
                (let* ((_hd22813_ _hd2276022808_) (_rest22815_ _tl2276122810_))
                  (_K2275922805_ _rest22815_ _hd22813_)))
              (_else2275722771_))))))
  (define std/generic/dispatch#generic-dispatch-before?
    (lambda (_sig-a22676_ _sig-b22677_)
      (let _lp22679_ ((_rest-a22681_ _sig-a22676_)
                      (_rest-b22682_ _sig-b22677_))
        (let* ((_rest-a2268322691_ _rest-a22681_)
               (_else2268522699_ (lambda () '#f))
               (_K2268722736_
                (lambda (_rest-a22702_ _type-a22703_)
                  (let* ((_rest-b2270422711_ _rest-b22682_)
                         (_E2270622715_
                          (lambda ()
                            (error '"No clause matching" _rest-b2270422711_)))
                         (_K2270722724_
                          (lambda (_rest-b22718_ _type-b22719_)
                            (if (not (std/generic/dispatch#generic-dispatch-type<?
                                      _type-b22719_
                                      _type-a22703_))
                                (let ((_$e22721_
                                       (std/generic/dispatch#generic-dispatch-type<?
                                        _type-a22703_
                                        _type-b22719_)))
                                  (if _$e22721_
                                      _$e22721_
                                      (_lp22679_ _rest-a22702_ _rest-b22718_)))
                                '#f))))
                    (if (##pair? _rest-b2270422711_)
                        (let ((_hd2270822727_ (##car _rest-b2270422711_))
                              (_tl2270922729_ (##cdr _rest-b2270422711_)))
                          (let* ((_type-b22732_ _hd2270822727_)
                                 (_rest-b22734_ _tl2270922729_))
                            (_K2270722724_ _rest-b22734_ _type-b22732_)))
                        (_E2270622715_))))))
          (if (##pair? _rest-a2268322691_)
              (let ((_hd2268822739_ (##car _rest-a2268322691_))
                    (_tl2268922741_ (##cdr _rest-a2268322691_)))
                (let* ((_type-a22744_ _hd2268822739_)
                       (_rest-a22746_ _tl2268922741_))
                  (_K2268722736_ _rest-a22746_ _type-a22744_)))
              (_else2268522699_))))))
  (define std/generic/dispatch#generic-dispatch-type<?
    (lambda (_type-a22673_ _type-b22674_)
      (memq (car _type-b22674_) _type-a22673_)))
  (define std/generic/dispatch#generic-dispatch
    (lambda (_gen22652_ . _args22653_)
      (let ((_arity22655_ (##length _args22653_))
            (_tabs22656_
             (##unchecked-structure-ref
              _gen22652_
              '2
              std/generic/dispatch#generic::t
              '#f)))
        (let ((_$e22658_
               (if (##fx< _arity22655_ (##vector-length _tabs22656_))
                   (##vector-ref _tabs22656_ _arity22655_)
                   '#f)))
          (if _$e22658_
              ((lambda (_gtab22661_)
                 (let ((_$e22663_
                        (std/generic/dispatch#generic-dispatch-method
                         _gtab22661_
                         _args22653_
                         (##unchecked-structure-ref
                          _gen22652_
                          '3
                          std/generic/dispatch#generic::t
                          '#f))))
                   (if _$e22663_
                       ((lambda (_method22666_)
                          (apply _method22666_ _args22653_))
                        _$e22663_)
                       (error '"No method matching arguments"
                              (##direct-structure-ref
                               _gen22652_
                               '1
                               std/generic/dispatch#generic::t
                               '#f)
                              _args22653_))))
               _$e22658_)
              (let ((_$e22668_
                     (##unchecked-structure-ref
                      _gen22652_
                      '3
                      std/generic/dispatch#generic::t
                      '#f)))
                (if _$e22668_
                    ((lambda (_method22671_) (apply _method22671_ _args22653_))
                     _$e22668_)
                    (error '"No method matching arguments"
                           (##direct-structure-ref
                            _gen22652_
                            '1
                            std/generic/dispatch#generic::t
                            '#f)
                           _args22653_))))))))
  (define std/generic/dispatch#generic-dispatch-method
    (lambda (_gtab22635_ _args22636_ _default22637_)
      (let ((_$e22639_
             (std/generic/dispatch#generic-dispatch-cache-lookup
              (##unchecked-structure-ref
               _gtab22635_
               '2
               std/generic/dispatch#generic-table::t
               '#f)
              _args22636_)))
        (if _$e22639_
            (values _$e22639_)
            (let* ((_methods22642_
                    (##unchecked-structure-ref
                     _gtab22635_
                     '1
                     std/generic/dispatch#generic-table::t
                     '#f))
                   (_method22647_
                    (let ((_$e22644_
                           (std/generic/dispatch#generic-dispatch-find-method
                            _methods22642_
                            _args22636_)))
                      (if _$e22644_ _$e22644_ _default22637_))))
              (if _method22647_
                  (let ((_mx22650_
                         (##unchecked-structure-ref
                          _gtab22635_
                          '3
                          std/generic/dispatch#generic-table::t
                          '#f)))
                    (mutex-lock! _mx22650_)
                    (if (eq? _methods22642_
                             (##unchecked-structure-ref
                              _gtab22635_
                              '1
                              std/generic/dispatch#generic-table::t
                              '#f))
                        (if (std/generic/dispatch#generic-dispatch-cache-lookup
                             (##unchecked-structure-ref
                              _gtab22635_
                              '2
                              std/generic/dispatch#generic-table::t
                              '#f)
                             _args22636_)
                            '#!void
                            (std/generic/dispatch#generic-dispatch-cache!
                             _gtab22635_
                             _args22636_
                             _method22647_))
                        '#!void)
                    (mutex-unlock! _mx22650_))
                  '#!void)
              _method22647_)))))
  (define std/generic/dispatch#generic-dispatch-find-method
    (lambda (_methods22565_ _args22566_)
      (let ((_arg-types22568_
             (map std/generic/dispatch#linear-type-of _args22566_)))
        (let _lp22570_ ((_rest22572_ _methods22565_))
          (let* ((_rest2257322581_ _rest22572_)
                 (_else2257522589_ (lambda () '#f))
                 (_K2257722623_
                  (lambda (_rest22592_ _hd22593_)
                    (let* ((_hd2259422601_ _hd22593_)
                           (_E2259622605_
                            (lambda ()
                              (error '"No clause matching" _hd2259422601_)))
                           (_K2259722611_
                            (lambda (_method22608_ _signature22609_)
                              (if (std/generic/dispatch#generic-dispatch-match?
                                   _arg-types22568_
                                   _signature22609_)
                                  _method22608_
                                  (_lp22570_ _rest22592_)))))
                      (if (##pair? _hd2259422601_)
                          (let ((_hd2259822614_ (##car _hd2259422601_))
                                (_tl2259922616_ (##cdr _hd2259422601_)))
                            (let* ((_signature22619_ _hd2259822614_)
                                   (_method22621_ _tl2259922616_))
                              (_K2259722611_ _method22621_ _signature22619_)))
                          (_E2259622605_))))))
            (if (##pair? _rest2257322581_)
                (let ((_hd2257822626_ (##car _rest2257322581_))
                      (_tl2257922628_ (##cdr _rest2257322581_)))
                  (let* ((_hd22631_ _hd2257822626_)
                         (_rest22633_ _tl2257922628_))
                    (_K2257722623_ _rest22633_ _hd22631_)))
                (_else2257522589_)))))))
  (define std/generic/dispatch#generic-dispatch-match?
    (lambda (_arg-types22496_ _signature22497_)
      (let _lp22499_ ((_rest-args22501_ _arg-types22496_)
                      (_rest-sign22502_ _signature22497_))
        (let* ((_rest-args2250322511_ _rest-args22501_)
               (_else2250522519_ (lambda () '#t))
               (_K2250722553_
                (lambda (_rest-args22522_ _arg-tids22523_)
                  (let* ((_rest-sign2252422531_ _rest-sign22502_)
                         (_E2252622535_
                          (lambda ()
                            (error '"No clause matching"
                                   _rest-sign2252422531_)))
                         (_K2252722541_
                          (lambda (_rest-sign22538_ _sign-tids22539_)
                            (if (memq (car _sign-tids22539_) _arg-tids22523_)
                                (_lp22499_ _rest-args22522_ _rest-sign22538_)
                                '#f))))
                    (if (##pair? _rest-sign2252422531_)
                        (let ((_hd2252822544_ (##car _rest-sign2252422531_))
                              (_tl2252922546_ (##cdr _rest-sign2252422531_)))
                          (let* ((_sign-tids22549_ _hd2252822544_)
                                 (_rest-sign22551_ _tl2252922546_))
                            (_K2252722541_ _rest-sign22551_ _sign-tids22549_)))
                        (_E2252622535_))))))
          (if (##pair? _rest-args2250322511_)
              (let ((_hd2250822556_ (##car _rest-args2250322511_))
                    (_tl2250922558_ (##cdr _rest-args2250322511_)))
                (let* ((_arg-tids22561_ _hd2250822556_)
                       (_rest-args22563_ _tl2250922558_))
                  (_K2250722553_ _rest-args22563_ _arg-tids22561_)))
              (_else2250522519_))))))
  (define std/generic/dispatch#generic-dispatch-next
    (lambda (_gen22420_ _method22421_ . _args22422_)
      (letrec ((_drop22424_
                (lambda (_method22446_ _methods22447_)
                  (let _lp22449_ ((_rest22451_ _methods22447_))
                    (let* ((_rest2245222462_ _rest22451_)
                           (_else2245422470_ (lambda () '()))
                           (_K2245622477_
                            (lambda (_rest22473_ _proc22474_ _signature22475_)
                              (if (eq? _method22446_ _proc22474_)
                                  _rest22473_
                                  (_lp22449_ _rest22473_)))))
                      (if (##pair? _rest2245222462_)
                          (let ((_hd2245722480_ (##car _rest2245222462_))
                                (_tl2245822482_ (##cdr _rest2245222462_)))
                            (if (##pair? _hd2245722480_)
                                (let ((_hd2245922485_ (##car _hd2245722480_))
                                      (_tl2246022487_ (##cdr _hd2245722480_)))
                                  (let* ((_signature22490_ _hd2245922485_)
                                         (_proc22492_ _tl2246022487_)
                                         (_rest22494_ _tl2245822482_))
                                    (_K2245622477_
                                     _rest22494_
                                     _proc22492_
                                     _signature22490_)))
                                (_else2245422470_)))
                          (_else2245422470_)))))))
        (let ((_arity22426_ (##length _args22422_))
              (_tabs22427_
               (##unchecked-structure-ref
                _gen22420_
                '2
                std/generic/dispatch#generic::t
                '#f)))
          (let ((_$e22429_
                 (if (##fx< _arity22426_ (##vector-length _tabs22427_))
                     (##vector-ref _tabs22427_ _arity22426_)
                     '#f)))
            (if _$e22429_
                ((lambda (_gtab22432_)
                   (let* ((_methods22434_
                           (_drop22424_
                            _method22421_
                            (##unchecked-structure-ref
                             _gtab22432_
                             '1
                             std/generic/dispatch#generic-table::t
                             '#f)))
                          (_$e22436_
                           (std/generic/dispatch#generic-dispatch-find-method
                            _methods22434_
                            _args22422_)))
                     (if _$e22436_
                         ((lambda (_method22439_)
                            (apply _method22439_ _args22422_))
                          _$e22436_)
                         (let ((_$e22441_
                                (##unchecked-structure-ref
                                 _gen22420_
                                 '3
                                 std/generic/dispatch#generic::t
                                 '#f)))
                           (if _$e22441_
                               ((lambda (_method22444_)
                                  (apply _method22444_ _args22422_))
                                _$e22441_)
                               (error '"No next method matching arguments"
                                      (##direct-structure-ref
                                       _gen22420_
                                       '1
                                       std/generic/dispatch#generic::t
                                       '#f)
                                      _args22422_))))))
                 _$e22429_)
                (error '"Cannot dispatch next method; no dispatch table"
                       (##direct-structure-ref
                        _gen22420_
                        '1
                        std/generic/dispatch#generic::t
                        '#f)
                       _args22422_)))))))
  (define std/generic/dispatch#generic-dispatch-cache-lookup
    (lambda (_cache22333_ _args22334_)
      (declare (not interrupts-enabled))
      (letrec ((_lookup22336_
                (lambda (_hash22340_ _shift22341_ _rest22342_)
                  (let* ((_rest2234322351_ _rest22342_)
                         (_else2234522364_
                          (lambda ()
                            (let* ((_len22359_ (##vector-length _cache22333_))
                                   (_ix22361_
                                    (##fxmodulo _hash22340_ _len22359_)))
                              (##vector-ref _cache22333_ _ix22361_))))
                         (_K2234722408_
                          (lambda (_rest22367_ _arg22368_)
                            (let* ((_tid22370_
                                    (std/generic/dispatch#type-of _arg22368_))
                                   (_hash22372_
                                    (##fxxor _hash22340_
                                             (##fxarithmetic-shift
                                              (##symbol-hash _tid22370_)
                                              _shift22341_))))
                              (let* ((_g2237422382_
                                      (_lookup22336_
                                       _hash22372_
                                       (##fx+ _shift22341_ '1)
                                       _rest22367_))
                                     (_else2237622390_ (lambda () '#f))
                                     (_K2237822396_
                                      (lambda (_xrest22393_ _xtid22394_)
                                        (if (##eq? _tid22370_ _xtid22394_)
                                            _xrest22393_
                                            '#f))))
                                (if (##pair? _g2237422382_)
                                    (let ((_hd2237922399_
                                           (##car _g2237422382_))
                                          (_tl2238022401_
                                           (##cdr _g2237422382_)))
                                      (let* ((_xtid22404_ _hd2237922399_)
                                             (_xrest22406_ _tl2238022401_))
                                        (_K2237822396_
                                         _xrest22406_
                                         _xtid22404_)))
                                    (_else2237622390_)))))))
                    (if (##pair? _rest2234322351_)
                        (let ((_hd2234822411_ (##car _rest2234322351_))
                              (_tl2234922413_ (##cdr _rest2234322351_)))
                          (let* ((_arg22416_ _hd2234822411_)
                                 (_rest22418_ _tl2234922413_))
                            (_K2234722408_ _rest22418_ _arg22416_)))
                        (_else2234522364_))))))
        (let ((_proc22338_ (_lookup22336_ '0 '0 _args22334_)))
          (if (##procedure? _proc22338_) _proc22338_ '#f)))))
  (define std/generic/dispatch#generic-dispatch-cache!
    (lambda (_gtab22306_ _args22307_ _method22308_)
      (let* ((_arg-types22310_ (map std/generic/dispatch#type-of _args22307_))
             (_entry22312_ (foldl1 cons _method22308_ _arg-types22310_))
             (_hash22318_
              (foldl2 (lambda (_tid22314_ _shift22315_ _r22316_)
                        (##fxxor _r22316_
                                 (##fxarithmetic-shift
                                  (##symbol-hash _tid22314_)
                                  _shift22315_)))
                      '0
                      _arg-types22310_
                      (iota (length _args22307_)))))
        (let _lp22321_ ((_cache22323_
                         (##unchecked-structure-ref
                          _gtab22306_
                          '2
                          std/generic/dispatch#generic-table::t
                          '#f)))
          (let* ((_len22325_ (##vector-length _cache22323_))
                 (_ix22327_ (##fxmodulo _hash22318_ _len22325_)))
            (if (##vector-ref _cache22323_ _ix22327_)
                (let ((_$e22330_
                       (std/generic/dispatch#generic-dispatch-cache-rehash
                        _cache22323_)))
                  (if _$e22330_ (_lp22321_ _$e22330_) '#!void))
                (begin
                  (##vector-set! _cache22323_ _ix22327_ _entry22312_)
                  (##unchecked-structure-set!
                   _gtab22306_
                   _cache22323_
                   '2
                   std/generic/dispatch#generic-table::t
                   '#f))))))))
  (define std/generic/dispatch#generic-dispatch-cache-rehash
    (lambda (_cache22234_)
      (letrec* ((_cache-len22236_ (##vector-length _cache22234_))
                (_hash-entry22237_
                 (lambda (_entry22261_)
                   (let _lp22263_ ((_rest22265_ _entry22261_)
                                   (_count22266_ '0)
                                   (_r22267_ '()))
                     (let* ((_rest2226822276_ _rest22265_)
                            (_else2227022288_
                             (lambda ()
                               (foldl2 (lambda (_tid22284_
                                                _shift22285_
                                                _r22286_)
                                         (##fxxor _r22286_
                                                  (##fxarithmetic-shift
                                                   (##symbol-hash _tid22284_)
                                                   _shift22285_)))
                                       '0
                                       _r22267_
                                       (iota _count22266_))))
                            (_K2227222294_
                             (lambda (_rest22291_ _tid22292_)
                               (_lp22263_
                                _rest22291_
                                (##fx+ _count22266_ '1)
                                (cons _tid22292_ _r22267_)))))
                       (if (##pair? _rest2226822276_)
                           (let ((_hd2227322297_ (##car _rest2226822276_))
                                 (_tl2227422299_ (##cdr _rest2226822276_)))
                             (let* ((_tid22302_ _hd2227322297_)
                                    (_rest22304_ _tl2227422299_))
                               (_K2227222294_ _rest22304_ _tid22302_)))
                           (_else2227022288_))))))
                (_rehash!22238_
                 (lambda (_new-cache22246_)
                   (letrec* ((_new-cache-len22248_
                              (##vector-length _new-cache22246_)))
                     (let _lp22250_ ((_i22252_ '0))
                       (if (##fx< _i22252_ _cache-len22236_)
                           (let ((_entry22254_
                                  (##vector-ref _cache22234_ _i22252_)))
                             (if _entry22254_
                                 (let* ((_hash22256_
                                         (_hash-entry22237_ _entry22254_))
                                        (_ix22258_
                                         (##fxmodulo
                                          _hash22256_
                                          _new-cache-len22248_)))
                                   (if (##vector-ref
                                        _new-cache22246_
                                        _ix22258_)
                                       '#f
                                       (begin
                                         (##vector-set!
                                          _new-cache22246_
                                          _ix22258_
                                          _entry22254_)
                                         (_lp22250_ (##fx+ _i22252_ '1)))))
                                 (_lp22250_ (##fx+ _i22252_ '1))))
                           '#t))))))
        (let _retry22240_ ((_new-cache-len22242_
                            (##fxquotient (##fx* '3 _cache-len22236_) '2)))
          (if (##fx< _new-cache-len22242_
                     std/generic/dispatch#+max-cache-size+)
              (let ((_new-cache22244_ (make-vector _new-cache-len22242_ '#f)))
                (if (_rehash!22238_ _new-cache22244_)
                    _new-cache22244_
                    (_retry22240_
                     (##fxquotient (##fx* '3 _new-cache-len22242_) '2))))
              (begin
                (display '"*** Warning: cannot rehash generic cache; maximum cache size exceeded\n"
                         ##stderr-port)
                '#f))))))
  (define std/generic/dispatch#+max-cache-size+ (expt '2 '16)))
