(declare (block) (standard-bindings) (extended-bindings))
(begin
  (define std/misc/sync#sync-hash::t
    (make-struct-type
     'std/misc/sync#sync-hash::t
     '#f
     '2
     'sync-hash
     '((final: . #t))
     ':init!
     '(ht mx)))
  (define std/misc/sync#sync-hash?
    (make-struct-predicate std/misc/sync#sync-hash::t))
  (define std/misc/sync#make-sync-hash
    (lambda _$args686_
      (apply make-struct-instance std/misc/sync#sync-hash::t _$args686_)))
  (define std/misc/sync#sync-hash-ht
    (make-struct-field-accessor std/misc/sync#sync-hash::t '0))
  (define std/misc/sync#sync-hash-mx
    (make-struct-field-accessor std/misc/sync#sync-hash::t '1))
  (define std/misc/sync#sync-hash-ht-set!
    (make-struct-field-mutator std/misc/sync#sync-hash::t '0))
  (define std/misc/sync#sync-hash-mx-set!
    (make-struct-field-mutator std/misc/sync#sync-hash::t '1))
  (define std/misc/sync#sync-hash:::init!
    (lambda (_self683_ _ht684_)
      (if (let ((__tmp4286
                 (let () (declare (not safe)) (##vector-length _self683_))))
            (declare (not safe))
            (##fx< '2 __tmp4286))
          (begin
            (let () (declare (not safe)) (##vector-set! _self683_ '1 _ht684_))
            (let ((__tmp4287 (make-mutex 'sync-hash)))
              (declare (not safe))
              (##vector-set! _self683_ '2 __tmp4287)))
          (error '"struct-instance-init!: too many arguments for struct"
                 _self683_))))
  (bind-method!
   std/misc/sync#sync-hash::t
   ':init!
   std/misc/sync#sync-hash:::init!
   '#f)
  (define std/misc/sync#sync-hash-get
    (lambda (_sht556_ _key557_)
      (std/misc/sync#sync-hash-ref _sht556_ _key557_ '#f)))
  (define std/misc/sync#sync-hash-ref
    (lambda (_sht521_ _key522_ _default523_)
      (let* ((_sht524531_ _sht521_)
             (_E526535_ (lambda () (error '"No clause matching" _sht524531_)))
             (_K527543_
              (lambda (_mx538_ _ht539_)
                (mutex-lock! _mx538_)
                (let ((_val541_ (table-ref _ht539_ _key522_ _default523_)))
                  (mutex-unlock! _mx538_)
                  _val541_))))
        (if (let ()
              (declare (not safe))
              (##structure-direct-instance-of?
               _sht524531_
               'std/misc/sync#sync-hash::t))
            (let* ((_e528546_
                    (let ()
                      (declare (not safe))
                      (##vector-ref _sht524531_ '1)))
                   (_ht549_ _e528546_)
                   (_e529551_
                    (let ()
                      (declare (not safe))
                      (##vector-ref _sht524531_ '2)))
                   (_mx554_ _e529551_))
              (_K527543_ _mx554_ _ht549_))
            (_E526535_)))))
  (define std/misc/sync#sync-hash-key?
    (lambda (_sht487_ _key488_)
      (let* ((_sht489496_ _sht487_)
             (_E491500_ (lambda () (error '"No clause matching" _sht489496_)))
             (_K492508_
              (lambda (_mx503_ _ht504_)
                (mutex-lock! _mx503_)
                (let ((_res506_ (hash-key? _ht504_ _key488_)))
                  (mutex-unlock! _mx503_)
                  _res506_))))
        (if (let ()
              (declare (not safe))
              (##structure-direct-instance-of?
               _sht489496_
               'std/misc/sync#sync-hash::t))
            (let* ((_e493511_
                    (let ()
                      (declare (not safe))
                      (##vector-ref _sht489496_ '1)))
                   (_ht514_ _e493511_)
                   (_e494516_
                    (let ()
                      (declare (not safe))
                      (##vector-ref _sht489496_ '2)))
                   (_mx519_ _e494516_))
              (_K492508_ _mx519_ _ht514_))
            (_E491500_)))))
  (define std/misc/sync#sync-hash-put!
    (lambda (_sht454_ _key455_ _val456_)
      (let* ((_sht457464_ _sht454_)
             (_E459468_ (lambda () (error '"No clause matching" _sht457464_)))
             (_K460474_
              (lambda (_mx471_ _ht472_)
                (mutex-lock! _mx471_)
                (table-set! _ht472_ _key455_ _val456_)
                (mutex-unlock! _mx471_))))
        (if (let ()
              (declare (not safe))
              (##structure-direct-instance-of?
               _sht457464_
               'std/misc/sync#sync-hash::t))
            (let* ((_e461477_
                    (let ()
                      (declare (not safe))
                      (##vector-ref _sht457464_ '1)))
                   (_ht480_ _e461477_)
                   (_e462482_
                    (let ()
                      (declare (not safe))
                      (##vector-ref _sht457464_ '2)))
                   (_mx485_ _e462482_))
              (_K460474_ _mx485_ _ht480_))
            (_E459468_)))))
  (define std/misc/sync#sync-hash-remove!
    (lambda (_sht422_ _key423_)
      (let* ((_sht424431_ _sht422_)
             (_E426435_ (lambda () (error '"No clause matching" _sht424431_)))
             (_K427441_
              (lambda (_mx438_ _ht439_)
                (mutex-lock! _mx438_)
                (table-set! _ht439_ _key423_)
                (mutex-unlock! _mx438_))))
        (if (let ()
              (declare (not safe))
              (##structure-direct-instance-of?
               _sht424431_
               'std/misc/sync#sync-hash::t))
            (let* ((_e428444_
                    (let ()
                      (declare (not safe))
                      (##vector-ref _sht424431_ '1)))
                   (_ht447_ _e428444_)
                   (_e429449_
                    (let ()
                      (declare (not safe))
                      (##vector-ref _sht424431_ '2)))
                   (_mx452_ _e429449_))
              (_K427441_ _mx452_ _ht447_))
            (_E426435_)))))
  (define std/misc/sync#sync-hash-do
    (lambda (_sht389_ _fun390_)
      (let* ((_sht391398_ _sht389_)
             (_E393402_ (lambda () (error '"No clause matching" _sht391398_)))
             (_K394409_
              (lambda (_mx405_ _ht406_)
                (gerbil/gambit/threads#with-lock
                 _mx405_
                 (lambda () (_fun390_ _ht406_))))))
        (if (let ()
              (declare (not safe))
              (##structure-direct-instance-of?
               _sht391398_
               'std/misc/sync#sync-hash::t))
            (let* ((_e395412_
                    (let ()
                      (declare (not safe))
                      (##vector-ref _sht391398_ '1)))
                   (_ht415_ _e395412_)
                   (_e396417_
                    (let ()
                      (declare (not safe))
                      (##vector-ref _sht391398_ '2)))
                   (_mx420_ _e396417_))
              (_K394409_ _mx420_ _ht415_))
            (_E393402_))))))
