(declare (block) (standard-bindings) (extended-bindings))
(begin
  (define std/xml/sxml#sxml-e
    (lambda (_n857_)
      (if (pair? _n857_) (car _n857_) (if (string? _n857_) '*TEXT* '#f))))
  (define std/xml/sxml#sxml-attributes
    (lambda (_n815_)
      (let* ((_n816828_ _n815_)
             (_else818836_ (lambda () '#f))
             (_K820841_ (lambda (_attrs839_) _attrs839_)))
        (if (let () (declare (not safe)) (##pair? _n816828_))
            (let ((_tl822844_ (let () (declare (not safe)) (##cdr _n816828_))))
              (if (let () (declare (not safe)) (##pair? _tl822844_))
                  (let ((_hd823847_
                         (let () (declare (not safe)) (##car _tl822844_))))
                    (if (let () (declare (not safe)) (##pair? _hd823847_))
                        (let ((_hd825850_
                               (let ()
                                 (declare (not safe))
                                 (##car _hd823847_)))
                              (_tl826852_
                               (let ()
                                 (declare (not safe))
                                 (##cdr _hd823847_))))
                          (if (let ()
                                (declare (not safe))
                                (##eq? _hd825850_ '@))
                              (let ((_attrs855_ _tl826852_))
                                (_K820841_ _attrs855_))
                              (_else818836_)))
                        (_else818836_)))
                  (_else818836_)))
            (_else818836_)))))
  (define std/xml/sxml#sxml-attribute-e
    (lambda (_n805_ _key806_)
      (let ((_$e808_ (std/xml/sxml#sxml-attributes _n805_)))
        (if _$e808_
            ((lambda (_g810812_)
               (std/xml/sxml#sxml-attribute-getq _key806_ _g810812_))
             _$e808_)
            '#f))))
  (define std/xml/sxml#sxml-attribute-getq
    (lambda (_key799_ _attrs800_)
      (let ((_$e802_ (if (pair? _attrs800_) (assq _key799_ _attrs800_) '#f)))
        (if _$e802_ (cadr _$e802_) '#f))))
  (define std/xml/sxml#sxml-children
    (lambda (_n734_)
      (let* ((_n735743_ _n734_)
             (_else737751_ (lambda () '()))
             (_K739791_
              (lambda (_body754_)
                (let* ((_body755765_ _body754_)
                       (_else757773_ (lambda () _body754_))
                       (_K759778_ (lambda (_children776_) _children776_)))
                  (if (let () (declare (not safe)) (##pair? _body755765_))
                      (let ((_hd760781_
                             (let ()
                               (declare (not safe))
                               (##car _body755765_)))
                            (_tl761783_
                             (let ()
                               (declare (not safe))
                               (##cdr _body755765_))))
                        (if (let () (declare (not safe)) (##pair? _hd760781_))
                            (let ((_hd762786_
                                   (let ()
                                     (declare (not safe))
                                     (##car _hd760781_))))
                              (if (let ()
                                    (declare (not safe))
                                    (##eq? _hd762786_ '@))
                                  (let ((_children789_ _tl761783_))
                                    (_K759778_ _children789_))
                                  (_else757773_)))
                            (_else757773_)))
                      (_else757773_))))))
        (if (let () (declare (not safe)) (##pair? _n735743_))
            (let* ((_tl741794_ (let () (declare (not safe)) (##cdr _n735743_)))
                   (_body797_ _tl741794_))
              (_K739791_ _body797_))
            (_else737751_)))))
  (define std/xml/sxml#sxml-select__%
    (lambda (_n675_ _predf676_ _mapf677_)
      (letrec ((_select679_
                (lambda (_nodes681_ _r682_ _K683_)
                  (let* ((_nodes684692_ _nodes681_)
                         (_else686700_ (lambda () (_K683_ _r682_)))
                         (_K688710_
                          (lambda (_rest703_ _n704_)
                            (if (_predf676_ _n704_)
                                (_select679_
                                 _rest703_
                                 (cons (_mapf677_ _n704_) _r682_)
                                 _K683_)
                                (_select679_
                                 (std/xml/sxml#sxml-children _n704_)
                                 _r682_
                                 (lambda (_g705707_)
                                   (_select679_
                                    _rest703_
                                    _g705707_
                                    _K683_)))))))
                    (if (let () (declare (not safe)) (##pair? _nodes684692_))
                        (let ((_hd689713_
                               (let ()
                                 (declare (not safe))
                                 (##car _nodes684692_)))
                              (_tl690715_
                               (let ()
                                 (declare (not safe))
                                 (##cdr _nodes684692_))))
                          (let* ((_n718_ _hd689713_) (_rest720_ _tl690715_))
                            (_K688710_ _rest720_ _n718_)))
                        (_else686700_))))))
        (_select679_ (std/xml/sxml#sxml-children _n675_) '() reverse))))
  (define std/xml/sxml#sxml-select__0
    (lambda (_n725_ _predf726_)
      (let ((_mapf728_ values))
        (std/xml/sxml#sxml-select__% _n725_ _predf726_ _mapf728_))))
  (define std/xml/sxml#sxml-select
    (lambda _g4458_
      (let ((_g4457_ (let () (declare (not safe)) (##length _g4458_))))
        (cond ((let () (declare (not safe)) (##fx= _g4457_ 2))
               (apply std/xml/sxml#sxml-select__0 _g4458_))
              ((let () (declare (not safe)) (##fx= _g4457_ 3))
               (apply std/xml/sxml#sxml-select__% _g4458_))
              (else
               (##raise-wrong-number-of-arguments-exception
                std/xml/sxml#sxml-select
                _g4458_))))))
  (define std/xml/sxml#sxml-select/context__%
    (lambda (_n611_ _predf612_ _mapf613_)
      (letrec ((_select615_
                (lambda (_nodes617_ _ctx618_ _r619_ _K620_)
                  (let* ((_nodes621629_ _nodes617_)
                         (_else623637_ (lambda () (_K620_ _r619_)))
                         (_K625647_
                          (lambda (_rest640_ _n641_)
                            (if (_predf612_ _n641_ _ctx618_)
                                (_select615_
                                 _rest640_
                                 _ctx618_
                                 (cons (_mapf613_ _n641_ _ctx618_) _r619_)
                                 _K620_)
                                (_select615_
                                 (std/xml/sxml#sxml-children _n641_)
                                 (cons _n641_ _ctx618_)
                                 _r619_
                                 (lambda (_g642644_)
                                   (_select615_
                                    _rest640_
                                    _ctx618_
                                    _g642644_
                                    _K620_)))))))
                    (if (let () (declare (not safe)) (##pair? _nodes621629_))
                        (let ((_hd626650_
                               (let ()
                                 (declare (not safe))
                                 (##car _nodes621629_)))
                              (_tl627652_
                               (let ()
                                 (declare (not safe))
                                 (##cdr _nodes621629_))))
                          (let* ((_n655_ _hd626650_) (_rest657_ _tl627652_))
                            (_K625647_ _rest657_ _n655_)))
                        (_else623637_))))))
        (_select615_
         (std/xml/sxml#sxml-children _n611_)
         (cons _n611_ '())
         '()
         reverse))))
  (define std/xml/sxml#sxml-select/context__0
    (lambda (_n662_ _predf663_)
      (let ((_mapf668_ (lambda (_x665_ _y666_) _x665_)))
        (std/xml/sxml#sxml-select/context__% _n662_ _predf663_ _mapf668_))))
  (define std/xml/sxml#sxml-select/context
    (lambda _g4460_
      (let ((_g4459_ (let () (declare (not safe)) (##length _g4460_))))
        (cond ((let () (declare (not safe)) (##fx= _g4459_ 2))
               (apply std/xml/sxml#sxml-select/context__0 _g4460_))
              ((let () (declare (not safe)) (##fx= _g4459_ 3))
               (apply std/xml/sxml#sxml-select/context__% _g4460_))
              (else
               (##raise-wrong-number-of-arguments-exception
                std/xml/sxml#sxml-select/context
                _g4460_))))))
  (define std/xml/sxml#sxml-select*__%
    (lambda (_n556_ _predf557_ _mapf558_)
      (let _lp560_ ((_rest562_ (std/xml/sxml#sxml-children _n556_))
                    (_r563_ '()))
        (let* ((_rest564572_ _rest562_)
               (_else566580_ (lambda () (reverse _r563_)))
               (_K568586_
                (lambda (_rest583_ _n584_)
                  (if (_predf557_ _n584_)
                      (_lp560_ _rest583_ (cons (_mapf558_ _n584_) _r563_))
                      (_lp560_ _rest583_ _r563_)))))
          (if (let () (declare (not safe)) (##pair? _rest564572_))
              (let ((_hd569589_
                     (let () (declare (not safe)) (##car _rest564572_)))
                    (_tl570591_
                     (let () (declare (not safe)) (##cdr _rest564572_))))
                (let* ((_n594_ _hd569589_) (_rest596_ _tl570591_))
                  (_K568586_ _rest596_ _n594_)))
              (_else566580_))))))
  (define std/xml/sxml#sxml-select*__0
    (lambda (_n601_ _predf602_)
      (let ((_mapf604_ values))
        (std/xml/sxml#sxml-select*__% _n601_ _predf602_ _mapf604_))))
  (define std/xml/sxml#sxml-select*
    (lambda _g4462_
      (let ((_g4461_ (let () (declare (not safe)) (##length _g4462_))))
        (cond ((let () (declare (not safe)) (##fx= _g4461_ 2))
               (apply std/xml/sxml#sxml-select*__0 _g4462_))
              ((let () (declare (not safe)) (##fx= _g4461_ 3))
               (apply std/xml/sxml#sxml-select*__% _g4462_))
              (else
               (##raise-wrong-number-of-arguments-exception
                std/xml/sxml#sxml-select*
                _g4462_))))))
  (define std/xml/sxml#sxml-find__%
    (lambda (_n500_ _predf501_ _mapf502_)
      (letrec ((_find504_
                (lambda (_nodes506_ _E507_)
                  (let* ((_nodes508516_ _nodes506_)
                         (_else510524_ (lambda () (_E507_)))
                         (_K512531_
                          (lambda (_rest527_ _n528_)
                            (if (_predf501_ _n528_)
                                (_mapf502_ _n528_)
                                (_find504_
                                 (std/xml/sxml#sxml-children _n528_)
                                 (lambda () (_find504_ _rest527_ _E507_)))))))
                    (if (let () (declare (not safe)) (##pair? _nodes508516_))
                        (let ((_hd513534_
                               (let ()
                                 (declare (not safe))
                                 (##car _nodes508516_)))
                              (_tl514536_
                               (let ()
                                 (declare (not safe))
                                 (##cdr _nodes508516_))))
                          (let* ((_n539_ _hd513534_) (_rest541_ _tl514536_))
                            (_K512531_ _rest541_ _n539_)))
                        (_E507_))))))
        (_find504_ (std/xml/sxml#sxml-children _n500_) false))))
  (define std/xml/sxml#sxml-find__0
    (lambda (_n546_ _predf547_)
      (let ((_mapf549_ values))
        (std/xml/sxml#sxml-find__% _n546_ _predf547_ _mapf549_))))
  (define std/xml/sxml#sxml-find
    (lambda _g4464_
      (let ((_g4463_ (let () (declare (not safe)) (##length _g4464_))))
        (cond ((let () (declare (not safe)) (##fx= _g4463_ 2))
               (apply std/xml/sxml#sxml-find__0 _g4464_))
              ((let () (declare (not safe)) (##fx= _g4463_ 3))
               (apply std/xml/sxml#sxml-find__% _g4464_))
              (else
               (##raise-wrong-number-of-arguments-exception
                std/xml/sxml#sxml-find
                _g4464_))))))
  (define std/xml/sxml#sxml-find/context__%
    (lambda (_n440_ _predf441_ _mapf442_)
      (letrec ((_find444_
                (lambda (_nodes446_ _ctx447_ _E448_)
                  (let* ((_nodes449457_ _nodes446_)
                         (_else451465_ (lambda () (_E448_)))
                         (_K453472_
                          (lambda (_rest468_ _n469_)
                            (if (_predf441_ _n469_ _ctx447_)
                                (_mapf442_ _n469_ _ctx447_)
                                (_find444_
                                 (std/xml/sxml#sxml-children _n469_)
                                 (cons _n469_ _ctx447_)
                                 (lambda ()
                                   (_find444_ _rest468_ _ctx447_ _E448_)))))))
                    (if (let () (declare (not safe)) (##pair? _nodes449457_))
                        (let ((_hd454475_
                               (let ()
                                 (declare (not safe))
                                 (##car _nodes449457_)))
                              (_tl455477_
                               (let ()
                                 (declare (not safe))
                                 (##cdr _nodes449457_))))
                          (let* ((_n480_ _hd454475_) (_rest482_ _tl455477_))
                            (_K453472_ _rest482_ _n480_)))
                        (_E448_))))))
        (_find444_
         (std/xml/sxml#sxml-children _n440_)
         (cons _n440_ '())
         false))))
  (define std/xml/sxml#sxml-find/context__0
    (lambda (_n487_ _predf488_)
      (let ((_mapf493_ (lambda (_x490_ _y491_) _x490_)))
        (std/xml/sxml#sxml-find/context__% _n487_ _predf488_ _mapf493_))))
  (define std/xml/sxml#sxml-find/context
    (lambda _g4466_
      (let ((_g4465_ (let () (declare (not safe)) (##length _g4466_))))
        (cond ((let () (declare (not safe)) (##fx= _g4465_ 2))
               (apply std/xml/sxml#sxml-find/context__0 _g4466_))
              ((let () (declare (not safe)) (##fx= _g4465_ 3))
               (apply std/xml/sxml#sxml-find/context__% _g4466_))
              (else
               (##raise-wrong-number-of-arguments-exception
                std/xml/sxml#sxml-find/context
                _g4466_))))))
  (define std/xml/sxml#sxml-find*__%
    (lambda (_n420_ _pred421_ _mapf422_)
      (let ((_$e424_ (find _pred421_ (std/xml/sxml#sxml-children _n420_))))
        (if _$e424_ (_mapf422_ _$e424_) '#f))))
  (define std/xml/sxml#sxml-find*__0
    (lambda (_n430_ _pred431_)
      (let ((_mapf433_ values))
        (std/xml/sxml#sxml-find*__% _n430_ _pred431_ _mapf433_))))
  (define std/xml/sxml#sxml-find*
    (lambda _g4468_
      (let ((_g4467_ (let () (declare (not safe)) (##length _g4468_))))
        (cond ((let () (declare (not safe)) (##fx= _g4467_ 2))
               (apply std/xml/sxml#sxml-find*__0 _g4468_))
              ((let () (declare (not safe)) (##fx= _g4467_ 3))
               (apply std/xml/sxml#sxml-find*__% _g4468_))
              (else
               (##raise-wrong-number-of-arguments-exception
                std/xml/sxml#sxml-find*
                _g4468_))))))
  (define std/xml/sxml#sxml-e?
    (lambda (_el415_)
      (lambda (_n417_) (eq? (std/xml/sxml#sxml-e _n417_) _el415_))))
  (define std/xml/sxml#sxml-id?
    (lambda (_id405_)
      (lambda (_n407_)
        (let ((_nid408410_ (std/xml/sxml#sxml-attribute-e _n407_ 'id)))
          (if _nid408410_
              (let ((_nid413_ _nid408410_)) (equal? _nid413_ _id405_))
              '#f)))))
  (define std/xml/sxml#sxml-class?
    (lambda (_klass388_)
      (lambda (_n390_)
        (let ((_classes391393_ (std/xml/sxml#sxml-attribute-e _n390_ 'class)))
          (if _classes391393_
              (let ((_classes396_ _classes391393_))
                (if (string? _classes396_)
                    (let ((_$e398_ (string=? _classes396_ _klass388_)))
                      (if _$e398_
                          _$e398_
                          (find (lambda (_g400402_)
                                  (string=? _klass388_ _g400402_))
                                (string-split _classes396_ '#\space))))
                    '#f))
              '#f))))))
