(command.CommandList
  children: [
    (command.CommandList
      children: [
        (command.Sentence
          child: (C {(typeset)} {(-a)} {(_Dbg_disp_exp)})
          terminator: <Op_Semi ';'>
        )
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:_Dbg_disp_exp)
              op: Equal
              rhs: {(sh_array_literal left:<Op_LParen '('>)}
            )
          ]
        )
      ]
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: (C {(typeset)} {(-ia)} {(_Dbg_disp_enable)})
          terminator: <Op_Semi ';'>
        )
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:_Dbg_disp_enable)
              op: Equal
              rhs: {(sh_array_literal left:<Op_LParen '('>)}
            )
          ]
        )
      ]
    )
    (C {(typeset)} {(-i)} {(Lit_VarLike '_Dbg_disp_max=') (0)})
    (command.ShFunction
      name: _Dbg_save_display
      body: 
        (command.BraceGroup
          children: [
            (command.Simple
              words: [{(typeset)} {(-p)} {(_Dbg_disp_exp)}]
              redirects: [
                (redir.Redir
                  op: <Redir_DGreat '>>'>
                  fd: 16777215
                  arg_word: {($ VSub_DollarName '$_Dbg_statefile')}
                )
              ]
            )
            (command.Simple
              words: [{(typeset)} {(-p)} {(_Dbg_disp_enable)}]
              redirects: [
                (redir.Redir
                  op: <Redir_DGreat '>>'>
                  fd: 16777215
                  arg_word: {($ VSub_DollarName '$_Dbg_statefile')}
                )
              ]
            )
            (command.Simple
              words: [{(typeset)} {(-p)} {(_Dbg_disp_max)}]
              redirects: [
                (redir.Redir
                  op: <Redir_DGreat '>>'>
                  fd: 16777215
                  arg_word: {($ VSub_DollarName '$_Dbg_statefile')}
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: _Dbg_disp_enable_disable
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DParen
                          child: 
                            (arith_expr.Binary
                              op_id: Arith_Less
                              left: (arith_expr.ArithWord w:{($ VSub_Pound '$#')})
                              right: (arith_expr.ArithWord w:{(Lit_Digits 2)})
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(_Dbg_errmsg)} 
                      {(DQ ('Expecting at least two parameters. Got: ') (${ VSub_Pound '#') (.))}
                    )
                    (command.ControlFlow
                      token: <ControlFlow_Return return>
                      arg_word: {(1)}
                    )
                  ]
                )
              ]
            )
            (C {(typeset)} {(-i)} {(Lit_VarLike 'on=') ($ VSub_Number '$1')})
            (C {(typeset)} {(Lit_VarLike 'en_dis=') ($ VSub_Number '$2')})
            (command.Sentence child:(C {(shift)}) terminator:<Op_Semi ';'>)
            (C {(shift)})
            (C {(typeset)} {(Lit_VarLike 'to_go=') (DQ ($ VSub_At '$@'))})
            (C {(typeset)} {(i)})
            (C {(eval)} {(DQ ($ VSub_DollarName '$_seteglob'))})
            (command.ForEach
              iter_name: i
              iter_words: [{($ VSub_DollarName '$to_go')}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (command.Case
                      to_match: {($ VSub_DollarName '$i')}
                      arms: [
                        (case_arm
                          pat_list: [{($ VSub_DollarName '$int_pat')}]
                          action: [
                            (C {(_Dbg_enable_disable_display)} {($ VSub_DollarName '$on')} 
                              {($ VSub_DollarName '$en_dis')} {($ VSub_DollarName '$i')}
                            )
                          ]
                        )
                        (case_arm
                          pat_list: [{(Lit_Star '*')}]
                          action: [
                            (C {(_Dbg_errmsg)} 
                              {(DQ ('Invalid entry number ') ($ VSub_DollarName '$i') (' skipped'))}
                            )
                          ]
                        )
                      ]
                    )
                  ]
                )
            )
            (C {(eval)} {(DQ ($ VSub_DollarName '$_resteglob'))})
            (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
          ]
        )
    )
    (command.ShFunction
      name: _Dbg_eval_all_display
      body: 
        (command.BraceGroup
          children: [
            (C {(typeset)} {(-i)} {(i)})
            (command.ForExpr
              init: 
                (arith_expr.BinaryAssign
                  op_id: Arith_Equal
                  left: (sh_lhs_expr.Name name:i)
                  right: (arith_expr.ArithWord w:{(Lit_Digits 0)})
                )
              cond: 
                (arith_expr.Binary
                  op_id: Arith_Less
                  left: (arith_expr.VarRef token:<Lit_ArithVarLike i>)
                  right: (arith_expr.VarRef token:<Lit_ArithVarLike _Dbg_disp_max>)
                )
              update: (arith_expr.UnaryAssign op_id:Node_PostDPlus child:(sh_lhs_expr.Name name:i))
              body: 
                (command.DoGroup
                  children: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.AndOr
                                  ops: [Op_DAmp]
                                  children: [
                                    (C {(Lit_LBracket '[')} {(-n)} 
                                      {
                                        (DQ 
                                          (braced_var_sub
                                            token: <VSub_Name _Dbg_disp_exp>
                                            bracket_op: 
                                              (bracket_op.ArrayIndex
                                                expr: 
                                                  (arith_expr.ArithWord
                                                    w: {($ VSub_DollarName '$i')}
                                                  )
                                              )
                                          )
                                        )
                                      } {(Lit_RBracket ']')}
                                    )
                                    (command.DBracket
                                      expr: 
                                        (bool_expr.Binary
                                          op_id: BoolBinary_GlobNEqual
                                          left: 
                                            {
                                              (braced_var_sub
                                                token: <VSub_Name _Dbg_disp_enable>
                                                bracket_op: 
                                                  (bracket_op.ArrayIndex
                                                    expr: 
                                                      (arith_expr.VarRef
                                                        token: <Lit_ArithVarLike i>
                                                      )
                                                  )
                                              )
                                            }
                                          right: {(0)}
                                        )
                                    )
                                  ]
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (C {(_Dbg_printf_nocr)} {(DQ ('%2d: %s = '))} {($ VSub_DollarName '$i')} 
                              {
                                (DQ 
                                  (braced_var_sub
                                    token: <VSub_Name _Dbg_disp_exp>
                                    bracket_op: 
                                      (bracket_op.ArrayIndex
                                        expr: (arith_expr.VarRef token:<Lit_ArithVarLike i>)
                                      )
                                  )
                                )
                              }
                            )
                            (command.Sentence
                              child: (C {(typeset)} {(-i)} {(_Dbg_show_eval_rc)})
                              terminator: <Op_Semi ';'>
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:_Dbg_show_eval_rc)
                                  op: Equal
                                  rhs: {(0)}
                                )
                              ]
                            )
                            (C {(_Dbg_do_eval)} 
                              {
                                (DQ ('_Dbg_msg ') 
                                  (braced_var_sub
                                    token: <VSub_Name _Dbg_disp_exp>
                                    bracket_op: 
                                      (bracket_op.ArrayIndex
                                        expr: (arith_expr.VarRef token:<Lit_ArithVarLike i>)
                                      )
                                  )
                                )
                              }
                            )
                          ]
                        )
                      ]
                    )
                  ]
                )
            )
          ]
        )
    )
    (command.ShFunction
      name: _Dbg_enable_disable_display
      body: 
        (command.BraceGroup
          children: [
            (C {(typeset)} {(-i)} {(Lit_VarLike 'on=') ($ VSub_Number '$1')})
            (C {(typeset)} {(Lit_VarLike 'en_dis=') ($ VSub_Number '$2')})
            (C {(typeset)} {(-i)} {(Lit_VarLike 'i=') ($ VSub_Number '$3')})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Lit_LBracket '[')} {(-n)} 
                          {
                            (DQ 
                              (braced_var_sub
                                token: <VSub_Name _Dbg_disp_exp>
                                bracket_op: 
                                  (bracket_op.ArrayIndex
                                    expr: (arith_expr.ArithWord w:{($ VSub_DollarName '$i')})
                                  )
                              )
                            )
                          } {(Lit_RBracket ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.DBracket
                                  expr: 
                                    (bool_expr.Binary
                                      op_id: BoolBinary_GlobDEqual
                                      left: 
                                        {
                                          (braced_var_sub
                                            token: <VSub_Name _Dbg_disp_enable>
                                            bracket_op: 
                                              (bracket_op.ArrayIndex
                                                expr: 
                                                  (arith_expr.ArithWord
                                                    w: {($ VSub_DollarName '$i')}
                                                  )
                                              )
                                          )
                                        }
                                      right: {($ VSub_DollarName '$on')}
                                    )
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (C {(_Dbg_errmsg)} 
                              {
                                (DQ ('Display entry ') ($ VSub_DollarName '$i') (' already ') 
                                  (${ VSub_Name en_dis) (', so nothing done.')
                                )
                              }
                            )
                          ]
                        )
                      ]
                      else_action: [
                        (C {(_Dbg_write_journal_eval)} 
                          {
                            (DQ ('_Dbg_disp_enable[') ($ VSub_DollarName '$i') (']=') 
                              ($ VSub_DollarName '$on')
                            )
                          }
                        )
                        (C {(_Dbg_msg)} 
                          {
                            (DQ ('Display entry ') ($ VSub_DollarName '$i') (' ') 
                              ($ VSub_DollarName '$en_dis') (.)
                            )
                          }
                        )
                      ]
                    )
                  ]
                )
              ]
              else_action: [
                (C {(_Dbg_errmsg)} 
                  {
                    (DQ ('Display entry ') ($ VSub_DollarName '$i') 
                      (" doesn't exist, so nothing done.")
                    )
                  }
                )
              ]
            )
          ]
        )
    )
  ]
)