(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:_Dbg_shell_temp_profile)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_DollarParen '$('>
                child: (C {<_Dbg_tempname>} {<profile>})
              )
            }
          spids: [58]
        )
      ]
    )
    (command.ShFunction
      name: _Dbg_shell_append_typesets
      body: 
        (BraceGroup
          children: [
            (C {<typeset>} {<-a>} {<words>})
            (command.Pipeline
              children: [
                (C {<typeset>} {<-p>})
                (command.WhileUntil
                  keyword: <Id.KW_While while>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: (C {<read>} {<-a>} {<words>})
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  body: 
                    (command.DoGroup
                      children: [
                        (command.AndOr
                          ops: [Id.Op_DAmp]
                          children: [
                            (command.DBracket
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_GlobNEqual
                                  left: {<declare>}
                                  right: 
                                    {
                                      (braced_var_sub
                                        token: <Id.VSub_Name words>
                                        bracket_op: (bracket_op.ArrayIndex expr:{<Id.Lit_Digits 0>})
                                      )
                                    }
                                )
                            )
                            (command.ControlFlow
                              token: <Id.ControlFlow_Continue continue>
                            )
                          ]
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:var_name)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (braced_var_sub
                                    token: <Id.VSub_Name words>
                                    bracket_op: (bracket_op.ArrayIndex expr:{<Id.Lit_Digits 2>})
                                    suffix_op: 
                                      (suffix_op.Unary
                                        tok: <Id.VOp1_DPercent '%%'>
                                        arg_word: {<'='> <Id.Lit_Other '*'>}
                                      )
                                  )
                                }
                              spids: [121]
                            )
                          ]
                        )
                        (command.AndOr
                          ops: [Id.Op_DAmp Id.Op_DAmp]
                          children: [
                            (command.DParen
                              child: 
                                (arith_expr.Binary
                                  op_id: Id.Arith_DEqual
                                  left: {<Id.Lit_Digits 0>}
                                  right: <Id.Lit_ArithVarLike _Dbg_set_debug>
                                )
                            )
                            (command.DBracket
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_EqualTilde
                                  left: {($ Id.VSub_DollarName '$var_name')}
                                  right: {<Id.Lit_Other '^'> <_Dbg_>}
                                )
                            )
                            (command.ControlFlow
                              token: <Id.ControlFlow_Continue continue>
                            )
                          ]
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:flags)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (braced_var_sub
                                    token: <Id.VSub_Name words>
                                    bracket_op: (bracket_op.ArrayIndex expr:{<Id.Lit_Digits 1>})
                                  )
                                }
                              spids: [161]
                            )
                          ]
                        )
                        (command.If
                          arms: [
                            (if_arm
                              cond: 
                                (condition.Shell
                                  commands: [
                                    (command.Sentence
                                      child: 
                                        (command.DBracket
                                          expr: 
                                            (bool_expr.Binary
                                              op_id: Id.BoolBinary_EqualTilde
                                              left: {($ Id.VSub_DollarName '$flags')}
                                              right: 
                                                {<Id.Lit_Other '^'> <-> <Id.Lit_Other .> 
                                                  <Id.Lit_Other '*'> <x>
                                                }
                                            )
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                )
                              action: [(command.ControlFlow token:<Id.ControlFlow_Continue continue>)]
                              spids: [170 187]
                            )
                            (if_arm
                              cond: 
                                (condition.Shell
                                  commands: [
                                    (command.Sentence
                                      child: 
                                        (command.DBracket
                                          expr: 
                                            (bool_expr.Binary
                                              op_id: Id.BoolBinary_EqualTilde
                                              left: {($ Id.VSub_DollarName '$flags')}
                                              right: {<-> <Id.Lit_Other .> <Id.Lit_Other '*'> <r>}
                                            )
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                )
                              action: [
                                (C {<echo>} 
                                  {
                                    (DQ <'typeset -p '> (${ Id.VSub_Name var_name) <' &>/dev/null || '> 
                                      (command_sub
                                        left_token: <Id.Left_DollarParen '$('>
                                        child: (C {<typeset>} {<-p>} {(${ Id.VSub_Name var_name)})
                                      )
                                    )
                                  }
                                )
                              ]
                              spids: [198 214]
                            )
                            (if_arm
                              cond: 
                                (condition.Shell
                                  commands: [
                                    (command.Sentence
                                      child: 
                                        (command.DBracket
                                          expr: 
                                            (bool_expr.Binary
                                              op_id: Id.BoolBinary_GlobDEqual
                                              left: 
                                                {
                                                  (braced_var_sub
                                                    token: <Id.VSub_Name flags>
                                                    suffix_op: 
                                                      (suffix_op.Slice
                                                        begin: {<Id.Lit_Digits 0>}
                                                        length: {<Id.Lit_Digits 1>}
                                                      )
                                                  )
                                                }
                                              right: {(SQ <->)}
                                            )
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                )
                              action: [
                                (C {<echo>} 
                                  {
                                    (command_sub
                                      left_token: <Id.Left_DollarParen '$('>
                                      child: 
                                        (command.Simple
                                          words: [{<typeset>} {<-p>} {(${ Id.VSub_Name var_name)}]
                                          redirects: [
                                            (redir
                                              op: <Id.Redir_Great '2>'>
                                              loc: (redir_loc.Fd fd:2)
                                              arg: {<'/dev/null'>}
                                            )
                                          ]
                                          do_fork: T
                                        )
                                    )
                                  }
                                )
                              ]
                              spids: [242 264]
                            )
                          ]
                        )
                      ]
                    )
                  redirects: [
                    (redir
                      op: <Id.Redir_DGreat '>>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {($ Id.VSub_DollarName '$_Dbg_shell_temp_profile')}
                    )
                  ]
                )
              ]
              negated: F
            )
          ]
        )
    )
    (command.ShFunction
      name: _Dbg_shell_append_fn_typesets
      body: 
        (BraceGroup
          children: [
            (C {<typeset>} {<-a>} {<words>})
            (command.Pipeline
              children: [
                (C {<typeset>} {<-pf>})
                (command.WhileUntil
                  keyword: <Id.KW_While while>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: (C {<read>} {<-a>} {<words>})
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  body: 
                    (command.DoGroup
                      children: [
                        (command.AndOr
                          ops: [Id.Op_DAmp]
                          children: [
                            (command.DBracket
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_GlobNEqual
                                  left: {<declare>}
                                  right: 
                                    {
                                      (braced_var_sub
                                        token: <Id.VSub_Name words>
                                        bracket_op: (bracket_op.ArrayIndex expr:{<Id.Lit_Digits 0>})
                                      )
                                    }
                                )
                            )
                            (command.ControlFlow
                              token: <Id.ControlFlow_Continue continue>
                            )
                          ]
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:fn_name)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (braced_var_sub
                                    token: <Id.VSub_Name words>
                                    bracket_op: (bracket_op.ArrayIndex expr:{<Id.Lit_Digits 2>})
                                    suffix_op: 
                                      (suffix_op.Unary
                                        tok: <Id.VOp1_DPercent '%%'>
                                        arg_word: {<'='> <Id.Lit_Other '*'>}
                                      )
                                  )
                                }
                              spids: [351]
                            )
                          ]
                        )
                        (command.AndOr
                          ops: [Id.Op_DAmp Id.Op_DAmp]
                          children: [
                            (command.DParen
                              child: 
                                (arith_expr.Binary
                                  op_id: Id.Arith_DEqual
                                  left: {<Id.Lit_Digits 0>}
                                  right: <Id.Lit_ArithVarLike _Dbg_set_debug>
                                )
                            )
                            (command.DBracket
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_EqualTilde
                                  left: {($ Id.VSub_DollarName '$fn_name')}
                                  right: {<Id.Lit_Other '^'> <_Dbg_>}
                                )
                            )
                            (command.ControlFlow
                              token: <Id.ControlFlow_Continue continue>
                            )
                          ]
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:flags)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (braced_var_sub
                                    token: <Id.VSub_Name words>
                                    bracket_op: (bracket_op.ArrayIndex expr:{<Id.Lit_Digits 1>})
                                  )
                                }
                              spids: [391]
                            )
                          ]
                        )
                        (C {<echo>} 
                          {
                            (command_sub
                              left_token: <Id.Left_DollarParen '$('>
                              child: 
                                (command.Simple
                                  words: [{<typeset>} {<-pf>} {(${ Id.VSub_Name fn_name)}]
                                  redirects: [
                                    (redir
                                      op: <Id.Redir_Great '2>'>
                                      loc: (redir_loc.Fd fd:2)
                                      arg: {<'/dev/null'>}
                                    )
                                  ]
                                  do_fork: T
                                )
                            )
                          }
                        )
                      ]
                    )
                  redirects: [
                    (redir
                      op: <Id.Redir_DGreat '>>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {($ Id.VSub_DollarName '$_Dbg_shell_temp_profile')}
                    )
                  ]
                )
              ]
              negated: F
            )
          ]
        )
    )
    (command.ShFunction
      name: _Dbg_shell_new_shell_profile
      body: 
        (BraceGroup
          children: [
            (command.Sentence
              child: (C {<typeset>} {<-i>} {<_Dbg_o_vars>})
              terminator: <Id.Op_Semi _>
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:_Dbg_o_vars)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (braced_var_sub
                        token: <Id.VSub_Number 1>
                        suffix_op: (suffix_op.Unary tok:<Id.VTest_ColonHyphen ':-'> arg_word:{<1>})
                      )
                    }
                  spids: [438]
                )
              ]
            )
            (command.Sentence
              child: (C {<typeset>} {<-i>} {<_Dbg_o_fns>})
              terminator: <Id.Op_Semi _>
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:_Dbg_o_fns)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (braced_var_sub
                        token: <Id.VSub_Number 2>
                        suffix_op: (suffix_op.Unary tok:<Id.VTest_ColonHyphen ':-'> arg_word:{<1>})
                      )
                    }
                  spids: [453]
                )
              ]
            )
            (command.Simple
              words: [{<echo>} {(SQ <'# debugger shell profile'>)}]
              redirects: [
                (redir
                  op: <Id.Redir_Great '>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {($ Id.VSub_DollarName '$_Dbg_shell_temp_profile')}
                )
              ]
              do_fork: T
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (command.DParen child:<Id.Lit_ArithVarLike _Dbg_o_vars>)
                (C {<_Dbg_shell_append_typesets>})
              ]
            )
            (command.Simple
              words: [{<typeset>} {<-p>} {<_Dbg_restore_info>}]
              redirects: [
                (redir
                  op: <Id.Redir_DGreat '>>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {($ Id.VSub_DollarName '$_Dbg_shell_temp_profile')}
                )
              ]
              do_fork: T
            )
            (command.Simple
              words: [{<echo>} {(DQ <'source '> (${ Id.VSub_Name _Dbg_libdir) <'/data/shell.sh'>)}]
              redirects: [
                (redir
                  op: <Id.Redir_DGreat '>>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {($ Id.VSub_DollarName '$_Dbg_shell_temp_profile')}
                )
              ]
              do_fork: T
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (command.DParen child:<Id.Lit_ArithVarLike _Dbg_o_fns>)
                (C {<_Dbg_shell_append_fn_typesets>})
              ]
            )
          ]
        )
    )
  ]
)