1(export (rename (1/byte-pregexp byte-pregexp)
2                (1/byte-pregexp? byte-pregexp?)
3                (1/byte-regexp byte-regexp)
4                (1/byte-regexp? byte-regexp?)
5                (1/pregexp pregexp)
6                (1/pregexp? pregexp?)
7                (1/regexp regexp)
8                (1/regexp-match regexp-match)
9                (1/regexp-match-peek regexp-match-peek)
10                (1/regexp-match-peek-immediate regexp-match-peek-immediate)
11                (1/regexp-match-peek-positions regexp-match-peek-positions)
12                (1/regexp-match-peek-positions-immediate
13                 regexp-match-peek-positions-immediate)
14                (1/regexp-match-peek-positions-immediate/end
15                 regexp-match-peek-positions-immediate/end)
16                (1/regexp-match-peek-positions/end
17                 regexp-match-peek-positions/end)
18                (1/regexp-match-positions regexp-match-positions)
19                (1/regexp-match-positions/end regexp-match-positions/end)
20                (1/regexp-match/end regexp-match/end)
21                (1/regexp-match? regexp-match?)
22                (1/regexp-max-lookbehind regexp-max-lookbehind)
23                (regexp-place-init! regexp-place-init!)
24                (1/regexp-replace regexp-replace)
25                (1/regexp-replace* regexp-replace*)
26                (1/regexp? regexp?)))
27(define hash1688
28  (hash
29   '#vu8(97 108 110 117 109)
30   '6
31   '#vu8(97 108 112 104 97)
32   '1
33   '#vu8(97 115 99 105 105)
34   '12
35   '#vu8(98 108 97 110 107)
36   '8
37   '#vu8(99 110 116 114 108)
38   '11
39   '#vu8(100 105 103 105 116)
40   '4
41   '#vu8(103 114 97 112 104)
42   '10
43   '#vu8(108 111 119 101 114)
44   '3
45   '#vu8(112 114 105 110 116)
46   '10
47   '#vu8(115 112 97 99 101)
48   '9
49   '#vu8(117 112 112 101 114)
50   '2
51   '#vu8(119 111 114 100)
52   '7
53   '#vu8(120 100 105 103 105 116)
54   '5))
55(define hash2956
56  (hash
57   '#vu8(46)
58   '39
59   '#vu8(67)
60   '38
61   '#vu8(67 99)
62   '33
63   '#vu8(67 102)
64   '34
65   '#vu8(67 110)
66   '36
67   '#vu8(67 111)
68   '37
69   '#vu8(67 115)
70   '35
71   '#vu8(76)
72   '7
73   '#vu8(76 38)
74   '5
75   '#vu8(76 108)
76   '1
77   '#vu8(76 109)
78   '4
79   '#vu8(76 111)
80   '6
81   '#vu8(76 116)
82   '3
83   '#vu8(76 117)
84   '2
85   '#vu8(77)
86   '23
87   '#vu8(77 99)
88   '21
89   '#vu8(77 101)
90   '22
91   '#vu8(77 110)
92   '20
93   '#vu8(78)
94   '11
95   '#vu8(78 100)
96   '8
97   '#vu8(78 108)
98   '9
99   '#vu8(78 111)
100   '10
101   '#vu8(80)
102   '19
103   '#vu8(80 99)
104   '16
105   '#vu8(80 100)
106   '17
107   '#vu8(80 101)
108   '13
109   '#vu8(80 102)
110   '15
111   '#vu8(80 105)
112   '14
113   '#vu8(80 111)
114   '18
115   '#vu8(80 115)
116   '12
117   '#vu8(83)
118   '28
119   '#vu8(83 99)
120   '24
121   '#vu8(83 107)
122   '25
123   '#vu8(83 109)
124   '26
125   '#vu8(83 111)
126   '27
127   '#vu8(90)
128   '32
129   '#vu8(90 108)
130   '29
131   '#vu8(90 112)
132   '30
133   '#vu8(90 115)
134   '31))
135(define hash2589 (hasheqv))
136(define-values
137 (prop:keyword-impersonator keyword-impersonator? keyword-impersonator-ref)
138 (make-struct-type-property 'keyword-impersonator))
139(define keyword-procedure-impersonator-of
140  (lambda (v_0)
141    (if (keyword-impersonator? v_0)
142      (|#%app| (keyword-impersonator-ref v_0) v_0)
143      #f)))
144(define-values
145 (struct:keyword-procedure
146  mk-kw-proc
147  keyword-procedure?
148  keyword-procedure-ref
149  keyword-procedure-set!)
150 (let ((app_0
151        (list
152         (cons prop:checked-procedure #t)
153         (cons prop:impersonator-of keyword-procedure-impersonator-of))))
154   (make-struct-type
155    'keyword-procedure
156    #f
157    4
158    0
159    #f
160    app_0
161    (current-inspector)
162    #f
163    '(0 1 2 3))))
164(define keyword-procedure-required
165  (make-struct-field-accessor keyword-procedure-ref 2))
166(define keyword-procedure-allowed
167  (make-struct-field-accessor keyword-procedure-ref 3))
168(define-values
169 (prop:procedure-accessor procedure-accessor? procedure-accessor-ref)
170 (make-struct-type-property
171  'procedure
172  (lambda (v_0 info-l_0)
173    (if (exact-integer? v_0)
174      (make-struct-field-accessor (list-ref info-l_0 3) v_0)
175      #f))))
176(define-values
177 (new-prop:procedure new-procedure? new-procedure-ref)
178 (make-struct-type-property
179  'procedure
180  #f
181  (list (cons prop:procedure values) (cons prop:procedure-accessor values))
182  #t))
183(define procedure-keywords
184  (lambda (p_0)
185    (if (keyword-procedure? p_0)
186      (let ((app_0 (keyword-procedure-required p_0)))
187        (values app_0 (keyword-procedure-allowed p_0)))
188      (if (procedure? p_0)
189        (if (new-procedure? p_0)
190          (let ((v_0 (new-procedure-ref p_0)))
191            (if (procedure? v_0)
192              (procedure-keywords v_0)
193              (let ((a_0 (procedure-accessor-ref p_0)))
194                (if a_0
195                  (procedure-keywords (|#%app| a_0 p_0))
196                  (values null null)))))
197          (values null null))
198        (raise-argument-error 'procedure-keywords "procedure?" p_0)))))
199(define reverse$1
200  (|#%name|
201   reverse
202   (lambda (l_0)
203     (begin
204       (begin
205         (letrec*
206          ((loop_0
207            (|#%name|
208             loop
209             (lambda (a_0 l_1)
210               (begin
211                 (if (null? l_1)
212                   a_0
213                   (let ((app_0 (cons (car l_1) a_0)))
214                     (loop_0 app_0 (cdr l_1)))))))))
215          (loop_0 null l_0)))))))
216(define-values
217 (prop:stream stream-via-prop? stream-ref)
218 (make-struct-type-property
219  'stream
220  (lambda (v_0 si_0)
221    (begin
222      (if (if (vector? v_0)
223            (if (= 3 (vector-length v_0))
224              (if (procedure? (vector-ref v_0 0))
225                (if (procedure-arity-includes? (vector-ref v_0 0) 1)
226                  (if (procedure? (vector-ref v_0 1))
227                    (if (procedure-arity-includes? (vector-ref v_0 1) 1)
228                      (if (procedure? (vector-ref v_0 2))
229                        (procedure-arity-includes? (vector-ref v_0 2) 1)
230                        #f)
231                      #f)
232                    #f)
233                  #f)
234                #f)
235              #f)
236            #f)
237        (void)
238        (raise-argument-error
239         'guard-for-prop:stream
240         (string-append
241          "(vector/c (procedure-arity-includes/c 1)\n"
242          "          (procedure-arity-includes/c 1)\n"
243          "          (procedure-arity-includes/c 1))")
244         v_0))
245      (vector->immutable-vector v_0)))
246  '()
247  #t))
248(define-values
249 (prop:gen-sequence sequence-via-prop? sequence-ref)
250 (make-struct-type-property
251  'sequence
252  (lambda (v_0 si_0)
253    (begin
254      (if (if (procedure? v_0) (procedure-arity-includes? v_0 1) #f)
255        (void)
256        (raise-argument-error
257         'guard-for-prop:sequence
258         "(procedure-arity-includes/c 1)"
259         v_0))
260      v_0))))
261(define-values
262 (struct:range make-range range? range-ref range-set!)
263 (make-struct-type
264  'stream
265  #f
266  3
267  0
268  #f
269  (list
270   (cons
271    prop:stream
272    (vector
273     (lambda (v_0)
274       (let ((cont?_0 (|#%app| range-ref v_0 2)))
275         (if cont?_0 (not (|#%app| cont?_0 (|#%app| range-ref v_0 0))) #f)))
276     (lambda (v_0) (|#%app| range-ref v_0 0))
277     (lambda (v_0)
278       (let ((app_0
279              (let ((app_0 (|#%app| range-ref v_0 1)))
280                (|#%app| app_0 (|#%app| range-ref v_0 0)))))
281         (let ((app_1 (|#%app| range-ref v_0 1)))
282           (make-range app_0 app_1 (|#%app| range-ref v_0 2)))))))
283   (cons
284    prop:gen-sequence
285    (lambda (v_0)
286      (let ((app_0 (|#%app| range-ref v_0 1)))
287        (let ((app_1 (|#%app| range-ref v_0 0)))
288          (values values #f app_0 app_1 (|#%app| range-ref v_0 2) #f #f))))))))
289(define check-range$1
290  (|#%name|
291   check-range
292   (lambda (a_0 b_0 step_0)
293     (begin (check-range-generic 'in-range a_0 b_0 step_0)))))
294(define check-range-generic
295  (lambda (who_0 a_0 b_0 step_0)
296    (begin
297      (if (real? a_0) (void) (raise-argument-error who_0 "real?" a_0))
298      (if (real? b_0) (void) (raise-argument-error who_0 "real?" b_0))
299      (if (real? step_0) (void) (raise-argument-error who_0 "real?" step_0)))))
300(define check-naturals
301  (lambda (n_0)
302    (if (if (integer? n_0) (if (exact? n_0) (>= n_0 0) #f) #f)
303      (void)
304      (raise-argument-error 'in-naturals "exact-nonnegative-integer?" n_0))))
305(define-values
306 (struct:list-stream
307  make-list-stream
308  list-stream?
309  list-stream-ref
310  list-stream-set!)
311 (make-struct-type
312  'stream
313  #f
314  1
315  0
316  #f
317  (list
318   (cons
319    prop:stream
320    (vector
321     (lambda (v_0) (not (pair? (|#%app| list-stream-ref v_0 0))))
322     (lambda (v_0) (car (|#%app| list-stream-ref v_0 0)))
323     (lambda (v_0) (make-list-stream (cdr (|#%app| list-stream-ref v_0 0))))))
324   (cons
325    prop:gen-sequence
326    (lambda (v_0)
327      (values car cdr values (|#%app| list-stream-ref v_0 0) pair? #f #f))))))
328(define check-list
329  (lambda (l_0)
330    (if (list? l_0) (void) (raise-argument-error 'in-list "list?" l_0))))
331(define check-in-hash-keys
332  (lambda (ht_0)
333    (if (hash? ht_0)
334      (void)
335      (raise-argument-error 'in-hash-keys "hash?" ht_0))))
336(define check-ranges
337  (lambda (who_0 type-name_0 vec_0 start_0 stop_0 step_0 len_0)
338    (begin
339      (if (if (exact-nonnegative-integer? start_0)
340            (let ((or-part_0 (< start_0 len_0)))
341              (if or-part_0 or-part_0 (= len_0 start_0 stop_0)))
342            #f)
343        (void)
344        (raise-range-error
345         who_0
346         type-name_0
347         "starting "
348         start_0
349         vec_0
350         0
351         (sub1 len_0)))
352      (if (if (exact-integer? stop_0)
353            (if (<= -1 stop_0) (<= stop_0 len_0) #f)
354            #f)
355        (void)
356        (raise-range-error
357         who_0
358         type-name_0
359         "stopping "
360         stop_0
361         vec_0
362         -1
363         len_0))
364      (if (if (exact-integer? step_0) (not (zero? step_0)) #f)
365        (void)
366        (raise-argument-error
367         who_0
368         "(and/c exact-integer? (not/c zero?))"
369         step_0))
370      (if (if (< start_0 stop_0) (< step_0 0) #f)
371        (raise-arguments-error
372         who_0
373         "starting index less than stopping index, but given a negative step"
374         "starting index"
375         start_0
376         "stopping index"
377         stop_0
378         "step"
379         step_0)
380        (void))
381      (if (if (< stop_0 start_0) (> step_0 0) #f)
382        (raise-arguments-error
383         who_0
384         "starting index more than stopping index, but given a positive step"
385         "starting index"
386         start_0
387         "stopping index"
388         stop_0
389         "step"
390         step_0)
391        (void)))))
392(define normalise-inputs
393  (lambda (who_0
394           type-name_0
395           vector?_0
396           unsafe-vector-length_0
397           vec_0
398           start_0
399           stop_0
400           step_0)
401    (begin
402      (if (|#%app| vector?_0 vec_0)
403        (void)
404        (raise-argument-error who_0 type-name_0 vec_0))
405      (let ((len_0 (|#%app| unsafe-vector-length_0 vec_0)))
406        (let ((stop*_0 (if stop_0 stop_0 len_0)))
407          (begin
408            (check-ranges who_0 type-name_0 vec_0 start_0 stop*_0 step_0 len_0)
409            (values vec_0 start_0 stop*_0 step_0)))))))
410(define unsafe-normalise-inputs
411  (lambda (unsafe-vector-length_0 vec_0 start_0 stop_0 step_0)
412    (values
413     vec_0
414     start_0
415     (if stop_0 stop_0 (|#%app| unsafe-vector-length_0 vec_0))
416     step_0)))
417(define check-vector
418  (lambda (v_0)
419    (if (vector? v_0) (void) (raise-argument-error 'in-vector "vector" v_0))))
420(define-values
421 (struct:do-stream make-do-stream do-stream? do-stream-ref do-stream-set!)
422 (make-struct-type
423  'stream
424  #f
425  3
426  0
427  #f
428  (list
429   (cons
430    prop:stream
431    (vector
432     (lambda (v_0) (|#%app| (|#%app| do-stream-ref v_0 0)))
433     (lambda (v_0) (|#%app| (|#%app| do-stream-ref v_0 1)))
434     (lambda (v_0) (|#%app| (|#%app| do-stream-ref v_0 2))))))))
435(define empty-stream (make-do-stream (lambda () #t) void void))
436(define map_1346
437  (|#%name|
438   map
439   (case-lambda
440    ((f_0 l_0)
441     (begin
442       (letrec*
443        ((loop_0
444          (|#%name|
445           loop
446           (lambda (l_1)
447             (begin
448               (if (null? l_1)
449                 null
450                 (let ((r_0 (cdr l_1)))
451                   (let ((app_0 (|#%app| f_0 (car l_1))))
452                     (cons app_0 (loop_0 r_0))))))))))
453        (loop_0 l_0))))
454    ((f_0 l1_0 l2_0)
455     (letrec*
456      ((loop_0
457        (|#%name|
458         loop
459         (lambda (l1_1 l2_1)
460           (begin
461             (if (null? l1_1)
462               null
463               (let ((r1_0 (cdr l1_1)))
464                 (let ((r2_0 (cdr l2_1)))
465                   (let ((r1_1 r1_0))
466                     (let ((app_0
467                            (let ((app_0 (car l1_1)))
468                              (|#%app| f_0 app_0 (car l2_1)))))
469                       (cons app_0 (loop_0 r1_1 r2_0))))))))))))
470      (loop_0 l1_0 l2_0)))
471    ((f_0 l_0 . args_0) (gen-map f_0 (cons l_0 args_0))))))
472(define ormap_2765
473  (|#%name|
474   ormap
475   (case-lambda
476    ((f_0 l_0)
477     (begin
478       (if (null? l_0)
479         #f
480         (letrec*
481          ((loop_0
482            (|#%name|
483             loop
484             (lambda (l_1)
485               (begin
486                 (if (null? (cdr l_1))
487                   (|#%app| f_0 (car l_1))
488                   (let ((r_0 (cdr l_1)))
489                     (let ((or-part_0 (|#%app| f_0 (car l_1))))
490                       (if or-part_0 or-part_0 (loop_0 r_0))))))))))
491          (loop_0 l_0)))))
492    ((f_0 l1_0 l2_0)
493     (if (null? l1_0)
494       #f
495       (letrec*
496        ((loop_0
497          (|#%name|
498           loop
499           (lambda (l1_1 l2_1)
500             (begin
501               (if (null? (cdr l1_1))
502                 (let ((app_0 (car l1_1))) (|#%app| f_0 app_0 (car l2_1)))
503                 (let ((r1_0 (cdr l1_1)))
504                   (let ((r2_0 (cdr l2_1)))
505                     (let ((r1_1 r1_0))
506                       (let ((or-part_0
507                              (let ((app_0 (car l1_1)))
508                                (|#%app| f_0 app_0 (car l2_1)))))
509                         (if or-part_0 or-part_0 (loop_0 r1_1 r2_0))))))))))))
510        (loop_0 l1_0 l2_0))))
511    ((f_0 l_0 . args_0) (gen-ormap f_0 (cons l_0 args_0))))))
512(define check-args
513  (lambda (who_0 f_0 ls_0)
514    (begin
515      (if (procedure? f_0)
516        (void)
517        (raise-argument-error who_0 "procedure?" f_0))
518      (letrec*
519       ((loop_0
520         (|#%name|
521          loop
522          (lambda (prev-len_0 ls_1 i_0)
523            (begin
524              (if (null? ls_1)
525                (void)
526                (let ((l_0 (car ls_1)))
527                  (begin
528                    (if (list? l_0)
529                      (void)
530                      (raise-argument-error who_0 "list?" l_0))
531                    (let ((len_0 (length l_0)))
532                      (begin
533                        (if (if prev-len_0 (not (= len_0 prev-len_0)) #f)
534                          (raise-arguments-error
535                           who_0
536                           "all lists must have same size"
537                           "first list length"
538                           prev-len_0
539                           "other list length"
540                           len_0
541                           "procedure"
542                           f_0)
543                          (void))
544                        (let ((app_0 (cdr ls_1)))
545                          (loop_0 len_0 app_0 (add1 i_0)))))))))))))
546       (loop_0 #f ls_0 1))
547      (if (procedure-arity-includes? f_0 (length ls_0))
548        (void)
549        (call-with-values
550         (lambda () (procedure-keywords f_0))
551         (case-lambda
552          ((required-keywords_0 optional-keywords_0)
553           (let ((app_0
554                  (if (pair? required-keywords_0)
555                    (string-append
556                     "argument mismatch;\n"
557                     " the given procedure expects keyword arguments")
558                    (string-append
559                     "argument mismatch;\n"
560                     " the given procedure's expected number of arguments does not match"
561                     " the given number of lists"))))
562             (let ((app_1
563                    (unquoted-printing-string
564                     (let ((or-part_0
565                            (let ((n_0 (object-name f_0)))
566                              (if (symbol? n_0) (symbol->string n_0) #f))))
567                       (if or-part_0 or-part_0 "#<procedure>")))))
568               (apply
569                raise-arguments-error
570                who_0
571                app_0
572                "given procedure"
573                app_1
574                (let ((app_2
575                       (let ((a_0 (procedure-arity f_0)))
576                         (if (pair? required-keywords_0)
577                           null
578                           (if (integer? a_0)
579                             (list "expected" a_0)
580                             (if (arity-at-least? a_0)
581                               (list
582                                "expected"
583                                (unquoted-printing-string
584                                 (string-append
585                                  "at least "
586                                  (number->string
587                                   (arity-at-least-value a_0)))))
588                               null))))))
589                  (let ((app_3
590                         (if (pair? required-keywords_0)
591                           null
592                           (list "given" (length ls_0)))))
593                    (let ((app_4
594                           (if (pair? required-keywords_0)
595                             (list
596                              "required keywords"
597                              (unquoted-printing-string
598                               (apply
599                                string-append
600                                (cdr
601                                 (letrec*
602                                  ((loop_0
603                                    (|#%name|
604                                     loop
605                                     (lambda (kws_0)
606                                       (begin
607                                         (if (null? kws_0)
608                                           null
609                                           (let ((app_4
610                                                  (string-append
611                                                   "#:"
612                                                   (keyword->string
613                                                    (car kws_0)))))
614                                             (list*
615                                              " "
616                                              app_4
617                                              (loop_0 (cdr kws_0))))))))))
618                                  (loop_0 required-keywords_0))))))
619                             null)))
620                      (append
621                       app_2
622                       app_3
623                       app_4
624                       (let ((w_0
625                              (let ((app_5 (error-print-width)))
626                                (quotient app_5 (length ls_0)))))
627                         (if (> w_0 10)
628                           (list
629                            "argument lists..."
630                            (unquoted-printing-string
631                             (apply
632                              string-append
633                              (letrec*
634                               ((loop_0
635                                 (|#%name|
636                                  loop
637                                  (lambda (ls_1)
638                                    (begin
639                                      (if (null? ls_1)
640                                        null
641                                        (let ((app_5
642                                               (string-append
643                                                "\n   "
644                                                (let ((app_5
645                                                       (error-value->string-handler)))
646                                                  (|#%app|
647                                                   app_5
648                                                   (car ls_1)
649                                                   w_0)))))
650                                          (cons
651                                           app_5
652                                           (loop_0 (cdr ls_1))))))))))
653                               (loop_0 ls_0)))))
654                           null))))))))))
655          (args (raise-binding-result-arity-error 2 args))))))))
656(define gen-map
657  (lambda (f_0 ls_0)
658    (begin
659      #t
660      (letrec*
661       ((loop_0
662         (|#%name|
663          loop
664          (lambda (ls_1)
665            (begin
666              (if (null? (car ls_1))
667                null
668                (let ((next-ls_0 (map_1346 cdr ls_1)))
669                  (let ((app_0 (apply f_0 (map_1346 car ls_1))))
670                    (cons app_0 (loop_0 next-ls_0))))))))))
671       (loop_0 ls_0)))))
672(define gen-ormap
673  (lambda (f_0 ls_0)
674    (begin
675      #t
676      (letrec*
677       ((loop_0
678         (|#%name|
679          loop
680          (lambda (ls_1)
681            (begin
682              (if (null? (car ls_1))
683                #f
684                (if (null? (cdar ls_1))
685                  (apply f_0 (map_1346 car ls_1))
686                  (let ((next-ls_0 (map_1346 cdr ls_1)))
687                    (let ((or-part_0 (apply f_0 (map_1346 car ls_1))))
688                      (if or-part_0 or-part_0 (loop_0 next-ls_0)))))))))))
689       (loop_0 ls_0)))))
690(define print-value-columns
691  (make-parameter
692   +inf.0
693   (lambda (c_0)
694     (if (let ((or-part_0 (eqv? c_0 +inf.0)))
695           (if or-part_0 or-part_0 (if (exact-integer? c_0) (> c_0 5) #f)))
696       c_0
697       (raise-argument-error
698        'print-value-columns
699        "(or/c +inf.0 (and/c exact-integer? (>/c 5)))"
700        c_0)))
701   'print-value-columns))
702(define regexp-error-tag (make-continuation-prompt-tag 'regexp-error))
703(define regexp-error
704  (lambda (fmt_0 . args_0)
705    (abort-current-continuation regexp-error-tag (apply format fmt_0 args_0))))
706(define chytes-length$1
707  (|#%name|
708   chytes-length
709   (lambda (s_0)
710     (begin (if (bytes? s_0) (unsafe-bytes-length s_0) (string-length s_0))))))
711(define chytes-ref$1
712  (|#%name|
713   chytes-ref
714   (lambda (s_0 i_0)
715     (begin
716       (if (bytes? s_0)
717         (unsafe-bytes-ref s_0 i_0)
718         (char->integer (string-ref s_0 i_0)))))))
719(define chytes-ref/char
720  (lambda (s_0 i_0)
721    (if (bytes? s_0)
722      (integer->char (unsafe-bytes-ref s_0 i_0))
723      (string-ref s_0 i_0))))
724(define chytes-limit (lambda (s_0) (if (bytes? s_0) 255 1114111)))
725(define empty-range null)
726(define range-invert
727  (lambda (r_0 limit-c_0)
728    (letrec*
729     ((loop_0
730       (|#%name|
731        loop
732        (lambda (r_1 start_0)
733          (begin
734            (if (null? r_1)
735              (if (> start_0 limit-c_0) null (list (cons start_0 limit-c_0)))
736              (if (= start_0 (caar r_1))
737                (let ((app_0 (cdr r_1))) (loop_0 app_0 (add1 (cdar r_1))))
738                (let ((app_0 (cons start_0 (sub1 (caar r_1)))))
739                  (cons
740                   app_0
741                   (let ((app_1 (cdr r_1)))
742                     (loop_0 app_1 (add1 (cdar r_1)))))))))))))
743     (loop_0 r_0 0))))
744(define range-in?
745  (lambda (r_0 v_0)
746    (begin
747      (letrec*
748       ((for-loop_0
749         (|#%name|
750          for-loop
751          (lambda (result_0 lst_0)
752            (begin
753              (if (pair? lst_0)
754                (let ((p_0 (unsafe-car lst_0)))
755                  (let ((rest_0 (unsafe-cdr lst_0)))
756                    (let ((result_1
757                           (let ((result_1
758                                  (if (>= v_0 (car p_0))
759                                    (<= v_0 (cdr p_0))
760                                    #f)))
761                             (values result_1))))
762                      (if (if (not (let ((x_0 (list p_0))) result_1)) #t #f)
763                        (for-loop_0 result_1 rest_0)
764                        result_1))))
765                result_0))))))
766       (for-loop_0 #f r_0)))))
767(define range-add
768  (lambda (r_0 v_0)
769    (if (not v_0)
770      r_0
771      (if (range-in? r_0 v_0) r_0 (range-union r_0 (list (cons v_0 v_0)))))))
772(define range-union
773  (lambda (r1_0 r2_0)
774    (if (null? r1_0)
775      r2_0
776      (if (null? r2_0)
777        r1_0
778        (if (let ((app_0 (caar r1_0))) (<= app_0 (caar r2_0)))
779          (if (let ((app_0 (add1 (cdar r1_0)))) (>= app_0 (caar r2_0)))
780            (if (let ((app_0 (cdar r1_0))) (<= app_0 (cdar r2_0)))
781              (let ((app_0
782                     (let ((app_0
783                            (let ((app_0 (caar r1_0)))
784                              (cons app_0 (cdar r2_0)))))
785                       (cons app_0 (cdr r2_0)))))
786                (range-union app_0 (cdr r1_0)))
787              (range-union r1_0 (cdr r2_0)))
788            (let ((app_0 (car r1_0)))
789              (cons app_0 (range-union (cdr r1_0) r2_0))))
790          (range-union r2_0 r1_0))))))
791(define range-add-span
792  (lambda (range_0 from-c_0 to-c_0)
793    (range-union range_0 (list (cons from-c_0 to-c_0)))))
794(define range-singleton
795  (lambda (range_0)
796    (if (pair? range_0)
797      (if (null? (cdr range_0))
798        (if (let ((app_0 (caar range_0))) (= app_0 (cdar range_0)))
799          (caar range_0)
800          #f)
801        #f)
802      #f)))
803(define range-includes?
804  (lambda (range_0 low_0 hi_0)
805    (if (null? range_0)
806      null
807      (if (> low_0 (cdar range_0))
808        (range-includes? (cdr range_0) low_0 hi_0)
809        (if (>= low_0 (caar range_0)) (<= hi_0 (cdar range_0)) #f)))))
810(define range-within?
811  (lambda (range_0 low_0 hi_0)
812    (if (null? range_0)
813      #t
814      (if (< (caar range_0) low_0)
815        #f
816        (if (> (cdar range_0) hi_0)
817          #f
818          (range-within? (cdr range_0) low_0 hi_0))))))
819(define range->list (lambda (range_0) range_0))
820(define cell.1 (unsafe-make-place-local (make-weak-hash)))
821(define range-place-init!
822  (lambda () (unsafe-place-local-set! cell.1 (make-weak-hash))))
823(define compile-range
824  (lambda (range_0)
825    (let ((or-part_0 (hash-ref (unsafe-place-local-ref cell.1) range_0 #f)))
826      (if or-part_0
827        or-part_0
828        (let ((rng_0 (make-bytes 256 0)))
829          (begin
830            (begin
831              (letrec*
832               ((for-loop_0
833                 (|#%name|
834                  for-loop
835                  (lambda (lst_0)
836                    (begin
837                      (if (pair? lst_0)
838                        (let ((p_0 (unsafe-car lst_0)))
839                          (let ((rest_0 (unsafe-cdr lst_0)))
840                            (call-with-values
841                             (lambda ()
842                               (let ((start_0 (car p_0)))
843                                 (let ((end_0 (add1 (cdr p_0))))
844                                   (let ((start_1 start_0))
845                                     (begin
846                                       (letrec*
847                                        ((for-loop_1
848                                          (|#%name|
849                                           for-loop
850                                           (lambda (pos_0)
851                                             (begin
852                                               (if (< pos_0 end_0)
853                                                 (begin
854                                                   (unsafe-bytes-set!
855                                                    rng_0
856                                                    pos_0
857                                                    1)
858                                                   (for-loop_1 (+ pos_0 1)))
859                                                 (values)))))))
860                                        (for-loop_1 start_1)))))))
861                             (case-lambda
862                              (() (for-loop_0 rest_0))
863                              (args
864                               (raise-binding-result-arity-error 0 args))))))
865                        (values)))))))
866               (for-loop_0 range_0)))
867            (void)
868            (hash-set! (unsafe-place-local-ref cell.1) range_0 rng_0)
869            rng_0))))))
870(define rng-in? (lambda (rng_0 v_0) (eq? 1 (unsafe-bytes-ref rng_0 v_0))))
871(define rx:never 'never)
872(define rx:empty 'empty)
873(define rx:any 'any)
874(define rx:start 'start)
875(define rx:end 'end)
876(define rx:line-start 'line-start)
877(define rx:line-end 'line-end)
878(define rx:word-boundary 'word-boundary)
879(define rx:not-word-boundary 'not-word-boundary)
880(define finish_2542
881  (make-struct-type-install-properties
882   '(rx:alts)
883   2
884   0
885   #f
886   null
887   #f
888   #f
889   '(0 1)
890   #f
891   'rx:alts))
892(define struct:rx:alts
893  (make-record-type-descriptor*
894   'rx:alts
895   #f
896   (|#%nongenerative-uid| rx:alts)
897   #f
898   #f
899   2
900   0))
901(define effect_2414 (finish_2542 struct:rx:alts))
902(define rx:alts1.1
903  (|#%name|
904   rx:alts
905   (record-constructor
906    (make-record-constructor-descriptor struct:rx:alts #f #f))))
907(define rx:alts?_2576 (|#%name| rx:alts? (record-predicate struct:rx:alts)))
908(define rx:alts?
909  (|#%name|
910   rx:alts?
911   (lambda (v)
912     (if (rx:alts?_2576 v)
913       #t
914       ($value
915        (if (impersonator? v) (rx:alts?_2576 (impersonator-val v)) #f))))))
916(define rx:alts-rx_2530
917  (|#%name| rx:alts-rx1 (record-accessor struct:rx:alts 0)))
918(define rx:alts-rx_1874
919  (|#%name|
920   rx:alts-rx1
921   (lambda (s)
922     (if (rx:alts?_2576 s)
923       (rx:alts-rx_2530 s)
924       ($value
925        (impersonate-ref rx:alts-rx_2530 struct:rx:alts 0 s 'rx:alts 'rx1))))))
926(define rx:alts-rx_2917
927  (|#%name| rx:alts-rx2 (record-accessor struct:rx:alts 1)))
928(define rx:alts-rx_2761
929  (|#%name|
930   rx:alts-rx2
931   (lambda (s)
932     (if (rx:alts?_2576 s)
933       (rx:alts-rx_2917 s)
934       ($value
935        (impersonate-ref rx:alts-rx_2917 struct:rx:alts 1 s 'rx:alts 'rx2))))))
936(define finish_2732
937  (make-struct-type-install-properties
938   '(rx:sequence)
939   2
940   0
941   #f
942   null
943   #f
944   #f
945   '(0 1)
946   #f
947   'rx:sequence))
948(define struct:rx:sequence
949  (make-record-type-descriptor*
950   'rx:sequence
951   #f
952   (|#%nongenerative-uid| rx:sequence)
953   #f
954   #f
955   2
956   0))
957(define effect_2459 (finish_2732 struct:rx:sequence))
958(define rx:sequence2.1
959  (|#%name|
960   rx:sequence
961   (record-constructor
962    (make-record-constructor-descriptor struct:rx:sequence #f #f))))
963(define rx:sequence?_3213
964  (|#%name| rx:sequence? (record-predicate struct:rx:sequence)))
965(define rx:sequence?
966  (|#%name|
967   rx:sequence?
968   (lambda (v)
969     (if (rx:sequence?_3213 v)
970       #t
971       ($value
972        (if (impersonator? v) (rx:sequence?_3213 (impersonator-val v)) #f))))))
973(define rx:sequence-rxs_2380
974  (|#%name| rx:sequence-rxs (record-accessor struct:rx:sequence 0)))
975(define rx:sequence-rxs
976  (|#%name|
977   rx:sequence-rxs
978   (lambda (s)
979     (if (rx:sequence?_3213 s)
980       (rx:sequence-rxs_2380 s)
981       ($value
982        (impersonate-ref
983         rx:sequence-rxs_2380
984         struct:rx:sequence
985         0
986         s
987         'rx:sequence
988         'rxs))))))
989(define rx:sequence-needs-backtrack?_2458
990  (|#%name|
991   rx:sequence-needs-backtrack?
992   (record-accessor struct:rx:sequence 1)))
993(define rx:sequence-needs-backtrack?
994  (|#%name|
995   rx:sequence-needs-backtrack?
996   (lambda (s)
997     (if (rx:sequence?_3213 s)
998       (rx:sequence-needs-backtrack?_2458 s)
999       ($value
1000        (impersonate-ref
1001         rx:sequence-needs-backtrack?_2458
1002         struct:rx:sequence
1003         1
1004         s
1005         'rx:sequence
1006         'needs-backtrack?))))))
1007(define finish_2954
1008  (make-struct-type-install-properties
1009   '(rx:group)
1010   2
1011   0
1012   #f
1013   null
1014   #f
1015   #f
1016   '(0 1)
1017   #f
1018   'rx:group))
1019(define struct:rx:group
1020  (make-record-type-descriptor*
1021   'rx:group
1022   #f
1023   (|#%nongenerative-uid| rx:group)
1024   #f
1025   #f
1026   2
1027   0))
1028(define effect_1819 (finish_2954 struct:rx:group))
1029(define rx:group3.1
1030  (|#%name|
1031   rx:group
1032   (record-constructor
1033    (make-record-constructor-descriptor struct:rx:group #f #f))))
1034(define rx:group?_3085 (|#%name| rx:group? (record-predicate struct:rx:group)))
1035(define rx:group?
1036  (|#%name|
1037   rx:group?
1038   (lambda (v)
1039     (if (rx:group?_3085 v)
1040       #t
1041       ($value
1042        (if (impersonator? v) (rx:group?_3085 (impersonator-val v)) #f))))))
1043(define rx:group-rx_2903
1044  (|#%name| rx:group-rx (record-accessor struct:rx:group 0)))
1045(define rx:group-rx
1046  (|#%name|
1047   rx:group-rx
1048   (lambda (s)
1049     (if (rx:group?_3085 s)
1050       (rx:group-rx_2903 s)
1051       ($value
1052        (impersonate-ref
1053         rx:group-rx_2903
1054         struct:rx:group
1055         0
1056         s
1057         'rx:group
1058         'rx))))))
1059(define rx:group-number_2715
1060  (|#%name| rx:group-number (record-accessor struct:rx:group 1)))
1061(define rx:group-number
1062  (|#%name|
1063   rx:group-number
1064   (lambda (s)
1065     (if (rx:group?_3085 s)
1066       (rx:group-number_2715 s)
1067       ($value
1068        (impersonate-ref
1069         rx:group-number_2715
1070         struct:rx:group
1071         1
1072         s
1073         'rx:group
1074         'number))))))
1075(define finish_1837
1076  (make-struct-type-install-properties
1077   '(rx:repeat)
1078   4
1079   0
1080   #f
1081   null
1082   #f
1083   #f
1084   '(0 1 2 3)
1085   #f
1086   'rx:repeat))
1087(define struct:rx:repeat
1088  (make-record-type-descriptor*
1089   'rx:repeat
1090   #f
1091   (|#%nongenerative-uid| rx:repeat)
1092   #f
1093   #f
1094   4
1095   0))
1096(define effect_2312 (finish_1837 struct:rx:repeat))
1097(define rx:repeat4.1
1098  (|#%name|
1099   rx:repeat
1100   (record-constructor
1101    (make-record-constructor-descriptor struct:rx:repeat #f #f))))
1102(define rx:repeat?_2609
1103  (|#%name| rx:repeat? (record-predicate struct:rx:repeat)))
1104(define rx:repeat?
1105  (|#%name|
1106   rx:repeat?
1107   (lambda (v)
1108     (if (rx:repeat?_2609 v)
1109       #t
1110       ($value
1111        (if (impersonator? v) (rx:repeat?_2609 (impersonator-val v)) #f))))))
1112(define rx:repeat-rx_2269
1113  (|#%name| rx:repeat-rx (record-accessor struct:rx:repeat 0)))
1114(define rx:repeat-rx
1115  (|#%name|
1116   rx:repeat-rx
1117   (lambda (s)
1118     (if (rx:repeat?_2609 s)
1119       (rx:repeat-rx_2269 s)
1120       ($value
1121        (impersonate-ref
1122         rx:repeat-rx_2269
1123         struct:rx:repeat
1124         0
1125         s
1126         'rx:repeat
1127         'rx))))))
1128(define rx:repeat-min_2947
1129  (|#%name| rx:repeat-min (record-accessor struct:rx:repeat 1)))
1130(define rx:repeat-min
1131  (|#%name|
1132   rx:repeat-min
1133   (lambda (s)
1134     (if (rx:repeat?_2609 s)
1135       (rx:repeat-min_2947 s)
1136       ($value
1137        (impersonate-ref
1138         rx:repeat-min_2947
1139         struct:rx:repeat
1140         1
1141         s
1142         'rx:repeat
1143         'min))))))
1144(define rx:repeat-max_2564
1145  (|#%name| rx:repeat-max (record-accessor struct:rx:repeat 2)))
1146(define rx:repeat-max
1147  (|#%name|
1148   rx:repeat-max
1149   (lambda (s)
1150     (if (rx:repeat?_2609 s)
1151       (rx:repeat-max_2564 s)
1152       ($value
1153        (impersonate-ref
1154         rx:repeat-max_2564
1155         struct:rx:repeat
1156         2
1157         s
1158         'rx:repeat
1159         'max))))))
1160(define rx:repeat-non-greedy?_2609
1161  (|#%name| rx:repeat-non-greedy? (record-accessor struct:rx:repeat 3)))
1162(define rx:repeat-non-greedy?
1163  (|#%name|
1164   rx:repeat-non-greedy?
1165   (lambda (s)
1166     (if (rx:repeat?_2609 s)
1167       (rx:repeat-non-greedy?_2609 s)
1168       ($value
1169        (impersonate-ref
1170         rx:repeat-non-greedy?_2609
1171         struct:rx:repeat
1172         3
1173         s
1174         'rx:repeat
1175         'non-greedy?))))))
1176(define finish_3260
1177  (make-struct-type-install-properties
1178   '(rx:maybe)
1179   2
1180   0
1181   #f
1182   null
1183   #f
1184   #f
1185   '(0 1)
1186   #f
1187   'rx:maybe))
1188(define struct:rx:maybe
1189  (make-record-type-descriptor*
1190   'rx:maybe
1191   #f
1192   (|#%nongenerative-uid| rx:maybe)
1193   #f
1194   #f
1195   2
1196   0))
1197(define effect_2202 (finish_3260 struct:rx:maybe))
1198(define rx:maybe5.1
1199  (|#%name|
1200   rx:maybe
1201   (record-constructor
1202    (make-record-constructor-descriptor struct:rx:maybe #f #f))))
1203(define rx:maybe?_2766 (|#%name| rx:maybe? (record-predicate struct:rx:maybe)))
1204(define rx:maybe?
1205  (|#%name|
1206   rx:maybe?
1207   (lambda (v)
1208     (if (rx:maybe?_2766 v)
1209       #t
1210       ($value
1211        (if (impersonator? v) (rx:maybe?_2766 (impersonator-val v)) #f))))))
1212(define rx:maybe-rx_2762
1213  (|#%name| rx:maybe-rx (record-accessor struct:rx:maybe 0)))
1214(define rx:maybe-rx
1215  (|#%name|
1216   rx:maybe-rx
1217   (lambda (s)
1218     (if (rx:maybe?_2766 s)
1219       (rx:maybe-rx_2762 s)
1220       ($value
1221        (impersonate-ref
1222         rx:maybe-rx_2762
1223         struct:rx:maybe
1224         0
1225         s
1226         'rx:maybe
1227         'rx))))))
1228(define rx:maybe-non-greedy?_2749
1229  (|#%name| rx:maybe-non-greedy? (record-accessor struct:rx:maybe 1)))
1230(define rx:maybe-non-greedy?
1231  (|#%name|
1232   rx:maybe-non-greedy?
1233   (lambda (s)
1234     (if (rx:maybe?_2766 s)
1235       (rx:maybe-non-greedy?_2749 s)
1236       ($value
1237        (impersonate-ref
1238         rx:maybe-non-greedy?_2749
1239         struct:rx:maybe
1240         1
1241         s
1242         'rx:maybe
1243         'non-greedy?))))))
1244(define finish_2500
1245  (make-struct-type-install-properties
1246   '(rx:conditional)
1247   6
1248   0
1249   #f
1250   null
1251   #f
1252   #f
1253   '(0 1 2 3 4 5)
1254   #f
1255   'rx:conditional))
1256(define struct:rx:conditional
1257  (make-record-type-descriptor*
1258   'rx:conditional
1259   #f
1260   (|#%nongenerative-uid| rx:conditional)
1261   #f
1262   #f
1263   6
1264   0))
1265(define effect_2905 (finish_2500 struct:rx:conditional))
1266(define rx:conditional6.1
1267  (|#%name|
1268   rx:conditional
1269   (record-constructor
1270    (make-record-constructor-descriptor struct:rx:conditional #f #f))))
1271(define rx:conditional?_2616
1272  (|#%name| rx:conditional? (record-predicate struct:rx:conditional)))
1273(define rx:conditional?
1274  (|#%name|
1275   rx:conditional?
1276   (lambda (v)
1277     (if (rx:conditional?_2616 v)
1278       #t
1279       ($value
1280        (if (impersonator? v)
1281          (rx:conditional?_2616 (impersonator-val v))
1282          #f))))))
1283(define rx:conditional-tst_3132
1284  (|#%name| rx:conditional-tst (record-accessor struct:rx:conditional 0)))
1285(define rx:conditional-tst
1286  (|#%name|
1287   rx:conditional-tst
1288   (lambda (s)
1289     (if (rx:conditional?_2616 s)
1290       (rx:conditional-tst_3132 s)
1291       ($value
1292        (impersonate-ref
1293         rx:conditional-tst_3132
1294         struct:rx:conditional
1295         0
1296         s
1297         'rx:conditional
1298         'tst))))))
1299(define rx:conditional-rx_2590
1300  (|#%name| rx:conditional-rx1 (record-accessor struct:rx:conditional 1)))
1301(define rx:conditional-rx_2013
1302  (|#%name|
1303   rx:conditional-rx1
1304   (lambda (s)
1305     (if (rx:conditional?_2616 s)
1306       (rx:conditional-rx_2590 s)
1307       ($value
1308        (impersonate-ref
1309         rx:conditional-rx_2590
1310         struct:rx:conditional
1311         1
1312         s
1313         'rx:conditional
1314         'rx1))))))
1315(define rx:conditional-rx_3084
1316  (|#%name| rx:conditional-rx2 (record-accessor struct:rx:conditional 2)))
1317(define rx:conditional-rx_2094
1318  (|#%name|
1319   rx:conditional-rx2
1320   (lambda (s)
1321     (if (rx:conditional?_2616 s)
1322       (rx:conditional-rx_3084 s)
1323       ($value
1324        (impersonate-ref
1325         rx:conditional-rx_3084
1326         struct:rx:conditional
1327         2
1328         s
1329         'rx:conditional
1330         'rx2))))))
1331(define rx:conditional-n-start_1886
1332  (|#%name| rx:conditional-n-start (record-accessor struct:rx:conditional 3)))
1333(define rx:conditional-n-start
1334  (|#%name|
1335   rx:conditional-n-start
1336   (lambda (s)
1337     (if (rx:conditional?_2616 s)
1338       (rx:conditional-n-start_1886 s)
1339       ($value
1340        (impersonate-ref
1341         rx:conditional-n-start_1886
1342         struct:rx:conditional
1343         3
1344         s
1345         'rx:conditional
1346         'n-start))))))
1347(define rx:conditional-num-n_2530
1348  (|#%name| rx:conditional-num-n (record-accessor struct:rx:conditional 4)))
1349(define rx:conditional-num-n
1350  (|#%name|
1351   rx:conditional-num-n
1352   (lambda (s)
1353     (if (rx:conditional?_2616 s)
1354       (rx:conditional-num-n_2530 s)
1355       ($value
1356        (impersonate-ref
1357         rx:conditional-num-n_2530
1358         struct:rx:conditional
1359         4
1360         s
1361         'rx:conditional
1362         'num-n))))))
1363(define rx:conditional-needs-backtrack?_2562
1364  (|#%name|
1365   rx:conditional-needs-backtrack?
1366   (record-accessor struct:rx:conditional 5)))
1367(define rx:conditional-needs-backtrack?
1368  (|#%name|
1369   rx:conditional-needs-backtrack?
1370   (lambda (s)
1371     (if (rx:conditional?_2616 s)
1372       (rx:conditional-needs-backtrack?_2562 s)
1373       ($value
1374        (impersonate-ref
1375         rx:conditional-needs-backtrack?_2562
1376         struct:rx:conditional
1377         5
1378         s
1379         'rx:conditional
1380         'needs-backtrack?))))))
1381(define finish_2488
1382  (make-struct-type-install-properties
1383   '(rx:lookahead)
1384   4
1385   0
1386   #f
1387   null
1388   #f
1389   #f
1390   '(0 1 2 3)
1391   #f
1392   'rx:lookahead))
1393(define struct:rx:lookahead
1394  (make-record-type-descriptor*
1395   'rx:lookahead
1396   #f
1397   (|#%nongenerative-uid| rx:lookahead)
1398   #f
1399   #f
1400   4
1401   0))
1402(define effect_2486 (finish_2488 struct:rx:lookahead))
1403(define rx:lookahead7.1
1404  (|#%name|
1405   rx:lookahead
1406   (record-constructor
1407    (make-record-constructor-descriptor struct:rx:lookahead #f #f))))
1408(define rx:lookahead?_3136
1409  (|#%name| rx:lookahead? (record-predicate struct:rx:lookahead)))
1410(define rx:lookahead?
1411  (|#%name|
1412   rx:lookahead?
1413   (lambda (v)
1414     (if (rx:lookahead?_3136 v)
1415       #t
1416       ($value
1417        (if (impersonator? v)
1418          (rx:lookahead?_3136 (impersonator-val v))
1419          #f))))))
1420(define rx:lookahead-rx_2682
1421  (|#%name| rx:lookahead-rx (record-accessor struct:rx:lookahead 0)))
1422(define rx:lookahead-rx
1423  (|#%name|
1424   rx:lookahead-rx
1425   (lambda (s)
1426     (if (rx:lookahead?_3136 s)
1427       (rx:lookahead-rx_2682 s)
1428       ($value
1429        (impersonate-ref
1430         rx:lookahead-rx_2682
1431         struct:rx:lookahead
1432         0
1433         s
1434         'rx:lookahead
1435         'rx))))))
1436(define rx:lookahead-match?_1967
1437  (|#%name| rx:lookahead-match? (record-accessor struct:rx:lookahead 1)))
1438(define rx:lookahead-match?
1439  (|#%name|
1440   rx:lookahead-match?
1441   (lambda (s)
1442     (if (rx:lookahead?_3136 s)
1443       (rx:lookahead-match?_1967 s)
1444       ($value
1445        (impersonate-ref
1446         rx:lookahead-match?_1967
1447         struct:rx:lookahead
1448         1
1449         s
1450         'rx:lookahead
1451         'match?))))))
1452(define rx:lookahead-n-start_2202
1453  (|#%name| rx:lookahead-n-start (record-accessor struct:rx:lookahead 2)))
1454(define rx:lookahead-n-start
1455  (|#%name|
1456   rx:lookahead-n-start
1457   (lambda (s)
1458     (if (rx:lookahead?_3136 s)
1459       (rx:lookahead-n-start_2202 s)
1460       ($value
1461        (impersonate-ref
1462         rx:lookahead-n-start_2202
1463         struct:rx:lookahead
1464         2
1465         s
1466         'rx:lookahead
1467         'n-start))))))
1468(define rx:lookahead-num-n_2643
1469  (|#%name| rx:lookahead-num-n (record-accessor struct:rx:lookahead 3)))
1470(define rx:lookahead-num-n
1471  (|#%name|
1472   rx:lookahead-num-n
1473   (lambda (s)
1474     (if (rx:lookahead?_3136 s)
1475       (rx:lookahead-num-n_2643 s)
1476       ($value
1477        (impersonate-ref
1478         rx:lookahead-num-n_2643
1479         struct:rx:lookahead
1480         3
1481         s
1482         'rx:lookahead
1483         'num-n))))))
1484(define finish_3095
1485  (make-struct-type-install-properties
1486   '(rx:lookbehind)
1487   6
1488   0
1489   #f
1490   null
1491   #f
1492   #f
1493   '(0 1 4 5)
1494   #f
1495   'rx:lookbehind))
1496(define struct:rx:lookbehind
1497  (make-record-type-descriptor*
1498   'rx:lookbehind
1499   #f
1500   (|#%nongenerative-uid| rx:lookbehind)
1501   #f
1502   #f
1503   6
1504   12))
1505(define effect_2468 (finish_3095 struct:rx:lookbehind))
1506(define rx:lookbehind8.1
1507  (|#%name|
1508   rx:lookbehind
1509   (record-constructor
1510    (make-record-constructor-descriptor struct:rx:lookbehind #f #f))))
1511(define rx:lookbehind?_3001
1512  (|#%name| rx:lookbehind? (record-predicate struct:rx:lookbehind)))
1513(define rx:lookbehind?
1514  (|#%name|
1515   rx:lookbehind?
1516   (lambda (v)
1517     (if (rx:lookbehind?_3001 v)
1518       #t
1519       ($value
1520        (if (impersonator? v)
1521          (rx:lookbehind?_3001 (impersonator-val v))
1522          #f))))))
1523(define rx:lookbehind-rx_2597
1524  (|#%name| rx:lookbehind-rx (record-accessor struct:rx:lookbehind 0)))
1525(define rx:lookbehind-rx
1526  (|#%name|
1527   rx:lookbehind-rx
1528   (lambda (s)
1529     (if (rx:lookbehind?_3001 s)
1530       (rx:lookbehind-rx_2597 s)
1531       ($value
1532        (impersonate-ref
1533         rx:lookbehind-rx_2597
1534         struct:rx:lookbehind
1535         0
1536         s
1537         'rx:lookbehind
1538         'rx))))))
1539(define rx:lookbehind-match?_2428
1540  (|#%name| rx:lookbehind-match? (record-accessor struct:rx:lookbehind 1)))
1541(define rx:lookbehind-match?
1542  (|#%name|
1543   rx:lookbehind-match?
1544   (lambda (s)
1545     (if (rx:lookbehind?_3001 s)
1546       (rx:lookbehind-match?_2428 s)
1547       ($value
1548        (impersonate-ref
1549         rx:lookbehind-match?_2428
1550         struct:rx:lookbehind
1551         1
1552         s
1553         'rx:lookbehind
1554         'match?))))))
1555(define rx:lookbehind-lb-min_2372
1556  (|#%name| rx:lookbehind-lb-min (record-accessor struct:rx:lookbehind 2)))
1557(define rx:lookbehind-lb-min
1558  (|#%name|
1559   rx:lookbehind-lb-min
1560   (lambda (s)
1561     (if (rx:lookbehind?_3001 s)
1562       (rx:lookbehind-lb-min_2372 s)
1563       ($value
1564        (impersonate-ref
1565         rx:lookbehind-lb-min_2372
1566         struct:rx:lookbehind
1567         2
1568         s
1569         'rx:lookbehind
1570         'lb-min))))))
1571(define rx:lookbehind-lb-max_3076
1572  (|#%name| rx:lookbehind-lb-max (record-accessor struct:rx:lookbehind 3)))
1573(define rx:lookbehind-lb-max
1574  (|#%name|
1575   rx:lookbehind-lb-max
1576   (lambda (s)
1577     (if (rx:lookbehind?_3001 s)
1578       (rx:lookbehind-lb-max_3076 s)
1579       ($value
1580        (impersonate-ref
1581         rx:lookbehind-lb-max_3076
1582         struct:rx:lookbehind
1583         3
1584         s
1585         'rx:lookbehind
1586         'lb-max))))))
1587(define rx:lookbehind-n-start_2946
1588  (|#%name| rx:lookbehind-n-start (record-accessor struct:rx:lookbehind 4)))
1589(define rx:lookbehind-n-start
1590  (|#%name|
1591   rx:lookbehind-n-start
1592   (lambda (s)
1593     (if (rx:lookbehind?_3001 s)
1594       (rx:lookbehind-n-start_2946 s)
1595       ($value
1596        (impersonate-ref
1597         rx:lookbehind-n-start_2946
1598         struct:rx:lookbehind
1599         4
1600         s
1601         'rx:lookbehind
1602         'n-start))))))
1603(define rx:lookbehind-num-n_2613
1604  (|#%name| rx:lookbehind-num-n (record-accessor struct:rx:lookbehind 5)))
1605(define rx:lookbehind-num-n
1606  (|#%name|
1607   rx:lookbehind-num-n
1608   (lambda (s)
1609     (if (rx:lookbehind?_3001 s)
1610       (rx:lookbehind-num-n_2613 s)
1611       ($value
1612        (impersonate-ref
1613         rx:lookbehind-num-n_2613
1614         struct:rx:lookbehind
1615         5
1616         s
1617         'rx:lookbehind
1618         'num-n))))))
1619(define set-rx:lookbehind-lb-min!_2809
1620  (|#%name| set-rx:lookbehind-lb-min! (record-mutator struct:rx:lookbehind 2)))
1621(define set-rx:lookbehind-lb-min!
1622  (|#%name|
1623   set-rx:lookbehind-lb-min!
1624   (lambda (s v)
1625     (if (rx:lookbehind?_3001 s)
1626       (set-rx:lookbehind-lb-min!_2809 s v)
1627       ($value
1628        (impersonate-set!
1629         set-rx:lookbehind-lb-min!_2809
1630         struct:rx:lookbehind
1631         2
1632         2
1633         s
1634         v
1635         'rx:lookbehind
1636         'lb-min))))))
1637(define set-rx:lookbehind-lb-max!_2352
1638  (|#%name| set-rx:lookbehind-lb-max! (record-mutator struct:rx:lookbehind 3)))
1639(define set-rx:lookbehind-lb-max!
1640  (|#%name|
1641   set-rx:lookbehind-lb-max!
1642   (lambda (s v)
1643     (if (rx:lookbehind?_3001 s)
1644       (set-rx:lookbehind-lb-max!_2352 s v)
1645       ($value
1646        (impersonate-set!
1647         set-rx:lookbehind-lb-max!_2352
1648         struct:rx:lookbehind
1649         3
1650         3
1651         s
1652         v
1653         'rx:lookbehind
1654         'lb-max))))))
1655(define finish_2346
1656  (make-struct-type-install-properties
1657   '(rx:cut)
1658   4
1659   0
1660   #f
1661   null
1662   #f
1663   #f
1664   '(0 1 2 3)
1665   #f
1666   'rx:cut))
1667(define struct:rx:cut
1668  (make-record-type-descriptor*
1669   'rx:cut
1670   #f
1671   (|#%nongenerative-uid| rx:cut)
1672   #f
1673   #f
1674   4
1675   0))
1676(define effect_2158 (finish_2346 struct:rx:cut))
1677(define rx:cut9.1
1678  (|#%name|
1679   rx:cut
1680   (record-constructor
1681    (make-record-constructor-descriptor struct:rx:cut #f #f))))
1682(define rx:cut?_2453 (|#%name| rx:cut? (record-predicate struct:rx:cut)))
1683(define rx:cut?
1684  (|#%name|
1685   rx:cut?
1686   (lambda (v)
1687     (if (rx:cut?_2453 v)
1688       #t
1689       ($value
1690        (if (impersonator? v) (rx:cut?_2453 (impersonator-val v)) #f))))))
1691(define rx:cut-rx_2624 (|#%name| rx:cut-rx (record-accessor struct:rx:cut 0)))
1692(define rx:cut-rx
1693  (|#%name|
1694   rx:cut-rx
1695   (lambda (s)
1696     (if (rx:cut?_2453 s)
1697       (rx:cut-rx_2624 s)
1698       ($value
1699        (impersonate-ref rx:cut-rx_2624 struct:rx:cut 0 s 'rx:cut 'rx))))))
1700(define rx:cut-n-start_2924
1701  (|#%name| rx:cut-n-start (record-accessor struct:rx:cut 1)))
1702(define rx:cut-n-start
1703  (|#%name|
1704   rx:cut-n-start
1705   (lambda (s)
1706     (if (rx:cut?_2453 s)
1707       (rx:cut-n-start_2924 s)
1708       ($value
1709        (impersonate-ref
1710         rx:cut-n-start_2924
1711         struct:rx:cut
1712         1
1713         s
1714         'rx:cut
1715         'n-start))))))
1716(define rx:cut-num-n_2085
1717  (|#%name| rx:cut-num-n (record-accessor struct:rx:cut 2)))
1718(define rx:cut-num-n
1719  (|#%name|
1720   rx:cut-num-n
1721   (lambda (s)
1722     (if (rx:cut?_2453 s)
1723       (rx:cut-num-n_2085 s)
1724       ($value
1725        (impersonate-ref
1726         rx:cut-num-n_2085
1727         struct:rx:cut
1728         2
1729         s
1730         'rx:cut
1731         'num-n))))))
1732(define rx:cut-needs-backtrack?_2736
1733  (|#%name| rx:cut-needs-backtrack? (record-accessor struct:rx:cut 3)))
1734(define rx:cut-needs-backtrack?
1735  (|#%name|
1736   rx:cut-needs-backtrack?
1737   (lambda (s)
1738     (if (rx:cut?_2453 s)
1739       (rx:cut-needs-backtrack?_2736 s)
1740       ($value
1741        (impersonate-ref
1742         rx:cut-needs-backtrack?_2736
1743         struct:rx:cut
1744         3
1745         s
1746         'rx:cut
1747         'needs-backtrack?))))))
1748(define finish_1921
1749  (make-struct-type-install-properties
1750   '(rx:reference)
1751   2
1752   0
1753   #f
1754   null
1755   #f
1756   #f
1757   '(0 1)
1758   #f
1759   'rx:reference))
1760(define struct:rx:reference
1761  (make-record-type-descriptor*
1762   'rx:reference
1763   #f
1764   (|#%nongenerative-uid| rx:reference)
1765   #f
1766   #f
1767   2
1768   0))
1769(define effect_2306 (finish_1921 struct:rx:reference))
1770(define rx:reference10.1
1771  (|#%name|
1772   rx:reference
1773   (record-constructor
1774    (make-record-constructor-descriptor struct:rx:reference #f #f))))
1775(define rx:reference?_2938
1776  (|#%name| rx:reference? (record-predicate struct:rx:reference)))
1777(define rx:reference?
1778  (|#%name|
1779   rx:reference?
1780   (lambda (v)
1781     (if (rx:reference?_2938 v)
1782       #t
1783       ($value
1784        (if (impersonator? v)
1785          (rx:reference?_2938 (impersonator-val v))
1786          #f))))))
1787(define rx:reference-n_2302
1788  (|#%name| rx:reference-n (record-accessor struct:rx:reference 0)))
1789(define rx:reference-n
1790  (|#%name|
1791   rx:reference-n
1792   (lambda (s)
1793     (if (rx:reference?_2938 s)
1794       (rx:reference-n_2302 s)
1795       ($value
1796        (impersonate-ref
1797         rx:reference-n_2302
1798         struct:rx:reference
1799         0
1800         s
1801         'rx:reference
1802         'n))))))
1803(define rx:reference-case-sensitive?_2306
1804  (|#%name|
1805   rx:reference-case-sensitive?
1806   (record-accessor struct:rx:reference 1)))
1807(define rx:reference-case-sensitive?
1808  (|#%name|
1809   rx:reference-case-sensitive?
1810   (lambda (s)
1811     (if (rx:reference?_2938 s)
1812       (rx:reference-case-sensitive?_2306 s)
1813       ($value
1814        (impersonate-ref
1815         rx:reference-case-sensitive?_2306
1816         struct:rx:reference
1817         1
1818         s
1819         'rx:reference
1820         'case-sensitive?))))))
1821(define finish_2471
1822  (make-struct-type-install-properties
1823   '(rx:range)
1824   1
1825   0
1826   #f
1827   null
1828   #f
1829   #f
1830   '(0)
1831   #f
1832   'rx:range))
1833(define struct:rx:range
1834  (make-record-type-descriptor*
1835   'rx:range
1836   #f
1837   (|#%nongenerative-uid| rx:range)
1838   #f
1839   #f
1840   1
1841   0))
1842(define effect_2071 (finish_2471 struct:rx:range))
1843(define rx:range11.1
1844  (|#%name|
1845   rx:range
1846   (record-constructor
1847    (make-record-constructor-descriptor struct:rx:range #f #f))))
1848(define rx:range?_1948 (|#%name| rx:range? (record-predicate struct:rx:range)))
1849(define rx:range?
1850  (|#%name|
1851   rx:range?
1852   (lambda (v)
1853     (if (rx:range?_1948 v)
1854       #t
1855       ($value
1856        (if (impersonator? v) (rx:range?_1948 (impersonator-val v)) #f))))))
1857(define rx:range-range_2664
1858  (|#%name| rx:range-range (record-accessor struct:rx:range 0)))
1859(define rx:range-range
1860  (|#%name|
1861   rx:range-range
1862   (lambda (s)
1863     (if (rx:range?_1948 s)
1864       (rx:range-range_2664 s)
1865       ($value
1866        (impersonate-ref
1867         rx:range-range_2664
1868         struct:rx:range
1869         0
1870         s
1871         'rx:range
1872         'range))))))
1873(define finish_2339
1874  (make-struct-type-install-properties
1875   '(rx:unicode-categories)
1876   2
1877   0
1878   #f
1879   null
1880   #f
1881   #f
1882   '(0 1)
1883   #f
1884   'rx:unicode-categories))
1885(define struct:rx:unicode-categories
1886  (make-record-type-descriptor*
1887   'rx:unicode-categories
1888   #f
1889   (|#%nongenerative-uid| rx:unicode-categories)
1890   #f
1891   #f
1892   2
1893   0))
1894(define effect_2341 (finish_2339 struct:rx:unicode-categories))
1895(define rx:unicode-categories12.1
1896  (|#%name|
1897   rx:unicode-categories
1898   (record-constructor
1899    (make-record-constructor-descriptor struct:rx:unicode-categories #f #f))))
1900(define rx:unicode-categories?_2156
1901  (|#%name|
1902   rx:unicode-categories?
1903   (record-predicate struct:rx:unicode-categories)))
1904(define rx:unicode-categories?
1905  (|#%name|
1906   rx:unicode-categories?
1907   (lambda (v)
1908     (if (rx:unicode-categories?_2156 v)
1909       #t
1910       ($value
1911        (if (impersonator? v)
1912          (rx:unicode-categories?_2156 (impersonator-val v))
1913          #f))))))
1914(define rx:unicode-categories-symlist_1950
1915  (|#%name|
1916   rx:unicode-categories-symlist
1917   (record-accessor struct:rx:unicode-categories 0)))
1918(define rx:unicode-categories-symlist
1919  (|#%name|
1920   rx:unicode-categories-symlist
1921   (lambda (s)
1922     (if (rx:unicode-categories?_2156 s)
1923       (rx:unicode-categories-symlist_1950 s)
1924       ($value
1925        (impersonate-ref
1926         rx:unicode-categories-symlist_1950
1927         struct:rx:unicode-categories
1928         0
1929         s
1930         'rx:unicode-categories
1931         'symlist))))))
1932(define rx:unicode-categories-match?_2521
1933  (|#%name|
1934   rx:unicode-categories-match?
1935   (record-accessor struct:rx:unicode-categories 1)))
1936(define rx:unicode-categories-match?
1937  (|#%name|
1938   rx:unicode-categories-match?
1939   (lambda (s)
1940     (if (rx:unicode-categories?_2156 s)
1941       (rx:unicode-categories-match?_2521 s)
1942       ($value
1943        (impersonate-ref
1944         rx:unicode-categories-match?_2521
1945         struct:rx:unicode-categories
1946         1
1947         s
1948         'rx:unicode-categories
1949         'match?))))))
1950(define needs-backtrack?
1951  (lambda (rx_0)
1952    (if (rx:alts? rx_0)
1953      #t
1954      (if (rx:sequence? rx_0)
1955        (rx:sequence-needs-backtrack? rx_0)
1956        (if (rx:group? rx_0)
1957          #t
1958          (if (rx:repeat? rx_0)
1959            #t
1960            (if (rx:maybe? rx_0)
1961              #t
1962              (if (rx:conditional? rx_0)
1963                (rx:conditional-needs-backtrack? rx_0)
1964                (if (rx:cut? rx_0)
1965                  (rx:cut-needs-backtrack? rx_0)
1966                  (if (rx:unicode-categories? rx_0) #t #f))))))))))
1967(define rx-range
1968  (lambda (range_0 limit-c_0)
1969    (let ((c1_0 (range-singleton range_0)))
1970      (if c1_0
1971        c1_0
1972        (if (range-includes? range_0 0 limit-c_0)
1973          'any
1974          (rx:range11.1 range_0))))))
1975(define rx-sequence
1976  (lambda (l_0)
1977    (if (null? l_0)
1978      'empty
1979      (if (null? (cdr l_0))
1980        (car l_0)
1981        (let ((merged-l_0 (merge-adjacent l_0)))
1982          (if (null? (cdr merged-l_0))
1983            (car merged-l_0)
1984            (rx:sequence2.1
1985             merged-l_0
1986             (ormap_2765 needs-backtrack? merged-l_0))))))))
1987(define merge-adjacent
1988  (lambda (l_0)
1989    (letrec*
1990     ((loop_0
1991       (|#%name|
1992        loop
1993        (lambda (mode_0 accum_0 l_1)
1994          (begin
1995            (if (if (pair? l_1) (rx:sequence? (car l_1)) #f)
1996              (loop_0
1997               mode_0
1998               accum_0
1999               (let ((app_0 (rx:sequence-rxs (car l_1))))
2000                 (append app_0 (cdr l_1))))
2001              (if (if (pair? l_1)
2002                    (let ((or-part_0 (eq? 'empty (car l_1))))
2003                      (if or-part_0
2004                        or-part_0
2005                        (let ((or-part_1 (equal? "" (car l_1))))
2006                          (if or-part_1 or-part_1 (equal? #vu8() (car l_1))))))
2007                    #f)
2008                (loop_0 mode_0 accum_0 (cdr l_1))
2009                (if (let ((or-part_0 (null? l_1)))
2010                      (if or-part_0
2011                        or-part_0
2012                        (not
2013                         (if (eq? mode_0 'byte)
2014                           (let ((or-part_1 (byte? (car l_1))))
2015                             (if or-part_1 or-part_1 (bytes? (car l_1))))
2016                           (if (eq? mode_0 'char)
2017                             (let ((or-part_1 (integer? (car l_1))))
2018                               (if or-part_1 or-part_1 (string? (car l_1))))
2019                             #t)))))
2020                  (if (null? accum_0)
2021                    null
2022                    (if (null? (cdr accum_0))
2023                      (let ((app_0 (car accum_0)))
2024                        (cons app_0 (loop_0 #f null l_1)))
2025                      (let ((app_0
2026                             (if (eq? mode_0 'byte)
2027                               (apply
2028                                bytes-append
2029                                (reverse$1
2030                                 (let ((lst_0 (reverse$1 accum_0)))
2031                                   (begin
2032                                     (letrec*
2033                                      ((for-loop_0
2034                                        (|#%name|
2035                                         for-loop
2036                                         (lambda (fold-var_0 lst_1)
2037                                           (begin
2038                                             (if (pair? lst_1)
2039                                               (let ((a_0 (unsafe-car lst_1)))
2040                                                 (let ((rest_0
2041                                                        (unsafe-cdr lst_1)))
2042                                                   (let ((fold-var_1
2043                                                          (let ((fold-var_1
2044                                                                 (cons
2045                                                                  (if (byte?
2046                                                                       a_0)
2047                                                                    (bytes a_0)
2048                                                                    a_0)
2049                                                                  fold-var_0)))
2050                                                            (values
2051                                                             fold-var_1))))
2052                                                     (for-loop_0
2053                                                      fold-var_1
2054                                                      rest_0))))
2055                                               fold-var_0))))))
2056                                      (for-loop_0 null lst_0))))))
2057                               (if (eq? mode_0 'char)
2058                                 (apply
2059                                  string-append
2060                                  (reverse$1
2061                                   (let ((lst_0 (reverse$1 accum_0)))
2062                                     (begin
2063                                       (letrec*
2064                                        ((for-loop_0
2065                                          (|#%name|
2066                                           for-loop
2067                                           (lambda (fold-var_0 lst_1)
2068                                             (begin
2069                                               (if (pair? lst_1)
2070                                                 (let ((a_0
2071                                                        (unsafe-car lst_1)))
2072                                                   (let ((rest_0
2073                                                          (unsafe-cdr lst_1)))
2074                                                     (let ((fold-var_1
2075                                                            (let ((fold-var_1
2076                                                                   (cons
2077                                                                    (if (integer?
2078                                                                         a_0)
2079                                                                      (string
2080                                                                       (integer->char
2081                                                                        a_0))
2082                                                                      a_0)
2083                                                                    fold-var_0)))
2084                                                              (values
2085                                                               fold-var_1))))
2086                                                       (for-loop_0
2087                                                        fold-var_1
2088                                                        rest_0))))
2089                                                 fold-var_0))))))
2090                                        (for-loop_0 null lst_0))))))
2091                                 (error "internal error")))))
2092                        (cons app_0 (loop_0 #f null l_1)))))
2093                  (if mode_0
2094                    (let ((app_0 (cons (car l_1) accum_0)))
2095                      (loop_0 mode_0 app_0 (cdr l_1)))
2096                    (if (let ((or-part_0 (byte? (car l_1))))
2097                          (if or-part_0 or-part_0 (bytes? (car l_1))))
2098                      (let ((app_0 (list (car l_1))))
2099                        (loop_0 'byte app_0 (cdr l_1)))
2100                      (if (let ((or-part_0 (integer? (car l_1))))
2101                            (if or-part_0 or-part_0 (string? (car l_1))))
2102                        (let ((app_0 (list (car l_1))))
2103                          (loop_0 'char app_0 (cdr l_1)))
2104                        (let ((app_0 (car l_1)))
2105                          (cons app_0 (loop_0 #f null (cdr l_1)))))))))))))))
2106     (loop_0 #f null l_0))))
2107(define rx-alts
2108  (lambda (rx1_0 rx2_0 limit-c_0)
2109    (if (eq? 'never rx1_0)
2110      rx2_0
2111      (if (eq? 'never rx2_0)
2112        rx1_0
2113        (if (if (rx:range? rx1_0) (rx:range? rx2_0) #f)
2114          (rx-range
2115           (let ((app_0 (rx:range-range rx1_0)))
2116             (range-union app_0 (rx:range-range rx2_0)))
2117           limit-c_0)
2118          (if (if (rx:range? rx1_0)
2119                (if (rx:alts? rx2_0) (rx:range? (rx:alts-rx_1874 rx2_0)) #f)
2120                #f)
2121            (let ((app_0 (rx-alts rx1_0 (rx:alts-rx_1874 rx2_0) limit-c_0)))
2122              (rx-alts app_0 (rx:alts-rx_2761 rx2_0) limit-c_0))
2123            (if (if (rx:range? rx1_0) (integer? rx2_0) #f)
2124              (rx-range (range-add (rx:range-range rx1_0) rx2_0) limit-c_0)
2125              (if (if (rx:range? rx2_0) (integer? rx1_0) #f)
2126                (rx-alts rx2_0 rx1_0 limit-c_0)
2127                (if (if (integer? rx1_0) (integer? rx2_0) #f)
2128                  (rx-range (range-add (range-add null rx1_0) rx2_0) limit-c_0)
2129                  (rx:alts1.1 rx1_0 rx2_0))))))))))
2130(define rx-group (lambda (rx_0 n_0) (rx:group3.1 rx_0 n_0)))
2131(define rx-cut
2132  (lambda (rx_0 n-start_0 num-n_0)
2133    (rx:cut9.1 rx_0 n-start_0 num-n_0 (needs-backtrack? rx_0))))
2134(define rx-conditional
2135  (lambda (tst_0 pces1_0 pces2_0 n-start_0 num-n_0)
2136    (rx:conditional6.1
2137     tst_0
2138     pces1_0
2139     pces2_0
2140     n-start_0
2141     num-n_0
2142     (let ((or-part_0 (needs-backtrack? pces1_0)))
2143       (if or-part_0 or-part_0 (needs-backtrack? pces2_0))))))
2144(define finish_2581
2145  (make-struct-type-install-properties
2146   '(parse-config)
2147   7
2148   0
2149   #f
2150   null
2151   (current-inspector)
2152   #f
2153   '(0 1 2 3 4 5 6)
2154   #f
2155   'parse-config))
2156(define struct:parse-config
2157  (make-record-type-descriptor*
2158   'parse-config
2159   #f
2160   (|#%nongenerative-uid| parse-config)
2161   #f
2162   #f
2163   7
2164   0))
2165(define effect_2622 (finish_2581 struct:parse-config))
2166(define parse-config1.1
2167  (|#%name|
2168   parse-config
2169   (record-constructor
2170    (make-record-constructor-descriptor struct:parse-config #f #f))))
2171(define parse-config?_2003
2172  (|#%name| parse-config? (record-predicate struct:parse-config)))
2173(define parse-config?
2174  (|#%name|
2175   parse-config?
2176   (lambda (v)
2177     (if (parse-config?_2003 v)
2178       #t
2179       ($value
2180        (if (impersonator? v)
2181          (parse-config?_2003 (impersonator-val v))
2182          #f))))))
2183(define parse-config-who_2100
2184  (|#%name| parse-config-who (record-accessor struct:parse-config 0)))
2185(define parse-config-who
2186  (|#%name|
2187   parse-config-who
2188   (lambda (s)
2189     (if (parse-config?_2003 s)
2190       (parse-config-who_2100 s)
2191       ($value
2192        (impersonate-ref
2193         parse-config-who_2100
2194         struct:parse-config
2195         0
2196         s
2197         'parse-config
2198         'who))))))
2199(define parse-config-px?_2965
2200  (|#%name| parse-config-px? (record-accessor struct:parse-config 1)))
2201(define parse-config-px?
2202  (|#%name|
2203   parse-config-px?
2204   (lambda (s)
2205     (if (parse-config?_2003 s)
2206       (parse-config-px?_2965 s)
2207       ($value
2208        (impersonate-ref
2209         parse-config-px?_2965
2210         struct:parse-config
2211         1
2212         s
2213         'parse-config
2214         'px?))))))
2215(define parse-config-case-sensitive?_2517
2216  (|#%name|
2217   parse-config-case-sensitive?
2218   (record-accessor struct:parse-config 2)))
2219(define parse-config-case-sensitive?
2220  (|#%name|
2221   parse-config-case-sensitive?
2222   (lambda (s)
2223     (if (parse-config?_2003 s)
2224       (parse-config-case-sensitive?_2517 s)
2225       ($value
2226        (impersonate-ref
2227         parse-config-case-sensitive?_2517
2228         struct:parse-config
2229         2
2230         s
2231         'parse-config
2232         'case-sensitive?))))))
2233(define parse-config-multi-line?_2034
2234  (|#%name| parse-config-multi-line? (record-accessor struct:parse-config 3)))
2235(define parse-config-multi-line?
2236  (|#%name|
2237   parse-config-multi-line?
2238   (lambda (s)
2239     (if (parse-config?_2003 s)
2240       (parse-config-multi-line?_2034 s)
2241       ($value
2242        (impersonate-ref
2243         parse-config-multi-line?_2034
2244         struct:parse-config
2245         3
2246         s
2247         'parse-config
2248         'multi-line?))))))
2249(define parse-config-group-number-box_2275
2250  (|#%name|
2251   parse-config-group-number-box
2252   (record-accessor struct:parse-config 4)))
2253(define parse-config-group-number-box
2254  (|#%name|
2255   parse-config-group-number-box
2256   (lambda (s)
2257     (if (parse-config?_2003 s)
2258       (parse-config-group-number-box_2275 s)
2259       ($value
2260        (impersonate-ref
2261         parse-config-group-number-box_2275
2262         struct:parse-config
2263         4
2264         s
2265         'parse-config
2266         'group-number-box))))))
2267(define parse-config-references?-box_2624
2268  (|#%name|
2269   parse-config-references?-box
2270   (record-accessor struct:parse-config 5)))
2271(define parse-config-references?-box
2272  (|#%name|
2273   parse-config-references?-box
2274   (lambda (s)
2275     (if (parse-config?_2003 s)
2276       (parse-config-references?-box_2624 s)
2277       ($value
2278        (impersonate-ref
2279         parse-config-references?-box_2624
2280         struct:parse-config
2281         5
2282         s
2283         'parse-config
2284         'references?-box))))))
2285(define parse-config-error-handler?_2788
2286  (|#%name|
2287   parse-config-error-handler?
2288   (record-accessor struct:parse-config 6)))
2289(define parse-config-error-handler?
2290  (|#%name|
2291   parse-config-error-handler?
2292   (lambda (s)
2293     (if (parse-config?_2003 s)
2294       (parse-config-error-handler?_2788 s)
2295       ($value
2296        (impersonate-ref
2297         parse-config-error-handler?_2788
2298         struct:parse-config
2299         6
2300         s
2301         'parse-config
2302         'error-handler?))))))
2303(define make-parse-config.1
2304  (|#%name|
2305   make-parse-config
2306   (lambda (error-handler?4_0 px?3_0 who2_0)
2307     (begin
2308       (parse-config1.1
2309        who2_0
2310        px?3_0
2311        #t
2312        #f
2313        (box 0)
2314        (box #f)
2315        error-handler?4_0)))))
2316(define config-case-sensitive
2317  (lambda (config_0 cs?_0)
2318    (if (parse-config? config_0)
2319      (let ((app_0 (parse-config-who config_0)))
2320        (let ((app_1 (parse-config-px? config_0)))
2321          (let ((app_2 (parse-config-multi-line? config_0)))
2322            (let ((app_3 (parse-config-group-number-box config_0)))
2323              (let ((app_4 (parse-config-references?-box config_0)))
2324                (parse-config1.1
2325                 app_0
2326                 app_1
2327                 cs?_0
2328                 app_2
2329                 app_3
2330                 app_4
2331                 (parse-config-error-handler? config_0)))))))
2332      (raise-argument-error 'struct-copy "parse-config?" config_0))))
2333(define config-multi-line
2334  (lambda (config_0 mm?_0)
2335    (if (parse-config? config_0)
2336      (let ((app_0 (parse-config-who config_0)))
2337        (let ((app_1 (parse-config-px? config_0)))
2338          (let ((app_2 (parse-config-case-sensitive? config_0)))
2339            (let ((app_3 (parse-config-group-number-box config_0)))
2340              (let ((app_4 (parse-config-references?-box config_0)))
2341                (parse-config1.1
2342                 app_0
2343                 app_1
2344                 app_2
2345                 mm?_0
2346                 app_3
2347                 app_4
2348                 (parse-config-error-handler? config_0)))))))
2349      (raise-argument-error 'struct-copy "parse-config?" config_0))))
2350(define config-group-number
2351  (lambda (config_0) (unbox (parse-config-group-number-box config_0))))
2352(define config-group-number+1
2353  (lambda (config_0)
2354    (let ((b_0 (parse-config-group-number-box config_0)))
2355      (begin (set-box! b_0 (add1 (unbox b_0))) config_0))))
2356(define parse-error
2357  (lambda (s_0 pos_0 config_0 fmt_0 . args_0)
2358    (apply regexp-error fmt_0 args_0)))
2359(define parse-class
2360  (lambda (s_0 pos_0 config_0)
2361    (let ((success_0
2362           (|#%name|
2363            success
2364            (lambda (v_0) (begin (values #t v_0 (add1 pos_0)))))))
2365      (let ((tmp_0 (integer->char (chytes-ref$1 s_0 pos_0))))
2366        (if (eqv? tmp_0 '#\x64)
2367          (success_0 (range:d))
2368          (if (eqv? tmp_0 '#\x44)
2369            (success_0
2370             (let ((app_0 (range:d))) (range-invert app_0 (chytes-limit s_0))))
2371            (if (eqv? tmp_0 '#\x77)
2372              (success_0 (range:w))
2373              (if (eqv? tmp_0 '#\x57)
2374                (success_0
2375                 (let ((app_0 (range:w)))
2376                   (range-invert app_0 (chytes-limit s_0))))
2377                (if (eqv? tmp_0 '#\x73)
2378                  (success_0 (range:s))
2379                  (if (eqv? tmp_0 '#\x53)
2380                    (success_0
2381                     (let ((app_0 (range:s)))
2382                       (range-invert app_0 (chytes-limit s_0))))
2383                    (values #f #f #f)))))))))))
2384(define range:d
2385  (lambda () (begin-unsafe (range-union null (list (cons 48 57))))))
2386(define range:w
2387  (lambda ()
2388    (range-add
2389     (let ((range_0
2390            (let ((range_0 (range:d)))
2391              (begin-unsafe (range-union range_0 (list (cons 97 122)))))))
2392       (begin-unsafe (range-union range_0 (list (cons 65 90)))))
2393     95)))
2394(define range:s
2395  (lambda ()
2396    (let ((r_0 (range-add null 32)))
2397      (let ((r_1 (range-add r_0 9)))
2398        (let ((r_2 (range-add r_1 10)))
2399          (let ((r_3 (range-add r_2 12)))
2400            (let ((r_4 (range-add r_3 13))) r_4)))))))
2401(define parse-posix-char-class
2402  (lambda (s_0 pos_0)
2403    (let ((pos_1 pos_0))
2404      (let ((tmp_0
2405             (if (= pos_1 (chytes-length$1 s_0))
2406               'eos
2407               (chytes-ref/char s_0 pos_1))))
2408        (if (eqv? tmp_0 '#\x3a)
2409          (let ((class_0
2410                 (letrec*
2411                  ((loop_0
2412                    (|#%name|
2413                     loop
2414                     (lambda (accum_0 pos_2)
2415                       (begin
2416                         (if (= pos_2 (chytes-length$1 s_0))
2417                           #f
2418                           (let ((c_0 (chytes-ref$1 s_0 pos_2)))
2419                             (if (if (>= c_0 97) (<= c_0 122) #f)
2420                               (let ((app_0 (cons c_0 accum_0)))
2421                                 (loop_0 app_0 (add1 pos_2)))
2422                               (if (if (= c_0 58)
2423                                     (if (let ((app_0 (add1 pos_2)))
2424                                           (< app_0 (chytes-length$1 s_0)))
2425                                       (= (chytes-ref$1 s_0 (add1 pos_2)) 93)
2426                                       #f)
2427                                     #f)
2428                                 (list->bytes (reverse$1 accum_0))
2429                                 #f)))))))))
2430                  (loop_0 null (add1 pos_0)))))
2431            (let ((range_0
2432                   (let ((index_0 (hash-ref hash1688 class_0 (lambda () 0))))
2433                     (if (unsafe-fx< index_0 6)
2434                       (if (unsafe-fx< index_0 2)
2435                         (if (unsafe-fx< index_0 1)
2436                           #f
2437                           (let ((range_0
2438                                  (begin-unsafe
2439                                   (range-union null (list (cons 97 122))))))
2440                             (begin-unsafe
2441                              (range-union range_0 (list (cons 65 90))))))
2442                         (if (unsafe-fx< index_0 3)
2443                           (begin-unsafe
2444                            (range-union null (list (cons 65 90))))
2445                           (if (unsafe-fx< index_0 4)
2446                             (begin-unsafe
2447                              (range-union null (list (cons 97 122))))
2448                             (if (unsafe-fx< index_0 5)
2449                               (begin-unsafe
2450                                (range-union null (list (cons 48 57))))
2451                               (let ((range_0
2452                                      (let ((range_0
2453                                             (begin-unsafe
2454                                              (range-union
2455                                               null
2456                                               (list (cons 48 57))))))
2457                                        (begin-unsafe
2458                                         (range-union
2459                                          range_0
2460                                          (list (cons 97 102)))))))
2461                                 (begin-unsafe
2462                                  (range-union
2463                                   range_0
2464                                   (list (cons 65 70)))))))))
2465                       (if (unsafe-fx< index_0 9)
2466                         (if (unsafe-fx< index_0 7)
2467                           (let ((range_0
2468                                  (let ((range_0
2469                                         (begin-unsafe
2470                                          (range-union
2471                                           null
2472                                           (list (cons 48 57))))))
2473                                    (begin-unsafe
2474                                     (range-union
2475                                      range_0
2476                                      (list (cons 97 122)))))))
2477                             (begin-unsafe
2478                              (range-union range_0 (list (cons 65 90)))))
2479                           (if (unsafe-fx< index_0 8)
2480                             (range-add
2481                              (let ((range_0
2482                                     (begin-unsafe
2483                                      (range-union
2484                                       null
2485                                       (list (cons 97 122))))))
2486                                (begin-unsafe
2487                                 (range-union range_0 (list (cons 65 90)))))
2488                              95)
2489                             (range-add (range-add null 32) 9)))
2490                         (if (unsafe-fx< index_0 10)
2491                           (range:s)
2492                           (if (unsafe-fx< index_0 11)
2493                             (let ((range_0
2494                                    (begin
2495                                      (letrec*
2496                                       ((for-loop_0
2497                                         (|#%name|
2498                                          for-loop
2499                                          (lambda (range_0 pos_2)
2500                                            (begin
2501                                              (if (unsafe-fx< pos_2 128)
2502                                                (let ((range_1
2503                                                       (let ((range_1
2504                                                              (if (char-graphic?
2505                                                                   (integer->char
2506                                                                    pos_2))
2507                                                                (range-add
2508                                                                 range_0
2509                                                                 pos_2)
2510                                                                range_0)))
2511                                                         (values range_1))))
2512                                                  (for-loop_0
2513                                                   range_1
2514                                                   (unsafe-fx+ pos_2 1)))
2515                                                range_0))))))
2516                                       (for-loop_0 null 0)))))
2517                               (if (equal? class_0 #vu8(112 114 105 110 116))
2518                                 (range-add (range-add range_0 32) 9)
2519                                 range_0))
2520                             (if (unsafe-fx< index_0 12)
2521                               (begin-unsafe
2522                                (range-union null (list (cons 0 31))))
2523                               (begin-unsafe
2524                                (range-union null (list (cons 0 127))))))))))))
2525              (if range_0
2526                (values #t range_0 (+ pos_0 3 (unsafe-bytes-length class_0)))
2527                (values #f #f #f))))
2528          (values #f #f #f))))))
2529(define xor (lambda (a_0 b_0) (if a_0 (if b_0 #f a_0) b_0)))
2530(define parse-unicode-categories
2531  (lambda (p-c_0 s_0 pos_0 config_0)
2532    (let ((tmp_0
2533           (if (= pos_0 (chytes-length$1 s_0))
2534             'eos
2535             (chytes-ref/char s_0 pos_0))))
2536      (if (eqv? tmp_0 '#\x7b)
2537        (call-with-values
2538         (lambda ()
2539           (let ((pos_1 (add1 pos_0)))
2540             (let ((tmp_1
2541                    (if (= pos_1 (chytes-length$1 s_0))
2542                      'eos
2543                      (chytes-ref/char s_0 pos_1))))
2544               (if (eqv? tmp_1 '#\x5e)
2545                 (values #t (+ pos_0 2))
2546                 (values #f (add1 pos_0))))))
2547         (case-lambda
2548          ((cat-negated?_0 next-pos_0)
2549           (call-with-values
2550            (lambda ()
2551              (letrec*
2552               ((loop_0
2553                 (|#%name|
2554                  loop
2555                  (lambda (accum_0 pos_1)
2556                    (begin
2557                      (let ((tmp_1
2558                             (if (= pos_1 (chytes-length$1 s_0))
2559                               'eos
2560                               (chytes-ref/char s_0 pos_1))))
2561                        (if (eq? tmp_1 'eos)
2562                          (let ((fmt_0 "missing `}` to close `\\~a{`"))
2563                            (let ((args_0 (list (integer->char p-c_0))))
2564                              (let ((fmt_1 fmt_0))
2565                                (begin-unsafe
2566                                 (apply regexp-error fmt_1 args_0)))))
2567                          (if (eqv? tmp_1 '#\x7d)
2568                            (let ((app_0 (reverse$1 accum_0)))
2569                              (values app_0 (add1 pos_1)))
2570                            (let ((app_0
2571                                   (cons (chytes-ref$1 s_0 pos_1) accum_0)))
2572                              (loop_0 app_0 (add1 pos_1)))))))))))
2573               (loop_0 null next-pos_0)))
2574            (case-lambda
2575             ((l_0 pos2_0)
2576              (let ((categories_0
2577                     (let ((tmp_1 (list->bytes l_0)))
2578                       (let ((index_0
2579                              (hash-ref hash2956 tmp_1 (lambda () 0))))
2580                         (if (unsafe-fx< index_0 19)
2581                           (if (unsafe-fx< index_0 9)
2582                             (if (unsafe-fx< index_0 4)
2583                               (if (unsafe-fx< index_0 1)
2584                                 (let ((fmt_0
2585                                        "unrecognized property name in `\\~a{}`: `~a`"))
2586                                   (let ((args_0
2587                                          (let ((app_0 (integer->char p-c_0)))
2588                                            (list
2589                                             app_0
2590                                             (list->string
2591                                              (map_1346 integer->char l_0))))))
2592                                     (let ((fmt_1 fmt_0))
2593                                       (begin-unsafe
2594                                        (apply regexp-error fmt_1 args_0)))))
2595                                 (if (unsafe-fx< index_0 2)
2596                                   'll
2597                                   (if (unsafe-fx< index_0 3) 'lu 'lt)))
2598                               (if (unsafe-fx< index_0 6)
2599                                 (if (unsafe-fx< index_0 5) 'lm '(ll lu lt lm))
2600                                 (if (unsafe-fx< index_0 7)
2601                                   'lo
2602                                   (if (unsafe-fx< index_0 8)
2603                                     '(ll lu lt lm lo)
2604                                     'nd))))
2605                             (if (unsafe-fx< index_0 13)
2606                               (if (unsafe-fx< index_0 10)
2607                                 'nl
2608                                 (if (unsafe-fx< index_0 11)
2609                                   'no
2610                                   (if (unsafe-fx< index_0 12)
2611                                     '(nd nl no)
2612                                     'ps)))
2613                               (if (unsafe-fx< index_0 15)
2614                                 (if (unsafe-fx< index_0 14) 'pe 'pi)
2615                                 (if (unsafe-fx< index_0 16)
2616                                   'pf
2617                                   (if (unsafe-fx< index_0 17)
2618                                     'pc
2619                                     (if (unsafe-fx< index_0 18) 'pd 'po))))))
2620                           (if (unsafe-fx< index_0 29)
2621                             (if (unsafe-fx< index_0 23)
2622                               (if (unsafe-fx< index_0 20)
2623                                 '(ps pe pi pf pc pd po)
2624                                 (if (unsafe-fx< index_0 21)
2625                                   'mn
2626                                   (if (unsafe-fx< index_0 22) 'mc 'me)))
2627                               (if (unsafe-fx< index_0 25)
2628                                 (if (unsafe-fx< index_0 24) '(mn mc me) 'sc)
2629                                 (if (unsafe-fx< index_0 26)
2630                                   'sk
2631                                   (if (unsafe-fx< index_0 27)
2632                                     'sm
2633                                     (if (unsafe-fx< index_0 28)
2634                                       'so
2635                                       '(sc sk sm so))))))
2636                             (if (unsafe-fx< index_0 34)
2637                               (if (unsafe-fx< index_0 31)
2638                                 (if (unsafe-fx< index_0 30) 'zl 'zp)
2639                                 (if (unsafe-fx< index_0 32)
2640                                   'zs
2641                                   (if (unsafe-fx< index_0 33)
2642                                     '(zl zp zs)
2643                                     'cc)))
2644                               (if (unsafe-fx< index_0 36)
2645                                 (if (unsafe-fx< index_0 35) 'cf 'cs)
2646                                 (if (unsafe-fx< index_0 37)
2647                                   'cn
2648                                   (if (unsafe-fx< index_0 38)
2649                                     'co
2650                                     (if (unsafe-fx< index_0 39)
2651                                       '(cc cf cs cn so)
2652                                       #t)))))))))))
2653                (let ((prop-negated?_0 (= p-c_0 80)))
2654                  (values
2655                   (rx:unicode-categories12.1
2656                    categories_0
2657                    (not (xor prop-negated?_0 cat-negated?_0)))
2658                   pos2_0))))
2659             (args (raise-binding-result-arity-error 2 args)))))
2660          (args (raise-binding-result-arity-error 2 args))))
2661        (let ((fmt_0 "expected `{` after `\\~a`"))
2662          (let ((args_0 (list (integer->char p-c_0))))
2663            (let ((fmt_1 fmt_0))
2664              (begin-unsafe (apply regexp-error fmt_1 args_0)))))))))
2665(define range-add*
2666  (lambda (range_0 c_0 config_0)
2667    (if (not c_0)
2668      range_0
2669      (let ((range2_0 (range-add range_0 c_0)))
2670        (if (parse-config-case-sensitive? config_0)
2671          range2_0
2672          (let ((range3_0
2673                 (range-add
2674                  range2_0
2675                  (char->integer (char-upcase (integer->char c_0))))))
2676            (let ((range4_0
2677                   (range-add
2678                    range3_0
2679                    (char->integer (char-foldcase (integer->char c_0))))))
2680              (range-add
2681               range4_0
2682               (char->integer (char-downcase (integer->char c_0)))))))))))
2683(define range-add-span*
2684  (lambda (range_0 from-c_0 to-c_0 config_0)
2685    (if (parse-config-case-sensitive? config_0)
2686      (begin-unsafe (range-union range_0 (list (cons from-c_0 to-c_0))))
2687      (let ((end_0 (add1 to-c_0)))
2688        (begin
2689          (letrec*
2690           ((for-loop_0
2691             (|#%name|
2692              for-loop
2693              (lambda (range_1 pos_0)
2694                (begin
2695                  (if (< pos_0 end_0)
2696                    (let ((range_2
2697                           (let ((range_2 (range-add* range_1 pos_0 config_0)))
2698                             (values range_2))))
2699                      (for-loop_0 range_2 (+ pos_0 1)))
2700                    range_1))))))
2701           (for-loop_0 range_0 from-c_0)))))))
2702(define parse-range/not
2703  (lambda (s_0 pos_0 config_0)
2704    (let ((tmp_0
2705           (if (= pos_0 (chytes-length$1 s_0))
2706             'eos
2707             (chytes-ref/char s_0 pos_0))))
2708      (if (eq? tmp_0 'eos)
2709        (begin-unsafe
2710         (parse-error
2711          s_0
2712          pos_0
2713          config_0
2714          "missing closing square bracket in pattern"))
2715        (if (eqv? tmp_0 '#\x5e)
2716          (call-with-values
2717           (lambda () (parse-range s_0 (add1 pos_0) config_0))
2718           (case-lambda
2719            ((range_0 pos2_0)
2720             (values (range-invert range_0 (chytes-limit s_0)) pos2_0))
2721            (args (raise-binding-result-arity-error 2 args))))
2722          (parse-range s_0 pos_0 config_0))))))
2723(define parse-range
2724  (lambda (s_0 pos_0 config_0)
2725    (let ((tmp_0
2726           (if (= pos_0 (chytes-length$1 s_0))
2727             'eos
2728             (chytes-ref/char s_0 pos_0))))
2729      (if (eq? tmp_0 'eos)
2730        (begin-unsafe
2731         (parse-error
2732          s_0
2733          pos_0
2734          config_0
2735          "missing closing square bracket in pattern"))
2736        (if (eqv? tmp_0 '#\x5d)
2737          (let ((temp20_0 (range-add null 93)))
2738            (let ((temp22_0 (add1 pos_0)))
2739              (let ((temp20_1 temp20_0))
2740                (parse-range-rest.1 #f #f temp20_1 s_0 temp22_0 config_0))))
2741          (if (eqv? tmp_0 '#\x2d)
2742            (let ((temp24_0 (range-add null 45)))
2743              (let ((temp26_0 (add1 pos_0)))
2744                (let ((temp24_1 temp24_0))
2745                  (parse-range-rest.1 #f #f temp24_1 s_0 temp26_0 config_0))))
2746            (parse-range-rest.1 #f #f null s_0 pos_0 config_0)))))))
2747(define parse-range-rest.1
2748  (|#%name|
2749   parse-range-rest
2750   (lambda (must-span-from2_0 span-from1_0 range5_0 s6_0 pos7_0 config8_0)
2751     (begin
2752       (let ((tmp_0
2753              (if (= pos7_0 (chytes-length$1 s6_0))
2754                'eos
2755                (chytes-ref/char s6_0 pos7_0))))
2756         (if (eq? tmp_0 'eos)
2757           (begin-unsafe
2758            (parse-error
2759             s6_0
2760             pos7_0
2761             config8_0
2762             "missing closing square bracket in pattern"))
2763           (if (eqv? tmp_0 '#\x5d)
2764             (let ((app_0 (range-add* range5_0 span-from1_0 config8_0)))
2765               (values app_0 (add1 pos7_0)))
2766             (if (eqv? tmp_0 '#\x2d)
2767               (let ((pos2_0 (add1 pos7_0)))
2768                 (let ((tmp_1
2769                        (if (= pos2_0 (chytes-length$1 s6_0))
2770                          'eos
2771                          (chytes-ref/char s6_0 pos2_0))))
2772                   (if (eq? tmp_1 'eos)
2773                     (let ((pos_0 (add1 pos2_0)))
2774                       (begin-unsafe
2775                        (parse-error
2776                         s6_0
2777                         pos_0
2778                         config8_0
2779                         "missing closing square bracket in pattern")))
2780                     (if (eqv? tmp_1 '#\x5d)
2781                       (if must-span-from2_0
2782                         (begin-unsafe
2783                          (parse-error
2784                           s6_0
2785                           pos7_0
2786                           config8_0
2787                           "misplaced hyphen within square brackets in pattern"))
2788                         (let ((app_0
2789                                (range-add
2790                                 (range-add* range5_0 span-from1_0 config8_0)
2791                                 45)))
2792                           (values app_0 (add1 pos2_0))))
2793                       (if span-from1_0
2794                         (parse-range-rest.1
2795                          span-from1_0
2796                          #f
2797                          range5_0
2798                          s6_0
2799                          pos2_0
2800                          config8_0)
2801                         (begin-unsafe
2802                          (parse-error
2803                           s6_0
2804                           pos7_0
2805                           config8_0
2806                           "misplaced hyphen within square brackets in pattern")))))))
2807               (if (eqv? tmp_0 '#\x5c)
2808                 (if (parse-config-px? config8_0)
2809                   (let ((pos2_0 (add1 pos7_0)))
2810                     (if (= pos2_0 (chytes-length$1 s6_0))
2811                       (parse-error
2812                        s6_0
2813                        pos7_0
2814                        config8_0
2815                        "escaping backslash at end pattern (within square brackets)")
2816                       (let ((c_0 (chytes-ref$1 s6_0 pos2_0)))
2817                         (if (let ((or-part_0
2818                                    (if (>= c_0 97) (<= c_0 122) #f)))
2819                               (if or-part_0
2820                                 or-part_0
2821                                 (if (>= c_0 65) (<= c_0 90) #f)))
2822                           (if must-span-from2_0
2823                             (parse-error
2824                              s6_0
2825                              pos7_0
2826                              config8_0
2827                              "misplaced hyphen within square brackets in pattern")
2828                             (call-with-values
2829                              (lambda () (parse-class s6_0 pos2_0 config8_0))
2830                              (case-lambda
2831                               ((success?_0 range1_0 pos3_0)
2832                                (begin
2833                                  (if success?_0
2834                                    (void)
2835                                    (parse-error
2836                                     s6_0
2837                                     pos3_0
2838                                     config8_0
2839                                     "illegal alphabetic escape"))
2840                                  (let ((range2_0
2841                                         (range-union
2842                                          range1_0
2843                                          (range-add*
2844                                           range5_0
2845                                           span-from1_0
2846                                           config8_0))))
2847                                    (let ((temp39_0 (add1 pos2_0)))
2848                                      (parse-range-rest.1
2849                                       #f
2850                                       #f
2851                                       range2_0
2852                                       s6_0
2853                                       temp39_0
2854                                       config8_0)))))
2855                               (args
2856                                (raise-binding-result-arity-error 3 args)))))
2857                           (let ((temp44_0 (add1 pos2_0)))
2858                             (parse-range-rest/span.1
2859                              must-span-from2_0
2860                              span-from1_0
2861                              c_0
2862                              range5_0
2863                              s6_0
2864                              temp44_0
2865                              config8_0))))))
2866                   (let ((temp51_0 (add1 pos7_0)))
2867                     (parse-range-rest/span.1
2868                      must-span-from2_0
2869                      span-from1_0
2870                      92
2871                      range5_0
2872                      s6_0
2873                      temp51_0
2874                      config8_0)))
2875                 (if (eqv? tmp_0 '#\x5b)
2876                   (call-with-values
2877                    (lambda ()
2878                      (if (if (parse-config-px? config8_0)
2879                            (not must-span-from2_0)
2880                            #f)
2881                        (parse-posix-char-class s6_0 (add1 pos7_0))
2882                        (values #f #f #f)))
2883                    (case-lambda
2884                     ((success?_0 range1_0 pos2_0)
2885                      (if success?_0
2886                        (let ((range2_0
2887                               (range-union
2888                                range1_0
2889                                (range-add* range5_0 span-from1_0 config8_0))))
2890                          (parse-range-rest.1
2891                           #f
2892                           #f
2893                           range2_0
2894                           s6_0
2895                           pos2_0
2896                           config8_0))
2897                        (let ((temp62_0 (add1 pos7_0)))
2898                          (parse-range-rest/span.1
2899                           must-span-from2_0
2900                           span-from1_0
2901                           91
2902                           range5_0
2903                           s6_0
2904                           temp62_0
2905                           config8_0))))
2906                     (args (raise-binding-result-arity-error 3 args))))
2907                   (let ((temp66_0 (chytes-ref$1 s6_0 pos7_0)))
2908                     (let ((temp69_0 (add1 pos7_0)))
2909                       (let ((temp66_1 temp66_0))
2910                         (parse-range-rest/span.1
2911                          must-span-from2_0
2912                          span-from1_0
2913                          temp66_1
2914                          range5_0
2915                          s6_0
2916                          temp69_0
2917                          config8_0))))))))))))))
2918(define parse-range-rest/span.1
2919  (|#%name|
2920   parse-range-rest/span
2921   (lambda (must-span-from11_0
2922            span-from10_0
2923            c14_0
2924            range15_0
2925            s16_0
2926            pos17_0
2927            config18_0)
2928     (begin
2929       (if must-span-from11_0
2930         (if (> must-span-from11_0 c14_0)
2931           (parse-error
2932            s16_0
2933            pos17_0
2934            config18_0
2935            "invalid range within square brackets in pattern")
2936           (let ((temp73_0
2937                  (range-add-span*
2938                   range15_0
2939                   must-span-from11_0
2940                   c14_0
2941                   config18_0)))
2942             (parse-range-rest.1 #f #f temp73_0 s16_0 pos17_0 config18_0)))
2943         (let ((temp77_0 (range-add* range15_0 span-from10_0 config18_0)))
2944           (parse-range-rest.1
2945            #f
2946            c14_0
2947            temp77_0
2948            s16_0
2949            pos17_0
2950            config18_0)))))))
2951(define missing-square-closing-error
2952  (lambda (s_0 pos_0 config_0)
2953    (parse-error
2954     s_0
2955     pos_0
2956     config_0
2957     "missing closing square bracket in pattern")))
2958(define misplaced-hyphen-error
2959  (lambda (s_0 pos_0 config_0)
2960    (parse-error
2961     s_0
2962     pos_0
2963     config_0
2964     "misplaced hyphen within square brackets in pattern")))
2965(define parse.1
2966  (|#%name|
2967   parse
2968   (lambda (px?1_0 p3_0)
2969     (begin
2970       (let ((config_0 (make-parse-config.1 #f px?1_0 'regexp)))
2971         (call-with-values
2972          (lambda () (parse-regexp.1 unsafe-undefined p3_0 0 config_0))
2973          (case-lambda
2974           ((rx_0 pos_0)
2975            (let ((pos_1 pos_0))
2976              (let ((tmp_0
2977                     (if (let ((app_0 pos_1)) (= app_0 (chytes-length$1 p3_0)))
2978                       'eos
2979                       (chytes-ref/char p3_0 pos_1))))
2980                (if (eqv? tmp_0 '#\x29)
2981                  (parse-error p3_0 pos_0 config_0 "unmatched `)` in pattern")
2982                  (let ((app_0
2983                         (begin-unsafe
2984                          (unbox (parse-config-group-number-box config_0)))))
2985                    (values
2986                     rx_0
2987                     app_0
2988                     (unbox (parse-config-references?-box config_0))))))))
2989           (args (raise-binding-result-arity-error 2 args)))))))))
2990(define parse-regexp.1
2991  (|#%name|
2992   parse-regexp
2993   (lambda (parse-regexp5_0 s7_0 pos8_0 config9_0)
2994     (begin
2995       (let ((parse-regexp_0
2996              (if (eq? parse-regexp5_0 unsafe-undefined)
2997                (|#%name|
2998                 parse-regexp
2999                 (lambda (s_0 pos_0 config_0)
3000                   (begin
3001                     (parse-regexp.1 unsafe-undefined s_0 pos_0 config_0))))
3002                parse-regexp5_0)))
3003         (call-with-values
3004          (lambda () (parse-pces s7_0 pos8_0 config9_0))
3005          (case-lambda
3006           ((rxs_0 pos2_0)
3007            (let ((tmp_0
3008                   (if (= pos2_0 (chytes-length$1 s7_0))
3009                     'eos
3010                     (chytes-ref/char s7_0 pos2_0))))
3011              (if (eqv? tmp_0 '#\x7c)
3012                (call-with-values
3013                 (lambda ()
3014                   (|#%app| parse-regexp_0 s7_0 (add1 pos2_0) config9_0))
3015                 (case-lambda
3016                  ((rx_0 pos3_0)
3017                   (values
3018                    (let ((app_0 (rx-sequence rxs_0)))
3019                      (rx-alts app_0 rx_0 (chytes-limit s7_0)))
3020                    pos3_0))
3021                  (args (raise-binding-result-arity-error 2 args))))
3022                (values (rx-sequence rxs_0) pos2_0))))
3023           (args (raise-binding-result-arity-error 2 args)))))))))
3024(define parse-regexp/maybe-empty
3025  (lambda (s_0 pos_0 config_0)
3026    (let ((tmp_0
3027           (if (= pos_0 (chytes-length$1 s_0))
3028             'eos
3029             (chytes-ref/char s_0 pos_0))))
3030      (if (eqv? tmp_0 '#\x29)
3031        (values 'empty pos_0)
3032        (parse-regexp.1 parse-regexp/maybe-empty s_0 pos_0 config_0)))))
3033(define parse-pces
3034  (lambda (s_0 pos_0 config_0)
3035    (if (= pos_0 (chytes-length$1 s_0))
3036      (values null pos_0)
3037      (call-with-values
3038       (lambda () (parse-pce s_0 pos_0 config_0))
3039       (case-lambda
3040        ((rx_0 pos2_0)
3041         (let ((tmp_0
3042                (if (= pos2_0 (chytes-length$1 s_0))
3043                  'eos
3044                  (chytes-ref/char s_0 pos2_0))))
3045           (if (eq? tmp_0 'eos)
3046             (values (list rx_0) pos2_0)
3047             (if (if (eqv? tmp_0 '#\x7c) #t (eqv? tmp_0 '#\x29))
3048               (values (list rx_0) pos2_0)
3049               (call-with-values
3050                (lambda () (parse-pces s_0 pos2_0 config_0))
3051                (case-lambda
3052                 ((rxs_0 pos3_0) (values (cons rx_0 rxs_0) pos3_0))
3053                 (args (raise-binding-result-arity-error 2 args))))))))
3054        (args (raise-binding-result-arity-error 2 args)))))))
3055(define parse-pce
3056  (lambda (s_0 pos_0 config_0)
3057    (call-with-values
3058     (lambda () (parse-atom s_0 pos_0 config_0))
3059     (case-lambda
3060      ((rx_0 pos2_0)
3061       (let ((tmp_0
3062              (if (= pos2_0 (chytes-length$1 s_0))
3063                'eos
3064                (chytes-ref/char s_0 pos2_0))))
3065         (if (eqv? tmp_0 '#\x2a)
3066           (call-with-values
3067            (lambda () (parse-non-greedy s_0 (add1 pos2_0) config_0))
3068            (case-lambda
3069             ((non-greedy?_0 pos3_0)
3070              (values (rx:repeat4.1 rx_0 0 +inf.0 non-greedy?_0) pos3_0))
3071             (args (raise-binding-result-arity-error 2 args))))
3072           (if (eqv? tmp_0 '#\x2b)
3073             (call-with-values
3074              (lambda () (parse-non-greedy s_0 (add1 pos2_0) config_0))
3075              (case-lambda
3076               ((non-greedy?_0 pos3_0)
3077                (values (rx:repeat4.1 rx_0 1 +inf.0 non-greedy?_0) pos3_0))
3078               (args (raise-binding-result-arity-error 2 args))))
3079             (if (eqv? tmp_0 '#\x3f)
3080               (call-with-values
3081                (lambda () (parse-non-greedy s_0 (add1 pos2_0) config_0))
3082                (case-lambda
3083                 ((non-greedy?_0 pos3_0)
3084                  (values (rx:maybe5.1 rx_0 non-greedy?_0) pos3_0))
3085                 (args (raise-binding-result-arity-error 2 args))))
3086               (if (eqv? tmp_0 '#\x7b)
3087                 (if (parse-config-px? config_0)
3088                   (call-with-values
3089                    (lambda () (parse-integer 0 s_0 (add1 pos2_0) config_0))
3090                    (case-lambda
3091                     ((n1_0 pos3_0)
3092                      (let ((tmp_1
3093                             (if (= pos3_0 (chytes-length$1 s_0))
3094                               'eos
3095                               (chytes-ref/char s_0 pos3_0))))
3096                        (if (eqv? tmp_1 '#\x2c)
3097                          (call-with-values
3098                           (lambda ()
3099                             (parse-integer 0 s_0 (add1 pos3_0) config_0))
3100                           (case-lambda
3101                            ((n2_0 pos4_0)
3102                             (let ((tmp_2
3103                                    (if (= pos4_0 (chytes-length$1 s_0))
3104                                      'eos
3105                                      (chytes-ref/char s_0 pos4_0))))
3106                               (if (eqv? tmp_2 '#\x7d)
3107                                 (let ((n2*_0
3108                                        (if (= pos4_0 (add1 pos3_0))
3109                                          +inf.0
3110                                          n2_0)))
3111                                   (call-with-values
3112                                    (lambda ()
3113                                      (parse-non-greedy
3114                                       s_0
3115                                       (add1 pos4_0)
3116                                       config_0))
3117                                    (case-lambda
3118                                     ((non-greedy?_0 pos5_0)
3119                                      (values
3120                                       (rx:repeat4.1
3121                                        rx_0
3122                                        n1_0
3123                                        n2*_0
3124                                        non-greedy?_0)
3125                                       pos5_0))
3126                                     (args
3127                                      (raise-binding-result-arity-error
3128                                       2
3129                                       args)))))
3130                                 (parse-error
3131                                  s_0
3132                                  pos3_0
3133                                  config_0
3134                                  "expected digit or `}` to end repetition specification started with `{`"))))
3135                            (args (raise-binding-result-arity-error 2 args))))
3136                          (if (eqv? tmp_1 '#\x7d)
3137                            (call-with-values
3138                             (lambda ()
3139                               (parse-non-greedy s_0 (add1 pos3_0) config_0))
3140                             (case-lambda
3141                              ((non-greedy?_0 pos4_0)
3142                               (values
3143                                (rx:repeat4.1 rx_0 n1_0 n1_0 non-greedy?_0)
3144                                pos4_0))
3145                              (args
3146                               (raise-binding-result-arity-error 2 args))))
3147                            (parse-error
3148                             s_0
3149                             pos3_0
3150                             config_0
3151                             "expected digit, `,`, or `}' for repetition specification started with `{`")))))
3152                     (args (raise-binding-result-arity-error 2 args))))
3153                   (values rx_0 pos2_0))
3154                 (values rx_0 pos2_0)))))))
3155      (args (raise-binding-result-arity-error 2 args))))))
3156(define parse-non-greedy
3157  (lambda (s_0 pos_0 config_0)
3158    (let ((tmp_0
3159           (if (= pos_0 (chytes-length$1 s_0))
3160             'eos
3161             (chytes-ref/char s_0 pos_0))))
3162      (if (eqv? tmp_0 '#\x3f)
3163        (values #t (check-not-nested s_0 (add1 pos_0) config_0))
3164        (values #f (check-not-nested s_0 pos_0 config_0))))))
3165(define check-not-nested
3166  (lambda (s_0 pos_0 config_0)
3167    (begin
3168      (let ((tmp_0
3169             (if (= pos_0 (chytes-length$1 s_0))
3170               'eos
3171               (chytes-ref/char s_0 pos_0))))
3172        (if (if (eqv? tmp_0 '#\x3f)
3173              #t
3174              (if (eqv? tmp_0 '#\x2a) #t (eqv? tmp_0 '#\x2b)))
3175          (let ((fmt_0 "nested `~a` in patten"))
3176            (let ((args_0 (list (integer->char (chytes-ref$1 s_0 pos_0)))))
3177              (let ((fmt_1 fmt_0))
3178                (begin-unsafe (apply regexp-error fmt_1 args_0)))))
3179          (if (eqv? tmp_0 '#\x7b)
3180            (if (parse-config-px? config_0)
3181              (parse-error s_0 pos_0 config_0 "nested `{` in pattern")
3182              (void))
3183            (void))))
3184      pos_0)))
3185(define parse-atom
3186  (lambda (s_0 pos_0 config_0)
3187    (let ((tmp_0 (integer->char (chytes-ref$1 s_0 pos_0))))
3188      (if (eqv? tmp_0 '#\x7c)
3189        (values 'empty pos_0)
3190        (if (eqv? tmp_0 '#\x28)
3191          (parse-parenthesized-atom s_0 (add1 pos_0) config_0)
3192          (if (eqv? tmp_0 '#\x5b)
3193            (call-with-values
3194             (lambda () (parse-range/not s_0 (add1 pos_0) config_0))
3195             (case-lambda
3196              ((range_0 pos2_0)
3197               (values (rx-range range_0 (chytes-limit s_0)) pos2_0))
3198              (args (raise-binding-result-arity-error 2 args))))
3199            (if (eqv? tmp_0 '#\x2e)
3200              (let ((rx_0
3201                     (if (parse-config-multi-line? config_0)
3202                       (let ((app_0
3203                              (let ((app_0 (range-add null 10)))
3204                                (range-invert app_0 (chytes-limit s_0)))))
3205                         (rx-range app_0 (chytes-limit s_0)))
3206                       'any)))
3207                (values rx_0 (add1 pos_0)))
3208              (if (eqv? tmp_0 '#\x5e)
3209                (let ((app_0
3210                       (if (parse-config-multi-line? config_0)
3211                         'line-start
3212                         'start)))
3213                  (values app_0 (add1 pos_0)))
3214                (if (eqv? tmp_0 '#\x24)
3215                  (let ((app_0
3216                         (if (parse-config-multi-line? config_0)
3217                           'line-end
3218                           'end)))
3219                    (values app_0 (add1 pos_0)))
3220                  (parse-literal s_0 pos_0 config_0))))))))))
3221(define parse-parenthesized-atom
3222  (lambda (s_0 pos_0 config_0)
3223    (let ((tmp_0
3224           (if (= pos_0 (chytes-length$1 s_0))
3225             'eos
3226             (chytes-ref/char s_0 pos_0))))
3227      (if (eq? tmp_0 'eos)
3228        (begin-unsafe
3229         (parse-error
3230          s_0
3231          pos_0
3232          config_0
3233          "missing closing parenthesis in pattern"))
3234        (if (eqv? tmp_0 '#\x3f)
3235          (let ((pos2_0 (add1 pos_0)))
3236            (let ((tmp_1
3237                   (if (= pos2_0 (chytes-length$1 s_0))
3238                     'eos
3239                     (chytes-ref/char s_0 pos2_0))))
3240              (if (eq? tmp_1 'eos)
3241                (begin-unsafe
3242                 (parse-error
3243                  s_0
3244                  pos2_0
3245                  config_0
3246                  "expected `:`, `=`, `!`, `<=`, `<!`, `i`, `-i`, `m`, `-m`, `s`, or `-s` after `(?`"))
3247                (if (eqv? tmp_1 '#\x3e)
3248                  (let ((pre-num-groups_0
3249                         (begin-unsafe
3250                          (unbox (parse-config-group-number-box config_0)))))
3251                    (call-with-values
3252                     (lambda ()
3253                       (parse-regexp/maybe-empty s_0 (add1 pos2_0) config_0))
3254                     (case-lambda
3255                      ((rx_0 pos3_0)
3256                       (let ((post-num-groups_0
3257                              (begin-unsafe
3258                               (unbox
3259                                (parse-config-group-number-box config_0)))))
3260                         (let ((app_0
3261                                (let ((num-n_0
3262                                       (- post-num-groups_0 pre-num-groups_0)))
3263                                  (begin-unsafe
3264                                   (rx:cut9.1
3265                                    rx_0
3266                                    pre-num-groups_0
3267                                    num-n_0
3268                                    (needs-backtrack? rx_0))))))
3269                           (values
3270                            app_0
3271                            (check-close-paren s_0 pos3_0 config_0)))))
3272                      (args (raise-binding-result-arity-error 2 args)))))
3273                  (if (eqv? tmp_1 '#\x28)
3274                    (parse-conditional s_0 (add1 pos2_0) config_0)
3275                    (if (if (eqv? tmp_1 '#\x69)
3276                          #t
3277                          (if (eqv? tmp_1 '#\x73)
3278                            #t
3279                            (if (eqv? tmp_1 '#\x6d)
3280                              #t
3281                              (if (eqv? tmp_1 '#\x2d)
3282                                #t
3283                                (eqv? tmp_1 '#\x3a)))))
3284                      (call-with-values
3285                       (lambda () (parse-mode s_0 pos2_0 config_0))
3286                       (case-lambda
3287                        ((config2_0 pos3_0)
3288                         (let ((tmp_2
3289                                (if (= pos3_0 (chytes-length$1 s_0))
3290                                  'eos
3291                                  (chytes-ref/char s_0 pos3_0))))
3292                           (if (eqv? tmp_2 '#\x3a)
3293                             (call-with-values
3294                              (lambda ()
3295                                (parse-regexp/maybe-empty
3296                                 s_0
3297                                 (add1 pos3_0)
3298                                 config2_0))
3299                              (case-lambda
3300                               ((rx_0 pos4_0)
3301                                (values
3302                                 rx_0
3303                                 (check-close-paren s_0 pos4_0 config2_0)))
3304                               (args
3305                                (raise-binding-result-arity-error 2 args))))
3306                             (parse-error
3307                              s_0
3308                              pos3_0
3309                              config2_0
3310                              (string-append
3311                               "expected `:` or another mode after `(?` and a mode sequence;\n"
3312                               " a mode is `i`, `-i`, `m`, `-m`, `s`, or `-s`")))))
3313                        (args (raise-binding-result-arity-error 2 args))))
3314                      (parse-look s_0 pos2_0 config_0)))))))
3315          (let ((group-number_0
3316                 (begin-unsafe
3317                  (unbox (parse-config-group-number-box config_0)))))
3318            (call-with-values
3319             (lambda ()
3320               (parse-regexp/maybe-empty
3321                s_0
3322                pos_0
3323                (config-group-number+1 config_0)))
3324             (case-lambda
3325              ((rx_0 pos2_0)
3326               (let ((app_0 (begin-unsafe (rx:group3.1 rx_0 group-number_0))))
3327                 (values app_0 (check-close-paren s_0 pos2_0 config_0))))
3328              (args (raise-binding-result-arity-error 2 args))))))))))
3329(define parse-look
3330  (lambda (s_0 pos2_0 config_0)
3331    (let ((pre-num-groups_0
3332           (begin-unsafe (unbox (parse-config-group-number-box config_0)))))
3333      (let ((span-num-groups_0
3334             (|#%name|
3335              span-num-groups
3336              (lambda ()
3337                (begin
3338                  (-
3339                   (begin-unsafe
3340                    (unbox (parse-config-group-number-box config_0)))
3341                   pre-num-groups_0))))))
3342        (let ((tmp_0 (integer->char (chytes-ref$1 s_0 pos2_0))))
3343          (if (eqv? tmp_0 '#\x3d)
3344            (call-with-values
3345             (lambda () (parse-regexp/maybe-empty s_0 (add1 pos2_0) config_0))
3346             (case-lambda
3347              ((rx_0 pos3_0)
3348               (let ((app_0
3349                      (rx:lookahead7.1
3350                       rx_0
3351                       #t
3352                       pre-num-groups_0
3353                       (span-num-groups_0))))
3354                 (values app_0 (check-close-paren s_0 pos3_0 config_0))))
3355              (args (raise-binding-result-arity-error 2 args))))
3356            (if (eqv? tmp_0 '#\x21)
3357              (call-with-values
3358               (lambda ()
3359                 (parse-regexp/maybe-empty s_0 (add1 pos2_0) config_0))
3360               (case-lambda
3361                ((rx_0 pos3_0)
3362                 (let ((app_0
3363                        (rx:lookahead7.1
3364                         rx_0
3365                         #f
3366                         pre-num-groups_0
3367                         (span-num-groups_0))))
3368                   (values app_0 (check-close-paren s_0 pos3_0 config_0))))
3369                (args (raise-binding-result-arity-error 2 args))))
3370              (if (eqv? tmp_0 '#\x3c)
3371                (let ((pos2+_0 (add1 pos2_0)))
3372                  (let ((tmp_1
3373                         (if (= pos2+_0 (chytes-length$1 s_0))
3374                           'eos
3375                           (chytes-ref/char s_0 pos2+_0))))
3376                    (if (eq? tmp_1 'eos)
3377                      (begin-unsafe
3378                       (parse-error
3379                        s_0
3380                        pos2+_0
3381                        config_0
3382                        "expected `:`, `=`, `!`, `<=`, `<!`, `i`, `-i`, `m`, `-m`, `s`, or `-s` after `(?`"))
3383                      (if (eqv? tmp_1 '#\x3d)
3384                        (call-with-values
3385                         (lambda ()
3386                           (parse-regexp/maybe-empty
3387                            s_0
3388                            (add1 pos2+_0)
3389                            config_0))
3390                         (case-lambda
3391                          ((rx_0 pos3_0)
3392                           (let ((app_0
3393                                  (rx:lookbehind8.1
3394                                   rx_0
3395                                   #t
3396                                   0
3397                                   0
3398                                   pre-num-groups_0
3399                                   (span-num-groups_0))))
3400                             (values
3401                              app_0
3402                              (check-close-paren s_0 pos3_0 config_0))))
3403                          (args (raise-binding-result-arity-error 2 args))))
3404                        (if (eqv? tmp_1 '#\x21)
3405                          (call-with-values
3406                           (lambda ()
3407                             (parse-regexp/maybe-empty
3408                              s_0
3409                              (add1 pos2+_0)
3410                              config_0))
3411                           (case-lambda
3412                            ((rx_0 pos3_0)
3413                             (let ((app_0
3414                                    (rx:lookbehind8.1
3415                                     rx_0
3416                                     #f
3417                                     0
3418                                     0
3419                                     pre-num-groups_0
3420                                     (span-num-groups_0))))
3421                               (values
3422                                app_0
3423                                (check-close-paren s_0 pos3_0 config_0))))
3424                            (args (raise-binding-result-arity-error 2 args))))
3425                          (begin-unsafe
3426                           (parse-error
3427                            s_0
3428                            pos2+_0
3429                            config_0
3430                            "expected `:`, `=`, `!`, `<=`, `<!`, `i`, `-i`, `m`, `-m`, `s`, or `-s` after `(?`")))))))
3431                (begin-unsafe
3432                 (parse-error
3433                  s_0
3434                  pos2_0
3435                  config_0
3436                  "expected `:`, `=`, `!`, `<=`, `<!`, `i`, `-i`, `m`, `-m`, `s`, or `-s` after `(?`"))))))))))
3437(define parse-conditional
3438  (lambda (s_0 pos_0 config_0)
3439    (let ((tst-pre-num-groups_0
3440           (begin-unsafe (unbox (parse-config-group-number-box config_0)))))
3441      (call-with-values
3442       (lambda () (parse-test s_0 pos_0 config_0))
3443       (case-lambda
3444        ((tst_0 pos2_0)
3445         (let ((tst-span-num-groups_0
3446                (-
3447                 (begin-unsafe
3448                  (unbox (parse-config-group-number-box config_0)))
3449                 tst-pre-num-groups_0)))
3450           (call-with-values
3451            (lambda () (parse-pces s_0 pos2_0 config_0))
3452            (case-lambda
3453             ((pces_0 pos3_0)
3454              (let ((tmp_0
3455                     (if (= pos3_0 (chytes-length$1 s_0))
3456                       'eos
3457                       (chytes-ref/char s_0 pos3_0))))
3458                (if (eq? tmp_0 'eos)
3459                  (begin-unsafe
3460                   (parse-error
3461                    s_0
3462                    pos3_0
3463                    config_0
3464                    "missing closing parenthesis in pattern"))
3465                  (if (eqv? tmp_0 '#\x7c)
3466                    (call-with-values
3467                     (lambda () (parse-pces s_0 (add1 pos3_0) config_0))
3468                     (case-lambda
3469                      ((pces2_0 pos4_0)
3470                       (let ((tmp_1
3471                              (if (= pos4_0 (chytes-length$1 s_0))
3472                                'eos
3473                                (chytes-ref/char s_0 pos4_0))))
3474                         (if (eq? tmp_1 'eos)
3475                           (begin-unsafe
3476                            (parse-error
3477                             s_0
3478                             pos4_0
3479                             config_0
3480                             "missing closing parenthesis in pattern"))
3481                           (if (eqv? tmp_1 '#\x29)
3482                             (let ((app_0
3483                                    (let ((app_0 (rx-sequence pces_0)))
3484                                      (rx-conditional
3485                                       tst_0
3486                                       app_0
3487                                       (rx-sequence pces2_0)
3488                                       tst-pre-num-groups_0
3489                                       tst-span-num-groups_0))))
3490                               (values app_0 (add1 pos4_0)))
3491                             (parse-error
3492                              s_0
3493                              pos4_0
3494                              config_0
3495                              "expected `)` to close `(?(...)...` after second branch")))))
3496                      (args (raise-binding-result-arity-error 2 args))))
3497                    (if (eqv? tmp_0 '#\x29)
3498                      (let ((app_0
3499                             (rx-conditional
3500                              tst_0
3501                              (rx-sequence pces_0)
3502                              'empty
3503                              tst-pre-num-groups_0
3504                              tst-span-num-groups_0)))
3505                        (values app_0 (add1 pos3_0)))
3506                      (void))))))
3507             (args (raise-binding-result-arity-error 2 args))))))
3508        (args (raise-binding-result-arity-error 2 args)))))))
3509(define parse-test
3510  (lambda (s_0 pos_0 config_0)
3511    (let ((tmp_0
3512           (if (= pos_0 (chytes-length$1 s_0))
3513             'eos
3514             (chytes-ref/char s_0 pos_0))))
3515      (if (eq? tmp_0 'eos)
3516        (begin-unsafe
3517         (parse-error
3518          s_0
3519          pos_0
3520          config_0
3521          "missing closing parenthesis in pattern"))
3522        (if (eqv? tmp_0 '#\x3f)
3523          (parse-look s_0 (add1 pos_0) config_0)
3524          (let ((c_0 (chytes-ref$1 s_0 pos_0)))
3525            (if (if (>= c_0 48) (<= c_0 57) #f)
3526              (begin
3527                (set-box! (parse-config-references?-box config_0) #t)
3528                (call-with-values
3529                 (lambda () (parse-integer 0 s_0 pos_0 config_0))
3530                 (case-lambda
3531                  ((n_0 pos3_0)
3532                   (begin
3533                     (if (if (< pos3_0 (chytes-length$1 s_0))
3534                           (= (chytes-ref$1 s_0 pos3_0) 41)
3535                           #f)
3536                       (void)
3537                       (parse-error
3538                        s_0
3539                        pos3_0
3540                        config_0
3541                        "expected `)` after `(?(` followed by digits"))
3542                     (let ((app_0 (rx:reference10.1 n_0 #f)))
3543                       (values app_0 (add1 pos3_0)))))
3544                  (args (raise-binding-result-arity-error 2 args)))))
3545              (parse-error
3546               s_0
3547               pos_0
3548               config_0
3549               "expected `(?=`, `(?!`, `(?<`, or digit after `(?(`"))))))))
3550(define parse-integer
3551  (lambda (n_0 s_0 pos_0 config_0)
3552    (if (= pos_0 (chytes-length$1 s_0))
3553      (values n_0 pos_0)
3554      (let ((c_0 (chytes-ref$1 s_0 pos_0)))
3555        (if (if (>= c_0 48) (<= c_0 57) #f)
3556          (let ((n2_0 (let ((app_0 (* n_0 10))) (+ app_0 (- c_0 48)))))
3557            (parse-integer n2_0 s_0 (add1 pos_0) config_0))
3558          (values n_0 pos_0))))))
3559(define parse-literal
3560  (lambda (s_0 pos_0 config_0)
3561    (let ((c_0 (chytes-ref$1 s_0 pos_0)))
3562      (let ((tmp_0 (integer->char c_0)))
3563        (if (if (eqv? tmp_0 '#\x2a)
3564              #t
3565              (if (eqv? tmp_0 '#\x2b) #t (eqv? tmp_0 '#\x3f)))
3566          (let ((fmt_0 "`~a` follows nothing in pattern"))
3567            (let ((args_0 (list (integer->char c_0))))
3568              (let ((fmt_1 fmt_0))
3569                (begin-unsafe (apply regexp-error fmt_1 args_0)))))
3570          (if (eqv? tmp_0 '#\x7b)
3571            (if (parse-config-px? config_0)
3572              (parse-error s_0 pos_0 config_0 "`{` follows nothing in pattern")
3573              (values c_0 (add1 pos_0)))
3574            (if (eqv? tmp_0 '#\x5c)
3575              (parse-backslash-literal s_0 (add1 pos_0) config_0)
3576              (if (eqv? tmp_0 '#\x29)
3577                (parse-error s_0 pos_0 config_0 "unmatched `)` in pattern")
3578                (if (if (eqv? tmp_0 '#\x5d) #t (eqv? tmp_0 '#\x7d))
3579                  (if (parse-config-px? config_0)
3580                    (let ((fmt_0 "unmatched `~a` in pattern"))
3581                      (let ((args_0 (list (integer->char c_0))))
3582                        (let ((fmt_1 fmt_0))
3583                          (begin-unsafe (apply regexp-error fmt_1 args_0)))))
3584                    (values c_0 (add1 pos_0)))
3585                  (if (parse-config-case-sensitive? config_0)
3586                    (values c_0 (add1 pos_0))
3587                    (let ((app_0
3588                           (let ((app_0 (range-add* null c_0 config_0)))
3589                             (rx-range app_0 (chytes-limit s_0)))))
3590                      (values app_0 (add1 pos_0)))))))))))))
3591(define parse-backslash-literal
3592  (lambda (s_0 pos2_0 config_0)
3593    (if (= pos2_0 (chytes-length$1 s_0))
3594      (values 0 pos2_0)
3595      (let ((c2_0 (chytes-ref$1 s_0 pos2_0)))
3596        (if (if (parse-config-px? config_0)
3597              (if (>= c2_0 48) (<= c2_0 57) #f)
3598              #f)
3599          (begin
3600            (set-box! (parse-config-references?-box config_0) #t)
3601            (call-with-values
3602             (lambda () (parse-integer 0 s_0 pos2_0 config_0))
3603             (case-lambda
3604              ((n_0 pos3_0)
3605               (values
3606                (rx:reference10.1 n_0 (parse-config-case-sensitive? config_0))
3607                pos3_0))
3608              (args (raise-binding-result-arity-error 2 args)))))
3609          (if (if (parse-config-px? config_0)
3610                (let ((or-part_0 (if (>= c2_0 97) (<= c2_0 122) #f)))
3611                  (if or-part_0 or-part_0 (if (>= c2_0 65) (<= c2_0 90) #f)))
3612                #f)
3613            (let ((tmp_0 (integer->char c2_0)))
3614              (if (if (eqv? tmp_0 '#\x70) #t (eqv? tmp_0 '#\x50))
3615                (parse-unicode-categories c2_0 s_0 (add1 pos2_0) config_0)
3616                (if (eqv? tmp_0 '#\x62)
3617                  (values 'word-boundary (add1 pos2_0))
3618                  (if (eqv? tmp_0 '#\x42)
3619                    (values 'not-word-boundary (add1 pos2_0))
3620                    (call-with-values
3621                     (lambda () (parse-class s_0 pos2_0 config_0))
3622                     (case-lambda
3623                      ((success?_0 range_0 pos3_0)
3624                       (if success?_0
3625                         (values (rx-range range_0 (chytes-limit s_0)) pos3_0)
3626                         (parse-error
3627                          s_0
3628                          pos2_0
3629                          config_0
3630                          "illegal alphabetic escape")))
3631                      (args (raise-binding-result-arity-error 3 args))))))))
3632            (values c2_0 (add1 pos2_0))))))))
3633(define parse-mode
3634  (lambda (s_0 pos_0 config_0)
3635    (let ((tmp_0
3636           (if (= pos_0 (chytes-length$1 s_0))
3637             'eos
3638             (chytes-ref/char s_0 pos_0))))
3639      (if (eq? tmp_0 'eos)
3640        (values config_0 pos_0)
3641        (if (eqv? tmp_0 '#\x69)
3642          (let ((app_0 (add1 pos_0)))
3643            (parse-mode s_0 app_0 (config-case-sensitive config_0 #f)))
3644          (if (eqv? tmp_0 '#\x73)
3645            (let ((app_0 (add1 pos_0)))
3646              (parse-mode s_0 app_0 (config-multi-line config_0 #f)))
3647            (if (eqv? tmp_0 '#\x6d)
3648              (let ((app_0 (add1 pos_0)))
3649                (parse-mode s_0 app_0 (config-multi-line config_0 #t)))
3650              (if (eqv? tmp_0 '#\x2d)
3651                (let ((pos2_0 (add1 pos_0)))
3652                  (let ((tmp_1
3653                         (if (= pos2_0 (chytes-length$1 s_0))
3654                           'eos
3655                           (chytes-ref/char s_0 pos2_0))))
3656                    (if (eq? tmp_1 'eos)
3657                      (values config_0 pos_0)
3658                      (if (eqv? tmp_1 '#\x69)
3659                        (let ((app_0 (add1 pos2_0)))
3660                          (parse-mode
3661                           s_0
3662                           app_0
3663                           (config-case-sensitive config_0 #t)))
3664                        (if (eqv? tmp_1 '#\x73)
3665                          (let ((app_0 (add1 pos2_0)))
3666                            (parse-mode
3667                             s_0
3668                             app_0
3669                             (config-multi-line config_0 #t)))
3670                          (if (eqv? tmp_1 '#\x6d)
3671                            (let ((app_0 (add1 pos2_0)))
3672                              (parse-mode
3673                               s_0
3674                               app_0
3675                               (config-multi-line config_0 #f)))
3676                            (values config_0 pos_0)))))))
3677                (values config_0 pos_0)))))))))
3678(define check-close-paren
3679  (lambda (s_0 pos_0 config_0)
3680    (begin
3681      (if (if (< pos_0 (chytes-length$1 s_0))
3682            (= 41 (chytes-ref$1 s_0 pos_0))
3683            #f)
3684        (void)
3685        (parse-error s_0 pos_0 config_0 "expected a closing `)`"))
3686      (add1 pos_0))))
3687(define missing-closing-error
3688  (lambda (s_0 pos_0 config_0)
3689    (parse-error s_0 pos_0 config_0 "missing closing parenthesis in pattern")))
3690(define bad-?-sequence-error
3691  (lambda (s_0 pos_0 config_0)
3692    (parse-error
3693     s_0
3694     pos_0
3695     config_0
3696     "expected `:`, `=`, `!`, `<=`, `<!`, `i`, `-i`, `m`, `-m`, `s`, or `-s` after `(?`")))
3697(define validate
3698  (lambda (rx_0 num-groups_0)
3699    (let ((group-sizes_0 hash2589))
3700      (let ((depends-sizes_0 hash2589))
3701        (let ((must-sizes_0 hash2589))
3702          (let ((might-be-empty-error_0
3703                 (|#%name|
3704                  might-be-empty-error
3705                  (lambda ()
3706                    (begin
3707                      (regexp-error
3708                       "`*`, `+`, or `{...}` operand could be empty"))))))
3709            (call-with-values
3710             (lambda ()
3711               (letrec*
3712                ((validate_0
3713                  (|#%name|
3714                   validate
3715                   (lambda (rx_1)
3716                     (begin
3717                       (if (eq? rx_1 'never)
3718                         (values 1 1 0)
3719                         (if (let ((or-part_0 (eq? rx_1 'any)))
3720                               (if or-part_0
3721                                 or-part_0
3722                                 (let ((or-part_1 (exact-integer? rx_1)))
3723                                   (if or-part_1 or-part_1 (rx:range? rx_1)))))
3724                           (values 1 1 0)
3725                           (if (bytes? rx_1)
3726                             (let ((len_0 (unsafe-bytes-length rx_1)))
3727                               (values len_0 len_0 0))
3728                             (if (let ((or-part_0 (eq? rx_1 'empty)))
3729                                   (if or-part_0
3730                                     or-part_0
3731                                     (let ((or-part_1 (eq? rx_1 'end)))
3732                                       (if or-part_1
3733                                         or-part_1
3734                                         (eq? rx_1 'line-end)))))
3735                               (values 0 0 0)
3736                               (if (let ((or-part_0 (eq? rx_1 'start)))
3737                                     (if or-part_0
3738                                       or-part_0
3739                                       (eq? rx_1 'line-start)))
3740                                 (values 0 0 1)
3741                                 (if (let ((or-part_0
3742                                            (eq? rx_1 'word-boundary)))
3743                                       (if or-part_0
3744                                         or-part_0
3745                                         (eq? rx_1 'not-word-boundary)))
3746                                   (values 0 0 1)
3747                                   (if (rx:alts? rx_1)
3748                                     (call-with-values
3749                                      (lambda ()
3750                                        (validate_0 (rx:alts-rx_1874 rx_1)))
3751                                      (case-lambda
3752                                       ((min1_0 max1_0 lb1_0)
3753                                        (call-with-values
3754                                         (lambda ()
3755                                           (validate_0 (rx:alts-rx_2761 rx_1)))
3756                                         (case-lambda
3757                                          ((min2_0 max2_0 lb2_0)
3758                                           (let ((app_0 (min min1_0 min2_0)))
3759                                             (let ((app_1 (max max1_0 max2_0)))
3760                                               (values
3761                                                app_0
3762                                                app_1
3763                                                (max lb1_0 lb2_0)))))
3764                                          (args
3765                                           (raise-binding-result-arity-error
3766                                            3
3767                                            args)))))
3768                                       (args
3769                                        (raise-binding-result-arity-error
3770                                         3
3771                                         args))))
3772                                     (if (rx:sequence? rx_1)
3773                                       (let ((lst_0 (rx:sequence-rxs rx_1)))
3774                                         (begin
3775                                           (letrec*
3776                                            ((for-loop_0
3777                                              (|#%name|
3778                                               for-loop
3779                                               (lambda (min-len_0
3780                                                        max-len_0
3781                                                        max-lb_0
3782                                                        lst_1)
3783                                                 (begin
3784                                                   (if (pair? lst_1)
3785                                                     (let ((rx_2
3786                                                            (unsafe-car
3787                                                             lst_1)))
3788                                                       (let ((rest_0
3789                                                              (unsafe-cdr
3790                                                               lst_1)))
3791                                                         (call-with-values
3792                                                          (lambda ()
3793                                                            (call-with-values
3794                                                             (lambda ()
3795                                                               (call-with-values
3796                                                                (lambda ()
3797                                                                  (validate_0
3798                                                                   rx_2))
3799                                                                (case-lambda
3800                                                                 ((min1_0
3801                                                                   max1_0
3802                                                                   lb1_0)
3803                                                                  (let ((app_0
3804                                                                         (+
3805                                                                          min-len_0
3806                                                                          min1_0)))
3807                                                                    (let ((app_1
3808                                                                           (+
3809                                                                            max-len_0
3810                                                                            max1_0)))
3811                                                                      (values
3812                                                                       app_0
3813                                                                       app_1
3814                                                                       (max
3815                                                                        max-lb_0
3816                                                                        lb1_0)))))
3817                                                                 (args
3818                                                                  (raise-binding-result-arity-error
3819                                                                   3
3820                                                                   args)))))
3821                                                             (case-lambda
3822                                                              ((min-len_1
3823                                                                max-len_1
3824                                                                max-lb_1)
3825                                                               (values
3826                                                                min-len_1
3827                                                                max-len_1
3828                                                                max-lb_1))
3829                                                              (args
3830                                                               (raise-binding-result-arity-error
3831                                                                3
3832                                                                args)))))
3833                                                          (case-lambda
3834                                                           ((min-len_1
3835                                                             max-len_1
3836                                                             max-lb_1)
3837                                                            (for-loop_0
3838                                                             min-len_1
3839                                                             max-len_1
3840                                                             max-lb_1
3841                                                             rest_0))
3842                                                           (args
3843                                                            (raise-binding-result-arity-error
3844                                                             3
3845                                                             args))))))
3846                                                     (values
3847                                                      min-len_0
3848                                                      max-len_0
3849                                                      max-lb_0)))))))
3850                                            (for-loop_0 0 0 0 lst_0))))
3851                                       (if (rx:group? rx_1)
3852                                         (call-with-values
3853                                          (lambda ()
3854                                            (validate_0 (rx:group-rx rx_1)))
3855                                          (case-lambda
3856                                           ((min1_0 max1_0 lb1_0)
3857                                            (begin
3858                                              (set! group-sizes_0
3859                                                (let ((app_0 group-sizes_0))
3860                                                  (hash-set
3861                                                   app_0
3862                                                   (rx:group-number rx_1)
3863                                                   min1_0)))
3864                                              (values min1_0 max1_0 lb1_0)))
3865                                           (args
3866                                            (raise-binding-result-arity-error
3867                                             3
3868                                             args))))
3869                                         (if (rx:repeat? rx_1)
3870                                           (let ((old-depends-sizes_0
3871                                                  depends-sizes_0))
3872                                             (begin
3873                                               (set! depends-sizes_0
3874                                                 hash2589)
3875                                               (call-with-values
3876                                                (lambda ()
3877                                                  (validate_0
3878                                                   (rx:repeat-rx rx_1)))
3879                                                (case-lambda
3880                                                 ((min1_0 max1_0 lb1_0)
3881                                                  (begin
3882                                                    (if (zero? min1_0)
3883                                                      (might-be-empty-error_0)
3884                                                      (void))
3885                                                    (set! must-sizes_0
3886                                                      (let ((app_0
3887                                                             must-sizes_0))
3888                                                        (merge-depends-sizes
3889                                                         app_0
3890                                                         depends-sizes_0)))
3891                                                    (set! depends-sizes_0
3892                                                      (merge-depends-sizes
3893                                                       old-depends-sizes_0
3894                                                       depends-sizes_0))
3895                                                    (let ((app_0
3896                                                           (*
3897                                                            min1_0
3898                                                            (rx:repeat-min
3899                                                             rx_1))))
3900                                                      (values
3901                                                       app_0
3902                                                       (*
3903                                                        max1_0
3904                                                        (rx:repeat-max rx_1))
3905                                                       lb1_0))))
3906                                                 (args
3907                                                  (raise-binding-result-arity-error
3908                                                   3
3909                                                   args))))))
3910                                           (if (rx:maybe? rx_1)
3911                                             (call-with-values
3912                                              (lambda ()
3913                                                (validate_0
3914                                                 (rx:maybe-rx rx_1)))
3915                                              (case-lambda
3916                                               ((min1_0 max1_0 lb1_0)
3917                                                (values 0 max1_0 lb1_0))
3918                                               (args
3919                                                (raise-binding-result-arity-error
3920                                                 3
3921                                                 args))))
3922                                             (if (rx:conditional? rx_1)
3923                                               (call-with-values
3924                                                (lambda ()
3925                                                  (validate_0
3926                                                   (rx:conditional-tst rx_1)))
3927                                                (case-lambda
3928                                                 ((min0_0 max0_0 lb0_0)
3929                                                  (call-with-values
3930                                                   (lambda ()
3931                                                     (validate_0
3932                                                      (rx:conditional-rx_2013
3933                                                       rx_1)))
3934                                                   (case-lambda
3935                                                    ((min1_0 max1_0 lb1_0)
3936                                                     (call-with-values
3937                                                      (lambda ()
3938                                                        (validate_0
3939                                                         (rx:conditional-rx_2094
3940                                                          rx_1)))
3941                                                      (case-lambda
3942                                                       ((min2_0 max2_0 lb2_0)
3943                                                        (let ((app_0
3944                                                               (min
3945                                                                min1_0
3946                                                                min2_0)))
3947                                                          (let ((app_1
3948                                                                 (max
3949                                                                  max1_0
3950                                                                  max2_0)))
3951                                                            (values
3952                                                             app_0
3953                                                             app_1
3954                                                             (max
3955                                                              lb0_0
3956                                                              lb1_0
3957                                                              lb2_0)))))
3958                                                       (args
3959                                                        (raise-binding-result-arity-error
3960                                                         3
3961                                                         args)))))
3962                                                    (args
3963                                                     (raise-binding-result-arity-error
3964                                                      3
3965                                                      args)))))
3966                                                 (args
3967                                                  (raise-binding-result-arity-error
3968                                                   3
3969                                                   args))))
3970                                               (if (rx:lookahead? rx_1)
3971                                                 (call-with-values
3972                                                  (lambda ()
3973                                                    (validate_0
3974                                                     (rx:lookahead-rx rx_1)))
3975                                                  (case-lambda
3976                                                   ((min1_0 max1_0 lb1_0)
3977                                                    (values 0 0 lb1_0))
3978                                                   (args
3979                                                    (raise-binding-result-arity-error
3980                                                     3
3981                                                     args))))
3982                                                 (if (rx:lookbehind? rx_1)
3983                                                   (call-with-values
3984                                                    (lambda ()
3985                                                      (validate_0
3986                                                       (rx:lookbehind-rx
3987                                                        rx_1)))
3988                                                    (case-lambda
3989                                                     ((min1_0 max1_0 lb1_0)
3990                                                      (begin
3991                                                        (if (= +inf.0 max1_0)
3992                                                          (regexp-error
3993                                                           "lookbehind pattern does not match a bounded length")
3994                                                          (void))
3995                                                        (set-rx:lookbehind-lb-min!
3996                                                         rx_1
3997                                                         min1_0)
3998                                                        (set-rx:lookbehind-lb-max!
3999                                                         rx_1
4000                                                         max1_0)
4001                                                        (values
4002                                                         0
4003                                                         0
4004                                                         (max max1_0 lb1_0))))
4005                                                     (args
4006                                                      (raise-binding-result-arity-error
4007                                                       3
4008                                                       args))))
4009                                                   (if (rx:cut? rx_1)
4010                                                     (validate_0
4011                                                      (rx:cut-rx rx_1))
4012                                                     (if (rx:reference? rx_1)
4013                                                       (let ((n_0
4014                                                              (rx:reference-n
4015                                                               rx_1)))
4016                                                         (begin
4017                                                           (if (<=
4018                                                                n_0
4019                                                                num-groups_0)
4020                                                             (void)
4021                                                             (regexp-error
4022                                                              "backreference number is larger than the highest-numbered cluster"))
4023                                                           (let ((min-size_0
4024                                                                  (hash-ref
4025                                                                   group-sizes_0
4026                                                                   n_0
4027                                                                   #f)))
4028                                                             (if min-size_0
4029                                                               (values
4030                                                                min-size_0
4031                                                                +inf.0
4032                                                                0)
4033                                                               (begin
4034                                                                 (set! depends-sizes_0
4035                                                                   (let ((app_0
4036                                                                          depends-sizes_0))
4037                                                                     (hash-set
4038                                                                      app_0
4039                                                                      (sub1
4040                                                                       n_0)
4041                                                                      #t)))
4042                                                                 (values
4043                                                                  1
4044                                                                  +inf.0
4045                                                                  0))))))
4046                                                       (if (rx:unicode-categories?
4047                                                            rx_1)
4048                                                         (values 1 4 0)
4049                                                         (error
4050                                                          'validate
4051                                                          "internal error: ~s"
4052                                                          rx_1)))))))))))))))))))))))
4053                (validate_0 rx_0)))
4054             (case-lambda
4055              ((min-len_0 max-len_0 max-lookbehind_0)
4056               (begin
4057                 (let ((ht_0 must-sizes_0))
4058                   (begin
4059                     (letrec*
4060                      ((for-loop_0
4061                        (|#%name|
4062                         for-loop
4063                         (lambda (i_0)
4064                           (begin
4065                             (if i_0
4066                               (let ((n_0 (hash-iterate-key ht_0 i_0)))
4067                                 (begin
4068                                   (if (positive?
4069                                        (hash-ref group-sizes_0 n_0 0))
4070                                     (void)
4071                                     (might-be-empty-error_0))
4072                                   (for-loop_0 (hash-iterate-next ht_0 i_0))))
4073                               (values)))))))
4074                      (for-loop_0 (hash-iterate-first ht_0)))))
4075                 (void)
4076                 max-lookbehind_0))
4077              (args (raise-binding-result-arity-error 3 args))))))))))
4078(define merge-depends-sizes
4079  (lambda (ht1_0 ht2_0)
4080    (if (zero? (hash-count ht1_0))
4081      ht2_0
4082      (if (let ((app_0 (hash-count ht2_0))) (< app_0 (hash-count ht1_0)))
4083        (merge-depends-sizes ht2_0 ht1_0)
4084        (begin
4085          (letrec*
4086           ((for-loop_0
4087             (|#%name|
4088              for-loop
4089              (lambda (ht2_1 i_0)
4090                (begin
4091                  (if i_0
4092                    (let ((k_0 (hash-iterate-key ht1_0 i_0)))
4093                      (let ((ht2_2
4094                             (let ((ht2_2 (hash-set ht2_1 k_0 #t)))
4095                               (values ht2_2))))
4096                        (for-loop_0 ht2_2 (hash-iterate-next ht1_0 i_0))))
4097                    ht2_1))))))
4098           (for-loop_0 ht2_0 (hash-iterate-first ht1_0))))))))
4099(define convert
4100  (lambda (rx_0)
4101    (if (eq? rx_0 'any)
4102      (rx:unicode-categories12.1 null #f)
4103      (if (exact-integer? rx_0)
4104        (if (< rx_0 128)
4105          rx_0
4106          (string->bytes/utf-8 (string (integer->char rx_0))))
4107        (if (rx:range? rx_0)
4108          (let ((range_0 (rx:range-range rx_0)))
4109            (if (range-within? range_0 0 127) rx_0 (range->alts range_0)))
4110          (if (bytes? rx_0)
4111            (convert (bytes->string/latin-1 rx_0))
4112            (if (string? rx_0)
4113              (string->bytes/utf-8 rx_0)
4114              (if (rx:alts? rx_0)
4115                (let ((app_0 (convert (rx:alts-rx_1874 rx_0))))
4116                  (rx-alts app_0 (convert (rx:alts-rx_2761 rx_0)) 255))
4117                (if (rx:sequence? rx_0)
4118                  (if (rx:sequence? rx_0)
4119                    (let ((rxs1_0
4120                           (reverse$1
4121                            (let ((lst_0 (rx:sequence-rxs rx_0)))
4122                              (begin
4123                                (letrec*
4124                                 ((for-loop_0
4125                                   (|#%name|
4126                                    for-loop
4127                                    (lambda (fold-var_0 lst_1)
4128                                      (begin
4129                                        (if (pair? lst_1)
4130                                          (let ((rx_1 (unsafe-car lst_1)))
4131                                            (let ((rest_0 (unsafe-cdr lst_1)))
4132                                              (let ((fold-var_1
4133                                                     (let ((fold-var_1
4134                                                            (cons
4135                                                             (convert rx_1)
4136                                                             fold-var_0)))
4137                                                       (values fold-var_1))))
4138                                                (for-loop_0
4139                                                 fold-var_1
4140                                                 rest_0))))
4141                                          fold-var_0))))))
4142                                 (for-loop_0 null lst_0)))))))
4143                      (rx:sequence2.1
4144                       rxs1_0
4145                       (rx:sequence-needs-backtrack? rx_0)))
4146                    (raise-argument-error 'struct-copy "rx:sequence?" rx_0))
4147                  (if (rx:group? rx_0)
4148                    (if (rx:group? rx_0)
4149                      (let ((rx2_0 (convert (rx:group-rx rx_0))))
4150                        (rx:group3.1 rx2_0 (rx:group-number rx_0)))
4151                      (raise-argument-error 'struct-copy "rx:group?" rx_0))
4152                    (if (rx:repeat? rx_0)
4153                      (if (rx:repeat? rx_0)
4154                        (let ((rx3_0 (convert (rx:repeat-rx rx_0))))
4155                          (let ((app_0 (rx:repeat-min rx_0)))
4156                            (let ((app_1 (rx:repeat-max rx_0)))
4157                              (rx:repeat4.1
4158                               rx3_0
4159                               app_0
4160                               app_1
4161                               (rx:repeat-non-greedy? rx_0)))))
4162                        (raise-argument-error 'struct-copy "rx:repeat?" rx_0))
4163                      (if (rx:maybe? rx_0)
4164                        (if (rx:maybe? rx_0)
4165                          (let ((rx4_0 (convert (rx:maybe-rx rx_0))))
4166                            (rx:maybe5.1 rx4_0 (rx:maybe-non-greedy? rx_0)))
4167                          (raise-argument-error 'struct-copy "rx:maybe?" rx_0))
4168                        (if (rx:conditional? rx_0)
4169                          (if (rx:conditional? rx_0)
4170                            (let ((tst5_0 (convert (rx:conditional-tst rx_0))))
4171                              (let ((rx16_0
4172                                     (convert (rx:conditional-rx_2013 rx_0))))
4173                                (let ((rx27_0
4174                                       (convert
4175                                        (rx:conditional-rx_2094 rx_0))))
4176                                  (let ((rx16_1 rx16_0) (tst5_1 tst5_0))
4177                                    (let ((app_0
4178                                           (rx:conditional-n-start rx_0)))
4179                                      (let ((app_1
4180                                             (rx:conditional-num-n rx_0)))
4181                                        (rx:conditional6.1
4182                                         tst5_1
4183                                         rx16_1
4184                                         rx27_0
4185                                         app_0
4186                                         app_1
4187                                         (rx:conditional-needs-backtrack?
4188                                          rx_0))))))))
4189                            (raise-argument-error
4190                             'struct-copy
4191                             "rx:conditional?"
4192                             rx_0))
4193                          (if (rx:lookahead? rx_0)
4194                            (if (rx:lookahead? rx_0)
4195                              (let ((rx8_0 (convert (rx:lookahead-rx rx_0))))
4196                                (let ((app_0 (rx:lookahead-match? rx_0)))
4197                                  (let ((app_1 (rx:lookahead-n-start rx_0)))
4198                                    (rx:lookahead7.1
4199                                     rx8_0
4200                                     app_0
4201                                     app_1
4202                                     (rx:lookahead-num-n rx_0)))))
4203                              (raise-argument-error
4204                               'struct-copy
4205                               "rx:lookahead?"
4206                               rx_0))
4207                            (if (rx:lookbehind? rx_0)
4208                              (if (rx:lookbehind? rx_0)
4209                                (let ((rx9_0
4210                                       (convert (rx:lookbehind-rx rx_0))))
4211                                  (let ((app_0 (rx:lookbehind-match? rx_0)))
4212                                    (let ((app_1 (rx:lookbehind-lb-min rx_0)))
4213                                      (let ((app_2
4214                                             (rx:lookbehind-lb-max rx_0)))
4215                                        (let ((app_3
4216                                               (rx:lookbehind-n-start rx_0)))
4217                                          (rx:lookbehind8.1
4218                                           rx9_0
4219                                           app_0
4220                                           app_1
4221                                           app_2
4222                                           app_3
4223                                           (rx:lookbehind-num-n rx_0)))))))
4224                                (raise-argument-error
4225                                 'struct-copy
4226                                 "rx:lookbehind?"
4227                                 rx_0))
4228                              (if (rx:cut? rx_0)
4229                                (if (rx:cut? rx_0)
4230                                  (let ((rx10_0 (convert (rx:cut-rx rx_0))))
4231                                    (let ((app_0 (rx:cut-n-start rx_0)))
4232                                      (let ((app_1 (rx:cut-num-n rx_0)))
4233                                        (rx:cut9.1
4234                                         rx10_0
4235                                         app_0
4236                                         app_1
4237                                         (rx:cut-needs-backtrack? rx_0)))))
4238                                  (raise-argument-error
4239                                   'struct-copy
4240                                   "rx:cut?"
4241                                   rx_0))
4242                                rx_0))))))))))))))))
4243(define range->alts
4244  (lambda (args_0)
4245    (let ((l_0 (begin-unsafe args_0)))
4246      (letrec*
4247       ((loop_0
4248         (|#%name|
4249          loop
4250          (lambda (l_1)
4251            (begin
4252              (if (null? l_1)
4253                'never
4254                (let ((start_0 (caar l_1)))
4255                  (let ((end_0 (cdar l_1)))
4256                    (let ((start_1 start_0))
4257                      (let ((seg-end_0
4258                             (if (<= start_1 127)
4259                               127
4260                               (if (<= start_1 2047)
4261                                 2047
4262                                 (if (<= start_1 65535)
4263                                   65535
4264                                   (if (<= start_1 2097151)
4265                                     2097151
4266                                     (void)))))))
4267                        (if (> end_0 seg-end_0)
4268                          (loop_0
4269                           (let ((app_0 (cons start_1 seg-end_0)))
4270                             (cons
4271                              app_0
4272                              (let ((app_1 (cons (add1 seg-end_0) end_0)))
4273                                (cons app_1 (cdr l_1))))))
4274                          (if (<= end_0 127)
4275                            (let ((app_0
4276                                   (rx-range
4277                                    (begin-unsafe
4278                                     (range-union
4279                                      null
4280                                      (list (cons start_1 end_0))))
4281                                    255)))
4282                              (rx-alts app_0 (loop_0 (cdr l_1)) 255))
4283                            (let ((app_0
4284                                   (let ((app_0
4285                                          (string->bytes/utf-8
4286                                           (string (integer->char start_1)))))
4287                                     (bytes-range
4288                                      app_0
4289                                      (string->bytes/utf-8
4290                                       (string (integer->char end_0)))))))
4291                              (rx-alts
4292                               app_0
4293                               (loop_0 (cdr l_1))
4294                               255))))))))))))))
4295       (loop_0 l_0)))))
4296(define bytes-range
4297  (lambda (start-str_0 end-str_0)
4298    (if (equal? start-str_0 end-str_0)
4299      start-str_0
4300      (if (= 1 (unsafe-bytes-length start-str_0))
4301        (rx-range
4302         (let ((from-c_0 (unsafe-bytes-ref start-str_0 0)))
4303           (let ((to-c_0 (unsafe-bytes-ref end-str_0 0)))
4304             (let ((from-c_1 from-c_0))
4305               (begin-unsafe
4306                (range-union null (list (cons from-c_1 to-c_0)))))))
4307         255)
4308        (let ((common_0
4309               (letrec*
4310                ((loop_0
4311                  (|#%name|
4312                   loop
4313                   (lambda (i_0)
4314                     (begin
4315                       (if (let ((app_0 (unsafe-bytes-ref start-str_0 i_0)))
4316                             (= app_0 (unsafe-bytes-ref end-str_0 i_0)))
4317                         (loop_0 (add1 i_0))
4318                         i_0))))))
4319                (loop_0 0))))
4320          (let ((common-str_0
4321                 (if (zero? common_0) #vu8() (subbytes start-str_0 0 common_0))))
4322            (let ((n_0 (unsafe-bytes-ref start-str_0 common_0)))
4323              (let ((m_0 (unsafe-bytes-ref end-str_0 common_0)))
4324                (let ((p_0
4325                       (if (zero-tail? start-str_0 (add1 common_0))
4326                         n_0
4327                         (add1 n_0))))
4328                  (let ((q_0
4329                         (if (zero-tail? end-str_0 (add1 common_0))
4330                           m_0
4331                           (sub1 m_0))))
4332                    (let ((tail-len_0
4333                           (sub1
4334                            (- (unsafe-bytes-length start-str_0) common_0))))
4335                      (let ((n-to-p_0
4336                             (rx-sequence
4337                              (list
4338                               n_0
4339                               (let ((app_0
4340                                      (subbytes start-str_0 (add1 common_0))))
4341                                 (bytes-range
4342                                  app_0
4343                                  (vector-ref FFFF-tails tail-len_0)))))))
4344                        (let ((m-and-up_0
4345                               (rx-sequence
4346                                (list
4347                                 m_0
4348                                 (let ((app_0
4349                                        (vector-ref 0000-tails tail-len_0)))
4350                                   (bytes-range
4351                                    app_0
4352                                    (subbytes end-str_0 (add1 common_0))))))))
4353                          (let ((p-through-q_0
4354                                 (if (= (add1 p_0) q_0)
4355                                   'never
4356                                   (rx-sequence
4357                                    (let ((app_0
4358                                           (rx-range
4359                                            (begin-unsafe
4360                                             (range-union
4361                                              null
4362                                              (list (cons p_0 q_0))))
4363                                            255)))
4364                                      (cons
4365                                       app_0
4366                                       (reverse$1
4367                                        (begin
4368                                          (letrec*
4369                                           ((for-loop_0
4370                                             (|#%name|
4371                                              for-loop
4372                                              (lambda (fold-var_0 pos_0)
4373                                                (begin
4374                                                  (if (< pos_0 tail-len_0)
4375                                                    (let ((fold-var_1
4376                                                           (cons
4377                                                            'any
4378                                                            fold-var_0)))
4379                                                      (let ((fold-var_2
4380                                                             (values
4381                                                              fold-var_1)))
4382                                                        (for-loop_0
4383                                                         fold-var_2
4384                                                         (+ pos_0 1))))
4385                                                    fold-var_0))))))
4386                                           (for-loop_0 null 0))))))))))
4387                            (rx-sequence
4388                             (let ((app_0
4389                                    (if (=
4390                                         1
4391                                         (unsafe-bytes-length common-str_0))
4392                                      (unsafe-bytes-ref common-str_0 0)
4393                                      common-str_0)))
4394                               (list
4395                                app_0
4396                                (rx-alts
4397                                 n-to-p_0
4398                                 (rx-alts p-through-q_0 m-and-up_0 255)
4399                                 255))))))))))))))))))
4400(define FFFF-tails '#(#vu8() #vu8(255) #vu8(255 255) #vu8(255 255 255) #vu8(255 255 255 255)))
4401(define 0000-tails '#(#vu8() #vu8(0) #vu8(0 0) #vu8(0 0 0) #vu8(0 0 0 0)))
4402(define zero-tail?
4403  (lambda (bstr_0 i_0)
4404    (call-with-values
4405     (lambda () (unsafe-normalise-inputs unsafe-bytes-length bstr_0 i_0 #f 1))
4406     (case-lambda
4407      ((v*_0 start*_0 stop*_0 step*_0)
4408       (begin
4409         #t
4410         (letrec*
4411          ((for-loop_0
4412            (|#%name|
4413             for-loop
4414             (lambda (result_0 idx_0)
4415               (begin
4416                 (if (unsafe-fx< idx_0 stop*_0)
4417                   (let ((c_0 (unsafe-bytes-ref v*_0 idx_0)))
4418                     (let ((result_1
4419                            (let ((result_1 (= c_0 0))) (values result_1))))
4420                       (if (if (not (let ((x_0 (list c_0))) (not result_1)))
4421                             #t
4422                             #f)
4423                         (for-loop_0 result_1 (unsafe-fx+ idx_0 1))
4424                         result_1)))
4425                   result_0))))))
4426          (for-loop_0 #t start*_0))))
4427      (args (raise-binding-result-arity-error 4 args))))))
4428(define anchored?
4429  (lambda (rx_0)
4430    (if (eq? rx_0 'start)
4431      #t
4432      (if (rx:sequence? rx_0)
4433        (letrec*
4434         ((loop_0
4435           (|#%name|
4436            loop
4437            (lambda (rxs_0)
4438              (begin
4439                (if (null? rxs_0)
4440                  #f
4441                  (if (rx:lookahead? (car rxs_0))
4442                    (loop_0 (cdr rxs_0))
4443                    (if (rx:lookbehind? (car rxs_0))
4444                      (loop_0 (cdr rxs_0))
4445                      (anchored? (car rxs_0))))))))))
4446         (loop_0 (rx:sequence-rxs rx_0)))
4447        (if (rx:alts? rx_0)
4448          (if (anchored? (rx:alts-rx_1874 rx_0))
4449            (anchored? (rx:alts-rx_2761 rx_0))
4450            #f)
4451          (if (rx:conditional? rx_0)
4452            (if (anchored? (rx:conditional-rx_2013 rx_0))
4453              (anchored? (rx:conditional-rx_2094 rx_0))
4454              #f)
4455            (if (rx:group? rx_0)
4456              (anchored? (rx:group-rx rx_0))
4457              (if (rx:cut? rx_0) (anchored? (rx:cut-rx rx_0)) #f))))))))
4458(define get-must-string
4459  (lambda (rx_0)
4460    (if (something-expensive? rx_0)
4461      (let ((app_0 (must-string rx_0))) (choose app_0 (must-range rx_0)))
4462      #f)))
4463(define choose
4464  (lambda (bstr_0 seq_0)
4465    (if (not seq_0)
4466      bstr_0
4467      (if (not bstr_0)
4468        (compile-range-sequence seq_0)
4469        (if (>= (unsafe-bytes-length bstr_0) (quotient (length seq_0) 2))
4470          bstr_0
4471          (compile-range-sequence seq_0))))))
4472(define something-expensive?
4473  (lambda (rx_0)
4474    (if (let ((or-part_0 (rx:alts? rx_0)))
4475          (if or-part_0 or-part_0 (rx:repeat? rx_0)))
4476      #t
4477      (if (rx:maybe? rx_0)
4478        (something-expensive? (rx:maybe-rx rx_0))
4479        (if (rx:sequence? rx_0)
4480          (let ((lst_0 (rx:sequence-rxs rx_0)))
4481            (begin
4482              (letrec*
4483               ((for-loop_0
4484                 (|#%name|
4485                  for-loop
4486                  (lambda (result_0 lst_1)
4487                    (begin
4488                      (if (pair? lst_1)
4489                        (let ((rx_1 (unsafe-car lst_1)))
4490                          (let ((rest_0 (unsafe-cdr lst_1)))
4491                            (let ((result_1
4492                                   (let ((result_1
4493                                          (something-expensive? rx_1)))
4494                                     (values result_1))))
4495                              (if (if (not (let ((x_0 (list rx_1))) result_1))
4496                                    #t
4497                                    #f)
4498                                (for-loop_0 result_1 rest_0)
4499                                result_1))))
4500                        result_0))))))
4501               (for-loop_0 #f lst_0))))
4502          (if (rx:conditional? rx_0)
4503            (let ((or-part_0
4504                   (something-expensive? (rx:conditional-rx_2013 rx_0))))
4505              (if or-part_0
4506                or-part_0
4507                (something-expensive? (rx:conditional-rx_2094 rx_0))))
4508            (if (rx:group? rx_0)
4509              (something-expensive? (rx:group-rx rx_0))
4510              (if (rx:cut? rx_0)
4511                (something-expensive? (rx:cut-rx rx_0))
4512                (if (rx:lookahead? rx_0)
4513                  (something-expensive? (rx:lookahead-rx rx_0))
4514                  (if (rx:lookbehind? rx_0)
4515                    (something-expensive? (rx:lookbehind-rx rx_0))
4516                    #f))))))))))
4517(define must-string
4518  (lambda (rx_0)
4519    (if (bytes? rx_0)
4520      rx_0
4521      (if (integer? rx_0)
4522        (bytes rx_0)
4523        (if (rx:sequence? rx_0)
4524          (let ((lst_0 (rx:sequence-rxs rx_0)))
4525            (begin
4526              (letrec*
4527               ((for-loop_0
4528                 (|#%name|
4529                  for-loop
4530                  (lambda (bstr_0 lst_1)
4531                    (begin
4532                      (if (pair? lst_1)
4533                        (let ((rx_1 (unsafe-car lst_1)))
4534                          (let ((rest_0 (unsafe-cdr lst_1)))
4535                            (let ((bstr_1
4536                                   (let ((bstr_1
4537                                          (let ((bstr1_0 (must-string rx_1)))
4538                                            (if (not bstr_0)
4539                                              bstr1_0
4540                                              (if (not bstr1_0)
4541                                                bstr_0
4542                                                (if (>
4543                                                     (unsafe-bytes-length
4544                                                      bstr_0)
4545                                                     (unsafe-bytes-length
4546                                                      bstr1_0))
4547                                                  bstr_0
4548                                                  bstr1_0))))))
4549                                     (values bstr_1))))
4550                              (for-loop_0 bstr_1 rest_0))))
4551                        bstr_0))))))
4552               (for-loop_0 #f lst_0))))
4553          (if (rx:repeat? rx_0)
4554            (if (positive? (rx:repeat-min rx_0))
4555              (must-string (rx:repeat-rx rx_0))
4556              #f)
4557            (if (rx:group? rx_0)
4558              (must-string (rx:group-rx rx_0))
4559              (if (rx:cut? rx_0)
4560                (must-string (rx:cut-rx rx_0))
4561                (if (rx:lookahead? rx_0)
4562                  (if (rx:lookahead-match? rx_0)
4563                    (must-string (rx:lookahead-rx rx_0))
4564                    #f)
4565                  (if (rx:lookbehind? rx_0)
4566                    (if (rx:lookbehind-match? rx_0)
4567                      (must-string (rx:lookbehind-rx rx_0))
4568                      #f)
4569                    #f))))))))))
4570(define must-range
4571  (lambda (rx_0)
4572    (if (bytes? rx_0)
4573      (bytes->list rx_0)
4574      (if (integer? rx_0)
4575        (list rx_0)
4576        (if (rx:range? rx_0)
4577          (list (rx:range-range rx_0))
4578          (if (rx:sequence? rx_0)
4579            (letrec*
4580             ((loop_0
4581               (|#%name|
4582                loop
4583                (lambda (seq_0 l_0)
4584                  (begin
4585                    (if (null? l_0)
4586                      (if (pair? seq_0) (reverse$1 seq_0) #f)
4587                      (if (bytes? (car l_0))
4588                        (let ((app_0
4589                               (append
4590                                (reverse$1 (bytes->list (car l_0)))
4591                                seq_0)))
4592                          (loop_0 app_0 (cdr l_0)))
4593                        (if (rx:range? (car l_0))
4594                          (let ((app_0
4595                                 (cons (rx:range-range (car l_0)) seq_0)))
4596                            (loop_0 app_0 (cdr l_0)))
4597                          (if (null? seq_0)
4598                            (loop_0 null (cdr l_0))
4599                            (let ((rest-seq_0 (loop_0 null (cdr l_0))))
4600                              (if (if rest-seq_0
4601                                    (let ((app_0 (length rest-seq_0)))
4602                                      (> app_0 (length seq_0)))
4603                                    #f)
4604                                rest-seq_0
4605                                (reverse$1 seq_0))))))))))))
4606             (loop_0 null (rx:sequence-rxs rx_0)))
4607            (if (rx:repeat? rx_0)
4608              (if (positive? (rx:repeat-min rx_0))
4609                (must-range (rx:repeat-rx rx_0))
4610                #f)
4611              (if (rx:group? rx_0)
4612                (must-range (rx:group-rx rx_0))
4613                (if (rx:cut? rx_0)
4614                  (must-range (rx:cut-rx rx_0))
4615                  (if (rx:lookahead? rx_0)
4616                    (if (rx:lookahead-match? rx_0)
4617                      (must-range (rx:lookahead-rx rx_0))
4618                      #f)
4619                    (if (rx:lookbehind? rx_0)
4620                      (if (rx:lookbehind-match? rx_0)
4621                        (must-range (rx:lookbehind-rx rx_0))
4622                        #f)
4623                      #f)))))))))))
4624(define compile-range-sequence
4625  (lambda (seq_0)
4626    (reverse$1
4627     (begin
4628       (letrec*
4629        ((for-loop_0
4630          (|#%name|
4631           for-loop
4632           (lambda (fold-var_0 lst_0)
4633             (begin
4634               (if (pair? lst_0)
4635                 (let ((r_0 (unsafe-car lst_0)))
4636                   (let ((rest_0 (unsafe-cdr lst_0)))
4637                     (let ((fold-var_1
4638                            (let ((fold-var_1
4639                                   (cons
4640                                    (if (exact-integer? r_0)
4641                                      (compile-range (range-add null r_0))
4642                                      (compile-range r_0))
4643                                    fold-var_0)))
4644                              (values fold-var_1))))
4645                       (for-loop_0 fold-var_1 rest_0))))
4646                 fold-var_0))))))
4647        (for-loop_0 null seq_0))))))
4648(define get-start-range
4649  (lambda (rx_0)
4650    (let ((r_0 (start-range rx_0))) (if r_0 (compile-range r_0) #f))))
4651(define start-range
4652  (lambda (rx_0)
4653    (if (integer? rx_0)
4654      (range-add null rx_0)
4655      (if (bytes? rx_0)
4656        (range-add null (unsafe-bytes-ref rx_0 0))
4657        (if (rx:sequence? rx_0)
4658          (letrec*
4659           ((loop_0
4660             (|#%name|
4661              loop
4662              (lambda (l_0)
4663                (begin
4664                  (if (null? l_0)
4665                    #f
4666                    (let ((rx_1 (car l_0)))
4667                      (if (zero-sized? rx_1)
4668                        (loop_0 (cdr l_0))
4669                        (start-range rx_1)))))))))
4670           (loop_0 (rx:sequence-rxs rx_0)))
4671          (if (rx:alts? rx_0)
4672            (let ((app_0 (start-range (rx:alts-rx_1874 rx_0))))
4673              (union app_0 (start-range (rx:alts-rx_2761 rx_0))))
4674            (if (rx:conditional? rx_0)
4675              (let ((app_0 (start-range (rx:conditional-rx_2013 rx_0))))
4676                (union app_0 (start-range (rx:conditional-rx_2094 rx_0))))
4677              (if (rx:group? rx_0)
4678                (start-range (rx:group-rx rx_0))
4679                (if (rx:cut? rx_0)
4680                  (start-range (rx:cut-rx rx_0))
4681                  (if (rx:repeat? rx_0)
4682                    (if (positive? (rx:repeat-min rx_0))
4683                      (start-range (rx:repeat-rx rx_0))
4684                      #f)
4685                    (if (rx:range? rx_0) (rx:range-range rx_0) #f)))))))))))
4686(define zero-sized?
4687  (lambda (rx_0)
4688    (let ((or-part_0 (eq? rx_0 'empty)))
4689      (if or-part_0
4690        or-part_0
4691        (let ((or-part_1 (eq? rx_0 'start)))
4692          (if or-part_1
4693            or-part_1
4694            (let ((or-part_2 (eq? rx_0 'line-start)))
4695              (if or-part_2
4696                or-part_2
4697                (let ((or-part_3 (eq? rx_0 'word-boundary)))
4698                  (if or-part_3
4699                    or-part_3
4700                    (let ((or-part_4 (eq? rx_0 'not-word-boundary)))
4701                      (if or-part_4
4702                        or-part_4
4703                        (let ((or-part_5 (rx:lookahead? rx_0)))
4704                          (if or-part_5
4705                            or-part_5
4706                            (let ((or-part_6 (rx:lookbehind? rx_0)))
4707                              (if or-part_6
4708                                or-part_6
4709                                (let ((or-part_7
4710                                       (if (rx:group? rx_0)
4711                                         (zero-sized? (rx:group-rx rx_0))
4712                                         #f)))
4713                                  (if or-part_7
4714                                    or-part_7
4715                                    (if (rx:cut? rx_0)
4716                                      (zero-sized? (rx:cut-rx rx_0))
4717                                      #f)))))))))))))))))))
4718(define union (lambda (a_0 b_0) (if a_0 (if b_0 (range-union a_0 b_0) #f) #f)))
4719(define finish_2590
4720  (make-struct-type-install-properties
4721   '(lazy-bytes)
4722   13
4723   0
4724   #f
4725   null
4726   (current-inspector)
4727   #f
4728   '(2 3 4 5 6 7 8 9 12)
4729   #f
4730   'lazy-bytes))
4731(define struct:lazy-bytes
4732  (make-record-type-descriptor*
4733   'lazy-bytes
4734   #f
4735   (|#%nongenerative-uid| lazy-bytes)
4736   #f
4737   #f
4738   13
4739   3075))
4740(define effect_2741 (finish_2590 struct:lazy-bytes))
4741(define lazy-bytes1.1
4742  (|#%name|
4743   lazy-bytes
4744   (record-constructor
4745    (make-record-constructor-descriptor struct:lazy-bytes #f #f))))
4746(define lazy-bytes?_2654
4747  (|#%name| lazy-bytes? (record-predicate struct:lazy-bytes)))
4748(define lazy-bytes?
4749  (|#%name|
4750   lazy-bytes?
4751   (lambda (v)
4752     (if (lazy-bytes?_2654 v)
4753       #t
4754       ($value
4755        (if (impersonator? v) (lazy-bytes?_2654 (impersonator-val v)) #f))))))
4756(define lazy-bytes-bstr_2345
4757  (|#%name| lazy-bytes-bstr (record-accessor struct:lazy-bytes 0)))
4758(define lazy-bytes-bstr
4759  (|#%name|
4760   lazy-bytes-bstr
4761   (lambda (s)
4762     (if (lazy-bytes?_2654 s)
4763       (lazy-bytes-bstr_2345 s)
4764       ($value
4765        (impersonate-ref
4766         lazy-bytes-bstr_2345
4767         struct:lazy-bytes
4768         0
4769         s
4770         'lazy-bytes
4771         'bstr))))))
4772(define lazy-bytes-end_2914
4773  (|#%name| lazy-bytes-end (record-accessor struct:lazy-bytes 1)))
4774(define lazy-bytes-end
4775  (|#%name|
4776   lazy-bytes-end
4777   (lambda (s)
4778     (if (lazy-bytes?_2654 s)
4779       (lazy-bytes-end_2914 s)
4780       ($value
4781        (impersonate-ref
4782         lazy-bytes-end_2914
4783         struct:lazy-bytes
4784         1
4785         s
4786         'lazy-bytes
4787         'end))))))
4788(define lazy-bytes-in_2568
4789  (|#%name| lazy-bytes-in (record-accessor struct:lazy-bytes 2)))
4790(define lazy-bytes-in
4791  (|#%name|
4792   lazy-bytes-in
4793   (lambda (s)
4794     (if (lazy-bytes?_2654 s)
4795       (lazy-bytes-in_2568 s)
4796       ($value
4797        (impersonate-ref
4798         lazy-bytes-in_2568
4799         struct:lazy-bytes
4800         2
4801         s
4802         'lazy-bytes
4803         'in))))))
4804(define lazy-bytes-skip-amt_2649
4805  (|#%name| lazy-bytes-skip-amt (record-accessor struct:lazy-bytes 3)))
4806(define lazy-bytes-skip-amt
4807  (|#%name|
4808   lazy-bytes-skip-amt
4809   (lambda (s)
4810     (if (lazy-bytes?_2654 s)
4811       (lazy-bytes-skip-amt_2649 s)
4812       ($value
4813        (impersonate-ref
4814         lazy-bytes-skip-amt_2649
4815         struct:lazy-bytes
4816         3
4817         s
4818         'lazy-bytes
4819         'skip-amt))))))
4820(define lazy-bytes-prefix-len_2565
4821  (|#%name| lazy-bytes-prefix-len (record-accessor struct:lazy-bytes 4)))
4822(define lazy-bytes-prefix-len
4823  (|#%name|
4824   lazy-bytes-prefix-len
4825   (lambda (s)
4826     (if (lazy-bytes?_2654 s)
4827       (lazy-bytes-prefix-len_2565 s)
4828       ($value
4829        (impersonate-ref
4830         lazy-bytes-prefix-len_2565
4831         struct:lazy-bytes
4832         4
4833         s
4834         'lazy-bytes
4835         'prefix-len))))))
4836(define lazy-bytes-peek?_2174
4837  (|#%name| lazy-bytes-peek? (record-accessor struct:lazy-bytes 5)))
4838(define lazy-bytes-peek?
4839  (|#%name|
4840   lazy-bytes-peek?
4841   (lambda (s)
4842     (if (lazy-bytes?_2654 s)
4843       (lazy-bytes-peek?_2174 s)
4844       ($value
4845        (impersonate-ref
4846         lazy-bytes-peek?_2174
4847         struct:lazy-bytes
4848         5
4849         s
4850         'lazy-bytes
4851         'peek?))))))
4852(define lazy-bytes-immediate-only?_2496
4853  (|#%name| lazy-bytes-immediate-only? (record-accessor struct:lazy-bytes 6)))
4854(define lazy-bytes-immediate-only?
4855  (|#%name|
4856   lazy-bytes-immediate-only?
4857   (lambda (s)
4858     (if (lazy-bytes?_2654 s)
4859       (lazy-bytes-immediate-only?_2496 s)
4860       ($value
4861        (impersonate-ref
4862         lazy-bytes-immediate-only?_2496
4863         struct:lazy-bytes
4864         6
4865         s
4866         'lazy-bytes
4867         'immediate-only?))))))
4868(define lazy-bytes-progress-evt_2923
4869  (|#%name| lazy-bytes-progress-evt (record-accessor struct:lazy-bytes 7)))
4870(define lazy-bytes-progress-evt
4871  (|#%name|
4872   lazy-bytes-progress-evt
4873   (lambda (s)
4874     (if (lazy-bytes?_2654 s)
4875       (lazy-bytes-progress-evt_2923 s)
4876       ($value
4877        (impersonate-ref
4878         lazy-bytes-progress-evt_2923
4879         struct:lazy-bytes
4880         7
4881         s
4882         'lazy-bytes
4883         'progress-evt))))))
4884(define lazy-bytes-out_2340
4885  (|#%name| lazy-bytes-out (record-accessor struct:lazy-bytes 8)))
4886(define lazy-bytes-out
4887  (|#%name|
4888   lazy-bytes-out
4889   (lambda (s)
4890     (if (lazy-bytes?_2654 s)
4891       (lazy-bytes-out_2340 s)
4892       ($value
4893        (impersonate-ref
4894         lazy-bytes-out_2340
4895         struct:lazy-bytes
4896         8
4897         s
4898         'lazy-bytes
4899         'out))))))
4900(define lazy-bytes-max-lookbehind_2217
4901  (|#%name| lazy-bytes-max-lookbehind (record-accessor struct:lazy-bytes 9)))
4902(define lazy-bytes-max-lookbehind
4903  (|#%name|
4904   lazy-bytes-max-lookbehind
4905   (lambda (s)
4906     (if (lazy-bytes?_2654 s)
4907       (lazy-bytes-max-lookbehind_2217 s)
4908       ($value
4909        (impersonate-ref
4910         lazy-bytes-max-lookbehind_2217
4911         struct:lazy-bytes
4912         9
4913         s
4914         'lazy-bytes
4915         'max-lookbehind))))))
4916(define lazy-bytes-failed?_2073
4917  (|#%name| lazy-bytes-failed? (record-accessor struct:lazy-bytes 10)))
4918(define lazy-bytes-failed?
4919  (|#%name|
4920   lazy-bytes-failed?
4921   (lambda (s)
4922     (if (lazy-bytes?_2654 s)
4923       (lazy-bytes-failed?_2073 s)
4924       ($value
4925        (impersonate-ref
4926         lazy-bytes-failed?_2073
4927         struct:lazy-bytes
4928         10
4929         s
4930         'lazy-bytes
4931         'failed?))))))
4932(define lazy-bytes-discarded-count_3290
4933  (|#%name| lazy-bytes-discarded-count (record-accessor struct:lazy-bytes 11)))
4934(define lazy-bytes-discarded-count
4935  (|#%name|
4936   lazy-bytes-discarded-count
4937   (lambda (s)
4938     (if (lazy-bytes?_2654 s)
4939       (lazy-bytes-discarded-count_3290 s)
4940       ($value
4941        (impersonate-ref
4942         lazy-bytes-discarded-count_3290
4943         struct:lazy-bytes
4944         11
4945         s
4946         'lazy-bytes
4947         'discarded-count))))))
4948(define lazy-bytes-max-peek_2492
4949  (|#%name| lazy-bytes-max-peek (record-accessor struct:lazy-bytes 12)))
4950(define lazy-bytes-max-peek
4951  (|#%name|
4952   lazy-bytes-max-peek
4953   (lambda (s)
4954     (if (lazy-bytes?_2654 s)
4955       (lazy-bytes-max-peek_2492 s)
4956       ($value
4957        (impersonate-ref
4958         lazy-bytes-max-peek_2492
4959         struct:lazy-bytes
4960         12
4961         s
4962         'lazy-bytes
4963         'max-peek))))))
4964(define set-lazy-bytes-bstr!_2695
4965  (|#%name| set-lazy-bytes-bstr! (record-mutator struct:lazy-bytes 0)))
4966(define set-lazy-bytes-bstr!
4967  (|#%name|
4968   set-lazy-bytes-bstr!
4969   (lambda (s v)
4970     (if (lazy-bytes?_2654 s)
4971       (set-lazy-bytes-bstr!_2695 s v)
4972       ($value
4973        (impersonate-set!
4974         set-lazy-bytes-bstr!_2695
4975         struct:lazy-bytes
4976         0
4977         0
4978         s
4979         v
4980         'lazy-bytes
4981         'bstr))))))
4982(define set-lazy-bytes-end!_2897
4983  (|#%name| set-lazy-bytes-end! (record-mutator struct:lazy-bytes 1)))
4984(define set-lazy-bytes-end!
4985  (|#%name|
4986   set-lazy-bytes-end!
4987   (lambda (s v)
4988     (if (lazy-bytes?_2654 s)
4989       (set-lazy-bytes-end!_2897 s v)
4990       ($value
4991        (impersonate-set!
4992         set-lazy-bytes-end!_2897
4993         struct:lazy-bytes
4994         1
4995         1
4996         s
4997         v
4998         'lazy-bytes
4999         'end))))))
5000(define set-lazy-bytes-failed?!_2421
5001  (|#%name| set-lazy-bytes-failed?! (record-mutator struct:lazy-bytes 10)))
5002(define set-lazy-bytes-failed?!
5003  (|#%name|
5004   set-lazy-bytes-failed?!
5005   (lambda (s v)
5006     (if (lazy-bytes?_2654 s)
5007       (set-lazy-bytes-failed?!_2421 s v)
5008       ($value
5009        (impersonate-set!
5010         set-lazy-bytes-failed?!_2421
5011         struct:lazy-bytes
5012         10
5013         10
5014         s
5015         v
5016         'lazy-bytes
5017         'failed?))))))
5018(define set-lazy-bytes-discarded-count!_2738
5019  (|#%name|
5020   set-lazy-bytes-discarded-count!
5021   (record-mutator struct:lazy-bytes 11)))
5022(define set-lazy-bytes-discarded-count!
5023  (|#%name|
5024   set-lazy-bytes-discarded-count!
5025   (lambda (s v)
5026     (if (lazy-bytes?_2654 s)
5027       (set-lazy-bytes-discarded-count!_2738 s v)
5028       ($value
5029        (impersonate-set!
5030         set-lazy-bytes-discarded-count!_2738
5031         struct:lazy-bytes
5032         11
5033         11
5034         s
5035         v
5036         'lazy-bytes
5037         'discarded-count))))))
5038(define make-lazy-bytes
5039  (lambda (in_0
5040           skip-amt_0
5041           prefix_0
5042           peek?_0
5043           immediate-only?_0
5044           progress-evt_0
5045           out_0
5046           max-lookbehind_0
5047           max-peek_0)
5048    (let ((len_0 (unsafe-bytes-length prefix_0)))
5049      (lazy-bytes1.1
5050       prefix_0
5051       len_0
5052       in_0
5053       skip-amt_0
5054       len_0
5055       peek?_0
5056       immediate-only?_0
5057       progress-evt_0
5058       out_0
5059       max-lookbehind_0
5060       #f
5061       0
5062       max-peek_0))))
5063(define lazy-bytes-before-end?
5064  (lambda (s_0 pos_0 end_0)
5065    (if (let ((or-part_0 (not (exact-integer? end_0))))
5066          (if or-part_0 or-part_0 (< pos_0 end_0)))
5067      (if (< pos_0 (lazy-bytes-end s_0))
5068        #t
5069        (if (get-more-bytes! s_0) (lazy-bytes-before-end? s_0 pos_0 end_0) #f))
5070      #f)))
5071(define lazy-bytes-ref
5072  (lambda (s_0 pos_0)
5073    (let ((app_0 (lazy-bytes-bstr s_0)))
5074      (unsafe-bytes-ref app_0 (- pos_0 (lazy-bytes-discarded-count s_0))))))
5075(define lazy-bytes-advance!
5076  (lambda (s_0 given-pos_0 force?_0)
5077    (begin
5078      (if force?_0 (lazy-bytes-before-end? s_0 given-pos_0 'eof) (void))
5079      (let ((pos_0 (min given-pos_0 (lazy-bytes-end s_0))))
5080        (if (if (lazy-bytes? s_0) (not (lazy-bytes-peek? s_0)) #f)
5081          (let ((discarded-count_0 (lazy-bytes-discarded-count s_0)))
5082            (let ((unneeded_0
5083                   (let ((app_0 pos_0))
5084                     (-
5085                      app_0
5086                      discarded-count_0
5087                      (lazy-bytes-max-lookbehind s_0)))))
5088              (if (if force?_0 force?_0 (> unneeded_0 4096))
5089                (let ((amt_0
5090                       (if force?_0
5091                         (let ((app_0 pos_0))
5092                           (- app_0 (lazy-bytes-discarded-count s_0)))
5093                         4096)))
5094                  (let ((bstr_0 (lazy-bytes-bstr s_0)))
5095                    (let ((out_0 (lazy-bytes-out s_0)))
5096                      (begin
5097                        (if out_0
5098                          (let ((prefix-len_0 (lazy-bytes-prefix-len s_0)))
5099                            (write-bytes
5100                             bstr_0
5101                             out_0
5102                             (if (> discarded-count_0 prefix-len_0)
5103                               0
5104                               (min amt_0 (- prefix-len_0 discarded-count_0)))
5105                             amt_0))
5106                          (void))
5107                        (let ((copy-end_0
5108                               (- (lazy-bytes-end s_0) discarded-count_0)))
5109                          (begin
5110                            (if (= amt_0 copy-end_0)
5111                              (void)
5112                              (unsafe-bytes-copy!
5113                               bstr_0
5114                               0
5115                               bstr_0
5116                               amt_0
5117                               copy-end_0))
5118                            (set-lazy-bytes-discarded-count!
5119                             s_0
5120                             (+ amt_0 discarded-count_0))))))))
5121                (void))))
5122          (void))))))
5123(define get-more-bytes!
5124  (lambda (s_0)
5125    (if (lazy-bytes? s_0)
5126      (let ((discarded-count_0 (lazy-bytes-discarded-count s_0)))
5127        (let ((len_0 (- (lazy-bytes-end s_0) discarded-count_0)))
5128          (let ((bstr_0 (lazy-bytes-bstr s_0)))
5129            (if (lazy-bytes-failed? s_0)
5130              #f
5131              (if (< len_0 (unsafe-bytes-length bstr_0))
5132                (let ((n_0
5133                       (let ((app_0
5134                              (if (lazy-bytes-immediate-only? s_0)
5135                                peek-bytes-avail!*
5136                                peek-bytes-avail!)))
5137                         (let ((app_1
5138                                (let ((app_1
5139                                       (- len_0 (lazy-bytes-prefix-len s_0))))
5140                                  (+
5141                                   app_1
5142                                   (lazy-bytes-skip-amt s_0)
5143                                   discarded-count_0))))
5144                           (let ((app_2 (lazy-bytes-progress-evt s_0)))
5145                             (|#%app|
5146                              app_0
5147                              bstr_0
5148                              app_1
5149                              app_2
5150                              (lazy-bytes-in s_0)
5151                              len_0))))))
5152                  (if (eof-object? n_0)
5153                    #f
5154                    (if (not (fixnum? n_0))
5155                      (raise-arguments-error
5156                       'regexp-match
5157                       "non-character in an unsupported context"
5158                       "port"
5159                       (lazy-bytes-in s_0))
5160                      (if (zero? n_0)
5161                        (begin (set-lazy-bytes-failed?! s_0 #t) #f)
5162                        (begin
5163                          (set-lazy-bytes-end!
5164                           s_0
5165                           (+ n_0 len_0 discarded-count_0))
5166                          #t)))))
5167                (let ((max-peek_0 (lazy-bytes-max-peek s_0)))
5168                  (let ((prefix-len_0
5169                         (if max-peek_0 (lazy-bytes-prefix-len s_0) #f)))
5170                    (if (if max-peek_0
5171                          (>=
5172                           len_0
5173                           (- (+ max-peek_0 prefix-len_0) discarded-count_0))
5174                          #f)
5175                      #f
5176                      (let ((bstr2_0
5177                             (make-bytes
5178                              (let ((sz_0
5179                                     (max
5180                                      32
5181                                      (* 2 (unsafe-bytes-length bstr_0)))))
5182                                (if max-peek_0
5183                                  (min
5184                                   sz_0
5185                                   (-
5186                                    (+ prefix-len_0 max-peek_0)
5187                                    discarded-count_0))
5188                                  sz_0)))))
5189                        (begin
5190                          (unsafe-bytes-copy! bstr2_0 0 bstr_0 0 len_0)
5191                          (set-lazy-bytes-bstr! s_0 bstr2_0)
5192                          (get-more-bytes! s_0)))))))))))
5193      #f)))
5194(define bytes->char/utf-8
5195  (lambda (last-b_0 accum_0)
5196    (if (< last-b_0 128)
5197      (if (null? accum_0) (integer->char last-b_0) 'fail)
5198      (if (continue-byte? last-b_0)
5199        (if (null? accum_0)
5200          'fail
5201          (if (two-byte-prefix? (car accum_0))
5202            (integer->char*
5203             128
5204             (let ((app_0 (arithmetic-shift (bitwise-and 31 (car accum_0)) 6)))
5205               (+ app_0 (begin-unsafe (bitwise-and last-b_0 63)))))
5206            (if (three-byte-prefix? (car accum_0))
5207              'continue
5208              (if (four-byte-prefix? (car accum_0))
5209                'continue
5210                (if (if (pair? (cdr accum_0))
5211                      (three-byte-prefix? (cadr accum_0))
5212                      #f)
5213                  (integer->char*
5214                   2048
5215                   (let ((app_0
5216                          (arithmetic-shift
5217                           (bitwise-and 15 (cadr accum_0))
5218                           12)))
5219                     (let ((app_1
5220                            (arithmetic-shift
5221                             (let ((b_0 (car accum_0)))
5222                               (begin-unsafe (bitwise-and b_0 63)))
5223                             6)))
5224                       (+
5225                        app_0
5226                        app_1
5227                        (begin-unsafe (bitwise-and last-b_0 63))))))
5228                  (if (if (pair? (cdr accum_0))
5229                        (four-byte-prefix? (cadr accum_0))
5230                        #f)
5231                    'continue
5232                    (if (if (pair? (cdr accum_0))
5233                          (if (pair? (cddr accum_0))
5234                            (four-byte-prefix? (caddr accum_0))
5235                            #f)
5236                          #f)
5237                      (integer->char*
5238                       65536
5239                       (let ((app_0
5240                              (arithmetic-shift
5241                               (bitwise-and 15 (caddr accum_0))
5242                               18)))
5243                         (let ((app_1
5244                                (arithmetic-shift
5245                                 (let ((b_0 (cadr accum_0)))
5246                                   (begin-unsafe (bitwise-and b_0 63)))
5247                                 12)))
5248                           (let ((app_2
5249                                  (arithmetic-shift
5250                                   (let ((b_0 (car accum_0)))
5251                                     (begin-unsafe (bitwise-and b_0 63)))
5252                                   6)))
5253                             (+
5254                              app_0
5255                              app_1
5256                              app_2
5257                              (begin-unsafe (bitwise-and last-b_0 63)))))))
5258                      'fail)))))))
5259        (if (if (let ((or-part_0 (two-byte-prefix? last-b_0)))
5260                  (if or-part_0
5261                    or-part_0
5262                    (let ((or-part_1 (three-byte-prefix? last-b_0)))
5263                      (if or-part_1 or-part_1 (four-byte-prefix? last-b_0)))))
5264              (null? accum_0)
5265              #f)
5266          'continue
5267          'fail)))))
5268(define integer->char*
5269  (lambda (lower-bound_0 n_0)
5270    (if (let ((or-part_0 (< n_0 lower-bound_0)))
5271          (if or-part_0
5272            or-part_0
5273            (let ((or-part_1 (> n_0 1114111)))
5274              (if or-part_1 or-part_1 (if (>= n_0 55296) (<= n_0 57343) #f)))))
5275      'fail
5276      (integer->char n_0))))
5277(define continue-byte? (lambda (b_0) (= (bitwise-and b_0 192) 128)))
5278(define continue-value (lambda (b_0) (bitwise-and b_0 63)))
5279(define two-byte-prefix? (lambda (b_0) (= (bitwise-and b_0 224) 192)))
5280(define three-byte-prefix? (lambda (b_0) (= (bitwise-and b_0 240) 224)))
5281(define four-byte-prefix? (lambda (b_0) (= (bitwise-and b_0 248) 240)))
5282(define done-m
5283  (lambda (s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0) pos_0))
5284(define continue-m
5285  (lambda (s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
5286    (|#%app| (car stack_0) pos_0)))
5287(define limit-m
5288  (lambda (s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0) (= pos_0 limit_0)))
5289(define byte-matcher
5290  (lambda (b_0 next-m_0)
5291    (lambda (s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
5292      (if (if (bytes? s_0)
5293            (if (< pos_0 limit_0) (= b_0 (unsafe-bytes-ref s_0 pos_0)) #f)
5294            (if (lazy-bytes-before-end? s_0 pos_0 limit_0)
5295              (= b_0 (lazy-bytes-ref s_0 pos_0))
5296              #f))
5297        (|#%app|
5298         next-m_0
5299         s_0
5300         (add1 pos_0)
5301         start_0
5302         limit_0
5303         end_0
5304         state_0
5305         stack_0)
5306        #f))))
5307(define byte-tail-matcher
5308  (lambda (b_0)
5309    (lambda (s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
5310      (if (if (bytes? s_0)
5311            (if (< pos_0 limit_0) (= b_0 (unsafe-bytes-ref s_0 pos_0)) #f)
5312            (if (lazy-bytes-before-end? s_0 pos_0 limit_0)
5313              (= b_0 (lazy-bytes-ref s_0 pos_0))
5314              #f))
5315        (add1 pos_0)
5316        #f))))
5317(define byte-matcher*
5318  (lambda (b_0 max_0)
5319    (lambda (s_0 pos_0 start_0 limit_0 end_0 state_0)
5320      (if (bytes? s_0)
5321        (let ((limit_1 (if max_0 (min limit_0 (+ pos_0 (* 1 max_0))) limit_0)))
5322          (letrec*
5323           ((loop_0
5324             (|#%name|
5325              loop
5326              (lambda (pos_1 n_0)
5327                (begin
5328                  (let ((pos3_0 (+ pos_1 1)))
5329                    (if (let ((or-part_0 (> pos3_0 limit_1)))
5330                          (if or-part_0
5331                            or-part_0
5332                            (not (= b_0 (unsafe-bytes-ref s_0 pos_1)))))
5333                      (values pos_1 n_0 1)
5334                      (loop_0 pos3_0 (add1 n_0)))))))))
5335           (loop_0 pos_0 0)))
5336        (let ((limit_1 (if max_0 (+ pos_0 (* 1 max_0)) #f)))
5337          (letrec*
5338           ((loop_0
5339             (|#%name|
5340              loop
5341              (lambda (pos_1 n_0)
5342                (begin
5343                  (if (let ((or-part_0
5344                             (if limit_1 (> (+ pos_1 1) limit_1) #f)))
5345                        (if or-part_0
5346                          or-part_0
5347                          (let ((or-part_1
5348                                 (not
5349                                  (lazy-bytes-before-end? s_0 pos_1 limit_1))))
5350                            (if or-part_1
5351                              or-part_1
5352                              (not (= b_0 (lazy-bytes-ref s_0 pos_1)))))))
5353                    (values pos_1 n_0 1)
5354                    (let ((app_0 (+ pos_1 1))) (loop_0 app_0 (add1 n_0)))))))))
5355           (loop_0 pos_0 0)))))))
5356(define bytes-matcher
5357  (lambda (bstr_0 len_0 next-m_0)
5358    (lambda (s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
5359      (if (if (bytes? s_0)
5360            (if (<= (+ pos_0 len_0) limit_0)
5361              (call-with-values
5362               (lambda ()
5363                 (unsafe-normalise-inputs
5364                  unsafe-bytes-length
5365                  bstr_0
5366                  0
5367                  len_0
5368                  1))
5369               (case-lambda
5370                ((v*_0 start*_0 stop*_0 step*_0)
5371                 (call-with-values
5372                  (lambda ()
5373                    (unsafe-normalise-inputs
5374                     unsafe-bytes-length
5375                     s_0
5376                     pos_0
5377                     (+ pos_0 len_0)
5378                     1))
5379                  (case-lambda
5380                   ((v*_1 start*_1 stop*_1 step*_1)
5381                    (let ((v*_2 v*_0)
5382                          (start*_2 start*_0)
5383                          (stop*_2 stop*_0)
5384                          (step*_2 step*_0))
5385                      (begin
5386                        #t
5387                        #t
5388                        (letrec*
5389                         ((for-loop_0
5390                           (|#%name|
5391                            for-loop
5392                            (lambda (result_0 idx_0 idx_1)
5393                              (begin
5394                                (if (if (unsafe-fx< idx_0 stop*_2)
5395                                      (unsafe-fx< idx_1 stop*_1)
5396                                      #f)
5397                                  (let ((c1_0 (unsafe-bytes-ref v*_2 idx_0)))
5398                                    (let ((c2_0 (unsafe-bytes-ref v*_1 idx_1)))
5399                                      (let ((c1_1 c1_0))
5400                                        (let ((result_1
5401                                               (let ((result_1 (= c1_1 c2_0)))
5402                                                 (values result_1))))
5403                                          (if (if (not
5404                                                   (let ((x_0 (list c1_1)))
5405                                                     (not result_1)))
5406                                                (if (not
5407                                                     (let ((x_0 (list c2_0)))
5408                                                       (not result_1)))
5409                                                  #t
5410                                                  #f)
5411                                                #f)
5412                                            (for-loop_0
5413                                             result_1
5414                                             (unsafe-fx+ idx_0 1)
5415                                             (unsafe-fx+ idx_1 1))
5416                                            result_1)))))
5417                                  result_0))))))
5418                         (for-loop_0 #t start*_2 start*_1)))))
5419                   (args (raise-binding-result-arity-error 4 args)))))
5420                (args (raise-binding-result-arity-error 4 args))))
5421              #f)
5422            (call-with-values
5423             (lambda ()
5424               (unsafe-normalise-inputs unsafe-bytes-length bstr_0 0 len_0 1))
5425             (case-lambda
5426              ((v*_0 start*_0 stop*_0 step*_0)
5427               (let ((start_1 pos_0))
5428                 (let ((v*_1 v*_0)
5429                       (start*_1 start*_0)
5430                       (stop*_1 stop*_0)
5431                       (step*_1 step*_0))
5432                   (begin
5433                     #t
5434                     (void)
5435                     (letrec*
5436                      ((for-loop_0
5437                        (|#%name|
5438                         for-loop
5439                         (lambda (result_0 idx_0 pos_1)
5440                           (begin
5441                             (if (if (unsafe-fx< idx_0 stop*_1) #t #f)
5442                               (let ((c1_0 (unsafe-bytes-ref v*_1 idx_0)))
5443                                 (let ((result_1
5444                                        (let ((result_1
5445                                               (if (lazy-bytes-before-end?
5446                                                    s_0
5447                                                    pos_1
5448                                                    limit_0)
5449                                                 (let ((c2_0
5450                                                        (lazy-bytes-ref
5451                                                         s_0
5452                                                         pos_1)))
5453                                                   (= c1_0 c2_0))
5454                                                 #f)))
5455                                          (values result_1))))
5456                                   (if (if (not
5457                                            (let ((x_0 (list c1_0)))
5458                                              (not result_1)))
5459                                         (if (not
5460                                              (let ((x_0 (list pos_1)))
5461                                                (not result_1)))
5462                                           #t
5463                                           #f)
5464                                         #f)
5465                                     (for-loop_0
5466                                      result_1
5467                                      (unsafe-fx+ idx_0 1)
5468                                      (+ pos_1 1))
5469                                     result_1)))
5470                               result_0))))))
5471                      (for-loop_0 #t start*_1 start_1))))))
5472              (args (raise-binding-result-arity-error 4 args)))))
5473        (|#%app|
5474         next-m_0
5475         s_0
5476         (+ pos_0 len_0)
5477         start_0
5478         limit_0
5479         end_0
5480         state_0
5481         stack_0)
5482        #f))))
5483(define bytes-tail-matcher
5484  (lambda (bstr_0 len_0)
5485    (lambda (s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
5486      (if (if (bytes? s_0)
5487            (if (<= (+ pos_0 len_0) limit_0)
5488              (call-with-values
5489               (lambda ()
5490                 (unsafe-normalise-inputs
5491                  unsafe-bytes-length
5492                  bstr_0
5493                  0
5494                  len_0
5495                  1))
5496               (case-lambda
5497                ((v*_0 start*_0 stop*_0 step*_0)
5498                 (call-with-values
5499                  (lambda ()
5500                    (unsafe-normalise-inputs
5501                     unsafe-bytes-length
5502                     s_0
5503                     pos_0
5504                     (+ pos_0 len_0)
5505                     1))
5506                  (case-lambda
5507                   ((v*_1 start*_1 stop*_1 step*_1)
5508                    (let ((v*_2 v*_0)
5509                          (start*_2 start*_0)
5510                          (stop*_2 stop*_0)
5511                          (step*_2 step*_0))
5512                      (begin
5513                        #t
5514                        #t
5515                        (letrec*
5516                         ((for-loop_0
5517                           (|#%name|
5518                            for-loop
5519                            (lambda (result_0 idx_0 idx_1)
5520                              (begin
5521                                (if (if (unsafe-fx< idx_0 stop*_2)
5522                                      (unsafe-fx< idx_1 stop*_1)
5523                                      #f)
5524                                  (let ((c1_0 (unsafe-bytes-ref v*_2 idx_0)))
5525                                    (let ((c2_0 (unsafe-bytes-ref v*_1 idx_1)))
5526                                      (let ((c1_1 c1_0))
5527                                        (let ((result_1
5528                                               (let ((result_1 (= c1_1 c2_0)))
5529                                                 (values result_1))))
5530                                          (if (if (not
5531                                                   (let ((x_0 (list c1_1)))
5532                                                     (not result_1)))
5533                                                (if (not
5534                                                     (let ((x_0 (list c2_0)))
5535                                                       (not result_1)))
5536                                                  #t
5537                                                  #f)
5538                                                #f)
5539                                            (for-loop_0
5540                                             result_1
5541                                             (unsafe-fx+ idx_0 1)
5542                                             (unsafe-fx+ idx_1 1))
5543                                            result_1)))))
5544                                  result_0))))))
5545                         (for-loop_0 #t start*_2 start*_1)))))
5546                   (args (raise-binding-result-arity-error 4 args)))))
5547                (args (raise-binding-result-arity-error 4 args))))
5548              #f)
5549            (call-with-values
5550             (lambda ()
5551               (unsafe-normalise-inputs unsafe-bytes-length bstr_0 0 len_0 1))
5552             (case-lambda
5553              ((v*_0 start*_0 stop*_0 step*_0)
5554               (let ((start_1 pos_0))
5555                 (let ((v*_1 v*_0)
5556                       (start*_1 start*_0)
5557                       (stop*_1 stop*_0)
5558                       (step*_1 step*_0))
5559                   (begin
5560                     #t
5561                     (void)
5562                     (letrec*
5563                      ((for-loop_0
5564                        (|#%name|
5565                         for-loop
5566                         (lambda (result_0 idx_0 pos_1)
5567                           (begin
5568                             (if (if (unsafe-fx< idx_0 stop*_1) #t #f)
5569                               (let ((c1_0 (unsafe-bytes-ref v*_1 idx_0)))
5570                                 (let ((result_1
5571                                        (let ((result_1
5572                                               (if (lazy-bytes-before-end?
5573                                                    s_0
5574                                                    pos_1
5575                                                    limit_0)
5576                                                 (let ((c2_0
5577                                                        (lazy-bytes-ref
5578                                                         s_0
5579                                                         pos_1)))
5580                                                   (= c1_0 c2_0))
5581                                                 #f)))
5582                                          (values result_1))))
5583                                   (if (if (not
5584                                            (let ((x_0 (list c1_0)))
5585                                              (not result_1)))
5586                                         (if (not
5587                                              (let ((x_0 (list pos_1)))
5588                                                (not result_1)))
5589                                           #t
5590                                           #f)
5591                                         #f)
5592                                     (for-loop_0
5593                                      result_1
5594                                      (unsafe-fx+ idx_0 1)
5595                                      (+ pos_1 1))
5596                                     result_1)))
5597                               result_0))))))
5598                      (for-loop_0 #t start*_1 start_1))))))
5599              (args (raise-binding-result-arity-error 4 args)))))
5600        (+ pos_0 len_0)
5601        #f))))
5602(define bytes-matcher*
5603  (lambda (bstr_0 max_0)
5604    (let ((len_0 (unsafe-bytes-length bstr_0)))
5605      (lambda (s_0 pos_0 start_0 limit_0 end_0 state_0)
5606        (if (bytes? s_0)
5607          (let ((limit_1
5608                 (if max_0 (min limit_0 (+ pos_0 (* len_0 max_0))) limit_0)))
5609            (letrec*
5610             ((loop_0
5611               (|#%name|
5612                loop
5613                (lambda (pos_1 n_0)
5614                  (begin
5615                    (let ((pos3_0 (+ pos_1 len_0)))
5616                      (if (let ((or-part_0 (> pos3_0 limit_1)))
5617                            (if or-part_0
5618                              or-part_0
5619                              (not
5620                               (call-with-values
5621                                (lambda ()
5622                                  (unsafe-normalise-inputs
5623                                   unsafe-bytes-length
5624                                   bstr_0
5625                                   0
5626                                   len_0
5627                                   1))
5628                                (case-lambda
5629                                 ((v*_0 start*_0 stop*_0 step*_0)
5630                                  (call-with-values
5631                                   (lambda ()
5632                                     (unsafe-normalise-inputs
5633                                      unsafe-bytes-length
5634                                      s_0
5635                                      pos_1
5636                                      (+ pos_1 len_0)
5637                                      1))
5638                                   (case-lambda
5639                                    ((v*_1 start*_1 stop*_1 step*_1)
5640                                     (let ((v*_2 v*_0)
5641                                           (start*_2 start*_0)
5642                                           (stop*_2 stop*_0)
5643                                           (step*_2 step*_0))
5644                                       (begin
5645                                         #t
5646                                         #t
5647                                         (letrec*
5648                                          ((for-loop_0
5649                                            (|#%name|
5650                                             for-loop
5651                                             (lambda (result_0 idx_0 idx_1)
5652                                               (begin
5653                                                 (if (if (unsafe-fx<
5654                                                          idx_0
5655                                                          stop*_2)
5656                                                       (unsafe-fx<
5657                                                        idx_1
5658                                                        stop*_1)
5659                                                       #f)
5660                                                   (let ((c1_0
5661                                                          (unsafe-bytes-ref
5662                                                           v*_2
5663                                                           idx_0)))
5664                                                     (let ((c2_0
5665                                                            (unsafe-bytes-ref
5666                                                             v*_1
5667                                                             idx_1)))
5668                                                       (let ((c1_1 c1_0))
5669                                                         (let ((result_1
5670                                                                (let ((result_1
5671                                                                       (=
5672                                                                        c1_1
5673                                                                        c2_0)))
5674                                                                  (values
5675                                                                   result_1))))
5676                                                           (if (if (not
5677                                                                    (let ((x_0
5678                                                                           (list
5679                                                                            c1_1)))
5680                                                                      (not
5681                                                                       result_1)))
5682                                                                 (if (not
5683                                                                      (let ((x_0
5684                                                                             (list
5685                                                                              c2_0)))
5686                                                                        (not
5687                                                                         result_1)))
5688                                                                   #t
5689                                                                   #f)
5690                                                                 #f)
5691                                                             (for-loop_0
5692                                                              result_1
5693                                                              (unsafe-fx+
5694                                                               idx_0
5695                                                               1)
5696                                                              (unsafe-fx+
5697                                                               idx_1
5698                                                               1))
5699                                                             result_1)))))
5700                                                   result_0))))))
5701                                          (for-loop_0 #t start*_2 start*_1)))))
5702                                    (args
5703                                     (raise-binding-result-arity-error
5704                                      4
5705                                      args)))))
5706                                 (args
5707                                  (raise-binding-result-arity-error
5708                                   4
5709                                   args)))))))
5710                        (values pos_1 n_0 len_0)
5711                        (loop_0 pos3_0 (add1 n_0)))))))))
5712             (loop_0 pos_0 0)))
5713          (let ((limit_1 (if max_0 (+ pos_0 (* len_0 max_0)) #f)))
5714            (letrec*
5715             ((loop_0
5716               (|#%name|
5717                loop
5718                (lambda (pos_1 n_0)
5719                  (begin
5720                    (if (let ((or-part_0
5721                               (if limit_1 (> (+ pos_1 len_0) limit_1) #f)))
5722                          (if or-part_0
5723                            or-part_0
5724                            (let ((or-part_1
5725                                   (not
5726                                    (lazy-bytes-before-end?
5727                                     s_0
5728                                     pos_1
5729                                     limit_1))))
5730                              (if or-part_1
5731                                or-part_1
5732                                (not
5733                                 (call-with-values
5734                                  (lambda ()
5735                                    (unsafe-normalise-inputs
5736                                     unsafe-bytes-length
5737                                     bstr_0
5738                                     0
5739                                     len_0
5740                                     1))
5741                                  (case-lambda
5742                                   ((v*_0 start*_0 stop*_0 step*_0)
5743                                    (let ((start_1 pos_1))
5744                                      (let ((v*_1 v*_0)
5745                                            (start*_1 start*_0)
5746                                            (stop*_1 stop*_0)
5747                                            (step*_1 step*_0))
5748                                        (begin
5749                                          #t
5750                                          (void)
5751                                          (letrec*
5752                                           ((for-loop_0
5753                                             (|#%name|
5754                                              for-loop
5755                                              (lambda (result_0 idx_0 pos_2)
5756                                                (begin
5757                                                  (if (if (unsafe-fx<
5758                                                           idx_0
5759                                                           stop*_1)
5760                                                        #t
5761                                                        #f)
5762                                                    (let ((c1_0
5763                                                           (unsafe-bytes-ref
5764                                                            v*_1
5765                                                            idx_0)))
5766                                                      (let ((result_1
5767                                                             (let ((result_1
5768                                                                    (if (lazy-bytes-before-end?
5769                                                                         s_0
5770                                                                         pos_2
5771                                                                         limit_1)
5772                                                                      (let ((c2_0
5773                                                                             (lazy-bytes-ref
5774                                                                              s_0
5775                                                                              pos_2)))
5776                                                                        (=
5777                                                                         c1_0
5778                                                                         c2_0))
5779                                                                      #f)))
5780                                                               (values
5781                                                                result_1))))
5782                                                        (if (if (not
5783                                                                 (let ((x_0
5784                                                                        (list
5785                                                                         c1_0)))
5786                                                                   (not
5787                                                                    result_1)))
5788                                                              (if (not
5789                                                                   (let ((x_0
5790                                                                          (list
5791                                                                           pos_2)))
5792                                                                     (not
5793                                                                      result_1)))
5794                                                                #t
5795                                                                #f)
5796                                                              #f)
5797                                                          (for-loop_0
5798                                                           result_1
5799                                                           (unsafe-fx+ idx_0 1)
5800                                                           (+ pos_2 1))
5801                                                          result_1)))
5802                                                    result_0))))))
5803                                           (for-loop_0
5804                                            #t
5805                                            start*_1
5806                                            start_1))))))
5807                                   (args
5808                                    (raise-binding-result-arity-error
5809                                     4
5810                                     args)))))))))
5811                      (values pos_1 n_0 len_0)
5812                      (let ((app_0 (+ pos_1 len_0)))
5813                        (loop_0 app_0 (add1 n_0)))))))))
5814             (loop_0 pos_0 0))))))))
5815(define never-matcher
5816  (lambda () (lambda (s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0) #f)))
5817(define any-matcher
5818  (lambda (next-m_0)
5819    (lambda (s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
5820      (if (if (bytes? s_0)
5821            (< pos_0 limit_0)
5822            (lazy-bytes-before-end? s_0 pos_0 limit_0))
5823        (|#%app|
5824         next-m_0
5825         s_0
5826         (add1 pos_0)
5827         start_0
5828         limit_0
5829         end_0
5830         state_0
5831         stack_0)
5832        #f))))
5833(define any-tail-matcher
5834  (lambda ()
5835    (lambda (s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
5836      (if (if (bytes? s_0)
5837            (< pos_0 limit_0)
5838            (lazy-bytes-before-end? s_0 pos_0 limit_0))
5839        (add1 pos_0)
5840        #f))))
5841(define any-matcher*
5842  (lambda (max-repeat_0)
5843    (lambda (s_0 pos_0 start_0 limit_0 end_0 state_0)
5844      (if (bytes? s_0)
5845        (let ((n_0
5846               (if max-repeat_0
5847                 (min max-repeat_0 (- limit_0 pos_0))
5848                 (- limit_0 pos_0))))
5849          (values (+ pos_0 n_0) n_0 1))
5850        (letrec*
5851         ((grow-loop_0
5852           (|#%name|
5853            grow-loop
5854            (lambda (size_0)
5855              (begin
5856                (let ((n_0 (if max-repeat_0 (min size_0 max-repeat_0) size_0)))
5857                  (let ((pos2_0 (+ pos_0 n_0)))
5858                    (if (if (lazy-bytes-before-end? s_0 (sub1 pos2_0) limit_0)
5859                          (let ((or-part_0 (not max-repeat_0)))
5860                            (if or-part_0 or-part_0 (< n_0 max-repeat_0)))
5861                          #f)
5862                      (grow-loop_0 (* size_0 2))
5863                      (letrec*
5864                       ((search-loop_0
5865                         (|#%name|
5866                          search-loop
5867                          (lambda (min_0 too-high_0)
5868                            (begin
5869                              (let ((mid_0 (quotient (+ min_0 too-high_0) 2)))
5870                                (if (= mid_0 min_0)
5871                                  (values mid_0 (- mid_0 pos_0) 1)
5872                                  (if (lazy-bytes-before-end?
5873                                       s_0
5874                                       (sub1 mid_0)
5875                                       limit_0)
5876                                    (search-loop_0 mid_0 too-high_0)
5877                                    (search-loop_0 min_0 mid_0)))))))))
5878                       (search-loop_0 pos_0 (add1 pos2_0)))))))))))
5879         (grow-loop_0 1))))))
5880(define range-matcher
5881  (lambda (rng_0 next-m_0)
5882    (lambda (s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
5883      (if (if (bytes? s_0)
5884            (if (< pos_0 limit_0)
5885              (let ((v_0 (unsafe-bytes-ref s_0 pos_0)))
5886                (begin-unsafe (eq? 1 (unsafe-bytes-ref rng_0 v_0))))
5887              #f)
5888            (if (lazy-bytes-before-end? s_0 pos_0 limit_0)
5889              (let ((v_0 (lazy-bytes-ref s_0 pos_0)))
5890                (begin-unsafe (eq? 1 (unsafe-bytes-ref rng_0 v_0))))
5891              #f))
5892        (|#%app|
5893         next-m_0
5894         s_0
5895         (add1 pos_0)
5896         start_0
5897         limit_0
5898         end_0
5899         state_0
5900         stack_0)
5901        #f))))
5902(define range-tail-matcher
5903  (lambda (rng_0)
5904    (lambda (s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
5905      (if (if (bytes? s_0)
5906            (if (< pos_0 limit_0)
5907              (let ((v_0 (unsafe-bytes-ref s_0 pos_0)))
5908                (begin-unsafe (eq? 1 (unsafe-bytes-ref rng_0 v_0))))
5909              #f)
5910            (if (lazy-bytes-before-end? s_0 pos_0 limit_0)
5911              (let ((v_0 (lazy-bytes-ref s_0 pos_0)))
5912                (begin-unsafe (eq? 1 (unsafe-bytes-ref rng_0 v_0))))
5913              #f))
5914        (add1 pos_0)
5915        #f))))
5916(define range-matcher*
5917  (lambda (rng_0 max_0)
5918    (lambda (s_0 pos_0 start_0 limit_0 end_0 state_0)
5919      (if (bytes? s_0)
5920        (let ((limit_1 (if max_0 (min limit_0 (+ pos_0 (* 1 max_0))) limit_0)))
5921          (letrec*
5922           ((loop_0
5923             (|#%name|
5924              loop
5925              (lambda (pos_1 n_0)
5926                (begin
5927                  (let ((pos3_0 (+ pos_1 1)))
5928                    (if (let ((or-part_0 (> pos3_0 limit_1)))
5929                          (if or-part_0
5930                            or-part_0
5931                            (not
5932                             (let ((v_0 (unsafe-bytes-ref s_0 pos_1)))
5933                               (begin-unsafe
5934                                (eq? 1 (unsafe-bytes-ref rng_0 v_0)))))))
5935                      (values pos_1 n_0 1)
5936                      (loop_0 pos3_0 (add1 n_0)))))))))
5937           (loop_0 pos_0 0)))
5938        (let ((limit_1 (if max_0 (+ pos_0 (* 1 max_0)) #f)))
5939          (letrec*
5940           ((loop_0
5941             (|#%name|
5942              loop
5943              (lambda (pos_1 n_0)
5944                (begin
5945                  (if (let ((or-part_0
5946                             (if limit_1 (> (+ pos_1 1) limit_1) #f)))
5947                        (if or-part_0
5948                          or-part_0
5949                          (let ((or-part_1
5950                                 (not
5951                                  (lazy-bytes-before-end? s_0 pos_1 limit_1))))
5952                            (if or-part_1
5953                              or-part_1
5954                              (not
5955                               (let ((v_0 (lazy-bytes-ref s_0 pos_1)))
5956                                 (begin-unsafe
5957                                  (eq? 1 (unsafe-bytes-ref rng_0 v_0)))))))))
5958                    (values pos_1 n_0 1)
5959                    (let ((app_0 (+ pos_1 1))) (loop_0 app_0 (add1 n_0)))))))))
5960           (loop_0 pos_0 0)))))))
5961(define start-matcher
5962  (lambda (next-m_0)
5963    (lambda (s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
5964      (if (= pos_0 start_0)
5965        (|#%app| next-m_0 s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
5966        #f))))
5967(define end-matcher
5968  (lambda (next-m_0)
5969    (lambda (s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
5970      (if (if (bytes? s_0)
5971            (= pos_0 end_0)
5972            (not (lazy-bytes-before-end? s_0 pos_0 end_0)))
5973        (|#%app| next-m_0 s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
5974        #f))))
5975(define line-start-matcher
5976  (lambda (next-m_0)
5977    (lambda (s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
5978      (if (let ((or-part_0 (= pos_0 start_0)))
5979            (if or-part_0
5980              or-part_0
5981              (=
5982               10
5983               (if (bytes? s_0)
5984                 (unsafe-bytes-ref s_0 (sub1 pos_0))
5985                 (lazy-bytes-ref s_0 (sub1 pos_0))))))
5986        (|#%app| next-m_0 s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
5987        #f))))
5988(define line-end-matcher
5989  (lambda (next-m_0)
5990    (lambda (s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
5991      (if (if (bytes? s_0)
5992            (let ((or-part_0 (= pos_0 end_0)))
5993              (if or-part_0 or-part_0 (= 10 (unsafe-bytes-ref s_0 pos_0))))
5994            (let ((or-part_0 (not (lazy-bytes-before-end? s_0 pos_0 end_0))))
5995              (if or-part_0 or-part_0 (= 10 (lazy-bytes-ref s_0 pos_0)))))
5996        (|#%app| next-m_0 s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
5997        #f))))
5998(define word-boundary-matcher
5999  (lambda (next-m_0)
6000    (lambda (s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
6001      (if (word-boundary? s_0 pos_0 start_0 limit_0 end_0)
6002        (|#%app| next-m_0 s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
6003        #f))))
6004(define not-word-boundary-matcher
6005  (lambda (next-m_0)
6006    (lambda (s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
6007      (if (not (word-boundary? s_0 pos_0 start_0 limit_0 end_0))
6008        (|#%app| next-m_0 s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
6009        #f))))
6010(define word-boundary?
6011  (lambda (s_0 pos_0 start_0 limit_0 end_0)
6012    (not
6013     (let ((app_0
6014            (let ((or-part_0 (= pos_0 start_0)))
6015              (if or-part_0
6016                or-part_0
6017                (not
6018                 (word-byte?
6019                  (if (bytes? s_0)
6020                    (unsafe-bytes-ref s_0 (sub1 pos_0))
6021                    (lazy-bytes-ref s_0 (sub1 pos_0)))))))))
6022       (eq?
6023        app_0
6024        (let ((or-part_0
6025               (if (bytes? s_0)
6026                 (= pos_0 end_0)
6027                 (not (lazy-bytes-before-end? s_0 pos_0 end_0)))))
6028          (if or-part_0
6029            or-part_0
6030            (not
6031             (word-byte?
6032              (if (bytes? s_0)
6033                (unsafe-bytes-ref s_0 pos_0)
6034                (lazy-bytes-ref s_0 pos_0)))))))))))
6035(define word-byte?
6036  (lambda (c_0)
6037    (let ((or-part_0 (if (>= c_0 48) (<= c_0 57) #f)))
6038      (if or-part_0
6039        or-part_0
6040        (let ((or-part_1 (if (>= c_0 97) (<= c_0 122) #f)))
6041          (if or-part_1
6042            or-part_1
6043            (let ((or-part_2 (if (>= c_0 65) (<= c_0 90) #f)))
6044              (if or-part_2 or-part_2 (= c_0 95)))))))))
6045(define alts-matcher
6046  (lambda (m1_0 m2_0)
6047    (lambda (s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
6048      (let ((or-part_0
6049             (|#%app| m1_0 s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)))
6050        (if or-part_0
6051          or-part_0
6052          (|#%app| m2_0 s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0))))))
6053(define repeat-matcher
6054  (lambda (r-m_0 min_0 max_0 next-m_0)
6055    (lambda (s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
6056      (letrec*
6057       ((rloop_0
6058         (|#%name|
6059          rloop
6060          (lambda (pos_1 n_0)
6061            (begin
6062              (if (< n_0 min_0)
6063                (let ((new-stack_0
6064                       (cons
6065                        (lambda (pos_2) (rloop_0 pos_2 (add1 n_0)))
6066                        stack_0)))
6067                  (|#%app|
6068                   r-m_0
6069                   s_0
6070                   pos_1
6071                   start_0
6072                   limit_0
6073                   end_0
6074                   state_0
6075                   new-stack_0))
6076                (if (if max_0 (= n_0 max_0) #f)
6077                  (|#%app|
6078                   next-m_0
6079                   s_0
6080                   pos_1
6081                   start_0
6082                   limit_0
6083                   end_0
6084                   state_0
6085                   stack_0)
6086                  (let ((new-stack_0
6087                         (cons
6088                          (lambda (pos_2) (rloop_0 pos_2 (add1 n_0)))
6089                          stack_0)))
6090                    (let ((or-part_0
6091                           (|#%app|
6092                            r-m_0
6093                            s_0
6094                            pos_1
6095                            start_0
6096                            limit_0
6097                            end_0
6098                            state_0
6099                            new-stack_0)))
6100                      (if or-part_0
6101                        or-part_0
6102                        (|#%app|
6103                         next-m_0
6104                         s_0
6105                         pos_1
6106                         start_0
6107                         limit_0
6108                         end_0
6109                         state_0
6110                         stack_0)))))))))))
6111       (rloop_0 pos_0 0)))))
6112(define r-stack (list (lambda (pos_0) pos_0)))
6113(define repeat-simple-matcher
6114  (lambda (r-m_0 min_0 max_0 group-n_0 next-m_0)
6115    (lambda (s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
6116      (letrec*
6117       ((rloop_0
6118         (|#%name|
6119          rloop
6120          (lambda (pos_1 n_0 back-amt_0)
6121            (begin
6122              (let ((pos2_0
6123                     (if (let ((or-part_0 (not max_0)))
6124                           (if or-part_0 or-part_0 (< n_0 max_0)))
6125                       (|#%app|
6126                        r-m_0
6127                        s_0
6128                        pos_1
6129                        start_0
6130                        limit_0
6131                        end_0
6132                        state_0
6133                        r-stack)
6134                       #f)))
6135                (if pos2_0
6136                  (let ((app_0 (add1 n_0)))
6137                    (rloop_0 pos2_0 app_0 (- pos2_0 pos_1)))
6138                  (letrec*
6139                   ((bloop_0
6140                     (|#%name|
6141                      bloop
6142                      (lambda (pos_2 n_1)
6143                        (begin
6144                          (if (< n_1 min_0)
6145                            #f
6146                            (if (if group-n_0 state_0 #f)
6147                              (let ((old-span_0
6148                                     (vector-ref state_0 group-n_0)))
6149                                (begin
6150                                  (vector-set!
6151                                   state_0
6152                                   group-n_0
6153                                   (if (zero? n_1)
6154                                     #f
6155                                     (cons (- pos_2 back-amt_0) pos_2)))
6156                                  (let ((group-revert_0
6157                                         (|#%name|
6158                                          group-revert
6159                                          (lambda ()
6160                                            (begin
6161                                              (vector-set!
6162                                               state_0
6163                                               group-n_0
6164                                               old-span_0))))))
6165                                    (let ((or-part_0
6166                                           (|#%app|
6167                                            next-m_0
6168                                            s_0
6169                                            pos_2
6170                                            start_0
6171                                            limit_0
6172                                            end_0
6173                                            state_0
6174                                            stack_0)))
6175                                      (if or-part_0
6176                                        or-part_0
6177                                        (begin
6178                                          (group-revert_0)
6179                                          (let ((app_0 (- pos_2 back-amt_0)))
6180                                            (bloop_0 app_0 (sub1 n_1)))))))))
6181                              (let ((group-revert_0
6182                                     (|#%name|
6183                                      group-revert
6184                                      (lambda () (begin (void))))))
6185                                (let ((or-part_0
6186                                       (|#%app|
6187                                        next-m_0
6188                                        s_0
6189                                        pos_2
6190                                        start_0
6191                                        limit_0
6192                                        end_0
6193                                        state_0
6194                                        stack_0)))
6195                                  (if or-part_0
6196                                    or-part_0
6197                                    (begin
6198                                      (group-revert_0)
6199                                      (let ((app_0 (- pos_2 back-amt_0)))
6200                                        (bloop_0 app_0 (sub1 n_1))))))))))))))
6201                   (bloop_0 pos_1 n_0)))))))))
6202       (rloop_0 pos_0 0 0)))))
6203(define repeat-simple-many-matcher
6204  (lambda (r-m*_0 min_0 max_0 group-n_0 next-m_0)
6205    (lambda (s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
6206      (call-with-values
6207       (lambda () (|#%app| r-m*_0 s_0 pos_0 start_0 limit_0 end_0 state_0))
6208       (case-lambda
6209        ((pos2_0 n_0 back-amt_0)
6210         (letrec*
6211          ((bloop_0
6212            (|#%name|
6213             bloop
6214             (lambda (pos_1 n_1)
6215               (begin
6216                 (if (< n_1 min_0)
6217                   #f
6218                   (if (if group-n_0 state_0 #f)
6219                     (let ((old-span_0 (vector-ref state_0 group-n_0)))
6220                       (begin
6221                         (vector-set!
6222                          state_0
6223                          group-n_0
6224                          (if (zero? n_1)
6225                            #f
6226                            (cons (- pos_1 back-amt_0) pos_1)))
6227                         (let ((group-revert_0
6228                                (|#%name|
6229                                 group-revert
6230                                 (lambda ()
6231                                   (begin
6232                                     (vector-set!
6233                                      state_0
6234                                      group-n_0
6235                                      old-span_0))))))
6236                           (let ((or-part_0
6237                                  (|#%app|
6238                                   next-m_0
6239                                   s_0
6240                                   pos_1
6241                                   start_0
6242                                   limit_0
6243                                   end_0
6244                                   state_0
6245                                   stack_0)))
6246                             (if or-part_0
6247                               or-part_0
6248                               (begin
6249                                 (group-revert_0)
6250                                 (let ((app_0 (- pos_1 back-amt_0)))
6251                                   (bloop_0 app_0 (sub1 n_1)))))))))
6252                     (let ((group-revert_0
6253                            (|#%name|
6254                             group-revert
6255                             (lambda () (begin (void))))))
6256                       (let ((or-part_0
6257                              (|#%app|
6258                               next-m_0
6259                               s_0
6260                               pos_1
6261                               start_0
6262                               limit_0
6263                               end_0
6264                               state_0
6265                               stack_0)))
6266                         (if or-part_0
6267                           or-part_0
6268                           (begin
6269                             (group-revert_0)
6270                             (let ((app_0 (- pos_1 back-amt_0)))
6271                               (bloop_0 app_0 (sub1 n_1))))))))))))))
6272          (bloop_0 pos2_0 n_0)))
6273        (args (raise-binding-result-arity-error 3 args)))))))
6274(define lazy-repeat-matcher
6275  (lambda (r-m_0 min_0 max_0 next-m_0)
6276    (lambda (s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
6277      (letrec*
6278       ((rloop_0
6279         (|#%name|
6280          rloop
6281          (lambda (pos_1 n_0 min_1)
6282            (begin
6283              (if (< n_0 min_1)
6284                (let ((new-stack_0
6285                       (cons
6286                        (lambda (pos_2) (rloop_0 pos_2 (add1 n_0) min_1))
6287                        stack_0)))
6288                  (|#%app|
6289                   r-m_0
6290                   s_0
6291                   pos_1
6292                   start_0
6293                   limit_0
6294                   end_0
6295                   state_0
6296                   new-stack_0))
6297                (if (if max_0 (= n_0 max_0) #f)
6298                  (|#%app|
6299                   next-m_0
6300                   s_0
6301                   pos_1
6302                   start_0
6303                   limit_0
6304                   end_0
6305                   state_0
6306                   stack_0)
6307                  (let ((or-part_0
6308                         (|#%app|
6309                          next-m_0
6310                          s_0
6311                          pos_1
6312                          start_0
6313                          limit_0
6314                          end_0
6315                          state_0
6316                          stack_0)))
6317                    (if or-part_0
6318                      or-part_0
6319                      (rloop_0 pos_1 n_0 (add1 min_1)))))))))))
6320       (rloop_0 pos_0 0 min_0)))))
6321(define lazy-repeat-simple-matcher
6322  (lambda (r-m_0 min_0 max_0 next-m_0)
6323    (lambda (s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
6324      (letrec*
6325       ((rloop_0
6326         (|#%name|
6327          rloop
6328          (lambda (pos_1 n_0 min_1)
6329            (begin
6330              (if (< n_0 min_1)
6331                (let ((pos2_0
6332                       (|#%app|
6333                        r-m_0
6334                        s_0
6335                        pos_1
6336                        start_0
6337                        limit_0
6338                        end_0
6339                        state_0
6340                        stack_0)))
6341                  (if pos2_0 (rloop_0 pos2_0 (add1 n_0) min_1) #f))
6342                (if (if max_0 (= n_0 max_0) #f)
6343                  (|#%app|
6344                   next-m_0
6345                   s_0
6346                   pos_1
6347                   start_0
6348                   limit_0
6349                   end_0
6350                   state_0
6351                   stack_0)
6352                  (let ((or-part_0
6353                         (|#%app|
6354                          next-m_0
6355                          s_0
6356                          pos_1
6357                          start_0
6358                          limit_0
6359                          end_0
6360                          state_0
6361                          stack_0)))
6362                    (if or-part_0
6363                      or-part_0
6364                      (rloop_0 pos_1 n_0 (add1 min_1)))))))))))
6365       (rloop_0 pos_0 0 min_0)))))
6366(define group-push-matcher
6367  (lambda (n_0 next-m_0)
6368    (lambda (s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
6369      (let ((new-stack_0
6370             (cons
6371              (cons pos_0 (if state_0 (vector-ref state_0 n_0) #f))
6372              stack_0)))
6373        (|#%app|
6374         next-m_0
6375         s_0
6376         pos_0
6377         start_0
6378         limit_0
6379         end_0
6380         state_0
6381         new-stack_0)))))
6382(define group-set-matcher
6383  (lambda (n_0 next-m_0)
6384    (lambda (s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
6385      (let ((old-pos+span_0 (car stack_0)))
6386        (let ((old-span_0 (cdr old-pos+span_0)))
6387          (begin
6388            (if state_0
6389              (vector-set! state_0 n_0 (cons (car old-pos+span_0) pos_0))
6390              (void))
6391            (let ((or-part_0
6392                   (|#%app|
6393                    next-m_0
6394                    s_0
6395                    pos_0
6396                    start_0
6397                    limit_0
6398                    end_0
6399                    state_0
6400                    (cdr stack_0))))
6401              (if or-part_0
6402                or-part_0
6403                (begin
6404                  (if state_0 (vector-set! state_0 n_0 old-span_0) (void))
6405                  #f)))))))))
6406(define reference-matcher
6407  (lambda (n_0 next-m_0)
6408    (lambda (s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
6409      (let ((p_0 (vector-ref state_0 n_0)))
6410        (if (not p_0)
6411          #f
6412          (let ((len_0 (let ((app_0 (cdr p_0))) (- app_0 (car p_0)))))
6413            (let ((matches?_0
6414                   (if (bytes? s_0)
6415                     (if (<= (+ pos_0 len_0) limit_0)
6416                       (call-with-values
6417                        (lambda ()
6418                          (let ((app_0 (car p_0)))
6419                            (unsafe-normalise-inputs
6420                             unsafe-bytes-length
6421                             s_0
6422                             app_0
6423                             (cdr p_0)
6424                             1)))
6425                        (case-lambda
6426                         ((v*_0 start*_0 stop*_0 step*_0)
6427                          (call-with-values
6428                           (lambda ()
6429                             (unsafe-normalise-inputs
6430                              unsafe-bytes-length
6431                              s_0
6432                              pos_0
6433                              (+ pos_0 len_0)
6434                              1))
6435                           (case-lambda
6436                            ((v*_1 start*_1 stop*_1 step*_1)
6437                             (let ((v*_2 v*_0)
6438                                   (start*_2 start*_0)
6439                                   (stop*_2 stop*_0)
6440                                   (step*_2 step*_0))
6441                               (begin
6442                                 #t
6443                                 #t
6444                                 (letrec*
6445                                  ((for-loop_0
6446                                    (|#%name|
6447                                     for-loop
6448                                     (lambda (result_0 idx_0 idx_1)
6449                                       (begin
6450                                         (if (if (unsafe-fx< idx_0 stop*_2)
6451                                               (unsafe-fx< idx_1 stop*_1)
6452                                               #f)
6453                                           (let ((c1_0
6454                                                  (unsafe-bytes-ref
6455                                                   v*_2
6456                                                   idx_0)))
6457                                             (let ((c2_0
6458                                                    (unsafe-bytes-ref
6459                                                     v*_1
6460                                                     idx_1)))
6461                                               (let ((c1_1 c1_0))
6462                                                 (let ((result_1
6463                                                        (let ((result_1
6464                                                               (= c1_1 c2_0)))
6465                                                          (values result_1))))
6466                                                   (if (if (not
6467                                                            (let ((x_0
6468                                                                   (list
6469                                                                    c1_1)))
6470                                                              (not result_1)))
6471                                                         (if (not
6472                                                              (let ((x_0
6473                                                                     (list
6474                                                                      c2_0)))
6475                                                                (not
6476                                                                 result_1)))
6477                                                           #t
6478                                                           #f)
6479                                                         #f)
6480                                                     (for-loop_0
6481                                                      result_1
6482                                                      (unsafe-fx+ idx_0 1)
6483                                                      (unsafe-fx+ idx_1 1))
6484                                                     result_1)))))
6485                                           result_0))))))
6486                                  (for-loop_0 #t start*_2 start*_1)))))
6487                            (args (raise-binding-result-arity-error 4 args)))))
6488                         (args (raise-binding-result-arity-error 4 args))))
6489                       #f)
6490                     (let ((start_1 (car p_0)))
6491                       (let ((end_1 (cdr p_0)))
6492                         (let ((start_2 start_1))
6493                           (begin
6494                             (letrec*
6495                              ((for-loop_0
6496                                (|#%name|
6497                                 for-loop
6498                                 (lambda (result_0 pos_1 pos_2)
6499                                   (begin
6500                                     (if (if (< pos_1 end_1) #t #f)
6501                                       (let ((result_1
6502                                              (let ((result_1
6503                                                     (if (lazy-bytes-before-end?
6504                                                          s_0
6505                                                          pos_2
6506                                                          limit_0)
6507                                                       (let ((c1_0
6508                                                              (lazy-bytes-ref
6509                                                               s_0
6510                                                               pos_1)))
6511                                                         (let ((c2_0
6512                                                                (lazy-bytes-ref
6513                                                                 s_0
6514                                                                 pos_2)))
6515                                                           (= c1_0 c2_0)))
6516                                                       #f)))
6517                                                (values result_1))))
6518                                         (if (if (not
6519                                                  (let ((x_0 (list pos_1)))
6520                                                    (not result_1)))
6521                                               (if (not
6522                                                    (let ((x_0 (list pos_2)))
6523                                                      (not result_1)))
6524                                                 #t
6525                                                 #f)
6526                                               #f)
6527                                           (let ((app_0 (+ pos_1 1)))
6528                                             (for-loop_0
6529                                              result_1
6530                                              app_0
6531                                              (+ pos_2 1)))
6532                                           result_1))
6533                                       result_0))))))
6534                              (for-loop_0 #t start_2 pos_0)))))))))
6535              (if matches?_0
6536                (|#%app|
6537                 next-m_0
6538                 s_0
6539                 (+ pos_0 len_0)
6540                 start_0
6541                 limit_0
6542                 end_0
6543                 state_0
6544                 stack_0)
6545                #f))))))))
6546(define reference-matcher/case-insensitive
6547  (lambda (n_0 next-m_0)
6548    (lambda (s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
6549      (let ((p_0 (vector-ref state_0 n_0)))
6550        (if (not p_0)
6551          #f
6552          (let ((len_0 (let ((app_0 (cdr p_0))) (- app_0 (car p_0)))))
6553            (let ((matches?_0
6554                   (if (bytes? s_0)
6555                     (if (<= (+ pos_0 len_0) limit_0)
6556                       (call-with-values
6557                        (lambda ()
6558                          (let ((app_0 (car p_0)))
6559                            (unsafe-normalise-inputs
6560                             unsafe-bytes-length
6561                             s_0
6562                             app_0
6563                             (cdr p_0)
6564                             1)))
6565                        (case-lambda
6566                         ((v*_0 start*_0 stop*_0 step*_0)
6567                          (call-with-values
6568                           (lambda ()
6569                             (unsafe-normalise-inputs
6570                              unsafe-bytes-length
6571                              s_0
6572                              pos_0
6573                              (+ pos_0 len_0)
6574                              1))
6575                           (case-lambda
6576                            ((v*_1 start*_1 stop*_1 step*_1)
6577                             (let ((v*_2 v*_0)
6578                                   (start*_2 start*_0)
6579                                   (stop*_2 stop*_0)
6580                                   (step*_2 step*_0))
6581                               (begin
6582                                 #t
6583                                 #t
6584                                 (letrec*
6585                                  ((for-loop_0
6586                                    (|#%name|
6587                                     for-loop
6588                                     (lambda (result_0 idx_0 idx_1)
6589                                       (begin
6590                                         (if (if (unsafe-fx< idx_0 stop*_2)
6591                                               (unsafe-fx< idx_1 stop*_1)
6592                                               #f)
6593                                           (let ((c1_0
6594                                                  (unsafe-bytes-ref
6595                                                   v*_2
6596                                                   idx_0)))
6597                                             (let ((c2_0
6598                                                    (unsafe-bytes-ref
6599                                                     v*_1
6600                                                     idx_1)))
6601                                               (let ((c1_1 c1_0))
6602                                                 (let ((result_1
6603                                                        (let ((result_1
6604                                                               (let ((app_0
6605                                                                      (chyte-to-lower
6606                                                                       c1_1)))
6607                                                                 (=
6608                                                                  app_0
6609                                                                  (chyte-to-lower
6610                                                                   c2_0)))))
6611                                                          (values result_1))))
6612                                                   (if (if (not
6613                                                            (let ((x_0
6614                                                                   (list
6615                                                                    c1_1)))
6616                                                              (not result_1)))
6617                                                         (if (not
6618                                                              (let ((x_0
6619                                                                     (list
6620                                                                      c2_0)))
6621                                                                (not
6622                                                                 result_1)))
6623                                                           #t
6624                                                           #f)
6625                                                         #f)
6626                                                     (for-loop_0
6627                                                      result_1
6628                                                      (unsafe-fx+ idx_0 1)
6629                                                      (unsafe-fx+ idx_1 1))
6630                                                     result_1)))))
6631                                           result_0))))))
6632                                  (for-loop_0 #t start*_2 start*_1)))))
6633                            (args (raise-binding-result-arity-error 4 args)))))
6634                         (args (raise-binding-result-arity-error 4 args))))
6635                       #f)
6636                     (let ((start_1 (car p_0)))
6637                       (let ((end_1 (cdr p_0)))
6638                         (let ((start_2 start_1))
6639                           (begin
6640                             (letrec*
6641                              ((for-loop_0
6642                                (|#%name|
6643                                 for-loop
6644                                 (lambda (result_0 pos_1 pos_2)
6645                                   (begin
6646                                     (if (if (< pos_1 end_1) #t #f)
6647                                       (let ((result_1
6648                                              (let ((result_1
6649                                                     (if (lazy-bytes-before-end?
6650                                                          s_0
6651                                                          pos_2
6652                                                          limit_0)
6653                                                       (let ((c1_0
6654                                                              (lazy-bytes-ref
6655                                                               s_0
6656                                                               pos_1)))
6657                                                         (let ((c2_0
6658                                                                (lazy-bytes-ref
6659                                                                 s_0
6660                                                                 pos_2)))
6661                                                           (let ((app_0
6662                                                                  (chyte-to-lower
6663                                                                   c1_0)))
6664                                                             (=
6665                                                              app_0
6666                                                              (chyte-to-lower
6667                                                               c2_0)))))
6668                                                       #f)))
6669                                                (values result_1))))
6670                                         (if (if (not
6671                                                  (let ((x_0 (list pos_1)))
6672                                                    (not result_1)))
6673                                               (if (not
6674                                                    (let ((x_0 (list pos_2)))
6675                                                      (not result_1)))
6676                                                 #t
6677                                                 #f)
6678                                               #f)
6679                                           (let ((app_0 (+ pos_1 1)))
6680                                             (for-loop_0
6681                                              result_1
6682                                              app_0
6683                                              (+ pos_2 1)))
6684                                           result_1))
6685                                       result_0))))))
6686                              (for-loop_0 #t start_2 pos_0)))))))))
6687              (if matches?_0
6688                (|#%app|
6689                 next-m_0
6690                 s_0
6691                 (+ pos_0 len_0)
6692                 start_0
6693                 limit_0
6694                 end_0
6695                 state_0
6696                 stack_0)
6697                #f))))))))
6698(define chyte-to-lower
6699  (lambda (c_0) (if (if (>= c_0 65) (<= c_0 90) #f) (+ c_0 32) c_0)))
6700(define lookahead-matcher
6701  (lambda (match?_0 sub-m_0 n-start_0 num-n_0 next-m_0)
6702    (lambda (s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
6703      (let ((old-state_0 (save-groups state_0 n-start_0 num-n_0)))
6704        (let ((pos2_0
6705               (|#%app| sub-m_0 s_0 pos_0 start_0 limit_0 end_0 state_0 null)))
6706          (if match?_0
6707            (if pos2_0
6708              (let ((or-part_0
6709                     (|#%app|
6710                      next-m_0
6711                      s_0
6712                      pos_0
6713                      start_0
6714                      limit_0
6715                      end_0
6716                      state_0
6717                      stack_0)))
6718                (if or-part_0
6719                  or-part_0
6720                  (restore-groups state_0 old-state_0 n-start_0 num-n_0)))
6721              #f)
6722            (if pos2_0
6723              (restore-groups state_0 old-state_0 n-start_0 num-n_0)
6724              (|#%app|
6725               next-m_0
6726               s_0
6727               pos_0
6728               start_0
6729               limit_0
6730               end_0
6731               state_0
6732               stack_0))))))))
6733(define lookbehind-matcher
6734  (lambda (match?_0 lb-min_0 lb-max_0 sub-m_0 n-start_0 num-n_0 next-m_0)
6735    (lambda (s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
6736      (let ((lb-min-pos_0 (max start_0 (- pos_0 lb-max_0))))
6737        (letrec*
6738         ((loop_0
6739           (|#%name|
6740            loop
6741            (lambda (lb-pos_0)
6742              (begin
6743                (if (< lb-pos_0 lb-min-pos_0)
6744                  (if match?_0
6745                    #f
6746                    (|#%app|
6747                     next-m_0
6748                     s_0
6749                     pos_0
6750                     start_0
6751                     limit_0
6752                     end_0
6753                     state_0
6754                     stack_0))
6755                  (let ((old-state_0 (save-groups state_0 n-start_0 num-n_0)))
6756                    (let ((pos2_0
6757                           (|#%app|
6758                            sub-m_0
6759                            s_0
6760                            lb-pos_0
6761                            start_0
6762                            pos_0
6763                            end_0
6764                            state_0
6765                            null)))
6766                      (if match?_0
6767                        (if pos2_0
6768                          (let ((or-part_0
6769                                 (|#%app|
6770                                  next-m_0
6771                                  s_0
6772                                  pos_0
6773                                  start_0
6774                                  limit_0
6775                                  end_0
6776                                  state_0
6777                                  stack_0)))
6778                            (if or-part_0
6779                              or-part_0
6780                              (restore-groups
6781                               state_0
6782                               old-state_0
6783                               n-start_0
6784                               num-n_0)))
6785                          (loop_0 (sub1 lb-pos_0)))
6786                        (if pos2_0
6787                          (restore-groups
6788                           state_0
6789                           old-state_0
6790                           n-start_0
6791                           num-n_0)
6792                          (|#%app|
6793                           next-m_0
6794                           s_0
6795                           pos_0
6796                           start_0
6797                           limit_0
6798                           end_0
6799                           state_0
6800                           stack_0)))))))))))
6801         (loop_0 (- pos_0 lb-min_0)))))))
6802(define conditional/reference-matcher
6803  (lambda (n_0 m1_0 m2_0)
6804    (lambda (s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
6805      (if (vector-ref state_0 n_0)
6806        (|#%app| m1_0 s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
6807        (|#%app| m2_0 s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)))))
6808(define conditional/look-matcher
6809  (lambda (tst-m_0 m1_0 m2_0 n-start_0 num-n_0)
6810    (lambda (s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
6811      (let ((old-state_0 (save-groups state_0 n-start_0 num-n_0)))
6812        (let ((or-part_0
6813               (if (|#%app|
6814                    tst-m_0
6815                    s_0
6816                    pos_0
6817                    start_0
6818                    limit_0
6819                    end_0
6820                    state_0
6821                    null)
6822                 (|#%app| m1_0 s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
6823                 (|#%app|
6824                  m2_0
6825                  s_0
6826                  pos_0
6827                  start_0
6828                  limit_0
6829                  end_0
6830                  state_0
6831                  stack_0))))
6832          (if or-part_0
6833            or-part_0
6834            (restore-groups state_0 old-state_0 n-start_0 num-n_0)))))))
6835(define cut-matcher
6836  (lambda (sub-m_0 n-start_0 num-n_0 next-m_0)
6837    (lambda (s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
6838      (let ((old-state_0 (save-groups state_0 n-start_0 num-n_0)))
6839        (let ((pos2_0
6840               (|#%app| sub-m_0 s_0 pos_0 start_0 limit_0 end_0 state_0 null)))
6841          (if pos2_0
6842            (let ((or-part_0
6843                   (|#%app|
6844                    next-m_0
6845                    s_0
6846                    pos2_0
6847                    start_0
6848                    limit_0
6849                    end_0
6850                    state_0
6851                    stack_0)))
6852              (if or-part_0
6853                or-part_0
6854                (restore-groups state_0 old-state_0 n-start_0 num-n_0)))
6855            #f))))))
6856(define save-groups
6857  (lambda (state_0 n-start_0 num-n_0)
6858    (if (zero? num-n_0)
6859      #f
6860      (if (not state_0)
6861        #f
6862        (let ((vec_0 (make-vector num-n_0)))
6863          (begin
6864            (vector-copy! vec_0 0 state_0 n-start_0 (+ n-start_0 num-n_0))
6865            vec_0))))))
6866(define restore-groups
6867  (lambda (state_0 old-state_0 n-start_0 num-n_0)
6868    (begin
6869      (if old-state_0 (vector-copy! state_0 n-start_0 old-state_0) (void))
6870      #f)))
6871(define unicode-categories-matcher
6872  (lambda (cats_0 match?_0 next-m_0)
6873    (lambda (s_0 pos_0 start_0 limit_0 end_0 state_0 stack_0)
6874      (letrec*
6875       ((loop_0
6876         (|#%name|
6877          loop
6878          (lambda (pos_1 accum_0)
6879            (begin
6880              (let ((b_0
6881                     (if (bytes? s_0)
6882                       (if (< pos_1 limit_0) (unsafe-bytes-ref s_0 pos_1) #f)
6883                       (if (lazy-bytes-before-end? s_0 pos_1 limit_0)
6884                         (lazy-bytes-ref s_0 pos_1)
6885                         #f))))
6886                (if (not b_0)
6887                  #f
6888                  (let ((c_0 (bytes->char/utf-8 b_0 accum_0)))
6889                    (if (char? c_0)
6890                      (if (eq?
6891                           match?_0
6892                           (let ((c-cat_0 (char-general-category c_0)))
6893                             (if (list? cats_0)
6894                               (begin
6895                                 (letrec*
6896                                  ((for-loop_0
6897                                    (|#%name|
6898                                     for-loop
6899                                     (lambda (result_0 lst_0)
6900                                       (begin
6901                                         (if (pair? lst_0)
6902                                           (let ((cat_0 (unsafe-car lst_0)))
6903                                             (let ((rest_0 (unsafe-cdr lst_0)))
6904                                               (let ((result_1
6905                                                      (eq? cat_0 c-cat_0)))
6906                                                 (let ((result_2
6907                                                        (values result_1)))
6908                                                   (if (if (not
6909                                                            (let ((x_0
6910                                                                   (list
6911                                                                    cat_0)))
6912                                                              result_2))
6913                                                         #t
6914                                                         #f)
6915                                                     (for-loop_0
6916                                                      result_2
6917                                                      rest_0)
6918                                                     result_2)))))
6919                                           result_0))))))
6920                                  (for-loop_0 #f cats_0)))
6921                               (eq? cats_0 c-cat_0))))
6922                        (|#%app|
6923                         next-m_0
6924                         s_0
6925                         (add1 pos_1)
6926                         start_0
6927                         limit_0
6928                         end_0
6929                         state_0
6930                         stack_0)
6931                        #f)
6932                      (if (eq? c_0 'fail)
6933                        #f
6934                        (let ((app_0 (add1 pos_1)))
6935                          (loop_0 app_0 (cons b_0 accum_0)))))))))))))
6936       (loop_0 pos_0 null)))))
6937(define 1/compile
6938  (|#%name|
6939   compile
6940   (lambda (rx_0)
6941     (begin
6942       (letrec*
6943        ((compile_0
6944          (|#%name|
6945           compile
6946           (lambda (rx_1 next-m_0)
6947             (begin
6948               (if (exact-integer? rx_1)
6949                 (if (eq? next-m_0 done-m)
6950                   (byte-tail-matcher rx_1)
6951                   (byte-matcher rx_1 next-m_0))
6952                 (if (bytes? rx_1)
6953                   (let ((len_0 (unsafe-bytes-length rx_1)))
6954                     (if (eq? next-m_0 done-m)
6955                       (bytes-tail-matcher rx_1 len_0)
6956                       (bytes-matcher rx_1 len_0 next-m_0)))
6957                   (if (eq? rx_1 'empty)
6958                     next-m_0
6959                     (if (eq? rx_1 'never)
6960                       (never-matcher)
6961                       (if (eq? rx_1 'any)
6962                         (if (eq? next-m_0 done-m)
6963                           (any-tail-matcher)
6964                           (any-matcher next-m_0))
6965                         (if (rx:range? rx_1)
6966                           (let ((rng_0 (compile-range (rx:range-range rx_1))))
6967                             (if (eq? next-m_0 done-m)
6968                               (range-tail-matcher rng_0)
6969                               (range-matcher rng_0 next-m_0)))
6970                           (if (eq? rx_1 'start)
6971                             (start-matcher next-m_0)
6972                             (if (eq? rx_1 'end)
6973                               (end-matcher next-m_0)
6974                               (if (eq? rx_1 'line-start)
6975                                 (line-start-matcher next-m_0)
6976                                 (if (eq? rx_1 'line-end)
6977                                   (line-end-matcher next-m_0)
6978                                   (if (eq? rx_1 'word-boundary)
6979                                     (word-boundary-matcher next-m_0)
6980                                     (if (eq? rx_1 'not-word-boundary)
6981                                       (not-word-boundary-matcher next-m_0)
6982                                       (if (rx:sequence? rx_1)
6983                                         (let ((rxs_0 (rx:sequence-rxs rx_1)))
6984                                           (letrec*
6985                                            ((loop_0
6986                                              (|#%name|
6987                                               loop
6988                                               (lambda (rxs_1)
6989                                                 (begin
6990                                                   (if (null? rxs_1)
6991                                                     next-m_0
6992                                                     (let ((rest-node_0
6993                                                            (loop_0
6994                                                             (cdr rxs_1))))
6995                                                       (compile_0
6996                                                        (car rxs_1)
6997                                                        rest-node_0))))))))
6998                                            (loop_0 rxs_0)))
6999                                         (if (rx:alts? rx_1)
7000                                           (let ((app_0
7001                                                  (compile_0
7002                                                   (rx:alts-rx_1874 rx_1)
7003                                                   next-m_0)))
7004                                             (alts-matcher
7005                                              app_0
7006                                              (compile_0
7007                                               (rx:alts-rx_2761 rx_1)
7008                                               next-m_0)))
7009                                           (if (rx:maybe? rx_1)
7010                                             (if (rx:maybe-non-greedy? rx_1)
7011                                               (alts-matcher
7012                                                next-m_0
7013                                                (compile_0
7014                                                 (rx:maybe-rx rx_1)
7015                                                 next-m_0))
7016                                               (alts-matcher
7017                                                (compile_0
7018                                                 (rx:maybe-rx rx_1)
7019                                                 next-m_0)
7020                                                next-m_0))
7021                                             (if (rx:repeat? rx_1)
7022                                               (let ((actual-r-rx_0
7023                                                      (rx:repeat-rx rx_1)))
7024                                                 (let ((r-rx_0
7025                                                        (if (if (rx:group?
7026                                                                 actual-r-rx_0)
7027                                                              (if (not
7028                                                                   (rx:repeat-non-greedy?
7029                                                                    rx_1))
7030                                                                (not
7031                                                                 (needs-backtrack?
7032                                                                  (rx:group-rx
7033                                                                   actual-r-rx_0)))
7034                                                                #f)
7035                                                              #f)
7036                                                          (rx:group-rx
7037                                                           actual-r-rx_0)
7038                                                          actual-r-rx_0)))
7039                                                   (let ((simple?_0
7040                                                          (not
7041                                                           (needs-backtrack?
7042                                                            r-rx_0))))
7043                                                     (let ((group-n_0
7044                                                            (if simple?_0
7045                                                              (if (rx:group?
7046                                                                   actual-r-rx_0)
7047                                                                (rx:group-number
7048                                                                 actual-r-rx_0)
7049                                                                #f)
7050                                                              #f)))
7051                                                       (let ((min_0
7052                                                              (rx:repeat-min
7053                                                               rx_1)))
7054                                                         (let ((max_0
7055                                                                (let ((n_0
7056                                                                       (rx:repeat-max
7057                                                                        rx_1)))
7058                                                                  (if (=
7059                                                                       n_0
7060                                                                       +inf.0)
7061                                                                    #f
7062                                                                    n_0))))
7063                                                           (let ((r-m*_0
7064                                                                  (compile*/maybe
7065                                                                   r-rx_0
7066                                                                   min_0
7067                                                                   max_0)))
7068                                                             (if (if r-m*_0
7069                                                                   (not
7070                                                                    (rx:repeat-non-greedy?
7071                                                                     rx_1))
7072                                                                   #f)
7073                                                               (repeat-simple-many-matcher
7074                                                                r-m*_0
7075                                                                min_0
7076                                                                max_0
7077                                                                group-n_0
7078                                                                next-m_0)
7079                                                               (let ((r-m_0
7080                                                                      (compile_0
7081                                                                       r-rx_0
7082                                                                       (if simple?_0
7083                                                                         done-m
7084                                                                         continue-m))))
7085                                                                 (if (rx:repeat-non-greedy?
7086                                                                      rx_1)
7087                                                                   (if simple?_0
7088                                                                     (lazy-repeat-simple-matcher
7089                                                                      r-m_0
7090                                                                      min_0
7091                                                                      max_0
7092                                                                      next-m_0)
7093                                                                     (lazy-repeat-matcher
7094                                                                      r-m_0
7095                                                                      min_0
7096                                                                      max_0
7097                                                                      next-m_0))
7098                                                                   (if simple?_0
7099                                                                     (repeat-simple-matcher
7100                                                                      r-m_0
7101                                                                      min_0
7102                                                                      max_0
7103                                                                      group-n_0
7104                                                                      next-m_0)
7105                                                                     (repeat-matcher
7106                                                                      r-m_0
7107                                                                      min_0
7108                                                                      max_0
7109                                                                      next-m_0))))))))))))
7110                                               (if (rx:group? rx_1)
7111                                                 (let ((n_0
7112                                                        (rx:group-number
7113                                                         rx_1)))
7114                                                   (let ((m_0
7115                                                          (let ((app_0
7116                                                                 (rx:group-rx
7117                                                                  rx_1)))
7118                                                            (compile_0
7119                                                             app_0
7120                                                             (group-set-matcher
7121                                                              n_0
7122                                                              next-m_0)))))
7123                                                     (group-push-matcher
7124                                                      n_0
7125                                                      m_0)))
7126                                                 (if (rx:reference? rx_1)
7127                                                   (let ((n_0
7128                                                          (rx:reference-n
7129                                                           rx_1)))
7130                                                     (if (zero? n_0)
7131                                                       (never-matcher)
7132                                                       (if (rx:reference-case-sensitive?
7133                                                            rx_1)
7134                                                         (reference-matcher
7135                                                          (sub1 n_0)
7136                                                          next-m_0)
7137                                                         (reference-matcher/case-insensitive
7138                                                          (sub1 n_0)
7139                                                          next-m_0))))
7140                                                   (if (rx:cut? rx_1)
7141                                                     (let ((app_0
7142                                                            (compile_0
7143                                                             (rx:cut-rx rx_1)
7144                                                             done-m)))
7145                                                       (let ((app_1
7146                                                              (rx:cut-n-start
7147                                                               rx_1)))
7148                                                         (cut-matcher
7149                                                          app_0
7150                                                          app_1
7151                                                          (rx:cut-num-n rx_1)
7152                                                          next-m_0)))
7153                                                     (if (rx:conditional? rx_1)
7154                                                       (let ((tst_0
7155                                                              (rx:conditional-tst
7156                                                               rx_1)))
7157                                                         (let ((m1_0
7158                                                                (compile_0
7159                                                                 (rx:conditional-rx_2013
7160                                                                  rx_1)
7161                                                                 next-m_0)))
7162                                                           (let ((m2_0
7163                                                                  (compile_0
7164                                                                   (rx:conditional-rx_2094
7165                                                                    rx_1)
7166                                                                   next-m_0)))
7167                                                             (if (rx:reference?
7168                                                                  tst_0)
7169                                                               (let ((n_0
7170                                                                      (sub1
7171                                                                       (rx:reference-n
7172                                                                        tst_0))))
7173                                                                 (conditional/reference-matcher
7174                                                                  n_0
7175                                                                  m1_0
7176                                                                  m2_0))
7177                                                               (let ((app_0
7178                                                                      (compile_0
7179                                                                       tst_0
7180                                                                       done-m)))
7181                                                                 (let ((app_1
7182                                                                        (rx:conditional-n-start
7183                                                                         rx_1)))
7184                                                                   (conditional/look-matcher
7185                                                                    app_0
7186                                                                    m1_0
7187                                                                    m2_0
7188                                                                    app_1
7189                                                                    (rx:conditional-num-n
7190                                                                     rx_1))))))))
7191                                                       (if (rx:lookahead? rx_1)
7192                                                         (let ((app_0
7193                                                                (rx:lookahead-match?
7194                                                                 rx_1)))
7195                                                           (let ((app_1
7196                                                                  (compile_0
7197                                                                   (rx:lookahead-rx
7198                                                                    rx_1)
7199                                                                   done-m)))
7200                                                             (let ((app_2
7201                                                                    (rx:lookahead-n-start
7202                                                                     rx_1)))
7203                                                               (lookahead-matcher
7204                                                                app_0
7205                                                                app_1
7206                                                                app_2
7207                                                                (rx:lookahead-num-n
7208                                                                 rx_1)
7209                                                                next-m_0))))
7210                                                         (if (rx:lookbehind?
7211                                                              rx_1)
7212                                                           (let ((app_0
7213                                                                  (rx:lookbehind-match?
7214                                                                   rx_1)))
7215                                                             (let ((app_1
7216                                                                    (rx:lookbehind-lb-min
7217                                                                     rx_1)))
7218                                                               (let ((app_2
7219                                                                      (rx:lookbehind-lb-max
7220                                                                       rx_1)))
7221                                                                 (let ((app_3
7222                                                                        (compile_0
7223                                                                         (rx:lookbehind-rx
7224                                                                          rx_1)
7225                                                                         limit-m)))
7226                                                                   (let ((app_4
7227                                                                          (rx:lookbehind-n-start
7228                                                                           rx_1)))
7229                                                                     (lookbehind-matcher
7230                                                                      app_0
7231                                                                      app_1
7232                                                                      app_2
7233                                                                      app_3
7234                                                                      app_4
7235                                                                      (rx:lookbehind-num-n
7236                                                                       rx_1)
7237                                                                      next-m_0))))))
7238                                                           (if (rx:unicode-categories?
7239                                                                rx_1)
7240                                                             (let ((app_0
7241                                                                    (rx:unicode-categories-symlist
7242                                                                     rx_1)))
7243                                                               (unicode-categories-matcher
7244                                                                app_0
7245                                                                (rx:unicode-categories-match?
7246                                                                 rx_1)
7247                                                                next-m_0))
7248                                                             (error
7249                                                              'compile/bt
7250                                                              "internal error: unrecognized ~s"
7251                                                              rx_1)))))))))))))))))))))))))))))
7252        (compile_0 rx_0 done-m))))))
7253(define compile*/maybe
7254  (lambda (rx_0 min_0 max_0)
7255    (if (exact-integer? rx_0)
7256      (byte-matcher* rx_0 max_0)
7257      (if (bytes? rx_0)
7258        (bytes-matcher* rx_0 max_0)
7259        (if (eq? rx_0 'any)
7260          (any-matcher* max_0)
7261          (if (rx:range? rx_0)
7262            (range-matcher* (compile-range (rx:range-range rx_0)) max_0)
7263            #f))))))
7264(define finish_2797
7265  (make-struct-type-install-properties
7266   '(regexp)
7267   10
7268   0
7269   #f
7270   (list
7271    (cons
7272     prop:equal+hash
7273     (list
7274      (lambda (a_0 b_0 eql?_0)
7275        (if (let ((app_0 (rx:regexp-px? a_0))) (eq? app_0 (rx:regexp-px? b_0)))
7276          (let ((app_0 (rx:regexp-source a_0)))
7277            (equal? app_0 (rx:regexp-source b_0)))
7278          #f))
7279      (lambda (a_0 hc_0) (|#%app| hc_0 (rx:regexp-source a_0)))
7280      (lambda (a_0 hc_0) (|#%app| hc_0 (rx:regexp-source a_0)))))
7281    (cons prop:object-name 2)
7282    (cons
7283     prop:custom-write
7284     (lambda (rx_0 port_0 mode_0)
7285       (begin
7286         (write-bytes (if (rx:regexp-px? rx_0) #vu8(35 112 120) #vu8(35 114 120)) port_0)
7287         (write (rx:regexp-source rx_0) port_0)))))
7288   (current-inspector)
7289   #f
7290   '(0 1 2 3 4 5 6 7 8 9)
7291   #f
7292   'rx:regexp))
7293(define struct:rx:regexp
7294  (make-record-type-descriptor*
7295   'regexp
7296   #f
7297   (|#%nongenerative-uid| regexp)
7298   #f
7299   #f
7300   10
7301   0))
7302(define effect_2726 (finish_2797 struct:rx:regexp))
7303(define rx:regexp1.1
7304  (|#%name|
7305   rx:regexp
7306   (record-constructor
7307    (make-record-constructor-descriptor struct:rx:regexp #f #f))))
7308(define rx:regexp?_2382 (|#%name| regexp? (record-predicate struct:rx:regexp)))
7309(define rx:regexp?
7310  (|#%name|
7311   regexp?
7312   (lambda (v)
7313     (if (rx:regexp?_2382 v)
7314       #t
7315       ($value
7316        (if (impersonator? v) (rx:regexp?_2382 (impersonator-val v)) #f))))))
7317(define rx:regexp-bytes?_3116
7318  (|#%name| regexp-bytes? (record-accessor struct:rx:regexp 0)))
7319(define rx:regexp-bytes?
7320  (|#%name|
7321   regexp-bytes?
7322   (lambda (s)
7323     (if (rx:regexp?_2382 s)
7324       (rx:regexp-bytes?_3116 s)
7325       ($value
7326        (impersonate-ref
7327         rx:regexp-bytes?_3116
7328         struct:rx:regexp
7329         0
7330         s
7331         'regexp
7332         'bytes?))))))
7333(define rx:regexp-px?_2839
7334  (|#%name| regexp-px? (record-accessor struct:rx:regexp 1)))
7335(define rx:regexp-px?
7336  (|#%name|
7337   regexp-px?
7338   (lambda (s)
7339     (if (rx:regexp?_2382 s)
7340       (rx:regexp-px?_2839 s)
7341       ($value
7342        (impersonate-ref
7343         rx:regexp-px?_2839
7344         struct:rx:regexp
7345         1
7346         s
7347         'regexp
7348         'px?))))))
7349(define rx:regexp-source_2786
7350  (|#%name| regexp-source (record-accessor struct:rx:regexp 2)))
7351(define rx:regexp-source
7352  (|#%name|
7353   regexp-source
7354   (lambda (s)
7355     (if (rx:regexp?_2382 s)
7356       (rx:regexp-source_2786 s)
7357       ($value
7358        (impersonate-ref
7359         rx:regexp-source_2786
7360         struct:rx:regexp
7361         2
7362         s
7363         'regexp
7364         'source))))))
7365(define rx:regexp-matcher_2640
7366  (|#%name| regexp-matcher (record-accessor struct:rx:regexp 3)))
7367(define rx:regexp-matcher
7368  (|#%name|
7369   regexp-matcher
7370   (lambda (s)
7371     (if (rx:regexp?_2382 s)
7372       (rx:regexp-matcher_2640 s)
7373       ($value
7374        (impersonate-ref
7375         rx:regexp-matcher_2640
7376         struct:rx:regexp
7377         3
7378         s
7379         'regexp
7380         'matcher))))))
7381(define rx:regexp-num-groups_2013
7382  (|#%name| regexp-num-groups (record-accessor struct:rx:regexp 4)))
7383(define rx:regexp-num-groups
7384  (|#%name|
7385   regexp-num-groups
7386   (lambda (s)
7387     (if (rx:regexp?_2382 s)
7388       (rx:regexp-num-groups_2013 s)
7389       ($value
7390        (impersonate-ref
7391         rx:regexp-num-groups_2013
7392         struct:rx:regexp
7393         4
7394         s
7395         'regexp
7396         'num-groups))))))
7397(define rx:regexp-references?_2683
7398  (|#%name| regexp-references? (record-accessor struct:rx:regexp 5)))
7399(define rx:regexp-references?
7400  (|#%name|
7401   regexp-references?
7402   (lambda (s)
7403     (if (rx:regexp?_2382 s)
7404       (rx:regexp-references?_2683 s)
7405       ($value
7406        (impersonate-ref
7407         rx:regexp-references?_2683
7408         struct:rx:regexp
7409         5
7410         s
7411         'regexp
7412         'references?))))))
7413(define rx:regexp-max-lookbehind_2091
7414  (|#%name| regexp-max-lookbehind (record-accessor struct:rx:regexp 6)))
7415(define rx:regexp-max-lookbehind
7416  (|#%name|
7417   regexp-max-lookbehind
7418   (lambda (s)
7419     (if (rx:regexp?_2382 s)
7420       (rx:regexp-max-lookbehind_2091 s)
7421       ($value
7422        (impersonate-ref
7423         rx:regexp-max-lookbehind_2091
7424         struct:rx:regexp
7425         6
7426         s
7427         'regexp
7428         'max-lookbehind))))))
7429(define rx:regexp-anchored?_2381
7430  (|#%name| regexp-anchored? (record-accessor struct:rx:regexp 7)))
7431(define rx:regexp-anchored?
7432  (|#%name|
7433   regexp-anchored?
7434   (lambda (s)
7435     (if (rx:regexp?_2382 s)
7436       (rx:regexp-anchored?_2381 s)
7437       ($value
7438        (impersonate-ref
7439         rx:regexp-anchored?_2381
7440         struct:rx:regexp
7441         7
7442         s
7443         'regexp
7444         'anchored?))))))
7445(define rx:regexp-must-string_2180
7446  (|#%name| regexp-must-string (record-accessor struct:rx:regexp 8)))
7447(define rx:regexp-must-string
7448  (|#%name|
7449   regexp-must-string
7450   (lambda (s)
7451     (if (rx:regexp?_2382 s)
7452       (rx:regexp-must-string_2180 s)
7453       ($value
7454        (impersonate-ref
7455         rx:regexp-must-string_2180
7456         struct:rx:regexp
7457         8
7458         s
7459         'regexp
7460         'must-string))))))
7461(define rx:regexp-start-range_2644
7462  (|#%name| regexp-start-range (record-accessor struct:rx:regexp 9)))
7463(define rx:regexp-start-range
7464  (|#%name|
7465   regexp-start-range
7466   (lambda (s)
7467     (if (rx:regexp?_2382 s)
7468       (rx:regexp-start-range_2644 s)
7469       ($value
7470        (impersonate-ref
7471         rx:regexp-start-range_2644
7472         struct:rx:regexp
7473         9
7474         s
7475         'regexp
7476         'start-range))))))
7477(define make-regexp
7478  (lambda (who_0 orig-p_0 px?_0 as-bytes?_0 handler_0)
7479    (call-with-continuation-prompt
7480     (lambda ()
7481       (let ((p_0
7482              (if (bytes? orig-p_0)
7483                (bytes->immutable-bytes orig-p_0)
7484                (string->immutable-string orig-p_0))))
7485         (call-with-values
7486          (lambda () (parse.1 px?_0 p_0))
7487          (case-lambda
7488           ((raw-rx_0 num-groups_0 references?_0)
7489            (let ((rx_0 (if as-bytes?_0 raw-rx_0 (convert raw-rx_0))))
7490              (let ((max-lookbehind_0 (validate rx_0 num-groups_0)))
7491                (let ((matcher_0 (1/compile rx_0)))
7492                  (let ((app_0 (anchored? rx_0)))
7493                    (let ((app_1 (get-must-string rx_0)))
7494                      (rx:regexp1.1
7495                       as-bytes?_0
7496                       px?_0
7497                       p_0
7498                       matcher_0
7499                       num-groups_0
7500                       references?_0
7501                       max-lookbehind_0
7502                       app_0
7503                       app_1
7504                       (get-start-range rx_0))))))))
7505           (args (raise-binding-result-arity-error 3 args))))))
7506     regexp-error-tag
7507     (lambda (str_0)
7508       (if handler_0
7509         (|#%app| handler_0 str_0)
7510         (raise-arguments-error who_0 str_0 "pattern" orig-p_0))))))
7511(define 1/regexp?
7512  (|#%name|
7513   regexp?
7514   (lambda (v_0)
7515     (begin (if (rx:regexp? v_0) (not (rx:regexp-bytes? v_0)) #f)))))
7516(define 1/byte-regexp?
7517  (|#%name|
7518   byte-regexp?
7519   (lambda (v_0) (begin (if (rx:regexp? v_0) (rx:regexp-bytes? v_0) #f)))))
7520(define 1/pregexp?
7521  (|#%name|
7522   pregexp?
7523   (lambda (v_0)
7524     (begin
7525       (if (rx:regexp? v_0)
7526         (if (not (rx:regexp-bytes? v_0)) (rx:regexp-px? v_0) #f)
7527         #f)))))
7528(define 1/byte-pregexp?
7529  (|#%name|
7530   byte-pregexp?
7531   (lambda (v_0)
7532     (begin
7533       (if (rx:regexp? v_0)
7534         (if (rx:regexp-bytes? v_0) (rx:regexp-px? v_0) #f)
7535         #f)))))
7536(define copy-port-bytes
7537  (lambda (in_0 out_0 n_0)
7538    (let ((bstr_0 (make-bytes (min 4096 (if n_0 n_0 4096)))))
7539      (let ((copy_0
7540             (|#%name|
7541              copy
7542              (lambda (got_0 expect_0)
7543                (begin
7544                  (if (eof-object? got_0)
7545                    #f
7546                    (begin
7547                      (if out_0 (write-bytes bstr_0 out_0 0 got_0) (void))
7548                      (let ((or-part_0 (if (not n_0) (positive? got_0) #f)))
7549                        (if or-part_0
7550                          or-part_0
7551                          (if n_0 (= got_0 expect_0) #f))))))))))
7552        (letrec*
7553         ((loop_0
7554           (|#%name|
7555            loop
7556            (lambda (n_1)
7557              (begin
7558                (if (if n_1 (< n_1 4096) #f)
7559                  (copy_0 (read-bytes! bstr_0 in_0 0 n_1) n_1)
7560                  (if (copy_0 (read-bytes! bstr_0 in_0) 4096)
7561                    (loop_0 (if n_1 (- n_1 4096) #f))
7562                    #f)))))))
7563         (loop_0 n_0))))))
7564(define open-input-bytes/no-copy
7565  (lambda (bstr_0 pos_0 end_0)
7566    (let ((fill!_0
7567           (|#%name|
7568            fill!
7569            (lambda (dest-bstr_0 skip_0)
7570              (begin
7571                (let ((pos+skip_0 (+ pos_0 skip_0)))
7572                  (if (>= pos+skip_0 end_0)
7573                    eof
7574                    (let ((len_0
7575                           (min
7576                            (unsafe-bytes-length dest-bstr_0)
7577                            (- end_0 pos+skip_0))))
7578                      (begin
7579                        (unsafe-bytes-copy!
7580                         dest-bstr_0
7581                         0
7582                         bstr_0
7583                         pos+skip_0
7584                         (+ pos+skip_0 len_0))
7585                        len_0)))))))))
7586      (make-input-port
7587       'bytes
7588       (lambda (dest-bstr_0)
7589         (let ((len_0 (fill!_0 dest-bstr_0 0)))
7590           (begin
7591             (if (eof-object? len_0) (void) (set! pos_0 (+ len_0 pos_0)))
7592             len_0)))
7593       (lambda (dest-bstr_0 skip_0 evt_0) (fill!_0 dest-bstr_0 skip_0))
7594       void))))
7595(define open-input-string/lazy
7596  (lambda (str_0 pos_0 end_0)
7597    (let ((bstr_0 (make-bytes 64)))
7598      (let ((bstr-pos_0 0))
7599        (let ((bstr-end_0 0))
7600          (letrec*
7601           ((fill!_0
7602             (|#%name|
7603              fill!
7604              (lambda (dest-bstr_0 skip_0)
7605                (begin
7606                  (let ((bstr-pos+skip_0 (+ bstr-pos_0 skip_0)))
7607                    (begin
7608                      (if (>= bstr-pos+skip_0 bstr-end_0)
7609                        (decode-more!_0 (add1 bstr-pos+skip_0))
7610                        (void))
7611                      (if (>= bstr-pos+skip_0 bstr-end_0)
7612                        eof
7613                        (let ((len_0
7614                               (min
7615                                (unsafe-bytes-length dest-bstr_0)
7616                                (- bstr-end_0 bstr-pos+skip_0))))
7617                          (begin
7618                            (let ((app_0 bstr_0))
7619                              (unsafe-bytes-copy!
7620                               dest-bstr_0
7621                               0
7622                               app_0
7623                               bstr-pos+skip_0
7624                               (+ bstr-pos+skip_0 len_0)))
7625                            len_0)))))))))
7626            (decode-more!_0
7627             (|#%name|
7628              decode-more!
7629              (lambda (target-pos_0)
7630                (begin
7631                  (if (= pos_0 end_0)
7632                    (void)
7633                    (let ((len_0 (min 64 (- end_0 pos_0))))
7634                      (let ((new-bstr_0
7635                             (let ((app_0 pos_0))
7636                               (string->bytes/utf-8
7637                                str_0
7638                                0
7639                                app_0
7640                                (+ pos_0 len_0)))))
7641                        (begin
7642                          (set! pos_0 (+ len_0 pos_0))
7643                          (let ((new-len_0 (unsafe-bytes-length new-bstr_0)))
7644                            (begin
7645                              (if (<
7646                                   (let ((app_0 (unsafe-bytes-length bstr_0)))
7647                                     (- app_0 bstr-end_0))
7648                                   new-len_0)
7649                                (let ((bstr2_0
7650                                       (make-bytes
7651                                        (let ((app_0
7652                                               (*
7653                                                (unsafe-bytes-length bstr_0)
7654                                                2)))
7655                                          (max
7656                                           app_0
7657                                           (+ bstr-end_0 new-len_0))))))
7658                                  (begin
7659                                    (let ((app_0 bstr_0))
7660                                      (unsafe-bytes-copy!
7661                                       bstr2_0
7662                                       0
7663                                       app_0
7664                                       0
7665                                       bstr-end_0))
7666                                    (set! bstr_0 bstr2_0)))
7667                                (void))
7668                              (let ((app_0 bstr_0))
7669                                (unsafe-bytes-copy!
7670                                 app_0
7671                                 bstr-end_0
7672                                 new-bstr_0))
7673                              (set! bstr-end_0 (+ bstr-end_0 new-len_0))
7674                              (if (< bstr-end_0 target-pos_0)
7675                                (decode-more!_0 target-pos_0)
7676                                (void)))))))))))))
7677           (make-input-port
7678            'string
7679            (lambda (dest-bstr_0)
7680              (let ((len_0 (fill!_0 dest-bstr_0 0)))
7681                (begin
7682                  (if (eof-object? len_0)
7683                    (void)
7684                    (set! bstr-pos_0 (+ bstr-pos_0 len_0)))
7685                  len_0)))
7686            (lambda (dest-bstr_0 skip_0 evt_0) (fill!_0 dest-bstr_0 skip_0))
7687            void)))))))
7688(define byte-positions->byte-positions.1
7689  (|#%name|
7690   byte-positions->byte-positions
7691   (lambda (delta1_0 ms-pos3_0 me-pos4_0 state5_0)
7692     (begin
7693       (if (not state5_0)
7694         (list
7695          (let ((app_0 (+ ms-pos3_0 delta1_0)))
7696            (cons app_0 (+ me-pos4_0 delta1_0))))
7697         (if (zero? delta1_0)
7698           (let ((app_0 (cons ms-pos3_0 me-pos4_0)))
7699             (cons app_0 (vector->list state5_0)))
7700           (let ((app_0
7701                  (let ((app_0 (+ ms-pos3_0 delta1_0)))
7702                    (cons app_0 (+ me-pos4_0 delta1_0)))))
7703             (cons
7704              app_0
7705              (reverse$1
7706               (call-with-values
7707                (lambda ()
7708                  (begin
7709                    (check-vector state5_0)
7710                    (values state5_0 (unsafe-vector-length state5_0))))
7711                (case-lambda
7712                 ((vec_0 len_0)
7713                  (begin
7714                    #f
7715                    (letrec*
7716                     ((for-loop_0
7717                       (|#%name|
7718                        for-loop
7719                        (lambda (fold-var_0 pos_0)
7720                          (begin
7721                            (if (unsafe-fx< pos_0 len_0)
7722                              (let ((p_0 (unsafe-vector-ref vec_0 pos_0)))
7723                                (let ((fold-var_1
7724                                       (let ((fold-var_1
7725                                              (cons
7726                                               (if p_0
7727                                                 (let ((app_1
7728                                                        (+
7729                                                         (car p_0)
7730                                                         delta1_0)))
7731                                                   (cons
7732                                                    app_1
7733                                                    (+ (cdr p_0) delta1_0)))
7734                                                 #f)
7735                                               fold-var_0)))
7736                                         (values fold-var_1))))
7737                                  (for-loop_0
7738                                   fold-var_1
7739                                   (unsafe-fx+ 1 pos_0))))
7740                              fold-var_0))))))
7741                     (for-loop_0 null 0))))
7742                 (args (raise-binding-result-arity-error 2 args)))))))))))))
7743(define byte-positions->bytess.1
7744  (|#%name|
7745   byte-positions->bytess
7746   (lambda (delta7_0 in9_0 ms-pos10_0 me-pos11_0 state12_0)
7747     (begin
7748       (let ((app_0
7749              (let ((app_0 (- ms-pos10_0 delta7_0)))
7750                (subbytes in9_0 app_0 (- me-pos11_0 delta7_0)))))
7751         (cons
7752          app_0
7753          (if state12_0
7754            (reverse$1
7755             (call-with-values
7756              (lambda ()
7757                (begin
7758                  (check-vector state12_0)
7759                  (values state12_0 (unsafe-vector-length state12_0))))
7760              (case-lambda
7761               ((vec_0 len_0)
7762                (begin
7763                  #f
7764                  (letrec*
7765                   ((for-loop_0
7766                     (|#%name|
7767                      for-loop
7768                      (lambda (fold-var_0 pos_0)
7769                        (begin
7770                          (if (unsafe-fx< pos_0 len_0)
7771                            (let ((p_0 (unsafe-vector-ref vec_0 pos_0)))
7772                              (let ((fold-var_1
7773                                     (let ((fold-var_1
7774                                            (cons
7775                                             (if p_0
7776                                               (let ((app_1
7777                                                      (- (car p_0) delta7_0)))
7778                                                 (subbytes
7779                                                  in9_0
7780                                                  app_1
7781                                                  (- (cdr p_0) delta7_0)))
7782                                               #f)
7783                                             fold-var_0)))
7784                                       (values fold-var_1))))
7785                                (for-loop_0 fold-var_1 (unsafe-fx+ 1 pos_0))))
7786                            fold-var_0))))))
7787                   (for-loop_0 null 0))))
7788               (args (raise-binding-result-arity-error 2 args)))))
7789            null)))))))
7790(define byte-positions->string-positions.1
7791  (|#%name|
7792   byte-positions->string-positions
7793   (lambda (delta15_0
7794            result-offset16_0
7795            start-index14_0
7796            bstr-in20_0
7797            ms-pos21_0
7798            me-pos22_0
7799            state23_0)
7800     (begin
7801       (let ((string-offset_0
7802              (|#%name|
7803               string-offset
7804               (lambda (pos_0)
7805                 (begin
7806                   (let ((end-index_0 (- pos_0 delta15_0)))
7807                     (if (< end-index_0 start-index14_0)
7808                       (-
7809                        result-offset16_0
7810                        (bytes-utf-8-length
7811                         bstr-in20_0
7812                         '#\x3f
7813                         end-index_0
7814                         start-index14_0))
7815                       (+
7816                        result-offset16_0
7817                        (bytes-utf-8-length
7818                         bstr-in20_0
7819                         '#\x3f
7820                         start-index14_0
7821                         end-index_0)))))))))
7822         (let ((app_0
7823                (let ((app_0 (string-offset_0 ms-pos21_0)))
7824                  (cons app_0 (string-offset_0 me-pos22_0)))))
7825           (cons
7826            app_0
7827            (if state23_0
7828              (reverse$1
7829               (call-with-values
7830                (lambda ()
7831                  (begin
7832                    (check-vector state23_0)
7833                    (values state23_0 (unsafe-vector-length state23_0))))
7834                (case-lambda
7835                 ((vec_0 len_0)
7836                  (begin
7837                    #f
7838                    (letrec*
7839                     ((for-loop_0
7840                       (|#%name|
7841                        for-loop
7842                        (lambda (fold-var_0 pos_0)
7843                          (begin
7844                            (if (unsafe-fx< pos_0 len_0)
7845                              (let ((p_0 (unsafe-vector-ref vec_0 pos_0)))
7846                                (let ((fold-var_1
7847                                       (let ((fold-var_1
7848                                              (cons
7849                                               (if p_0
7850                                                 (let ((app_1
7851                                                        (string-offset_0
7852                                                         (car p_0))))
7853                                                   (cons
7854                                                    app_1
7855                                                    (string-offset_0
7856                                                     (cdr p_0))))
7857                                                 #f)
7858                                               fold-var_0)))
7859                                         (values fold-var_1))))
7860                                  (for-loop_0
7861                                   fold-var_1
7862                                   (unsafe-fx+ 1 pos_0))))
7863                              fold-var_0))))))
7864                     (for-loop_0 null 0))))
7865                 (args (raise-binding-result-arity-error 2 args)))))
7866              null))))))))
7867(define byte-positions->strings.1
7868  (|#%name|
7869   byte-positions->strings
7870   (lambda (delta25_0 bstr-in27_0 ms-pos28_0 me-pos29_0 state30_0)
7871     (begin
7872       (let ((app_0
7873              (let ((app_0 (- ms-pos28_0 delta25_0)))
7874                (bytes->string/utf-8
7875                 bstr-in27_0
7876                 '#\x3f
7877                 app_0
7878                 (- me-pos29_0 delta25_0)))))
7879         (cons
7880          app_0
7881          (if state30_0
7882            (reverse$1
7883             (call-with-values
7884              (lambda ()
7885                (begin
7886                  (check-vector state30_0)
7887                  (values state30_0 (unsafe-vector-length state30_0))))
7888              (case-lambda
7889               ((vec_0 len_0)
7890                (begin
7891                  #f
7892                  (letrec*
7893                   ((for-loop_0
7894                     (|#%name|
7895                      for-loop
7896                      (lambda (fold-var_0 pos_0)
7897                        (begin
7898                          (if (unsafe-fx< pos_0 len_0)
7899                            (let ((p_0 (unsafe-vector-ref vec_0 pos_0)))
7900                              (let ((fold-var_1
7901                                     (let ((fold-var_1
7902                                            (cons
7903                                             (if p_0
7904                                               (let ((app_1
7905                                                      (- (car p_0) delta25_0)))
7906                                                 (bytes->string/utf-8
7907                                                  bstr-in27_0
7908                                                  '#\x3f
7909                                                  app_1
7910                                                  (- (cdr p_0) delta25_0)))
7911                                               #f)
7912                                             fold-var_0)))
7913                                       (values fold-var_1))))
7914                                (for-loop_0 fold-var_1 (unsafe-fx+ 1 pos_0))))
7915                            fold-var_0))))))
7916                   (for-loop_0 null 0))))
7917               (args (raise-binding-result-arity-error 2 args)))))
7918            null)))))))
7919(define byte-index->string-index
7920  (lambda (str_0 start-pos_0 pos_0)
7921    (letrec*
7922     ((loop_0
7923       (|#%name|
7924        loop
7925        (lambda (lo-pos_0 lo_0 hi_0)
7926          (begin
7927            (if (= lo_0 hi_0)
7928              lo_0
7929              (if (= (add1 lo_0) hi_0)
7930                (if (= lo-pos_0 pos_0) lo_0 hi_0)
7931                (let ((mid_0 (quotient (+ lo_0 hi_0) 2)))
7932                  (let ((len_0
7933                         (let ((app_0 (+ start-pos_0 lo_0)))
7934                           (string-utf-8-length
7935                            str_0
7936                            app_0
7937                            (+ start-pos_0 mid_0)))))
7938                    (let ((mid-pos_0 (+ lo-pos_0 len_0)))
7939                      (if (= mid-pos_0 pos_0)
7940                        mid_0
7941                        (if (> mid-pos_0 pos_0)
7942                          (loop_0 lo-pos_0 lo_0 mid_0)
7943                          (loop_0 (+ lo-pos_0 len_0) mid_0 hi_0)))))))))))))
7944     (loop_0
7945      0
7946      0
7947      (let ((app_0 (- (string-length str_0) start-pos_0)))
7948        (min app_0 (* pos_0 6)))))))
7949(define add-end-bytes
7950  (lambda (results_0 end-bytes-count_0 bstr_0 me-pos_0)
7951    (if end-bytes-count_0
7952      (values
7953       results_0
7954       (if results_0
7955         (subbytes bstr_0 (max 0 (- me-pos_0 end-bytes-count_0)) me-pos_0)
7956         #f))
7957      results_0)))
7958(define interp
7959  (lambda (m_0 s_0 pos_0 start_0 limit/end_0 state_0)
7960    (|#%app| m_0 s_0 pos_0 start_0 limit/end_0 limit/end_0 state_0 null)))
7961(define search-match
7962  (lambda (rx_0 in_0 pos_0 start-pos_0 end-pos_0 state_0)
7963    (let ((must-string_0 (rx:regexp-must-string rx_0)))
7964      (if (not (check-must-string must-string_0 in_0 pos_0 end-pos_0))
7965        (values #f #f)
7966        (let ((matcher_0 (rx:regexp-matcher rx_0)))
7967          (let ((anchored?_0 (rx:regexp-anchored? rx_0)))
7968            (let ((start-range_0 (rx:regexp-start-range rx_0)))
7969              (letrec*
7970               ((loop_0
7971                 (|#%name|
7972                  loop
7973                  (lambda (pos_1)
7974                    (begin
7975                      (if (if anchored?_0 (not (= pos_1 start-pos_0)) #f)
7976                        (values #f #f)
7977                        (if (if start-range_0
7978                              (if (bytes? in_0)
7979                                (= pos_1 end-pos_0)
7980                                (not
7981                                 (lazy-bytes-before-end?
7982                                  in_0
7983                                  pos_1
7984                                  end-pos_0)))
7985                              #f)
7986                          (values #f #f)
7987                          (if (if start-range_0
7988                                (not
7989                                 (check-start-range
7990                                  start-range_0
7991                                  in_0
7992                                  pos_1
7993                                  end-pos_0))
7994                                #f)
7995                            (loop_0 (add1 pos_1))
7996                            (let ((pos2_0
7997                                   (begin-unsafe
7998                                    (|#%app|
7999                                     matcher_0
8000                                     in_0
8001                                     pos_1
8002                                     start-pos_0
8003                                     end-pos_0
8004                                     end-pos_0
8005                                     state_0
8006                                     null))))
8007                              (if pos2_0
8008                                (values pos_1 pos2_0)
8009                                (if start-range_0
8010                                  (loop_0 (add1 pos_1))
8011                                  (if (if (bytes? in_0)
8012                                        (< pos_1 end-pos_0)
8013                                        (lazy-bytes-before-end?
8014                                         in_0
8015                                         pos_1
8016                                         end-pos_0))
8017                                    (let ((pos2_1 (add1 pos_1)))
8018                                      (begin
8019                                        (if (bytes? in_0)
8020                                          (void)
8021                                          (lazy-bytes-advance! in_0 pos2_1 #f))
8022                                        (loop_0 pos2_1)))
8023                                    (values #f #f)))))))))))))
8024               (loop_0 pos_0)))))))))
8025(define check-must-string
8026  (lambda (must-string_0 in_0 pos_0 end-pos_0)
8027    (if (not must-string_0)
8028      #t
8029      (if (not (bytes? in_0))
8030        #t
8031        (if (bytes? must-string_0)
8032          (if (= 1 (unsafe-bytes-length must-string_0))
8033            (let ((mc_0 (unsafe-bytes-ref must-string_0 0)))
8034              (call-with-values
8035               (lambda ()
8036                 (unsafe-normalise-inputs
8037                  unsafe-bytes-length
8038                  in_0
8039                  pos_0
8040                  end-pos_0
8041                  1))
8042               (case-lambda
8043                ((v*_0 start*_0 stop*_0 step*_0)
8044                 (begin
8045                   #t
8046                   (letrec*
8047                    ((for-loop_0
8048                      (|#%name|
8049                       for-loop
8050                       (lambda (result_0 idx_0)
8051                         (begin
8052                           (if (unsafe-fx< idx_0 stop*_0)
8053                             (let ((c_0 (unsafe-bytes-ref v*_0 idx_0)))
8054                               (let ((result_1
8055                                      (let ((result_1 (= c_0 mc_0)))
8056                                        (values result_1))))
8057                                 (if (if (not
8058                                          (let ((x_0 (list c_0))) result_1))
8059                                       #t
8060                                       #f)
8061                                   (for-loop_0 result_1 (unsafe-fx+ idx_0 1))
8062                                   result_1)))
8063                             result_0))))))
8064                    (for-loop_0 #f start*_0))))
8065                (args (raise-binding-result-arity-error 4 args)))))
8066            (let ((mc1_0 (unsafe-bytes-ref must-string_0 0)))
8067              (let ((end_0
8068                     (- end-pos_0 (sub1 (unsafe-bytes-length must-string_0)))))
8069                (begin
8070                  (letrec*
8071                   ((for-loop_0
8072                     (|#%name|
8073                      for-loop
8074                      (lambda (result_0 pos_1)
8075                        (begin
8076                          (if (< pos_1 end_0)
8077                            (let ((result_1
8078                                   (let ((result_1
8079                                          (if (=
8080                                               mc1_0
8081                                               (unsafe-bytes-ref in_0 pos_1))
8082                                            (call-with-values
8083                                             (lambda ()
8084                                               (unsafe-normalise-inputs
8085                                                unsafe-bytes-length
8086                                                in_0
8087                                                (add1 pos_1)
8088                                                #f
8089                                                1))
8090                                             (case-lambda
8091                                              ((v*_0 start*_0 stop*_0 step*_0)
8092                                               (call-with-values
8093                                                (lambda ()
8094                                                  (unsafe-normalise-inputs
8095                                                   unsafe-bytes-length
8096                                                   must-string_0
8097                                                   1
8098                                                   #f
8099                                                   1))
8100                                                (case-lambda
8101                                                 ((v*_1
8102                                                   start*_1
8103                                                   stop*_1
8104                                                   step*_1)
8105                                                  (let ((v*_2 v*_0)
8106                                                        (start*_2 start*_0)
8107                                                        (stop*_2 stop*_0)
8108                                                        (step*_2 step*_0))
8109                                                    (begin
8110                                                      #t
8111                                                      #t
8112                                                      (letrec*
8113                                                       ((for-loop_1
8114                                                         (|#%name|
8115                                                          for-loop
8116                                                          (lambda (result_1
8117                                                                   idx_0
8118                                                                   idx_1)
8119                                                            (begin
8120                                                              (if (if (unsafe-fx<
8121                                                                       idx_0
8122                                                                       stop*_2)
8123                                                                    (unsafe-fx<
8124                                                                     idx_1
8125                                                                     stop*_1)
8126                                                                    #f)
8127                                                                (let ((c_0
8128                                                                       (unsafe-bytes-ref
8129                                                                        v*_2
8130                                                                        idx_0)))
8131                                                                  (let ((mc_0
8132                                                                         (unsafe-bytes-ref
8133                                                                          v*_1
8134                                                                          idx_1)))
8135                                                                    (let ((c_1
8136                                                                           c_0))
8137                                                                      (let ((result_2
8138                                                                             (let ((result_2
8139                                                                                    (=
8140                                                                                     c_1
8141                                                                                     mc_0)))
8142                                                                               (values
8143                                                                                result_2))))
8144                                                                        (if (if (not
8145                                                                                 (let ((x_0
8146                                                                                        (list
8147                                                                                         c_1)))
8148                                                                                   (not
8149                                                                                    result_2)))
8150                                                                              (if (not
8151                                                                                   (let ((x_0
8152                                                                                          (list
8153                                                                                           mc_0)))
8154                                                                                     (not
8155                                                                                      result_2)))
8156                                                                                #t
8157                                                                                #f)
8158                                                                              #f)
8159                                                                          (for-loop_1
8160                                                                           result_2
8161                                                                           (unsafe-fx+
8162                                                                            idx_0
8163                                                                            1)
8164                                                                           (unsafe-fx+
8165                                                                            idx_1
8166                                                                            1))
8167                                                                          result_2)))))
8168                                                                result_1))))))
8169                                                       (for-loop_1
8170                                                        #t
8171                                                        start*_2
8172                                                        start*_1)))))
8173                                                 (args
8174                                                  (raise-binding-result-arity-error
8175                                                   4
8176                                                   args)))))
8177                                              (args
8178                                               (raise-binding-result-arity-error
8179                                                4
8180                                                args))))
8181                                            #f)))
8182                                     (values result_1))))
8183                              (if (if (not (let ((x_0 (list pos_1))) result_1))
8184                                    #t
8185                                    #f)
8186                                (for-loop_0 result_1 (+ pos_1 1))
8187                                result_1))
8188                            result_0))))))
8189                   (for-loop_0 #f pos_0))))))
8190          (let ((end_0 (- end-pos_0 (sub1 (length must-string_0)))))
8191            (begin
8192              (letrec*
8193               ((for-loop_0
8194                 (|#%name|
8195                  for-loop
8196                  (lambda (result_0 pos_1)
8197                    (begin
8198                      (if (< pos_1 end_0)
8199                        (let ((result_1
8200                               (let ((result_1
8201                                      (letrec*
8202                                       ((loop_0
8203                                         (|#%name|
8204                                          loop
8205                                          (lambda (i_0 l_0)
8206                                            (begin
8207                                              (if (null? l_0)
8208                                                #t
8209                                                (let ((e_0 (car l_0)))
8210                                                  (if (let ((v_0
8211                                                             (unsafe-bytes-ref
8212                                                              in_0
8213                                                              i_0)))
8214                                                        (begin-unsafe
8215                                                         (eq?
8216                                                          1
8217                                                          (unsafe-bytes-ref
8218                                                           e_0
8219                                                           v_0))))
8220                                                    (let ((app_0 (add1 i_0)))
8221                                                      (loop_0 app_0 (cdr l_0)))
8222                                                    #f))))))))
8223                                       (loop_0 pos_1 must-string_0))))
8224                                 (values result_1))))
8225                          (if (if (not (let ((x_0 (list pos_1))) result_1))
8226                                #t
8227                                #f)
8228                            (for-loop_0 result_1 (+ pos_1 1))
8229                            result_1))
8230                        result_0))))))
8231               (for-loop_0 #f pos_0)))))))))
8232(define check-start-range
8233  (lambda (start-range_0 in_0 pos_0 end-pos_0)
8234    (let ((v_0
8235           (if (bytes? in_0)
8236             (unsafe-bytes-ref in_0 pos_0)
8237             (lazy-bytes-ref in_0 pos_0))))
8238      (begin-unsafe (eq? 1 (unsafe-bytes-ref start-range_0 v_0))))))
8239(define FAST-STRING-LEN 64)
8240(define fast-drive-regexp-match?/bytes
8241  (lambda (rx_0 in_0 start-pos_0 end-pos_0)
8242    (let ((state_0
8243           (if (rx:regexp-references? rx_0)
8244             (make-vector (rx:regexp-num-groups rx_0) #f)
8245             #f)))
8246      (call-with-values
8247       (lambda ()
8248         (search-match
8249          rx_0
8250          in_0
8251          start-pos_0
8252          start-pos_0
8253          (if end-pos_0 end-pos_0 (unsafe-bytes-length in_0))
8254          state_0))
8255       (case-lambda
8256        ((ms-pos_0 me-pos_0) (if ms-pos_0 #t #f))
8257        (args (raise-binding-result-arity-error 2 args)))))))
8258(define fast-drive-regexp-match?/string
8259  (lambda (rx_0 in-str_0 start-offset_0 end-offset_0)
8260    (let ((state_0
8261           (if (rx:regexp-references? rx_0)
8262             (make-vector (rx:regexp-num-groups rx_0) #f)
8263             #f)))
8264      (let ((in_0
8265             (string->bytes/utf-8
8266              in-str_0
8267              0
8268              start-offset_0
8269              (if end-offset_0 end-offset_0 (string-length in-str_0)))))
8270        (call-with-values
8271         (lambda ()
8272           (search-match rx_0 in_0 0 0 (unsafe-bytes-length in_0) state_0))
8273         (case-lambda
8274          ((ms-pos_0 me-pos_0) (if ms-pos_0 #t #f))
8275          (args (raise-binding-result-arity-error 2 args))))))))
8276(define fast-drive-regexp-match-positions/bytes
8277  (lambda (rx_0 in_0 start-pos_0 end-pos_0)
8278    (let ((state_0
8279           (let ((n_0 (rx:regexp-num-groups rx_0)))
8280             (if (positive? n_0) (make-vector n_0 #f) #f))))
8281      (call-with-values
8282       (lambda ()
8283         (search-match
8284          rx_0
8285          in_0
8286          start-pos_0
8287          start-pos_0
8288          (if end-pos_0 end-pos_0 (unsafe-bytes-length in_0))
8289          state_0))
8290       (case-lambda
8291        ((ms-pos_0 me-pos_0)
8292         (if ms-pos_0
8293           (if state_0
8294             (let ((app_0 (cons ms-pos_0 me-pos_0)))
8295               (cons app_0 (vector->list state_0)))
8296             (list (cons ms-pos_0 me-pos_0)))
8297           #f))
8298        (args (raise-binding-result-arity-error 2 args)))))))
8299(define fast-drive-regexp-match-positions/string
8300  (lambda (rx_0 in-str_0 start-offset_0 end-offset_0)
8301    (let ((in_0
8302           (string->bytes/utf-8
8303            in-str_0
8304            0
8305            start-offset_0
8306            (if end-offset_0 end-offset_0 (string-length in-str_0)))))
8307      (let ((state_0
8308             (let ((n_0 (rx:regexp-num-groups rx_0)))
8309               (if (positive? n_0) (make-vector n_0 #f) #f))))
8310        (call-with-values
8311         (lambda ()
8312           (search-match rx_0 in_0 0 0 (unsafe-bytes-length in_0) state_0))
8313         (case-lambda
8314          ((ms-pos_0 me-pos_0)
8315           (let ((string-offset_0
8316                  (|#%name|
8317                   string-offset
8318                   (lambda (pos_0)
8319                     (begin
8320                       (+
8321                        start-offset_0
8322                        (bytes-utf-8-length in_0 '#\x3f 0 pos_0)))))))
8323             (if ms-pos_0
8324               (let ((app_0
8325                      (let ((app_0 (string-offset_0 ms-pos_0)))
8326                        (cons app_0 (string-offset_0 me-pos_0)))))
8327                 (cons
8328                  app_0
8329                  (if state_0
8330                    (reverse$1
8331                     (call-with-values
8332                      (lambda ()
8333                        (begin
8334                          (check-vector state_0)
8335                          (values state_0 (unsafe-vector-length state_0))))
8336                      (case-lambda
8337                       ((vec_0 len_0)
8338                        (begin
8339                          #f
8340                          (letrec*
8341                           ((for-loop_0
8342                             (|#%name|
8343                              for-loop
8344                              (lambda (fold-var_0 pos_0)
8345                                (begin
8346                                  (if (unsafe-fx< pos_0 len_0)
8347                                    (let ((p_0
8348                                           (unsafe-vector-ref vec_0 pos_0)))
8349                                      (let ((fold-var_1
8350                                             (let ((fold-var_1
8351                                                    (cons
8352                                                     (if p_0
8353                                                       (let ((app_1
8354                                                              (string-offset_0
8355                                                               (car p_0))))
8356                                                         (cons
8357                                                          app_1
8358                                                          (string-offset_0
8359                                                           (cdr p_0))))
8360                                                       #f)
8361                                                     fold-var_0)))
8362                                               (values fold-var_1))))
8363                                        (for-loop_0
8364                                         fold-var_1
8365                                         (unsafe-fx+ 1 pos_0))))
8366                                    fold-var_0))))))
8367                           (for-loop_0 null 0))))
8368                       (args (raise-binding-result-arity-error 2 args)))))
8369                    null)))
8370               #f)))
8371          (args (raise-binding-result-arity-error 2 args))))))))
8372(define fast-drive-regexp-match/bytes
8373  (lambda (rx_0 in_0 start-pos_0 end-pos_0)
8374    (let ((state_0
8375           (let ((n_0 (rx:regexp-num-groups rx_0)))
8376             (if (positive? n_0) (make-vector n_0 #f) #f))))
8377      (call-with-values
8378       (lambda ()
8379         (search-match
8380          rx_0
8381          in_0
8382          start-pos_0
8383          start-pos_0
8384          (if end-pos_0 end-pos_0 (unsafe-bytes-length in_0))
8385          state_0))
8386       (case-lambda
8387        ((ms-pos_0 me-pos_0)
8388         (if ms-pos_0
8389           (let ((app_0 (subbytes in_0 ms-pos_0 me-pos_0)))
8390             (cons
8391              app_0
8392              (if state_0
8393                (reverse$1
8394                 (call-with-values
8395                  (lambda ()
8396                    (begin
8397                      (check-vector state_0)
8398                      (values state_0 (unsafe-vector-length state_0))))
8399                  (case-lambda
8400                   ((vec_0 len_0)
8401                    (begin
8402                      #f
8403                      (letrec*
8404                       ((for-loop_0
8405                         (|#%name|
8406                          for-loop
8407                          (lambda (fold-var_0 pos_0)
8408                            (begin
8409                              (if (unsafe-fx< pos_0 len_0)
8410                                (let ((p_0 (unsafe-vector-ref vec_0 pos_0)))
8411                                  (let ((fold-var_1
8412                                         (let ((fold-var_1
8413                                                (cons
8414                                                 (if p_0
8415                                                   (let ((app_1 (car p_0)))
8416                                                     (subbytes
8417                                                      in_0
8418                                                      app_1
8419                                                      (cdr p_0)))
8420                                                   #f)
8421                                                 fold-var_0)))
8422                                           (values fold-var_1))))
8423                                    (for-loop_0
8424                                     fold-var_1
8425                                     (unsafe-fx+ 1 pos_0))))
8426                                fold-var_0))))))
8427                       (for-loop_0 null 0))))
8428                   (args (raise-binding-result-arity-error 2 args)))))
8429                null)))
8430           #f))
8431        (args (raise-binding-result-arity-error 2 args)))))))
8432(define fast-drive-regexp-match/string
8433  (lambda (rx_0 in-str_0 start-offset_0 end-offset_0)
8434    (let ((in_0
8435           (string->bytes/utf-8
8436            in-str_0
8437            0
8438            start-offset_0
8439            (if end-offset_0 end-offset_0 (string-length in-str_0)))))
8440      (let ((state_0
8441             (let ((n_0 (rx:regexp-num-groups rx_0)))
8442               (if (positive? n_0) (make-vector n_0 #f) #f))))
8443        (call-with-values
8444         (lambda ()
8445           (search-match rx_0 in_0 0 0 (unsafe-bytes-length in_0) state_0))
8446         (case-lambda
8447          ((ms-pos_0 me-pos_0)
8448           (if ms-pos_0
8449             (let ((app_0 (bytes->string/utf-8 in_0 '#\x3f ms-pos_0 me-pos_0)))
8450               (cons
8451                app_0
8452                (if state_0
8453                  (reverse$1
8454                   (call-with-values
8455                    (lambda ()
8456                      (begin
8457                        (check-vector state_0)
8458                        (values state_0 (unsafe-vector-length state_0))))
8459                    (case-lambda
8460                     ((vec_0 len_0)
8461                      (begin
8462                        #f
8463                        (letrec*
8464                         ((for-loop_0
8465                           (|#%name|
8466                            for-loop
8467                            (lambda (fold-var_0 pos_0)
8468                              (begin
8469                                (if (unsafe-fx< pos_0 len_0)
8470                                  (let ((p_0 (unsafe-vector-ref vec_0 pos_0)))
8471                                    (let ((fold-var_1
8472                                           (let ((fold-var_1
8473                                                  (cons
8474                                                   (if p_0
8475                                                     (let ((app_1 (car p_0)))
8476                                                       (bytes->string/utf-8
8477                                                        in_0
8478                                                        '#\x3f
8479                                                        app_1
8480                                                        (cdr p_0)))
8481                                                     #f)
8482                                                   fold-var_0)))
8483                                             (values fold-var_1))))
8484                                      (for-loop_0
8485                                       fold-var_1
8486                                       (unsafe-fx+ 1 pos_0))))
8487                                  fold-var_0))))))
8488                         (for-loop_0 null 0))))
8489                     (args (raise-binding-result-arity-error 2 args)))))
8490                  null)))
8491             #f))
8492          (args (raise-binding-result-arity-error 2 args))))))))
8493(define drive-regexp-match.1
8494  (|#%name|
8495   drive-regexp-match
8496   (lambda (end-bytes-count9_0
8497            end-bytes?8_0
8498            immediate-only?6_0
8499            in-path-ok?4_0
8500            in-port-ok?3_0
8501            mode2_0
8502            peek?5_0
8503            progress-evt7_0
8504            search-offset1_0
8505            who19_0
8506            orig-rx20_0
8507            orig-in21_0
8508            orig-start-offset22_0
8509            orig-end-offset23_0
8510            out24_0
8511            prefix25_0)
8512     (begin
8513       (let ((search-offset_0
8514              (if (eq? search-offset1_0 unsafe-undefined)
8515                orig-start-offset22_0
8516                search-offset1_0)))
8517         (let ((rx_0
8518                (if (rx:regexp? orig-rx20_0)
8519                  orig-rx20_0
8520                  (if (string? orig-rx20_0)
8521                    (make-regexp who19_0 orig-rx20_0 #f #f #f)
8522                    (if (bytes? orig-rx20_0)
8523                      (make-regexp who19_0 orig-rx20_0 #f #t #f)
8524                      (raise-argument-error
8525                       who19_0
8526                       "(or/c regexp? byte-regexp? string? bytes?)"
8527                       orig-rx20_0))))))
8528           (let ((in_0
8529                  (if (if in-path-ok?4_0 (path? orig-in21_0) #f)
8530                    (if (rx:regexp-bytes? rx_0)
8531                      (path->bytes orig-in21_0)
8532                      (path->string orig-in21_0))
8533                    orig-in21_0)))
8534             (begin
8535               (if (let ((or-part_0 (if (bytes? in_0) (not peek?5_0) #f)))
8536                     (if or-part_0
8537                       or-part_0
8538                       (let ((or-part_1 (if (string? in_0) (not peek?5_0) #f)))
8539                         (if or-part_1
8540                           or-part_1
8541                           (if in-port-ok?3_0 (input-port? in_0) #f)))))
8542                 (void)
8543                 (raise-argument-error
8544                  who19_0
8545                  (if peek?5_0
8546                    "input-port?"
8547                    (if in-port-ok?3_0
8548                      "(or/c bytes? string? input-port? path?)"
8549                      (if in-path-ok?4_0
8550                        "(or/c bytes? string? path?)"
8551                        "(or/c bytes? string?)")))
8552                  orig-in21_0))
8553               (let ((start-offset_0
8554                      (if orig-start-offset22_0
8555                        (begin
8556                          (if (exact-nonnegative-integer?
8557                               orig-start-offset22_0)
8558                            (void)
8559                            (raise-argument-error
8560                             who19_0
8561                             "exact-nonnegative-integer?"
8562                             orig-start-offset22_0))
8563                          (check-range
8564                           who19_0
8565                           "starting index"
8566                           in_0
8567                           orig-start-offset22_0
8568                           0)
8569                          orig-start-offset22_0)
8570                        0)))
8571                 (let ((end-offset_0
8572                        (if orig-end-offset23_0
8573                          (begin
8574                            (if (exact-nonnegative-integer?
8575                                 orig-end-offset23_0)
8576                              (void)
8577                              (raise-argument-error
8578                               who19_0
8579                               "(or/c #f exact-nonnegative-integer?)"
8580                               orig-end-offset23_0))
8581                            (check-range
8582                             who19_0
8583                             "ending index"
8584                             in_0
8585                             orig-end-offset23_0
8586                             start-offset_0)
8587                            orig-end-offset23_0)
8588                          (if (bytes? in_0)
8589                            (unsafe-bytes-length in_0)
8590                            (if (string? in_0) (string-length in_0) 'eof)))))
8591                   (begin
8592                     (if (let ((or-part_0 (not out24_0)))
8593                           (if or-part_0 or-part_0 (output-port? out24_0)))
8594                       (void)
8595                       (raise-argument-error
8596                        who19_0
8597                        "(or/c #f output-port?)"
8598                        out24_0))
8599                     (begin
8600                       (if (bytes? prefix25_0)
8601                         (void)
8602                         (raise-argument-error who19_0 "bytes?" prefix25_0))
8603                       (begin
8604                         (if end-bytes?8_0
8605                           (if (exact-nonnegative-integer? end-bytes-count9_0)
8606                             (void)
8607                             (raise-argument-error
8608                              who19_0
8609                              "exact-nonnegative-integer?"
8610                              end-bytes-count9_0))
8611                           (void))
8612                         (let ((state_0
8613                                (if (let ((or-part_0 (not (eq? mode2_0 '?))))
8614                                      (if or-part_0
8615                                        or-part_0
8616                                        (rx:regexp-references? rx_0)))
8617                                  (let ((n_0 (rx:regexp-num-groups rx_0)))
8618                                    (if (positive? n_0)
8619                                      (make-vector n_0 #f)
8620                                      #f))
8621                                  #f)))
8622                           (if (if (bytes? in_0)
8623                                 (if (not out24_0) (equal? #vu8() prefix25_0) #f)
8624                                 #f)
8625                             (call-with-values
8626                              (lambda ()
8627                                (search-match
8628                                 rx_0
8629                                 in_0
8630                                 search-offset_0
8631                                 start-offset_0
8632                                 end-offset_0
8633                                 state_0))
8634                              (case-lambda
8635                               ((ms-pos_0 me-pos_0)
8636                                (begin
8637                                  (if out24_0
8638                                    (write-bytes
8639                                     in_0
8640                                     out24_0
8641                                     0
8642                                     (if ms-pos_0 ms-pos_0 end-offset_0))
8643                                    (void))
8644                                  (let ((tmp_0 (if ms-pos_0 mode2_0 #f)))
8645                                    (if (eq? tmp_0 #f)
8646                                      (add-end-bytes
8647                                       #f
8648                                       end-bytes-count9_0
8649                                       #f
8650                                       #f)
8651                                      (if (eq? tmp_0 '?)
8652                                        #t
8653                                        (if (eq? tmp_0 'positions)
8654                                          (let ((positions_0
8655                                                 (byte-positions->byte-positions.1
8656                                                  0
8657                                                  ms-pos_0
8658                                                  me-pos_0
8659                                                  state_0)))
8660                                            (add-end-bytes
8661                                             positions_0
8662                                             end-bytes-count9_0
8663                                             in_0
8664                                             me-pos_0))
8665                                          (if (eq? tmp_0 'strings)
8666                                            (let ((bytess_0
8667                                                   (byte-positions->bytess.1
8668                                                    0
8669                                                    in_0
8670                                                    ms-pos_0
8671                                                    me-pos_0
8672                                                    state_0)))
8673                                              (add-end-bytes
8674                                               bytess_0
8675                                               end-bytes-count9_0
8676                                               in_0
8677                                               me-pos_0))
8678                                            (void))))))))
8679                               (args
8680                                (raise-binding-result-arity-error 2 args))))
8681                             (if (if (string? in_0)
8682                                   (if (not out24_0)
8683                                     (if (equal? #vu8() prefix25_0)
8684                                       (< (- end-offset_0 start-offset_0) 64)
8685                                       #f)
8686                                     #f)
8687                                   #f)
8688                               (let ((bstr-in_0
8689                                      (string->bytes/utf-8
8690                                       in_0
8691                                       0
8692                                       start-offset_0
8693                                       end-offset_0)))
8694                                 (let ((search-pos_0
8695                                        (if (= start-offset_0 search-offset_0)
8696                                          0
8697                                          (string-utf-8-length
8698                                           in_0
8699                                           start-offset_0
8700                                           search-offset_0))))
8701                                   (let ((end-pos_0
8702                                          (unsafe-bytes-length bstr-in_0)))
8703                                     (call-with-values
8704                                      (lambda ()
8705                                        (search-match
8706                                         rx_0
8707                                         bstr-in_0
8708                                         search-pos_0
8709                                         0
8710                                         end-pos_0
8711                                         state_0))
8712                                      (case-lambda
8713                                       ((ms-pos_0 me-pos_0)
8714                                        (begin
8715                                          (if out24_0
8716                                            (begin
8717                                              (write-string
8718                                               in_0
8719                                               out24_0
8720                                               0
8721                                               start-offset_0)
8722                                              (write-bytes
8723                                               bstr-in_0
8724                                               out24_0
8725                                               0
8726                                               (if ms-pos_0
8727                                                 ms-pos_0
8728                                                 end-pos_0)))
8729                                            (void))
8730                                          (let ((tmp_0
8731                                                 (if ms-pos_0 mode2_0 #f)))
8732                                            (if (eq? tmp_0 #f)
8733                                              (add-end-bytes
8734                                               #f
8735                                               end-bytes-count9_0
8736                                               #f
8737                                               #f)
8738                                              (if (eq? tmp_0 '?)
8739                                                #t
8740                                                (if (eq? tmp_0 'positions)
8741                                                  (let ((positions_0
8742                                                         (if (rx:regexp-bytes?
8743                                                              rx_0)
8744                                                           (let ((delta_0
8745                                                                  (string-utf-8-length
8746                                                                   in_0
8747                                                                   0
8748                                                                   start-offset_0)))
8749                                                             (byte-positions->byte-positions.1
8750                                                              delta_0
8751                                                              ms-pos_0
8752                                                              me-pos_0
8753                                                              state_0))
8754                                                           (byte-positions->string-positions.1
8755                                                            0
8756                                                            start-offset_0
8757                                                            0
8758                                                            bstr-in_0
8759                                                            ms-pos_0
8760                                                            me-pos_0
8761                                                            state_0))))
8762                                                    (add-end-bytes
8763                                                     positions_0
8764                                                     end-bytes-count9_0
8765                                                     bstr-in_0
8766                                                     me-pos_0))
8767                                                  (if (eq? tmp_0 'strings)
8768                                                    (let ((bytes/strings_0
8769                                                           (if (rx:regexp-bytes?
8770                                                                rx_0)
8771                                                             (byte-positions->bytess.1
8772                                                              0
8773                                                              bstr-in_0
8774                                                              ms-pos_0
8775                                                              me-pos_0
8776                                                              state_0)
8777                                                             (byte-positions->strings.1
8778                                                              0
8779                                                              bstr-in_0
8780                                                              ms-pos_0
8781                                                              me-pos_0
8782                                                              state_0))))
8783                                                      (add-end-bytes
8784                                                       bytes/strings_0
8785                                                       end-bytes-count9_0
8786                                                       bstr-in_0
8787                                                       me-pos_0))
8788                                                    (void))))))))
8789                                       (args
8790                                        (raise-binding-result-arity-error
8791                                         2
8792                                         args)))))))
8793                               (let ((prefix-len_0
8794                                      (unsafe-bytes-length prefix25_0)))
8795                                 (let ((search-pos_0
8796                                        (if (= start-offset_0 search-offset_0)
8797                                          prefix-len_0
8798                                          (+
8799                                           prefix-len_0
8800                                           (if (string? in_0)
8801                                             (string-utf-8-length
8802                                              in_0
8803                                              start-offset_0
8804                                              search-offset_0)
8805                                             (-
8806                                              search-offset_0
8807                                              start-offset_0))))))
8808                                   (let ((port-in_0
8809                                          (if (bytes? in_0)
8810                                            (open-input-bytes/no-copy
8811                                             in_0
8812                                             start-offset_0
8813                                             end-offset_0)
8814                                            (if (string? in_0)
8815                                              (open-input-string/lazy
8816                                               in_0
8817                                               start-offset_0
8818                                               end-offset_0)
8819                                              in_0))))
8820                                     (let ((any-bytes-left?_0
8821                                            (if (if (input-port? in_0)
8822                                                  (positive? start-offset_0)
8823                                                  #f)
8824                                              (if peek?5_0
8825                                                (not
8826                                                 (eof-object?
8827                                                  (peek-byte
8828                                                   port-in_0
8829                                                   (sub1 start-offset_0))))
8830                                                (copy-port-bytes
8831                                                 port-in_0
8832                                                 #f
8833                                                 start-offset_0))
8834                                              #t)))
8835                                       (let ((lb-in_0
8836                                              (let ((skip-amt_0
8837                                                     (if peek?5_0
8838                                                       start-offset_0
8839                                                       0)))
8840                                                (let ((max-lookbehind_0
8841                                                       (let ((app_0
8842                                                              (rx:regexp-max-lookbehind
8843                                                               rx_0)))
8844                                                         (max
8845                                                          app_0
8846                                                          (if end-bytes-count9_0
8847                                                            end-bytes-count9_0
8848                                                            0)))))
8849                                                  (let ((max-peek_0
8850                                                         (if (input-port? in_0)
8851                                                           (if (not
8852                                                                (eq?
8853                                                                 'eof
8854                                                                 end-offset_0))
8855                                                             (-
8856                                                              end-offset_0
8857                                                              start-offset_0)
8858                                                             #f)
8859                                                           #f)))
8860                                                    (let ((max-lookbehind_1
8861                                                           max-lookbehind_0)
8862                                                          (skip-amt_1
8863                                                           skip-amt_0))
8864                                                      (begin-unsafe
8865                                                       (let ((len_0
8866                                                              (unsafe-bytes-length
8867                                                               prefix25_0)))
8868                                                         (lazy-bytes1.1
8869                                                          prefix25_0
8870                                                          len_0
8871                                                          port-in_0
8872                                                          skip-amt_1
8873                                                          len_0
8874                                                          peek?5_0
8875                                                          immediate-only?6_0
8876                                                          progress-evt7_0
8877                                                          out24_0
8878                                                          max-lookbehind_1
8879                                                          #f
8880                                                          0
8881                                                          max-peek_0)))))))))
8882                                         (let ((end-pos_0
8883                                                (if (let ((or-part_0
8884                                                           (eq?
8885                                                            'eof
8886                                                            end-offset_0)))
8887                                                      (if or-part_0
8888                                                        or-part_0
8889                                                        (string? in_0)))
8890                                                  'eof
8891                                                  (+
8892                                                   prefix-len_0
8893                                                   (-
8894                                                    end-offset_0
8895                                                    start-offset_0)))))
8896                                           (call-with-values
8897                                            (lambda ()
8898                                              (if any-bytes-left?_0
8899                                                (search-match
8900                                                 rx_0
8901                                                 lb-in_0
8902                                                 search-pos_0
8903                                                 0
8904                                                 end-pos_0
8905                                                 state_0)
8906                                                (values #f #f)))
8907                                            (case-lambda
8908                                             ((ms-pos_0 me-pos_0)
8909                                              (let ((write/consume-skipped_0
8910                                                     (|#%name|
8911                                                      write/consume-skipped
8912                                                      (lambda ()
8913                                                        (begin
8914                                                          (if (not peek?5_0)
8915                                                            (if ms-pos_0
8916                                                              (begin
8917                                                                (if out24_0
8918                                                                  (lazy-bytes-advance!
8919                                                                   lb-in_0
8920                                                                   ms-pos_0
8921                                                                   #t)
8922                                                                  (void))
8923                                                                (if (input-port?
8924                                                                     in_0)
8925                                                                  (copy-port-bytes
8926                                                                   port-in_0
8927                                                                   #f
8928                                                                   (-
8929                                                                    me-pos_0
8930                                                                    prefix-len_0))
8931                                                                  (void)))
8932                                                              (if (eq?
8933                                                                   end-pos_0
8934                                                                   'eof)
8935                                                                (if (if out24_0
8936                                                                      out24_0
8937                                                                      (input-port?
8938                                                                       in_0))
8939                                                                  (copy-port-bytes
8940                                                                   port-in_0
8941                                                                   out24_0
8942                                                                   #f)
8943                                                                  (void))
8944                                                                (begin
8945                                                                  (if out24_0
8946                                                                    (lazy-bytes-advance!
8947                                                                     lb-in_0
8948                                                                     end-pos_0
8949                                                                     #t)
8950                                                                    (void))
8951                                                                  (if (input-port?
8952                                                                       in_0)
8953                                                                    (copy-port-bytes
8954                                                                     port-in_0
8955                                                                     #f
8956                                                                     (-
8957                                                                      end-pos_0
8958                                                                      prefix-len_0))
8959                                                                    (void)))))
8960                                                            (void)))))))
8961                                                (begin0
8962                                                  (let ((tmp_0
8963                                                         (if ms-pos_0
8964                                                           (if (not
8965                                                                (lazy-bytes-failed?
8966                                                                 lb-in_0))
8967                                                             mode2_0
8968                                                             #f)
8969                                                           #f)))
8970                                                    (if (eq? tmp_0 #f)
8971                                                      (add-end-bytes
8972                                                       #f
8973                                                       end-bytes-count9_0
8974                                                       #f
8975                                                       #f)
8976                                                      (if (eq? tmp_0 '?)
8977                                                        #t
8978                                                        (if (eq?
8979                                                             tmp_0
8980                                                             'positions)
8981                                                          (let ((bstr_0
8982                                                                 (lazy-bytes-bstr
8983                                                                  lb-in_0)))
8984                                                            (let ((positions_0
8985                                                                   (if (let ((or-part_0
8986                                                                              (not
8987                                                                               (string?
8988                                                                                in_0))))
8989                                                                         (if or-part_0
8990                                                                           or-part_0
8991                                                                           (rx:regexp-bytes?
8992                                                                            rx_0)))
8993                                                                     (let ((delta_0
8994                                                                            (-
8995                                                                             start-offset_0
8996                                                                             prefix-len_0)))
8997                                                                       (byte-positions->byte-positions.1
8998                                                                        delta_0
8999                                                                        ms-pos_0
9000                                                                        me-pos_0
9001                                                                        state_0))
9002                                                                     (let ((ms-str-pos_0
9003                                                                            (byte-index->string-index
9004                                                                             in_0
9005                                                                             start-offset_0
9006                                                                             (-
9007                                                                              ms-pos_0
9008                                                                              prefix-len_0))))
9009                                                                       (let ((delta_0
9010                                                                              (lazy-bytes-discarded-count
9011                                                                               lb-in_0)))
9012                                                                         (let ((temp59_0
9013                                                                                (-
9014                                                                                 ms-pos_0
9015                                                                                 delta_0)))
9016                                                                           (let ((temp61_0
9017                                                                                  (+
9018                                                                                   ms-str-pos_0
9019                                                                                   start-offset_0)))
9020                                                                             (let ((temp59_1
9021                                                                                    temp59_0))
9022                                                                               (byte-positions->string-positions.1
9023                                                                                delta_0
9024                                                                                temp61_0
9025                                                                                temp59_1
9026                                                                                bstr_0
9027                                                                                ms-pos_0
9028                                                                                me-pos_0
9029                                                                                state_0)))))))))
9030                                                              (add-end-bytes
9031                                                               positions_0
9032                                                               end-bytes-count9_0
9033                                                               bstr_0
9034                                                               (-
9035                                                                me-pos_0
9036                                                                (lazy-bytes-discarded-count
9037                                                                 lb-in_0)))))
9038                                                          (if (eq?
9039                                                               tmp_0
9040                                                               'strings)
9041                                                            (let ((bstr_0
9042                                                                   (lazy-bytes-bstr
9043                                                                    lb-in_0)))
9044                                                              (let ((delta_0
9045                                                                     (lazy-bytes-discarded-count
9046                                                                      lb-in_0)))
9047                                                                (let ((bytes/strings_0
9048                                                                       (if (let ((or-part_0
9049                                                                                  (not
9050                                                                                   (string?
9051                                                                                    in_0))))
9052                                                                             (if or-part_0
9053                                                                               or-part_0
9054                                                                               (rx:regexp-bytes?
9055                                                                                rx_0)))
9056                                                                         (byte-positions->bytess.1
9057                                                                          delta_0
9058                                                                          bstr_0
9059                                                                          ms-pos_0
9060                                                                          me-pos_0
9061                                                                          state_0)
9062                                                                         (byte-positions->strings.1
9063                                                                          delta_0
9064                                                                          bstr_0
9065                                                                          ms-pos_0
9066                                                                          me-pos_0
9067                                                                          state_0))))
9068                                                                  (add-end-bytes
9069                                                                   bytes/strings_0
9070                                                                   end-bytes-count9_0
9071                                                                   bstr_0
9072                                                                   (-
9073                                                                    me-pos_0
9074                                                                    delta_0)))))
9075                                                            (void))))))
9076                                                  (write/consume-skipped_0))))
9077                                             (args
9078                                              (raise-binding-result-arity-error
9079                                               2
9080                                               args))))))))))))))))))))))))))
9081(define check-range
9082  (lambda (who_0 what_0 in_0 pos_0 start-pos_0)
9083    (let ((len_0
9084           (if (bytes? in_0)
9085             (unsafe-bytes-length in_0)
9086             (if (string? in_0) (string-length in_0) +inf.0))))
9087      (begin
9088        (if (>= pos_0 start-pos_0)
9089          (void)
9090          (raise-arguments-error
9091           who_0
9092           (format "~a is smaller than starting index" what_0)
9093           what_0
9094           pos_0
9095           "starting index"
9096           start-pos_0))
9097        (if (<= pos_0 len_0)
9098          (void)
9099          (raise-arguments-error
9100           who_0
9101           (format "~a is out of range" what_0)
9102           what_0
9103           pos_0))))))
9104(define chytes-ref
9105  (lambda (s_0 pos_0)
9106    (if (bytes? s_0)
9107      (unsafe-bytes-ref s_0 pos_0)
9108      (char->integer (string-ref s_0 pos_0)))))
9109(define subchytes
9110  (let ((subchytes_0
9111         (|#%name|
9112          subchytes
9113          (lambda (s2_0 a3_0 b1_0)
9114            (begin
9115              (if (bytes? s2_0)
9116                (subbytes s2_0 a3_0 (if b1_0 b1_0 (unsafe-bytes-length s2_0)))
9117                (substring s2_0 a3_0 (if b1_0 b1_0 (string-length s2_0)))))))))
9118    (case-lambda
9119     ((s_0 a_0) (subchytes_0 s_0 a_0 #f))
9120     ((s_0 a_0 b1_0) (subchytes_0 s_0 a_0 b1_0)))))
9121(define chytes-append
9122  (case-lambda
9123   ((a_0) a_0)
9124   ((a_0 b_0) (if (bytes? a_0) (bytes-append a_0 b_0) (string-append a_0 b_0)))
9125   ((a_0 b_0 c_0)
9126    (if (bytes? a_0) (bytes-append a_0 b_0 c_0) (string-append a_0 b_0 c_0)))
9127   ((a_0 . l_0)
9128    (if (bytes? a_0)
9129      (apply bytes-append a_0 l_0)
9130      (apply string-append a_0 l_0)))))
9131(define chytes?
9132  (lambda (ex_0 v_0) (if (bytes? ex_0) (bytes? v_0) (string? v_0))))
9133(define chytes-length
9134  (lambda (s_0)
9135    (if (bytes? s_0) (unsafe-bytes-length s_0) (string-length s_0))))
9136(define 1/regexp-replace
9137  (let ((regexp-replace_0
9138         (|#%name|
9139          regexp-replace
9140          (lambda (rx2_0 orig-in3_0 insert4_0 prefix1_0)
9141            (begin
9142              (do-regexp-replace
9143               'regexp-replace
9144               rx2_0
9145               orig-in3_0
9146               insert4_0
9147               prefix1_0
9148               #f))))))
9149    (|#%name|
9150     regexp-replace
9151     (case-lambda
9152      ((rx_0 orig-in_0 insert_0)
9153       (begin (regexp-replace_0 rx_0 orig-in_0 insert_0 #vu8())))
9154      ((rx_0 orig-in_0 insert_0 prefix1_0)
9155       (regexp-replace_0 rx_0 orig-in_0 insert_0 prefix1_0))))))
9156(define 1/regexp-replace*
9157  (let ((regexp-replace*_0
9158         (|#%name|
9159          regexp-replace*
9160          (lambda (rx6_0 orig-in7_0 insert8_0 prefix5_0)
9161            (begin
9162              (do-regexp-replace
9163               'regexp-replace*
9164               rx6_0
9165               orig-in7_0
9166               insert8_0
9167               prefix5_0
9168               #t))))))
9169    (|#%name|
9170     regexp-replace*
9171     (case-lambda
9172      ((rx_0 orig-in_0 insert_0)
9173       (begin (regexp-replace*_0 rx_0 orig-in_0 insert_0 #vu8())))
9174      ((rx_0 orig-in_0 insert_0 prefix5_0)
9175       (regexp-replace*_0 rx_0 orig-in_0 insert_0 prefix5_0))))))
9176(define do-regexp-replace
9177  (lambda (who_0 rx-in_0 orig-in_0 insert_0 prefix_0 all?_0)
9178    (let ((string-mode?_0
9179           (if (let ((or-part_0 (string? rx-in_0)))
9180                 (if or-part_0 or-part_0 (1/regexp? rx-in_0)))
9181             (string? orig-in_0)
9182             #f)))
9183      (let ((in_0
9184             (if (if (not string-mode?_0) (string? orig-in_0) #f)
9185               (string->bytes/utf-8 orig-in_0)
9186               orig-in_0)))
9187        (begin
9188          (if (if string-mode?_0
9189                string-mode?_0
9190                (if (let ((or-part_0 (bytes? rx-in_0)))
9191                      (if or-part_0 or-part_0 (1/byte-regexp? rx-in_0)))
9192                  (let ((or-part_0 (string? orig-in_0)))
9193                    (if or-part_0 or-part_0 (bytes? orig-in_0)))
9194                  #f))
9195            (if (let ((or-part_0 (string? insert_0)))
9196                  (if or-part_0
9197                    or-part_0
9198                    (let ((or-part_1 (bytes? insert_0)))
9199                      (if or-part_1 or-part_1 (procedure? insert_0)))))
9200              (void)
9201              (raise-argument-error
9202               who_0
9203               "(or/c string? bytes? procedure?)"
9204               insert_0))
9205            (void))
9206          (begin
9207            (if string-mode?_0
9208              (if (bytes? insert_0)
9209                (raise-arguments-error
9210                 who_0
9211                 "cannot replace a string with a byte string"
9212                 "byte string"
9213                 insert_0)
9214                (void))
9215              (void))
9216            (let ((rx_0
9217                   (if (string? rx-in_0)
9218                     (make-regexp who_0 rx-in_0 #f #f #f)
9219                     (if (bytes? rx-in_0)
9220                       (make-regexp who_0 rx-in_0 #f #t #f)
9221                       rx-in_0))))
9222              (let ((ins_0
9223                     (if (if (not string-mode?_0) (string? insert_0) #f)
9224                       (string->bytes/utf-8 insert_0)
9225                       insert_0)))
9226                (let ((need-lookbehind_0 (rx:regexp-max-lookbehind rx_0)))
9227                  (letrec*
9228                   ((loop_0
9229                     (|#%name|
9230                      loop
9231                      (lambda (search-pos_0 get-list?_0)
9232                        (begin
9233                          (let ((use-prefix_0
9234                                 (if (< search-pos_0 need-lookbehind_0)
9235                                   prefix_0
9236                                   #f)))
9237                            (let ((in-start_0
9238                                   (if use-prefix_0
9239                                     0
9240                                     (max
9241                                      0
9242                                      (- search-pos_0 need-lookbehind_0)))))
9243                              (let ((poss_0
9244                                     (drive-regexp-match.1
9245                                      #f
9246                                      #f
9247                                      #f
9248                                      #f
9249                                      #f
9250                                      'positions
9251                                      #f
9252                                      #f
9253                                      search-pos_0
9254                                      who_0
9255                                      rx_0
9256                                      in_0
9257                                      in-start_0
9258                                      #f
9259                                      #f
9260                                      prefix_0)))
9261                                (let ((recur_0
9262                                       (|#%name|
9263                                        recur
9264                                        (lambda ()
9265                                          (begin
9266                                            (let ((end_0 (cdar poss_0)))
9267                                              (if (= (caar poss_0) end_0)
9268                                                (if (=
9269                                                     end_0
9270                                                     (chytes-length in_0))
9271                                                  null
9272                                                  (let ((app_0
9273                                                         (subchytes
9274                                                          in_0
9275                                                          end_0
9276                                                          (add1 end_0))))
9277                                                    (cons
9278                                                     app_0
9279                                                     (loop_0
9280                                                      (add1 end_0)
9281                                                      #t))))
9282                                                (loop_0 end_0 #t))))))))
9283                                  (if (not poss_0)
9284                                    (let ((result_0
9285                                           (if (zero? search-pos_0)
9286                                             in_0
9287                                             (subchytes in_0 search-pos_0))))
9288                                      (if get-list?_0
9289                                        (list result_0)
9290                                        result_0))
9291                                    (let ((pre_0
9292                                           (subchytes
9293                                            in_0
9294                                            search-pos_0
9295                                            (caar poss_0))))
9296                                      (let ((new_0
9297                                             (replacements
9298                                              who_0
9299                                              in_0
9300                                              poss_0
9301                                              ins_0
9302                                              prefix_0)))
9303                                        (if all?_0
9304                                          (let ((result_0
9305                                                 (list*
9306                                                  pre_0
9307                                                  new_0
9308                                                  (recur_0))))
9309                                            (if get-list?_0
9310                                              result_0
9311                                              (apply chytes-append result_0)))
9312                                          (chytes-append
9313                                           pre_0
9314                                           new_0
9315                                           (subchytes
9316                                            in_0
9317                                            (cdar poss_0))))))))))))))))
9318                   (loop_0 0 #f)))))))))))
9319(define replacements
9320  (lambda (who_0 in_0 poss_0 insert_0 prefix_0)
9321    (if (procedure? insert_0)
9322      (let ((a_0
9323             (apply
9324              insert_0
9325              (reverse$1
9326               (begin
9327                 (letrec*
9328                  ((for-loop_0
9329                    (|#%name|
9330                     for-loop
9331                     (lambda (fold-var_0 lst_0)
9332                       (begin
9333                         (if (pair? lst_0)
9334                           (let ((pos_0 (unsafe-car lst_0)))
9335                             (let ((rest_0 (unsafe-cdr lst_0)))
9336                               (let ((fold-var_1
9337                                      (let ((fold-var_1
9338                                             (cons
9339                                              (if pos_0
9340                                                (let ((app_0 (car pos_0)))
9341                                                  (subchytes*
9342                                                   in_0
9343                                                   app_0
9344                                                   (cdr pos_0)
9345                                                   prefix_0))
9346                                                #f)
9347                                              fold-var_0)))
9348                                        (values fold-var_1))))
9349                                 (for-loop_0 fold-var_1 rest_0))))
9350                           fold-var_0))))))
9351                  (for-loop_0 null poss_0)))))))
9352        (begin
9353          (if (chytes? in_0 a_0)
9354            (void)
9355            (raise-result-error
9356             who_0
9357             (if (bytes? in_0) "bytes?" "string?")
9358             a_0))
9359          a_0))
9360      (let ((count_0 (length poss_0)))
9361        (let ((get-chytes_0
9362               (|#%name|
9363                get-chytes
9364                (lambda (n_0)
9365                  (begin
9366                    (if (< n_0 count_0)
9367                      (let ((pos_0 (list-ref poss_0 n_0)))
9368                        (if pos_0
9369                          (let ((app_0 (car pos_0)))
9370                            (subchytes* in_0 app_0 (cdr pos_0) prefix_0))
9371                          (subchytes in_0 0 0)))
9372                      (subchytes in_0 0 0)))))))
9373          (let ((cons-chytes_0
9374                 (|#%name|
9375                  cons-chytes
9376                  (lambda (since_0 pos_0 l_0)
9377                    (begin
9378                      (if (= since_0 pos_0)
9379                        l_0
9380                        (cons (subchytes insert_0 since_0 pos_0) l_0)))))))
9381            (let ((len_0 (chytes-length insert_0)))
9382              (let ((app_0 (if (bytes? insert_0) bytes-append string-append)))
9383                (apply
9384                 app_0
9385                 (letrec*
9386                  ((loop_0
9387                    (|#%name|
9388                     loop
9389                     (lambda (pos_0 since_0)
9390                       (begin
9391                         (if (= pos_0 len_0)
9392                           (cons-chytes_0 since_0 pos_0 null)
9393                           (if (= 38 (chytes-ref insert_0 pos_0))
9394                             (cons-chytes_0
9395                              since_0
9396                              pos_0
9397                              (let ((app_1 (get-chytes_0 0)))
9398                                (cons
9399                                 app_1
9400                                 (let ((app_2 (add1 pos_0)))
9401                                   (loop_0 app_2 (add1 pos_0))))))
9402                             (if (= 92 (chytes-ref insert_0 pos_0))
9403                               (cons-chytes_0
9404                                since_0
9405                                pos_0
9406                                (let ((c_0
9407                                       (if (< (add1 pos_0) len_0)
9408                                         (chytes-ref insert_0 (add1 pos_0))
9409                                         #f)))
9410                                  (if (let ((or-part_0 (eq? c_0 38)))
9411                                        (if or-part_0 or-part_0 (eq? c_0 92)))
9412                                    (let ((app_1 (+ pos_0 2)))
9413                                      (loop_0 app_1 (add1 pos_0)))
9414                                    (if (eq? c_0 36)
9415                                      (let ((app_1 (+ pos_0 2)))
9416                                        (loop_0 app_1 (+ pos_0 2)))
9417                                      (letrec*
9418                                       ((d-loop_0
9419                                         (|#%name|
9420                                          d-loop
9421                                          (lambda (pos_1 accum_0)
9422                                            (begin
9423                                              (if (= pos_1 len_0)
9424                                                (list (get-chytes_0 accum_0))
9425                                                (let ((c_1
9426                                                       (chytes-ref
9427                                                        insert_0
9428                                                        pos_1)))
9429                                                  (if (if (>= c_1 48)
9430                                                        (<= c_1 57)
9431                                                        #f)
9432                                                    (let ((app_1 (add1 pos_1)))
9433                                                      (d-loop_0
9434                                                       app_1
9435                                                       (let ((app_2
9436                                                              (* accum_0 10)))
9437                                                         (+
9438                                                          app_2
9439                                                          (- c_1 48)))))
9440                                                    (let ((app_1
9441                                                           (get-chytes_0
9442                                                            accum_0)))
9443                                                      (cons
9444                                                       app_1
9445                                                       (loop_0
9446                                                        pos_1
9447                                                        pos_1)))))))))))
9448                                       (d-loop_0 (add1 pos_0) 0))))))
9449                               (loop_0 (add1 pos_0) since_0)))))))))
9450                  (loop_0 0 0)))))))))))
9451(define subchytes*
9452  (lambda (in_0 start_0 end_0 prefix_0)
9453    (if (< start_0 0)
9454      (let ((len_0 (unsafe-bytes-length prefix_0)))
9455        (if (string? in_0)
9456          (letrec*
9457           ((loop_0
9458             (|#%name|
9459              loop
9460              (lambda (index_0 start_1 end-index_0 end_1)
9461                (begin
9462                  (if (zero? start_1)
9463                    (let ((pre-part_0
9464                           (bytes->string/utf-8
9465                            (subbytes prefix_0 index_0 end-index_0))))
9466                      (if (> end_1 0)
9467                        (string-append pre-part_0 (substring in_0 0 end_1))
9468                        pre-part_0))
9469                    (letrec*
9470                     ((bloop_0
9471                       (|#%name|
9472                        bloop
9473                        (lambda (index_1)
9474                          (begin
9475                            (let ((b_0 (unsafe-bytes-ref prefix_0 index_1)))
9476                              (if (let ((or-part_0
9477                                         (not (bitwise-bit-set? b_0 7))))
9478                                    (if or-part_0
9479                                      or-part_0
9480                                      (bitwise-bit-set? b_0 6)))
9481                                (if (>= end_1 0)
9482                                  (loop_0
9483                                   index_1
9484                                   (add1 start_1)
9485                                   end-index_0
9486                                   end_1)
9487                                  (let ((app_0 (add1 start_1)))
9488                                    (loop_0
9489                                     index_1
9490                                     app_0
9491                                     index_1
9492                                     (add1 end_1))))
9493                                (bloop_0 (sub1 index_1)))))))))
9494                     (bloop_0 (sub1 index_0)))))))))
9495           (loop_0 len_0 start_0 len_0 end_0))
9496          (let ((pre-part_0
9497                 (let ((app_0 (+ (unsafe-bytes-length prefix_0) start_0)))
9498                   (subbytes
9499                    prefix_0
9500                    app_0
9501                    (+ (unsafe-bytes-length prefix_0) (min 0 end_0))))))
9502            (if (> end_0 0)
9503              (bytes-append pre-part_0 (subbytes in_0 0 end_0))
9504              pre-part_0))))
9505      (subchytes in_0 start_0 end_0))))
9506(define 1/regexp
9507  (let ((regexp_0
9508         (|#%name|
9509          regexp
9510          (lambda (p2_0 handler1_0)
9511            (begin
9512              (begin
9513                (if (string? p2_0)
9514                  (void)
9515                  (raise-argument-error 'regexp "string?" p2_0))
9516                (make-regexp 'regexp p2_0 #f #f handler1_0)))))))
9517    (|#%name|
9518     regexp
9519     (case-lambda
9520      ((p_0) (begin (regexp_0 p_0 #f)))
9521      ((p_0 handler1_0) (regexp_0 p_0 handler1_0))))))
9522(define 1/byte-regexp
9523  (let ((byte-regexp_0
9524         (|#%name|
9525          byte-regexp
9526          (lambda (p4_0 handler3_0)
9527            (begin
9528              (begin
9529                (if (bytes? p4_0)
9530                  (void)
9531                  (raise-argument-error 'byte-regexp "bytes?" p4_0))
9532                (make-regexp 'byte-regexp p4_0 #f #t handler3_0)))))))
9533    (|#%name|
9534     byte-regexp
9535     (case-lambda
9536      ((p_0) (begin (byte-regexp_0 p_0 #f)))
9537      ((p_0 handler3_0) (byte-regexp_0 p_0 handler3_0))))))
9538(define 1/pregexp
9539  (let ((pregexp_0
9540         (|#%name|
9541          pregexp
9542          (lambda (p6_0 handler5_0)
9543            (begin
9544              (begin
9545                (if (string? p6_0)
9546                  (void)
9547                  (raise-argument-error 'pregexp "string?" p6_0))
9548                (make-regexp 'pregexp p6_0 #t #f handler5_0)))))))
9549    (|#%name|
9550     pregexp
9551     (case-lambda
9552      ((p_0) (begin (pregexp_0 p_0 #f)))
9553      ((p_0 handler5_0) (pregexp_0 p_0 handler5_0))))))
9554(define 1/byte-pregexp
9555  (let ((byte-pregexp_0
9556         (|#%name|
9557          byte-pregexp
9558          (lambda (p8_0 handler7_0)
9559            (begin
9560              (begin
9561                (if (bytes? p8_0)
9562                  (void)
9563                  (raise-argument-error 'byte-pregexp "bytes?" p8_0))
9564                (make-regexp 'byte-pregexp p8_0 #t #t handler7_0)))))))
9565    (|#%name|
9566     byte-pregexp
9567     (case-lambda
9568      ((p_0) (begin (byte-pregexp_0 p_0 #f)))
9569      ((p_0 handler7_0) (byte-pregexp_0 p_0 handler7_0))))))
9570(define 1/regexp-max-lookbehind
9571  (|#%name|
9572   regexp-max-lookbehind
9573   (lambda (rx_0)
9574     (begin
9575       (begin
9576         (if (let ((or-part_0 (1/regexp? rx_0)))
9577               (if or-part_0 or-part_0 (1/byte-regexp? rx_0)))
9578           (void)
9579           (raise-argument-error
9580            'regexp-max-lookbehind
9581            "(or regexp? byte-regexp?)"
9582            rx_0))
9583         (rx:regexp-max-lookbehind rx_0))))))
9584(define no-prefix #vu8())
9585(define fast-bytes?
9586  (lambda (rx_0 in_0 start-pos_0 end-pos_0 out_0 prefix_0)
9587    (if (1/byte-regexp? rx_0)
9588      (if (bytes? in_0)
9589        (if (exact-nonnegative-integer? start-pos_0)
9590          (if (let ((len_0 (unsafe-bytes-length in_0)))
9591                (if (<= start-pos_0 len_0)
9592                  (let ((or-part_0 (not end-pos_0)))
9593                    (if or-part_0
9594                      or-part_0
9595                      (if (exact-nonnegative-integer? end-pos_0)
9596                        (if (<= end-pos_0 len_0) (>= end-pos_0 start-pos_0) #f)
9597                        #f)))
9598                  #f))
9599            (if (not out_0) (eq? prefix_0 no-prefix) #f)
9600            #f)
9601          #f)
9602        #f)
9603      #f)))
9604(define fast-string?
9605  (lambda (rx_0 in_0 start-pos_0 end-pos_0 out_0 prefix_0)
9606    (if (1/regexp? rx_0)
9607      (if (string? in_0)
9608        (if (exact-nonnegative-integer? start-pos_0)
9609          (if (let ((len_0 (string-length in_0)))
9610                (if (< len_0 64)
9611                  (if (<= start-pos_0 len_0)
9612                    (let ((or-part_0 (not end-pos_0)))
9613                      (if or-part_0
9614                        or-part_0
9615                        (if (exact-nonnegative-integer? end-pos_0)
9616                          (if (<= end-pos_0 len_0)
9617                            (>= end-pos_0 start-pos_0)
9618                            #f)
9619                          #f)))
9620                    #f)
9621                  #f))
9622            (if (not out_0) (eq? prefix_0 no-prefix) #f)
9623            #f)
9624          #f)
9625        #f)
9626      #f)))
9627(define 1/regexp-match?
9628  (let ((regexp-match?_0
9629         (|#%name|
9630          regexp-match?
9631          (lambda (rx13_0 in14_0 start-pos9_0 end-pos10_0 out11_0 prefix12_0)
9632            (begin
9633              (let ((prefix_0
9634                     (if (eq? prefix12_0 unsafe-undefined)
9635                       no-prefix
9636                       prefix12_0)))
9637                (if (fast-bytes?
9638                     rx13_0
9639                     in14_0
9640                     start-pos9_0
9641                     end-pos10_0
9642                     out11_0
9643                     prefix_0)
9644                  (fast-drive-regexp-match?/bytes
9645                   rx13_0
9646                   in14_0
9647                   start-pos9_0
9648                   end-pos10_0)
9649                  (if (fast-string?
9650                       rx13_0
9651                       in14_0
9652                       start-pos9_0
9653                       end-pos10_0
9654                       out11_0
9655                       prefix_0)
9656                    (fast-drive-regexp-match?/string
9657                     rx13_0
9658                     in14_0
9659                     start-pos9_0
9660                     end-pos10_0)
9661                    (drive-regexp-match.1
9662                     #f
9663                     #f
9664                     #f
9665                     #t
9666                     #t
9667                     '?
9668                     #f
9669                     #f
9670                     unsafe-undefined
9671                     'regexp-match?
9672                     rx13_0
9673                     in14_0
9674                     start-pos9_0
9675                     end-pos10_0
9676                     out11_0
9677                     prefix_0)))))))))
9678    (|#%name|
9679     regexp-match?
9680     (case-lambda
9681      ((rx_0 in_0)
9682       (begin (regexp-match?_0 rx_0 in_0 0 #f #f unsafe-undefined)))
9683      ((rx_0 in_0 start-pos_0 end-pos_0 out_0 prefix12_0)
9684       (regexp-match?_0 rx_0 in_0 start-pos_0 end-pos_0 out_0 prefix12_0))
9685      ((rx_0 in_0 start-pos_0 end-pos_0 out11_0)
9686       (regexp-match?_0
9687        rx_0
9688        in_0
9689        start-pos_0
9690        end-pos_0
9691        out11_0
9692        unsafe-undefined))
9693      ((rx_0 in_0 start-pos_0 end-pos10_0)
9694       (regexp-match?_0 rx_0 in_0 start-pos_0 end-pos10_0 #f unsafe-undefined))
9695      ((rx_0 in_0 start-pos9_0)
9696       (regexp-match?_0 rx_0 in_0 start-pos9_0 #f #f unsafe-undefined))))))
9697(define 1/regexp-match-positions
9698  (let ((regexp-match-positions_0
9699         (|#%name|
9700          regexp-match-positions
9701          (lambda (rx19_0 in20_0 start-pos15_0 end-pos16_0 out17_0 prefix18_0)
9702            (begin
9703              (let ((prefix_0
9704                     (if (eq? prefix18_0 unsafe-undefined)
9705                       no-prefix
9706                       prefix18_0)))
9707                (if (fast-bytes?
9708                     rx19_0
9709                     in20_0
9710                     start-pos15_0
9711                     end-pos16_0
9712                     out17_0
9713                     prefix_0)
9714                  (fast-drive-regexp-match-positions/bytes
9715                   rx19_0
9716                   in20_0
9717                   start-pos15_0
9718                   end-pos16_0)
9719                  (if (fast-string?
9720                       rx19_0
9721                       in20_0
9722                       start-pos15_0
9723                       end-pos16_0
9724                       out17_0
9725                       prefix_0)
9726                    (fast-drive-regexp-match-positions/string
9727                     rx19_0
9728                     in20_0
9729                     start-pos15_0
9730                     end-pos16_0)
9731                    (drive-regexp-match.1
9732                     #f
9733                     #f
9734                     #f
9735                     #t
9736                     #t
9737                     'positions
9738                     #f
9739                     #f
9740                     unsafe-undefined
9741                     'regexp-match-positions
9742                     rx19_0
9743                     in20_0
9744                     start-pos15_0
9745                     end-pos16_0
9746                     out17_0
9747                     prefix_0)))))))))
9748    (|#%name|
9749     regexp-match-positions
9750     (case-lambda
9751      ((rx_0 in_0)
9752       (begin (regexp-match-positions_0 rx_0 in_0 0 #f #f unsafe-undefined)))
9753      ((rx_0 in_0 start-pos_0 end-pos_0 out_0 prefix18_0)
9754       (regexp-match-positions_0
9755        rx_0
9756        in_0
9757        start-pos_0
9758        end-pos_0
9759        out_0
9760        prefix18_0))
9761      ((rx_0 in_0 start-pos_0 end-pos_0 out17_0)
9762       (regexp-match-positions_0
9763        rx_0
9764        in_0
9765        start-pos_0
9766        end-pos_0
9767        out17_0
9768        unsafe-undefined))
9769      ((rx_0 in_0 start-pos_0 end-pos16_0)
9770       (regexp-match-positions_0
9771        rx_0
9772        in_0
9773        start-pos_0
9774        end-pos16_0
9775        #f
9776        unsafe-undefined))
9777      ((rx_0 in_0 start-pos15_0)
9778       (regexp-match-positions_0
9779        rx_0
9780        in_0
9781        start-pos15_0
9782        #f
9783        #f
9784        unsafe-undefined))))))
9785(define 1/regexp-match
9786  (let ((regexp-match_0
9787         (|#%name|
9788          regexp-match
9789          (lambda (rx25_0 in26_0 start-pos21_0 end-pos22_0 out23_0 prefix24_0)
9790            (begin
9791              (let ((prefix_0
9792                     (if (eq? prefix24_0 unsafe-undefined)
9793                       no-prefix
9794                       prefix24_0)))
9795                (if (fast-bytes?
9796                     rx25_0
9797                     in26_0
9798                     start-pos21_0
9799                     end-pos22_0
9800                     out23_0
9801                     prefix_0)
9802                  (fast-drive-regexp-match/bytes
9803                   rx25_0
9804                   in26_0
9805                   start-pos21_0
9806                   end-pos22_0)
9807                  (if (fast-string?
9808                       rx25_0
9809                       in26_0
9810                       start-pos21_0
9811                       end-pos22_0
9812                       out23_0
9813                       prefix_0)
9814                    (fast-drive-regexp-match/string
9815                     rx25_0
9816                     in26_0
9817                     start-pos21_0
9818                     end-pos22_0)
9819                    (drive-regexp-match.1
9820                     #f
9821                     #f
9822                     #f
9823                     #t
9824                     #t
9825                     'strings
9826                     #f
9827                     #f
9828                     unsafe-undefined
9829                     'regexp-match
9830                     rx25_0
9831                     in26_0
9832                     start-pos21_0
9833                     end-pos22_0
9834                     out23_0
9835                     prefix_0)))))))))
9836    (|#%name|
9837     regexp-match
9838     (case-lambda
9839      ((rx_0 in_0) (begin (regexp-match_0 rx_0 in_0 0 #f #f unsafe-undefined)))
9840      ((rx_0 in_0 start-pos_0 end-pos_0 out_0 prefix24_0)
9841       (regexp-match_0 rx_0 in_0 start-pos_0 end-pos_0 out_0 prefix24_0))
9842      ((rx_0 in_0 start-pos_0 end-pos_0 out23_0)
9843       (regexp-match_0
9844        rx_0
9845        in_0
9846        start-pos_0
9847        end-pos_0
9848        out23_0
9849        unsafe-undefined))
9850      ((rx_0 in_0 start-pos_0 end-pos22_0)
9851       (regexp-match_0 rx_0 in_0 start-pos_0 end-pos22_0 #f unsafe-undefined))
9852      ((rx_0 in_0 start-pos21_0)
9853       (regexp-match_0 rx_0 in_0 start-pos21_0 #f #f unsafe-undefined))))))
9854(define 1/regexp-match-positions/end
9855  (let ((regexp-match-positions/end_0
9856         (|#%name|
9857          regexp-match-positions/end
9858          (lambda (rx32_0
9859                   in33_0
9860                   start-pos27_0
9861                   end-pos28_0
9862                   out29_0
9863                   prefix30_0
9864                   end-bytes-count31_0)
9865            (begin
9866              (let ((prefix_0
9867                     (if (eq? prefix30_0 unsafe-undefined)
9868                       no-prefix
9869                       prefix30_0)))
9870                (drive-regexp-match.1
9871                 end-bytes-count31_0
9872                 #t
9873                 #f
9874                 #t
9875                 #t
9876                 'positions
9877                 #f
9878                 #f
9879                 unsafe-undefined
9880                 'regexp-match-positions/end
9881                 rx32_0
9882                 in33_0
9883                 start-pos27_0
9884                 end-pos28_0
9885                 out29_0
9886                 prefix_0)))))))
9887    (|#%name|
9888     regexp-match-positions/end
9889     (case-lambda
9890      ((rx_0 in_0)
9891       (begin
9892         (regexp-match-positions/end_0 rx_0 in_0 0 #f #f unsafe-undefined 1)))
9893      ((rx_0 in_0 start-pos_0 end-pos_0 out_0 prefix_0 end-bytes-count31_0)
9894       (regexp-match-positions/end_0
9895        rx_0
9896        in_0
9897        start-pos_0
9898        end-pos_0
9899        out_0
9900        prefix_0
9901        end-bytes-count31_0))
9902      ((rx_0 in_0 start-pos_0 end-pos_0 out_0 prefix30_0)
9903       (regexp-match-positions/end_0
9904        rx_0
9905        in_0
9906        start-pos_0
9907        end-pos_0
9908        out_0
9909        prefix30_0
9910        1))
9911      ((rx_0 in_0 start-pos_0 end-pos_0 out29_0)
9912       (regexp-match-positions/end_0
9913        rx_0
9914        in_0
9915        start-pos_0
9916        end-pos_0
9917        out29_0
9918        unsafe-undefined
9919        1))
9920      ((rx_0 in_0 start-pos_0 end-pos28_0)
9921       (regexp-match-positions/end_0
9922        rx_0
9923        in_0
9924        start-pos_0
9925        end-pos28_0
9926        #f
9927        unsafe-undefined
9928        1))
9929      ((rx_0 in_0 start-pos27_0)
9930       (regexp-match-positions/end_0
9931        rx_0
9932        in_0
9933        start-pos27_0
9934        #f
9935        #f
9936        unsafe-undefined
9937        1))))))
9938(define 1/regexp-match/end
9939  (let ((regexp-match/end_0
9940         (|#%name|
9941          regexp-match/end
9942          (lambda (rx39_0
9943                   in40_0
9944                   start-pos34_0
9945                   end-pos35_0
9946                   out36_0
9947                   prefix37_0
9948                   end-bytes-count38_0)
9949            (begin
9950              (let ((prefix_0
9951                     (if (eq? prefix37_0 unsafe-undefined)
9952                       no-prefix
9953                       prefix37_0)))
9954                (drive-regexp-match.1
9955                 end-bytes-count38_0
9956                 #t
9957                 #f
9958                 #t
9959                 #t
9960                 'strings
9961                 #f
9962                 #f
9963                 unsafe-undefined
9964                 'regexp-match/end
9965                 rx39_0
9966                 in40_0
9967                 start-pos34_0
9968                 end-pos35_0
9969                 out36_0
9970                 prefix_0)))))))
9971    (|#%name|
9972     regexp-match/end
9973     (case-lambda
9974      ((rx_0 in_0)
9975       (begin (regexp-match/end_0 rx_0 in_0 0 #f #f unsafe-undefined 1)))
9976      ((rx_0 in_0 start-pos_0 end-pos_0 out_0 prefix_0 end-bytes-count38_0)
9977       (regexp-match/end_0
9978        rx_0
9979        in_0
9980        start-pos_0
9981        end-pos_0
9982        out_0
9983        prefix_0
9984        end-bytes-count38_0))
9985      ((rx_0 in_0 start-pos_0 end-pos_0 out_0 prefix37_0)
9986       (regexp-match/end_0 rx_0 in_0 start-pos_0 end-pos_0 out_0 prefix37_0 1))
9987      ((rx_0 in_0 start-pos_0 end-pos_0 out36_0)
9988       (regexp-match/end_0
9989        rx_0
9990        in_0
9991        start-pos_0
9992        end-pos_0
9993        out36_0
9994        unsafe-undefined
9995        1))
9996      ((rx_0 in_0 start-pos_0 end-pos35_0)
9997       (regexp-match/end_0
9998        rx_0
9999        in_0
10000        start-pos_0
10001        end-pos35_0
10002        #f
10003        unsafe-undefined
10004        1))
10005      ((rx_0 in_0 start-pos34_0)
10006       (regexp-match/end_0
10007        rx_0
10008        in_0
10009        start-pos34_0
10010        #f
10011        #f
10012        unsafe-undefined
10013        1))))))
10014(define 1/regexp-match-peek
10015  (let ((regexp-match-peek_0
10016         (|#%name|
10017          regexp-match-peek
10018          (lambda (rx45_0
10019                   in46_0
10020                   start-pos41_0
10021                   end-pos42_0
10022                   progress-evt43_0
10023                   prefix44_0)
10024            (begin
10025              (let ((prefix_0
10026                     (if (eq? prefix44_0 unsafe-undefined)
10027                       no-prefix
10028                       prefix44_0)))
10029                (drive-regexp-match.1
10030                 #f
10031                 #f
10032                 #f
10033                 #t
10034                 #t
10035                 'strings
10036                 #t
10037                 progress-evt43_0
10038                 unsafe-undefined
10039                 'regexp-match-peek
10040                 rx45_0
10041                 in46_0
10042                 start-pos41_0
10043                 end-pos42_0
10044                 #f
10045                 prefix_0)))))))
10046    (|#%name|
10047     regexp-match-peek
10048     (case-lambda
10049      ((rx_0 in_0)
10050       (begin (regexp-match-peek_0 rx_0 in_0 0 #f #f unsafe-undefined)))
10051      ((rx_0 in_0 start-pos_0 end-pos_0 progress-evt_0 prefix44_0)
10052       (regexp-match-peek_0
10053        rx_0
10054        in_0
10055        start-pos_0
10056        end-pos_0
10057        progress-evt_0
10058        prefix44_0))
10059      ((rx_0 in_0 start-pos_0 end-pos_0 progress-evt43_0)
10060       (regexp-match-peek_0
10061        rx_0
10062        in_0
10063        start-pos_0
10064        end-pos_0
10065        progress-evt43_0
10066        unsafe-undefined))
10067      ((rx_0 in_0 start-pos_0 end-pos42_0)
10068       (regexp-match-peek_0
10069        rx_0
10070        in_0
10071        start-pos_0
10072        end-pos42_0
10073        #f
10074        unsafe-undefined))
10075      ((rx_0 in_0 start-pos41_0)
10076       (regexp-match-peek_0
10077        rx_0
10078        in_0
10079        start-pos41_0
10080        #f
10081        #f
10082        unsafe-undefined))))))
10083(define 1/regexp-match-peek-immediate
10084  (let ((regexp-match-peek-immediate_0
10085         (|#%name|
10086          regexp-match-peek-immediate
10087          (lambda (rx51_0
10088                   in52_0
10089                   start-pos47_0
10090                   end-pos48_0
10091                   progress-evt49_0
10092                   prefix50_0)
10093            (begin
10094              (let ((prefix_0
10095                     (if (eq? prefix50_0 unsafe-undefined)
10096                       no-prefix
10097                       prefix50_0)))
10098                (drive-regexp-match.1
10099                 #f
10100                 #f
10101                 #t
10102                 #t
10103                 #t
10104                 'strings
10105                 #t
10106                 progress-evt49_0
10107                 unsafe-undefined
10108                 'regexp-match-peek-immediate
10109                 rx51_0
10110                 in52_0
10111                 start-pos47_0
10112                 end-pos48_0
10113                 #f
10114                 prefix_0)))))))
10115    (|#%name|
10116     regexp-match-peek-immediate
10117     (case-lambda
10118      ((rx_0 in_0)
10119       (begin
10120         (regexp-match-peek-immediate_0 rx_0 in_0 0 #f #f unsafe-undefined)))
10121      ((rx_0 in_0 start-pos_0 end-pos_0 progress-evt_0 prefix50_0)
10122       (regexp-match-peek-immediate_0
10123        rx_0
10124        in_0
10125        start-pos_0
10126        end-pos_0
10127        progress-evt_0
10128        prefix50_0))
10129      ((rx_0 in_0 start-pos_0 end-pos_0 progress-evt49_0)
10130       (regexp-match-peek-immediate_0
10131        rx_0
10132        in_0
10133        start-pos_0
10134        end-pos_0
10135        progress-evt49_0
10136        unsafe-undefined))
10137      ((rx_0 in_0 start-pos_0 end-pos48_0)
10138       (regexp-match-peek-immediate_0
10139        rx_0
10140        in_0
10141        start-pos_0
10142        end-pos48_0
10143        #f
10144        unsafe-undefined))
10145      ((rx_0 in_0 start-pos47_0)
10146       (regexp-match-peek-immediate_0
10147        rx_0
10148        in_0
10149        start-pos47_0
10150        #f
10151        #f
10152        unsafe-undefined))))))
10153(define 1/regexp-match-peek-positions
10154  (let ((regexp-match-peek-positions_0
10155         (|#%name|
10156          regexp-match-peek-positions
10157          (lambda (rx57_0
10158                   in58_0
10159                   start-pos53_0
10160                   end-pos54_0
10161                   progress-evt55_0
10162                   prefix56_0)
10163            (begin
10164              (let ((prefix_0
10165                     (if (eq? prefix56_0 unsafe-undefined)
10166                       no-prefix
10167                       prefix56_0)))
10168                (drive-regexp-match.1
10169                 #f
10170                 #f
10171                 #f
10172                 #t
10173                 #t
10174                 'positions
10175                 #t
10176                 progress-evt55_0
10177                 unsafe-undefined
10178                 'regexp-match-peek-positions
10179                 rx57_0
10180                 in58_0
10181                 start-pos53_0
10182                 end-pos54_0
10183                 #f
10184                 prefix_0)))))))
10185    (|#%name|
10186     regexp-match-peek-positions
10187     (case-lambda
10188      ((rx_0 in_0)
10189       (begin
10190         (regexp-match-peek-positions_0 rx_0 in_0 0 #f #f unsafe-undefined)))
10191      ((rx_0 in_0 start-pos_0 end-pos_0 progress-evt_0 prefix56_0)
10192       (regexp-match-peek-positions_0
10193        rx_0
10194        in_0
10195        start-pos_0
10196        end-pos_0
10197        progress-evt_0
10198        prefix56_0))
10199      ((rx_0 in_0 start-pos_0 end-pos_0 progress-evt55_0)
10200       (regexp-match-peek-positions_0
10201        rx_0
10202        in_0
10203        start-pos_0
10204        end-pos_0
10205        progress-evt55_0
10206        unsafe-undefined))
10207      ((rx_0 in_0 start-pos_0 end-pos54_0)
10208       (regexp-match-peek-positions_0
10209        rx_0
10210        in_0
10211        start-pos_0
10212        end-pos54_0
10213        #f
10214        unsafe-undefined))
10215      ((rx_0 in_0 start-pos53_0)
10216       (regexp-match-peek-positions_0
10217        rx_0
10218        in_0
10219        start-pos53_0
10220        #f
10221        #f
10222        unsafe-undefined))))))
10223(define 1/regexp-match-peek-positions/end
10224  (let ((regexp-match-peek-positions/end_0
10225         (|#%name|
10226          regexp-match-peek-positions/end
10227          (lambda (rx64_0
10228                   in65_0
10229                   start-pos59_0
10230                   end-pos60_0
10231                   progress-evt61_0
10232                   prefix62_0
10233                   end-bytes-count63_0)
10234            (begin
10235              (let ((prefix_0
10236                     (if (eq? prefix62_0 unsafe-undefined)
10237                       no-prefix
10238                       prefix62_0)))
10239                (drive-regexp-match.1
10240                 end-bytes-count63_0
10241                 #t
10242                 #f
10243                 #t
10244                 #t
10245                 'positions
10246                 #t
10247                 progress-evt61_0
10248                 unsafe-undefined
10249                 'regexp-match-peek-positions/end
10250                 rx64_0
10251                 in65_0
10252                 start-pos59_0
10253                 end-pos60_0
10254                 #f
10255                 prefix_0)))))))
10256    (|#%name|
10257     regexp-match-peek-positions/end
10258     (case-lambda
10259      ((rx_0 in_0)
10260       (begin
10261         (regexp-match-peek-positions/end_0
10262          rx_0
10263          in_0
10264          0
10265          #f
10266          #f
10267          unsafe-undefined
10268          1)))
10269      ((rx_0
10270        in_0
10271        start-pos_0
10272        end-pos_0
10273        progress-evt_0
10274        prefix_0
10275        end-bytes-count63_0)
10276       (regexp-match-peek-positions/end_0
10277        rx_0
10278        in_0
10279        start-pos_0
10280        end-pos_0
10281        progress-evt_0
10282        prefix_0
10283        end-bytes-count63_0))
10284      ((rx_0 in_0 start-pos_0 end-pos_0 progress-evt_0 prefix62_0)
10285       (regexp-match-peek-positions/end_0
10286        rx_0
10287        in_0
10288        start-pos_0
10289        end-pos_0
10290        progress-evt_0
10291        prefix62_0
10292        1))
10293      ((rx_0 in_0 start-pos_0 end-pos_0 progress-evt61_0)
10294       (regexp-match-peek-positions/end_0
10295        rx_0
10296        in_0
10297        start-pos_0
10298        end-pos_0
10299        progress-evt61_0
10300        unsafe-undefined
10301        1))
10302      ((rx_0 in_0 start-pos_0 end-pos60_0)
10303       (regexp-match-peek-positions/end_0
10304        rx_0
10305        in_0
10306        start-pos_0
10307        end-pos60_0
10308        #f
10309        unsafe-undefined
10310        1))
10311      ((rx_0 in_0 start-pos59_0)
10312       (regexp-match-peek-positions/end_0
10313        rx_0
10314        in_0
10315        start-pos59_0
10316        #f
10317        #f
10318        unsafe-undefined
10319        1))))))
10320(define 1/regexp-match-peek-positions-immediate
10321  (let ((regexp-match-peek-positions-immediate_0
10322         (|#%name|
10323          regexp-match-peek-positions-immediate
10324          (lambda (rx70_0
10325                   in71_0
10326                   start-pos66_0
10327                   end-pos67_0
10328                   progress-evt68_0
10329                   prefix69_0)
10330            (begin
10331              (let ((prefix_0
10332                     (if (eq? prefix69_0 unsafe-undefined)
10333                       no-prefix
10334                       prefix69_0)))
10335                (drive-regexp-match.1
10336                 #f
10337                 #f
10338                 #t
10339                 #t
10340                 #t
10341                 'positions
10342                 #t
10343                 progress-evt68_0
10344                 unsafe-undefined
10345                 'regexp-match-peek-positions-immediate
10346                 rx70_0
10347                 in71_0
10348                 start-pos66_0
10349                 end-pos67_0
10350                 #f
10351                 prefix_0)))))))
10352    (|#%name|
10353     regexp-match-peek-positions-immediate
10354     (case-lambda
10355      ((rx_0 in_0)
10356       (begin
10357         (regexp-match-peek-positions-immediate_0
10358          rx_0
10359          in_0
10360          0
10361          #f
10362          #f
10363          unsafe-undefined)))
10364      ((rx_0 in_0 start-pos_0 end-pos_0 progress-evt_0 prefix69_0)
10365       (regexp-match-peek-positions-immediate_0
10366        rx_0
10367        in_0
10368        start-pos_0
10369        end-pos_0
10370        progress-evt_0
10371        prefix69_0))
10372      ((rx_0 in_0 start-pos_0 end-pos_0 progress-evt68_0)
10373       (regexp-match-peek-positions-immediate_0
10374        rx_0
10375        in_0
10376        start-pos_0
10377        end-pos_0
10378        progress-evt68_0
10379        unsafe-undefined))
10380      ((rx_0 in_0 start-pos_0 end-pos67_0)
10381       (regexp-match-peek-positions-immediate_0
10382        rx_0
10383        in_0
10384        start-pos_0
10385        end-pos67_0
10386        #f
10387        unsafe-undefined))
10388      ((rx_0 in_0 start-pos66_0)
10389       (regexp-match-peek-positions-immediate_0
10390        rx_0
10391        in_0
10392        start-pos66_0
10393        #f
10394        #f
10395        unsafe-undefined))))))
10396(define 1/regexp-match-peek-positions-immediate/end
10397  (let ((regexp-match-peek-positions-immediate/end_0
10398         (|#%name|
10399          regexp-match-peek-positions-immediate/end
10400          (lambda (rx77_0
10401                   in78_0
10402                   start-pos72_0
10403                   end-pos73_0
10404                   progress-evt74_0
10405                   prefix75_0
10406                   end-bytes-count76_0)
10407            (begin
10408              (let ((prefix_0
10409                     (if (eq? prefix75_0 unsafe-undefined)
10410                       no-prefix
10411                       prefix75_0)))
10412                (drive-regexp-match.1
10413                 end-bytes-count76_0
10414                 #t
10415                 #t
10416                 #t
10417                 #t
10418                 'positions
10419                 #t
10420                 progress-evt74_0
10421                 unsafe-undefined
10422                 'regexp-match-peek-positions-immediate/end
10423                 rx77_0
10424                 in78_0
10425                 start-pos72_0
10426                 end-pos73_0
10427                 #f
10428                 prefix_0)))))))
10429    (|#%name|
10430     regexp-match-peek-positions-immediate/end
10431     (case-lambda
10432      ((rx_0 in_0)
10433       (begin
10434         (regexp-match-peek-positions-immediate/end_0
10435          rx_0
10436          in_0
10437          0
10438          #f
10439          #f
10440          unsafe-undefined
10441          1)))
10442      ((rx_0
10443        in_0
10444        start-pos_0
10445        end-pos_0
10446        progress-evt_0
10447        prefix_0
10448        end-bytes-count76_0)
10449       (regexp-match-peek-positions-immediate/end_0
10450        rx_0
10451        in_0
10452        start-pos_0
10453        end-pos_0
10454        progress-evt_0
10455        prefix_0
10456        end-bytes-count76_0))
10457      ((rx_0 in_0 start-pos_0 end-pos_0 progress-evt_0 prefix75_0)
10458       (regexp-match-peek-positions-immediate/end_0
10459        rx_0
10460        in_0
10461        start-pos_0
10462        end-pos_0
10463        progress-evt_0
10464        prefix75_0
10465        1))
10466      ((rx_0 in_0 start-pos_0 end-pos_0 progress-evt74_0)
10467       (regexp-match-peek-positions-immediate/end_0
10468        rx_0
10469        in_0
10470        start-pos_0
10471        end-pos_0
10472        progress-evt74_0
10473        unsafe-undefined
10474        1))
10475      ((rx_0 in_0 start-pos_0 end-pos73_0)
10476       (regexp-match-peek-positions-immediate/end_0
10477        rx_0
10478        in_0
10479        start-pos_0
10480        end-pos73_0
10481        #f
10482        unsafe-undefined
10483        1))
10484      ((rx_0 in_0 start-pos72_0)
10485       (regexp-match-peek-positions-immediate/end_0
10486        rx_0
10487        in_0
10488        start-pos72_0
10489        #f
10490        #f
10491        unsafe-undefined
10492        1))))))
10493(define regexp-place-init! (lambda () (range-place-init!)))
10494