(declare (block) (standard-bindings) (extended-bindings))
(begin
  (declare (not safe))
  (define std/actor/rpc/proto/message#rpc-proto-connect-hello '12)
  (define std/actor/rpc/proto/message#rpc-proto-connect-accept '1)
  (define std/actor/rpc/proto/message#rpc-proto-connect-reject '2)
  (define std/actor/rpc/proto/message#rpc-proto-challenge '3)
  (define std/actor/rpc/proto/message#rpc-proto-response '4)
  (define std/actor/rpc/proto/message#rpc-proto-key-exchange '5)
  (define std/actor/rpc/proto/message#rpc-proto-keep-alive '6)
  (define std/actor/rpc/proto/message#rpc-proto-message '7)
  (define std/actor/rpc/proto/message#rpc-proto-message-raw '0)
  (define std/actor/rpc/proto/message#rpc-proto-message-call '1)
  (define std/actor/rpc/proto/message#rpc-proto-message-value '2)
  (define std/actor/rpc/proto/message#rpc-proto-message-error '3)
  (define std/actor/rpc/proto/message#rpc-proto-message-event '4)
  (define std/actor/rpc/proto/message#rpc-proto-message-stream '5)
  (define std/actor/rpc/proto/message#rpc-proto-message-yield '6)
  (define std/actor/rpc/proto/message#rpc-proto-message-end '7)
  (define std/actor/rpc/proto/message#rpc-proto-message-continue '8)
  (define std/actor/rpc/proto/message#rpc-proto-message-close '9)
  (define std/actor/rpc/proto/message#rpc-proto-message-abort '10)
  (define std/actor/rpc/proto/message#rpc-proto-message-sync '11)
  (define std/actor/rpc/proto/message#rpc-proto-message-max-length
    (expt '2 '20))
  (define std/actor/rpc/proto/message#rpc-proto-null '0)
  (define std/actor/rpc/proto/message#rpc-proto-cookie '1)
  (define std/actor/rpc/proto/message#rpc-proto-cipher '2)
  (define std/actor/rpc/proto/message#rpc-proto-cookie-cipher '3)
  (define std/actor/rpc/proto/message#rpc-proto-marshal-message
    (lambda (_msg786_ _proto787_)
      (let ((_outp789_ (std/net/bio/buffer#open-serializer-output-buffer__0)))
        (std/actor/rpc/proto/message#rpc-proto-write-message
         _msg786_
         _outp789_
         _proto787_)
        _outp789_)))
  (define std/actor/rpc/proto/message#rpc-proto-write-message
    (lambda (_msg517_ _buffer518_ _proto519_)
      (let* ((_msg520528_ _msg517_)
             (_E522532_ (lambda () (error '"No clause matching" _msg520528_)))
             (_K523770_
              (lambda (_dest535_ _content536_)
                (if _proto519_
                    (std/actor/xdr#current-xdr-type-registry
                     (##direct-structure-ref
                      _proto519_
                      '3
                      std/actor/proto#!protocol::t
                      '#f))
                    (std/actor/xdr#current-xdr-type-registry
                     std/actor/xdr#+xdr-default-type-registry+))
                (if (##structure-instance-of?
                     _content536_
                     'std/actor/proto#!rpc::t)
                    (let* ((_content537579_ _content536_)
                           (_else549587_
                            (lambda ()
                              (std/actor/proto#raise-rpc-io-error
                               'rpc-proto-write-message
                               '"unknown rpc message type"
                               _content536_))))
                      (let ((_K575757_
                             (lambda (_k754_ _e755_)
                               (std/net/bio/output#bio-write-u8
                                std/actor/rpc/proto/message#rpc-proto-message-call
                                _buffer518_)
                               (std/actor/rpc/base#xdr-write-uuid
                                _dest535_
                                _buffer518_)
                               (std/actor/xdr#xdr-write-uint
                                _k754_
                                _buffer518_)
                               (std/actor/xdr#xdr-write _e755_ _buffer518_)))
                            (_K572738_
                             (lambda (_k735_ _e736_)
                               (std/net/bio/output#bio-write-u8
                                std/actor/rpc/proto/message#rpc-proto-message-value
                                _buffer518_)
                               (std/actor/rpc/base#xdr-write-uuid
                                _dest535_
                                _buffer518_)
                               (std/actor/xdr#xdr-write-uint
                                _k735_
                                _buffer518_)
                               (std/actor/xdr#xdr-write _e736_ _buffer518_)))
                            (_K569718_
                             (lambda (_k715_ _e716_)
                               (std/net/bio/output#bio-write-u8
                                std/actor/rpc/proto/message#rpc-proto-message-error
                                _buffer518_)
                               (std/actor/rpc/base#xdr-write-uuid
                                _dest535_
                                _buffer518_)
                               (std/actor/xdr#xdr-write-uint
                                _k715_
                                _buffer518_)
                               (std/actor/xdr#xdr-write _e716_ _buffer518_)))
                            (_K567703_
                             (lambda (_e701_)
                               (std/net/bio/output#bio-write-u8
                                std/actor/rpc/proto/message#rpc-proto-message-event
                                _buffer518_)
                               (std/actor/rpc/base#xdr-write-uuid
                                _dest535_
                                _buffer518_)
                               (std/actor/xdr#xdr-write _e701_ _buffer518_)))
                            (_K564684_
                             (lambda (_k681_ _e682_)
                               (std/net/bio/output#bio-write-u8
                                std/actor/rpc/proto/message#rpc-proto-message-stream
                                _buffer518_)
                               (std/actor/rpc/base#xdr-write-uuid
                                _dest535_
                                _buffer518_)
                               (std/actor/xdr#xdr-write-uint
                                _k681_
                                _buffer518_)
                               (std/actor/xdr#xdr-write _e682_ _buffer518_)))
                            (_K561664_
                             (lambda (_k661_ _e662_)
                               (std/net/bio/output#bio-write-u8
                                std/actor/rpc/proto/message#rpc-proto-message-yield
                                _buffer518_)
                               (std/actor/rpc/base#xdr-write-uuid
                                _dest535_
                                _buffer518_)
                               (std/actor/xdr#xdr-write-uint
                                _k661_
                                _buffer518_)
                               (std/actor/xdr#xdr-write _e662_ _buffer518_)))
                            (_K559649_
                             (lambda (_k647_)
                               (std/net/bio/output#bio-write-u8
                                std/actor/rpc/proto/message#rpc-proto-message-end
                                _buffer518_)
                               (std/actor/rpc/base#xdr-write-uuid
                                _dest535_
                                _buffer518_)
                               (std/actor/xdr#xdr-write-uint
                                _k647_
                                _buffer518_)))
                            (_K557635_
                             (lambda (_k633_)
                               (std/net/bio/output#bio-write-u8
                                std/actor/rpc/proto/message#rpc-proto-message-continue
                                _buffer518_)
                               (std/actor/rpc/base#xdr-write-uuid
                                _dest535_
                                _buffer518_)
                               (std/actor/xdr#xdr-write-uint
                                _k633_
                                _buffer518_)))
                            (_K555621_
                             (lambda (_k619_)
                               (std/net/bio/output#bio-write-u8
                                std/actor/rpc/proto/message#rpc-proto-message-close
                                _buffer518_)
                               (std/actor/rpc/base#xdr-write-uuid
                                _dest535_
                                _buffer518_)
                               (std/actor/xdr#xdr-write-uint
                                _k619_
                                _buffer518_)))
                            (_K553607_
                             (lambda (_k605_)
                               (std/net/bio/output#bio-write-u8
                                std/actor/rpc/proto/message#rpc-proto-message-abort
                                _buffer518_)
                               (std/actor/rpc/base#xdr-write-uuid
                                _dest535_
                                _buffer518_)
                               (std/actor/xdr#xdr-write-uint
                                _k605_
                                _buffer518_)))
                            (_K551593_
                             (lambda (_k591_)
                               (std/net/bio/output#bio-write-u8
                                std/actor/rpc/proto/message#rpc-proto-message-sync
                                _buffer518_)
                               (std/actor/rpc/base#xdr-write-uuid
                                _dest535_
                                _buffer518_)
                               (std/actor/xdr#xdr-write-uint
                                _k591_
                                _buffer518_))))
                        (let* ((_try-match548601_
                                (lambda ()
                                  (if (##structure-direct-instance-of?
                                       _content537579_
                                       'std/actor/proto#!sync::t)
                                      (let* ((_e552596_
                                              (##vector-ref
                                               _content537579_
                                               '1))
                                             (_k599_ _e552596_))
                                        (_K551593_ _k599_))
                                      (_else549587_))))
                               (_try-match547615_
                                (lambda ()
                                  (if (##structure-direct-instance-of?
                                       _content537579_
                                       'std/actor/proto#!abort::t)
                                      (let* ((_e554610_
                                              (##vector-ref
                                               _content537579_
                                               '1))
                                             (_k613_ _e554610_))
                                        (_K553607_ _k613_))
                                      (_try-match548601_))))
                               (_try-match546629_
                                (lambda ()
                                  (if (##structure-direct-instance-of?
                                       _content537579_
                                       'std/actor/proto#!close::t)
                                      (let* ((_e556624_
                                              (##vector-ref
                                               _content537579_
                                               '1))
                                             (_k627_ _e556624_))
                                        (_K555621_ _k627_))
                                      (_try-match547615_))))
                               (_try-match545643_
                                (lambda ()
                                  (if (##structure-direct-instance-of?
                                       _content537579_
                                       'std/actor/proto#!continue::t)
                                      (let* ((_e558638_
                                              (##vector-ref
                                               _content537579_
                                               '1))
                                             (_k641_ _e558638_))
                                        (_K557635_ _k641_))
                                      (_try-match546629_))))
                               (_try-match544657_
                                (lambda ()
                                  (if (##structure-direct-instance-of?
                                       _content537579_
                                       'std/actor/proto#!end::t)
                                      (let* ((_e560652_
                                              (##vector-ref
                                               _content537579_
                                               '1))
                                             (_k655_ _e560652_))
                                        (_K559649_ _k655_))
                                      (_try-match545643_))))
                               (_try-match543677_
                                (lambda ()
                                  (if (##structure-direct-instance-of?
                                       _content537579_
                                       'std/actor/proto#!yield::t)
                                      (let* ((_e562667_
                                              (##vector-ref
                                               _content537579_
                                               '1))
                                             (_e563672_
                                              (##vector-ref
                                               _content537579_
                                               '2)))
                                        (let ((_e670_ _e562667_)
                                              (_k675_ _e563672_))
                                          (_K561664_ _k675_ _e670_)))
                                      (_try-match544657_))))
                               (_try-match542697_
                                (lambda ()
                                  (if (##structure-direct-instance-of?
                                       _content537579_
                                       'std/actor/proto#!stream::t)
                                      (let* ((_e565687_
                                              (##vector-ref
                                               _content537579_
                                               '1))
                                             (_e566692_
                                              (##vector-ref
                                               _content537579_
                                               '2)))
                                        (let ((_e690_ _e565687_)
                                              (_k695_ _e566692_))
                                          (_K564684_ _k695_ _e690_)))
                                      (_try-match543677_))))
                               (_try-match541711_
                                (lambda ()
                                  (if (##structure-direct-instance-of?
                                       _content537579_
                                       'std/actor/proto#!event::t)
                                      (let* ((_e568706_
                                              (##vector-ref
                                               _content537579_
                                               '1))
                                             (_e709_ _e568706_))
                                        (_K567703_ _e709_))
                                      (_try-match542697_))))
                               (_try-match540731_
                                (lambda ()
                                  (if (##structure-direct-instance-of?
                                       _content537579_
                                       'std/actor/proto#!error::t)
                                      (let* ((_e570721_
                                              (##vector-ref
                                               _content537579_
                                               '1))
                                             (_e571726_
                                              (##vector-ref
                                               _content537579_
                                               '2)))
                                        (let ((_e724_ _e570721_)
                                              (_k729_ _e571726_))
                                          (_K569718_ _k729_ _e724_)))
                                      (_try-match541711_))))
                               (_try-match539751_
                                (lambda ()
                                  (if (##structure-direct-instance-of?
                                       _content537579_
                                       'std/actor/proto#!value::t)
                                      (let* ((_e573741_
                                              (##vector-ref
                                               _content537579_
                                               '1))
                                             (_e574746_
                                              (##vector-ref
                                               _content537579_
                                               '2)))
                                        (let ((_e744_ _e573741_)
                                              (_k749_ _e574746_))
                                          (_K572738_ _k749_ _e744_)))
                                      (_try-match540731_)))))
                          (if (##structure-direct-instance-of?
                               _content537579_
                               'std/actor/proto#!call::t)
                              (let* ((_e576760_
                                      (##vector-ref _content537579_ '1))
                                     (_e577765_
                                      (##vector-ref _content537579_ '2)))
                                (let ((_e763_ _e576760_) (_k768_ _e577765_))
                                  (_K575757_ _k768_ _e763_)))
                              (_try-match539751_)))))
                    (begin
                      (std/net/bio/output#bio-write-u8
                       std/actor/rpc/proto/message#rpc-proto-message-raw
                       _buffer518_)
                      (std/actor/xdr#xdr-write _content536_ _buffer518_))))))
        (if (##structure-direct-instance-of?
             _msg520528_
             'std/actor/message#message::t)
            (let* ((_e524773_ (##vector-ref _msg520528_ '1))
                   (_content776_ _e524773_)
                   (_e525778_ (##vector-ref _msg520528_ '2))
                   (_e526781_ (##vector-ref _msg520528_ '3))
                   (_dest784_ _e526781_))
              (_K523770_ _dest784_ _content776_))
            (_E522532_)))))
  (define std/actor/rpc/proto/message#rpc-proto-read-envelope
    (lambda (_buffer490_)
      (let* ((_type492_ (std/net/bio/input#bio-read-u8 _buffer490_))
             (_dest494_ (std/actor/rpc/base#xdr-read-uuid _buffer490_)))
        (##structure
         std/actor/message#message::t
         (if (eq? _type492_ std/actor/rpc/proto/message#rpc-proto-message-call)
             (let ((_k497_ (std/actor/xdr#xdr-read-uint _buffer490_)))
               (##structure std/actor/proto#!call::t '#!void _k497_))
             (if (eq? _type492_
                      std/actor/rpc/proto/message#rpc-proto-message-value)
                 (let ((_k499_ (std/actor/xdr#xdr-read-uint _buffer490_)))
                   (##structure std/actor/proto#!value::t '#!void _k499_))
                 (if (eq? _type492_
                          std/actor/rpc/proto/message#rpc-proto-message-error)
                     (let ((_k501_ (std/actor/xdr#xdr-read-uint _buffer490_)))
                       (##structure std/actor/proto#!error::t '#!void _k501_))
                     (if (eq? _type492_
                              std/actor/rpc/proto/message#rpc-proto-message-event)
                         (##structure std/actor/proto#!event::t '#!void)
                         (if (eq? _type492_
                                  std/actor/rpc/proto/message#rpc-proto-message-raw)
                             '#!void
                             (if (eq? _type492_
                                      std/actor/rpc/proto/message#rpc-proto-message-stream)
                                 (let ((_k503_ (std/actor/xdr#xdr-read-uint
                                                _buffer490_)))
                                   (##structure
                                    std/actor/proto#!stream::t
                                    '#!void
                                    _k503_))
                                 (if (eq? _type492_
                                          std/actor/rpc/proto/message#rpc-proto-message-yield)
                                     (let ((_k505_ (std/actor/xdr#xdr-read-uint
                                                    _buffer490_)))
                                       (##structure
                                        std/actor/proto#!yield::t
                                        '#!void
                                        _k505_))
                                     (if (eq? _type492_
                                              std/actor/rpc/proto/message#rpc-proto-message-end)
                                         (let ((_k507_ (std/actor/xdr#xdr-read-uint
                                                        _buffer490_)))
                                           (##structure
                                            std/actor/proto#!end::t
                                            _k507_))
                                         (if (eq? _type492_
                                                  std/actor/rpc/proto/message#rpc-proto-message-continue)
                                             (let ((_k509_ (std/actor/xdr#xdr-read-uint
                                                            _buffer490_)))
                                               (##structure
                                                std/actor/proto#!continue::t
                                                _k509_))
                                             (if (eq? _type492_
                                                      std/actor/rpc/proto/message#rpc-proto-message-close)
                                                 (let ((_k511_ (std/actor/xdr#xdr-read-uint
                                                                _buffer490_)))
                                                   (##structure
                                                    std/actor/proto#!close::t
                                                    _k511_))
                                                 (if (eq? _type492_
                                                          std/actor/rpc/proto/message#rpc-proto-message-abort)
                                                     (let ((_k513_ (std/actor/xdr#xdr-read-uint
;;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
                            _buffer490_)))
               (##structure std/actor/proto#!abort::t _k513_))
;;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
                                                     (if (eq? _type492_
                                                              std/actor/rpc/proto/message#rpc-proto-message-sync)
                                                         (let ((_k515_ (std/actor/xdr#xdr-read-uint
;;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
                                _buffer490_)))
                   (##structure std/actor/proto#!sync::t _k515_))
                 (std/actor/proto#raise-rpc-io-error
                  'rpc-proto-read-message
                  '"unmarshal error; unexpected message type"
                  _type492_)))))))))))))
;;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
         '#!void
         _dest494_
         '#f))))
  (define std/actor/rpc/proto/message#rpc-proto-read-payload!
    (lambda (_msg423_ _buffer424_ _proto425_)
      (std/actor/xdr#current-xdr-type-registry
       (##direct-structure-ref _proto425_ '3 std/actor/proto#!protocol::t '#f))
      (let* ((_value427_
              (##direct-structure-ref
               _msg423_
               '1
               std/actor/message#message::t
               '#f))
             (_value428438_ _value427_)
             (_else432446_ (lambda () '#!void)))
        (let ((_K436475_
               (lambda ()
                 (let ((_payload473_ (std/actor/xdr#xdr-read _buffer424_)))
                   (##vector-set! _value427_ '1 _payload473_))))
              (_K435466_
               (lambda ()
                 (let* ((_payload461_ (std/actor/xdr#xdr-read _buffer424_))
                        (_e463_ (if (string? _payload461_)
                                    (make-struct-instance
                                     std/actor/proto#remote-error::t
                                     'rpc
                                     _payload461_)
                                    _payload461_)))
                   (##vector-set! _value427_ '1 _e463_))))
              (_K434453_
               (lambda ()
                 (let ((_payload451_ (std/actor/xdr#xdr-read _buffer424_)))
                   (##direct-structure-set!
                    _msg423_
                    _payload451_
                    '1
                    std/actor/message#message::t
                    '#f)))))
          (let* ((_try-match431456_
                  (lambda ()
                    (if (eq? _value428438_ '#!void) (_K434453_) '#!void)))
                 (_try-match430469_
                  (lambda ()
                    (if (##structure-direct-instance-of?
                         _value428438_
                         'std/actor/proto#!error::t)
                        (_K435466_)
                        (_try-match431456_)))))
            (if (or (##structure-direct-instance-of?
                     _value428438_
                     'std/actor/proto#!call::t)
                    (##structure-direct-instance-of?
                     _value428438_
                     'std/actor/proto#!value::t)
                    (##structure-direct-instance-of?
                     _value428438_
                     'std/actor/proto#!event::t)
                    (##structure-direct-instance-of?
                     _value428438_
                     'std/actor/proto#!stream::t)
                    (##structure-direct-instance-of?
                     _value428438_
                     'std/actor/proto#!yield::t))
                (_K436475_)
                (_try-match430469_))))))))
