(command.CommandList
  children: [
    (command.Simple
      blame_tok: <trap>
      more_env: []
      words: [{<trap>} {(SQ <_Dbg_write_saved_vars>)} {<EXIT>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <typeset>
      more_env: []
      words: [{<typeset>} {<-a>} {<_Dbg_save_vars>}]
      redirects: []
      do_fork: T
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: 
            (command.Simple
              blame_tok: <typeset>
              more_env: []
              words: [{<typeset>} {<-a>} {<_Dbg_save_vars>}]
              redirects: []
              do_fork: T
            )
          terminator: <Id.Op_Semi _>
        )
        (command.ShAssignment
          left: <Id.Lit_VarLike '_Dbg_save_vars='>
          pairs: [
            (AssignPair
              left: <Id.Lit_VarLike '_Dbg_save_vars='>
              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike '_Dbg_save_vars='> name:_Dbg_save_vars)
              op: assign_op.Equal
              rhs: {(ShArrayLiteral left:<Id.Op_LParen _> words:[] right:<Id.Right_ShArrayLiteral _>)}
            )
          ]
          redirects: []
        )
      ]
    )
    (command.ShFunction
      name_tok: <save_vars>
      name: save_vars
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ShAssignment
              left: <Id.Lit_VarLike '_Dbg_save_vars+='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike '_Dbg_save_vars+='>
                  lhs: 
                    (sh_lhs_expr.Name
                      left: <Id.Lit_VarLike '_Dbg_save_vars+='>
                      name: _Dbg_save_vars
                    )
                  op: assign_op.PlusEqual
                  rhs: 
                    {
                      (ShArrayLiteral
                        left: <Id.Op_LParen _>
                        words: [{($ Id.VSub_At '@')}]
                        right: <Id.Right_ShArrayLiteral _>
                      )
                    }
                )
              ]
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <_Dbg_write_saved_vars>
      name: _Dbg_write_saved_vars
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <typeset>
              more_env: []
              words: [{<typeset>} {<param>}]
              redirects: []
              do_fork: T
            )
            (command.ForEach
              keyword: <Id.KW_For for>
              iter_names: [param]
              iterable: 
                (for_iter.Words
                  words: [
                    {
                      (DQ 
                        (BracedVarSub
                          left: <Id.Left_DollarBrace '${'>
                          token: <Id.VSub_Name _Dbg_save_vars>
                          var_name: _Dbg_save_vars
                          bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                          right: <Id.Right_DollarBrace '}'>
                        )
                      )
                    }
                  ]
                )
              semi_tok: <Id.Op_Semi _>
              body: 
                (command.DoGroup
                  left: <Id.KW_Do do>
                  children: [
                    (command.Pipeline
                      children: [
                        (command.Simple
                          blame_tok: <typeset>
                          more_env: []
                          words: [{<typeset>} {<-p>} {($ Id.VSub_DollarName param)}]
                          redirects: []
                          do_fork: T
                        )
                        (command.Simple
                          blame_tok: <sed>
                          more_env: []
                          words: [{<sed>} {<-e>} {(SQ <'s:declare [^ ]* ::'>)}]
                          redirects: []
                          do_fork: T
                        )
                      ]
                      ops: [<Id.Op_Pipe _>]
                    )
                  ]
                  right: <Id.KW_Done done>
                )
              redirects: [
                (Redir
                  op: <Id.Redir_Great '>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {($ Id.VSub_DollarName _Dbg_restore_info)}
                )
              ]
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
  ]
)