(CommandList
  children: [
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (DBracket
                  expr: 
                    (BoolUnary
                      op_id: BoolUnary_z
                      child: 
                        {
                          (DQ 
                            (BracedVarSub
                              token: <VSub_Name BASH_SOURCE>
                              bracket_op: (ArrayIndex expr:(ArithWord w:{(Lit_Digits 0)}))
                              spids: [69 74]
                            )
                          )
                        }
                    )
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (SimpleCommand
              words: [{(echo)} {(DQ ('Sorry, you need to use a debugger-enabled version of bash.'))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:2 arg_word:{(1)} spids:[91])]
            )
            (C {(exit)} {(2)})
          ]
          spids: [16777215 81]
        )
      ]
      spids: [16777215 99]
    )
    (ForEach
      iter_name: _Dbg_file
      iter_words: [{(require)} {(pre)} {(vars)} {(io)}]
      do_arg_iter: False
      body: 
        (DoGroup
          children: [
            (C {(source)} {(${ VSub_Name _Dbg_libdir) (/init/) (${ VSub_Name _Dbg_file) (.sh)})
          ]
          spids: [124 139]
        )
      spids: [113 122]
    )
    (ForEach
      iter_name: _Dbg_file
      iter_words: [
        {(${ VSub_Name _Dbg_libdir) (/lib/) (Lit_Other '*') (.sh)}
        {(${ VSub_Name _Dbg_libdir) (/command/) (Lit_Other '*') (.sh)}
      ]
      do_arg_iter: False
      body: (DoGroup children:[(C {(source)} {($ VSub_Name '$_Dbg_file')})] spids:[164 172])
      spids: [147 162]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (DBracket expr:(BoolUnary op_id:BoolUnary_r child:{(/dev/stdin)}))
              terminator: <Op_Semi ';'>
            )
          ]
          action: [(C {(_Dbg_do_source)} {(/dev/stdin)})]
          spids: [16777215 187]
        )
        (if_arm
          cond: [
            (Sentence
              child: 
                (DBracket
                  expr: 
                    (BoolBinary
                      op_id: BoolBinary_GlobNEqual
                      left: 
                        {
                          (CommandSubPart
                            command_list: (CommandList children:[(C {(tty)})])
                            left_token: <Left_CommandSub '$('>
                            spids: [198 200]
                          )
                        }
                      right: {(SQ <'not a tty'>)}
                    )
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (C {(_Dbg_do_source)} 
              {
                (CommandSubPart
                  command_list: (CommandList children:[(C {(tty)})])
                  left_token: <Left_CommandSub '$('>
                  spids: [217 219]
                )
              }
            )
          ]
          spids: [194 212]
        )
      ]
      spids: [16777215 221]
    )
    (Assignment
      keyword: Assign_Typeset
      flags: [-a]
      pairs: [(assign_pair lhs:(LhsName name:_Dbg_input) op:Equal spids:[231])]
      spids: [227]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (DBracket
                  expr: (BoolUnary op_id:BoolUnary_n child:{(DQ ($ VSub_Name '$DBG_INPUT'))})
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:_Dbg_input)
                  op: Equal
                  rhs: {(ArrayLiteralPart words:[{(DQ ($ VSub_Name '$DBG_INPUT'))}])}
                  spids: [264]
                )
              ]
              spids: [264]
            )
            (C {(_Dbg_do_source)} 
              {
                (DQ 
                  (BracedVarSub
                    token: <VSub_Name _Dbg_input>
                    bracket_op: (ArrayIndex expr:(ArithWord w:{(Lit_Digits 0)}))
                    spids: [275 280]
                  )
                )
              }
            )
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:_Dbg_no_nx) op:Equal rhs:{(1)} spids:[284])]
              spids: [284]
            )
          ]
          spids: [16777215 260]
        )
      ]
      spids: [16777215 287]
    )
    (Assignment
      keyword: Assign_Typeset
      pairs: [
        (assign_pair
          lhs: (LhsName name:_Dbg_startup_cmdfile)
          op: Equal
          rhs: 
            {
              (BracedVarSub
                token: <VSub_Name HOME>
                suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{('~')})
                spids: [293 297]
              ) (/.) (${ VSub_Name _Dbg_debugger_name) (rc)
            }
          spids: [292]
        )
      ]
      spids: [290]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (AndOr
                  children: [
                    (DParen
                      child: 
                        (ArithBinary
                          op_id: Arith_DEqual
                          left: (ArithWord w:{(Lit_Digits 0)})
                          right: (ArithVarRef name:_Dbg_o_nx)
                        )
                    )
                    (DBracket
                      expr: 
                        (BoolUnary
                          op_id: BoolUnary_r
                          child: {(DQ ($ VSub_Name '$_Dbg_startup_cmdfile'))}
                        )
                    )
                  ]
                  op_id: Op_DAmp
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [(C {(_Dbg_do_source)} {(DQ ($ VSub_Name '$_Dbg_startup_cmdfile'))})]
          spids: [16777215 330]
        )
      ]
      spids: [16777215 339]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (DBracket
                  expr: (BoolUnary op_id:BoolUnary_z child:{(DQ (${ VSub_Name _Dbg_DEBUGGER_LEVEL))})
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (Assignment
              keyword: Assign_Typeset
              flags: [-xi]
              pairs: [
                (assign_pair
                  lhs: (LhsName name:_Dbg_DEBUGGER_LEVEL)
                  op: Equal
                  rhs: {(1)}
                  spids: [371]
                )
              ]
              spids: [367]
            )
          ]
          spids: [16777215 364]
        )
      ]
      spids: [16777215 374]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (DBracket
                  expr: 
                    (BoolBinary
                      op_id: BoolBinary_GlobDEqual
                      left: 
                        {
                          (BracedVarSub
                            token: <VSub_Name _Dbg_libdir>
                            suffix_op: 
                              (Slice
                                begin: (ArithWord w:{(Lit_Digits 0)})
                                length: (ArithWord w:{(Lit_Digits 1)})
                              )
                            spids: [391 397]
                          )
                        }
                      right: {(SQ <.>)}
                    )
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:_Dbg_libdir)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [
                              (C {(_Dbg_expand_filename)} 
                                {(${ VSub_Name _Dbg_init_cwd) (/) (${ VSub_Name _Dbg_libdir)}
                              )
                            ]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [417 427]
                      )
                    }
                  spids: [416]
                )
              ]
              spids: [416]
            )
          ]
          spids: [16777215 409]
        )
      ]
      spids: [16777215 429]
    )
    (ForEach
      iter_name: source_file
      iter_words: [
        {
          (BracedVarSub
            token: <VSub_Name _Dbg_o_init_files>
            bracket_op: (WholeArray op_id:Lit_At)
            spids: [438 443]
          )
        }
        {(DQ ($ VSub_Name '$DBG_RESTART_FILE'))}
      ]
      do_arg_iter: False
      body: 
        (DoGroup
          children: [
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: (BoolUnary op_id:BoolUnary_n child:{(DQ ($ VSub_Name '$source_file'))})
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (If
                      arms: [
                        (if_arm
                          cond: [
                            (Sentence
                              child: 
                                (AndOr
                                  children: [
                                    (DBracket
                                      expr: 
                                        (BoolUnary
                                          op_id: BoolUnary_r
                                          child: {(DQ ($ VSub_Name '$source_file'))}
                                        )
                                    )
                                    (DBracket
                                      expr: 
                                        (BoolUnary
                                          op_id: BoolUnary_f
                                          child: {(DQ ($ VSub_Name '$source_file'))}
                                        )
                                    )
                                  ]
                                  op_id: Op_DAmp
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [(C {(source)} {($ VSub_Name '$source_file')})]
                          spids: [16777215 496]
                        )
                      ]
                      else_action: [
                        (C {(_Dbg_errmsg)} 
                          {(DQ ('Unable to read shell script: ') (${ VSub_Name source_file))}
                        )
                      ]
                      spids: [504 517]
                    )
                  ]
                  spids: [16777215 467]
                )
              ]
              spids: [16777215 520]
            )
          ]
          spids: [450 522]
        )
      spids: [437 448]
    )
  ]
)