(command.CommandList
  children: [
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:DIR spids:[4])
          op: Equal
          rhs: 
            {
              (DQ 
                (word_part.CommandSubPart
                  command_list: 
                    (command.CommandList
                      children: [
                        (command.AndOr
                          ops: [Op_DAmp]
                          children: [
                            (C {(cd)} 
                              {
                                (DQ 
                                  (word_part.CommandSubPart
                                    command_list: 
                                      (command.CommandList
                                        children: [
                                          (C {(dirname)} 
                                            {
                                              (DQ 
                                                (word_part.BracedVarSub
                                                  token: <VSub_Name BASH_SOURCE>
                                                  bracket_op: 
                                                    (bracket_op.ArrayIndex
                                                      expr: (arith_expr.ArithWord w:{(Lit_Digits 0)})
                                                    )
                                                  spids: [16 21]
                                                )
                                              )
                                            }
                                          )
                                        ]
                                      )
                                    left_token: <Left_CommandSub '$('>
                                    spids: [11 24]
                                  )
                                )
                              }
                            )
                            (C {(pwd)})
                          ]
                        )
                      ]
                    )
                  left_token: <Left_CommandSub '$('>
                  spids: [6 31]
                )
              )
            }
          spids: [4]
        )
      ]
      spids: [4]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:REFMT spids:[35])
          op: Equal
          rhs: {(DQ )}
          spids: [35]
        )
      ]
      spids: [35]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DBracket
                  expr: 
                    (bool_expr.BoolUnary
                      op_id: BoolUnary_f
                      child: {($ VSub_DollarName '$DIR') (/refmt_impl.native)}
                    )
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:REFMT spids:[55])
                  op: Equal
                  rhs: {(DQ ($ VSub_DollarName '$DIR') (/refmt_impl.native))}
                  spids: [55]
                )
              ]
              spids: [55]
            )
          ]
          spids: [16777215 52]
        )
      ]
      spids: [16777215 61]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DBracket
                  expr: 
                    (bool_expr.BoolUnary
                      op_id: BoolUnary_f
                      child: {($ VSub_DollarName '$DIR') (/refmt)}
                    )
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:REFMT spids:[79])
                  op: Equal
                  rhs: {(DQ ($ VSub_DollarName '$DIR') (/refmt))}
                  spids: [79]
                )
              ]
              spids: [79]
            )
          ]
          spids: [16777215 76]
        )
      ]
      spids: [16777215 85]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DBracket
                  expr: (bool_expr.BoolUnary op_id:BoolUnary_z child:{($ VSub_DollarName '$REFMT')})
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (command.SimpleCommand
              words: [{(echo)} {(DQ ("Couldn't find refmt"))}]
              redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
            )
            (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [16777215 99]
        )
      ]
      spids: [16777215 116]
    )
    (C {($ VSub_DollarName '$REFMT')} {($ VSub_At '$@')} {(-recoverable)} {(true)} {(-parse)} {(re)})
  ]
)