(declare (block) (standard-bindings) (extended-bindings))
(begin
  (define std/srfi/134#<ideque>
    (make-struct-type
     'std/srfi/134#<ideque>
     '#f
     '4
     '<ideque>
     '((fields: lenf f lenr r))
     '#f))
  (define std/srfi/134#ideque? (make-struct-predicate std/srfi/134#<ideque>))
  (define std/srfi/134#dq-lenf
    (make-struct-field-accessor std/srfi/134#<ideque> '0))
  (define std/srfi/134#dq-f
    (make-struct-field-accessor std/srfi/134#<ideque> '1))
  (define std/srfi/134#dq-lenr
    (make-struct-field-accessor std/srfi/134#<ideque> '2))
  (define std/srfi/134#dq-r
    (make-struct-field-accessor std/srfi/134#<ideque> '3))
  (define std/srfi/134#%make-dq
    (lambda (_lenf94332_ _f94333_ _lenr94334_ _r94335_)
      (make-struct-instance
       std/srfi/134#<ideque>
       _lenf94332_
       _f94333_
       _lenr94334_
       _r94335_)))
  (define std/srfi/134#*empty*
    (##structure std/srfi/134#<ideque> '0 '() '0 '()))
  (define std/srfi/134#%check-ideque
    (lambda (_x94330_)
      (if (##structure-instance-of? _x94330_ 'std/srfi/134#<ideque>)
          '#!void
          (error '"ideque expected, but got:" _x94330_))))
  (define std/srfi/134#ideque
    (lambda _args94328_ (std/srfi/134#list->ideque _args94328_)))
  (define std/srfi/134#ideque-tabulate
    (lambda (_size94316_ _init94317_)
      (let ((_lenf94319_ (quotient _size94316_ '2))
            (_lenr94320_ (quotient (+ _size94316_ '1) '2)))
        (##structure
         std/srfi/134#<ideque>
         _lenf94319_
         (std/srfi/1#list-tabulate _lenf94319_ _init94317_)
         _lenr94320_
         (std/srfi/1#unfold
          (lambda (_n94322_) (= _n94322_ _lenr94320_))
          (lambda (_n94324_) (_init94317_ (- _size94316_ _n94324_ '1)))
          (lambda (_n94326_) (+ _n94326_ '1))
          '0)))))
  (define std/srfi/134#ideque-unfold
    (lambda (_p94311_ _f94312_ _g94313_ _seed94314_)
      (std/srfi/134#list->ideque
       (std/srfi/1#unfold _p94311_ _f94312_ _g94313_ _seed94314_))))
  (define std/srfi/134#ideque-unfold-right
    (lambda (_p94306_ _f94307_ _g94308_ _seed94309_)
      (std/srfi/134#list->ideque
       (std/srfi/1#unfold-right _p94306_ _f94307_ _g94308_ _seed94309_))))
  (define std/srfi/134#C '3)
  (define std/srfi/134#check
    (lambda (_lenf94283_ _f94284_ _lenr94285_ _r94286_)
      (if (> _lenf94283_ (+ (* _lenr94285_ std/srfi/134#C) '1))
          (let* ((_i94288_ (quotient (+ _lenf94283_ _lenr94285_) '2))
                 (_j94290_ (- (+ _lenf94283_ _lenr94285_) _i94288_))
                 (_f.94292_ (std/srfi/1#take _f94284_ _i94288_))
                 (_r.94294_
                  (append _r94286_
                          (reverse (std/srfi/1#drop _f94284_ _i94288_)))))
            (##structure
             std/srfi/134#<ideque>
             _i94288_
             _f.94292_
             _j94290_
             _r.94294_))
          (if (> _lenr94285_ (+ (* _lenf94283_ std/srfi/134#C) '1))
              (let* ((_j94297_ (quotient (+ _lenf94283_ _lenr94285_) '2))
                     (_i94299_ (- (+ _lenf94283_ _lenr94285_) _j94297_))
                     (_r.94301_ (std/srfi/1#take _r94286_ _j94297_))
                     (_f.94303_
                      (append _f94284_
                              (reverse (std/srfi/1#drop _r94286_ _j94297_)))))
                (##structure
                 std/srfi/134#<ideque>
                 _i94299_
                 _f.94303_
                 _j94297_
                 _r.94301_))
              (##structure
               std/srfi/134#<ideque>
               _lenf94283_
               _f94284_
               _lenr94285_
               _r94286_)))))
  (define std/srfi/134#ideque-empty?
    (lambda (_dq94281_)
      (std/srfi/134#%check-ideque _dq94281_)
      (if (zero? (##structure-ref _dq94281_ '1 std/srfi/134#<ideque> '#f))
          (zero? (##structure-ref _dq94281_ '3 std/srfi/134#<ideque> '#f))
          '#f)))
  (define std/srfi/134#ideque-add-front
    (lambda (_dq94278_ _x94279_)
      (std/srfi/134#%check-ideque _dq94278_)
      (std/srfi/134#check
       (+ (##structure-ref _dq94278_ '1 std/srfi/134#<ideque> '#f) '1)
       (cons _x94279_ (##structure-ref _dq94278_ '2 std/srfi/134#<ideque> '#f))
       (##structure-ref _dq94278_ '3 std/srfi/134#<ideque> '#f)
       (##structure-ref _dq94278_ '4 std/srfi/134#<ideque> '#f))))
  (define std/srfi/134#ideque-front
    (lambda (_dq94276_)
      (std/srfi/134#%check-ideque _dq94276_)
      (if (zero? (##structure-ref _dq94276_ '1 std/srfi/134#<ideque> '#f))
          (if (zero? (##structure-ref _dq94276_ '3 std/srfi/134#<ideque> '#f))
              (error '"Empty deque:" _dq94276_)
              (car (##structure-ref _dq94276_ '4 std/srfi/134#<ideque> '#f)))
          (car (##structure-ref _dq94276_ '2 std/srfi/134#<ideque> '#f)))))
  (define std/srfi/134#ideque-remove-front
    (lambda (_dq94274_)
      (std/srfi/134#%check-ideque _dq94274_)
      (if (zero? (##structure-ref _dq94274_ '1 std/srfi/134#<ideque> '#f))
          (if (zero? (##structure-ref _dq94274_ '3 std/srfi/134#<ideque> '#f))
              (error '"Empty deque:" _dq94274_)
              std/srfi/134#*empty*)
          (std/srfi/134#check
           (- (##structure-ref _dq94274_ '1 std/srfi/134#<ideque> '#f) '1)
           (cdr (##structure-ref _dq94274_ '2 std/srfi/134#<ideque> '#f))
           (##structure-ref _dq94274_ '3 std/srfi/134#<ideque> '#f)
           (##structure-ref _dq94274_ '4 std/srfi/134#<ideque> '#f)))))
  (define std/srfi/134#ideque-add-back
    (lambda (_dq94271_ _x94272_)
      (std/srfi/134#%check-ideque _dq94271_)
      (std/srfi/134#check
       (##structure-ref _dq94271_ '1 std/srfi/134#<ideque> '#f)
       (##structure-ref _dq94271_ '2 std/srfi/134#<ideque> '#f)
       (+ (##structure-ref _dq94271_ '3 std/srfi/134#<ideque> '#f) '1)
       (cons _x94272_
             (##structure-ref _dq94271_ '4 std/srfi/134#<ideque> '#f)))))
  (define std/srfi/134#ideque-back
    (lambda (_dq94269_)
      (std/srfi/134#%check-ideque _dq94269_)
      (if (zero? (##structure-ref _dq94269_ '3 std/srfi/134#<ideque> '#f))
          (if (zero? (##structure-ref _dq94269_ '1 std/srfi/134#<ideque> '#f))
              (error '"Empty deque:" _dq94269_)
              (car (##structure-ref _dq94269_ '2 std/srfi/134#<ideque> '#f)))
          (car (##structure-ref _dq94269_ '4 std/srfi/134#<ideque> '#f)))))
  (define std/srfi/134#ideque-remove-back
    (lambda (_dq94267_)
      (std/srfi/134#%check-ideque _dq94267_)
      (if (zero? (##structure-ref _dq94267_ '3 std/srfi/134#<ideque> '#f))
          (if (zero? (##structure-ref _dq94267_ '1 std/srfi/134#<ideque> '#f))
              (error '"Empty deque:" _dq94267_)
              std/srfi/134#*empty*)
          (std/srfi/134#check
           (##structure-ref _dq94267_ '1 std/srfi/134#<ideque> '#f)
           (##structure-ref _dq94267_ '2 std/srfi/134#<ideque> '#f)
           (- (##structure-ref _dq94267_ '3 std/srfi/134#<ideque> '#f) '1)
           (cdr (##structure-ref _dq94267_ '4 std/srfi/134#<ideque> '#f))))))
  (define std/srfi/134#ideque-reverse
    (lambda (_dq94265_)
      (std/srfi/134#%check-ideque _dq94265_)
      (if (std/srfi/134#ideque-empty? _dq94265_)
          std/srfi/134#*empty*
          (##structure
           std/srfi/134#<ideque>
           (##structure-ref _dq94265_ '3 std/srfi/134#<ideque> '#f)
           (##structure-ref _dq94265_ '4 std/srfi/134#<ideque> '#f)
           (##structure-ref _dq94265_ '1 std/srfi/134#<ideque> '#f)
           (##structure-ref _dq94265_ '2 std/srfi/134#<ideque> '#f)))))
  (define std/srfi/134#ideque=__0 (lambda (_elt=94239_) '#t))
  (define std/srfi/134#ideque=__1
    (lambda (_elt=94241_ _ideque94242_)
      (std/srfi/134#%check-ideque _ideque94242_)
      '#t))
  (define std/srfi/134#ideque=__2
    (lambda (_elt=94244_ _dq194245_ _dq294246_)
      (std/srfi/134#%check-ideque _dq194245_)
      (std/srfi/134#%check-ideque _dq294246_)
      (let ((_$e94248_ (eq? _dq194245_ _dq294246_)))
        (if _$e94248_
            _$e94248_
            (let ((_len194251_
                   (+ (##structure-ref _dq194245_ '1 std/srfi/134#<ideque> '#f)
                      (##structure-ref
                       _dq194245_
                       '3
                       std/srfi/134#<ideque>
                       '#f)))
                  (_len294252_
                   (+ (##structure-ref _dq294246_ '1 std/srfi/134#<ideque> '#f)
                      (##structure-ref
                       _dq294246_
                       '3
                       std/srfi/134#<ideque>
                       '#f))))
              (if (= _len194251_ _len294252_)
                  (let ((_g94336_
                         (std/srfi/134#list-prefix=
                          _elt=94244_
                          (##structure-ref
                           _dq194245_
                           '2
                           std/srfi/134#<ideque>
                           '#f)
                          (##structure-ref
                           _dq294246_
                           '2
                           std/srfi/134#<ideque>
                           '#f))))
                    (begin
                      (let ((_g94337_
                             (if (##values? _g94336_)
                                 (##vector-length _g94336_)
                                 1)))
                        (if (not (##fx= _g94337_ 3))
                            (error "Context expects 3 values" _g94337_)))
                      (let ((_x94254_ (##vector-ref _g94336_ 0))
                            (_t194255_ (##vector-ref _g94336_ 1))
                            (_t294256_ (##vector-ref _g94336_ 2)))
                        (if _x94254_
                            (let ((_g94338_
                                   (std/srfi/134#list-prefix=
                                    _elt=94244_
                                    (##structure-ref
                                     _dq194245_
                                     '4
                                     std/srfi/134#<ideque>
                                     '#f)
                                    (##structure-ref
                                     _dq294246_
                                     '4
                                     std/srfi/134#<ideque>
                                     '#f))))
                              (begin
                                (let ((_g94339_
                                       (if (##values? _g94338_)
                                           (##vector-length _g94338_)
                                           1)))
                                  (if (not (##fx= _g94339_ 3))
                                      (error "Context expects 3 values"
                                             _g94339_)))
                                (let ((_y94258_ (##vector-ref _g94338_ 0))
                                      (_r194259_ (##vector-ref _g94338_ 1))
                                      (_r294260_ (##vector-ref _g94338_ 2)))
                                  (if _y94258_
                                      (if (null? _t194255_)
                                          (std/srfi/1#list=
                                           _elt=94244_
                                           _t294256_
                                           (reverse _r194259_))
                                          (std/srfi/1#list=
                                           _elt=94244_
                                           _t194255_
                                           (reverse _r294260_)))
                                      '#f))))
                            '#f))))
                  '#f))))))
  (define std/srfi/134#ideque=__3
    (lambda (_elt=94262_ . _dqs94263_)
      (apply std/srfi/1#list=
             _elt=94262_
             (map std/srfi/134#ideque->list _dqs94263_))))
  (define std/srfi/134#ideque=
    (lambda _g94341_
      (let ((_g94340_ (length _g94341_)))
        (cond ((##fx= _g94340_ 1) (apply std/srfi/134#ideque=__0 _g94341_))
              ((##fx= _g94340_ 2) (apply std/srfi/134#ideque=__1 _g94341_))
              ((##fx= _g94340_ 3) (apply std/srfi/134#ideque=__2 _g94341_))
              ((##fx>= _g94340_ 1) (apply std/srfi/134#ideque=__3 _g94341_))
              (else
               (##raise-wrong-number-of-arguments-exception
                std/srfi/134#ideque=
                _g94341_))))))
  (define std/srfi/134#list-prefix=
    (lambda (_elt=94227_ _a94228_ _b94229_)
      (let _loop94231_ ((_a94233_ _a94228_) (_b94234_ _b94229_))
        (if (or (null? _a94233_) (null? _b94234_))
            (values '#t _a94233_ _b94234_)
            (if (_elt=94227_ (car _a94233_) (car _b94234_))
                (_loop94231_ (cdr _a94233_) (cdr _b94234_))
                (values '#f _a94233_ _b94234_))))))
  (define std/srfi/134#ideque-ref
    (lambda (_dq94219_ _n94220_)
      (std/srfi/134#%check-ideque _dq94219_)
      (let ((_len94222_
             (+ (##structure-ref _dq94219_ '1 std/srfi/134#<ideque> '#f)
                (##structure-ref _dq94219_ '3 std/srfi/134#<ideque> '#f))))
        (if (or (< _n94220_ '0) (>= _n94220_ _len94222_))
            (error '"Index out of range:" _n94220_)
            (if (< _n94220_
                   (##structure-ref _dq94219_ '1 std/srfi/134#<ideque> '#f))
                (list-ref
                 (##structure-ref _dq94219_ '2 std/srfi/134#<ideque> '#f)
                 _n94220_)
                (list-ref
                 (##structure-ref _dq94219_ '4 std/srfi/134#<ideque> '#f)
                 (- _len94222_ _n94220_ '1)))))))
  (define std/srfi/134#%ideque-take
    (lambda (_dq94211_ _n94212_)
      (let ((_lenf94214_
             (##structure-ref _dq94211_ '1 std/srfi/134#<ideque> '#f))
            (_f94215_
             (##structure-ref _dq94211_ '2 std/srfi/134#<ideque> '#f)))
        (if (<= _n94212_ _lenf94214_)
            (std/srfi/134#check
             _n94212_
             (std/srfi/1#take _f94215_ _n94212_)
             '0
             '())
            (let ((_lenr.94217_ (- _n94212_ _lenf94214_)))
              (std/srfi/134#check
               _lenf94214_
               _f94215_
               _lenr.94217_
               (std/srfi/1#take-right
                (##structure-ref _dq94211_ '4 std/srfi/134#<ideque> '#f)
                _lenr.94217_)))))))
  (define std/srfi/134#%ideque-drop
    (lambda (_dq94201_ _n94202_)
      (let ((_lenf94204_
             (##structure-ref _dq94201_ '1 std/srfi/134#<ideque> '#f))
            (_f94205_ (##structure-ref _dq94201_ '2 std/srfi/134#<ideque> '#f))
            (_lenr94206_
             (##structure-ref _dq94201_ '3 std/srfi/134#<ideque> '#f))
            (_r94207_
             (##structure-ref _dq94201_ '4 std/srfi/134#<ideque> '#f)))
        (if (<= _n94202_ _lenf94204_)
            (std/srfi/134#check
             _n94202_
             (std/srfi/1#drop _f94205_ _n94202_)
             _lenr94206_
             _r94207_)
            (let ((_lenr.94209_ (- _lenr94206_ (- _n94202_ _lenf94204_))))
              (std/srfi/134#check
               '0
               '()
               _lenr.94209_
               (std/srfi/1#take _r94207_ _lenr.94209_)))))))
  (define std/srfi/134#%check-length
    (lambda (_dq94198_ _n94199_)
      (if (<= '0 _n94199_ (- (std/srfi/134#ideque-length _dq94198_) '1))
          '#!void
          (error '"argument is out of range:" _n94199_))))
  (define std/srfi/134#ideque-take
    (lambda (_dq94195_ _n94196_)
      (std/srfi/134#%check-ideque _dq94195_)
      (std/srfi/134#%check-length _dq94195_ _n94196_)
      (std/srfi/134#%ideque-take _dq94195_ _n94196_)))
  (define std/srfi/134#ideque-take-right
    (lambda (_dq94192_ _n94193_)
      (std/srfi/134#%check-ideque _dq94192_)
      (std/srfi/134#%check-length _dq94192_ _n94193_)
      (std/srfi/134#%ideque-drop
       _dq94192_
       (- (std/srfi/134#ideque-length _dq94192_) _n94193_))))
  (define std/srfi/134#ideque-drop
    (lambda (_dq94189_ _n94190_)
      (std/srfi/134#%check-ideque _dq94189_)
      (std/srfi/134#%check-length _dq94189_ _n94190_)
      (std/srfi/134#%ideque-drop _dq94189_ _n94190_)))
  (define std/srfi/134#ideque-drop-right
    (lambda (_dq94186_ _n94187_)
      (std/srfi/134#%check-ideque _dq94186_)
      (std/srfi/134#%check-length _dq94186_ _n94187_)
      (std/srfi/134#%ideque-take
       _dq94186_
       (- (std/srfi/134#ideque-length _dq94186_) _n94187_))))
  (define std/srfi/134#ideque-split-at
    (lambda (_dq94183_ _n94184_)
      (std/srfi/134#%check-ideque _dq94183_)
      (std/srfi/134#%check-length _dq94183_ _n94184_)
      (values (std/srfi/134#%ideque-take _dq94183_ _n94184_)
              (std/srfi/134#%ideque-drop _dq94183_ _n94184_))))
  (define std/srfi/134#ideque-length
    (lambda (_dq94181_)
      (std/srfi/134#%check-ideque _dq94181_)
      (+ (##structure-ref _dq94181_ '1 std/srfi/134#<ideque> '#f)
         (##structure-ref _dq94181_ '3 std/srfi/134#<ideque> '#f))))
  (define std/srfi/134#ideque-append
    (lambda _dqs94179_
      (std/srfi/134#list->ideque
       (std/srfi/1#concatenate (map std/srfi/134#ideque->list _dqs94179_)))))
  (define std/srfi/134#ideque-count
    (lambda (_pred94176_ _dq94177_)
      (std/srfi/134#%check-ideque _dq94177_)
      (+ (std/srfi/1#count
          _pred94176_
          (##structure-ref _dq94177_ '2 std/srfi/134#<ideque> '#f))
         (std/srfi/1#count
          _pred94176_
          (##structure-ref _dq94177_ '4 std/srfi/134#<ideque> '#f)))))
  (define std/srfi/134#ideque-zip
    (lambda (_dq94171_ . _dqs94172_)
      (let ((_elts94174_
             (apply std/srfi/1#zip
                    (std/srfi/134#ideque->list _dq94171_)
                    (map std/srfi/134#ideque->list _dqs94172_))))
        (std/srfi/134#check (length _elts94174_) _elts94174_ '0 '()))))
  (define std/srfi/134#ideque-map
    (lambda (_proc94168_ _dq94169_)
      (std/srfi/134#%check-ideque _dq94169_)
      (##structure
       std/srfi/134#<ideque>
       (##structure-ref _dq94169_ '1 std/srfi/134#<ideque> '#f)
       (map _proc94168_
            (##structure-ref _dq94169_ '2 std/srfi/134#<ideque> '#f))
       (##structure-ref _dq94169_ '3 std/srfi/134#<ideque> '#f)
       (map _proc94168_
            (##structure-ref _dq94169_ '4 std/srfi/134#<ideque> '#f)))))
  (define std/srfi/134#ideque-filter-map
    (lambda (_proc94162_ _dq94163_)
      (std/srfi/134#%check-ideque _dq94163_)
      (let ((_f94165_
             (filter-map1
              _proc94162_
              (##structure-ref _dq94163_ '2 std/srfi/134#<ideque> '#f)))
            (_r94166_
             (filter-map1
              _proc94162_
              (##structure-ref _dq94163_ '4 std/srfi/134#<ideque> '#f))))
        (std/srfi/134#check
         (length _f94165_)
         _f94165_
         (length _r94166_)
         _r94166_))))
  (define std/srfi/134#ideque-for-each
    (lambda (_proc94159_ _dq94160_)
      (std/srfi/134#%check-ideque _dq94160_)
      (for-each
       _proc94159_
       (##structure-ref _dq94160_ '2 std/srfi/134#<ideque> '#f))
      (for-each
       _proc94159_
       (reverse (##structure-ref _dq94160_ '4 std/srfi/134#<ideque> '#f)))))
  (define std/srfi/134#ideque-for-each-right
    (lambda (_proc94156_ _dq94157_)
      (std/srfi/134#%check-ideque _dq94157_)
      (for-each
       _proc94156_
       (##structure-ref _dq94157_ '4 std/srfi/134#<ideque> '#f))
      (for-each
       _proc94156_
       (reverse (##structure-ref _dq94157_ '2 std/srfi/134#<ideque> '#f)))))
  (define std/srfi/134#ideque-fold
    (lambda (_proc94152_ _knil94153_ _dq94154_)
      (std/srfi/134#%check-ideque _dq94154_)
      (foldl1 _proc94152_
              (foldl1 _proc94152_
                      _knil94153_
                      (##structure-ref _dq94154_ '2 std/srfi/134#<ideque> '#f))
              (reverse (##structure-ref
                        _dq94154_
                        '4
                        std/srfi/134#<ideque>
                        '#f)))))
  (define std/srfi/134#ideque-fold-right
    (lambda (_proc94148_ _knil94149_ _dq94150_)
      (std/srfi/134#%check-ideque _dq94150_)
      (foldr1 _proc94148_
              (foldr1 _proc94148_
                      _knil94149_
                      (reverse (##structure-ref
                                _dq94150_
                                '4
                                std/srfi/134#<ideque>
                                '#f)))
              (##structure-ref _dq94150_ '2 std/srfi/134#<ideque> '#f))))
  (define std/srfi/134#ideque-append-map
    (lambda (_proc94145_ _dq94146_)
      (std/srfi/134#list->ideque
       (std/srfi/1#append-map
        _proc94145_
        (std/srfi/134#ideque->list _dq94146_)))))
  (define std/srfi/134#%ideque-filter-remove
    (lambda (_op94138_ _pred94139_ _dq94140_)
      (std/srfi/134#%check-ideque _dq94140_)
      (let ((_f94142_
             (_op94138_
              _pred94139_
              (##structure-ref _dq94140_ '2 std/srfi/134#<ideque> '#f)))
            (_r94143_
             (_op94138_
              _pred94139_
              (##structure-ref _dq94140_ '4 std/srfi/134#<ideque> '#f))))
        (std/srfi/134#check
         (length _f94142_)
         _f94142_
         (length _r94143_)
         _r94143_))))
  (define std/srfi/134#ideque-filter
    (lambda (_pred94135_ _dq94136_)
      (std/srfi/134#%ideque-filter-remove filter _pred94135_ _dq94136_)))
  (define std/srfi/134#ideque-remove
    (lambda (_pred94132_ _dq94133_)
      (std/srfi/134#%ideque-filter-remove
       std/srfi/1#remove
       _pred94132_
       _dq94133_)))
  (define std/srfi/134#ideque-partition
    (lambda (_pred94123_ _dq94124_)
      (std/srfi/134#%check-ideque _dq94124_)
      (let ((_g94342_
             (std/srfi/1#partition
              _pred94123_
              (##structure-ref _dq94124_ '2 std/srfi/134#<ideque> '#f))))
        (begin
          (let ((_g94343_
                 (if (##values? _g94342_) (##vector-length _g94342_) 1)))
            (if (not (##fx= _g94343_ 2))
                (error "Context expects 2 values" _g94343_)))
          (let ((_f194126_ (##vector-ref _g94342_ 0))
                (_f294127_ (##vector-ref _g94342_ 1)))
            (let ((_g94344_
                   (std/srfi/1#partition
                    _pred94123_
                    (##structure-ref _dq94124_ '4 std/srfi/134#<ideque> '#f))))
              (begin
                (let ((_g94345_
                       (if (##values? _g94344_) (##vector-length _g94344_) 1)))
                  (if (not (##fx= _g94345_ 2))
                      (error "Context expects 2 values" _g94345_)))
                (let ((_r194129_ (##vector-ref _g94344_ 0))
                      (_r294130_ (##vector-ref _g94344_ 1)))
                  (values (std/srfi/134#check
                           (length _f194126_)
                           _f194126_
                           (length _r194129_)
                           _r194129_)
                          (std/srfi/134#check
                           (length _f294127_)
                           _f294127_
                           (length _r294130_)
                           _r294130_))))))))))
  (define std/srfi/134#*not-found* (cons '#f '#f))
  (define std/srfi/134#%search
    (lambda (_pred94109_ _seq194110_ _seq294111_ _failure94112_)
      (letrec ((_seek94114_
                (lambda (_pred94120_ _s94121_)
                  (if (null? _s94121_)
                      std/srfi/134#*not-found*
                      (if (_pred94120_ (car _s94121_))
                          (car _s94121_)
                          (_seek94114_ _pred94120_ (cdr _s94121_)))))))
        (let ((_r94116_ (_seek94114_ _pred94109_ _seq194110_)))
          (if (not (eq? _r94116_ std/srfi/134#*not-found*))
              _r94116_
              (let ((_r94118_ (_seek94114_ _pred94109_ (reverse _seq294111_))))
                (if (not (eq? _r94118_ std/srfi/134#*not-found*))
                    _r94118_
                    (_failure94112_))))))))
  (define std/srfi/134#ideque-find
    (lambda (_pred94102_ _dq94103_ . _opts94104_)
      (std/srfi/134#%check-ideque _dq94103_)
      (let ((_failure94107_
             (if (pair? _opts94104_) (car _opts94104_) (lambda () '#f))))
        (std/srfi/134#%search
         _pred94102_
         (##structure-ref _dq94103_ '2 std/srfi/134#<ideque> '#f)
         (##structure-ref _dq94103_ '4 std/srfi/134#<ideque> '#f)
         _failure94107_))))
  (define std/srfi/134#ideque-find-right
    (lambda (_pred94095_ _dq94096_ . _opts94097_)
      (std/srfi/134#%check-ideque _dq94096_)
      (let ((_failure94100_
             (if (pair? _opts94097_) (car _opts94097_) (lambda () '#f))))
        (std/srfi/134#%search
         _pred94095_
         (##structure-ref _dq94096_ '4 std/srfi/134#<ideque> '#f)
         (##structure-ref _dq94096_ '2 std/srfi/134#<ideque> '#f)
         _failure94100_))))
  (define std/srfi/134#ideque-take-while
    (lambda (_pred94086_ _dq94087_)
      (std/srfi/134#%check-ideque _dq94087_)
      (let ((_g94346_
             (std/srfi/1#span
              _pred94086_
              (##structure-ref _dq94087_ '2 std/srfi/134#<ideque> '#f))))
        (begin
          (let ((_g94347_
                 (if (##values? _g94346_) (##vector-length _g94346_) 1)))
            (if (not (##fx= _g94347_ 2))
                (error "Context expects 2 values" _g94347_)))
          (let ((_hd94089_ (##vector-ref _g94346_ 0))
                (_tl94090_ (##vector-ref _g94346_ 1)))
            (if (null? _tl94090_)
                (let ((_g94348_
                       (std/srfi/1#span
                        _pred94086_
                        (reverse (##structure-ref
                                  _dq94087_
                                  '4
                                  std/srfi/134#<ideque>
                                  '#f)))))
                  (begin
                    (let ((_g94349_
                           (if (##values? _g94348_)
                               (##vector-length _g94348_)
                               1)))
                      (if (not (##fx= _g94349_ 2))
                          (error "Context expects 2 values" _g94349_)))
                    (let ((_hd.94092_ (##vector-ref _g94348_ 0))
                          (_tl.94093_ (##vector-ref _g94348_ 1)))
                      (std/srfi/134#check
                       (##structure-ref _dq94087_ '1 std/srfi/134#<ideque> '#f)
                       (##structure-ref _dq94087_ '2 std/srfi/134#<ideque> '#f)
                       (length _hd.94092_)
                       (reverse _hd.94092_)))))
                (std/srfi/134#check (length _hd94089_) _hd94089_ '0 '())))))))
  (define std/srfi/134#ideque-take-while-right
    (lambda (_pred94083_ _dq94084_)
      (std/srfi/134#%check-ideque _dq94084_)
      (std/srfi/134#ideque-reverse
       (std/srfi/134#ideque-take-while
        _pred94083_
        (std/srfi/134#ideque-reverse _dq94084_)))))
  (define std/srfi/134#ideque-drop-while
    (lambda (_pred94074_ _dq94075_)
      (std/srfi/134#%check-ideque _dq94075_)
      (let ((_g94350_
             (std/srfi/1#span
              _pred94074_
              (##structure-ref _dq94075_ '2 std/srfi/134#<ideque> '#f))))
        (begin
          (let ((_g94351_
                 (if (##values? _g94350_) (##vector-length _g94350_) 1)))
            (if (not (##fx= _g94351_ 2))
                (error "Context expects 2 values" _g94351_)))
          (let ((_hd94077_ (##vector-ref _g94350_ 0))
                (_tl94078_ (##vector-ref _g94350_ 1)))
            (if (null? _tl94078_)
                (let ((_g94352_
                       (std/srfi/1#span
                        _pred94074_
                        (reverse (##structure-ref
                                  _dq94075_
                                  '4
                                  std/srfi/134#<ideque>
                                  '#f)))))
                  (begin
                    (let ((_g94353_
                           (if (##values? _g94352_)
                               (##vector-length _g94352_)
                               1)))
                      (if (not (##fx= _g94353_ 2))
                          (error "Context expects 2 values" _g94353_)))
                    (let ((_hd.94080_ (##vector-ref _g94352_ 0))
                          (_tl.94081_ (##vector-ref _g94352_ 1)))
                      (std/srfi/134#check
                       (length _tl.94081_)
                       _tl.94081_
                       '0
                       '()))))
                (std/srfi/134#check
                 (length _tl94078_)
                 _tl94078_
                 (##structure-ref _dq94075_ '3 std/srfi/134#<ideque> '#f)
                 (##structure-ref
                  _dq94075_
                  '4
                  std/srfi/134#<ideque>
                  '#f))))))))
  (define std/srfi/134#ideque-drop-while-right
    (lambda (_pred94071_ _dq94072_)
      (std/srfi/134#%check-ideque _dq94072_)
      (std/srfi/134#ideque-reverse
       (std/srfi/134#ideque-drop-while
        _pred94071_
        (std/srfi/134#ideque-reverse _dq94072_)))))
  (define std/srfi/134#%idq-span-break
    (lambda (_op94061_ _pred94062_ _dq94063_)
      (std/srfi/134#%check-ideque _dq94063_)
      (let ((_g94354_
             (_op94061_
              _pred94062_
              (##structure-ref _dq94063_ '2 std/srfi/134#<ideque> '#f))))
        (begin
          (let ((_g94355_
                 (if (##values? _g94354_) (##vector-length _g94354_) 1)))
            (if (not (##fx= _g94355_ 2))
                (error "Context expects 2 values" _g94355_)))
          (let ((_head94065_ (##vector-ref _g94354_ 0))
                (_tail94066_ (##vector-ref _g94354_ 1)))
            (if (null? _tail94066_)
                (let ((_g94356_
                       (_op94061_
                        _pred94062_
                        (reverse (##structure-ref
                                  _dq94063_
                                  '4
                                  std/srfi/134#<ideque>
                                  '#f)))))
                  (begin
                    (let ((_g94357_
                           (if (##values? _g94356_)
                               (##vector-length _g94356_)
                               1)))
                      (if (not (##fx= _g94357_ 2))
                          (error "Context expects 2 values" _g94357_)))
                    (let ((_head.94068_ (##vector-ref _g94356_ 0))
                          (_tail.94069_ (##vector-ref _g94356_ 1)))
                      (values (std/srfi/134#check
                               (length _head94065_)
                               _head94065_
                               (length _head.94068_)
                               (reverse _head.94068_))
                              (std/srfi/134#check
                               (length _tail.94069_)
                               _tail.94069_
                               '0
                               '())))))
                (values (std/srfi/134#check
                         (length _head94065_)
                         _head94065_
                         '0
                         '())
                        (std/srfi/134#check
                         (length _tail94066_)
                         _tail94066_
                         (##structure-ref
                          _dq94063_
                          '3
                          std/srfi/134#<ideque>
                          '#f)
                         (##structure-ref
                          _dq94063_
                          '4
                          std/srfi/134#<ideque>
                          '#f)))))))))
  (define std/srfi/134#ideque-span
    (lambda (_pred94058_ _dq94059_)
      (std/srfi/134#%idq-span-break std/srfi/1#span _pred94058_ _dq94059_)))
  (define std/srfi/134#ideque-break
    (lambda (_pred94055_ _dq94056_)
      (std/srfi/134#%idq-span-break std/srfi/1#break _pred94055_ _dq94056_)))
  (define std/srfi/134#ideque-any
    (lambda (_pred94049_ _dq94050_)
      (std/srfi/134#%check-ideque _dq94050_)
      (if (null? (##structure-ref _dq94050_ '4 std/srfi/134#<ideque> '#f))
          (std/srfi/1#any
           _pred94049_
           (##structure-ref _dq94050_ '2 std/srfi/134#<ideque> '#f))
          (let ((_$e94052_
                 (std/srfi/1#any
                  _pred94049_
                  (##structure-ref _dq94050_ '2 std/srfi/134#<ideque> '#f))))
            (if _$e94052_
                _$e94052_
                (std/srfi/1#any
                 _pred94049_
                 (reverse (##structure-ref
                           _dq94050_
                           '4
                           std/srfi/134#<ideque>
                           '#f))))))))
  (define std/srfi/134#ideque-every
    (lambda (_pred94046_ _dq94047_)
      (std/srfi/134#%check-ideque _dq94047_)
      (if (null? (##structure-ref _dq94047_ '4 std/srfi/134#<ideque> '#f))
          (std/srfi/1#every
           _pred94046_
           (##structure-ref _dq94047_ '2 std/srfi/134#<ideque> '#f))
          (if (std/srfi/1#every
               _pred94046_
               (##structure-ref _dq94047_ '2 std/srfi/134#<ideque> '#f))
              (std/srfi/1#every
               _pred94046_
               (reverse (##structure-ref
                         _dq94047_
                         '4
                         std/srfi/134#<ideque>
                         '#f)))
              '#f))))
  (define std/srfi/134#ideque->list
    (lambda (_dq94044_)
      (std/srfi/134#%check-ideque _dq94044_)
      (append (##structure-ref _dq94044_ '2 std/srfi/134#<ideque> '#f)
              (reverse (##structure-ref
                        _dq94044_
                        '4
                        std/srfi/134#<ideque>
                        '#f)))))
  (define std/srfi/134#list->ideque
    (lambda (_lis94042_)
      (std/srfi/134#check (length _lis94042_) _lis94042_ '0 '())))
  (define std/srfi/134#ideque->generator
    (lambda (_dq94037_)
      (std/srfi/134#%check-ideque _dq94037_)
      (lambda ()
        (if (std/srfi/134#ideque-empty? _dq94037_)
            (eof-object)
            (let ((_v94040_ (std/srfi/134#ideque-front _dq94037_)))
              (set! _dq94037_ (std/srfi/134#ideque-remove-front _dq94037_))
              _v94040_)))))
  (define std/srfi/134#generator->ideque
    (lambda (_gen94035_)
      (std/srfi/134#list->ideque
       (std/srfi/121#generator->list__1 _gen94035_)))))
