(declare (block) (standard-bindings) (extended-bindings))
(begin
  (define std/srfi/130#errmsg (lambda (_key630_) '"illegal argument(s)"))
  (define std/srfi/130#assertion-violation
    (lambda (_procname626_ _msg627_ . _irritants628_)
      (apply error _msg627_ _irritants628_)))
  (define std/srfi/130#mod
    (lambda (_x623_ _y624_) (fxremainder _x623_ _y624_)))
  (declare (fixnum))
  (define std/srfi/130#string-cursor?
    (lambda (_x621_)
      (if (fixnum? _x621_)
          (let () (declare (not safe)) (##fx>= _x621_ '0))
          '#f)))
  (define std/srfi/130#string-cursor-start (lambda (_s619_) '0))
  (define std/srfi/130#string-cursor-end
    (lambda (_s617_) (string-length _s617_)))
  (define std/srfi/130#string-cursor-next
    (lambda (_s614_ _curs615_) (+ _curs615_ '1)))
  (define std/srfi/130#string-cursor-prev
    (lambda (_s611_ _curs612_) (- _curs612_ '1)))
  (define std/srfi/130#string-cursor-forward
    (lambda (_s607_ _curs608_ _n609_) (+ _curs608_ _n609_)))
  (define std/srfi/130#string-cursor-back
    (lambda (_s603_ _curs604_ _n605_) (- _curs604_ _n605_)))
  (define std/srfi/130#string-cursor=?
    (lambda (_curs1600_ _curs2601_) (= _curs1600_ _curs2601_)))
  (define std/srfi/130#string-cursor<?
    (lambda (_curs1597_ _curs2598_) (< _curs1597_ _curs2598_)))
  (define std/srfi/130#string-cursor>?
    (lambda (_curs1594_ _curs2595_) (> _curs1594_ _curs2595_)))
  (define std/srfi/130#string-cursor<=?
    (lambda (_curs1591_ _curs2592_) (<= _curs1591_ _curs2592_)))
  (define std/srfi/130#string-cursor>=?
    (lambda (_curs1588_ _curs2589_) (>= _curs1588_ _curs2589_)))
  (define std/srfi/130#string-cursor-diff
    (lambda (_s584_ _start585_ _end586_) (- _end586_ _start585_)))
  (define std/srfi/130#string-cursor->index
    (lambda (_s581_ _curs582_) _curs582_))
  (define std/srfi/130#string-index->cursor
    (lambda (_s578_ _idx579_) _idx579_))
  (define std/srfi/130#string->list/cursors string->list)
  (define std/srfi/130#string->vector/cursors string->vector)
  (define std/srfi/130#string-ref/cursor string-ref)
  (define std/srfi/130#substring/cursors substring)
  (define std/srfi/130#string-copy/cursors string-copy)
  (define std/srfi/130#string-index__0
    (lambda (_s563_ _pred564_)
      (std/srfi/130#string-index__2
       _s563_
       _pred564_
       '0
       (string-length _s563_))))
  (define std/srfi/130#string-index__1
    (lambda (_s566_ _pred567_ _start568_)
      (std/srfi/130#string-index__2
       _s566_
       _pred567_
       _start568_
       (string-length _s566_))))
  (define std/srfi/130#string-index__2
    (lambda (_s570_ _pred571_ _start572_ _end573_)
      (let ((_$e575_ (std/srfi/13#string-index__%
                      _s570_
                      _pred571_
                      _start572_
                      _end573_)))
        (if _$e575_ _$e575_ _end573_))))
  (define std/srfi/130#string-index
    (lambda _g4231_
      (let ((_g4230_ (let () (declare (not safe)) (##length _g4231_))))
        (cond ((let () (declare (not safe)) (##fx= _g4230_ 2))
               (apply std/srfi/130#string-index__0 _g4231_))
              ((let () (declare (not safe)) (##fx= _g4230_ 3))
               (apply std/srfi/130#string-index__1 _g4231_))
              ((let () (declare (not safe)) (##fx= _g4230_ 4))
               (apply std/srfi/130#string-index__2 _g4231_))
              (else
               (##raise-wrong-number-of-arguments-exception
                std/srfi/130#string-index
                _g4231_))))))
  (define std/srfi/130#string-index-right__0
    (lambda (_s549_ _pred550_)
      (std/srfi/130#string-index-right__2
       _s549_
       _pred550_
       '0
       (string-length _s549_))))
  (define std/srfi/130#string-index-right__1
    (lambda (_s552_ _pred553_ _start554_)
      (std/srfi/130#string-index-right__2
       _s552_
       _pred553_
       _start554_
       (string-length _s552_))))
  (define std/srfi/130#string-index-right__2
    (lambda (_s556_ _pred557_ _start558_ _end559_)
      (let ((_i561_ (std/srfi/13#string-index-right__%
                     _s556_
                     _pred557_
                     _start558_
                     _end559_)))
        (if _i561_ (+ _i561_ '1) _start558_))))
  (define std/srfi/130#string-index-right
    (lambda _g4233_
      (let ((_g4232_ (let () (declare (not safe)) (##length _g4233_))))
        (cond ((let () (declare (not safe)) (##fx= _g4232_ 2))
               (apply std/srfi/130#string-index-right__0 _g4233_))
              ((let () (declare (not safe)) (##fx= _g4232_ 3))
               (apply std/srfi/130#string-index-right__1 _g4233_))
              ((let () (declare (not safe)) (##fx= _g4232_ 4))
               (apply std/srfi/130#string-index-right__2 _g4233_))
              (else
               (##raise-wrong-number-of-arguments-exception
                std/srfi/130#string-index-right
                _g4233_))))))
  (define std/srfi/130#string-skip
    (lambda (_s543_ _pred544_ . _rest545_)
      (apply std/srfi/130#string-index
             _s543_
             (lambda (_x547_) (not (_pred544_ _x547_)))
             _rest545_)))
  (define std/srfi/130#string-skip-right
    (lambda (_s537_ _pred538_ . _rest539_)
      (apply std/srfi/130#string-index-right
             _s537_
             (lambda (_x541_) (not (_pred538_ _x541_)))
             _rest539_)))
  (define std/srfi/130#string-contains-right__0
    (lambda (_s1507_ _s2508_)
      (std/srfi/130#string-contains-right__4
       _s1507_
       _s2508_
       '0
       (string-length _s1507_)
       '0
       (string-length _s2508_))))
  (define std/srfi/130#string-contains-right__1
    (lambda (_s1510_ _s2511_ _start1512_)
      (std/srfi/130#string-contains-right__4
       _s1510_
       _s2511_
       _start1512_
       (string-length _s1510_)
       '0
       (string-length _s2511_))))
  (define std/srfi/130#string-contains-right__2
    (lambda (_s1514_ _s2515_ _start1516_ _end1517_)
      (std/srfi/130#string-contains-right__4
       _s1514_
       _s2515_
       _start1516_
       _end1517_
       '0
       (string-length _s2515_))))
  (define std/srfi/130#string-contains-right__3
    (lambda (_s1519_ _s2520_ _start1521_ _end1522_ _start2523_)
      (std/srfi/130#string-contains-right__4
       _s1519_
       _s2520_
       _start1521_
       _end1522_
       _start2523_
       (string-length _s2520_))))
  (define std/srfi/130#string-contains-right__4
    (lambda (_s1525_ _s2526_ _start1527_ _end1528_ _start2529_ _end2530_)
      (if (= _start2529_ _end2530_)
          _end1528_
          (let _loop532_ ((_i534_ '#f)
                          (_j535_ (std/srfi/13#string-contains__%
                                   _s1525_
                                   _s2526_
                                   _start1527_
                                   _end1528_
                                   _start2529_
                                   _end2530_)))
            (if (and _j535_ (< _j535_ _end1528_))
                (_loop532_
                 _j535_
                 (std/srfi/13#string-contains__%
                  _s1525_
                  _s2526_
                  (+ _j535_ '1)
                  _end1528_
                  _start2529_
                  _end2530_))
                _i534_)))))
  (define std/srfi/130#string-contains-right
    (lambda _g4235_
      (let ((_g4234_ (let () (declare (not safe)) (##length _g4235_))))
        (cond ((let () (declare (not safe)) (##fx= _g4234_ 2))
               (apply std/srfi/130#string-contains-right__0 _g4235_))
              ((let () (declare (not safe)) (##fx= _g4234_ 3))
               (apply std/srfi/130#string-contains-right__1 _g4235_))
              ((let () (declare (not safe)) (##fx= _g4234_ 4))
               (apply std/srfi/130#string-contains-right__2 _g4235_))
              ((let () (declare (not safe)) (##fx= _g4234_ 5))
               (apply std/srfi/130#string-contains-right__3 _g4235_))
              ((let () (declare (not safe)) (##fx= _g4234_ 6))
               (apply std/srfi/130#string-contains-right__4 _g4235_))
              (else
               (##raise-wrong-number-of-arguments-exception
                std/srfi/130#string-contains-right
                _g4235_))))))
  (define std/srfi/130#string-for-each-cursor__0
    (lambda (_proc490_ _s491_)
      (std/srfi/130#string-for-each-cursor__2
       _proc490_
       _s491_
       '0
       (string-length _s491_))))
  (define std/srfi/130#string-for-each-cursor__1
    (lambda (_proc493_ _s494_ _start495_)
      (std/srfi/130#string-for-each-cursor__2
       _proc493_
       _s494_
       _start495_
       (string-length _s494_))))
  (define std/srfi/130#string-for-each-cursor__2
    (lambda (_proc497_ _s498_ _start499_ _end500_)
      (let _$loop502_ ((_i505_ _start499_))
        (if (>= _i505_ _end500_)
            '#!void
            (begin (_proc497_ _i505_) (_$loop502_ (+ _i505_ '1)))))))
  (define std/srfi/130#string-for-each-cursor
    (lambda _g4237_
      (let ((_g4236_ (let () (declare (not safe)) (##length _g4237_))))
        (cond ((let () (declare (not safe)) (##fx= _g4236_ 2))
               (apply std/srfi/130#string-for-each-cursor__0 _g4237_))
              ((let () (declare (not safe)) (##fx= _g4236_ 3))
               (apply std/srfi/130#string-for-each-cursor__1 _g4237_))
              ((let () (declare (not safe)) (##fx= _g4236_ 4))
               (apply std/srfi/130#string-for-each-cursor__2 _g4237_))
              (else
               (##raise-wrong-number-of-arguments-exception
                std/srfi/130#string-for-each-cursor
                _g4237_))))))
  (define std/srfi/130#string-replicate__0
    (lambda (_s456_ _from457_ _to458_ _start459_ _end460_)
      (std/srfi/130#string-replicate__2
       (substring _s456_ _start459_ _end460_)
       _from457_
       _to458_)))
  (define std/srfi/130#string-replicate__1
    (lambda (_s462_ _from463_ _to464_ _start465_)
      (std/srfi/130#string-replicate__2
       (substring _s462_ _start465_ (string-length _s462_))
       _from463_
       _to464_)))
  (define std/srfi/130#string-replicate__2
    (lambda (_s467_ _from468_ _to469_)
      (let* ((_n471_ (- _to469_ _from468_)) (_len473_ (string-length _s467_)))
        (if (= _n471_ '0)
            '""
            (if (or (< _n471_ '0) (= _len473_ '0))
                (std/srfi/130#assertion-violation
                 'string-replicate
                 (std/srfi/130#errmsg 'msg:illegalargs)
                 _s467_
                 _from468_
                 _to469_)
                (let* ((_from479_ (fxremainder _from468_ _len473_))
                       (_to481_ (+ _from479_ _n471_)))
                  (let _$loop484_ ((_replicates487_ '())
                                   (_replicates-length488_ '0))
                    (if (>= _replicates-length488_ _to481_)
                        (substring
                         (apply string-append _replicates487_)
                         _from479_
                         _to481_)
                        (_$loop484_
                         (cons _s467_ _replicates487_)
                         (+ _replicates-length488_ _len473_))))))))))
  (define std/srfi/130#string-replicate
    (lambda _g4239_
      (let ((_g4238_ (let () (declare (not safe)) (##length _g4239_))))
        (cond ((let () (declare (not safe)) (##fx= _g4238_ 5))
               (apply std/srfi/130#string-replicate__0 _g4239_))
              ((let () (declare (not safe)) (##fx= _g4238_ 4))
               (apply std/srfi/130#string-replicate__1 _g4239_))
              ((let () (declare (not safe)) (##fx= _g4238_ 3))
               (apply std/srfi/130#string-replicate__2 _g4239_))
              (else
               (##raise-wrong-number-of-arguments-exception
                std/srfi/130#string-replicate
                _g4239_))))))
  (define std/srfi/130#string-split__0
    (lambda (_s414_ _delimiter415_ _grammar416_ _limit417_ _start418_ _end419_)
      (std/srfi/130#string-split__4
       (substring _s414_ _start418_ _end419_)
       _delimiter415_
       _grammar416_
       _limit417_)))
  (define std/srfi/130#string-split__1
    (lambda (_s421_ _delimiter422_ _grammar423_ _limit424_ _start425_)
      (std/srfi/130#string-split__4
       (substring _s421_ _start425_ (string-length _s421_))
       _delimiter422_
       _grammar423_
       _limit424_)))
  (define std/srfi/130#string-split__2
    (lambda (_s427_ _delimiter428_)
      (std/srfi/130#string-split__4 _s427_ _delimiter428_ 'infix '#f)))
  (define std/srfi/130#string-split__3
    (lambda (_s430_ _delimiter431_ _grammar432_)
      (std/srfi/130#string-split__4 _s430_ _delimiter431_ _grammar432_ '#f)))
  (define std/srfi/130#string-split__4
    (lambda (_s434_ _delimiter435_ _grammar436_ _limit437_)
      (letrec ((_complain439_
                (lambda ()
                  (std/srfi/130#assertion-violation
                   'string-split
                   (std/srfi/130#errmsg 'msg:illegalargs)
                   _s434_
                   _delimiter435_
                   _grammar436_
                   _limit437_))))
        (let* ((_limit444_
                (let ((_$e441_ _limit437_))
                  (if _$e441_ _$e441_ (string-length _s434_))))
               (_splits446_
                (if (= '0 (string-length _delimiter435_))
                    (std/srfi/130#string-split-into-characters
                     _s434_
                     _limit444_)
                    (std/srfi/130#string-split-using-word
                     _s434_
                     _delimiter435_
                     _limit444_))))
          (let ((_$e449_ _grammar436_))
            (if (or (eq? 'infix _$e449_) (eq? 'strict-infix _$e449_))
                (if (= '0 (string-length _s434_))
                    (if (eq? _grammar436_ 'infix) '() (_complain439_))
                    _splits446_)
                (if (eq? 'prefix _$e449_)
                    (if (and (pair? _splits446_)
                             (= '0 (string-length (car _splits446_))))
                        (cdr _splits446_)
                        _splits446_)
                    (if (eq? 'suffix _$e449_)
                        (if (and (pair? _splits446_)
                                 (= '0
                                    (string-length
                                     (car (last-pair _splits446_)))))
                            (reverse (cdr (reverse _splits446_)))
                            _splits446_)
                        (_complain439_)))))))))
  (define std/srfi/130#string-split
    (lambda _g4241_
      (let ((_g4240_ (let () (declare (not safe)) (##length _g4241_))))
        (cond ((let () (declare (not safe)) (##fx= _g4240_ 6))
               (apply std/srfi/130#string-split__0 _g4241_))
              ((let () (declare (not safe)) (##fx= _g4240_ 5))
               (apply std/srfi/130#string-split__1 _g4241_))
              ((let () (declare (not safe)) (##fx= _g4240_ 2))
               (apply std/srfi/130#string-split__2 _g4241_))
              ((let () (declare (not safe)) (##fx= _g4240_ 3))
               (apply std/srfi/130#string-split__3 _g4241_))
              ((let () (declare (not safe)) (##fx= _g4240_ 4))
               (apply std/srfi/130#string-split__4 _g4241_))
              (else
               (##raise-wrong-number-of-arguments-exception
                std/srfi/130#string-split
                _g4241_))))))
  (define std/srfi/130#string-split-into-characters
    (lambda (_s409_ _limit410_)
      (let ((_n412_ (string-length _s409_)))
        (if (> _n412_ (+ _limit410_ '1))
            (append (std/srfi/130#string-split-into-characters
                     (substring _s409_ '0 _limit410_)
                     _limit410_)
                    (substring _s409_ _limit410_ _n412_))
            (map string (string->list _s409_))))))
  (define std/srfi/130#string-split-using-word
    (lambda (_s403_ _sep404_ _limit405_)
      (if (= '0 _limit405_)
          (list _s403_)
          (let ((_i407_ (std/srfi/13#string-contains__0 _s403_ _sep404_)))
            (if _i407_
                (cons (substring _s403_ '0 _i407_)
                      (std/srfi/130#string-split-using-word
                       (substring
                        _s403_
                        (+ _i407_ (string-length _sep404_))
                        (string-length _s403_))
                       _sep404_
                       (- _limit405_ '1)))
                (list _s403_))))))
  (define std/srfi/130#string-remove
    (lambda (_pred397_ _s398_ . _args399_)
      (apply std/srfi/13#string-filter
             (lambda (_c401_) (not (_pred397_ _c401_)))
             _s398_
             _args399_))))
