(command.CommandList
  children: [
    (C {<typeset>} {<-a>} {<_Dbg_dir>})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:_Dbg_dir)
          op: assign_op.Equal
          rhs: {(sh_array_literal left:<Id.Op_LParen _> words:[{(SQ <'\\$cdir'>)} {(SQ <'\\$cwd'>)}])}
          spids: [68]
        )
      ]
    )
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [
        (command.DBracket
          expr: (bool_expr.Unary op_id:Id.BoolUnary_z child:{(${ Id.VSub_Name _Dbg_cdir)})
        )
        (C {<typeset>} 
          {<Id.Lit_VarLike '_Dbg_cdir='> 
            (braced_var_sub
              token: <Id.VSub_Name _Dbg_source_file>
              suffix_op: 
                (suffix_op.Unary
                  tok: <Id.VOp1_Percent '%'>
                  arg_word: {<Id.Lit_Slash '/'> <Id.Lit_Other '*'>}
                )
            )
          }
        )
      ]
    )
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [
        (command.DBracket
          expr: (bool_expr.Unary op_id:Id.BoolUnary_z child:{(${ Id.VSub_Name _Dbg_cdir)})
        )
        (C {<typeset>} 
          {<Id.Lit_VarLike '_Dbg_cdir='> 
            (command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<pwd>}))
          }
        )
      ]
    )
    (command.ShFunction
      name: _Dbg_adjust_filename
      body: 
        (BraceGroup
          children: [
            (C {<typeset>} {<-r>} {<Id.Lit_VarLike 'filename='> (DQ ($ Id.VSub_Number '$1'))})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DParen
                              child: 
                                (arith_expr.Binary
                                  op_id: Id.Arith_DEqual
                                  left: <Id.Lit_ArithVarLike _Dbg_set_annotate>
                                  right: {<Id.Lit_Digits 1>}
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<echo>} 
                      {
                        (command_sub
                          left_token: <Id.Left_DollarParen '$('>
                          child: 
                            (C {<_Dbg_resolve_expand_filename>} {($ Id.VSub_DollarName '$filename')})
                        )
                      }
                    )
                  ]
                  spids: [149 164]
                )
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: (command.DParen child:<Id.Lit_ArithVarLike _Dbg_set_basename>)
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<echo>} 
                      {
                        (braced_var_sub
                          token: <Id.VSub_Name filename>
                          suffix_op: 
                            (suffix_op.Unary
                              tok: <Id.VOp1_DPound '##'>
                              arg_word: {<Id.Lit_Other '*'> <Id.Lit_Slash '/'>}
                            )
                        )
                      }
                    )
                  ]
                  spids: [176 185]
                )
              ]
              else_action: [(C {<echo>} {($ Id.VSub_DollarName '$filename')})]
            )
          ]
        )
    )
    (command.ShFunction
      name: _Dbg_file_canonic
      body: 
        (BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DParen
                              child: 
                                (arith_expr.Binary
                                  op_id: Id.Arith_NEqual
                                  left: {($ Id.VSub_Pound '$#')}
                                  right: {<Id.Lit_Digits 1>}
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<echo>} {(SQ <'??'>)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [224 239]
                )
              ]
            )
            (C {<typeset>} {<Id.Lit_VarLike 'filename='> (DQ ($ Id.VSub_Number '$1'))})
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (command.DParen child:<Id.Lit_ArithVarLike _Dbg_set_basename>)
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:filename)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (braced_var_sub
                            token: <Id.VSub_Name filename>
                            suffix_op: 
                              (suffix_op.Unary
                                tok: <Id.VOp1_DPound '##'>
                                arg_word: {<Id.Lit_Other '*'> <Id.Lit_Slash '/'>}
                              )
                          )
                        }
                      spids: [274]
                    )
                  ]
                )
              ]
            )
            (C {<echo>} {($ Id.VSub_DollarName '$filename')})
            (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})
          ]
        )
    )
    (command.ShFunction
      name: _Dbg_tilde_expand_filename
      body: 
        (BraceGroup
          children: [
            (C {<typeset>} 
              {<Id.Lit_VarLike 'cmd='> 
                (DQ <'filename='> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) 
                  <'(builtin echo '> ($ Id.VSub_Number '$1') <')'>
                )
              }
            )
            (C {<eval>} {($ Id.VSub_DollarName '$cmd')})
            (command.DBracket
              expr: (bool_expr.Unary op_id:Id.BoolUnary_r child:{($ Id.VSub_DollarName '$filename')})
            )
          ]
        )
    )
    (command.ShFunction
      name: _Dbg_resolve_expand_filename
      body: 
        (BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DParen
                              child: 
                                (arith_expr.Binary
                                  op_id: Id.Arith_DEqual
                                  left: {($ Id.VSub_Pound '$#')}
                                  right: {<Id.Lit_Digits 0>}
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<_Dbg_errmsg>} 
                      {
                        (DQ 
                          <'Internal debug error _Dbg_resolve_expand_filename(): null file to find'>
                        )
                      }
                    )
                    (C {<echo>} {(SQ )})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [365 380]
                )
              ]
            )
            (C {<typeset>} {<Id.Lit_VarLike 'find_file='> (DQ ($ Id.VSub_Number '$1'))})
            (C {<typeset>} {<found_file>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:found_file)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ 
                        (braced_var_sub
                          token: <Id.VSub_Name _Dbg_file2canonic>
                          bracket_op: 
                            (bracket_op.ArrayIndex
                              expr: {($ Id.VSub_DollarName '$find_file')}
                            )
                        )
                      )
                    }
                  spids: [428]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              expr: 
                                (bool_expr.Unary
                                  op_id: Id.BoolUnary_n
                                  child: {($ Id.VSub_DollarName '$found_file')}
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<echo>} {(DQ ($ Id.VSub_DollarName '$found_file'))})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<0>}
                    )
                  ]
                  spids: [439 451]
                )
              ]
            )
            (command.If
              arms: [
                (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 find_file>
                                        suffix_op: 
                                          (suffix_op.Slice
                                            begin: {<Id.Lit_Digits 0>}
                                            length: {<Id.Lit_Digits 1>}
                                          )
                                      )
                                    }
                                  right: {(SQ <'/'>)}
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:full_find_file)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                child: 
                                  (C {<_Dbg_expand_filename>} {(DQ ($ Id.VSub_DollarName '$find_file'))})
                              )
                            }
                          spids: [499]
                        )
                      ]
                    )
                    (C {<echo>} {(DQ ($ Id.VSub_DollarName '$full_find_file'))})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<0>}
                    )
                  ]
                  spids: [470 492]
                )
                (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 find_file>
                                        suffix_op: 
                                          (suffix_op.Slice
                                            begin: {<Id.Lit_Digits 0>}
                                            length: {<Id.Lit_Digits 1>}
                                          )
                                      )
                                    }
                                  right: {(SQ <.>)}
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:full_find_file)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                child: 
                                  (C {<_Dbg_expand_filename>} 
                                    {
                                      (DQ (${ Id.VSub_Name _Dbg_init_cwd) <'/'> 
                                        ($ Id.VSub_DollarName '$find_file')
                                      )
                                    }
                                  )
                              )
                            }
                          spids: [550]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.AndOr
                                      ops: [Id.Op_DPipe]
                                      children: [
                                        (command.DBracket
                                          expr: 
                                            (bool_expr.Unary
                                              op_id: Id.BoolUnary_z
                                              child: {(DQ ($ Id.VSub_DollarName '$full_find_file'))}
                                            )
                                        )
                                        (command.DBracket
                                          expr: 
                                            (bool_expr.LogicalNot
                                              child: 
                                                (bool_expr.Unary
                                                  op_id: Id.BoolUnary_r
                                                  child: {($ Id.VSub_DollarName '$full_find_file')}
                                                )
                                            )
                                        )
                                      ]
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:full_find_file)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (command_sub
                                        left_token: <Id.Left_DollarParen '$('>
                                        child: 
                                          (C {<_Dbg_expand_filename>} 
                                            {(DQ ($ Id.VSub_DollarName '$find_file'))}
                                          )
                                      )
                                    }
                                  spids: [596]
                                )
                              ]
                            )
                          ]
                          spids: [564 589]
                        )
                      ]
                    )
                    (C {<echo>} {(DQ ($ Id.VSub_DollarName '$full_find_file'))})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<0>}
                    )
                  ]
                  spids: [521 543]
                )
              ]
              else_action: [
                (C {<typeset>} {<-i>} 
                  {<Id.Lit_VarLike 'n='> 
                    (braced_var_sub
                      token: <Id.VSub_Name _Dbg_dir>
                      prefix_op: (Id.VSub_Pound)
                      bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                    )
                  }
                )
                (C {<typeset>} {<-i>} {<i>})
                (command.ForExpr
                  init: 
                    (arith_expr.BinaryAssign
                      op_id: Id.Arith_Equal
                      left: <Id.Lit_ArithVarLike i>
                      right: {<Id.Lit_Digits 0>}
                    )
                  cond: 
                    (arith_expr.Binary
                      op_id: Id.Arith_Less
                      left: <Id.Lit_ArithVarLike i>
                      right: <Id.Lit_ArithVarLike n>
                    )
                  update: 
                    (arith_expr.UnaryAssign
                      op_id: Id.Node_PostDPlus
                      child: <Id.Lit_ArithVarLike i>
                    )
                  body: 
                    (command.DoGroup
                      children: [
                        (C {<typeset>} 
                          {<Id.Lit_VarLike 'basename='> 
                            (DQ 
                              (braced_var_sub
                                token: <Id.VSub_Name _Dbg_dir>
                                bracket_op: (bracket_op.ArrayIndex expr:<Id.Lit_ArithVarLike i>)
                              )
                            )
                          }
                        )
                        (command.If
                          arms: [
                            (if_arm
                              cond: 
                                (condition.Shell
                                  commands: [
                                    (command.Sentence
                                      child: 
                                        (command.DBracket
                                          expr: 
                                            (bool_expr.Binary
                                              op_id: Id.BoolBinary_GlobDEqual
                                              left: {($ Id.VSub_DollarName '$basename')}
                                              right: {(SQ <'\\$cdir'>)}
                                            )
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                )
                              action: [
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:basename)
                                      op: assign_op.Equal
                                      rhs: {($ Id.VSub_DollarName '$_Dbg_cdir')}
                                      spids: [709]
                                    )
                                  ]
                                )
                              ]
                              spids: [690 706]
                            )
                            (if_arm
                              cond: 
                                (condition.Shell
                                  commands: [
                                    (command.Sentence
                                      child: 
                                        (command.DBracket
                                          expr: 
                                            (bool_expr.Binary
                                              op_id: Id.BoolBinary_GlobDEqual
                                              left: {($ Id.VSub_DollarName '$basename')}
                                              right: {(SQ <'\\$cwd'>)}
                                            )
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                )
                              action: [
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:basename)
                                      op: assign_op.Equal
                                      rhs: 
                                        {
                                          (command_sub
                                            left_token: <Id.Left_DollarParen '$('>
                                            child: (C {<pwd>})
                                          )
                                        }
                                      spids: [732]
                                    )
                                  ]
                                )
                              ]
                              spids: [713 729]
                            )
                          ]
                        )
                        (command.If
                          arms: [
                            (if_arm
                              cond: 
                                (condition.Shell
                                  commands: [
                                    (command.Sentence
                                      child: 
                                        (command.DBracket
                                          expr: 
                                            (bool_expr.Unary
                                              op_id: Id.BoolUnary_f
                                              child: 
                                                {
                                                  (DQ ($ Id.VSub_DollarName '$basename') <'/'> 
                                                    ($ Id.VSub_DollarName '$find_file')
                                                  )
                                                }
                                            )
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                )
                              action: [
                                (C {<echo>} 
                                  {
                                    (DQ ($ Id.VSub_DollarName '$basename') <'/'> 
                                      ($ Id.VSub_DollarName '$find_file')
                                    )
                                  }
                                )
                                (command.ControlFlow
                                  token: <Id.ControlFlow_Return return>
                                  arg_word: {<0>}
                                )
                              ]
                              spids: [741 757]
                            )
                          ]
                        )
                      ]
                    )
                )
              ]
            )
            (C {<echo>} {(SQ )})
            (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})
          ]
        )
    )
  ]
)