(CommandList
  children: [
    (C {(typeset)} {(-a)} {(_Dbg_dir)})
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:_Dbg_dir)
          op: Equal
          rhs: {(ArrayLiteralPart words:[{(SQ <"\\$cdir">)}{(SQ <"\\$cwd">)}])}
          spids: [68]
        )
      ]
      spids: [68]
    )
    (AndOr
      children: [
        (DBracket expr:(BoolUnary op_id:BoolUnary_z child:{(${ VSub_Name _Dbg_cdir)}))
        (C {(typeset)} 
          {(Lit_VarLike "_Dbg_cdir=") 
            (BracedVarSub
              token: <VSub_Name _Dbg_source_file>
              suffix_op: (StringUnary op_id:VOp1_Percent arg_word:{(Lit_Slash /) ("*")})
              spids: [99 104]
            )
          }
        )
      ]
      op_id: Op_DAmp
    )
    (AndOr
      children: [
        (DBracket expr:(BoolUnary op_id:BoolUnary_z child:{(${ VSub_Name _Dbg_cdir)}))
        (C {(typeset)} 
          {(Lit_VarLike "_Dbg_cdir=") 
            (CommandSubPart
              command_list: (CommandList children:[(C {(pwd)})])
              left_token: <Left_CommandSub "$(">
              spids: [121 123]
            )
          }
        )
      ]
      op_id: Op_DAmp
    )
    (FuncDef
      name: _Dbg_adjust_filename
      body: 
        (BraceGroup
          children: [
            (C {(typeset)} {(-r)} {(Lit_VarLike "filename=") (DQ ($ VSub_Number "$1"))})
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DParen
                          child: 
                            (ArithBinary
                              op_id: Arith_DEqual
                              left: (ArithVarRef name:_Dbg_set_annotate)
                              right: (ArithWord w:{(Lit_Digits 1)})
                            )
                        )
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (C {(echo)} 
                      {
                        (CommandSubPart
                          command_list: 
                            (CommandList
                              children: [
                                (C {(_Dbg_resolve_expand_filename)} {($ VSub_Name "$filename")})
                              ]
                            )
                          left_token: <Left_CommandSub "$(">
                          spids: [169 173]
                        )
                      }
                    )
                  ]
                  spids: [-1 164]
                )
                (if_arm
                  cond: [
                    (Sentence
                      child: (DParen child:(ArithVarRef name:_Dbg_set_basename))
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (C {(echo)} 
                      {
                        (BracedVarSub
                          token: <VSub_Name filename>
                          suffix_op: (StringUnary op_id:VOp1_DPound arg_word:{("*") (Lit_Slash /)})
                          spids: [190 195]
                        )
                      }
                    )
                  ]
                  spids: [176 185]
                )
              ]
              else_action: [(C {(echo)} {($ VSub_Name "$filename")})]
              spids: [198 206]
            )
          ]
          spids: [136]
        )
      spids: [132 135]
    )
    (FuncDef
      name: _Dbg_file_canonic
      body: 
        (BraceGroup
          children: [
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DParen
                          child: 
                            (ArithBinary
                              op_id: Arith_NEqual
                              left: (ArithWord w:{($ VSub_Pound "$#")})
                              right: (ArithWord w:{(Lit_Digits 1)})
                            )
                        )
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (C {(echo)} {(SQ <"??">)})
                    (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)})
                  ]
                  spids: [-1 239]
                )
              ]
              spids: [-1 254]
            )
            (C {(typeset)} {(Lit_VarLike "filename=") (DQ ($ VSub_Number "$1"))})
            (AndOr
              children: [
                (DParen child:(ArithVarRef name:_Dbg_set_basename))
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:filename)
                      op: Equal
                      rhs: 
                        {
                          (BracedVarSub
                            token: <VSub_Name filename>
                            suffix_op: (StringUnary op_id:VOp1_DPound arg_word:{("*") (Lit_Slash /)})
                            spids: [275 280]
                          )
                        }
                      spids: [274]
                    )
                  ]
                  spids: [274]
                )
              ]
              op_id: Op_DAmp
            )
            (C {(echo)} {($ VSub_Name "$filename")})
            (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
          ]
          spids: [221]
        )
      spids: [217 220]
    )
    (FuncDef
      name: _Dbg_tilde_expand_filename
      body: 
        (BraceGroup
          children: [
            (C {(typeset)} 
              {(Lit_VarLike "cmd=") 
                (DQ ("filename=") (EscapedLiteralPart token:<Lit_EscapedChar "\\$">) ("(builtin echo ") 
                  ($ VSub_Number "$1") (")")
                )
              }
            )
            (C {(eval)} {($ VSub_Name "$cmd")})
            (DBracket expr:(BoolUnary op_id:BoolUnary_r child:{($ VSub_Name "$filename")}))
          ]
          spids: [311]
        )
      spids: [307 310]
    )
    (FuncDef
      name: _Dbg_resolve_expand_filename
      body: 
        (BraceGroup
          children: [
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DParen
                          child: 
                            (ArithBinary
                              op_id: Arith_DEqual
                              left: (ArithWord w:{($ VSub_Pound "$#")})
                              right: (ArithWord w:{(Lit_Digits 0)})
                            )
                        )
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (C {(_Dbg_errmsg)} 
                      {
                        (DQ 
                          (
"Internal debug error _Dbg_resolve_expand_filename(): null file to find"
                          )
                        )
                      }
                    )
                    (C {(echo)} {(SQ )})
                    (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)})
                  ]
                  spids: [-1 380]
                )
              ]
              spids: [-1 403]
            )
            (C {(typeset)} {(Lit_VarLike "find_file=") (DQ ($ VSub_Number "$1"))})
            (C {(typeset)} {(found_file)})
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:found_file)
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (BracedVarSub
                          token: <VSub_Name _Dbg_file2canonic>
                          bracket_op: (ArrayIndex expr:(ArithWord w:{($ VSub_Name "$find_file")}))
                          spids: [430 435]
                        )
                      )
                    }
                  spids: [428]
                )
              ]
              spids: [428]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: (BoolUnary op_id:BoolUnary_n child:{($ VSub_Name "$found_file")})
                        )
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (C {(echo)} {(DQ ($ VSub_Name "$found_file"))})
                    (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
                  ]
                  spids: [-1 451]
                )
              ]
              spids: [-1 466]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: 
                            (BoolBinary
                              op_id: BoolBinary_GlobDEqual
                              left: 
                                {
                                  (BracedVarSub
                                    token: <VSub_Name find_file>
                                    suffix_op: 
                                      (Slice
                                        begin: (ArithWord w:{(Lit_Digits 0)})
                                        length: (ArithWord w:{(Lit_Digits 1)})
                                      )
                                    spids: [474 480]
                                  )
                                }
                              right: {(SQ </>)}
                            )
                        )
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:full_find_file)
                          op: Equal
                          rhs: 
                            {
                              (CommandSubPart
                                command_list: 
                                  (CommandList
                                    children: [
                                      (C {(_Dbg_expand_filename)} {(DQ ($ VSub_Name "$find_file"))})
                                    ]
                                  )
                                left_token: <Left_CommandSub "$(">
                                spids: [500 506]
                              )
                            }
                          spids: [499]
                        )
                      ]
                      spids: [499]
                    )
                    (C {(echo)} {(DQ ($ VSub_Name "$full_find_file"))})
                    (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
                  ]
                  spids: [-1 492]
                )
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: 
                            (BoolBinary
                              op_id: BoolBinary_GlobDEqual
                              left: 
                                {
                                  (BracedVarSub
                                    token: <VSub_Name find_file>
                                    suffix_op: 
                                      (Slice
                                        begin: (ArithWord w:{(Lit_Digits 0)})
                                        length: (ArithWord w:{(Lit_Digits 1)})
                                      )
                                    spids: [525 531]
                                  )
                                }
                              right: {(SQ <.>)}
                            )
                        )
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:full_find_file)
                          op: Equal
                          rhs: 
                            {
                              (CommandSubPart
                                command_list: 
                                  (CommandList
                                    children: [
                                      (C {(_Dbg_expand_filename)} 
                                        {
                                          (DQ (${ VSub_Name _Dbg_init_cwd) (/) 
                                            ($ VSub_Name "$find_file")
                                          )
                                        }
                                      )
                                    ]
                                  )
                                left_token: <Left_CommandSub "$(">
                                spids: [551 561]
                              )
                            }
                          spids: [550]
                        )
                      ]
                      spids: [550]
                    )
                    (If
                      arms: [
                        (if_arm
                          cond: [
                            (Sentence
                              child: 
                                (AndOr
                                  children: [
                                    (DBracket
                                      expr: 
                                        (BoolUnary
                                          op_id: BoolUnary_z
                                          child: {(DQ ($ VSub_Name "$full_find_file"))}
                                        )
                                    )
                                    (DBracket
                                      expr: 
                                        (LogicalNot
                                          child: 
                                            (BoolUnary
                                              op_id: BoolUnary_r
                                              child: {($ VSub_Name "$full_find_file")}
                                            )
                                        )
                                    )
                                  ]
                                  op_id: Op_DPipe
                                )
                              terminator: <Op_Semi ";">
                            )
                          ]
                          action: [
                            (Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (LhsName name:full_find_file)
                                  op: Equal
                                  rhs: 
                                    {
                                      (CommandSubPart
                                        command_list: 
                                          (CommandList
                                            children: [
                                              (C {(_Dbg_expand_filename)} 
                                                {(DQ ($ VSub_Name "$find_file"))}
                                              )
                                            ]
                                          )
                                        left_token: <Left_CommandSub "$(">
                                        spids: [597 603]
                                      )
                                    }
                                  spids: [596]
                                )
                              ]
                              spids: [596]
                            )
                          ]
                          spids: [-1 589]
                        )
                      ]
                      spids: [-1 606]
                    )
                    (C {(echo)} {(DQ ($ VSub_Name "$full_find_file"))})
                    (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
                  ]
                  spids: [521 543]
                )
              ]
              else_action: [
                (C {(typeset)} {(-i)} 
                  {(Lit_VarLike "n=") 
                    (BracedVarSub
                      token: <VSub_Name _Dbg_dir>
                      prefix_op: VSub_Pound
                      bracket_op: (WholeArray op_id:Lit_At)
                      spids: [633 639]
                    )
                  }
                )
                (C {(typeset)} {(-i)} {(i)})
                (ForExpr
                  init: 
                    (BinaryAssign
                      op_id: Arith_Equal
                      left: (LhsName name:i)
                      right: (ArithWord w:{(Lit_Digits 0)})
                    )
                  cond: 
                    (ArithBinary
                      op_id: Arith_Less
                      left: (ArithVarRef name:i)
                      right: (ArithVarRef name:n)
                    )
                  update: (UnaryAssign op_id:Node_PostDPlus child:(LhsName name:i))
                  body: 
                    (DoGroup
                      children: [
                        (C {(typeset)} 
                          {(Lit_VarLike "basename=") 
                            (DQ 
                              (BracedVarSub
                                token: <VSub_Name _Dbg_dir>
                                bracket_op: (ArrayIndex expr:(ArithVarRef name:i))
                                spids: [681 686]
                              )
                            )
                          }
                        )
                        (If
                          arms: [
                            (if_arm
                              cond: [
                                (Sentence
                                  child: 
                                    (DBracket
                                      expr: 
                                        (BoolBinary
                                          op_id: BoolBinary_GlobDEqual
                                          left: {($ VSub_Name "$basename")}
                                          right: {(SQ <"\\$cdir">)}
                                        )
                                    )
                                  terminator: <Op_Semi ";">
                                )
                              ]
                              action: [
                                (Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (LhsName name:basename)
                                      op: Equal
                                      rhs: {($ VSub_Name "$_Dbg_cdir")}
                                      spids: [709]
                                    )
                                  ]
                                  spids: [709]
                                )
                              ]
                              spids: [-1 706]
                            )
                            (if_arm
                              cond: [
                                (Sentence
                                  child: 
                                    (DBracket
                                      expr: 
                                        (BoolBinary
                                          op_id: BoolBinary_GlobDEqual
                                          left: {($ VSub_Name "$basename")}
                                          right: {(SQ <"\\$cwd">)}
                                        )
                                    )
                                  terminator: <Op_Semi ";">
                                )
                              ]
                              action: [
                                (Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (LhsName name:basename)
                                      op: Equal
                                      rhs: 
                                        {
                                          (CommandSubPart
                                            command_list: (CommandList children:[(C {(pwd)})])
                                            left_token: <Left_CommandSub "$(">
                                            spids: [733 735]
                                          )
                                        }
                                      spids: [732]
                                    )
                                  ]
                                  spids: [732]
                                )
                              ]
                              spids: [713 729]
                            )
                          ]
                          spids: [-1 738]
                        )
                        (If
                          arms: [
                            (if_arm
                              cond: [
                                (Sentence
                                  child: 
                                    (DBracket
                                      expr: 
                                        (BoolUnary
                                          op_id: BoolUnary_f
                                          child: 
                                            {
                                              (DQ ($ VSub_Name "$basename") (/) 
                                                ($ VSub_Name "$find_file")
                                              )
                                            }
                                        )
                                    )
                                  terminator: <Op_Semi ";">
                                )
                              ]
                              action: [
                                (C {(echo)} 
                                  {(DQ ($ VSub_Name "$basename") (/) ($ VSub_Name "$find_file"))}
                                )
                                (ControlFlow
                                  token: <ControlFlow_Return return>
                                  arg_word: {(0)}
                                )
                              ]
                              spids: [-1 757]
                            )
                          ]
                          spids: [-1 774]
                        )
                      ]
                      spids: [674 777]
                    )
                )
              ]
              spids: [621 780]
            )
            (C {(echo)} {(SQ )})
            (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)})
          ]
          spids: [361]
        )
      spids: [357 360]
    )
  ]
)