(declare (block) (standard-bindings) (extended-bindings))
(begin
  (define std/misc/process#check-process-success
    (lambda (_exit-status476_ _settings477_)
      (if (zero? _exit-status476_)
          '#!void
          (error '"Process exited with non-zero status"
                 _exit-status476_
                 _settings477_))))
  (define std/misc/process#run-process__%
    (lambda (_g4077_
             _coprocess401412_
             _check-status402414_
             _environment403416_
             _directory404418_
             _stdin-redirection405420_
             _stdout-redirection406422_
             _stderr-redirection407424_
             _pseudo-terminal408426_
             _show-console409428_
             _command430_)
      (let* ((_coprocess432_
              (if (eq? _coprocess401412_ absent-value)
                  std/misc/ports#read-all-as-string
                  _coprocess401412_))
             (_check-status434_
              (if (eq? _check-status402414_ absent-value)
                  '#t
                  _check-status402414_))
             (_environment436_
              (if (eq? _environment403416_ absent-value)
                  '#f
                  _environment403416_))
             (_directory438_
              (if (eq? _directory404418_ absent-value) '#f _directory404418_))
             (_stdin-redirection440_
              (if (eq? _stdin-redirection405420_ absent-value)
                  '#t
                  _stdin-redirection405420_))
             (_stdout-redirection442_
              (if (eq? _stdout-redirection406422_ absent-value)
                  '#t
                  _stdout-redirection406422_))
             (_stderr-redirection444_
              (if (eq? _stderr-redirection407424_ absent-value)
                  '#f
                  _stderr-redirection407424_))
             (_pseudo-terminal446_
              (if (eq? _pseudo-terminal408426_ absent-value)
                  '#f
                  _pseudo-terminal408426_))
             (_show-console448_
              (if (eq? _show-console409428_ absent-value)
                  '#f
                  _show-console409428_))
             (_settings450_
              (cons 'path:
                    (cons (car _command430_)
                          (cons 'arguments:
                                (cons (cdr _command430_)
                                      (cons 'environment:
                                            (cons _environment436_
                                                  (cons 'directory:
                                                        (cons _directory438_
                                                              (cons 'stdin-redirection:
;;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
                            (cons _stdin-redirection440_
                                  (cons 'stdout-redirection:
                                        (cons _stdout-redirection442_
                                              (cons 'stderr-redirection:
                                                    (cons _stderr-redirection444_
                                                          (cons 'pseudo-terminal:
                                                                (cons _pseudo-terminal446_
;;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
                              (cons 'show-console:
                                    (cons _show-console448_
                                          '())))))))))))))))))))
;;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
;;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
             (_process452_ (open-process _settings450_)))
        (with-unwind-protect
         (lambda ()
           (let* ((_result456_ (_coprocess432_ _process452_))
                  (_status458_ (process-status _process452_)))
             (if _check-status434_
                 ((if (procedure? _check-status434_)
                      _check-status434_
                      std/misc/process#check-process-success)
                  _status458_
                  _settings450_)
                 '#!void)
             _result456_))
         (lambda ()
           (close-port _process452_)
           (process-status _process452_))))))
  (define std/misc/process#run-process__@
    (lambda (_keys400465_ . _args467_)
      (apply std/misc/process#run-process__%
             _keys400465_
             (table-ref _keys400465_ 'coprocess: absent-value)
             (table-ref _keys400465_ 'check-status: absent-value)
             (table-ref _keys400465_ 'environment: absent-value)
             (table-ref _keys400465_ 'directory: absent-value)
             (table-ref _keys400465_ 'stdin-redirection: absent-value)
             (table-ref _keys400465_ 'stdout-redirection: absent-value)
             (table-ref _keys400465_ 'stderr-redirection: absent-value)
             (table-ref _keys400465_ 'pseudo-terminal: absent-value)
             (table-ref _keys400465_ 'show-console: absent-value)
             _args467_)))
  (define std/misc/process#run-process
    (lambda _args410473_
      (apply keyword-dispatch
             '#(stdout-redirection:
                #f
                #f
                #f
                #f
                #f
                #f
                #f
                #f
                #f
                #f
                #f
                #f
                #f
                #f
                #f
                #f
                #f
                #f
                stdin-redirection:
                #f
                #f
                #f
                #f
                #f
                stderr-redirection:
                #f
                #f
                #f
                #f
                #f
                #f
                #f
                #f
                #f
                #f
                #f
                #f
                #f
                directory:
                environment:
                pseudo-terminal:
                #f
                #f
                #f
                #f
                #f
                show-console:
                #f
                #f
                #f
                #f
                #f
                #f
                coprocess:
                #f
                #f
                #f
                #f
                #f
                check-status:
                #f
                #f)
             std/misc/process#run-process__@
             _args410473_)))
  (define std/misc/process#run-process/batch
    (lambda (_command397_)
      (std/misc/process#run-process__%
       '#f
       close-output-port
       absent-value
       absent-value
       absent-value
       absent-value
       '#f
       absent-value
       absent-value
       absent-value
       _command397_)
      '#!void)))
