(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:DIR)
          op: assign_op.Equal
          rhs: 
            {
              (DQ 
                (command_sub
                  left_token: <Id.Left_DollarParen '$('>
                  child: 
                    (command.AndOr
                      ops: [Id.Op_DAmp]
                      children: [
                        (C {<cd>} 
                          {
                            (DQ 
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                child: 
                                  (C {<dirname>} 
                                    {
                                      (DQ 
                                        (braced_var_sub
                                          token: <Id.VSub_Name BASH_SOURCE>
                                          bracket_op: (bracket_op.ArrayIndex expr:{<Id.Lit_Digits 0>})
                                        )
                                      )
                                    }
                                  )
                              )
                            )
                          }
                        )
                        (C {<pwd>})
                      ]
                    )
                )
              )
            }
          spids: [4]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:REFMT)
          op: assign_op.Equal
          rhs: {(DQ )}
          spids: [35]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: 
                        (bool_expr.Unary
                          op_id: Id.BoolUnary_f
                          child: {($ Id.VSub_DollarName '$DIR') <'/refmt_impl.native'>}
                        )
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:REFMT)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_DollarName '$DIR') <'/refmt_impl.native'>)}
                  spids: [55]
                )
              ]
            )
          ]
          spids: [40 52]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: 
                        (bool_expr.Unary
                          op_id: Id.BoolUnary_f
                          child: {($ Id.VSub_DollarName '$DIR') <'/refmt'>}
                        )
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:REFMT)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_DollarName '$DIR') <'/refmt'>)}
                  spids: [79]
                )
              ]
            )
          ]
          spids: [64 76]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: 
                        (bool_expr.Unary
                          op_id: Id.BoolUnary_z
                          child: {($ Id.VSub_DollarName '$REFMT')}
                        )
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.Simple
              words: [{<echo>} {(DQ <'Couldn\'t find refmt'>)}]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [88 99]
        )
      ]
    )
    (C {($ Id.VSub_DollarName '$REFMT')} {($ Id.VSub_At '$@')} {<-recoverable>} {<true>} {<-parse>} {<re>})
  ]
)